@redneckz/wildless-cms-uni-blocks 0.8.23 → 0.8.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.8.17.js +27 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +216 -204
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/bundle/components/Headline/HeadlineContent.d.ts +2 -0
- package/bundle/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/bundle/hooks/useBranches.d.ts +20 -0
- package/bundle/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/dist/components/Accordion/Accordion.js +2 -3
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +2 -3
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -2
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/dist/components/Calculator/getMonthlyPayment.js +4 -1
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -3
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +2 -3
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +7 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -0
- package/dist/components/RollupItem/RollupItem.js +9 -4
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/dist/components/RollupItem/RollupItem.mobile.js +33 -0
- package/dist/components/RollupItem/RollupItem.mobile.js.map +1 -0
- package/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/dist/components/Tabs/LinkTab.js +6 -2
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +15 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/renderTab.js +1 -1
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/hooks/useBranches.d.ts +20 -0
- package/dist/hooks/useBranches.js +16 -0
- package/dist/hooks/useBranches.js.map +1 -0
- package/dist/ui-kit/BlockWrapper.js +1 -4
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +4 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/List/List.js +1 -1
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +0 -2
- package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +1 -1
- package/lib/components/Accordion/Accordion.js +2 -3
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +2 -3
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -2
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/lib/components/Calculator/getMonthlyPayment.js +4 -1
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -3
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +2 -3
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +7 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -0
- package/lib/components/{AccordionItem/AccordionItem.fixture.d.ts → RollupItem/RollupItem.fixture.mobile.d.ts} +2 -0
- package/lib/components/RollupItem/RollupItem.js +9 -4
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/lib/components/RollupItem/RollupItem.mobile.js +31 -0
- package/lib/components/RollupItem/RollupItem.mobile.js.map +1 -0
- package/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/lib/components/Tabs/LinkTab.js +6 -2
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/Tabs.js +15 -3
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/renderTab.js +1 -1
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/hooks/useBranches.d.ts +20 -0
- package/lib/hooks/useBranches.js +13 -0
- package/lib/hooks/useBranches.js.map +1 -0
- package/lib/ui-kit/BlockWrapper.js +1 -4
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +0 -1
- package/lib/ui-kit/Icon/Icon.js +4 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/List/List.js +1 -1
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +205 -158
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/mobile/bundle/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/bundle/hooks/useBranches.d.ts +20 -0
- package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/mobile/dist/components/Accordion/Accordion.js +2 -3
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Blocks.js +4 -2
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/mobile/dist/components/Calculator/getMonthlyPayment.js +4 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -3
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +2 -3
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +7 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +3 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/dist/components/RollupItem/RollupItem.js +17 -5
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/dist/components/Tabs/LinkTab.js +6 -2
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +15 -3
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.js +1 -1
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/hooks/useBranches.d.ts +20 -0
- package/mobile/dist/hooks/useBranches.js +16 -0
- package/mobile/dist/hooks/useBranches.js.map +1 -0
- package/mobile/dist/ui-kit/BlockWrapper.js +1 -4
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +4 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.js +1 -1
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/components/Accordion/Accordion.js +2 -3
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +5 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Blocks.js +4 -2
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -2
- package/mobile/lib/components/Calculator/getMonthlyPayment.js +4 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -3
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +2 -3
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +7 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/lib/components/RollupItem/RollupItem.js +17 -5
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/lib/components/Tabs/LinkTab.js +6 -2
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +15 -3
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.js +1 -1
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/hooks/useBranches.d.ts +20 -0
- package/mobile/lib/hooks/useBranches.js +13 -0
- package/mobile/lib/hooks/useBranches.js.map +1 -0
- package/mobile/lib/ui-kit/BlockWrapper.js +1 -4
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +4 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.js +1 -1
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +2 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/src/components/Accordion/Accordion.example.json +3 -3
- package/mobile/src/components/Accordion/Accordion.tsx +2 -3
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +5 -5
- package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Blocks.ts +4 -2
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -8
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +11 -4
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +6 -2
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +3 -1
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +9 -9
- package/mobile/src/components/Header/Header.tsx +5 -6
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +9 -2
- package/mobile/src/components/Headline/Headline.tsx +4 -1
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -0
- package/mobile/src/components/RollupItem/RollupItem.tsx +77 -28
- package/mobile/src/components/Tabs/LinkTab.tsx +8 -2
- package/mobile/src/components/Tabs/Tabs.tsx +18 -3
- package/mobile/src/components/Tabs/renderTab.tsx +7 -1
- package/mobile/src/hooks/useBranches.ts +43 -0
- package/mobile/src/ui-kit/BlockWrapper.tsx +1 -6
- package/mobile/src/ui-kit/Icon/Icon.tsx +4 -1
- package/mobile/src/ui-kit/List/List.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +0 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -2
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +2 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.example.json +3 -3
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +20 -11
- package/src/components/Accordion/Accordion.fixture.tsx +42 -27
- package/src/components/Accordion/Accordion.mobile.tsx +2 -3
- package/src/components/Accordion/Accordion.tsx +2 -3
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +5 -5
- package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/Blocks.mobile.ts +4 -2
- package/src/components/Blocks.ts +0 -4
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -8
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +8 -8
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +11 -4
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +6 -2
- package/src/components/Calculator/getMonthlyPayment.ts +3 -1
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +9 -9
- package/src/components/Header/Header.mobile.tsx +5 -6
- package/src/components/Header/HeaderSecondaryMenu.tsx +9 -2
- package/src/components/Headline/Headline.tsx +4 -1
- package/src/components/Headline/HeadlineContent.ts +2 -0
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +15 -14
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +33 -0
- package/src/components/RollupItem/RollupItem.mobile.tsx +143 -0
- package/src/components/RollupItem/RollupItem.tsx +17 -13
- package/src/components/Tabs/LinkTab.tsx +8 -2
- package/src/components/Tabs/Tabs.tsx +18 -3
- package/src/components/Tabs/renderTab.tsx +7 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +1 -0
- package/src/hooks/useBranches.ts +43 -0
- package/src/ui-kit/BlockWrapper.tsx +1 -6
- package/src/ui-kit/Icon/Icon.tsx +4 -1
- package/src/ui-kit/List/List.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +0 -1
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -2
- package/src/ui-kit/TopItem/TopItem.tsx +2 -1
- package/bundle/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/bundle/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/bundle/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/bundle/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/bundle/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/dist/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/dist/components/Accordion/AccordionItemsList.js +0 -6
- package/dist/components/Accordion/AccordionItemsList.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/dist/components/AccordionItem/AccordionItem.js +0 -14
- package/dist/components/AccordionItem/AccordionItem.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/dist/components/AccordionItem/AccordionItem.mobile.js +0 -19
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/dist/components/AccordionItem/AccordionItemContent.js +0 -2
- package/dist/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/dist/components/AccordionItem/AccordionItemProps.js +0 -2
- package/dist/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/dist/components/OtherProductsItem/OtherProductsItem.js +0 -18
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/lib/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/lib/components/Accordion/AccordionItemsList.js +0 -4
- package/lib/components/Accordion/AccordionItemsList.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/lib/components/AccordionItem/AccordionItem.fixture.mobile.d.ts +0 -5
- package/lib/components/AccordionItem/AccordionItem.js +0 -12
- package/lib/components/AccordionItem/AccordionItem.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/lib/components/AccordionItem/AccordionItem.mobile.js +0 -17
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/lib/components/AccordionItem/AccordionItemContent.js +0 -2
- package/lib/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/lib/components/AccordionItem/AccordionItemProps.js +0 -2
- package/lib/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +0 -5
- package/lib/components/OtherProductsItem/OtherProductsItem.js +0 -16
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/bundle/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/bundle/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/bundle/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/bundle/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/dist/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/dist/components/Accordion/AccordionItemsList.js +0 -6
- package/mobile/dist/components/Accordion/AccordionItemsList.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/dist/components/AccordionItem/AccordionItem.js +0 -19
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/dist/components/AccordionItem/AccordionItemContent.js +0 -2
- package/mobile/dist/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/dist/components/AccordionItem/AccordionItemProps.js +0 -2
- package/mobile/dist/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +0 -18
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/lib/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/lib/components/Accordion/AccordionItemsList.js +0 -4
- package/mobile/lib/components/Accordion/AccordionItemsList.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/lib/components/AccordionItem/AccordionItem.js +0 -17
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/lib/components/AccordionItem/AccordionItemContent.js +0 -2
- package/mobile/lib/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/lib/components/AccordionItem/AccordionItemProps.js +0 -2
- package/mobile/lib/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +0 -16
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/src/components/Accordion/AccordionItemsList.tsx +0 -5
- package/mobile/src/components/AccordionItem/AccordionItem.example.json +0 -25
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +0 -90
- package/mobile/src/components/AccordionItem/AccordionItem.ui.json +0 -7
- package/mobile/src/components/AccordionItem/AccordionItemContent.ts +0 -15
- package/mobile/src/components/AccordionItem/AccordionItemProps.ts +0 -4
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +0 -22
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +0 -50
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +0 -1
- package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +0 -13
- package/src/components/Accordion/AccordionItemsList.tsx +0 -5
- package/src/components/AccordionItem/AccordionItem.example.json +0 -25
- package/src/components/AccordionItem/AccordionItem.fixture.mobile.tsx +0 -17
- package/src/components/AccordionItem/AccordionItem.fixture.tsx +0 -17
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +0 -90
- package/src/components/AccordionItem/AccordionItem.tsx +0 -58
- package/src/components/AccordionItem/AccordionItem.ui.json +0 -7
- package/src/components/AccordionItem/AccordionItemContent.ts +0 -15
- package/src/components/AccordionItem/AccordionItemProps.ts +0 -4
- package/src/components/OtherProductsItem/OtherProductsItem.example.json +0 -22
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +0 -20
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +0 -50
- package/src/components/OtherProductsItem/OtherProductsItem.ui.json +0 -1
- package/src/components/OtherProductsItem/OtherProductsItemContent.ts +0 -13
package/bundle/bundle.umd.js
CHANGED
|
@@ -370,10 +370,7 @@
|
|
|
370
370
|
const ref = useBlockIntersectionObserver(block);
|
|
371
371
|
const [isHidden, setHidden] = useState(false);
|
|
372
372
|
useEffect(() => defaultEventBus.subscribe('tab', (event) => {
|
|
373
|
-
setHidden(Boolean(event.
|
|
374
|
-
event.label &&
|
|
375
|
-
block?.labels?.length &&
|
|
376
|
-
!block.labels.includes(event.label)));
|
|
373
|
+
setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
|
|
377
374
|
}), [block]);
|
|
378
375
|
return (jsx(Tag, { className: style(isTheme ? 'group' : '', blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, children: children }));
|
|
379
376
|
});
|
|
@@ -391,132 +388,8 @@
|
|
|
391
388
|
|
|
392
389
|
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
393
390
|
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${AlignText[accordionAlignTitle]}`, title: title })) : null, description ? (jsx("div", { className: "mb-2.5", children: jsx(Paragraph, { size: "text-l", children: description }) })) : null, jsx(AccordionItemsList, { children: renderChildren(rest) })] })));
|
|
397
|
-
Accordion.childrenTypes = ['AccordionItem'];
|
|
398
|
-
|
|
399
|
-
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
400
|
-
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
401
|
-
const onToggle = useCallback(() => {
|
|
402
|
-
setIsUnfolded((_) => !_);
|
|
403
|
-
}, []);
|
|
404
|
-
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
405
|
-
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
406
|
-
return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
410
|
-
const containerRef = useRef(null);
|
|
411
|
-
useEffect(() => {
|
|
412
|
-
if (containerRef.current) {
|
|
413
|
-
containerRef.current.style.maxHeight = isUnfolded
|
|
414
|
-
? `${containerRef.current.scrollHeight}px`
|
|
415
|
-
: '';
|
|
416
|
-
}
|
|
417
|
-
}, [isUnfolded, children?.length]);
|
|
418
|
-
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
function useRouter() {
|
|
422
|
-
return useRouter._impl();
|
|
423
|
-
}
|
|
424
|
-
useRouter._impl = () => ({
|
|
425
|
-
href: globalThis.location?.href || '/',
|
|
426
|
-
pathname: globalThis.location?.pathname || '/',
|
|
427
|
-
query: {},
|
|
428
|
-
push: () => {
|
|
429
|
-
// Do nothing
|
|
430
|
-
},
|
|
431
|
-
replace: () => {
|
|
432
|
-
// Do nothing
|
|
433
|
-
},
|
|
434
|
-
});
|
|
435
|
-
useRouter.setup = (impl) => {
|
|
436
|
-
useRouter._impl = impl;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
440
|
-
|
|
441
|
-
const isURL = (href) => Boolean(href?.includes(':'));
|
|
442
|
-
const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
443
|
-
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
444
|
-
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
445
|
-
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
446
|
-
|
|
447
|
-
var url = /*#__PURE__*/Object.freeze({
|
|
448
|
-
__proto__: null,
|
|
449
|
-
isURL: isURL,
|
|
450
|
-
isLocalURL: isLocalURL,
|
|
451
|
-
isHash: isHash,
|
|
452
|
-
withoutQuery: withoutQuery,
|
|
453
|
-
joinPath: joinPath
|
|
454
|
-
});
|
|
455
|
-
|
|
456
|
-
const adjustHref = (router) => (href) => {
|
|
457
|
-
if (!href || isURL(href) || (projectSettings.CDN && href.startsWith(projectSettings.CDN))) {
|
|
458
|
-
return href;
|
|
459
|
-
}
|
|
460
|
-
const isRelativeToBase = href.startsWith('/');
|
|
461
|
-
return joinPath(projectSettings.BASE_PATH, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
const svgUseStyleMap = {
|
|
465
|
-
normal: '',
|
|
466
|
-
color: 'text-primary-main',
|
|
467
|
-
black: 'text-black',
|
|
468
|
-
white: 'text-black',
|
|
469
|
-
};
|
|
470
|
-
const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', asSVG, ...imgProps }) => {
|
|
471
|
-
const router = useRouter();
|
|
472
|
-
const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
|
|
473
|
-
if (asSVG && iconVersion !== 'normal') {
|
|
474
|
-
return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
|
|
475
|
-
}
|
|
476
|
-
return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
|
|
477
|
-
});
|
|
478
|
-
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
479
|
-
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
480
|
-
|
|
481
|
-
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
482
|
-
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
483
|
-
const router = useRouter();
|
|
484
|
-
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
485
|
-
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
486
|
-
? image.sources
|
|
487
|
-
.filter((_) => _?.src)
|
|
488
|
-
.sort(sourcesComparator)
|
|
489
|
-
.map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
|
|
490
|
-
: null, image?.src
|
|
491
|
-
? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName, isMobile)
|
|
492
|
-
: null] }));
|
|
493
|
-
});
|
|
494
|
-
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
495
|
-
const style = {
|
|
496
|
-
width: image.size?.width ? `${image.size?.width}px` : '100%',
|
|
497
|
-
height: image.size?.height ? `${image.size?.height}px` : '100%',
|
|
498
|
-
};
|
|
499
|
-
const title = image.title || '';
|
|
500
|
-
const alt = image.alt || image.title;
|
|
501
|
-
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
502
|
-
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
|
|
503
|
-
};
|
|
504
|
-
const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
|
|
505
|
-
const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
|
|
506
|
-
|
|
507
|
-
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
|
|
508
|
-
if (!image?.src && !image?.icon) {
|
|
509
|
-
return null;
|
|
510
|
-
}
|
|
511
|
-
return image.icon ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: image?.iconVersion || 'normal', name: image.icon, ...iconProps })) : (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile, pathPrefix: pathPrefix }));
|
|
512
|
-
});
|
|
513
|
-
|
|
514
|
-
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
515
|
-
|
|
516
|
-
const icons$1 = ['PlusIcon', 'MinusIcon'];
|
|
517
|
-
const AccordionItem = JSX(({ className = '', label = '', isExpanded, ...rest }) => (jsx("li", { className: `border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "grid grid-cols-12 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton, { label: label, icon: icons$1[Number(isUnfolded)], onClick: onToggle })) }) })));
|
|
518
|
-
AccordionItem.childrenTypes = [];
|
|
519
|
-
const FoldButton = JSX(({ label, icon, onClick }) => (jsxs("button", { className: "border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer", onClick: onClick, children: [jsx(Text, { size: "text-xl", font: "font-medium", children: label }), jsx(ImgInner, { image: { icon }, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })] })));
|
|
391
|
+
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${AlignText[accordionAlignTitle]}`, title: title })) : null, description ? (jsx("div", { className: "mb-2.5", children: jsx(Paragraph, { size: "text-l", children: description }) })) : null, jsx("div", { className: "list-none m-0 p-0", children: renderChildren(rest) })] })));
|
|
392
|
+
Accordion.childrenTypes = ['Accordion'];
|
|
520
393
|
|
|
521
394
|
function CorporateLeadAPI() {
|
|
522
395
|
async function send(body) {
|
|
@@ -662,6 +535,31 @@
|
|
|
662
535
|
},
|
|
663
536
|
];
|
|
664
537
|
|
|
538
|
+
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
539
|
+
|
|
540
|
+
const isURL = (href) => Boolean(href?.includes(':'));
|
|
541
|
+
const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
542
|
+
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
543
|
+
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
544
|
+
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
545
|
+
|
|
546
|
+
var url = /*#__PURE__*/Object.freeze({
|
|
547
|
+
__proto__: null,
|
|
548
|
+
isURL: isURL,
|
|
549
|
+
isLocalURL: isLocalURL,
|
|
550
|
+
isHash: isHash,
|
|
551
|
+
withoutQuery: withoutQuery,
|
|
552
|
+
joinPath: joinPath
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
const adjustHref = (router) => (href) => {
|
|
556
|
+
if (!href || isURL(href) || (projectSettings.CDN && href.startsWith(projectSettings.CDN))) {
|
|
557
|
+
return href;
|
|
558
|
+
}
|
|
559
|
+
const isRelativeToBase = href.startsWith('/');
|
|
560
|
+
return joinPath(projectSettings.BASE_PATH, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
561
|
+
};
|
|
562
|
+
|
|
665
563
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
666
564
|
const handlerDecorator = (handler, targetContent) => {
|
|
667
565
|
return handlerDecorator._impl(handler, targetContent);
|
|
@@ -671,6 +569,24 @@
|
|
|
671
569
|
handlerDecorator._impl = impl;
|
|
672
570
|
};
|
|
673
571
|
|
|
572
|
+
function useRouter() {
|
|
573
|
+
return useRouter._impl();
|
|
574
|
+
}
|
|
575
|
+
useRouter._impl = () => ({
|
|
576
|
+
href: globalThis.location?.href || '/',
|
|
577
|
+
pathname: globalThis.location?.pathname || '/',
|
|
578
|
+
query: {},
|
|
579
|
+
push: () => {
|
|
580
|
+
// Do nothing
|
|
581
|
+
},
|
|
582
|
+
replace: () => {
|
|
583
|
+
// Do nothing
|
|
584
|
+
},
|
|
585
|
+
});
|
|
586
|
+
useRouter.setup = (impl) => {
|
|
587
|
+
useRouter._impl = impl;
|
|
588
|
+
};
|
|
589
|
+
|
|
674
590
|
function useLink(isRemote = false) {
|
|
675
591
|
const router = useRouter();
|
|
676
592
|
return (props) => ({
|
|
@@ -766,6 +682,8 @@
|
|
|
766
682
|
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, children }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, children: children })));
|
|
767
683
|
const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
|
|
768
684
|
|
|
685
|
+
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
686
|
+
|
|
769
687
|
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
770
688
|
|
|
771
689
|
const normalizeSelectedRegion$1 = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
@@ -789,6 +707,26 @@
|
|
|
789
707
|
return targetRef;
|
|
790
708
|
}
|
|
791
709
|
|
|
710
|
+
const svgUseStyleMap = {
|
|
711
|
+
normal: '',
|
|
712
|
+
color: 'text-primary-main',
|
|
713
|
+
black: 'text-black',
|
|
714
|
+
white: 'text-black',
|
|
715
|
+
};
|
|
716
|
+
const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', asSVG, ...imgProps }) => {
|
|
717
|
+
const router = useRouter();
|
|
718
|
+
const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
|
|
719
|
+
if (asSVG && iconVersion !== 'normal') {
|
|
720
|
+
return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
|
|
721
|
+
}
|
|
722
|
+
if (!className.includes('h-')) {
|
|
723
|
+
imgProps['style'] = { height: `${imgProps.height}px` };
|
|
724
|
+
}
|
|
725
|
+
return (jsx("img", { className: className, src: href, alt: alt, title: title, "aria-hidden": "true", ...imgProps }));
|
|
726
|
+
});
|
|
727
|
+
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
728
|
+
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
729
|
+
|
|
792
730
|
const Select = JSX(({ className = '', isBorder = true, label, options = [], value, onChange, placeholder = '' }) => {
|
|
793
731
|
const [selectedItem, setSelectedItem] = useState(options[0] || { key: '', text: '' });
|
|
794
732
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -873,7 +811,7 @@
|
|
|
873
811
|
handleSubmit &&
|
|
874
812
|
(await handleSubmit({
|
|
875
813
|
typeForm: 'acqr',
|
|
876
|
-
region,
|
|
814
|
+
region: regions.find((_) => _.code === selectedRegion)?.name || '',
|
|
877
815
|
PartnerComments,
|
|
878
816
|
fullName,
|
|
879
817
|
inn,
|
|
@@ -914,7 +852,7 @@
|
|
|
914
852
|
handleSubmit &&
|
|
915
853
|
(await handleSubmit({
|
|
916
854
|
typeForm: 'bcrd',
|
|
917
|
-
region,
|
|
855
|
+
region: regions.find((_) => _.code === selectedRegion)?.name || '',
|
|
918
856
|
name,
|
|
919
857
|
phone,
|
|
920
858
|
inn,
|
|
@@ -930,15 +868,15 @@
|
|
|
930
868
|
const renderDataOrganization$3 = ({ name, phone, mail, inn, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u041D\u041D", label: "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
|
|
931
869
|
const renderRegion$1 = ({ regions, region, handleChange }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
|
|
932
870
|
|
|
933
|
-
const
|
|
934
|
-
const EMPTY_VALUE = [];
|
|
935
|
-
function
|
|
936
|
-
const { data } = useAsyncData(regionCode ? `${
|
|
937
|
-
return data || EMPTY_VALUE;
|
|
871
|
+
const BRANCHES_URL = '/api/v1/branches';
|
|
872
|
+
const EMPTY_VALUE$1 = [];
|
|
873
|
+
function useBranches(regionCode) {
|
|
874
|
+
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
|
|
875
|
+
return data || EMPTY_VALUE$1;
|
|
938
876
|
}
|
|
939
|
-
const fetchSafeBoxes = async (url) => {
|
|
877
|
+
const fetchSafeBoxes$1 = async (url) => {
|
|
940
878
|
const result = await fetchJSON(url, { method: 'GET' });
|
|
941
|
-
return result || EMPTY_VALUE;
|
|
879
|
+
return result || EMPTY_VALUE$1;
|
|
942
880
|
};
|
|
943
881
|
|
|
944
882
|
const MIN_CREDIT_AMOUNT = 50000;
|
|
@@ -1013,8 +951,8 @@
|
|
|
1013
951
|
const { handleChange } = useFormHandlers({
|
|
1014
952
|
setFormState,
|
|
1015
953
|
});
|
|
1016
|
-
const selectedRegion = normalizeSelectedRegion$1(
|
|
1017
|
-
const branches =
|
|
954
|
+
const selectedRegion = normalizeSelectedRegion$1(region, regions);
|
|
955
|
+
const branches = useBranches(selectedRegion).filter((branch) => branch.address);
|
|
1018
956
|
useEffect(() => {
|
|
1019
957
|
handleChange({
|
|
1020
958
|
department: '',
|
|
@@ -1031,8 +969,8 @@
|
|
|
1031
969
|
name,
|
|
1032
970
|
phone,
|
|
1033
971
|
mail,
|
|
1034
|
-
region,
|
|
1035
|
-
department,
|
|
972
|
+
region: regions.find((_) => _.code === selectedRegion)?.name || '',
|
|
973
|
+
department: branches.find((_) => _.branchCode === department)?.address || '',
|
|
1036
974
|
PartnerComments,
|
|
1037
975
|
}));
|
|
1038
976
|
};
|
|
@@ -1068,6 +1006,39 @@
|
|
|
1068
1006
|
});
|
|
1069
1007
|
const renderDataOrganization$1 = ({ name, phone, handleChange }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u043C\u044F", label: "\u0418\u043C\u044F", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] }));
|
|
1070
1008
|
|
|
1009
|
+
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
1010
|
+
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
1011
|
+
const router = useRouter();
|
|
1012
|
+
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
1013
|
+
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
1014
|
+
? image.sources
|
|
1015
|
+
.filter((_) => _?.src)
|
|
1016
|
+
.sort(sourcesComparator)
|
|
1017
|
+
.map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
|
|
1018
|
+
: null, image?.src
|
|
1019
|
+
? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName, isMobile)
|
|
1020
|
+
: null] }));
|
|
1021
|
+
});
|
|
1022
|
+
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
1023
|
+
const style = {
|
|
1024
|
+
width: image.size?.width ? `${image.size?.width}px` : '100%',
|
|
1025
|
+
height: image.size?.height ? `${image.size?.height}px` : '100%',
|
|
1026
|
+
};
|
|
1027
|
+
const title = image.title || '';
|
|
1028
|
+
const alt = image.alt || image.title;
|
|
1029
|
+
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
1030
|
+
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
|
|
1031
|
+
};
|
|
1032
|
+
const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
|
|
1033
|
+
const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
|
|
1034
|
+
|
|
1035
|
+
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
|
|
1036
|
+
if (!image?.src && !image?.icon) {
|
|
1037
|
+
return null;
|
|
1038
|
+
}
|
|
1039
|
+
return image.icon ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: image?.iconVersion || 'normal', name: image.icon, ...iconProps })) : (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile, pathPrefix: pathPrefix }));
|
|
1040
|
+
});
|
|
1041
|
+
|
|
1071
1042
|
const renderContacts = () => (jsxs("div", { className: "flex", children: [jsxs("a", { className: "flex items-center text-primary-text no-underline mr-6", href: `tel:8 (800) 200-78-70`, "aria-label": "8 (800) 200-78-70", children: [jsx(ImgInner, { image: { icon: 'PhoneIcon' }, width: "24", height: "24", className: "mr-3" }), jsx("span", { children: "8 (800) 200-78-70" })] }), jsxs("a", { className: "flex items-center text-primary-text no-underline", "aria-label": "ved@rshb.ru", href: `mailto:ved@rshb.ru`, children: [jsx(ImgInner, { image: { icon: 'MailIcon' }, width: "24", height: "24", className: "mr-3" }), jsx("span", { children: "ved@rshb.ru" })] })] }));
|
|
1072
1043
|
|
|
1073
1044
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
@@ -1157,7 +1128,7 @@
|
|
|
1157
1128
|
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
|
|
1158
1129
|
const renderStep$1 = (benefit, i) => {
|
|
1159
1130
|
const description = benefit.description;
|
|
1160
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon, asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$4(description)] })] }, String(i)));
|
|
1131
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon, asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5 h-full", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$4(description)] })] }, String(i)));
|
|
1161
1132
|
};
|
|
1162
1133
|
const renderDescription$4 = (description) => {
|
|
1163
1134
|
const benefitType = description?.benefitType || null;
|
|
@@ -1224,9 +1195,10 @@
|
|
|
1224
1195
|
XS: 'text-xs-light',
|
|
1225
1196
|
};
|
|
1226
1197
|
|
|
1227
|
-
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, ...rest }) => {
|
|
1198
|
+
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, ...rest }) => {
|
|
1228
1199
|
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
1229
|
-
|
|
1200
|
+
const paddingStyle = isPadding ? 'p-12' : '';
|
|
1201
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col group-data-secondary:bg-primary-main group-data-secondary:text-white', paddingStyle, versionStyle.wrapper, className), ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { color: "group-data-secondary:text-white/80", size: versionStyle.descriptionSize, align: align, children: description })) : null] }));
|
|
1230
1202
|
});
|
|
1231
1203
|
|
|
1232
1204
|
const Bonus = JSX((props) => {
|
|
@@ -1244,8 +1216,8 @@
|
|
|
1244
1216
|
const renderBonusImage = (_) => _.image ? jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full`, image: _.image }) : null;
|
|
1245
1217
|
|
|
1246
1218
|
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
1247
|
-
const renderBonusBenefit = ({ icon,
|
|
1248
|
-
return (jsxs("div", { className:
|
|
1219
|
+
const renderBonusBenefit = ({ icon, title, description }, i) => {
|
|
1220
|
+
return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", width: "auto", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
|
|
1249
1221
|
};
|
|
1250
1222
|
const getElementsColsValue = (colValue) => {
|
|
1251
1223
|
switch (colValue) {
|
|
@@ -1616,7 +1588,10 @@
|
|
|
1616
1588
|
*/
|
|
1617
1589
|
const getMonthlyPayment = (rate, params) => {
|
|
1618
1590
|
const { isAnnuity, moneyValue, monthsValue } = params;
|
|
1619
|
-
if (
|
|
1591
|
+
if (rate === 0) {
|
|
1592
|
+
return 0;
|
|
1593
|
+
}
|
|
1594
|
+
else if (isAnnuity) {
|
|
1620
1595
|
const i = rate / MONTHLY_INTEREST_RATE; // Используется значение ставки в процентах
|
|
1621
1596
|
return moneyValue * (i + i / (Math.pow(1 + i, monthsValue) - 1));
|
|
1622
1597
|
}
|
|
@@ -1891,7 +1866,7 @@
|
|
|
1891
1866
|
}
|
|
1892
1867
|
}, [onIntersection, idx]);
|
|
1893
1868
|
const ref = useIntersectionObserver(observerCallback, observerOptions);
|
|
1894
|
-
return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style,
|
|
1869
|
+
return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
|
|
1895
1870
|
});
|
|
1896
1871
|
|
|
1897
1872
|
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
@@ -1916,7 +1891,7 @@
|
|
|
1916
1891
|
...(isVerticalList ? getContainerHeight(minHeight) : {}),
|
|
1917
1892
|
gap: `${gap}px`,
|
|
1918
1893
|
};
|
|
1919
|
-
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle,
|
|
1894
|
+
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : ''), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
1920
1895
|
});
|
|
1921
1896
|
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
1922
1897
|
const getContainerOffset = (padding, additionalPadding = 0) => ({
|
|
@@ -2155,7 +2130,7 @@
|
|
|
2155
2130
|
|
|
2156
2131
|
const MAX_LINKS_COUNT = 10;
|
|
2157
2132
|
const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, ...rest }) => {
|
|
2158
|
-
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, {
|
|
2133
|
+
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx("div", { className: "pt-6", children: jsx(Paragraph, { children: additionalDescription }) })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
2159
2134
|
});
|
|
2160
2135
|
const renderLinks = (links) => {
|
|
2161
2136
|
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
@@ -2181,7 +2156,7 @@
|
|
|
2181
2156
|
M: 'ml-3',
|
|
2182
2157
|
L: 'ml-4',
|
|
2183
2158
|
};
|
|
2184
|
-
const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className:
|
|
2159
|
+
const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
2185
2160
|
|
|
2186
2161
|
const CarouselProductCard = JSX(({ className = '', title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items = [], button = {}, version = 'primary', isDotted = true, align = 'text-center', ...rest }) => {
|
|
2187
2162
|
return (jsxs(BlockWrapper, { className: style('flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], { buttonClassName: 'mt-6 w-full' })] }));
|
|
@@ -2250,6 +2225,28 @@
|
|
|
2250
2225
|
return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] h-full text-left box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...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 group-data-gray:text-secondary-text group-data-gray:max-w-[265px]", children: description })) : null, items.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null] }) }) }));
|
|
2251
2226
|
});
|
|
2252
2227
|
|
|
2228
|
+
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2229
|
+
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2230
|
+
const onToggle = useCallback(() => {
|
|
2231
|
+
setIsUnfolded((_) => !_);
|
|
2232
|
+
}, []);
|
|
2233
|
+
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
2234
|
+
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
2235
|
+
return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
|
|
2236
|
+
});
|
|
2237
|
+
|
|
2238
|
+
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
2239
|
+
const containerRef = useRef(null);
|
|
2240
|
+
useEffect(() => {
|
|
2241
|
+
if (containerRef.current) {
|
|
2242
|
+
containerRef.current.style.maxHeight = isUnfolded
|
|
2243
|
+
? `${containerRef.current.scrollHeight}px`
|
|
2244
|
+
: '';
|
|
2245
|
+
}
|
|
2246
|
+
}, [isUnfolded, children?.length]);
|
|
2247
|
+
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
2248
|
+
});
|
|
2249
|
+
|
|
2253
2250
|
const VISIBLE_CELLS_COUNT = 1;
|
|
2254
2251
|
const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, cardCells = [], ...rest }) => {
|
|
2255
2252
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
@@ -2842,7 +2839,11 @@
|
|
|
2842
2839
|
const [isShowLocationModal, { setTrue: showLocationModal, setFalse: hideLocationModal }] = useBool();
|
|
2843
2840
|
const [location, onChangeLocation] = useLocation(defaultLocation);
|
|
2844
2841
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
2845
|
-
|
|
2842
|
+
const handleShowLocationModal = useCallback((ev) => {
|
|
2843
|
+
ev?.preventDefault();
|
|
2844
|
+
showLocationModal();
|
|
2845
|
+
}, []);
|
|
2846
|
+
return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), 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" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
|
|
2846
2847
|
});
|
|
2847
2848
|
|
|
2848
2849
|
const findActiveSubItem = (router) => (items = []) => {
|
|
@@ -3486,43 +3487,6 @@
|
|
|
3486
3487
|
const OtherProducts = JSX(({ className = '', ...rest }) => (jsx(BlockWrapper, { className: `font-sans text-primary-text ${className}`, ...rest, children: renderChildren(rest) })));
|
|
3487
3488
|
OtherProducts.childrenTypes = ['OtherProductsItem'];
|
|
3488
3489
|
|
|
3489
|
-
function getParentBlockDef(options) {
|
|
3490
|
-
return options?.parent || {};
|
|
3491
|
-
}
|
|
3492
|
-
|
|
3493
|
-
function getParentBlockContent(options, defaultContent) {
|
|
3494
|
-
const { content } = getParentBlockDef(options);
|
|
3495
|
-
return content || defaultContent;
|
|
3496
|
-
}
|
|
3497
|
-
|
|
3498
|
-
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
3499
|
-
const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
3500
|
-
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5';
|
|
3501
|
-
return (jsxs("button", { className: [
|
|
3502
|
-
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
3503
|
-
STATE_STYLE,
|
|
3504
|
-
DIMENSIONS_STYLE,
|
|
3505
|
-
className,
|
|
3506
|
-
].join(' '), "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
3507
|
-
icon,
|
|
3508
|
-
iconVersion: 'white',
|
|
3509
|
-
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
|
|
3510
|
-
});
|
|
3511
|
-
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3512
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
3513
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3514
|
-
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3515
|
-
};
|
|
3516
|
-
|
|
3517
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3518
|
-
const OtherProductsItem = JSX(({ className, label = '', isUnfolded: unfoldedByDefault, ...rest }) => {
|
|
3519
|
-
const { colorPalette } = getParentBlockContent(rest.options, {});
|
|
3520
|
-
return (jsx("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: jsx(Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: renderChildren(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: colorPalette || rest.options?.page?.colorPalette, onClick: onToggle })) }) }));
|
|
3521
|
-
});
|
|
3522
|
-
OtherProductsItem.childrenTypes = {
|
|
3523
|
-
exclude: ['OtherProductsItem'],
|
|
3524
|
-
};
|
|
3525
|
-
|
|
3526
3490
|
const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (jsx(BlockWrapper, { ...rest, children: jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
|
|
3527
3491
|
|
|
3528
3492
|
const BenefitItem = JSX((props) => {
|
|
@@ -3765,15 +3729,49 @@
|
|
|
3765
3729
|
return (jsx(BlockWrapper, { ...rest, children: jsx(RichText, { __html: __html }) }));
|
|
3766
3730
|
});
|
|
3767
3731
|
|
|
3768
|
-
const
|
|
3732
|
+
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
3733
|
+
const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
3734
|
+
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5';
|
|
3735
|
+
return (jsxs("button", { className: [
|
|
3736
|
+
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
3737
|
+
STATE_STYLE,
|
|
3738
|
+
DIMENSIONS_STYLE,
|
|
3739
|
+
className,
|
|
3740
|
+
].join(' '), "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
3741
|
+
icon,
|
|
3742
|
+
iconVersion: 'white',
|
|
3743
|
+
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
|
|
3744
|
+
});
|
|
3745
|
+
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3746
|
+
const labels = ['Развернуть', 'Скрыть'];
|
|
3747
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3748
|
+
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3749
|
+
};
|
|
3750
|
+
|
|
3751
|
+
const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: `grid grid-cols-12 gap-5 [&>*]:p-0`, isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) })));
|
|
3769
3752
|
RollupItem.childrenTypes = {
|
|
3770
|
-
exclude: ['RollupItem', 'Accordion', '
|
|
3753
|
+
exclude: ['RollupItem', 'Accordion', 'OtherProducts'],
|
|
3771
3754
|
};
|
|
3772
3755
|
const renderFoldButton = ({ version, label: defaultLabel, isUnfolded, onToggle, }) => {
|
|
3773
3756
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
3774
|
-
return version === 'primary' ? (renderPrimaryFoldButton({
|
|
3757
|
+
return version === 'primary' ? (renderPrimaryFoldButton({
|
|
3758
|
+
label,
|
|
3759
|
+
icon: isUnfolded ? 'MinusIcon' : 'PlusIcon',
|
|
3760
|
+
onToggle,
|
|
3761
|
+
})) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
3762
|
+
};
|
|
3763
|
+
const renderPrimaryFoldButton = ({ label, icon, onToggle }) => (jsxs("button", { className: `border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer`, onClick: onToggle, children: [jsx(Text, { size: "text-xl", font: "font-medium", children: label }), icon ? jsx(ImgInner, { image: getIconWithVersion({ icon }), width: "24", height: "24", asSVG: true }) : null] }));
|
|
3764
|
+
|
|
3765
|
+
const SAFEBOXES_URL = '/api/v1/safeboxes';
|
|
3766
|
+
const EMPTY_VALUE = [];
|
|
3767
|
+
function useSafeBoxes(regionCode) {
|
|
3768
|
+
const { data } = useAsyncData(regionCode ? `${SAFEBOXES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes);
|
|
3769
|
+
return data || EMPTY_VALUE;
|
|
3770
|
+
}
|
|
3771
|
+
const fetchSafeBoxes = async (url) => {
|
|
3772
|
+
const result = await fetchJSON(url, { method: 'GET' });
|
|
3773
|
+
return result || EMPTY_VALUE;
|
|
3775
3774
|
};
|
|
3776
|
-
const renderPrimaryFoldButton = ({ label, icon, onToggle }) => (jsxs("button", { className: "border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer", onClick: onToggle, children: [jsx("span", { className: "text-xl font-medium pr-2.5", children: label }), icon ? jsx(ImgInner, { image: getIconWithVersion({ icon }), width: "24", height: "24", asSVG: true }) : null] }));
|
|
3777
3775
|
|
|
3778
3776
|
const WrapperSelect = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = '', setSelected, label }) => {
|
|
3779
3777
|
const dataFormat = data
|
|
@@ -4048,11 +4046,15 @@
|
|
|
4048
4046
|
};
|
|
4049
4047
|
|
|
4050
4048
|
const LinkTab = JSX((props) => {
|
|
4051
|
-
const { tab, currentTab, isScrollable = false } = props;
|
|
4049
|
+
const { tab, currentTab, onClick, isScrollable = false } = props;
|
|
4052
4050
|
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
4053
4051
|
const link = useLink();
|
|
4054
4052
|
const adjustedProps = link(tab);
|
|
4055
|
-
|
|
4053
|
+
const handleClick = (ev) => {
|
|
4054
|
+
adjustedProps.onClick(ev);
|
|
4055
|
+
onClick(tab);
|
|
4056
|
+
};
|
|
4057
|
+
return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, isScrollable), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { className: getLinkTabClassName('text', active, isScrollable), children: tab.text }) }));
|
|
4056
4058
|
});
|
|
4057
4059
|
|
|
4058
4060
|
const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
|
|
@@ -4085,7 +4087,7 @@
|
|
|
4085
4087
|
case 'group':
|
|
4086
4088
|
return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
|
|
4087
4089
|
case 'link': {
|
|
4088
|
-
return (jsx(LinkTab, { tab: tab, currentTab: currentTab, isScrollable: isScrollable }, String(i)));
|
|
4090
|
+
return (jsx(LinkTab, { tab: tab, currentTab: currentTab, isScrollable: isScrollable, onClick: onClick }, String(i)));
|
|
4089
4091
|
}
|
|
4090
4092
|
default:
|
|
4091
4093
|
assertUnreachable(type);
|
|
@@ -4112,15 +4114,19 @@
|
|
|
4112
4114
|
const Tabs = JSX((props) => {
|
|
4113
4115
|
const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
|
|
4114
4116
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
4117
|
+
useEffect(() => {
|
|
4118
|
+
if (!tabs || !tabs[0]) {
|
|
4119
|
+
return;
|
|
4120
|
+
}
|
|
4121
|
+
fireTabEvent(tabs[0]);
|
|
4122
|
+
}, []);
|
|
4115
4123
|
useEffect(() => {
|
|
4116
4124
|
if (currentTab?.type === 'group') {
|
|
4117
4125
|
defaultEventBus.subject('tab', { type: currentTab.type, label: currentTab.ref });
|
|
4118
4126
|
}
|
|
4119
4127
|
}, [currentTab]);
|
|
4120
4128
|
const handleClick = useCallback((selectedTab) => {
|
|
4121
|
-
|
|
4122
|
-
defaultEventBus.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
4123
|
-
}
|
|
4129
|
+
fireTabEvent(selectedTab);
|
|
4124
4130
|
setCurrentTab(selectedTab);
|
|
4125
4131
|
}, []);
|
|
4126
4132
|
return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children: tabsMode === 'scrollable' ? (jsx(ScrollableTabs, { tabs: tabs, onClick: handleClick, currentTab: currentTab, showCounter: showCounter, ...rest })) : (tabs?.map(renderTab({
|
|
@@ -4130,6 +4136,14 @@
|
|
|
4130
4136
|
...rest,
|
|
4131
4137
|
}))) }));
|
|
4132
4138
|
});
|
|
4139
|
+
const fireTabEvent = (tab) => {
|
|
4140
|
+
if (tab.type === 'group') {
|
|
4141
|
+
defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
|
|
4142
|
+
}
|
|
4143
|
+
if (tab.type === 'link') {
|
|
4144
|
+
defaultEventBus.fire('tab', { type: tab.type, label: tab.href });
|
|
4145
|
+
}
|
|
4146
|
+
};
|
|
4133
4147
|
|
|
4134
4148
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
4135
4149
|
const FIRST_CELL_CLASSES = 'w-[354px] flex-shrink-0';
|
|
@@ -4353,7 +4367,6 @@
|
|
|
4353
4367
|
|
|
4354
4368
|
const Blocks = {
|
|
4355
4369
|
Accordion,
|
|
4356
|
-
AccordionItem,
|
|
4357
4370
|
ApplicationForm,
|
|
4358
4371
|
BenefitsBlock,
|
|
4359
4372
|
Bonus,
|
|
@@ -4390,7 +4403,6 @@
|
|
|
4390
4403
|
OfficeMap,
|
|
4391
4404
|
OfficeServicesBlock,
|
|
4392
4405
|
OtherProducts,
|
|
4393
|
-
OtherProductsItem,
|
|
4394
4406
|
ParagraphBlock,
|
|
4395
4407
|
PictureText,
|
|
4396
4408
|
Placeholder,
|
|
@@ -4535,7 +4547,7 @@
|
|
|
4535
4547
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4536
4548
|
}
|
|
4537
4549
|
|
|
4538
|
-
const packageVersion = "0.8.
|
|
4550
|
+
const packageVersion = "0.8.25";
|
|
4539
4551
|
|
|
4540
4552
|
exports.Blocks = Blocks;
|
|
4541
4553
|
exports.ContentPage = ContentPage;
|