@redneckz/wildless-cms-uni-blocks 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migrate.js +40 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +306 -258
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/CardTickIcon.svg +1 -1
- package/cosmos-static/icons/DocDownload.svg +1 -0
- package/dist/EventBus/EventMap.d.ts +2 -0
- package/dist/components/Accordion/AccordionItem.js +1 -1
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/dist/components/BlockContent.d.ts +2 -3
- package/dist/components/Blocks.d.ts +1 -3
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.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/useCalculatorParams.js +2 -5
- package/dist/components/Calculator/useCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +1 -2
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Catalog/CatalogCard.js +12 -6
- package/dist/components/Catalog/CatalogCard.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +7 -1
- package/dist/components/ComparisonTable/ComparisonTableRows.d.ts +2 -2
- package/dist/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.js +1 -1
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.js +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +2 -5
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.d.ts +2 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContainer.d.ts +2 -2
- package/dist/components/Gallery/GalleryContainer.js +3 -2
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +4 -4
- package/dist/components/Gallery/GalleryProps.d.ts +1 -1
- package/dist/components/Gallery/constants.d.ts +0 -2
- package/dist/components/Gallery/constants.js +1 -5
- package/dist/components/Gallery/constants.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriodContent.d.ts +2 -2
- package/dist/components/Header/Header.js +3 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +4 -6
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -0
- package/dist/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -4
- package/dist/components/PictureText/PictureText.js +2 -5
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -5
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js +2 -5
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +14 -2
- package/dist/components/ProductGallery/ProductGallery.js +4 -11
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryBlock.js +2 -5
- package/dist/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +14 -14
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +2 -5
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTileContent.d.ts +2 -2
- package/dist/components/Recommendation/RecommendationContent.d.ts +4 -4
- package/dist/components/SafeDepositRental/SafeDepositRental.js +4 -0
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +4 -4
- package/dist/components/Tabs/Tabs.js +10 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +13 -11
- package/dist/components/Tabs/renderGroupTab.d.ts +3 -3
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/components/Tabs/renderTab.d.ts +1 -1
- package/dist/components/Tabs/renderTab.js +19 -8
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.d.ts +14 -0
- package/dist/components/TariffsTable/EmbeddableCellData.js +35 -0
- package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -0
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.d.ts +15 -0
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js +21 -0
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTable.js +10 -11
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js +2 -2
- package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.d.ts +6 -3
- package/dist/components/TariffsTable/TariffsTableCell.js +18 -10
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +80 -26
- package/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +5 -5
- package/dist/components/TariffsTable/TariffsTableHorizontal.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.d.ts +5 -4
- package/dist/components/TariffsTable/TariffsTableRow.js +3 -3
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +7 -0
- package/dist/components/TariffsTable/TariffsTableRowContainer.js +15 -0
- package/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTableTileCell.d.ts +7 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +15 -9
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableVertical.d.ts +5 -3
- package/dist/components/TariffsTable/TariffsTableVertical.js.map +1 -1
- package/dist/components/TariffsTable/dataFixture.d.ts +5 -0
- package/dist/components/TariffsTable/dataFixture.js +140 -0
- package/dist/components/TariffsTable/dataFixture.js.map +1 -0
- package/dist/components/Tile/Tile.js +6 -9
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/components/Tile/TileContent.d.ts +4 -2
- package/dist/hooks/useExchangeRates.js +9 -18
- package/dist/hooks/useExchangeRates.js.map +1 -1
- package/dist/hooks/useTariffsInnerTableData.d.ts +1 -0
- package/dist/hooks/useTariffsInnerTableData.js +16 -0
- package/dist/hooks/useTariffsInnerTableData.js.map +1 -0
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/BlockVersion.d.ts +1 -0
- package/dist/model/BlockVersion.js +5 -0
- package/dist/model/BlockVersion.js.map +1 -1
- package/dist/model/HeadlineType.d.ts +3 -3
- package/dist/model/LinkProps.d.ts +6 -4
- package/dist/services/sitemap/useSitemap.js +2 -8
- package/dist/services/sitemap/useSitemap.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +2 -2
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +1 -2
- package/dist/ui-kit/Button/Button.d.ts +2 -4
- package/dist/ui-kit/Button/Button.js +1 -1
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/Button/Button.mobile.d.ts +2 -4
- package/dist/ui-kit/Button/Button.mobile.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/dist/ui-kit/Description/Description.d.ts +3 -3
- package/dist/ui-kit/Description/Description.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/Heading/HeadingProps.d.ts +5 -2
- package/dist/ui-kit/InnerTable/InnerTable.d.ts +5 -0
- package/dist/ui-kit/InnerTable/InnerTable.js +17 -0
- package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -0
- package/dist/ui-kit/InnerTable/InnerTableBody.d.ts +7 -0
- package/dist/ui-kit/InnerTable/InnerTableBody.js +18 -0
- package/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -0
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.d.ts +6 -0
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.js +33 -0
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -0
- package/dist/ui-kit/InnerTable/InnerTableButton.d.ts +6 -0
- package/dist/ui-kit/InnerTable/InnerTableButton.js +14 -0
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -0
- package/dist/ui-kit/InnerTable/InnerTableHeader.d.ts +7 -0
- package/dist/ui-kit/InnerTable/InnerTableHeader.js +8 -0
- package/dist/ui-kit/InnerTable/InnerTableHeader.js.map +1 -0
- package/dist/ui-kit/InnerTable/InnerTableProps.d.ts +24 -0
- package/dist/{components/GroupBlock/BlocksTypeProps.js → ui-kit/InnerTable/InnerTableProps.js} +1 -1
- package/dist/ui-kit/InnerTable/InnerTableProps.js.map +1 -0
- package/dist/ui-kit/List/List.js +6 -2
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListProps.d.ts +9 -1
- package/dist/ui-kit/Logo/Logo.js +6 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/dist/ui-kit/TopItem/TopItem.js +2 -2
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/assertUnreachable.d.ts +1 -0
- package/dist/utils/assertUnreachable.js +7 -0
- package/dist/utils/assertUnreachable.js.map +1 -0
- package/dist/utils/fetchJSON.d.ts +2 -0
- package/dist/utils/fetchJSON.js +24 -0
- package/dist/utils/fetchJSON.js.map +1 -0
- package/dist/utils/roundTo.d.ts +1 -1
- package/dist/utils/roundTo.js +1 -1
- package/dist/utils/roundTo.js.map +1 -1
- package/lib/EventBus/EventMap.d.ts +2 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/lib/components/BlockContent.d.ts +2 -3
- package/lib/components/Blocks.d.ts +1 -3
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.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/useCalculatorParams.js +2 -5
- package/lib/components/Calculator/useCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +1 -2
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Catalog/CatalogCard.js +12 -6
- package/lib/components/Catalog/CatalogCard.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +7 -1
- package/lib/components/ComparisonTable/ComparisonTableRows.d.ts +2 -2
- package/lib/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.js +1 -1
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.js +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +2 -5
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.d.ts +2 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContainer.d.ts +2 -2
- package/lib/components/Gallery/GalleryContainer.js +4 -3
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +4 -4
- package/lib/components/Gallery/GalleryProps.d.ts +1 -1
- package/lib/components/Gallery/constants.d.ts +0 -2
- package/lib/components/Gallery/constants.js +0 -4
- package/lib/components/Gallery/constants.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriodContent.d.ts +2 -2
- package/lib/components/Header/Header.js +3 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +4 -6
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -0
- package/lib/components/Navigation/Navigation.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -4
- package/lib/components/PictureText/PictureText.js +2 -5
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +2 -5
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js +2 -5
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +14 -2
- package/lib/components/ProductGallery/ProductGallery.js +4 -11
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryBlock.js +2 -5
- package/lib/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +1 -0
- package/lib/components/ProductTile/ProductTile.js +14 -14
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +2 -5
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTileContent.d.ts +2 -2
- package/lib/components/Recommendation/RecommendationContent.d.ts +4 -4
- package/lib/components/SafeDepositRental/SafeDepositRental.js +4 -0
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/Tabs/Tabs.d.ts +4 -4
- package/lib/components/Tabs/Tabs.js +10 -3
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +13 -11
- package/lib/components/Tabs/renderGroupTab.d.ts +3 -3
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/components/Tabs/renderTab.d.ts +1 -1
- package/lib/components/Tabs/renderTab.js +19 -8
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.d.ts +14 -0
- package/lib/components/TariffsTable/EmbeddableCellData.js +33 -0
- package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -0
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.d.ts +14 -0
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js +19 -0
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTable.fixture.d.ts +1 -0
- package/lib/components/TariffsTable/TariffsTable.js +10 -11
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js +2 -2
- package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.d.ts +6 -3
- package/lib/components/TariffsTable/TariffsTableCell.js +18 -10
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +80 -26
- package/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +5 -5
- package/lib/components/TariffsTable/TariffsTableHorizontal.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.d.ts +5 -4
- package/lib/components/TariffsTable/TariffsTableRow.js +3 -3
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +7 -0
- package/lib/components/TariffsTable/TariffsTableRowContainer.js +13 -0
- package/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTableTileCell.d.ts +7 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +15 -9
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableVertical.d.ts +5 -3
- package/lib/components/TariffsTable/TariffsTableVertical.js.map +1 -1
- package/lib/components/TariffsTable/dataFixture.d.ts +5 -0
- package/lib/components/TariffsTable/dataFixture.js +138 -0
- package/lib/components/TariffsTable/dataFixture.js.map +1 -0
- package/lib/components/TextBlock/TextBlock.fixture.d.ts +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +1 -1
- package/lib/components/Tile/Tile.js +6 -9
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/components/Tile/TileContent.d.ts +4 -2
- package/lib/hooks/useExchangeRates.js +9 -18
- package/lib/hooks/useExchangeRates.js.map +1 -1
- package/lib/hooks/useTariffsInnerTableData.d.ts +1 -0
- package/lib/hooks/useTariffsInnerTableData.js +13 -0
- package/lib/hooks/useTariffsInnerTableData.js.map +1 -0
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/BlockVersion.d.ts +1 -0
- package/lib/model/BlockVersion.js +4 -1
- package/lib/model/BlockVersion.js.map +1 -1
- package/lib/model/HeadlineType.d.ts +3 -3
- package/lib/model/LinkProps.d.ts +6 -4
- package/lib/services/sitemap/useSitemap.js +2 -8
- package/lib/services/sitemap/useSitemap.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +2 -2
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +1 -2
- package/lib/ui-kit/Button/Button.d.ts +2 -4
- package/lib/ui-kit/Button/Button.js +1 -1
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/Button/Button.mobile.d.ts +2 -4
- package/lib/ui-kit/Button/Button.mobile.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/lib/ui-kit/Description/Description.d.ts +3 -3
- package/lib/ui-kit/Description/Description.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/Heading/HeadingProps.d.ts +5 -2
- package/lib/ui-kit/InnerTable/InnerTable.d.ts +5 -0
- package/lib/ui-kit/InnerTable/InnerTable.js +15 -0
- package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -0
- package/lib/ui-kit/InnerTable/InnerTableBody.d.ts +7 -0
- package/lib/ui-kit/InnerTable/InnerTableBody.js +16 -0
- package/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -0
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.d.ts +6 -0
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.js +31 -0
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -0
- package/lib/ui-kit/InnerTable/InnerTableButton.d.ts +6 -0
- package/lib/ui-kit/InnerTable/InnerTableButton.js +12 -0
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -0
- package/lib/ui-kit/InnerTable/InnerTableHeader.d.ts +7 -0
- package/lib/ui-kit/InnerTable/InnerTableHeader.js +6 -0
- package/lib/ui-kit/InnerTable/InnerTableHeader.js.map +1 -0
- package/lib/ui-kit/InnerTable/InnerTableProps.d.ts +24 -0
- package/lib/ui-kit/InnerTable/InnerTableProps.js +2 -0
- package/lib/ui-kit/InnerTable/InnerTableProps.js.map +1 -0
- package/lib/ui-kit/List/List.js +6 -2
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListProps.d.ts +9 -1
- package/lib/ui-kit/Logo/Logo.js +6 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/lib/ui-kit/TopItem/TopItem.js +2 -2
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/assertUnreachable.d.ts +1 -0
- package/lib/utils/assertUnreachable.js +4 -0
- package/lib/utils/assertUnreachable.js.map +1 -0
- package/lib/utils/fetchJSON.d.ts +2 -0
- package/lib/utils/fetchJSON.js +20 -0
- package/lib/utils/fetchJSON.js.map +1 -0
- package/lib/utils/roundTo.d.ts +1 -1
- package/lib/utils/roundTo.js +1 -1
- package/lib/utils/roundTo.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +84 -60
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/EventBus/EventMap.d.ts +2 -0
- package/mobile/dist/components/Accordion/AccordionItem.js +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/mobile/dist/components/BlockContent.d.ts +2 -3
- package/mobile/dist/components/Calculator/Calculator.js +1 -1
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/useCalculatorParams.js +2 -5
- package/mobile/dist/components/Calculator/useCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -2
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Catalog/CatalogCard.js +12 -6
- package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +7 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.d.ts +2 -2
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +2 -5
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.d.ts +2 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.d.ts +2 -2
- package/mobile/dist/components/Gallery/GalleryContainer.js +3 -2
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +4 -4
- package/mobile/dist/components/Gallery/GalleryProps.d.ts +1 -1
- package/mobile/dist/components/Gallery/constants.d.ts +0 -2
- package/mobile/dist/components/Gallery/constants.js +1 -5
- package/mobile/dist/components/Gallery/constants.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +2 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -0
- package/mobile/dist/components/Navigation/Navigation.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -4
- package/mobile/dist/components/PictureText/PictureText.js +2 -5
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +2 -5
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +14 -2
- package/mobile/dist/components/ProductGallery/ProductGalleryBlock.js +2 -5
- package/mobile/dist/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +14 -14
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +2 -5
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTileContent.d.ts +2 -2
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +4 -4
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +4 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.d.ts +4 -4
- package/mobile/dist/components/Tabs/Tabs.js +10 -3
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +13 -11
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +3 -3
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.d.ts +1 -1
- package/mobile/dist/components/Tabs/renderTab.js +19 -8
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +15 -0
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +21 -0
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -0
- package/mobile/dist/components/TariffsTable/TariffsTable.js +2 -2
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.d.ts +6 -3
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +18 -10
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +80 -26
- package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +5 -5
- package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +5 -4
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +3 -3
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +7 -0
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js +15 -0
- package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -0
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.d.ts +7 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +15 -9
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableVertical.d.ts +5 -3
- package/mobile/dist/components/TariffsTable/TariffsTableVertical.js.map +1 -1
- package/mobile/dist/components/TariffsTable/dataFixture.d.ts +5 -0
- package/mobile/dist/components/TariffsTable/dataFixture.js +140 -0
- package/mobile/dist/components/TariffsTable/dataFixture.js.map +1 -0
- package/mobile/dist/components/Tile/Tile.js +6 -9
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +4 -2
- package/mobile/dist/hooks/useExchangeRates.js +9 -18
- package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
- package/mobile/dist/hooks/useTariffsInnerTableData.d.ts +1 -0
- package/mobile/dist/hooks/useTariffsInnerTableData.js +16 -0
- package/mobile/dist/hooks/useTariffsInnerTableData.js.map +1 -0
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/BlockVersion.d.ts +1 -0
- package/mobile/dist/model/BlockVersion.js +5 -0
- package/mobile/dist/model/BlockVersion.js.map +1 -1
- package/mobile/dist/model/HeadlineType.d.ts +3 -3
- package/mobile/dist/model/LinkProps.d.ts +6 -4
- package/mobile/dist/services/sitemap/useSitemap.js +2 -8
- package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
- 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/BlocksList/renderBlocksList.d.ts +1 -2
- package/mobile/dist/ui-kit/Button/Button.d.ts +2 -4
- package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/mobile/dist/ui-kit/Description/Description.d.ts +3 -3
- package/mobile/dist/ui-kit/Description/Description.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/Heading/HeadingProps.d.ts +5 -2
- package/mobile/dist/ui-kit/InnerTable/InnerTable.d.ts +5 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js +17 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.d.ts +7 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js +18 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.d.ts +6 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.js +33 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.d.ts +6 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js +14 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.d.ts +7 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.js +8 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.js.map +1 -0
- package/mobile/dist/ui-kit/InnerTable/InnerTableProps.d.ts +24 -0
- package/mobile/dist/{components/GroupBlock/BlocksTypeProps.js → ui-kit/InnerTable/InnerTableProps.js} +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableProps.js.map +1 -0
- package/mobile/dist/ui-kit/List/List.js +6 -2
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +9 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js +2 -2
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/assertUnreachable.d.ts +1 -0
- package/mobile/dist/utils/assertUnreachable.js +7 -0
- package/mobile/dist/utils/assertUnreachable.js.map +1 -0
- package/mobile/dist/utils/fetchJSON.d.ts +2 -0
- package/mobile/dist/utils/fetchJSON.js +24 -0
- package/mobile/dist/utils/fetchJSON.js.map +1 -0
- package/mobile/dist/utils/roundTo.d.ts +1 -1
- package/mobile/dist/utils/roundTo.js +1 -1
- package/mobile/dist/utils/roundTo.js.map +1 -1
- package/mobile/lib/EventBus/EventMap.d.ts +2 -0
- package/mobile/lib/components/Accordion/AccordionItem.js +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/mobile/lib/components/BlockContent.d.ts +2 -3
- package/mobile/lib/components/Calculator/Calculator.js +1 -1
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/useCalculatorParams.js +2 -5
- package/mobile/lib/components/Calculator/useCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +1 -2
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Catalog/CatalogCard.js +12 -6
- package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +7 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.d.ts +2 -2
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +2 -5
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.d.ts +2 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.d.ts +2 -2
- package/mobile/lib/components/Gallery/GalleryContainer.js +4 -3
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +4 -4
- package/mobile/lib/components/Gallery/GalleryProps.d.ts +1 -1
- package/mobile/lib/components/Gallery/constants.d.ts +0 -2
- package/mobile/lib/components/Gallery/constants.js +0 -4
- package/mobile/lib/components/Gallery/constants.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +2 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -0
- package/mobile/lib/components/Navigation/Navigation.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -4
- package/mobile/lib/components/PictureText/PictureText.js +2 -5
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +2 -5
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +14 -2
- package/mobile/lib/components/ProductGallery/ProductGalleryBlock.js +2 -5
- package/mobile/lib/components/ProductGallery/ProductGalleryBlock.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +14 -14
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +2 -5
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTileContent.d.ts +2 -2
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +4 -4
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +4 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.d.ts +4 -4
- package/mobile/lib/components/Tabs/Tabs.js +10 -3
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +13 -11
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +3 -3
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.d.ts +1 -1
- package/mobile/lib/components/Tabs/renderTab.js +19 -8
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +15 -0
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +19 -0
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -0
- package/mobile/lib/components/TariffsTable/TariffsTable.js +2 -2
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.d.ts +6 -3
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +18 -10
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +80 -26
- package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +5 -5
- package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +5 -4
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +3 -3
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +7 -0
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js +13 -0
- package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -0
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.d.ts +7 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +15 -9
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableVertical.d.ts +5 -3
- package/mobile/lib/components/TariffsTable/TariffsTableVertical.js.map +1 -1
- package/mobile/lib/components/TariffsTable/dataFixture.d.ts +5 -0
- package/mobile/lib/components/TariffsTable/dataFixture.js +138 -0
- package/mobile/lib/components/TariffsTable/dataFixture.js.map +1 -0
- package/mobile/lib/components/Tile/Tile.js +6 -9
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +4 -2
- package/mobile/lib/hooks/useExchangeRates.js +9 -18
- package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
- package/mobile/lib/hooks/useTariffsInnerTableData.d.ts +1 -0
- package/mobile/lib/hooks/useTariffsInnerTableData.js +13 -0
- package/mobile/lib/hooks/useTariffsInnerTableData.js.map +1 -0
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/BlockVersion.d.ts +1 -0
- package/mobile/lib/model/BlockVersion.js +4 -1
- package/mobile/lib/model/BlockVersion.js.map +1 -1
- package/mobile/lib/model/HeadlineType.d.ts +3 -3
- package/mobile/lib/model/LinkProps.d.ts +6 -4
- package/mobile/lib/services/sitemap/useSitemap.js +2 -8
- package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
- 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/BlocksList/renderBlocksList.d.ts +1 -2
- package/mobile/lib/ui-kit/Button/Button.d.ts +2 -4
- package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/mobile/lib/ui-kit/Description/Description.d.ts +3 -3
- package/mobile/lib/ui-kit/Description/Description.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/Heading/HeadingProps.d.ts +5 -2
- package/mobile/lib/ui-kit/InnerTable/InnerTable.d.ts +5 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js +15 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.d.ts +7 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js +16 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.d.ts +6 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.js +31 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.d.ts +6 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js +12 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.d.ts +7 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.js +6 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.js.map +1 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableProps.d.ts +24 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableProps.js +2 -0
- package/mobile/lib/ui-kit/InnerTable/InnerTableProps.js.map +1 -0
- package/mobile/lib/ui-kit/List/List.js +6 -2
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +9 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js +2 -2
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/assertUnreachable.d.ts +1 -0
- package/mobile/lib/utils/assertUnreachable.js +4 -0
- package/mobile/lib/utils/assertUnreachable.js.map +1 -0
- package/mobile/lib/utils/fetchJSON.d.ts +2 -0
- package/mobile/lib/utils/fetchJSON.js +20 -0
- package/mobile/lib/utils/fetchJSON.js.map +1 -0
- package/mobile/lib/utils/roundTo.d.ts +1 -1
- package/mobile/lib/utils/roundTo.js +1 -1
- package/mobile/lib/utils/roundTo.js.map +1 -1
- package/mobile/src/EventBus/EventMap.ts +2 -1
- package/mobile/src/components/Accordion/AccordionItem.tsx +4 -2
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
- package/mobile/src/components/BlockContent.ts +3 -5
- package/mobile/src/components/Calculator/Calculator.tsx +1 -1
- package/mobile/src/components/Calculator/useCalculatorParams.ts +2 -10
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -3
- package/mobile/src/components/Catalog/CatalogCard.tsx +13 -6
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +8 -1
- package/mobile/src/components/ComparisonTable/ComparisonTableRows.tsx +3 -3
- package/mobile/src/components/ContentPage/ContentPage.page.json +1 -34
- package/mobile/src/components/ContentPage/normalizePage.ts +1 -1
- package/mobile/src/components/Gallery/Gallery.tsx +8 -13
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +8 -4
- package/mobile/src/components/Gallery/GalleryContainer.tsx +6 -5
- package/mobile/src/components/Gallery/GalleryContent.ts +4 -4
- package/mobile/src/components/Gallery/GalleryProps.ts +1 -1
- package/mobile/src/components/Gallery/constants.ts +0 -6
- package/mobile/src/components/GracePeriod/GracePeriod.example.json +5 -0
- package/mobile/src/components/GracePeriod/GracePeriodContent.ts +2 -2
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +3 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +2 -2
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -5
- package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +1 -2
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +1 -0
- package/mobile/src/components/Navigation/Navigation.tsx +1 -1
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -4
- package/mobile/src/components/PictureText/PictureText.tsx +2 -6
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +2 -9
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +14 -3
- package/mobile/src/components/ProductGallery/ProductGallery.example.json +34 -2
- package/mobile/src/components/ProductGallery/ProductGalleryBlock.tsx +2 -7
- package/mobile/src/components/ProductTile/ProductTile.tsx +39 -50
- package/mobile/src/components/PromoTile/PromoTile.tsx +12 -19
- package/mobile/src/components/PromoTile/PromoTileContent.ts +2 -2
- package/mobile/src/components/Recommendation/RecommendationContent.ts +4 -4
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +4 -0
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +1 -1
- package/mobile/src/components/Tabs/Tabs.example.json +3 -0
- package/mobile/src/components/Tabs/Tabs.tsx +15 -7
- package/mobile/src/components/Tabs/TabsContent.ts +15 -11
- package/mobile/src/components/Tabs/renderGroupTab.tsx +3 -3
- package/mobile/src/components/Tabs/renderTab.tsx +18 -7
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +67 -0
- package/mobile/src/components/TariffsTable/TariffsTable.example.json +30 -29
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +12 -7
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +50 -55
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +101 -37
- package/mobile/src/components/TariffsTable/TariffsTableHorizontal.tsx +6 -7
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +19 -11
- package/mobile/src/components/TariffsTable/TariffsTableRowContainer.tsx +36 -0
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +35 -53
- package/mobile/src/components/TariffsTable/TariffsTableVertical.tsx +7 -3
- package/mobile/src/components/TariffsTable/dataFixture.ts +158 -0
- package/mobile/src/components/Tile/Tile.example.json +1 -0
- package/mobile/src/components/Tile/Tile.tsx +17 -13
- package/mobile/src/components/Tile/TileContent.ts +4 -2
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +36 -48
- package/mobile/src/hooks/useExchangeRates.ts +9 -20
- package/mobile/src/hooks/useTariffsInnerTableData.ts +20 -0
- package/mobile/src/icons/CardTickIcon.svg +7 -1
- package/mobile/src/icons/DocDownload.svg +8 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/model/BlockVersion.ts +5 -0
- package/mobile/src/model/HeadlineType.ts +3 -3
- package/mobile/src/model/LinkProps.ts +7 -4
- package/mobile/src/services/sitemap/useSitemap.ts +5 -11
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +2 -2
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +1 -1
- package/mobile/src/ui-kit/Button/Button.tsx +2 -4
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -1
- package/mobile/src/ui-kit/Description/Description.tsx +3 -3
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -2
- package/mobile/src/ui-kit/HeaderItem/HeaderItem.tsx +1 -1
- package/mobile/src/ui-kit/Heading/HeadingProps.ts +5 -2
- package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +32 -0
- package/mobile/src/ui-kit/InnerTable/InnerTableBody.tsx +53 -0
- package/mobile/src/ui-kit/InnerTable/InnerTableBodyItem.tsx +86 -0
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +36 -0
- package/mobile/src/ui-kit/InnerTable/InnerTableHeader.tsx +42 -0
- package/mobile/src/ui-kit/InnerTable/InnerTableProps.ts +31 -0
- package/mobile/src/ui-kit/List/List.tsx +18 -3
- package/mobile/src/ui-kit/List/ListProps.ts +10 -1
- package/mobile/src/ui-kit/Logo/Logo.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +3 -3
- package/mobile/src/utils/assertUnreachable.ts +3 -0
- package/mobile/src/utils/fetchJSON.ts +24 -0
- package/mobile/src/utils/roundTo.ts +2 -2
- package/package.json +5 -2
- package/src/EventBus/EventMap.ts +2 -1
- package/src/components/Accordion/AccordionItem.mobile.tsx +4 -2
- package/src/components/Accordion/AccordionItem.tsx +7 -1
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
- package/src/components/BlockContent.ts +3 -5
- package/src/components/Blocks.ts +0 -4
- package/src/components/Calculator/Calculator.tsx +1 -1
- package/src/components/Calculator/useCalculatorParams.ts +2 -10
- package/src/components/Calculator/useCreditCalculatorParams.ts +1 -3
- package/src/components/Catalog/Catalog.fixture.tsx +5 -2
- package/src/components/Catalog/CatalogCard.tsx +13 -6
- package/src/components/ComparisonTable/ComparisonTableContent.ts +8 -1
- package/src/components/ComparisonTable/ComparisonTableRows.tsx +3 -3
- package/src/components/ContentPage/ContentPage.page.json +1 -34
- package/src/components/ContentPage/normalizePage.mobile.ts +1 -1
- package/src/components/ContentPage/normalizePage.ts +1 -1
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +6 -6
- package/src/components/Gallery/Gallery.fixture.tsx +3 -3
- package/src/components/Gallery/Gallery.mobile.tsx +8 -13
- package/src/components/Gallery/GalleryCardInner.tsx +8 -4
- package/src/components/Gallery/GalleryContainer.tsx +6 -5
- package/src/components/Gallery/GalleryContent.ts +4 -4
- package/src/components/Gallery/GalleryProps.ts +1 -1
- package/src/components/Gallery/constants.ts +0 -6
- package/src/components/GracePeriod/GracePeriod.example.json +5 -0
- package/src/components/GracePeriod/GracePeriodContent.ts +2 -2
- package/src/components/Header/Header.tsx +3 -2
- package/src/components/Header/HeaderSecondaryMenu.tsx +3 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +2 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +2 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -5
- package/src/components/MobileAppTile/MobileAppTile.example.json +1 -2
- package/src/components/MobileAppTile/MobileAppTile.tsx +8 -12
- package/src/components/MobileAppTile/MobileAppTileContent.ts +1 -0
- package/src/components/Navigation/Navigation.tsx +1 -1
- package/src/components/OtherProducts/OtherProductsContent.ts +1 -4
- package/src/components/PictureText/PictureText.fixture.tsx +1 -1
- package/src/components/PictureText/PictureText.tsx +2 -6
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +2 -9
- package/src/components/ProductBlock/ProductBlock.tsx +3 -7
- package/src/components/ProductBlock/ProductBlockContent.ts +14 -3
- package/src/components/ProductGallery/ProductGallery.example.json +34 -2
- package/src/components/ProductGallery/ProductGallery.tsx +6 -15
- package/src/components/ProductGallery/ProductGalleryBlock.tsx +2 -7
- package/src/components/ProductTile/ProductTile.fixture.tsx +35 -1
- package/src/components/ProductTile/ProductTile.tsx +39 -50
- package/src/components/PromoTile/PromoTile.tsx +12 -19
- package/src/components/PromoTile/PromoTileContent.ts +2 -2
- package/src/components/Recommendation/RecommendationContent.ts +4 -4
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +4 -0
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +1 -1
- package/src/components/Tabs/Tabs.example.json +3 -0
- package/src/components/Tabs/Tabs.fixture.tsx +3 -3
- package/src/components/Tabs/Tabs.tsx +15 -7
- package/src/components/Tabs/TabsContent.ts +15 -11
- package/src/components/Tabs/renderGroupTab.tsx +3 -3
- package/src/components/Tabs/renderTab.tsx +18 -7
- package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +67 -0
- package/src/components/TariffsTable/EmbeddableCellData.tsx +82 -0
- package/src/components/TariffsTable/TariffsTable.example.json +30 -29
- package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +3 -111
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +24 -151
- package/src/components/TariffsTable/TariffsTable.mobile.tsx +12 -7
- package/src/components/TariffsTable/TariffsTable.tsx +25 -29
- package/src/components/TariffsTable/TariffsTableCell.tsx +50 -55
- package/src/components/TariffsTable/TariffsTableContent.ts +101 -37
- package/src/components/TariffsTable/TariffsTableHorizontal.tsx +6 -7
- package/src/components/TariffsTable/TariffsTableRow.tsx +19 -11
- package/src/components/TariffsTable/TariffsTableRowContainer.tsx +36 -0
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +35 -53
- package/src/components/TariffsTable/TariffsTableVertical.tsx +7 -3
- package/src/components/TariffsTable/dataFixture.ts +158 -0
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +1 -1
- package/src/components/TextBlock/TextBlock.fixture.tsx +1 -1
- package/src/components/Tile/Tile.example.json +1 -0
- package/src/components/Tile/Tile.fixture.tsx +7 -6
- package/src/components/Tile/Tile.tsx +17 -13
- package/src/components/Tile/TileContent.ts +4 -2
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +36 -48
- package/src/cosmos.decorator.tsx +1 -1
- package/src/hooks/useExchangeRates.ts +9 -20
- package/src/hooks/useTariffsInnerTableData.ts +20 -0
- package/src/icons/CardTickIcon.svg +7 -1
- package/src/icons/DocDownload.svg +8 -0
- package/src/icons/IconName.ts +4 -1
- package/src/model/BlockVersion.ts +5 -0
- package/src/model/HeadlineType.ts +3 -3
- package/src/model/LinkProps.ts +7 -4
- package/src/services/sitemap/useSitemap.ts +5 -11
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +2 -2
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +1 -1
- package/src/ui-kit/Button/Button.mobile.tsx +2 -4
- package/src/ui-kit/Button/Button.tsx +5 -7
- package/src/ui-kit/Button/ButtonInner.tsx +1 -1
- package/src/ui-kit/Description/Description.tsx +3 -3
- package/src/ui-kit/Foldable/Foldable.tsx +1 -2
- package/src/ui-kit/HeaderItem/HeaderItem.mobile.tsx +1 -1
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +1 -1
- package/src/ui-kit/Heading/HeadingProps.ts +5 -2
- package/src/ui-kit/InnerTable/InnerTable.tsx +32 -0
- package/src/ui-kit/InnerTable/InnerTableBody.tsx +53 -0
- package/src/ui-kit/InnerTable/InnerTableBodyItem.tsx +86 -0
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +36 -0
- package/src/ui-kit/InnerTable/InnerTableHeader.tsx +42 -0
- package/src/ui-kit/InnerTable/InnerTableProps.ts +31 -0
- package/src/ui-kit/List/List.tsx +18 -3
- package/src/ui-kit/List/ListProps.ts +10 -1
- package/src/ui-kit/Logo/Logo.mobile.tsx +1 -1
- package/src/ui-kit/Logo/Logo.tsx +8 -3
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/src/ui-kit/TopItem/TopItem.tsx +3 -3
- package/src/utils/assertUnreachable.ts +3 -0
- package/src/utils/fetchJSON.ts +24 -0
- package/src/utils/roundTo.ts +2 -2
- package/dist/components/GroupBlock/BlocksTypeProps.d.ts +0 -36
- package/dist/components/GroupBlock/BlocksTypeProps.js.map +0 -1
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +0 -4
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js +0 -9
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +0 -1
- package/dist/components/GroupBlock/GroupBlock.d.ts +0 -9
- package/dist/components/GroupBlock/GroupBlock.js +0 -21
- package/dist/components/GroupBlock/GroupBlock.js.map +0 -1
- package/dist/components/GroupBlock/GroupBlockContent.d.ts +0 -21
- package/dist/components/GroupBlock/GroupBlockContent.js +0 -2
- package/dist/components/GroupBlock/GroupBlockContent.js.map +0 -1
- package/dist/components/GroupBlock/GroupBlockTabs.d.ts +0 -9
- package/dist/components/GroupBlock/GroupBlockTabs.js +0 -20
- package/dist/components/GroupBlock/GroupBlockTabs.js.map +0 -1
- package/dist/components/GroupBlock/GroupBlocksItem.d.ts +0 -9
- package/dist/components/GroupBlock/GroupBlocksItem.js +0 -20
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +0 -1
- package/dist/components/GroupBlock/filterBlocksByTag.d.ts +0 -2
- package/dist/components/GroupBlock/filterBlocksByTag.js +0 -7
- package/dist/components/GroupBlock/filterBlocksByTag.js.map +0 -1
- package/dist/components/GroupBlock/renderBlocksTypes.d.ts +0 -10
- package/dist/components/GroupBlock/renderBlocksTypes.js +0 -19
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +0 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +0 -7
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +0 -16
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +0 -1
- package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +0 -5
- package/dist/components/NavigatorTabs/NavigatorTabs.js +0 -19
- package/dist/components/NavigatorTabs/NavigatorTabs.js.map +0 -1
- package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +0 -11
- package/dist/components/NavigatorTabs/NavigatorTabsContent.js +0 -2
- package/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +0 -1
- package/dist/hooks/useSafeDepositRental.d.ts +0 -1
- package/dist/hooks/useSafeDepositRental.js +0 -24
- package/dist/hooks/useSafeDepositRental.js.map +0 -1
- package/lib/components/GroupBlock/BlocksTypeProps.d.ts +0 -36
- package/lib/components/GroupBlock/BlocksTypeProps.js +0 -2
- package/lib/components/GroupBlock/BlocksTypeProps.js.map +0 -1
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +0 -4
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js +0 -7
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +0 -1
- package/lib/components/GroupBlock/GroupBlock.d.ts +0 -9
- package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +0 -6
- package/lib/components/GroupBlock/GroupBlock.js +0 -19
- package/lib/components/GroupBlock/GroupBlock.js.map +0 -1
- package/lib/components/GroupBlock/GroupBlockContent.d.ts +0 -21
- package/lib/components/GroupBlock/GroupBlockContent.js +0 -2
- package/lib/components/GroupBlock/GroupBlockContent.js.map +0 -1
- package/lib/components/GroupBlock/GroupBlockTabs.d.ts +0 -9
- package/lib/components/GroupBlock/GroupBlockTabs.js +0 -18
- package/lib/components/GroupBlock/GroupBlockTabs.js.map +0 -1
- package/lib/components/GroupBlock/GroupBlocksItem.d.ts +0 -9
- package/lib/components/GroupBlock/GroupBlocksItem.js +0 -17
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +0 -1
- package/lib/components/GroupBlock/filterBlocksByTag.d.ts +0 -2
- package/lib/components/GroupBlock/filterBlocksByTag.js +0 -4
- package/lib/components/GroupBlock/filterBlocksByTag.js.map +0 -1
- package/lib/components/GroupBlock/renderBlocksTypes.d.ts +0 -10
- package/lib/components/GroupBlock/renderBlocksTypes.js +0 -16
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +0 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +0 -7
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +0 -14
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +0 -1
- package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +0 -5
- package/lib/components/NavigatorTabs/NavigatorTabs.fixture.d.ts +0 -5
- package/lib/components/NavigatorTabs/NavigatorTabs.js +0 -17
- package/lib/components/NavigatorTabs/NavigatorTabs.js.map +0 -1
- package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +0 -11
- package/lib/components/NavigatorTabs/NavigatorTabsContent.js +0 -2
- package/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +0 -1
- package/lib/hooks/useSafeDepositRental.d.ts +0 -1
- package/lib/hooks/useSafeDepositRental.js +0 -21
- package/lib/hooks/useSafeDepositRental.js.map +0 -1
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +0 -36
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js.map +0 -1
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +0 -4
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js +0 -9
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +0 -1
- package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +0 -9
- package/mobile/dist/components/GroupBlock/GroupBlock.js +0 -21
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +0 -1
- package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +0 -21
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js +0 -2
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js.map +0 -1
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +0 -9
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +0 -20
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +0 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +0 -9
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +0 -20
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +0 -1
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.d.ts +0 -2
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js +0 -7
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js.map +0 -1
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.d.ts +0 -10
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +0 -19
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +0 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +0 -7
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +0 -16
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +0 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +0 -5
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +0 -19
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +0 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +0 -11
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js +0 -2
- package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +0 -1
- package/mobile/dist/hooks/useSafeDepositRental.d.ts +0 -1
- package/mobile/dist/hooks/useSafeDepositRental.js +0 -24
- package/mobile/dist/hooks/useSafeDepositRental.js.map +0 -1
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +0 -36
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js +0 -2
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js.map +0 -1
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +0 -4
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js +0 -7
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +0 -1
- package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +0 -9
- package/mobile/lib/components/GroupBlock/GroupBlock.js +0 -19
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +0 -1
- package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +0 -21
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js +0 -2
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js.map +0 -1
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +0 -9
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +0 -18
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +0 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +0 -9
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +0 -17
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +0 -1
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.d.ts +0 -2
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js +0 -4
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js.map +0 -1
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.d.ts +0 -10
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +0 -16
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +0 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +0 -7
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +0 -14
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +0 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +0 -5
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +0 -17
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +0 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +0 -11
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js +0 -2
- package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +0 -1
- package/mobile/lib/hooks/useSafeDepositRental.d.ts +0 -1
- package/mobile/lib/hooks/useSafeDepositRental.js +0 -21
- package/mobile/lib/hooks/useSafeDepositRental.js.map +0 -1
- package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +0 -39
- package/mobile/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +0 -7
- package/mobile/src/components/GroupBlock/GroupBlock.example.json +0 -97
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +0 -50
- package/mobile/src/components/GroupBlock/GroupBlockContent.ts +0 -23
- package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +0 -55
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +0 -31
- package/mobile/src/components/GroupBlock/filterBlocksByTag.ts +0 -5
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +0 -34
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +0 -31
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +0 -7
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +0 -41
- package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +0 -12
- package/mobile/src/hooks/useSafeDepositRental.ts +0 -25
- package/src/components/GroupBlock/BlocksTypeProps.ts +0 -39
- package/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +0 -7
- package/src/components/GroupBlock/GroupBlock.example.json +0 -97
- package/src/components/GroupBlock/GroupBlock.fixture.tsx +0 -67
- package/src/components/GroupBlock/GroupBlock.tsx +0 -50
- package/src/components/GroupBlock/GroupBlockContent.ts +0 -23
- package/src/components/GroupBlock/GroupBlockTabs.tsx +0 -55
- package/src/components/GroupBlock/GroupBlocksItem.tsx +0 -31
- package/src/components/GroupBlock/filterBlocksByTag.ts +0 -5
- package/src/components/GroupBlock/renderBlocksTypes.tsx +0 -34
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +0 -31
- package/src/components/NavigatorTabs/NavigatorTabs.example.json +0 -7
- package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +0 -16
- package/src/components/NavigatorTabs/NavigatorTabs.tsx +0 -41
- package/src/components/NavigatorTabs/NavigatorTabsContent.ts +0 -12
- package/src/hooks/useSafeDepositRental.ts +0 -25
package/bundle/bundle.umd.js
CHANGED
|
@@ -321,6 +321,7 @@
|
|
|
321
321
|
IconMap["ComfortableCompIcon"] = "ComfortableCompIcon";
|
|
322
322
|
IconMap["CreditCardsIcon"] = "CreditCardsIcon";
|
|
323
323
|
IconMap["DiscountShapeIcon"] = "DiscountShapeIcon";
|
|
324
|
+
IconMap["DocDownload"] = "DocDownload";
|
|
324
325
|
IconMap["DocIcon"] = "DocIcon";
|
|
325
326
|
IconMap["DocIconMonoColor"] = "DocIconMonoColor";
|
|
326
327
|
IconMap["DocsIcon"] = "DocsIcon";
|
|
@@ -406,6 +407,7 @@
|
|
|
406
407
|
IconTitleMap["ComfortableCompIcon"] = "\u041A\u0440\u0435\u0441\u043B\u043E";
|
|
407
408
|
IconTitleMap["CreditCardsIcon"] = "\u041A\u0440\u0435\u0434\u0438\u0442\u043D\u044B\u0435 \u043A\u0430\u0440\u0442\u044B";
|
|
408
409
|
IconTitleMap["DiscountShapeIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
|
|
410
|
+
IconTitleMap["DocDownload"] = "\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
|
|
409
411
|
IconTitleMap["DocIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
|
|
410
412
|
IconTitleMap["DocIconMonoColor"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 (\u043E\u0434\u043D\u043E\u0446\u0432\u0435\u0442\u043D\u044B\u0439)";
|
|
411
413
|
IconTitleMap["DocsIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
|
|
@@ -638,7 +640,7 @@
|
|
|
638
640
|
const BenefitItem = JSX((props) => {
|
|
639
641
|
const { className = '', icon, label, description, version = 'primary', benefitsVersion = 'normal', } = props;
|
|
640
642
|
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
641
|
-
return (jsxs("div", { className: `flex items-
|
|
643
|
+
return (jsxs("div", { className: `flex items-start gap-5 ${className}`, children: [icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), 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] })] }));
|
|
642
644
|
});
|
|
643
645
|
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
644
646
|
let bgColorStyle = 'bg-primary-main text-black';
|
|
@@ -648,19 +650,20 @@
|
|
|
648
650
|
else if (benefitsVersion === 'normal') {
|
|
649
651
|
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
650
652
|
}
|
|
651
|
-
return `w-[50px] h-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
653
|
+
return `w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
652
654
|
}
|
|
653
655
|
|
|
654
656
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
655
657
|
|
|
656
|
-
const
|
|
658
|
+
const VersionStyleMap = {
|
|
657
659
|
primary: 'bg-white text-primary-text',
|
|
658
660
|
secondary: 'bg-primary-main text-white',
|
|
659
661
|
};
|
|
662
|
+
|
|
660
663
|
const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
|
|
661
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${
|
|
664
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${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 ml-6' : 'mr-6', image: image }), 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)] })] })] }));
|
|
662
665
|
});
|
|
663
|
-
const renderBenefit$
|
|
666
|
+
const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
|
|
664
667
|
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
665
668
|
return sum || monthLimit ? (jsxs("div", { className: "bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock$1('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
|
|
666
669
|
? renderValueBlock$1('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
@@ -786,7 +789,7 @@
|
|
|
786
789
|
return disabled ? (jsx(DisabledButton, { rounded: rounded, ...rest, children: buttonInner })) : (jsx(RegularButton, { rounded: rounded, ...rest, children: buttonInner }));
|
|
787
790
|
});
|
|
788
791
|
const RegularButton = JSX(({ className = '', ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => {
|
|
789
|
-
return (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline focus:border-primary-focus focus:border ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...rest, children: children }));
|
|
792
|
+
return (jsx("a", { className: `${buttonStyle} border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...rest, children: children }));
|
|
790
793
|
});
|
|
791
794
|
const DisabledButton = JSX(({ className, children, ariaLabel, version = 'none', rounded }) => {
|
|
792
795
|
return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: `inline-block ${buttonStyle} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: children }));
|
|
@@ -839,23 +842,27 @@
|
|
|
839
842
|
tile: 'text-primary-text',
|
|
840
843
|
'tile-white': 'text-white',
|
|
841
844
|
};
|
|
845
|
+
const TEXT_SIZE_MAP = {
|
|
846
|
+
M: 'text-xl-light',
|
|
847
|
+
L: 'text-h5-light',
|
|
848
|
+
};
|
|
842
849
|
const List = JSX((props) => {
|
|
843
|
-
const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
|
|
844
|
-
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${className}`, role: "list", children: items?.length
|
|
850
|
+
const { className = '', itemClassName, isDotted, items, listItemSize = 'M', version = 'primary', } = props;
|
|
851
|
+
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${TEXT_SIZE_MAP[listItemSize]} ${className}`, role: "list", children: items?.length
|
|
845
852
|
? items.map((_, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, version: version, children: _ }, String(i))))
|
|
846
853
|
: null }));
|
|
847
854
|
});
|
|
848
855
|
|
|
849
856
|
const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
|
|
850
|
-
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { className: "mt-
|
|
857
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { className: "mt-auto", children: buttons }) : null] }), image] })] }));
|
|
851
858
|
});
|
|
852
859
|
|
|
853
|
-
const renderBenefit = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => {
|
|
860
|
+
const renderBenefit$1 = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => {
|
|
854
861
|
return (jsx(BenefitItem, { icon: icon, label: label, description: description, version: version, benefitsVersion: benefitsVersion }, String(i)));
|
|
855
862
|
};
|
|
856
863
|
|
|
857
864
|
const ProductBlockInner = JSX(({ className = '', context, title, headlineVersion = 'L', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
858
|
-
return (jsxs("div", { className: `flex grow justify-between items-stretch h-full ${className}`, children: [jsxs("div", { className: `flex flex-col ${textBlockClassName}`, children: [jsx(Headline, { context: context, title: title, description: description, className: `!p-0 max-w-[600px]`, bgColorHeadline: version, headlineVersion: headlineVersion, align: "left" }), jsxs(BaseTile, { context: context, buttons: getButtons(context, buttons), children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map(renderBenefit(version, benefitsVersion)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] })] }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
|
|
865
|
+
return (jsxs("div", { className: `flex grow justify-between items-stretch h-full ${className}`, children: [jsxs("div", { className: `flex flex-col ${textBlockClassName}`, children: [jsx(Headline, { context: context, title: title, description: description, className: `!p-0 max-w-[600px]`, bgColorHeadline: version, headlineVersion: headlineVersion, align: "left" }), jsxs(BaseTile, { context: context, buttons: getButtons(context, buttons), children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map(renderBenefit$1(version, benefitsVersion)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] })] }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
|
|
859
866
|
});
|
|
860
867
|
const getButtons = (context, buttons) => {
|
|
861
868
|
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex gap-4" })) : null;
|
|
@@ -868,10 +875,6 @@
|
|
|
868
875
|
return (jsxs("div", { className: `flex items-center cursor-pointer ${className}`, onClick: onClick, children: [jsx(Button, { version: version, rounded: true, className: "w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3", ariaLabel: text, href: href, target: target, children: jsx(Img, { className: "w-4 h-4", image: { ...backwardIcon, iconVersion }, asSVG: true }) }), text ? jsx("span", { className: "text-m", children: text }) : null] }));
|
|
869
876
|
}
|
|
870
877
|
|
|
871
|
-
const productBlockStyleMap$1 = {
|
|
872
|
-
primary: 'bg-white text-primary-text',
|
|
873
|
-
secondary: 'bg-primary-main text-white',
|
|
874
|
-
};
|
|
875
878
|
const breadcrumbsStyleMap = {
|
|
876
879
|
primary: 'text-secondary-text',
|
|
877
880
|
secondary: 'text-white/80',
|
|
@@ -880,7 +883,7 @@
|
|
|
880
883
|
const { context, className = '', breadcrumbs, backwardButton, version = 'primary', ...otherProps } = props;
|
|
881
884
|
const router = context.useRouter();
|
|
882
885
|
const { handlerDecorator } = context;
|
|
883
|
-
return (jsxs(BlockWrapper, { context: context, className: `font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[
|
|
886
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[454px] ${VersionStyleMap[version]} ${className}`, ...otherProps, children: [backwardButton?.text
|
|
884
887
|
? renderBackwardButton(useLink({ router, handlerDecorator }, backwardButton), version, 'mb-10 -mt-2.5')
|
|
885
888
|
: null, breadcrumbs?.length ? (jsx("div", { className: "text-xs-light mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
886
889
|
});
|
|
@@ -948,41 +951,36 @@
|
|
|
948
951
|
}
|
|
949
952
|
}
|
|
950
953
|
|
|
951
|
-
const tileStyleMap = {
|
|
952
|
-
primary: 'bg-white text-primary-text',
|
|
953
|
-
secondary: 'bg-primary-main text-white',
|
|
954
|
-
};
|
|
955
954
|
const Tile = JSX((props) => {
|
|
956
|
-
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary', ...rest } = props;
|
|
957
|
-
|
|
958
|
-
|
|
955
|
+
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, listItemSize = 'M', className = '', version = 'primary', ...rest } = props;
|
|
956
|
+
const headingClassName = version === 'primary' ? 'text-primary-text' : '';
|
|
957
|
+
return (jsx(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px] ${headingClassName}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-8 gap-3" })) : null, image: image?.src ? jsx(Img, { className: "mt-auto ml-7", image: image }) : null, children: [description ? (jsx(Description, { className: "max-w-[600px] text-xl-light mt-2", description: description })) : null, children, renderList$1(items, { version, isDotted, listItemSize })] }) }));
|
|
959
958
|
});
|
|
960
|
-
function renderList$
|
|
959
|
+
function renderList$1(items, { version, isDotted, listItemSize }) {
|
|
961
960
|
const listVersion = version === 'primary' ? 'tile' : 'tile-white';
|
|
962
|
-
return items?.length ? (jsx(List, { items: items, isDotted: isDotted,
|
|
961
|
+
return items?.length ? (jsx(List, { items: items, isDotted: isDotted, className: "mt-3", listItemSize: listItemSize, itemClassName: "mb-1.5", version: listVersion })) : null;
|
|
963
962
|
}
|
|
964
963
|
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
secondary: 'bg-primary-main text-white',
|
|
968
|
-
};
|
|
969
|
-
const ProductTile = JSX(({ context, className = '', title, headlineVersion = 'S', description, additionalDescription, benefits, buttons, image, version = 'primary', ...rest }) => {
|
|
970
|
-
return (jsxs(BlockWrapper, { context: context, className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border min-h-[364px] relative justify-between grid ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: [jsxs("div", { className: "z-[1]", children: [jsx(Headline, { context: context, className: "!p-0", as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits$1(benefits || [], version), additionalDescription
|
|
971
|
-
? renderAdditionalDescription(additionalDescription, version)
|
|
972
|
-
: null] }), buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-[1] text-l" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
964
|
+
const ProductTile = JSX(({ context, className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, version = 'primary', ...rest }) => {
|
|
965
|
+
return (jsxs(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 box-border relative justify-between grid ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)}`, ...rest, children: [jsx(Headline, { context: context, className: `!p-0 z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits$1(benefits, version), additionalDescription ? renderAdditionalDescription(additionalDescription, version) : 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] }));
|
|
973
966
|
});
|
|
967
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
968
|
+
const BENEFITS_WIDTH = 'max-w-[calc(100%-186px)]';
|
|
974
969
|
function renderBenefits$1(benefits, version) {
|
|
975
|
-
return (
|
|
970
|
+
return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline ${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
976
971
|
}
|
|
977
|
-
function
|
|
978
|
-
return (jsx("div", { className: `${i ? 'mt-2.5' : ''}`, children: benefit.label }, String(i)));
|
|
979
|
-
}
|
|
980
|
-
function renderBenefitDescription(benefit, i, version = 'primary') {
|
|
972
|
+
function renderBenefit(version = 'primary') {
|
|
981
973
|
const labelStyleMap = {
|
|
982
974
|
primary: 'text-secondary-text',
|
|
983
975
|
secondary: 'text-white',
|
|
984
976
|
};
|
|
985
|
-
return (
|
|
977
|
+
return function renderVersionedBenefit(benefit, i) {
|
|
978
|
+
const { label = '', description = '' } = benefit;
|
|
979
|
+
return [
|
|
980
|
+
jsx("div", { className: "text-h6", children: label }, `label-${i}`),
|
|
981
|
+
jsx("div", { className: `text-m-light ${labelStyleMap[version]}`, children: description }, `desc-${i}`),
|
|
982
|
+
];
|
|
983
|
+
};
|
|
986
984
|
}
|
|
987
985
|
function renderAdditionalDescription(additionalDescription, version = 'primary') {
|
|
988
986
|
const descStyleMap = {
|
|
@@ -1000,10 +998,6 @@
|
|
|
1000
998
|
return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
|
|
1001
999
|
}
|
|
1002
1000
|
|
|
1003
|
-
const cardVersionMap = {
|
|
1004
|
-
primary: 'bg-white text-secondary-text',
|
|
1005
|
-
secondary: 'bg-primary-main text-white',
|
|
1006
|
-
};
|
|
1007
1001
|
const galleryLengthForScrollMap = {
|
|
1008
1002
|
normal: 3,
|
|
1009
1003
|
mini: 4,
|
|
@@ -1041,7 +1035,7 @@
|
|
|
1041
1035
|
});
|
|
1042
1036
|
function renderCard({ card, version }, i) {
|
|
1043
1037
|
return (jsx("section", { className: `box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between
|
|
1044
|
-
items-stretch ${cardStyleMap$1[version]} ${
|
|
1038
|
+
items-stretch ${cardStyleMap$1[version]} ${VersionStyleMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
|
|
1045
1039
|
}
|
|
1046
1040
|
|
|
1047
1041
|
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', ...rest }) => {
|
|
@@ -1087,8 +1081,8 @@
|
|
|
1087
1081
|
LinkList,
|
|
1088
1082
|
};
|
|
1089
1083
|
|
|
1090
|
-
const renderBlocksList = ({ blocks, context, className = '' }) => blocks?.length ? blocks.map(renderBlock$
|
|
1091
|
-
const renderBlock$
|
|
1084
|
+
const renderBlocksList = ({ blocks, context, className = '' }) => blocks?.length ? blocks.map(renderBlock$1({ context, className })) : null;
|
|
1085
|
+
const renderBlock$1 = ({ context, className }) => (block, i) => {
|
|
1092
1086
|
if (!block) {
|
|
1093
1087
|
return null;
|
|
1094
1088
|
}
|
|
@@ -1130,7 +1124,7 @@
|
|
|
1130
1124
|
});
|
|
1131
1125
|
return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full
|
|
1132
1126
|
font-sans text-h6 ${hasContent ? 'group cursor-pointer' : ''}
|
|
1133
|
-
`, onClick: handleToggle, children: [jsx("span", { className: `text-xl font-medium pr-2.5`, children: label }), hasContent ? (jsx(Img, { image: icon, className: "text-primary-main", width: "24", height: "24", asSVG: true })) : null] }), hasContent ? (jsx(AccordionItemInner, { isExpanded: isActive, blocks: blocks, context: context })) : null] }));
|
|
1127
|
+
`, onClick: handleToggle, children: [jsx("span", { className: `text-xl font-medium pr-2.5`, children: label }), hasContent ? (jsx(Img, { image: icon, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })) : null] }), hasContent ? (jsx(AccordionItemInner, { isExpanded: isActive, blocks: blocks, context: context })) : null] }));
|
|
1134
1128
|
});
|
|
1135
1129
|
|
|
1136
1130
|
const ALIGN_TITLE = {
|
|
@@ -1347,15 +1341,31 @@
|
|
|
1347
1341
|
let impl = useAsyncData$1;
|
|
1348
1342
|
const useAsyncData = (key, fetcher) => impl(key, fetcher);
|
|
1349
1343
|
|
|
1350
|
-
function
|
|
1351
|
-
|
|
1352
|
-
|
|
1344
|
+
async function fetchJSON(url, options) {
|
|
1345
|
+
try {
|
|
1346
|
+
return await fetchJSONUnsafe(url, options);
|
|
1347
|
+
}
|
|
1348
|
+
catch (err) {
|
|
1349
|
+
console.error(err);
|
|
1350
|
+
}
|
|
1351
|
+
return null;
|
|
1353
1352
|
}
|
|
1354
|
-
async function
|
|
1355
|
-
const response = await fetch(url
|
|
1353
|
+
async function fetchJSONUnsafe(url, options) {
|
|
1354
|
+
const response = await fetch(url, {
|
|
1355
|
+
...options,
|
|
1356
|
+
headers: {
|
|
1357
|
+
...options?.headers,
|
|
1358
|
+
'Content-Type': 'application/json',
|
|
1359
|
+
},
|
|
1360
|
+
});
|
|
1356
1361
|
return await response.json();
|
|
1357
1362
|
}
|
|
1358
1363
|
|
|
1364
|
+
function useCalculatorParams(dir) {
|
|
1365
|
+
const { data } = useAsyncData(`/wcms-resources/${dir}.json`, fetchJSONUnsafe);
|
|
1366
|
+
return data;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1359
1369
|
const useBonusCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1360
1370
|
const { travelExpenseValue, restExpenseValue } = userInputParams;
|
|
1361
1371
|
const bonusCalculatorSourceBookParams = useCalculatorParams(sourceBookDir || BONUS_CALC_DEFAULT_DIR) ||
|
|
@@ -1458,13 +1468,12 @@
|
|
|
1458
1468
|
const { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
|
|
1459
1469
|
const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
|
|
1460
1470
|
const monthlyPayment = getMonthlyPayment(finalRate, userInputParams);
|
|
1461
|
-
|
|
1471
|
+
return {
|
|
1462
1472
|
...creditCalculatorSourceBookParams,
|
|
1463
1473
|
...userInputParams,
|
|
1464
1474
|
finalRate,
|
|
1465
1475
|
monthlyPayment,
|
|
1466
1476
|
};
|
|
1467
|
-
return extendedCalculatorParams;
|
|
1468
1477
|
};
|
|
1469
1478
|
|
|
1470
1479
|
const ANNUITY = 'annuity';
|
|
@@ -1621,7 +1630,7 @@
|
|
|
1621
1630
|
${btnClassName}`, children: [jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] 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: `text-secondary-text ${btnDescClassName}`, children: tab.description })] })] }, String(i)));
|
|
1622
1631
|
}
|
|
1623
1632
|
function renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex }) {
|
|
1624
|
-
return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-
|
|
1633
|
+
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({
|
|
1625
1634
|
tab,
|
|
1626
1635
|
i,
|
|
1627
1636
|
activeSlideIndex,
|
|
@@ -1629,6 +1638,11 @@
|
|
|
1629
1638
|
})) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
1630
1639
|
}
|
|
1631
1640
|
|
|
1641
|
+
const iconVersionMap = {
|
|
1642
|
+
default: 'normal',
|
|
1643
|
+
primary: 'white',
|
|
1644
|
+
secondary: 'black',
|
|
1645
|
+
};
|
|
1632
1646
|
const cardStyleMap = {
|
|
1633
1647
|
black: 'bg-black',
|
|
1634
1648
|
white: 'bg-white',
|
|
@@ -1638,16 +1652,17 @@
|
|
|
1638
1652
|
});
|
|
1639
1653
|
const renderColorOption = (color, i) => (jsx("span", { className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
1640
1654
|
const renderButton = (button) => {
|
|
1641
|
-
const { icon, iconRight,
|
|
1642
|
-
if (!text) {
|
|
1655
|
+
const { icon, iconRight, ...other } = button;
|
|
1656
|
+
if (!button?.text) {
|
|
1643
1657
|
return null;
|
|
1644
1658
|
}
|
|
1645
|
-
const
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1659
|
+
const iconVersion = iconVersionMap[button?.version || 'default'];
|
|
1660
|
+
const leftIcon = renderButtonIcon({ ...icon, iconVersion });
|
|
1661
|
+
const rightIcon = renderButtonIcon({ ...iconRight, iconVersion });
|
|
1662
|
+
return (jsx(Button, { className: "mt-5 w-full", appendLeft: leftIcon, appendRight: rightIcon, ...other }));
|
|
1648
1663
|
};
|
|
1649
1664
|
const renderButtonIcon = (buttonIcon) => {
|
|
1650
|
-
if (!buttonIcon || !buttonIcon
|
|
1665
|
+
if (!buttonIcon || (!buttonIcon?.icon && !buttonIcon?.src)) {
|
|
1651
1666
|
return null;
|
|
1652
1667
|
}
|
|
1653
1668
|
const iconWidth = buttonIcon?.size?.width ? `${buttonIcon.size.width}` : '24';
|
|
@@ -1696,7 +1711,7 @@
|
|
|
1696
1711
|
const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
|
|
1697
1712
|
const FIRST_CELL_CLASSES$1 = 'w-[200px] mr-6';
|
|
1698
1713
|
const COLS_LENGTH_FOR_SCROLL$1 = 2;
|
|
1699
|
-
const COLUMN_WIDTH$
|
|
1714
|
+
const COLUMN_WIDTH$2 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
|
|
1700
1715
|
|
|
1701
1716
|
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", children: [icon && !image?.src && (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "text-center text-white", title: title })) : null, link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "text-xs-light font-medium py-[11px]", children: link.text }) }) }))] })));
|
|
1702
1717
|
|
|
@@ -1709,7 +1724,17 @@
|
|
|
1709
1724
|
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
1710
1725
|
|
|
1711
1726
|
const ComparisonTableColumnHeaders = JSX(({ colHeaders, activeCardIndex, router, handlerDecorator }) => {
|
|
1712
|
-
return (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$
|
|
1727
|
+
return (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$2, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header, link: header.link && useLink({ router, handlerDecorator }, header.link) }, String(i)))) })] }));
|
|
1728
|
+
});
|
|
1729
|
+
|
|
1730
|
+
const TableArrowScrollControl = JSX(({ isScrollAvailable, handleNextClick, handlePrevClick, showNextButton, showPrevButton }) => {
|
|
1731
|
+
return isScrollAvailable ? (jsx("div", { children: renderArrows({
|
|
1732
|
+
handler: [handlePrevClick, handleNextClick],
|
|
1733
|
+
isShown: [showPrevButton, showNextButton],
|
|
1734
|
+
btnClass: ['top-[108px]', 'top-11'],
|
|
1735
|
+
className: 'right-7',
|
|
1736
|
+
isDisabled: true,
|
|
1737
|
+
}) })) : null;
|
|
1713
1738
|
});
|
|
1714
1739
|
|
|
1715
1740
|
const TableCell = JSX(({ cell, isFirstRow, isLastRow, isFillGradient }) => {
|
|
@@ -1722,17 +1747,7 @@
|
|
|
1722
1747
|
const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? jsx("h4", { className: labelStyle(isFillGradient), children: label }) : null, description ? jsx("div", { className: descriptionStyle(isFillGradient), children: description }) : null] }, String(i)));
|
|
1723
1748
|
|
|
1724
1749
|
const titleStyle = (isLastRow = false) => `text-s py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${isLastRow ? 'border-b-0' : 'border-solid'}`;
|
|
1725
|
-
const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? jsx("div", { className: titleStyle(isLastRow), children: header.title }) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$
|
|
1726
|
-
|
|
1727
|
-
const TableArrowScrollControl = JSX(({ isScrollAvailable, handleNextClick, handlePrevClick, showNextButton, showPrevButton }) => {
|
|
1728
|
-
return isScrollAvailable ? (jsx("div", { children: renderArrows({
|
|
1729
|
-
handler: [handlePrevClick, handleNextClick],
|
|
1730
|
-
isShown: [showPrevButton, showNextButton],
|
|
1731
|
-
btnClass: ['top-[108px]', 'top-11'],
|
|
1732
|
-
className: 'right-7',
|
|
1733
|
-
isDisabled: true,
|
|
1734
|
-
}) })) : null;
|
|
1735
|
-
});
|
|
1750
|
+
const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? jsx("div", { className: titleStyle(isLastRow), children: header.title }) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$2, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
|
|
1736
1751
|
|
|
1737
1752
|
const ComparisonTableRows = JSX(({ rowData, activeCardIndex, isColoredFirstColumn, ...tableArrowScrollProps }) => {
|
|
1738
1753
|
return (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TableRow, { row: row, isFirstRow: i === 0, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, isColoredFirstColumn: isColoredFirstColumn }, String(i)))), jsx(TableArrowScrollControl, { ...tableArrowScrollProps })] }));
|
|
@@ -1771,26 +1786,21 @@
|
|
|
1771
1786
|
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 ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
|
|
1772
1787
|
};
|
|
1773
1788
|
|
|
1789
|
+
const roundTo = (value, precision = 2) => {
|
|
1790
|
+
const factor = 10 ** precision;
|
|
1791
|
+
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1774
1794
|
function useExchangeRates() {
|
|
1775
1795
|
const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
|
|
1776
1796
|
const result = data?.hits?.hits?.map((_) => _._source) || [];
|
|
1777
1797
|
return result.length ? getCurrencyListByRate(result) : result;
|
|
1778
1798
|
}
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
'Content-Type': 'application/json',
|
|
1785
|
-
},
|
|
1786
|
-
body: JSON.stringify(EXCHANGE_RATES_BODY),
|
|
1787
|
-
});
|
|
1788
|
-
return await response.json();
|
|
1789
|
-
}
|
|
1790
|
-
catch (err) {
|
|
1791
|
-
console.error(err);
|
|
1792
|
-
return Promise.resolve();
|
|
1793
|
-
}
|
|
1799
|
+
function fetchExchangeRates() {
|
|
1800
|
+
return fetchJSON(EXCHANGE_RATES_URL, {
|
|
1801
|
+
method: 'POST',
|
|
1802
|
+
body: JSON.stringify(EXCHANGE_RATES_BODY),
|
|
1803
|
+
});
|
|
1794
1804
|
}
|
|
1795
1805
|
const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
|
|
1796
1806
|
const EXCHANGE_RATES_BODY = {
|
|
@@ -1825,13 +1835,12 @@
|
|
|
1825
1835
|
if (!result.some((i) => i.code === currencyCode)) {
|
|
1826
1836
|
result.push({
|
|
1827
1837
|
code: currencyCode,
|
|
1828
|
-
buy:
|
|
1829
|
-
sell:
|
|
1838
|
+
buy: roundTo(Number(_.rate_buy), 3),
|
|
1839
|
+
sell: roundTo(Number(_.rate_sell), 3),
|
|
1830
1840
|
});
|
|
1831
1841
|
}
|
|
1832
1842
|
return result;
|
|
1833
1843
|
}, []);
|
|
1834
|
-
const roundRate = (value) => Math.round(value * 1000) / 1000;
|
|
1835
1844
|
|
|
1836
1845
|
var Currency;
|
|
1837
1846
|
(function (Currency) {
|
|
@@ -1861,11 +1870,6 @@
|
|
|
1861
1870
|
|
|
1862
1871
|
const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(Img, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0 text-m", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
|
|
1863
1872
|
|
|
1864
|
-
const roundTo = (value, precision = 2) => {
|
|
1865
|
-
const factor = Math.pow(10, precision);
|
|
1866
|
-
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
1867
|
-
};
|
|
1868
|
-
|
|
1869
1873
|
const calculateResult = (value, rate, precision) => {
|
|
1870
1874
|
const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
|
|
1871
1875
|
return Number.isInteger(result) ? result : roundTo(result);
|
|
@@ -1993,6 +1997,10 @@
|
|
|
1993
1997
|
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
1994
1998
|
});
|
|
1995
1999
|
|
|
2000
|
+
const ICON_VERSION_MAP = {
|
|
2001
|
+
'bg-white': 'normal',
|
|
2002
|
+
transparent: 'white',
|
|
2003
|
+
};
|
|
1996
2004
|
const SVG_COLOR = {
|
|
1997
2005
|
'bg-white': 'text-primary-main',
|
|
1998
2006
|
transparent: 'text-white',
|
|
@@ -2002,11 +2010,11 @@
|
|
|
2002
2010
|
transparent: 'text-white',
|
|
2003
2011
|
};
|
|
2004
2012
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', hideTitle, }) => {
|
|
2005
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), hideTitle ? null : renderTitle$1(children, bgColor, logo?.title)] }));
|
|
2013
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(Img, { image: { icon: 'Logo', iconVersion: ICON_VERSION_MAP[bgColor] }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), hideTitle ? null : renderTitle$1(children, bgColor, logo?.title)] }));
|
|
2006
2014
|
});
|
|
2007
2015
|
const renderTitle$1 = (children, bgColor, title) => {
|
|
2008
2016
|
const text = children || title || 'Россельхозбанк';
|
|
2009
|
-
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-
|
|
2017
|
+
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-light ml-2.5`, children: text });
|
|
2010
2018
|
};
|
|
2011
2019
|
|
|
2012
2020
|
const useSearch = () => {
|
|
@@ -2076,16 +2084,9 @@
|
|
|
2076
2084
|
const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
|
|
2077
2085
|
|
|
2078
2086
|
function useSitemap() {
|
|
2079
|
-
const { data } = useAsyncData(
|
|
2087
|
+
const { data } = useAsyncData(`/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`, fetchJSONUnsafe);
|
|
2080
2088
|
return data || {};
|
|
2081
2089
|
}
|
|
2082
|
-
async function fetchSitemap() {
|
|
2083
|
-
const response = await fetch(sitemapURL());
|
|
2084
|
-
return await response.json();
|
|
2085
|
-
}
|
|
2086
|
-
function sitemapURL() {
|
|
2087
|
-
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
2088
|
-
}
|
|
2089
2090
|
|
|
2090
2091
|
const Sitemap = JSX(({ className = '', items, context }) => {
|
|
2091
2092
|
const sitemap = useSitemap();
|
|
@@ -2177,56 +2178,6 @@
|
|
|
2177
2178
|
const renderMonthNames = (item, colSize) => item.month.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
|
|
2178
2179
|
const renderMonthImages = (item) => item.month.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(Img, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
2179
2180
|
|
|
2180
|
-
const filterBlocksByTag = (blocks, tag) => {
|
|
2181
|
-
return tag ? blocks.filter((block) => block?.tags?.includes(tag)) : blocks;
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
|
-
const EmbeddableGroupBlocks = {
|
|
2185
|
-
ProductBlock,
|
|
2186
|
-
ProductTile,
|
|
2187
|
-
};
|
|
2188
|
-
|
|
2189
|
-
const GroupBlocksItem = JSX(({ groupBlocks, context }) => {
|
|
2190
|
-
return (jsx("div", { className: "grid grid-cols-12 gap-1 box-border", children: groupBlocks?.length ? groupBlocks.map(renderBlock$1(context)) : null }));
|
|
2191
|
-
});
|
|
2192
|
-
const renderBlock$1 = (context) => (block, i) => {
|
|
2193
|
-
const type = block?.blockType;
|
|
2194
|
-
if (!type || !(type in EmbeddableGroupBlocks)) {
|
|
2195
|
-
return null;
|
|
2196
|
-
}
|
|
2197
|
-
const classNameBlock = style2className(block?.style);
|
|
2198
|
-
const EmbeddedBlock = EmbeddableGroupBlocks[type];
|
|
2199
|
-
return (jsx(EmbeddedBlock, { context: context, ...block, className: classNameBlock }, `block_${i}`));
|
|
2200
|
-
};
|
|
2201
|
-
|
|
2202
|
-
const GroupBlockTabs = JSX((props) => {
|
|
2203
|
-
const { className = '', tabs, currentTag, isShowCounter = false, onTabClick } = props;
|
|
2204
|
-
return (jsx("div", { className: `box-border flex gap-x-1 h-14 ${className}`, role: "tablist", children: tabs?.map(renderTab$2({ currentTag, isShowCounter, onTabClick })) }));
|
|
2205
|
-
});
|
|
2206
|
-
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-xs-light ml-2';
|
|
2207
|
-
const renderTab$2 = ({ currentTag, isShowCounter, onTabClick }) => (tab, i) => {
|
|
2208
|
-
const isActive = currentTag === tab.tag;
|
|
2209
|
-
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
2210
|
-
const tabText = `text-m-light ${isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main'}`;
|
|
2211
|
-
const counterBlockStyle = `${badgeStyle}
|
|
2212
|
-
${isActive
|
|
2213
|
-
? 'bg-white/30 text-white'
|
|
2214
|
-
: 'bg-main-divider text-secondary-text group-hover:text-primary-main'}`;
|
|
2215
|
-
return (jsxs("div", { className: `flex-1 flex items-center justify-center cursor-pointer m-1 ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": isActive, children: [tab?.title ? jsx("div", { className: tabText, children: tab.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ${counterBlockStyle}`, children: tab.count })) : null] }, String(i)));
|
|
2216
|
-
};
|
|
2217
|
-
|
|
2218
|
-
const GroupBlock = JSX(({ className = '', tabs, context, groupBlocks = [], isShowCounter, ...rest }) => {
|
|
2219
|
-
const [currentTag, setCurrentTag] = useState(tabs?.[0]?.tag);
|
|
2220
|
-
const filteredBlocks = filterBlocksByTag(groupBlocks, currentTag);
|
|
2221
|
-
const tabsNewMap = tabs?.map((tab) => {
|
|
2222
|
-
const count = tab.tag
|
|
2223
|
-
? groupBlocks.filter((block) => block?.tags?.includes(tab.tag)).length
|
|
2224
|
-
: groupBlocks.length;
|
|
2225
|
-
return { ...tab, count };
|
|
2226
|
-
});
|
|
2227
|
-
return (jsxs(BlockWrapper, { context: context, className: `box-border ${className}`, ...rest, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap, isShowCounter: isShowCounter })) : null, groupBlocks.length ? (jsx("div", { className: "mt-1", children: jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks }) })) : null] }));
|
|
2228
|
-
});
|
|
2229
|
-
|
|
2230
2181
|
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
2231
2182
|
|
|
2232
2183
|
const isHrefActive = (href, router, cmp = (targetHref, baseHref) => baseHref.startsWith(targetHref)) => {
|
|
@@ -2239,22 +2190,22 @@
|
|
|
2239
2190
|
isHrefActive(topItem.href, router) ||
|
|
2240
2191
|
checkIsHrefSameOrigin(topItem.href, router);
|
|
2241
2192
|
|
|
2242
|
-
const TEXT_CLASSES$
|
|
2243
|
-
const LINK_CLASSES$
|
|
2244
|
-
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses
|
|
2245
|
-
const getLinkClasses
|
|
2193
|
+
const TEXT_CLASSES$2 = 'font-sans text-s-light';
|
|
2194
|
+
const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
2195
|
+
const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$1(bgColor, active, flat), children: text || children }) })));
|
|
2196
|
+
const getLinkClasses = (bgColor, active = false, flat = false) => {
|
|
2246
2197
|
let classes = 'border-transparent';
|
|
2247
2198
|
if (active) {
|
|
2248
2199
|
classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
|
|
2249
2200
|
}
|
|
2250
|
-
return `${classes} ${LINK_CLASSES$
|
|
2201
|
+
return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
|
|
2251
2202
|
};
|
|
2252
|
-
const getTextClasses$
|
|
2253
|
-
if (bgColor
|
|
2254
|
-
return `text-white ${TEXT_CLASSES$
|
|
2203
|
+
const getTextClasses$1 = (bgColor, active = false, flat = false) => {
|
|
2204
|
+
if (bgColor === 'transparent') {
|
|
2205
|
+
return `text-white hover:text-primary-hover ${TEXT_CLASSES$2}`;
|
|
2255
2206
|
}
|
|
2256
2207
|
const nonActiveAtoms = `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
2257
|
-
return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$
|
|
2208
|
+
return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$2}`;
|
|
2258
2209
|
};
|
|
2259
2210
|
|
|
2260
2211
|
const DaData = DaDataAPI('https://10.80.4.9');
|
|
@@ -2289,7 +2240,7 @@
|
|
|
2289
2240
|
};
|
|
2290
2241
|
const HeaderSecondaryMenu = JSX(({ className, defaultLocation = '', bgColor = 'bg-white' }) => {
|
|
2291
2242
|
const [city, getCity] = useGeolocation(defaultLocation);
|
|
2292
|
-
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-
|
|
2243
|
+
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(Img, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
|
|
2293
2244
|
});
|
|
2294
2245
|
|
|
2295
2246
|
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
@@ -2301,15 +2252,15 @@
|
|
|
2301
2252
|
: undefined;
|
|
2302
2253
|
};
|
|
2303
2254
|
|
|
2304
|
-
const TEXT_CLASSES$
|
|
2255
|
+
const TEXT_CLASSES$1 = 'font-sans text-l-light';
|
|
2305
2256
|
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
2306
|
-
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white', dataItemName, }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, "data-item-name": dataItemName, children: [jsx("span", { className: getTextClasses
|
|
2307
|
-
const getTextClasses
|
|
2257
|
+
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white', dataItemName, }) => (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, "data-item-name": dataItemName, children: [jsx("span", { className: getTextClasses(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
2258
|
+
const getTextClasses = (bgColor, active = false) => {
|
|
2308
2259
|
let classes = 'text-white';
|
|
2309
2260
|
if (bgColor === 'bg-white') {
|
|
2310
2261
|
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
2311
2262
|
}
|
|
2312
|
-
return `${classes} ${TEXT_CLASSES$
|
|
2263
|
+
return `${classes} ${TEXT_CLASSES$1}`;
|
|
2313
2264
|
};
|
|
2314
2265
|
const getBorderClasses = (bgColor, active = false) => {
|
|
2315
2266
|
if (!active) {
|
|
@@ -2367,8 +2318,9 @@
|
|
|
2367
2318
|
const { handlerDecorator } = context;
|
|
2368
2319
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
2369
2320
|
const [firstPortal] = mergedItems;
|
|
2370
|
-
|
|
2371
|
-
|
|
2321
|
+
const activeTopItem = showSubMenu
|
|
2322
|
+
? mergedItems.find(isTopItemActive(router)) || firstPortal // Если по слагу невозможно понять к какому подпорталу этот слаг относиться, то выбираем первый подпортал.
|
|
2323
|
+
: null;
|
|
2372
2324
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), "aria-label": _.text, bgColor: bgColor }, String(i))));
|
|
2373
2325
|
return (jsx(BlockWrapper, { tag: "header", context: context, className: `pt-6 pb-5 px-20 ${bgColor} ${className}`, ...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] }) }));
|
|
2374
2326
|
});
|
|
@@ -2384,7 +2336,7 @@
|
|
|
2384
2336
|
const isLastShift = galleryLength === tabsShift + 2;
|
|
2385
2337
|
const showPrevButton = tabsShift > 0;
|
|
2386
2338
|
const activeHref = cards[activeSlideIndex]?.href;
|
|
2387
|
-
return (jsxs("section", { role: "listitem", className: `min-w-full text-center ${className}`, children: [jsxs("div", { className: "relative
|
|
2339
|
+
return (jsxs("section", { role: "listitem", className: `min-w-full text-center ${className}`, children: [jsxs("div", { className: "relative overflow-hidden", children: [galleryLength
|
|
2388
2340
|
? renderGallery({
|
|
2389
2341
|
tabsShift,
|
|
2390
2342
|
cards,
|
|
@@ -2401,7 +2353,8 @@
|
|
|
2401
2353
|
});
|
|
2402
2354
|
function renderGallery({ tabsShift, cards, activeSlideIndex, isLastShift, setActiveSlideIndex, }) {
|
|
2403
2355
|
const tabsShiftWidth = isLastShift ? tabsShift * 460 - 240 : tabsShift * 460;
|
|
2404
|
-
|
|
2356
|
+
const cardsAlignStyle = cards.length > 2 ? 'justify-start' : 'justify-center';
|
|
2357
|
+
return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000 px-[50px]", children: jsx("div", { className: `w-full flex flex-nowrap gap-3.5 pb-12 ${cardsAlignStyle}`, children: cards.map((slide, i) => renderSlide({
|
|
2405
2358
|
slide,
|
|
2406
2359
|
i,
|
|
2407
2360
|
activeSlideIndex,
|
|
@@ -2413,7 +2366,7 @@
|
|
|
2413
2366
|
const btnClassName = isActiveBtn
|
|
2414
2367
|
? 'shadow-dark-blue/42 border-primary-main'
|
|
2415
2368
|
: `ease-in duration-300 border-main-stroke`;
|
|
2416
|
-
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-
|
|
2369
|
+
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-6 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)));
|
|
2417
2370
|
}
|
|
2418
2371
|
function renderValueBlock(title, sum) {
|
|
2419
2372
|
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 })] }));
|
|
@@ -2424,7 +2377,7 @@
|
|
|
2424
2377
|
|
|
2425
2378
|
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button, ...rest }) => {
|
|
2426
2379
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
2427
|
-
return (jsxs(BlockWrapper, { context: context, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title, headingType: "h3" }) : null, insuranceTabs?.length > 1 ? (jsx("div", { className: "p-1.5 bg-secondary-light w-fit
|
|
2380
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center mb-8", title: title, headingType: "h3" }) : null, insuranceTabs?.length > 1 ? (jsx("div", { className: "p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md", children: insuranceTabs.map((item, i) => renderNavButton$1({
|
|
2428
2381
|
title: item?.title,
|
|
2429
2382
|
i,
|
|
2430
2383
|
activeSlideIndex,
|
|
@@ -2450,20 +2403,17 @@
|
|
|
2450
2403
|
return (jsx("button", { type: "button", onClick: onClick, "aria-label": title, className: `box-border px-4 py-3 text-m-light ${btnClassName}`, children: title }, String(i)));
|
|
2451
2404
|
}
|
|
2452
2405
|
|
|
2453
|
-
const mobileAppStyleMap = {
|
|
2454
|
-
primary: 'bg-white text-primary-text',
|
|
2455
|
-
secondary: 'bg-primary-main text-white',
|
|
2456
|
-
};
|
|
2457
2406
|
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, headingType = 'h4', ...rest }) => {
|
|
2458
2407
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
2459
2408
|
const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
|
|
2409
|
+
const buttonsWithClass = buttons?.map((_) => ({ ..._, className: 'min-w-[168px]' }));
|
|
2460
2410
|
return (jsxs(BlockWrapper, { context: context, className: `flex justify-between font-sans p-9 box-border relative min-h-[320px]
|
|
2461
2411
|
${getTileMinHeight(className)}
|
|
2462
|
-
${
|
|
2412
|
+
${VersionStyleMap[version]}
|
|
2463
2413
|
${className}`, ...rest, children: [jsx(BaseTile, { context: context, className: "z-[1]", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[509px] mb-6
|
|
2464
|
-
${textColorClass}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons:
|
|
2414
|
+
${textColorClass}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttonsWithClass, className: "flex gap-4" })) : null, children: jsxs("div", { className: "flex flex-1 items-center", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(Img, { className: "w-fit", image: qr }) })) : null, renderList(version, items)] }) }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(Img, { image: image }) })) : null] }));
|
|
2465
2415
|
});
|
|
2466
|
-
const renderList
|
|
2416
|
+
const renderList = (version, items) => {
|
|
2467
2417
|
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" }));
|
|
2468
2418
|
};
|
|
2469
2419
|
|
|
@@ -2478,29 +2428,6 @@
|
|
|
2478
2428
|
.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] }));
|
|
2479
2429
|
});
|
|
2480
2430
|
|
|
2481
|
-
const TEXT_CLASSES$1 = 'font-sans text-m';
|
|
2482
|
-
const LINK_CLASSES$1 = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
2483
|
-
const NavigatorTabItem = JSX(({ className = '', text, active, onClick, href, target = '_self', children }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: text || children }) })));
|
|
2484
|
-
const getLinkClasses = (className, active = false) => {
|
|
2485
|
-
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
2486
|
-
return `${classes} ${LINK_CLASSES$1} ${className}`;
|
|
2487
|
-
};
|
|
2488
|
-
const getTextClasses = (active = false) => {
|
|
2489
|
-
const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
|
|
2490
|
-
return `${classes} ${TEXT_CLASSES$1}`;
|
|
2491
|
-
};
|
|
2492
|
-
|
|
2493
|
-
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, ...rest }) => {
|
|
2494
|
-
return (jsx(BlockWrapper, { context: context, className: `sticky top-0 z-20 box-border flex gap-x-1 h-14 ${className}`, ...rest, children: navigatorTabs ? navigatorTabs.map(renderTab$1(context)) : null }));
|
|
2495
|
-
});
|
|
2496
|
-
const renderTab$1 = (context) => (tab, i) => {
|
|
2497
|
-
const { handlerDecorator, useRouter } = context;
|
|
2498
|
-
const router = useRouter();
|
|
2499
|
-
const hash = getHash(router.href);
|
|
2500
|
-
const active = hash ? tab.href === hash : i === 0;
|
|
2501
|
-
return (jsx(NavigatorTabItem, { active: active, ...useLink({ router, handlerDecorator }, tab) }, tab.text));
|
|
2502
|
-
};
|
|
2503
|
-
|
|
2504
2431
|
const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
|
|
2505
2432
|
const useActiveHandler = ({ initialState = false }) => {
|
|
2506
2433
|
const [isActive, setIsActive] = useState(initialState);
|
|
@@ -2530,7 +2457,7 @@
|
|
|
2530
2457
|
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
2531
2458
|
return blocks ? (jsxs("div", { children: [renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses }), hiddenBlocksNum ? (jsxs("button", { className: buttonClassName, "data-theme": foldButtonDataTheme, onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: getFoldButtonLabel }), icon ? jsx(Icon, { name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true }) : null] })) : null] })) : null;
|
|
2532
2459
|
});
|
|
2533
|
-
const renderBlocks = (blocks, render, { blocksToHide, isActive, containerClasses }) => {
|
|
2460
|
+
const renderBlocks = (blocks, render, { blocksToHide, isActive, containerClasses = '' }) => {
|
|
2534
2461
|
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
2535
2462
|
const hiddenBlocks = blocksToHide > 0 ? blocks.slice(-blocksToHide) : [];
|
|
2536
2463
|
return render(jsxs("div", { children: [visibleBlocks, jsx("div", { className: `${foldableBlockClassNames} ${containerClasses}`, children: hiddenBlocks })] }), isActive);
|
|
@@ -2574,24 +2501,16 @@
|
|
|
2574
2501
|
const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
2575
2502
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
2576
2503
|
|
|
2577
|
-
const productGalleryStyleMap = {
|
|
2578
|
-
primary: 'bg-white text-primary-text',
|
|
2579
|
-
secondary: 'bg-primary-main text-white',
|
|
2580
|
-
};
|
|
2581
2504
|
const productBlockStyleMap = {
|
|
2582
2505
|
primary: { title: 'text-secondary-text', text: 'text-secondary-text' },
|
|
2583
2506
|
secondary: { title: 'text-white', text: 'text-white/80' },
|
|
2584
2507
|
};
|
|
2585
|
-
const productSlideStyleMap = {
|
|
2586
|
-
primary: 'bg-white text-primary-text',
|
|
2587
|
-
secondary: 'bg-primary-main text-white',
|
|
2588
|
-
};
|
|
2589
2508
|
const ProductGallery = JSX(({ className = '', context, slides = [], version = 'primary', ...rest }) => {
|
|
2590
2509
|
const galleryNav = slides.map((s) => s.nav);
|
|
2591
2510
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
2592
2511
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
2593
2512
|
return (jsxs(BlockWrapper, { context: context, className: `box-border pt-[50px] overflow-hidden relative font-sans w-100 ${className}
|
|
2594
|
-
${
|
|
2513
|
+
${VersionStyleMap[version]}`, ...rest, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2595
2514
|
slide,
|
|
2596
2515
|
i,
|
|
2597
2516
|
activeSlideIndex,
|
|
@@ -2602,14 +2521,14 @@
|
|
|
2602
2521
|
function renderProductBlock(block, i, context) {
|
|
2603
2522
|
const { version } = block;
|
|
2604
2523
|
const additionalClass = version ? productBlockStyleMap[version].title : '';
|
|
2605
|
-
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { className: `pl-[50px] z-
|
|
2524
|
+
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { className: `pl-[50px] z-10 ${additionalClass}`, context: context, textBlockClassName: "mb-[154px]", ...block, headlineVersion: "XXL" }) }) }, String(i)));
|
|
2606
2525
|
}
|
|
2607
2526
|
function renderNavButton({ slide, i, activeSlideIndex, onClick, version }) {
|
|
2608
2527
|
const isActiveBtn = i === activeSlideIndex;
|
|
2609
2528
|
const btnClassName = isActiveBtn
|
|
2610
2529
|
? 'bg-white shadow-dark-blue/42 w-[354px] min-w-[354px] border-none'
|
|
2611
2530
|
: `min-w-[277px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10
|
|
2612
|
-
${
|
|
2531
|
+
${VersionStyleMap[version]}`;
|
|
2613
2532
|
const btnTitleClassName = isActiveBtn
|
|
2614
2533
|
? 'text-primary-text text-h6'
|
|
2615
2534
|
: `text-l ${productBlockStyleMap[version].title}`;
|
|
@@ -2622,12 +2541,8 @@
|
|
|
2622
2541
|
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }) }, String(i)));
|
|
2623
2542
|
}
|
|
2624
2543
|
|
|
2625
|
-
const promoTileStyleMap = {
|
|
2626
|
-
primary: 'bg-white text-primary-text',
|
|
2627
|
-
secondary: 'bg-primary-main text-white',
|
|
2628
|
-
};
|
|
2629
2544
|
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => {
|
|
2630
|
-
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${
|
|
2545
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { context: context, title: title ? (jsx(Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2" })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex gap-3" })) : null, children: jsxs("div", { className: "mt-1.5", children: [date ? jsx("div", { className: "text-s mb-2", children: formatDate(date) }) : null, jsx("div", { className: "text-l", children: description })] }) }) }));
|
|
2631
2546
|
});
|
|
2632
2547
|
function formatDate(date) {
|
|
2633
2548
|
const dateObj = new Date(date);
|
|
@@ -2736,7 +2651,7 @@
|
|
|
2736
2651
|
};
|
|
2737
2652
|
// TODO: В качестве компонента не годится
|
|
2738
2653
|
const RadioButtons = JSX(() => {
|
|
2739
|
-
const [selected, setSelected] = useState('
|
|
2654
|
+
const [selected, setSelected] = useState('option2');
|
|
2740
2655
|
const onChange = (_) => setSelected(_.target.value);
|
|
2741
2656
|
return (jsxs("div", { children: [jsx(Radio, { className: "mb-2", name: "contractType", text: "\u041F\u0440\u043E\u0441\u0442\u043E\u0435 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", value: "option1", checked: selected === 'option1', onChange: onChange }), jsx(Radio, { name: "contractType", text: "\u0421\u0434\u0435\u043B\u043A\u0430 \u0441 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C\u044E", value: "option2", checked: selected === 'option2', onChange: onChange })] }));
|
|
2742
2657
|
});
|
|
@@ -2770,6 +2685,10 @@
|
|
|
2770
2685
|
{
|
|
2771
2686
|
city: 'Москва',
|
|
2772
2687
|
offices: [
|
|
2688
|
+
{
|
|
2689
|
+
office: 'выберите отделение',
|
|
2690
|
+
rate: null,
|
|
2691
|
+
},
|
|
2773
2692
|
{
|
|
2774
2693
|
office: 'МоскваОфис1',
|
|
2775
2694
|
rate: 1,
|
|
@@ -2885,6 +2804,10 @@
|
|
|
2885
2804
|
return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px]\n whitespace-pre-line overflow-hidden", children: [step?.label ? jsx("div", { className: "text-xl m-0 mt-4", children: step.label }) : null, step?.description ? (jsx("div", { className: `text-l-light ${styleMap.description} ${additionalMarginClass}`, children: step.description })) : null, step.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", ...useLink({ router, handlerDecorator }, step.button), version: version, children: step.button.text })) : null] }, String(i)));
|
|
2886
2805
|
};
|
|
2887
2806
|
|
|
2807
|
+
function assertUnreachable(x) {
|
|
2808
|
+
throw new Error(x);
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2888
2811
|
const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
|
|
2889
2812
|
const ACTIVE_LINK_CLASSES = 'bg-primary-main';
|
|
2890
2813
|
const INACTIVE_LINK_CLASSES = 'group bg-white';
|
|
@@ -2907,25 +2830,43 @@
|
|
|
2907
2830
|
|
|
2908
2831
|
const renderLinkTab = ({ text, onClick, href, target = '_self', i }) => (jsx("a", { className: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`, target: target, href: href, onClick: onClick, children: jsx("span", { className: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`, children: text }) }, String(i)));
|
|
2909
2832
|
|
|
2910
|
-
const renderTab = ({ onClick, currentTab, showCounter, page, context }) =>
|
|
2833
|
+
const renderTab = ({ onClick, currentTab, showCounter, page, context }) =>
|
|
2834
|
+
// Linter doesn't understand that switch processes all cases
|
|
2835
|
+
// eslint-disable-next-line consistent-return
|
|
2836
|
+
(tab, i) => {
|
|
2911
2837
|
const { useRouter, handlerDecorator } = context;
|
|
2912
2838
|
const router = useRouter();
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2839
|
+
const type = tab.type;
|
|
2840
|
+
if (!(type === 'group' || type === 'link')) {
|
|
2841
|
+
return null;
|
|
2842
|
+
}
|
|
2843
|
+
switch (type) {
|
|
2844
|
+
case 'group':
|
|
2845
|
+
return renderGroupTab({ onClick, currentTab, showCounter, page, context })(tab, i);
|
|
2846
|
+
case 'link':
|
|
2847
|
+
return renderLinkTab({
|
|
2848
|
+
...useLink({ router, handlerDecorator }, tab),
|
|
2849
|
+
i,
|
|
2850
|
+
});
|
|
2851
|
+
default:
|
|
2852
|
+
assertUnreachable(type);
|
|
2918
2853
|
}
|
|
2919
|
-
return renderGroupTab({ onClick, currentTab, showCounter, page, context })(tab, i);
|
|
2920
2854
|
};
|
|
2921
2855
|
|
|
2922
2856
|
const Tabs = JSX((props) => {
|
|
2923
2857
|
const { context, className, tabs, page, showCounter } = props;
|
|
2924
2858
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
2925
|
-
useEffect(() =>
|
|
2859
|
+
useEffect(() => {
|
|
2860
|
+
if (currentTab?.type === 'group') {
|
|
2861
|
+
return EventBus.inst.subject('tab', { label: currentTab.ref });
|
|
2862
|
+
}
|
|
2863
|
+
return undefined;
|
|
2864
|
+
}, [currentTab]);
|
|
2926
2865
|
const handleClick = (selectedTab) => {
|
|
2927
|
-
|
|
2928
|
-
|
|
2866
|
+
if (selectedTab?.type === 'group') {
|
|
2867
|
+
EventBus.inst.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
2868
|
+
setCurrentTab(selectedTab);
|
|
2869
|
+
}
|
|
2929
2870
|
};
|
|
2930
2871
|
return (jsx(BlockWrapper, { context: context, className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab({ onClick: handleClick, currentTab, page, showCounter, context })) }));
|
|
2931
2872
|
});
|
|
@@ -2933,40 +2874,149 @@
|
|
|
2933
2874
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
2934
2875
|
const FIRST_CELL_CLASSES = 'w-[354px] flex-shrink-0';
|
|
2935
2876
|
const COLS_LENGTH_FOR_SCROLL = 2;
|
|
2936
|
-
const COLUMN_WIDTH = 4 * 80 + 40; // w-80 + pl-10 = 360px
|
|
2877
|
+
const COLUMN_WIDTH$1 = 4 * 80 + 40; // w-80 + pl-10 = 360px
|
|
2878
|
+
|
|
2879
|
+
const TableInnerButton = JSX(({ isOpen, dataUrl, rowIdx, cellIdx, fieldIdx }) => {
|
|
2880
|
+
const handleClick = () => {
|
|
2881
|
+
EventBus.inst.fire('tariffInnerTable', { dataUrl, rowIdx, cellIdx, fieldIdx });
|
|
2882
|
+
};
|
|
2883
|
+
return (jsxs(Button, { version: "primary", onClick: handleClick, className: "w-full flex items-center justify-center rounded-none py-5 ", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать ставки по вкладу' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20", asSVG: true })] }));
|
|
2884
|
+
});
|
|
2937
2885
|
|
|
2938
2886
|
const getButtonAriaLabel = (icon) => icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
|
|
2939
2887
|
|
|
2940
|
-
const
|
|
2941
|
-
|
|
2942
|
-
|
|
2888
|
+
const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon?.src || icon?.icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps }, String(idx)))) })) : null;
|
|
2889
|
+
const renderLabelDescriptionCellData = ({ label, description }) => {
|
|
2890
|
+
const labelClassName = `text-h6 font-medium m-0 ${description ? 'mb-1' : ''}`;
|
|
2891
|
+
return (jsxs("div", { children: [label ? jsx("div", { className: labelClassName, children: label }) : null, description ? jsx("div", { className: "text-s text-secondary-text", children: description }) : null] }));
|
|
2892
|
+
};
|
|
2893
|
+
const renderImgCellData = ({ image }) => (image?.src ? jsx(Img, { image: image }) : null);
|
|
2894
|
+
const renderListCellData = ({ isDotted, ...rest }) => (jsx(List, { className: "flex flex-col justify-between items-start text-sm", version: "gray", isDotted: isDotted ?? true, ...rest }));
|
|
2895
|
+
const renderTableCellData = JSX((props) => {
|
|
2896
|
+
const [showBtn, setShowBtn] = useState(true);
|
|
2897
|
+
const tariffInnerTableSubscriber = (event) => {
|
|
2898
|
+
const _showBtn = ['rowIdx', 'cellIdx', 'fieldIdx'].every((key) => props[key] === event[key]);
|
|
2899
|
+
setShowBtn(!_showBtn);
|
|
2900
|
+
};
|
|
2901
|
+
useEffect(() => EventBus.inst.subscribe('tariffInnerTable', tariffInnerTableSubscriber), []);
|
|
2902
|
+
return showBtn ? jsx(TableInnerButton, { ...props }) : null;
|
|
2903
|
+
});
|
|
2904
|
+
const EmbeddableCellData = {
|
|
2905
|
+
Buttons: renderButtonsCellData,
|
|
2906
|
+
Img: renderImgCellData,
|
|
2907
|
+
List: renderListCellData,
|
|
2908
|
+
LabelDescription: renderLabelDescriptionCellData,
|
|
2909
|
+
Table: renderTableCellData,
|
|
2910
|
+
};
|
|
2911
|
+
|
|
2912
|
+
const TariffsTableCell = JSX(({ context, cells, isLastRow, rowIdx, cellIdx }) => {
|
|
2913
|
+
const cellWrapperClasses = `first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 ${isLastRow ? 'border-t-0 rounded-b-md' : ''}`;
|
|
2914
|
+
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: cells.map(renderCellInner(rowIdx, context, cellIdx)) }));
|
|
2915
|
+
});
|
|
2916
|
+
const renderCellInner = (rowIdx, context, cellIdx) => (cell, i) => {
|
|
2917
|
+
return (jsxs("div", { className: cell?.tableCellType === 'Table' ? 'mx-0.5' : `first:pt-5 last:pb-5 pl-10`, children: [i > 0 ? jsx("div", { className: "h-5" }) : null, renderCell(cell, context, { rowIdx, cellIdx, fieldIdx: i })] }, String(i)));
|
|
2918
|
+
};
|
|
2919
|
+
const renderCell = (cell, context, indexes) => {
|
|
2920
|
+
if (!cell) {
|
|
2921
|
+
return null;
|
|
2922
|
+
}
|
|
2923
|
+
const { tableCellType: type, ...rest } = cell;
|
|
2924
|
+
if (!type || !(type in EmbeddableCellData)) {
|
|
2925
|
+
return null;
|
|
2926
|
+
}
|
|
2927
|
+
const EmbeddableCellInner = EmbeddableCellData[type];
|
|
2928
|
+
return jsx(EmbeddableCellInner, { context: context, ...rest, ...indexes });
|
|
2929
|
+
};
|
|
2930
|
+
|
|
2931
|
+
function useTariffsInnerTableData(directoryName) {
|
|
2932
|
+
const { data } = useAsyncData(tariffsInnerTableDataUrl(directoryName), fetchTariffsInnerTableData);
|
|
2933
|
+
return data || {};
|
|
2934
|
+
}
|
|
2935
|
+
async function fetchTariffsInnerTableData(url) {
|
|
2936
|
+
const response = await fetch(url);
|
|
2937
|
+
return await response.json();
|
|
2938
|
+
}
|
|
2939
|
+
function tariffsInnerTableDataUrl(directoryName) {
|
|
2940
|
+
return `/wcms-resources/${directoryName || 'tariffs-inner-table-data'}.json`;
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
const COLUMN_WIDTH = 140;
|
|
2944
|
+
const InnerTableBodyItem = JSX(({ rows }) => {
|
|
2945
|
+
const [activeColumnIndex, setActiveColumnIndex] = useState(0);
|
|
2946
|
+
const handleNextClick = () => setActiveColumnIndex(activeColumnIndex + 1);
|
|
2947
|
+
const handlePrevClick = () => setActiveColumnIndex(activeColumnIndex - 1);
|
|
2948
|
+
const rowsLength = rows?.[0]?.length ?? 0;
|
|
2949
|
+
const showNextButton = rowsLength > 3 && rowsLength > activeColumnIndex + 4;
|
|
2950
|
+
const showPrevButton = activeColumnIndex > 0;
|
|
2951
|
+
return (jsxs("div", { children: [rows?.map(renderRow(activeColumnIndex)), renderArrows({
|
|
2952
|
+
handler: [handlePrevClick, handleNextClick],
|
|
2953
|
+
isShown: [showPrevButton, showNextButton],
|
|
2954
|
+
btnClass: ['right-3 top-24', 'right-3 top-2'],
|
|
2955
|
+
className: '',
|
|
2956
|
+
})] }));
|
|
2957
|
+
});
|
|
2958
|
+
const renderRow = (activeColumnIndex) => (rowData, rowIdx) => {
|
|
2959
|
+
if (!rowData?.length) {
|
|
2960
|
+
return null;
|
|
2961
|
+
}
|
|
2962
|
+
const [headerColumn, ...columns] = rowData;
|
|
2963
|
+
const transform = [...Array(activeColumnIndex).keys()].reduce((res, i) => (columns?.[i]?.cols?.length ?? 1) * COLUMN_WIDTH + res, 0);
|
|
2964
|
+
return (jsxs("div", { className: "flex border-main-divider border border-t-0 border-x-0 border-solid", children: [jsx("div", { className: "text-xl-light min-w-[214px] w-[214px] pt-6 pb-5", children: headerColumn.data }), jsx("div", { className: "flex flex-grow overflow-hidden", children: jsx("div", { className: "flex duration-1000 text-center", style: {
|
|
2965
|
+
transform: `translateX(-${transform}px)`,
|
|
2966
|
+
}, children: columns?.map((_, i) => (jsxs("div", { className: "flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider", children: [_?.data ? jsx("div", { className: "text-xl-light mb-3", children: _.data }) : null, _?.cols ? renderCols(_.cols, activeColumnIndex) : null] }, `row${i}`))) }) })] }, String(rowIdx)));
|
|
2967
|
+
};
|
|
2968
|
+
const renderCols = (cols, rowIndex) => cols ? (jsx("div", { className: `flex text-xl-light ${rowIndex === 0 ? 'text-secondary-text' : ''}`, children: cols.map((data, i) => (jsx("div", { className: "w-[76px] mx-8", children: data }, String(i)))) })) : null;
|
|
2969
|
+
|
|
2970
|
+
const InnerTableBody = JSX(({ context, activeTabIndex, items }) => {
|
|
2971
|
+
const [hiddenTables, setHiddenTables] = useState({});
|
|
2972
|
+
const toggleTable = (key) => {
|
|
2973
|
+
setHiddenTables((oldState) => ({ ...oldState, [key]: !oldState[key] }));
|
|
2974
|
+
};
|
|
2975
|
+
return (jsx("div", { children: items.map((_, tableIdx) => {
|
|
2976
|
+
const key = `activeTabIdx:${activeTabIndex}-tableIdx:${tableIdx}`;
|
|
2977
|
+
return (jsxs("div", { className: "w-full", children: [jsxs("div", { className: "flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative", onClick: () => toggleTable(key), children: [_.title, jsx(Img, { image: hiddenTables[key] ? 'PlusIcon' : 'MinusIcon', className: "absolute right-[22px]", width: "24", height: "24" })] }), jsx("div", { className: `w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out ${hiddenTables[key] ? 'h-0' : 'h-[243px]'}`, children: jsx("div", { className: "relative", children: jsx(InnerTableBodyItem, { context: context, rows: _.rowsData }) }) })] }, key));
|
|
2978
|
+
}) }));
|
|
2979
|
+
});
|
|
2980
|
+
|
|
2981
|
+
const InnerTableHeader = JSX(({ currencies, linkToPDF, activeTabIndex, setActiveTabIndex }) => (jsxs("div", { className: "flex justify-between w-full pt-2.5 pb-3", children: [currencies && currencies.length > 1 ? (jsx("div", { className: "flex bg-secondary-light p-1 rounded-md", children: currencies.map((currency, idx) => (jsx("div", { className: `rounded-md text-xl-light px-4 py-3 cursor-pointer ${idx === activeTabIndex ? 'bg-primary-main text-white' : 'text-secondary-text'}`, onClick: () => setActiveTabIndex(idx), children: currency || idx + 1 }, currency))) })) : null, linkToPDF ? (jsxs(Button, { href: linkToPDF, version: "secondary", className: "flex justify-center items-center text-l-light text-primary-main px-8", children: [jsx(Img, { image: "DocDownload", className: "mr-[10px]", width: "24", height: "24", asSVG: true }), jsx("span", { children: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0432 PDF" })] })) : null] })));
|
|
2982
|
+
|
|
2983
|
+
const InnerTable = JSX(({ context, dataUrl, pdfUrl }) => {
|
|
2984
|
+
const { tableData } = useTariffsInnerTableData(dataUrl);
|
|
2985
|
+
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
2986
|
+
const items = tableData?.[activeTabIndex]?.items ?? [];
|
|
2987
|
+
const currencies = tableData?.map((item) => item.currency ?? '');
|
|
2988
|
+
return tableData ? (jsxs("div", { className: "bg-white z-10 pr-[50px]", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: setActiveTabIndex, linkToPDF: pdfUrl }), jsx(InnerTableBody, { context: context, activeTabIndex: activeTabIndex, items: items }), jsx(TableInnerButton, { context: context, isOpen: true })] })) : null;
|
|
2989
|
+
});
|
|
2990
|
+
|
|
2991
|
+
const TariffsTableRowContainer = JSX(({ context, children, rowIdx }) => {
|
|
2992
|
+
const [dataUrl, setDataUrl] = useState(undefined);
|
|
2993
|
+
useEffect(() => EventBus.inst.subscribe('tariffInnerTable', (event) => {
|
|
2994
|
+
setDataUrl(rowIdx === event.rowIdx ? event.dataUrl : undefined);
|
|
2995
|
+
}), [rowIdx]);
|
|
2996
|
+
return (jsxs("div", { className: "self-start flex flex-col", role: "row", children: [jsx("div", { className: "flex", children: children }), dataUrl ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { context: context, dataUrl: dataUrl }) })) : null] }));
|
|
2943
2997
|
});
|
|
2944
|
-
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label ? jsx("div", { className: "text-xl m-0", children: label }) : null, description ? jsx("div", { className: "text-s text-secondary-text", children: description }) : null, list?.items?.length ? renderList(list) : null, image ? jsx(Img, { image: image }) : null, buttons?.length ? renderButtons(buttons) : null] }, String(i)));
|
|
2945
|
-
const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-s", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
|
|
2946
|
-
const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps }, String(idx)))) }));
|
|
2947
2998
|
|
|
2948
|
-
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow }) => {
|
|
2949
|
-
return (jsxs(
|
|
2999
|
+
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow, context, rowIdx }) => {
|
|
3000
|
+
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] }));
|
|
2950
3001
|
});
|
|
2951
3002
|
|
|
2952
|
-
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns, hiddenRowsNum = 0, ...rest }) => {
|
|
3003
|
+
const TariffsTable = JSX(({ className = '', context, title, description, rowHeaders, tariffsColumns: columns, hiddenRowsNum = 0, ...rest }) => {
|
|
2953
3004
|
const [activeCardIndex, setActiveCardIndex] = useState(0);
|
|
2954
|
-
const colData =
|
|
2955
|
-
const rowData =
|
|
3005
|
+
const colData = columns?.map(({ data }) => data) || [];
|
|
3006
|
+
const rowData = rowHeaders?.map((header, i) => ({
|
|
3007
|
+
header,
|
|
3008
|
+
data: colData.map((col) => col?.[i] || []),
|
|
3009
|
+
}));
|
|
3010
|
+
const columnsLength = colData.length;
|
|
2956
3011
|
const tableArrowScrollControlProps = useTableArrowScrollControl({
|
|
2957
|
-
columnsLength
|
|
3012
|
+
columnsLength,
|
|
2958
3013
|
colsLengthForScroll: COLS_LENGTH_FOR_SCROLL,
|
|
2959
3014
|
activeCardIndex,
|
|
2960
3015
|
setActiveCardIndex,
|
|
2961
3016
|
});
|
|
2962
|
-
const foldableBlocks = rowData?.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i))));
|
|
2963
|
-
return (jsxs(BlockWrapper, {
|
|
2964
|
-
});
|
|
2965
|
-
const getColData = (columns) => columns?.map(({ data }) => data) || [];
|
|
2966
|
-
const getRowData = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
2967
|
-
header,
|
|
2968
|
-
data: colData.map((col) => col?.[i] || [{}]),
|
|
2969
|
-
}));
|
|
3017
|
+
const foldableBlocks = rowData?.map((row, i, { length }) => (jsx(TariffsTableRow, { context: context, row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, rowIdx: i }, String(i))));
|
|
3018
|
+
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${columnsLength > 1 ? 'pr-0' : ''} ${className}`, context: context, ...rest, children: [title ? (jsx(Heading, { headingType: "h2", className: `text-center ${description ? 'mb-2.5' : 'mb-9'}`, title: title })) : null, description ? jsx("div", { className: "mb-9 text-center text-l", children: description }) : null, rowData?.length ? (jsx(Foldable, { blocks: foldableBlocks, hiddenBlocksNum: hiddenRowsNum, context: context, render: (children) => (jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: children })), foldButtonLabel: "\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C" })) : null] }));
|
|
3019
|
+
});
|
|
2970
3020
|
const Wrapper = JSX(({ children, tableArrowScrollControlProps }) => {
|
|
2971
3021
|
const { isScrollAvailable } = tableArrowScrollControlProps;
|
|
2972
3022
|
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] }));
|
|
@@ -2989,7 +3039,6 @@
|
|
|
2989
3039
|
LinkDocs,
|
|
2990
3040
|
MiniGallery,
|
|
2991
3041
|
MobileAppTile,
|
|
2992
|
-
NavigatorTabs,
|
|
2993
3042
|
PictureText,
|
|
2994
3043
|
ProductBlock,
|
|
2995
3044
|
ProductGallery,
|
|
@@ -3003,7 +3052,6 @@
|
|
|
3003
3052
|
Tile,
|
|
3004
3053
|
Navigation,
|
|
3005
3054
|
Placeholder,
|
|
3006
|
-
GroupBlock,
|
|
3007
3055
|
BonusBenefitsBlock,
|
|
3008
3056
|
SafeDepositRental,
|
|
3009
3057
|
Tabs,
|