@redneckz/wildless-cms-uni-blocks 0.10.6 → 0.10.7
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/bundle.umd.js +198 -266
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/Rate.d.ts +1 -0
- package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
- package/bundle/components/Calculator/renderDaysInput.d.ts +2 -7
- package/bundle/components/Calculator/renderInterestPayment.d.ts +2 -9
- package/bundle/components/Calculator/renderMonthsInput.d.ts +3 -5
- package/bundle/components/Calculator/renderPaymentType.d.ts +2 -11
- package/bundle/components/Calculator/renderRegistrationType.d.ts +2 -9
- package/bundle/components/Calculator/renderWantedSumInput.d.ts +3 -7
- package/bundle/components/Carousel/itemsGap.d.ts +1 -0
- package/bundle/components/Carousel/itemsGap.mobile.d.ts +1 -0
- package/bundle/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
- package/bundle/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
- package/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
- package/bundle/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
- package/bundle/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
- package/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/bundle/ui-kit/InputRange/parseDecimal.d.ts +1 -0
- package/bundle/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.js +16 -18
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +4 -4
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +27 -43
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +30 -33
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Rate.d.ts +1 -0
- package/dist/components/Calculator/Rate.js +1 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +8 -0
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
- package/dist/components/Calculator/renderDaysInput.d.ts +2 -7
- package/dist/components/Calculator/renderDaysInput.js +2 -9
- package/dist/components/Calculator/renderDaysInput.js.map +1 -1
- package/dist/components/Calculator/renderInterestPayment.d.ts +2 -9
- package/dist/components/Calculator/renderInterestPayment.js +8 -18
- package/dist/components/Calculator/renderInterestPayment.js.map +1 -1
- package/dist/components/Calculator/renderMonthsInput.d.ts +3 -5
- package/dist/components/Calculator/renderMonthsInput.js +2 -10
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/dist/components/Calculator/renderPaymentType.d.ts +2 -11
- package/dist/components/Calculator/renderPaymentType.js +9 -19
- package/dist/components/Calculator/renderPaymentType.js.map +1 -1
- package/dist/components/Calculator/renderRegistrationType.d.ts +2 -9
- package/dist/components/Calculator/renderRegistrationType.js +8 -18
- package/dist/components/Calculator/renderRegistrationType.js.map +1 -1
- package/dist/components/Calculator/renderWantedSumInput.d.ts +3 -7
- package/dist/components/Calculator/renderWantedSumInput.js +4 -6
- package/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +3 -3
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/itemsGap.d.ts +1 -0
- package/dist/components/Carousel/itemsGap.js +4 -0
- package/dist/components/Carousel/itemsGap.js.map +1 -0
- package/dist/components/Carousel/itemsGap.mobile.d.ts +1 -0
- package/dist/components/Carousel/itemsGap.mobile.js +4 -0
- package/dist/components/Carousel/itemsGap.mobile.js.map +1 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
- package/dist/components/CarouselTariffsCard/descriptionSize.js +4 -0
- package/dist/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
- package/dist/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
- package/dist/components/CarouselTariffsCard/descriptionSize.mobile.js +4 -0
- package/dist/components/CarouselTariffsCard/descriptionSize.mobile.js.map +1 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.js +5 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +5 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -0
- package/dist/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
- package/dist/components/CarouselTariffsCard/renderCardInfo.js +12 -0
- package/dist/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
- package/dist/components/Headline/Headline.js +2 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/dist/components/Headline/headlineVersionStyles.js +6 -6
- package/dist/components/Headline/headlineVersionStyles.js.map +1 -1
- package/dist/hooks/useForm.js +2 -2
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +4 -1
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +22 -16
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/dist/ui-kit/InputRange/parseDecimal.d.ts +1 -0
- package/dist/ui-kit/InputRange/parseDecimal.js +9 -0
- package/dist/ui-kit/InputRange/parseDecimal.js.map +1 -0
- package/dist/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
- package/dist/ui-kit/InputRange/renderRangeWithTicks.js +17 -0
- package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
- package/dist/utils/getSanitizedValue.js +1 -1
- package/dist/utils/getSanitizedValue.js.map +1 -1
- package/dist/wlc.json +1 -2
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.js +16 -18
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +4 -4
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +27 -43
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +31 -34
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Rate.d.ts +1 -0
- package/lib/components/Calculator/Rate.js +1 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +5 -0
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
- package/lib/components/Calculator/renderDaysInput.d.ts +2 -7
- package/lib/components/Calculator/renderDaysInput.js +2 -9
- package/lib/components/Calculator/renderDaysInput.js.map +1 -1
- package/lib/components/Calculator/renderInterestPayment.d.ts +2 -9
- package/lib/components/Calculator/renderInterestPayment.js +8 -18
- package/lib/components/Calculator/renderInterestPayment.js.map +1 -1
- package/lib/components/Calculator/renderMonthsInput.d.ts +3 -5
- package/lib/components/Calculator/renderMonthsInput.js +2 -10
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/lib/components/Calculator/renderPaymentType.d.ts +2 -11
- package/lib/components/Calculator/renderPaymentType.js +8 -18
- package/lib/components/Calculator/renderPaymentType.js.map +1 -1
- package/lib/components/Calculator/renderRegistrationType.d.ts +2 -9
- package/lib/components/Calculator/renderRegistrationType.js +8 -18
- package/lib/components/Calculator/renderRegistrationType.js.map +1 -1
- package/lib/components/Calculator/renderWantedSumInput.d.ts +3 -7
- package/lib/components/Calculator/renderWantedSumInput.js +4 -6
- package/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +11 -0
- package/lib/components/Carousel/Carousel.js +2 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/itemsGap.d.ts +1 -0
- package/lib/components/Carousel/itemsGap.js +2 -0
- package/lib/components/Carousel/itemsGap.js.map +1 -0
- package/lib/components/Carousel/itemsGap.mobile.d.ts +1 -0
- package/lib/components/Carousel/itemsGap.mobile.js +2 -0
- package/lib/components/Carousel/itemsGap.mobile.js.map +1 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.d.ts +9 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
- package/lib/components/CarouselTariffsCard/descriptionSize.js +2 -0
- package/lib/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
- package/lib/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
- package/lib/components/CarouselTariffsCard/descriptionSize.mobile.js +2 -0
- package/lib/components/CarouselTariffsCard/descriptionSize.mobile.js.map +1 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.js +2 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +2 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -0
- package/lib/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
- package/lib/components/CarouselTariffsCard/renderCardInfo.js +9 -0
- package/lib/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +22 -0
- package/lib/components/Headline/Headline.js +2 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/lib/components/Headline/headlineVersionStyles.js +6 -6
- package/lib/components/Headline/headlineVersionStyles.js.map +1 -1
- package/lib/hooks/useForm.js +2 -2
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +4 -1
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +22 -16
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/lib/ui-kit/InputRange/parseDecimal.d.ts +1 -0
- package/lib/ui-kit/InputRange/parseDecimal.js +6 -0
- package/lib/ui-kit/InputRange/parseDecimal.js.map +1 -0
- package/lib/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
- package/lib/ui-kit/InputRange/renderRangeWithTicks.js +14 -0
- package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
- package/lib/utils/getSanitizedValue.js +1 -1
- package/lib/utils/getSanitizedValue.js.map +1 -1
- package/lib/wlc.json +1 -2
- package/mobile/bundle/bundle.umd.js +363 -265
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/Rate.d.ts +1 -0
- package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
- package/mobile/bundle/components/Calculator/renderDaysInput.d.ts +2 -7
- package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +2 -9
- package/mobile/bundle/components/Calculator/renderMonthsInput.d.ts +3 -5
- package/mobile/bundle/components/Calculator/renderPaymentType.d.ts +2 -11
- package/mobile/bundle/components/Calculator/renderRegistrationType.d.ts +2 -9
- package/mobile/bundle/components/Calculator/renderWantedSumInput.d.ts +3 -7
- package/mobile/bundle/components/Carousel/itemsGap.d.ts +1 -0
- package/mobile/bundle/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
- package/mobile/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
- package/mobile/bundle/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
- package/mobile/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/InputRange/parseDecimal.d.ts +1 -0
- package/mobile/bundle/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/Blocks.js +4 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +16 -18
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +4 -4
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +27 -43
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +30 -33
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.d.ts +1 -0
- package/mobile/dist/components/Calculator/Rate.js +1 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +8 -0
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
- package/mobile/dist/components/Calculator/renderDaysInput.d.ts +2 -7
- package/mobile/dist/components/Calculator/renderDaysInput.js +2 -9
- package/mobile/dist/components/Calculator/renderDaysInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +2 -9
- package/mobile/dist/components/Calculator/renderInterestPayment.js +8 -18
- package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +3 -5
- package/mobile/dist/components/Calculator/renderMonthsInput.js +2 -10
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderPaymentType.d.ts +2 -11
- package/mobile/dist/components/Calculator/renderPaymentType.js +9 -19
- package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRegistrationType.d.ts +2 -9
- package/mobile/dist/components/Calculator/renderRegistrationType.js +8 -18
- package/mobile/dist/components/Calculator/renderRegistrationType.js.map +1 -1
- package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +3 -7
- package/mobile/dist/components/Calculator/renderWantedSumInput.js +4 -6
- package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +3 -3
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/itemsGap.d.ts +1 -0
- package/mobile/dist/components/Carousel/itemsGap.js +4 -0
- package/mobile/dist/components/Carousel/itemsGap.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
- package/mobile/dist/components/CarouselTariffsCard/descriptionSize.js +4 -0
- package/mobile/dist/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +5 -0
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
- package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.js +12 -0
- package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
- package/mobile/dist/components/Headline/Headline.js +2 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/mobile/dist/components/Headline/headlineVersionStyles.js +6 -6
- package/mobile/dist/components/Headline/headlineVersionStyles.js.map +1 -1
- package/mobile/dist/hooks/useForm.js +2 -2
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +4 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js +22 -16
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/dist/ui-kit/InputRange/parseDecimal.d.ts +1 -0
- package/mobile/dist/ui-kit/InputRange/parseDecimal.js +9 -0
- package/mobile/dist/ui-kit/InputRange/parseDecimal.js.map +1 -0
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +17 -0
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
- package/mobile/dist/utils/getSanitizedValue.js +1 -1
- package/mobile/dist/utils/getSanitizedValue.js.map +1 -1
- package/mobile/dist/wlc.json +1 -2
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/Blocks.js +4 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +16 -18
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +4 -4
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +27 -43
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +31 -34
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.d.ts +1 -0
- package/mobile/lib/components/Calculator/Rate.js +1 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +5 -0
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
- package/mobile/lib/components/Calculator/renderDaysInput.d.ts +2 -7
- package/mobile/lib/components/Calculator/renderDaysInput.js +2 -9
- package/mobile/lib/components/Calculator/renderDaysInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +2 -9
- package/mobile/lib/components/Calculator/renderInterestPayment.js +8 -18
- package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +3 -5
- package/mobile/lib/components/Calculator/renderMonthsInput.js +2 -10
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderPaymentType.d.ts +2 -11
- package/mobile/lib/components/Calculator/renderPaymentType.js +8 -18
- package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRegistrationType.d.ts +2 -9
- package/mobile/lib/components/Calculator/renderRegistrationType.js +8 -18
- package/mobile/lib/components/Calculator/renderRegistrationType.js.map +1 -1
- package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +3 -7
- package/mobile/lib/components/Calculator/renderWantedSumInput.js +4 -6
- package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +2 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/itemsGap.d.ts +1 -0
- package/mobile/lib/components/Carousel/itemsGap.js +2 -0
- package/mobile/lib/components/Carousel/itemsGap.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
- package/mobile/lib/components/CarouselTariffsCard/descriptionSize.js +2 -0
- package/mobile/lib/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +2 -0
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
- package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.js +9 -0
- package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
- package/mobile/lib/components/Headline/Headline.js +2 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/mobile/lib/components/Headline/headlineVersionStyles.js +6 -6
- package/mobile/lib/components/Headline/headlineVersionStyles.js.map +1 -1
- package/mobile/lib/hooks/useForm.js +2 -2
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +4 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js +22 -16
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/lib/ui-kit/InputRange/parseDecimal.d.ts +1 -0
- package/mobile/lib/ui-kit/InputRange/parseDecimal.js +6 -0
- package/mobile/lib/ui-kit/InputRange/parseDecimal.js.map +1 -0
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +14 -0
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
- package/mobile/lib/utils/getSanitizedValue.js +1 -1
- package/mobile/lib/utils/getSanitizedValue.js.map +1 -1
- package/mobile/lib/wlc.json +1 -2
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/mobile/src/components/Blocks.ts +4 -0
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +29 -33
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +37 -57
- package/mobile/src/components/Calculator/Calculator.tsx +11 -5
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +52 -87
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +38 -66
- package/mobile/src/components/Calculator/Rate.tsx +14 -14
- package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +35 -0
- package/mobile/src/components/Calculator/renderDaysInput.tsx +10 -31
- package/mobile/src/components/Calculator/renderInterestPayment.tsx +13 -52
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +17 -39
- package/mobile/src/components/Calculator/renderPaymentType.tsx +13 -49
- package/mobile/src/components/Calculator/renderRegistrationType.tsx +13 -51
- package/mobile/src/components/Calculator/renderWantedSumInput.tsx +10 -27
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +2 -3
- package/mobile/src/components/Carousel/itemsGap.ts +1 -0
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -31
- package/mobile/src/components/CarouselTariffsCard/descriptionSize.tsx +1 -0
- package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -0
- package/mobile/src/components/CarouselTariffsCard/renderCardInfo.tsx +31 -0
- package/mobile/src/components/Headline/Headline.tsx +10 -5
- package/mobile/src/components/Headline/headlineVersionStyles.ts +7 -7
- package/mobile/src/hooks/useForm.ts +17 -14
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +5 -1
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +56 -43
- package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
- package/mobile/src/ui-kit/InputRange/parseDecimal.ts +6 -0
- package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +62 -0
- package/mobile/src/utils/getSanitizedValue.ts +1 -1
- package/mobile/src/wlc.json +1 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/src/components/Blocks.mobile.ts +4 -0
- package/src/components/Calculator/BonusCalculatorForm.tsx +29 -33
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +37 -57
- package/src/components/Calculator/Calculator.tsx +11 -5
- package/src/components/Calculator/CreditCalculatorForm.tsx +52 -87
- package/src/components/Calculator/DepositCalculatorForm.tsx +38 -66
- package/src/components/Calculator/Rate.tsx +14 -14
- package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +35 -0
- package/src/components/Calculator/renderDaysInput.tsx +10 -31
- package/src/components/Calculator/renderInterestPayment.tsx +13 -52
- package/src/components/Calculator/renderMonthsInput.tsx +17 -39
- package/src/components/Calculator/renderPaymentType.tsx +13 -49
- package/src/components/Calculator/renderRegistrationType.tsx +13 -51
- package/src/components/Calculator/renderWantedSumInput.tsx +10 -27
- package/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +93 -0
- package/src/components/Carousel/Carousel.tsx +2 -3
- package/src/components/Carousel/itemsGap.mobile.ts +1 -0
- package/src/components/Carousel/itemsGap.ts +1 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.tsx +74 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -31
- package/src/components/CarouselTariffsCard/descriptionSize.mobile.tsx +1 -0
- package/src/components/CarouselTariffsCard/descriptionSize.tsx +1 -0
- package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +2 -0
- package/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -0
- package/src/components/CarouselTariffsCard/renderCardInfo.tsx +31 -0
- package/src/components/Headline/Headline.fixture.mobile.tsx +95 -0
- package/src/components/Headline/Headline.tsx +10 -5
- package/src/components/Headline/headlineVersionStyles.ts +7 -7
- package/src/hooks/useForm.ts +17 -14
- package/src/ui-kit/Checkbox/Checkbox.tsx +5 -1
- package/src/ui-kit/InputRange/InputRange.tsx +56 -43
- package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
- package/src/ui-kit/InputRange/parseDecimal.ts +6 -0
- package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +62 -0
- package/src/utils/getSanitizedValue.ts +1 -1
- package/src/wlc.json +1 -2
- package/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/dist/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/dist/ui-kit/InputListRange/InputListRange.js +0 -41
- package/dist/ui-kit/InputListRange/InputListRange.js.map +0 -1
- package/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/dist/ui-kit/InputListRange/InputListRangeProps.js +0 -2
- package/dist/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
- package/lib/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/lib/ui-kit/InputListRange/InputListRange.js +0 -39
- package/lib/ui-kit/InputListRange/InputListRange.js.map +0 -1
- package/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/lib/ui-kit/InputListRange/InputListRangeProps.js +0 -2
- package/lib/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
- package/mobile/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/mobile/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/mobile/dist/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/mobile/dist/ui-kit/InputListRange/InputListRange.js +0 -41
- package/mobile/dist/ui-kit/InputListRange/InputListRange.js.map +0 -1
- package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js +0 -2
- package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
- package/mobile/lib/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/mobile/lib/ui-kit/InputListRange/InputListRange.js +0 -39
- package/mobile/lib/ui-kit/InputListRange/InputListRange.js.map +0 -1
- package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js +0 -2
- package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
- package/mobile/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
- package/mobile/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
- package/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
- package/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/* eslint-disable max-lines, max-lines-per-function */
|
|
1
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
3
|
+
import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
|
|
3
4
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
5
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
|
-
import { clamp } from '../../utils/clamp';
|
|
6
6
|
import { style } from '../../utils/style';
|
|
7
7
|
import type {
|
|
8
8
|
CreditCalculatorParamsViewSettings,
|
|
@@ -22,72 +22,58 @@ export interface CreditCalculatorProp extends CreditCalculatorProps {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
25
|
-
({ className
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const handleMoneyValue = useCallback((_: number) => setMoneyValue(_), []);
|
|
37
|
-
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
38
|
-
const handleMonthsValue = useCallback((_: number) => setMonthsValue(_), []);
|
|
39
|
-
const userInputParams = {
|
|
40
|
-
isAnnuity,
|
|
41
|
-
isInsurance,
|
|
42
|
-
isSalaryClient,
|
|
43
|
-
isPensionClient,
|
|
44
|
-
isStateEmployee,
|
|
45
|
-
moneyValue,
|
|
46
|
-
monthsValue,
|
|
47
|
-
};
|
|
25
|
+
({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
26
|
+
const [userInputParams, { field }] = useForm({
|
|
27
|
+
isAnnuity: false,
|
|
28
|
+
isInsurance: true,
|
|
29
|
+
isSalaryClient: false,
|
|
30
|
+
isPensionClient: false,
|
|
31
|
+
isStateEmployee: false,
|
|
32
|
+
moneyValue: CREDIT_DEFAULT_SUM,
|
|
33
|
+
monthsValue: DEFAULT_MONTHS,
|
|
34
|
+
});
|
|
35
|
+
|
|
48
36
|
const calculatorParams = useCreditCalculatorParams(
|
|
49
37
|
userInputParams,
|
|
50
38
|
sourceBookDir,
|
|
51
39
|
paramsViewSettings,
|
|
52
40
|
);
|
|
53
41
|
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
setMoneyValue(clamp(moneyValue, calculatorParams.minSum, calculatorParams.maxSum));
|
|
56
|
-
setMonthsValue(clamp(monthsValue, calculatorParams.minMonths, calculatorParams.maxMonths));
|
|
57
|
-
}, [calculatorParams]);
|
|
58
|
-
|
|
59
42
|
return (
|
|
60
43
|
<section className={style('flex justify-between', className)}>
|
|
61
44
|
<div className="w-[468px]">
|
|
62
|
-
{renderWantedSumInput(
|
|
63
|
-
'Сумма кредита, ₽',
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
45
|
+
{renderWantedSumInput({
|
|
46
|
+
title: 'Сумма кредита, ₽',
|
|
47
|
+
step: 500,
|
|
48
|
+
min: calculatorParams.minSum,
|
|
49
|
+
max: calculatorParams.maxSum,
|
|
50
|
+
...field('moneyValue'),
|
|
51
|
+
value: calculatorParams.moneyValue,
|
|
52
|
+
})}
|
|
53
|
+
{renderMonthsInput({
|
|
54
|
+
title: 'Срок кредита, месяцев',
|
|
55
|
+
min: calculatorParams.minMonths,
|
|
56
|
+
max: calculatorParams.maxMonths,
|
|
57
|
+
...field('monthsValue'),
|
|
58
|
+
value: calculatorParams.monthsValue,
|
|
59
|
+
})}
|
|
68
60
|
<div className="mt-7">
|
|
69
|
-
{renderCreditParamsForm({
|
|
70
|
-
...calculatorParams,
|
|
71
|
-
...paramsViewSettings,
|
|
72
|
-
handleIsSalaryClient,
|
|
73
|
-
handleIsStateEmployee,
|
|
74
|
-
handleIsPensionClient,
|
|
75
|
-
handleIsInsurance,
|
|
76
|
-
})}
|
|
61
|
+
{renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field)}
|
|
77
62
|
</div>
|
|
78
63
|
</div>
|
|
79
|
-
|
|
64
|
+
<Rate
|
|
65
|
+
title="Ставка"
|
|
66
|
+
rate={calculatorParams.rate}
|
|
67
|
+
rateBlockClassName="tracking-[-25px]"
|
|
68
|
+
unit="%"
|
|
69
|
+
/>
|
|
80
70
|
<div className="w-full max-w-[350px]">
|
|
81
71
|
<CalculatorValueBlock
|
|
82
72
|
title={'Ежемесячный платеж'}
|
|
83
73
|
value={calculatorParams.monthlyPayment}
|
|
84
74
|
postfix="₽"
|
|
85
75
|
/>
|
|
86
|
-
{renderPaymentType({
|
|
87
|
-
isAnnuity,
|
|
88
|
-
orientation: 'vertical',
|
|
89
|
-
callback: toggleIsAnnuity,
|
|
90
|
-
})}
|
|
76
|
+
{renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') })}
|
|
91
77
|
{renderButtonsSection(buttons, { className: 'mt-7', isVertical: true })}
|
|
92
78
|
{renderFootnote(footnote)}
|
|
93
79
|
</div>
|
|
@@ -96,61 +82,40 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
|
96
82
|
},
|
|
97
83
|
);
|
|
98
84
|
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
interface CreditParamsFormProps extends CreditCalculatorParams, CreditCalculatorParamsViewSettings {
|
|
104
|
-
handleIsSalaryClient?: (value: boolean) => void;
|
|
105
|
-
handleIsStateEmployee?: (value: boolean) => void;
|
|
106
|
-
handleIsPensionClient?: (value: boolean) => void;
|
|
107
|
-
handleIsInsurance?: (value: boolean) => void;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const renderCreditParamsForm = ({
|
|
111
|
-
isSalaryClient,
|
|
112
|
-
isStateEmployee,
|
|
113
|
-
isPensionClient,
|
|
114
|
-
isInsurance,
|
|
115
|
-
isShowSalaryClient,
|
|
116
|
-
isShowStateEmployee,
|
|
117
|
-
isShowPensionClient,
|
|
118
|
-
isShowInsurance,
|
|
119
|
-
handleIsSalaryClient,
|
|
120
|
-
handleIsStateEmployee,
|
|
121
|
-
handleIsPensionClient,
|
|
122
|
-
handleIsInsurance,
|
|
123
|
-
}: CreditParamsFormProps) => (
|
|
85
|
+
const renderCreditParamsForm = (
|
|
86
|
+
params: CreditCalculatorParams & CreditCalculatorParamsViewSettings,
|
|
87
|
+
field: FormFieldRegisterer<any>,
|
|
88
|
+
) => (
|
|
124
89
|
<div>
|
|
125
|
-
{isShowSalaryClient ? (
|
|
90
|
+
{params.isShowSalaryClient ? (
|
|
126
91
|
<Checkbox
|
|
127
92
|
text="Получаю зарплату на счёт в Россельхозбанке"
|
|
128
|
-
|
|
129
|
-
|
|
93
|
+
{...field('isSalaryClient')}
|
|
94
|
+
value={params.isSalaryClient}
|
|
130
95
|
/>
|
|
131
96
|
) : null}
|
|
132
|
-
{isShowStateEmployee ? (
|
|
97
|
+
{params.isShowStateEmployee ? (
|
|
133
98
|
<Checkbox
|
|
134
99
|
className="mt-3"
|
|
135
100
|
text="Работаю в бюджетной организации"
|
|
136
|
-
|
|
137
|
-
|
|
101
|
+
{...field('isStateEmployee')}
|
|
102
|
+
value={params.isStateEmployee}
|
|
138
103
|
/>
|
|
139
104
|
) : null}
|
|
140
|
-
{isShowPensionClient ? (
|
|
105
|
+
{params.isShowPensionClient ? (
|
|
141
106
|
<Checkbox
|
|
142
107
|
className="mt-3"
|
|
143
108
|
text="Получаю пенсию на карту Россельхозбанка"
|
|
144
|
-
|
|
145
|
-
|
|
109
|
+
{...field('isPensionClient')}
|
|
110
|
+
value={params.isPensionClient}
|
|
146
111
|
/>
|
|
147
112
|
) : null}
|
|
148
|
-
{isShowInsurance ? (
|
|
113
|
+
{params.isShowInsurance ? (
|
|
149
114
|
<Checkbox
|
|
150
115
|
className="mt-3"
|
|
151
116
|
text="Комплексная страховая защита"
|
|
152
|
-
|
|
153
|
-
|
|
117
|
+
{...field('isInsurance')}
|
|
118
|
+
value={params.isInsurance}
|
|
154
119
|
/>
|
|
155
120
|
) : null}
|
|
156
121
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
// TEMP
|
|
2
|
-
|
|
3
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
4
|
-
import {
|
|
2
|
+
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
|
|
5
4
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
6
5
|
import { style } from '../../utils/style';
|
|
7
6
|
import { DepositCalculatorParamsViewSettings, DepositCalculatorProps } from './CalculatorContent';
|
|
@@ -20,27 +19,13 @@ export interface DepositCalculatorProp extends DepositCalculatorProps {
|
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
export const DepositCalculatorForm = JSX<DepositCalculatorProp>(
|
|
23
|
-
({ className
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
[],
|
|
31
|
-
);
|
|
32
|
-
const [isRemoteRegistration, toggleIsRemoteRegistration] = useState(false);
|
|
33
|
-
const handleIsRemoteRegistration = useCallback(
|
|
34
|
-
(_: boolean) => toggleIsRemoteRegistration(_),
|
|
35
|
-
[],
|
|
36
|
-
);
|
|
37
|
-
const userInputParams = {
|
|
38
|
-
moneyValue,
|
|
39
|
-
monthsValue,
|
|
40
|
-
isMonthlyInterestPayment,
|
|
41
|
-
isRemoteRegistration,
|
|
42
|
-
};
|
|
43
|
-
const handleMonthsValue = useCallback((_: number) => setMonthsValue(_), []);
|
|
22
|
+
({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
23
|
+
const [userInputParams, { field }] = useForm({
|
|
24
|
+
moneyValue: DEPOSIT_DEFAULT_SUM,
|
|
25
|
+
monthsValue: 0,
|
|
26
|
+
isMonthlyInterestPayment: false,
|
|
27
|
+
isRemoteRegistration: false,
|
|
28
|
+
});
|
|
44
29
|
|
|
45
30
|
const calculatorParams = useDepositCalculatorParams(
|
|
46
31
|
userInputParams,
|
|
@@ -48,34 +33,32 @@ export const DepositCalculatorForm = JSX<DepositCalculatorProp>(
|
|
|
48
33
|
paramsViewSettings,
|
|
49
34
|
);
|
|
50
35
|
const { defaultMonth, income, finalSum, rate } = calculatorParams;
|
|
36
|
+
|
|
37
|
+
const { onChange: setMonthsValue } = field('monthsValue');
|
|
51
38
|
useEffect(() => {
|
|
52
|
-
setMonthsValue(defaultMonth);
|
|
39
|
+
setMonthsValue && setMonthsValue(defaultMonth);
|
|
53
40
|
}, [defaultMonth]);
|
|
54
41
|
|
|
55
42
|
return (
|
|
56
43
|
<section className={style('flex justify-between', className)}>
|
|
57
44
|
<div className="w-[468px]">
|
|
58
|
-
{renderWantedSumInput(
|
|
59
|
-
'Сумма вклада, ₽',
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
)}
|
|
65
|
-
{renderMonthsInput(
|
|
66
|
-
'Срок вклада, месяцев',
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
45
|
+
{renderWantedSumInput({
|
|
46
|
+
title: 'Сумма вклада, ₽',
|
|
47
|
+
min: calculatorParams.minSum,
|
|
48
|
+
max: calculatorParams.maxSum,
|
|
49
|
+
...field('moneyValue'),
|
|
50
|
+
value: calculatorParams.moneyValue,
|
|
51
|
+
})}
|
|
52
|
+
{renderMonthsInput({
|
|
53
|
+
title: 'Срок вклада, месяцев',
|
|
54
|
+
min: calculatorParams.minMonths,
|
|
55
|
+
max: calculatorParams.maxMonths,
|
|
56
|
+
availableMonths: calculatorParams.availableMonths,
|
|
57
|
+
...field('monthsValue'),
|
|
58
|
+
value: calculatorParams.monthsValue,
|
|
59
|
+
})}
|
|
72
60
|
<div className="mt-7">
|
|
73
|
-
{renderDepositParamsForm({
|
|
74
|
-
...calculatorParams,
|
|
75
|
-
...paramsViewSettings,
|
|
76
|
-
handleIsMonthlyInterestPayment,
|
|
77
|
-
handleIsRemoteRegistration,
|
|
78
|
-
})}
|
|
61
|
+
{renderDepositParamsForm({ ...calculatorParams, ...paramsViewSettings }, field)}
|
|
79
62
|
</div>
|
|
80
63
|
</div>
|
|
81
64
|
<Rate rate={rate} rateBlockClassName="tracking-[-25px]" unit="%" />
|
|
@@ -90,34 +73,23 @@ export const DepositCalculatorForm = JSX<DepositCalculatorProp>(
|
|
|
90
73
|
},
|
|
91
74
|
);
|
|
92
75
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
handleIsRemoteRegistration?: (value: boolean) => void;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const renderDepositParamsForm = ({
|
|
101
|
-
isMonthlyInterestPayment,
|
|
102
|
-
isRemoteRegistration,
|
|
103
|
-
isShowMonthlyInterestPayment,
|
|
104
|
-
isShowRemoteRegistration,
|
|
105
|
-
handleIsMonthlyInterestPayment,
|
|
106
|
-
handleIsRemoteRegistration,
|
|
107
|
-
}: DepositParamsFormProps) => (
|
|
76
|
+
const renderDepositParamsForm = (
|
|
77
|
+
params: DepositCalculatorParams & DepositCalculatorParamsViewSettings,
|
|
78
|
+
field: FormFieldRegisterer<any>,
|
|
79
|
+
) => (
|
|
108
80
|
<div className="flex flex-col gap-y-7">
|
|
109
|
-
{isShowMonthlyInterestPayment
|
|
81
|
+
{params.isShowMonthlyInterestPayment
|
|
110
82
|
? renderInterestPayment({
|
|
111
|
-
isMonthlyInterestPayment,
|
|
112
|
-
callback: handleIsMonthlyInterestPayment,
|
|
113
83
|
title: 'Выплата процентов',
|
|
84
|
+
...field('isMonthlyInterestPayment'),
|
|
85
|
+
value: params.isMonthlyInterestPayment,
|
|
114
86
|
})
|
|
115
87
|
: null}
|
|
116
|
-
{isShowRemoteRegistration
|
|
88
|
+
{params.isShowRemoteRegistration
|
|
117
89
|
? renderRegistrationType({
|
|
118
|
-
isRemoteRegistration,
|
|
119
|
-
callback: handleIsRemoteRegistration,
|
|
120
90
|
title: 'Оформление',
|
|
91
|
+
...field('isRemoteRegistration'),
|
|
92
|
+
value: params.isRemoteRegistration,
|
|
121
93
|
})
|
|
122
94
|
: null}
|
|
123
95
|
</div>
|
|
@@ -9,29 +9,29 @@ export interface RateProps {
|
|
|
9
9
|
depositeName?: string;
|
|
10
10
|
isShowDepositeName?: boolean;
|
|
11
11
|
rateBlockClassName?: string;
|
|
12
|
+
fractionDigits?: number;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export const Rate = JSX<RateProps>(
|
|
15
|
-
({
|
|
16
|
+
({
|
|
17
|
+
rate,
|
|
18
|
+
title = 'Ставка',
|
|
19
|
+
unit,
|
|
20
|
+
depositeName,
|
|
21
|
+
isShowDepositeName,
|
|
22
|
+
rateBlockClassName,
|
|
23
|
+
fractionDigits = 2,
|
|
24
|
+
}) => (
|
|
16
25
|
<div>
|
|
17
26
|
<Text size="text-l-light" color="text-secondary-text">
|
|
18
27
|
{title}
|
|
19
28
|
</Text>
|
|
20
29
|
<div className="relative">
|
|
21
|
-
<div className="flex justify-start">
|
|
22
|
-
<span
|
|
23
|
-
|
|
24
|
-
'block gradient-color-text font-mohave text-title-huge pr-6 -mt-4',
|
|
25
|
-
rateBlockClassName,
|
|
26
|
-
)}
|
|
27
|
-
>
|
|
28
|
-
{String(rate.toFixed(2)).replace('.', ',')}
|
|
30
|
+
<div className="flex justify-start gradient-color-text">
|
|
31
|
+
<span className={style('font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName)}>
|
|
32
|
+
{String(rate.toFixed(fractionDigits)).replace('.', ',')}
|
|
29
33
|
</span>
|
|
30
|
-
{unit ?
|
|
31
|
-
<span className="gradient-color-text text-[65px] leading-[75px]">{unit}</span>
|
|
32
|
-
) : (
|
|
33
|
-
''
|
|
34
|
-
)}
|
|
34
|
+
{unit ? <span className="text-7xl">{unit}</span> : null}
|
|
35
35
|
</div>
|
|
36
36
|
{depositeName && isShowDepositeName ? (
|
|
37
37
|
<div className="absolute bottom-7 w-full text-center whitespace-nowrap">
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ListOrientation } from '../../model/ListOrientation';
|
|
2
|
+
import { RadioButtonGroup, RadioButtonItem } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup';
|
|
3
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
4
|
+
|
|
5
|
+
export interface BinaryRadioButtonGroupProps {
|
|
6
|
+
items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
|
|
7
|
+
title?: string;
|
|
8
|
+
orientation?: ListOrientation;
|
|
9
|
+
value?: boolean;
|
|
10
|
+
onChange?: (value: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const renderBinaryRadioButtonGroup = ({
|
|
14
|
+
items,
|
|
15
|
+
title,
|
|
16
|
+
orientation = 'horizontal',
|
|
17
|
+
value,
|
|
18
|
+
onChange,
|
|
19
|
+
}: BinaryRadioButtonGroupProps) => (
|
|
20
|
+
<div>
|
|
21
|
+
{title ? (
|
|
22
|
+
<div className="mb-3">
|
|
23
|
+
<Text color="text-secondary-text" font="font-light">
|
|
24
|
+
{title}
|
|
25
|
+
</Text>
|
|
26
|
+
</div>
|
|
27
|
+
) : null}
|
|
28
|
+
<RadioButtonGroup
|
|
29
|
+
orientation={orientation}
|
|
30
|
+
items={items}
|
|
31
|
+
checkedItem={items[value ? 0 : 1].id}
|
|
32
|
+
onChange={(_) => onChange && onChange(_ === items[0].id)}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
@@ -1,36 +1,15 @@
|
|
|
1
1
|
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
-
import {
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
3
|
|
|
4
4
|
const STEP_DAYS = 1;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
6
|
+
export const renderDaysInput = (props: InputRangeProps) => (
|
|
7
|
+
<InputRange
|
|
8
|
+
className="mt-7"
|
|
9
|
+
items={[`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`]}
|
|
10
|
+
step={STEP_DAYS}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
11
14
|
|
|
12
|
-
|
|
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
|
-
}
|
|
15
|
+
const daysText = (days: number) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
|
|
@@ -1,52 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
id: AT_END_TERM,
|
|
15
|
-
text: 'В конце срока',
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
interface InterestPaymentProps {
|
|
20
|
-
isMonthlyInterestPayment: boolean;
|
|
21
|
-
callback?: (value: boolean) => void;
|
|
22
|
-
title?: string;
|
|
23
|
-
orientation?: ListOrientation;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function renderInterestPayment({
|
|
27
|
-
isMonthlyInterestPayment,
|
|
28
|
-
callback,
|
|
29
|
-
title,
|
|
30
|
-
orientation = 'horizontal',
|
|
31
|
-
}: InterestPaymentProps) {
|
|
32
|
-
return (
|
|
33
|
-
<div>
|
|
34
|
-
{title ? (
|
|
35
|
-
<div className="mb-3">
|
|
36
|
-
<Text color="text-secondary-text" font="font-light">
|
|
37
|
-
{title}
|
|
38
|
-
</Text>
|
|
39
|
-
</div>
|
|
40
|
-
) : null}
|
|
41
|
-
|
|
42
|
-
<div>
|
|
43
|
-
<RadioButtonGroup
|
|
44
|
-
orientation={orientation}
|
|
45
|
-
items={depositTypeItems}
|
|
46
|
-
checkedItem={isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM}
|
|
47
|
-
onChange={(text: string) => callback && callback(text === EVERY_MONTH)}
|
|
48
|
-
/>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
BinaryRadioButtonGroupProps,
|
|
3
|
+
renderBinaryRadioButtonGroup,
|
|
4
|
+
} from './renderBinaryRadioButtonGroup';
|
|
5
|
+
|
|
6
|
+
export const renderInterestPayment = (props: Partial<BinaryRadioButtonGroupProps>) =>
|
|
7
|
+
renderBinaryRadioButtonGroup({
|
|
8
|
+
...props,
|
|
9
|
+
items: [
|
|
10
|
+
{ id: 'everyMonth', text: 'Ежемесячно' },
|
|
11
|
+
{ id: 'atEndTerm', text: 'В конце срока' },
|
|
12
|
+
],
|
|
13
|
+
});
|
|
@@ -1,47 +1,25 @@
|
|
|
1
|
-
import { InputListRange } from '../../ui-kit/InputListRange/InputListRange';
|
|
2
1
|
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
3
|
-
import {
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
4
3
|
|
|
5
4
|
const STEP_MONTHS = 1;
|
|
6
5
|
|
|
7
|
-
interface
|
|
8
|
-
minMonths: number;
|
|
9
|
-
maxMonths: number;
|
|
10
|
-
monthsValue: number;
|
|
6
|
+
interface MonthsInputParams extends InputRangeProps {
|
|
11
7
|
availableMonths?: Array<number>;
|
|
12
8
|
}
|
|
13
9
|
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
export const renderMonthsInput = ({
|
|
11
|
+
min = 0,
|
|
12
|
+
max = 0,
|
|
13
|
+
availableMonths,
|
|
14
|
+
...rest
|
|
15
|
+
}: MonthsInputParams) => (
|
|
16
|
+
<InputRange
|
|
17
|
+
className="mt-7"
|
|
18
|
+
items={[`От ${monthText(min)}`, `До ${monthText(max)}`]}
|
|
19
|
+
step={STEP_MONTHS}
|
|
20
|
+
{...(availableMonths?.length ? { list: availableMonths } : { min, max })}
|
|
21
|
+
{...rest}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
return availableMonths?.length ? (
|
|
27
|
-
<InputListRange
|
|
28
|
-
className="mt-7"
|
|
29
|
-
title={title}
|
|
30
|
-
items={[`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`]}
|
|
31
|
-
list={availableMonths}
|
|
32
|
-
value={clamp(monthsValue, minMonths, maxMonths)}
|
|
33
|
-
onChange={callback}
|
|
34
|
-
/>
|
|
35
|
-
) : (
|
|
36
|
-
<InputRange
|
|
37
|
-
className="mt-7"
|
|
38
|
-
title={title}
|
|
39
|
-
items={[`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`]}
|
|
40
|
-
min={minMonths}
|
|
41
|
-
max={maxMonths}
|
|
42
|
-
step={STEP_MONTHS}
|
|
43
|
-
value={clamp(monthsValue, minMonths, maxMonths)}
|
|
44
|
-
onChange={callback}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
25
|
+
const monthText = (month: number) => `${month} ${Number(month) % 10 === 1 ? 'месяца' : 'месяцев'}`;
|
|
@@ -1,49 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
id: DIFFERENTIAL,
|
|
15
|
-
text: 'Дифференцированный',
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
interface PaymentTypeProps {
|
|
20
|
-
isAnnuity: boolean;
|
|
21
|
-
callback?: (value: boolean) => void;
|
|
22
|
-
title?: string;
|
|
23
|
-
orientation?: ListOrientation;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function renderPaymentType({
|
|
27
|
-
isAnnuity,
|
|
28
|
-
callback,
|
|
29
|
-
title,
|
|
30
|
-
orientation = 'horizontal',
|
|
31
|
-
}: PaymentTypeProps) {
|
|
32
|
-
return (
|
|
33
|
-
<div>
|
|
34
|
-
{title ? (
|
|
35
|
-
<div className="mb-3">
|
|
36
|
-
<Text color="text-secondary-text" font="font-light">
|
|
37
|
-
{title}
|
|
38
|
-
</Text>
|
|
39
|
-
</div>
|
|
40
|
-
) : null}
|
|
41
|
-
<RadioButtonGroup
|
|
42
|
-
orientation={orientation}
|
|
43
|
-
items={paymentTypeItems}
|
|
44
|
-
checkedItem={isAnnuity ? ANNUITY : DIFFERENTIAL}
|
|
45
|
-
onChange={(text: string) => callback && callback(text === ANNUITY)}
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
BinaryRadioButtonGroupProps,
|
|
3
|
+
renderBinaryRadioButtonGroup,
|
|
4
|
+
} from './renderBinaryRadioButtonGroup';
|
|
5
|
+
|
|
6
|
+
export const renderPaymentType = (props: Partial<BinaryRadioButtonGroupProps>) =>
|
|
7
|
+
renderBinaryRadioButtonGroup({
|
|
8
|
+
...props,
|
|
9
|
+
items: [
|
|
10
|
+
{ id: 'annuity', text: 'Аннуитетный' },
|
|
11
|
+
{ id: 'differential', text: 'Дифференцированный' },
|
|
12
|
+
],
|
|
13
|
+
});
|