@redneckz/wildless-cms-uni-blocks 0.3.74 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +262 -194
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/api/DaDataAPI.js.map +1 -1
- package/dist/api/LikeAPI.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +1 -1
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.js +1 -2
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +1 -2
- package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +5 -3
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/dist/components/Calculator/renderRate.js.map +1 -1
- package/dist/components/Catalog/Catalog.d.ts +5 -0
- package/dist/components/Catalog/Catalog.js +36 -0
- package/dist/components/Catalog/Catalog.js.map +1 -0
- package/dist/components/Catalog/CatalogCard.d.ts +7 -0
- package/dist/components/Catalog/CatalogCard.js +16 -0
- package/dist/components/Catalog/CatalogCard.js.map +1 -0
- package/dist/components/Catalog/CatalogContent.d.ts +22 -0
- package/{mobile/dist/model/Insurance.js → dist/components/Catalog/CatalogContent.js} +1 -1
- package/dist/components/Catalog/CatalogContent.js.map +1 -0
- package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/SocialMedia.mobile.js.map +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Footer/TextInformation.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/dist/components/Header/HeaderBurger.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +5 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +16 -2
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js +2 -2
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/dist/components/OtherProducts/OtherProducts.js +1 -1
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/dist/components/OtherProducts/OtherProductsItem.js +4 -6
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +10 -6
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +12 -31
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +21 -0
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/dist/content-page-repository/mapJSON.js.map +1 -1
- package/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/dist/hooks/useExchangeRates.js.map +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/react/setup-fixture.js.map +1 -1
- package/dist/services/sitemap/findActiveSubItem.js.map +1 -1
- package/dist/services/sitemap/useSitemap.js.map +1 -1
- package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/dist/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/dist/ui-kit/Foldable/Foldable.js +5 -5
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/adjustHref.js.map +1 -1
- package/dist/utils/getColSpan.js.map +1 -1
- package/dist/utils/roundTo.js.map +1 -1
- package/dist/utils/tableFunc.js.map +1 -1
- package/dist/utils/url.js.map +1 -1
- package/lib/api/DaDataAPI.js.map +1 -1
- package/lib/api/LikeAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +1 -1
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.js +1 -2
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +1 -2
- package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +5 -3
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/lib/components/Calculator/renderRate.js.map +1 -1
- package/lib/components/Catalog/Catalog.d.ts +5 -0
- package/lib/components/Catalog/Catalog.fixture.d.ts +6 -0
- package/lib/components/Catalog/Catalog.js +34 -0
- package/lib/components/Catalog/Catalog.js.map +1 -0
- package/lib/components/Catalog/CatalogCard.d.ts +7 -0
- package/lib/components/Catalog/CatalogCard.js +14 -0
- package/lib/components/Catalog/CatalogCard.js.map +1 -0
- package/lib/components/Catalog/CatalogContent.d.ts +22 -0
- package/lib/components/Catalog/CatalogContent.js +2 -0
- package/lib/components/Catalog/CatalogContent.js.map +1 -0
- package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/SocialMedia.mobile.js.map +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Footer/TextInformation.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/lib/components/Header/HeaderBurger.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +5 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.fixture.d.ts +2 -0
- package/lib/components/MobileAppTile/MobileAppTile.js +16 -2
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js +2 -2
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +0 -1
- package/lib/components/OtherProducts/OtherProducts.js +1 -1
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/lib/components/OtherProducts/OtherProductsItem.js +4 -6
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +10 -6
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +12 -31
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +18 -0
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/lib/content-page-repository/mapJSON.js.map +1 -1
- package/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/lib/hooks/useExchangeRates.js.map +1 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/react/setup-fixture.js.map +1 -1
- package/lib/services/sitemap/findActiveSubItem.js.map +1 -1
- package/lib/services/sitemap/useSitemap.js.map +1 -1
- package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/lib/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/lib/ui-kit/Foldable/Foldable.js +5 -5
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/adjustHref.js.map +1 -1
- package/lib/utils/getColSpan.js.map +1 -1
- package/lib/utils/roundTo.js.map +1 -1
- package/lib/utils/tableFunc.js.map +1 -1
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +34 -37
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/api/DaDataAPI.js.map +1 -1
- package/mobile/dist/api/LikeAPI.js.map +1 -1
- package/mobile/dist/components/Accordion/Accordion.js +1 -1
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.js +1 -1
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemInner.js +1 -2
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.d.ts +5 -0
- package/mobile/dist/components/Catalog/Catalog.js +36 -0
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -0
- package/mobile/dist/components/Catalog/CatalogCard.d.ts +7 -0
- package/mobile/dist/components/Catalog/CatalogCard.js +16 -0
- package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -0
- package/mobile/dist/components/Catalog/CatalogContent.d.ts +22 -0
- package/{dist/model/Insurance.js → mobile/dist/components/Catalog/CatalogContent.js} +1 -1
- package/mobile/dist/components/Catalog/CatalogContent.js.map +1 -0
- package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +5 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +2 -2
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +4 -6
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +12 -31
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +21 -0
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/dist/content-page-repository/mapJSON.js.map +1 -1
- package/mobile/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/react/setup-fixture.js.map +1 -1
- package/mobile/dist/services/sitemap/findActiveSubItem.js.map +1 -1
- package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.js +5 -5
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/adjustHref.js.map +1 -1
- package/mobile/dist/utils/getColSpan.js.map +1 -1
- package/mobile/dist/utils/roundTo.js.map +1 -1
- package/mobile/dist/utils/tableFunc.js.map +1 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/api/DaDataAPI.js.map +1 -1
- package/mobile/lib/api/LikeAPI.js.map +1 -1
- package/mobile/lib/components/Accordion/Accordion.js +1 -1
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.js +1 -1
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemInner.js +1 -2
- package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.d.ts +5 -0
- package/mobile/lib/components/Catalog/Catalog.js +34 -0
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -0
- package/mobile/lib/components/Catalog/CatalogCard.d.ts +7 -0
- package/mobile/lib/components/Catalog/CatalogCard.js +14 -0
- package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -0
- package/mobile/lib/components/Catalog/CatalogContent.d.ts +22 -0
- package/mobile/lib/components/Catalog/CatalogContent.js +2 -0
- package/mobile/lib/components/Catalog/CatalogContent.js.map +1 -0
- package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +5 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +3 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +5 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +2 -2
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +5 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -8
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +4 -6
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +12 -31
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +9 -0
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +18 -0
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -0
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/lib/content-page-repository/mapJSON.js.map +1 -1
- package/mobile/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/react/setup-fixture.js.map +1 -1
- package/mobile/lib/services/sitemap/findActiveSubItem.js.map +1 -1
- package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +17 -15
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -3
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +5 -4
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +2 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.js +5 -5
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/adjustHref.js.map +1 -1
- package/mobile/lib/utils/getColSpan.js.map +1 -1
- package/mobile/lib/utils/roundTo.js.map +1 -1
- package/mobile/lib/utils/tableFunc.js.map +1 -1
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/api/DaDataAPI.ts +2 -0
- package/mobile/src/api/LikeAPI.ts +4 -0
- package/mobile/src/components/Accordion/Accordion.tsx +1 -1
- package/mobile/src/components/Accordion/AccordionItem.tsx +2 -2
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +3 -4
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -0
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +1 -0
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +1 -0
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +1 -0
- package/mobile/src/components/Calculator/renderRate.tsx +1 -0
- package/mobile/src/components/Catalog/Catalog.example.json +57 -0
- package/mobile/src/components/Catalog/Catalog.tsx +73 -0
- package/mobile/src/components/Catalog/CatalogCard.tsx +47 -0
- package/mobile/src/components/Catalog/CatalogContent.ts +26 -0
- package/mobile/src/components/ComparisonTable/TableColumn.tsx +1 -0
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -0
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +1 -0
- package/mobile/src/components/ContentPage/normalizeBlock.ts +1 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +1 -0
- package/mobile/src/components/ExchangeRateTile/calculateResult.ts +1 -0
- package/mobile/src/components/Footer/Footer.tsx +2 -0
- package/mobile/src/components/Footer/SocialMedia.tsx +1 -0
- package/mobile/src/components/Footer/TextInformation.tsx +1 -0
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +1 -0
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +1 -0
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +1 -0
- package/mobile/src/components/Header/HeaderBurger.tsx +2 -0
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +1 -0
- package/mobile/src/components/Headline/Headline.tsx +1 -0
- package/mobile/src/components/Insurance/Insurance.tsx +1 -0
- package/mobile/src/components/Insurance/InsuranceContent.ts +5 -2
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +4 -4
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +5 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -5
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -0
- package/mobile/src/components/LinkList/LinkList.tsx +1 -0
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +2 -4
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +7 -1
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +2 -2
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +3 -8
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +6 -18
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +1 -0
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +1 -0
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -0
- package/mobile/src/components/PromoTile/PromoTile.tsx +1 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +58 -82
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +6 -3
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +28 -0
- package/mobile/src/components/TextBlock/TextBlock.tsx +1 -0
- package/mobile/src/content-page-repository/ContentPageRepository.ts +5 -0
- package/mobile/src/content-page-repository/mapJSON.ts +3 -0
- package/mobile/src/content-page-repository/transformContentPage.ts +2 -0
- package/mobile/src/content-page-repository/transformMarkdown.ts +1 -0
- package/mobile/src/content-page-repository/transformPicture.ts +2 -0
- package/mobile/src/hooks/useCreditCalculatorData.ts +2 -0
- package/mobile/src/hooks/useExchangeRates.ts +3 -0
- package/mobile/src/hooks/useLink.ts +1 -0
- package/mobile/src/react/setup-fixture.ts +1 -0
- package/mobile/src/services/sitemap/findActiveSubItem.ts +1 -0
- package/mobile/src/services/sitemap/useSitemap.ts +2 -0
- package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +25 -15
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +14 -9
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -0
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +1 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +8 -4
- package/mobile/src/ui-kit/Input/Input.tsx +1 -0
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +1 -0
- package/mobile/src/ui-kit/List/ListItem.tsx +1 -0
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -0
- package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +1 -0
- package/mobile/src/ui-kit/Tabs/Tabs.tsx +1 -0
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -0
- package/mobile/src/utils/adjustHref.ts +2 -0
- package/mobile/src/utils/getColSpan.ts +1 -0
- package/mobile/src/utils/roundTo.ts +1 -0
- package/mobile/src/utils/tableFunc.ts +1 -0
- package/mobile/src/utils/url.ts +2 -0
- package/package.json +1 -1
- package/src/api/DaDataAPI.ts +2 -0
- package/src/api/LikeAPI.ts +4 -0
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +8 -19
- package/src/components/Accordion/Accordion.fixture.tsx +10 -2
- package/src/components/Accordion/Accordion.mobile.tsx +1 -1
- package/src/components/Accordion/AccordionItem.mobile.tsx +2 -2
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +3 -4
- package/src/components/Accordion/AccordionItemInner.tsx +3 -4
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -0
- package/src/components/Blocks.ts +5 -3
- package/src/components/Calculator/getMonthlyPayment.ts +1 -0
- package/src/components/Calculator/renderCalculatorBlock.tsx +1 -0
- package/src/components/Calculator/renderMonthsInput.tsx +1 -0
- package/src/components/Calculator/renderRate.tsx +1 -0
- package/src/components/Catalog/Catalog.example.json +57 -0
- package/src/components/Catalog/Catalog.fixture.tsx +48 -0
- package/src/components/Catalog/Catalog.tsx +73 -0
- package/src/components/Catalog/CatalogCard.tsx +47 -0
- package/src/components/Catalog/CatalogContent.ts +26 -0
- package/src/components/ComparisonTable/TableColumn.tsx +1 -0
- package/src/components/ContentPage/ContentPage.tsx +2 -0
- package/src/components/ContentPage/ContentPageHead.tsx +1 -0
- package/src/components/ContentPage/normalizeBlock.mobile.ts +1 -0
- package/src/components/ContentPage/normalizeBlock.ts +1 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +1 -0
- package/src/components/ExchangeRateTile/calculateResult.ts +1 -0
- package/src/components/Footer/Footer.mobile.tsx +2 -0
- package/src/components/Footer/SocialMedia.mobile.tsx +1 -0
- package/src/components/Footer/SocialMedia.tsx +1 -0
- package/src/components/Footer/TextInformation.mobile.tsx +1 -0
- package/src/components/Footer/TextInformation.tsx +1 -0
- package/src/components/Gallery/GalleryCardInner.tsx +1 -0
- package/src/components/GroupBlock/GroupBlocksItem.tsx +1 -0
- package/src/components/GroupBlock/renderBlocksTypes.tsx +1 -0
- package/src/components/Header/HeaderBurger.tsx +2 -0
- package/src/components/Header/HeaderSecondaryMenu.tsx +1 -0
- package/src/components/Headline/Headline.mobile.tsx +1 -0
- package/src/components/Insurance/Insurance.tsx +1 -0
- package/src/components/Insurance/InsuranceContent.ts +5 -2
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +4 -4
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +0 -5
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +5 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -5
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -0
- package/src/components/LinkList/LinkList.tsx +1 -0
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +69 -13
- package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +2 -4
- package/src/components/MobileAppTile/MobileAppTile.tsx +44 -12
- package/src/components/MobileAppTile/MobileAppTileContent.ts +7 -1
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +16 -53
- package/src/components/OtherProducts/OtherProducts.tsx +2 -2
- package/src/components/OtherProducts/OtherProductsContent.ts +3 -8
- package/src/components/OtherProducts/OtherProductsItem.tsx +6 -18
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
- package/src/components/ProductBlock/ProductBlock.tsx +1 -0
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -0
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +1 -0
- package/src/components/ProductBlock/renderBenefit.tsx +1 -0
- package/src/components/ProductTile/ProductTile.tsx +2 -0
- package/src/components/PromoTile/PromoTile.tsx +1 -0
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +58 -82
- package/src/components/StepsBlock/StepsBlock.tsx +27 -11
- package/src/components/StepsBlock/StepsBlockContent.ts +6 -3
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +28 -0
- package/src/components/TextBlock/TextBlock.mobile.tsx +1 -0
- package/src/components/TextBlock/TextBlock.tsx +1 -0
- package/src/content-page-repository/ContentPageRepository.ts +5 -0
- package/src/content-page-repository/mapJSON.ts +3 -0
- package/src/content-page-repository/transformContentPage.ts +2 -0
- package/src/content-page-repository/transformMarkdown.ts +1 -0
- package/src/content-page-repository/transformPicture.ts +2 -0
- package/src/hooks/useCreditCalculatorData.ts +2 -0
- package/src/hooks/useExchangeRates.ts +3 -0
- package/src/hooks/useLink.ts +1 -0
- package/src/react/setup-fixture.ts +1 -0
- package/src/services/sitemap/findActiveSubItem.ts +1 -0
- package/src/services/sitemap/useSitemap.ts +2 -0
- package/src/ui-kit/BlocksList/BlocksListProps.ts +25 -15
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +14 -9
- package/src/ui-kit/Button/ButtonInner.tsx +1 -0
- package/src/ui-kit/Button/ButtonSection.tsx +1 -0
- package/src/ui-kit/Foldable/Foldable.tsx +8 -4
- package/src/ui-kit/Input/Input.tsx +1 -0
- package/src/ui-kit/InputRange/InputRange.tsx +1 -0
- package/src/ui-kit/List/ListItem.tsx +1 -0
- package/src/ui-kit/Logo/Logo.tsx +1 -0
- package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -0
- package/src/ui-kit/SearchBar/SearchBar.tsx +1 -0
- package/src/ui-kit/SearchBar.mobile.tsx +1 -0
- package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +1 -0
- package/src/ui-kit/Tabs/Tabs.tsx +1 -0
- package/src/ui-kit/TopItem/TopItem.tsx +1 -0
- package/src/utils/adjustHref.ts +2 -0
- package/src/utils/getColSpan.ts +1 -0
- package/src/utils/roundTo.ts +1 -0
- package/src/utils/tableFunc.ts +1 -0
- package/src/utils/url.ts +2 -0
- package/dist/model/Insurance.d.ts +0 -6
- package/dist/model/Insurance.js.map +0 -1
- package/lib/model/Insurance.d.ts +0 -6
- package/lib/model/Insurance.js +0 -2
- package/lib/model/Insurance.js.map +0 -1
- package/mobile/dist/model/Insurance.d.ts +0 -6
- package/mobile/dist/model/Insurance.js.map +0 -1
- package/mobile/lib/model/Insurance.d.ts +0 -6
- package/mobile/lib/model/Insurance.js +0 -2
- package/mobile/lib/model/Insurance.js.map +0 -1
- package/mobile/src/model/Insurance.ts +0 -6
- package/src/model/Insurance.ts +0 -6
|
@@ -5,17 +5,10 @@ import type { UniBlockProps } from '../../types';
|
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
7
|
import type { Step, StepsBlockContent } from './StepsBlockContent';
|
|
8
|
+
import { getStyleMap } from './StepsBlockStyleMaps';
|
|
8
9
|
|
|
9
10
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
|
|
10
11
|
|
|
11
|
-
type StyleType = {
|
|
12
|
-
background: string;
|
|
13
|
-
title: string;
|
|
14
|
-
description: string;
|
|
15
|
-
iconBackground: string;
|
|
16
|
-
iconConnector: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
12
|
const STEPS_SIZE_MAP: Record<SizeVersion, string> = {
|
|
20
13
|
normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
|
|
21
14
|
small: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]',
|
|
@@ -26,47 +19,35 @@ const STEPS_TILE_DESCRIPTION_HEIGHT_MAP: Record<SizeVersion, string> = {
|
|
|
26
19
|
small: 'min-h-[50px]',
|
|
27
20
|
};
|
|
28
21
|
|
|
29
|
-
const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
30
|
-
primary: {
|
|
31
|
-
background: 'bg-white',
|
|
32
|
-
title: 'text-primary-text',
|
|
33
|
-
description: 'text-secondary-text',
|
|
34
|
-
iconBackground: 'bg-secondary-light',
|
|
35
|
-
iconConnector: 'bg-secondary-light',
|
|
36
|
-
},
|
|
37
|
-
secondary: {
|
|
38
|
-
background: 'bg-primary-main',
|
|
39
|
-
title: 'text-white',
|
|
40
|
-
description: 'text-white/80',
|
|
41
|
-
iconBackground: 'bg-white/30',
|
|
42
|
-
iconConnector: 'bg-white',
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const styleMaps = (version: BlockVersion): StyleType => STEPS_BLOCK_STYLE_MAPS[version];
|
|
47
|
-
|
|
48
22
|
export const StepsBlock = JSX<StepsBlockProps>(
|
|
49
|
-
({
|
|
50
|
-
|
|
23
|
+
({
|
|
24
|
+
className,
|
|
25
|
+
title,
|
|
26
|
+
description,
|
|
27
|
+
showLines = true,
|
|
28
|
+
steps,
|
|
29
|
+
size = 'normal',
|
|
30
|
+
version = 'primary',
|
|
31
|
+
}) => {
|
|
32
|
+
const styleMap = getStyleMap(version);
|
|
33
|
+
|
|
51
34
|
return (
|
|
52
35
|
<section
|
|
53
36
|
className={`box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
54
|
-
${
|
|
37
|
+
${styleMap.background} ${styleMap.title} ${className || ''}`}
|
|
55
38
|
>
|
|
56
39
|
{title ? (
|
|
57
|
-
<Heading headingType="h3" className={`text-center ${
|
|
40
|
+
<Heading headingType="h3" className={`text-center ${styleMap.title}`} title={title} />
|
|
58
41
|
) : null}
|
|
59
42
|
{description ? (
|
|
60
|
-
<p className={`text-m-md text-center ${
|
|
43
|
+
<p className={`text-m-md text-center ${styleMap.description} ${title ? 'mt-2' : ''}`}>
|
|
61
44
|
{description}
|
|
62
45
|
</p>
|
|
63
46
|
) : null}
|
|
64
47
|
{steps?.length ? (
|
|
65
48
|
<div className={`box-border py-0.5 mb-0.5 mt-5`}>
|
|
66
49
|
<div className="flex flex-col justify-between gap-x-[101px]">
|
|
67
|
-
{steps.map((
|
|
68
|
-
renderStepTitle({ step, size, i, length: steps.length, version: version }),
|
|
69
|
-
)}
|
|
50
|
+
{steps.map(renderStepTitle(size, version, showLines))}
|
|
70
51
|
</div>
|
|
71
52
|
</div>
|
|
72
53
|
) : null}
|
|
@@ -75,53 +56,49 @@ export const StepsBlock = JSX<StepsBlockProps>(
|
|
|
75
56
|
},
|
|
76
57
|
);
|
|
77
58
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
59
|
+
const renderStepTitle =
|
|
60
|
+
(size: SizeVersion, version: BlockVersion, showLines: boolean) =>
|
|
61
|
+
(step: Step, i: number, steps: Step[]) => {
|
|
62
|
+
const isLastStep = steps.length - 1 === i;
|
|
63
|
+
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
64
|
+
const styleMap = getStyleMap(version);
|
|
85
65
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
) : null}
|
|
66
|
+
return (
|
|
67
|
+
<div key={String(i)}>
|
|
68
|
+
<div className="flex flex-row text-center relative">
|
|
69
|
+
<div className="overflow-hidden">
|
|
70
|
+
{renderIconArea(size, version)}
|
|
71
|
+
{isLastStep ? null : (
|
|
72
|
+
<div
|
|
73
|
+
className={`min-h-8 h-full w-[2px] ${
|
|
74
|
+
showLines ? styleMap.iconConnector : ''
|
|
75
|
+
} ${margin}`}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
</div>
|
|
79
|
+
<div
|
|
80
|
+
className={`flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`}
|
|
81
|
+
>
|
|
82
|
+
{step.label ? (
|
|
83
|
+
<div className="font-medium text-m-title-xs m-0 text-left">{step.label}</div>
|
|
84
|
+
) : null}
|
|
85
|
+
{step.description ? (
|
|
86
|
+
<div
|
|
87
|
+
className={`font-normal text-sm ${styleMap.description} text-left ${
|
|
88
|
+
step.label ? 'mt-1' : ''
|
|
89
|
+
}`}
|
|
90
|
+
>
|
|
91
|
+
{step.description}
|
|
92
|
+
</div>
|
|
93
|
+
) : null}
|
|
94
|
+
</div>
|
|
116
95
|
</div>
|
|
117
96
|
</div>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
97
|
+
);
|
|
98
|
+
};
|
|
121
99
|
|
|
122
|
-
const renderIconArea = (
|
|
123
|
-
const
|
|
124
|
-
const style = styleMaps(version);
|
|
100
|
+
const renderIconArea = (size: SizeVersion, version: BlockVersion) => (step: Step, i: number) => {
|
|
101
|
+
const styleMap = getStyleMap(version);
|
|
125
102
|
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
126
103
|
|
|
127
104
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
@@ -129,11 +106,10 @@ const renderIconArea = (params: RenderStepTitleParams) => {
|
|
|
129
106
|
|
|
130
107
|
return (
|
|
131
108
|
<div
|
|
132
|
-
className={`${iconAreaSize} ${
|
|
109
|
+
className={`${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`}
|
|
133
110
|
>
|
|
134
|
-
<span className={`font-medium flex self-center ${
|
|
135
|
-
{(step.icon?.icon && <Img image={step.icon} width={iconSize} height={iconSize}
|
|
136
|
-
i + 1}
|
|
111
|
+
<span className={`font-medium flex self-center ${styleMap.title} ${iconTextSize}`}>
|
|
112
|
+
{(step.icon?.icon && <Img image={step.icon} width={iconSize} height={iconSize} />) || i + 1}
|
|
137
113
|
</span>
|
|
138
114
|
</div>
|
|
139
115
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SizeVersion } from '../../model/SizeVersion';
|
|
2
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
2
|
import type { Picture } from '../../model/Picture';
|
|
3
|
+
import type { SizeVersion } from '../../model/SizeVersion';
|
|
4
4
|
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -35,7 +35,10 @@ export interface StepsBlockContent {
|
|
|
35
35
|
*/
|
|
36
36
|
steps?: Step[];
|
|
37
37
|
button?: ButtonProps;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* @title Размер шагов (моб.)
|
|
40
|
+
* @default normal
|
|
41
|
+
*/
|
|
39
42
|
size?: SizeVersion; // TODO: mobile content
|
|
40
|
-
version?: BlockVersion;
|
|
43
|
+
version?: BlockVersion;
|
|
41
44
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
|
|
3
|
+
export type StyleType = {
|
|
4
|
+
background: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
iconBackground: string;
|
|
8
|
+
iconConnector: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const STEPS_BLOCK_STYLE_MAPS: Record<BlockVersion, StyleType> = {
|
|
12
|
+
primary: {
|
|
13
|
+
background: 'bg-white',
|
|
14
|
+
title: 'text-primary-text',
|
|
15
|
+
description: 'text-secondary-text',
|
|
16
|
+
iconBackground: 'bg-secondary-light',
|
|
17
|
+
iconConnector: 'bg-secondary-light',
|
|
18
|
+
},
|
|
19
|
+
secondary: {
|
|
20
|
+
background: 'bg-primary-main',
|
|
21
|
+
title: 'text-white',
|
|
22
|
+
description: 'text-white/80',
|
|
23
|
+
iconBackground: 'bg-white/30',
|
|
24
|
+
iconConnector: 'bg-white',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const getStyleMap = (version: BlockVersion): StyleType => STEPS_BLOCK_STYLE_MAPS[version];
|
|
@@ -40,6 +40,7 @@ export const TextBlock = JSX<TextBlockProps>(
|
|
|
40
40
|
isDotted = true,
|
|
41
41
|
}) => {
|
|
42
42
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
43
|
+
|
|
43
44
|
return (
|
|
44
45
|
<section
|
|
45
46
|
className={`font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`}
|
|
@@ -27,6 +27,7 @@ export function ContentPageRepository({
|
|
|
27
27
|
async function getAllContentPagesMap(): Promise<Record<string, ContentPageDef>> {
|
|
28
28
|
const pagePaths = await listAllContentPages();
|
|
29
29
|
const pages = await Promise.all(pagePaths.map(readPage));
|
|
30
|
+
|
|
30
31
|
return pagePaths.reduce(
|
|
31
32
|
(result, path, i) => ({
|
|
32
33
|
...result,
|
|
@@ -42,11 +43,13 @@ export function ContentPageRepository({
|
|
|
42
43
|
|
|
43
44
|
async function getSecondaryContentPages(customPageType?: string) {
|
|
44
45
|
const pages = await getAllContentPages();
|
|
46
|
+
|
|
45
47
|
return pages.filter(not(bySlug(INDEX_PAGE_SLUG))).filter(byCustomPageType(customPageType));
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
async function getContentPageBySlug(slug: string): Promise<ContentPageDef | undefined> {
|
|
49
51
|
const pages = await getAllContentPages();
|
|
52
|
+
|
|
50
53
|
return pages.find(bySlug(slug));
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -55,6 +58,7 @@ export function ContentPageRepository({
|
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
const cache: Record<string, ContentPageDef> = {};
|
|
61
|
+
|
|
58
62
|
async function readPage(filePath: string): Promise<ContentPageDef> {
|
|
59
63
|
if (!(filePath in cache)) {
|
|
60
64
|
cache[filePath] = await transformContentPage(filePath, {
|
|
@@ -62,6 +66,7 @@ export function ContentPageRepository({
|
|
|
62
66
|
publicDir,
|
|
63
67
|
});
|
|
64
68
|
}
|
|
69
|
+
|
|
65
70
|
return cache[filePath];
|
|
66
71
|
}
|
|
67
72
|
|
|
@@ -14,6 +14,7 @@ export async function mapJSON<T>(
|
|
|
14
14
|
|
|
15
15
|
if (Array.isArray(data)) {
|
|
16
16
|
const values = data.map((_, i) => mapJSON(_, mapper, [String(i)].concat(keyParts)));
|
|
17
|
+
|
|
17
18
|
return Promise.all(values) as any;
|
|
18
19
|
} else if (typeof data === 'object' && (data as any).toString() === '[object Object]') {
|
|
19
20
|
const subKeys = Object.keys(data as any);
|
|
@@ -21,7 +22,9 @@ export async function mapJSON<T>(
|
|
|
21
22
|
const pairs = (await Promise.all(values)).map((_, i) => ({
|
|
22
23
|
[subKeys[i]]: _,
|
|
23
24
|
}));
|
|
25
|
+
|
|
24
26
|
return Object.assign({}, ...pairs);
|
|
25
27
|
}
|
|
28
|
+
|
|
26
29
|
return mapper<T>(data, keyParts);
|
|
27
30
|
}
|
|
@@ -14,6 +14,7 @@ export async function transformContentPage(
|
|
|
14
14
|
options: TransformationOptions,
|
|
15
15
|
): Promise<ContentPageDef> {
|
|
16
16
|
const content = await readFile(pagePath, 'utf8');
|
|
17
|
+
|
|
17
18
|
return mapJSON<ContentPageDef>(JSON.parse(content), async (value: any, [key]) => {
|
|
18
19
|
const isMarkdown = typeof value === 'string' && key?.endsWith('__md');
|
|
19
20
|
const isPicture = value && isLocalPath(value?.src);
|
|
@@ -22,6 +23,7 @@ export async function transformContentPage(
|
|
|
22
23
|
} else if (isPicture) {
|
|
23
24
|
return await transformPicture(pagePath, value as Picture, options);
|
|
24
25
|
}
|
|
26
|
+
|
|
25
27
|
return value;
|
|
26
28
|
});
|
|
27
29
|
}
|
|
@@ -17,6 +17,7 @@ export async function transformPicture(
|
|
|
17
17
|
const [transformedPicture, ...transformedSources] = await Promise.all(
|
|
18
18
|
[picture].concat(sources).map((_) => transformImg(pagePath, src, { ...options, ..._ })),
|
|
19
19
|
);
|
|
20
|
+
|
|
20
21
|
return {
|
|
21
22
|
...picture,
|
|
22
23
|
src: transformedPicture,
|
|
@@ -70,6 +71,7 @@ function transformSrc(src: string, { format, size }: TransformationOptions & Img
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
const suffix = [size?.width, size?.height].filter(Boolean).join('-');
|
|
74
|
+
|
|
73
75
|
return `${path.basename(src, path.extname(src))}${suffix ? `-${suffix}` : ''}.${
|
|
74
76
|
String(format) || path.extname(src)
|
|
75
77
|
}`;
|
|
@@ -5,11 +5,13 @@ export function useCreditCalculatorData(
|
|
|
5
5
|
directoryName: string | undefined,
|
|
6
6
|
): any {
|
|
7
7
|
const { data } = useAsyncData(creditCalculatorUrl(directoryName), fetchCreditCalculatorData);
|
|
8
|
+
|
|
8
9
|
return data || {};
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
async function fetchCreditCalculatorData(url: string): Promise<any> {
|
|
12
13
|
const response = await fetch(url);
|
|
14
|
+
|
|
13
15
|
return await response.json();
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -11,6 +11,7 @@ export function useExchangeRates(useAsyncData: AsyncDataHook): ExchangeCurrencyI
|
|
|
11
11
|
const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
|
|
12
12
|
|
|
13
13
|
const result = data?.hits?.hits?.map((_) => _._source) || [];
|
|
14
|
+
|
|
14
15
|
return result.length ? getCurrencyListByRate(result) : result;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ async function fetchExchangeRates(): Promise<any | undefined> {
|
|
|
23
24
|
},
|
|
24
25
|
body: JSON.stringify(EXCHANGE_RATES_BODY),
|
|
25
26
|
});
|
|
27
|
+
|
|
26
28
|
return await response.json();
|
|
27
29
|
} catch (err) {
|
|
28
30
|
console.error(err);
|
|
@@ -79,6 +81,7 @@ const getCurrencyListByRate = (currencyRates: RatesData[]) =>
|
|
|
79
81
|
sell: Number(_.rate_sell),
|
|
80
82
|
});
|
|
81
83
|
}
|
|
84
|
+
|
|
82
85
|
return result;
|
|
83
86
|
}, []);
|
|
84
87
|
|
|
@@ -4,11 +4,13 @@ import { projectSettings } from '../../ProjectSettings';
|
|
|
4
4
|
|
|
5
5
|
export function useSitemap(useAsyncData: AsyncDataHook): HeaderContent {
|
|
6
6
|
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
7
|
+
|
|
7
8
|
return data || {};
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
async function fetchSitemap(): Promise<HeaderContent> {
|
|
11
12
|
const response = await fetch(sitemapURL());
|
|
13
|
+
|
|
12
14
|
return await response.json();
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -17,71 +17,81 @@ export interface ActiveHandler {
|
|
|
17
17
|
initialState?: boolean;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
export interface BlocksCommonProps {
|
|
21
|
+
/**
|
|
22
|
+
* @title Стиль
|
|
23
|
+
* @default ["col-span-12"]
|
|
24
|
+
**/
|
|
25
|
+
style?: string[];
|
|
26
|
+
}
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* @title Заголовок
|
|
28
30
|
* @default {"blockListType": "Headline"}
|
|
29
31
|
*/
|
|
30
|
-
export type HeadlineBlockListDef = HeadlineContent &
|
|
32
|
+
export type HeadlineBlockListDef = HeadlineContent &
|
|
33
|
+
BlocksCommonProps & { blockListType: 'Headline' };
|
|
31
34
|
|
|
32
35
|
/**
|
|
33
36
|
* @title Список документов
|
|
34
37
|
* @default {"blockListType": "LinkDocs"}
|
|
35
38
|
*/
|
|
36
|
-
export type LinkDocsBlockListDef = LinkDocsContent &
|
|
39
|
+
export type LinkDocsBlockListDef = LinkDocsContent &
|
|
40
|
+
BlocksCommonProps & { blockListType: 'LinkDocs' };
|
|
37
41
|
|
|
38
42
|
/**
|
|
39
43
|
* @title Текстовый блок
|
|
40
44
|
* @default {"blockListType": "TextBlock"}
|
|
41
45
|
*/
|
|
42
|
-
export type TextBlockBlockListDef = TextBlockContent &
|
|
46
|
+
export type TextBlockBlockListDef = TextBlockContent &
|
|
47
|
+
BlocksCommonProps & { blockListType: 'TextBlock' };
|
|
43
48
|
|
|
44
49
|
/**
|
|
45
50
|
* @title Картинка с текстом
|
|
46
51
|
* @default {"blockListType": "PictureText"}
|
|
47
52
|
*/
|
|
48
|
-
export type PictureTextBlockListDef = PictureTextContent &
|
|
53
|
+
export type PictureTextBlockListDef = PictureTextContent &
|
|
54
|
+
BlocksCommonProps & { blockListType: 'PictureText' };
|
|
49
55
|
|
|
50
56
|
/**
|
|
51
57
|
* @title Продуктовый блок
|
|
52
58
|
* @default {"blockListType": "ProductBlock"}
|
|
53
59
|
*/
|
|
54
|
-
export type ProductBlockBlockListDef = ProductBlockContent &
|
|
60
|
+
export type ProductBlockBlockListDef = ProductBlockContent &
|
|
61
|
+
BlocksCommonProps & { blockListType: 'ProductBlock' };
|
|
55
62
|
|
|
56
63
|
/**
|
|
57
64
|
* @title Плитка
|
|
58
65
|
* @default {"blockListType": "Tile"}
|
|
59
66
|
*/
|
|
60
|
-
export type TileBlockListDef = TileContent & { blockListType: 'Tile' };
|
|
67
|
+
export type TileBlockListDef = TileContent & BlocksCommonProps & { blockListType: 'Tile' };
|
|
61
68
|
|
|
62
69
|
/**
|
|
63
70
|
* @title Продуктовая плитка
|
|
64
71
|
* @default {"blockListType": "ProductTile"}
|
|
65
72
|
*/
|
|
66
|
-
export type ProductTileBlockListDef = ProductTileContent &
|
|
73
|
+
export type ProductTileBlockListDef = ProductTileContent &
|
|
74
|
+
BlocksCommonProps & { blockListType: 'ProductTile' };
|
|
67
75
|
|
|
68
76
|
/**
|
|
69
77
|
* @title Галерея
|
|
70
78
|
* @default {"blockListType": "Gallery"}
|
|
71
79
|
*/
|
|
72
|
-
export type GalleryBlockListDef = GalleryContent & { blockListType: 'Gallery' };
|
|
80
|
+
export type GalleryBlockListDef = GalleryContent & BlocksCommonProps & { blockListType: 'Gallery' };
|
|
73
81
|
|
|
74
82
|
/**
|
|
75
83
|
* @title Мини-галлерея
|
|
76
84
|
* @default {"blockListType": "MiniGallery"}
|
|
77
85
|
*/
|
|
78
|
-
export type MiniGalleryBlockListDef = MiniGalleryContent &
|
|
86
|
+
export type MiniGalleryBlockListDef = MiniGalleryContent &
|
|
87
|
+
BlocksCommonProps & { blockListType: 'MiniGallery' };
|
|
79
88
|
|
|
80
89
|
/**
|
|
81
90
|
* @title Список ссылок
|
|
82
91
|
* @default {"blockListType": "LinkList"}
|
|
83
92
|
*/
|
|
84
|
-
export type LinkListBlockListDef = LinkListContent &
|
|
93
|
+
export type LinkListBlockListDef = LinkListContent &
|
|
94
|
+
BlocksCommonProps & { blockListType: 'LinkList' };
|
|
85
95
|
|
|
86
96
|
/**
|
|
87
97
|
* @title Содержимое блока
|
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
import type { JSXBlock } from '../../components/ContentPage/ContentPage';
|
|
2
2
|
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import { style2className } from '../../utils/style2className';
|
|
5
|
+
import type { BlockDef } from './BlocksListProps';
|
|
4
6
|
import { EmbeddableBlocks } from './EmbeddableBlocks';
|
|
5
7
|
|
|
6
8
|
type EmbeddableBlocksProps = {
|
|
7
9
|
blocks?: BlockDef[];
|
|
8
10
|
context: ContentPageContext;
|
|
9
|
-
columns?: ColumnsCount;
|
|
10
11
|
className?: string;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
export const renderBlocksList = ({ blocks, context, className
|
|
14
|
-
blocks?.length ? blocks.map(renderBlock({ context, className
|
|
14
|
+
export const renderBlocksList = ({ blocks, context, className = '' }: EmbeddableBlocksProps) =>
|
|
15
|
+
blocks?.length ? blocks.map(renderBlock({ context, className })) : null;
|
|
15
16
|
|
|
16
17
|
const renderBlock =
|
|
17
|
-
({ context,
|
|
18
|
+
({ context, className }: UniBlockProps) =>
|
|
18
19
|
(block: BlockDef, i: number) => {
|
|
19
20
|
const type = block?.blockListType;
|
|
20
21
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
+
const classNameBlock = style2className(block?.style);
|
|
24
25
|
const EmbeddedBlock: JSXBlock = EmbeddableBlocks[type];
|
|
26
|
+
|
|
25
27
|
return (
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
<EmbeddedBlock
|
|
29
|
+
key={`block_${i}`}
|
|
30
|
+
context={context}
|
|
31
|
+
{...block}
|
|
32
|
+
className={`${className} ${classNameBlock}`}
|
|
33
|
+
/>
|
|
29
34
|
);
|
|
30
35
|
};
|
|
@@ -8,6 +8,7 @@ interface ButtonInnerProps extends ButtonWithIconProps {
|
|
|
8
8
|
|
|
9
9
|
export const ButtonInner = JSX<ButtonInnerProps>((props) => {
|
|
10
10
|
const { text, aboveText, appendLeft, appendRight } = props;
|
|
11
|
+
|
|
11
12
|
return (
|
|
12
13
|
<div className={getButtonStyle(props)}>
|
|
13
14
|
{appendLeft ? appendLeft : null}
|
|
@@ -10,6 +10,7 @@ export interface ButtonSectionProps extends ButtonContent, UniBlockProps {}
|
|
|
10
10
|
export const ButtonSection = JSX<ButtonSectionProps>(({ context, className = '', buttons }) => {
|
|
11
11
|
const { handlerDecorator } = context;
|
|
12
12
|
const router = context.useRouter();
|
|
13
|
+
|
|
13
14
|
return buttons?.length ? (
|
|
14
15
|
<div className={className}>
|
|
15
16
|
{buttons.map((button, index) =>
|
|
@@ -8,6 +8,7 @@ import { foldableBlockClassNames, useActiveHandler } from './useActiveHandler';
|
|
|
8
8
|
|
|
9
9
|
export type FoldableBlocks = VNode[];
|
|
10
10
|
export type Render = (_: VNode, isActive: boolean) => VNode;
|
|
11
|
+
|
|
11
12
|
export interface FoldableProps {
|
|
12
13
|
context: ContentPageContext;
|
|
13
14
|
foldButtonLabel?: string;
|
|
@@ -17,11 +18,13 @@ export interface FoldableProps {
|
|
|
17
18
|
foldButtonDataTheme?: ColorPalette;
|
|
18
19
|
isUnfolded?: boolean;
|
|
19
20
|
render?: Render;
|
|
21
|
+
containerClasses?: string;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export interface RenderBlocksParams {
|
|
23
25
|
blocksToHide: number;
|
|
24
26
|
isActive: boolean;
|
|
27
|
+
containerClasses?: string;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
export const Foldable = JSX<FoldableProps>(
|
|
@@ -33,6 +36,7 @@ export const Foldable = JSX<FoldableProps>(
|
|
|
33
36
|
foldButtonLabel,
|
|
34
37
|
foldButtonDataTheme,
|
|
35
38
|
isUnfolded,
|
|
39
|
+
containerClasses,
|
|
36
40
|
render = (_) => _,
|
|
37
41
|
}) => {
|
|
38
42
|
const blocksToHide = clamp(hiddenBlocksNum, 0, blocks.length);
|
|
@@ -44,7 +48,7 @@ export const Foldable = JSX<FoldableProps>(
|
|
|
44
48
|
|
|
45
49
|
return blocks ? (
|
|
46
50
|
<div>
|
|
47
|
-
{renderBlocks(blocks, render, { blocksToHide, isActive })}
|
|
51
|
+
{renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses })}
|
|
48
52
|
{hiddenBlocksNum ? (
|
|
49
53
|
<button
|
|
50
54
|
className={
|
|
@@ -55,7 +59,7 @@ export const Foldable = JSX<FoldableProps>(
|
|
|
55
59
|
onClick={handleToggle}
|
|
56
60
|
>
|
|
57
61
|
<span className="pr-3">{isActive ? 'Скрыть' : foldButtonLabel}</span>
|
|
58
|
-
<Icon name={icon} iconVersion="white" width="20" height="20" asSVG />
|
|
62
|
+
{icon && <Icon name={icon} iconVersion="white" width="20" height="20" asSVG />}
|
|
59
63
|
</button>
|
|
60
64
|
) : null}
|
|
61
65
|
</div>
|
|
@@ -66,7 +70,7 @@ export const Foldable = JSX<FoldableProps>(
|
|
|
66
70
|
const renderBlocks = (
|
|
67
71
|
blocks: FoldableBlocks,
|
|
68
72
|
render: Render,
|
|
69
|
-
{ blocksToHide, isActive }: RenderBlocksParams,
|
|
73
|
+
{ blocksToHide, isActive, containerClasses }: RenderBlocksParams,
|
|
70
74
|
) => {
|
|
71
75
|
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
72
76
|
const hiddenBlocks = blocks.slice(-blocksToHide);
|
|
@@ -74,7 +78,7 @@ const renderBlocks = (
|
|
|
74
78
|
return render(
|
|
75
79
|
<div>
|
|
76
80
|
{visibleBlocks}
|
|
77
|
-
<div className={foldableBlockClassNames}>{hiddenBlocks}</div>
|
|
81
|
+
<div className={`${foldableBlockClassNames} ${containerClasses}`}>{hiddenBlocks}</div>
|
|
78
82
|
</div>,
|
|
79
83
|
isActive,
|
|
80
84
|
);
|