@redneckz/wildless-cms-uni-blocks 0.7.3 → 0.7.5
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 +144 -31
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/BusinessDepositCalculatorForm.d.ts +5 -0
- package/bundle/components/Calculator/CalculatorContent.d.ts +14 -1
- package/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/bundle/components/Calculator/Rate.d.ts +2 -0
- package/bundle/components/Calculator/UnknownRate.d.ts +4 -0
- package/bundle/components/Calculator/constants.d.ts +10 -0
- package/bundle/components/Calculator/renderDaysInput.d.ts +8 -0
- package/bundle/components/Calculator/renderInterestPayment.d.ts +2 -0
- package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +27 -0
- package/bundle/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +2 -5
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
- package/bundle/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +15 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +2 -9
- package/cosmos-static/icons/PercentIcon.svg +1 -0
- package/dist/components/Calculator/BonusCalculatorForm.js +2 -1
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.d.ts +5 -0
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +48 -0
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -0
- package/dist/components/Calculator/CalculatorContent.d.ts +14 -1
- package/dist/components/Calculator/CalculatorValueBlock.js +3 -1
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +2 -1
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +5 -15
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/dist/components/Calculator/Rate.d.ts +2 -0
- package/dist/components/Calculator/Rate.js +3 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/UnknownRate.d.ts +4 -0
- package/dist/components/Calculator/UnknownRate.js +9 -0
- package/dist/components/Calculator/UnknownRate.js.map +1 -0
- package/dist/components/Calculator/constants.d.ts +10 -0
- package/dist/components/Calculator/constants.js +21 -1
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/Calculator/renderDaysInput.d.ts +8 -0
- package/dist/components/Calculator/renderDaysInput.js +16 -0
- package/dist/components/Calculator/renderDaysInput.js.map +1 -0
- package/dist/components/Calculator/renderFootnote.js +2 -1
- package/dist/components/Calculator/renderFootnote.js.map +1 -1
- package/dist/components/Calculator/renderInterestPayment.d.ts +2 -0
- package/dist/components/Calculator/renderInterestPayment.js +22 -0
- package/dist/components/Calculator/renderInterestPayment.js.map +1 -0
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +27 -0
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +49 -0
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/SwipeListControlBlock/SwipeListControlBlock.js +2 -2
- package/dist/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -1
- package/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +2 -5
- package/dist/content-page-repository/transformPicture.js +1 -1
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +5 -5
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +15 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControlContent.js +2 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControlContent.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +2 -9
- package/dist/utils/addSpacesBetweenNumbers.js +1 -1
- package/dist/utils/addSpacesBetweenNumbers.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.js +2 -1
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.d.ts +5 -0
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +46 -0
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -0
- package/lib/components/Calculator/Calculator.fixture.d.ts +1 -0
- package/lib/components/Calculator/CalculatorContent.d.ts +14 -1
- package/lib/components/Calculator/CalculatorValueBlock.js +3 -1
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +2 -1
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +5 -15
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/lib/components/Calculator/Rate.d.ts +2 -0
- package/lib/components/Calculator/Rate.js +3 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/UnknownRate.d.ts +4 -0
- package/lib/components/Calculator/UnknownRate.js +7 -0
- package/lib/components/Calculator/UnknownRate.js.map +1 -0
- package/lib/components/Calculator/constants.d.ts +10 -0
- package/lib/components/Calculator/constants.js +20 -0
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/Calculator/renderDaysInput.d.ts +8 -0
- package/lib/components/Calculator/renderDaysInput.js +13 -0
- package/lib/components/Calculator/renderDaysInput.js.map +1 -0
- package/lib/components/Calculator/renderFootnote.js +2 -1
- package/lib/components/Calculator/renderFootnote.js.map +1 -1
- package/lib/components/Calculator/renderInterestPayment.d.ts +2 -0
- package/lib/components/Calculator/renderInterestPayment.js +19 -0
- package/lib/components/Calculator/renderInterestPayment.js.map +1 -0
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +27 -0
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +46 -0
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/SwipeListControlBlock/SwipeListControlBlock.fixture.d.ts +1 -0
- package/lib/components/SwipeListControlBlock/SwipeListControlBlock.js +2 -2
- package/lib/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -1
- package/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +2 -5
- package/lib/content-page-repository/transformPicture.js +1 -1
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +5 -5
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +15 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControlContent.js +2 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControlContent.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +2 -9
- package/lib/utils/addSpacesBetweenNumbers.js +1 -1
- package/lib/utils/addSpacesBetweenNumbers.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +2 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/BusinessDepositCalculatorForm.d.ts +5 -0
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +14 -1
- package/mobile/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/mobile/bundle/components/Calculator/Rate.d.ts +2 -0
- package/mobile/bundle/components/Calculator/UnknownRate.d.ts +4 -0
- package/mobile/bundle/components/Calculator/constants.d.ts +10 -0
- package/mobile/bundle/components/Calculator/renderDaysInput.d.ts +8 -0
- package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +2 -0
- package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +27 -0
- package/mobile/bundle/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +2 -5
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +15 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +2 -9
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +2 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.d.ts +5 -0
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +48 -0
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -0
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +14 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +3 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +2 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +5 -15
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.d.ts +2 -0
- package/mobile/dist/components/Calculator/Rate.js +3 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/UnknownRate.d.ts +4 -0
- package/mobile/dist/components/Calculator/UnknownRate.js +9 -0
- package/mobile/dist/components/Calculator/UnknownRate.js.map +1 -0
- package/mobile/dist/components/Calculator/constants.d.ts +10 -0
- package/mobile/dist/components/Calculator/constants.js +21 -1
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/renderDaysInput.d.ts +8 -0
- package/mobile/dist/components/Calculator/renderDaysInput.js +16 -0
- package/mobile/dist/components/Calculator/renderDaysInput.js.map +1 -0
- package/mobile/dist/components/Calculator/renderFootnote.js +2 -1
- package/mobile/dist/components/Calculator/renderFootnote.js.map +1 -1
- package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +2 -0
- package/mobile/dist/components/Calculator/renderInterestPayment.js +22 -0
- package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -0
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +27 -0
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +49 -0
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlock.js +2 -2
- package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -1
- package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +2 -5
- package/mobile/dist/content-page-repository/transformPicture.js +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +5 -5
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +15 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlContent.js +2 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlContent.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +2 -9
- package/mobile/dist/utils/addSpacesBetweenNumbers.js +1 -1
- package/mobile/dist/utils/addSpacesBetweenNumbers.js.map +1 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +2 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.d.ts +5 -0
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +46 -0
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -0
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +14 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +3 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +2 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +5 -15
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.d.ts +2 -0
- package/mobile/lib/components/Calculator/Rate.js +3 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/UnknownRate.d.ts +4 -0
- package/mobile/lib/components/Calculator/UnknownRate.js +7 -0
- package/mobile/lib/components/Calculator/UnknownRate.js.map +1 -0
- package/mobile/lib/components/Calculator/constants.d.ts +10 -0
- package/mobile/lib/components/Calculator/constants.js +20 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/renderDaysInput.d.ts +8 -0
- package/mobile/lib/components/Calculator/renderDaysInput.js +13 -0
- package/mobile/lib/components/Calculator/renderDaysInput.js.map +1 -0
- package/mobile/lib/components/Calculator/renderFootnote.js +2 -1
- package/mobile/lib/components/Calculator/renderFootnote.js.map +1 -1
- package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +2 -0
- package/mobile/lib/components/Calculator/renderInterestPayment.js +19 -0
- package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -0
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +27 -0
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +46 -0
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlock.js +2 -2
- package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -1
- package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +2 -5
- package/mobile/lib/content-page-repository/transformPicture.js +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +5 -5
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +15 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlContent.js +2 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlContent.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +2 -9
- package/mobile/lib/utils/addSpacesBetweenNumbers.js +1 -1
- package/mobile/lib/utils/addSpacesBetweenNumbers.js.map +1 -1
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +2 -1
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +133 -0
- package/mobile/src/components/Calculator/CalculatorContent.ts +18 -0
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +17 -5
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +2 -1
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +8 -21
- package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +6 -0
- package/mobile/src/components/Calculator/Rate.tsx +34 -12
- package/mobile/src/components/Calculator/UnknownRate.tsx +24 -0
- package/mobile/src/components/Calculator/constants.ts +23 -1
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +1 -1
- package/mobile/src/components/Calculator/renderDaysInput.tsx +36 -0
- package/mobile/src/components/Calculator/renderFootnote.tsx +7 -1
- package/mobile/src/components/Calculator/renderInterestPayment.tsx +40 -0
- package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +109 -0
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
- package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlock.tsx +2 -2
- package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlockContent.ts +2 -5
- package/mobile/src/content-page-repository/transformPicture.ts +5 -1
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/PercentIcon.svg +373 -0
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +37 -29
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +1 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlContent.ts +17 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -2
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +2 -9
- package/mobile/src/utils/addSpacesBetweenNumbers.ts +1 -1
- package/package.json +1 -1
- package/src/components/Calculator/BonusCalculatorForm.tsx +2 -1
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +133 -0
- package/src/components/Calculator/Calculator.fixture.tsx +29 -0
- package/src/components/Calculator/CalculatorContent.ts +18 -0
- package/src/components/Calculator/CalculatorValueBlock.tsx +17 -5
- package/src/components/Calculator/CreditCalculatorForm.tsx +2 -1
- package/src/components/Calculator/DepositCalculatorForm.tsx +8 -21
- package/src/components/Calculator/EmbeddableCalcBlocks.tsx +6 -0
- package/src/components/Calculator/Rate.tsx +34 -12
- package/src/components/Calculator/UnknownRate.tsx +24 -0
- package/src/components/Calculator/constants.ts +23 -1
- package/src/components/Calculator/renderCalculatorBlock.tsx +1 -1
- package/src/components/Calculator/renderDaysInput.tsx +36 -0
- package/src/components/Calculator/renderFootnote.tsx +7 -1
- package/src/components/Calculator/renderInterestPayment.tsx +40 -0
- package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +109 -0
- package/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +18 -1
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.tsx +2 -2
- package/src/components/SwipeListControlBlock/SwipeListControlBlockContent.ts +2 -5
- package/src/content-page-repository/transformPicture.ts +5 -1
- package/src/icons/IconName.ts +5 -1
- package/src/icons/PercentIcon.svg +373 -0
- package/src/ui-kit/Checkbox/Checkbox.tsx +37 -29
- package/src/ui-kit/Checkbox/CheckboxProps.ts +1 -0
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -1
- package/src/ui-kit/SwipeListControl/SwipeListControlContent.ts +17 -0
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -2
- package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +2 -9
- package/src/utils/addSpacesBetweenNumbers.ts +1 -1
- package/tailwind.config.cjs +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
|
|
5
|
+
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox.js';
|
|
6
|
+
import { CalculatorValueBlock } from './CalculatorValueBlock.js';
|
|
7
|
+
import { BUSINESS_DEFAULT_DAYS, BUSINESS_DEFAULT_SUM } from './constants.js';
|
|
8
|
+
import { Rate } from './Rate.js';
|
|
9
|
+
import { renderDaysInput } from './renderDaysInput.js';
|
|
10
|
+
import { renderFootnote } from './renderFootnote.js';
|
|
11
|
+
import { renderInterestPayment } from './renderInterestPayment.js';
|
|
12
|
+
import { renderWantedSumInput } from './renderWantedSumInput.js';
|
|
13
|
+
import { UnknownRate } from './UnknownRate.js';
|
|
14
|
+
import { useBusinessDepositCalculatorParams, } from './useBusinessDepositCalculatorParams.js';
|
|
15
|
+
export const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
|
|
16
|
+
const [moneyValue, setMoneyValue] = useState(BUSINESS_DEFAULT_SUM);
|
|
17
|
+
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
18
|
+
const [daysValue, setDaysValue] = useState(BUSINESS_DEFAULT_DAYS);
|
|
19
|
+
const handleDaysValue = useCallback((_) => setDaysValue(_), []);
|
|
20
|
+
const [isReplenished, toggleIsReplenished] = useState(false);
|
|
21
|
+
const handleIsReplenished = useCallback((_) => toggleIsReplenished(_), []);
|
|
22
|
+
const [isPartialWithdrawal, toggleIsPartialWithdrawal] = useState(false);
|
|
23
|
+
const handleIsPartialWithdrawal = useCallback((_) => toggleIsPartialWithdrawal(_), []);
|
|
24
|
+
const [isSmallBusiness, toggleIsSmallBusiness] = useState(false);
|
|
25
|
+
const handleIsSmallBusiness = useCallback((_) => toggleIsSmallBusiness(_), []);
|
|
26
|
+
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
27
|
+
const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
|
|
28
|
+
const userInputParams = {
|
|
29
|
+
moneyValue,
|
|
30
|
+
daysValue,
|
|
31
|
+
isReplenished,
|
|
32
|
+
isPartialWithdrawal,
|
|
33
|
+
isSmallBusiness,
|
|
34
|
+
isMonthlyInterestPayment,
|
|
35
|
+
};
|
|
36
|
+
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
37
|
+
const { income, finalSum, rate, depositeName } = calculatorParams;
|
|
38
|
+
return (_jsxs("section", { className: className, children: [_jsxs("div", { className: "flex justify-between", children: [_jsxs("div", { className: "w-[486px]", children: [renderWantedSumInput('Сумма вклада, ₽', calculatorParams, handleMoneyValue), renderDaysInput('Срок вклада, дни', calculatorParams, handleDaysValue), _jsxs("div", { className: "mt-7 flex justify-between", children: [renderBusinessDepositParamsForm({
|
|
39
|
+
...calculatorParams,
|
|
40
|
+
handleIsReplenished,
|
|
41
|
+
handleIsPartialWithdrawal,
|
|
42
|
+
handleIsSmallBusiness,
|
|
43
|
+
}), renderInterestPayment(isMonthlyInterestPayment, handleIsMonthlyInterestPayment, 'Выплата процентов')] })] }), rate ? (_jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" })) : (_jsx(UnknownRate, {})), _jsxs("div", { className: "w-full max-w-[350px]", children: [_jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), _jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), _jsx("div", { className: "mt-7", children: renderFootnote(footnote) })] })] }), _jsx("div", { className: "mt-5", children: renderFootnote(bottomFootnote) })] }));
|
|
44
|
+
});
|
|
45
|
+
const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (_jsxs("div", { children: [_jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit, checked: isReplenished, onChange: handleIsReplenished }), _jsx(Checkbox, { className: "mt-3", disabled: isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", checked: isPartialWithdrawal, onChange: handleIsPartialWithdrawal }), _jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", checked: isSmallBusiness, onChange: handleIsSmallBusiness })] }));
|
|
46
|
+
//# sourceMappingURL=BusinessDepositCalculatorForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BusinessDepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/BusinessDepositCalculatorForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAEL,kCAAkC,GACnC,MAAM,sCAAsC,CAAC;AAM9C,MAAM,CAAC,MAAM,6BAA6B,G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AC,qGAAqB,EAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAC,QAAG,GAAG,EAChF,oBAAoB,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EACvE,cAAK,SAAS,EAAC,MAAM,YAAE,cAAc,CAAC,QAAQ,CAAC,GAAO,IAClD,IACF,EACN,cAAK,SAAS,EAAC,MAAM,YAAE,cAAc,CAAC,cAAc,CAAC,GAAO,IACpD,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAQF,MAAM,+BAA+B,GAAG,CAAC,EACvC,0BAA0B,EAC1B,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACU,EAAE,EAAE,CAAC,CACpC,0BACE,KAAC,QAAQ,IACP,IAAI,EAAC,8DAAY,EACjB,QAAQ,EAAE,0BAA0B,EACpC,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,mBAAmB,GAC7B,EACF,KAAC,QAAQ,IACP,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAE,0BAA0B,EACpC,IAAI,EAAC,6FAAkB,EACvB,OAAO,EAAE,mBAAmB,EAC5B,QAAQ,EAAE,yBAAyB,GACnC,EACF,KAAC,QAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,oJAA4B,EACjC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,qBAAqB,GAC/B,IACE,CACP,CAAC"}
|
|
@@ -9,6 +9,12 @@ export declare type CommonCalculatorProps = Footnote & {
|
|
|
9
9
|
/** @title Адрес справочника */
|
|
10
10
|
sourceBookDir?: string;
|
|
11
11
|
};
|
|
12
|
+
export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
|
|
13
|
+
/** @title Сноска снизу блока */
|
|
14
|
+
bottomFootnote?: string;
|
|
15
|
+
/** @title Показывать название депозита */
|
|
16
|
+
isShowDepositeName?: boolean;
|
|
17
|
+
}
|
|
12
18
|
/**
|
|
13
19
|
* TODO: данные из справочника
|
|
14
20
|
**/
|
|
@@ -52,6 +58,13 @@ export declare type CreditCalculatorParamsDef = TitleProps & CommonCalculatorPro
|
|
|
52
58
|
export declare type DepositCalculatorParamsDef = TitleProps & DepositCalculatorParams & CommonCalculatorProps & {
|
|
53
59
|
calcType: 'DepositCalculatorForm';
|
|
54
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* @title Калькулятор вкладов - бизнес
|
|
63
|
+
* @default {"calcType": "BusinessDepositCalculatorForm"}
|
|
64
|
+
*/
|
|
65
|
+
export declare type BusinessDepositCalculatorParamsDef = TitleProps & DepositCalculatorParams & BusinessDepositCalculatorProps & {
|
|
66
|
+
calcType: 'BusinessDepositCalculatorForm';
|
|
67
|
+
};
|
|
55
68
|
/**
|
|
56
69
|
* @title Калькулятор бонусов
|
|
57
70
|
* @default {"calcType": "BonusCalculatorForm"}
|
|
@@ -62,7 +75,7 @@ export declare type BonusCalculatorParamsDef = TitleProps & CommonCalculatorProp
|
|
|
62
75
|
/**
|
|
63
76
|
* @title Настройки калькулятора
|
|
64
77
|
*/
|
|
65
|
-
export declare type CalculatorBlockDef = EmptyOption | CreditCalculatorParamsDef | DepositCalculatorParamsDef | BonusCalculatorParamsDef;
|
|
78
|
+
export declare type CalculatorBlockDef = EmptyOption | CreditCalculatorParamsDef | DepositCalculatorParamsDef | BusinessDepositCalculatorParamsDef | BonusCalculatorParamsDef;
|
|
66
79
|
/**
|
|
67
80
|
* @title Кнопка навигации
|
|
68
81
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
3
4
|
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
|
|
4
|
-
|
|
5
|
+
import { style } from '../../utils/style.js';
|
|
6
|
+
export const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (_jsxs("div", { className: style('mb-7', className), children: [title ? (_jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title })) : null, value ? (_jsx("div", { children: _jsxs(Text, { size: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] }) })) : (_jsx("div", { children: _jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
5
7
|
//# sourceMappingURL=CalculatorValueBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"CalculatorValueBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/CalculatorValueBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAU1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAC1D,eAAK,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,aACrC,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,wBACE,MAAC,IAAI,IAAC,IAAI,EAAC,SAAS,aACjB,MAAM,OAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAG,OAAO,IACzD,GACH,CACP,CAAC,CAAC,CAAC,CACF,wBACE,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,kBAAS,GACzB,CACP,IACG,CACP,CACF,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
4
4
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
|
|
5
5
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox.js';
|
|
6
6
|
import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup.js';
|
|
7
|
+
import { style } from '../../utils/style.js';
|
|
7
8
|
import { CalculatorValueBlock } from './CalculatorValueBlock.js';
|
|
8
9
|
import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants.js';
|
|
9
10
|
import { Rate } from './Rate.js';
|
|
@@ -41,6 +42,6 @@ export const CreditCalculatorForm = JSX(({ className = '', sourceBookDir, button
|
|
|
41
42
|
monthsValue,
|
|
42
43
|
};
|
|
43
44
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
|
|
44
|
-
return (_jsxs("section", { className: className, children: [_jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue), _jsxs("div", { className: "mt-7", children: [_jsx(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: isSalaryClient, onChange: toggleIsSalaryClient }), _jsx(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: isStateEmployee, onChange: toggleIsStateEmployee }), _jsx(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 })] })] }), _jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), _jsxs("div", { className: "w-full max-w-[350px]", children: [_jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), _jsx(RadioButtonGroup, { items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => toggleIsAnnuity(text === ANNUITY) }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
45
|
+
return (_jsxs("section", { className: style('flex justify-between', className), children: [_jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue), _jsxs("div", { className: "mt-7", children: [_jsx(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: isSalaryClient, onChange: toggleIsSalaryClient }), _jsx(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: isStateEmployee, onChange: toggleIsStateEmployee }), _jsx(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 })] })] }), _jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), _jsxs("div", { className: "w-full max-w-[350px]", children: [_jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), _jsx(RadioButtonGroup, { items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => toggleIsAnnuity(text === ANNUITY) }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
45
46
|
});
|
|
46
47
|
//# sourceMappingURL=CreditCalculatorForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/CreditCalculatorForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE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jD,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,oBAAoB,GAC9B,EACF,KAAC,QAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,6KAAiC,EACtC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,qBAAqB,GAC/B,EACF,KAAC,QAAQ,IACP,SAAS,EAAC,MAAM,EAChB,IAAI,EAAC,gKAA8B,EACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,iBAAiB,GAC3B,IACE,IACF,EACN,KAAC,IAAI,IACH,KAAK,EAAC,sCAAQ,EACd,IAAI,EAAE,gBAAgB,CAAC,SAAS,EAChC,kBAAkB,EAAC,kBAAkB,EACrC,IAAI,EAAC,GAAG,GACR,EACF,eAAK,SAAS,EAAC,sBAAsB,aACnC,KAAC,oBAAoB,IACnB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,uBAAuB,EACjE,KAAK,EAAE,gBAAgB,CAAC,cAAc,EACtC,OAAO,EAAC,QAAG,GACX,EACF,KAAC,gBAAgB,IACf,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAC/C,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,KAAK,OAAO,CAAC,GAC7D,EACD,oBAAoB,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EACtE,cAAc,CAAC,QAAQ,CAAC,IACrB,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -3,31 +3,21 @@ import { jsxs as _jsxs, jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
3
3
|
import { JSX } from '@redneckz/uni-jsx';
|
|
4
4
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
5
5
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
|
|
6
|
-
import {
|
|
6
|
+
import { style } from '../../utils/style.js';
|
|
7
7
|
import { CalculatorValueBlock } from './CalculatorValueBlock.js';
|
|
8
8
|
import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants.js';
|
|
9
9
|
import { Rate } from './Rate.js';
|
|
10
10
|
import { renderFootnote } from './renderFootnote.js';
|
|
11
|
+
import { renderInterestPayment } from './renderInterestPayment.js';
|
|
11
12
|
import { renderMonthsInput } from './renderMonthsInput.js';
|
|
12
13
|
import { renderWantedSumInput } from './renderWantedSumInput.js';
|
|
13
14
|
import { useDepositCalculatorParams } from './useDepositCalculatorParams.js';
|
|
14
|
-
const EVERY_MONTH = 'everyMonth';
|
|
15
|
-
const AT_END_TERM = 'atEndTerm';
|
|
16
|
-
const depositTypeItems = [
|
|
17
|
-
{
|
|
18
|
-
id: EVERY_MONTH,
|
|
19
|
-
text: 'Ежемесячно',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: AT_END_TERM,
|
|
23
|
-
text: 'В конце срока',
|
|
24
|
-
},
|
|
25
|
-
];
|
|
26
15
|
export const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
27
16
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
28
17
|
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
29
18
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
30
19
|
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
20
|
+
const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
|
|
31
21
|
const userInputParams = {
|
|
32
22
|
moneyValue,
|
|
33
23
|
monthsValue,
|
|
@@ -36,10 +26,10 @@ export const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, butto
|
|
|
36
26
|
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
37
27
|
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
38
28
|
const { income, finalSum, rate } = calculatorParams;
|
|
39
|
-
return (_jsxs("section", { className: className, children: [_jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
29
|
+
return (_jsxs("section", { className: style('flex justify-between', className), children: [_jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
40
30
|
...calculatorParams,
|
|
41
31
|
}, handleMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
|
|
42
32
|
...calculatorParams,
|
|
43
|
-
}, handleMonthsValue)] }), _jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), _jsxs("div", { className: "w-full max-w-[350px]", children: [income ? (_jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) : null, finalSum ? (_jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })) : null,
|
|
33
|
+
}, handleMonthsValue)] }), _jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), _jsxs("div", { className: "w-full max-w-[350px]", children: [income ? (_jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) : null, finalSum ? (_jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })) : null, renderInterestPayment(isMonthlyInterestPayment, handleIsMonthlyInterestPayment), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
44
34
|
});
|
|
45
35
|
//# sourceMappingURL=DepositCalculatorForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/DepositCalculatorForm.tsx"],"names":[],"mappings":";AAAA,OAAO;AAEP,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/DepositCalculatorForm.tsx"],"names":[],"mappings":";AAAA,OAAO;AAEP,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAM1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CACtC,CAAC,EAAE,SAAS,GAAG,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,EAAC,IAAI,EAAC,GAAG,GAAG,EACxE,eAAK,SAAS,EAAC,sBAAsB,aAClC,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,oBAAoB,IAAC,KAAK,EAAC,kFAAiB,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,QAAG,EAAC,MAAM,EAAC,GAAG,GAAG,CACvF,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,oBAAoB,IAAC,KAAK,EAAC,qGAAqB,EAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAC,QAAG,GAAG,CAClF,CAAC,CAAC,CAAC,IAAI,EACP,qBAAqB,CAAC,wBAAwB,EAAE,8BAA8B,CAAC,EAC/E,oBAAoB,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EACtE,cAAc,CAAC,QAAQ,CAAC,IACrB,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BonusCalculatorProps } from './BonusCalculatorForm';
|
|
2
|
+
import { BusinessDepositCalculatorProp } from './BusinessDepositCalculatorForm';
|
|
2
3
|
import { CreditCalculatorProp } from './CreditCalculatorForm';
|
|
3
4
|
import { DepositCalculatorProp } from './DepositCalculatorForm';
|
|
4
|
-
export declare type EmbeddableCalcProps = CreditCalculatorProp | DepositCalculatorProp | BonusCalculatorProps;
|
|
5
|
+
export declare type EmbeddableCalcProps = CreditCalculatorProp | DepositCalculatorProp | BusinessDepositCalculatorProp | BonusCalculatorProps;
|
|
5
6
|
export declare const EmbeddableCalcBlocks: {
|
|
6
7
|
CreditCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<CreditCalculatorProp, any, any>;
|
|
7
8
|
DepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<DepositCalculatorProp, any, any>;
|
|
9
|
+
BusinessDepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<BusinessDepositCalculatorProp, any, any>;
|
|
8
10
|
BonusCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<BonusCalculatorProps, any, any>;
|
|
9
11
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BonusCalculatorForm } from './BonusCalculatorForm.js';
|
|
2
|
+
import { BusinessDepositCalculatorForm, } from './BusinessDepositCalculatorForm.js';
|
|
2
3
|
import { CreditCalculatorForm } from './CreditCalculatorForm.js';
|
|
3
4
|
import { DepositCalculatorForm } from './DepositCalculatorForm.js';
|
|
4
5
|
export const EmbeddableCalcBlocks = {
|
|
5
6
|
CreditCalculatorForm,
|
|
6
7
|
DepositCalculatorForm,
|
|
8
|
+
BusinessDepositCalculatorForm,
|
|
7
9
|
BonusCalculatorForm,
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=EmbeddableCalcBlocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbeddableCalcBlocks.js","sourceRoot":"","sources":["../../../src/components/Calculator/EmbeddableCalcBlocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAwB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAyB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"EmbeddableCalcBlocks.js","sourceRoot":"","sources":["../../../src/components/Calculator/EmbeddableCalcBlocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,uBAAuB,CAAC;AAClF,OAAO,EACL,6BAA6B,GAE9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAwB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAyB,MAAM,yBAAyB,CAAC;AAQvF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,oBAAoB;IACpB,qBAAqB;IACrB,6BAA6B;IAC7B,mBAAmB;CACpB,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
|
|
3
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
4
|
+
import { style } from '../../utils/style.js';
|
|
5
|
+
export const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => (_jsxs("div", { children: [_jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), _jsxs("div", { className: "relative", children: [_jsxs("div", { className: "flex justify-start", children: [_jsx("span", { className: style('block gradient-color-text font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate).replace('.', ',') }), unit ? (_jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit })) : ('')] }), depositeName && isShowDepositeName ? (_jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
4
6
|
//# sourceMappingURL=Rate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAW1C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAC1F,0BACE,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,EACP,eAAK,SAAS,EAAC,UAAU,aACvB,eAAK,SAAS,EAAC,oBAAoB,aACjC,eACE,SAAS,EAAE,KAAK,CACd,kEAAkE,EAClE,kBAAkB,CACnB,YAEA,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,GAC1B,EACN,IAAI,CAAC,CAAC,CAAC,CACN,eAAM,SAAS,EAAC,gDAAgD,YAAE,IAAI,GAAQ,CAC/E,CAAC,CAAC,CAAC,CACF,EAAE,CACH,IACG,EACL,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACpC,cAAK,SAAS,EAAC,wDAAwD,YACpE,YAAY,GACT,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { Img } from '../../ui-kit/Img/Img.js';
|
|
4
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph.js';
|
|
5
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
6
|
+
export const UnknownRate = JSX(({ title = 'Ставка' }) => (_jsxs("div", { children: [_jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), _jsx("div", { className: "mt-1 pt-1 pl-5 pb-1.5", children: _jsx(Img, { image: { icon: 'PercentIcon' }, width: "90", height: "85", asSVG: true }) }), _jsx("div", { className: "w-[250px] mt-3.5", children: _jsxs(Paragraph, { size: "text-xl-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", _jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
|
|
7
|
+
//# sourceMappingURL=UnknownRate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownRate.js","sourceRoot":"","sources":["../../../src/components/Calculator/UnknownRate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAM9C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,GAAG,QAAQ,EAAE,EAAE,EAAE,CAAC,CACzE,0BACE,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,EACP,cAAK,SAAS,EAAC,uBAAuB,YACpC,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,GAChE,EACN,cAAK,SAAS,EAAC,kBAAkB,YAC/B,MAAC,SAAS,IAAC,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,mBAAmB,qKAC3B,6DAA0B,6MAC5C,GACR,IACF,CACP,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BonusCalculatorSourceBookParams } from './useBonusCalculatorParams';
|
|
2
|
+
import { BusinessDepositCalculatorSourceBookParams } from './useBusinessDepositCalculatorParams';
|
|
2
3
|
import { CreditCalculatorSourceBookParams } from './useCreditCalculatorParams';
|
|
3
4
|
import { DepositCalculatorSourceBookParams } from './useDepositCalculatorParams';
|
|
4
5
|
export declare const DEFAULT_MIN_SUM = 60000;
|
|
@@ -7,6 +8,13 @@ export declare const DEFAULT_SUM: number;
|
|
|
7
8
|
export declare const DEFAULT_MIN_MONTHS = 13;
|
|
8
9
|
export declare const DEFAULT_MAX_MONTHS = 60;
|
|
9
10
|
export declare const DEFAULT_MONTHS: number;
|
|
11
|
+
export declare const BUSINESS_DEFAULT_SUM = 100000;
|
|
12
|
+
export declare const BUSINESS_MIN_DAYS = 1;
|
|
13
|
+
export declare const BUSINESS_MAX_DAYS = 1095;
|
|
14
|
+
export declare const BUSINESS_RATE_MIN_DAYS = 30;
|
|
15
|
+
export declare const BUSINESS_OPERATING_MIN_DAYS = 90;
|
|
16
|
+
export declare const BUSINESS_OPERATING_MAX_DAYS = 730;
|
|
17
|
+
export declare const BUSINESS_DEFAULT_DAYS = 90;
|
|
10
18
|
export declare const MONTHS_IN_YEAR = 12;
|
|
11
19
|
export declare const MONTHLY_INTEREST_RATE: number;
|
|
12
20
|
export declare const DEFAULT_CREDIT_CALCULATOR_PARAMS: CreditCalculatorSourceBookParams;
|
|
@@ -14,6 +22,8 @@ export declare const DEFAULT_TRAVEL_MIN_SUM = 6000;
|
|
|
14
22
|
export declare const DEFAULT_REST_MIN_SUM = 6000;
|
|
15
23
|
export declare const DEFAULT_BONUS_CALCULATOR_PARAMS: BonusCalculatorSourceBookParams;
|
|
16
24
|
export declare const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams;
|
|
25
|
+
export declare const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS: BusinessDepositCalculatorSourceBookParams;
|
|
17
26
|
export declare const CREDIT_CALC_DEFAULT_DIR = "credit-calculator-data";
|
|
18
27
|
export declare const BONUS_CALC_DEFAULT_DIR = "bonus-calculator-data";
|
|
19
28
|
export declare const DEPOSIT_CALC_DEFAULT_DIR = "deposit-calculator-data";
|
|
29
|
+
export declare const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = "business-calculator-data";
|
|
@@ -4,6 +4,13 @@ export const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
|
|
|
4
4
|
export const DEFAULT_MIN_MONTHS = 13;
|
|
5
5
|
export const DEFAULT_MAX_MONTHS = 60;
|
|
6
6
|
export const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
|
|
7
|
+
export const BUSINESS_DEFAULT_SUM = 100000;
|
|
8
|
+
export const BUSINESS_MIN_DAYS = 1;
|
|
9
|
+
export const BUSINESS_MAX_DAYS = 1095;
|
|
10
|
+
export const BUSINESS_RATE_MIN_DAYS = 30; // порог количества дней, при которых ставка не доступна
|
|
11
|
+
export const BUSINESS_OPERATING_MIN_DAYS = 90;
|
|
12
|
+
export const BUSINESS_OPERATING_MAX_DAYS = 730;
|
|
13
|
+
export const BUSINESS_DEFAULT_DAYS = 90;
|
|
7
14
|
export const MONTHS_IN_YEAR = 12;
|
|
8
15
|
export const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR * 100;
|
|
9
16
|
export const DEFAULT_CREDIT_CALCULATOR_PARAMS = {
|
|
@@ -40,7 +47,20 @@ export const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
|
|
|
40
47
|
rate: 5.9,
|
|
41
48
|
isMonthlyInterestPayment: true,
|
|
42
49
|
};
|
|
50
|
+
export const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
51
|
+
minSum: 1000,
|
|
52
|
+
maxSum: 500000,
|
|
53
|
+
minDays: BUSINESS_MIN_DAYS,
|
|
54
|
+
maxDays: BUSINESS_MAX_DAYS,
|
|
55
|
+
rate: 5.9,
|
|
56
|
+
isMonthlyInterestPayment: true,
|
|
57
|
+
isReplenished: false,
|
|
58
|
+
isPartialWithdrawal: false,
|
|
59
|
+
isSmallBusiness: false,
|
|
60
|
+
depositeName: "Депозит 'Стабильный'",
|
|
61
|
+
};
|
|
43
62
|
export const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
|
|
44
63
|
export const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
|
|
45
64
|
export const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
|
|
65
|
+
export const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = 'business-calculator-data';
|
|
46
66
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,CAAC,wDAAwD;AAClG,MAAM,CAAC,MAAM,2BAA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AAE,iBAAiB;IAC1B,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,GAAG;IACT,wBAAwB,EAAE,IAAI;IAC9B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAEJ,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,wBAAwB,GAAG,yBAAyB,CAAC;AAClE,MAAM,CAAC,MAAM,iCAAiC,GAAG,0BAA0B,CAAC"}
|
|
@@ -7,6 +7,6 @@ export const renderCalculatorBlock = (block, i) => {
|
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
9
|
const EmbeddedBlock = EmbeddableCalcBlocks[type];
|
|
10
|
-
return (_jsx("section", { className: "box-border relative bg-white flex shrink-0 self-start basis-full", role: "listitem", children: _jsxs("div", { className: "box-border p-9 w-full", children: [block?.title ? _jsx(Heading, { className: "text-center mb-6", title: block.title }) : null, _jsx(EmbeddedBlock, { ...block
|
|
10
|
+
return (_jsx("section", { className: "box-border relative bg-white flex shrink-0 self-start basis-full", role: "listitem", children: _jsxs("div", { className: "box-border p-9 w-full", children: [block?.title ? _jsx(Heading, { className: "text-center mb-6", title: block.title }) : null, _jsx(EmbeddedBlock, { ...block })] }) }, String(i)));
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=renderCalculatorBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderCalculatorBlock.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderCalculatorBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAA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AAC,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EACnF,KAAC,aAAa,OAAK,KAAK,GAAI,IACxB,IAPD,MAAM,CAAC,CAAC,CAAC,CAQN,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RenderDaysInputParams {
|
|
3
|
+
minDays: number;
|
|
4
|
+
maxDays: number;
|
|
5
|
+
daysValue: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function renderDaysInput(title: string, params: RenderDaysInputParams, callback?: (value: number) => void): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
|
|
3
|
+
import { clamp } from '../../utils/clamp.js';
|
|
4
|
+
const STEP_DAYS = 1;
|
|
5
|
+
export function renderDaysInput(title, params, callback) {
|
|
6
|
+
const { minDays, maxDays, daysValue } = params;
|
|
7
|
+
const daysText = (days) => {
|
|
8
|
+
const text = Number(days) % 10 === 1 ? 'дня' : 'дней';
|
|
9
|
+
return `${days} ${text}`;
|
|
10
|
+
};
|
|
11
|
+
return (_jsx(InputRange, { className: "mt-7", title: title, items: [`От ${daysText(minDays)}`, `До ${daysText(maxDays)}`], min: minDays, max: maxDays, step: STEP_DAYS, value: clamp(daysValue, minDays, maxDays), onChange: callback }));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=renderDaysInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderDaysInput.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderDaysInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,SAAS,GAAG,CAAC,CAAC;AAQpB,MAAM,UAAU,eAAe,CAC7B,KAAa,EACb,MAA6B,EAC7B,QAAkC;IAElC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC/C,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE;QAChC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QAEtD,OAAO,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,SAAS,EAAC,MAAM,EAChB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAC7D,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EACzC,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph.js';
|
|
3
|
+
export const renderFootnote = (text) => text ? (_jsx(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: text })) : null;
|
|
3
4
|
//# sourceMappingURL=renderFootnote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderFootnote.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderFootnote.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAa,EAAE,EAAE,CAC9C,IAAI,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"renderFootnote.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderFootnote.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAa,EAAE,EAAE,CAC9C,IAAI,CAAC,CAAC,CAAC,CACL,KAAC,SAAS,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YACvD,IAAI,GACK,CACb,CAAC,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup.js';
|
|
3
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
4
|
+
const EVERY_MONTH = 'everyMonth';
|
|
5
|
+
const AT_END_TERM = 'atEndTerm';
|
|
6
|
+
const depositTypeItems = [
|
|
7
|
+
{
|
|
8
|
+
id: EVERY_MONTH,
|
|
9
|
+
text: 'Ежемесячно',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: AT_END_TERM,
|
|
13
|
+
text: 'В конце срока',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
export function renderInterestPayment(isMonthlyInterestPayment, callback, title) {
|
|
17
|
+
return (_jsxs("div", { children: [title ? (_jsx(Text, { color: "text-secondary-text", font: "font-light", children: title })) : null, _jsx("div", { className: "mt-3", children: _jsx(RadioButtonGroup, { items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => callback && callback(text === EVERY_MONTH) }) })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=renderInterestPayment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderInterestPayment.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderInterestPayment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEhC,MAAM,gBAAgB,GAAG;IACvB;QACE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,YAAY;KACnB;IACD;QACE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,eAAe;KACtB;CACF,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,wBAAiC,EACjC,QAAmC,EACnC,KAAc;IAEd,OAAO,CACL,0BACG,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,YAAY,YAChD,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EAER,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,gBAAgB,IACf,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,wBAAwB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EACjE,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,CAAC,GACtE,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CommonDepositParams } from './useDepositCalculatorParams';
|
|
2
|
+
export interface BusinessCommonDepositParams extends CommonDepositParams {
|
|
3
|
+
isReplenished: boolean;
|
|
4
|
+
isPartialWithdrawal: boolean;
|
|
5
|
+
isSmallBusiness: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface BusinessDepositCalculatorSourceBookParams extends BusinessCommonDepositParams {
|
|
8
|
+
minSum: number;
|
|
9
|
+
maxSum: number;
|
|
10
|
+
minDays: number;
|
|
11
|
+
maxDays: number;
|
|
12
|
+
depositeName: string;
|
|
13
|
+
rate: number;
|
|
14
|
+
}
|
|
15
|
+
export interface BusinessDepositCalculatorUserInputParams extends BusinessCommonDepositParams {
|
|
16
|
+
moneyValue: number;
|
|
17
|
+
daysValue: number;
|
|
18
|
+
}
|
|
19
|
+
export interface BusinessDepositCalculatorParams extends BusinessDepositCalculatorSourceBookParams, BusinessDepositCalculatorUserInputParams {
|
|
20
|
+
income?: number;
|
|
21
|
+
finalSum?: number;
|
|
22
|
+
isDisabledOperatingDeposit?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare type BusinessDepositCalculatorData = {
|
|
25
|
+
rows: BusinessDepositCalculatorSourceBookParams[];
|
|
26
|
+
};
|
|
27
|
+
export declare const useBusinessDepositCalculatorParams: (userInputParams: BusinessDepositCalculatorUserInputParams, sourceBookDir?: string) => BusinessDepositCalculatorParams;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BUSINESS_DEPOSIT_CALC_DEFAULT_DIR, BUSINESS_OPERATING_MAX_DAYS, BUSINESS_OPERATING_MIN_DAYS, BUSINESS_RATE_MIN_DAYS, DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS, } from './constants.js';
|
|
2
|
+
import { useCalculatorParams } from './useCalculatorParams.js';
|
|
3
|
+
export const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
4
|
+
const { daysValue, moneyValue, isPartialWithdrawal, isReplenished, isSmallBusiness, isMonthlyInterestPayment, } = userInputParams;
|
|
5
|
+
const data = useCalculatorParams(sourceBookDir || BUSINESS_DEPOSIT_CALC_DEFAULT_DIR);
|
|
6
|
+
const isOperatingDeposit = isReplenished || isPartialWithdrawal;
|
|
7
|
+
const isDisabledOperatingDeposit = daysValue < BUSINESS_OPERATING_MIN_DAYS || daysValue > BUSINESS_OPERATING_MAX_DAYS;
|
|
8
|
+
if (daysValue <= BUSINESS_RATE_MIN_DAYS) {
|
|
9
|
+
return {
|
|
10
|
+
...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
|
|
11
|
+
...userInputParams,
|
|
12
|
+
isDisabledOperatingDeposit,
|
|
13
|
+
rate: 0,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const businessDepositCalculatorSourceBookParams = data?.rows?.find((_) => {
|
|
17
|
+
return (isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
18
|
+
isSmallBusiness === _.isSmallBusiness &&
|
|
19
|
+
(isOperatingDeposit
|
|
20
|
+
? _.isReplenished && _.isPartialWithdrawal
|
|
21
|
+
: !_.isReplenished && !_.isPartialWithdrawal));
|
|
22
|
+
}) || DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS;
|
|
23
|
+
const { rate } = businessDepositCalculatorSourceBookParams;
|
|
24
|
+
const income = getDepositIncome(rate, userInputParams);
|
|
25
|
+
const finalSum = moneyValue + income;
|
|
26
|
+
return {
|
|
27
|
+
...businessDepositCalculatorSourceBookParams,
|
|
28
|
+
...userInputParams,
|
|
29
|
+
isDisabledOperatingDeposit,
|
|
30
|
+
income,
|
|
31
|
+
finalSum,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const getDepositIncome = (rate, userInputParams) => {
|
|
35
|
+
const { isMonthlyInterestPayment, moneyValue, daysValue } = userInputParams;
|
|
36
|
+
/*
|
|
37
|
+
Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
|
|
38
|
+
*/
|
|
39
|
+
if (isMonthlyInterestPayment) {
|
|
40
|
+
return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, daysValue / 30) - moneyValue);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return Math.round((moneyValue * rate * daysValue) / 365 / 100);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=useBusinessDepositCalculatorParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBusinessDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useBusinessDepositCalculatorParams.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,0CAA0C,GAC3C,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAkC5D,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,eAAyD,EACzD,aAAsB,EACW,EAAE;IACnC,MAAM,EACJ,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,wBAAwB,GACzB,GAAG,eAAe,CAAC;IACpB,MAAM,IAAI,GAAG,mBAAmB,CAC9B,aAAa,IAAI,iCAAiC,CACnD,CAAC;IAEF,MAAM,kBAAkB,GAAG,aAAa,IAAI,mBAAmB,CAAC;IAChE,MAAM,0BAA0B,GAC9B,SAAS,GAAG,2BAA2B,IAAI,SAAS,GAAG,2BAA2B,CAAC;IAErF,IAAI,SAAS,IAAI,sBAAsB,EAAE;QACvC,OAAO;YACL,GAAG,0CAA0C;YAC7C,GAAG,eAAe;YAClB,0BAA0B;YAC1B,IAAI,EAAE,CAAC;SACR,CAAC;KACH;IACD,MAAM,yCAAyC,GAC7C,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QACrB,OAAO,CACL,wBAAwB,KAAK,CAAC,CAAC,wBAAwB;YACvD,eAAe,KAAK,CAAC,CAAC,eAAe;YACrC,CAAC,kBAAkB;gBACjB,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,mBAAmB;gBAC1C,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAChD,CAAC;IACJ,CAAC,CAAC,IAAI,0CAA0C,CAAC;IAEnD,MAAM,EAAE,IAAI,EAAE,GAAG,yCAAyC,CAAC;IAE3D,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAErC,OAAO;QACL,GAAG,yCAAyC;QAC5C,GAAG,eAAe;QAClB,0BAA0B;QAC1B,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,IAAY,EACZ,eAAyD,EACzD,EAAE;IACF,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,eAAe,CAAC;IAE5E;;MAEE;IACF,IAAI,wBAAwB,EAAE;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;KAC7F;SAAM;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;KAChE;AACH,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { useCalculatorParams } from './useCalculatorParams.js';
|
|
|
3
3
|
export const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
4
4
|
const { isMonthlyInterestPayment, moneyValue } = userInputParams;
|
|
5
5
|
const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
|
|
6
|
-
const depositCalculatorSourceBookParams = data?.rows
|
|
6
|
+
const depositCalculatorSourceBookParams = data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment) ||
|
|
7
7
|
DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
8
8
|
const { rate } = depositCalculatorSourceBookParams;
|
|
9
9
|
const income = getDepositIncome(rate, userInputParams);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useDepositCalculatorParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA6B5D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,eAAiD,EACjD,aAAsB,EACG,EAAE;IAC3B,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC;IAEjE,MAAM,IAAI,GAAG,mBAAmB,CAC9B,aAAa,IAAI,wBAAwB,CAC1C,CAAC;IAEF,MAAM,iCAAiC,GACrC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"useDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useDepositCalculatorParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA6B5D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,eAAiD,EACjD,aAAsB,EACG,EAAE;IAC3B,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC;IAEjE,MAAM,IAAI,GAAG,mBAAmB,CAC9B,aAAa,IAAI,wBAAwB,CAC1C,CAAC;IAEF,MAAM,iCAAiC,GACrC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,wBAAwB,KAAK,CAAC,CAAC,wBAAwB,CAAC;QAChF,iCAAiC,CAAC;IAEpC,MAAM,EAAE,IAAI,EAAE,GAAG,iCAAiC,CAAC;IAEnD,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAErC,OAAO,EAAE,GAAG,iCAAiC,EAAE,GAAG,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACxF,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,eAAiD,EAAE,EAAE;IAC3F,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;IAE9E,IAAI,wBAAwB,EAAE;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,CAAC;KAC1F;SAAM;QACL;;UAEE;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;KACvE;AACH,CAAC,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { renderChildren } from '../../BlockRenderer/renderChildren.js';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
5
5
|
import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl.js';
|
|
6
|
-
export const SwipeListControlBlock = JSX(({
|
|
7
|
-
return (_jsx(BlockWrapper, { ...rest, children: _jsx(SwipeListControl, {
|
|
6
|
+
export const SwipeListControlBlock = JSX(({ listType, showDots, options, ...rest }) => {
|
|
7
|
+
return (_jsx(BlockWrapper, { ...rest, children: _jsx(SwipeListControl, { listType: listType, showDots: showDots, children: renderChildren({ ...rest, options }) }) }));
|
|
8
8
|
});
|
|
9
9
|
SwipeListControlBlock.childrenTypes = {
|
|
10
10
|
exclude: ['SwipeListControlBlock'],
|