@redneckz/wildless-cms-uni-blocks 0.5.12 → 0.5.14
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 +136 -84
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Accordion/AccordionContent.d.ts +9 -7
- package/bundle/components/Accordion/AccordionItem.d.ts +1 -4
- package/bundle/components/Accordion/AccordionItem.mobile.d.ts +1 -4
- package/bundle/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/bundle/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/bundle/components/Blocks.d.ts +3 -1
- package/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/bundle/components/StepsBlock/renderItems.d.ts +7 -2
- package/bundle/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/bundle/model/BlockDecorator.d.ts +1 -0
- package/bundle/model/BlocksRegistry.d.ts +4 -1
- package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/bundle/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/bundle/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/bundle/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +3 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +5 -2
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +9 -7
- package/dist/components/Accordion/AccordionItem.d.ts +1 -4
- package/dist/components/Accordion/AccordionItem.js +3 -8
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.d.ts +1 -4
- package/dist/components/Accordion/AccordionItem.mobile.js +2 -5
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/dist/components/Accordion/AccordionItemProps.js +2 -0
- package/dist/components/Accordion/AccordionItemProps.js.map +1 -0
- package/dist/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/dist/components/Accordion/AccordionItemsList.js +6 -0
- package/dist/components/Accordion/AccordionItemsList.js.map +1 -0
- package/dist/components/Blocks.d.ts +3 -1
- package/dist/components/Blocks.js +4 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/filterBlocks.js +1 -2
- package/dist/components/ContentPage/filterBlocks.js.map +1 -1
- package/dist/components/ContentPage/filterBlocks.mobile.js +1 -3
- package/dist/components/ContentPage/filterBlocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/renderBlock.js +8 -7
- package/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +8 -7
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +5 -5
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/dist/components/InvestmentInfo/InvestmentInfo.js +49 -0
- package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/dist/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/dist/components/OtherProducts/OtherProducts.js +2 -4
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlock.js +2 -8
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/dist/components/StepsBlock/renderItems.d.ts +7 -2
- package/dist/components/StepsBlock/renderItems.js +5 -1
- package/dist/components/StepsBlock/renderItems.js.map +1 -1
- package/dist/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/dist/components/StepsBlock/renderStepContent.js +20 -0
- package/dist/components/StepsBlock/renderStepContent.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTable.js +11 -2
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/model/BlockDecorator.d.ts +1 -0
- package/dist/model/BlockDecorator.js +2 -1
- package/dist/model/BlockDecorator.js.map +1 -1
- package/dist/model/BlocksRegistry.d.ts +4 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +16 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/dist/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/dist/ui-kit/Foldable/Foldable.js +7 -23
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/dist/ui-kit/Foldable/{FoldButtonProps.js → FoldablePartProps.js} +1 -1
- package/dist/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/dist/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/dist/ui-kit/Foldable/FoldableSection.js +17 -0
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +3 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +5 -2
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +9 -7
- package/lib/components/Accordion/AccordionItem.d.ts +1 -4
- package/lib/components/Accordion/AccordionItem.js +3 -8
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.d.ts +1 -4
- package/lib/components/Accordion/AccordionItem.mobile.js +2 -5
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/lib/components/Accordion/AccordionItemProps.js +2 -0
- package/lib/components/Accordion/AccordionItemProps.js.map +1 -0
- package/lib/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/lib/components/Accordion/AccordionItemsList.js +4 -0
- package/lib/components/Accordion/AccordionItemsList.js.map +1 -0
- package/lib/components/Blocks.d.ts +3 -1
- package/lib/components/Blocks.js +4 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/filterBlocks.js +1 -2
- package/lib/components/ContentPage/filterBlocks.js.map +1 -1
- package/lib/components/ContentPage/filterBlocks.mobile.js +1 -3
- package/lib/components/ContentPage/filterBlocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/renderBlock.js +9 -8
- package/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +8 -7
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +5 -5
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.fixture.d.ts +7 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.js +47 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/lib/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +1 -0
- package/lib/components/OtherProducts/OtherProducts.js +2 -4
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +5 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -8
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/components/StepsBlock/renderItems.d.ts +7 -2
- package/lib/components/StepsBlock/renderItems.js +6 -2
- package/lib/components/StepsBlock/renderItems.js.map +1 -1
- package/lib/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/lib/components/StepsBlock/renderStepContent.js +17 -0
- package/lib/components/StepsBlock/renderStepContent.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTable.js +11 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/model/BlockDecorator.d.ts +1 -0
- package/lib/model/BlockDecorator.js +1 -0
- package/lib/model/BlockDecorator.js.map +1 -1
- package/lib/model/BlocksRegistry.d.ts +4 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/lib/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/lib/ui-kit/Foldable/Foldable.js +9 -25
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/lib/ui-kit/Foldable/FoldablePartProps.js +2 -0
- package/lib/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/lib/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/lib/ui-kit/Foldable/FoldableSection.js +15 -0
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +138 -159
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Accordion/AccordionContent.d.ts +9 -7
- package/mobile/bundle/components/Accordion/AccordionItem.d.ts +1 -4
- package/mobile/bundle/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/mobile/bundle/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/mobile/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/mobile/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/bundle/components/StepsBlock/renderItems.d.ts +7 -2
- package/mobile/bundle/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/mobile/bundle/model/BlockDecorator.d.ts +1 -0
- package/mobile/bundle/model/BlocksRegistry.d.ts +4 -1
- package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/mobile/bundle/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/mobile/bundle/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/mobile/dist/components/Accordion/Accordion.js +5 -2
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +9 -7
- package/mobile/dist/components/Accordion/AccordionItem.d.ts +1 -4
- package/mobile/dist/components/Accordion/AccordionItem.js +2 -5
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/mobile/dist/components/Accordion/AccordionItemProps.js +2 -0
- package/mobile/dist/components/Accordion/AccordionItemProps.js.map +1 -0
- package/mobile/dist/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/mobile/dist/components/Accordion/AccordionItemsList.js +6 -0
- package/mobile/dist/components/Accordion/AccordionItemsList.js.map +1 -0
- package/mobile/dist/components/ContentPage/filterBlocks.js +1 -3
- package/mobile/dist/components/ContentPage/filterBlocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/renderBlock.js +8 -7
- package/mobile/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +8 -7
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +5 -5
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +49 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +2 -4
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderItems.d.ts +7 -2
- package/mobile/dist/components/StepsBlock/renderItems.js +5 -1
- package/mobile/dist/components/StepsBlock/renderItems.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/mobile/dist/components/StepsBlock/renderStepContent.js +20 -0
- package/mobile/dist/components/StepsBlock/renderStepContent.js.map +1 -0
- package/mobile/dist/model/BlockDecorator.d.ts +1 -0
- package/mobile/dist/model/BlockDecorator.js +2 -1
- package/mobile/dist/model/BlockDecorator.js.map +1 -1
- package/mobile/dist/model/BlocksRegistry.d.ts +4 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +16 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/mobile/dist/ui-kit/Foldable/Foldable.js +7 -23
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/mobile/dist/ui-kit/Foldable/{FoldButtonProps.js → FoldablePartProps.js} +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +17 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/mobile/lib/components/Accordion/Accordion.js +5 -2
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +9 -7
- package/mobile/lib/components/Accordion/AccordionItem.d.ts +1 -4
- package/mobile/lib/components/Accordion/AccordionItem.js +2 -5
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemProps.d.ts +5 -0
- package/mobile/lib/components/Accordion/AccordionItemProps.js +2 -0
- package/mobile/lib/components/Accordion/AccordionItemProps.js.map +1 -0
- package/mobile/lib/components/Accordion/AccordionItemsList.d.ts +1 -0
- package/mobile/lib/components/Accordion/AccordionItemsList.js +4 -0
- package/mobile/lib/components/Accordion/AccordionItemsList.js.map +1 -0
- package/mobile/lib/components/ContentPage/filterBlocks.js +1 -3
- package/mobile/lib/components/ContentPage/filterBlocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/renderBlock.js +9 -8
- package/mobile/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +8 -7
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +5 -5
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +47 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +2 -4
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderItems.d.ts +7 -2
- package/mobile/lib/components/StepsBlock/renderItems.js +6 -2
- package/mobile/lib/components/StepsBlock/renderItems.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +14 -0
- package/mobile/lib/components/StepsBlock/renderStepContent.js +17 -0
- package/mobile/lib/components/StepsBlock/renderStepContent.js.map +1 -0
- package/mobile/lib/model/BlockDecorator.d.ts +1 -0
- package/mobile/lib/model/BlockDecorator.js +1 -0
- package/mobile/lib/model/BlockDecorator.js.map +1 -1
- package/mobile/lib/model/BlocksRegistry.d.ts +4 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +3 -10
- package/mobile/lib/ui-kit/Foldable/Foldable.js +9 -25
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
- package/mobile/lib/ui-kit/Foldable/FoldablePartProps.js +2 -0
- package/mobile/lib/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.d.ts +5 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +15 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -0
- package/mobile/src/common.css +11 -3
- package/mobile/src/components/Accordion/Accordion.tsx +17 -7
- package/mobile/src/components/Accordion/AccordionContent.ts +10 -7
- package/mobile/src/components/Accordion/AccordionItem.tsx +34 -30
- package/mobile/src/components/Accordion/AccordionItemProps.ts +6 -0
- package/mobile/src/components/Accordion/AccordionItemsList.tsx +5 -0
- package/mobile/src/components/ContentPage/filterBlocks.ts +1 -3
- package/mobile/src/components/ContentPage/renderBlock.tsx +16 -11
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -1
- package/mobile/src/components/Footer/Footer.tsx +15 -13
- package/mobile/src/components/GracePeriod/GracePeriod.ui.json +5 -0
- package/mobile/src/components/Header/Header.tsx +16 -11
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.example.json +48 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +149 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.ui.json +16 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfoContent.ts +55 -0
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +1 -54
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +13 -24
- package/mobile/src/components/OtherProducts/OtherProducts.ui.json +1 -76
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -22
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.ui.json +8 -1
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +2 -2
- package/mobile/src/components/StepsBlock/renderItems.tsx +24 -15
- package/mobile/src/components/StepsBlock/renderStepContent.tsx +63 -0
- package/mobile/src/model/BlockDecorator.ts +2 -0
- package/mobile/src/model/BlocksRegistry.ts +4 -1
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +52 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +19 -67
- package/mobile/src/ui-kit/Foldable/FoldablePartProps.ts +4 -0
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +30 -0
- package/package.json +2 -2
- package/src/common.css +11 -3
- package/src/components/Accordion/Accordion.mobile.tsx +17 -7
- package/src/components/Accordion/Accordion.tsx +12 -3
- package/src/components/Accordion/AccordionContent.ts +10 -7
- package/src/components/Accordion/AccordionItem.mobile.tsx +34 -30
- package/src/components/Accordion/AccordionItem.tsx +24 -23
- package/src/components/Accordion/AccordionItemProps.ts +6 -0
- package/src/components/Accordion/AccordionItemsList.tsx +5 -0
- package/src/components/Blocks.ts +4 -0
- package/src/components/ContentPage/filterBlocks.mobile.ts +1 -3
- package/src/components/ContentPage/filterBlocks.ts +1 -2
- package/src/components/ContentPage/renderBlock.tsx +16 -11
- package/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -1
- package/src/components/Footer/Footer.mobile.tsx +15 -13
- package/src/components/GracePeriod/GracePeriod.ui.json +5 -0
- package/src/components/Header/Header.mobile.tsx +16 -11
- package/src/components/InvestmentInfo/InvestmentInfo.example.json +48 -0
- package/src/components/InvestmentInfo/InvestmentInfo.fixture.tsx +107 -0
- package/src/components/InvestmentInfo/InvestmentInfo.tsx +149 -0
- package/src/components/InvestmentInfo/InvestmentInfo.ui.json +16 -0
- package/src/components/InvestmentInfo/InvestmentInfoContent.ts +55 -0
- package/src/components/OtherProducts/OtherProducts.example.json +1 -54
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +77 -126
- package/src/components/OtherProducts/OtherProducts.tsx +13 -24
- package/src/components/OtherProducts/OtherProducts.ui.json +1 -76
- package/src/components/OtherProducts/OtherProductsContent.ts +1 -22
- package/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +5 -0
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
- package/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
- package/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
- package/src/components/SafeDepositRental/SafeDepositRental.ui.json +8 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +39 -25
- package/src/components/StepsBlock/StepsBlock.tsx +3 -49
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +2 -2
- package/src/components/StepsBlock/renderItems.tsx +24 -15
- package/src/components/StepsBlock/renderStepContent.tsx +63 -0
- package/src/components/TariffsTable/TariffsTable.tsx +32 -23
- package/src/model/BlockDecorator.ts +2 -0
- package/src/model/BlocksRegistry.ts +4 -1
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +52 -0
- package/src/ui-kit/Foldable/Foldable.tsx +19 -67
- package/src/ui-kit/Foldable/FoldablePartProps.ts +4 -0
- package/src/ui-kit/Foldable/FoldableSection.tsx +30 -0
- package/tailwind.config.cjs +5 -0
- package/bundle/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/bundle/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/bundle/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/bundle/utils/getAccordionItems.d.ts +0 -1
- package/dist/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/dist/components/ContentPage/isBlockInRegistry.js +0 -7
- package/dist/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/dist/components/OtherProducts/OtherProductsItem.js +0 -19
- package/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/dist/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/dist/ui-kit/Foldable/DefaultButton.js +0 -12
- package/dist/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/dist/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/dist/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/dist/utils/getAccordionItems.d.ts +0 -1
- package/dist/utils/getAccordionItems.js +0 -13
- package/dist/utils/getAccordionItems.js.map +0 -1
- package/lib/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/lib/components/ContentPage/isBlockInRegistry.js +0 -4
- package/lib/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/lib/components/OtherProducts/OtherProductsItem.js +0 -17
- package/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/lib/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/lib/ui-kit/Foldable/DefaultButton.js +0 -10
- package/lib/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/lib/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/lib/ui-kit/Foldable/FoldButtonProps.js +0 -2
- package/lib/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/lib/utils/getAccordionItems.d.ts +0 -1
- package/lib/utils/getAccordionItems.js +0 -10
- package/lib/utils/getAccordionItems.js.map +0 -1
- package/mobile/bundle/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/mobile/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/bundle/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/mobile/bundle/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/mobile/bundle/utils/getAccordionItems.d.ts +0 -1
- package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js +0 -7
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +0 -19
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/dist/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/mobile/dist/ui-kit/Foldable/DefaultButton.js +0 -12
- package/mobile/dist/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/mobile/dist/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/mobile/dist/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/mobile/dist/utils/getAccordionItems.d.ts +0 -1
- package/mobile/dist/utils/getAccordionItems.js +0 -13
- package/mobile/dist/utils/getAccordionItems.js.map +0 -1
- package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +0 -2
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js +0 -4
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +0 -17
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/lib/ui-kit/Foldable/DefaultButton.d.ts +0 -2
- package/mobile/lib/ui-kit/Foldable/DefaultButton.js +0 -10
- package/mobile/lib/ui-kit/Foldable/DefaultButton.js.map +0 -1
- package/mobile/lib/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
- package/mobile/lib/ui-kit/Foldable/FoldButtonProps.js +0 -2
- package/mobile/lib/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
- package/mobile/lib/utils/getAccordionItems.d.ts +0 -1
- package/mobile/lib/utils/getAccordionItems.js +0 -10
- package/mobile/lib/utils/getAccordionItems.js.map +0 -1
- package/mobile/src/components/ContentPage/isBlockInRegistry.ts +0 -5
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +0 -49
- package/mobile/src/ui-kit/Foldable/DefaultButton.tsx +0 -27
- package/mobile/src/ui-kit/Foldable/FoldButtonProps.ts +0 -13
- package/mobile/src/utils/getAccordionItems.ts +0 -10
- package/src/components/ContentPage/isBlockInRegistry.ts +0 -5
- package/src/components/OtherProducts/OtherProductsItem.tsx +0 -49
- package/src/ui-kit/Foldable/DefaultButton.tsx +0 -27
- package/src/ui-kit/Foldable/FoldButtonProps.ts +0 -13
- package/src/utils/getAccordionItems.ts +0 -10
package/bundle/bundle.umd.js
CHANGED
|
@@ -228,6 +228,10 @@
|
|
|
228
228
|
return JSXTmpl;
|
|
229
229
|
};
|
|
230
230
|
|
|
231
|
+
function style2className(style) {
|
|
232
|
+
return style ? style.filter(Boolean).join(' ') : '';
|
|
233
|
+
}
|
|
234
|
+
|
|
231
235
|
class EventBus {
|
|
232
236
|
static inst = new EventBus();
|
|
233
237
|
subscribers = {};
|
|
@@ -332,6 +336,11 @@
|
|
|
332
336
|
}
|
|
333
337
|
}
|
|
334
338
|
|
|
339
|
+
const Description = JSX((props) => {
|
|
340
|
+
const { className = '', description } = props;
|
|
341
|
+
return jsx("div", { className: `${className}`, children: description });
|
|
342
|
+
});
|
|
343
|
+
|
|
335
344
|
const HEADING_STYLE_MAP = {
|
|
336
345
|
h0: 'text-h0',
|
|
337
346
|
h1: 'text-h1',
|
|
@@ -346,15 +355,6 @@
|
|
|
346
355
|
return (jsx(Tag, { className: `font-sans m-0 ${HEADING_STYLE_MAP[headingType]} ${className}`, children: title }));
|
|
347
356
|
});
|
|
348
357
|
|
|
349
|
-
function style2className(style) {
|
|
350
|
-
return style ? style.filter(Boolean).join(' ') : '';
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
const Description = JSX((props) => {
|
|
354
|
-
const { className = '', description } = props;
|
|
355
|
-
return jsx("div", { className: `${className}`, children: description });
|
|
356
|
-
});
|
|
357
|
-
|
|
358
358
|
const ALIGN_TEXT = {
|
|
359
359
|
left: 'text-left',
|
|
360
360
|
center: 'text-center',
|
|
@@ -936,11 +936,11 @@
|
|
|
936
936
|
right: 'text-right',
|
|
937
937
|
};
|
|
938
938
|
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'XL_L', description, additionalDescription, image, items, button, version, isDotted = true, align = 'center', }) => {
|
|
939
|
-
return (jsxs("div", { className: `h-full flex flex-col justify-between ${ALIGN_TITLE$1[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage(image), renderCardTitle(headlineSmallVersion, title), renderDescription$
|
|
939
|
+
return (jsxs("div", { className: `h-full flex flex-col justify-between ${ALIGN_TITLE$1[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage(image), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), renderAdditionalDescription(additionalDescription), items?.length ? renderItems$1(items, isDotted, version) : null] }), button ? renderButton(button) : null] }));
|
|
940
940
|
});
|
|
941
941
|
const renderImage = (image) => image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(ImgInner, { className: "mb-6", image: image }) })) : null;
|
|
942
942
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
943
|
-
const renderDescription$
|
|
943
|
+
const renderDescription$2 = (description, title) => description ? jsx("div", { className: `text-base ${title ? 'mt-2' : ''}`, children: description }) : null;
|
|
944
944
|
const renderAdditionalDescription = (additionalDescription) => additionalDescription ? (jsx("div", { className: "text-m-light text-secondary-text mt-auto", children: additionalDescription })) : null;
|
|
945
945
|
const renderButton = (button) => (jsx(Button, { className: "mt-6 w-full", ...button }));
|
|
946
946
|
const renderItems$1 = (items, isDotted, version = 'primary') => (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 text-left first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
|
|
@@ -1010,47 +1010,33 @@
|
|
|
1010
1010
|
return (jsx(EmbeddedBlock, { className: `${className} ${classNameBlock}`, context: context, ...rest }, `block_${i}`));
|
|
1011
1011
|
};
|
|
1012
1012
|
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1013
|
+
const Foldable = JSX(({ isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
1014
|
+
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
1015
|
+
const onToggle = useCallback(() => {
|
|
1016
|
+
setIsUnfolded((_) => !_);
|
|
1017
|
+
}, []);
|
|
1018
|
+
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
1019
|
+
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
1020
|
+
return isFoldButtonOnTop ? (jsxs("div", { children: [buttonNode, sectionNode] })) : (jsxs("div", { children: [sectionNode, buttonNode] }));
|
|
1020
1021
|
});
|
|
1021
1022
|
|
|
1022
|
-
const
|
|
1023
|
-
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
1024
|
-
const blocksToHide = clamp(hiddenBlocksNum, 0, blocks?.length);
|
|
1025
|
-
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
1026
|
-
const hiddenBlocks = blocksToHide > 0 ? blocks.slice(-blocksToHide) : [];
|
|
1023
|
+
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
1027
1024
|
const containerRef = useRef(null);
|
|
1028
|
-
|
|
1029
|
-
setIsUnfolded(!isUnfolded);
|
|
1025
|
+
useEffect(() => {
|
|
1030
1026
|
if (containerRef.current) {
|
|
1031
1027
|
containerRef.current.style.maxHeight = isUnfolded
|
|
1032
|
-
?
|
|
1033
|
-
:
|
|
1028
|
+
? `${containerRef.current.scrollHeight}px`
|
|
1029
|
+
: '';
|
|
1034
1030
|
}
|
|
1035
|
-
};
|
|
1036
|
-
|
|
1037
|
-
const blocksNode = blockWrapper(jsxs("div", { children: [visibleBlocks, jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden max-h-0 ${containerClassName}`, children: hiddenBlocks })] }));
|
|
1038
|
-
return (jsx("div", { children: isFoldButtonOnTop ? (jsxs("div", { children: [buttonNode, blocksNode] })) : (jsxs("div", { children: [blocksNode, buttonNode] })) }));
|
|
1031
|
+
}, [isUnfolded, children?.length]);
|
|
1032
|
+
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden max-h-0 ${className}`, children: children }));
|
|
1039
1033
|
});
|
|
1040
|
-
const renderDefaultFoldButton = (props) => {
|
|
1041
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
1042
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
1043
|
-
return (jsx(DefaultButton, { icon: icons[Number(props.isUnfolded)], label: labels[Number(props.isUnfolded)], onClick: props.onToggle }));
|
|
1044
|
-
};
|
|
1045
1034
|
|
|
1046
1035
|
const icons$1 = ['PlusIcon', 'MinusIcon'];
|
|
1047
|
-
const AccordionItem = JSX(({ label = '',
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
return (jsx("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: jsx(Foldable, { hiddenBlocksNum: foldableBlocks.length, blocks: foldableBlocks, isFoldButtonOnTop: true, containerClassName: "grid grid-cols-12", renderFoldButton: (props) => (jsx(FoldButton, { icon: icons$1[Number(props.isUnfolded)], label: label, hasContent: Boolean(blocks?.length), onClick: props.onToggle })) }) }));
|
|
1052
|
-
});
|
|
1053
|
-
const FoldButton = JSX(({ icon, label, hasContent, 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 group cursor-pointer ${hasContent ? 'group cursor-pointer' : ''}`, onClick: onClick, children: [jsx("span", { className: `text-xl font-medium pr-2.5`, children: label }), hasContent ? (jsx(ImgInner, { image: icon, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })) : null] })));
|
|
1036
|
+
const AccordionItem = JSX(({ label = '', children, hasContent = true }) => (jsx("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: jsx(Foldable, { isFoldButtonOnTop: true, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "grid grid-cols-12", isUnfolded: isUnfolded, children: children })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton, { label: label, icon: icons$1[Number(isUnfolded)], hasContent: hasContent, onClick: onToggle })) }) })));
|
|
1037
|
+
const FoldButton = JSX(({ label, icon, hasContent, 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 group cursor-pointer ${hasContent ? 'group cursor-pointer' : ''}`, onClick: onClick, children: [jsx("span", { className: `text-xl font-medium pr-2.5`, children: label }), hasContent ? (jsx(ImgInner, { image: icon, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })) : null] })));
|
|
1038
|
+
|
|
1039
|
+
const AccordionItemsList = JSX(({ children }) => (jsx("ul", { className: "list-none m-0 p-0", children: children })));
|
|
1054
1040
|
|
|
1055
1041
|
const ALIGN_TITLE = {
|
|
1056
1042
|
left: 'text-left',
|
|
@@ -1058,7 +1044,7 @@
|
|
|
1058
1044
|
right: 'text-right',
|
|
1059
1045
|
};
|
|
1060
1046
|
const Accordion = JSX(({ title, description, accordionItems, context, className = '', accordionAlignTitle = 'center', ...rest }) => {
|
|
1061
|
-
return (jsxs(BlockWrapper, { context: context, className: `p-[50px] mb-1 last:mb-0 font-sans bg-white text-primary-text ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${ALIGN_TITLE[accordionAlignTitle]}`, title: title })) : null, description ? jsx("div", { className: "mb-2.5 text-l", children: description }) : null, accordionItems?.length ? (jsx(
|
|
1047
|
+
return (jsxs(BlockWrapper, { context: context, className: `p-[50px] mb-1 last:mb-0 font-sans bg-white text-primary-text ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${ALIGN_TITLE[accordionAlignTitle]}`, title: title })) : null, description ? jsx("div", { className: "mb-2.5 text-l", children: description }) : null, accordionItems?.length ? (jsx(AccordionItemsList, { children: accordionItems.map((item, i) => (jsx(AccordionItem, { context: context, hasContent: Boolean(item.blocks?.length), ...item, children: renderBlocksList$1({ blocks: item.blocks, context, className: '!p-0 mb-5' }) }, `AccordionItem${i}`))) })) : null] }));
|
|
1062
1048
|
});
|
|
1063
1049
|
|
|
1064
1050
|
const benefitsBlockStyleMap = {
|
|
@@ -1092,9 +1078,9 @@
|
|
|
1092
1078
|
};
|
|
1093
1079
|
const renderStep = (benefitsBlockVersion) => (benefit, i) => {
|
|
1094
1080
|
const description = (benefit?.description || undefined);
|
|
1095
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] p-3 rounded-full ${benefitsIconStyleMap[benefitsBlockVersion]}`, image: setIconVersion(benefit.icon, benefitsBlockVersion), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[benefitsBlockVersion]}`, children: benefit.label })) : null, renderDescription(description, benefitsBlockVersion)] })] }, String(i)));
|
|
1081
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] p-3 rounded-full ${benefitsIconStyleMap[benefitsBlockVersion]}`, image: setIconVersion(benefit.icon, benefitsBlockVersion), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[benefitsBlockVersion]}`, children: benefit.label })) : null, renderDescription$1(description, benefitsBlockVersion)] })] }, String(i)));
|
|
1096
1082
|
};
|
|
1097
|
-
const renderDescription = (description, benefitsBlockVersion) => {
|
|
1083
|
+
const renderDescription$1 = (description, benefitsBlockVersion) => {
|
|
1098
1084
|
const benefitType = description ? description?.benefitType : null;
|
|
1099
1085
|
if (!benefitType) {
|
|
1100
1086
|
return null;
|
|
@@ -1192,6 +1178,8 @@
|
|
|
1192
1178
|
|
|
1193
1179
|
const renderFootnote = (text) => text ? jsx("p", { className: "text-s-light text-secondary-text mt-7", children: text }) : null;
|
|
1194
1180
|
|
|
1181
|
+
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
1182
|
+
|
|
1195
1183
|
const getSanitizedValue = (_) => _.split(/\s+/).join('');
|
|
1196
1184
|
|
|
1197
1185
|
const DISABLED_INPUT_CLASSES = 'disabled:border-main-stroke disabled:bg-main-divider';
|
|
@@ -2018,9 +2006,9 @@
|
|
|
2018
2006
|
transparent: 'text-white',
|
|
2019
2007
|
};
|
|
2020
2008
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
|
|
2021
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(ImgInner, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(ImgInner, { image: { icon: 'LogoIcon', iconVersion: ICON_VERSION_MAP[bgColor] }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), showTitle ? renderTitle$
|
|
2009
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(ImgInner, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(ImgInner, { image: { icon: 'LogoIcon', iconVersion: ICON_VERSION_MAP[bgColor] }, className: `${SVG_COLOR[bgColor]} w-10`, width: "40", height: "45", asSVG: true })), showTitle ? renderTitle$2(children, bgColor, logo?.title) : null] }));
|
|
2022
2010
|
});
|
|
2023
|
-
const renderTitle$
|
|
2011
|
+
const renderTitle$2 = (children, bgColor, title) => {
|
|
2024
2012
|
const text = children || title || 'Россельхозбанк';
|
|
2025
2013
|
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-medium ml-2.5`, children: text });
|
|
2026
2014
|
};
|
|
@@ -2413,6 +2401,48 @@
|
|
|
2413
2401
|
return (jsx("button", { type: "button", onClick: onClick, "aria-label": title, className: `box-border px-4 py-3 text-m-light ${btnClassName}`, children: title }, String(i)));
|
|
2414
2402
|
}
|
|
2415
2403
|
|
|
2404
|
+
const investmentCellColorMap = {
|
|
2405
|
+
yellow: 'bg-yellow',
|
|
2406
|
+
green: 'bg-green',
|
|
2407
|
+
'green-light': 'bg-green-light',
|
|
2408
|
+
'green-dark': 'bg-green-dark',
|
|
2409
|
+
};
|
|
2410
|
+
const investmentCellSizeMap = {
|
|
2411
|
+
XS: 'h-[40px]',
|
|
2412
|
+
S: 'h-[68px]',
|
|
2413
|
+
M: 'h-[102px]',
|
|
2414
|
+
L: 'h-[136px]',
|
|
2415
|
+
XL: 'h-[204px]',
|
|
2416
|
+
};
|
|
2417
|
+
const InvestmentInfo = JSX((props) => {
|
|
2418
|
+
const { context, className = '', items, isDotted, investmentZeroColumn, investmentColumns, ...rest } = props;
|
|
2419
|
+
const colums = investmentColumns ? [...investmentColumns] : [];
|
|
2420
|
+
if (investmentZeroColumn) {
|
|
2421
|
+
colums.unshift(investmentZeroColumn);
|
|
2422
|
+
}
|
|
2423
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white p-9 pb-9 ${className}`, context: context, ...rest, children: jsxs("div", { className: "container text-m-light", children: [colums?.length ? (jsxs("div", { children: [jsxs("div", { className: "flex items-end px-9 text-white", children: [joinList(jsx("div", { className: "w-px h-4 bg-main-stroke" }))(colums.map(renderInvestmentColumn)), jsx("div", { className: "w-px h-4 bg-main-stroke" })] }), jsx("div", { className: "border-t border-main-stroke -mt-2 mx-9" }), jsx("div", { className: "flex justify-between mt-3 -mx-10", children: colums.map(renderInvestmentColumnTitle) })] })) : null, items?.length ? (jsx(List, { className: "mt-9 text-h6", items: items, itemClassName: "mb-[7px]", isDotted: isDotted })) : null] }) }));
|
|
2424
|
+
});
|
|
2425
|
+
const renderInvestmentColumn = (column, i, arr) => {
|
|
2426
|
+
const isSecondColumn = i === 1;
|
|
2427
|
+
const isLastColumn = i === arr.length - 1;
|
|
2428
|
+
return (jsx("div", { className: `${getColumnClasses(isSecondColumn, isLastColumn, column.cells)}`, children: column.cells?.length ? (jsx("div", { className: `w-full ${isLastColumn ? 'border-4 border-green-more-dark p-1' : ''}`, children: column.cells.map(renderInvestmentCell) })) : null }, `column_${i}`));
|
|
2429
|
+
};
|
|
2430
|
+
const getColumnClasses = (isSecondColumn, isLastColumn, cells = []) => [
|
|
2431
|
+
cells.length ? 'flex-1' : 'flex-0',
|
|
2432
|
+
cells.length && !isSecondColumn && !isLastColumn ? 'pl-2.5' : '',
|
|
2433
|
+
cells.length && !isLastColumn ? 'pr-2.5 pb-8' : 'pb-6',
|
|
2434
|
+
].join(' ');
|
|
2435
|
+
const renderInvestmentCell = (cell, i) => {
|
|
2436
|
+
const cellSize = cell.cellSize || 'XS';
|
|
2437
|
+
const cellColor = cell.cellColor || 'green';
|
|
2438
|
+
return cell.text ? (jsx("div", { className: `flex-1 flex items-center justify-center relative py-2 ${investmentCellSizeMap[cellSize]} ${investmentCellColorMap[cellColor]} ${cellSize === 'XS' ? 'px-3' : 'px-11'}`, children: jsx("div", { className: "text-center", children: cell.text }) }, `cell_${i}`)) : null;
|
|
2439
|
+
};
|
|
2440
|
+
const renderInvestmentColumnTitle = (column, i, arr) => {
|
|
2441
|
+
const isFirstColumn = i === 0;
|
|
2442
|
+
const isLastColumn = i === arr.length - 1;
|
|
2443
|
+
return (jsx("div", { className: `flex-1 max-w-[180px] text-center px-2 ${isFirstColumn ? 'pl-9' : ''} ${isLastColumn ? 'pr-9' : ' '}`, children: column.title }, `title_${i}`));
|
|
2444
|
+
};
|
|
2445
|
+
|
|
2416
2446
|
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, headingType = 'h4', ...rest }) => {
|
|
2417
2447
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
2418
2448
|
const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
|
|
@@ -2432,21 +2462,22 @@
|
|
|
2432
2462
|
});
|
|
2433
2463
|
const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-5 last:mb-0 list-none", children: [itemList.icon ? (jsx(ImgInner, { className: "mr-3 min-w-6 min-h-6 w-6 h-6", width: "24", height: "24", asSVG: true, image: itemList.icon })) : null, itemList.label ? jsx("span", { className: "text-l-light", children: itemList.label }) : null] }, `list_item_${String(i)}`));
|
|
2434
2464
|
|
|
2435
|
-
const
|
|
2436
|
-
|
|
2437
|
-
const foldableBlocks = renderBlocksList$1({
|
|
2438
|
-
context,
|
|
2439
|
-
blocks,
|
|
2440
|
-
});
|
|
2441
|
-
return (jsx("div", { className: "\u02DDborder-0 border-b border-solid border-main-divider", children: blocks?.length ? (jsx(Foldable, { blocks: foldableBlocks, hiddenBlocksNum: blocks?.length, unfoldedByDefault: isUnfolded, containerClassName: "grid grid-cols-12 gap-1 border-box", blockWrapper: (children) => jsx(Wrapper$1, { children: children }), renderFoldButton: (props) => (jsx(DefaultButton, { icon: icons[Number(props.isUnfolded)], label: label, dataTheme: dataTheme, onClick: props.onToggle })) })) : null }));
|
|
2442
|
-
});
|
|
2443
|
-
const Wrapper$1 = JSX(({ children }) => {
|
|
2444
|
-
return jsx("div", { className: "box-border", children: children });
|
|
2445
|
-
});
|
|
2465
|
+
const OtherProducts = JSX(({ context, className = '', children, ...rest }) => (jsx(BlockWrapper, { context: context, className: `font-sans text-primary-text ${className}`, ...rest, children: children ? jsx("div", { className: "box-border1", children: children }) : null })));
|
|
2466
|
+
OtherProducts.childrenTypes = ['OtherProductsItem'];
|
|
2446
2467
|
|
|
2447
|
-
const
|
|
2448
|
-
|
|
2449
|
-
|
|
2468
|
+
const DefaultFoldButton = JSX(({ className, label, icon, dataTheme = '', onClick }) => (jsxs("button", { className: `border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white flex justify-center cursor-pointer ${className || ''}`, "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
2469
|
+
icon,
|
|
2470
|
+
iconVersion: 'white',
|
|
2471
|
+
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] })));
|
|
2472
|
+
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
2473
|
+
const labels = ['Развернуть', 'Скрыть'];
|
|
2474
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
2475
|
+
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
2476
|
+
};
|
|
2477
|
+
|
|
2478
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
2479
|
+
const OtherProductsItem = JSX(({ className, label = '', colorPalette, isUnfolded: unfoldedByDefault, children }) => (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: children }) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: colorPalette, onClick: onToggle })) }) })));
|
|
2480
|
+
OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
|
|
2450
2481
|
|
|
2451
2482
|
function getTileHeadingType(className = '') {
|
|
2452
2483
|
const colSpan = getColSpan(className);
|
|
@@ -2796,13 +2827,11 @@
|
|
|
2796
2827
|
|
|
2797
2828
|
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
2798
2829
|
|
|
2799
|
-
const renderItems = (items, styleMap, isDotted = true) => items ? (jsx("div", { className: `mt-4 ${styleMap?.description}`, role: "list", children: items.map((_) => (jsxs("div", { className: "items-start mt-1 first:mt-0", role: "listitem", children: [isDotted ? (jsx("div", { className: `rounded-full inline-block mr-3 mb-1 w-1.5 h-1.5 min-w-1.5 min-h-1.5 ${styleMap?.dot}` })) : null, jsx("span", { children: _ })] }))) })) : null;
|
|
2800
|
-
|
|
2801
2830
|
const STEPS_BLOCK_STYLE_MAPS = {
|
|
2802
2831
|
primary: {
|
|
2803
2832
|
background: 'bg-white',
|
|
2804
2833
|
title: 'text-primary-text',
|
|
2805
|
-
description: 'text-secondary-text',
|
|
2834
|
+
description: '!text-secondary-text text-l-light',
|
|
2806
2835
|
iconText: 'text-secondary-text',
|
|
2807
2836
|
iconBackground: 'bg-main-divider',
|
|
2808
2837
|
iconConnector: 'bg-secondary-light',
|
|
@@ -2811,7 +2840,7 @@
|
|
|
2811
2840
|
secondary: {
|
|
2812
2841
|
background: 'bg-primary-main',
|
|
2813
2842
|
title: 'text-white',
|
|
2814
|
-
description: 'text-white/80',
|
|
2843
|
+
description: '!text-white/80 text-l-light',
|
|
2815
2844
|
iconText: 'text-white',
|
|
2816
2845
|
iconBackground: 'bg-white/30',
|
|
2817
2846
|
iconConnector: 'bg-white',
|
|
@@ -2819,6 +2848,24 @@
|
|
|
2819
2848
|
},
|
|
2820
2849
|
};
|
|
2821
2850
|
|
|
2851
|
+
const renderItems = ({ items, isDotted = true, version = 'primary', className = '', }) => {
|
|
2852
|
+
const listVersion = version === 'primary' ? 'gray' : version;
|
|
2853
|
+
return items ? (jsx(List, { className: `mt-4 ${className}`, version: listVersion, items: items, listItemSize: "S", isDotted: isDotted })) : null;
|
|
2854
|
+
};
|
|
2855
|
+
|
|
2856
|
+
const renderStepContent = ({ styleMap, isMainButton, version, router, handlerDecorator, }) => (step, i, { length }) => {
|
|
2857
|
+
const { label, description, button, items, isDotted } = step;
|
|
2858
|
+
const additionalMarginClass = `${button?.text ? 'mb-8' : ''} ${step?.label ? 'mt-2' : 'mt-4'}`;
|
|
2859
|
+
const widthContainer = length < 5 ? 'w-[276px]' : 'w-[210px]';
|
|
2860
|
+
return (jsxs("div", { className: `flex flex-col items-center text-center relative
|
|
2861
|
+
whitespace-pre-line overflow-hidden ${widthContainer}`, children: [renderStepLabel(label), renderStepDescription({
|
|
2862
|
+
description,
|
|
2863
|
+
className: `${styleMap.description} ${additionalMarginClass}`,
|
|
2864
|
+
}), renderItems({ items, isDotted, version, className: styleMap.description }), button?.text && !isMainButton ? (jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", ...useLink({ router, handlerDecorator }, button), version: version, children: button.text })) : null] }, String(i)));
|
|
2865
|
+
};
|
|
2866
|
+
const renderStepLabel = (label) => label ? jsx("div", { className: "text-x6 m-0 mt-4", children: label }) : null;
|
|
2867
|
+
const renderStepDescription = ({ description, className = '', }) => (description ? jsx("div", { className: className, children: description }) : null);
|
|
2868
|
+
|
|
2822
2869
|
const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
|
|
2823
2870
|
const getPaddingX = (steps) => (steps < 5 ? 'px-[88px]' : 'px-[55px]');
|
|
2824
2871
|
const StepsBlock = JSX(({ className = '', showLines = true, steps = [], button, version = 'primary', context, ...rest }) => {
|
|
@@ -2837,7 +2884,7 @@
|
|
|
2837
2884
|
styleMap.background,
|
|
2838
2885
|
styleMap.title,
|
|
2839
2886
|
className,
|
|
2840
|
-
].join(' '), context: context, ...rest, children: [title ? (jsx(Heading, { headingType: "
|
|
2887
|
+
].join(' '), context: context, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? (jsxs("div", { className: `box-border ${titleMargin}`, children: [jsx("div", { className: `flex items-center ${paddingX}`, children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepContent({
|
|
2841
2888
|
styleMap,
|
|
2842
2889
|
isMainButton: Boolean(button?.text),
|
|
2843
2890
|
version,
|
|
@@ -2849,12 +2896,6 @@
|
|
|
2849
2896
|
return (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center
|
|
2850
2897
|
${styleMap.iconBackground} ${styleMap.title}`, children: checkIsIconRenderable(icon) ? (jsx(ImgInner, { image: icon, width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
|
|
2851
2898
|
};
|
|
2852
|
-
const renderStepTitle = ({ styleMap, isMainButton, version, router, handlerDecorator, }) => (step, i, { length }) => {
|
|
2853
|
-
const additionalMarginClass = step?.label ? 'mt-2' : 'mt-4';
|
|
2854
|
-
const widthContainer = length < 5 ? 'w-[276px]' : 'w-[210px]';
|
|
2855
|
-
return (jsxs("div", { className: `flex flex-col items-center text-center relative
|
|
2856
|
-
whitespace-pre-line overflow-hidden ${widthContainer}`, children: [step?.label ? jsx("div", { className: "text-xl m-0 mt-4", children: step.label }) : null, step?.description ? (jsx("div", { className: `text-l-light ${styleMap.description} ${additionalMarginClass}`, children: step.description })) : null, renderItems(step?.items, styleMap, step?.isDotted), step.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", ...useLink({ router, handlerDecorator }, step.button), version: version, children: step.button.text })) : null] }, String(i)));
|
|
2857
|
-
};
|
|
2858
2899
|
|
|
2859
2900
|
function assertUnreachable(x) {
|
|
2860
2901
|
throw new Error(x);
|
|
@@ -2875,9 +2916,9 @@
|
|
|
2875
2916
|
const count = tab.ref
|
|
2876
2917
|
? page?.blocks?.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
2877
2918
|
: page?.blocks?.length;
|
|
2878
|
-
return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
|
|
2919
|
+
return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle$1(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
|
|
2879
2920
|
};
|
|
2880
|
-
const renderTitle = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
|
|
2921
|
+
const renderTitle$1 = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
|
|
2881
2922
|
const renderCount = (count, active) => (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count }));
|
|
2882
2923
|
|
|
2883
2924
|
const renderLinkTab = ({ text, currentTab, onClick, href, target = '_self', i, }) => {
|
|
@@ -3091,9 +3132,16 @@
|
|
|
3091
3132
|
activeCardIndex,
|
|
3092
3133
|
setActiveCardIndex,
|
|
3093
3134
|
});
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3135
|
+
const rows = (rowData || []).map((row, i, { length }) => (jsx(TariffsTableRow, { context: context, row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, rowIdx: i }, String(i))));
|
|
3136
|
+
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
3137
|
+
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${columnsLength > 1 ? 'pr-0' : ''} ${className}`, context: context, ...rest, children: [renderTitle({ title, description }), renderDescription(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: rows }))] }));
|
|
3096
3138
|
});
|
|
3139
|
+
function renderTitle({ title, description }) {
|
|
3140
|
+
return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
|
|
3141
|
+
}
|
|
3142
|
+
function renderDescription(description) {
|
|
3143
|
+
return description ? jsx("div", { className: "mb-9 text-center text-l", children: description }) : null;
|
|
3144
|
+
}
|
|
3097
3145
|
const Wrapper = JSX(({ children, tableArrowScrollControlProps }) => {
|
|
3098
3146
|
const { isScrollAvailable } = tableArrowScrollControlProps;
|
|
3099
3147
|
return (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [children, jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
@@ -3114,6 +3162,7 @@
|
|
|
3114
3162
|
Header,
|
|
3115
3163
|
Headline,
|
|
3116
3164
|
InsuranceAmountBlock,
|
|
3165
|
+
InvestmentInfo,
|
|
3117
3166
|
LinkDocs,
|
|
3118
3167
|
MiniGallery,
|
|
3119
3168
|
MobileAppTile,
|
|
@@ -3123,6 +3172,7 @@
|
|
|
3123
3172
|
ProductTile,
|
|
3124
3173
|
PromoTile,
|
|
3125
3174
|
OtherProducts,
|
|
3175
|
+
OtherProductsItem,
|
|
3126
3176
|
Recommendation,
|
|
3127
3177
|
StepsBlock,
|
|
3128
3178
|
TariffsTable,
|
|
@@ -3179,25 +3229,27 @@
|
|
|
3179
3229
|
});
|
|
3180
3230
|
|
|
3181
3231
|
const DEFAULT_SLOT_NAME = null;
|
|
3232
|
+
const DEFAULT_ANCESTORS = [DEFAULT_SLOT_NAME];
|
|
3182
3233
|
|
|
3183
|
-
|
|
3234
|
+
const defaultChildRenderer = (_) => _;
|
|
3235
|
+
function renderBlock(block, options, ancestors = DEFAULT_ANCESTORS) {
|
|
3184
3236
|
const { key, page, blockDecorator, blocksRegistry, context } = options;
|
|
3185
|
-
const { type } = block;
|
|
3237
|
+
const { type, blocks: childBlocks } = block;
|
|
3186
3238
|
if (!(type && type in blocksRegistry)) {
|
|
3187
3239
|
console.warn(`No block with "${type}" is registered`);
|
|
3188
3240
|
}
|
|
3189
3241
|
const BlockComponent = type && blocksRegistry[type];
|
|
3242
|
+
const { renderChild = defaultChildRenderer } = BlockComponent || {};
|
|
3243
|
+
const renderChildBlock = (_, j) => renderChild(renderBlock(_, { ...options, key: `${options.key}-${j}` }, [...ancestors, block]), j);
|
|
3244
|
+
const children = childBlocks?.length ? childBlocks.map(renderChildBlock) : null;
|
|
3190
3245
|
return blockDecorator({
|
|
3191
3246
|
blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
|
|
3192
3247
|
block,
|
|
3193
3248
|
ancestors,
|
|
3194
3249
|
// Adjusted by decorator block and blockClassName
|
|
3195
3250
|
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
3196
|
-
const { version,
|
|
3197
|
-
|
|
3198
|
-
? childBlocks.map((_, j) => renderBlock(_, { ...options, key: `${options.key}-${j}` }, [...ancestors, block]))
|
|
3199
|
-
: null;
|
|
3200
|
-
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, version: version, context: context, page: page, anchor: anchor, labels: labels, ...content, children: children }, key)) : null;
|
|
3251
|
+
const { version, anchor, labels, content } = adjustedBlock;
|
|
3252
|
+
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, context: context, page: page, version: version, anchor: anchor, labels: labels, ...content, children: children }, key)) : null;
|
|
3201
3253
|
},
|
|
3202
3254
|
}, key);
|
|
3203
3255
|
}
|