@redneckz/wildless-cms-uni-blocks 0.3.56 → 0.3.58
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 +405 -97
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/SafeIcon.svg +1 -1
- package/dist/components/BlockContent.d.ts +2 -1
- package/dist/components/Blocks.d.ts +2 -1
- package/dist/components/Blocks.js +4 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.d.ts +5 -0
- package/dist/components/Calculator/BonusCalculatorForm.js +40 -0
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -0
- package/dist/components/Calculator/Calculator.d.ts +5 -0
- package/dist/components/Calculator/Calculator.js +46 -0
- package/dist/components/Calculator/Calculator.js.map +1 -0
- package/dist/components/Calculator/CalculatorContent.d.ts +110 -0
- package/dist/components/{ProductGalleryGreen/ProductGalleryGreenContent.js → Calculator/CalculatorContent.js} +1 -1
- package/dist/components/Calculator/CalculatorContent.js.map +1 -0
- package/dist/components/Calculator/CalculatorValueBlock.d.ts +8 -0
- package/dist/components/Calculator/CalculatorValueBlock.js +9 -0
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -0
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +5 -0
- package/dist/components/Calculator/CreditCalculatorForm.js +51 -0
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -0
- package/dist/components/Calculator/DepositCalculatorForm.d.ts +5 -0
- package/dist/components/Calculator/DepositCalculatorForm.js +41 -0
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -0
- package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +11 -0
- package/dist/components/Calculator/EmbeddableCalcBlocks.js +13 -0
- package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -0
- package/dist/components/Calculator/MortgageCalculatorForm.d.ts +5 -0
- package/dist/components/Calculator/MortgageCalculatorForm.js +49 -0
- package/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -0
- package/dist/components/Calculator/constants.d.ts +7 -0
- package/dist/components/Calculator/constants.js +10 -0
- package/dist/components/Calculator/constants.js.map +1 -0
- package/dist/components/Calculator/getCalculatorParams.d.ts +7 -0
- package/dist/components/Calculator/getCalculatorParams.js +11 -0
- package/dist/components/Calculator/getCalculatorParams.js.map +1 -0
- package/dist/components/Calculator/getCreditRate.d.ts +7 -0
- package/dist/components/Calculator/getCreditRate.js +13 -0
- package/dist/components/Calculator/getCreditRate.js.map +1 -0
- package/dist/components/Calculator/getDefaultMonths.d.ts +2 -0
- package/dist/components/Calculator/getDefaultMonths.js +8 -0
- package/dist/components/Calculator/getDefaultMonths.js.map +1 -0
- package/dist/components/Calculator/getDefaultSum.d.ts +2 -0
- package/dist/components/Calculator/getDefaultSum.js +8 -0
- package/dist/components/Calculator/getDefaultSum.js.map +1 -0
- package/dist/components/Calculator/getMonthlyPayment.d.ts +11 -0
- package/dist/components/Calculator/getMonthlyPayment.js +19 -0
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -0
- package/dist/components/Calculator/renderButtonSection.d.ts +1 -0
- package/dist/components/Calculator/renderButtonSection.js +9 -0
- package/dist/components/Calculator/renderButtonSection.js.map +1 -0
- package/dist/components/Calculator/renderCalculatorList.d.ts +10 -0
- package/dist/components/Calculator/renderCalculatorList.js +17 -0
- package/dist/components/Calculator/renderCalculatorList.js.map +1 -0
- package/dist/components/Calculator/renderInitialFeeInput.d.ts +10 -0
- package/dist/components/Calculator/renderInitialFeeInput.js +18 -0
- package/dist/components/Calculator/renderInitialFeeInput.js.map +1 -0
- package/dist/components/Calculator/renderMonthsInput.d.ts +11 -0
- package/dist/components/Calculator/renderMonthsInput.js +15 -0
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -0
- package/dist/components/Calculator/renderProposal.d.ts +1 -0
- package/dist/components/Calculator/renderProposal.js +10 -0
- package/dist/components/Calculator/renderProposal.js.map +1 -0
- package/dist/components/Calculator/renderProposalMortgage.d.ts +7 -0
- package/dist/components/Calculator/renderProposalMortgage.js +9 -0
- package/dist/components/Calculator/renderProposalMortgage.js.map +1 -0
- package/dist/components/Calculator/renderRate.d.ts +8 -0
- package/dist/components/Calculator/renderRate.js +9 -0
- package/dist/components/Calculator/renderRate.js.map +1 -0
- package/dist/components/Calculator/renderRealEstateValue.d.ts +10 -0
- package/dist/components/Calculator/renderRealEstateValue.js +15 -0
- package/dist/components/Calculator/renderRealEstateValue.js.map +1 -0
- package/dist/components/Calculator/renderWantedSumInput.d.ts +13 -0
- package/dist/components/Calculator/renderWantedSumInput.js +19 -0
- package/dist/components/Calculator/renderWantedSumInput.js.map +1 -0
- package/dist/components/ContentPage/ContentPage.d.ts +1 -1
- package/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/{mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js → dist/components/GroupBlock/BlocksTypeProps.js} +1 -1
- package/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/dist/components/GroupBlock/GroupBlock.js +19 -0
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/dist/components/GroupBlock/GroupBlockContent.js +2 -0
- package/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
- package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
- package/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +37 -8
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +3 -6
- package/dist/types.d.ts +1 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +0 -1
- package/dist/ui-kit/BlocksList/renderBlocksList.js +2 -3
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +2 -2
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/dist/ui-kit/Tabs/TabsProps.d.ts +2 -1
- package/dist/utils/style2className.d.ts +1 -1
- package/dist/utils/style2className.js +3 -1
- package/dist/utils/style2className.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BlockContent.d.ts +2 -1
- package/lib/components/Blocks.d.ts +2 -1
- package/lib/components/Blocks.js +4 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.d.ts +5 -0
- package/lib/components/Calculator/BonusCalculatorForm.js +38 -0
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -0
- package/lib/components/Calculator/Calculator.d.ts +5 -0
- package/lib/components/{ProductGalleryGreen/ProductGalleryGreen.fixture.d.ts → Calculator/Calculator.fixture.d.ts} +1 -1
- package/lib/components/Calculator/Calculator.js +44 -0
- package/lib/components/Calculator/Calculator.js.map +1 -0
- package/lib/components/Calculator/CalculatorContent.d.ts +110 -0
- package/lib/components/Calculator/CalculatorContent.js +2 -0
- package/lib/components/Calculator/CalculatorContent.js.map +1 -0
- package/lib/components/Calculator/CalculatorValueBlock.d.ts +8 -0
- package/lib/components/Calculator/CalculatorValueBlock.js +7 -0
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -0
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +5 -0
- package/lib/components/Calculator/CreditCalculatorForm.js +49 -0
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -0
- package/lib/components/Calculator/DepositCalculatorForm.d.ts +5 -0
- package/lib/components/Calculator/DepositCalculatorForm.js +39 -0
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -0
- package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +11 -0
- package/lib/components/Calculator/EmbeddableCalcBlocks.js +11 -0
- package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -0
- package/lib/components/Calculator/MortgageCalculatorForm.d.ts +5 -0
- package/lib/components/Calculator/MortgageCalculatorForm.js +47 -0
- package/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -0
- package/lib/components/Calculator/constants.d.ts +7 -0
- package/lib/components/Calculator/constants.js +8 -0
- package/lib/components/Calculator/constants.js.map +1 -0
- package/lib/components/Calculator/getCalculatorParams.d.ts +7 -0
- package/lib/components/Calculator/getCalculatorParams.js +8 -0
- package/lib/components/Calculator/getCalculatorParams.js.map +1 -0
- package/lib/components/Calculator/getCreditRate.d.ts +7 -0
- package/lib/components/Calculator/getCreditRate.js +10 -0
- package/lib/components/Calculator/getCreditRate.js.map +1 -0
- package/lib/components/Calculator/getDefaultMonths.d.ts +2 -0
- package/lib/components/Calculator/getDefaultMonths.js +5 -0
- package/lib/components/Calculator/getDefaultMonths.js.map +1 -0
- package/lib/components/Calculator/getDefaultSum.d.ts +2 -0
- package/lib/components/Calculator/getDefaultSum.js +5 -0
- package/lib/components/Calculator/getDefaultSum.js.map +1 -0
- package/lib/components/Calculator/getMonthlyPayment.d.ts +11 -0
- package/lib/components/Calculator/getMonthlyPayment.js +16 -0
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -0
- package/lib/components/Calculator/renderButtonSection.d.ts +1 -0
- package/lib/components/Calculator/renderButtonSection.js +6 -0
- package/lib/components/Calculator/renderButtonSection.js.map +1 -0
- package/lib/components/Calculator/renderCalculatorList.d.ts +10 -0
- package/lib/components/Calculator/renderCalculatorList.js +14 -0
- package/lib/components/Calculator/renderCalculatorList.js.map +1 -0
- package/lib/components/Calculator/renderInitialFeeInput.d.ts +10 -0
- package/lib/components/Calculator/renderInitialFeeInput.js +15 -0
- package/lib/components/Calculator/renderInitialFeeInput.js.map +1 -0
- package/lib/components/Calculator/renderMonthsInput.d.ts +11 -0
- package/lib/components/Calculator/renderMonthsInput.js +12 -0
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -0
- package/lib/components/Calculator/renderProposal.d.ts +1 -0
- package/lib/components/Calculator/renderProposal.js +7 -0
- package/lib/components/Calculator/renderProposal.js.map +1 -0
- package/lib/components/Calculator/renderProposalMortgage.d.ts +7 -0
- package/lib/components/Calculator/renderProposalMortgage.js +6 -0
- package/lib/components/Calculator/renderProposalMortgage.js.map +1 -0
- package/lib/components/Calculator/renderRate.d.ts +8 -0
- package/lib/components/Calculator/renderRate.js +6 -0
- package/lib/components/Calculator/renderRate.js.map +1 -0
- package/lib/components/Calculator/renderRealEstateValue.d.ts +10 -0
- package/lib/components/Calculator/renderRealEstateValue.js +12 -0
- package/lib/components/Calculator/renderRealEstateValue.js.map +1 -0
- package/lib/components/Calculator/renderWantedSumInput.d.ts +13 -0
- package/lib/components/Calculator/renderWantedSumInput.js +16 -0
- package/lib/components/Calculator/renderWantedSumInput.js.map +1 -0
- package/lib/components/ContentPage/ContentPage.d.ts +1 -1
- package/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +4 -0
- package/lib/components/GroupBlock/GroupBlock.js +17 -0
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/lib/components/GroupBlock/GroupBlockContent.js +2 -0
- package/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
- package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
- package/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.fixture.d.ts +1 -0
- package/lib/components/ProductGallery/ProductGallery.js +37 -8
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +3 -6
- package/lib/types.d.ts +1 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +0 -1
- package/lib/ui-kit/BlocksList/renderBlocksList.js +1 -1
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +2 -2
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/lib/ui-kit/Tabs/TabsProps.d.ts +2 -1
- package/lib/utils/style2className.d.ts +1 -1
- package/lib/utils/style2className.js +3 -1
- package/lib/utils/style2className.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +3 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BlockContent.d.ts +2 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.d.ts +5 -0
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +40 -0
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -0
- package/mobile/dist/components/Calculator/Calculator.d.ts +5 -0
- package/mobile/dist/components/Calculator/Calculator.js +46 -0
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -0
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +110 -0
- package/mobile/dist/components/Calculator/CalculatorContent.js +2 -0
- package/mobile/dist/components/Calculator/CalculatorContent.js.map +1 -0
- package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +8 -0
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +9 -0
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -0
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +5 -0
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +51 -0
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -0
- package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +5 -0
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +41 -0
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -0
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +11 -0
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +13 -0
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -0
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.d.ts +5 -0
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +49 -0
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -0
- package/mobile/dist/components/Calculator/constants.d.ts +7 -0
- package/mobile/dist/components/Calculator/constants.js +10 -0
- package/mobile/dist/components/Calculator/constants.js.map +1 -0
- package/mobile/dist/components/Calculator/getCalculatorParams.d.ts +7 -0
- package/mobile/dist/components/Calculator/getCalculatorParams.js +11 -0
- package/mobile/dist/components/Calculator/getCalculatorParams.js.map +1 -0
- package/mobile/dist/components/Calculator/getCreditRate.d.ts +7 -0
- package/mobile/dist/components/Calculator/getCreditRate.js +13 -0
- package/mobile/dist/components/Calculator/getCreditRate.js.map +1 -0
- package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +2 -0
- package/mobile/dist/components/Calculator/getDefaultMonths.js +8 -0
- package/mobile/dist/components/Calculator/getDefaultMonths.js.map +1 -0
- package/mobile/dist/components/Calculator/getDefaultSum.d.ts +2 -0
- package/mobile/dist/components/Calculator/getDefaultSum.js +8 -0
- package/mobile/dist/components/Calculator/getDefaultSum.js.map +1 -0
- package/mobile/dist/components/Calculator/getMonthlyPayment.d.ts +11 -0
- package/mobile/dist/components/Calculator/getMonthlyPayment.js +19 -0
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -0
- package/mobile/dist/components/Calculator/renderButtonSection.d.ts +1 -0
- package/mobile/dist/components/Calculator/renderButtonSection.js +9 -0
- package/mobile/dist/components/Calculator/renderButtonSection.js.map +1 -0
- package/mobile/dist/components/Calculator/renderCalculatorList.d.ts +10 -0
- package/mobile/dist/components/Calculator/renderCalculatorList.js +17 -0
- package/mobile/dist/components/Calculator/renderCalculatorList.js.map +1 -0
- package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +10 -0
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js +18 -0
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +1 -0
- package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +11 -0
- package/mobile/dist/components/Calculator/renderMonthsInput.js +15 -0
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -0
- package/mobile/dist/components/Calculator/renderProposal.d.ts +1 -0
- package/mobile/dist/components/Calculator/renderProposal.js +10 -0
- package/mobile/dist/components/Calculator/renderProposal.js.map +1 -0
- package/mobile/dist/components/Calculator/renderProposalMortgage.d.ts +7 -0
- package/mobile/dist/components/Calculator/renderProposalMortgage.js +9 -0
- package/mobile/dist/components/Calculator/renderProposalMortgage.js.map +1 -0
- package/mobile/dist/components/Calculator/renderRate.d.ts +8 -0
- package/mobile/dist/components/Calculator/renderRate.js +9 -0
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -0
- package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +10 -0
- package/mobile/dist/components/Calculator/renderRealEstateValue.js +15 -0
- package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +1 -0
- package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +13 -0
- package/mobile/dist/components/Calculator/renderWantedSumInput.js +19 -0
- package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +1 -0
- package/mobile/dist/components/ContentPage/ContentPage.d.ts +1 -1
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.js +19 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js +2 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +3 -6
- package/mobile/dist/types.d.ts +1 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +0 -1
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +2 -3
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js +2 -2
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/mobile/dist/ui-kit/Tabs/TabsProps.d.ts +2 -1
- package/mobile/dist/utils/style2className.d.ts +1 -1
- package/mobile/dist/utils/style2className.js +3 -1
- package/mobile/dist/utils/style2className.js.map +1 -1
- package/mobile/lib/components/BlockContent.d.ts +2 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.d.ts +5 -0
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +38 -0
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -0
- package/mobile/lib/components/Calculator/Calculator.d.ts +5 -0
- package/mobile/lib/components/Calculator/Calculator.js +44 -0
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -0
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +110 -0
- package/mobile/lib/components/Calculator/CalculatorContent.js +2 -0
- package/mobile/lib/components/Calculator/CalculatorContent.js.map +1 -0
- package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +8 -0
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +7 -0
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -0
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +5 -0
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +49 -0
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -0
- package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +5 -0
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +39 -0
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -0
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +11 -0
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +11 -0
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -0
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.d.ts +5 -0
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +47 -0
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -0
- package/mobile/lib/components/Calculator/constants.d.ts +7 -0
- package/mobile/lib/components/Calculator/constants.js +8 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -0
- package/mobile/lib/components/Calculator/getCalculatorParams.d.ts +7 -0
- package/mobile/lib/components/Calculator/getCalculatorParams.js +8 -0
- package/mobile/lib/components/Calculator/getCalculatorParams.js.map +1 -0
- package/mobile/lib/components/Calculator/getCreditRate.d.ts +7 -0
- package/mobile/lib/components/Calculator/getCreditRate.js +10 -0
- package/mobile/lib/components/Calculator/getCreditRate.js.map +1 -0
- package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +2 -0
- package/mobile/lib/components/Calculator/getDefaultMonths.js +5 -0
- package/mobile/lib/components/Calculator/getDefaultMonths.js.map +1 -0
- package/mobile/lib/components/Calculator/getDefaultSum.d.ts +2 -0
- package/mobile/lib/components/Calculator/getDefaultSum.js +5 -0
- package/mobile/lib/components/Calculator/getDefaultSum.js.map +1 -0
- package/mobile/lib/components/Calculator/getMonthlyPayment.d.ts +11 -0
- package/mobile/lib/components/Calculator/getMonthlyPayment.js +16 -0
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -0
- package/mobile/lib/components/Calculator/renderButtonSection.d.ts +1 -0
- package/mobile/lib/components/Calculator/renderButtonSection.js +6 -0
- package/mobile/lib/components/Calculator/renderButtonSection.js.map +1 -0
- package/mobile/lib/components/Calculator/renderCalculatorList.d.ts +10 -0
- package/mobile/lib/components/Calculator/renderCalculatorList.js +14 -0
- package/mobile/lib/components/Calculator/renderCalculatorList.js.map +1 -0
- package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +10 -0
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js +15 -0
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +1 -0
- package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +11 -0
- package/mobile/lib/components/Calculator/renderMonthsInput.js +12 -0
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -0
- package/mobile/lib/components/Calculator/renderProposal.d.ts +1 -0
- package/mobile/lib/components/Calculator/renderProposal.js +7 -0
- package/mobile/lib/components/Calculator/renderProposal.js.map +1 -0
- package/mobile/lib/components/Calculator/renderProposalMortgage.d.ts +7 -0
- package/mobile/lib/components/Calculator/renderProposalMortgage.js +6 -0
- package/mobile/lib/components/Calculator/renderProposalMortgage.js.map +1 -0
- package/mobile/lib/components/Calculator/renderRate.d.ts +8 -0
- package/mobile/lib/components/Calculator/renderRate.js +6 -0
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -0
- package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +10 -0
- package/mobile/lib/components/Calculator/renderRealEstateValue.js +12 -0
- package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +1 -0
- package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +13 -0
- package/mobile/lib/components/Calculator/renderWantedSumInput.js +16 -0
- package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +1 -0
- package/mobile/lib/components/ContentPage/ContentPage.d.ts +1 -1
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.js +17 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js +2 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +3 -6
- package/mobile/lib/types.d.ts +1 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +0 -1
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +1 -1
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js +2 -2
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +2 -1
- package/mobile/lib/ui-kit/Tabs/TabsProps.d.ts +2 -1
- package/mobile/lib/utils/style2className.d.ts +1 -1
- package/mobile/lib/utils/style2className.js +3 -1
- package/mobile/lib/utils/style2className.js.map +1 -1
- package/mobile/src/common.css +7 -0
- package/mobile/src/components/BlockContent.ts +3 -1
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +71 -0
- package/mobile/src/components/Calculator/Calculator.tsx +141 -0
- package/mobile/src/components/Calculator/CalculatorContent.ts +134 -0
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +25 -0
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +99 -0
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +69 -0
- package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +17 -0
- package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +88 -0
- package/mobile/src/components/Calculator/constants.ts +8 -0
- package/mobile/src/components/Calculator/getCalculatorParams.ts +16 -0
- package/mobile/src/components/Calculator/getCreditRate.ts +18 -0
- package/mobile/src/components/Calculator/getDefaultMonths.ts +7 -0
- package/mobile/src/components/Calculator/getDefaultSum.ts +7 -0
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +32 -0
- package/mobile/src/components/Calculator/renderButtonSection.tsx +7 -0
- package/mobile/src/components/Calculator/renderCalculatorList.tsx +43 -0
- package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +37 -0
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +34 -0
- package/mobile/src/components/Calculator/renderProposal.tsx +14 -0
- package/mobile/src/components/Calculator/renderProposalMortgage.tsx +17 -0
- package/mobile/src/components/Calculator/renderRate.tsx +23 -0
- package/mobile/src/components/Calculator/renderRealEstateValue.tsx +33 -0
- package/mobile/src/components/Calculator/renderWantedSumInput.tsx +49 -0
- package/mobile/src/components/ContentPage/ContentPage.page.json +9 -8
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
- package/mobile/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
- package/mobile/src/components/GroupBlock/GroupBlock.example.json +27 -0
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +43 -0
- package/mobile/src/components/GroupBlock/GroupBlockContent.ts +23 -0
- package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
- package/mobile/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +4 -2
- package/mobile/src/components/ProductGallery/ProductGallery.example.json +8 -10
- package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +3 -6
- package/mobile/src/icons/SafeIcon.svg +7 -1
- package/mobile/src/types.ts +2 -0
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +1 -1
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +1 -3
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +7 -9
- package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +3 -1
- package/mobile/src/ui-kit/Tabs/TabsProps.ts +2 -1
- package/mobile/src/utils/style2className.ts +3 -2
- package/package.json +1 -1
- package/src/common.css +7 -0
- package/src/components/BlockContent.ts +3 -1
- package/src/components/Blocks.ts +4 -2
- package/src/components/Calculator/BonusCalculatorForm.tsx +71 -0
- package/src/components/Calculator/Calculator.fixture.tsx +131 -0
- package/src/components/Calculator/Calculator.tsx +141 -0
- package/src/components/Calculator/CalculatorContent.ts +134 -0
- package/src/components/Calculator/CalculatorValueBlock.tsx +25 -0
- package/src/components/Calculator/CreditCalculatorForm.tsx +99 -0
- package/src/components/Calculator/DepositCalculatorForm.tsx +69 -0
- package/src/components/Calculator/EmbeddableCalcBlocks.tsx +17 -0
- package/src/components/Calculator/MortgageCalculatorForm.tsx +88 -0
- package/src/components/Calculator/constants.ts +8 -0
- package/src/components/Calculator/getCalculatorParams.ts +16 -0
- package/src/components/Calculator/getCreditRate.ts +18 -0
- package/src/components/Calculator/getDefaultMonths.ts +7 -0
- package/src/components/Calculator/getDefaultSum.ts +7 -0
- package/src/components/Calculator/getMonthlyPayment.ts +32 -0
- package/src/components/Calculator/renderButtonSection.tsx +7 -0
- package/src/components/Calculator/renderCalculatorList.tsx +43 -0
- package/src/components/Calculator/renderInitialFeeInput.tsx +37 -0
- package/src/components/Calculator/renderMonthsInput.tsx +34 -0
- package/src/components/Calculator/renderProposal.tsx +14 -0
- package/src/components/Calculator/renderProposalMortgage.tsx +17 -0
- package/src/components/Calculator/renderRate.tsx +23 -0
- package/src/components/Calculator/renderRealEstateValue.tsx +33 -0
- package/src/components/Calculator/renderWantedSumInput.tsx +49 -0
- package/src/components/ContentPage/ContentPage.page.json +9 -8
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
- package/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
- package/src/components/GroupBlock/GroupBlock.example.json +27 -0
- package/src/components/GroupBlock/GroupBlock.fixture.tsx +51 -0
- package/src/components/GroupBlock/GroupBlock.tsx +43 -0
- package/src/components/GroupBlock/GroupBlockContent.ts +23 -0
- package/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
- package/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
- package/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
- package/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
- package/src/components/OtherProducts/OtherProductsContent.ts +4 -2
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +1 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.example.json +8 -10
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +146 -104
- package/src/components/ProductGallery/ProductGallery.tsx +73 -24
- package/src/components/ProductGallery/ProductGalleryContent.ts +3 -6
- package/src/icons/SafeIcon.svg +7 -1
- package/src/types.ts +2 -0
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +1 -1
- package/src/ui-kit/Checkbox/Checkbox.tsx +1 -3
- package/src/ui-kit/InputRange/InputRange.tsx +7 -9
- package/src/ui-kit/InputRange/InputRangeProps.ts +3 -1
- package/src/ui-kit/Tabs/TabsProps.ts +2 -1
- package/src/utils/style2className.ts +3 -2
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +0 -5
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +0 -55
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +0 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +0 -32
- package/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +0 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +0 -5
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +0 -53
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +0 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +0 -32
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js +0 -2
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +0 -1
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +0 -5
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +0 -55
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +0 -1
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +0 -32
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +0 -1
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.d.ts +0 -5
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +0 -53
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +0 -1
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +0 -32
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js +0 -2
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.js.map +0 -1
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.example.json +0 -23
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +0 -126
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreenContent.ts +0 -34
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.example.json +0 -23
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.fixture.tsx +0 -186
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +0 -126
- package/src/components/ProductGalleryGreen/ProductGalleryGreenContent.ts +0 -34
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCreditCalculatorData } from '../../hooks/useCreditCalculatorData';
|
|
3
|
+
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
|
+
import { DEFAULT_MAX_MONTHS, DEFAULT_MIN_MONTHS } from './constants';
|
|
6
|
+
import { renderRealEstateValue } from './renderRealEstateValue';
|
|
7
|
+
import { renderInitialFeeInput } from './renderInitialFeeInput';
|
|
8
|
+
import { getCreditRate } from './getCreditRate';
|
|
9
|
+
import { getCalculatorParams } from './getCalculatorParams';
|
|
10
|
+
import { getDefaultSum } from './getDefaultSum';
|
|
11
|
+
import { getDefaultMonths } from './getDefaultMonths';
|
|
12
|
+
import { renderMonthsInput } from './renderMonthsInput';
|
|
13
|
+
import { renderButtonSection } from './renderButtonSection';
|
|
14
|
+
import { renderProposalMortgage } from './renderProposalMortgage';
|
|
15
|
+
import { renderRate } from './renderRate';
|
|
16
|
+
import { CommonCalculatorProps, MortgageCalculatorParams } from './CalculatorContent';
|
|
17
|
+
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
18
|
+
|
|
19
|
+
export interface MortgageCalculatorProp
|
|
20
|
+
extends MortgageCalculatorParams,
|
|
21
|
+
CommonCalculatorProps,
|
|
22
|
+
UniBlockProps {}
|
|
23
|
+
|
|
24
|
+
export const MortgageCalculatorForm = JSX<MortgageCalculatorProp>(
|
|
25
|
+
({ context, className = '', buttons }) => {
|
|
26
|
+
const [moneyValue, setMoneyValue] = context.useState<number | undefined>(undefined);
|
|
27
|
+
const [monthsValue, setMonthsValue] = context.useState<number | undefined>(undefined);
|
|
28
|
+
const [isInsurance, toggleIsInsurance] = context.useState(false);
|
|
29
|
+
const [isFullInsurance, toggleIsFullInsurance] = context.useState(false);
|
|
30
|
+
|
|
31
|
+
const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
|
|
32
|
+
const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isInsurance });
|
|
33
|
+
|
|
34
|
+
const defaultSum = getDefaultSum(calculatorParams);
|
|
35
|
+
const defaultMonths = getDefaultMonths(calculatorParams);
|
|
36
|
+
|
|
37
|
+
const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
|
|
38
|
+
const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
|
|
39
|
+
|
|
40
|
+
const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
|
|
41
|
+
|
|
42
|
+
const monthlyPayment = 777777; // TODO: hardcode
|
|
43
|
+
const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<section className={className}>
|
|
47
|
+
<div className="w-[468px]">
|
|
48
|
+
{renderRealEstateValue({ calculatorParams, moneyValue, defaultSum, setMoneyValue })}
|
|
49
|
+
{renderInitialFeeInput({
|
|
50
|
+
calculatorParams,
|
|
51
|
+
moneyValue,
|
|
52
|
+
defaultSum,
|
|
53
|
+
setMoneyValue,
|
|
54
|
+
})}
|
|
55
|
+
{renderMonthsInput({
|
|
56
|
+
title: 'Срок ипотеки, месяцев',
|
|
57
|
+
minMonths,
|
|
58
|
+
maxMonths,
|
|
59
|
+
monthsValue,
|
|
60
|
+
defaultMonths,
|
|
61
|
+
setMonthsValue,
|
|
62
|
+
})}
|
|
63
|
+
<div className="mt-7">
|
|
64
|
+
<Checkbox text="Страхование жизни" checked={isInsurance} onChange={toggleIsInsurance} />
|
|
65
|
+
<Checkbox
|
|
66
|
+
className="mt-4"
|
|
67
|
+
text="Страхование жизни, злоровья и временной утраты трудоспособности"
|
|
68
|
+
checked={isFullInsurance}
|
|
69
|
+
onChange={toggleIsFullInsurance}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div>
|
|
74
|
+
<div>
|
|
75
|
+
{rate
|
|
76
|
+
? renderRate({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
77
|
+
: null}
|
|
78
|
+
</div>
|
|
79
|
+
<CalculatorValueBlock title="Ежемесячный платеж" value={monthlyPayment} postfix="₽" />
|
|
80
|
+
</div>
|
|
81
|
+
<div>
|
|
82
|
+
<div className="w-[351px]">{renderProposalMortgage(proposalMortgageValue)}</div>
|
|
83
|
+
{renderButtonSection(context, buttons)}
|
|
84
|
+
</div>
|
|
85
|
+
</section>
|
|
86
|
+
);
|
|
87
|
+
},
|
|
88
|
+
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const DEFAULT_MIN_SUM = 30000;
|
|
2
|
+
export const DEFAULT_MAX_SUM = 3000000;
|
|
3
|
+
export const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
|
|
4
|
+
export const DEFAULT_MIN_MONTHS = 1;
|
|
5
|
+
export const DEFAULT_MAX_MONTHS = 84;
|
|
6
|
+
export const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
|
|
7
|
+
|
|
8
|
+
export const MONTHS_IN_YEAR = 12;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
2
|
+
|
|
3
|
+
interface GetCalculatorParamsParams {
|
|
4
|
+
tableRows?: CalculatorParams[];
|
|
5
|
+
isAnnuity?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const getCalculatorParams = (params: GetCalculatorParamsParams) => {
|
|
9
|
+
const { tableRows, isAnnuity = false } = params;
|
|
10
|
+
|
|
11
|
+
if (!tableRows) return {};
|
|
12
|
+
|
|
13
|
+
const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
|
|
14
|
+
|
|
15
|
+
return calculatorParams || {};
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_RATE = 10.2;
|
|
4
|
+
|
|
5
|
+
interface GetCreditRateParams {
|
|
6
|
+
calculatorParams?: CalculatorParams;
|
|
7
|
+
isInsurance: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getCreditRate = (params: GetCreditRateParams) => {
|
|
11
|
+
const { calculatorParams, isInsurance } = params;
|
|
12
|
+
|
|
13
|
+
if (!calculatorParams) return DEFAULT_RATE;
|
|
14
|
+
|
|
15
|
+
return isInsurance
|
|
16
|
+
? calculatorParams?.rateWithInsurance || DEFAULT_RATE
|
|
17
|
+
: calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DEFAULT_MONTHS } from './constants';
|
|
2
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
3
|
+
|
|
4
|
+
export const getDefaultMonths = (calculatorParams: CalculatorParams) =>
|
|
5
|
+
calculatorParams.maxMonths && calculatorParams.minMonths
|
|
6
|
+
? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
|
|
7
|
+
: DEFAULT_MONTHS;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DEFAULT_SUM } from './constants';
|
|
2
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
3
|
+
|
|
4
|
+
export const getDefaultSum = (calculatorParams: CalculatorParams) =>
|
|
5
|
+
calculatorParams.maxSum && calculatorParams.minSum
|
|
6
|
+
? (calculatorParams.maxSum - calculatorParams.minSum) / 2
|
|
7
|
+
: DEFAULT_SUM;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { clamp } from '../../utils/clamp';
|
|
2
|
+
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM, MONTHS_IN_YEAR } from './constants';
|
|
3
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
4
|
+
|
|
5
|
+
type PaymentType = 'annuity' | 'differentiated';
|
|
6
|
+
|
|
7
|
+
interface GetMonthlyPaymentParams {
|
|
8
|
+
calculatorParams?: CalculatorParams;
|
|
9
|
+
paymentType: PaymentType;
|
|
10
|
+
rate: number;
|
|
11
|
+
sum: number;
|
|
12
|
+
months: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getMonthlyPayment = (params: GetMonthlyPaymentParams) => {
|
|
16
|
+
const { calculatorParams, paymentType, rate, sum, months } = params;
|
|
17
|
+
|
|
18
|
+
if (!calculatorParams) return 0;
|
|
19
|
+
|
|
20
|
+
const finalSum = clamp(
|
|
21
|
+
sum,
|
|
22
|
+
calculatorParams.minSum || DEFAULT_MIN_SUM,
|
|
23
|
+
calculatorParams.maxSum || DEFAULT_MAX_SUM,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
if (paymentType === 'annuity') {
|
|
27
|
+
const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
|
|
28
|
+
return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
|
|
29
|
+
} else {
|
|
30
|
+
return finalSum / months + finalSum * (Number(rate) / 12);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { JSXBlock } from '../../components/ContentPage/ContentPage';
|
|
2
|
+
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
|
+
import type { CalculatorBlockDef } from './CalculatorContent';
|
|
4
|
+
import { EmbeddableCalcBlocks, EmbeddableCalcProps } from './EmbeddableCalcBlocks';
|
|
5
|
+
|
|
6
|
+
type EmbeddableCalcBlocks = {
|
|
7
|
+
blockCalcTabs?: CalculatorBlockDef[];
|
|
8
|
+
context: ContentPageContext;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const renderCalculatorList = ({
|
|
13
|
+
blockCalcTabs,
|
|
14
|
+
context,
|
|
15
|
+
className,
|
|
16
|
+
}: EmbeddableCalcBlocks) => {
|
|
17
|
+
return blockCalcTabs?.length ? blockCalcTabs.map(renderBlock({ context, className })) : null;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const renderBlock =
|
|
21
|
+
({ context, className }: any) =>
|
|
22
|
+
(blockCalcTabs: CalculatorBlockDef, i: number) => {
|
|
23
|
+
const type = blockCalcTabs?.calcType;
|
|
24
|
+
if (!type || !(type in EmbeddableCalcBlocks)) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const EmbeddedBlock: JSXBlock<EmbeddableCalcProps> = EmbeddableCalcBlocks[type];
|
|
28
|
+
return (
|
|
29
|
+
<section
|
|
30
|
+
key={`${String(i)}`}
|
|
31
|
+
className={`box-border relative flex grow-0 shrink-0 basis-full ${className}`}
|
|
32
|
+
role="listitem"
|
|
33
|
+
>
|
|
34
|
+
<div className={`box-border p-9 w-full`}>
|
|
35
|
+
<EmbeddedBlock
|
|
36
|
+
context={context}
|
|
37
|
+
{...blockCalcTabs}
|
|
38
|
+
className="!p-0 flex justify-between"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</section>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
4
|
+
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
|
|
5
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
6
|
+
|
|
7
|
+
const STEP_MONEY = 1000;
|
|
8
|
+
|
|
9
|
+
interface RenderWantedSumInputProps {
|
|
10
|
+
calculatorParams: CalculatorParams;
|
|
11
|
+
moneyValue: number | undefined;
|
|
12
|
+
defaultSum: number;
|
|
13
|
+
setMoneyValue: InputRangeProps['onChange'];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function renderInitialFeeInput(props: RenderWantedSumInputProps) {
|
|
17
|
+
const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
|
|
18
|
+
|
|
19
|
+
const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
|
|
20
|
+
const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<InputRange
|
|
24
|
+
className="mt-6"
|
|
25
|
+
title="Первоначальный взнос, ₽ "
|
|
26
|
+
items={[
|
|
27
|
+
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
28
|
+
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
29
|
+
]}
|
|
30
|
+
min={minSum}
|
|
31
|
+
max={maxSum}
|
|
32
|
+
step={STEP_MONEY}
|
|
33
|
+
value={moneyValue || defaultSum}
|
|
34
|
+
onChange={setMoneyValue}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
+
|
|
4
|
+
const STEP_MONTHS = 1;
|
|
5
|
+
|
|
6
|
+
interface RenderMonthsInputProps {
|
|
7
|
+
title: string;
|
|
8
|
+
minMonths: number;
|
|
9
|
+
maxMonths: number;
|
|
10
|
+
monthsValue: number | undefined;
|
|
11
|
+
defaultMonths: number;
|
|
12
|
+
setMonthsValue: InputRangeProps['onChange'];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function renderMonthsInput(props: RenderMonthsInputProps) {
|
|
16
|
+
const { title, minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
|
|
17
|
+
const monthText = (month) => {
|
|
18
|
+
const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
|
|
19
|
+
return `${month} ${text}`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<InputRange
|
|
24
|
+
className="mt-6"
|
|
25
|
+
title={title}
|
|
26
|
+
items={[`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`]}
|
|
27
|
+
min={minMonths}
|
|
28
|
+
max={maxMonths}
|
|
29
|
+
step={STEP_MONTHS}
|
|
30
|
+
value={monthsValue || defaultMonths}
|
|
31
|
+
onChange={setMonthsValue}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
2
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
3
|
+
|
|
4
|
+
export function renderProposal(monthlyPayment: number) {
|
|
5
|
+
return (
|
|
6
|
+
<div className="box-border ">
|
|
7
|
+
<div className="text-base font-light">Ежемесячный платёж</div>
|
|
8
|
+
<div className="text-title mb-3 font-normal">
|
|
9
|
+
{addSpacesBetweenNumbers(Math.round(monthlyPayment))} ₽
|
|
10
|
+
</div>
|
|
11
|
+
<Button className="mt-[50px] w-full" text="Отправить заявку" version="primary" href="#" />
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
2
|
+
|
|
3
|
+
type porposalMortgage = {
|
|
4
|
+
credit: number;
|
|
5
|
+
period: number;
|
|
6
|
+
taxRefund: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export function renderProposalMortgage({ credit, period, taxRefund }: porposalMortgage) {
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
{<CalculatorValueBlock title="Сумма кредита" value={credit} postfix="₽" />}
|
|
13
|
+
{<CalculatorValueBlock title="Срок" value={period} postfix="лет" />}
|
|
14
|
+
{<CalculatorValueBlock title="Налоговый вычет" value={taxRefund} postfix="₽" />}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type rateType = {
|
|
2
|
+
rate: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
sup?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export function renderRate({ rate, title, sup, className = '' }: rateType) {
|
|
9
|
+
const rateFormat = String(rate).replace('.', ',');
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
<div className="text-sm font-light ml-3">{title}</div>
|
|
13
|
+
<div className="flex justify-start">
|
|
14
|
+
<span
|
|
15
|
+
className={`calc-rate-text font-mohave text-[200px] leading-[250px] pr-4 mt-[-16px] ${className}`}
|
|
16
|
+
>
|
|
17
|
+
{rateFormat}
|
|
18
|
+
</span>
|
|
19
|
+
{sup ? <span className="calc-rate-text text-[65px] leading-[75px]">{sup}</span> : ''}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
4
|
+
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
|
|
5
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
6
|
+
|
|
7
|
+
const STEP_MONEY = 1000;
|
|
8
|
+
|
|
9
|
+
interface RenderRealEstateValueInputProps {
|
|
10
|
+
calculatorParams: CalculatorParams;
|
|
11
|
+
moneyValue: number | undefined;
|
|
12
|
+
defaultSum: number;
|
|
13
|
+
setMoneyValue: InputRangeProps['onChange'];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function renderRealEstateValue(props: RenderRealEstateValueInputProps) {
|
|
17
|
+
const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
|
|
18
|
+
|
|
19
|
+
const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
|
|
20
|
+
const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<InputRange
|
|
24
|
+
title="Стоимость недвижимости, ₽ "
|
|
25
|
+
items={[`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`]}
|
|
26
|
+
min={minSum}
|
|
27
|
+
max={maxSum}
|
|
28
|
+
step={STEP_MONEY}
|
|
29
|
+
value={moneyValue || defaultSum}
|
|
30
|
+
onChange={setMoneyValue}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
4
|
+
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
|
|
5
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
6
|
+
|
|
7
|
+
const STEP_MONEY = 1000;
|
|
8
|
+
|
|
9
|
+
interface RenderWantedSumInputProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
title: string;
|
|
12
|
+
isShowItems?: boolean;
|
|
13
|
+
calculatorParams: CalculatorParams;
|
|
14
|
+
moneyValue: number | undefined;
|
|
15
|
+
defaultSum: number;
|
|
16
|
+
setMoneyValue: InputRangeProps['onChange'];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function renderWantedSumInput(props: RenderWantedSumInputProps) {
|
|
20
|
+
const {
|
|
21
|
+
title,
|
|
22
|
+
className = '',
|
|
23
|
+
calculatorParams,
|
|
24
|
+
moneyValue,
|
|
25
|
+
defaultSum,
|
|
26
|
+
setMoneyValue,
|
|
27
|
+
isShowItems = true,
|
|
28
|
+
} = props;
|
|
29
|
+
|
|
30
|
+
const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
|
|
31
|
+
const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
|
|
32
|
+
const items = [
|
|
33
|
+
`От ${addSpacesBetweenNumbers(minSum)} ₽`,
|
|
34
|
+
`До ${addSpacesBetweenNumbers(maxSum)} ₽`,
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<InputRange
|
|
39
|
+
className={className}
|
|
40
|
+
title={title}
|
|
41
|
+
items={isShowItems ? items : []}
|
|
42
|
+
min={minSum}
|
|
43
|
+
max={maxSum}
|
|
44
|
+
step={STEP_MONEY}
|
|
45
|
+
value={moneyValue || defaultSum}
|
|
46
|
+
onChange={setMoneyValue}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -61,11 +61,12 @@
|
|
|
61
61
|
"type": "ProductGallery",
|
|
62
62
|
"style": ["col-span-12"],
|
|
63
63
|
"content": {
|
|
64
|
+
"version": "secondary",
|
|
64
65
|
"slides": [
|
|
65
66
|
{
|
|
66
67
|
"nav": {
|
|
67
68
|
"title": "Деньги на любые цели",
|
|
68
|
-
"
|
|
69
|
+
"description": "Ставка от 12,5% годовых на срок до 5 лет"
|
|
69
70
|
},
|
|
70
71
|
"productBlock": {
|
|
71
72
|
"title": "Ставка от 12,5% годовых на срок до 5 лет!»",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"href": "https://rshb.ru",
|
|
80
81
|
"text": "Подробнее",
|
|
81
82
|
"target": "_blank",
|
|
82
|
-
"version": "
|
|
83
|
+
"version": "secondary"
|
|
83
84
|
}
|
|
84
85
|
],
|
|
85
86
|
"image": {
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
{
|
|
104
105
|
"nav": {
|
|
105
106
|
"title": "Для людей в возрасте",
|
|
106
|
-
"
|
|
107
|
+
"description": "Ставка от 12,5% годовых на срок до 3 лет"
|
|
107
108
|
},
|
|
108
109
|
"productBlock": {
|
|
109
110
|
"title": "Ставка от 12,5% годовых на срок до 3 лет!»",
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
"href": "https://rshb.ru",
|
|
118
119
|
"text": "Подробнее",
|
|
119
120
|
"target": "_blank",
|
|
120
|
-
"version": "
|
|
121
|
+
"version": "secondary"
|
|
121
122
|
}
|
|
122
123
|
],
|
|
123
124
|
"image": {
|
|
@@ -141,7 +142,7 @@
|
|
|
141
142
|
{
|
|
142
143
|
"nav": {
|
|
143
144
|
"title": "Выгодно покупать",
|
|
144
|
-
"
|
|
145
|
+
"description": "Дополнительные бонусные баллы за покупки"
|
|
145
146
|
},
|
|
146
147
|
"productBlock": {
|
|
147
148
|
"title": "Дополнительные бонусные баллы за покупки!»",
|
|
@@ -150,7 +151,7 @@
|
|
|
150
151
|
"href": "https://rshb.ru",
|
|
151
152
|
"text": "Подробнее",
|
|
152
153
|
"target": "_blank",
|
|
153
|
-
"version": "
|
|
154
|
+
"version": "secondary"
|
|
154
155
|
}
|
|
155
156
|
],
|
|
156
157
|
"image": {
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
{
|
|
169
170
|
"nav": {
|
|
170
171
|
"title": "Карты Unionpay",
|
|
171
|
-
"
|
|
172
|
+
"description": "Кэшбэк до 20% у партнеров"
|
|
172
173
|
},
|
|
173
174
|
"productBlock": {
|
|
174
175
|
"title": "Карты Unionpay»",
|
|
@@ -182,7 +183,7 @@
|
|
|
182
183
|
"href": "https://rshb.ru",
|
|
183
184
|
"text": "Подробнее",
|
|
184
185
|
"target": "_blank",
|
|
185
|
-
"version": "
|
|
186
|
+
"version": "secondary"
|
|
186
187
|
}
|
|
187
188
|
],
|
|
188
189
|
"image": {
|
|
@@ -19,8 +19,8 @@ export type BlockDecorator<VNode = any> = (
|
|
|
19
19
|
index?: number | string,
|
|
20
20
|
) => any;
|
|
21
21
|
|
|
22
|
-
export type JSXBlock = (
|
|
23
|
-
props: PropsWithChildren<UniBlockProps &
|
|
22
|
+
export type JSXBlock<BlockProps = BlockContent> = (
|
|
23
|
+
props: PropsWithChildren<UniBlockProps & BlockProps, any>,
|
|
24
24
|
context?: any,
|
|
25
25
|
) => any;
|
|
26
26
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ProductBlockContent } from '../../components/ProductBlock/ProductBlockContent';
|
|
2
|
+
import type { ProductTileContent } from '../../components/ProductTile/ProductTileContent';
|
|
3
|
+
import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
4
|
+
|
|
5
|
+
export interface ActiveHandler {
|
|
6
|
+
context: ContentPageContext;
|
|
7
|
+
blocks?: GroupBlockDef[];
|
|
8
|
+
initialState?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface GroupBlockCommonProps {
|
|
12
|
+
/** @title Стиль */
|
|
13
|
+
style?: string[];
|
|
14
|
+
/** @title Теги */
|
|
15
|
+
tags?: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @title Продуктовый блок
|
|
20
|
+
* @default {"blockType": "ProductBlock"}
|
|
21
|
+
*/
|
|
22
|
+
export type ProductBlockDef = ProductBlockContent &
|
|
23
|
+
GroupBlockCommonProps & { blockType: 'ProductBlock' };
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @title Продуктовая плитка
|
|
27
|
+
* @default {"blockType": "ProductTile"}
|
|
28
|
+
*/
|
|
29
|
+
export type ProductTileDef = ProductTileContent &
|
|
30
|
+
GroupBlockCommonProps & { blockType: 'ProductTile' };
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @title Выберите блок
|
|
34
|
+
*/
|
|
35
|
+
export type EmptyOption = null;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @title Содержимое блока
|
|
39
|
+
*/
|
|
40
|
+
export type GroupBlockDef = EmptyOption | ProductBlockDef | ProductTileDef;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tabs": [
|
|
3
|
+
{ "title": "Еще программы", "index": 0 },
|
|
4
|
+
{ "title": "Страхование жизни", "index": 1, "tag": "tag1" },
|
|
5
|
+
{ "title": "Страхование здоровья", "index": 2, "tag": "tag2" }
|
|
6
|
+
],
|
|
7
|
+
"blocks": [
|
|
8
|
+
{
|
|
9
|
+
"blockType": "ProductBlock",
|
|
10
|
+
"title": "Продуктовый блок",
|
|
11
|
+
"description": "Описание текстового блока",
|
|
12
|
+
"tags":["tag2"]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"blockType": "ProductTile",
|
|
16
|
+
"title": "Продуктовая плитка",
|
|
17
|
+
"description": "Описание текстового блока",
|
|
18
|
+
"tags":["tag1"]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"blockType": "ProductBlock",
|
|
22
|
+
"title": "Продуктовый блок",
|
|
23
|
+
"description": "Описание текстового блока",
|
|
24
|
+
"tags":["tag2"]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
|
+
import { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
|
|
3
|
+
import { PRODUCT_BLOCK } from '../ProductBlock/ProductBlock.fixture';
|
|
4
|
+
import { GroupBlock } from './GroupBlock';
|
|
5
|
+
import groupBlockExample from './GroupBlock.example.json';
|
|
6
|
+
import type { ProductTileDef, ProductBlockDef } from './BlocksTypeProps';
|
|
7
|
+
|
|
8
|
+
const PRODUCT_TILE_GROUP_BLOCK: ProductTileDef = {
|
|
9
|
+
blockType: 'ProductTile',
|
|
10
|
+
tags: ['tag2'],
|
|
11
|
+
style: ['col-span-6'],
|
|
12
|
+
...PRODUCT_TILE,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const PRODUCT_TILE_GROUP_BLOCK2: ProductTileDef = {
|
|
16
|
+
blockType: 'ProductTile',
|
|
17
|
+
tags: ['tag2'],
|
|
18
|
+
style: ['col-span-6'],
|
|
19
|
+
...PRODUCT_TILE,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const PRODUCT_BLOCK_GROUP_BLOCK: ProductBlockDef = {
|
|
23
|
+
blockType: 'ProductBlock',
|
|
24
|
+
tags: ['tag1'],
|
|
25
|
+
style: ['col-span-12'],
|
|
26
|
+
...PRODUCT_BLOCK,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const PRODUCT_BLOCK_GROUP_BLOCK2: ProductBlockDef = {
|
|
30
|
+
blockType: 'ProductBlock',
|
|
31
|
+
style: ['col-span-12'],
|
|
32
|
+
...PRODUCT_BLOCK,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
default: (
|
|
37
|
+
<div className="container grid grid-cols-12">
|
|
38
|
+
<GroupBlock
|
|
39
|
+
context={context}
|
|
40
|
+
className="col-span-12"
|
|
41
|
+
tabs={groupBlockExample.tabs}
|
|
42
|
+
groupBlocks={[
|
|
43
|
+
PRODUCT_TILE_GROUP_BLOCK,
|
|
44
|
+
PRODUCT_TILE_GROUP_BLOCK2,
|
|
45
|
+
PRODUCT_BLOCK_GROUP_BLOCK,
|
|
46
|
+
PRODUCT_BLOCK_GROUP_BLOCK2,
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
),
|
|
51
|
+
};
|