@redneckz/wildless-cms-uni-blocks 0.6.41 → 0.6.43
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.6.34.js +2 -0
- package/bin/migration-scripts/0.6.43.js +29 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +213 -101
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
- package/bundle/components/ProductTile/renderImage.d.ts +3 -0
- package/bundle/content-page-repository/transformImg.d.ts +1 -1
- package/bundle/hooks/useCachedAsyncData.d.ts +2 -0
- package/bundle/hooks/useLocation.d.ts +6 -0
- package/bundle/hooks/useRegions.d.ts +6 -0
- package/bundle/services/sitemap/SitemapProps.d.ts +8 -0
- package/bundle/ui-kit/Location/Location.d.ts +19 -0
- package/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
- package/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/bundle/utils/groupBy.d.ts +1 -0
- package/dist/components/Blocks.js +4 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderBurger.js +4 -3
- package/dist/components/Header/HeaderBurger.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/dist/components/Header/HeaderSecondaryMenu.js +13 -4
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +9 -22
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
- package/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/dist/components/ProductTile/renderBenefit.d.ts +4 -0
- package/dist/components/ProductTile/renderBenefit.js +32 -0
- package/dist/components/ProductTile/renderBenefit.js.map +1 -0
- package/dist/components/ProductTile/renderImage.d.ts +3 -0
- package/dist/components/ProductTile/renderImage.js +12 -0
- package/dist/components/ProductTile/renderImage.js.map +1 -0
- package/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +13 -28
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/content-page-repository/transformImg.d.ts +1 -1
- package/dist/content-page-repository/transformImg.js +4 -10
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/content-page-repository/transformMarkdown.js +3 -3
- package/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/dist/hooks/useCachedAsyncData.d.ts +2 -0
- package/dist/hooks/useCachedAsyncData.js +25 -0
- package/dist/hooks/useCachedAsyncData.js.map +1 -0
- package/dist/hooks/useLocation.d.ts +6 -0
- package/dist/hooks/useLocation.js +26 -0
- package/dist/hooks/useLocation.js.map +1 -0
- package/dist/hooks/useRegions.d.ts +6 -0
- package/dist/hooks/useRegions.js +11 -0
- package/dist/hooks/useRegions.js.map +1 -0
- package/dist/services/sitemap/SitemapProps.d.ts +8 -0
- package/dist/ui-kit/Location/Location.d.ts +19 -0
- package/dist/ui-kit/Location/Location.js +44 -0
- package/dist/ui-kit/Location/Location.js.map +1 -0
- package/dist/ui-kit/Location/SearchBar.d.ts +6 -0
- package/dist/ui-kit/Location/SearchBar.js +9 -0
- package/dist/ui-kit/Location/SearchBar.js.map +1 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/Text/Text.js +1 -5
- package/dist/ui-kit/Text/Text.js.map +1 -1
- package/dist/utils/groupBy.d.ts +1 -0
- package/dist/utils/groupBy.js +13 -0
- package/dist/utils/groupBy.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +4 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +9 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderBurger.js +4 -3
- package/lib/components/Header/HeaderBurger.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/lib/components/Header/HeaderSecondaryMenu.js +13 -4
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +10 -23
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
- package/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/lib/components/ProductTile/renderBenefit.d.ts +4 -0
- package/lib/components/ProductTile/renderBenefit.js +29 -0
- package/lib/components/ProductTile/renderBenefit.js.map +1 -0
- package/lib/components/ProductTile/renderImage.d.ts +3 -0
- package/lib/components/ProductTile/renderImage.js +9 -0
- package/lib/components/ProductTile/renderImage.js.map +1 -0
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +13 -28
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/content-page-repository/transformImg.d.ts +1 -1
- package/lib/content-page-repository/transformImg.js +4 -10
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/content-page-repository/transformMarkdown.js +3 -3
- package/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/lib/hooks/useCachedAsyncData.d.ts +2 -0
- package/lib/hooks/useCachedAsyncData.js +22 -0
- package/lib/hooks/useCachedAsyncData.js.map +1 -0
- package/lib/hooks/useLocation.d.ts +6 -0
- package/lib/hooks/useLocation.js +23 -0
- package/lib/hooks/useLocation.js.map +1 -0
- package/lib/hooks/useRegions.d.ts +6 -0
- package/lib/hooks/useRegions.js +8 -0
- package/lib/hooks/useRegions.js.map +1 -0
- package/lib/services/sitemap/SitemapProps.d.ts +8 -0
- package/lib/ui-kit/Location/Location.d.ts +19 -0
- package/lib/ui-kit/Location/Location.fixture.d.ts +6 -0
- package/lib/ui-kit/Location/Location.js +42 -0
- package/lib/ui-kit/Location/Location.js.map +1 -0
- package/lib/ui-kit/Location/SearchBar.d.ts +6 -0
- package/lib/ui-kit/Location/SearchBar.js +7 -0
- package/lib/ui-kit/Location/SearchBar.js.map +1 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/Text/Text.js +1 -5
- package/lib/ui-kit/Text/Text.js.map +1 -1
- package/lib/utils/groupBy.d.ts +1 -0
- package/lib/utils/groupBy.js +10 -0
- package/lib/utils/groupBy.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +49 -25
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/bundle/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/bundle/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/bundle/hooks/useCachedAsyncData.d.ts +2 -0
- package/mobile/bundle/hooks/useLocation.d.ts +6 -0
- package/mobile/bundle/hooks/useRegions.d.ts +6 -0
- package/mobile/bundle/services/sitemap/SitemapProps.d.ts +8 -0
- package/mobile/bundle/ui-kit/Location/Location.d.ts +19 -0
- package/mobile/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
- package/mobile/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/bundle/utils/groupBy.d.ts +1 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/mobile/dist/components/Header/HeaderBurger.js +4 -3
- package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +13 -4
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +9 -22
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/mobile/dist/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js +32 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -0
- package/mobile/dist/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/dist/components/ProductTile/renderImage.js +12 -0
- package/mobile/dist/components/ProductTile/renderImage.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/dist/content-page-repository/transformImg.js +4 -10
- package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js +3 -3
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/dist/hooks/useCachedAsyncData.d.ts +2 -0
- package/mobile/dist/hooks/useCachedAsyncData.js +25 -0
- package/mobile/dist/hooks/useCachedAsyncData.js.map +1 -0
- package/mobile/dist/hooks/useLocation.d.ts +6 -0
- package/mobile/dist/hooks/useLocation.js +26 -0
- package/mobile/dist/hooks/useLocation.js.map +1 -0
- package/mobile/dist/hooks/useRegions.d.ts +6 -0
- package/mobile/dist/hooks/useRegions.js +11 -0
- package/mobile/dist/hooks/useRegions.js.map +1 -0
- package/mobile/dist/services/sitemap/SitemapProps.d.ts +8 -0
- package/mobile/dist/ui-kit/Location/Location.d.ts +19 -0
- package/mobile/dist/ui-kit/Location/Location.js +44 -0
- package/mobile/dist/ui-kit/Location/Location.js.map +1 -0
- package/mobile/dist/ui-kit/Location/SearchBar.d.ts +6 -0
- package/mobile/dist/ui-kit/Location/SearchBar.js +9 -0
- package/mobile/dist/ui-kit/Location/SearchBar.js.map +1 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/Text/Text.js +1 -5
- package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
- package/mobile/dist/utils/groupBy.d.ts +1 -0
- package/mobile/dist/utils/groupBy.js +13 -0
- package/mobile/dist/utils/groupBy.js.map +1 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
- package/mobile/lib/components/Header/HeaderBurger.js +4 -3
- package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +13 -4
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +10 -23
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/mobile/lib/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js +29 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -0
- package/mobile/lib/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/lib/components/ProductTile/renderImage.js +9 -0
- package/mobile/lib/components/ProductTile/renderImage.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/lib/content-page-repository/transformImg.js +4 -10
- package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js +3 -3
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/lib/hooks/useCachedAsyncData.d.ts +2 -0
- package/mobile/lib/hooks/useCachedAsyncData.js +22 -0
- package/mobile/lib/hooks/useCachedAsyncData.js.map +1 -0
- package/mobile/lib/hooks/useLocation.d.ts +6 -0
- package/mobile/lib/hooks/useLocation.js +23 -0
- package/mobile/lib/hooks/useLocation.js.map +1 -0
- package/mobile/lib/hooks/useRegions.d.ts +6 -0
- package/mobile/lib/hooks/useRegions.js +8 -0
- package/mobile/lib/hooks/useRegions.js.map +1 -0
- package/mobile/lib/services/sitemap/SitemapProps.d.ts +8 -0
- package/mobile/lib/ui-kit/Location/Location.d.ts +19 -0
- package/mobile/lib/ui-kit/Location/Location.js +42 -0
- package/mobile/lib/ui-kit/Location/Location.js.map +1 -0
- package/mobile/lib/ui-kit/Location/SearchBar.d.ts +6 -0
- package/mobile/lib/ui-kit/Location/SearchBar.js +7 -0
- package/mobile/lib/ui-kit/Location/SearchBar.js.map +1 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/Text/Text.js +1 -5
- package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/lib/utils/groupBy.d.ts +1 -0
- package/mobile/lib/utils/groupBy.js +10 -0
- package/mobile/lib/utils/groupBy.js.map +1 -0
- package/mobile/src/common.css +50 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
- package/mobile/src/components/Header/HeaderBurger.tsx +5 -7
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
- package/mobile/src/components/MiniGallery/MiniGallery.ui.json +1 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +3 -0
- package/mobile/src/components/ProductTile/ProductTile.tsx +13 -44
- package/mobile/src/components/ProductTile/ProductTile.ui.json +14 -1
- package/mobile/src/components/ProductTile/ProductTileContent.ts +26 -2
- package/mobile/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
- package/mobile/src/components/ProductTile/renderBenefit.tsx +39 -0
- package/mobile/src/components/ProductTile/renderImage.tsx +15 -0
- package/mobile/src/components/Recommendation/Recommendation.example.json +6 -5
- package/mobile/src/components/Recommendation/Recommendation.ui.json +8 -0
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/content-page-repository/transformImg.ts +6 -14
- package/mobile/src/content-page-repository/transformMarkdown.ts +3 -3
- package/mobile/src/hooks/useCachedAsyncData.ts +37 -0
- package/mobile/src/hooks/useLocation.ts +48 -0
- package/mobile/src/hooks/useRegions.ts +16 -0
- package/mobile/src/services/sitemap/SitemapProps.ts +9 -0
- package/mobile/src/ui-kit/Location/Location.tsx +168 -0
- package/mobile/src/ui-kit/Location/SearchBar.tsx +30 -0
- package/mobile/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
- package/mobile/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
- package/mobile/src/ui-kit/Text/Text.tsx +5 -7
- package/mobile/src/utils/groupBy.ts +10 -0
- package/package.json +2 -2
- package/src/common.css +50 -0
- package/src/components/Blocks.ts +4 -2
- package/src/components/Carousel/Carousel.fixture.tsx +22 -4
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +47 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
- package/src/components/Header/Header.tsx +6 -4
- package/src/components/Header/HeaderBurger.tsx +5 -7
- package/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
- package/src/components/MiniGallery/MiniGallery.ui.json +1 -1
- package/src/components/ProductTile/ProductTile.example.json +3 -0
- package/src/components/ProductTile/ProductTile.fixture.tsx +11 -4
- package/src/components/ProductTile/ProductTile.tsx +13 -44
- package/src/components/ProductTile/ProductTile.ui.json +14 -1
- package/src/components/ProductTile/ProductTileContent.ts +26 -2
- package/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
- package/src/components/ProductTile/renderBenefit.tsx +39 -0
- package/src/components/ProductTile/renderImage.tsx +15 -0
- package/src/components/Recommendation/Recommendation.example.json +6 -5
- package/src/components/Recommendation/Recommendation.fixture.tsx +11 -10
- package/src/components/Recommendation/Recommendation.ui.json +8 -0
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/TextBlock/TextBlock.tsx +49 -41
- package/src/content-page-repository/transformImg.ts +6 -14
- package/src/content-page-repository/transformMarkdown.ts +3 -3
- package/src/hooks/useCachedAsyncData.ts +37 -0
- package/src/hooks/useLocation.ts +48 -0
- package/src/hooks/useRegions.ts +16 -0
- package/src/services/sitemap/SitemapProps.ts +9 -0
- package/src/ui-kit/Location/Location.fixture.tsx +81 -0
- package/src/ui-kit/Location/Location.tsx +168 -0
- package/src/ui-kit/Location/SearchBar.tsx +30 -0
- package/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
- package/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
- package/src/ui-kit/Text/Text.tsx +5 -7
- package/src/utils/groupBy.ts +10 -0
- package/bundle/hooks/useGeolocation.d.ts +0 -1
- package/dist/hooks/useGeolocation.d.ts +0 -1
- package/dist/hooks/useGeolocation.js +0 -21
- package/dist/hooks/useGeolocation.js.map +0 -1
- package/lib/hooks/useGeolocation.d.ts +0 -1
- package/lib/hooks/useGeolocation.js +0 -18
- package/lib/hooks/useGeolocation.js.map +0 -1
- package/mobile/bundle/hooks/useGeolocation.d.ts +0 -1
- package/mobile/dist/hooks/useGeolocation.d.ts +0 -1
- package/mobile/dist/hooks/useGeolocation.js +0 -21
- package/mobile/dist/hooks/useGeolocation.js.map +0 -1
- package/mobile/lib/hooks/useGeolocation.d.ts +0 -1
- package/mobile/lib/hooks/useGeolocation.js +0 -18
- package/mobile/lib/hooks/useGeolocation.js.map +0 -1
- package/mobile/src/hooks/useGeolocation.ts +0 -22
- package/src/hooks/useGeolocation.ts +0 -22
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.useRegions = void 0;
|
|
3
|
+
const useAsyncData_1 = require("@redneckz/uni-jsx/lib/hooks/useAsyncData");
|
|
4
|
+
const fetchJSON_1 = require("../utils/fetchJSON");
|
|
5
|
+
const REGIONS_URL = '/api/v1/regions';
|
|
6
|
+
function useRegions() {
|
|
7
|
+
const { data } = (0, useAsyncData_1.useAsyncData)(REGIONS_URL, fetchJSON_1.fetchJSONUnsafe);
|
|
8
|
+
return data || [];
|
|
9
|
+
}
|
|
10
|
+
exports.useRegions = useRegions;
|
|
11
|
+
//# sourceMappingURL=useRegions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRegions.js","sourceRoot":"","sources":["../../src/hooks/useRegions.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,kDAAqD;AAErD,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAQtC,SAAgB,UAAU;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAAW,WAAW,EAAE,2BAAe,CAAC,CAAC;IAEtE,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAJD,gCAIC"}
|
|
@@ -17,10 +17,18 @@ export interface DispositionItem extends LinkProps {
|
|
|
17
17
|
/** @hidden */
|
|
18
18
|
icon?: Picture;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @title Представительства за рубежом
|
|
22
|
+
* @required ["text", "href"]
|
|
23
|
+
*/
|
|
24
|
+
export interface ForeignOffice extends LinkProps {
|
|
25
|
+
icon?: Picture;
|
|
26
|
+
}
|
|
20
27
|
export interface SitemapDataProps {
|
|
21
28
|
topItems?: TopMenuItem[];
|
|
22
29
|
dispositions?: DispositionItem[];
|
|
23
30
|
logo?: LogoType;
|
|
31
|
+
foreignOffices?: ForeignOffice[];
|
|
24
32
|
defaultLocation?: string;
|
|
25
33
|
officesLink?: string;
|
|
26
34
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Region } from '../../hooks/useRegions';
|
|
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;
|
|
17
|
+
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 {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.Location = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const useLink_1 = require("../../hooks/useLink");
|
|
7
|
+
const useRegions_1 = require("../../hooks/useRegions");
|
|
8
|
+
const useSearch_1 = require("../../hooks/useSearch");
|
|
9
|
+
const Text_1 = require("../../ui-kit/Text/Text");
|
|
10
|
+
const groupBy_1 = require("../../utils/groupBy");
|
|
11
|
+
const Img_1 = require("../Img/Img");
|
|
12
|
+
const SearchBar_1 = require("./SearchBar");
|
|
13
|
+
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
14
|
+
exports.Location = (0, uni_jsx_1.JSX)(({ currentLocation, onChangeLocation, close, foreignOffices }) => {
|
|
15
|
+
const { term, setTerm } = (0, useSearch_1.useSearch)();
|
|
16
|
+
const handleSearch = (0, hooks_1.useCallback)((_) => setTerm(_), []);
|
|
17
|
+
const regions = cleanUpRegions((0, useRegions_1.useRegions)()).sort((a, b) => a.name.localeCompare(b.name));
|
|
18
|
+
const regionsGroupByLetter = (0, groupBy_1.groupBy)(regions, regionFirstLetter);
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "absolute h-full w-full inset-0 bg-white text-l-light z-50", children: [(0, jsx_runtime_1.jsx)(CloseButton, { close: close }), (0, jsx_runtime_1.jsxs)("div", { className: "container py-12", children: [(0, jsx_runtime_1.jsx)(CurrentLocation, { currentLocation: currentLocation }), (0, jsx_runtime_1.jsx)(SearchBar_1.SearchBar, { onSearch: handleSearch, searchTerm: term, className: "mb-7" }), term && term.length >= SEARCH_TERM_MIN_LENGTH ? ((0, jsx_runtime_1.jsx)("div", { children: regions
|
|
20
|
+
.filter((region) => region.name?.startsWith(term))
|
|
21
|
+
.map(renderRegion({ onChangeLocation, close })) })) : ((0, jsx_runtime_1.jsx)("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, close })) })), (0, jsx_runtime_1.jsx)(ForeignOffices, { foreignOffices: foreignOffices })] })] }));
|
|
22
|
+
});
|
|
23
|
+
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
24
|
+
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
25
|
+
...region,
|
|
26
|
+
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
27
|
+
}));
|
|
28
|
+
const CurrentLocation = (0, uni_jsx_1.JSX)(({ currentLocation }) => currentLocation ? ((0, jsx_runtime_1.jsxs)("div", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), (0, jsx_runtime_1.jsx)("button", { className: "cursor-pointer", onClick: close, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-green", children: currentLocation.name }) })] })) : null);
|
|
29
|
+
const CloseButton = (0, uni_jsx_1.JSX)(({ close }) => ((0, jsx_runtime_1.jsx)("button", { className: "visible peer-placeholder-shown:invisible absolute top-6 right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
close && close();
|
|
32
|
+
}, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: "CloseIcon", width: "24", height: "24" }) })));
|
|
33
|
+
const renderRegionGroup = ({ onChangeLocation, close }) => ([letter, regions]) => ((0, jsx_runtime_1.jsxs)("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-2.5", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, close }))] }, letter));
|
|
34
|
+
const renderRegion = ({ onChangeLocation, close }) => (region) => ((0, jsx_runtime_1.jsx)("div", { className: "mb-1", children: (0, jsx_runtime_1.jsx)("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
35
|
+
onChangeLocation && onChangeLocation(region);
|
|
36
|
+
close && close();
|
|
37
|
+
}, children: region.name }) }, region.id));
|
|
38
|
+
const ForeignOffices = (0, uni_jsx_1.JSX)(({ foreignOffices }) => foreignOffices?.length ? ((0, jsx_runtime_1.jsxs)("div", { className: "border-t border-main-divider mt-7 pt-7", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-4", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-m-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:" }) }), (0, jsx_runtime_1.jsx)("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => ((0, jsx_runtime_1.jsx)(ForeignOffice, { ...office }, String(i)))) })] })) : null);
|
|
39
|
+
const ForeignOffice = (0, uni_jsx_1.JSX)(({ icon, ...rest }) => {
|
|
40
|
+
const link = (0, useLink_1.useLink)();
|
|
41
|
+
const { text, target, href, onClick } = link(rest);
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-x-3", children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { image: icon }), (0, jsx_runtime_1.jsx)("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })] }));
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=Location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/Location.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,iDAA8C;AAE9C,uDAAoD;AACpD,qDAAkD;AAGlD,iDAA8C;AAC9C,iDAA8C;AAC9C,oCAAiC;AACjC,2CAAwC;AAExC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAwBpB,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE;IAC/D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,qBAAS,GAAE,CAAC;IAEtC,MAAM,YAAY,GAAG,IAAA,mBAAW,EAAC,CAAC,CAAS,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAa,cAAc,CAAC,IAAA,uBAAU,GAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACnE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAC7B,CAAC;IACF,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AAI,EACpB,8BAAG,SAAS,EAAC,0BAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YACjF,IAAI,GACH,IACA,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.SearchBar = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
exports.SearchBar = (0, uni_jsx_1.JSX)(({ className, searchTerm, onSearch }) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("form", { className: `font-sans relative ${className}`, children: [(0, jsx_runtime_1.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 : ((0, jsx_runtime_1.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" })) }), (0, jsx_runtime_1.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
|
|
7
|
+
outline-none border-main-stroke 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" })] }));
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=SearchBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../src/ui-kit/Location/SearchBar.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,SAAS,GAAG,IAAA,aAAG,EAAsB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxF,OAAO,CACL,kCAAM,SAAS,EAAE,sBAAsB,SAAS,EAAE,aAChD,gCAAK,SAAS,EAAC,yGAAyG,YACrH,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB,kCAAO,OAAO,EAAC,kBAAkB,EAAC,SAAS,EAAE,sBAAsB,6GAE3D,CACT,GACG,EACN,kCACE,EAAE,EAAC,kBAAkB,EACrB,SAAS,EAAE;8HAC2G,EACtH,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAe,CAAC,EACnD,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,2BAA2B,GAChC,IACG,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.MarkdownText = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
exports.MarkdownText = (0, uni_jsx_1.JSX)((props) => {
|
|
6
|
+
const { md = '' } = props;
|
|
7
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "md-container", dangerouslySetInnerHTML: { __html: md } });
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=MarkdownText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownText.js","sourceRoot":"","sources":["../../../src/ui-kit/MarkdownText/MarkdownText.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAG3B,QAAA,YAAY,GAAG,IAAA,aAAG,EAAoB,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,gCAAK,SAAS,EAAC,cAAc,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAI,CAAC;AACnF,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTextProps.js","sourceRoot":"","sources":["../../../src/ui-kit/MarkdownText/MarkdownTextProps.ts"],"names":[],"mappings":""}
|
|
@@ -6,7 +6,7 @@ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
|
6
6
|
const mapChildren_1 = require("../../utils/mapChildren");
|
|
7
7
|
const SwipeListItem_1 = require("./SwipeListItem");
|
|
8
8
|
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
9
|
-
exports.SwipeListContainer = (0, uni_jsx_1.JSX)(({ className = '', containerRef, activeIndex, visibleItemCount, gap = 0, padding = 0, snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
9
|
+
exports.SwipeListContainer = (0, uni_jsx_1.JSX)(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
10
10
|
const observerOptions = {
|
|
11
11
|
sensitivity: 1,
|
|
12
12
|
rootRef: containerRef,
|
|
@@ -19,14 +19,18 @@ exports.SwipeListContainer = (0, uni_jsx_1.JSX)(({ className = '', containerRef,
|
|
|
19
19
|
onVisibleItemsChange && onVisibleItemsChange(itemsVisibilityList);
|
|
20
20
|
onVisibleIndicesChange && onVisibleIndicesChange(getVisibleIndices(itemsVisibilityList));
|
|
21
21
|
}, [onVisibleItemsChange, onVisibleIndicesChange]);
|
|
22
|
-
|
|
22
|
+
const additionPadding = visibleItemCount > 0 ? gap * Number(visibleItemCount) - 1 : 0;
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `box-border overflow-auto flex horizontal-list no-scrollbar ${className}`, style: {
|
|
24
|
+
...getContainerStyle(padding, additionPadding),
|
|
25
|
+
gap: `${gap}px`,
|
|
26
|
+
}, role: "list", ref: containerRef, children: (0, mapChildren_1.mapChildren)((child, idx) => ((0, jsx_runtime_1.jsx)(SwipeListItem_1.SwipeListItem, { className: `${snapAlign} ${visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''}`, style: getContainerStyle(padding / 4), activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
23
27
|
});
|
|
24
28
|
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
25
|
-
const getContainerStyle = (padding) => ({
|
|
29
|
+
const getContainerStyle = (padding, additionalPadding = 0) => ({
|
|
26
30
|
marginLeft: `${-padding}px`,
|
|
27
31
|
marginRight: `${-padding}px`,
|
|
28
32
|
paddingLeft: `${padding}px`,
|
|
29
|
-
paddingRight: `${padding}px`,
|
|
33
|
+
paddingRight: `${padding + additionalPadding}px`,
|
|
30
34
|
});
|
|
31
35
|
const getVisibleIndices = (itemsVisibilityList) => itemsVisibilityList
|
|
32
36
|
.map((_, i) => [_, i])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListContainer.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListContainer.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAkE;AAElE,yDAAsD;AAEtD,mDAAgD;AAmBhD,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAE1E,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SwipeListContainer.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListContainer.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAkE;AAElE,yDAAsD;AAEtD,mDAAgD;AAmBhD,MAAM,aAAa,GAAG,C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 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.Text = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.Text = (0, uni_jsx_1.JSX)((
|
|
6
|
-
const { size = '', color = '', align = '', font = '', children } = props;
|
|
7
|
-
const textClasses = `font-sans ${size} ${color} ${align} ${font}`;
|
|
8
|
-
return (0, jsx_runtime_1.jsx)("span", { className: textClasses, children: children });
|
|
9
|
-
});
|
|
5
|
+
exports.Text = (0, uni_jsx_1.JSX)(({ size, color, align, font, children }) => ((0, jsx_runtime_1.jsx)("span", { className: ['font-sans', size, color, align, font].filter(Boolean).join(' '), children: children })));
|
|
10
6
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/ui-kit/Text/Text.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAU3B,QAAA,IAAI,GAAG,IAAA,aAAG,EAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/ui-kit/Text/Text.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAU3B,QAAA,IAAI,GAAG,IAAA,aAAG,EAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC7E,iCAAM,SAAS,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAC/E,QAAQ,GACJ,CACR,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const groupBy: <K, V>(list: V[], keyGetter: (input: V) => K) => Map<K, V[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.groupBy = void 0;
|
|
3
|
+
const groupBy = (list, keyGetter) => {
|
|
4
|
+
const map = new Map();
|
|
5
|
+
list.forEach((item) => {
|
|
6
|
+
const key = keyGetter(item);
|
|
7
|
+
const collection = map.get(key);
|
|
8
|
+
map.set(key, [...(collection || []), item]);
|
|
9
|
+
});
|
|
10
|
+
return map;
|
|
11
|
+
};
|
|
12
|
+
exports.groupBy = groupBy;
|
|
13
|
+
//# sourceMappingURL=groupBy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../src/utils/groupBy.ts"],"names":[],"mappings":";;AAAO,MAAM,OAAO,GAAG,CAAO,IAAc,EAAE,SAA0B,EAAoB,EAAE;IAC5F,MAAM,GAAG,GAAG,IAAI,GAAG,EAAe,CAAC;IACnC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACpB,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC5B,MAAM,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AATW,QAAA,OAAO,WASlB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const CarouselRecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
3
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
|
+
import { BorderVersionStyleMap } from '../../model/BorderVersion.js';
|
|
5
|
+
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
6
|
+
import { Img } from '../../ui-kit/Img/Img.js';
|
|
7
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
8
|
+
import { List } from '../../ui-kit/List/List.js';
|
|
9
|
+
import { renderButton } from '../../ui-kit/Button/ButtonSection.js';
|
|
10
|
+
import { SocialMedia } from '../Footer/SocialMedia.js';
|
|
11
|
+
import { VersionStyleMap } from '../../model/BlockVersion.js';
|
|
12
|
+
export const CarouselRecommendationCard = JSX(({ button, className = '', description, image, items = [], socialMedia = [], title, version = 'primary', ...rest }) => {
|
|
13
|
+
const tileTitle = title ? (_jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
14
|
+
const tileImage = image?.src ? (_jsx(Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
15
|
+
return (_jsx(BlockWrapper, { className: `relative text-left border border-solid box-border p-7 min-w-[524px]
|
|
16
|
+
${BorderVersionStyleMap[version]}
|
|
17
|
+
${VersionStyleMap[version]}
|
|
18
|
+
${className}`, ...rest, children: _jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: _jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? _jsx("span", { className: "mb-2", children: description }) : null, items.length ? (_jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia.length ? (_jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? _jsx("div", { className: "pt-2 mt-16", children: renderButton({ button }) }) : null] }) }) }));
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=CarouselRecommendationCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAM3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C,CAAC,EACC,MAAM,EACN,SAAS,GAAG,EAAE,EACd,WAAW,EACX,KAAK,EACL,KAAK,GAAG,EAAE,EACV,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CACxB,KAAC,OAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAC7B,KAAC,GAAG,IAAC,SAAS,EAAC,+BAA+B,EAAC,KAAK,EAAE,KAAK,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,KAAC,YAAY,IACX,SAAS,EAAE;UACT,qBAAqB,CAAC,OAAO,CAAC;UAC9B,eAAe,CAAC,OAAO,CAAC;UACxB,SAAS,EAAE,KACT,IAAI,YAER,KAAC,QAAQ,IAAC,SAAS,EAAC,sBAAsB,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,YAC3E,eAAK,SAAS,EAAC,sCAAsC,aAClD,WAAW,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,MAAM,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACd,KAAC,IAAI,IACH,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CACpB,KAAC,WAAW,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAI,CAC7E,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,YAAY,YAAE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,GAAO,CAAC,CAAC,CAAC,IAAI,IAC/E,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
|
+
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
+
/**
|
|
8
|
+
* @title Карточка рекомендаций
|
|
9
|
+
*/
|
|
10
|
+
export interface CarouselRecommendationCardContent extends HeadlineCommonProps, ListContent {
|
|
11
|
+
/**
|
|
12
|
+
* @title Соц сети
|
|
13
|
+
* @minItems 3
|
|
14
|
+
* @default [
|
|
15
|
+
* { "href": "https://t.me" },
|
|
16
|
+
* { "href": "https://vk.com" },
|
|
17
|
+
* { "href": "https://ok.ru" },
|
|
18
|
+
* ]
|
|
19
|
+
*/
|
|
20
|
+
socialMedia?: LinkCommonProps[];
|
|
21
|
+
/**
|
|
22
|
+
* @default {
|
|
23
|
+
* "format": "webp",
|
|
24
|
+
* "size": {
|
|
25
|
+
* "width": 290
|
|
26
|
+
* },
|
|
27
|
+
* "sources": [{
|
|
28
|
+
* "media": 1279,
|
|
29
|
+
* "width": 174,
|
|
30
|
+
* "format": "webp",
|
|
31
|
+
* "alignment": "southeast"
|
|
32
|
+
* }]
|
|
33
|
+
* }
|
|
34
|
+
*/
|
|
35
|
+
image?: Picture;
|
|
36
|
+
/**
|
|
37
|
+
* @default {
|
|
38
|
+
* "text": "",
|
|
39
|
+
* "version": "secondary"
|
|
40
|
+
* }
|
|
41
|
+
*/
|
|
42
|
+
button?: ButtonProps;
|
|
43
|
+
version?: BlockVersion;
|
|
44
|
+
}
|
package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselRecommendationCardContent.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +1,12 @@
|
|
|
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 { useLocation } from '../../hooks/useLocation.js';
|
|
4
4
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
5
5
|
import { SearchBar } from '../../ui-kit/SearchBar/SearchBar.js';
|
|
6
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
6
7
|
export const HeaderBurger = JSX(({ burgerSubMenu, onClick, defaultLocation = '', children }) => {
|
|
7
|
-
const [
|
|
8
|
-
return (_jsxs("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [_jsx("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: _jsx(Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), _jsxs("button", {
|
|
8
|
+
const [location] = useLocation(defaultLocation);
|
|
9
|
+
return (_jsxs("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [_jsx("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: _jsx(Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), _jsxs("button", { className: "flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer", children: [_jsx(Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), _jsx(Text, { color: "text-secondary-text", children: location.name })] }), children, _jsx("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), _jsx(SearchBar, { className: "grow" })] }));
|
|
9
10
|
});
|
|
10
11
|
const renderBurgerSubMenuItem = (menu, i) => {
|
|
11
12
|
const { icon, href, text } = menu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBurger.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderBurger.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"HeaderBurger.js","sourceRoot":"","sources":["../../../src/components/Header/He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AAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAElC,OAAO,CACL,aAA8B,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,0CAA0C,aAC3F,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,GAAG,IAAC,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CACrF,CAAC,CAAC,CAAC,IAAI,EACR,eAAM,SAAS,EAAC,oBAAoB,YAAE,IAAI,GAAQ,KAJ5C,iBAAiB,CAAC,EAAE,CAKxB,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
|
+
import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
|
|
2
3
|
interface HeaderSecondaryMenuContent {
|
|
3
4
|
defaultLocation?: string;
|
|
4
5
|
officesLink?: string;
|
|
5
6
|
bgColor?: BgColorVersion;
|
|
7
|
+
foreignOffices?: ForeignOffice[];
|
|
6
8
|
}
|
|
7
9
|
export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent {
|
|
8
10
|
className?: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
+
import { useLocation } from '../../hooks/useLocation.js';
|
|
4
5
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
6
|
+
import { Location } from '../../ui-kit/Location/Location.js';
|
|
5
7
|
import { TopItem } from '../../ui-kit/TopItem/TopItem.js';
|
|
6
8
|
import { HeaderSecondaryMenuButton } from './HeaderSecondaryMenuButton.js';
|
|
7
9
|
const COLORS_MAP = {
|
|
@@ -16,8 +18,15 @@ const LINKS_ICON_VERSION_MAP = {
|
|
|
16
18
|
'bg-white': 'black',
|
|
17
19
|
transparent: 'white',
|
|
18
20
|
};
|
|
19
|
-
export const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
20
|
-
const [
|
|
21
|
-
|
|
21
|
+
export const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', foreignOffices, bgColor = 'bg-white', }) => {
|
|
22
|
+
const [isShowLocationModal, setShowLocationModal] = useState(false);
|
|
23
|
+
const [location, onChangeLocation] = useLocation(defaultLocation);
|
|
24
|
+
const showLocationModal = () => {
|
|
25
|
+
setShowLocationModal(true);
|
|
26
|
+
};
|
|
27
|
+
const hideLocationModal = () => {
|
|
28
|
+
setShowLocationModal(false);
|
|
29
|
+
};
|
|
30
|
+
return (_jsxs("div", { className: `flex items-center ${className || ''}`, children: [_jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: showLocationModal, bgColor: bgColor }), officesLink ? (_jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, _jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: _jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), _jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: _jsx(Img, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) }), isShowLocationModal ? (_jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
|
|
22
31
|
});
|
|
23
32
|
//# sourceMappingURL=HeaderSecondaryMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;A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D,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,yBAAyB,IACxB,SAAS,EAAE,cAAc,UAAU,CAAC,OAAO,CAAC,EAAE,EAC9C,SAAS,EAAC,4EAAgB,YAE1B,KAAC,GAAG,IACF,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,EAC1E,SAAS,EAAC,4BAA4B,EACtC,cAAc,EAAC,yEAAyE,EACxF,KAAK,SACL,GACwB,EAC5B,KAAC,yBAAyB,IACxB,SAAS,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,wBAAwB,EAC/D,SAAS,EAAC,2HAAuB,YAEjC,KAAC,GAAG,IACF,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,EACzE,SAAS,EAAC,4DAA4D,EACtE,cAAc,EAAC,qDAAqD,EACpE,KAAK,SACL,GACwB,EAC3B,mBAAmB,CAAC,CAAC,CAAC,CACrB,KAAC,QAAQ,IACP,eAAe,EAAE,QAAQ,EACzB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,iBAAiB,GACxB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,35 +1,22 @@
|
|
|
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 { VersionStyleMap } from '../../model/BlockVersion.js';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
5
5
|
import { ButtonSection } from '../../ui-kit/Button/ButtonSection.js';
|
|
6
|
-
import { Img } from '../../ui-kit/Img/Img.js';
|
|
7
6
|
import { getTileRightPadding } from '../BaseTile/getTileRightPadding.js';
|
|
8
7
|
import { Headline } from '../Headline/Headline.js';
|
|
8
|
+
import { renderAdditionalDescription } from './renderAdditionalDescription.js';
|
|
9
|
+
import { renderBenefit } from './renderBenefit.js';
|
|
10
|
+
import { renderImage } from './renderImage.js';
|
|
9
11
|
export const ProductTile = JSX(({ className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, isImageOnRightSide = true, version = 'primary', ...rest }) => (_jsxs(BlockWrapper, { className: `overflow-hidden font-sans p-9 box-border relative min-h-[364px]
|
|
10
|
-
${VersionStyleMap[version]} ${getTileRightPadding(className)} ${className}`, ...rest, children: [_jsxs("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [_jsx(Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image),
|
|
12
|
+
${VersionStyleMap[version]} ${getTileRightPadding(className)} ${className}`, ...rest, children: [_jsxs("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [_jsx(Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image), renderAdditionalDescription(additionalDescription, image), buttons?.length ? (_jsx(ButtonSection, { buttons: buttons, className: "mt-5 gap-4 z-10 text-l" })) : null] }), renderImage(image, isImageOnRightSide)] })));
|
|
11
13
|
function renderBenefits(benefits, version, image) {
|
|
12
|
-
|
|
13
|
-
const BENEFITS_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
14
|
-
return (_jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
15
|
-
${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
16
|
-
}
|
|
17
|
-
const renderBenefit = (version = 'primary') => (benefit, i) => {
|
|
18
|
-
const { label = '', description = '' } = benefit;
|
|
19
|
-
return [
|
|
20
|
-
_jsx("div", { className: "text-h6", children: label }, `label-${i}`),
|
|
21
|
-
_jsx("div", { className: `text-m-light ${VersionAdditionalStyleMap[version]}`, children: description }, `desc-${i}`),
|
|
22
|
-
];
|
|
23
|
-
};
|
|
24
|
-
function renderAdditionalDescription(additionalDescription, image) {
|
|
25
|
-
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
26
|
-
const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
27
|
-
return (_jsx("div", { className: `text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}`, children: additionalDescription }));
|
|
28
|
-
}
|
|
29
|
-
function renderImage(image, isImageOnRightSide) {
|
|
30
|
-
if (!image?.src) {
|
|
14
|
+
if (!benefits.length) {
|
|
31
15
|
return null;
|
|
32
16
|
}
|
|
33
|
-
|
|
17
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
18
|
+
const benefitsWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
19
|
+
return (_jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
20
|
+
${benefitsWidth}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
34
21
|
}
|
|
35
22
|
//# sourceMappingURL=ProductTile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources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AE,OAAO,EACxB,KAAK,EAAC,MAAM,KACR,IAAI,GACR,EACD,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,EACxC,2BAA2B,CAAC,qBAAqB,EAAE,KAAK,CAAC,EACzD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,wBAAwB,GAAG,CACvE,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,WAAW,CAAC,KAAK,EAAE,kBAAkB,CAAC,IAC1B,CAChB,CACF,CAAC;AAEF,SAAS,cAAc,CAAC,QAAmB,EAAE,OAAqB,EAAE,KAAe;IACjF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,wGAAwG;IACxG,MAAM,aAAa,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvE,OAAO,CACL,cACE,SAAS,EAAE;UACP,aAAa,EAAE,YAElB,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAC1D,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,28 @@ import type { BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import type { DescriptionProps, HeadlineProps, LabelProps } from '../../model/HeadlineType';
|
|
3
3
|
import type { Picture } from '../../model/Picture';
|
|
4
4
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
|
|
5
|
+
import type { MarkdownTextProps } from '../../ui-kit/MarkdownText/MarkdownTextProps';
|
|
6
|
+
/**
|
|
7
|
+
* @title Стандартный
|
|
8
|
+
*/
|
|
9
|
+
declare type TextBenefit = DescriptionProps & LabelProps & {
|
|
10
|
+
/** @default default */
|
|
11
|
+
type: 'default';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @title Форматированный текст
|
|
15
|
+
*/
|
|
16
|
+
declare type MarkdownTextContent = MarkdownTextProps & {
|
|
17
|
+
/** @default md */
|
|
18
|
+
type: 'md';
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @title Преимущество
|
|
22
|
+
* @default{
|
|
23
|
+
* "type": "default"
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
export declare type Benefit = TextBenefit | MarkdownTextContent;
|
|
6
27
|
/**
|
|
7
28
|
* @title Продуктовая плитка
|
|
8
29
|
*/
|
|
@@ -27,9 +48,10 @@ export declare type ProductTileContent = HeadlineProps & ButtonContent & {
|
|
|
27
48
|
* @title Преимущества
|
|
28
49
|
* @maxItems 7
|
|
29
50
|
*/
|
|
30
|
-
benefits?:
|
|
51
|
+
benefits?: Benefit[];
|
|
31
52
|
/** @title Дополнительное описание */
|
|
32
53
|
additionalDescription?: string;
|
|
33
54
|
/** @title Картинка справа/текст слева */
|
|
34
55
|
isImageOnRightSide?: boolean;
|
|
35
56
|
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { Picture } from '../../model/Picture';
|
|
4
|
+
export declare function renderAdditionalDescription(additionalDescription?: string, image?: Picture, version?: BlockVersion): JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph.js';
|
|
3
|
+
const DESCRIPTION_STYLE_MAP = {
|
|
4
|
+
primary: 'text-secondary-text',
|
|
5
|
+
secondary: 'text-white',
|
|
6
|
+
};
|
|
7
|
+
export function renderAdditionalDescription(additionalDescription, image, version = 'primary') {
|
|
8
|
+
if (!additionalDescription) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
12
|
+
const descriptionWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
13
|
+
return (_jsx("div", { className: `mt-2.5 z-10 ${descriptionWidth}`, children: _jsx(Paragraph, { size: "text-m", font: "font-light", color: DESCRIPTION_STYLE_MAP[version], children: additionalDescription }) }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=renderAdditionalDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderAdditionalDescription.js","sourceRoot":"","sources":["../../../src/components/ProductTile/renderAdditionalDescription.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D,MAAM,qBAAqB,GAAoC;IAC7D,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,UAAU,2BAA2B,CACzC,qBAA8B,EAC9B,KAAe,EACf,UAAwB,SAAS;IAEjC,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,wGAAwG;IACxG,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC;IAE1E,OAAO,CACL,cAAK,SAAS,EAAE,eAAe,gBAAgB,EAAE,YAC/C,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,YAC7E,qBAAqB,GACZ,GACR,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { Benefit } from './ProductTileContent';
|
|
4
|
+
export declare const renderBenefit: (version?: BlockVersion) => (benefit: Benefit, i: number) => JSX.Element | JSX.Element[] | null;
|