@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,60 +1,72 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
3
4
|
import { clamp } from '../../utils/clamp';
|
|
4
|
-
import {
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
import { Text } from '../Text/Text';
|
|
5
7
|
import type { InputRangeProps } from './InputRangeProps';
|
|
8
|
+
import { parseDecimal } from './parseDecimal';
|
|
9
|
+
import { renderRangeWithTicks } from './renderRangeWithTicks';
|
|
6
10
|
|
|
7
11
|
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
8
12
|
|
|
13
|
+
const DEFAULT_MIN = 1;
|
|
14
|
+
const DEFAULT_MAX = 100;
|
|
15
|
+
|
|
9
16
|
export const InputRange = JSX<InputRangeProps>(
|
|
10
17
|
({
|
|
11
18
|
className,
|
|
12
19
|
title,
|
|
13
20
|
items = [],
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
list = [],
|
|
22
|
+
min = list.length ? 0 : DEFAULT_MIN,
|
|
23
|
+
max = list.length ? list.length - 1 : DEFAULT_MAX,
|
|
16
24
|
step = 1,
|
|
17
|
-
value = min,
|
|
25
|
+
value = list[0] || min,
|
|
18
26
|
disabled = false,
|
|
19
27
|
onChange,
|
|
20
28
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
29
|
+
const [isFocused, setFocused] = useState(false);
|
|
30
|
+
|
|
31
|
+
const handleChange = useCallback(
|
|
32
|
+
(e: { target?: { value?: string } }) => {
|
|
33
|
+
onChange && onChange(parseDecimal(e.target?.value));
|
|
34
|
+
},
|
|
35
|
+
[onChange],
|
|
36
|
+
);
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
const handleFocus = useCallback(() => {
|
|
39
|
+
setFocused(true);
|
|
40
|
+
}, []);
|
|
28
41
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
const handleBlur = useCallback(() => {
|
|
43
|
+
setFocused(false);
|
|
44
|
+
onChange && onChange(list.length ? closestValue(list)(value) : clamp(value || 0, min, max));
|
|
45
|
+
}, [onChange, value]);
|
|
32
46
|
|
|
33
47
|
return (
|
|
34
48
|
<div className={className}>
|
|
35
49
|
<label className="block relative">
|
|
36
|
-
{title ?
|
|
50
|
+
{title ? (
|
|
51
|
+
<Text size="text-m" font="font-light" color="text-primary-text">
|
|
52
|
+
{title}
|
|
53
|
+
</Text>
|
|
54
|
+
) : null}
|
|
37
55
|
<input
|
|
38
|
-
className={
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
className={style(
|
|
57
|
+
'm-0 mt-2 font-sans text-h3 w-full h-14',
|
|
58
|
+
'border border-solid border-gray rounded-md outline-none',
|
|
59
|
+
'p-0 pl-4 box-border',
|
|
60
|
+
'text-primary-text hover:border-primary-hover focus:border-primary-text',
|
|
61
|
+
DISABLED_INPUT_CLASSES,
|
|
62
|
+
)}
|
|
63
|
+
value={isFocused ? value : addSpacesBetweenNumbers(value)}
|
|
41
64
|
disabled={disabled}
|
|
42
|
-
|
|
43
|
-
|
|
65
|
+
onInput={handleChange as any}
|
|
66
|
+
onFocus={handleFocus}
|
|
67
|
+
onBlur={handleBlur}
|
|
44
68
|
/>
|
|
45
|
-
|
|
46
|
-
<input
|
|
47
|
-
className="box-border w-full m-0 cursor-pointer slider"
|
|
48
|
-
type="range"
|
|
49
|
-
min={min}
|
|
50
|
-
max={max}
|
|
51
|
-
step={step}
|
|
52
|
-
value={value}
|
|
53
|
-
disabled={disabled}
|
|
54
|
-
onChange={handleChange}
|
|
55
|
-
style={inputStyle}
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
69
|
+
{renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })}
|
|
58
70
|
</label>
|
|
59
71
|
{renderRangeCaption(items)}
|
|
60
72
|
</div>
|
|
@@ -62,14 +74,15 @@ export const InputRange = JSX<InputRangeProps>(
|
|
|
62
74
|
},
|
|
63
75
|
);
|
|
64
76
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
const closestValue = (list: number[]) => (_: number) =>
|
|
78
|
+
list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
79
|
+
|
|
80
|
+
const renderRangeCaption = (items: string[]) => (
|
|
81
|
+
<div className="flex justify-between my-2">
|
|
82
|
+
{items.map((item, i) => (
|
|
83
|
+
<Text key={String(i)} size="text-s-light" color="text-secondary-text">
|
|
84
|
+
{item}
|
|
85
|
+
</Text>
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { parseDecimal } from './parseDecimal';
|
|
2
|
+
|
|
3
|
+
interface RangeWithTicksProps {
|
|
4
|
+
list: number[];
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
value?: number;
|
|
10
|
+
onChange?: (value: number) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function renderRangeWithTicks({
|
|
14
|
+
list = [],
|
|
15
|
+
min,
|
|
16
|
+
max,
|
|
17
|
+
step,
|
|
18
|
+
value = list[0] || min,
|
|
19
|
+
disabled,
|
|
20
|
+
onChange,
|
|
21
|
+
}: RangeWithTicksProps) {
|
|
22
|
+
const rangeValue = list.length ? list.indexOf(value) : value;
|
|
23
|
+
const inputStyle = {
|
|
24
|
+
backgroundSize: `${(((rangeValue - min) * 100) / (max - min)).toFixed(2)}% 100%`,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div>
|
|
29
|
+
{list.length ? (
|
|
30
|
+
<div className="absolute w-full flex justify-between -bottom-[3px] px-4">
|
|
31
|
+
{list.map((_, i) => (
|
|
32
|
+
<div
|
|
33
|
+
key={String(i)}
|
|
34
|
+
className={`w-2 h-2 rounded-full ${
|
|
35
|
+
rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main'
|
|
36
|
+
}`}
|
|
37
|
+
/>
|
|
38
|
+
))}
|
|
39
|
+
</div>
|
|
40
|
+
) : null}
|
|
41
|
+
<div className="absolute inset-x-0 -bottom-1 px-4 leading-[18px]">
|
|
42
|
+
<input
|
|
43
|
+
className="box-border w-full m-0 cursor-pointer slider relative z-10"
|
|
44
|
+
style={inputStyle}
|
|
45
|
+
type="range"
|
|
46
|
+
min={min}
|
|
47
|
+
max={max}
|
|
48
|
+
step={step}
|
|
49
|
+
value={rangeValue}
|
|
50
|
+
disabled={disabled}
|
|
51
|
+
onInput={
|
|
52
|
+
((e: { target?: { value?: string } }) => {
|
|
53
|
+
const rawValue = parseDecimal(e.target?.value);
|
|
54
|
+
const newValue = list.length ? list[rawValue] : rawValue;
|
|
55
|
+
onChange && onChange(newValue || 0);
|
|
56
|
+
}) as any
|
|
57
|
+
}
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const getSanitizedValue = (_: string): string => _.
|
|
1
|
+
export const getSanitizedValue = (_: string): string => _.replace(/\s/g, '');
|
package/mobile/src/wlc.json
CHANGED
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ export const ApplicationForm = JSX<ApplicationFormProps>((props) => {
|
|
|
39
39
|
}, []);
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<BlockWrapper className={style('font-sans bg-white p-
|
|
42
|
+
<BlockWrapper className={style('font-sans bg-white p-default pb-9', className)} {...rest}>
|
|
43
43
|
<div className="container max-w-[978px]">
|
|
44
44
|
{title ? <Heading headingType="h3" title={title} className="text-center mb-8" /> : null}
|
|
45
45
|
{COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit })}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { BlocksRegistry } from '../model/BlocksRegistry';
|
|
2
|
+
import { Carousel } from './Carousel/Carousel';
|
|
3
|
+
import { CarouselTariffsCard } from './CarouselTariffsCard/CarouselTariffsCard';
|
|
2
4
|
import { ComparisonTable } from './ComparisonTable/ComparisonTable';
|
|
3
5
|
import { Footer } from './Footer/Footer';
|
|
4
6
|
import { Header } from './Header/Header';
|
|
@@ -17,6 +19,8 @@ import { TextBlock } from './TextBlock/TextBlock';
|
|
|
17
19
|
import { VerticalLayout } from './VerticalLayout/VerticalLayout';
|
|
18
20
|
|
|
19
21
|
export const Blocks: BlocksRegistry = {
|
|
22
|
+
Carousel,
|
|
23
|
+
CarouselTariffsCard,
|
|
20
24
|
ComparisonTable,
|
|
21
25
|
Footer,
|
|
22
26
|
Header,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useForm } from '../../hooks/useForm';
|
|
3
3
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
4
|
import { style } from '../../utils/style';
|
|
5
5
|
import type { CommonCalculatorProps } from './CalculatorContent';
|
|
@@ -16,47 +16,43 @@ export interface BonusCalculatorProps extends CommonCalculatorProps {
|
|
|
16
16
|
|
|
17
17
|
export const BonusCalculatorForm = JSX<BonusCalculatorProps>(
|
|
18
18
|
({ className = '', sourceBookDir = '', buttons, footnote }) => {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
travelExpenseValue,
|
|
25
|
-
restExpenseValue,
|
|
26
|
-
};
|
|
19
|
+
const [userInputParams, { field }] = useForm({
|
|
20
|
+
travelExpenseValue: DEFAULT_TRAVEL_MIN_SUM,
|
|
21
|
+
restExpenseValue: DEFAULT_REST_MIN_SUM,
|
|
22
|
+
});
|
|
23
|
+
|
|
27
24
|
const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } =
|
|
28
25
|
useBonusCalculatorParams(userInputParams, sourceBookDir);
|
|
29
26
|
|
|
30
27
|
return (
|
|
31
28
|
<section className={style('flex justify-between', className)}>
|
|
32
29
|
<div className="w-[468px]">
|
|
33
|
-
{renderWantedSumInput(
|
|
34
|
-
'Сумма покупок в категории путешествия, ₽',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
moneyValue: restExpenseValue,
|
|
51
|
-
step: 500,
|
|
52
|
-
isShowItems: false,
|
|
53
|
-
},
|
|
54
|
-
handleRestExpenseValue,
|
|
55
|
-
)}
|
|
30
|
+
{renderWantedSumInput({
|
|
31
|
+
title: 'Сумма покупок в категории путешествия, ₽',
|
|
32
|
+
min: minSumTravel,
|
|
33
|
+
max: maxSumTravel,
|
|
34
|
+
step: 500,
|
|
35
|
+
isShowItems: false,
|
|
36
|
+
...field('travelExpenseValue'),
|
|
37
|
+
})}
|
|
38
|
+
{renderWantedSumInput({
|
|
39
|
+
title: 'Сумма покупок в остальных категориях, ₽',
|
|
40
|
+
className: 'mt-7',
|
|
41
|
+
min: minSumOther,
|
|
42
|
+
max: maxSumOther,
|
|
43
|
+
step: 500,
|
|
44
|
+
isShowItems: false,
|
|
45
|
+
...field('restExpenseValue'),
|
|
46
|
+
})}
|
|
56
47
|
</div>
|
|
57
48
|
<div>
|
|
58
49
|
{monthBonus >= 0 ? (
|
|
59
|
-
<Rate
|
|
50
|
+
<Rate
|
|
51
|
+
title="Баллов за месяц"
|
|
52
|
+
rate={monthBonus}
|
|
53
|
+
rateBlockClassName="tracking-[-14px]"
|
|
54
|
+
fractionDigits={0}
|
|
55
|
+
/>
|
|
60
56
|
) : null}
|
|
61
57
|
</div>
|
|
62
58
|
<div className="w-full max-w-[350px]">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
|
|
3
3
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
4
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
5
|
import type { BusinessDepositCalculatorProps } from './CalculatorContent';
|
|
@@ -22,29 +22,14 @@ export interface BusinessDepositCalculatorProp extends BusinessDepositCalculator
|
|
|
22
22
|
|
|
23
23
|
export const BusinessDepositCalculatorForm = JSX<BusinessDepositCalculatorProp>(
|
|
24
24
|
({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
|
|
25
|
-
const [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const [isSmallBusiness, toggleIsSmallBusiness] = useState(false);
|
|
34
|
-
const handleIsSmallBusiness = useCallback((_: boolean) => toggleIsSmallBusiness(_), []);
|
|
35
|
-
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
36
|
-
const handleIsMonthlyInterestPayment = useCallback(
|
|
37
|
-
(_: boolean) => toggleIsMonthlyInterestPayment(_),
|
|
38
|
-
[],
|
|
39
|
-
);
|
|
40
|
-
const userInputParams = {
|
|
41
|
-
moneyValue,
|
|
42
|
-
daysValue,
|
|
43
|
-
isReplenished,
|
|
44
|
-
isPartialWithdrawal,
|
|
45
|
-
isSmallBusiness,
|
|
46
|
-
isMonthlyInterestPayment,
|
|
47
|
-
};
|
|
25
|
+
const [userInputParams, { field }] = useForm({
|
|
26
|
+
moneyValue: BUSINESS_DEFAULT_SUM,
|
|
27
|
+
daysValue: BUSINESS_DEFAULT_DAYS,
|
|
28
|
+
isReplenished: false,
|
|
29
|
+
isPartialWithdrawal: false,
|
|
30
|
+
isSmallBusiness: false,
|
|
31
|
+
isMonthlyInterestPayment: false,
|
|
32
|
+
});
|
|
48
33
|
|
|
49
34
|
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
50
35
|
const { income, finalSum, rate, depositeName, isShowUnknownRate } = calculatorParams;
|
|
@@ -53,20 +38,26 @@ export const BusinessDepositCalculatorForm = JSX<BusinessDepositCalculatorProp>(
|
|
|
53
38
|
<section className={className}>
|
|
54
39
|
<div className="flex justify-between">
|
|
55
40
|
<div className="w-[486px]">
|
|
56
|
-
{renderWantedSumInput(
|
|
57
|
-
|
|
41
|
+
{renderWantedSumInput({
|
|
42
|
+
title: 'Сумма вклада, ₽',
|
|
43
|
+
min: calculatorParams.minSum,
|
|
44
|
+
max: calculatorParams.maxSum,
|
|
45
|
+
...field('moneyValue'),
|
|
46
|
+
value: calculatorParams.moneyValue,
|
|
47
|
+
})}
|
|
48
|
+
{renderDaysInput({
|
|
49
|
+
title: 'Срок вклада, дни',
|
|
50
|
+
min: calculatorParams.minDays,
|
|
51
|
+
max: calculatorParams.maxDays,
|
|
52
|
+
...field('daysValue'),
|
|
53
|
+
value: calculatorParams.daysValue,
|
|
54
|
+
})}
|
|
58
55
|
<div className="mt-7 flex justify-between">
|
|
59
|
-
{renderBusinessDepositParamsForm(
|
|
60
|
-
...calculatorParams,
|
|
61
|
-
handleIsReplenished,
|
|
62
|
-
handleIsPartialWithdrawal,
|
|
63
|
-
handleIsSmallBusiness,
|
|
64
|
-
})}
|
|
56
|
+
{renderBusinessDepositParamsForm(calculatorParams, field)}
|
|
65
57
|
{renderInterestPayment({
|
|
66
|
-
isMonthlyInterestPayment,
|
|
67
|
-
callback: handleIsMonthlyInterestPayment,
|
|
68
58
|
title: 'Выплата процентов',
|
|
69
59
|
orientation: 'vertical',
|
|
60
|
+
...field('isMonthlyInterestPayment'),
|
|
70
61
|
})}
|
|
71
62
|
</div>
|
|
72
63
|
</div>
|
|
@@ -95,40 +86,29 @@ export const BusinessDepositCalculatorForm = JSX<BusinessDepositCalculatorProp>(
|
|
|
95
86
|
},
|
|
96
87
|
);
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const renderBusinessDepositParamsForm = ({
|
|
105
|
-
isDisabledOperatingDeposit,
|
|
106
|
-
isReplenished,
|
|
107
|
-
isPartialWithdrawal,
|
|
108
|
-
isSmallBusiness,
|
|
109
|
-
handleIsReplenished,
|
|
110
|
-
handleIsPartialWithdrawal,
|
|
111
|
-
handleIsSmallBusiness,
|
|
112
|
-
}: BusinessDepositParamsFormProps) => (
|
|
89
|
+
const renderBusinessDepositParamsForm = (
|
|
90
|
+
calculatorParams: BusinessDepositCalculatorParams,
|
|
91
|
+
field: FormFieldRegisterer<any>,
|
|
92
|
+
) => (
|
|
113
93
|
<div>
|
|
114
94
|
<Checkbox
|
|
115
95
|
text="Пополнение"
|
|
116
|
-
disabled={isDisabledOperatingDeposit}
|
|
117
|
-
|
|
118
|
-
|
|
96
|
+
disabled={calculatorParams.isDisabledOperatingDeposit}
|
|
97
|
+
{...field('isReplenished')}
|
|
98
|
+
value={calculatorParams.isReplenished}
|
|
119
99
|
/>
|
|
120
100
|
<Checkbox
|
|
121
101
|
className="mt-3"
|
|
122
|
-
disabled={isDisabledOperatingDeposit}
|
|
102
|
+
disabled={calculatorParams.isDisabledOperatingDeposit}
|
|
123
103
|
text="Частичное снятие"
|
|
124
|
-
|
|
125
|
-
|
|
104
|
+
{...field('isPartialWithdrawal')}
|
|
105
|
+
value={calculatorParams.isPartialWithdrawal}
|
|
126
106
|
/>
|
|
127
107
|
<Checkbox
|
|
128
108
|
className="mt-3"
|
|
129
109
|
text="Являюсь малым предприятием"
|
|
130
|
-
|
|
131
|
-
|
|
110
|
+
{...field('isSmallBusiness')}
|
|
111
|
+
value={calculatorParams.isSmallBusiness}
|
|
132
112
|
/>
|
|
133
113
|
</div>
|
|
134
114
|
);
|
|
@@ -5,6 +5,7 @@ import type { UniBlockProps } from '../../model/JSXBlock';
|
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
6
|
import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
7
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
+
import { style } from '../../utils/style';
|
|
8
9
|
import type { CalculatorBlockDef, CalculatorContent, CalculatorNav } from './CalculatorContent';
|
|
9
10
|
import { renderCalculatorBlock } from './renderCalculatorBlock';
|
|
10
11
|
|
|
@@ -40,7 +41,10 @@ export const Calculator = JSX<CalculatorProps>(
|
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
|
-
<BlockWrapper
|
|
44
|
+
<BlockWrapper
|
|
45
|
+
className={style('box-border overflow-hidden relative w-100', className)}
|
|
46
|
+
{...rest}
|
|
47
|
+
>
|
|
44
48
|
<div className="bg-white">
|
|
45
49
|
{tabsNav.length > 1
|
|
46
50
|
? renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
|
|
@@ -81,8 +85,10 @@ function renderNavButton({ tab, i, isActive, onClick }: NavButtonProps) {
|
|
|
81
85
|
key={String(i)}
|
|
82
86
|
onClick={onClick}
|
|
83
87
|
aria-label={tab?.title}
|
|
84
|
-
className={
|
|
85
|
-
|
|
88
|
+
className={style(
|
|
89
|
+
'box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]',
|
|
90
|
+
btnClassName,
|
|
91
|
+
)}
|
|
86
92
|
>
|
|
87
93
|
<Img
|
|
88
94
|
className={`h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`}
|
|
@@ -94,8 +100,8 @@ function renderNavButton({ tab, i, isActive, onClick }: NavButtonProps) {
|
|
|
94
100
|
height="24"
|
|
95
101
|
/>
|
|
96
102
|
<div className="border-0">
|
|
97
|
-
<div className={
|
|
98
|
-
<div className={
|
|
103
|
+
<div className={btnTitleClassName}>{tab?.title}</div>
|
|
104
|
+
<div className={btnDescClassName}>{tab.description}</div>
|
|
99
105
|
</div>
|
|
100
106
|
</button>
|
|
101
107
|
);
|