@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,133 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
|
+
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
|
+
import type { BusinessDepositCalculatorProps } from './CalculatorContent';
|
|
6
|
+
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
7
|
+
import { BUSINESS_DEFAULT_DAYS, BUSINESS_DEFAULT_SUM } from './constants';
|
|
8
|
+
import { Rate } from './Rate';
|
|
9
|
+
import { renderDaysInput } from './renderDaysInput';
|
|
10
|
+
import { renderFootnote } from './renderFootnote';
|
|
11
|
+
import { renderInterestPayment } from './renderInterestPayment';
|
|
12
|
+
import { renderWantedSumInput } from './renderWantedSumInput';
|
|
13
|
+
import { UnknownRate } from './UnknownRate';
|
|
14
|
+
import {
|
|
15
|
+
BusinessDepositCalculatorParams,
|
|
16
|
+
useBusinessDepositCalculatorParams,
|
|
17
|
+
} from './useBusinessDepositCalculatorParams';
|
|
18
|
+
|
|
19
|
+
export interface BusinessDepositCalculatorProp extends BusinessDepositCalculatorProps {
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const BusinessDepositCalculatorForm = JSX<BusinessDepositCalculatorProp>(
|
|
24
|
+
({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
|
|
25
|
+
const [moneyValue, setMoneyValue] = useState(BUSINESS_DEFAULT_SUM);
|
|
26
|
+
const handleMoneyValue = useCallback((_: number) => setMoneyValue(_), []);
|
|
27
|
+
const [daysValue, setDaysValue] = useState(BUSINESS_DEFAULT_DAYS);
|
|
28
|
+
const handleDaysValue = useCallback((_: number) => setDaysValue(_), []);
|
|
29
|
+
const [isReplenished, toggleIsReplenished] = useState(false);
|
|
30
|
+
const handleIsReplenished = useCallback((_: boolean) => toggleIsReplenished(_), []);
|
|
31
|
+
const [isPartialWithdrawal, toggleIsPartialWithdrawal] = useState(false);
|
|
32
|
+
const handleIsPartialWithdrawal = useCallback((_: boolean) => toggleIsPartialWithdrawal(_), []);
|
|
33
|
+
const [isSmallBusiness, toggleIsSmallBusiness] = useState(false);
|
|
34
|
+
const handleIsSmallBusiness = useCallback((_: boolean) => toggleIsSmallBusiness(_), []);
|
|
35
|
+
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
36
|
+
const handleIsMonthlyInterestPayment = useCallback(
|
|
37
|
+
(_: boolean) => toggleIsMonthlyInterestPayment(_),
|
|
38
|
+
[],
|
|
39
|
+
);
|
|
40
|
+
const userInputParams = {
|
|
41
|
+
moneyValue,
|
|
42
|
+
daysValue,
|
|
43
|
+
isReplenished,
|
|
44
|
+
isPartialWithdrawal,
|
|
45
|
+
isSmallBusiness,
|
|
46
|
+
isMonthlyInterestPayment,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
50
|
+
const { income, finalSum, rate, depositeName } = calculatorParams;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<section className={className}>
|
|
54
|
+
<div className="flex justify-between">
|
|
55
|
+
<div className="w-[486px]">
|
|
56
|
+
{renderWantedSumInput('Сумма вклада, ₽', calculatorParams, handleMoneyValue)}
|
|
57
|
+
{renderDaysInput('Срок вклада, дни', calculatorParams, handleDaysValue)}
|
|
58
|
+
<div className="mt-7 flex justify-between">
|
|
59
|
+
{renderBusinessDepositParamsForm({
|
|
60
|
+
...calculatorParams,
|
|
61
|
+
handleIsReplenished,
|
|
62
|
+
handleIsPartialWithdrawal,
|
|
63
|
+
handleIsSmallBusiness,
|
|
64
|
+
})}
|
|
65
|
+
{renderInterestPayment(
|
|
66
|
+
isMonthlyInterestPayment,
|
|
67
|
+
handleIsMonthlyInterestPayment,
|
|
68
|
+
'Выплата процентов',
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
{rate ? (
|
|
73
|
+
<Rate
|
|
74
|
+
rate={rate}
|
|
75
|
+
depositeName={depositeName}
|
|
76
|
+
isShowDepositeName={isShowDepositeName}
|
|
77
|
+
rateBlockClassName="tracking-[-25px]"
|
|
78
|
+
unit="%"
|
|
79
|
+
/>
|
|
80
|
+
) : (
|
|
81
|
+
<UnknownRate />
|
|
82
|
+
)}
|
|
83
|
+
|
|
84
|
+
<div className="w-full max-w-[350px]">
|
|
85
|
+
<CalculatorValueBlock title="Доход по вкладу" value={income} postfix="₽" prefix="+" />
|
|
86
|
+
<CalculatorValueBlock title="Сумма в конце срока" value={finalSum} postfix="₽" />
|
|
87
|
+
{renderButtonsSection(buttons, { className: 'mt-7', isVertical: true })}
|
|
88
|
+
<div className="mt-7">{renderFootnote(footnote)}</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div className="mt-5">{renderFootnote(bottomFootnote)}</div>
|
|
92
|
+
</section>
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
interface BusinessDepositParamsFormProps extends BusinessDepositCalculatorParams {
|
|
98
|
+
handleIsReplenished?: (value: boolean) => void;
|
|
99
|
+
handleIsPartialWithdrawal?: (value: boolean) => void;
|
|
100
|
+
handleIsSmallBusiness?: (value: boolean) => void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const renderBusinessDepositParamsForm = ({
|
|
104
|
+
isDisabledOperatingDeposit,
|
|
105
|
+
isReplenished,
|
|
106
|
+
isPartialWithdrawal,
|
|
107
|
+
isSmallBusiness,
|
|
108
|
+
handleIsReplenished,
|
|
109
|
+
handleIsPartialWithdrawal,
|
|
110
|
+
handleIsSmallBusiness,
|
|
111
|
+
}: BusinessDepositParamsFormProps) => (
|
|
112
|
+
<div>
|
|
113
|
+
<Checkbox
|
|
114
|
+
text="Пополнение"
|
|
115
|
+
disabled={isDisabledOperatingDeposit}
|
|
116
|
+
checked={isReplenished}
|
|
117
|
+
onChange={handleIsReplenished}
|
|
118
|
+
/>
|
|
119
|
+
<Checkbox
|
|
120
|
+
className="mt-3"
|
|
121
|
+
disabled={isDisabledOperatingDeposit}
|
|
122
|
+
text="Частичное снятие"
|
|
123
|
+
checked={isPartialWithdrawal}
|
|
124
|
+
onChange={handleIsPartialWithdrawal}
|
|
125
|
+
/>
|
|
126
|
+
<Checkbox
|
|
127
|
+
className="mt-3"
|
|
128
|
+
text="Являюсь малым предприятием"
|
|
129
|
+
checked={isSmallBusiness}
|
|
130
|
+
onChange={handleIsSmallBusiness}
|
|
131
|
+
/>
|
|
132
|
+
</div>
|
|
133
|
+
);
|
|
@@ -4,6 +4,7 @@ import { Calculator } from './Calculator';
|
|
|
4
4
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
import type {
|
|
6
6
|
BonusCalculatorParamsDef,
|
|
7
|
+
BusinessDepositCalculatorParamsDef,
|
|
7
8
|
CreditCalculatorParamsDef,
|
|
8
9
|
DepositCalculatorParamsDef,
|
|
9
10
|
} from './CalculatorContent';
|
|
@@ -26,6 +27,9 @@ const buttons: ButtonWithIconProps[] = [
|
|
|
26
27
|
const footnote =
|
|
27
28
|
'Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка. ';
|
|
28
29
|
|
|
30
|
+
const bottomFootnote =
|
|
31
|
+
'При сумме свыше 500 000 000 ₽ вы можете обратится в офис за индивидуальными условиями по вкладу';
|
|
32
|
+
|
|
29
33
|
const CREDIT_CALCULATOR_BLOCK: CreditCalculatorParamsDef = {
|
|
30
34
|
calcType: 'CreditCalculatorForm',
|
|
31
35
|
buttons: buttons,
|
|
@@ -38,6 +42,14 @@ const DEPOSIT_CALCULATOR_BLOCK: DepositCalculatorParamsDef = {
|
|
|
38
42
|
footnote,
|
|
39
43
|
};
|
|
40
44
|
|
|
45
|
+
const BUSINESS_DEPOSIT_CALCULATOR_BLOCK: BusinessDepositCalculatorParamsDef = {
|
|
46
|
+
calcType: 'BusinessDepositCalculatorForm',
|
|
47
|
+
buttons: buttons,
|
|
48
|
+
isShowDepositeName: true,
|
|
49
|
+
footnote,
|
|
50
|
+
bottomFootnote,
|
|
51
|
+
};
|
|
52
|
+
|
|
41
53
|
const BONUS_CALCULATOR_BLOCK: BonusCalculatorParamsDef = {
|
|
42
54
|
title: 'Обменивайте баллы на путешествия',
|
|
43
55
|
calcType: 'BonusCalculatorForm',
|
|
@@ -94,4 +106,21 @@ export default {
|
|
|
94
106
|
/>
|
|
95
107
|
</div>
|
|
96
108
|
),
|
|
109
|
+
business: (
|
|
110
|
+
<div className="container grid grid-cols-12">
|
|
111
|
+
<Calculator
|
|
112
|
+
className="col-span-12"
|
|
113
|
+
calculatorTabs={[
|
|
114
|
+
{
|
|
115
|
+
nav: {
|
|
116
|
+
title: 'Кредит на любые цели',
|
|
117
|
+
description: 'Ставка от 5,5% до 5 лет',
|
|
118
|
+
icon: { icon: 'CalendarIcon' },
|
|
119
|
+
},
|
|
120
|
+
calculatorBlock: BUSINESS_DEPOSIT_CALCULATOR_BLOCK,
|
|
121
|
+
},
|
|
122
|
+
]}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
),
|
|
97
126
|
};
|
|
@@ -11,6 +11,13 @@ export type CommonCalculatorProps = Footnote & {
|
|
|
11
11
|
sourceBookDir?: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
|
|
15
|
+
/** @title Сноска снизу блока */
|
|
16
|
+
bottomFootnote?: string;
|
|
17
|
+
/** @title Показывать название депозита */
|
|
18
|
+
isShowDepositeName?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
/**
|
|
15
22
|
* TODO: данные из справочника
|
|
16
23
|
**/
|
|
@@ -61,6 +68,16 @@ export type DepositCalculatorParamsDef = TitleProps &
|
|
|
61
68
|
calcType: 'DepositCalculatorForm';
|
|
62
69
|
};
|
|
63
70
|
|
|
71
|
+
/**
|
|
72
|
+
* @title Калькулятор вкладов - бизнес
|
|
73
|
+
* @default {"calcType": "BusinessDepositCalculatorForm"}
|
|
74
|
+
*/
|
|
75
|
+
export type BusinessDepositCalculatorParamsDef = TitleProps &
|
|
76
|
+
DepositCalculatorParams &
|
|
77
|
+
BusinessDepositCalculatorProps & {
|
|
78
|
+
calcType: 'BusinessDepositCalculatorForm';
|
|
79
|
+
};
|
|
80
|
+
|
|
64
81
|
/**
|
|
65
82
|
* @title Калькулятор бонусов
|
|
66
83
|
* @default {"calcType": "BonusCalculatorForm"}
|
|
@@ -77,6 +94,7 @@ export type CalculatorBlockDef =
|
|
|
77
94
|
| EmptyOption
|
|
78
95
|
| CreditCalculatorParamsDef
|
|
79
96
|
| DepositCalculatorParamsDef
|
|
97
|
+
| BusinessDepositCalculatorParamsDef
|
|
80
98
|
| BonusCalculatorParamsDef;
|
|
81
99
|
|
|
82
100
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
2
3
|
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
4
|
+
import { style } from '../../utils/style';
|
|
3
5
|
|
|
4
6
|
export interface CalculatorValueBlockProps {
|
|
5
7
|
title?: string;
|
|
@@ -11,13 +13,23 @@ export interface CalculatorValueBlockProps {
|
|
|
11
13
|
|
|
12
14
|
export const CalculatorValueBlock = JSX<CalculatorValueBlockProps>(
|
|
13
15
|
({ title, value, postfix = '', prefix, className = '' }) => (
|
|
14
|
-
<div className={
|
|
15
|
-
{title ?
|
|
16
|
+
<div className={style('mb-7', className)}>
|
|
17
|
+
{title ? (
|
|
18
|
+
<Text size="text-l-light" color="text-secondary-text">
|
|
19
|
+
{title}
|
|
20
|
+
</Text>
|
|
21
|
+
) : null}
|
|
16
22
|
{value ? (
|
|
17
|
-
<div
|
|
18
|
-
|
|
23
|
+
<div>
|
|
24
|
+
<Text size="text-h3">
|
|
25
|
+
{prefix} {addSpacesBetweenNumbers(Math.round(value))} {postfix}
|
|
26
|
+
</Text>
|
|
19
27
|
</div>
|
|
20
|
-
) :
|
|
28
|
+
) : (
|
|
29
|
+
<div>
|
|
30
|
+
<Text size="text-h3">-</Text>
|
|
31
|
+
</div>
|
|
32
|
+
)}
|
|
21
33
|
</div>
|
|
22
34
|
),
|
|
23
35
|
);
|
|
@@ -3,6 +3,7 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
4
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
5
|
import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
|
|
6
|
+
import { style } from '../../utils/style';
|
|
6
7
|
import type { CommonCalculatorProps } from './CalculatorContent';
|
|
7
8
|
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
8
9
|
import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants';
|
|
@@ -51,7 +52,7 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
|
51
52
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
|
-
<section className={className}>
|
|
55
|
+
<section className={style('flex justify-between', className)}>
|
|
55
56
|
<div className="w-[468px]">
|
|
56
57
|
{renderWantedSumInput(
|
|
57
58
|
'Сумма кредита, ₽',
|
|
@@ -3,12 +3,13 @@
|
|
|
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';
|
|
6
|
-
import {
|
|
6
|
+
import { style } from '../../utils/style';
|
|
7
7
|
import { CommonCalculatorProps, DepositCalculatorParams } from './CalculatorContent';
|
|
8
8
|
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
9
9
|
import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants';
|
|
10
10
|
import { Rate } from './Rate';
|
|
11
11
|
import { renderFootnote } from './renderFootnote';
|
|
12
|
+
import { renderInterestPayment } from './renderInterestPayment';
|
|
12
13
|
import { renderMonthsInput } from './renderMonthsInput';
|
|
13
14
|
import { renderWantedSumInput } from './renderWantedSumInput';
|
|
14
15
|
import { useDepositCalculatorParams } from './useDepositCalculatorParams';
|
|
@@ -17,26 +18,16 @@ export interface DepositCalculatorProp extends DepositCalculatorParams, CommonCa
|
|
|
17
18
|
className?: string;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
const EVERY_MONTH = 'everyMonth';
|
|
21
|
-
const AT_END_TERM = 'atEndTerm';
|
|
22
|
-
|
|
23
|
-
const depositTypeItems = [
|
|
24
|
-
{
|
|
25
|
-
id: EVERY_MONTH,
|
|
26
|
-
text: 'Ежемесячно',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: AT_END_TERM,
|
|
30
|
-
text: 'В конце срока',
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
|
|
34
21
|
export const DepositCalculatorForm = JSX<DepositCalculatorProp>(
|
|
35
22
|
({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
36
23
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
37
24
|
const handleMoneyValue = useCallback((_: number) => setMoneyValue(_), []);
|
|
38
25
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
39
26
|
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
27
|
+
const handleIsMonthlyInterestPayment = useCallback(
|
|
28
|
+
(_: boolean) => toggleIsMonthlyInterestPayment(_),
|
|
29
|
+
[],
|
|
30
|
+
);
|
|
40
31
|
const userInputParams = {
|
|
41
32
|
moneyValue,
|
|
42
33
|
monthsValue,
|
|
@@ -48,7 +39,7 @@ export const DepositCalculatorForm = JSX<DepositCalculatorProp>(
|
|
|
48
39
|
const { income, finalSum, rate } = calculatorParams;
|
|
49
40
|
|
|
50
41
|
return (
|
|
51
|
-
<section className={className}>
|
|
42
|
+
<section className={style('flex justify-between', className)}>
|
|
52
43
|
<div className="w-[468px]">
|
|
53
44
|
{renderWantedSumInput(
|
|
54
45
|
'Сумма вклада, ₽',
|
|
@@ -73,11 +64,7 @@ export const DepositCalculatorForm = JSX<DepositCalculatorProp>(
|
|
|
73
64
|
{finalSum ? (
|
|
74
65
|
<CalculatorValueBlock title="Сумма в конце срока" value={finalSum} postfix="₽" />
|
|
75
66
|
) : null}
|
|
76
|
-
|
|
77
|
-
items={depositTypeItems}
|
|
78
|
-
checkedItem={isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM}
|
|
79
|
-
onChange={(text: string) => toggleIsMonthlyInterestPayment(text === EVERY_MONTH)}
|
|
80
|
-
/>
|
|
67
|
+
{renderInterestPayment(isMonthlyInterestPayment, handleIsMonthlyInterestPayment)}
|
|
81
68
|
{renderButtonsSection(buttons, { className: 'mt-7', isVertical: true })}
|
|
82
69
|
{renderFootnote(footnote)}
|
|
83
70
|
</div>
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { BonusCalculatorForm, BonusCalculatorProps } from './BonusCalculatorForm';
|
|
2
|
+
import {
|
|
3
|
+
BusinessDepositCalculatorForm,
|
|
4
|
+
BusinessDepositCalculatorProp,
|
|
5
|
+
} from './BusinessDepositCalculatorForm';
|
|
2
6
|
import { CreditCalculatorForm, CreditCalculatorProp } from './CreditCalculatorForm';
|
|
3
7
|
import { DepositCalculatorForm, DepositCalculatorProp } from './DepositCalculatorForm';
|
|
4
8
|
|
|
5
9
|
export type EmbeddableCalcProps =
|
|
6
10
|
| CreditCalculatorProp
|
|
7
11
|
| DepositCalculatorProp
|
|
12
|
+
| BusinessDepositCalculatorProp
|
|
8
13
|
| BonusCalculatorProps;
|
|
9
14
|
|
|
10
15
|
export const EmbeddableCalcBlocks = {
|
|
11
16
|
CreditCalculatorForm,
|
|
12
17
|
DepositCalculatorForm,
|
|
18
|
+
BusinessDepositCalculatorForm,
|
|
13
19
|
BonusCalculatorForm,
|
|
14
20
|
};
|
|
@@ -1,22 +1,44 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
import { style } from '../../utils/style';
|
|
2
4
|
|
|
3
5
|
export interface RateProps {
|
|
4
6
|
rate: number;
|
|
5
7
|
title?: string;
|
|
6
8
|
unit?: string;
|
|
9
|
+
depositeName?: string;
|
|
10
|
+
isShowDepositeName?: boolean;
|
|
7
11
|
rateBlockClassName?: string;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
|
-
export const Rate = JSX<RateProps>(
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
export const Rate = JSX<RateProps>(
|
|
15
|
+
({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => (
|
|
16
|
+
<div>
|
|
17
|
+
<Text size="text-l-light" color="text-secondary-text">
|
|
18
|
+
{title}
|
|
19
|
+
</Text>
|
|
20
|
+
<div className="relative">
|
|
21
|
+
<div className="flex justify-start">
|
|
22
|
+
<span
|
|
23
|
+
className={style(
|
|
24
|
+
'block gradient-color-text font-mohave text-title-huge pr-6 -mt-4',
|
|
25
|
+
rateBlockClassName,
|
|
26
|
+
)}
|
|
27
|
+
>
|
|
28
|
+
{String(rate).replace('.', ',')}
|
|
29
|
+
</span>
|
|
30
|
+
{unit ? (
|
|
31
|
+
<span className="gradient-color-text text-[65px] leading-[75px]">{unit}</span>
|
|
32
|
+
) : (
|
|
33
|
+
''
|
|
34
|
+
)}
|
|
35
|
+
</div>
|
|
36
|
+
{depositeName && isShowDepositeName ? (
|
|
37
|
+
<div className="absolute bottom-7 w-full text-center whitespace-nowrap">
|
|
38
|
+
{depositeName}
|
|
39
|
+
</div>
|
|
40
|
+
) : null}
|
|
41
|
+
</div>
|
|
20
42
|
</div>
|
|
21
|
-
|
|
22
|
-
)
|
|
43
|
+
),
|
|
44
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
3
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
4
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
5
|
+
|
|
6
|
+
export interface UnknownRateProps {
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const UnknownRate = JSX<UnknownRateProps>(({ title = 'Ставка' }) => (
|
|
11
|
+
<div>
|
|
12
|
+
<Text size="text-l-light" color="text-secondary-text">
|
|
13
|
+
{title}
|
|
14
|
+
</Text>
|
|
15
|
+
<div className="mt-1 pt-1 pl-5 pb-1.5">
|
|
16
|
+
<Img image={{ icon: 'PercentIcon' }} width="90" height="85" asSVG />
|
|
17
|
+
</div>
|
|
18
|
+
<div className="w-[250px] mt-3.5">
|
|
19
|
+
<Paragraph size="text-xl-light" color="text-primary-text">
|
|
20
|
+
Процентная ставка для срока <strong>1-30 дней</strong> устанавливается при обращении в Банк
|
|
21
|
+
</Paragraph>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
));
|
|
@@ -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
|
|
|
@@ -8,7 +9,13 @@ export const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
|
|
|
8
9
|
export const DEFAULT_MIN_MONTHS = 13;
|
|
9
10
|
export const DEFAULT_MAX_MONTHS = 60;
|
|
10
11
|
export const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
|
|
11
|
-
|
|
12
|
+
export const BUSINESS_DEFAULT_SUM = 100000;
|
|
13
|
+
export const BUSINESS_MIN_DAYS = 1;
|
|
14
|
+
export const BUSINESS_MAX_DAYS = 1095;
|
|
15
|
+
export const BUSINESS_RATE_MIN_DAYS = 30; // порог количества дней, при которых ставка не доступна
|
|
16
|
+
export const BUSINESS_OPERATING_MIN_DAYS = 90;
|
|
17
|
+
export const BUSINESS_OPERATING_MAX_DAYS = 730;
|
|
18
|
+
export const BUSINESS_DEFAULT_DAYS = 90;
|
|
12
19
|
export const MONTHS_IN_YEAR = 12;
|
|
13
20
|
|
|
14
21
|
export const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR * 100;
|
|
@@ -51,6 +58,21 @@ export const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParam
|
|
|
51
58
|
isMonthlyInterestPayment: true,
|
|
52
59
|
};
|
|
53
60
|
|
|
61
|
+
export const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS: BusinessDepositCalculatorSourceBookParams =
|
|
62
|
+
{
|
|
63
|
+
minSum: 1000,
|
|
64
|
+
maxSum: 500000,
|
|
65
|
+
minDays: BUSINESS_MIN_DAYS,
|
|
66
|
+
maxDays: BUSINESS_MAX_DAYS,
|
|
67
|
+
rate: 5.9,
|
|
68
|
+
isMonthlyInterestPayment: true,
|
|
69
|
+
isReplenished: false,
|
|
70
|
+
isPartialWithdrawal: false,
|
|
71
|
+
isSmallBusiness: false,
|
|
72
|
+
depositeName: "Депозит 'Стабильный'",
|
|
73
|
+
};
|
|
74
|
+
|
|
54
75
|
export const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
|
|
55
76
|
export const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
|
|
56
77
|
export const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
|
|
78
|
+
export const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = 'business-calculator-data';
|
|
@@ -17,7 +17,7 @@ export const renderCalculatorBlock = (block: CalculatorBlockDef, i: number) => {
|
|
|
17
17
|
>
|
|
18
18
|
<div className="box-border p-9 w-full">
|
|
19
19
|
{block?.title ? <Heading className="text-center mb-6" title={block.title} /> : null}
|
|
20
|
-
<EmbeddedBlock {...block}
|
|
20
|
+
<EmbeddedBlock {...block} />
|
|
21
21
|
</div>
|
|
22
22
|
</section>
|
|
23
23
|
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import { clamp } from '../../utils/clamp';
|
|
3
|
+
|
|
4
|
+
const STEP_DAYS = 1;
|
|
5
|
+
|
|
6
|
+
interface RenderDaysInputParams {
|
|
7
|
+
minDays: number;
|
|
8
|
+
maxDays: number;
|
|
9
|
+
daysValue: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function renderDaysInput(
|
|
13
|
+
title: string,
|
|
14
|
+
params: RenderDaysInputParams,
|
|
15
|
+
callback?: (value: number) => void,
|
|
16
|
+
) {
|
|
17
|
+
const { minDays, maxDays, daysValue } = params;
|
|
18
|
+
const daysText = (days: number) => {
|
|
19
|
+
const text = Number(days) % 10 === 1 ? 'дня' : 'дней';
|
|
20
|
+
|
|
21
|
+
return `${days} ${text}`;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<InputRange
|
|
26
|
+
className="mt-7"
|
|
27
|
+
title={title}
|
|
28
|
+
items={[`От ${daysText(minDays)}`, `До ${daysText(maxDays)}`]}
|
|
29
|
+
min={minDays}
|
|
30
|
+
max={maxDays}
|
|
31
|
+
step={STEP_DAYS}
|
|
32
|
+
value={clamp(daysValue, minDays, maxDays)}
|
|
33
|
+
onChange={callback}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
2
|
+
|
|
1
3
|
export const renderFootnote = (text?: string) =>
|
|
2
|
-
text ?
|
|
4
|
+
text ? (
|
|
5
|
+
<Paragraph size="text-s-light" color="text-secondary-text">
|
|
6
|
+
{text}
|
|
7
|
+
</Paragraph>
|
|
8
|
+
) : null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { RadioButtonGroup } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
|
|
4
|
+
const EVERY_MONTH = 'everyMonth';
|
|
5
|
+
const AT_END_TERM = 'atEndTerm';
|
|
6
|
+
|
|
7
|
+
const depositTypeItems = [
|
|
8
|
+
{
|
|
9
|
+
id: EVERY_MONTH,
|
|
10
|
+
text: 'Ежемесячно',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: AT_END_TERM,
|
|
14
|
+
text: 'В конце срока',
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
export function renderInterestPayment(
|
|
19
|
+
isMonthlyInterestPayment: boolean,
|
|
20
|
+
callback?: (value: boolean) => void,
|
|
21
|
+
title?: string,
|
|
22
|
+
) {
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
{title ? (
|
|
26
|
+
<Text color="text-secondary-text" font="font-light">
|
|
27
|
+
{title}
|
|
28
|
+
</Text>
|
|
29
|
+
) : null}
|
|
30
|
+
|
|
31
|
+
<div className="mt-3">
|
|
32
|
+
<RadioButtonGroup
|
|
33
|
+
items={depositTypeItems}
|
|
34
|
+
checkedItem={isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM}
|
|
35
|
+
onChange={(text: string) => callback && callback(text === EVERY_MONTH)}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|