@redneckz/wildless-cms-uni-blocks 0.3.96 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle.umd.js +3032 -2922
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.mobile.d.ts +1 -1
- package/dist/components/Accordion/AccordionItem.d.ts +1 -1
- package/dist/components/Accordion/AccordionItem.js +0 -1
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.d.ts +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +1 -4
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.d.ts +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.d.ts +1 -1
- package/dist/components/Accordion/useActiveHandler.d.ts +1 -1
- package/dist/components/Accordion/useActiveHandler.js +3 -2
- package/dist/components/Accordion/useActiveHandler.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.d.ts +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
- package/dist/components/Blocks.d.ts +35 -35
- package/dist/components/Blocks.mobile.d.ts +16 -16
- package/dist/components/Bonus/Bonus.d.ts +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.d.ts +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.js +4 -3
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Calculator.d.ts +1 -1
- package/dist/components/Calculator/Calculator.js +4 -3
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CalculatorValueBlock.d.ts +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +8 -7
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +3 -2
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/dist/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
- package/dist/components/Calculator/MortgageCalculatorForm.js +5 -4
- package/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Rate.d.ts +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
- package/dist/components/Calculator/useBonusCalculatorParams.js +3 -2
- package/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useCalculatorParams.d.ts +1 -2
- package/dist/components/Calculator/useCalculatorParams.js +3 -2
- package/dist/components/Calculator/useCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
- package/dist/components/Calculator/useCreditCalculatorParams.js +2 -2
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Catalog/Catalog.d.ts +1 -1
- package/dist/components/Catalog/Catalog.js +3 -2
- package/dist/components/Catalog/Catalog.js.map +1 -1
- package/dist/components/Catalog/CatalogCard.d.ts +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.d.ts +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +2 -1
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.d.ts +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +2 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
- package/dist/components/ComparisonTable/ComparisonTableBody.js +3 -2
- package/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/dist/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
- package/dist/components/ComparisonTable/HeaderCell.d.ts +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.d.ts +1 -1
- package/dist/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/dist/components/ComparisonTable/TableCell.d.ts +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.d.ts +1 -1
- package/dist/components/ComparisonTable/TableColumn.d.ts +1 -1
- package/dist/components/ComparisonTable/TableRow.d.ts +1 -1
- package/dist/components/ComparisonTable/TableRowContainer.d.ts +1 -4
- package/dist/components/ContentPage/ContentPage.d.ts +3 -3
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +1 -19
- package/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Contacts.d.ts +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.mobile.d.ts +1 -1
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.d.ts +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.d.ts +1 -1
- package/dist/components/Footer/HorizontalNavigationLink.d.ts +1 -1
- package/dist/components/Footer/MediaButton.d.ts +1 -1
- package/dist/components/Footer/Sitemap.d.ts +1 -1
- package/dist/components/Footer/Sitemap.js +2 -2
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.mobile.d.ts +1 -1
- package/dist/components/Footer/TextInformation.d.ts +1 -1
- package/dist/components/Footer/TextInformation.mobile.d.ts +1 -1
- package/dist/components/Footer/TextInformationLink.d.ts +1 -1
- package/dist/components/Gallery/Gallery.d.ts +1 -1
- package/dist/components/Gallery/Gallery.mobile.d.ts +1 -1
- package/dist/components/Gallery/GalleryCardInner.d.ts +1 -1
- package/dist/components/Gallery/GalleryContainer.d.ts +1 -1
- package/dist/components/Gallery/GalleryInner.d.ts +1 -1
- package/dist/components/Gallery/GalleryInner.js +2 -1
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriod.d.ts +1 -1
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
- package/dist/components/GroupBlock/GroupBlock.d.ts +1 -1
- package/dist/components/GroupBlock/GroupBlock.js +2 -1
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
- package/dist/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/dist/components/Header/DropdownMenu.d.ts +1 -1
- package/dist/components/Header/Header.d.ts +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.d.ts +1 -1
- package/dist/components/Header/Header.mobile.js +3 -2
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderBurger.d.ts +1 -1
- package/dist/components/Header/HeaderBurger.js +2 -1
- package/dist/components/Header/HeaderBurger.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +3 -3
- package/dist/components/Header/HeaderSecondaryMenu.js +3 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/dist/components/Header/HeaderSubMenu.d.ts +1 -1
- package/dist/components/Header/HeaderSubMenu.js +3 -2
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderTop.d.ts +1 -1
- package/dist/components/Headline/Headline.d.ts +1 -1
- package/dist/components/Headline/Headline.mobile.d.ts +1 -1
- package/dist/components/Insurance/Insurance.d.ts +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LikeControl/LikeControl.d.ts +1 -1
- package/dist/components/LikeControl/LikeControl.js +6 -2
- package/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.mobile.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/dist/components/LinkList/LinkList.d.ts +1 -1
- package/dist/components/MiniGallery/MiniGallery.d.ts +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.d.ts +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.d.ts +1 -1
- package/dist/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/Navigation/NavigationItem.d.ts +2 -2
- package/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProducts.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -1
- package/dist/components/PictureText/PictureText.d.ts +1 -1
- package/dist/components/Placeholder/Placeholder.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.d.ts +1 -1
- package/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +2 -1
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.mobile.d.ts +1 -1
- package/dist/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/dist/components/ProductTile/ProductTile.d.ts +1 -1
- package/dist/components/PromoTile/PromoTile.d.ts +1 -1
- package/dist/components/Recommendation/Recommendation.d.ts +1 -1
- package/dist/components/Recommendation/Recommendation.js +2 -1
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +3 -2
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +17 -16
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.js +3 -2
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/TariffsTable/TableTileHeader.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +2 -1
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
- package/dist/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
- package/dist/components/TextBlock/TextBlock.d.ts +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.d.ts +1 -1
- package/dist/components/Tile/Tile.d.ts +1 -1
- package/dist/hooks/useExchangeRates.d.ts +1 -2
- package/dist/hooks/useExchangeRates.js +3 -2
- package/dist/hooks/useExchangeRates.js.map +1 -1
- package/dist/hooks/useGeolocation.d.ts +1 -0
- package/dist/hooks/useGeolocation.js +21 -0
- package/dist/hooks/useGeolocation.js.map +1 -0
- package/dist/hooks/useLikeService.d.ts +5 -0
- package/dist/hooks/useLikeService.js +29 -0
- package/dist/hooks/useLikeService.js.map +1 -0
- package/dist/hooks/useLink.d.ts +1 -0
- package/dist/hooks/useLink.js +3 -2
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/hooks/useSafeDepositRental.d.ts +1 -2
- package/dist/hooks/useSafeDepositRental.js +3 -2
- package/dist/hooks/useSafeDepositRental.js.map +1 -1
- package/dist/hooks/useSearch.d.ts +4 -0
- package/dist/hooks/useSearch.js +12 -0
- package/dist/hooks/useSearch.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/react/setup-fixture.d.ts +1 -0
- package/dist/react/setup-fixture.js +1 -48
- package/dist/react/setup-fixture.js.map +1 -1
- package/dist/services/sitemap/useSitemap.d.ts +1 -2
- package/dist/services/sitemap/useSitemap.js +3 -2
- package/dist/services/sitemap/useSitemap.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.d.ts +1 -1
- package/dist/ui-kit/BlockWrapper.js +3 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +10 -10
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +6 -6
- package/dist/ui-kit/Breadcrumb.d.ts +1 -1
- package/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/dist/ui-kit/Button/Button.d.ts +1 -1
- package/dist/ui-kit/Button/Button.mobile.d.ts +1 -1
- package/dist/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/dist/ui-kit/Button/LikeButton.d.ts +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.d.ts +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +5 -3
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Description/Description.d.ts +1 -1
- package/dist/ui-kit/Foldable/Foldable.d.ts +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -2
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
- package/dist/ui-kit/Foldable/useActiveHandler.js +3 -2
- package/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.mobile.d.ts +1 -1
- package/dist/ui-kit/Heading/Heading.d.ts +1 -1
- package/dist/ui-kit/Heading/Heading.mobile.d.ts +1 -1
- package/dist/ui-kit/Icon/Icon.d.ts +1 -1
- package/dist/ui-kit/Img/Img.d.ts +1 -1
- package/dist/ui-kit/Img/Img.mobile.d.ts +1 -1
- package/dist/ui-kit/Img/ImgAsPicture.d.ts +1 -1
- package/dist/ui-kit/Img/ImgInner.d.ts +1 -1
- package/dist/ui-kit/Input/Input.d.ts +1 -1
- package/dist/ui-kit/InputRange/InputRange.d.ts +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +4 -3
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/dist/ui-kit/List/List.d.ts +1 -1
- package/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/dist/ui-kit/Logo/Logo.d.ts +1 -1
- package/dist/ui-kit/Logo/Logo.mobile.d.ts +1 -1
- package/dist/ui-kit/Radio/Radio.d.ts +1 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/dist/ui-kit/SVG.d.ts +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +2 -2
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.d.ts +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js +2 -2
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
- package/dist/ui-kit/SearchBar/SearchBarInner.js +3 -2
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/dist/ui-kit/Select/Select.d.ts +1 -1
- package/dist/ui-kit/Select/SelectOption.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
- package/dist/ui-kit/Tabs/Tabs.d.ts +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/Accordion.mobile.d.ts +1 -1
- package/lib/components/Accordion/AccordionItem.d.ts +1 -1
- package/lib/components/Accordion/AccordionItem.js +0 -1
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.d.ts +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +1 -4
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.d.ts +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.d.ts +1 -1
- package/lib/components/Accordion/useActiveHandler.d.ts +1 -1
- package/lib/components/Accordion/useActiveHandler.js +3 -2
- package/lib/components/Accordion/useActiveHandler.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.d.ts +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
- package/lib/components/Blocks.d.ts +35 -35
- package/lib/components/Blocks.mobile.d.ts +16 -16
- package/lib/components/Bonus/Bonus.d.ts +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.d.ts +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.js +4 -3
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Calculator.d.ts +1 -1
- package/lib/components/Calculator/Calculator.js +4 -3
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CalculatorValueBlock.d.ts +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +8 -7
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +3 -2
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/lib/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
- package/lib/components/Calculator/MortgageCalculatorForm.js +5 -4
- package/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Rate.d.ts +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
- package/lib/components/Calculator/useBonusCalculatorParams.js +3 -2
- package/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useCalculatorParams.d.ts +1 -2
- package/lib/components/Calculator/useCalculatorParams.js +2 -1
- package/lib/components/Calculator/useCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
- package/lib/components/Calculator/useCreditCalculatorParams.js +2 -2
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Catalog/Catalog.d.ts +1 -1
- package/lib/components/Catalog/Catalog.js +3 -2
- package/lib/components/Catalog/Catalog.js.map +1 -1
- package/lib/components/Catalog/CatalogCard.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +2 -1
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +2 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTableBody.js +3 -2
- package/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
- package/lib/components/ComparisonTable/HeaderCell.d.ts +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.d.ts +1 -1
- package/lib/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/lib/components/ComparisonTable/TableCell.d.ts +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.d.ts +1 -1
- package/lib/components/ComparisonTable/TableColumn.d.ts +1 -1
- package/lib/components/ComparisonTable/TableRow.d.ts +1 -1
- package/lib/components/ComparisonTable/TableRowContainer.d.ts +1 -4
- package/lib/components/ContentPage/ContentPage.d.ts +3 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +1 -19
- package/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Contacts.d.ts +1 -1
- package/lib/components/Footer/Footer.d.ts +1 -1
- package/lib/components/Footer/Footer.mobile.d.ts +1 -1
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.d.ts +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.d.ts +1 -1
- package/lib/components/Footer/HorizontalNavigationLink.d.ts +1 -1
- package/lib/components/Footer/MediaButton.d.ts +1 -1
- package/lib/components/Footer/Sitemap.d.ts +1 -1
- package/lib/components/Footer/Sitemap.js +2 -2
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.mobile.d.ts +1 -1
- package/lib/components/Footer/TextInformation.d.ts +1 -1
- package/lib/components/Footer/TextInformation.mobile.d.ts +1 -1
- package/lib/components/Footer/TextInformationLink.d.ts +1 -1
- package/lib/components/Gallery/Gallery.d.ts +1 -1
- package/lib/components/Gallery/Gallery.mobile.d.ts +1 -1
- package/lib/components/Gallery/GalleryCardInner.d.ts +1 -1
- package/lib/components/Gallery/GalleryContainer.d.ts +1 -1
- package/lib/components/Gallery/GalleryInner.d.ts +1 -1
- package/lib/components/Gallery/GalleryInner.js +2 -1
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriod.d.ts +1 -1
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
- package/lib/components/GroupBlock/GroupBlock.d.ts +1 -1
- package/lib/components/GroupBlock/GroupBlock.js +2 -1
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
- package/lib/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/lib/components/Header/DropdownMenu.d.ts +1 -1
- package/lib/components/Header/Header.d.ts +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.d.ts +1 -1
- package/lib/components/Header/Header.mobile.js +3 -2
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderBurger.d.ts +1 -1
- package/lib/components/Header/HeaderBurger.js +2 -1
- package/lib/components/Header/HeaderBurger.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +3 -3
- package/lib/components/Header/HeaderSecondaryMenu.js +3 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/lib/components/Header/HeaderSubMenu.d.ts +1 -1
- package/lib/components/Header/HeaderSubMenu.js +3 -2
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderTop.d.ts +1 -1
- package/lib/components/Headline/Headline.d.ts +1 -1
- package/lib/components/Headline/Headline.mobile.d.ts +1 -1
- package/lib/components/Insurance/Insurance.d.ts +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LikeControl/LikeControl.d.ts +1 -1
- package/lib/components/LikeControl/LikeControl.js +6 -2
- package/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.mobile.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/lib/components/LinkList/LinkList.d.ts +1 -1
- package/lib/components/MiniGallery/MiniGallery.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.d.ts +1 -1
- package/lib/components/Navigation/Navigation.d.ts +1 -1
- package/lib/components/Navigation/NavigationItem.d.ts +2 -2
- package/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProducts.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -1
- package/lib/components/PictureText/PictureText.d.ts +1 -1
- package/lib/components/Placeholder/Placeholder.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.d.ts +1 -1
- package/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +2 -1
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.mobile.d.ts +1 -1
- package/lib/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/lib/components/ProductTile/ProductTile.d.ts +1 -1
- package/lib/components/PromoTile/PromoTile.d.ts +1 -1
- package/lib/components/Recommendation/Recommendation.d.ts +1 -1
- package/lib/components/Recommendation/Recommendation.js +2 -1
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js +3 -2
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +17 -15
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.d.ts +1 -1
- package/lib/components/Tabs/Tabs.d.ts +1 -1
- package/lib/components/Tabs/Tabs.js +3 -2
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/TariffsTable/TableTileHeader.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +2 -1
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
- package/lib/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
- package/lib/components/TextBlock/TextBlock.d.ts +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.d.ts +1 -1
- package/lib/components/Tile/Tile.d.ts +1 -1
- package/lib/hooks/useExchangeRates.d.ts +1 -2
- package/lib/hooks/useExchangeRates.js +2 -1
- package/lib/hooks/useExchangeRates.js.map +1 -1
- package/lib/hooks/useGeolocation.d.ts +1 -0
- package/lib/hooks/useGeolocation.js +18 -0
- package/lib/hooks/useGeolocation.js.map +1 -0
- package/lib/hooks/useLikeService.d.ts +5 -0
- package/lib/hooks/useLikeService.js +26 -0
- package/lib/hooks/useLikeService.js.map +1 -0
- package/lib/hooks/useLink.d.ts +1 -0
- package/lib/hooks/useLink.js +1 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/hooks/useSafeDepositRental.d.ts +1 -2
- package/lib/hooks/useSafeDepositRental.js +2 -1
- package/lib/hooks/useSafeDepositRental.js.map +1 -1
- package/lib/hooks/useSearch.d.ts +4 -0
- package/lib/hooks/useSearch.js +9 -0
- package/lib/hooks/useSearch.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/react/setup-fixture.d.ts +1 -0
- package/lib/react/setup-fixture.js +2 -46
- package/lib/react/setup-fixture.js.map +1 -1
- package/lib/services/sitemap/useSitemap.d.ts +1 -2
- package/lib/services/sitemap/useSitemap.js +2 -1
- package/lib/services/sitemap/useSitemap.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.d.ts +1 -1
- package/lib/ui-kit/BlockWrapper.js +3 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +10 -10
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +6 -6
- package/lib/ui-kit/Breadcrumb.d.ts +1 -1
- package/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/lib/ui-kit/Button/Button.d.ts +1 -1
- package/lib/ui-kit/Button/Button.mobile.d.ts +1 -1
- package/lib/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/lib/ui-kit/Button/LikeButton.d.ts +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.d.ts +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +5 -3
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Description/Description.d.ts +1 -1
- package/lib/ui-kit/Foldable/Foldable.d.ts +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +1 -2
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
- package/lib/ui-kit/Foldable/useActiveHandler.js +3 -2
- package/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.mobile.d.ts +1 -1
- package/lib/ui-kit/Heading/Heading.d.ts +1 -1
- package/lib/ui-kit/Heading/Heading.mobile.d.ts +1 -1
- package/lib/ui-kit/Icon/Icon.d.ts +1 -1
- package/lib/ui-kit/Img/Img.d.ts +1 -1
- package/lib/ui-kit/Img/Img.mobile.d.ts +1 -1
- package/lib/ui-kit/Img/ImgAsPicture.d.ts +1 -1
- package/lib/ui-kit/Img/ImgInner.d.ts +1 -1
- package/lib/ui-kit/Input/Input.d.ts +1 -1
- package/lib/ui-kit/InputRange/InputRange.d.ts +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +4 -3
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/lib/ui-kit/List/List.d.ts +1 -1
- package/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/lib/ui-kit/Logo/Logo.d.ts +1 -1
- package/lib/ui-kit/Logo/Logo.mobile.d.ts +1 -1
- package/lib/ui-kit/Radio/Radio.d.ts +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/lib/ui-kit/SVG.d.ts +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +2 -2
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.d.ts +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js +2 -2
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
- package/lib/ui-kit/SearchBar/SearchBarInner.js +3 -2
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/lib/ui-kit/Select/Select.d.ts +1 -1
- package/lib/ui-kit/Select/SelectOption.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
- package/lib/ui-kit/Tabs/Tabs.d.ts +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +1899 -1794
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/Accordion.d.ts +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.d.ts +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.js +1 -4
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemInner.d.ts +1 -1
- package/mobile/dist/components/Accordion/useActiveHandler.d.ts +1 -1
- package/mobile/dist/components/Accordion/useActiveHandler.js +3 -2
- package/mobile/dist/components/Accordion/useActiveHandler.js.map +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
- package/mobile/dist/components/Blocks.d.ts +16 -16
- package/mobile/dist/components/Bonus/Bonus.d.ts +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.d.ts +1 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +4 -3
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.d.ts +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +4 -3
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +8 -7
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +3 -2
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +5 -4
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.d.ts +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
- package/mobile/dist/components/Calculator/useBonusCalculatorParams.js +3 -2
- package/mobile/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useCalculatorParams.d.ts +1 -2
- package/mobile/dist/components/Calculator/useCalculatorParams.js +3 -2
- package/mobile/dist/components/Calculator/useCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +2 -2
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.d.ts +1 -1
- package/mobile/dist/components/Catalog/Catalog.js +3 -2
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
- package/mobile/dist/components/Catalog/CatalogCard.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +2 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js +3 -2
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableRow.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableRowContainer.d.ts +1 -4
- package/mobile/dist/components/ContentPage/ContentPage.d.ts +3 -3
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +1 -19
- package/mobile/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Footer/Contacts.d.ts +1 -1
- package/mobile/dist/components/Footer/Footer.d.ts +1 -1
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.d.ts +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigationLink.d.ts +1 -1
- package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/dist/components/Footer/Sitemap.d.ts +1 -1
- package/mobile/dist/components/Footer/Sitemap.js +2 -2
- package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/mobile/dist/components/Footer/TextInformation.d.ts +1 -1
- package/mobile/dist/components/Footer/TextInformationLink.d.ts +1 -1
- package/mobile/dist/components/Gallery/Gallery.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +2 -1
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriod.d.ts +1 -1
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
- package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlock.js +2 -1
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/mobile/dist/components/Header/DropdownMenu.d.ts +1 -1
- package/mobile/dist/components/Header/Header.d.ts +1 -1
- package/mobile/dist/components/Header/Header.js +3 -2
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderBurger.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderBurger.js +2 -1
- package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +3 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +3 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +3 -2
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.d.ts +1 -1
- package/mobile/dist/components/Headline/Headline.d.ts +1 -1
- package/mobile/dist/components/Insurance/Insurance.d.ts +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +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/LikeControl/LikeControl.d.ts +1 -1
- package/mobile/dist/components/LikeControl/LikeControl.js +6 -2
- package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/dist/components/LinkList/LinkList.d.ts +1 -1
- package/mobile/dist/components/MiniGallery/MiniGallery.d.ts +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.d.ts +1 -1
- package/mobile/dist/components/Navigation/Navigation.d.ts +1 -1
- package/mobile/dist/components/Navigation/NavigationItem.d.ts +2 -2
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -1
- package/mobile/dist/components/PictureText/PictureText.d.ts +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.d.ts +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.d.ts +1 -1
- package/mobile/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.d.ts +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.d.ts +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +2 -1
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +3 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +17 -16
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/mobile/dist/components/Tabs/Tabs.d.ts +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +3 -2
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
- package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
- package/mobile/dist/components/TextBlock/TextBlock.d.ts +1 -1
- package/mobile/dist/components/Tile/Tile.d.ts +1 -1
- package/mobile/dist/hooks/useExchangeRates.d.ts +1 -2
- package/mobile/dist/hooks/useExchangeRates.js +3 -2
- package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
- package/mobile/dist/hooks/useGeolocation.d.ts +1 -0
- package/mobile/dist/hooks/useGeolocation.js +21 -0
- package/mobile/dist/hooks/useGeolocation.js.map +1 -0
- package/mobile/dist/hooks/useLikeService.d.ts +5 -0
- package/mobile/dist/hooks/useLikeService.js +29 -0
- package/mobile/dist/hooks/useLikeService.js.map +1 -0
- package/mobile/dist/hooks/useLink.d.ts +1 -0
- package/mobile/dist/hooks/useLink.js +3 -2
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/hooks/useSafeDepositRental.d.ts +1 -2
- package/mobile/dist/hooks/useSafeDepositRental.js +3 -2
- package/mobile/dist/hooks/useSafeDepositRental.js.map +1 -1
- package/mobile/dist/hooks/useSearch.d.ts +4 -0
- package/mobile/dist/hooks/useSearch.js +12 -0
- package/mobile/dist/hooks/useSearch.js.map +1 -0
- package/mobile/dist/index.d.ts +2 -1
- package/mobile/dist/index.js +5 -3
- package/mobile/dist/index.js.map +1 -1
- package/mobile/dist/react/setup-fixture.d.ts +1 -0
- package/mobile/dist/react/setup-fixture.js +1 -48
- package/mobile/dist/react/setup-fixture.js.map +1 -1
- package/mobile/dist/services/sitemap/useSitemap.d.ts +1 -2
- package/mobile/dist/services/sitemap/useSitemap.js +3 -2
- package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.d.ts +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +3 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +6 -6
- package/mobile/dist/ui-kit/Breadcrumb.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/Button.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/LikeButton.d.ts +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.d.ts +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +5 -3
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/Description/Description.d.ts +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -2
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
- package/mobile/dist/ui-kit/Foldable/useActiveHandler.js +3 -2
- package/mobile/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -1
- package/mobile/dist/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
- package/mobile/dist/ui-kit/Heading/Heading.d.ts +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.d.ts +1 -1
- package/mobile/dist/ui-kit/Img/Img.d.ts +1 -1
- package/mobile/dist/ui-kit/Img/ImgAsPicture.d.ts +1 -1
- package/mobile/dist/ui-kit/Img/ImgInner.d.ts +1 -1
- package/mobile/dist/ui-kit/Input/Input.d.ts +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.d.ts +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js +4 -3
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/dist/ui-kit/List/List.d.ts +1 -1
- package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.d.ts +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.d.ts +1 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/mobile/dist/ui-kit/SVG.d.ts +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -2
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +3 -2
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.d.ts +1 -1
- package/mobile/dist/ui-kit/Select/SelectOption.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.d.ts +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/lib/components/Accordion/Accordion.d.ts +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.d.ts +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.js +1 -4
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemInner.d.ts +1 -1
- package/mobile/lib/components/Accordion/useActiveHandler.d.ts +1 -1
- package/mobile/lib/components/Accordion/useActiveHandler.js +3 -2
- package/mobile/lib/components/Accordion/useActiveHandler.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
- package/mobile/lib/components/Blocks.d.ts +16 -16
- package/mobile/lib/components/Bonus/Bonus.d.ts +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.d.ts +1 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +4 -3
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.d.ts +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +4 -3
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +8 -7
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +3 -2
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +5 -4
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.d.ts +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
- package/mobile/lib/components/Calculator/useBonusCalculatorParams.js +3 -2
- package/mobile/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useCalculatorParams.d.ts +1 -2
- package/mobile/lib/components/Calculator/useCalculatorParams.js +2 -1
- package/mobile/lib/components/Calculator/useCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +2 -2
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.d.ts +1 -1
- package/mobile/lib/components/Catalog/Catalog.js +3 -2
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
- package/mobile/lib/components/Catalog/CatalogCard.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +2 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js +3 -2
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableRow.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableRowContainer.d.ts +1 -4
- package/mobile/lib/components/ContentPage/ContentPage.d.ts +3 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +1 -19
- package/mobile/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.d.ts +1 -1
- package/mobile/lib/components/Footer/Footer.d.ts +1 -1
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.d.ts +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigationLink.d.ts +1 -1
- package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/lib/components/Footer/Sitemap.d.ts +1 -1
- package/mobile/lib/components/Footer/Sitemap.js +2 -2
- package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/mobile/lib/components/Footer/TextInformation.d.ts +1 -1
- package/mobile/lib/components/Footer/TextInformationLink.d.ts +1 -1
- package/mobile/lib/components/Gallery/Gallery.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +2 -1
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriod.d.ts +1 -1
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
- package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlock.js +2 -1
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
- package/mobile/lib/components/Header/DropdownMenu.d.ts +1 -1
- package/mobile/lib/components/Header/Header.d.ts +1 -1
- package/mobile/lib/components/Header/Header.js +3 -2
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderBurger.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderBurger.js +2 -1
- package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +3 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +3 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +3 -2
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.d.ts +1 -1
- package/mobile/lib/components/Headline/Headline.d.ts +1 -1
- package/mobile/lib/components/Insurance/Insurance.d.ts +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +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/LikeControl/LikeControl.d.ts +1 -1
- package/mobile/lib/components/LikeControl/LikeControl.js +6 -2
- package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/lib/components/LinkList/LinkList.d.ts +1 -1
- package/mobile/lib/components/MiniGallery/MiniGallery.d.ts +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.d.ts +1 -1
- package/mobile/lib/components/Navigation/Navigation.d.ts +1 -1
- package/mobile/lib/components/Navigation/NavigationItem.d.ts +2 -2
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -1
- package/mobile/lib/components/PictureText/PictureText.d.ts +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.d.ts +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.d.ts +1 -1
- package/mobile/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.d.ts +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.d.ts +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +2 -1
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +3 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +17 -15
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/mobile/lib/components/Tabs/Tabs.d.ts +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +3 -2
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
- package/mobile/lib/components/TextBlock/TextBlock.d.ts +1 -1
- package/mobile/lib/components/Tile/Tile.d.ts +1 -1
- package/mobile/lib/hooks/useExchangeRates.d.ts +1 -2
- package/mobile/lib/hooks/useExchangeRates.js +2 -1
- package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
- package/mobile/lib/hooks/useGeolocation.d.ts +1 -0
- package/mobile/lib/hooks/useGeolocation.js +18 -0
- package/mobile/lib/hooks/useGeolocation.js.map +1 -0
- package/mobile/lib/hooks/useLikeService.d.ts +5 -0
- package/mobile/lib/hooks/useLikeService.js +26 -0
- package/mobile/lib/hooks/useLikeService.js.map +1 -0
- package/mobile/lib/hooks/useLink.d.ts +1 -0
- package/mobile/lib/hooks/useLink.js +1 -1
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/hooks/useSafeDepositRental.d.ts +1 -2
- package/mobile/lib/hooks/useSafeDepositRental.js +2 -1
- package/mobile/lib/hooks/useSafeDepositRental.js.map +1 -1
- package/mobile/lib/hooks/useSearch.d.ts +4 -0
- package/mobile/lib/hooks/useSearch.js +9 -0
- package/mobile/lib/hooks/useSearch.js.map +1 -0
- package/mobile/lib/index.d.ts +2 -1
- package/mobile/lib/index.js +2 -1
- package/mobile/lib/index.js.map +1 -1
- package/mobile/lib/react/setup-fixture.d.ts +1 -0
- package/mobile/lib/react/setup-fixture.js +2 -46
- package/mobile/lib/react/setup-fixture.js.map +1 -1
- package/mobile/lib/services/sitemap/useSitemap.d.ts +1 -2
- package/mobile/lib/services/sitemap/useSitemap.js +2 -1
- package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.d.ts +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +3 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +6 -6
- package/mobile/lib/ui-kit/Breadcrumb.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/Button.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/LikeButton.d.ts +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.d.ts +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +5 -3
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/Description/Description.d.ts +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -2
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
- package/mobile/lib/ui-kit/Foldable/useActiveHandler.js +3 -2
- package/mobile/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -1
- package/mobile/lib/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
- package/mobile/lib/ui-kit/Heading/Heading.d.ts +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.d.ts +1 -1
- package/mobile/lib/ui-kit/Img/Img.d.ts +1 -1
- package/mobile/lib/ui-kit/Img/ImgAsPicture.d.ts +1 -1
- package/mobile/lib/ui-kit/Img/ImgInner.d.ts +1 -1
- package/mobile/lib/ui-kit/Input/Input.d.ts +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.d.ts +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js +4 -3
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/lib/ui-kit/List/List.d.ts +1 -1
- package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.d.ts +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.d.ts +1 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/mobile/lib/ui-kit/SVG.d.ts +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -2
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +3 -2
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.d.ts +1 -1
- package/mobile/lib/ui-kit/Select/SelectOption.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.d.ts +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/src/common.css +25 -7
- package/mobile/src/components/Accordion/AccordionItem.tsx +1 -4
- package/mobile/src/components/Accordion/useActiveHandler.ts +3 -2
- package/mobile/src/components/Blocks.spec.tsx +9 -15
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +4 -3
- package/mobile/src/components/Calculator/Calculator.tsx +5 -4
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +8 -7
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +3 -2
- package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +5 -4
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +1 -1
- package/mobile/src/components/Calculator/useBonusCalculatorParams.ts +2 -6
- package/mobile/src/components/Calculator/useCalculatorParams.ts +2 -2
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -6
- package/mobile/src/components/Catalog/Catalog.tsx +3 -2
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +3 -2
- package/mobile/src/components/ComparisonTable/ComparisonTableBody.tsx +5 -4
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -5
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +1 -26
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -1
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +1 -1
- package/mobile/src/components/Footer/Sitemap.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryInner.tsx +3 -2
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +2 -1
- package/mobile/src/components/Header/Header.tsx +6 -5
- package/mobile/src/components/Header/HeaderBurger.tsx +2 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +6 -4
- package/mobile/src/components/Header/HeaderSubMenu.tsx +3 -2
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +2 -1
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +4 -3
- package/mobile/src/components/LikeControl/LikeControl.tsx +11 -3
- package/mobile/src/components/Recommendation/Recommendation.tsx +2 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +3 -2
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +32 -32
- package/mobile/src/components/Tabs/Tabs.tsx +3 -2
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +11 -9
- package/mobile/src/hooks/useExchangeRates.ts +2 -2
- package/mobile/src/hooks/useGeolocation.ts +22 -0
- package/mobile/src/hooks/useLikeService.ts +32 -0
- package/mobile/src/hooks/useLink.ts +1 -1
- package/mobile/src/hooks/useSafeDepositRental.ts +2 -2
- package/mobile/src/hooks/useSearch.ts +10 -0
- package/mobile/src/index.ts +2 -1
- package/mobile/src/react/setup-fixture.ts +2 -55
- package/mobile/src/services/sitemap/useSitemap.ts +2 -2
- package/mobile/src/ui-kit/BlockWrapper.tsx +3 -2
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +0 -2
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +28 -26
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +0 -2
- package/mobile/src/ui-kit/Foldable/useActiveHandler.ts +3 -4
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +21 -7
- package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +2 -2
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +57 -58
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +3 -3
- package/package.json +2 -2
- package/src/common.css +25 -7
- package/src/components/Accordion/AccordionItem.mobile.tsx +1 -4
- package/src/components/Accordion/AccordionItem.tsx +0 -1
- package/src/components/Accordion/useActiveHandler.ts +3 -2
- package/src/components/Blocks.spec.tsx +9 -15
- package/src/components/Calculator/BonusCalculatorForm.tsx +4 -3
- package/src/components/Calculator/Calculator.tsx +5 -4
- package/src/components/Calculator/CreditCalculatorForm.tsx +8 -7
- package/src/components/Calculator/DepositCalculatorForm.tsx +3 -2
- package/src/components/Calculator/MortgageCalculatorForm.tsx +5 -4
- package/src/components/Calculator/renderCalculatorBlock.tsx +1 -1
- package/src/components/Calculator/useBonusCalculatorParams.ts +2 -6
- package/src/components/Calculator/useCalculatorParams.ts +2 -2
- package/src/components/Calculator/useCreditCalculatorParams.ts +1 -6
- package/src/components/Catalog/Catalog.tsx +3 -2
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +3 -2
- package/src/components/ComparisonTable/ComparisonTable.tsx +2 -1
- package/src/components/ComparisonTable/ComparisonTableBody.tsx +5 -4
- package/src/components/ContentPage/ContentPage.tsx +3 -5
- package/src/components/ContentPage/ContentPageContext.tsx +1 -26
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +1 -1
- package/src/components/Footer/Sitemap.tsx +2 -2
- package/src/components/Gallery/GalleryInner.tsx +3 -2
- package/src/components/GroupBlock/GroupBlock.tsx +2 -1
- package/src/components/Header/Header.mobile.tsx +6 -5
- package/src/components/Header/Header.tsx +1 -2
- package/src/components/Header/HeaderBurger.tsx +2 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +6 -4
- package/src/components/Header/HeaderSubMenu.tsx +3 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +2 -1
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +4 -3
- package/src/components/LikeControl/LikeControl.tsx +11 -3
- package/src/components/ProductGallery/ProductGallery.tsx +3 -2
- package/src/components/Recommendation/Recommendation.tsx +2 -1
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +3 -2
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +32 -32
- package/src/components/Tabs/Tabs.tsx +3 -2
- package/src/components/TariffsTable/TariffsTable.tsx +3 -2
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +11 -9
- package/src/hooks/useExchangeRates.ts +2 -2
- package/src/hooks/useGeolocation.ts +22 -0
- package/src/hooks/useLikeService.ts +32 -0
- package/src/hooks/useLink.ts +1 -1
- package/src/hooks/useSafeDepositRental.ts +2 -2
- package/src/hooks/useSearch.ts +10 -0
- package/src/index.ts +2 -1
- package/src/react/setup-fixture.ts +2 -55
- package/src/services/sitemap/useSitemap.ts +2 -2
- package/src/ui-kit/BlockWrapper.tsx +3 -2
- package/src/ui-kit/BlocksList/BlocksListProps.ts +0 -2
- package/src/ui-kit/Checkbox/Checkbox.tsx +28 -26
- package/src/ui-kit/Foldable/Foldable.tsx +0 -2
- package/src/ui-kit/Foldable/useActiveHandler.ts +3 -4
- package/src/ui-kit/InputRange/InputRange.tsx +21 -7
- package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +2 -2
- package/src/ui-kit/SearchBar/SearchBar.tsx +2 -2
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +57 -58
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +3 -3
|
@@ -1,1804 +1,1909 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.UniMobileBlocks = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
7
|
+
let _hooks;
|
|
8
|
+
const setupHooks = (_) => {
|
|
9
|
+
_hooks = _;
|
|
10
|
+
};
|
|
11
|
+
const lazyHook = (name) => (...args) => _hooks[name](...args);
|
|
12
|
+
const useState = lazyHook('useState');
|
|
13
|
+
const useEffect = lazyHook('useEffect');
|
|
14
|
+
const useCallback = lazyHook('useCallback');
|
|
15
|
+
const useMemo = lazyHook('useMemo');
|
|
16
|
+
|
|
17
|
+
const setup = (_jsx, _jsxs) => {
|
|
18
|
+
globalThis._uni = {
|
|
19
|
+
_jsx,
|
|
20
|
+
_jsxs: _jsxs || _jsx
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
|
|
25
|
+
|
|
26
|
+
function DaDataAPI(baseURL = '') {
|
|
27
|
+
async function getFetcherAddress() {
|
|
28
|
+
if (!('geolocation' in navigator)) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
const coords = await getGeolocation();
|
|
33
|
+
const response = await fetch(`${baseURL}/geolocate`, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
mode: 'cors',
|
|
36
|
+
body: JSON.stringify({
|
|
37
|
+
lat: coords.latitude,
|
|
38
|
+
lon: coords.longitude,
|
|
39
|
+
count: 1,
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
const data = (await response.json());
|
|
43
|
+
return data?.suggestions?.[0]?.data?.city;
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
console.error(e);
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
getFetcherAddress,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const AUTH_PREFIX = 'guest';
|
|
56
|
+
const STORAGE_KEY = 'likesToken';
|
|
57
|
+
// eslint-disable-next-line max-lines-per-function
|
|
58
|
+
function LikeAPI(projectId, baseURL = '') {
|
|
59
|
+
async function getLikeCount(...nodeIds) {
|
|
60
|
+
if (!nodeIds.length) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const { token: Authorization } = await auth();
|
|
64
|
+
try {
|
|
65
|
+
const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/likes`, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
mode: 'cors',
|
|
68
|
+
headers: { 'Content-Type': 'application/json', Authorization },
|
|
69
|
+
body: JSON.stringify({
|
|
70
|
+
node_ids: nodeIds,
|
|
71
|
+
}),
|
|
72
|
+
});
|
|
73
|
+
const { likes } = await response.json();
|
|
74
|
+
return likes || [];
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
console.error(e);
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function like(nodeId) {
|
|
82
|
+
if (!nodeId) {
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
const { token: Authorization, name } = await auth();
|
|
86
|
+
try {
|
|
87
|
+
const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/like`, {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
mode: 'cors',
|
|
90
|
+
headers: {
|
|
91
|
+
'Content-Type': 'application/json',
|
|
92
|
+
Authorization,
|
|
93
|
+
UserID: name,
|
|
94
|
+
},
|
|
95
|
+
body: JSON.stringify({
|
|
96
|
+
node_id: nodeId,
|
|
97
|
+
user_name: name,
|
|
98
|
+
}),
|
|
99
|
+
});
|
|
100
|
+
const { likes } = await response.json();
|
|
101
|
+
return likes || 0;
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
console.error(e);
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async function dislike(nodeId) {
|
|
109
|
+
if (!nodeId) {
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
const { token: Authorization, name } = await auth();
|
|
113
|
+
try {
|
|
114
|
+
const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/unlike`, {
|
|
115
|
+
method: 'POST',
|
|
116
|
+
mode: 'cors',
|
|
117
|
+
headers: {
|
|
118
|
+
'Content-Type': 'application/json',
|
|
119
|
+
Authorization,
|
|
120
|
+
UserID: name,
|
|
121
|
+
},
|
|
122
|
+
body: JSON.stringify({
|
|
123
|
+
node_id: nodeId,
|
|
124
|
+
user_name: name,
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
const { likes } = await response.json();
|
|
128
|
+
return likes || 0;
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
console.error(e);
|
|
132
|
+
return 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async function auth() {
|
|
136
|
+
try {
|
|
137
|
+
const userData = JSON.parse(globalThis.localStorage.getItem(STORAGE_KEY) || '');
|
|
138
|
+
if (userData?.token) {
|
|
139
|
+
return userData;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch (e) {
|
|
143
|
+
// do nothing
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const response = await fetch(`${baseURL}/assist/v1/public/auth`, {
|
|
147
|
+
method: 'POST',
|
|
148
|
+
mode: 'cors',
|
|
149
|
+
headers: {
|
|
150
|
+
'Content-Type': 'application/json',
|
|
151
|
+
},
|
|
152
|
+
body: JSON.stringify({
|
|
153
|
+
prefix: AUTH_PREFIX,
|
|
154
|
+
}),
|
|
155
|
+
});
|
|
156
|
+
const { token, name } = await response.json();
|
|
157
|
+
globalThis.localStorage.setItem(STORAGE_KEY, JSON.stringify({ token, name }));
|
|
158
|
+
return { token, name };
|
|
159
|
+
}
|
|
160
|
+
catch (e) {
|
|
161
|
+
console.error(e);
|
|
162
|
+
return {};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
getLikeCount,
|
|
167
|
+
like,
|
|
168
|
+
dislike,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const jsx = (...args) => globalThis._uni._jsx(...args);
|
|
173
|
+
const jsxs = (...args) => globalThis._uni._jsxs(...args);
|
|
174
|
+
|
|
175
|
+
const JSX = (Component) => {
|
|
176
|
+
const Internal = Component;
|
|
177
|
+
if (!Internal._tmpl) {
|
|
178
|
+
Internal._tmpl = globalThis.__UNI_REACT__ ? Component : VueTmpl(Component);
|
|
179
|
+
}
|
|
180
|
+
return Internal._tmpl;
|
|
181
|
+
};
|
|
182
|
+
const VueTmpl = (Component) => {
|
|
183
|
+
function JSXTmpl(rawProps, context) {
|
|
184
|
+
const { children: rawChildren, ...props } = rawProps || {};
|
|
185
|
+
const defaultSlot = context?.slots?.default; // Vue
|
|
186
|
+
const children = rawChildren || (defaultSlot && defaultSlot());
|
|
187
|
+
return Component(Object.assign(props, children && { children }), context);
|
|
188
|
+
}
|
|
189
|
+
JSXTmpl.inheritAttrs = false;
|
|
190
|
+
return JSXTmpl;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const HeadingClass = {
|
|
194
|
+
h0: 'text-m-title',
|
|
195
|
+
h1: 'text-m-title',
|
|
196
|
+
h2: 'text-m-title',
|
|
197
|
+
h3: 'text-h6',
|
|
198
|
+
h4: 'text-m-title-xs',
|
|
199
|
+
h5: 'text-m-title-xs',
|
|
200
|
+
h6: 'text-m-title-xs',
|
|
201
|
+
};
|
|
202
|
+
const Heading = JSX((props) => {
|
|
203
|
+
const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
|
|
204
|
+
return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// Generated. Do not touch
|
|
208
|
+
/* eslint-disable max-len, max-lines */
|
|
209
|
+
var IconMap;
|
|
210
|
+
(function (IconMap) {
|
|
211
|
+
IconMap["ActualBalanceIcon"] = "ActualBalanceIcon";
|
|
212
|
+
IconMap["AirPlane"] = "AirPlane";
|
|
213
|
+
IconMap["AppleIcon"] = "AppleIcon";
|
|
214
|
+
IconMap["ArrowDownIcon"] = "ArrowDownIcon";
|
|
215
|
+
IconMap["ArrowLeftIcon"] = "ArrowLeftIcon";
|
|
216
|
+
IconMap["ArrowUpIcon"] = "ArrowUpIcon";
|
|
217
|
+
IconMap["AtmIcon"] = "AtmIcon";
|
|
218
|
+
IconMap["BankIcon"] = "BankIcon";
|
|
219
|
+
IconMap["BurgerIcon"] = "BurgerIcon";
|
|
220
|
+
IconMap["Calendar2Icon"] = "Calendar2Icon";
|
|
221
|
+
IconMap["CalendarCircleIcon"] = "CalendarCircleIcon";
|
|
222
|
+
IconMap["CalendarIcon"] = "CalendarIcon";
|
|
223
|
+
IconMap["CalendarTickIcon"] = "CalendarTickIcon";
|
|
224
|
+
IconMap["CardIcon"] = "CardIcon";
|
|
225
|
+
IconMap["CardPosIcon"] = "CardPosIcon";
|
|
226
|
+
IconMap["CardTickIcon"] = "CardTickIcon";
|
|
227
|
+
IconMap["CardWithGemIcon"] = "CardWithGemIcon";
|
|
228
|
+
IconMap["CarIcon"] = "CarIcon";
|
|
229
|
+
IconMap["ChartSquareIcon"] = "ChartSquareIcon";
|
|
230
|
+
IconMap["CinemaIcon"] = "CinemaIcon";
|
|
231
|
+
IconMap["ClockIcon"] = "ClockIcon";
|
|
232
|
+
IconMap["CloseIcon"] = "CloseIcon";
|
|
233
|
+
IconMap["ComfortableCompIcon"] = "ComfortableCompIcon";
|
|
234
|
+
IconMap["CreditCardsIcon"] = "CreditCardsIcon";
|
|
235
|
+
IconMap["DiscountShapeIcon"] = "DiscountShapeIcon";
|
|
236
|
+
IconMap["DocIcon"] = "DocIcon";
|
|
237
|
+
IconMap["DocIconMonoColor"] = "DocIconMonoColor";
|
|
238
|
+
IconMap["DocsIcon"] = "DocsIcon";
|
|
239
|
+
IconMap["DocumentTextIcon"] = "DocumentTextIcon";
|
|
240
|
+
IconMap["DollarIcon"] = "DollarIcon";
|
|
241
|
+
IconMap["DoneIcon"] = "DoneIcon";
|
|
242
|
+
IconMap["EarthIcon"] = "EarthIcon";
|
|
243
|
+
IconMap["EmptyWalletChangeIcon"] = "EmptyWalletChangeIcon";
|
|
244
|
+
IconMap["EmptyWalletIcon"] = "EmptyWalletIcon";
|
|
245
|
+
IconMap["EuroIcon"] = "EuroIcon";
|
|
246
|
+
IconMap["GeolocationIcon"] = "GeolocationIcon";
|
|
247
|
+
IconMap["GlassIcon"] = "GlassIcon";
|
|
248
|
+
IconMap["GlobalIcon"] = "GlobalIcon";
|
|
249
|
+
IconMap["GpsIcon"] = "GpsIcon";
|
|
250
|
+
IconMap["GridIcon"] = "GridIcon";
|
|
251
|
+
IconMap["InterestGrowthIcon"] = "InterestGrowthIcon";
|
|
252
|
+
IconMap["InterestIcon"] = "InterestIcon";
|
|
253
|
+
IconMap["JCBIcon"] = "JCBIcon";
|
|
254
|
+
IconMap["Logo"] = "Logo";
|
|
255
|
+
IconMap["LoupeIcon"] = "LoupeIcon";
|
|
256
|
+
IconMap["MasterCardIcon"] = "MasterCardIcon";
|
|
257
|
+
IconMap["MinusIcon"] = "MinusIcon";
|
|
258
|
+
IconMap["MirIcon"] = "MirIcon";
|
|
259
|
+
IconMap["MoneyIcon"] = "MoneyIcon";
|
|
260
|
+
IconMap["MoneyInsuranceIcon"] = "MoneyInsuranceIcon";
|
|
261
|
+
IconMap["MonitorMobileIcon"] = "MonitorMobileIcon";
|
|
262
|
+
IconMap["NewDocIcon"] = "NewDocIcon";
|
|
263
|
+
IconMap["OfficeIcon"] = "OfficeIcon";
|
|
264
|
+
IconMap["OkIcon"] = "OkIcon";
|
|
265
|
+
IconMap["PackA4"] = "PackA4";
|
|
266
|
+
IconMap["PassSendIcon"] = "PassSendIcon";
|
|
267
|
+
IconMap["PercentageRoundIcon"] = "PercentageRoundIcon";
|
|
268
|
+
IconMap["PercentageSquareIcon"] = "PercentageSquareIcon";
|
|
269
|
+
IconMap["PersonalCardIcon"] = "PersonalCardIcon";
|
|
270
|
+
IconMap["PlayMarketIcon"] = "PlayMarketIcon";
|
|
271
|
+
IconMap["PlusIcon"] = "PlusIcon";
|
|
272
|
+
IconMap["PowerIcon"] = "PowerIcon";
|
|
273
|
+
IconMap["Profile2UserIcon"] = "Profile2UserIcon";
|
|
274
|
+
IconMap["ProfileIcon"] = "ProfileIcon";
|
|
275
|
+
IconMap["PumpkinIcon"] = "PumpkinIcon";
|
|
276
|
+
IconMap["RoundRubleIcon"] = "RoundRubleIcon";
|
|
277
|
+
IconMap["SafeIcon"] = "SafeIcon";
|
|
278
|
+
IconMap["ShieldTickIcon"] = "ShieldTickIcon";
|
|
279
|
+
IconMap["SignDocsIcon"] = "SignDocsIcon";
|
|
280
|
+
IconMap["SmallClockIcon"] = "SmallClockIcon";
|
|
281
|
+
IconMap["SoundIcon"] = "SoundIcon";
|
|
282
|
+
IconMap["StateMortgageIcon"] = "StateMortgageIcon";
|
|
283
|
+
IconMap["TelegramIcon"] = "TelegramIcon";
|
|
284
|
+
IconMap["UnionPayIcon"] = "UnionPayIcon";
|
|
285
|
+
IconMap["UserTickIcon"] = "UserTickIcon";
|
|
286
|
+
IconMap["VisaIcon"] = "VisaIcon";
|
|
287
|
+
IconMap["VKIcon"] = "VKIcon";
|
|
288
|
+
IconMap["WalletAdd2Icon"] = "WalletAdd2Icon";
|
|
289
|
+
IconMap["WalletAddIcon"] = "WalletAddIcon";
|
|
290
|
+
IconMap["WalletIcon"] = "WalletIcon";
|
|
291
|
+
IconMap["WalletWithMoneyIcon"] = "WalletWithMoneyIcon";
|
|
292
|
+
IconMap["WateringCan"] = "WateringCan";
|
|
293
|
+
})(IconMap || (IconMap = {}));
|
|
294
|
+
var IconTitleMap;
|
|
295
|
+
(function (IconTitleMap) {
|
|
296
|
+
IconTitleMap["ActualBalanceIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
|
|
297
|
+
IconTitleMap["AirPlane"] = "\u0421\u0430\u043C\u043E\u043B\u0435\u0442";
|
|
298
|
+
IconTitleMap["AppleIcon"] = "\u041B\u043E\u0433\u043E \u00ABApple\u00BB";
|
|
299
|
+
IconTitleMap["ArrowDownIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043D\u0438\u0437'";
|
|
300
|
+
IconTitleMap["ArrowLeftIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430";
|
|
301
|
+
IconTitleMap["ArrowUpIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u0432\u0435\u0440\u0445";
|
|
302
|
+
IconTitleMap["AtmIcon"] = "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442";
|
|
303
|
+
IconTitleMap["BankIcon"] = "\u0411\u0430\u043D\u043A";
|
|
304
|
+
IconTitleMap["BurgerIcon"] = "\u0411\u0443\u0440\u0433\u0435\u0440";
|
|
305
|
+
IconTitleMap["Calendar2Icon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C 2";
|
|
306
|
+
IconTitleMap["CalendarCircleIcon"] = "\u0421\u043A\u0440\u0443\u0433\u043B\u0451\u043D\u043D\u044B\u0439 \u043A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
|
|
307
|
+
IconTitleMap["CalendarIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
|
|
308
|
+
IconTitleMap["CalendarTickIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
|
|
309
|
+
IconTitleMap["CardIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430";
|
|
310
|
+
IconTitleMap["CardPosIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u043F\u043E\u0434 \u043D\u0430\u043A\u043B\u043E\u043D\u043E\u043C";
|
|
311
|
+
IconTitleMap["CardTickIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
|
|
312
|
+
IconTitleMap["CardWithGemIcon"] = "\u041A\u0430\u0440\u0442\u0430 \u0441 \u0434\u0440\u0430\u0433\u043E\u0446\u0435\u043D\u043D\u043E\u0441\u0442\u044F\u043C\u0438";
|
|
313
|
+
IconTitleMap["CarIcon"] = "\u041C\u0430\u0448\u0438\u043D\u0430";
|
|
314
|
+
IconTitleMap["ChartSquareIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438 \u0432\u043D\u0443\u0442\u0440\u0438 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430";
|
|
315
|
+
IconTitleMap["CinemaIcon"] = "\u041A\u0438\u043D\u043E";
|
|
316
|
+
IconTitleMap["ClockIcon"] = "\u0427\u0430\u0441\u044B";
|
|
317
|
+
IconTitleMap["CloseIcon"] = "\u041A\u0440\u0435\u0441\u0442\u0438\u043A";
|
|
318
|
+
IconTitleMap["ComfortableCompIcon"] = "\u041A\u0440\u0435\u0441\u043B\u043E";
|
|
319
|
+
IconTitleMap["CreditCardsIcon"] = "\u041A\u0440\u0435\u0434\u0438\u0442\u043D\u044B\u0435 \u043A\u0430\u0440\u0442\u044B";
|
|
320
|
+
IconTitleMap["DiscountShapeIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
|
|
321
|
+
IconTitleMap["DocIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
|
|
322
|
+
IconTitleMap["DocIconMonoColor"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 (\u043E\u0434\u043D\u043E\u0446\u0432\u0435\u0442\u043D\u044B\u0439)";
|
|
323
|
+
IconTitleMap["DocsIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
|
|
324
|
+
IconTitleMap["DocumentTextIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C";
|
|
325
|
+
IconTitleMap["DollarIcon"] = "\u0414\u043E\u043B\u043B\u0430\u0440";
|
|
326
|
+
IconTitleMap["DoneIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430'";
|
|
327
|
+
IconTitleMap["EarthIcon"] = "\u0417\u0435\u043C\u043B\u044F";
|
|
328
|
+
IconTitleMap["EmptyWalletChangeIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u043E\u043C";
|
|
329
|
+
IconTitleMap["EmptyWalletIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A";
|
|
330
|
+
IconTitleMap["EuroIcon"] = "\u0415\u0432\u0440\u043E";
|
|
331
|
+
IconTitleMap["GeolocationIcon"] = "\u0413\u0435\u043E\u043B\u043E\u043A\u0430\u0446\u0438\u044F";
|
|
332
|
+
IconTitleMap["GlassIcon"] = "\u0417\u0435\u0440\u043A\u0430\u043B\u043E";
|
|
333
|
+
IconTitleMap["GlobalIcon"] = "\u0413\u043B\u043E\u0431\u0443\u0441";
|
|
334
|
+
IconTitleMap["GpsIcon"] = "Gps";
|
|
335
|
+
IconTitleMap["GridIcon"] = "\u0421\u0435\u0442\u043A\u0430 (\u0431\u0435\u043B\u0430\u044F)";
|
|
336
|
+
IconTitleMap["InterestGrowthIcon"] = "\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430 \u0440\u043E\u0441\u0442\u0430";
|
|
337
|
+
IconTitleMap["InterestIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
|
|
338
|
+
IconTitleMap["JCBIcon"] = "JCB";
|
|
339
|
+
IconTitleMap["Logo"] = "Logo";
|
|
340
|
+
IconTitleMap["LoupeIcon"] = "\u041B\u0443\u043F\u0430";
|
|
341
|
+
IconTitleMap["MasterCardIcon"] = "MasterCard";
|
|
342
|
+
IconTitleMap["MinusIcon"] = "\u041C\u0438\u043D\u0443\u0441";
|
|
343
|
+
IconTitleMap["MirIcon"] = "\u041C\u0418\u0420";
|
|
344
|
+
IconTitleMap["MoneyIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
|
|
345
|
+
IconTitleMap["MoneyInsuranceIcon"] = "\u0414\u0435\u043D\u0435\u0436\u043D\u043E\u0435 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435";
|
|
346
|
+
IconTitleMap["MonitorMobileIcon"] = "\u041C\u043E\u043D\u0438\u0442\u043E\u0440 \u0438 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439";
|
|
347
|
+
IconTitleMap["NewDocIcon"] = "\u041D\u043E\u0432\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
|
|
348
|
+
IconTitleMap["OfficeIcon"] = "\u041E\u0444\u0438\u0441";
|
|
349
|
+
IconTitleMap["OkIcon"] = "\u041B\u043E\u0433\u043E \u00AB\u041E\u0434\u043D\u043E\u043A\u043B\u0430\u0441\u0441\u043D\u0438\u043A\u0438\u00BB";
|
|
350
|
+
IconTitleMap["PackA4"] = "PackA4";
|
|
351
|
+
IconTitleMap["PassSendIcon"] = "\u0411\u0438\u0437\u043D\u0435\u0441";
|
|
352
|
+
IconTitleMap["PercentageRoundIcon"] = "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u044B (\u043A\u0440\u0443\u0433.)";
|
|
353
|
+
IconTitleMap["PercentageSquareIcon"] = "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u044B";
|
|
354
|
+
IconTitleMap["PersonalCardIcon"] = "\u041F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u0440\u0442\u0430";
|
|
355
|
+
IconTitleMap["PlayMarketIcon"] = "\u041B\u043E\u0433\u043E \u00ABPlayMarket\u00BB";
|
|
356
|
+
IconTitleMap["PlusIcon"] = "\u041F\u043B\u044E\u0441";
|
|
357
|
+
IconTitleMap["PowerIcon"] = "\u0429\u0438\u0442";
|
|
358
|
+
IconTitleMap["Profile2UserIcon"] = "\u041F\u0440\u043E\u0444\u0438\u043B\u044C, 2 \u043F\u0435\u0440\u0441\u043E\u043D\u044B";
|
|
359
|
+
IconTitleMap["ProfileIcon"] = "\u041F\u0440\u043E\u0444\u0438\u043B\u044C";
|
|
360
|
+
IconTitleMap["PumpkinIcon"] = "\u0422\u044B\u043A\u0432\u0430";
|
|
361
|
+
IconTitleMap["RoundRubleIcon"] = "\u0420\u0443\u0431\u043B\u044C (\u043A\u0440\u0443\u0433.)";
|
|
362
|
+
IconTitleMap["SafeIcon"] = "\u0421\u0435\u0439\u0444";
|
|
363
|
+
IconTitleMap["ShieldTickIcon"] = "\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C";
|
|
364
|
+
IconTitleMap["SignDocsIcon"] = "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
|
|
365
|
+
IconTitleMap["SmallClockIcon"] = "\u041C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0435 \u0447\u0430\u0441\u044B";
|
|
366
|
+
IconTitleMap["SoundIcon"] = "\u0417\u0432\u0443\u043A";
|
|
367
|
+
IconTitleMap["StateMortgageIcon"] = "StateMortgageIcon";
|
|
368
|
+
IconTitleMap["TelegramIcon"] = "\u041B\u043E\u0433\u043E \u00ABTelegram\u00BB";
|
|
369
|
+
IconTitleMap["UnionPayIcon"] = "UnionPay";
|
|
370
|
+
IconTitleMap["UserTickIcon"] = "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C";
|
|
371
|
+
IconTitleMap["VisaIcon"] = "Visa";
|
|
372
|
+
IconTitleMap["VKIcon"] = "\u041B\u043E\u0433\u043E \u00ABVK\u00BB";
|
|
373
|
+
IconTitleMap["WalletAdd2Icon"] = "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u0430\u0440\u0442\u044B";
|
|
374
|
+
IconTitleMap["WalletAddIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u043F\u043B\u044E\u0441\u043E\u043C";
|
|
375
|
+
IconTitleMap["WalletIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A";
|
|
376
|
+
IconTitleMap["WalletWithMoneyIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0434\u0435\u043D\u044C\u0433\u0430\u043C\u0438";
|
|
377
|
+
IconTitleMap["WateringCan"] = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0434\u0443\u043A\u0442";
|
|
378
|
+
})(IconTitleMap || (IconTitleMap = {}));
|
|
379
|
+
|
|
380
|
+
const projectSettings = new (class {
|
|
381
|
+
_ = {
|
|
382
|
+
PROD_BRANCH: 'master',
|
|
383
|
+
FORCED_DRAFT_FLOW: false,
|
|
384
|
+
};
|
|
385
|
+
setup(_) {
|
|
386
|
+
this._ = _;
|
|
387
|
+
}
|
|
388
|
+
get TEST_BRANCH() {
|
|
389
|
+
return this._.TEST_BRANCH;
|
|
390
|
+
}
|
|
391
|
+
get RC_BRANCH() {
|
|
392
|
+
return this._.RC_BRANCH;
|
|
393
|
+
}
|
|
394
|
+
get PROD_BRANCH() {
|
|
395
|
+
return this._.PROD_BRANCH;
|
|
396
|
+
}
|
|
397
|
+
get FORCED_DRAFT_FLOW() {
|
|
398
|
+
return this._.FORCED_DRAFT_FLOW;
|
|
399
|
+
}
|
|
400
|
+
get ENABLE_ASSIST() {
|
|
401
|
+
return this._.ENABLE_ASSIST;
|
|
402
|
+
}
|
|
403
|
+
get SITEMAP() {
|
|
404
|
+
return this._.SITEMAP;
|
|
405
|
+
}
|
|
406
|
+
get CDN() {
|
|
407
|
+
return this._.CDN;
|
|
408
|
+
}
|
|
409
|
+
})();
|
|
410
|
+
|
|
411
|
+
const svgUseStyleMap = {
|
|
412
|
+
normal: 'text-primary-main',
|
|
413
|
+
black: 'text-black',
|
|
414
|
+
white: 'text-black invert',
|
|
415
|
+
};
|
|
416
|
+
const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${IconTitleMap[name] || name}`, title = alt, iconVersion = 'normal', asSVG, ...imgProps }) => {
|
|
417
|
+
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
418
|
+
if (asSVG) {
|
|
419
|
+
return (jsxs("svg", { className: className, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { className: `${svgUseStyleMap[iconVersion]} ${imageClassName}`, href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
|
|
420
|
+
}
|
|
421
|
+
return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
function getIconVersion(image) {
|
|
425
|
+
return typeof image === 'string' ? 'normal' : image.iconVersion || 'normal';
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
const sourcesComparator = (a, b) => {
|
|
429
|
+
if (a.media && b.media) {
|
|
430
|
+
return a.media - b.media;
|
|
431
|
+
}
|
|
432
|
+
return 0;
|
|
433
|
+
};
|
|
434
|
+
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false }) => {
|
|
435
|
+
if (!image || (!image?.sources && !image?.src)) {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
439
|
+
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
440
|
+
? image.sources
|
|
441
|
+
.sort(sourcesComparator)
|
|
442
|
+
.map(({ src, format, media, size }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...size }, `${index}_${src}`)))
|
|
443
|
+
: null, renderImg(image, imageClassName, isMobile)] }));
|
|
444
|
+
});
|
|
445
|
+
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
446
|
+
const title = image.title || '';
|
|
447
|
+
const alt = image.alt || image.title;
|
|
448
|
+
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
449
|
+
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, ...image.size }));
|
|
450
|
+
};
|
|
451
|
+
function formatToMimeType(format) {
|
|
452
|
+
return format ? `image/${String(format)}` : undefined;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, ...iconProps }) => {
|
|
456
|
+
if (!image) {
|
|
457
|
+
return null;
|
|
458
|
+
}
|
|
459
|
+
// backwards compatibility with existing icons in usage
|
|
460
|
+
const icon = typeof image === 'string' ? image : image.icon;
|
|
461
|
+
if (icon || icon === '') {
|
|
462
|
+
return icon.length ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: getIconVersion(image), name: icon, ...iconProps })) : null;
|
|
463
|
+
}
|
|
464
|
+
return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
const Img = JSX(({ className = '', image, imageClassName, ...iconProps }) => {
|
|
468
|
+
return (jsx(ImgInner, { className: className, image: image, imageClassName: imageClassName, ...iconProps, isMobile: true }));
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
function style2className(style) {
|
|
472
|
+
return style ? style.filter(Boolean).join(' ') : '';
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
const ALIGN_TEXT = {
|
|
476
|
+
left: 'text-left',
|
|
477
|
+
center: 'text-center',
|
|
478
|
+
right: 'text-right',
|
|
479
|
+
};
|
|
480
|
+
const HEADLINE_BLOCK_STYLE_MAPS = {
|
|
481
|
+
transparent: {
|
|
482
|
+
background: 'bg-transparent',
|
|
483
|
+
text: 'text-primary-text',
|
|
484
|
+
description: 'text-primary-text',
|
|
485
|
+
},
|
|
486
|
+
primary: {
|
|
487
|
+
background: 'bg-white',
|
|
488
|
+
text: 'text-primary-text',
|
|
489
|
+
description: 'text-primary-text',
|
|
490
|
+
},
|
|
491
|
+
secondary: {
|
|
492
|
+
background: 'bg-primary-main',
|
|
493
|
+
text: 'text-white',
|
|
494
|
+
description: 'text-white/80',
|
|
495
|
+
},
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
const Headline = JSX(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
|
|
499
|
+
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
500
|
+
return (jsxs("section", { className: `px-4 py-6 flex flex-col gap-2.5 ${STYLE_MAPS.background} ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })) : null, description ? (jsx("p", { className: `text-m ${STYLE_MAPS.description} ${ALIGN_TEXT[align]}`, children: description })) : null, image?.src && (jsx("div", { className: "mt-2.5 mx-auto flex justify-center", children: jsx(Img, { image: image }) }))] }));
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
// column-gap between children of SwipeListControl container
|
|
504
|
+
const DEFAULT_GAP = 14;
|
|
505
|
+
/*
|
|
506
|
+
Horizontal padding used on a container above SwipeListControl.
|
|
507
|
+
Same value used on a SwipeListControlChildren container to compensate it
|
|
508
|
+
and get rid of a clipping effect caused by overflow: hidden.
|
|
509
|
+
*/
|
|
510
|
+
const DEFAULT_PADDING = 16;
|
|
511
|
+
// Classes used to compensate outer container padding, so that child elements won't be clipped
|
|
512
|
+
|
|
513
|
+
const DOT_STYLES = 'bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full';
|
|
514
|
+
const BASE_DOT_WIDTH = 6;
|
|
515
|
+
const ACTIVE_DOT_WIDTH_CHANGE = 16;
|
|
516
|
+
const BASE_DOT_OPACITY = 0.3;
|
|
517
|
+
const ACTIVE_DOT_OPACITY_CHANGE = 0.7;
|
|
518
|
+
const SwipeListControlDots = JSX(({ children, activeIndex, indexFraction, showDots }) => {
|
|
519
|
+
const handleClick = (idx) => (e) => {
|
|
520
|
+
if (idx === activeIndex) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
const contentContainer = e.currentTarget.parentElement
|
|
524
|
+
?.previousElementSibling;
|
|
525
|
+
contentContainer?.children[idx]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
|
526
|
+
};
|
|
527
|
+
return showDots && children?.length ? (jsx("div", { className: "flex gap-2 mx-auto mt-5 w-fit", children: children?.map((_, idx) => (jsx("div", { onClick: handleClick(idx), className: `${DOT_STYLES}`, style: getDotStyles(idx, activeIndex, indexFraction), "aria-hidden": true }, String(idx)))) })) : null;
|
|
528
|
+
});
|
|
529
|
+
const getDotStyles = (currentIdx, activeIndex, indexFraction) => {
|
|
530
|
+
if (currentIdx < activeIndex || currentIdx > activeIndex + 1) {
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
const leftIndexMod = 1 - indexFraction;
|
|
534
|
+
const rightIndexMod = indexFraction;
|
|
535
|
+
return currentIdx === activeIndex
|
|
536
|
+
? {
|
|
537
|
+
opacity: `${BASE_DOT_OPACITY + ACTIVE_DOT_OPACITY_CHANGE * leftIndexMod}`,
|
|
538
|
+
width: `${BASE_DOT_WIDTH + ACTIVE_DOT_WIDTH_CHANGE * leftIndexMod}px`,
|
|
539
|
+
}
|
|
540
|
+
: {
|
|
541
|
+
opacity: `${BASE_DOT_OPACITY + ACTIVE_DOT_OPACITY_CHANGE * rightIndexMod}`,
|
|
542
|
+
width: `${BASE_DOT_WIDTH + ACTIVE_DOT_WIDTH_CHANGE * rightIndexMod}px`,
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
const SwipeListControlItem = JSX(({ className = '', children, ...rest }) => {
|
|
547
|
+
return (jsx("div", { className: `snap-center snap-always min-w-full box-border ${className}`, role: "listitem", ...rest, children: children }));
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// styles used to compensate outer container padding to get rid of clipping effect
|
|
551
|
+
const getContainerStyle = (padding) => {
|
|
552
|
+
return {
|
|
553
|
+
marginLeft: `${-padding}px`,
|
|
554
|
+
marginRight: `${-padding}px`,
|
|
555
|
+
paddingLeft: `${padding}px`,
|
|
556
|
+
paddingRight: `${padding}px`,
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
const SwipeListControlList = JSX(({ className = '', children, activeIndex, onScroll, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, }) => {
|
|
561
|
+
return (jsx("div", { className: `overflow-auto flex horizontal-list no-scrollbar ${className}`, style: { ...getContainerStyle(padding), gap: `${gap}px` }, role: "list", onScroll: onScroll, children: children?.length ? (children?.map((child, idx) => (jsx(SwipeListControlItem, { style: getContainerStyle(padding / 4), "aria-current": Boolean(activeIndex === idx), children: child }, String(idx))))) : (jsx(SwipeListControlItem, { children: children })) }));
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
/*
|
|
565
|
+
Returns object containing whole index part, and it's decimal part for a given
|
|
566
|
+
scrollLeft value of a container and an array of tuple containing values of a
|
|
567
|
+
start and end boundaries of a scrollable child, right boundary non-inclusive.
|
|
568
|
+
Returns object with index equal -1 and fraction equal 0 if scrollLeft is outside given scrollPoints
|
|
569
|
+
*/
|
|
570
|
+
const getIndexParts = (scrollLeft, scrollPoints) => {
|
|
571
|
+
const index = scrollPoints.findIndex(([pointStart, pointEnd]) => pointStart <= scrollLeft && scrollLeft < pointEnd);
|
|
572
|
+
if (index < 0) {
|
|
573
|
+
return { index, fraction: 0 };
|
|
574
|
+
}
|
|
575
|
+
const [start, end] = scrollPoints[index];
|
|
576
|
+
const fraction = (scrollLeft - start) / (end - start);
|
|
577
|
+
return { index, fraction };
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
/*
|
|
581
|
+
Calculates array of breakpoints for each scrollable element in container.
|
|
582
|
+
Returns array of tuples consisting of [start, end] boundary scrollLeft values.
|
|
583
|
+
*/
|
|
584
|
+
const getScrollPoints = ({ gap, padding, clientWidth, scrollWidth, childElementCount, itemWidth, }) => {
|
|
585
|
+
const scrollableDistance = scrollWidth - clientWidth;
|
|
586
|
+
if (childElementCount === 2) {
|
|
587
|
+
return [
|
|
588
|
+
[0, scrollableDistance],
|
|
589
|
+
[scrollableDistance, scrollWidth],
|
|
590
|
+
];
|
|
591
|
+
}
|
|
592
|
+
const scrollItemWidth = itemWidth + gap;
|
|
593
|
+
const edgeScrollDistance = clientWidth - gap - padding;
|
|
594
|
+
const lastScrollableIdx = childElementCount - 2;
|
|
595
|
+
const scrollPoints = new Array(childElementCount)
|
|
596
|
+
.fill(0)
|
|
597
|
+
.map((_, idx) => idx === 0 || idx === lastScrollableIdx
|
|
598
|
+
? [
|
|
599
|
+
idx > 0 ? scrollableDistance - edgeScrollDistance : 0,
|
|
600
|
+
idx > 0 ? scrollableDistance : edgeScrollDistance,
|
|
601
|
+
]
|
|
602
|
+
: [
|
|
603
|
+
(idx - 1) * scrollItemWidth + edgeScrollDistance,
|
|
604
|
+
idx * scrollItemWidth + edgeScrollDistance,
|
|
605
|
+
]);
|
|
606
|
+
scrollPoints[childElementCount - 1] = [scrollableDistance, scrollWidth];
|
|
607
|
+
return scrollPoints;
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
const SwipeListControl = JSX(({ className, children, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, onSlideChange, }) => {
|
|
611
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
612
|
+
const [indexFraction, setIndexFraction] = useState(0);
|
|
613
|
+
const dotsProps = {
|
|
614
|
+
activeIndex,
|
|
615
|
+
indexFraction,
|
|
616
|
+
showDots,
|
|
617
|
+
children,
|
|
618
|
+
};
|
|
619
|
+
const handleScroll = (e) => {
|
|
620
|
+
const { scrollLeft, clientWidth, childElementCount, scrollWidth, children: childrenCollection, } = e?.currentTarget;
|
|
621
|
+
// horizontal PADDING / 2 to compensate padding-margin combo of child container
|
|
622
|
+
// without CSS calc function, as wrapper element gets bigger in the DOM, remaining same visually
|
|
623
|
+
const itemWidth = childrenCollection[0].offsetWidth - padding / 2;
|
|
624
|
+
const scrollPoints = getScrollPoints({
|
|
625
|
+
gap,
|
|
626
|
+
padding,
|
|
627
|
+
clientWidth,
|
|
628
|
+
scrollWidth,
|
|
629
|
+
childElementCount,
|
|
630
|
+
itemWidth,
|
|
631
|
+
});
|
|
632
|
+
const { index, fraction } = getIndexParts(scrollLeft, scrollPoints);
|
|
633
|
+
if (index !== activeIndex && onSlideChange) {
|
|
634
|
+
onSlideChange();
|
|
635
|
+
}
|
|
636
|
+
setActiveIndex(index);
|
|
637
|
+
setIndexFraction(fraction);
|
|
638
|
+
};
|
|
639
|
+
return (jsxs("div", { className: className, children: [jsx(SwipeListControlList, { gap: gap, padding: padding, activeIndex: activeIndex, onScroll: handleScroll, children: children }), jsx(SwipeListControlDots, { ...dotsProps })] }));
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
|
|
643
|
+
const { text, fileSize, ...linkProps } = doc;
|
|
644
|
+
return (jsxs("a", { className: className, role: "link", ...linkProps, children: [icon ? (jsx(Img, { className: iconClassName, image: icon, width: "24px", height: "24px", asSVG: true })) : null, text ? (jsxs("span", { className: textClassName, children: [text, jsx("span", { className: suffixClassName, children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })) : null] }));
|
|
645
|
+
});
|
|
646
|
+
const formatSuffix = (ext, fileSize) => {
|
|
647
|
+
const prefix = ext || fileSize ? ',' : '';
|
|
648
|
+
const extension = ext ? ` ${ext}` : '';
|
|
649
|
+
const size = fileSize ? ` (${fileSize})` : '';
|
|
650
|
+
return prefix + extension + size;
|
|
651
|
+
};
|
|
652
|
+
const getExtFromHref = (href) => {
|
|
653
|
+
if (!href) {
|
|
654
|
+
return '';
|
|
655
|
+
}
|
|
656
|
+
const index = href.lastIndexOf('.');
|
|
657
|
+
return index !== -1 ? href.substring(index + 1) : '';
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-3 min-w-6 min-h-6", doc: doc, icon: icon })));
|
|
661
|
+
|
|
662
|
+
const LinkDocsHorizontalList = JSX(({ context, hasBorder = true, documents, icon }) => {
|
|
663
|
+
return (jsx(SwipeListControl, { context: context, className: "text-s text-primary-main mt-5", children: documents?.length
|
|
664
|
+
? documents.map((doc, i) => (jsx(LinkDocsListItem, { className: hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : '', doc: doc, icon: icon }, String(i))))
|
|
665
|
+
: null }));
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
const LinkDocsVerticalList = JSX(({ hasBorder = true, documents, icon }) => {
|
|
669
|
+
return (jsx("div", { className: `text-s text-primary-main flex flex-col mt-5 ${hasBorder ? 'gap-3.5' : 'gap-2'}`, role: "list", children: documents?.length
|
|
670
|
+
? documents.map((doc, i) => (jsx("div", { role: "listitem", children: jsx(LinkDocsListItem, { className: hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : '', doc: doc, icon: icon }) }, String(i))))
|
|
671
|
+
: null }));
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
const LinkDocs = JSX(({ className = '', context, title, description, icon = { icon: 'DocIconMonoColor' }, documents, orientation = 'vertical', hasBorder = true, }) => {
|
|
675
|
+
return (jsxs("section", { className: `font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${className}`, children: [jsx(Headline, { className: `!p-0 ${description ? 'gap-2' : 'gap-5'}`, title: title, description: description, context: context, align: "center" }), orientation === 'vertical' ? (jsx(LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : (jsx(LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
const isURL = (href) => href?.includes('//');
|
|
679
|
+
const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
|
|
680
|
+
const getOrigin = (href) => {
|
|
681
|
+
if (!href || !isURL(href)) {
|
|
682
|
+
return undefined;
|
|
683
|
+
}
|
|
684
|
+
const url = href;
|
|
685
|
+
const protoSeparator = '//';
|
|
686
|
+
const endOfProto = url.indexOf(protoSeparator);
|
|
687
|
+
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
688
|
+
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
689
|
+
};
|
|
690
|
+
const getHash = (href) => {
|
|
691
|
+
if (!href || !isURL(href)) {
|
|
692
|
+
return undefined;
|
|
693
|
+
}
|
|
694
|
+
const hashIndex = href.indexOf('#');
|
|
695
|
+
return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
|
|
696
|
+
};
|
|
697
|
+
const isHash = (href) => href?.startsWith('#');
|
|
698
|
+
|
|
699
|
+
var url = /*#__PURE__*/Object.freeze({
|
|
700
|
+
__proto__: null,
|
|
701
|
+
isURL: isURL,
|
|
702
|
+
withoutQuery: withoutQuery,
|
|
703
|
+
getOrigin: getOrigin,
|
|
704
|
+
getHash: getHash,
|
|
705
|
+
isHash: isHash
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
const MOBILE_URL_PATH = '/mobile';
|
|
709
|
+
const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
|
|
710
|
+
|
|
711
|
+
const adjustHref = (href, router) => {
|
|
712
|
+
if (!href) {
|
|
713
|
+
return href;
|
|
714
|
+
}
|
|
715
|
+
const relativeHref = toRelativeHref(href, router) || '';
|
|
716
|
+
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
717
|
+
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
718
|
+
};
|
|
719
|
+
const toRelativeHref = (href, router) => {
|
|
720
|
+
if (!href) {
|
|
721
|
+
return href;
|
|
722
|
+
}
|
|
723
|
+
const origin = getOrigin(router?.href);
|
|
724
|
+
return origin ? href.replace(origin, '') || '/' : href;
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
const defaultHandlerDecorator = (handler) => handler;
|
|
728
|
+
function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
|
|
729
|
+
const href = adjustHref(link.href, router);
|
|
730
|
+
return {
|
|
731
|
+
...link,
|
|
732
|
+
href,
|
|
733
|
+
'aria-label': link.text,
|
|
734
|
+
onClick: handlerDecorator((ev) => {
|
|
735
|
+
const isLocalHref = href && !isURL(href);
|
|
736
|
+
const isLocalTarget = !link.target || link.target === '_self';
|
|
737
|
+
if (isLocalHref && isLocalTarget) {
|
|
738
|
+
ev?.preventDefault();
|
|
739
|
+
router.push(href);
|
|
740
|
+
}
|
|
741
|
+
}, link),
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
const ButtonInner = JSX((props) => {
|
|
746
|
+
const { text, aboveText, appendLeft, appendRight } = props;
|
|
747
|
+
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-xs-light text-left", children: aboveText }), jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-0.5' : 'text-l'}`, children: text })] })) : null, appendRight ? appendRight : null] }));
|
|
748
|
+
});
|
|
749
|
+
const getButtonStyle = (props) => {
|
|
750
|
+
const { version, aboveText, rounded } = props;
|
|
751
|
+
if (version === 'link') {
|
|
752
|
+
return '';
|
|
753
|
+
}
|
|
754
|
+
const withTextStyle = `gap-2 ${aboveText ? 'py-2.5 px-7' : 'py-4 px-9'}`;
|
|
755
|
+
return [
|
|
756
|
+
'flex items-center justify-center',
|
|
757
|
+
isWithText(props) ? withTextStyle : 'h-12 w-12',
|
|
758
|
+
rounded ? 'rounded-full' : '',
|
|
759
|
+
].join(' ');
|
|
760
|
+
};
|
|
761
|
+
const isWithText = ({ text, aboveText, appendLeft }) => Boolean(text || aboveText || !appendLeft);
|
|
762
|
+
|
|
763
|
+
const buttonStyleMap = {
|
|
764
|
+
primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
|
|
765
|
+
secondary: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
|
|
766
|
+
link: 'text-primary-main',
|
|
767
|
+
};
|
|
768
|
+
const buttonDisabledStyleMap = {
|
|
769
|
+
primary: 'bg-secondary-dark text-secondary-text',
|
|
770
|
+
secondary: 'bg-secondary-light text-secondary-text',
|
|
771
|
+
link: '',
|
|
772
|
+
};
|
|
773
|
+
const styleButton = 'w-full text-center font-sans select-none';
|
|
774
|
+
const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'primary', ariaLabel, ...rest }) => {
|
|
775
|
+
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded, version: version }));
|
|
776
|
+
if (disabled) {
|
|
777
|
+
return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: `inline-block ${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
|
|
778
|
+
}
|
|
779
|
+
return (jsx("a", { className: `${styleButton} inline-block cursor-pointer no-underline focus:border focus:border-primary-focus ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
const ButtonSection = JSX(({ context, className = '', buttons }) => {
|
|
783
|
+
const { handlerDecorator } = context;
|
|
784
|
+
const router = context.useRouter();
|
|
785
|
+
return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton$2(useLink({ router, handlerDecorator }, button), index)) })) : null;
|
|
786
|
+
});
|
|
787
|
+
function renderButton$2({ icon, iconRight, ...button }, i) {
|
|
788
|
+
if (!button?.text) {
|
|
789
|
+
return null;
|
|
790
|
+
}
|
|
791
|
+
return icon ? (jsx(Button, { appendLeft: jsx(Img, { image: icon, width: "24", height: "24", asSVG: true }), appendRight: jsx(Img, { image: iconRight, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
const LIST_STYLE_CLASSES = {
|
|
795
|
+
primary: 'rounded-full inline-block mr-3 mt-2',
|
|
796
|
+
secondary: 'rounded-full inline-block mr-3 mt-2',
|
|
797
|
+
gray: 'rounded-full inline-block mr-3 mt-2',
|
|
798
|
+
tile: 'rounded-full inline-block mr-4 mt-3',
|
|
799
|
+
'tile-white': 'rounded-full inline-block mr-4 mt-3',
|
|
800
|
+
};
|
|
801
|
+
const LIST_DOT_STYLE_MAP = {
|
|
802
|
+
primary: 'bg-primary-text',
|
|
803
|
+
secondary: 'bg-white',
|
|
804
|
+
gray: 'bg-secondary-text',
|
|
805
|
+
tile: 'bg-black',
|
|
806
|
+
'tile-white': 'bg-white',
|
|
807
|
+
};
|
|
808
|
+
const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary' }) => {
|
|
809
|
+
return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted ? jsx("div", { className: getListStyle(version) }) : null, jsx("span", { children: children })] }));
|
|
810
|
+
});
|
|
811
|
+
const getListStyle = (version) => {
|
|
812
|
+
const size = {
|
|
813
|
+
primary: 'w-2 h-2 min-w-2 min-h-2',
|
|
814
|
+
secondary: 'w-2 h-2 min-w-2 min-h-2',
|
|
815
|
+
gray: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5',
|
|
816
|
+
tile: 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
817
|
+
'tile-white': 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
|
|
818
|
+
};
|
|
819
|
+
return `${LIST_STYLE_CLASSES[version]} ${LIST_DOT_STYLE_MAP[version]} ${size[version]}`;
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
const TEXT_STYLE_MAP = {
|
|
823
|
+
primary: 'text-primary-text',
|
|
824
|
+
secondary: 'text-white',
|
|
825
|
+
gray: 'text-secondary-text',
|
|
826
|
+
tile: 'text-primary-text',
|
|
827
|
+
'tile-white': 'text-white',
|
|
828
|
+
};
|
|
829
|
+
const List = JSX((props) => {
|
|
830
|
+
const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
|
|
831
|
+
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${className}`, role: "list", children: items?.length
|
|
832
|
+
? items.map((_, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, version: version, children: _ }, String(i))))
|
|
833
|
+
: null }));
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
|
|
837
|
+
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", { children: buttons }) : null] }), image] })] }));
|
|
838
|
+
});
|
|
839
|
+
|
|
840
|
+
const benefitTitleStyleMap = {
|
|
841
|
+
primary: 'text-primary-text',
|
|
842
|
+
secondary: 'text-white',
|
|
843
|
+
};
|
|
844
|
+
const benefitDescStyleMap = {
|
|
845
|
+
primary: 'text-secondary-text',
|
|
846
|
+
secondary: 'text-white',
|
|
847
|
+
};
|
|
848
|
+
function renderBenefit({ benefit, version = 'primary' }, i) {
|
|
849
|
+
const isIconWhite = version === 'secondary';
|
|
850
|
+
return (jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, jsx("div", { className: `text-l m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `text-s ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
851
|
+
}
|
|
852
|
+
function renderBenefitIconBgStyle(version) {
|
|
853
|
+
let bgColorStyle = 'text-primary-main';
|
|
854
|
+
if (version === 'secondary') {
|
|
855
|
+
bgColorStyle = 'text-black';
|
|
856
|
+
}
|
|
857
|
+
return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
const ProductBlockInner = JSX(({ className = '', context, title, headlineVersion = 'L', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, label, }) => {
|
|
861
|
+
return (jsxs("div", { className: `w-full ${className}`, children: [jsxs("div", { children: [label ? renderLabel(label, version) : null, jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, bgColorHeadline: version, headlineVersion: headlineVersion }), jsxs(BaseTile, { context: context, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((benefit, i) => renderBenefit({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-3 text-m", items: items, version: version, isDotted: isDotted })) : null] })] }), renderImage$1(image)] }));
|
|
862
|
+
});
|
|
863
|
+
function renderImage$1(image) {
|
|
864
|
+
return image?.src ? (jsx(Img, { imageClassName: "mt-5 mx-auto block", image: { className: 'block', ...image } })) : null;
|
|
865
|
+
}
|
|
866
|
+
const labelStyleMap = {
|
|
867
|
+
primary: 'text-primary-main border-secondary-hover',
|
|
868
|
+
secondary: 'text-white/80',
|
|
869
|
+
};
|
|
870
|
+
const renderLabel = (label, version) => (jsx("div", { className: `px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${labelStyleMap[version]}`, children: label }));
|
|
871
|
+
|
|
872
|
+
const productBlockStyleMap = {
|
|
873
|
+
primary: 'bg-white text-primary-text',
|
|
874
|
+
secondary: 'bg-primary-main text-white',
|
|
875
|
+
};
|
|
876
|
+
const ProductBlock = JSX((props /* Get rid of image and benefits */) => {
|
|
877
|
+
const { className = '', version = 'primary' } = props;
|
|
878
|
+
return (jsx("section", { className: `font-sans bg-white px-4 py-6 ${productBlockStyleMap[version]} ${className}`, children: jsx(ProductBlockInner, { ...props }) }));
|
|
879
|
+
});
|
|
880
|
+
|
|
881
|
+
const textBlockStyleMaps = {
|
|
882
|
+
primary: {
|
|
883
|
+
background: 'bg-white',
|
|
884
|
+
icon: 'bg-primary-main text-white',
|
|
885
|
+
title: 'text-primary-text',
|
|
886
|
+
description: 'text-secondary-text',
|
|
887
|
+
},
|
|
888
|
+
secondary: {
|
|
889
|
+
background: 'bg-primary-main',
|
|
890
|
+
icon: 'bg-white text-primary-main',
|
|
891
|
+
title: 'text-white',
|
|
892
|
+
description: 'text-white',
|
|
893
|
+
},
|
|
894
|
+
'secondary-light': {
|
|
895
|
+
background: 'bg-primary-main/10',
|
|
896
|
+
icon: 'bg-primary-main text-white',
|
|
897
|
+
title: 'text-primary-text',
|
|
898
|
+
description: 'text-secondary-text',
|
|
899
|
+
},
|
|
900
|
+
};
|
|
901
|
+
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className = '', items, isDotted = true, }) => {
|
|
902
|
+
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
903
|
+
const listBlockVersion = blockVersion === 'secondary' ? 'secondary' : 'gray';
|
|
904
|
+
return (jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `text-l font-medium mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-s ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (jsx(List, { className: "mt-1 text-m", items: items, isDotted: isDotted, version: listBlockVersion })) : null] })] }));
|
|
905
|
+
});
|
|
906
|
+
function renderIcon(className) {
|
|
907
|
+
return (jsx("div", { className: "mb-3", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${className}`, children: "i" }) }));
|
|
908
|
+
}
|
|
909
|
+
function renderImage(image) {
|
|
910
|
+
return image?.src ? jsx(Img, { className: "pb-3 mr-auto", image: image }) : null;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
const blockStyle = {
|
|
914
|
+
primary: 'bg-white',
|
|
915
|
+
secondary: 'bg-primary-main text-white',
|
|
916
|
+
};
|
|
917
|
+
const Gallery = JSX(({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
|
|
918
|
+
const headingClassName = description ? 'mb-2' : 'mb-5';
|
|
919
|
+
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-5", children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${headingClassName}`, title: title })) : null, description ? (jsx("div", { className: "text-m max-w-[600px] text-center mb-5", children: description })) : null] }), renderCardsLayout(orientation, cards, context)] }));
|
|
920
|
+
});
|
|
921
|
+
function renderCardsLayout(orientation, cards, context) {
|
|
922
|
+
return orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, children: cards?.map(renderCard) })) : (jsx("div", { className: "grid gap-[14px]", children: cards?.map(renderCard) }));
|
|
923
|
+
}
|
|
924
|
+
function renderCard(card, key) {
|
|
925
|
+
return (jsxs("div", { className: `h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col
|
|
922
926
|
${blockStyle[card.version ?? 'primary']}`, children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-3.5", image: card.image }) })) : null, card.title ? jsx("h3", { className: `text-m-title-xs font-medium m-0`, children: card.title }) : null, card.description ? renderDescription(card) : null, card.items?.length ? renderItems(card.items, card.isDotted, card.version) : null] }), card?.button?.text ? renderButton$1(card.button) : null] }, key));
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
blocks,
|
|
1041
|
-
});
|
|
1042
|
-
return (jsxs("li", { className: `${borderedLiClass(bordered)} border-solid border-main-divider`, children: [jsxs("button", { className: `border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text
|
|
927
|
+
}
|
|
928
|
+
function renderButton$1(button) {
|
|
929
|
+
return (jsx(Button, { className: "mt-3", appendLeft: button?.icon && jsx(Img, { image: button?.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
|
|
930
|
+
}
|
|
931
|
+
function renderDescription(card) {
|
|
932
|
+
return (jsx("div", { className: `text-secondary-text mt-1 text-s ${card.version === 'secondary' ? 'text-white opacity-80' : ''}`, children: card.description }));
|
|
933
|
+
}
|
|
934
|
+
function renderItems(items, isDotted, version = 'primary') {
|
|
935
|
+
return (jsx("section", { className: "mt-3", children: items.map((item, i) => (jsxs("div", { children: [isDotted ? jsx("div", { className: getListStyle(version) }) : null, jsx("span", { className: "text-m font-medium", children: item.title }), jsx("span", { className: `text-s pl-2 ${version === 'primary' ? 'text-secondary-text' : ''}`, children: item.text })] }, String(i)))) }));
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
class EventBus {
|
|
939
|
+
static inst = new EventBus();
|
|
940
|
+
subscribers = {};
|
|
941
|
+
subjectsStateMap = {};
|
|
942
|
+
subscribe(type, listener) {
|
|
943
|
+
this.subscribers[type] ||= [];
|
|
944
|
+
this.subscribers[type]?.push(listener);
|
|
945
|
+
const latestEvent = this.subjectsStateMap[type];
|
|
946
|
+
if (latestEvent) {
|
|
947
|
+
listener(latestEvent);
|
|
948
|
+
}
|
|
949
|
+
return () => {
|
|
950
|
+
this.unsubscribe(type, listener);
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
unsubscribe(type, listener) {
|
|
954
|
+
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
955
|
+
}
|
|
956
|
+
fire(type, event) {
|
|
957
|
+
this.subjectsStateMap[type] = event;
|
|
958
|
+
this.subscribers[type]?.forEach((s) => s(event));
|
|
959
|
+
}
|
|
960
|
+
subject(type, event) {
|
|
961
|
+
this.subjectsStateMap[type] = event;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
const changeHashOnObserve = (entries) => {
|
|
966
|
+
if (!entries.length) {
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
const [entry] = entries;
|
|
970
|
+
if (entry.isIntersecting) ;
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
const BlockWrapper = JSX(({ anchor, className, context, children, tag = 'section', labels }) => {
|
|
974
|
+
const Tag = tag;
|
|
975
|
+
const { IntersectionObserverTag } = context;
|
|
976
|
+
const [shouldRenderBlock, setShouldRenderBlock] = useState(true);
|
|
977
|
+
useEffect(() => EventBus.inst.subscribe('tab', (event) => {
|
|
978
|
+
setShouldRenderBlock(!labels?.length || !event.label || labels.includes(event.label));
|
|
979
|
+
}), [labels]);
|
|
980
|
+
if (!shouldRenderBlock) {
|
|
981
|
+
return null;
|
|
982
|
+
}
|
|
983
|
+
return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
const LinkList = JSX(({ className = '', documents, ...rest }) => {
|
|
987
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white mt-[10px] ${className}`, ...rest, children: jsx("ul", { className: "flex flex-col text-s text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
|
|
988
|
+
});
|
|
989
|
+
const renderLinkListItem = (documents) => {
|
|
990
|
+
return documents.map((doc, i) => {
|
|
991
|
+
const { text, ...linkProps } = doc;
|
|
992
|
+
return (jsx("li", { className: "mb-4 list-none", children: jsx("a", { className: "hover:text-primary-main", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
993
|
+
});
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
const EmbeddableBlocks = {
|
|
997
|
+
Headline,
|
|
998
|
+
LinkDocs,
|
|
999
|
+
TextBlock,
|
|
1000
|
+
ProductBlock,
|
|
1001
|
+
Gallery,
|
|
1002
|
+
LinkList,
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
const renderBlocksList = ({ blocks, context, className = '' }) => blocks?.length ? blocks.map(renderBlock$1({ context, className })) : null;
|
|
1006
|
+
const renderBlock$1 = ({ context, className }) => (block, i) => {
|
|
1007
|
+
if (!block) {
|
|
1008
|
+
return null;
|
|
1009
|
+
}
|
|
1010
|
+
const { style, blockListType: type, ...rest } = block;
|
|
1011
|
+
if (!type || !(type in EmbeddableBlocks)) {
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
1014
|
+
const classNameBlock = style2className(style);
|
|
1015
|
+
const EmbeddedBlock = EmbeddableBlocks[type];
|
|
1016
|
+
return (jsx(EmbeddedBlock, { className: `${className} ${classNameBlock}`, context: context, ...rest }, `block_${i}`));
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
const AccordionItemInner = JSX(({ blocks, context }) => {
|
|
1020
|
+
return (jsx("div", { className: "flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: renderBlocksList({ context, blocks, className: '!px-0' }) }));
|
|
1021
|
+
});
|
|
1022
|
+
|
|
1023
|
+
const useActiveHandler = ({ blocks, initialState = false }) => {
|
|
1024
|
+
const [isActive, setIsActive] = useState(initialState);
|
|
1025
|
+
const hasContent = blocks?.length;
|
|
1026
|
+
const icon = isActive ? 'MinusIcon' : 'PlusIcon';
|
|
1027
|
+
const handleToggle = (e) => {
|
|
1028
|
+
const currentTarget = e.currentTarget;
|
|
1029
|
+
if (!currentTarget) {
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
setIsActive(!isActive);
|
|
1033
|
+
const contentBlock = currentTarget.nextSibling;
|
|
1034
|
+
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
1035
|
+
? ''
|
|
1036
|
+
: `${contentBlock.scrollHeight}px`;
|
|
1037
|
+
};
|
|
1038
|
+
return { isActive, hasContent, icon, handleToggle };
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
const AccordionItem = JSX(({ label, labelIcon, blocks, bordered, context }) => {
|
|
1042
|
+
const { hasContent, icon, handleToggle } = useActiveHandler({ blocks });
|
|
1043
|
+
return (jsxs("li", { className: `${borderedLiClass(bordered)} border-solid border-main-divider`, children: [jsxs("button", { className: `border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text
|
|
1043
1044
|
${bordered ? '' : 'py-[14px] px-0'}
|
|
1044
1045
|
${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsxs("span", { className: `text-m-title-xs font-medium pr-2.5 flex ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: [labelIcon ? (jsx(Img, { image: labelIcon, width: "24", height: "24", asSVG: true, className: "mr-3" })) : null, label] }), hasContent ? jsx(Img, { className: "w-6", image: icon, width: "24", height: "24", asSVG: true }) : null] }), hasContent ? jsx(AccordionItemInner, { blocks: blocks, context: context }) : null] }));
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1046
|
+
});
|
|
1047
|
+
function borderedLiClass(bordered) {
|
|
1048
|
+
return bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0';
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
const Accordion = JSX(({ title, description, accordionItems, context, className = '', bordered }) => {
|
|
1052
|
+
return (jsxs("section", { className: `py-6 px-4 font-sans bg-white text-primary-text ${className}`, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-2 text-center", title: title }) : null, description ? jsx("div", { className: "mb-5 text-m-light text-center", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context, bordered: bordered }, `AccordionItem_${i}`))) })) : null] }));
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
1056
|
+
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
1057
|
+
|
|
1058
|
+
const headingStyle = (isFillGradient = false) => (isFillGradient ? 'text-white' : '');
|
|
1059
|
+
const subtitleStyle = (isFillGradient = false) => `text-s mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`;
|
|
1060
|
+
const HeaderCell = JSX(({ icon, image, title, subtitle, isFillGradient }) => (jsxs("div", { role: "columnheader", children: [icon ? (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })) : null, image?.src && (jsx("div", { className: "mb-3.5", children: jsx(Img, { image: image }) })), title ? (jsx(Heading, { headingType: "h4", className: headingStyle(isFillGradient), title: title })) : null, subtitle ? jsx("div", { className: subtitleStyle(isFillGradient), children: subtitle }) : null] })));
|
|
1061
|
+
|
|
1062
|
+
const TableCell = JSX(({ cell, rowHeader, isFillGradient = false }) => {
|
|
1063
|
+
const cellWrapperClasses = `box-border flex flex-col`;
|
|
1064
|
+
const cellClasses = `h-full ${DIVIDER_CLASSES}`;
|
|
1065
|
+
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map(renderCellInner$1(isFillGradient, rowHeader)) }) }));
|
|
1066
|
+
});
|
|
1067
|
+
const renderCellInner$1 = (isFillGradient, rowHeader) => ({ label, description }, i) => (jsxs("div", { className: "flex justify-between text-s py-3.5", children: [jsx("div", { className: `${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: rowHeader }), jsxs("div", { className: "basis-1/2", children: [label ? (jsx("div", { className: `text-right ${isFillGradient ? 'text-white' : ''}`, children: label })) : null, description ? (jsx("div", { className: `text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: description })) : null] })] }, String(i)));
|
|
1068
|
+
|
|
1069
|
+
const TableColumn = JSX(({ header, columnData, visibleRowLength = 0, isFillGradient, showRow, onToggleColumn }) => {
|
|
1070
|
+
const columnDataView = columnData?.slice(0, showRow ? columnData.length : visibleRowLength);
|
|
1071
|
+
const gradientClassName = isFillGradient ? GRADIENT : '';
|
|
1072
|
+
const buttonVersion = isFillGradient ? 'secondary' : 'primary';
|
|
1073
|
+
return (jsxs("div", { className: `border border-main-stroke rounded-md p-4 mb-3.5 ${gradientClassName}`, role: "row", children: [jsx(HeaderCell, { ...header, isFillGradient: isFillGradient }), columnDataView?.length
|
|
1074
|
+
? columnDataView.map(({ rowHeader, cell }, i) => (jsx(TableCell, { cell: cell, rowHeader: rowHeader, isFillGradient: isFillGradient }, String(i))))
|
|
1075
|
+
: null, showRow && renderButton({ header, buttonVersion }), renderToggleButton({ onToggleColumn, isFillGradient, showRow })] }));
|
|
1076
|
+
});
|
|
1077
|
+
const renderButton = ({ header, buttonVersion }) => (jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "text-s font-medium mt-4 py-[11px]", children: header.link.text }));
|
|
1078
|
+
const renderToggleButton = ({ onToggleColumn, isFillGradient, showRow }) => (jsx("div", { className: "mt-5", role: "cell", children: jsx("a", { role: "link", onClick: onToggleColumn, className: `text-s font-medium cursor-pointer ${isFillGradient ? 'text-white/80' : 'text-primary-main'}`, children: !showRow ? 'Показать описание' : 'Скрыть' }) }));
|
|
1079
|
+
|
|
1080
|
+
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, orientation = 'vertical', }) => {
|
|
1081
|
+
const tableData = columns?.map(({ data, header }) => ({
|
|
1082
|
+
header,
|
|
1083
|
+
column: data?.map((cell, i) => ({ cell, rowHeader: rowHeaders?.[i]?.title })),
|
|
1084
|
+
})) || [];
|
|
1085
|
+
const [columnsViewState, setColumnsViewState] = useState(new Array(columns?.length || 0).fill(!visibleRowLength));
|
|
1086
|
+
const handleToggleColumn = (i) => {
|
|
1087
|
+
columnsViewState[i] = !columnsViewState[i];
|
|
1088
|
+
setColumnsViewState([...columnsViewState]);
|
|
1089
|
+
};
|
|
1090
|
+
return (jsxs("section", { className: `bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: "font-medium text-center m-0 mb-5", title: title })) : null, renderColumns({
|
|
1091
|
+
tableData,
|
|
1092
|
+
context,
|
|
1093
|
+
visibleRowLength,
|
|
1094
|
+
isColoredFirstColumn,
|
|
1095
|
+
columnsViewState,
|
|
1096
|
+
handleToggleColumn,
|
|
1097
|
+
orientation,
|
|
1098
|
+
setColumnsViewState,
|
|
1099
|
+
})] }));
|
|
1100
|
+
});
|
|
1101
|
+
const renderColumns = ({ context, tableData, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn, orientation = 'horizontal', setColumnsViewState, }) => (jsx("div", { role: "table", children: tableData?.length
|
|
1102
|
+
? renderInnerTable({
|
|
1103
|
+
orientation,
|
|
1104
|
+
context,
|
|
1105
|
+
columnsViewState,
|
|
1106
|
+
setColumnsViewState,
|
|
1107
|
+
tableData,
|
|
1108
|
+
visibleRowLength,
|
|
1109
|
+
isColoredFirstColumn,
|
|
1110
|
+
handleToggleColumn,
|
|
1111
|
+
})
|
|
1112
|
+
: null }));
|
|
1113
|
+
const renderInnerTable = ({ orientation, context, columnsViewState, setColumnsViewState, tableData, visibleRowLength, isColoredFirstColumn, handleToggleColumn, }) => orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, onSlideChange: onSlideChange(columnsViewState, setColumnsViewState), children: tableData.map(renderColumn({
|
|
1114
|
+
context,
|
|
1115
|
+
visibleRowLength,
|
|
1116
|
+
isColoredFirstColumn,
|
|
1117
|
+
columnsViewState,
|
|
1118
|
+
handleToggleColumn,
|
|
1119
|
+
})) })) : (tableData.map(renderColumn({
|
|
1120
|
+
context,
|
|
1121
|
+
visibleRowLength,
|
|
1122
|
+
isColoredFirstColumn,
|
|
1123
|
+
columnsViewState,
|
|
1124
|
+
handleToggleColumn,
|
|
1125
|
+
})));
|
|
1126
|
+
const renderColumn = ({ context, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn }) => (columnData, i) => (jsx(TableColumn, { context: context, visibleRowLength: visibleRowLength, showRow: columnsViewState[i], header: columnData.header, columnData: columnData.column, isFillGradient: i === 0 && isColoredFirstColumn, onToggleColumn: () => handleToggleColumn(i) }, String(i)));
|
|
1127
|
+
const onSlideChange = (columnsViewState, setColumnsViewState) => () => {
|
|
1128
|
+
setColumnsViewState(new Array(columnsViewState.length).fill(false));
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
const consistentDataMap = new Map();
|
|
1132
|
+
function useAsyncData$1(key, fetcher) {
|
|
1133
|
+
const args = useMemo(() => keyToArgs(key), [key]);
|
|
1134
|
+
const [data, setData] = useState();
|
|
1135
|
+
const [error, setError] = useState();
|
|
1136
|
+
const chainToConsistentResult = (_) => {
|
|
1137
|
+
_.then(_data => consistentDataMap.get(args) || _data)
|
|
1138
|
+
.then(setData)
|
|
1139
|
+
.catch(setError);
|
|
1140
|
+
};
|
|
1141
|
+
useEffect(() => {
|
|
1142
|
+
const isEmptyKey = args.every(_ => _ === null);
|
|
1143
|
+
if (isEmptyKey) {
|
|
1144
|
+
return;
|
|
1145
|
+
}
|
|
1146
|
+
try {
|
|
1147
|
+
const _ = fetcher(...args);
|
|
1148
|
+
if ('then' in _) {
|
|
1149
|
+
chainToConsistentResult(_);
|
|
1150
|
+
}
|
|
1151
|
+
else {
|
|
1152
|
+
setData(_);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
catch (err) {
|
|
1156
|
+
setError(err);
|
|
1157
|
+
}
|
|
1158
|
+
}, [fetcher, ...args]);
|
|
1159
|
+
return {
|
|
1160
|
+
data,
|
|
1161
|
+
error,
|
|
1162
|
+
mutate: () => Promise.resolve(undefined),
|
|
1163
|
+
isValidating: false
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
function keyToArgs(key) {
|
|
1167
|
+
if (!key) {
|
|
1168
|
+
return [key];
|
|
1169
|
+
}
|
|
1170
|
+
if (Array.isArray(key)) {
|
|
1171
|
+
return key;
|
|
1172
|
+
}
|
|
1173
|
+
else if (key instanceof Function) {
|
|
1174
|
+
return keyToArgs(key());
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1177
|
+
return [key];
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
let impl = useAsyncData$1;
|
|
1182
|
+
const useAsyncData = (key, fetcher) => impl(key, fetcher);
|
|
1183
|
+
|
|
1184
|
+
function useExchangeRates() {
|
|
1185
|
+
const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
|
|
1186
|
+
const result = data?.hits?.hits?.map((_) => _._source) || [];
|
|
1187
|
+
return result.length ? getCurrencyListByRate(result) : result;
|
|
1188
|
+
}
|
|
1189
|
+
async function fetchExchangeRates() {
|
|
1190
|
+
try {
|
|
1191
|
+
const response = await fetch(EXCHANGE_RATES_URL, {
|
|
1192
|
+
method: 'POST',
|
|
1193
|
+
headers: {
|
|
1194
|
+
'Content-Type': 'application/json',
|
|
1195
|
+
},
|
|
1196
|
+
body: JSON.stringify(EXCHANGE_RATES_BODY),
|
|
1197
|
+
});
|
|
1198
|
+
return await response.json();
|
|
1199
|
+
}
|
|
1200
|
+
catch (err) {
|
|
1201
|
+
console.error(err);
|
|
1202
|
+
return Promise.resolve();
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
|
|
1206
|
+
const EXCHANGE_RATES_BODY = {
|
|
1207
|
+
query: {
|
|
1208
|
+
bool: {
|
|
1209
|
+
must: [
|
|
1210
|
+
{
|
|
1211
|
+
term: {
|
|
1212
|
+
// eslint-disable-next-line camelcase
|
|
1213
|
+
russian_region_code: '77',
|
|
1214
|
+
},
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
term: {
|
|
1218
|
+
// eslint-disable-next-line camelcase
|
|
1219
|
+
from_volume: '0',
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
terms: {
|
|
1224
|
+
// eslint-disable-next-line camelcase
|
|
1225
|
+
currency_pair: ['USD/RUB', 'EUR/RUB'],
|
|
1226
|
+
},
|
|
1227
|
+
},
|
|
1228
|
+
],
|
|
1229
|
+
},
|
|
1230
|
+
},
|
|
1231
|
+
};
|
|
1232
|
+
const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
|
|
1233
|
+
const currencyInfo = _['currency_first'];
|
|
1234
|
+
const currencyCode = currencyInfo?.code;
|
|
1235
|
+
if (!result.some((i) => i.code === currencyCode)) {
|
|
1236
|
+
result.push({
|
|
1237
|
+
code: currencyCode,
|
|
1238
|
+
buy: roundRate(Number(_.rate_buy)),
|
|
1239
|
+
sell: roundRate(Number(_.rate_sell)),
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
return result;
|
|
1243
|
+
}, []);
|
|
1244
|
+
const roundRate = (value) => Math.round(value * 1000) / 1000;
|
|
1245
|
+
|
|
1246
|
+
var Currency;
|
|
1247
|
+
(function (Currency) {
|
|
1248
|
+
Currency["RUB"] = "RUB";
|
|
1249
|
+
Currency["EUR"] = "EUR";
|
|
1250
|
+
Currency["USD"] = "USD";
|
|
1251
|
+
})(Currency || (Currency = {}));
|
|
1252
|
+
|
|
1253
|
+
const currencyNumberFormat = new Intl.NumberFormat('ru', {
|
|
1254
|
+
style: 'currency',
|
|
1255
|
+
currency: Currency.RUB,
|
|
1256
|
+
});
|
|
1257
|
+
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
1258
|
+
|
|
1259
|
+
const TABLE_HEAD_STYLE = 'text-left text-m-light text-secondary-text';
|
|
1260
|
+
const CURRENCY_ICONS_MAP = {
|
|
1261
|
+
USD: 'DollarIcon',
|
|
1262
|
+
EUR: 'EuroIcon',
|
|
1263
|
+
};
|
|
1264
|
+
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => {
|
|
1265
|
+
return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
|
|
1266
|
+
});
|
|
1267
|
+
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1268
|
+
const code = exchangeCurrencyItem?.code;
|
|
1269
|
+
return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.sell) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buy) })] }, code));
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
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] })] })));
|
|
1273
|
+
|
|
1274
|
+
const roundTo = (value, precision = 2) => {
|
|
1275
|
+
const factor = Math.pow(10, precision);
|
|
1276
|
+
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
const calculateResult = (value, rate, precision) => {
|
|
1280
|
+
const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
|
|
1281
|
+
return Number.isInteger(result) ? result : roundTo(result);
|
|
1282
|
+
};
|
|
1283
|
+
const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
|
|
1284
|
+
|
|
1285
|
+
const tableFunc = (table) => (input) => {
|
|
1286
|
+
const [, output] = table.find(([predicate]) => predicate(input)) || [];
|
|
1287
|
+
return output;
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
const callbackCurrencySelect = (props) => tableFunc([
|
|
1291
|
+
[
|
|
1292
|
+
(_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
|
|
1293
|
+
() => props.handleConvert(props.value, Currency.RUB),
|
|
1294
|
+
],
|
|
1295
|
+
[
|
|
1296
|
+
(_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
|
|
1297
|
+
() => props.handleConvert(props.value, Currency.USD),
|
|
1298
|
+
],
|
|
1299
|
+
[() => true, () => props.handleConvert(props.value)],
|
|
1300
|
+
])(props)?.();
|
|
1301
|
+
|
|
1302
|
+
const Input = JSX(({ className = '', id, name, type = 'text', placeholder, pattern, value, onChange }) => {
|
|
1303
|
+
const handleChange = (e) => {
|
|
1304
|
+
const validInputValue = e.target.validity.valid ? e.target.value : value;
|
|
1305
|
+
onChange(validInputValue);
|
|
1306
|
+
};
|
|
1307
|
+
return (jsx("input", { className: className, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: handleChange }));
|
|
1308
|
+
});
|
|
1309
|
+
|
|
1310
|
+
const selectStyle = {
|
|
1311
|
+
background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
|
|
1312
|
+
};
|
|
1313
|
+
const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
|
|
1314
|
+
return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
|
|
1315
|
+
});
|
|
1316
|
+
|
|
1317
|
+
const SelectOption = JSX(({ className = '', value, selected, children }) => {
|
|
1318
|
+
return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
function renderInput(props) {
|
|
1322
|
+
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
1323
|
+
return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "shrink-0 w-20 h-9 -translate-x-8 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell, button }) => {
|
|
1327
|
+
const { useRouter, handlerDecorator } = context;
|
|
1328
|
+
const router = useRouter();
|
|
1329
|
+
const [calcState, setCalcState] = useState({
|
|
1330
|
+
inputSell: '',
|
|
1331
|
+
inputBuy: '',
|
|
1332
|
+
selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
|
|
1333
|
+
selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
|
|
1334
|
+
});
|
|
1335
|
+
const handleSetCalcState = (newState) => {
|
|
1336
|
+
setCalcState((oldState) => ({ ...oldState, ...newState }));
|
|
1337
|
+
};
|
|
1338
|
+
return (jsxs("div", { className: `grid gap-[18px] pt-2 ${className}`, children: [renderInput({
|
|
1339
|
+
placeholder: 'Хочу продать',
|
|
1340
|
+
rates: currencyRatesSell,
|
|
1341
|
+
selected: calcState.selectSell,
|
|
1342
|
+
setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
|
|
1343
|
+
value: calcState.inputSell,
|
|
1344
|
+
setValue: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
|
|
1345
|
+
}), renderInput({
|
|
1346
|
+
placeholder: 'Получу',
|
|
1347
|
+
rates: currencyRatesBuy,
|
|
1348
|
+
selected: calcState.selectBuy,
|
|
1349
|
+
setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
|
|
1350
|
+
value: calcState.inputBuy,
|
|
1351
|
+
setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
|
|
1352
|
+
}), button?.text ? (jsx(Button, { className: "py-4 mr-1", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
|
|
1353
|
+
});
|
|
1354
|
+
const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
|
|
1355
|
+
setCalcState({ selectSell: value });
|
|
1356
|
+
callbackCurrencySelect({
|
|
1357
|
+
value,
|
|
1358
|
+
oppositeValue: calcState.selectBuy,
|
|
1359
|
+
handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
|
|
1360
|
+
handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
|
|
1361
|
+
},
|
|
1362
|
+
});
|
|
1363
|
+
};
|
|
1364
|
+
const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
|
|
1365
|
+
setCalcState({ selectBuy: value });
|
|
1366
|
+
callbackCurrencySelect({
|
|
1367
|
+
value,
|
|
1368
|
+
oppositeValue: calcState.selectSell,
|
|
1369
|
+
handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
|
|
1370
|
+
});
|
|
1371
|
+
};
|
|
1372
|
+
const handleInputSell = (setCalcState, currencyRatesSell) => (value, codeFrom, codeTo) => {
|
|
1373
|
+
setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
|
|
1374
|
+
const rate = currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
|
|
1375
|
+
currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
|
|
1376
|
+
if (rate) {
|
|
1377
|
+
setCalcState({
|
|
1378
|
+
inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
};
|
|
1382
|
+
const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, codeTo, codeFrom) => {
|
|
1383
|
+
setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
|
|
1384
|
+
const rate = currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
|
|
1385
|
+
currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
|
|
1386
|
+
if (rate) {
|
|
1387
|
+
setCalcState({
|
|
1388
|
+
inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
const DEFAULT_LOCATION = {
|
|
1394
|
+
address: 'Москва, ул.Ленина д.28',
|
|
1395
|
+
distance: '6км',
|
|
1396
|
+
};
|
|
1397
|
+
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
|
|
1398
|
+
const currencyRates = useExchangeRates();
|
|
1399
|
+
const currencyRatesBuy = currencyRates.filter((_) => _.buy);
|
|
1400
|
+
currencyRatesBuy.unshift({ code: Currency.RUB });
|
|
1401
|
+
const currencyRatesSell = currencyRates.filter((_) => _.sell);
|
|
1402
|
+
currencyRatesSell.push({ code: Currency.RUB });
|
|
1403
|
+
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] }) }) }));
|
|
1404
|
+
});
|
|
1405
|
+
|
|
1406
|
+
const SVG_COLOR = {
|
|
1407
|
+
'bg-white': 'text-primary-main',
|
|
1408
|
+
transparent: 'text-white',
|
|
1409
|
+
};
|
|
1410
|
+
const TEXT_COLOR = {
|
|
1411
|
+
'bg-white': 'text-black',
|
|
1412
|
+
transparent: 'text-white',
|
|
1413
|
+
};
|
|
1414
|
+
const Logo = JSX(({ className = '', href, children, targetBlank, bgColor = 'bg-white', hideTitle }) => {
|
|
1415
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10 h-[38px]`, asSVG: true }), hideTitle ? null : (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-s font-medium ml-2.5`, children: children || 'Россельхозбанк' }))] }));
|
|
1416
|
+
});
|
|
1417
|
+
|
|
1418
|
+
const MobileAppTile = JSX(({ className = '', title = 'Мобильное приложение', description, href = '#' }) => {
|
|
1419
|
+
return (jsx("div", { className: `col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${className}`, children: href ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]", children: jsx(Logo, { className: "w-[33px]", bgColor: "transparent", hideTitle: true }) }), jsxs("a", { href: href, target: "_blank", className: "flex flex-col justify-center pl-3", children: [jsx("div", { className: "text-s font-medium mb-[3px]", children: title }), jsx("div", { className: "text-s text-secondary-text", children: description })] })] })) : null }));
|
|
1420
|
+
});
|
|
1421
|
+
|
|
1422
|
+
const Contacts = JSX(({ className = '', items, hasButton, context }) => {
|
|
1423
|
+
const router = context.useRouter();
|
|
1424
|
+
const { handlerDecorator } = context;
|
|
1425
|
+
return (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", ...useLink({ router, handlerDecorator }, {
|
|
1426
|
+
text: 'Обратная связь',
|
|
1427
|
+
href: '/',
|
|
1428
|
+
target: '_blank',
|
|
1429
|
+
}) })) : null] }));
|
|
1430
|
+
});
|
|
1431
|
+
const renderContact = (item, index) => {
|
|
1432
|
+
const { type, text, description } = item;
|
|
1433
|
+
return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "mt-1 text-s-light text-secondary-text", children: description })] }, String(index)));
|
|
1434
|
+
};
|
|
1435
|
+
const renderText = (type, text = '') => {
|
|
1436
|
+
switch (type) {
|
|
1437
|
+
case 'tel':
|
|
1438
|
+
return (jsx("a", { className: "text-h6 text-primary-text hover:text-primary-main no-underline", href: `tel:${formatTel(text)}`, children: text }));
|
|
1439
|
+
case 'email':
|
|
1440
|
+
return (jsx("a", { className: "text-xl-light text-primary-text no-underline", href: `mailto:${text}`, children: text }));
|
|
1441
|
+
default:
|
|
1442
|
+
return jsx("span", { children: text });
|
|
1443
|
+
}
|
|
1444
|
+
};
|
|
1445
|
+
const formatTel = (s) => s.replaceAll(/\D/g, '');
|
|
1446
|
+
|
|
1447
|
+
const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `text-secondary-text hover:text-primary-main inline-block no-underline ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1448
|
+
|
|
1449
|
+
const HorizontalNavigation = JSX(({ title, links, className = '', context }) => {
|
|
1450
|
+
const router = context.useRouter();
|
|
1451
|
+
const { handlerDecorator } = context;
|
|
1452
|
+
return (jsxs("div", { className: className, children: [jsx("span", { className: "text-primary-text text-s font-medium", children: title }), links?.length ? (jsx("div", { className: "flex flex-col gap-2 pt-3", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-s", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
|
|
1453
|
+
});
|
|
1454
|
+
|
|
1455
|
+
const ICONS_MAP = [
|
|
1456
|
+
{
|
|
1457
|
+
origins: ['t.me', 'telegram.org'],
|
|
1458
|
+
icon: { icon: 'TelegramIcon' },
|
|
1459
|
+
label: 'Телеграм',
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
origins: ['vk.com'],
|
|
1463
|
+
icon: { icon: 'VKIcon' },
|
|
1464
|
+
label: 'ВКонтакте',
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
origins: ['ok.ru'],
|
|
1468
|
+
icon: { icon: 'OkIcon' },
|
|
1469
|
+
label: 'Одноклассники',
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
origins: ['apps.apple.com'],
|
|
1473
|
+
icon: { icon: 'AppleIcon' },
|
|
1474
|
+
label: 'App Store',
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
origins: ['play.google.com'],
|
|
1478
|
+
icon: { icon: 'PlayMarketIcon' },
|
|
1479
|
+
label: 'Google Play',
|
|
1480
|
+
},
|
|
1481
|
+
];
|
|
1482
|
+
const MediaButton = JSX(({ href, version = 'primary' }) => {
|
|
1483
|
+
const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1484
|
+
if (!icon) {
|
|
1485
|
+
return null;
|
|
1486
|
+
}
|
|
1487
|
+
const classes = version === 'secondary'
|
|
1488
|
+
? 'bg-secondary-light hover:bg-secondary-hover'
|
|
1489
|
+
: 'border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main';
|
|
1490
|
+
const isPrimary = version === 'primary';
|
|
1491
|
+
return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, imageClassName: "group-hover:text-white", width: "24", height: "24", asSVG: true })) : null }));
|
|
1492
|
+
});
|
|
1493
|
+
|
|
1494
|
+
const SocialMedia = JSX(({ className, media, version, context }) => {
|
|
1495
|
+
const router = context.useRouter();
|
|
1496
|
+
const { handlerDecorator } = context;
|
|
1497
|
+
return (jsx("div", { className: `flex gap-2 items-start justify-start pt-6 pb-6 ${className || ''}`, children: media?.map((_, index) => (jsx(MediaButton, { version: version, ...useLink({ router, handlerDecorator }, _) }, String(index)))) }));
|
|
1498
|
+
});
|
|
1499
|
+
|
|
1500
|
+
const TextInformationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1501
|
+
|
|
1502
|
+
const TextInformation = JSX(({ className, links, context }) => {
|
|
1503
|
+
const router = context.useRouter();
|
|
1504
|
+
const { handlerDecorator } = context;
|
|
1505
|
+
return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "py-6", children: jsx("span", { className: "text-xs-light text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: `flex flex-col justify-start items-start gap-2`, children: links.map((_, i) => (jsx(TextInformationLink, { index: i, className: "", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
|
|
1506
|
+
});
|
|
1507
|
+
|
|
1508
|
+
function useSitemap() {
|
|
1509
|
+
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
1510
|
+
return data || {};
|
|
1511
|
+
}
|
|
1512
|
+
async function fetchSitemap() {
|
|
1513
|
+
const response = await fetch(sitemapURL());
|
|
1514
|
+
return await response.json();
|
|
1515
|
+
}
|
|
1516
|
+
function sitemapURL() {
|
|
1517
|
+
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
const useSearch = () => {
|
|
1521
|
+
const [term, setTerm] = useState('');
|
|
1522
|
+
return {
|
|
1523
|
+
term,
|
|
1524
|
+
setTerm: (text) => setTerm(text),
|
|
1525
|
+
};
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
const SearchBarInner = JSX(({ className, isMobile = false }) => {
|
|
1529
|
+
const { term, setTerm } = useSearch();
|
|
1530
|
+
const LoupeIconClassName = isMobile ? 'w-[20px] h-[20px]' : 'w-[24px] h-[24px]';
|
|
1531
|
+
const SearchBarLabelClassName = isMobile ? 'text-s' : 'text-l-light';
|
|
1532
|
+
const SearchBarInputClassName = isMobile ? ' placeholder-transparent' : 'h-full';
|
|
1533
|
+
const inputPlaceholder = isMobile ? 'some search' : undefined;
|
|
1534
|
+
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: LoupeIconClassName, children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), term ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text ${SearchBarLabelClassName}`, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
|
|
1473
1535
|
outline-none pr-[6%] border-main-divider focus:border-primary-text ${SearchBarInputClassName}`, value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input", placeholder: inputPlaceholder }), isMobile ? (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1536
|
+
e.preventDefault();
|
|
1537
|
+
setTerm('');
|
|
1538
|
+
}, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24" }) })) : (jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (ev) => {
|
|
1539
|
+
ev?.preventDefault();
|
|
1540
|
+
console.log('click');
|
|
1541
|
+
}, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1544
|
+
const SearchBar = JSX(({ className = '' }) => {
|
|
1545
|
+
return jsx(SearchBarInner, { className: className, isMobile: true });
|
|
1546
|
+
});
|
|
1547
|
+
|
|
1548
|
+
const getAccordionItems = (items) => items?.map((item) => ({
|
|
1549
|
+
label: item.text || '',
|
|
1550
|
+
blocks: [
|
|
1551
|
+
{
|
|
1552
|
+
accordionBlockType: 'LinkList',
|
|
1553
|
+
documents: item.items || [],
|
|
1554
|
+
},
|
|
1555
|
+
],
|
|
1556
|
+
}));
|
|
1557
|
+
|
|
1558
|
+
const Footer = JSX(({ className = '', documents, relatedEnterprises, contacts, socialMedia, context, horizontalNavigationTitle, }) => {
|
|
1559
|
+
const sitemap = useSitemap();
|
|
1560
|
+
const dispositions = sitemap?.dispositions;
|
|
1561
|
+
return (jsxs("footer", { className: `font-sans px-4 py-[26px] bg-white ${className}`, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, context: context, hasButton: true }), jsx(Accordion, { context: context, className: "!p-0 mb-4", accordionItems: getAccordionItems(sitemap.topItems) }), jsx("div", { children: dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { context: context, title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android" }), jsx(SearchBar, { context: context, className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia, context: context }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1562
|
+
});
|
|
1563
|
+
const renderSubMenuItem = (menu, i) => {
|
|
1564
|
+
const { icon, href, text } = menu;
|
|
1565
|
+
return (jsxs(Button, { version: "link", href: href, className: "flex text-s mb-4 w-6", children: [icon ? jsx(Img, { className: "pr-1", image: icon, width: "24", height: "24", asSVG: true }) : null, jsx("span", { className: "pl-2.5 font-medium text-primary-text", children: text })] }, `footer-${i}`));
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1568
|
+
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1569
|
+
|
|
1570
|
+
const isHrefActive = (href, router, cmp = (targetHref, baseHref) => baseHref.startsWith(targetHref)) => {
|
|
1571
|
+
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
1572
|
+
};
|
|
1573
|
+
|
|
1574
|
+
const isSubItemActive = (router) => (subItem) => isHrefActive(subItem.href, router);
|
|
1575
|
+
|
|
1576
|
+
const findActiveSubItem = (router) => (items = []) => {
|
|
1577
|
+
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
1578
|
+
return possibleActiveSubItems?.length
|
|
1579
|
+
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
1580
|
+
: undefined;
|
|
1581
|
+
};
|
|
1582
|
+
|
|
1583
|
+
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
1584
|
+
|
|
1585
|
+
const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) ||
|
|
1586
|
+
isHrefActive(topItem.href, router) ||
|
|
1587
|
+
checkIsHrefSameOrigin(topItem.href, router);
|
|
1588
|
+
|
|
1589
|
+
const cmp = (a) => (b) => a?.href === b?.href;
|
|
1590
|
+
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
1591
|
+
const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
|
|
1592
|
+
const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
|
|
1593
|
+
|
|
1594
|
+
const TEXT_CLASSES = 'font-sans text-s';
|
|
1595
|
+
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
|
|
1596
|
+
const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white' }) => {
|
|
1597
|
+
return (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] }));
|
|
1598
|
+
});
|
|
1599
|
+
const getTextClasses = (bgColor, active = false) => {
|
|
1600
|
+
let classes = 'text-white';
|
|
1601
|
+
if (bgColor === 'bg-white') {
|
|
1602
|
+
classes = active ? 'text-primary-main' : 'text-secondary-text hover:text-primary-main';
|
|
1603
|
+
}
|
|
1604
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
1605
|
+
};
|
|
1606
|
+
const getBorderClasses = (bgColor, active = false) => {
|
|
1607
|
+
if (!active) {
|
|
1608
|
+
return BORDER_CLASSES;
|
|
1609
|
+
}
|
|
1610
|
+
return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
const DaData = DaDataAPI('https://10.80.4.9');
|
|
1614
|
+
function useGeolocation(defaultLocation) {
|
|
1615
|
+
const [city, setCity] = useState(defaultLocation);
|
|
1616
|
+
useEffect(() => {
|
|
1617
|
+
setCity(globalThis?.localStorage.getItem('location') || defaultLocation);
|
|
1618
|
+
}, [defaultLocation]);
|
|
1619
|
+
const getCity = useCallback(() => {
|
|
1620
|
+
DaData.getFetcherAddress().then((_) => {
|
|
1621
|
+
const location = _ || defaultLocation;
|
|
1622
|
+
globalThis?.localStorage.setItem('location', location);
|
|
1623
|
+
setCity(location);
|
|
1624
|
+
});
|
|
1625
|
+
}, [defaultLocation]);
|
|
1626
|
+
return [city, getCity];
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
const HeaderBurger = JSX(({ context, burgerSubMenu, onClick, defaultLocation = '', children }) => {
|
|
1630
|
+
const [city, getCity] = useGeolocation(defaultLocation);
|
|
1631
|
+
return (jsxs("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [jsx("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), jsxs("button", { onClick: getCity, className: "flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer", children: [jsx(Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), city] }), children, jsx("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), jsx(SearchBar, { context: context, className: "grow" })] }));
|
|
1632
|
+
});
|
|
1633
|
+
const renderBurgerSubMenuItem = (menu, i) => {
|
|
1634
|
+
const { icon, href, text } = menu;
|
|
1635
|
+
return (jsxs("a", { href: href, className: "flex text-s mb-4 hover:text-primary-main", children: [icon ? (jsx(Img, { className: "text-primary-main pr-1", image: icon, width: "24", height: "24", asSVG: true })) : null, jsx("span", { className: "font-medium pl-0.5", children: text })] }, `headerSubMenu-${i}`));
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1638
|
+
const HeaderTop = JSX(({ onClick, bgColor }) => (jsxs("div", { className: "flex items-center justify-between border-0 border-b border-main-divider h-[50px]", children: [jsxs("div", { className: "flex items-center", children: [jsx("button", { className: "pl-0 pr-4 border-0 bg-transparent cursor-pointer", onClick: onClick, "aria-label": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E", children: jsx(Img, { image: { icon: 'BurgerIcon', iconVersion: bgColor === 'bg-white' ? 'black' : 'white' }, className: "text-primary-text w-6 h-6", width: "24", height: "24", asSVG: true }) }), jsx(Logo, { className: "mr-8", bgColor: bgColor })] }), jsx("button", { className: `${bgColor === 'bg-white' ? 'text-primary-main' : 'text-white'} text-s border-0 bg-transparent cursor-pointer`, children: "\u0412\u043E\u0439\u0442\u0438" })] })));
|
|
1639
|
+
|
|
1640
|
+
const Header = JSX(({ className = '', defaultLocation, bgColor = 'bg-white', context, topItems }) => {
|
|
1641
|
+
const router = context.useRouter();
|
|
1642
|
+
const sitemap = useSitemap();
|
|
1643
|
+
const dispositions = sitemap?.dispositions;
|
|
1644
|
+
const { handlerDecorator } = context;
|
|
1645
|
+
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
1646
|
+
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
1647
|
+
const subItems = activeTopItem?.items;
|
|
1648
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
1649
|
+
const [burgerMenuShow, setBurgerMenuShow] = useState(false);
|
|
1650
|
+
const toggleBurgerMenu = () => setBurgerMenuShow(!burgerMenuShow);
|
|
1651
|
+
return (jsxs("header", { className: `${bgColor} ${className}`, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: toggleBurgerMenu, bgColor: bgColor }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => renderSubItem({
|
|
1652
|
+
...useLink({ router, handlerDecorator }, _),
|
|
1653
|
+
active: _ === activeSubItem,
|
|
1654
|
+
bgColor,
|
|
1655
|
+
}, i)) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { context: context, onClick: toggleBurgerMenu, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx(Accordion, { context: context, accordionItems: getAccordionItems(sitemap.topItems), className: "!p-0 mb-4" }) })) : null] }));
|
|
1656
|
+
});
|
|
1657
|
+
const renderSubItem = (item, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", ...item }, String(i)));
|
|
1658
|
+
|
|
1659
|
+
const getColSpan = (className) => {
|
|
1660
|
+
const colSpanPrefix = 'col-span-';
|
|
1661
|
+
const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
|
|
1662
|
+
return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
function getTileHeadingType(className = '') {
|
|
1666
|
+
const colSpan = getColSpan(className);
|
|
1667
|
+
if (colSpan <= 4) {
|
|
1668
|
+
return 'S';
|
|
1669
|
+
}
|
|
1670
|
+
else if (colSpan <= 8) {
|
|
1671
|
+
return 'M';
|
|
1672
|
+
}
|
|
1673
|
+
else {
|
|
1674
|
+
return 'L';
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
function getTileMinHeight(className = '') {
|
|
1679
|
+
const colSpan = getColSpan(className);
|
|
1680
|
+
if (colSpan <= 6) {
|
|
1681
|
+
return 'min-h-[300px]';
|
|
1682
|
+
}
|
|
1683
|
+
else if (colSpan <= 8) {
|
|
1684
|
+
return 'min-h-[320px]';
|
|
1685
|
+
}
|
|
1686
|
+
else {
|
|
1687
|
+
return 'min-h-[360px]';
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
function getTileRightPadding(className = '') {
|
|
1692
|
+
const colSpan = getColSpan(className);
|
|
1693
|
+
if (colSpan <= 6) {
|
|
1694
|
+
return 'pr-9';
|
|
1695
|
+
}
|
|
1696
|
+
else if (colSpan <= 8) {
|
|
1697
|
+
return 'pr-[4.75rem]';
|
|
1698
|
+
}
|
|
1699
|
+
else {
|
|
1700
|
+
return 'pr-[9.4rem]';
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
const GOLDEN_RATIO = 1.618;
|
|
1705
|
+
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', ...rest }) => {
|
|
1706
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: [jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, headlineVersion: getTileHeadingType(className) }), jsx("figure", { className: "m-0 min-w-[80%]", children: renderShimmer() })] }));
|
|
1707
|
+
});
|
|
1708
|
+
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
1709
|
+
.map((_) => Math.floor(_))
|
|
1710
|
+
.map(renderShimmerItem);
|
|
1711
|
+
const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1712
|
+
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1713
|
+
|
|
1714
|
+
const productGalleryStyleMap = {
|
|
1715
|
+
primary: 'bg-white text-primary-text',
|
|
1716
|
+
secondary: 'bg-primary-main text-white',
|
|
1717
|
+
};
|
|
1718
|
+
const ProductGalleryBlock = JSX(({ block, context, className = '' }) => {
|
|
1719
|
+
const version = block?.version ?? 'primary';
|
|
1720
|
+
return (jsx("section", { className: `flex grow-0 shrink-0 basis-full px-4 pt-6 ${productGalleryStyleMap[version]} ${className}`, role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { context: context, ...block }) }) }));
|
|
1721
|
+
});
|
|
1722
|
+
|
|
1723
|
+
const ProductGallery = JSX(({ className, context, slides = [] }) => {
|
|
1724
|
+
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1725
|
+
return (jsx("section", { className: `font-sans bg-white overflow-hidden w-100 pb-6 ${className || ''}`, children: jsx(SwipeListControl, { context: context, children: galleryBlocks.map((block, i) => (jsx(ProductGalleryBlock, { block: block, context: context }, String(i)))) }) }));
|
|
1726
|
+
});
|
|
1727
|
+
|
|
1728
|
+
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
1729
|
+
|
|
1730
|
+
const STEPS_BLOCK_STYLE_MAPS = {
|
|
1731
|
+
primary: {
|
|
1732
|
+
background: 'bg-white',
|
|
1733
|
+
title: 'text-primary-text',
|
|
1734
|
+
description: 'text-secondary-text',
|
|
1735
|
+
iconText: 'text-secondary-text',
|
|
1736
|
+
iconBackground: 'bg-main-divider',
|
|
1737
|
+
iconConnector: 'bg-secondary-light',
|
|
1738
|
+
},
|
|
1739
|
+
secondary: {
|
|
1740
|
+
background: 'bg-primary-main',
|
|
1741
|
+
title: 'text-white',
|
|
1742
|
+
description: 'text-white/80',
|
|
1743
|
+
iconText: 'text-white',
|
|
1744
|
+
iconBackground: 'bg-white/30',
|
|
1745
|
+
iconConnector: 'bg-white',
|
|
1746
|
+
},
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1749
|
+
const STEPS_SIZE_MAP = {
|
|
1750
|
+
normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
|
|
1751
|
+
small: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]',
|
|
1752
|
+
};
|
|
1753
|
+
const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
|
|
1754
|
+
normal: 'min-h-[70px]',
|
|
1755
|
+
small: 'min-h-[50px]',
|
|
1756
|
+
};
|
|
1757
|
+
const StepsBlock = JSX(({ className, title, description, showLines = true, steps, size = 'normal', version = 'primary', }) => {
|
|
1758
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
1759
|
+
return (jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
1682
1760
|
${styleMap.background} ${styleMap.title} ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${styleMap.title}`, title: title })) : null, description ? (jsx("p", { className: `text-m-light text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? (jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStepTitle(size, version, showLines)) }) })) : null] }));
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1761
|
+
});
|
|
1762
|
+
const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
|
|
1763
|
+
const isLastStep = steps.length - 1 === i;
|
|
1764
|
+
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
1765
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
1766
|
+
return (jsx("div", { children: jsxs("div", { className: "flex flex-row text-center relative", children: [jsxs("div", { className: "overflow-hidden", children: [renderIconArea(size, version)(step, i), isLastStep ? null : (jsx("div", { className: `min-h-8 h-full w-[2px] ${showLines ? styleMap.iconConnector : ''} ${margin}` }))] }), jsxs("div", { className: `flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`, children: [step.label ? (jsx("div", { className: "text-m-title-xs font-medium m-0 text-left mb-1", children: step.label })) : null, step.description ? (jsx("div", { className: `text-s ${styleMap.description} text-left`, children: step.description })) : null] })] }) }, String(i)));
|
|
1767
|
+
};
|
|
1768
|
+
const renderIconArea = (size, version) => (step, i) => {
|
|
1769
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
1770
|
+
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
1771
|
+
const iconSize = size === 'normal' ? '38' : '27';
|
|
1772
|
+
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
1773
|
+
return (jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: jsx("span", { className: `font-medium flex self-center ${styleMap.title} ${iconTextSize}`, children: checkIsIconRenderable(step?.icon) ? (jsx(Img, { image: step.icon, width: iconSize, height: iconSize, asSVG: true })) : (jsx("span", { children: i + 1 })) }) }));
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
const TableTileHeader = JSX(({ title, icon }) => {
|
|
1777
|
+
return (jsxs("div", { className: "flex gap-2.5 mb-2", children: [title ? jsx(Heading, { headingType: "h3", className: "font-medium", title: title }) : null, icon ? (jsx(Img, { className: "ml-auto max-w-6 max-h-6", image: icon, width: "24px", height: "24px" })) : null] }));
|
|
1778
|
+
});
|
|
1779
|
+
|
|
1780
|
+
const getButtonAriaLabel = (icon) => icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
|
|
1781
|
+
|
|
1782
|
+
const TariffsTableTileCell = JSX(({ header, data }) => {
|
|
1783
|
+
return (jsxs("div", { className: "rounded-md border-main-stroke h-full box-border border p-4", children: [jsx(TableTileHeader, { ...header }), data?.length ? data.map(renderCellInner) : null] }));
|
|
1784
|
+
});
|
|
1785
|
+
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? jsx("div", { className: "text-s m-0", children: label }) : null, description ? jsx("div", { className: "text-s text-secondary-text mt-[3px]", children: description }) : null, list?.items?.length ? renderList(list) : null, image ? jsx(Img, { image: { ...image, className: 'm-0' } }) : null, buttons?.length ? renderButtons(buttons) : null] }, String(i)));
|
|
1786
|
+
const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-s", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
|
|
1787
|
+
const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps, "aria-label": icon }, String(idx)))) }));
|
|
1788
|
+
|
|
1789
|
+
const TariffsTableHorizontal = JSX(({ tiles, context }) => (jsx(SwipeListControl, { context: context, children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
|
|
1790
|
+
|
|
1791
|
+
const TariffsTableVertical = JSX(({ tiles }) => (jsx("div", { className: "flex flex-col gap-3.5", children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
|
|
1792
|
+
|
|
1793
|
+
const TariffsTable = JSX(({ className, context, title, description, columns, rowHeaders, orientation = 'vertical' }) => {
|
|
1794
|
+
const colData = getColData(columns);
|
|
1795
|
+
const tiles = getTiles(rowHeaders, colData);
|
|
1796
|
+
const headingMargin = description ? 'mb-2' : 'mb-5';
|
|
1797
|
+
return (jsxs("section", { className: `px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `text-center ${headingMargin}`, title: title })) : null, description ? jsx("div", { className: "mb-5 text-center text-m", children: description }) : null, tiles?.length ? renderOrientationTable(orientation, tiles, context) : null] }));
|
|
1798
|
+
});
|
|
1799
|
+
function renderOrientationTable(orientation, tiles, context) {
|
|
1800
|
+
return orientation === 'vertical' ? (jsx(TariffsTableVertical, { tiles: tiles })) : (jsx(TariffsTableHorizontal, { context: context, tiles: tiles }));
|
|
1801
|
+
}
|
|
1802
|
+
const getColData = (columns) => columns?.[0].data ? columns[0].data : [];
|
|
1803
|
+
const getTiles = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
1804
|
+
header,
|
|
1805
|
+
data: colData?.[i] || [{}],
|
|
1806
|
+
}));
|
|
1807
|
+
|
|
1808
|
+
const Blocks = {
|
|
1809
|
+
Accordion,
|
|
1810
|
+
ComparisonTable,
|
|
1811
|
+
ExchangeRateTile,
|
|
1812
|
+
Footer,
|
|
1813
|
+
Gallery,
|
|
1814
|
+
Header,
|
|
1815
|
+
Headline,
|
|
1816
|
+
LinkDocs,
|
|
1817
|
+
LinkList,
|
|
1818
|
+
MobileAppTile,
|
|
1819
|
+
ProductBlock,
|
|
1820
|
+
ProductGallery,
|
|
1821
|
+
StepsBlock,
|
|
1822
|
+
TariffsTable,
|
|
1823
|
+
TextBlock,
|
|
1824
|
+
Placeholder,
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
const ASSIST_BASE_URL = process.env.NEXT_PUBLIC_ASSIST_BASE_URL || '';
|
|
1828
|
+
const PROJECT_ID = process.env.NEXT_PUBLIC_PROJECT_ID || '';
|
|
1829
|
+
const api = LikeAPI(PROJECT_ID, ASSIST_BASE_URL);
|
|
1830
|
+
function useLikeService(pagePath) {
|
|
1831
|
+
const [likeCount, setLikeCount] = useState(0);
|
|
1832
|
+
useEffect(() => {
|
|
1833
|
+
(async () => {
|
|
1834
|
+
const [likeData] = await api.getLikeCount(pagePath);
|
|
1835
|
+
setLikeCount(likeData?.value || 0);
|
|
1836
|
+
})();
|
|
1837
|
+
}, [pagePath]);
|
|
1838
|
+
const like = useCallback(async () => {
|
|
1839
|
+
setLikeCount(await api.like(pagePath));
|
|
1840
|
+
}, [pagePath]);
|
|
1841
|
+
const dislike = useCallback(async () => {
|
|
1842
|
+
setLikeCount(await api.dislike(pagePath));
|
|
1843
|
+
}, [pagePath]);
|
|
1844
|
+
return {
|
|
1845
|
+
likeCount,
|
|
1846
|
+
like,
|
|
1847
|
+
dislike,
|
|
1848
|
+
};
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
1852
|
+
const renderLikeIcon = () => {
|
|
1853
|
+
const params = {
|
|
1854
|
+
stroke: '#292D32',
|
|
1855
|
+
strokeLinecap: 'round',
|
|
1856
|
+
strokeLinejoin: 'round',
|
|
1857
|
+
strokeWidth: '1.5',
|
|
1858
|
+
};
|
|
1859
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10",
|
|
1860
|
+
/* eslint-disable max-len */
|
|
1861
|
+
d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
const LikeControl = JSX(({ className, context, ...rest }) => {
|
|
1865
|
+
const { useRouter, handlerDecorator = defaultHandlerDecorator } = context;
|
|
1866
|
+
const router = useRouter();
|
|
1867
|
+
const likeService = useLikeService(router.pathname);
|
|
1868
|
+
return (jsxs(BlockWrapper, { tag: "div", context: context, className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, ...rest, children: [jsx(LikeButton, { onClick: handlerDecorator(likeService.like), ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: handlerDecorator(likeService.dislike), className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
|
|
1869
|
+
});
|
|
1870
|
+
|
|
1871
|
+
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
1872
|
+
const ContentPage = JSX(({ className = '', context, blocksRegistry, data = {}, blockDecorator = defaultBlockDecorator, }) => {
|
|
1873
|
+
const { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' } = data;
|
|
1874
|
+
const { header } = slots;
|
|
1875
|
+
return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, page: data, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context, page: data }, i)) })) : null, likeControl ? (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") })) : null] }));
|
|
1876
|
+
});
|
|
1877
|
+
function renderBlock({ block, blockDecorator, blocksRegistry, context, page }, i) {
|
|
1878
|
+
const { type } = block;
|
|
1879
|
+
if (!(type && type in blocksRegistry)) {
|
|
1880
|
+
console.warn(`No block with "${type}" is registered`);
|
|
1881
|
+
}
|
|
1882
|
+
const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
|
|
1883
|
+
return blockDecorator({
|
|
1884
|
+
blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
|
|
1885
|
+
block,
|
|
1886
|
+
render: (props) => {
|
|
1887
|
+
const { version, content, anchor, labels } = props.block;
|
|
1888
|
+
return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, page: page, anchor: anchor, labels: labels, ...content }, `${type}-${i}`));
|
|
1889
|
+
},
|
|
1890
|
+
}, `block-${i}`);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
function joinList(sep) {
|
|
1894
|
+
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
exports.Blocks = Blocks;
|
|
1898
|
+
exports.ContentPage = ContentPage;
|
|
1899
|
+
exports.DaDataAPI = DaDataAPI;
|
|
1900
|
+
exports.LikeAPI = LikeAPI;
|
|
1901
|
+
exports.joinList = joinList;
|
|
1902
|
+
exports.projectSettings = projectSettings;
|
|
1903
|
+
exports.setup = setup;
|
|
1904
|
+
exports.setupHooks = setupHooks;
|
|
1905
|
+
exports.url = url;
|
|
1906
|
+
|
|
1907
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1803
1908
|
|
|
1804
1909
|
}));
|