@redneckz/wildless-cms-uni-blocks 0.8.27 → 0.8.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.8.24.js +24 -0
- package/bin/migration-scripts/0.8.29.js +41 -0
- package/bundle/EventBus/defaultEventBus.d.ts +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +305 -109
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -5
- package/bundle/components/BaseTile/BaseTileProps.d.ts +2 -2
- package/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -8
- package/bundle/components/Bonus/BonusContent.d.ts +0 -1
- package/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -8
- package/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +2 -9
- package/bundle/components/ButtonBlock/ButtonBlockContent.d.ts +1 -5
- package/bundle/components/Calculator/CalculatorContent.d.ts +2 -4
- package/bundle/components/Carousel/CarouselContent.d.ts +1 -4
- package/bundle/components/CarouselCard/CarouselCardContent.d.ts +2 -10
- package/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +2 -10
- package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +3 -21
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -29
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +2 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -21
- package/bundle/components/ComparisonTable/ComparisonTableContent.d.ts +4 -8
- package/bundle/components/ComparisonTable/HeaderCell.mobile.d.ts +2 -3
- package/bundle/components/ErrorBlock/ErrorBlockContent.d.ts +4 -23
- package/bundle/components/Footer/FooterDataProps.d.ts +2 -2
- package/bundle/components/GracePeriod/GracePeriodContent.d.ts +3 -14
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -1
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +3 -1
- package/bundle/components/ImgBlock/ImgBlockContent.d.ts +2 -4
- package/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +2 -3
- package/bundle/components/LinkDocs/LinkDocsContent.d.ts +3 -17
- package/bundle/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +3 -20
- package/bundle/components/PictureText/PictureTextContent.d.ts +3 -21
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +3 -23
- package/bundle/components/ProductTile/ProductTileContent.d.ts +2 -17
- package/bundle/components/Recommendation/RecommendationContent.d.ts +2 -28
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +7 -23
- package/bundle/components/Tabs/TabsContent.d.ts +1 -4
- package/bundle/components/TariffsTable/TariffsTableContent.d.ts +6 -11
- package/bundle/components/TextBlock/TextBlockContent.d.ts +4 -9
- package/bundle/components/Tile/TileContent.d.ts +3 -22
- package/bundle/components/Video/VideoContent.d.ts +2 -15
- package/bundle/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/bundle/hooks/useCarouselControls.d.ts +0 -2
- package/bundle/hooks/useLink.d.ts +1 -1
- package/bundle/{services/sitemap → hooks}/useSWRResource.d.ts +1 -1
- package/bundle/model/Bullets.d.ts +4 -0
- package/bundle/model/Button.d.ts +15 -0
- package/bundle/model/HeadlineType.d.ts +4 -0
- package/bundle/model/Picture.d.ts +3 -10
- package/bundle/services/search/jaroWinklerDistance.d.ts +1 -0
- package/bundle/services/search/joinMaps.d.ts +1 -0
- package/bundle/services/search/search.d.ts +12 -0
- package/bundle/services/search/textRank.d.ts +1 -0
- package/bundle/services/search/tokenize.d.ts +1 -0
- package/bundle/services/search/useSearch.d.ts +8 -0
- package/{lib/services/sitemap/SitemapProps.d.ts → bundle/services/sitemap/SitemapData.d.ts} +1 -1
- package/bundle/ui-kit/BlockWrapper.d.ts +1 -0
- package/bundle/ui-kit/Button/ButtonProps.d.ts +6 -7
- package/bundle/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/bundle/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/bundle/ui-kit/List/ListProps.d.ts +3 -4
- package/bundle/ui-kit/Location/Location.d.ts +1 -18
- package/bundle/ui-kit/Location/LocationProps.d.ts +16 -0
- package/bundle/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +2 -0
- package/bundle/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/bundle/{components/Footer → ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/bundle/utils/Comparator.d.ts +4 -0
- package/bundle/utils/maxBy.d.ts +1 -0
- package/bundle/utils/minBy.d.ts +1 -0
- package/bundle/utils/sum.d.ts +1 -0
- package/bundle/utils/unique.d.ts +1 -0
- package/bundle/utils/url.d.ts +1 -1
- package/bundle/utils/zip.d.ts +4 -0
- package/dist/EventBus/defaultEventBus.d.ts +1 -0
- package/dist/EventBus/defaultEventBus.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -5
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/BaseTile/BaseTileProps.d.ts +2 -2
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -8
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Bonus/BonusContent.d.ts +0 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -8
- package/dist/components/BusinessBlock/BusinessBlockContent.d.ts +2 -9
- package/dist/components/ButtonBlock/ButtonBlockContent.d.ts +1 -5
- package/dist/components/Calculator/CalculatorContent.d.ts +2 -4
- package/dist/components/Carousel/CarouselContent.d.ts +1 -4
- package/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCardContent.d.ts +2 -10
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +2 -10
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +3 -21
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -29
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +8 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +2 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +12 -7
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -21
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -8
- package/dist/components/ComparisonTable/HeaderCell.mobile.d.ts +2 -3
- package/dist/components/ContentPage/ContentPage.js +7 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ErrorBlock/ErrorBlock.js +2 -1
- package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +4 -23
- package/dist/components/Footer/Footer.fallback.js +1 -1
- package/dist/components/Footer/Footer.fallback.js.map +1 -1
- package/dist/components/Footer/Footer.js +4 -3
- package/dist/components/Footer/Footer.js.map +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/FooterDataProps.d.ts +2 -2
- package/dist/components/Footer/MediaButton.js +5 -2
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js +1 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriodContent.d.ts +3 -14
- package/dist/components/Header/Header.fallback.js +1 -1
- package/dist/components/Header/Header.fallback.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +1 -1
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +3 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Headline/Headline.js +2 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js +2 -2
- package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +3 -1
- package/dist/components/ImgBlock/ImgBlockContent.d.ts +2 -4
- package/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +2 -3
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -17
- package/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +3 -20
- package/dist/components/PictureText/PictureTextContent.d.ts +3 -21
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -23
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +2 -17
- package/dist/components/Recommendation/RecommendationContent.d.ts +2 -28
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +7 -23
- package/dist/components/Tabs/TabsContent.d.ts +1 -4
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +6 -11
- package/dist/components/TextBlock/TextBlockContent.d.ts +4 -9
- package/dist/components/Tile/TileContent.d.ts +3 -22
- package/dist/components/VerticalLayout/VerticalLayout.js +5 -3
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/components/Video/VideoContent.d.ts +2 -15
- package/dist/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/dist/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/dist/hooks/fallbackWCMSResource.js.map +1 -0
- package/dist/hooks/useCarouselControls.d.ts +0 -2
- package/dist/hooks/useCarouselControls.js +7 -15
- package/dist/hooks/useCarouselControls.js.map +1 -1
- package/dist/hooks/useLink.d.ts +1 -1
- package/dist/{services/sitemap → hooks}/useSWRResource.d.ts +1 -1
- package/{mobile/dist/services/sitemap → dist/hooks}/useSWRResource.js +1 -1
- package/dist/hooks/useSWRResource.js.map +1 -0
- package/dist/model/Bullets.d.ts +4 -0
- package/{mobile/dist/model/SitemapProps.js → dist/model/Bullets.js} +1 -1
- package/dist/model/Bullets.js.map +1 -0
- package/dist/model/Button.d.ts +15 -0
- package/{mobile/dist/services/sitemap/SitemapProps.js → dist/model/Button.js} +1 -1
- package/dist/model/Button.js.map +1 -0
- package/dist/model/HeadlineType.d.ts +4 -0
- package/dist/model/Picture.d.ts +3 -10
- package/dist/services/search/jaroWinklerDistance.d.ts +1 -0
- package/dist/services/search/jaroWinklerDistance.js +67 -0
- package/dist/services/search/jaroWinklerDistance.js.map +1 -0
- package/dist/services/search/joinMaps.d.ts +1 -0
- package/dist/services/search/joinMaps.js +10 -0
- package/dist/services/search/joinMaps.js.map +1 -0
- package/dist/services/search/search.d.ts +12 -0
- package/dist/services/search/search.js +39 -0
- package/dist/services/search/search.js.map +1 -0
- package/dist/services/search/textRank.d.ts +1 -0
- package/dist/services/search/textRank.js +14 -0
- package/dist/services/search/textRank.js.map +1 -0
- package/dist/services/search/tokenize.d.ts +1 -0
- package/dist/services/search/tokenize.js +9 -0
- package/dist/services/search/tokenize.js.map +1 -0
- package/dist/services/search/useSearch.d.ts +8 -0
- package/dist/services/search/useSearch.js +33 -0
- package/dist/services/search/useSearch.js.map +1 -0
- package/{bundle/services/sitemap/SitemapProps.d.ts → dist/services/sitemap/SitemapData.d.ts} +1 -1
- package/dist/{model/SitemapProps.js → services/sitemap/SitemapData.js} +1 -1
- package/dist/services/sitemap/SitemapData.js.map +1 -0
- package/dist/ui-kit/BlockWrapper.d.ts +1 -0
- package/dist/ui-kit/BlockWrapper.js +3 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Button/ButtonProps.d.ts +6 -7
- package/dist/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/dist/ui-kit/Dialog/CloseButton.js +8 -0
- package/dist/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/dist/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/dist/ui-kit/Dialog/Dialog.js +26 -0
- package/dist/ui-kit/Dialog/Dialog.js.map +1 -0
- package/dist/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/dist/ui-kit/List/ListProps.d.ts +3 -4
- package/dist/ui-kit/Location/Location.d.ts +1 -18
- package/dist/ui-kit/Location/Location.js +11 -15
- package/dist/ui-kit/Location/Location.js.map +1 -1
- package/dist/ui-kit/Location/LocationProps.d.ts +16 -0
- package/dist/ui-kit/Location/LocationProps.js +2 -0
- package/dist/ui-kit/Location/LocationProps.js.map +1 -0
- package/dist/ui-kit/Location/SearchBar.js +1 -1
- package/dist/ui-kit/Location/SearchBar.js.map +1 -1
- package/dist/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/dist/{model → ui-kit}/PreventableEvent.js +0 -0
- package/dist/ui-kit/PreventableEvent.js.map +1 -0
- package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +2 -0
- package/dist/ui-kit/SearchBar/SearchBarInner.js +46 -16
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/dist/ui-kit/SearchBar/SearchBarInput.js +14 -0
- package/dist/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/{lib/components/Footer → dist/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/dist/ui-kit/Sitemap/Sitemap.js +23 -0
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/Comparator.d.ts +4 -0
- package/dist/utils/Comparator.js +9 -0
- package/dist/utils/Comparator.js.map +1 -0
- package/dist/utils/fetchJSON.js +1 -1
- package/dist/utils/fetchJSON.js.map +1 -1
- package/dist/utils/groupBy.js +6 -6
- package/dist/utils/groupBy.js.map +1 -1
- package/dist/utils/maxBy.d.ts +1 -0
- package/dist/utils/maxBy.js +2 -1
- package/dist/utils/maxBy.js.map +1 -1
- package/dist/utils/minBy.d.ts +1 -0
- package/dist/utils/minBy.js +2 -1
- package/dist/utils/minBy.js.map +1 -1
- package/dist/utils/sum.d.ts +1 -0
- package/dist/utils/sum.js +5 -0
- package/dist/utils/sum.js.map +1 -0
- package/dist/utils/unique.d.ts +1 -0
- package/dist/utils/unique.js +5 -0
- package/dist/utils/unique.js.map +1 -0
- package/dist/utils/url.d.ts +1 -1
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/zip.d.ts +4 -0
- package/dist/utils/zip.js +7 -0
- package/dist/utils/zip.js.map +1 -0
- package/lib/EventBus/defaultEventBus.d.ts +1 -0
- package/lib/EventBus/defaultEventBus.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -5
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/BaseTile/BaseTileProps.d.ts +2 -2
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -8
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Bonus/BonusContent.d.ts +0 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -8
- package/lib/components/BusinessBlock/BusinessBlockContent.d.ts +2 -9
- package/lib/components/ButtonBlock/ButtonBlockContent.d.ts +1 -5
- package/lib/components/Calculator/CalculatorContent.d.ts +2 -4
- package/lib/components/Carousel/CarouselContent.d.ts +1 -4
- package/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCardContent.d.ts +2 -10
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +2 -10
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +3 -21
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -29
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +8 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +2 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +4 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +12 -7
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -21
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -8
- package/lib/components/ComparisonTable/HeaderCell.mobile.d.ts +2 -3
- package/lib/components/ContentPage/ContentPage.js +7 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ErrorBlock/ErrorBlock.js +2 -1
- package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +4 -23
- package/lib/components/Footer/Footer.fallback.js +1 -1
- package/lib/components/Footer/Footer.fallback.js.map +1 -1
- package/lib/components/Footer/Footer.js +4 -3
- package/lib/components/Footer/Footer.js.map +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/FooterDataProps.d.ts +2 -2
- package/lib/components/Footer/MediaButton.js +5 -2
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js +1 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriodContent.d.ts +3 -14
- package/lib/components/Header/Header.fallback.js +1 -1
- package/lib/components/Header/Header.fallback.js.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +1 -1
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +3 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Headline/Headline.js +2 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.js +2 -2
- package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +3 -1
- package/lib/components/ImgBlock/ImgBlockContent.d.ts +2 -4
- package/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +2 -3
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -17
- package/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +3 -20
- package/lib/components/PictureText/PictureTextContent.d.ts +3 -21
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -23
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +2 -17
- package/lib/components/Recommendation/RecommendationContent.d.ts +2 -28
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +7 -23
- package/lib/components/Tabs/TabsContent.d.ts +1 -4
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +6 -11
- package/lib/components/TextBlock/TextBlockContent.d.ts +4 -9
- package/lib/components/Tile/TileContent.d.ts +3 -22
- package/lib/components/VerticalLayout/VerticalLayout.js +5 -3
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/components/Video/VideoContent.d.ts +2 -15
- package/lib/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/lib/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/lib/hooks/fallbackWCMSResource.js.map +1 -0
- package/lib/hooks/useCarouselControls.d.ts +0 -2
- package/lib/hooks/useCarouselControls.js +7 -15
- package/lib/hooks/useCarouselControls.js.map +1 -1
- package/lib/hooks/useLink.d.ts +1 -1
- package/lib/{services/sitemap → hooks}/useSWRResource.d.ts +1 -1
- package/lib/{services/sitemap → hooks}/useSWRResource.js +1 -1
- package/lib/hooks/useSWRResource.js.map +1 -0
- package/lib/model/Bullets.d.ts +4 -0
- package/lib/model/Bullets.js +2 -0
- package/lib/model/Bullets.js.map +1 -0
- package/lib/model/Button.d.ts +15 -0
- package/lib/model/Button.js +2 -0
- package/lib/model/Button.js.map +1 -0
- package/lib/model/HeadlineType.d.ts +4 -0
- package/lib/model/Picture.d.ts +3 -10
- package/lib/services/search/jaroWinklerDistance.d.ts +1 -0
- package/lib/services/search/jaroWinklerDistance.js +64 -0
- package/lib/services/search/jaroWinklerDistance.js.map +1 -0
- package/lib/services/search/joinMaps.d.ts +1 -0
- package/lib/services/search/joinMaps.js +7 -0
- package/lib/services/search/joinMaps.js.map +1 -0
- package/lib/services/search/search.d.ts +12 -0
- package/lib/services/search/search.js +36 -0
- package/lib/services/search/search.js.map +1 -0
- package/lib/services/search/textRank.d.ts +1 -0
- package/lib/services/search/textRank.js +11 -0
- package/lib/services/search/textRank.js.map +1 -0
- package/lib/services/search/tokenize.d.ts +1 -0
- package/lib/services/search/tokenize.js +6 -0
- package/lib/services/search/tokenize.js.map +1 -0
- package/lib/services/search/useSearch.d.ts +8 -0
- package/lib/services/search/useSearch.js +30 -0
- package/lib/services/search/useSearch.js.map +1 -0
- package/{mobile/bundle/services/sitemap/SitemapProps.d.ts → lib/services/sitemap/SitemapData.d.ts} +1 -1
- package/lib/services/sitemap/SitemapData.js +2 -0
- package/lib/services/sitemap/SitemapData.js.map +1 -0
- package/lib/ui-kit/BlockWrapper.d.ts +1 -0
- package/lib/ui-kit/BlockWrapper.js +3 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Button/ButtonProps.d.ts +6 -7
- package/lib/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/lib/ui-kit/Dialog/CloseButton.js +6 -0
- package/lib/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/lib/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/lib/ui-kit/Dialog/Dialog.js +24 -0
- package/lib/ui-kit/Dialog/Dialog.js.map +1 -0
- package/lib/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/lib/ui-kit/List/ListProps.d.ts +3 -4
- package/lib/ui-kit/Location/Location.d.ts +1 -18
- package/lib/ui-kit/Location/Location.js +12 -16
- package/lib/ui-kit/Location/Location.js.map +1 -1
- package/lib/ui-kit/Location/LocationProps.d.ts +16 -0
- package/lib/ui-kit/Location/LocationProps.js +2 -0
- package/lib/ui-kit/Location/LocationProps.js.map +1 -0
- package/lib/ui-kit/Location/SearchBar.js +1 -1
- package/lib/ui-kit/Location/SearchBar.js.map +1 -1
- package/lib/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/lib/{model → ui-kit}/PreventableEvent.js +0 -0
- package/lib/ui-kit/PreventableEvent.js.map +1 -0
- package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +2 -0
- package/lib/ui-kit/SearchBar/SearchBarInner.js +46 -16
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/lib/ui-kit/SearchBar/SearchBarInput.js +12 -0
- package/lib/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/{mobile/bundle/components/Footer → lib/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/lib/ui-kit/Sitemap/Sitemap.js +21 -0
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/Comparator.d.ts +4 -0
- package/lib/utils/Comparator.js +4 -0
- package/lib/utils/Comparator.js.map +1 -0
- package/lib/utils/fetchJSON.js +1 -1
- package/lib/utils/fetchJSON.js.map +1 -1
- package/lib/utils/groupBy.js +6 -6
- package/lib/utils/groupBy.js.map +1 -1
- package/lib/utils/maxBy.d.ts +1 -0
- package/lib/utils/maxBy.js +1 -0
- package/lib/utils/maxBy.js.map +1 -1
- package/lib/utils/minBy.d.ts +1 -0
- package/lib/utils/minBy.js +1 -0
- package/lib/utils/minBy.js.map +1 -1
- package/lib/utils/sum.d.ts +1 -0
- package/lib/utils/sum.js +2 -0
- package/lib/utils/sum.js.map +1 -0
- package/lib/utils/unique.d.ts +1 -0
- package/lib/utils/unique.js +2 -0
- package/lib/utils/unique.js.map +1 -0
- package/lib/utils/url.d.ts +1 -1
- package/lib/utils/url.js.map +1 -1
- package/lib/utils/zip.d.ts +4 -0
- package/lib/utils/zip.js +4 -0
- package/lib/utils/zip.js.map +1 -0
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +266 -30
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -5
- package/mobile/bundle/components/BaseTile/BaseTileProps.d.ts +2 -2
- package/mobile/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -8
- package/mobile/bundle/components/Bonus/BonusContent.d.ts +0 -1
- package/mobile/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -8
- package/mobile/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +2 -9
- package/mobile/bundle/components/ButtonBlock/ButtonBlockContent.d.ts +1 -5
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +2 -4
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +1 -4
- package/mobile/bundle/components/CarouselCard/CarouselCardContent.d.ts +2 -10
- package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +2 -10
- package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +3 -21
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -29
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +2 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -21
- package/mobile/bundle/components/ComparisonTable/ComparisonTableContent.d.ts +4 -8
- package/mobile/bundle/components/ComparisonTable/HeaderCell.d.ts +2 -3
- package/mobile/bundle/components/ErrorBlock/ErrorBlockContent.d.ts +4 -23
- package/mobile/bundle/components/Footer/FooterDataProps.d.ts +2 -2
- package/mobile/bundle/components/GracePeriod/GracePeriodContent.d.ts +3 -14
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/mobile/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +3 -1
- package/mobile/bundle/components/ImgBlock/ImgBlockContent.d.ts +2 -4
- package/mobile/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +2 -3
- package/mobile/bundle/components/LinkDocs/LinkDocsContent.d.ts +3 -17
- package/mobile/bundle/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +3 -20
- package/mobile/bundle/components/PictureText/PictureTextContent.d.ts +3 -21
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +3 -23
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +2 -17
- package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +2 -28
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +7 -23
- package/mobile/bundle/components/Tabs/TabsContent.d.ts +1 -4
- package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +6 -11
- package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +4 -9
- package/mobile/bundle/components/Tile/TileContent.d.ts +3 -22
- package/mobile/bundle/components/Video/VideoContent.d.ts +2 -15
- package/mobile/bundle/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
- package/mobile/bundle/hooks/useCarouselControls.d.ts +0 -2
- package/mobile/bundle/hooks/useLink.d.ts +1 -1
- package/mobile/bundle/{services/sitemap → hooks}/useSWRResource.d.ts +1 -1
- package/mobile/bundle/model/Bullets.d.ts +4 -0
- package/mobile/bundle/model/Button.d.ts +15 -0
- package/mobile/bundle/model/HeadlineType.d.ts +4 -0
- package/mobile/bundle/model/Picture.d.ts +3 -10
- package/mobile/bundle/services/search/jaroWinklerDistance.d.ts +1 -0
- package/mobile/bundle/services/search/joinMaps.d.ts +1 -0
- package/mobile/bundle/services/search/search.d.ts +12 -0
- package/mobile/bundle/services/search/textRank.d.ts +1 -0
- package/mobile/bundle/services/search/tokenize.d.ts +1 -0
- package/mobile/bundle/services/search/useSearch.d.ts +8 -0
- package/{dist/services/sitemap/SitemapProps.d.ts → mobile/bundle/services/sitemap/SitemapData.d.ts} +1 -1
- package/mobile/bundle/ui-kit/BlockWrapper.d.ts +1 -0
- package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +6 -7
- package/mobile/bundle/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/mobile/bundle/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/mobile/bundle/ui-kit/List/ListProps.d.ts +3 -4
- package/mobile/bundle/ui-kit/Location/Location.d.ts +1 -18
- package/mobile/bundle/ui-kit/Location/LocationProps.d.ts +16 -0
- package/mobile/bundle/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/mobile/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +2 -0
- package/mobile/bundle/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/{dist/components/Footer → mobile/bundle/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
- package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/bundle/utils/Comparator.d.ts +4 -0
- package/mobile/bundle/utils/maxBy.d.ts +1 -0
- package/mobile/bundle/utils/minBy.d.ts +1 -0
- package/mobile/bundle/utils/sum.d.ts +1 -0
- package/mobile/bundle/utils/unique.d.ts +1 -0
- package/mobile/bundle/utils/url.d.ts +1 -1
- package/mobile/bundle/utils/zip.d.ts +4 -0
- package/mobile/dist/EventBus/defaultEventBus.d.ts +1 -0
- package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/BaseTile/BaseTileProps.d.ts +2 -2
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -8
- package/mobile/dist/components/Bonus/BonusContent.d.ts +0 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -8
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.d.ts +2 -9
- package/mobile/dist/components/ButtonBlock/ButtonBlockContent.d.ts +1 -5
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +2 -4
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +1 -4
- package/mobile/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCardContent.d.ts +2 -10
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +2 -10
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +3 -21
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -29
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +8 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +2 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +12 -7
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -21
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -8
- package/mobile/dist/components/ComparisonTable/HeaderCell.d.ts +2 -3
- package/mobile/dist/components/ContentPage/ContentPage.js +7 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ErrorBlock/ErrorBlock.js +2 -1
- package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +4 -23
- package/mobile/dist/components/Footer/Footer.fallback.js +1 -1
- package/mobile/dist/components/Footer/Footer.fallback.js.map +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/FooterDataProps.d.ts +2 -2
- package/mobile/dist/components/Footer/MediaButton.js +5 -2
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +3 -14
- package/mobile/dist/components/Header/Header.fallback.js +1 -1
- package/mobile/dist/components/Header/Header.fallback.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +1 -1
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +3 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +2 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js +2 -2
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +3 -1
- package/mobile/dist/components/ImgBlock/ImgBlockContent.d.ts +2 -4
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +2 -3
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -17
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +3 -20
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +3 -21
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -23
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +2 -17
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +2 -28
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +7 -23
- package/mobile/dist/components/Tabs/TabsContent.d.ts +1 -4
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +6 -11
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +4 -9
- package/mobile/dist/components/Tile/TileContent.d.ts +3 -22
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +5 -3
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/components/Video/VideoContent.d.ts +2 -15
- package/mobile/dist/hooks/fallbackWCMSResource.d.ts +2 -0
- package/mobile/dist/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/mobile/dist/hooks/fallbackWCMSResource.js.map +1 -0
- package/mobile/dist/hooks/useCarouselControls.d.ts +0 -2
- package/mobile/dist/hooks/useCarouselControls.js +7 -15
- package/mobile/dist/hooks/useCarouselControls.js.map +1 -1
- package/mobile/dist/hooks/useLink.d.ts +1 -1
- package/mobile/dist/hooks/useSWRResource.d.ts +2 -0
- package/{dist/services/sitemap → mobile/dist/hooks}/useSWRResource.js +1 -1
- package/mobile/dist/hooks/useSWRResource.js.map +1 -0
- package/mobile/dist/model/Bullets.d.ts +4 -0
- package/{dist/services/sitemap/SitemapProps.js → mobile/dist/model/Bullets.js} +1 -1
- package/mobile/dist/model/Bullets.js.map +1 -0
- package/mobile/dist/model/Button.d.ts +15 -0
- package/mobile/dist/model/Button.js +2 -0
- package/mobile/dist/model/Button.js.map +1 -0
- package/mobile/dist/model/HeadlineType.d.ts +4 -0
- package/mobile/dist/model/Picture.d.ts +3 -10
- package/mobile/dist/services/search/jaroWinklerDistance.d.ts +1 -0
- package/mobile/dist/services/search/jaroWinklerDistance.js +67 -0
- package/mobile/dist/services/search/jaroWinklerDistance.js.map +1 -0
- package/mobile/dist/services/search/joinMaps.d.ts +1 -0
- package/mobile/dist/services/search/joinMaps.js +10 -0
- package/mobile/dist/services/search/joinMaps.js.map +1 -0
- package/mobile/dist/services/search/search.d.ts +12 -0
- package/mobile/dist/services/search/search.js +39 -0
- package/mobile/dist/services/search/search.js.map +1 -0
- package/mobile/dist/services/search/textRank.d.ts +1 -0
- package/mobile/dist/services/search/textRank.js +14 -0
- package/mobile/dist/services/search/textRank.js.map +1 -0
- package/mobile/dist/services/search/tokenize.d.ts +1 -0
- package/mobile/dist/services/search/tokenize.js +9 -0
- package/mobile/dist/services/search/tokenize.js.map +1 -0
- package/mobile/dist/services/search/useSearch.d.ts +8 -0
- package/mobile/dist/services/search/useSearch.js +33 -0
- package/mobile/dist/services/search/useSearch.js.map +1 -0
- package/mobile/dist/services/sitemap/SitemapData.d.ts +32 -0
- package/mobile/dist/services/sitemap/SitemapData.js +2 -0
- package/mobile/dist/services/sitemap/SitemapData.js.map +1 -0
- package/mobile/dist/ui-kit/BlockWrapper.d.ts +1 -0
- package/mobile/dist/ui-kit/BlockWrapper.js +3 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +6 -7
- package/mobile/dist/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/mobile/dist/ui-kit/Dialog/CloseButton.js +8 -0
- package/mobile/dist/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.js +26 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -0
- package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +3 -4
- package/mobile/dist/ui-kit/Location/Location.d.ts +1 -18
- package/mobile/dist/ui-kit/Location/Location.js +11 -15
- package/mobile/dist/ui-kit/Location/Location.js.map +1 -1
- package/mobile/dist/ui-kit/Location/LocationProps.d.ts +16 -0
- package/mobile/dist/ui-kit/Location/LocationProps.js +2 -0
- package/mobile/dist/ui-kit/Location/LocationProps.js.map +1 -0
- package/mobile/dist/ui-kit/Location/SearchBar.js +1 -1
- package/mobile/dist/ui-kit/Location/SearchBar.js.map +1 -1
- package/mobile/dist/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/mobile/dist/{model → ui-kit}/PreventableEvent.js +0 -0
- package/mobile/dist/ui-kit/PreventableEvent.js.map +1 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +2 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +46 -16
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js +14 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/mobile/dist/ui-kit/Sitemap/Sitemap.d.ts +6 -0
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +23 -0
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/Comparator.d.ts +4 -0
- package/mobile/dist/utils/Comparator.js +9 -0
- package/mobile/dist/utils/Comparator.js.map +1 -0
- package/mobile/dist/utils/fetchJSON.js +1 -1
- package/mobile/dist/utils/fetchJSON.js.map +1 -1
- package/mobile/dist/utils/groupBy.js +6 -6
- package/mobile/dist/utils/groupBy.js.map +1 -1
- package/mobile/dist/utils/maxBy.d.ts +1 -0
- package/mobile/dist/utils/maxBy.js +2 -1
- package/mobile/dist/utils/maxBy.js.map +1 -1
- package/mobile/dist/utils/minBy.d.ts +1 -0
- package/mobile/dist/utils/minBy.js +2 -1
- package/mobile/dist/utils/minBy.js.map +1 -1
- package/mobile/dist/utils/sum.d.ts +1 -0
- package/mobile/dist/utils/sum.js +5 -0
- package/mobile/dist/utils/sum.js.map +1 -0
- package/mobile/dist/utils/unique.d.ts +1 -0
- package/mobile/dist/utils/unique.js +5 -0
- package/mobile/dist/utils/unique.js.map +1 -0
- package/mobile/dist/utils/url.d.ts +1 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/dist/utils/zip.d.ts +4 -0
- package/mobile/dist/utils/zip.js +7 -0
- package/mobile/dist/utils/zip.js.map +1 -0
- package/mobile/lib/EventBus/defaultEventBus.d.ts +1 -0
- package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTileProps.d.ts +2 -2
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -8
- package/mobile/lib/components/Bonus/BonusContent.d.ts +0 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -8
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.d.ts +2 -9
- package/mobile/lib/components/ButtonBlock/ButtonBlockContent.d.ts +1 -5
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +2 -4
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +1 -4
- package/mobile/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCardContent.d.ts +2 -10
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +2 -10
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +3 -21
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -29
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +8 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +2 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +12 -7
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -21
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -8
- package/mobile/lib/components/ComparisonTable/HeaderCell.d.ts +2 -3
- package/mobile/lib/components/ContentPage/ContentPage.js +7 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ErrorBlock/ErrorBlock.js +2 -1
- package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +4 -23
- package/mobile/lib/components/Footer/Footer.fallback.js +1 -1
- package/mobile/lib/components/Footer/Footer.fallback.js.map +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/FooterDataProps.d.ts +2 -2
- package/mobile/lib/components/Footer/MediaButton.js +5 -2
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +3 -14
- package/mobile/lib/components/Header/Header.fallback.js +1 -1
- package/mobile/lib/components/Header/Header.fallback.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +1 -1
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +3 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +2 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js +2 -2
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +3 -1
- package/mobile/lib/components/ImgBlock/ImgBlockContent.d.ts +2 -4
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +2 -3
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -17
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +3 -20
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +3 -21
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -23
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +2 -17
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +2 -28
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +7 -23
- package/mobile/lib/components/Tabs/TabsContent.d.ts +1 -4
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +6 -11
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +4 -9
- package/mobile/lib/components/Tile/TileContent.d.ts +3 -22
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +5 -3
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/components/Video/VideoContent.d.ts +2 -15
- package/mobile/lib/hooks/fallbackWCMSResource.d.ts +2 -0
- package/mobile/lib/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
- package/mobile/lib/hooks/fallbackWCMSResource.js.map +1 -0
- package/mobile/lib/hooks/useCarouselControls.d.ts +0 -2
- package/mobile/lib/hooks/useCarouselControls.js +7 -15
- package/mobile/lib/hooks/useCarouselControls.js.map +1 -1
- package/mobile/lib/hooks/useLink.d.ts +1 -1
- package/mobile/lib/hooks/useSWRResource.d.ts +2 -0
- package/mobile/lib/{services/sitemap → hooks}/useSWRResource.js +1 -1
- package/mobile/lib/hooks/useSWRResource.js.map +1 -0
- package/mobile/lib/model/Bullets.d.ts +4 -0
- package/mobile/lib/model/Bullets.js +2 -0
- package/mobile/lib/model/Bullets.js.map +1 -0
- package/mobile/lib/model/Button.d.ts +15 -0
- package/mobile/lib/model/Button.js +2 -0
- package/mobile/lib/model/Button.js.map +1 -0
- package/mobile/lib/model/HeadlineType.d.ts +4 -0
- package/mobile/lib/model/Picture.d.ts +3 -10
- package/mobile/lib/services/search/jaroWinklerDistance.d.ts +1 -0
- package/mobile/lib/services/search/jaroWinklerDistance.js +64 -0
- package/mobile/lib/services/search/jaroWinklerDistance.js.map +1 -0
- package/mobile/lib/services/search/joinMaps.d.ts +1 -0
- package/mobile/lib/services/search/joinMaps.js +7 -0
- package/mobile/lib/services/search/joinMaps.js.map +1 -0
- package/mobile/lib/services/search/search.d.ts +12 -0
- package/mobile/lib/services/search/search.js +36 -0
- package/mobile/lib/services/search/search.js.map +1 -0
- package/mobile/lib/services/search/textRank.d.ts +1 -0
- package/mobile/lib/services/search/textRank.js +11 -0
- package/mobile/lib/services/search/textRank.js.map +1 -0
- package/mobile/lib/services/search/tokenize.d.ts +1 -0
- package/mobile/lib/services/search/tokenize.js +6 -0
- package/mobile/lib/services/search/tokenize.js.map +1 -0
- package/mobile/lib/services/search/useSearch.d.ts +8 -0
- package/mobile/lib/services/search/useSearch.js +30 -0
- package/mobile/lib/services/search/useSearch.js.map +1 -0
- package/mobile/lib/services/sitemap/SitemapData.d.ts +32 -0
- package/mobile/lib/services/sitemap/SitemapData.js +2 -0
- package/mobile/lib/services/sitemap/SitemapData.js.map +1 -0
- package/mobile/lib/ui-kit/BlockWrapper.d.ts +1 -0
- package/mobile/lib/ui-kit/BlockWrapper.js +3 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +6 -7
- package/mobile/lib/ui-kit/Dialog/CloseButton.d.ts +7 -0
- package/mobile/lib/ui-kit/Dialog/CloseButton.js +6 -0
- package/mobile/lib/ui-kit/Dialog/CloseButton.js.map +1 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +7 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.js +24 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -0
- package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +3 -4
- package/mobile/lib/ui-kit/Location/Location.d.ts +1 -18
- package/mobile/lib/ui-kit/Location/Location.js +12 -16
- package/mobile/lib/ui-kit/Location/Location.js.map +1 -1
- package/mobile/lib/ui-kit/Location/LocationProps.d.ts +16 -0
- package/mobile/lib/ui-kit/Location/LocationProps.js +2 -0
- package/mobile/lib/ui-kit/Location/LocationProps.js.map +1 -0
- package/mobile/lib/ui-kit/Location/SearchBar.js +1 -1
- package/mobile/lib/ui-kit/Location/SearchBar.js.map +1 -1
- package/mobile/lib/{model → ui-kit}/PreventableEvent.d.ts +0 -0
- package/mobile/lib/{model → ui-kit}/PreventableEvent.js +0 -0
- package/mobile/lib/ui-kit/PreventableEvent.js.map +1 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +2 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +46 -16
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js +12 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
- package/mobile/lib/ui-kit/Sitemap/Sitemap.d.ts +6 -0
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +21 -0
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -0
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/Comparator.d.ts +4 -0
- package/mobile/lib/utils/Comparator.js +4 -0
- package/mobile/lib/utils/Comparator.js.map +1 -0
- package/mobile/lib/utils/fetchJSON.js +1 -1
- package/mobile/lib/utils/fetchJSON.js.map +1 -1
- package/mobile/lib/utils/groupBy.js +6 -6
- package/mobile/lib/utils/groupBy.js.map +1 -1
- package/mobile/lib/utils/maxBy.d.ts +1 -0
- package/mobile/lib/utils/maxBy.js +1 -0
- package/mobile/lib/utils/maxBy.js.map +1 -1
- package/mobile/lib/utils/minBy.d.ts +1 -0
- package/mobile/lib/utils/minBy.js +1 -0
- package/mobile/lib/utils/minBy.js.map +1 -1
- package/mobile/lib/utils/sum.d.ts +1 -0
- package/mobile/lib/utils/sum.js +2 -0
- package/mobile/lib/utils/sum.js.map +1 -0
- package/mobile/lib/utils/unique.d.ts +1 -0
- package/mobile/lib/utils/unique.js +2 -0
- package/mobile/lib/utils/unique.js.map +1 -0
- package/mobile/lib/utils/url.d.ts +1 -1
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/lib/utils/zip.d.ts +4 -0
- package/mobile/lib/utils/zip.js +4 -0
- package/mobile/lib/utils/zip.js.map +1 -0
- package/mobile/src/EventBus/defaultEventBus.ts +1 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +8 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -5
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
- package/mobile/src/components/BaseTile/BaseTileProps.ts +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +3 -3
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -8
- package/mobile/src/components/Bonus/Bonus.example.json +2 -1
- package/mobile/src/components/Bonus/Bonus.ui.json +1 -1
- package/mobile/src/components/Bonus/BonusContent.ts +0 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +3 -8
- package/mobile/src/components/BusinessBlock/BusinessBlock.example.json +42 -8
- package/mobile/src/components/BusinessBlock/BusinessBlockContent.ts +3 -9
- package/mobile/src/components/ButtonBlock/ButtonBlock.example.json +3 -1
- package/mobile/src/components/ButtonBlock/ButtonBlockContent.ts +1 -5
- package/mobile/src/components/Calculator/CalculatorContent.ts +6 -7
- package/mobile/src/components/Carousel/Carousel.example.json +2 -1
- package/mobile/src/components/Carousel/CarouselContent.ts +1 -4
- package/mobile/src/components/CarouselCard/CarouselCard.example.json +4 -2
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +4 -3
- package/mobile/src/components/CarouselCard/CarouselCardContent.ts +3 -10
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +3 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +3 -10
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +13 -6
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +4 -21
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +11 -2
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +7 -29
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +25 -12
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +2 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +18 -5
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +44 -26
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +8 -21
- package/mobile/src/components/ComparisonTable/ComparisonTable.example.json +8 -0
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +15 -11
- package/mobile/src/components/ComparisonTable/HeaderCell.tsx +3 -3
- package/mobile/src/components/ContentPage/ContentPage.tsx +16 -1
- package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +15 -1
- package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +7 -4
- package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +5 -23
- package/mobile/src/components/Footer/Footer.fallback.ts +1 -1
- package/mobile/src/components/Footer/Footer.tsx +3 -3
- package/mobile/src/components/Footer/FooterDataProps.ts +2 -2
- package/mobile/src/components/Footer/MediaButton.tsx +13 -7
- package/mobile/src/components/GracePeriod/GracePeriod.example.json +15 -0
- package/mobile/src/components/GracePeriod/GracePeriod.ui.json +1 -1
- package/mobile/src/components/GracePeriod/GracePeriodContent.ts +3 -14
- package/mobile/src/components/Header/Header.fallback.ts +1 -1
- package/mobile/src/components/Header/Header.tsx +3 -3
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +6 -3
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/mobile/src/components/Headline/Headline.tsx +5 -6
- package/mobile/src/components/HorizontalLayout/HorizontalLayout.example.json +3 -1
- package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +10 -2
- package/mobile/src/components/HorizontalLayout/HorizontalLayoutContent.ts +3 -1
- package/mobile/src/components/ImgBlock/ImgBlockContent.ts +2 -4
- package/mobile/src/components/InvestmentInfo/InvestmentInfoContent.ts +3 -3
- package/mobile/src/components/LinkDocs/LinkDocs.example.json +9 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +4 -17
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +2 -2
- package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +10 -1
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +4 -20
- package/mobile/src/components/PictureText/PictureText.example.json +9 -1
- package/mobile/src/components/PictureText/PictureTextContent.ts +4 -21
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +10 -1
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +5 -23
- package/mobile/src/components/ProductTile/ProductTile.example.json +10 -2
- package/mobile/src/components/ProductTile/ProductTileContent.ts +3 -17
- package/mobile/src/components/Recommendation/Recommendation.example.json +5 -1
- package/mobile/src/components/Recommendation/RecommendationContent.ts +2 -28
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +8 -4
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +19 -33
- package/mobile/src/components/Tabs/Tabs.example.json +2 -1
- package/mobile/src/components/Tabs/TabsContent.ts +1 -4
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +7 -11
- package/mobile/src/components/TextBlock/TextBlockContent.ts +8 -13
- package/mobile/src/components/Tile/Tile.example.json +9 -1
- package/mobile/src/components/Tile/TileContent.ts +5 -22
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +1 -0
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +5 -1
- package/mobile/src/components/Video/Video.example.json +7 -1
- package/mobile/src/components/Video/VideoContent.ts +2 -15
- package/mobile/src/{services/sitemap → hooks}/fallbackWCMSResource.ts +1 -1
- package/mobile/src/hooks/useCarouselControls.ts +7 -30
- package/mobile/src/hooks/useLink.ts +1 -1
- package/{src/services/sitemap → mobile/src/hooks}/useSWRResource.ts +2 -2
- package/mobile/src/model/Bullets.ts +4 -0
- package/mobile/src/model/Button.ts +16 -0
- package/mobile/src/model/HeadlineType.ts +5 -0
- package/mobile/src/model/Picture.ts +3 -10
- package/mobile/src/services/search/jaroWinklerDistance.ts +98 -0
- package/mobile/src/services/search/joinMaps.ts +9 -0
- package/mobile/src/services/search/search.ts +73 -0
- package/mobile/src/services/search/textRank.ts +14 -0
- package/mobile/src/services/search/tokenize.ts +7 -0
- package/mobile/src/services/search/useSearch.ts +56 -0
- package/mobile/src/services/sitemap/{SitemapProps.ts → SitemapData.ts} +1 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +8 -3
- package/mobile/src/ui-kit/Button/ButtonProps.ts +6 -5
- package/mobile/src/ui-kit/Dialog/CloseButton.tsx +22 -0
- package/mobile/src/ui-kit/Dialog/Dialog.tsx +54 -0
- package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +3 -1
- package/mobile/src/ui-kit/List/ListProps.ts +11 -11
- package/mobile/src/ui-kit/Location/Location.tsx +45 -70
- package/mobile/src/ui-kit/Location/LocationProps.ts +25 -0
- package/mobile/src/ui-kit/Location/SearchBar.tsx +1 -1
- package/mobile/src/{model → ui-kit}/PreventableEvent.ts +0 -0
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +91 -51
- package/mobile/src/ui-kit/SearchBar/SearchBarInput.tsx +46 -0
- package/mobile/src/{components/Footer → ui-kit/Sitemap}/Sitemap.tsx +12 -11
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/mobile/src/utils/Comparator.ts +14 -0
- package/mobile/src/utils/fetchJSON.ts +1 -1
- package/mobile/src/utils/groupBy.ts +8 -7
- package/mobile/src/utils/maxBy.ts +2 -0
- package/mobile/src/utils/minBy.ts +2 -0
- package/mobile/src/utils/sum.ts +1 -0
- package/mobile/src/utils/unique.ts +1 -0
- package/mobile/src/utils/url.ts +1 -1
- package/mobile/src/utils/zip.ts +8 -0
- package/package.json +2 -2
- package/src/EventBus/defaultEventBus.ts +1 -0
- package/src/components/ApplicationForm/ApplicationForm.example.json +8 -0
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -5
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
- package/src/components/BaseTile/BaseTileProps.ts +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.example.json +3 -3
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -8
- package/src/components/Blocks.ts +0 -2
- package/src/components/Bonus/Bonus.example.json +2 -1
- package/src/components/Bonus/Bonus.ui.json +1 -1
- package/src/components/Bonus/BonusContent.ts +0 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +3 -8
- package/src/components/BusinessBlock/BusinessBlock.example.json +42 -8
- package/src/components/BusinessBlock/BusinessBlockContent.ts +3 -9
- package/src/components/ButtonBlock/ButtonBlock.example.json +3 -1
- package/src/components/ButtonBlock/ButtonBlockContent.ts +1 -5
- package/src/components/Calculator/CalculatorContent.ts +6 -7
- package/src/components/Carousel/Carousel.example.json +2 -1
- package/src/components/Carousel/Carousel.fixture.tsx +5 -4
- package/src/components/Carousel/CarouselContent.ts +1 -4
- package/src/components/CarouselCard/CarouselCard.example.json +4 -2
- package/src/components/CarouselCard/CarouselCard.fixture.tsx +3 -0
- package/src/components/CarouselCard/CarouselCard.tsx +4 -3
- package/src/components/CarouselCard/CarouselCardContent.ts +3 -10
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +3 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +3 -10
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +13 -6
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +4 -21
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +11 -2
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +7 -29
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +2 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +25 -12
- package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +2 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +18 -5
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +82 -22
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +44 -26
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +8 -21
- package/src/components/ComparisonTable/ComparisonTable.example.json +8 -0
- package/src/components/ComparisonTable/ComparisonTableContent.ts +15 -11
- package/src/components/ComparisonTable/HeaderCell.mobile.tsx +3 -3
- package/src/components/ContentPage/ContentPage.tsx +16 -1
- package/src/components/ErrorBlock/ErrorBlock.example.json +15 -1
- package/src/components/ErrorBlock/ErrorBlock.tsx +7 -4
- package/src/components/ErrorBlock/ErrorBlockContent.ts +5 -23
- package/src/components/Footer/Footer.fallback.ts +1 -1
- package/src/components/Footer/Footer.mobile.tsx +3 -3
- package/src/components/Footer/Footer.tsx +6 -4
- package/src/components/Footer/FooterDataProps.ts +2 -2
- package/src/components/Footer/MediaButton.tsx +13 -7
- package/src/components/Footer/SocialMedia.tsx +11 -2
- package/src/components/GracePeriod/GracePeriod.example.json +15 -0
- package/src/components/GracePeriod/GracePeriod.ui.json +1 -1
- package/src/components/GracePeriod/GracePeriodContent.ts +3 -14
- package/src/components/Header/Header.fallback.ts +1 -1
- package/src/components/Header/Header.mobile.tsx +3 -3
- package/src/components/Header/Header.tsx +3 -3
- package/src/components/Header/HeaderSecondaryMenu.tsx +6 -3
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/src/components/Headline/Headline.fixture.tsx +11 -11
- package/src/components/Headline/Headline.tsx +5 -6
- package/src/components/HorizontalLayout/HorizontalLayout.example.json +3 -1
- package/src/components/HorizontalLayout/HorizontalLayout.tsx +10 -2
- package/src/components/HorizontalLayout/HorizontalLayoutContent.ts +3 -1
- package/src/components/ImgBlock/ImgBlockContent.ts +2 -4
- package/src/components/InvestmentInfo/InvestmentInfoContent.ts +3 -3
- package/src/components/LinkDocs/LinkDocs.example.json +9 -2
- package/src/components/LinkDocs/LinkDocsContent.ts +4 -17
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +2 -2
- package/src/components/MobileAppTile/MobileAppTile.example.json +10 -1
- package/src/components/MobileAppTile/MobileAppTileContent.ts +4 -20
- package/src/components/PictureText/PictureText.example.json +9 -1
- package/src/components/PictureText/PictureTextContent.ts +4 -21
- package/src/components/ProductBlock/ProductBlock.example.json +10 -1
- package/src/components/ProductBlock/ProductBlockContent.ts +5 -23
- package/src/components/ProductBlock/ProductBlockInner.tsx +0 -1
- package/src/components/ProductTile/ProductTile.example.json +10 -2
- package/src/components/ProductTile/ProductTileContent.ts +3 -17
- package/src/components/Recommendation/Recommendation.example.json +5 -1
- package/src/components/Recommendation/RecommendationContent.ts +2 -28
- package/src/components/StepsBlock/StepsBlock.example.json +8 -4
- package/src/components/StepsBlock/StepsBlockContent.ts +19 -33
- package/src/components/Tabs/Tabs.example.json +2 -1
- package/src/components/Tabs/TabsContent.ts +1 -4
- package/src/components/TariffsTable/TariffsTableContent.ts +7 -11
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +11 -20
- package/src/components/TextBlock/TextBlockContent.ts +8 -13
- package/src/components/Tile/Tile.example.json +9 -1
- package/src/components/Tile/TileContent.ts +5 -22
- package/src/components/VerticalLayout/VerticalLayout.example.json +1 -0
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +1 -0
- package/src/components/VerticalLayout/VerticalLayout.tsx +5 -1
- package/src/components/Video/Video.example.json +7 -1
- package/src/components/Video/VideoContent.ts +2 -15
- package/src/{services/sitemap → hooks}/fallbackWCMSResource.ts +1 -1
- package/src/hooks/useCarouselControls.ts +7 -30
- package/src/hooks/useLink.ts +1 -1
- package/{mobile/src/services/sitemap → src/hooks}/useSWRResource.ts +2 -2
- package/src/model/Bullets.ts +4 -0
- package/src/model/Button.ts +16 -0
- package/src/model/HeadlineType.ts +5 -0
- package/src/model/Picture.ts +3 -10
- package/src/services/search/jaroWinklerDistance.ts +98 -0
- package/src/services/search/joinMaps.ts +9 -0
- package/src/services/search/search.ts +73 -0
- package/src/services/search/textRank.ts +14 -0
- package/src/services/search/tokenize.ts +7 -0
- package/src/services/search/useSearch.ts +56 -0
- package/src/services/sitemap/{SitemapProps.ts → SitemapData.ts} +1 -1
- package/src/ui-kit/BlockWrapper.tsx +8 -3
- package/src/ui-kit/Button/ButtonProps.ts +6 -5
- package/src/ui-kit/Dialog/CloseButton.tsx +22 -0
- package/src/ui-kit/Dialog/Dialog.tsx +54 -0
- package/src/ui-kit/InputRange/InputRangeProps.ts +3 -1
- package/src/ui-kit/List/ListProps.ts +11 -11
- package/src/ui-kit/Location/Location.fixture.tsx +2 -2
- package/src/ui-kit/Location/Location.tsx +45 -70
- package/src/ui-kit/Location/LocationProps.ts +25 -0
- package/src/ui-kit/Location/SearchBar.tsx +1 -1
- package/src/{model → ui-kit}/PreventableEvent.ts +0 -0
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +91 -51
- package/src/ui-kit/SearchBar/SearchBarInput.tsx +46 -0
- package/src/{components/Footer → ui-kit/Sitemap}/Sitemap.tsx +12 -11
- package/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/src/utils/Comparator.ts +14 -0
- package/src/utils/fetchJSON.ts +1 -1
- package/src/utils/groupBy.ts +8 -7
- package/src/utils/maxBy.ts +2 -0
- package/src/utils/minBy.ts +2 -0
- package/src/utils/sum.ts +1 -0
- package/src/utils/unique.ts +1 -0
- package/src/utils/url.ts +1 -1
- package/src/utils/zip.ts +8 -0
- package/bundle/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/bundle/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/bundle/hooks/useSearch.d.ts +0 -4
- package/bundle/model/SitemapProps.d.ts +0 -24
- package/dist/components/Footer/Sitemap.js +0 -24
- package/dist/components/Footer/Sitemap.js.map +0 -1
- package/dist/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/dist/components/OtherProducts/OtherProducts.js +0 -9
- package/dist/components/OtherProducts/OtherProducts.js.map +0 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/dist/components/OtherProducts/OtherProductsContent.js +0 -2
- package/dist/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/dist/hooks/useSearch.d.ts +0 -4
- package/dist/hooks/useSearch.js +0 -12
- package/dist/hooks/useSearch.js.map +0 -1
- package/dist/model/PreventableEvent.js.map +0 -1
- package/dist/model/SitemapProps.d.ts +0 -24
- package/dist/model/SitemapProps.js.map +0 -1
- package/dist/services/sitemap/SitemapProps.js.map +0 -1
- package/dist/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/dist/services/sitemap/useSWRResource.js.map +0 -1
- package/lib/components/Footer/Sitemap.js +0 -22
- package/lib/components/Footer/Sitemap.js.map +0 -1
- package/lib/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +0 -8
- package/lib/components/OtherProducts/OtherProducts.js +0 -7
- package/lib/components/OtherProducts/OtherProducts.js.map +0 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/lib/components/OtherProducts/OtherProductsContent.js +0 -2
- package/lib/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/lib/hooks/useSearch.d.ts +0 -4
- package/lib/hooks/useSearch.js +0 -9
- package/lib/hooks/useSearch.js.map +0 -1
- package/lib/model/PreventableEvent.js.map +0 -1
- package/lib/model/SitemapProps.d.ts +0 -24
- package/lib/model/SitemapProps.js +0 -2
- package/lib/model/SitemapProps.js.map +0 -1
- package/lib/services/sitemap/SitemapProps.js +0 -2
- package/lib/services/sitemap/SitemapProps.js.map +0 -1
- package/lib/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/lib/services/sitemap/useSWRResource.js.map +0 -1
- package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/mobile/bundle/hooks/useSearch.d.ts +0 -4
- package/mobile/bundle/model/SitemapProps.d.ts +0 -24
- package/mobile/dist/components/Footer/Sitemap.d.ts +0 -6
- package/mobile/dist/components/Footer/Sitemap.js +0 -24
- package/mobile/dist/components/Footer/Sitemap.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/mobile/dist/components/OtherProducts/OtherProducts.js +0 -9
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/mobile/dist/components/OtherProducts/OtherProductsContent.js +0 -2
- package/mobile/dist/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/mobile/dist/hooks/useSearch.d.ts +0 -4
- package/mobile/dist/hooks/useSearch.js +0 -12
- package/mobile/dist/hooks/useSearch.js.map +0 -1
- package/mobile/dist/model/PreventableEvent.js.map +0 -1
- package/mobile/dist/model/SitemapProps.d.ts +0 -24
- package/mobile/dist/model/SitemapProps.js.map +0 -1
- package/mobile/dist/services/sitemap/SitemapProps.d.ts +0 -32
- package/mobile/dist/services/sitemap/SitemapProps.js.map +0 -1
- package/mobile/dist/services/sitemap/fallbackWCMSResource.d.ts +0 -2
- package/mobile/dist/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/mobile/dist/services/sitemap/useSWRResource.d.ts +0 -2
- package/mobile/dist/services/sitemap/useSWRResource.js.map +0 -1
- package/mobile/lib/components/Footer/Sitemap.d.ts +0 -6
- package/mobile/lib/components/Footer/Sitemap.js +0 -22
- package/mobile/lib/components/Footer/Sitemap.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +0 -5
- package/mobile/lib/components/OtherProducts/OtherProducts.js +0 -7
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +0 -8
- package/mobile/lib/components/OtherProducts/OtherProductsContent.js +0 -2
- package/mobile/lib/components/OtherProducts/OtherProductsContent.js.map +0 -1
- package/mobile/lib/hooks/useSearch.d.ts +0 -4
- package/mobile/lib/hooks/useSearch.js +0 -9
- package/mobile/lib/hooks/useSearch.js.map +0 -1
- package/mobile/lib/model/PreventableEvent.js.map +0 -1
- package/mobile/lib/model/SitemapProps.d.ts +0 -24
- package/mobile/lib/model/SitemapProps.js +0 -2
- package/mobile/lib/model/SitemapProps.js.map +0 -1
- package/mobile/lib/services/sitemap/SitemapProps.d.ts +0 -32
- package/mobile/lib/services/sitemap/SitemapProps.js +0 -2
- package/mobile/lib/services/sitemap/SitemapProps.js.map +0 -1
- package/mobile/lib/services/sitemap/fallbackWCMSResource.d.ts +0 -2
- package/mobile/lib/services/sitemap/fallbackWCMSResource.js.map +0 -1
- package/mobile/lib/services/sitemap/useSWRResource.d.ts +0 -2
- package/mobile/lib/services/sitemap/useSWRResource.js.map +0 -1
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +0 -30
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +0 -17
- package/mobile/src/components/OtherProducts/OtherProducts.ui.json +0 -1
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +0 -9
- package/mobile/src/hooks/useSearch.ts +0 -10
- package/mobile/src/model/SitemapProps.ts +0 -27
- package/src/components/OtherProducts/OtherProducts.example.json +0 -30
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +0 -88
- package/src/components/OtherProducts/OtherProducts.tsx +0 -17
- package/src/components/OtherProducts/OtherProducts.ui.json +0 -1
- package/src/components/OtherProducts/OtherProductsContent.ts +0 -9
- package/src/hooks/useSearch.ts +0 -10
- package/src/model/SitemapProps.ts +0 -27
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CorpusItem {
|
|
2
|
+
uri?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
}
|
|
5
|
+
declare type Stem = string;
|
|
6
|
+
declare type CorpusItemIndex = number;
|
|
7
|
+
export interface SearchIndex {
|
|
8
|
+
corpus?: CorpusItem[];
|
|
9
|
+
dictionary?: Record<Stem, CorpusItemIndex[]>;
|
|
10
|
+
}
|
|
11
|
+
export declare const search: (query: string | undefined) => (searchIndex: SearchIndex | undefined) => CorpusItem[];
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { compareBy, desc } from '../../utils/Comparator.js';
|
|
2
|
+
import { zip } from '../../utils/zip.js';
|
|
3
|
+
import { jaroWinklerDistance } from './jaroWinklerDistance.js';
|
|
4
|
+
import { joinMaps } from './joinMaps.js';
|
|
5
|
+
import { textRank } from './textRank.js';
|
|
6
|
+
import { tokenize } from './tokenize.js';
|
|
7
|
+
const JW_THRESHOLD = 0.8;
|
|
8
|
+
const RANK_EPS = 0.001;
|
|
9
|
+
export const search = (query) => (searchIndex) => {
|
|
10
|
+
const { corpus, dictionary } = searchIndex || {};
|
|
11
|
+
if (!query || !corpus?.length || !dictionary || !Object.keys(dictionary).length) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
const queryTokens = tokenize(query);
|
|
15
|
+
if (!queryTokens.length) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
const dictEntries = Object.entries(dictionary);
|
|
19
|
+
const pagesRanking = queryTokens
|
|
20
|
+
.map(computePagesRankingPerToken(dictEntries))
|
|
21
|
+
.reduce(joinMaps((a, b) => a + b, 0), new Map());
|
|
22
|
+
const relevantPages = [...pagesRanking.entries()]
|
|
23
|
+
.filter(([, pageRank]) => pageRank >= (JW_THRESHOLD - RANK_EPS) * queryTokens.length) // Multiplication of query tokens
|
|
24
|
+
.map(([pageIndex]) => corpus[pageIndex]);
|
|
25
|
+
return sortResultsByRank(queryTokens)(relevantPages);
|
|
26
|
+
};
|
|
27
|
+
const computePagesRankingPerToken = (dictEntries) => (qToken) => dictEntries
|
|
28
|
+
.map(([stem, pageIndices]) => [jaroWinklerDistance(qToken)(stem), pageIndices])
|
|
29
|
+
.filter(([stemRank]) => stemRank >= JW_THRESHOLD)
|
|
30
|
+
.map(([stemRank, pageIndices]) => fillMapWith(pageIndices, stemRank))
|
|
31
|
+
.reduce(joinMaps(Math.max, 0), new Map());
|
|
32
|
+
const sortResultsByRank = (queryTokens) => (results) => zip(results, results.map(({ title }) => title).map(textRank(queryTokens)))
|
|
33
|
+
.sort(desc(compareBy(([, pageTitleRank]) => pageTitleRank)))
|
|
34
|
+
.map(([corpusItem]) => corpusItem);
|
|
35
|
+
const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
|
|
36
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/services/search/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OA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|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const textRank: (queryTokens: string[]) => (text: string | undefined) => number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { max } from '../../utils/maxBy.js';
|
|
2
|
+
import { sum } from '../../utils/sum.js';
|
|
3
|
+
import { jaroWinklerDistance } from './jaroWinklerDistance.js';
|
|
4
|
+
import { tokenize } from './tokenize.js';
|
|
5
|
+
export const textRank = (queryTokens) => (text) => {
|
|
6
|
+
const textTokens = tokenize(text || '');
|
|
7
|
+
return textTokens.length
|
|
8
|
+
? sum(queryTokens.map((qToken) => max(textTokens.map(jaroWinklerDistance(qToken)))))
|
|
9
|
+
: 0;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=textRank.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textRank.js","sourceRoot":"","sources":["../../../src/services/search/textRank.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,QAAQ,GACnB,CAAC,WAAqB,EAAE,EAAE,CAC1B,CAAC,IAAwB,EAAU,EAAE;IACnC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAExC,OAAO,UAAU,CAAC,MAAM;QACtB,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tokenize: (text: string) => string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenize.js","sourceRoot":"","sources":["../../../src/services/search/tokenize.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CACvC,IAAI;KACD,WAAW,EAAE;KACb,KAAK,CAAC,gBAAgB,CAAC;KACvB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CorpusItem } from './search';
|
|
2
|
+
export declare type SearchResult = Array<CorpusItem[]>;
|
|
3
|
+
export interface SearchInputProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (query: string) => void;
|
|
6
|
+
onFocus: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useSearch: (basePathList?: string[]) => [SearchResult | null, SearchInputProps];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
3
|
+
import { fetchJSON } from '../../utils/fetchJSON.js';
|
|
4
|
+
import { joinPath } from '../../utils/url.js';
|
|
5
|
+
import { search } from './search.js';
|
|
6
|
+
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
7
|
+
export const useSearch = (basePathList = ['/']) => {
|
|
8
|
+
const [query, setQuery] = useState('');
|
|
9
|
+
const [wasQueryFocused, setWasQueryFocused] = useState(false);
|
|
10
|
+
const handleFocus = useCallback(() => {
|
|
11
|
+
setWasQueryFocused(true);
|
|
12
|
+
}, []);
|
|
13
|
+
const key = useMemo(() => basePathList.map((_) => (wasQueryFocused ? _ : null)), // Load search index on input focus
|
|
14
|
+
[wasQueryFocused, ...basePathList]);
|
|
15
|
+
const { data } = useAsyncData(key, fetchSearchIndex);
|
|
16
|
+
const [result, setResult] = useState(null);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const timerId = setTimeout(() => {
|
|
19
|
+
if (data) {
|
|
20
|
+
setResult(data.map(search(query)));
|
|
21
|
+
}
|
|
22
|
+
}, 300);
|
|
23
|
+
return () => {
|
|
24
|
+
clearTimeout(timerId);
|
|
25
|
+
};
|
|
26
|
+
}, [data, query]);
|
|
27
|
+
return [result, { value: query, onChange: setQuery, onFocus: handleFocus }];
|
|
28
|
+
};
|
|
29
|
+
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
|
|
30
|
+
//# sourceMappingURL=useSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearch.js","sourceRoot":"","sources":["../../../src/services/search/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAc,MAAM,EAAe,MAAM,UAAU,CAAC;AAE3D,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAUlD,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,eAAyB,CAAC,GAAG,CAAC,EACW,EAAE;IAC3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAA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CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAC1F,CACF,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
+
import type { LogoType } from '../../model/LogoType';
|
|
3
|
+
import type { IconProps, Picture } from '../../model/Picture';
|
|
4
|
+
/**
|
|
5
|
+
* @title Ссылка
|
|
6
|
+
* @required ["text", "href"]
|
|
7
|
+
*/
|
|
8
|
+
export interface TopMenuItem extends LinkProps {
|
|
9
|
+
/** @hidden */
|
|
10
|
+
items?: LinkProps[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @title Ссылка дополнительного меню
|
|
14
|
+
* @required ["text", "href"]
|
|
15
|
+
*/
|
|
16
|
+
export interface DispositionItem extends LinkProps {
|
|
17
|
+
/** @hidden */
|
|
18
|
+
icon?: Picture;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @title Представительства за рубежом
|
|
22
|
+
* @required ["text", "href"]
|
|
23
|
+
*/
|
|
24
|
+
export declare type ForeignOffice = LinkProps & IconProps;
|
|
25
|
+
export interface SitemapData {
|
|
26
|
+
topItems?: TopMenuItem[];
|
|
27
|
+
dispositions?: DispositionItem[];
|
|
28
|
+
logo?: LogoType;
|
|
29
|
+
foreignOffices?: ForeignOffice[];
|
|
30
|
+
defaultLocation?: string;
|
|
31
|
+
officesLink?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SitemapData.js","sourceRoot":"","sources":["../../../src/services/sitemap/SitemapData.ts"],"names":[],"mappings":""}
|
|
@@ -3,6 +3,7 @@ import type { UniBlockProps } from '../model/JSXBlock';
|
|
|
3
3
|
interface BlockWrapperProps extends UniBlockProps {
|
|
4
4
|
tag?: keyof HTMLElementTagNameMap;
|
|
5
5
|
role?: string;
|
|
6
|
+
extraProps?: Record<string, any>;
|
|
6
7
|
}
|
|
7
8
|
export declare const blockStyles: Record<BlockVersion, string>;
|
|
8
9
|
export declare const BlockWrapper: import("@redneckz/uni-jsx").UNIComponent<BlockWrapperProps, any, any>;
|
|
@@ -11,13 +11,14 @@ export const blockStyles = {
|
|
|
11
11
|
transparent: 'bg-transparent text-primary-text',
|
|
12
12
|
'': '',
|
|
13
13
|
};
|
|
14
|
-
export const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, children, }) => {
|
|
14
|
+
export const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, extraProps = {}, children, }) => {
|
|
15
15
|
const Tag = tag;
|
|
16
16
|
const ref = useBlockIntersectionObserver(block);
|
|
17
17
|
const [isHidden, setHidden] = useState(false);
|
|
18
18
|
useEffect(() => defaultEventBus.subscribe('tab', (event) => {
|
|
19
19
|
setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
|
|
20
20
|
}), [block]);
|
|
21
|
-
return (_jsx(Tag, { className: style(
|
|
21
|
+
return (_jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, ...extraProps, children: children }));
|
|
22
22
|
});
|
|
23
|
+
const groupStyle = (isGroup) => (isGroup ? 'group' : '');
|
|
23
24
|
//# sourceMappingURL=BlockWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockWrapper.js","sourceRoot":"","sources":["../../src/ui-kit/BlockWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC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M,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CACrF,CAAC;IACJ,CAAC,CAAC,EACJ,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,KAAK,CACd,UAAU,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,EACvC,WAAW,CAAC,OAAO,CAAC,EACpB,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACxB,SAAS,CACV,KACG,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACnD,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACpD,IAAI,EAAE,IAAI,KACN,UAAU,YAEb,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
|
2
2
|
import type { LinkProps } from '../../model/LinkProps';
|
|
3
3
|
import type { IconProps, Picture } from '../../model/Picture';
|
|
4
4
|
import type { VNode } from '../../model/VNode';
|
|
5
|
+
import type { PreventableEvent } from '../PreventableEvent';
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
7
8
|
*/
|
|
@@ -10,23 +11,21 @@ export interface ButtonAdditionalProps {
|
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
rel?: string;
|
|
12
13
|
ariaLabel?: string;
|
|
13
|
-
onClick?: (ev?:
|
|
14
|
-
preventDefault: () => void;
|
|
15
|
-
}) => void;
|
|
14
|
+
onClick?: (ev?: PreventableEvent) => void;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* @title Кнопка
|
|
19
18
|
*/
|
|
20
19
|
export interface ButtonProps extends ButtonAdditionalProps, LinkProps {
|
|
21
|
-
/**
|
|
22
|
-
* @title Текст
|
|
23
|
-
* @default Кнопка
|
|
24
|
-
*/
|
|
20
|
+
/** @title Текст */
|
|
25
21
|
text?: string;
|
|
26
22
|
/** @title Закругленные углы */
|
|
27
23
|
rounded?: boolean;
|
|
28
24
|
version?: ButtonVersion;
|
|
29
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @title Кнопка
|
|
28
|
+
*/
|
|
30
29
|
export interface ButtonWithIconProps extends ButtonProps {
|
|
31
30
|
/** @title Иконка слева */
|
|
32
31
|
icon?: Picture;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PreventableEvent } from '../PreventableEvent';
|
|
2
|
+
interface CloseButtonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
onClick?: (ev: PreventableEvent) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const CloseButton: import("@redneckz/uni-jsx").UNIComponent<CloseButtonProps, any, any>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { style } from '../../utils/style.js';
|
|
4
|
+
import { Img } from '../Img/Img.js';
|
|
5
|
+
export const CloseButton = JSX(({ className, onClick }) => (_jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: _jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
6
|
+
//# sourceMappingURL=CloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Dialog/CloseButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAQjC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC3E,iBACE,SAAS,EAAE,KAAK,CACd,iFAAiF,EACjF,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,4CAAS,YAEf,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,GACrD,CACV,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { style } from '../../utils/style.js';
|
|
5
|
+
import { CloseButton } from './CloseButton.js';
|
|
6
|
+
export const Dialog = JSX(({ className, head, children, onClose }) => {
|
|
7
|
+
const handleClose = useCallback((ev) => {
|
|
8
|
+
ev.preventDefault();
|
|
9
|
+
onClose && onClose();
|
|
10
|
+
}, [onClose]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const handleEscape = ({ key }) => {
|
|
13
|
+
if (key === 'Escape') {
|
|
14
|
+
onClose && onClose();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
globalThis.document?.addEventListener('keydown', handleEscape);
|
|
18
|
+
return () => {
|
|
19
|
+
globalThis.document?.removeEventListener('keydown', handleEscape);
|
|
20
|
+
};
|
|
21
|
+
}, [onClose]);
|
|
22
|
+
return (_jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: _jsxs("div", { className: "relative container pb-12 min-h-full", children: [_jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [_jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: handleClose }), head] }), children] }) }));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/ui-kit/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,EAAoB,EAAE,EAAE;QACvB,EAAE,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,CAAC,EAAE,GAAG,EAAmB,EAAE,EAAE;YAChD,IAAI,GAAG,KAAK,QAAQ,EAAE;gBACpB,OAAO,IAAI,OAAO,EAAE,CAAC;aACtB;QACH,CAAC,CAAC;QAEF,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAE/D,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,QAAQ,EAAE,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACpE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACL,cACE,SAAS,EAAE,KAAK,CACd,2FAA2F,EAC3F,SAAS,CACV,EACD,IAAI,EAAC,QAAQ,YAEb,eAAK,SAAS,EAAC,qCAAqC,aAClD,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,WAAW,IAAC,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,WAAW,GAAI,EACxE,IAAI,IACD,EACL,QAAQ,IACL,GACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BulletsProps } from '../../model/Bullets';
|
|
1
2
|
import type { ListContent } from './ListContent';
|
|
2
3
|
/**
|
|
3
4
|
* @title Размер пунктов списка
|
|
@@ -7,14 +8,12 @@ export declare type ListItemSize = 'S' | 'M' | 'L';
|
|
|
7
8
|
/**
|
|
8
9
|
* @title Содержимое списка
|
|
9
10
|
*/
|
|
10
|
-
export
|
|
11
|
+
export declare type ListProps = ListContent & BulletsProps & {
|
|
11
12
|
/** @hidden */
|
|
12
13
|
className?: string;
|
|
13
14
|
/** @title Отступ */
|
|
14
15
|
hasIndent?: boolean;
|
|
15
16
|
/** @hidden */
|
|
16
17
|
itemClassName?: string;
|
|
17
|
-
/** @title Буллиты */
|
|
18
|
-
isDotted?: boolean;
|
|
19
18
|
listItemSize?: ListItemSize;
|
|
20
|
-
}
|
|
19
|
+
};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
-
import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
|
|
4
|
-
interface RegionLinkProps {
|
|
5
|
-
onChangeLocation?: (region: Region) => void;
|
|
6
|
-
}
|
|
7
|
-
interface CloseButtonProps {
|
|
8
|
-
close?: () => void;
|
|
9
|
-
}
|
|
10
|
-
interface CurrentLocationProps {
|
|
11
|
-
currentLocation?: Region;
|
|
12
|
-
}
|
|
13
|
-
interface ForeignOfficeProps {
|
|
14
|
-
foreignOffices?: ForeignOffice[];
|
|
15
|
-
}
|
|
16
|
-
export declare type LocationProps = ForeignOfficeProps & CloseButtonProps & RegionLinkProps & CurrentLocationProps & UniBlockProps;
|
|
1
|
+
import type { LocationProps } from './LocationProps';
|
|
17
2
|
export declare const Location: import("@redneckz/uni-jsx").UNIComponent<LocationProps, any, any>;
|
|
18
|
-
declare const ForeignOffice: import("@redneckz/uni-jsx").UNIComponent<ForeignOffice, any, any>;
|
|
19
|
-
export {};
|
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
4
|
import { useLink } from '../../hooks/useLink.js';
|
|
5
5
|
import { useRegions } from '../../hooks/useRegions.js';
|
|
6
|
-
import {
|
|
6
|
+
import { jaroWinklerDistance } from '../../services/search/jaroWinklerDistance.js';
|
|
7
7
|
import { Text } from '../../ui-kit/Text/Text.js';
|
|
8
8
|
import { groupBy } from '../../utils/groupBy.js';
|
|
9
|
+
import { Dialog } from '../Dialog/Dialog.js';
|
|
9
10
|
import { Img } from '../Img/Img.js';
|
|
10
11
|
import { SearchBar } from './SearchBar.js';
|
|
11
12
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
12
|
-
export const Location = JSX(({ currentLocation, onChangeLocation,
|
|
13
|
-
const
|
|
14
|
-
const handleSearch = useCallback((_) => setTerm(_), []);
|
|
13
|
+
export const Location = JSX(({ currentLocation, onChangeLocation, onClose, foreignOffices }) => {
|
|
14
|
+
const [query, setQuery] = useState('');
|
|
15
15
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
16
16
|
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
17
|
-
return (_jsxs(
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
return (_jsxs(Dialog, { head: _jsxs("div", { children: [_jsx(CurrentLocation, { currentLocation: currentLocation }), _jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), onClose: onClose, children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (_jsx("div", { children: regions
|
|
18
|
+
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
19
|
+
.map(renderRegion({ onChangeLocation, onClose })) })) : (_jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, onClose })) })), _jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
|
|
20
20
|
});
|
|
21
21
|
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
22
22
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
23
23
|
...region,
|
|
24
24
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
25
25
|
}));
|
|
26
|
-
const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (_jsxs("div", { className: "mb-4", children: [_jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), _jsx("button", { className: "cursor-pointer", onClick: close, children: _jsx(Text, { color: "text-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
close && close();
|
|
30
|
-
}, children: _jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
31
|
-
const renderRegionGroup = ({ onChangeLocation, close }) => ([letter, regions]) => (_jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [_jsx("div", { className: "mb-2.5", children: _jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, close }))] }, letter));
|
|
32
|
-
const renderRegion = ({ onChangeLocation, close }) => (region) => (_jsx("div", { className: "mb-1", children: _jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
26
|
+
const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (_jsxs("div", { className: "mb-4", children: [_jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), _jsx("button", { className: "cursor-pointer", onClick: close, children: _jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
|
|
27
|
+
const renderRegionGroup = ({ onChangeLocation, onClose }) => ([letter, regions]) => (_jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [_jsx("div", { className: "mb-2.5", children: _jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, onClose }))] }, letter));
|
|
28
|
+
const renderRegion = ({ onChangeLocation, onClose }) => (region) => (_jsx("div", { className: "mb-1", children: _jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
33
29
|
onChangeLocation && onChangeLocation(region);
|
|
34
|
-
|
|
30
|
+
onClose && onClose();
|
|
35
31
|
}, children: region.name || '' }) }, region.id));
|
|
36
32
|
const ForeignOffices = JSX(({ foreignOffices }) => foreignOffices?.length ? (_jsxs("div", { className: "border-t border-main-divider mt-7 pt-7", children: [_jsx("div", { className: "mb-4", children: _jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), _jsx("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => (_jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
|
|
37
33
|
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/Location.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/Location.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAoB,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAOjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE;IACjE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,MAAM,OAAO,GAAa,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACnE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAC7B,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
2
|
+
import { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
import { ForeignOffice } from '../../services/sitemap/SitemapData';
|
|
4
|
+
export interface RegionLinkProps {
|
|
5
|
+
onChangeLocation?: (region: Region) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface CloseButtonProps {
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface CurrentLocationProps {
|
|
11
|
+
currentLocation?: Region;
|
|
12
|
+
}
|
|
13
|
+
export interface ForeignOfficeProps {
|
|
14
|
+
foreignOffices?: ForeignOffice[];
|
|
15
|
+
}
|
|
16
|
+
export declare type LocationProps = ForeignOfficeProps & CloseButtonProps & RegionLinkProps & CurrentLocationProps & UniBlockProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/LocationProps.ts"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
export const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
4
4
|
return (_jsxs("form", { className: `font-sans relative ${className}`, children: [_jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: searchTerm ? null : (_jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), _jsx("input", { id: "search-bar-input", className: `h-12 pl-4 w-full peer text-l text-black border border-solid rounded-md box-border
|
|
5
|
-
outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value), type: "text", name: "location-search-bar-input" })] }));
|
|
5
|
+
outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
|
|
6
6
|
});
|
|
7
7
|
//# sourceMappingURL=SearchBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/SearchBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAsB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxF,OAAO,CACL,gBAAM,SAAS,EAAE,sBAAsB,SAAS,EAAE,aAChD,cAAK,SAAS,EAAC,yGAAyG,YACrH,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB,gBAAO,OAAO,EAAC,kBAAkB,EAAC,SAAS,EAAE,sBAAsB,6GAE3D,CACT,GACG,EACN,gBACE,EAAE,EAAC,kBAAkB,EACrB,SAAS,EAAE;uHACoG,EAC/G,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/SearchBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAsB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxF,OAAO,CACL,gBAAM,SAAS,EAAE,sBAAsB,SAAS,EAAE,aAChD,cAAK,SAAS,EAAC,yGAAyG,YACrH,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB,gBAAO,OAAO,EAAC,kBAAkB,EAAC,SAAS,EAAE,sBAAsB,6GAE3D,CACT,GACG,EACN,gBACE,EAAE,EAAC,kBAAkB,EACrB,SAAS,EAAE;uHACoG,EAC/G,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,EAAY,CAAC,EACjE,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,2BAA2B,GAChC,IACG,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreventableEvent.js","sourceRoot":"","sources":["../../src/ui-kit/PreventableEvent.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { TopMenuItem } from '../../services/sitemap/SitemapData';
|
|
1
2
|
export interface SearchBarInnerProps {
|
|
2
3
|
isMobile?: boolean;
|
|
3
4
|
className?: string;
|
|
5
|
+
topItems?: TopMenuItem[];
|
|
4
6
|
}
|
|
5
7
|
export declare const SearchBarInner: import("@redneckz/uni-jsx").UNIComponent<SearchBarInnerProps, any, any>;
|
|
@@ -1,21 +1,51 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { useCallback, useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { useBool } from '../../hooks/useBool.js';
|
|
5
|
+
import { useSearch } from '../../services/search/useSearch.js';
|
|
6
|
+
import { zip } from '../../utils/zip.js';
|
|
7
|
+
import { CloseButton } from '../Dialog/CloseButton.js';
|
|
8
|
+
import { Dialog } from '../Dialog/Dialog.js';
|
|
9
|
+
import { Sitemap } from '../Sitemap/Sitemap.js';
|
|
10
|
+
import { SearchBarInput } from './SearchBarInput.js';
|
|
11
|
+
const MIN_QUERY_LEN = 3;
|
|
12
|
+
export const SearchBarInner = JSX(({ className, isMobile, topItems }) => {
|
|
13
|
+
const basePathList = topItems?.map((_) => _.href || '/');
|
|
14
|
+
const [searchResult, searchInputProps] = useSearch(basePathList);
|
|
15
|
+
const { value, onChange, onFocus } = searchInputProps;
|
|
16
|
+
const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
|
|
17
|
+
useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
|
|
18
|
+
const [isSearchDialogOpen, { setTrue: openSearchDialog, setFalse: hideSearchDialog }] = useBool();
|
|
19
|
+
const handleInitialInputChange = useCallback((_) => {
|
|
20
|
+
onChange(_);
|
|
21
|
+
if (isQueryLongEnough(_)) {
|
|
22
|
+
openSearchDialog();
|
|
23
|
+
}
|
|
24
|
+
}, [onChange, isQueryLongEnough]);
|
|
25
|
+
const handleInitialInputFocus = useCallback(() => {
|
|
26
|
+
onFocus();
|
|
27
|
+
if (isQueryLongEnough(value)) {
|
|
28
|
+
openSearchDialog();
|
|
29
|
+
}
|
|
30
|
+
}, [value, onFocus]);
|
|
31
|
+
return (_jsxs("div", { className: className, children: [_jsx(SearchBarInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange, onFocus: handleInitialInputFocus }), isMobile ? (_jsx(CloseButton, { className: "absolute top-2 right-3", onClick: (e) => {
|
|
14
32
|
e.preventDefault();
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
ev?.preventDefault();
|
|
18
|
-
console.log('click');
|
|
19
|
-
}, children: _jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
|
|
33
|
+
onChange('');
|
|
34
|
+
} })) : null, isSearchDialogOpen ? (_jsx(Dialog, { head: _jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: _jsx(Sitemap, { topItems: searchItems }) })) : null] }));
|
|
20
35
|
});
|
|
36
|
+
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
37
|
+
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
38
|
+
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
39
|
+
..._,
|
|
40
|
+
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
|
|
41
|
+
}))
|
|
42
|
+
: [];
|
|
43
|
+
// Temp
|
|
44
|
+
function printSearchItems(topItems) {
|
|
45
|
+
for (const _ of topItems.filter(({ items }) => items?.length)) {
|
|
46
|
+
console.group(_.text);
|
|
47
|
+
console.table(_.items, ['text', 'href']);
|
|
48
|
+
console.groupEnd();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
21
51
|
//# sourceMappingURL=SearchBarInner.js.map
|