@redneckz/wildless-cms-uni-blocks 0.8.8 → 0.8.10
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/bin/migration-scripts/0.8.10.js +31 -0
- package/bundle/EventBus/EventBus.d.ts +1 -4
- package/bundle/EventBus/defaultEventBus.d.ts +7 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +112 -113
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/{dist/components/StepsBlock/renderStepContent.d.ts → bundle/components/StepsBlock/renderStep.d.ts} +5 -5
- package/bundle/components/Tile/TileContent.d.ts +2 -2
- package/bundle/hooks/useRouter.d.ts +6 -2
- package/bundle/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/bundle/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/dist/EventBus/EventBus.d.ts +1 -4
- package/dist/EventBus/EventBus.js +0 -1
- package/dist/EventBus/EventBus.js.map +1 -1
- package/dist/EventBus/defaultEventBus.d.ts +7 -0
- package/dist/EventBus/defaultEventBus.js +5 -0
- package/dist/EventBus/defaultEventBus.js.map +1 -0
- package/dist/components/ButtonBlock/ButtonBlock.js +2 -1
- package/dist/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/dist/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/dist/components/Calculator/Rate.js +1 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/constants.js +2 -2
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/rangeHelpers.d.ts +4 -0
- package/dist/components/Calculator/rangeHelpers.js +12 -0
- package/dist/components/Calculator/rangeHelpers.js.map +1 -0
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +6 -4
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/PictureText/renderBenefit.js +1 -0
- package/dist/components/PictureText/renderBenefit.js.map +1 -1
- package/dist/components/ProductTile/renderBenefit.js +1 -0
- package/dist/components/ProductTile/renderBenefit.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +7 -13
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +24 -4
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
- package/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/{bundle/components/StepsBlock/renderStepContent.d.ts → dist/components/StepsBlock/renderStep.d.ts} +5 -5
- package/dist/components/StepsBlock/renderStep.js +34 -0
- package/dist/components/StepsBlock/renderStep.js.map +1 -0
- package/dist/components/Tabs/Tabs.js +4 -4
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tile/Tile.js +3 -3
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/components/Tile/TileContent.d.ts +2 -2
- package/dist/hooks/useLink.js +2 -3
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/hooks/useRouter.d.ts +6 -2
- package/dist/hooks/useRouter.js.map +1 -1
- package/dist/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/dist/services/BlockRouter/BlockRouter.js +11 -30
- package/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/dist/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/dist/services/BlockRouter/blockRouterEventBus.js +5 -0
- package/dist/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/dist/services/BlockRouter/useBlockIntersectionObserver.js +5 -16
- package/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/dist/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/dist/services/BlockRouter/useBlockRouterProvider.js +11 -12
- package/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +2 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/EventBus/EventBus.d.ts +1 -4
- package/lib/EventBus/EventBus.js +0 -1
- package/lib/EventBus/EventBus.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +7 -0
- package/lib/EventBus/defaultEventBus.js +3 -0
- package/lib/EventBus/defaultEventBus.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ButtonBlock/ButtonBlock.js +2 -1
- package/lib/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/lib/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/lib/components/Calculator/Rate.js +1 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/constants.js +2 -2
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/rangeHelpers.d.ts +4 -0
- package/lib/components/Calculator/rangeHelpers.js +8 -0
- package/lib/components/Calculator/rangeHelpers.js.map +1 -0
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +6 -4
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/PictureText/renderBenefit.js +1 -0
- package/lib/components/PictureText/renderBenefit.js.map +1 -1
- package/lib/components/ProductTile/renderBenefit.js +1 -0
- package/lib/components/ProductTile/renderBenefit.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +7 -13
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +24 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
- package/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/{mobile/bundle/components/StepsBlock/renderStepContent.d.ts → lib/components/StepsBlock/renderStep.d.ts} +5 -5
- package/lib/components/StepsBlock/renderStep.js +31 -0
- package/lib/components/StepsBlock/renderStep.js.map +1 -0
- package/lib/components/Tabs/Tabs.js +4 -4
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tile/Tile.js +3 -3
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/components/Tile/TileContent.d.ts +2 -2
- package/lib/hooks/useLink.js +2 -3
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/hooks/useRouter.d.ts +6 -2
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/lib/services/BlockRouter/BlockRouter.js +8 -28
- package/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/lib/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/lib/services/BlockRouter/blockRouterEventBus.js +3 -0
- package/lib/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/lib/services/BlockRouter/useBlockIntersectionObserver.js +6 -17
- package/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/lib/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/lib/services/BlockRouter/useBlockRouterProvider.js +12 -13
- package/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +2 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/bundle/EventBus/EventBus.d.ts +1 -4
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +7 -0
- package/mobile/bundle/bundle.umd.js +58 -66
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/mobile/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/{lib/components/StepsBlock/renderStepContent.d.ts → mobile/bundle/components/StepsBlock/renderStep.d.ts} +5 -5
- package/mobile/bundle/components/Tile/TileContent.d.ts +2 -2
- package/mobile/bundle/hooks/useRouter.d.ts +6 -2
- package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/mobile/bundle/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/mobile/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/mobile/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/mobile/dist/EventBus/EventBus.d.ts +1 -4
- package/mobile/dist/EventBus/EventBus.js +0 -1
- package/mobile/dist/EventBus/EventBus.js.map +1 -1
- package/mobile/dist/EventBus/defaultEventBus.d.ts +7 -0
- package/mobile/dist/EventBus/defaultEventBus.js +5 -0
- package/mobile/dist/EventBus/defaultEventBus.js.map +1 -0
- package/mobile/dist/components/ButtonBlock/ButtonBlock.js +2 -1
- package/mobile/dist/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/mobile/dist/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/mobile/dist/components/Calculator/Rate.js +1 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.js +2 -2
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +4 -0
- package/mobile/dist/components/Calculator/rangeHelpers.js +12 -0
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -0
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +6 -4
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/PictureText/renderBenefit.js +1 -0
- package/mobile/dist/components/PictureText/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductTile/renderBenefit.js +1 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +24 -4
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/mobile/dist/components/StepsBlock/renderStep.d.ts +11 -0
- package/mobile/dist/components/StepsBlock/renderStep.js +34 -0
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -0
- package/mobile/dist/components/Tabs/Tabs.js +4 -4
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +3 -3
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +2 -2
- package/mobile/dist/hooks/useLink.js +2 -3
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/hooks/useRouter.d.ts +6 -2
- package/mobile/dist/hooks/useRouter.js.map +1 -1
- package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/mobile/dist/services/BlockRouter/BlockRouter.js +11 -30
- package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/dist/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/mobile/dist/services/BlockRouter/blockRouterEventBus.js +5 -0
- package/mobile/dist/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js +5 -16
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js +11 -12
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/EventBus/EventBus.d.ts +1 -4
- package/mobile/lib/EventBus/EventBus.js +0 -1
- package/mobile/lib/EventBus/EventBus.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +7 -0
- package/mobile/lib/EventBus/defaultEventBus.js +3 -0
- package/mobile/lib/EventBus/defaultEventBus.js.map +1 -0
- package/mobile/lib/components/ButtonBlock/ButtonBlock.js +2 -1
- package/mobile/lib/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/mobile/lib/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/mobile/lib/components/Calculator/Rate.js +1 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.js +2 -2
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +4 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js +8 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -0
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +6 -4
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/PictureText/renderBenefit.js +1 -0
- package/mobile/lib/components/PictureText/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductTile/renderBenefit.js +1 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +24 -4
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/mobile/lib/components/StepsBlock/renderStep.d.ts +11 -0
- package/mobile/lib/components/StepsBlock/renderStep.js +31 -0
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -0
- package/mobile/lib/components/Tabs/Tabs.js +4 -4
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +3 -3
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +2 -2
- package/mobile/lib/hooks/useLink.js +2 -3
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/hooks/useRouter.d.ts +6 -2
- package/mobile/lib/hooks/useRouter.js.map +1 -1
- package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/mobile/lib/services/BlockRouter/BlockRouter.js +8 -28
- package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/lib/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/mobile/lib/services/BlockRouter/blockRouterEventBus.js +3 -0
- package/mobile/lib/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js +6 -17
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js +12 -13
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/src/EventBus/EventBus.ts +1 -7
- package/mobile/src/EventBus/defaultEventBus.ts +8 -0
- package/mobile/src/components/ButtonBlock/ButtonBlock.example.json +2 -2
- package/mobile/src/components/ButtonBlock/ButtonBlock.tsx +5 -2
- package/mobile/src/components/ButtonBlock/ButtonBlockContent.ts +5 -1
- package/mobile/src/components/Calculator/Rate.tsx +1 -1
- package/mobile/src/components/Calculator/constants.ts +2 -2
- package/mobile/src/components/Calculator/rangeHelpers.ts +24 -0
- package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
- package/mobile/src/components/Carousel/Carousel.tsx +6 -4
- package/mobile/src/components/PictureText/renderBenefit.tsx +1 -0
- package/mobile/src/components/ProductTile/renderBenefit.tsx +1 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +29 -5
- package/mobile/src/components/StepsBlock/StepsBlock.ui.json +6 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +13 -1
- package/mobile/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
- package/mobile/src/components/StepsBlock/renderStep.tsx +83 -0
- package/mobile/src/components/Tabs/Tabs.tsx +4 -4
- package/mobile/src/components/Tile/Tile.example.json +1 -1
- package/mobile/src/components/Tile/Tile.tsx +4 -4
- package/mobile/src/components/Tile/Tile.ui.json +7 -1
- package/mobile/src/components/Tile/TileContent.ts +2 -2
- package/mobile/src/hooks/useLink.ts +2 -3
- package/mobile/src/hooks/useRouter.ts +6 -2
- package/mobile/src/services/BlockRouter/BlockRouter.ts +8 -47
- package/mobile/src/services/BlockRouter/blockRouterEventBus.ts +13 -0
- package/mobile/src/services/BlockRouter/useBlockIntersectionObserver.ts +6 -23
- package/mobile/src/services/BlockRouter/useBlockRouterProvider.ts +13 -19
- package/mobile/src/ui-kit/BlockWrapper.tsx +2 -2
- package/package.json +1 -1
- package/src/EventBus/EventBus.ts +1 -7
- package/src/EventBus/defaultEventBus.ts +8 -0
- package/src/components/ButtonBlock/ButtonBlock.example.json +2 -2
- package/src/components/ButtonBlock/ButtonBlock.tsx +5 -2
- package/src/components/ButtonBlock/ButtonBlockContent.ts +5 -1
- package/src/components/Calculator/Rate.tsx +1 -1
- package/src/components/Calculator/constants.ts +2 -2
- package/src/components/Calculator/rangeHelpers.ts +24 -0
- package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
- package/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
- package/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
- package/src/components/Carousel/Carousel.tsx +6 -4
- package/src/components/PictureText/renderBenefit.tsx +1 -0
- package/src/components/ProductTile/renderBenefit.tsx +1 -0
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +19 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +10 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +29 -5
- package/src/components/StepsBlock/StepsBlock.tsx +28 -16
- package/src/components/StepsBlock/StepsBlock.ui.json +6 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +13 -1
- package/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
- package/src/components/StepsBlock/renderStep.tsx +83 -0
- package/src/components/Tabs/Tabs.tsx +4 -4
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +2 -2
- package/src/components/Tile/Tile.tsx +4 -4
- package/src/components/Tile/Tile.ui.json +7 -1
- package/src/components/Tile/TileContent.ts +2 -2
- package/src/hooks/useLink.ts +2 -3
- package/src/hooks/useRouter.ts +6 -2
- package/src/services/BlockRouter/BlockRouter.ts +8 -47
- package/src/services/BlockRouter/blockRouterEventBus.ts +13 -0
- package/src/services/BlockRouter/useBlockIntersectionObserver.ts +6 -23
- package/src/services/BlockRouter/useBlockRouterProvider.ts +13 -19
- package/src/ui-kit/BlockWrapper.tsx +2 -2
- package/bundle/EventBus/EventMap.d.ts +0 -4
- package/bundle/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/bundle/utils/checkIsIconRenderable.d.ts +0 -2
- package/dist/EventBus/EventMap.d.ts +0 -4
- package/dist/EventBus/EventMap.js +0 -2
- package/dist/EventBus/EventMap.js.map +0 -1
- package/dist/components/StepsBlock/renderStepContent.js +0 -19
- package/dist/components/StepsBlock/renderStepContent.js.map +0 -1
- package/dist/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/dist/services/BlockRouter/useBlockRouter.js +0 -8
- package/dist/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/dist/utils/checkIsIconRenderable.d.ts +0 -2
- package/dist/utils/checkIsIconRenderable.js +0 -5
- package/dist/utils/checkIsIconRenderable.js.map +0 -1
- package/lib/EventBus/EventMap.d.ts +0 -4
- package/lib/EventBus/EventMap.js +0 -2
- package/lib/EventBus/EventMap.js.map +0 -1
- package/lib/components/StepsBlock/renderStepContent.js +0 -16
- package/lib/components/StepsBlock/renderStepContent.js.map +0 -1
- package/lib/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/lib/services/BlockRouter/useBlockRouter.js +0 -5
- package/lib/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/lib/utils/checkIsIconRenderable.d.ts +0 -2
- package/lib/utils/checkIsIconRenderable.js +0 -2
- package/lib/utils/checkIsIconRenderable.js.map +0 -1
- package/mobile/bundle/EventBus/EventMap.d.ts +0 -4
- package/mobile/bundle/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/mobile/bundle/utils/checkIsIconRenderable.d.ts +0 -2
- package/mobile/dist/EventBus/EventMap.d.ts +0 -4
- package/mobile/dist/EventBus/EventMap.js +0 -2
- package/mobile/dist/EventBus/EventMap.js.map +0 -1
- package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +0 -11
- package/mobile/dist/components/StepsBlock/renderStepContent.js +0 -19
- package/mobile/dist/components/StepsBlock/renderStepContent.js.map +0 -1
- package/mobile/dist/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/mobile/dist/services/BlockRouter/useBlockRouter.js +0 -8
- package/mobile/dist/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/mobile/dist/utils/checkIsIconRenderable.d.ts +0 -2
- package/mobile/dist/utils/checkIsIconRenderable.js +0 -5
- package/mobile/dist/utils/checkIsIconRenderable.js.map +0 -1
- package/mobile/lib/EventBus/EventMap.d.ts +0 -4
- package/mobile/lib/EventBus/EventMap.js +0 -2
- package/mobile/lib/EventBus/EventMap.js.map +0 -1
- package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +0 -11
- package/mobile/lib/components/StepsBlock/renderStepContent.js +0 -16
- package/mobile/lib/components/StepsBlock/renderStepContent.js.map +0 -1
- package/mobile/lib/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/mobile/lib/services/BlockRouter/useBlockRouter.js +0 -5
- package/mobile/lib/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/mobile/lib/utils/checkIsIconRenderable.d.ts +0 -2
- package/mobile/lib/utils/checkIsIconRenderable.js +0 -2
- package/mobile/lib/utils/checkIsIconRenderable.js.map +0 -1
- package/mobile/src/EventBus/EventMap.ts +0 -5
- package/mobile/src/components/StepsBlock/renderStepContent.tsx +0 -83
- package/mobile/src/services/BlockRouter/useBlockRouter.ts +0 -5
- package/mobile/src/utils/checkIsIconRenderable.tsx +0 -3
- package/src/EventBus/EventMap.ts +0 -5
- package/src/components/StepsBlock/renderStepContent.tsx +0 -83
- package/src/services/BlockRouter/useBlockRouter.ts +0 -5
- package/src/utils/checkIsIconRenderable.tsx +0 -3
|
@@ -3,6 +3,10 @@ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
|
3
3
|
* @title Блок Кнопка
|
|
4
4
|
*/
|
|
5
5
|
export interface ButtonBlockContent {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title Кнопка
|
|
8
|
+
* @default {"icon": {"format": "webp", "size": { "width": 24, "height": 24 }},
|
|
9
|
+
* "iconRight": {"format": "webp", "size": { "width": 24, "height": 24 }}}
|
|
10
|
+
*/
|
|
7
11
|
button?: ButtonWithIconProps;
|
|
8
12
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
};
|
|
4
|
+
export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DefaultListItemType } from '../../model/DefaultListItemType';
|
|
2
3
|
import type { DescriptionProps, HeadlineCommonProps, LabelProps } from '../../model/HeadlineType';
|
|
3
4
|
import type { IconProps } from '../../model/Picture';
|
|
5
|
+
import type { RichTextItem } from '../../model/RichTextItem';
|
|
4
6
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
5
7
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
8
|
declare type StepCommonProps = IconProps & {
|
|
@@ -14,10 +16,18 @@ declare type StepCommonProps = IconProps & {
|
|
|
14
16
|
/** @title Список */
|
|
15
17
|
items?: string[];
|
|
16
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* @title Стандартный
|
|
21
|
+
*/
|
|
22
|
+
export declare type DefaultStep = DescriptionProps & LabelProps & StepCommonProps & DefaultListItemType;
|
|
23
|
+
/**
|
|
24
|
+
* @title Форматированный текст
|
|
25
|
+
*/
|
|
26
|
+
declare type RichTextStep = RichTextItem & IconProps;
|
|
17
27
|
/**
|
|
18
28
|
* @title Шаг
|
|
19
29
|
*/
|
|
20
|
-
export declare type Step =
|
|
30
|
+
export declare type Step = DefaultStep | RichTextStep;
|
|
21
31
|
/**
|
|
22
32
|
* @title Блок шаги
|
|
23
33
|
*/
|
|
@@ -2,10 +2,10 @@ import type { BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import type { VNode } from '../../model/VNode';
|
|
3
3
|
import type { Step } from './StepsBlockContent';
|
|
4
4
|
import type { StyleType } from './StepsBlockStyleMaps';
|
|
5
|
-
|
|
5
|
+
interface RenderStepProps {
|
|
6
6
|
styleMap: StyleType;
|
|
7
7
|
isMainButton: boolean;
|
|
8
|
-
version?: BlockVersion
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
version?: BlockVersion;
|
|
9
|
+
}
|
|
10
|
+
export declare const renderStep: (props: RenderStepProps) => (step: Step, i: number, arr: Step[]) => VNode;
|
|
11
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
-
import type { DescriptionProps } from '../../model/HeadlineType';
|
|
3
2
|
import type { Picture } from '../../model/Picture';
|
|
4
3
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
4
|
import type { HeadingCommonProps } from '../../ui-kit/Heading/HeadingProps';
|
|
6
5
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
6
|
import type { ListItemSize } from '../../ui-kit/List/ListProps';
|
|
7
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
8
8
|
import type { TagsContent } from '../../ui-kit/Tags/TagsContent';
|
|
9
9
|
/**
|
|
10
10
|
* @title Плитка
|
|
11
11
|
*/
|
|
12
|
-
export declare type TileContent = HeadingCommonProps &
|
|
12
|
+
export declare type TileContent = HeadingCommonProps & RichTextProps & ListContent & ButtonContent & TagsContent & {
|
|
13
13
|
/**
|
|
14
14
|
* @default {
|
|
15
15
|
* "format": "webp",
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
interface RouterOptions {
|
|
2
|
+
scroll?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export interface Router {
|
|
2
5
|
pathname: string;
|
|
3
6
|
query: Record<string, string | string[] | undefined>;
|
|
4
7
|
href?: string;
|
|
5
8
|
basePath?: string;
|
|
6
|
-
push: (url: string) => void;
|
|
7
|
-
replace: (url: string) => void;
|
|
9
|
+
push: (url: string, as?: string, options?: RouterOptions) => void;
|
|
10
|
+
replace: (url: string, as?: string, options?: RouterOptions) => void;
|
|
8
11
|
}
|
|
9
12
|
export declare function useRouter(): Router;
|
|
10
13
|
export declare namespace useRouter {
|
|
11
14
|
var _impl: () => Router;
|
|
12
15
|
var setup: (impl: () => Router) => void;
|
|
13
16
|
}
|
|
17
|
+
export {};
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Router } from '../../hooks/useRouter';
|
|
2
2
|
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export interface BlockIntersectionEvent {
|
|
7
|
-
block: BlockDef;
|
|
8
|
-
intersection: IntersectionObserverEntry;
|
|
9
|
-
}
|
|
10
|
-
interface EventMap {
|
|
11
|
-
goto: GotoAnchorEvent;
|
|
12
|
-
intersection: BlockIntersectionEvent;
|
|
13
|
-
}
|
|
14
|
-
export declare class BlockRouter {
|
|
15
|
-
static readonly inst: BlockRouter;
|
|
16
|
-
readonly eventBus: EventBus<EventMap>;
|
|
17
|
-
constructor();
|
|
18
|
-
goto(rawAnchor?: string): void;
|
|
19
|
-
push(rawAnchor: string): void;
|
|
20
|
-
replace(rawAnchor: string): void;
|
|
21
|
-
reset(): void;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
3
|
+
export declare function gotoBlock(router: Router, anchor?: string): void;
|
|
4
|
+
export declare function trackBlock(router: Router, block?: BlockDef): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventBus } from '../../EventBus/EventBus';
|
|
2
|
+
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
+
export interface BlockIntersectionEvent {
|
|
4
|
+
block: BlockDef;
|
|
5
|
+
intersection: IntersectionObserverEntry;
|
|
6
|
+
}
|
|
7
|
+
interface EventMap {
|
|
8
|
+
intersection: BlockIntersectionEvent;
|
|
9
|
+
}
|
|
10
|
+
export declare const blockRouterEventBus: EventBus<EventMap>;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
|
|
3
|
-
export declare function useBlockIntersectionObserver(block?: BlockDef, router?: BlockRouter): {
|
|
2
|
+
export declare function useBlockIntersectionObserver(block?: BlockDef): {
|
|
4
3
|
current: Element | null;
|
|
5
4
|
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function useBlockRouterProvider(router?: BlockRouter, scrollTarget?: EventTarget): void;
|
|
1
|
+
export declare function useBlockRouterProvider(scrollTarget?: EventTarget): void;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare type BaseEventMap = Record<string, any>;
|
|
3
|
-
export declare class EventBus<EM extends BaseEventMap> {
|
|
4
|
-
static readonly inst: EventBus<EventMap>;
|
|
1
|
+
export declare class EventBus<EM extends Record<string, any>> {
|
|
5
2
|
private subscribers;
|
|
6
3
|
private subjectsStateMap;
|
|
7
4
|
subscribe<K extends keyof EM>(type: K, listener: (event: EM[K]) => void): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventBus.js","sourceRoot":"","sources":["../../src/EventBus/EventBus.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"EventBus.js","sourceRoot":"","sources":["../../src/EventBus/EventBus.ts"],"names":[],"mappings":";;AAAA,MAAa,QAAQ;IACX,WAAW,GAAiE,EAAE,CAAC;IAC/E,gBAAgB,GAAgB,EAAE,CAAC;IAE3C,SAAS,CAAqB,IAAO,EAAE,QAAgC;QACrE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAC5D,QAAsC,CACvC,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,WAAW,EAAE;YACf,QAAQ,CAAC,WAAoB,CAAC,CAAC;SAChC;QAED,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACnC,CAAC,CAAC;IACJ,CAAC;IAEO,WAAW,CAAqB,IAAO,EAAE,QAAgC;QAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;IACjF,CAAC;IAED,IAAI,CAAqB,IAAO,EAAE,KAAY;QAC5C,MAAM,iBAAiB,GAAG,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC;QACxD,IAAI,iBAAiB,EAAE;YACrB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;SACrC;QAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,CAAqB,IAAO,EAAE,KAAY;QAC/C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IACtC,CAAC;CACF;AAnCD,4BAmCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultEventBus.js","sourceRoot":"","sources":["../../src/EventBus/defaultEventBus.ts"],"names":[],"mappings":";;AACA,yCAAsC;AAMzB,QAAA,eAAe,GAAG,IAAI,mBAAQ,EAAkB,CAAC"}
|
|
@@ -4,5 +4,6 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
6
|
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
7
|
-
|
|
7
|
+
const style_1 = require("../../utils/style");
|
|
8
|
+
exports.ButtonBlock = (0, uni_jsx_1.JSX)(({ button, className, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('!bg-transparent', className), ...rest, children: (0, renderButtonsSection_1.renderButtonsSection)([button]) })));
|
|
8
9
|
//# sourceMappingURL=ButtonBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBlock.js","sourceRoot":"","sources":["../../../src/components/ButtonBlock/ButtonBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;
|
|
1
|
+
{"version":3,"file":"ButtonBlock.js","sourceRoot":"","sources":["../../../src/components/ButtonBlock/ButtonBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,6CAA0C;AAK7B,QAAA,WAAW,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACnF,uBAAC,2BAAY,IAAC,SAAS,EAAE,IAAA,aAAK,EAAC,iBAAiB,EAAE,SAAS,CAAC,KAAM,IAAI,YACnE,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,CAAC,GAClB,CAChB,CAAC,CAAC"}
|
|
@@ -3,6 +3,10 @@ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
|
3
3
|
* @title Блок Кнопка
|
|
4
4
|
*/
|
|
5
5
|
export interface ButtonBlockContent {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title Кнопка
|
|
8
|
+
* @default {"icon": {"format": "webp", "size": { "width": 24, "height": 24 }},
|
|
9
|
+
* "iconRight": {"format": "webp", "size": { "width": 24, "height": 24 }}}
|
|
10
|
+
*/
|
|
7
11
|
button?: ButtonWithIconProps;
|
|
8
12
|
}
|
|
@@ -4,5 +4,5 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
6
6
|
const style_1 = require("../../utils/style");
|
|
7
|
-
exports.Rate = (0, uni_jsx_1.JSX)(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l-light", color: "text-secondary-text", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-start", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, style_1.style)('block gradient-color-text font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate).replace('.', ',') }), unit ? ((0, jsx_runtime_1.jsx)("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit })) : ('')] }), depositeName && isShowDepositeName ? ((0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
7
|
+
exports.Rate = (0, uni_jsx_1.JSX)(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l-light", color: "text-secondary-text", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-start", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, style_1.style)('block gradient-color-text font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate.toFixed(2)).replace('.', ',') }), unit ? ((0, jsx_runtime_1.jsx)("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit })) : ('')] }), depositeName && isShowDepositeName ? ((0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
8
8
|
//# sourceMappingURL=Rate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,6CAA0C;AAW7B,QAAA,IAAI,GAAG,IAAA,aAAG,EACrB,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAC1F,4CACE,uBAAC,WAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,EACP,iCAAK,SAAS,EAAC,UAAU,aACvB,iCAAK,SAAS,EAAC,oBAAoB,aACjC,iCACE,SAAS,EAAE,IAAA,aAAK,EACd,kEAAkE,EAClE,kBAAkB,CACnB,YAEA,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,6CAA0C;AAW7B,QAAA,IAAI,GAAG,IAAA,aAAG,EACrB,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAC1F,4CACE,uBAAC,WAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,EACP,iCAAK,SAAS,EAAC,UAAU,aACvB,iCAAK,SAAS,EAAC,oBAAoB,aACjC,iCACE,SAAS,EAAE,IAAA,aAAK,EACd,kEAAkE,EAClE,kBAAkB,CACnB,YAEA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,GACrC,EACN,IAAI,CAAC,CAAC,CAAC,CACN,iCAAM,SAAS,EAAC,gDAAgD,YAAE,IAAI,GAAQ,CAC/E,CAAC,CAAC,CAAC,CACF,EAAE,CACH,IACG,EACL,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACpC,gCAAK,SAAS,EAAC,wDAAwD,YACpE,YAAY,GACT,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
|
|
@@ -46,7 +46,7 @@ exports.DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
|
|
|
46
46
|
maxSum: 5000000,
|
|
47
47
|
minMonths: 2,
|
|
48
48
|
maxMonths: 120,
|
|
49
|
-
rate:
|
|
49
|
+
rate: 7,
|
|
50
50
|
isMonthlyInterestPayment: true,
|
|
51
51
|
};
|
|
52
52
|
exports.DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
@@ -54,7 +54,7 @@ exports.DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
|
54
54
|
maxSum: 500000,
|
|
55
55
|
minDays: exports.BUSINESS_MIN_DAYS,
|
|
56
56
|
maxDays: exports.BUSINESS_MAX_DAYS,
|
|
57
|
-
rate:
|
|
57
|
+
rate: 6.6,
|
|
58
58
|
isMonthlyInterestPayment: true,
|
|
59
59
|
isReplenished: false,
|
|
60
60
|
isPartialWithdrawal: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":";;AAKa,QAAA,eAAe,GAAG,KAAK,CAAC;AACxB,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,WAAW,GAAG,CAAC,uBAAe,GAAG,uBAAe,CAAC,GAAG,CAAC,CAAC;AACtD,QAAA,kBA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C9B,QAAA,oBAAoB,GAAG,IAAI,CAAC;AAE5B,QAAA,+BAA+B,GAAoC;IAC9E,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,CAAC;IAChB,mBAAmB,EAAE,KAAK;IAC1B,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEW,QAAA,iCAAiC,GAAsC;IAClF,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;CAC/B,CAAC;AAEW,QAAA,0CAA0C,GACrD;IACE,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,yBAAiB;IAC1B,OAAO,EAAE,yBAAiB;IAC1B,IAAI,EAAE,GAAG;IACT,wBAAwB,EAAE,IAAI;IAC9B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAES,QAAA,uBAAuB,GAAG,wBAAwB,CAAC;AACnD,QAAA,sBAAsB,GAAG,uBAAuB,CAAC;AACjD,QAAA,wBAAwB,GAAG,yBAAyB,CAAC;AACrD,QAAA,iCAAiC,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
};
|
|
4
|
+
export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.checkRangeByKeys = exports.getRangeByKeys = void 0;
|
|
3
|
+
const maxBy_1 = require("../../utils/maxBy");
|
|
4
|
+
const minBy_1 = require("../../utils/minBy");
|
|
5
|
+
const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
|
|
6
|
+
[minKey]: rows.length ? (0, minBy_1.minBy)()(rows.map((row) => row[minKey])) : 0,
|
|
7
|
+
[maxKey]: rows.length ? (0, maxBy_1.maxBy)()(rows.map((row) => row[maxKey])) : 0,
|
|
8
|
+
});
|
|
9
|
+
exports.getRangeByKeys = getRangeByKeys;
|
|
10
|
+
const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value < sourceBookRow[maxKey];
|
|
11
|
+
exports.checkRangeByKeys = checkRangeByKeys;
|
|
12
|
+
//# sourceMappingURL=rangeHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeHelpers.js","sourceRoot":"","sources":["../../../src/components/Calculator/rangeHelpers.ts"],"names":[],"mappings":";;AAAA,6CAA0C;AAC1C,6CAA0C;AAEnC,MAAM,cAAc,GAAG,CAK5B,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,OAAY,EAAE,EACd,EAAE,CAAC,CAAC;IACJ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,aAAK,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,aAAK,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,CAAC,CAAC;AAVU,QAAA,cAAc,kBAUxB;AAEI,MAAM,gBAAgB,GAAG,CAK9B,KAAa,EACb,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,aAAgB,EACP,EAAE,CAAC,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;AARjE,QAAA,gBAAgB,oBAQiD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.useBusinessDepositCalculatorParams = void 0;
|
|
3
3
|
const constants_1 = require("./constants");
|
|
4
|
+
const rangeHelpers_1 = require("./rangeHelpers");
|
|
4
5
|
const useCalculatorParams_1 = require("./useCalculatorParams");
|
|
5
6
|
const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
6
7
|
const { daysValue, moneyValue, isPartialWithdrawal, isReplenished, isSmallBusiness, isMonthlyInterestPayment, } = userInputParams;
|
|
@@ -18,15 +19,18 @@ const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
|
18
19
|
const businessDepositCalculatorSourceBookParams = data?.rows?.find((_) => {
|
|
19
20
|
return (isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
20
21
|
isSmallBusiness === _.isSmallBusiness &&
|
|
21
|
-
(isOperatingDeposit
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
checkIsOperatingDeposit(isOperatingDeposit, _) &&
|
|
23
|
+
(0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
24
|
+
(0, rangeHelpers_1.checkRangeByKeys)(daysValue, ['minDays', 'maxDays'], _));
|
|
24
25
|
}) || constants_1.DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS;
|
|
25
26
|
const { rate } = businessDepositCalculatorSourceBookParams;
|
|
26
27
|
const income = getDepositIncome(rate, userInputParams);
|
|
27
28
|
const finalSum = moneyValue + income;
|
|
29
|
+
const sourceBookRows = data?.rows || [constants_1.DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS];
|
|
28
30
|
return {
|
|
29
31
|
...businessDepositCalculatorSourceBookParams,
|
|
32
|
+
...(0, rangeHelpers_1.getRangeByKeys)(['minSum', 'maxSum'], sourceBookRows),
|
|
33
|
+
...(0, rangeHelpers_1.getRangeByKeys)(['minDays', 'maxDays'], sourceBookRows),
|
|
30
34
|
...userInputParams,
|
|
31
35
|
isDisabledOperatingDeposit,
|
|
32
36
|
income,
|
|
@@ -34,6 +38,9 @@ const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
40
|
exports.useBusinessDepositCalculatorParams = useBusinessDepositCalculatorParams;
|
|
41
|
+
const checkIsOperatingDeposit = (isOperatingDeposit, sourceBookRow) => isOperatingDeposit
|
|
42
|
+
? sourceBookRow.isReplenished && sourceBookRow.isPartialWithdrawal
|
|
43
|
+
: !sourceBookRow.isReplenished && !sourceBookRow.isPartialWithdrawal;
|
|
37
44
|
const getDepositIncome = (rate, userInputParams) => {
|
|
38
45
|
const { isMonthlyInterestPayment, moneyValue, daysValue } = userInputParams;
|
|
39
46
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBusinessDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useBusinessDepositCalculatorParams.ts"],"names":[],"mappings":";;AAAA,2CAMqB;AACrB,+DAA4D;AAkCrD,MAAM,kCAAkC,GAAG,CAChD,eAAyD,EACzD,aAAsB,EACW,EAAE;IACnC,MAAM,EACJ,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,wBAAwB,GACzB,GAAG,eAAe,CAAC;IACpB,MAAM,IAAI,GAAG,IAAA,yCAAmB,EAC9B,aAAa,IAAI,6CAAiC,CACnD,CAAC;IAEF,MAAM,kBAAkB,GAAG,aAAa,IAAI,mBAAmB,CAAC;IAChE,MAAM,0BAA0B,GAC9B,SAAS,GAAG,uCAA2B,IAAI,SAAS,GAAG,uCAA2B,CAAC;IAErF,IAAI,SAAS,IAAI,kCAAsB,EAAE;QACvC,OAAO;YACL,GAAG,sDAA0C;YAC7C,GAAG,eAAe;YAClB,0BAA0B;YAC1B,IAAI,EAAE,CAAC;SACR,CAAC;KACH;IACD,MAAM,yCAAyC,GAC7C,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QACrB,OAAO,CACL,wBAAwB,KAAK,CAAC,CAAC,wBAAwB;YACvD,eAAe,KAAK,CAAC,CAAC,eAAe;YACrC,CAAC,kBAAkB
|
|
1
|
+
{"version":3,"file":"useBusinessDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useBusinessDepositCalculatorParams.ts"],"names":[],"mappings":";;AAAA,2CAMqB;AACrB,iDAAkE;AAClE,+DAA4D;AAkCrD,MAAM,kCAAkC,GAAG,CAChD,eAAyD,EACzD,aAAsB,EACW,EAAE;IACnC,MAAM,EACJ,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,wBAAwB,GACzB,GAAG,eAAe,CAAC;IACpB,MAAM,IAAI,GAAG,IAAA,yCAAmB,EAC9B,aAAa,IAAI,6CAAiC,CACnD,CAAC;IAEF,MAAM,kBAAkB,GAAG,aAAa,IAAI,mBAAmB,CAAC;IAChE,MAAM,0BAA0B,GAC9B,SAAS,GAAG,uCAA2B,IAAI,SAAS,GAAG,uCAA2B,CAAC;IAErF,IAAI,SAAS,IAAI,kCAAsB,EAAE;QACvC,OAAO;YACL,GAAG,sDAA0C;YAC7C,GAAG,eAAe;YAClB,0BAA0B;YAC1B,IAAI,EAAE,CAAC;SACR,CAAC;KACH;IACD,MAAM,yCAAyC,GAC7C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,CACvB,IAAY,EACZ,eAAyD,EACzD,EAAE;IACF,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,eAAe,CAAC;IAE5E;;MAEE;IACF,IAAI,wBAAwB,EAAE;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;KAC7F;SAAM;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;KAChE;AACH,CAAC,CAAC"}
|
|
@@ -2,20 +2,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.useCreditCalculatorParams = void 0;
|
|
3
3
|
const constants_1 = require("./constants");
|
|
4
4
|
const getMonthlyPayment_1 = require("./getMonthlyPayment");
|
|
5
|
+
const rangeHelpers_1 = require("./rangeHelpers");
|
|
5
6
|
const useCalculatorParams_1 = require("./useCalculatorParams");
|
|
6
7
|
const useCreditCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
7
|
-
const { isInsurance, isSalaryClient, isStateEmployee, moneyValue } = userInputParams;
|
|
8
|
+
const { isInsurance, isSalaryClient, isStateEmployee, moneyValue, monthsValue } = userInputParams;
|
|
8
9
|
const data = (0, useCalculatorParams_1.useCalculatorParams)(sourceBookDir || constants_1.CREDIT_CALC_DEFAULT_DIR);
|
|
9
10
|
const creditCalculatorSourceBookParams = data?.rows?.find((_) => {
|
|
10
11
|
return (isInsurance === _.isInsurance &&
|
|
11
12
|
isSalaryClient === _.isSalaryClient &&
|
|
12
|
-
isStateEmployee === _.isStateEmployee
|
|
13
|
+
isStateEmployee === _.isStateEmployee &&
|
|
14
|
+
(0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
15
|
+
(0, rangeHelpers_1.checkRangeByKeys)(monthsValue, ['minMonths', 'maxMonths'], _));
|
|
13
16
|
}) || constants_1.DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
14
17
|
const { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
|
|
15
18
|
const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
|
|
16
19
|
const monthlyPayment = (0, getMonthlyPayment_1.getMonthlyPayment)(finalRate, userInputParams);
|
|
20
|
+
const sourceBookRows = data?.rows || [constants_1.DEFAULT_CREDIT_CALCULATOR_PARAMS];
|
|
17
21
|
return {
|
|
18
22
|
...creditCalculatorSourceBookParams,
|
|
23
|
+
...(0, rangeHelpers_1.getRangeByKeys)(['minSum', 'maxSum'], sourceBookRows),
|
|
24
|
+
...(0, rangeHelpers_1.getRangeByKeys)(['minMonths', 'maxMonths'], sourceBookRows),
|
|
19
25
|
...userInputParams,
|
|
20
26
|
finalRate,
|
|
21
27
|
monthlyPayment,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreditCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useCreditCalculatorParams.ts"],"names":[],"mappings":";;AAAA,2CAAwF;AACxF,2DAAwD;AACxD,+DAA4D;AAkCrD,MAAM,yBAAyB,GAAG,CACvC,eAAgD,EAChD,aAAsB,EACE,EAAE;IAC1B,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useCreditCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useCreditCalculatorParams.ts"],"names":[],"mappings":";;AAAA,2CAAwF;AACxF,2DAAwD;AACxD,iDAAkE;AAClE,+DAA4D;AAkCrD,MAAM,yBAAyB,GAAG,CACvC,eAAgD,EAChD,aAAsB,EACE,EAAE;IAC1B,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE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Property(exports, "__esModule", { value: true });
|
|
2
2
|
exports.useDepositCalculatorParams = void 0;
|
|
3
3
|
const constants_1 = require("./constants");
|
|
4
|
+
const rangeHelpers_1 = require("./rangeHelpers");
|
|
4
5
|
const useCalculatorParams_1 = require("./useCalculatorParams");
|
|
5
6
|
const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
6
|
-
const { isMonthlyInterestPayment, moneyValue } = userInputParams;
|
|
7
|
+
const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
|
|
7
8
|
const data = (0, useCalculatorParams_1.useCalculatorParams)(sourceBookDir || constants_1.DEPOSIT_CALC_DEFAULT_DIR);
|
|
8
|
-
const depositCalculatorSourceBookParams = data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment
|
|
9
|
-
|
|
9
|
+
const depositCalculatorSourceBookParams = data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
10
|
+
(0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
11
|
+
(0, rangeHelpers_1.checkRangeByKeys)(monthsValue, ['minMonths', 'maxMonths'], _)) || constants_1.DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
10
12
|
const { rate } = depositCalculatorSourceBookParams;
|
|
11
13
|
const income = getDepositIncome(rate, userInputParams);
|
|
12
14
|
const finalSum = moneyValue + income;
|
|
13
|
-
|
|
15
|
+
const sourceBookRows = data?.rows || [constants_1.DEFAULT_DEPOSIT_CALCULATOR_PARAMS];
|
|
16
|
+
return {
|
|
17
|
+
...depositCalculatorSourceBookParams,
|
|
18
|
+
...(0, rangeHelpers_1.getRangeByKeys)(['minSum', 'maxSum'], sourceBookRows),
|
|
19
|
+
...(0, rangeHelpers_1.getRangeByKeys)(['minMonths', 'maxMonths'], sourceBookRows),
|
|
20
|
+
...userInputParams,
|
|
21
|
+
income,
|
|
22
|
+
finalSum,
|
|
23
|
+
};
|
|
14
24
|
};
|
|
15
25
|
exports.useDepositCalculatorParams = useDepositCalculatorParams;
|
|
16
26
|
const getDepositIncome = (rate, userInputParams) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useDepositCalculatorParams.ts"],"names":[],"mappings":";;AAAA,2CAA0F;AAC1F,+DAA4D;
|
|
1
|
+
{"version":3,"file":"useDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useDepositCalculatorParams.ts"],"names":[],"mappings":";;AAAA,2CAA0F;AAC1F,iDAAkE;AAClE,+DAA4D;AA8BrD,MAAM,0BAA0B,GAAG,CACxC,eAAiD,EACjD,aAAsB,EACG,EAAE;IAC3B,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;IAE9E,MAAM,IAAI,GAAG,IAAA,yCAAmB,EAC9B,aAAa,IAAI,oCAAwB,CAC1C,CAAC;IAEF,MAAM,iCAAiC,GACrC,IAAI,EAAE,IAAI,EAAE,IAAI,CACd,CAAC,CAAC,EAAE,EAAE,CACJ,wBAAwB,KAAK,CAAC,CAAC,wBAAwB;QACvD,IAAA,+BAAgB,EAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QACrD,IAAA,+BAAgB,EAAC,WAAW,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC,CAC/D,IAAI,6CAAiC,CAAC;IAEzC,MAAM,EAAE,IAAI,EAAE,GAAG,iCAAiC,CAAC;IAEnD,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACrC,MAAM,cAAc,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC,6CAAiC,CAAC,CAAC;IAEzE,OAAO;QACL,GAAG,iCAAiC;QACpC,GAAG,IAAA,6BAAc,EAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC;QACvD,GAAG,IAAA,6BAAc,EAAC,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC;QAC7D,GAAG,eAAe;QAClB,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,0BAA0B,8BAgCrC;AAEF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,eAAiD,EAAE,EAAE;IAC3F,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;IAE9E,IAAI,wBAAwB,EAAE;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,CAAC;KAC1F;SAAM;QACL;;UAEE;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;KACvE;AACH,CAAC,CAAC"}
|
|
@@ -21,10 +21,12 @@ exports.Carousel = (0, uni_jsx_1.JSX)(({ className = '', itemCount, visibleItemC
|
|
|
21
21
|
isCyclic,
|
|
22
22
|
});
|
|
23
23
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(getPaddingStyle(isPadding), className), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative max-w-full", children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(getPaddingStyle(isPadding), className), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative max-w-full", children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: isBankHistoryCarousel
|
|
25
|
+
? (0, renderChildren_1.renderChildren)({
|
|
26
|
+
...rest,
|
|
27
|
+
block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
|
|
28
|
+
})
|
|
29
|
+
: (0, renderChildren_1.renderChildren)(rest) }), (0, jsx_runtime_1.jsx)(CarouselScrollButtons_1.CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
|
|
28
30
|
});
|
|
29
31
|
exports.Carousel.childrenTypes = [
|
|
30
32
|
'CarouselCard',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AACpE,uEAAoE;AAGpE,4DAAyD;AACzD,yFAAsF;AACtF,yFAAsF;AACtF,6CAA0C;AAE1C,mEAAgE;AAMhE,MAAM,SAAS,GAAG,CAAC,CAAC;AAEP,QAAA,QAAQ,GAA4B,IAAA,aAAG,EAClD,CAAC,EACC,SAAS,GAAG,EAAE,EACd,SAAS,EACT,gBAAgB,EAChB,MAAM,GAAG,IAAI,EACb,QAAQ,GAAG,KAAK,EAChB,YAAY,GAAG,IAAI,EACnB,SAAS,GAAG,IAAI,EAChB,GA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C,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAClB,OAAO;gBACL,GAAG,CAAC;gBACJ,OAAO,EAAE;oBACP,GAAG,CAAC,CAAC,OAAO;oBACZ,WAAW,EAAE,CAAC;oBACd,QAAQ,EAAE,WAAW,KAAK,CAAC;oBAC3B,YAAY,EAAE,MAAM,CAAC,MAAM;iBAC5B;aACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,MAAM,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAkB,EAAU,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const BenefitItem_1 = require("../../ui-kit/BenefitItem/BenefitItem");
|
|
5
5
|
const RichText_1 = require("../../ui-kit/RichText/RichText");
|
|
6
6
|
const assertUnreachable_1 = require("../../utils/assertUnreachable");
|
|
7
|
+
// TODO: Create universal function for this case
|
|
7
8
|
const renderBenefit =
|
|
8
9
|
// Linter doesn't understand that switch processes all cases
|
|
9
10
|
// eslint-disable-next-line consistent-return
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/PictureText/renderBenefit.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAEnE,6DAA0D;AAC1D,qEAAkE;
|
|
1
|
+
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/PictureText/renderBenefit.tsx"],"names":[],"mappings":";;;AACA,sEAAmE;AAEnE,6DAA0D;AAC1D,qEAAkE;AAElE,gDAAgD;AACzC,MAAM,aAAa;AACxB,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,OAAqB,EAAE,EAAE,CAAC,CAAC,OAA4B,EAAE,CAAS,EAAE,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO,CACL,uBAAC,yBAAW,IAEV,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,OAAO,EAAE,OAAO,IAJX,MAAM,CAAC,CAAC,CAAC,CAKd,CACH,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,uBAAC,mBAAQ,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,CAAC;QAC9C;YACE,IAAA,qCAAiB,EAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC;AA1BS,QAAA,aAAa,iBA0BtB"}
|
|
@@ -4,6 +4,7 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const RichText_1 = require("../../ui-kit/RichText/RichText");
|
|
5
5
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
6
6
|
const assertUnreachable_1 = require("../../utils/assertUnreachable");
|
|
7
|
+
// TODO: Create universal function for this case
|
|
7
8
|
const renderBenefit =
|
|
8
9
|
// Linter doesn't understand that switch processes all cases
|
|
9
10
|
// eslint-disable-next-line consistent-return
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductTile/renderBenefit.tsx"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,iDAA8C;AAC9C,qEAAkE;
|
|
1
|
+
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductTile/renderBenefit.tsx"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,iDAA8C;AAC9C,qEAAkE;AAGlE,gDAAgD;AACzC,MAAM,aAAa;AACxB,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,OAAgB,EAAE,CAAS,EAAE,EAAE;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO;gBACL,uBAAC,WAAI,IAAoB,IAAI,EAAC,SAAS,YACpC,OAAO,CAAC,KAAK,IADL,SAAS,CAAC,EAAE,CAEhB;gBACP,uBAAC,WAAI,IAEH,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,wCAAwC,YAE7C,OAAO,CAAC,WAAW,IALf,QAAQ,CAAC,EAAE,CAMX;aACR,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,CACL,gCAAK,SAAS,EAAC,YAAY,YACzB,uBAAC,mBAAQ,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,GAChC,CACP,CAAC;QACJ;YACE,IAAA,qCAAiB,EAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC;AAlCS,QAAA,aAAa,iBAkCtB"}
|
|
@@ -6,26 +6,20 @@ const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
|
6
6
|
const Button_1 = require("../../ui-kit/Button/Button");
|
|
7
7
|
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
8
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
|
-
const checkIsIconRenderable_1 = require("../../utils/checkIsIconRenderable");
|
|
10
9
|
const getIconWithVersion_1 = require("../../utils/getIconWithVersion");
|
|
11
10
|
const joinList_1 = require("../../utils/joinList");
|
|
12
|
-
const
|
|
11
|
+
const style_1 = require("../../utils/style");
|
|
12
|
+
const checkCanRenderIcon_1 = require("./checkCanRenderIcon");
|
|
13
|
+
const renderStep_1 = require("./renderStep");
|
|
13
14
|
const StepsBlockStyleMaps_1 = require("./StepsBlockStyleMaps");
|
|
14
15
|
const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
|
|
15
16
|
const getPaddingX = (steps) => (steps < 5 ? 'px-[88px]' : 'px-[55px]');
|
|
16
|
-
exports.StepsBlock = (0, uni_jsx_1.JSX)(({ className = '', showLines = true, steps = [], button, version = 'primary', ...rest }) => {
|
|
17
|
-
const { title } = rest;
|
|
18
|
-
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE_MAPS[version];
|
|
17
|
+
exports.StepsBlock = (0, uni_jsx_1.JSX)(({ className = '', showLines = true, steps = [], button, version = 'primary', title, ...rest }) => {
|
|
19
18
|
const shortGaps = steps.length > 3;
|
|
19
|
+
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE_MAPS[version];
|
|
20
20
|
const lineOpacity = getLineOpacity(showLines);
|
|
21
|
-
const titleMargin = title ? 'mt-9' : '';
|
|
22
21
|
const paddingX = getPaddingX(steps.length);
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: [
|
|
24
|
-
'box-border py-12',
|
|
25
|
-
shortGaps ? 'px-20' : 'px-[70px]',
|
|
26
|
-
'flex flex-col items-center overflow-hidden',
|
|
27
|
-
className,
|
|
28
|
-
].join(' '), version: version, ...rest, children: [title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? ((0, jsx_runtime_1.jsxs)("div", { className: `box-border ${titleMargin}`, children: [(0, jsx_runtime_1.jsx)("div", { className: `flex items-center ${paddingX}`, children: (0, joinList_1.joinList)((0, jsx_runtime_1.jsx)("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap, version))) }), (0, jsx_runtime_1.jsx)("div", { className: `flex justify-between mt-4 ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map((0, renderStepContent_1.renderStepContent)({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? (0, jsx_runtime_1.jsx)(Button_1.Button, { className: "mt-8 min-w-60", version: "primary", ...button }) : null] }));
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('box-border py-12', shortGaps ? 'px-20' : 'px-[70px]', 'flex flex-col items-center overflow-hidden', className), version: version, ...rest, children: [title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: "max-w-[752px] text-center mb-9", title: title })) : null, steps?.length ? ((0, jsx_runtime_1.jsxs)("div", { className: "box-border", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('flex items-center', paddingX), children: (0, joinList_1.joinList)((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('h-0.5 w-full bg-secondary-light', lineOpacity) }))(steps.map(renderStepIcon(styleMap, version))) }), (0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('flex justify-between mt-4', shortGaps ? 'gap-x-3' : 'gap-x-[101px]'), children: steps.map((0, renderStep_1.renderStep)({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? (0, jsx_runtime_1.jsx)(Button_1.Button, { className: "mt-8 min-w-60", version: "primary", ...button }) : null] }));
|
|
29
23
|
});
|
|
30
|
-
const renderStepIcon = (styleMap, version) => ({ icon }, i) => ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col items-center text-center", children: (0, jsx_runtime_1.jsx)("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${styleMap.iconBackground}`, children: (0,
|
|
24
|
+
const renderStepIcon = (styleMap, version) => ({ icon }, i) => ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col items-center text-center", children: (0, jsx_runtime_1.jsx)("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${styleMap.iconBackground}`, children: (0, checkCanRenderIcon_1.checkCanRenderIcon)(icon) ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { image: (0, getIconWithVersion_1.getIconWithVersion)(icon || {}, version), width: "48", height: "48", asSVG: true })) : ((0, jsx_runtime_1.jsx)("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
|
|
31
25
|
//# sourceMappingURL=StepsBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,uDAAoD;AACpD,0DAAuD;AACvD,8CAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,uDAAoD;AACpD,0DAAuD;AACvD,8CAA2C;AAC3C,uEAAoE;AACpE,mDAAgD;AAChD,6CAA0C;AAC1C,6DAA0D;AAC1D,6CAA0C;AAG1C,+DAA+D;AAI/D,MAAM,cAAc,GAAG,CAAC,SAAkB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAE9E,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAElE,QAAA,UAAU,GAAG,IAAA,aAAG,EAC3B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,IAAI,EAChB,KAAK,GAAG,EAAE,EACV,MAAM,EACN,OAAO,GAAG,SAAS,EACnB,KAAK,EACL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