@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,40 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.BonusCalculatorForm = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const CalculatorValueBlock_1 = require("./CalculatorValueBlock");
|
|
6
|
+
const getDefaultSum_1 = require("./getDefaultSum");
|
|
7
|
+
const renderWantedSumInput_1 = require("./renderWantedSumInput");
|
|
8
|
+
const renderRate_1 = require("./renderRate");
|
|
9
|
+
const renderButtonSection_1 = require("./renderButtonSection");
|
|
10
|
+
exports.BonusCalculatorForm = (0, uni_jsx_1.JSX)(({ context, className = '', buttons, bonus, minSumTrip, maxSumTrip, minSumOther, maxSumOther, }) => {
|
|
11
|
+
const [bonusTripValue, setBonusTripValue] = context.useState(undefined);
|
|
12
|
+
const [bonusOtherValue, setBonusOtherValue] = context.useState(undefined);
|
|
13
|
+
const calculatorTripParams = { minSum: minSumTrip, maxSum: maxSumTrip };
|
|
14
|
+
const calculatorOtherParams = { minSum: minSumOther, maxSum: maxSumOther };
|
|
15
|
+
const incomeBonus = 948841;
|
|
16
|
+
const bonusOrDef = bonus || 2528;
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: className, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)({
|
|
18
|
+
title: 'Сумма покупок в категории путешествия, ₽',
|
|
19
|
+
calculatorParams: calculatorTripParams,
|
|
20
|
+
moneyValue: bonusTripValue,
|
|
21
|
+
defaultSum: (0, getDefaultSum_1.getDefaultSum)(calculatorTripParams),
|
|
22
|
+
setMoneyValue: setBonusTripValue,
|
|
23
|
+
isShowItems: false,
|
|
24
|
+
}), (0, renderWantedSumInput_1.renderWantedSumInput)({
|
|
25
|
+
className: 'mt-6',
|
|
26
|
+
title: 'Сумма покупок в остальных категориях, ₽',
|
|
27
|
+
calculatorParams: calculatorOtherParams,
|
|
28
|
+
moneyValue: bonusOtherValue,
|
|
29
|
+
defaultSum: (0, getDefaultSum_1.getDefaultSum)(calculatorOtherParams),
|
|
30
|
+
setMoneyValue: setBonusOtherValue,
|
|
31
|
+
isShowItems: false,
|
|
32
|
+
})] }), (0, jsx_runtime_1.jsx)("div", { children: bonusOrDef
|
|
33
|
+
? (0, renderRate_1.renderRate)({
|
|
34
|
+
rate: bonusOrDef,
|
|
35
|
+
title: 'Баллов за месяц',
|
|
36
|
+
className: 'tracking-[-14px]',
|
|
37
|
+
})
|
|
38
|
+
: null }), (0, jsx_runtime_1.jsxs)("div", { className: "w-[240px]", children: [incomeBonus ? (0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: incomeBonus }) : null, (0, renderButtonSection_1.renderButtonSection)(context, buttons)] })] }));
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=BonusCalculatorForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BonusCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/BonusCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iE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AK;qBACnB,CAAC,IACE,EACN,0CACG,UAAU;oBACT,CAAC,CAAC,IAAA,uBAAU,EAAC;wBACT,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,iBAAiB;wBACxB,SAAS,EAAE,kBAAkB;qBAC9B,CAAC;oBACJ,CAAC,CAAC,IAAI,GACJ,EACN,iCAAK,SAAS,EAAC,WAAW,aACvB,WAAW,CAAC,CAAC,CAAC,uBAAC,2CAAoB,IAAC,KAAK,EAAC,sEAAe,EAAC,KAAK,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EACvF,IAAA,yCAAmB,EAAC,OAAO,EAAE,OAAO,CAAC,IAClC,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import type { CalculatorContent } from './CalculatorContent';
|
|
3
|
+
export interface CalculatorProps extends CalculatorContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Calculator: (props: import("@redneckz/uni-jsx").PropsWithChildren<CalculatorProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.Calculator = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const ArrowButton_1 = require("../../ui-kit/Button/ArrowButton");
|
|
6
|
+
const Img_1 = require("../../ui-kit/Img/Img");
|
|
7
|
+
const renderCalculatorList_1 = require("./renderCalculatorList");
|
|
8
|
+
const arrowBtnStyle = 'absolute w-[56px] h-[56px] min-h-[56px] max-h-[56px] top-1 z-10 mt-[25px] bg-white rounded-full';
|
|
9
|
+
exports.Calculator = (0, uni_jsx_1.JSX)(({ className = '', context, calcTabs = [], anchor = null }) => {
|
|
10
|
+
const tabsNav = calcTabs.map((_) => _.nav || {});
|
|
11
|
+
const blockCalcTabs = calcTabs.map(({ calculatorBlock }) => calculatorBlock || {});
|
|
12
|
+
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
13
|
+
const [tabsShift, setTabsShift] = context.useState(0);
|
|
14
|
+
const handleNextClick = () => setTabsShift(tabsShift + 1);
|
|
15
|
+
const handlePrevClick = () => setTabsShift(tabsShift - 1);
|
|
16
|
+
const isGalleryScrollAvailable = calcTabs?.length > 3;
|
|
17
|
+
const showNextButton = isGalleryScrollAvailable && calcTabs?.length > tabsShift + 3;
|
|
18
|
+
const showPrevButton = tabsShift > 0;
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("section", { id: anchor, className: `box-border overflow-hidden relative font-sans w-100 bg-white text-primary-text ${className}`, children: [(0, jsx_runtime_1.jsxs)("div", { children: [tabsNav.length > 1
|
|
20
|
+
? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
|
|
21
|
+
: null, showPrevButton ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { className: `${arrowBtnStyle} left-3 top-3`, onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })) : null, showNextButton ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { className: `${arrowBtnStyle} right-3 top-3 rotate-180`, onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })) : null] }), (0, jsx_runtime_1.jsx)("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: (0, renderCalculatorList_1.renderCalculatorList)({
|
|
22
|
+
context,
|
|
23
|
+
className,
|
|
24
|
+
blockCalcTabs,
|
|
25
|
+
}) })] }));
|
|
26
|
+
});
|
|
27
|
+
function renderNavButton({ tab, i, activeSlideIndex, onClick }) {
|
|
28
|
+
const isActiveBtn = i === activeSlideIndex;
|
|
29
|
+
const btnClassName = isActiveBtn
|
|
30
|
+
? 'h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white'
|
|
31
|
+
: `h-[77px] w-[322px] min-w-[322px] px-5 py-4 ease-in duration-300 bg-white text-primary-text`;
|
|
32
|
+
const btnTitleClassName = isActiveBtn ? 'text-md-new mb-1.5' : `text-base mb-[3px]`;
|
|
33
|
+
const btnDescClassName = isActiveBtn ? 'text-base text-white' : `text-m-md`;
|
|
34
|
+
const iconClassName = isActiveBtn ? '' : `text-primary-main`;
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border font-sans relative border-[1px] border-main-stroke cursor-pointer text-left border-b-0 flex
|
|
36
|
+
${btnClassName}`, children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), (0, jsx_runtime_1.jsxs)("div", { className: "border-0", children: [(0, jsx_runtime_1.jsx)("div", { className: `font-medium ${btnTitleClassName}`, children: tab?.title }), (0, jsx_runtime_1.jsx)("div", { className: `text-secondary-text ${btnDescClassName}`, children: tab.description })] })] }, String(i)));
|
|
37
|
+
}
|
|
38
|
+
function renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex }) {
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-[38px] box-border duration-1000", children: (0, jsx_runtime_1.jsx)("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton({
|
|
40
|
+
tab,
|
|
41
|
+
i,
|
|
42
|
+
activeSlideIndex,
|
|
43
|
+
onClick: () => setActiveSlideIndex(i),
|
|
44
|
+
})) }) }), (0, jsx_runtime_1.jsx)("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=Calculator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calculator.js","sourceRoot":"","sources":["../../../src/components/Calculator/Calculator.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,iEAA8D;AAC9D,8CAA2C;AAC3C,iEAA8D;AAmB9D,MAAM,aAAa,GACjB,iGAAiG,CAAC;AAEvF,QAAA,UAAU,GAAG,IAAA,aAAG,EAC3B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,GAAG,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE;IAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,IAAK,EAAoB,CAAC,CAAC;IACpE,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAChC,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,eAAe,IAAK,EAAyB,CACvE,CAAC;IACF,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEtD,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAE1D,MAAM,wBAAwB,GAAG,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC;IACtD,MAAM,cAA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,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;qBACtC,CAAC,CACH,GACG,GACF,EACN,gCAAK,SAAS,EAAC,4BAA4B,GAAG,IAC1C,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Picture } from '../../model/Picture';
|
|
2
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
export interface CommonCalculatorProps {
|
|
4
|
+
buttons?: ButtonWithIconProps[];
|
|
5
|
+
}
|
|
6
|
+
export interface CreditCalculatorParams {
|
|
7
|
+
isSalary?: boolean;
|
|
8
|
+
isInsurance?: boolean;
|
|
9
|
+
isAnnuity?: boolean;
|
|
10
|
+
minSum?: number;
|
|
11
|
+
maxSum?: number;
|
|
12
|
+
minMonths?: number;
|
|
13
|
+
maxMonths?: number;
|
|
14
|
+
rateWithInsurance?: number;
|
|
15
|
+
rateWithoutInsurance?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface MortgageCalculatorParams {
|
|
18
|
+
isAnnuity?: boolean;
|
|
19
|
+
minInitialContribution?: number;
|
|
20
|
+
minSum?: number;
|
|
21
|
+
maxSum?: number;
|
|
22
|
+
minMonths?: number;
|
|
23
|
+
maxMonths?: number;
|
|
24
|
+
rateWithInsurance?: number;
|
|
25
|
+
rateWithoutInsurance?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface DepositCalculatorParams {
|
|
28
|
+
minSum?: number;
|
|
29
|
+
maxSum?: number;
|
|
30
|
+
minMonths?: number;
|
|
31
|
+
maxMonths?: number;
|
|
32
|
+
rate?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface BonusCalculatorParams {
|
|
35
|
+
bonus?: number;
|
|
36
|
+
minSumTrip?: number;
|
|
37
|
+
maxSumTrip?: number;
|
|
38
|
+
minSumOther?: number;
|
|
39
|
+
maxSumOther?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface CalculatorParams {
|
|
42
|
+
isAnnuity?: boolean;
|
|
43
|
+
minSum?: number;
|
|
44
|
+
maxSum?: number;
|
|
45
|
+
minMonths?: number;
|
|
46
|
+
maxMonths?: number;
|
|
47
|
+
rateWithInsurance?: number;
|
|
48
|
+
rateWithoutInsurance?: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @title Заголовок
|
|
52
|
+
* @default {"calcType": "CreditCalculatorForm"}
|
|
53
|
+
*/
|
|
54
|
+
export declare type CreditCalculatorParamsDef = CreditCalculatorParams & CommonCalculatorProps & {
|
|
55
|
+
calcType: 'CreditCalculatorForm';
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @title Заголовок
|
|
59
|
+
* @default {"calcType": "MortgageCalculatorForm"}
|
|
60
|
+
*/
|
|
61
|
+
export declare type MortgageCalculatorParamsDef = MortgageCalculatorParams & CommonCalculatorProps & {
|
|
62
|
+
calcType: 'MortgageCalculatorForm';
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @title Заголовок
|
|
66
|
+
* @default {"calcType": "DepositCalculatorForm"}
|
|
67
|
+
*/
|
|
68
|
+
export declare type DepositCalculatorParamsDef = DepositCalculatorParams & CommonCalculatorProps & {
|
|
69
|
+
calcType: 'DepositCalculatorForm';
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* @title Заголовок
|
|
73
|
+
* @default {"calcType": "BonusCalculatorForm"}
|
|
74
|
+
*/
|
|
75
|
+
export declare type BonusCalculatorParamsDef = BonusCalculatorParams & CommonCalculatorProps & {
|
|
76
|
+
calcType: 'BonusCalculatorForm';
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @title Выберите калькулятор
|
|
80
|
+
*/
|
|
81
|
+
export declare type EmptyOption = null;
|
|
82
|
+
/**
|
|
83
|
+
* @title Калькулятор
|
|
84
|
+
*/
|
|
85
|
+
export declare type CalculatorBlockDef = EmptyOption | CreditCalculatorParamsDef | MortgageCalculatorParamsDef | DepositCalculatorParamsDef | BonusCalculatorParamsDef;
|
|
86
|
+
/**
|
|
87
|
+
* @title Кнопка навигации
|
|
88
|
+
*/
|
|
89
|
+
export interface CalculatorNav {
|
|
90
|
+
/** @title Заголовок */
|
|
91
|
+
title?: string;
|
|
92
|
+
/** @title Описание */
|
|
93
|
+
description?: string;
|
|
94
|
+
icon?: Picture;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @title Вкладка
|
|
98
|
+
*/
|
|
99
|
+
export interface CalculatorTab {
|
|
100
|
+
nav?: CalculatorNav;
|
|
101
|
+
/** @title Настройки калькулятора */
|
|
102
|
+
calculatorBlock?: CalculatorBlockDef;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @title Калькулятор
|
|
106
|
+
*/
|
|
107
|
+
export interface CalculatorContent {
|
|
108
|
+
/** @title Вкладки */
|
|
109
|
+
calcTabs?: CalculatorTab[];
|
|
110
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalculatorContent.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorContent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CalculatorValueBlockProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
value?: number;
|
|
4
|
+
postfix?: string;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CalculatorValueBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<CalculatorValueBlockProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.CalculatorValueBlock = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const addSpacesBetweenNumbers_1 = require("../../utils/addSpacesBetweenNumbers");
|
|
6
|
+
exports.CalculatorValueBlock = (0, uni_jsx_1.JSX)(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `mb-5 ${className}`, children: [title ? (0, jsx_runtime_1.jsx)("div", { className: "text-base font-light", children: title }) : null, value ? ((0, jsx_runtime_1.jsxs)("div", { className: "text-title font-normal", children: [prefix, " ", (0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(Math.round(value)), " ", postfix] })) : null] }));
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=CalculatorValueBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iFAA8E;AAUjE,QAAA,oBAAoB,GAAG,IAAA,aAAG,EACrC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE;IACzD,OAAO,CACL,iCAAK,SAAS,EAAE,QAAQ,SAAS,EAAE,aAChC,KAAK,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAC,sBAAsB,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,EAClE,KAAK,CAAC,CAAC,CAAC,CACP,iCAAK,SAAS,EAAC,wBAAwB,aACpC,MAAM,OAAG,IAAA,iDAAuB,EAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAG,OAAO,IAC1D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import { CommonCalculatorProps, CreditCalculatorParams } from './CalculatorContent';
|
|
3
|
+
export interface CreditCalculatorProp extends CreditCalculatorParams, CommonCalculatorProps, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const CreditCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<CreditCalculatorProp, any>, context?: any) => any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.CreditCalculatorForm = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const useCreditCalculatorData_1 = require("../../hooks/useCreditCalculatorData");
|
|
6
|
+
const Checkbox_1 = require("../../ui-kit/Checkbox/Checkbox");
|
|
7
|
+
const CalculatorValueBlock_1 = require("./CalculatorValueBlock");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
const renderWantedSumInput_1 = require("./renderWantedSumInput");
|
|
10
|
+
const getCreditRate_1 = require("./getCreditRate");
|
|
11
|
+
const getCalculatorParams_1 = require("./getCalculatorParams");
|
|
12
|
+
const getDefaultSum_1 = require("./getDefaultSum");
|
|
13
|
+
const getDefaultMonths_1 = require("./getDefaultMonths");
|
|
14
|
+
const getMonthlyPayment_1 = require("./getMonthlyPayment");
|
|
15
|
+
const renderMonthsInput_1 = require("./renderMonthsInput");
|
|
16
|
+
const renderButtonSection_1 = require("./renderButtonSection");
|
|
17
|
+
const renderRate_1 = require("./renderRate");
|
|
18
|
+
const DEFAULT_PAYMENT_TYPE = 'annuity';
|
|
19
|
+
exports.CreditCalculatorForm = (0, uni_jsx_1.JSX)(({ context, className = '', buttons }) => {
|
|
20
|
+
const [moneyValue, setMoneyValue] = context.useState(undefined);
|
|
21
|
+
const [monthsValue, setMonthsValue] = context.useState(undefined);
|
|
22
|
+
const [isAnnuity, toggleIsAnnuity] = context.useState(false);
|
|
23
|
+
const [isBudgetary, toggleIsBudgetary] = context.useState(false);
|
|
24
|
+
const [isInsurance, toggleIsInsurance] = context.useState(false);
|
|
25
|
+
const tableRows = (0, useCreditCalculatorData_1.useCreditCalculatorData)(context.useAsyncData, 'directoryName').rows;
|
|
26
|
+
const calculatorParams = (0, getCalculatorParams_1.getCalculatorParams)({ tableRows, isAnnuity: isAnnuity });
|
|
27
|
+
const defaultSum = (0, getDefaultSum_1.getDefaultSum)(calculatorParams);
|
|
28
|
+
const defaultMonths = (0, getDefaultMonths_1.getDefaultMonths)(calculatorParams);
|
|
29
|
+
const minMonths = calculatorParams?.minMonths || constants_1.DEFAULT_MIN_MONTHS;
|
|
30
|
+
const maxMonths = calculatorParams?.maxMonths || constants_1.DEFAULT_MAX_MONTHS;
|
|
31
|
+
const rate = (0, getCreditRate_1.getCreditRate)({ calculatorParams, isInsurance: isInsurance });
|
|
32
|
+
const monthlyPayment = (0, getMonthlyPayment_1.getMonthlyPayment)({
|
|
33
|
+
calculatorParams,
|
|
34
|
+
paymentType: DEFAULT_PAYMENT_TYPE,
|
|
35
|
+
rate,
|
|
36
|
+
sum: moneyValue || defaultSum,
|
|
37
|
+
months: monthsValue || defaultMonths,
|
|
38
|
+
});
|
|
39
|
+
const title = 'Сумма кредита, ₽';
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: className, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)({ title, calculatorParams, moneyValue, defaultSum, setMoneyValue }), (0, renderMonthsInput_1.renderMonthsInput)({
|
|
41
|
+
title: 'Сумма кредита, ₽',
|
|
42
|
+
minMonths,
|
|
43
|
+
maxMonths,
|
|
44
|
+
monthsValue,
|
|
45
|
+
defaultMonths,
|
|
46
|
+
setMonthsValue,
|
|
47
|
+
}), (0, jsx_runtime_1.jsxs)("div", { className: "pt-7", children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isAnnuity, onChange: toggleIsAnnuity }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isBudgetary, onChange: toggleIsBudgetary }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), (0, jsx_runtime_1.jsx)("div", { children: rate
|
|
48
|
+
? (0, renderRate_1.renderRate)({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
49
|
+
: null }), (0, jsx_runtime_1.jsxs)("div", { className: "w-[351px]", children: [monthlyPayment ? ((0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })) : null, (0, renderButtonSection_1.renderButtonSection)(context, buttons)] })] }));
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=CreditCalculatorForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/CreditCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iFAA8E;AAE9E,6DAA0D;AAC1D,iEAA8D;AAC9D,2CAAqE;AACrE,iEAA8D;AAC9D,mDAAgD;AAChD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C,CAAC,CAChB,uBAAC,2CAAoB,IAAC,KAAK,EAAC,yGAAoB,EAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAC,QAAG,GAAG,CACvF,CAAC,CAAC,CAAC,IAAI,EACP,IAAA,yCAAmB,EAAC,OAAO,EAAE,OAAO,CAAC,IAClC,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import { CommonCalculatorProps, DepositCalculatorParams } from './CalculatorContent';
|
|
3
|
+
export interface DepositCalculatorProp extends DepositCalculatorParams, CommonCalculatorProps, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const DepositCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<DepositCalculatorProp, any>, context?: any) => any;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.DepositCalculatorForm = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const useCreditCalculatorData_1 = require("../../hooks/useCreditCalculatorData");
|
|
6
|
+
const CalculatorValueBlock_1 = require("./CalculatorValueBlock");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
const renderWantedSumInput_1 = require("./renderWantedSumInput");
|
|
9
|
+
const getCalculatorParams_1 = require("./getCalculatorParams");
|
|
10
|
+
const getDefaultSum_1 = require("./getDefaultSum");
|
|
11
|
+
const getDefaultMonths_1 = require("./getDefaultMonths");
|
|
12
|
+
const renderMonthsInput_1 = require("./renderMonthsInput");
|
|
13
|
+
const renderButtonSection_1 = require("./renderButtonSection");
|
|
14
|
+
const renderRate_1 = require("./renderRate");
|
|
15
|
+
exports.DepositCalculatorForm = (0, uni_jsx_1.JSX)(({ context, className = '', buttons, rate, minSum, maxSum, minMonths, maxMonths }) => {
|
|
16
|
+
const [moneyValue, setMoneyValue] = context.useState(undefined);
|
|
17
|
+
const [monthsValue, setMonthsValue] = context.useState(undefined);
|
|
18
|
+
const tableRows = (0, useCreditCalculatorData_1.useCreditCalculatorData)(context.useAsyncData, 'directoryName').rows;
|
|
19
|
+
const calculatorParams = (0, getCalculatorParams_1.getCalculatorParams)({ tableRows, isAnnuity: false });
|
|
20
|
+
const defaultSum = (0, getDefaultSum_1.getDefaultSum)(calculatorParams);
|
|
21
|
+
const defaultMonths = (0, getDefaultMonths_1.getDefaultMonths)(calculatorParams);
|
|
22
|
+
const income = 948841;
|
|
23
|
+
const finallySum = 1218841;
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: className, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)({
|
|
25
|
+
title: 'Сумма вклада, ₽',
|
|
26
|
+
calculatorParams: { minSum, maxSum },
|
|
27
|
+
moneyValue,
|
|
28
|
+
defaultSum,
|
|
29
|
+
setMoneyValue,
|
|
30
|
+
}), (0, renderMonthsInput_1.renderMonthsInput)({
|
|
31
|
+
title: 'Срок вклада, месяцев',
|
|
32
|
+
minMonths: minMonths || constants_1.DEFAULT_MIN_MONTHS,
|
|
33
|
+
maxMonths: maxMonths || constants_1.DEFAULT_MAX_MONTHS,
|
|
34
|
+
monthsValue,
|
|
35
|
+
defaultMonths,
|
|
36
|
+
setMonthsValue,
|
|
37
|
+
})] }), (0, jsx_runtime_1.jsx)("div", { children: rate
|
|
38
|
+
? (0, renderRate_1.renderRate)({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
39
|
+
: null }), (0, jsx_runtime_1.jsxs)("div", { className: "w-[351px]", children: [income ? ((0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) : null, finallySum ? ((0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finallySum, postfix: "\u20BD" })) : null, (0, renderButtonSection_1.renderButtonSection)(context, buttons)] })] }));
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=DepositCalculatorForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/DepositCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iFAA8E;AAE9E,iEAA8D;AAC9D,2CAAqE;AACrE,iEAA8D;AAC9D,+DAA4D;AAC5D,mDAAgD;AAChD,yDAAsD;AACtD,2DAAwD;AACxD,+DAA4D;AAC5D,6CAA0C;AAQ7B,QAAA,qBAAqB,GAAG,IAAA,aAAG,EACtC,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;IACnF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACtF,MAAM,SAAS,GAAG,IAAA,iDAAuB,EAAC,OAAO,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC;IACtF,MAAM,gBAAgB,GAAG,IAAA,yCAAmB,EAAC,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAE9E,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAC,gBAAgB,CAAC,CAAC;IACnD,MAAM,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+1,11 @@
|
|
|
1
|
+
import { CreditCalculatorProp } from './CreditCalculatorForm';
|
|
2
|
+
import { MortgageCalculatorProp } from './MortgageCalculatorForm';
|
|
3
|
+
import { DepositCalculatorProp } from './DepositCalculatorForm';
|
|
4
|
+
import { BonusCalculatorProp } from './BonusCalculatorForm';
|
|
5
|
+
export declare type EmbeddableCalcProps = CreditCalculatorProp | MortgageCalculatorProp | DepositCalculatorProp | BonusCalculatorProp;
|
|
6
|
+
export declare const EmbeddableCalcBlocks: {
|
|
7
|
+
CreditCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<CreditCalculatorProp, any>, context?: any) => any;
|
|
8
|
+
MortgageCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<MortgageCalculatorProp, any>, context?: any) => any;
|
|
9
|
+
DepositCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<DepositCalculatorProp, any>, context?: any) => any;
|
|
10
|
+
BonusCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<BonusCalculatorProp, any>, context?: any) => any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.EmbeddableCalcBlocks = void 0;
|
|
3
|
+
const CreditCalculatorForm_1 = require("./CreditCalculatorForm");
|
|
4
|
+
const MortgageCalculatorForm_1 = require("./MortgageCalculatorForm");
|
|
5
|
+
const DepositCalculatorForm_1 = require("./DepositCalculatorForm");
|
|
6
|
+
const BonusCalculatorForm_1 = require("./BonusCalculatorForm");
|
|
7
|
+
exports.EmbeddableCalcBlocks = {
|
|
8
|
+
CreditCalculatorForm: CreditCalculatorForm_1.CreditCalculatorForm,
|
|
9
|
+
MortgageCalculatorForm: MortgageCalculatorForm_1.MortgageCalculatorForm,
|
|
10
|
+
DepositCalculatorForm: DepositCalculatorForm_1.DepositCalculatorForm,
|
|
11
|
+
BonusCalculatorForm: BonusCalculatorForm_1.BonusCalculatorForm,
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=EmbeddableCalcBlocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddableCalcBlocks.js","sourceRoot":"","sources":["../../../src/components/Calculator/EmbeddableCalcBlocks.tsx"],"names":[],"mappings":";;AAAA,iEAAoF;AACpF,qEAA0F;AAC1F,mEAAuF;AACvF,+DAAiF;AAQpE,QAAA,oBAAoB,GAAG;IAClC,oBAAoB,EAApB,2CAAoB;IACpB,sBAAsB,EAAtB,+CAAsB;IACtB,qBAAqB,EAArB,6CAAqB;IACrB,mBAAmB,EAAnB,yCAAmB;CACpB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import { CommonCalculatorProps, MortgageCalculatorParams } from './CalculatorContent';
|
|
3
|
+
export interface MortgageCalculatorProp extends MortgageCalculatorParams, CommonCalculatorProps, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const MortgageCalculatorForm: (props: import("@redneckz/uni-jsx").PropsWithChildren<MortgageCalculatorProp, any>, context?: any) => any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.MortgageCalculatorForm = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const useCreditCalculatorData_1 = require("../../hooks/useCreditCalculatorData");
|
|
6
|
+
const Checkbox_1 = require("../../ui-kit/Checkbox/Checkbox");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
const renderRealEstateValue_1 = require("./renderRealEstateValue");
|
|
9
|
+
const renderInitialFeeInput_1 = require("./renderInitialFeeInput");
|
|
10
|
+
const getCreditRate_1 = require("./getCreditRate");
|
|
11
|
+
const getCalculatorParams_1 = require("./getCalculatorParams");
|
|
12
|
+
const getDefaultSum_1 = require("./getDefaultSum");
|
|
13
|
+
const getDefaultMonths_1 = require("./getDefaultMonths");
|
|
14
|
+
const renderMonthsInput_1 = require("./renderMonthsInput");
|
|
15
|
+
const renderButtonSection_1 = require("./renderButtonSection");
|
|
16
|
+
const renderProposalMortgage_1 = require("./renderProposalMortgage");
|
|
17
|
+
const renderRate_1 = require("./renderRate");
|
|
18
|
+
const CalculatorValueBlock_1 = require("./CalculatorValueBlock");
|
|
19
|
+
exports.MortgageCalculatorForm = (0, uni_jsx_1.JSX)(({ context, className = '', buttons }) => {
|
|
20
|
+
const [moneyValue, setMoneyValue] = context.useState(undefined);
|
|
21
|
+
const [monthsValue, setMonthsValue] = context.useState(undefined);
|
|
22
|
+
const [isInsurance, toggleIsInsurance] = context.useState(false);
|
|
23
|
+
const [isFullInsurance, toggleIsFullInsurance] = context.useState(false);
|
|
24
|
+
const tableRows = (0, useCreditCalculatorData_1.useCreditCalculatorData)(context.useAsyncData, 'directoryName').rows;
|
|
25
|
+
const calculatorParams = (0, getCalculatorParams_1.getCalculatorParams)({ tableRows, isAnnuity: isInsurance });
|
|
26
|
+
const defaultSum = (0, getDefaultSum_1.getDefaultSum)(calculatorParams);
|
|
27
|
+
const defaultMonths = (0, getDefaultMonths_1.getDefaultMonths)(calculatorParams);
|
|
28
|
+
const minMonths = calculatorParams?.minMonths || constants_1.DEFAULT_MIN_MONTHS;
|
|
29
|
+
const maxMonths = calculatorParams?.maxMonths || constants_1.DEFAULT_MAX_MONTHS;
|
|
30
|
+
const rate = (0, getCreditRate_1.getCreditRate)({ calculatorParams, isInsurance: isInsurance });
|
|
31
|
+
const monthlyPayment = 777777; // TODO: hardcode
|
|
32
|
+
const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: className, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-[468px]", children: [(0, renderRealEstateValue_1.renderRealEstateValue)({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), (0, renderInitialFeeInput_1.renderInitialFeeInput)({
|
|
34
|
+
calculatorParams,
|
|
35
|
+
moneyValue,
|
|
36
|
+
defaultSum,
|
|
37
|
+
setMoneyValue,
|
|
38
|
+
}), (0, renderMonthsInput_1.renderMonthsInput)({
|
|
39
|
+
title: 'Срок ипотеки, месяцев',
|
|
40
|
+
minMonths,
|
|
41
|
+
maxMonths,
|
|
42
|
+
monthsValue,
|
|
43
|
+
defaultMonths,
|
|
44
|
+
setMonthsValue,
|
|
45
|
+
}), (0, jsx_runtime_1.jsxs)("div", { className: "mt-7", children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\u043B\u043E\u0440\u043E\u0432\u044C\u044F \u0438 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0443\u0442\u0440\u0430\u0442\u044B \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438", checked: isFullInsurance, onChange: toggleIsFullInsurance })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { children: rate
|
|
46
|
+
? (0, renderRate_1.renderRate)({ rate: rate, title: 'Ставка', sup: '%', className: 'tracking-[-25px]' })
|
|
47
|
+
: null }), (0, jsx_runtime_1.jsx)(CalculatorValueBlock_1.CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "w-[351px]", children: (0, renderProposalMortgage_1.renderProposalMortgage)(proposalMortgageValue) }), (0, renderButtonSection_1.renderButtonSection)(context, buttons)] })] }));
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=MortgageCalculatorForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MortgageCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/MortgageCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iFAA8E;AAE9E,6DAA0D;AAC1D,2CAAqE;AACrE,mEAAgE;AAChE,mEAAgE;AAChE,mDAAgD;AAChD,+DAA4D;AAC5D,mDAAgD;AAChD,yDAAsD;AACtD,2DAAwD;AACxD,+DAA4D;AAC5D,qEAAkE;AAClE,6CAA0C;AAE1C,iEAA8D;AAOjD,QAAA,sBAAsB,GAAG,IAAA,aAAG,EACvC,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IACvC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACtF,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjE,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEzE,MAAM,SAAS,GAAG,IAAA,iDAAuB,EAAC,OAAO,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC;IACtF,MAAM,gBAAgB,GAAG,IAAA,yCAAmB,EAAC,EAAE,SAAS,EAAE,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F,EACN,4CACE,0CACG,IAAI;4BACH,CAAC,CAAC,IAAA,uBAAU,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;4BACtF,CAAC,CAAC,IAAI,GACJ,EACN,uBAAC,2CAAoB,IAAC,KAAK,EAAC,yGAAoB,EAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAC,QAAG,GAAG,IAClF,EACN,4CACE,gCAAK,SAAS,EAAC,WAAW,YAAE,IAAA,+CAAsB,EAAC,qBAAqB,CAAC,GAAO,EAC/E,IAAA,yCAAmB,EAAC,OAAO,EAAE,OAAO,CAAC,IAClC,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const DEFAULT_MIN_SUM = 30000;
|
|
2
|
+
export declare const DEFAULT_MAX_SUM = 3000000;
|
|
3
|
+
export declare const DEFAULT_SUM: number;
|
|
4
|
+
export declare const DEFAULT_MIN_MONTHS = 1;
|
|
5
|
+
export declare const DEFAULT_MAX_MONTHS = 84;
|
|
6
|
+
export declare const DEFAULT_MONTHS: number;
|
|
7
|
+
export declare const MONTHS_IN_YEAR = 12;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.MONTHS_IN_YEAR = exports.DEFAULT_MONTHS = exports.DEFAULT_MAX_MONTHS = exports.DEFAULT_MIN_MONTHS = exports.DEFAULT_SUM = exports.DEFAULT_MAX_SUM = exports.DEFAULT_MIN_SUM = void 0;
|
|
3
|
+
exports.DEFAULT_MIN_SUM = 30000;
|
|
4
|
+
exports.DEFAULT_MAX_SUM = 3000000;
|
|
5
|
+
exports.DEFAULT_SUM = (exports.DEFAULT_MAX_SUM - exports.DEFAULT_MIN_SUM) / 2;
|
|
6
|
+
exports.DEFAULT_MIN_MONTHS = 1;
|
|
7
|
+
exports.DEFAULT_MAX_MONTHS = 84;
|
|
8
|
+
exports.DEFAULT_MONTHS = Math.round((exports.DEFAULT_MAX_MONTHS - exports.DEFAULT_MIN_MONTHS) / 2);
|
|
9
|
+
exports.MONTHS_IN_YEAR = 12;
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":";;AAAa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,WAAW,GAAG,CAAC,uBAAe,GAAG,uBAAe,CAAC,GAAG,CAAC,CAAC;AACtD,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACvB,QAAA,kBAAkB,GAAG,EAAE,CAAC;AACxB,QAAA,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,0BAAkB,GAAG,0BAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AAE3E,QAAA,cAAc,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
2
|
+
interface GetCalculatorParamsParams {
|
|
3
|
+
tableRows?: CalculatorParams[];
|
|
4
|
+
isAnnuity?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const getCalculatorParams: (params: GetCalculatorParamsParams) => CalculatorParams;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.getCalculatorParams = void 0;
|
|
3
|
+
const getCalculatorParams = (params) => {
|
|
4
|
+
const { tableRows, isAnnuity = false } = params;
|
|
5
|
+
if (!tableRows)
|
|
6
|
+
return {};
|
|
7
|
+
const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
|
|
8
|
+
return calculatorParams || {};
|
|
9
|
+
};
|
|
10
|
+
exports.getCalculatorParams = getCalculatorParams;
|
|
11
|
+
//# sourceMappingURL=getCalculatorParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/getCalculatorParams.ts"],"names":[],"mappings":";;AAOO,MAAM,mBAAmB,GAAG,CAAC,MAAiC,EAAE,EAAE;IACvE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;IAEhD,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,gBAAgB,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;IAE9E,OAAO,gBAAgB,IAAI,EAAE,CAAC;AAChC,CAAC,CAAC;AARW,QAAA,mBAAmB,uBAQ9B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.getCreditRate = void 0;
|
|
3
|
+
const DEFAULT_RATE = 10.2;
|
|
4
|
+
const getCreditRate = (params) => {
|
|
5
|
+
const { calculatorParams, isInsurance } = params;
|
|
6
|
+
if (!calculatorParams)
|
|
7
|
+
return DEFAULT_RATE;
|
|
8
|
+
return isInsurance
|
|
9
|
+
? calculatorParams?.rateWithInsurance || DEFAULT_RATE
|
|
10
|
+
: calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
|
|
11
|
+
};
|
|
12
|
+
exports.getCreditRate = getCreditRate;
|
|
13
|
+
//# sourceMappingURL=getCreditRate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCreditRate.js","sourceRoot":"","sources":["../../../src/components/Calculator/getCreditRate.ts"],"names":[],"mappings":";;AAEA,MAAM,YAAY,GAAG,IAAI,CAAC;AAOnB,MAAM,aAAa,GAAG,CAAC,MAA2B,EAAE,EAAE;IAC3D,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAEjD,IAAI,CAAC,gBAAgB;QAAE,OAAO,YAAY,CAAC;IAE3C,OAAO,WAAW;QAChB,CAAC,CAAC,gBAAgB,EAAE,iBAAiB,IAAI,YAAY;QACrD,CAAC,CAAC,gBAAgB,EAAE,oBAAoB,IAAI,YAAY,CAAC;AAC7D,CAAC,CAAC;AARW,QAAA,aAAa,iBAQxB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.getDefaultMonths = void 0;
|
|
3
|
+
const constants_1 = require("./constants");
|
|
4
|
+
const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
|
|
5
|
+
? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
|
|
6
|
+
: constants_1.DEFAULT_MONTHS;
|
|
7
|
+
exports.getDefaultMonths = getDefaultMonths;
|
|
8
|
+
//# sourceMappingURL=getDefaultMonths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefaultMonths.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultMonths.ts"],"names":[],"mappings":";;AAAA,2CAA6C;AAGtC,MAAM,gBAAgB,GAAG,CAAC,gBAAkC,EAAE,EAAE,CACrE,gBAAgB,CAAC,SAAS,IAAI,gBAAgB,CAAC,SAAS;IACtD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3E,CAAC,CAAC,0BAAc,CAAC;AAHR,QAAA,gBAAgB,oBAGR"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.getDefaultSum = void 0;
|
|
3
|
+
const constants_1 = require("./constants");
|
|
4
|
+
const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
|
|
5
|
+
? (calculatorParams.maxSum - calculatorParams.minSum) / 2
|
|
6
|
+
: constants_1.DEFAULT_SUM;
|
|
7
|
+
exports.getDefaultSum = getDefaultSum;
|
|
8
|
+
//# sourceMappingURL=getDefaultSum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDefaultSum.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultSum.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAGnC,MAAM,aAAa,GAAG,CAAC,gBAAkC,EAAE,EAAE,CAClE,gBAAgB,CAAC,MAAM,IAAI,gBAAgB,CAAC,MAAM;IAChD,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC;IACzD,CAAC,CAAC,uBAAW,CAAC;AAHL,QAAA,aAAa,iBAGR"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CalculatorParams } from './CalculatorContent';
|
|
2
|
+
declare type PaymentType = 'annuity' | 'differentiated';
|
|
3
|
+
interface GetMonthlyPaymentParams {
|
|
4
|
+
calculatorParams?: CalculatorParams;
|
|
5
|
+
paymentType: PaymentType;
|
|
6
|
+
rate: number;
|
|
7
|
+
sum: number;
|
|
8
|
+
months: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const getMonthlyPayment: (params: GetMonthlyPaymentParams) => number;
|
|
11
|
+
export {};
|