@redneckz/wildless-cms-uni-blocks 0.7.4 → 0.7.6
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 +246 -49
- 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/components/Tabs/LinkTab.d.ts +1 -0
- package/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/bundle/components/Tabs/TabsContent.d.ts +12 -0
- package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/bundle/components/Tabs/renderTab.d.ts +2 -1
- package/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
- 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/components/Tabs/LinkTab.d.ts +1 -0
- package/dist/components/Tabs/LinkTab.js +2 -2
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/dist/components/Tabs/ScrollableTabs.js +24 -0
- package/dist/components/Tabs/ScrollableTabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.js +9 -2
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +12 -0
- package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/dist/components/Tabs/renderGroupTab.js +12 -4
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/components/Tabs/renderTab.d.ts +2 -1
- package/dist/components/Tabs/renderTab.js +4 -6
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/components/Tabs/tabItemClasses.d.ts +6 -1
- package/dist/components/Tabs/tabItemClasses.js +61 -2
- package/dist/components/Tabs/tabItemClasses.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/setup-fixture.js +0 -1
- package/dist/setup-fixture.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/components/Tabs/LinkTab.d.ts +1 -0
- package/lib/components/Tabs/LinkTab.js +3 -3
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/lib/components/Tabs/ScrollableTabs.js +22 -0
- package/lib/components/Tabs/ScrollableTabs.js.map +1 -0
- package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
- package/lib/components/Tabs/Tabs.js +9 -2
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +12 -0
- package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/lib/components/Tabs/renderGroupTab.js +13 -5
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/components/Tabs/renderTab.d.ts +2 -1
- package/lib/components/Tabs/renderTab.js +4 -6
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/components/Tabs/tabItemClasses.d.ts +6 -1
- package/lib/components/Tabs/tabItemClasses.js +58 -1
- package/lib/components/Tabs/tabItemClasses.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/setup-fixture.js +0 -1
- package/lib/setup-fixture.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/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/bundle/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/bundle/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
- 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/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/dist/components/Tabs/LinkTab.js +2 -2
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js +24 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -0
- package/mobile/dist/components/Tabs/Tabs.js +9 -2
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/dist/components/Tabs/renderGroupTab.js +12 -4
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/dist/components/Tabs/renderTab.js +4 -6
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/dist/components/Tabs/tabItemClasses.js +61 -2
- package/mobile/dist/components/Tabs/tabItemClasses.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/setup-fixture.js +0 -1
- package/mobile/dist/setup-fixture.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/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/lib/components/Tabs/LinkTab.js +3 -3
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js +22 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -0
- package/mobile/lib/components/Tabs/Tabs.js +9 -2
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/lib/components/Tabs/renderGroupTab.js +13 -5
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/lib/components/Tabs/renderTab.js +4 -6
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/lib/components/Tabs/tabItemClasses.js +58 -1
- package/mobile/lib/components/Tabs/tabItemClasses.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/setup-fixture.js +0 -1
- package/mobile/lib/setup-fixture.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/components/Tabs/LinkTab.tsx +5 -13
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +55 -0
- package/mobile/src/components/Tabs/Tabs.tsx +26 -4
- package/mobile/src/components/Tabs/TabsContent.ts +13 -0
- package/mobile/src/components/Tabs/renderGroupTab.tsx +30 -20
- package/mobile/src/components/Tabs/renderTab.tsx +8 -5
- package/mobile/src/components/Tabs/tabItemClasses.ts +65 -1
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/PercentIcon.svg +373 -0
- package/mobile/src/setup-fixture.ts +0 -1
- 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/components/Tabs/LinkTab.tsx +5 -13
- package/src/components/Tabs/ScrollableTabs.tsx +55 -0
- package/src/components/Tabs/Tabs.fixture.tsx +22 -0
- package/src/components/Tabs/Tabs.tsx +26 -4
- package/src/components/Tabs/TabsContent.ts +13 -0
- package/src/components/Tabs/renderGroupTab.tsx +30 -20
- package/src/components/Tabs/renderTab.tsx +8 -5
- package/src/components/Tabs/tabItemClasses.ts +65 -1
- package/src/icons/IconName.ts +5 -1
- package/src/icons/PercentIcon.svg +373 -0
- package/src/setup-fixture.ts +0 -1
- 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
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BUSINESS_DEPOSIT_CALC_DEFAULT_DIR,
|
|
3
|
+
BUSINESS_OPERATING_MAX_DAYS,
|
|
4
|
+
BUSINESS_OPERATING_MIN_DAYS,
|
|
5
|
+
BUSINESS_RATE_MIN_DAYS,
|
|
6
|
+
DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
|
|
7
|
+
} from './constants';
|
|
8
|
+
import { useCalculatorParams } from './useCalculatorParams';
|
|
9
|
+
import type { CommonDepositParams } from './useDepositCalculatorParams';
|
|
10
|
+
|
|
11
|
+
export interface BusinessCommonDepositParams extends CommonDepositParams {
|
|
12
|
+
isReplenished: boolean;
|
|
13
|
+
isPartialWithdrawal: boolean;
|
|
14
|
+
isSmallBusiness: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface BusinessDepositCalculatorSourceBookParams extends BusinessCommonDepositParams {
|
|
17
|
+
minSum: number;
|
|
18
|
+
maxSum: number;
|
|
19
|
+
minDays: number;
|
|
20
|
+
maxDays: number;
|
|
21
|
+
depositeName: string;
|
|
22
|
+
rate: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface BusinessDepositCalculatorUserInputParams extends BusinessCommonDepositParams {
|
|
26
|
+
moneyValue: number;
|
|
27
|
+
daysValue: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface BusinessDepositCalculatorParams
|
|
31
|
+
extends BusinessDepositCalculatorSourceBookParams,
|
|
32
|
+
BusinessDepositCalculatorUserInputParams {
|
|
33
|
+
income?: number;
|
|
34
|
+
finalSum?: number;
|
|
35
|
+
isDisabledOperatingDeposit?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type BusinessDepositCalculatorData = {
|
|
39
|
+
rows: BusinessDepositCalculatorSourceBookParams[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const useBusinessDepositCalculatorParams = (
|
|
43
|
+
userInputParams: BusinessDepositCalculatorUserInputParams,
|
|
44
|
+
sourceBookDir?: string,
|
|
45
|
+
): BusinessDepositCalculatorParams => {
|
|
46
|
+
const {
|
|
47
|
+
daysValue,
|
|
48
|
+
moneyValue,
|
|
49
|
+
isPartialWithdrawal,
|
|
50
|
+
isReplenished,
|
|
51
|
+
isSmallBusiness,
|
|
52
|
+
isMonthlyInterestPayment,
|
|
53
|
+
} = userInputParams;
|
|
54
|
+
const data = useCalculatorParams<BusinessDepositCalculatorData>(
|
|
55
|
+
sourceBookDir || BUSINESS_DEPOSIT_CALC_DEFAULT_DIR,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const isOperatingDeposit = isReplenished || isPartialWithdrawal;
|
|
59
|
+
const isDisabledOperatingDeposit =
|
|
60
|
+
daysValue < BUSINESS_OPERATING_MIN_DAYS || daysValue > BUSINESS_OPERATING_MAX_DAYS;
|
|
61
|
+
|
|
62
|
+
if (daysValue <= BUSINESS_RATE_MIN_DAYS) {
|
|
63
|
+
return {
|
|
64
|
+
...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
|
|
65
|
+
...userInputParams,
|
|
66
|
+
isDisabledOperatingDeposit,
|
|
67
|
+
rate: 0,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
const businessDepositCalculatorSourceBookParams =
|
|
71
|
+
data?.rows?.find((_) => {
|
|
72
|
+
return (
|
|
73
|
+
isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
74
|
+
isSmallBusiness === _.isSmallBusiness &&
|
|
75
|
+
(isOperatingDeposit
|
|
76
|
+
? _.isReplenished && _.isPartialWithdrawal
|
|
77
|
+
: !_.isReplenished && !_.isPartialWithdrawal)
|
|
78
|
+
);
|
|
79
|
+
}) || DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS;
|
|
80
|
+
|
|
81
|
+
const { rate } = businessDepositCalculatorSourceBookParams;
|
|
82
|
+
|
|
83
|
+
const income = getDepositIncome(rate, userInputParams);
|
|
84
|
+
const finalSum = moneyValue + income;
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
...businessDepositCalculatorSourceBookParams,
|
|
88
|
+
...userInputParams,
|
|
89
|
+
isDisabledOperatingDeposit,
|
|
90
|
+
income,
|
|
91
|
+
finalSum,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const getDepositIncome = (
|
|
96
|
+
rate: number,
|
|
97
|
+
userInputParams: BusinessDepositCalculatorUserInputParams,
|
|
98
|
+
) => {
|
|
99
|
+
const { isMonthlyInterestPayment, moneyValue, daysValue } = userInputParams;
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
|
|
103
|
+
*/
|
|
104
|
+
if (isMonthlyInterestPayment) {
|
|
105
|
+
return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, daysValue / 30) - moneyValue);
|
|
106
|
+
} else {
|
|
107
|
+
return Math.round((moneyValue * rate * daysValue) / 365 / 100);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
@@ -39,7 +39,7 @@ export const useDepositCalculatorParams = (
|
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
const depositCalculatorSourceBookParams =
|
|
42
|
-
data?.rows
|
|
42
|
+
data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment) ||
|
|
43
43
|
DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
44
44
|
|
|
45
45
|
const { rate } = depositCalculatorSourceBookParams;
|
|
@@ -9,7 +9,7 @@ const options = {
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
default: (
|
|
12
|
-
<div className="container grid grid-cols-12">
|
|
12
|
+
<div className="container grid grid-cols-12 p-4">
|
|
13
13
|
<SwipeListControlBlock
|
|
14
14
|
className="col-span-12"
|
|
15
15
|
block={{
|
|
@@ -24,4 +24,21 @@ export default {
|
|
|
24
24
|
/>
|
|
25
25
|
</div>
|
|
26
26
|
),
|
|
27
|
+
secondary: (
|
|
28
|
+
<div className="container grid grid-cols-12 p-4">
|
|
29
|
+
<SwipeListControlBlock
|
|
30
|
+
className="col-span-12"
|
|
31
|
+
block={{
|
|
32
|
+
type: 'SwipeListControlBlock',
|
|
33
|
+
blocks: [
|
|
34
|
+
{ type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
|
|
35
|
+
{ type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
|
|
36
|
+
],
|
|
37
|
+
}}
|
|
38
|
+
listType="vertical-list"
|
|
39
|
+
options={options}
|
|
40
|
+
version="secondary"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
),
|
|
27
44
|
};
|
|
@@ -8,10 +8,10 @@ import type { SwipeListControlBlockContent } from './SwipeListControlBlockConten
|
|
|
8
8
|
interface SwipeListControlBlockProps extends SwipeListControlBlockContent, UniBlockProps {}
|
|
9
9
|
|
|
10
10
|
export const SwipeListControlBlock: JSXBlock<SwipeListControlBlockProps> =
|
|
11
|
-
JSX<SwipeListControlBlockProps>(({
|
|
11
|
+
JSX<SwipeListControlBlockProps>(({ listType, showDots, options, ...rest }) => {
|
|
12
12
|
return (
|
|
13
13
|
<BlockWrapper {...rest}>
|
|
14
|
-
<SwipeListControl
|
|
14
|
+
<SwipeListControl listType={listType} showDots={showDots}>
|
|
15
15
|
{renderChildren({ ...rest, options })}
|
|
16
16
|
</SwipeListControl>
|
|
17
17
|
</BlockWrapper>
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SwipeListControlContent } from '../../ui-kit/SwipeListControl/SwipeListControlContent';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* @title Swipe-контроллер
|
|
5
|
-
*/
|
|
6
|
-
export type SwipeListControlBlockContent = SwipeListControlProps;
|
|
3
|
+
export type SwipeListControlBlockContent = SwipeListControlContent;
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import {
|
|
4
|
-
ACTIVE_LINK_CLASSES,
|
|
5
|
-
ACTIVE_TEXT_CLASSES,
|
|
6
|
-
INACTIVE_LINK_CLASSES,
|
|
7
|
-
INACTIVE_TEXT_CLASSES,
|
|
8
|
-
LINK_CLASSES,
|
|
9
|
-
TEXT_CLASSES,
|
|
10
|
-
} from './tabItemClasses';
|
|
3
|
+
import { getLinkTabClassName } from './tabItemClasses';
|
|
11
4
|
import type { LinkTabData, TabData } from './TabsContent';
|
|
12
5
|
|
|
13
6
|
interface LinkTabProps {
|
|
14
7
|
tab: LinkTabData;
|
|
15
8
|
currentTab?: TabData;
|
|
9
|
+
isScrollable?: boolean;
|
|
16
10
|
}
|
|
17
11
|
|
|
18
12
|
export const LinkTab = JSX<LinkTabProps>((props) => {
|
|
19
|
-
const { tab, currentTab } = props;
|
|
13
|
+
const { tab, currentTab, isScrollable = false } = props;
|
|
20
14
|
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
21
15
|
|
|
22
16
|
const link = useLink();
|
|
@@ -25,14 +19,12 @@ export const LinkTab = JSX<LinkTabProps>((props) => {
|
|
|
25
19
|
return (
|
|
26
20
|
<a
|
|
27
21
|
role="tab"
|
|
28
|
-
className={
|
|
22
|
+
className={getLinkTabClassName('link', active, isScrollable)}
|
|
29
23
|
target={tab.target}
|
|
30
24
|
href={adjustedProps.href}
|
|
31
25
|
onClick={adjustedProps.onClick}
|
|
32
26
|
>
|
|
33
|
-
<span className={
|
|
34
|
-
{tab.text}
|
|
35
|
-
</span>
|
|
27
|
+
<span className={getLinkTabClassName('text', active, isScrollable)}>{tab.text}</span>
|
|
36
28
|
</a>
|
|
37
29
|
);
|
|
38
30
|
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { RenderTabProps } from './renderTab';
|
|
3
|
+
import type { TabData } from './TabsContent';
|
|
4
|
+
import { SwipeListContainer } from '../../ui-kit/SwipeListControl/SwipeListContainer';
|
|
5
|
+
import { useSwipeListScroll } from '../../ui-kit/SwipeListControl/useSwipeListScroll';
|
|
6
|
+
import { ScrollLeftButton, ScrollRightButton } from '../../ui-kit/Button/ArrowButton';
|
|
7
|
+
import { renderTab } from './renderTab';
|
|
8
|
+
|
|
9
|
+
interface ScrollableTabsProps extends RenderTabProps {
|
|
10
|
+
tabs?: TabData[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type IsScrollButtonsShown = boolean[];
|
|
14
|
+
|
|
15
|
+
const scrollButtonStyle = 'absolute z-50 top-0';
|
|
16
|
+
|
|
17
|
+
export const ScrollableTabs = JSX<ScrollableTabsProps>((props) => {
|
|
18
|
+
const { tabs, onClick, currentTab, page, showCounter } = props;
|
|
19
|
+
|
|
20
|
+
const [containerRef, scroll] = useSwipeListScroll<HTMLDivElement>({
|
|
21
|
+
itemCount: tabs?.length || 0,
|
|
22
|
+
isCyclic: false,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className="relative max-w-full m-auto">
|
|
27
|
+
<div className={`font-sans max-w-full w-full overflow-hidden relative bg-white`}>
|
|
28
|
+
<SwipeListContainer
|
|
29
|
+
containerRef={containerRef}
|
|
30
|
+
snapAlign="snap-start"
|
|
31
|
+
onVisibleIndicesChange={scroll.handleVisibleIndicesChange}
|
|
32
|
+
>
|
|
33
|
+
{tabs?.map(
|
|
34
|
+
renderTab({
|
|
35
|
+
onClick,
|
|
36
|
+
currentTab,
|
|
37
|
+
showCounter,
|
|
38
|
+
page,
|
|
39
|
+
isScrollable: true,
|
|
40
|
+
}),
|
|
41
|
+
)}
|
|
42
|
+
</SwipeListContainer>
|
|
43
|
+
</div>
|
|
44
|
+
{scroll.canScrollLeft ? (
|
|
45
|
+
<ScrollLeftButton className={`${scrollButtonStyle} left-6`} onClick={scroll.scrollLeft} />
|
|
46
|
+
) : null}
|
|
47
|
+
{scroll.canScrollRight ? (
|
|
48
|
+
<ScrollRightButton
|
|
49
|
+
className={`${scrollButtonStyle} rotate-180 right-6`}
|
|
50
|
+
onClick={scroll.scrollRight}
|
|
51
|
+
/>
|
|
52
|
+
) : null}
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
});
|
|
@@ -10,8 +10,30 @@ export default {
|
|
|
10
10
|
{ type: 'group', ref: 'tab1', title: 'Вкладка 1' },
|
|
11
11
|
{ type: 'group', ref: 'tab2', title: 'Вкладка 2' },
|
|
12
12
|
{ type: 'link', href: 'https://google.com', text: 'Вкладка 3' },
|
|
13
|
+
{ type: 'group', ref: 'tab3', title: 'Вкладка 4' },
|
|
13
14
|
]}
|
|
14
15
|
/>
|
|
15
16
|
</div>
|
|
16
17
|
),
|
|
18
|
+
scrollable: (
|
|
19
|
+
<div className="container grid grid-cols-12">
|
|
20
|
+
<Tabs
|
|
21
|
+
className="col-span-12"
|
|
22
|
+
tabs={[
|
|
23
|
+
{ type: 'group', ref: 'tab1', title: 'Вкладка 1' },
|
|
24
|
+
{ type: 'group', ref: 'tab2', title: 'Вкладка 2' },
|
|
25
|
+
{ type: 'link', href: 'https://google.com', text: 'Вкладка 3' },
|
|
26
|
+
{ type: 'link', href: 'https://yandex.com', text: 'Вкладка 4' },
|
|
27
|
+
{ type: 'link', href: 'https://ya.com', text: 'Вкладка 5' },
|
|
28
|
+
{ type: 'link', href: 'https://habr.com', text: 'Вкладка за номером 6' },
|
|
29
|
+
{ type: 'link', href: 'https://kremlin.com', text: 'Вкладка 7' },
|
|
30
|
+
{ type: 'link', href: 'https://gov.com', text: 'Вкладка 8' },
|
|
31
|
+
{ type: 'group', ref: 'tab3', title: 'Вкладка 9' },
|
|
32
|
+
{ type: 'link', href: 'https://vc.com', text: 'Вкладка номер 10' },
|
|
33
|
+
{ type: 'link', href: 'https://ria.com', text: 'Вкладка номер 11' },
|
|
34
|
+
]}
|
|
35
|
+
tabsMode="scrollable"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
),
|
|
17
39
|
};
|
|
@@ -2,9 +2,10 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { EventBus } from '../../EventBus/EventBus';
|
|
4
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
|
+
import type { TabData, TabsContent } from './TabsContent';
|
|
5
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
7
|
import { renderTab } from './renderTab';
|
|
7
|
-
import
|
|
8
|
+
import { ScrollableTabs } from './ScrollableTabs';
|
|
8
9
|
|
|
9
10
|
export interface TabActivationEvent {
|
|
10
11
|
type?: TabData['type'];
|
|
@@ -14,7 +15,7 @@ export interface TabActivationEvent {
|
|
|
14
15
|
export interface TabsBlockProps extends TabsContent, UniBlockProps {}
|
|
15
16
|
|
|
16
17
|
export const Tabs = JSX<TabsBlockProps>((props) => {
|
|
17
|
-
const { className = '', tabs, showCounter, isSticky, ...rest } = props;
|
|
18
|
+
const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
|
|
18
19
|
|
|
19
20
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
20
21
|
|
|
@@ -25,6 +26,8 @@ export const Tabs = JSX<TabsBlockProps>((props) => {
|
|
|
25
26
|
if (event.type === 'link' && tab) {
|
|
26
27
|
setCurrentTab(tab);
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
return [];
|
|
28
31
|
}),
|
|
29
32
|
[tabs],
|
|
30
33
|
);
|
|
@@ -46,11 +49,30 @@ export const Tabs = JSX<TabsBlockProps>((props) => {
|
|
|
46
49
|
|
|
47
50
|
return (
|
|
48
51
|
<BlockWrapper
|
|
49
|
-
className={
|
|
52
|
+
className={`relative box-border flex gap-x-1 w-full ${
|
|
53
|
+
isSticky ? 'sticky top-1 z-20 ' : ''
|
|
54
|
+
} ${className}`}
|
|
50
55
|
role="tablist"
|
|
51
56
|
{...rest}
|
|
52
57
|
>
|
|
53
|
-
{
|
|
58
|
+
{tabsMode === 'scrollable' ? (
|
|
59
|
+
<ScrollableTabs
|
|
60
|
+
tabs={tabs}
|
|
61
|
+
onClick={handleClick}
|
|
62
|
+
currentTab={currentTab}
|
|
63
|
+
showCounter={showCounter}
|
|
64
|
+
{...rest}
|
|
65
|
+
/>
|
|
66
|
+
) : (
|
|
67
|
+
tabs?.map(
|
|
68
|
+
renderTab({
|
|
69
|
+
onClick: handleClick,
|
|
70
|
+
currentTab,
|
|
71
|
+
showCounter,
|
|
72
|
+
...rest,
|
|
73
|
+
}),
|
|
74
|
+
)
|
|
75
|
+
)}
|
|
54
76
|
</BlockWrapper>
|
|
55
77
|
);
|
|
56
78
|
});
|
|
@@ -27,6 +27,14 @@ export type LinkTabData = LinkProps & {
|
|
|
27
27
|
*/
|
|
28
28
|
export type TabData = GroupTabData | LinkTabData;
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @enumNames [
|
|
32
|
+
* "По ширине экрана",
|
|
33
|
+
* "С прокруткой"
|
|
34
|
+
* ]
|
|
35
|
+
*/
|
|
36
|
+
export type TabsMode = 'wideScreen' | 'scrollable';
|
|
37
|
+
|
|
30
38
|
/**
|
|
31
39
|
* @title Вкладки
|
|
32
40
|
*/
|
|
@@ -37,4 +45,9 @@ export interface TabsContent {
|
|
|
37
45
|
isSticky?: boolean;
|
|
38
46
|
/** @title Показывать счетчик блоков во вкладках */
|
|
39
47
|
showCounter?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @title Режим вкладок
|
|
50
|
+
* @default "wideScreen"
|
|
51
|
+
*/
|
|
52
|
+
tabsMode?: TabsMode;
|
|
40
53
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import type { GroupTabData } from './TabsContent';
|
|
1
2
|
import type { RenderTabProps } from './renderTab';
|
|
2
3
|
import {
|
|
3
|
-
ACTIVE_LINK_CLASSES,
|
|
4
4
|
ACTIVE_TEXT_CLASSES,
|
|
5
|
-
INACTIVE_LINK_CLASSES,
|
|
6
5
|
INACTIVE_TEXT_CLASSES,
|
|
7
|
-
LINK_CLASSES,
|
|
8
6
|
TEXT_CLASSES,
|
|
7
|
+
WHITE_ACTIVE_TEXT_CLASSES,
|
|
8
|
+
getGroupTabClassName,
|
|
9
9
|
} from './tabItemClasses';
|
|
10
|
-
import type { GroupTabData } from './TabsContent';
|
|
11
10
|
|
|
12
11
|
const BADGE_CLASSES =
|
|
13
12
|
'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
|
|
@@ -16,7 +15,7 @@ const INACTIVE_BADGE_CLASSES =
|
|
|
16
15
|
'bg-main-divider text-secondary-text group-hover/btn:text-primary-main';
|
|
17
16
|
|
|
18
17
|
export const renderGroupTab =
|
|
19
|
-
({ page, currentTab, showCounter, onClick }: RenderTabProps) =>
|
|
18
|
+
({ page, currentTab, showCounter, onClick, isScrollable = false }: RenderTabProps) =>
|
|
20
19
|
(tab: GroupTabData, i: number) => {
|
|
21
20
|
const active = currentTab === tab;
|
|
22
21
|
|
|
@@ -27,28 +26,39 @@ export const renderGroupTab =
|
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
28
|
<div
|
|
30
|
-
key={String(i)}
|
|
31
|
-
className={
|
|
29
|
+
key={`group-${String(i)}`}
|
|
30
|
+
className={getGroupTabClassName('div', active, isScrollable)}
|
|
32
31
|
role="tab"
|
|
33
32
|
aria-selected={active}
|
|
34
33
|
onClick={() => onClick(tab)}
|
|
35
34
|
>
|
|
36
|
-
<div
|
|
37
|
-
{
|
|
38
|
-
|
|
35
|
+
<div
|
|
36
|
+
className={`flex flex-1 items-center justify-center ${getGroupTabClassName(
|
|
37
|
+
'text',
|
|
38
|
+
active,
|
|
39
|
+
isScrollable,
|
|
40
|
+
)}`}
|
|
41
|
+
>
|
|
42
|
+
{renderTitle(tab.title, active, isScrollable)}
|
|
43
|
+
{renderCount(showCounter, count, active)}
|
|
39
44
|
</div>
|
|
40
45
|
</div>
|
|
41
46
|
);
|
|
42
47
|
};
|
|
43
48
|
|
|
44
|
-
const renderTitle = (title: string, active: boolean) =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
const renderTitle = (title: string | undefined, active: boolean, isScrollable: boolean) => {
|
|
50
|
+
const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
|
|
51
|
+
const titleClassName = isScrollable
|
|
52
|
+
? `${TEXT_CLASSES} ${activeClassName}`
|
|
53
|
+
: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`;
|
|
54
|
+
|
|
55
|
+
return title ? <h3 className={titleClassName}>{title}</h3> : null;
|
|
56
|
+
};
|
|
49
57
|
|
|
50
|
-
const renderCount = (count: number, active: boolean) =>
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
const renderCount = (showCounter: boolean | undefined, count: number, active: boolean) => {
|
|
59
|
+
return showCounter && count ? (
|
|
60
|
+
<div className={`${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`}>
|
|
61
|
+
{count}
|
|
62
|
+
</div>
|
|
63
|
+
) : null;
|
|
64
|
+
};
|
|
@@ -9,12 +9,11 @@ export interface RenderTabProps {
|
|
|
9
9
|
currentTab?: TabData;
|
|
10
10
|
showCounter?: boolean;
|
|
11
11
|
onClick: (tab: TabData) => void;
|
|
12
|
+
isScrollable?: boolean;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export const renderTab =
|
|
15
|
-
({ page, currentTab, showCounter, onClick }: RenderTabProps) =>
|
|
16
|
-
// Linter doesn't understand that switch processes all cases
|
|
17
|
-
// eslint-disable-next-line consistent-return
|
|
16
|
+
({ page, currentTab, showCounter, onClick, isScrollable = false }: RenderTabProps) =>
|
|
18
17
|
(tab: TabData, i: number) => {
|
|
19
18
|
const type = tab.type;
|
|
20
19
|
|
|
@@ -24,11 +23,15 @@ export const renderTab =
|
|
|
24
23
|
|
|
25
24
|
switch (type) {
|
|
26
25
|
case 'group':
|
|
27
|
-
return renderGroupTab({ page, currentTab, showCounter, onClick })(tab, i);
|
|
26
|
+
return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
|
|
28
27
|
case 'link': {
|
|
29
|
-
return
|
|
28
|
+
return (
|
|
29
|
+
<LinkTab key={String(i)} tab={tab} currentTab={currentTab} isScrollable={isScrollable} />
|
|
30
|
+
);
|
|
30
31
|
}
|
|
31
32
|
default:
|
|
32
33
|
assertUnreachable(type);
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
return null;
|
|
34
37
|
};
|