@redneckz/wildless-cms-uni-blocks 0.10.5 → 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/bin/migration-scripts/0.9.9.js +8 -6
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +493 -661
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
- package/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
- package/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
- package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
- package/bundle/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
- package/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/bundle/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
- package/bundle/components/ApplicationForm/CreditFormState.d.ts +13 -0
- package/bundle/components/ApplicationForm/CreditParameters.d.ts +3 -3
- package/bundle/components/ApplicationForm/DepositFormState.d.ts +4 -0
- package/bundle/components/ApplicationForm/InputControl.d.ts +4 -5
- package/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
- package/bundle/components/ApplicationForm/ResponseNotification.d.ts +1 -1
- package/bundle/components/ApplicationForm/SelectControl.d.ts +2 -9
- package/bundle/components/ApplicationForm/WedFormState.d.ts +10 -0
- package/bundle/components/ApplicationForm/models.d.ts +0 -6
- package/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
- package/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
- package/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
- package/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
- package/bundle/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
- package/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
- package/bundle/components/ApplicationForm/renderRegion.d.ts +6 -8
- package/bundle/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
- package/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
- package/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
- package/bundle/components/ApplicationForm/validators.d.ts +4 -0
- 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/Filtration/renderFormItem.d.ts +2 -2
- package/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/bundle/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/bundle/hooks/useForm.d.ts +13 -12
- package/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
- package/bundle/ui-kit/Input/InputProps.d.ts +4 -2
- 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/bundle/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
- package/bundle/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
- package/bundle/ui-kit/Select/Select.d.ts +6 -7
- package/bundle/validation/and.d.ts +2 -0
- package/bundle/validation/objectValidator.d.ts +2 -0
- package/bundle/validation/pattern.d.ts +1 -0
- package/bundle/validation/required.d.ts +1 -0
- package/bundle/validation/validator.d.ts +10 -0
- package/bundle/validation/withValidator.d.ts +10 -0
- package/dist/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
- package/dist/{ui-kit/InputListRange/InputListRangeProps.js → components/ApplicationForm/AcquiringFormState.js} +1 -1
- package/dist/components/ApplicationForm/AcquiringFormState.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +4 -3
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +28 -48
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
- package/dist/components/ApplicationForm/ApplicationFormWed.js +22 -37
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/dist/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
- package/dist/components/ApplicationForm/BusinessCardFormState.js +2 -0
- package/dist/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
- package/dist/components/ApplicationForm/CreditFormState.d.ts +13 -0
- package/{mobile/dist/ui-kit/InputListRange/InputListRangeProps.js → dist/components/ApplicationForm/CreditFormState.js} +1 -1
- package/dist/components/ApplicationForm/CreditFormState.js.map +1 -0
- package/dist/components/ApplicationForm/CreditParameters.d.ts +3 -3
- package/dist/components/ApplicationForm/CreditParameters.js +5 -5
- package/dist/components/ApplicationForm/CreditParameters.js.map +1 -1
- package/dist/components/ApplicationForm/DepositFormState.d.ts +4 -0
- package/dist/components/ApplicationForm/DepositFormState.js +2 -0
- package/dist/components/ApplicationForm/DepositFormState.js.map +1 -0
- package/dist/components/ApplicationForm/InputControl.d.ts +4 -5
- package/dist/components/ApplicationForm/InputControl.js +1 -3
- package/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
- package/dist/components/ApplicationForm/PhoneInputControl.js +8 -0
- package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -0
- package/dist/components/ApplicationForm/ResponseNotification.d.ts +1 -1
- package/dist/components/ApplicationForm/ResponseNotification.js +4 -4
- package/dist/components/ApplicationForm/SelectControl.d.ts +2 -9
- package/dist/components/ApplicationForm/SelectControl.js +1 -7
- package/dist/components/ApplicationForm/SelectControl.js.map +1 -1
- package/dist/components/ApplicationForm/WedFormState.d.ts +10 -0
- package/dist/components/ApplicationForm/WedFormState.js +2 -0
- package/dist/components/ApplicationForm/WedFormState.js.map +1 -0
- package/dist/components/ApplicationForm/models.d.ts +0 -6
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
- package/dist/components/ApplicationForm/renderAcquiringRegion.js +3 -2
- package/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
- package/dist/components/ApplicationForm/renderCreditParameters.js +3 -16
- package/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
- package/dist/components/ApplicationForm/renderQuestionsInterested.js +4 -1
- package/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/dist/components/ApplicationForm/renderRegion.d.ts +6 -8
- package/dist/components/ApplicationForm/renderRegion.js +3 -2
- package/dist/components/ApplicationForm/renderRegion.js.map +1 -1
- package/dist/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
- package/dist/components/ApplicationForm/renderRegionDepartment.js +6 -2
- package/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
- package/dist/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
- package/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
- package/dist/components/ApplicationForm/renderSubmitButton.js +2 -1
- package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
- package/dist/components/ApplicationForm/renderWedDataOrganization.js +4 -2
- package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/validators.d.ts +4 -0
- package/dist/components/ApplicationForm/validators.js +11 -0
- package/dist/components/ApplicationForm/validators.js.map +1 -0
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.mobile.js +9 -1
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +1 -1
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BusinessBlock/BusinessBlock.js +1 -1
- package/dist/components/BusinessBlock/BusinessBlock.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/CardTransfer/CardTransfer.js +1 -1
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +4 -4
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselScrollButtons.js +1 -1
- package/dist/components/Carousel/CarouselScrollButtons.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/CarouselProductCard/CarouselProductCard.js +2 -2
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/dist/components/Filtration/Filtration.js +3 -2
- package/dist/components/Filtration/Filtration.js.map +1 -1
- package/dist/components/Filtration/renderFormItem.d.ts +2 -2
- package/dist/components/Filtration/renderFormItem.js +4 -4
- package/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriod.js +1 -1
- package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -2
- 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/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +2 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/dist/components/SafeDepositRental/useGetRegions.js +2 -1
- package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +8 -4
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/dist/components/VerticalLayout/VerticalLayout.js +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/hooks/useForm.d.ts +13 -12
- package/dist/hooks/useForm.js +32 -9
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +12 -4
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +4 -11
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +4 -2
- 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/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
- package/dist/ui-kit/PhoneInput/PhoneInput.js +12 -0
- package/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
- package/dist/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
- package/dist/ui-kit/PhoneInput/normalizePhone.js +17 -0
- package/dist/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/dist/ui-kit/Select/Select.d.ts +6 -7
- package/dist/ui-kit/Select/Select.js +16 -25
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
- package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/dist/utils/getSanitizedValue.js +1 -1
- package/dist/utils/getSanitizedValue.js.map +1 -1
- package/dist/validation/and.d.ts +2 -0
- package/dist/validation/and.js +5 -0
- package/dist/validation/and.js.map +1 -0
- package/dist/validation/objectValidator.d.ts +2 -0
- package/dist/validation/objectValidator.js +7 -0
- package/dist/validation/objectValidator.js.map +1 -0
- package/dist/validation/pattern.d.ts +1 -0
- package/dist/validation/pattern.js +6 -0
- package/dist/validation/pattern.js.map +1 -0
- package/dist/validation/required.d.ts +1 -0
- package/dist/validation/required.js +5 -0
- package/dist/validation/required.js.map +1 -0
- package/dist/validation/validator.d.ts +10 -0
- package/dist/validation/validator.js +9 -0
- package/dist/validation/validator.js.map +1 -0
- package/dist/validation/withValidator.d.ts +10 -0
- package/dist/validation/withValidator.js +13 -0
- package/dist/validation/withValidator.js.map +1 -0
- package/dist/wlc.json +1 -2
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
- package/lib/components/ApplicationForm/AcquiringFormState.js +2 -0
- package/lib/components/ApplicationForm/AcquiringFormState.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +4 -3
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +28 -48
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
- package/lib/components/ApplicationForm/ApplicationFormWed.js +22 -37
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/lib/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
- package/lib/components/ApplicationForm/BusinessCardFormState.js +2 -0
- package/lib/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
- package/lib/components/ApplicationForm/CreditFormState.d.ts +13 -0
- package/lib/components/ApplicationForm/CreditFormState.js +2 -0
- package/lib/components/ApplicationForm/CreditFormState.js.map +1 -0
- package/lib/components/ApplicationForm/CreditParameters.d.ts +3 -3
- package/lib/components/ApplicationForm/CreditParameters.js +5 -5
- package/lib/components/ApplicationForm/CreditParameters.js.map +1 -1
- package/lib/components/ApplicationForm/DepositFormState.d.ts +4 -0
- package/lib/components/ApplicationForm/DepositFormState.js +2 -0
- package/lib/components/ApplicationForm/DepositFormState.js.map +1 -0
- package/lib/components/ApplicationForm/InputControl.d.ts +4 -5
- package/lib/components/ApplicationForm/InputControl.js +1 -3
- package/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
- package/lib/components/ApplicationForm/PhoneInputControl.js +6 -0
- package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -0
- package/lib/components/ApplicationForm/ResponseNotification.d.ts +1 -1
- package/lib/components/ApplicationForm/ResponseNotification.js +4 -4
- package/lib/components/ApplicationForm/SelectControl.d.ts +2 -9
- package/lib/components/ApplicationForm/SelectControl.js +1 -7
- package/lib/components/ApplicationForm/SelectControl.js.map +1 -1
- package/lib/components/ApplicationForm/WedFormState.d.ts +10 -0
- package/lib/components/ApplicationForm/WedFormState.js +2 -0
- package/lib/components/ApplicationForm/WedFormState.js.map +1 -0
- package/lib/components/ApplicationForm/models.d.ts +0 -6
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
- package/lib/components/ApplicationForm/renderAcquiringRegion.js +3 -2
- package/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
- package/lib/components/ApplicationForm/renderCreditParameters.js +4 -17
- package/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
- package/lib/components/ApplicationForm/renderQuestionsInterested.js +4 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/lib/components/ApplicationForm/renderRegion.d.ts +6 -8
- package/lib/components/ApplicationForm/renderRegion.js +3 -2
- package/lib/components/ApplicationForm/renderRegion.js.map +1 -1
- package/lib/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
- package/lib/components/ApplicationForm/renderRegionDepartment.js +6 -2
- package/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
- package/lib/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
- package/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
- package/lib/components/ApplicationForm/renderSubmitButton.js +2 -1
- package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
- package/lib/components/ApplicationForm/renderWedDataOrganization.js +4 -2
- package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/validators.d.ts +4 -0
- package/lib/components/ApplicationForm/validators.js +9 -0
- package/lib/components/ApplicationForm/validators.js.map +1 -0
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.mobile.js +9 -1
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +1 -1
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BusinessBlock/BusinessBlock.js +1 -1
- package/lib/components/BusinessBlock/BusinessBlock.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/CardTransfer/CardTransfer.js +1 -1
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +11 -0
- package/lib/components/Carousel/Carousel.js +3 -3
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.js +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.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/CarouselProductCard/CarouselProductCard.js +2 -2
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/lib/components/Filtration/Filtration.js +3 -2
- package/lib/components/Filtration/Filtration.js.map +1 -1
- package/lib/components/Filtration/renderFormItem.d.ts +2 -2
- package/lib/components/Filtration/renderFormItem.js +4 -4
- package/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriod.js +1 -1
- package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +22 -0
- package/lib/components/Headline/Headline.js +3 -2
- 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/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/lib/components/ImgBlock/ImgBlock.fixture.mobile.d.ts +6 -0
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +2 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductTile/renderBenefit.d.ts +0 -1
- package/lib/components/RichTextBlock/RichTextBlock.fixture.mobile.d.ts +9 -0
- package/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/lib/components/SafeDepositRental/useGetRegions.js +2 -1
- package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.d.ts +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +6 -2
- package/lib/components/TextBlock/TextBlock.js +8 -4
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/lib/components/VerticalLayout/VerticalLayout.fixture.mobile.d.ts +8 -0
- package/lib/components/VerticalLayout/VerticalLayout.js +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/hooks/useForm.d.ts +13 -12
- package/lib/hooks/useForm.js +32 -9
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +12 -4
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +4 -11
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +4 -2
- 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/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
- package/lib/ui-kit/PhoneInput/PhoneInput.js +10 -0
- package/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
- package/lib/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
- package/lib/ui-kit/PhoneInput/normalizePhone.js +14 -0
- package/lib/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/lib/ui-kit/Select/Select.d.ts +6 -7
- package/lib/ui-kit/Select/Select.js +17 -26
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
- package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/lib/utils/getSanitizedValue.js +1 -1
- package/lib/utils/getSanitizedValue.js.map +1 -1
- package/lib/validation/and.d.ts +2 -0
- package/lib/validation/and.js +2 -0
- package/lib/validation/and.js.map +1 -0
- package/lib/validation/objectValidator.d.ts +2 -0
- package/lib/validation/objectValidator.js +4 -0
- package/lib/validation/objectValidator.js.map +1 -0
- package/lib/validation/pattern.d.ts +1 -0
- package/lib/validation/pattern.js +3 -0
- package/lib/validation/pattern.js.map +1 -0
- package/lib/validation/required.d.ts +1 -0
- package/lib/validation/required.js +3 -0
- package/lib/validation/required.js.map +1 -0
- package/lib/validation/validator.d.ts +10 -0
- package/lib/validation/validator.js +4 -0
- package/lib/validation/validator.js.map +1 -0
- package/lib/validation/withValidator.d.ts +10 -0
- package/lib/validation/withValidator.js +10 -0
- package/lib/validation/withValidator.js.map +1 -0
- package/lib/wlc.json +1 -2
- package/mobile/bundle/bundle.umd.js +388 -277
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
- package/mobile/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
- package/mobile/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
- package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
- package/mobile/bundle/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
- package/mobile/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
- package/mobile/bundle/components/ApplicationForm/CreditFormState.d.ts +13 -0
- package/mobile/bundle/components/ApplicationForm/CreditParameters.d.ts +3 -3
- package/mobile/bundle/components/ApplicationForm/DepositFormState.d.ts +4 -0
- package/mobile/bundle/components/ApplicationForm/InputControl.d.ts +4 -5
- package/mobile/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/ResponseNotification.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/SelectControl.d.ts +2 -9
- package/mobile/bundle/components/ApplicationForm/WedFormState.d.ts +10 -0
- package/mobile/bundle/components/ApplicationForm/models.d.ts +0 -6
- package/mobile/bundle/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
- package/mobile/bundle/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
- package/mobile/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
- package/mobile/bundle/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
- package/mobile/bundle/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
- package/mobile/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
- package/mobile/bundle/components/ApplicationForm/renderRegion.d.ts +6 -8
- package/mobile/bundle/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
- package/mobile/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
- package/mobile/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
- package/mobile/bundle/components/ApplicationForm/validators.d.ts +4 -0
- 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/Filtration/renderFormItem.d.ts +2 -2
- package/mobile/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
- package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/mobile/bundle/hooks/useForm.d.ts +13 -12
- package/mobile/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +4 -2
- 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/bundle/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
- package/mobile/bundle/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
- package/mobile/bundle/ui-kit/Select/Select.d.ts +6 -7
- package/mobile/bundle/validation/and.d.ts +2 -0
- package/mobile/bundle/validation/objectValidator.d.ts +2 -0
- package/mobile/bundle/validation/pattern.d.ts +1 -0
- package/mobile/bundle/validation/required.d.ts +1 -0
- package/mobile/bundle/validation/validator.d.ts +10 -0
- package/mobile/bundle/validation/withValidator.d.ts +10 -0
- package/mobile/dist/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
- package/mobile/dist/components/ApplicationForm/AcquiringFormState.js +2 -0
- package/mobile/dist/components/ApplicationForm/AcquiringFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +4 -3
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +28 -48
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +22 -37
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
- package/mobile/dist/components/ApplicationForm/BusinessCardFormState.js +2 -0
- package/mobile/dist/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/CreditFormState.d.ts +13 -0
- package/mobile/dist/components/ApplicationForm/CreditFormState.js +2 -0
- package/mobile/dist/components/ApplicationForm/CreditFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/CreditParameters.d.ts +3 -3
- package/mobile/dist/components/ApplicationForm/CreditParameters.js +5 -5
- package/mobile/dist/components/ApplicationForm/CreditParameters.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/DepositFormState.d.ts +4 -0
- package/mobile/dist/components/ApplicationForm/DepositFormState.js +2 -0
- package/mobile/dist/components/ApplicationForm/DepositFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/InputControl.d.ts +4 -5
- package/mobile/dist/components/ApplicationForm/InputControl.js +1 -3
- package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +8 -0
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ResponseNotification.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/ResponseNotification.js +4 -4
- package/mobile/dist/components/ApplicationForm/SelectControl.d.ts +2 -9
- package/mobile/dist/components/ApplicationForm/SelectControl.js +1 -7
- package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/WedFormState.d.ts +10 -0
- package/mobile/dist/components/ApplicationForm/WedFormState.js +2 -0
- package/mobile/dist/components/ApplicationForm/WedFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/models.d.ts +0 -6
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
- package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js +3 -2
- package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +3 -16
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +4 -1
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegion.d.ts +6 -8
- package/mobile/dist/components/ApplicationForm/renderRegion.js +3 -2
- package/mobile/dist/components/ApplicationForm/renderRegion.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
- package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +6 -2
- package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
- package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js +2 -1
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +4 -2
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/validators.d.ts +4 -0
- package/mobile/dist/components/ApplicationForm/validators.js +11 -0
- package/mobile/dist/components/ApplicationForm/validators.js.map +1 -0
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Blocks.js +9 -1
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlock.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/CardTransfer/CardTransfer.js +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +4 -4
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +1 -1
- package/mobile/dist/components/Carousel/CarouselScrollButtons.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/CarouselProductCard/CarouselProductCard.js +2 -2
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/dist/components/Filtration/Filtration.js +3 -2
- package/mobile/dist/components/Filtration/Filtration.js.map +1 -1
- package/mobile/dist/components/Filtration/renderFormItem.d.ts +2 -2
- package/mobile/dist/components/Filtration/renderFormItem.js +4 -4
- package/mobile/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriod.js +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +3 -2
- 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/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/useGetRegions.js +2 -1
- package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +14 -9
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/hooks/useForm.d.ts +13 -12
- package/mobile/dist/hooks/useForm.js +32 -9
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +12 -4
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +4 -11
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +4 -2
- 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/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js +12 -0
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
- package/mobile/dist/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
- package/mobile/dist/ui-kit/PhoneInput/normalizePhone.js +17 -0
- package/mobile/dist/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.d.ts +6 -7
- package/mobile/dist/ui-kit/Select/Select.js +16 -25
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
- package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/mobile/dist/utils/getSanitizedValue.js +1 -1
- package/mobile/dist/utils/getSanitizedValue.js.map +1 -1
- package/mobile/dist/validation/and.d.ts +2 -0
- package/mobile/dist/validation/and.js +5 -0
- package/mobile/dist/validation/and.js.map +1 -0
- package/mobile/dist/validation/objectValidator.d.ts +2 -0
- package/mobile/dist/validation/objectValidator.js +7 -0
- package/mobile/dist/validation/objectValidator.js.map +1 -0
- package/mobile/dist/validation/pattern.d.ts +1 -0
- package/mobile/dist/validation/pattern.js +6 -0
- package/mobile/dist/validation/pattern.js.map +1 -0
- package/mobile/dist/validation/required.d.ts +1 -0
- package/mobile/dist/validation/required.js +5 -0
- package/mobile/dist/validation/required.js.map +1 -0
- package/mobile/dist/validation/validator.d.ts +10 -0
- package/mobile/dist/validation/validator.js +9 -0
- package/mobile/dist/validation/validator.js.map +1 -0
- package/mobile/dist/validation/withValidator.d.ts +10 -0
- package/mobile/dist/validation/withValidator.js +13 -0
- package/mobile/dist/validation/withValidator.js.map +1 -0
- package/mobile/dist/wlc.json +1 -2
- package/mobile/lib/common.css +1 -0
- package/mobile/lib/components/ApplicationForm/AcquiringFormState.d.ts +11 -0
- package/mobile/lib/components/ApplicationForm/AcquiringFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/AcquiringFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +4 -3
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -11
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +28 -48
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +1 -8
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +24 -32
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +1 -13
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +28 -48
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.d.ts +1 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +21 -23
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.d.ts +1 -11
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +22 -37
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/BusinessCardFormState.d.ts +8 -0
- package/mobile/lib/components/ApplicationForm/BusinessCardFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/BusinessCardFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/CreditFormState.d.ts +13 -0
- package/mobile/lib/components/ApplicationForm/CreditFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/CreditFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/CreditParameters.d.ts +3 -3
- package/mobile/lib/components/ApplicationForm/CreditParameters.js +5 -5
- package/mobile/lib/components/ApplicationForm/CreditParameters.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/DepositFormState.d.ts +4 -0
- package/mobile/lib/components/ApplicationForm/DepositFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/DepositFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/InputControl.d.ts +4 -5
- package/mobile/lib/components/ApplicationForm/InputControl.js +1 -3
- package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +6 -0
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ResponseNotification.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/ResponseNotification.js +4 -4
- package/mobile/lib/components/ApplicationForm/SelectControl.d.ts +2 -9
- package/mobile/lib/components/ApplicationForm/SelectControl.js +1 -7
- package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/WedFormState.d.ts +10 -0
- package/mobile/lib/components/ApplicationForm/WedFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/WedFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/models.d.ts +0 -6
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.d.ts +3 -10
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +4 -2
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.d.ts +6 -9
- package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js +3 -2
- package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +3 -10
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +4 -2
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.d.ts +3 -12
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +4 -2
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.d.ts +3 -9
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +4 -17
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +3 -11
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +4 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegion.d.ts +6 -8
- package/mobile/lib/components/ApplicationForm/renderRegion.js +3 -2
- package/mobile/lib/components/ApplicationForm/renderRegion.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegionDepartment.d.ts +6 -9
- package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +6 -2
- package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +3 -9
- package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js +2 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +3 -10
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +4 -2
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/validators.d.ts +4 -0
- package/mobile/lib/components/ApplicationForm/validators.js +9 -0
- package/mobile/lib/components/ApplicationForm/validators.js.map +1 -0
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Blocks.js +9 -1
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +1 -1
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.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/CardTransfer/CardTransfer.js +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +3 -3
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.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/CarouselProductCard/CarouselProductCard.js +2 -2
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -1
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/lib/components/Filtration/Filtration.js +3 -2
- package/mobile/lib/components/Filtration/Filtration.js.map +1 -1
- package/mobile/lib/components/Filtration/renderFormItem.d.ts +2 -2
- package/mobile/lib/components/Filtration/renderFormItem.js +4 -4
- package/mobile/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriod.js +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- 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/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/useGetRegions.js +2 -1
- package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +14 -9
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/hooks/useForm.d.ts +13 -12
- package/mobile/lib/hooks/useForm.js +32 -9
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +12 -4
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +2 -2
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +4 -11
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +4 -2
- 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/ui-kit/PhoneInput/PhoneInput.d.ts +2 -0
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js +10 -0
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -0
- package/mobile/lib/ui-kit/PhoneInput/normalizePhone.d.ts +1 -0
- package/mobile/lib/ui-kit/PhoneInput/normalizePhone.js +14 -0
- package/mobile/lib/ui-kit/PhoneInput/normalizePhone.js.map +1 -0
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.d.ts +6 -7
- package/mobile/lib/ui-kit/Select/Select.js +17 -26
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -1
- package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/mobile/lib/utils/getSanitizedValue.js +1 -1
- package/mobile/lib/utils/getSanitizedValue.js.map +1 -1
- package/mobile/lib/validation/and.d.ts +2 -0
- package/mobile/lib/validation/and.js +2 -0
- package/mobile/lib/validation/and.js.map +1 -0
- package/mobile/lib/validation/objectValidator.d.ts +2 -0
- package/mobile/lib/validation/objectValidator.js +4 -0
- package/mobile/lib/validation/objectValidator.js.map +1 -0
- package/mobile/lib/validation/pattern.d.ts +1 -0
- package/mobile/lib/validation/pattern.js +3 -0
- package/mobile/lib/validation/pattern.js.map +1 -0
- package/mobile/lib/validation/required.d.ts +1 -0
- package/mobile/lib/validation/required.js +3 -0
- package/mobile/lib/validation/required.js.map +1 -0
- package/mobile/lib/validation/validator.d.ts +10 -0
- package/mobile/lib/validation/validator.js +4 -0
- package/mobile/lib/validation/validator.js.map +1 -0
- package/mobile/lib/validation/withValidator.d.ts +10 -0
- package/mobile/lib/validation/withValidator.js +10 -0
- package/mobile/lib/validation/withValidator.js.map +1 -0
- package/mobile/lib/wlc.json +1 -2
- package/mobile/src/components/ApplicationForm/AcquiringFormState.ts +12 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +6 -5
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +43 -71
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +37 -51
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +49 -84
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +41 -67
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +40 -64
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/mobile/src/components/ApplicationForm/BusinessCardFormState.ts +9 -0
- package/mobile/src/components/ApplicationForm/CreditFormState.ts +14 -0
- package/mobile/src/components/ApplicationForm/CreditParameters.ts +5 -5
- package/mobile/src/components/ApplicationForm/DepositFormState.ts +4 -0
- package/mobile/src/components/ApplicationForm/InputControl.tsx +21 -21
- package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +26 -0
- package/mobile/src/components/ApplicationForm/ResponseNotification.tsx +7 -7
- package/mobile/src/components/ApplicationForm/SelectControl.tsx +14 -48
- package/mobile/src/components/ApplicationForm/WedFormState.ts +10 -0
- package/mobile/src/components/ApplicationForm/models.ts +0 -8
- package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +11 -36
- package/mobile/src/components/ApplicationForm/renderAcquiringRegion.tsx +12 -33
- package/mobile/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +13 -36
- package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +13 -44
- package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +27 -30
- package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +21 -40
- package/mobile/src/components/ApplicationForm/renderRegion.tsx +10 -22
- package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +15 -32
- package/mobile/src/components/ApplicationForm/renderSlideCheckboxes.tsx +5 -23
- package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +2 -1
- package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +11 -36
- package/mobile/src/components/ApplicationForm/validators.ts +17 -0
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Blocks.ts +9 -1
- package/mobile/src/components/Bonus/Bonus.tsx +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
- package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +1 -1
- 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/CardTransfer/CardTransfer.tsx +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +3 -4
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +7 -3
- package/mobile/src/components/Carousel/itemsGap.ts +1 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +2 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +2 -2
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +1 -1
- 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/ContactsBlock/ContactsBlock.tsx +1 -1
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +3 -3
- package/mobile/src/components/Filtration/Filtration.tsx +6 -4
- package/mobile/src/components/Filtration/renderFormItem.tsx +5 -5
- package/mobile/src/components/GracePeriod/GracePeriod.tsx +1 -1
- package/mobile/src/components/Headline/Headline.tsx +11 -6
- package/mobile/src/components/Headline/headlineVersionStyles.ts +7 -7
- package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/WrapperSelect.tsx +2 -2
- package/mobile/src/components/SafeDepositRental/useGetRegions.ts +3 -1
- package/mobile/src/components/TariffsTable/TariffsTable.ui.json +3 -0
- package/mobile/src/components/TextBlock/TextBlock.tsx +56 -22
- package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -3
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +1 -1
- package/mobile/src/hooks/useForm.ts +68 -17
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +43 -25
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +2 -2
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +8 -16
- package/mobile/src/ui-kit/Input/Input.tsx +11 -19
- package/mobile/src/ui-kit/Input/InputProps.ts +4 -2
- 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/ui-kit/PhoneInput/PhoneInput.tsx +19 -0
- package/mobile/src/ui-kit/PhoneInput/normalizePhone.ts +23 -0
- package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +48 -55
- package/mobile/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +13 -12
- package/mobile/src/utils/getSanitizedValue.ts +1 -1
- package/mobile/src/validation/and.ts +6 -0
- package/mobile/src/validation/objectValidator.ts +10 -0
- package/mobile/src/validation/pattern.ts +4 -0
- package/mobile/src/validation/required.ts +3 -0
- package/mobile/src/validation/validator.ts +21 -0
- package/mobile/src/validation/withValidator.ts +21 -0
- package/mobile/src/wlc.json +1 -2
- package/package.json +2 -2
- package/src/components/ApplicationForm/AcquiringFormState.ts +12 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +6 -5
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +43 -71
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +37 -51
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +49 -84
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +41 -67
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +40 -64
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/src/components/ApplicationForm/BusinessCardFormState.ts +9 -0
- package/src/components/ApplicationForm/CreditFormState.ts +14 -0
- package/src/components/ApplicationForm/CreditParameters.ts +5 -5
- package/src/components/ApplicationForm/DepositFormState.ts +4 -0
- package/src/components/ApplicationForm/InputControl.tsx +21 -21
- package/src/components/ApplicationForm/PhoneInputControl.tsx +26 -0
- package/src/components/ApplicationForm/ResponseNotification.tsx +7 -7
- package/src/components/ApplicationForm/SelectControl.tsx +14 -48
- package/src/components/ApplicationForm/WedFormState.ts +10 -0
- package/src/components/ApplicationForm/models.ts +0 -8
- package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +11 -36
- package/src/components/ApplicationForm/renderAcquiringRegion.tsx +12 -33
- package/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +13 -36
- package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +13 -44
- package/src/components/ApplicationForm/renderCreditParameters.tsx +27 -30
- package/src/components/ApplicationForm/renderQuestionsInterested.tsx +21 -40
- package/src/components/ApplicationForm/renderRegion.tsx +10 -22
- package/src/components/ApplicationForm/renderRegionDepartment.tsx +15 -32
- package/src/components/ApplicationForm/renderSlideCheckboxes.tsx +5 -23
- package/src/components/ApplicationForm/renderSubmitButton.tsx +2 -1
- package/src/components/ApplicationForm/renderWedDataOrganization.tsx +11 -36
- package/src/components/ApplicationForm/validators.ts +17 -0
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/Blocks.mobile.ts +9 -1
- package/src/components/Bonus/Bonus.tsx +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
- package/src/components/BusinessBlock/BusinessBlock.tsx +1 -1
- 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/CardTransfer/CardTransfer.tsx +1 -1
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +93 -0
- package/src/components/Carousel/Carousel.fixture.tsx +1 -1
- package/src/components/Carousel/Carousel.tsx +3 -4
- package/src/components/Carousel/CarouselScrollButtons.tsx +7 -3
- package/src/components/Carousel/itemsGap.mobile.ts +1 -0
- package/src/components/Carousel/itemsGap.ts +1 -0
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +2 -1
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +1 -0
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +2 -2
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +1 -1
- 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/ContactsBlock/ContactsBlock.tsx +1 -1
- package/src/components/ExchangeRateTile/renderInput.tsx +3 -3
- package/src/components/Filtration/Filtration.tsx +6 -4
- package/src/components/Filtration/renderFormItem.tsx +5 -5
- package/src/components/GracePeriod/GracePeriod.tsx +1 -1
- package/src/components/Headline/Headline.fixture.mobile.tsx +95 -0
- package/src/components/Headline/Headline.tsx +11 -6
- package/src/components/Headline/headlineVersionStyles.ts +7 -7
- package/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
- package/src/components/ImgBlock/ImgBlock.fixture.mobile.tsx +21 -0
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +1 -1
- package/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.tsx +5 -2
- package/src/components/RichTextBlock/RichTextBlock.fixture.mobile.tsx +51 -0
- package/src/components/SafeDepositRental/WrapperSelect.tsx +2 -2
- package/src/components/SafeDepositRental/useGetRegions.ts +3 -1
- package/src/components/TariffsTable/TariffsTable.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.ui.json +3 -0
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +43 -50
- package/src/components/TextBlock/TextBlock.fixture.tsx +1 -1
- package/src/components/TextBlock/TextBlock.tsx +36 -12
- package/src/components/TextBlock/TextBlockContent.ts +1 -3
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +90 -0
- package/src/components/VerticalLayout/VerticalLayout.tsx +1 -1
- package/src/hooks/useForm.ts +68 -17
- package/src/ui-kit/Checkbox/Checkbox.tsx +43 -25
- package/src/ui-kit/Checkbox/CheckboxProps.ts +2 -2
- package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +8 -16
- package/src/ui-kit/Input/Input.tsx +11 -19
- package/src/ui-kit/Input/InputProps.ts +4 -2
- 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/ui-kit/List/List.fixture.tsx +4 -4
- package/src/ui-kit/PhoneInput/PhoneInput.tsx +19 -0
- package/src/ui-kit/PhoneInput/normalizePhone.ts +23 -0
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/src/ui-kit/RichText/RichText.fixture.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +48 -55
- package/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +13 -12
- package/src/ui-kit/Tags/Tags.fixture.tsx +1 -1
- package/src/utils/getSanitizedValue.ts +1 -1
- package/src/validation/and.ts +6 -0
- package/src/validation/objectValidator.ts +10 -0
- package/src/validation/pattern.ts +4 -0
- package/src/validation/required.ts +3 -0
- package/src/validation/validator.ts +21 -0
- package/src/validation/withValidator.ts +21 -0
- package/src/wlc.json +1 -2
- package/tailwind.config.cjs +3 -0
- package/bin/migration-scripts/0.9.3.js +0 -88
- package/bundle/components/ApplicationForm/renderInputRange.d.ts +0 -11
- package/bundle/components/ApplicationForm/useForm.d.ts +0 -14
- package/bundle/components/ApplicationForm/validate.d.ts +0 -1
- package/bundle/components/TextBlock/TextBlock.mobile.d.ts +0 -5
- package/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
- package/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
- package/dist/components/ApplicationForm/renderInputRange.d.ts +0 -11
- package/dist/components/ApplicationForm/renderInputRange.js +0 -8
- package/dist/components/ApplicationForm/renderInputRange.js.map +0 -1
- package/dist/components/ApplicationForm/useForm.d.ts +0 -14
- package/dist/components/ApplicationForm/useForm.js +0 -37
- package/dist/components/ApplicationForm/useForm.js.map +0 -1
- package/dist/components/ApplicationForm/validate.d.ts +0 -1
- package/dist/components/ApplicationForm/validate.js +0 -22
- package/dist/components/ApplicationForm/validate.js.map +0 -1
- package/dist/components/TextBlock/TextBlock.mobile.d.ts +0 -5
- package/dist/components/TextBlock/TextBlock.mobile.js +0 -16
- package/dist/components/TextBlock/TextBlock.mobile.js.map +0 -1
- 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.map +0 -1
- package/lib/components/ApplicationForm/renderInputRange.d.ts +0 -11
- package/lib/components/ApplicationForm/renderInputRange.js +0 -5
- package/lib/components/ApplicationForm/renderInputRange.js.map +0 -1
- package/lib/components/ApplicationForm/useForm.d.ts +0 -14
- package/lib/components/ApplicationForm/useForm.js +0 -34
- package/lib/components/ApplicationForm/useForm.js.map +0 -1
- package/lib/components/ApplicationForm/validate.d.ts +0 -1
- package/lib/components/ApplicationForm/validate.js +0 -19
- package/lib/components/ApplicationForm/validate.js.map +0 -1
- package/lib/components/TextBlock/TextBlock.mobile.d.ts +0 -5
- package/lib/components/TextBlock/TextBlock.mobile.js +0 -14
- package/lib/components/TextBlock/TextBlock.mobile.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/components/ApplicationForm/renderInputRange.d.ts +0 -11
- package/mobile/bundle/components/ApplicationForm/useForm.d.ts +0 -14
- package/mobile/bundle/components/ApplicationForm/validate.d.ts +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/components/ApplicationForm/renderInputRange.d.ts +0 -11
- package/mobile/dist/components/ApplicationForm/renderInputRange.js +0 -8
- package/mobile/dist/components/ApplicationForm/renderInputRange.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/useForm.d.ts +0 -14
- package/mobile/dist/components/ApplicationForm/useForm.js +0 -37
- package/mobile/dist/components/ApplicationForm/useForm.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/validate.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/validate.js +0 -22
- package/mobile/dist/components/ApplicationForm/validate.js.map +0 -1
- 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.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderInputRange.d.ts +0 -11
- package/mobile/lib/components/ApplicationForm/renderInputRange.js +0 -5
- package/mobile/lib/components/ApplicationForm/renderInputRange.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/useForm.d.ts +0 -14
- package/mobile/lib/components/ApplicationForm/useForm.js +0 -34
- package/mobile/lib/components/ApplicationForm/useForm.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/validate.d.ts +0 -1
- package/mobile/lib/components/ApplicationForm/validate.js +0 -19
- package/mobile/lib/components/ApplicationForm/validate.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/components/ApplicationForm/renderInputRange.tsx +0 -20
- package/mobile/src/components/ApplicationForm/useForm.ts +0 -65
- package/mobile/src/components/ApplicationForm/validate.ts +0 -22
- package/mobile/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
- package/mobile/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
- package/src/components/ApplicationForm/renderInputRange.tsx +0 -20
- package/src/components/ApplicationForm/useForm.ts +0 -65
- package/src/components/ApplicationForm/validate.ts +0 -22
- package/src/components/TextBlock/TextBlock.mobile.tsx +0 -42
- package/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
- package/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
package/bundle/bundle.umd.js
CHANGED
|
@@ -358,6 +358,53 @@
|
|
|
358
358
|
};
|
|
359
359
|
const Heading = JSX(({ className = '', headingType = 'h3', as: Tag = 'h3', title, children }) => (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children })));
|
|
360
360
|
|
|
361
|
+
const useForm = (initialState, onSubmit) => {
|
|
362
|
+
const [formState, setFormState] = useState(initialState);
|
|
363
|
+
const [isDirtyForm, setDirtyForm] = useState(false);
|
|
364
|
+
const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
|
|
365
|
+
const handlersMap = useRef({});
|
|
366
|
+
const field = useCallback((fieldName) => {
|
|
367
|
+
if (!handlersMap.current) {
|
|
368
|
+
handlersMap.current = {};
|
|
369
|
+
}
|
|
370
|
+
handlersMap.current[fieldName] ||= (value) => {
|
|
371
|
+
setFormState((prev) => ({ ...prev, [fieldName]: value }));
|
|
372
|
+
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
373
|
+
};
|
|
374
|
+
return {
|
|
375
|
+
value: formState[fieldName],
|
|
376
|
+
isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
|
|
377
|
+
onChange: handlersMap.current[fieldName],
|
|
378
|
+
};
|
|
379
|
+
}, [formState, isDirtyForm, dirtyFieldsMap]);
|
|
380
|
+
const reset = useCallback(() => {
|
|
381
|
+
setFormState(initialState);
|
|
382
|
+
setDirtyForm(false);
|
|
383
|
+
setDirtyFieldsMap({});
|
|
384
|
+
}, [initialState]);
|
|
385
|
+
const handleSubmit = useCallback((e) => {
|
|
386
|
+
e.preventDefault();
|
|
387
|
+
setDirtyForm(true);
|
|
388
|
+
onSubmit && onSubmit(formState);
|
|
389
|
+
}, [onSubmit, formState]);
|
|
390
|
+
return [
|
|
391
|
+
formState,
|
|
392
|
+
{
|
|
393
|
+
isDirty: isDirtyForm || Object.values(dirtyFieldsMap).some(Boolean),
|
|
394
|
+
field,
|
|
395
|
+
reset,
|
|
396
|
+
onSubmit: handleSubmit,
|
|
397
|
+
},
|
|
398
|
+
];
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const objectValidator = (validatorsMap) => (o) => (o &&
|
|
402
|
+
Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
|
|
403
|
+
[];
|
|
404
|
+
|
|
405
|
+
const isValidationSuccess = (info) => !info?.length;
|
|
406
|
+
const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
|
|
407
|
+
|
|
361
408
|
const consistentDataMap = new Map();
|
|
362
409
|
function useAsyncData(key, fetcher, { fallback } = {}) {
|
|
363
410
|
const args = useMemo(() => keyToArgs(key), [key]);
|
|
@@ -439,9 +486,10 @@
|
|
|
439
486
|
}
|
|
440
487
|
|
|
441
488
|
const REGIONS_URL$1 = '/api/v1/regions';
|
|
489
|
+
const EMPTY_VALUE$2 = [];
|
|
442
490
|
function useGetRegions() {
|
|
443
491
|
const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
|
|
444
|
-
return data ||
|
|
492
|
+
return data || EMPTY_VALUE$2;
|
|
445
493
|
}
|
|
446
494
|
|
|
447
495
|
const useDialog = (id = '') => ({
|
|
@@ -606,49 +654,61 @@
|
|
|
606
654
|
|
|
607
655
|
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443, \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
608
656
|
|
|
609
|
-
const
|
|
657
|
+
const withValidator = (props, validator) => {
|
|
658
|
+
const { value, isDirty } = props;
|
|
659
|
+
const errors = isDirty ? validator(value) : [];
|
|
660
|
+
return {
|
|
661
|
+
...props,
|
|
662
|
+
errors,
|
|
663
|
+
error: errors[0],
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, ...inputProps }) => {
|
|
610
668
|
const handleChange = useCallback((e) => {
|
|
611
|
-
|
|
612
|
-
onChange(validInputValue);
|
|
669
|
+
onChange && onChange(e.target?.value || '');
|
|
613
670
|
}, [onChange]);
|
|
614
|
-
const handleBlur = useCallback((e) => {
|
|
615
|
-
if (!onBlur) {
|
|
616
|
-
return;
|
|
617
|
-
}
|
|
618
|
-
const validInputValue = e.target.validity.valid ? e.target.value : value;
|
|
619
|
-
onBlur(validInputValue);
|
|
620
|
-
}, [onBlur]);
|
|
621
671
|
const paddingStyle = children ? 'pr-8' : '';
|
|
622
672
|
const validStyle = valid
|
|
623
673
|
? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
|
|
624
674
|
: 'border-error';
|
|
625
|
-
return (jsxs("div", { className:
|
|
626
|
-
});
|
|
675
|
+
return (jsxs("div", { className: style('relative', className), children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsx("input", { className: style('w-full border rounded-md text-primary-text outline-none p-4', paddingStyle, validStyle, inputClassName), id: id, name: name || id, type: type, value: value, onInput: handleChange, ...inputProps }), children] }));
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: error })) : null })] })));
|
|
679
|
+
|
|
680
|
+
const isPlaceholder = (_) => _ === '_';
|
|
681
|
+
const isDigit = (_) => /\d/.test(_);
|
|
682
|
+
const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
|
|
683
|
+
const phonePattern = [...'+7 (___) ___-__-__'];
|
|
684
|
+
const firstPlaceholderIndex = phonePattern.findIndex(isPlaceholder);
|
|
685
|
+
const phoneWildcardIndicies = phonePattern.map((_, i) => isWildcard(_) ? phonePattern.slice(0, i).filter(isWildcard).length : -1);
|
|
686
|
+
function normalizePhone(phone) {
|
|
687
|
+
const phoneNumbers = phone.replace(/\D/g, '');
|
|
688
|
+
const applyPlaceholder = (_, i) => isDigit(_) ? _ : phoneNumbers.charAt(phoneWildcardIndicies[i]) || _;
|
|
689
|
+
const result = phonePattern.map(applyPlaceholder);
|
|
690
|
+
const resultLength = phoneWildcardIndicies.indexOf(phoneNumbers.length - 1) + 1;
|
|
691
|
+
return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex, resultLength)) : result).join('');
|
|
692
|
+
}
|
|
627
693
|
|
|
628
|
-
const
|
|
629
|
-
|
|
694
|
+
const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
|
|
695
|
+
const handleChange = useCallback(({ target: { value } }) => onChange && onChange(normalizePhone(value || '')), [onChange]);
|
|
696
|
+
return (jsx(Input, { onInput: handleChange, onFocus: handleChange, ...inputProps, children: children }));
|
|
630
697
|
});
|
|
631
698
|
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
default:
|
|
644
|
-
return isEmpty(value);
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
const isEmpty = (value) => (value ? '' : ERROR_EMPTY);
|
|
648
|
-
const isName = (value) => (value.length > 1 ? '' : ERROR_EMPTY);
|
|
649
|
-
const isTin = (value) => (value.length === 10 || value.length === 12 ? '' : ERROR_EMPTY);
|
|
699
|
+
const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(PhoneInput, { "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: error })) : null })] })));
|
|
700
|
+
|
|
701
|
+
const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
|
|
702
|
+
|
|
703
|
+
const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
|
|
704
|
+
|
|
705
|
+
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
706
|
+
const defaultValidator = required(ERROR_MESSAGE);
|
|
707
|
+
const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
|
|
708
|
+
const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
|
|
709
|
+
const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
|
|
650
710
|
|
|
651
|
-
const renderAcquiringDataOrganization = (
|
|
711
|
+
const renderAcquiringDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
|
|
652
712
|
|
|
653
713
|
const ACQUIRING_TYPES = [
|
|
654
714
|
{
|
|
@@ -668,6 +728,14 @@
|
|
|
668
728
|
},
|
|
669
729
|
];
|
|
670
730
|
|
|
731
|
+
function useBool(defaultValue = false) {
|
|
732
|
+
const [value, setValue] = useState(defaultValue);
|
|
733
|
+
const setTrue = useCallback(() => setValue(true), []);
|
|
734
|
+
const setFalse = useCallback(() => setValue(false), []);
|
|
735
|
+
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
736
|
+
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
737
|
+
}
|
|
738
|
+
|
|
671
739
|
function useOutsideClick(onClick) {
|
|
672
740
|
const targetRef = useRef(null);
|
|
673
741
|
useEffect(() => {
|
|
@@ -707,194 +775,109 @@
|
|
|
707
775
|
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
708
776
|
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
709
777
|
|
|
710
|
-
const Select = JSX(({ className = '',
|
|
711
|
-
const [
|
|
712
|
-
const
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
onValidate && onValidate(option.text);
|
|
720
|
-
};
|
|
721
|
-
const isSelected = (option) => Boolean(option.key === selectedItem.key);
|
|
722
|
-
useEffect(() => {
|
|
723
|
-
setSelectedItem(value || { key: '', text: '' });
|
|
724
|
-
}, [value]);
|
|
725
|
-
return (jsxs("div", { className: `${className}`, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null, jsxs("div", { className: `relative ${isOpen ? 'z-20' : 'z-10'}`, children: [jsxs("div", { className: `text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer
|
|
726
|
-
${getBorderStyle(isBorder, valid)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: selectedItem?.text || placeholder }), jsx(Icon, { name: "ArrowUpIcon", width: "16", height: "16", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options?.length ? (jsx("div", { className: `h-0 ${renderOptionsStyle(isOpen)}`, children: jsx("div", { className: `bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
|
|
778
|
+
const Select = JSX(({ className = '', label, options = [], value, valid = true, isBorder = true, placeholder = '', onChange, }) => {
|
|
779
|
+
const [isOpen, { setFalse: close, toggle }] = useBool();
|
|
780
|
+
const wrapperRef = useOutsideClick(close);
|
|
781
|
+
const handleChange = useCallback((option) => {
|
|
782
|
+
close();
|
|
783
|
+
onChange && onChange(option);
|
|
784
|
+
}, [onChange]);
|
|
785
|
+
const isSelected = (option) => option.key === value?.key;
|
|
786
|
+
return (jsxs("div", { className: className, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null, jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), children: [jsxs("div", { className: style('text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer', getBorderStyle(isBorder, valid)), onClick: toggle, children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), name: "ArrowUpIcon", width: "16", height: "16" })] }), options?.length ? (jsx("div", { className: style('h-0', isOpen ? '' : 'overflow-hidden'), children: jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: options.map(renderOption(handleChange, isOpen, isSelected)) }) })) : null] })] }));
|
|
727
787
|
});
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
};
|
|
734
|
-
const getBorderStyle = (isBorder, valid) => `
|
|
735
|
-
${isBorder ? 'border rounded-md hover:border-primary-hover' : ''} ${valid ? ' border-gray' : 'border-error'} `;
|
|
788
|
+
const renderOption = (handleChange, isOpen, isSelected) => (option, i) => (jsxs("div", { onClick: () => {
|
|
789
|
+
handleChange(option);
|
|
790
|
+
}, className: "flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative", children: [jsx("span", { className: "min-h-6", children: formatOption(option) }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: style('absolute right-4 pt-0.5', isSelected(option) && isOpen ? '' : 'hidden') })] }, String(i)));
|
|
791
|
+
const formatOption = (_) => _?.text || _?.key || '';
|
|
792
|
+
const getBorderStyle = (isBorder, valid) => style(isBorder ? 'border rounded-md hover:border-primary-hover' : '', valid ? ' border-gray' : 'border-error');
|
|
736
793
|
|
|
737
|
-
const SelectControl = JSX(({
|
|
738
|
-
const dataFormat = data
|
|
739
|
-
.filter(Boolean)
|
|
740
|
-
.map((_) => ({ key: _?.[fieldValue || fieldLabel], text: _?.[fieldLabel] }));
|
|
741
|
-
const selectedObj = dataFormat.find((_) => _.key === selected);
|
|
742
|
-
return (jsxs("div", { children: [jsx(Select, { options: dataFormat, label: label, valid: Boolean(!error), placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj, onValidate: onValidate }), jsx("div", { className: "h-2", children: jsx(Text, { size: "text-xs-light", color: "text-error", children: error ? error : null }) })] }));
|
|
743
|
-
});
|
|
794
|
+
const SelectControl = JSX((props) => (jsxs("div", { children: [jsx(Select, { ...props, valid: !props.error }), jsx("div", { className: "h-2", children: props.error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: props.error })) : null })] })));
|
|
744
795
|
|
|
745
|
-
const renderAcquiringRegion = ({
|
|
796
|
+
const renderAcquiringRegion = ({ regions, field }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433", options: ACQUIRING_TYPES.map(({ name: key = '' }) => ({ key, text: key })), ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) })] }));
|
|
746
797
|
|
|
747
|
-
const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-
|
|
798
|
+
const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-3", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-[50%]' : 'left-[5%]') }) }), jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })] })));
|
|
748
799
|
|
|
749
|
-
const renderSlideCheckboxes = (
|
|
800
|
+
const renderSlideCheckboxes = (field) => (jsxs("div", { className: "mb-5", children: [jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })] }));
|
|
750
801
|
|
|
751
802
|
const renderSubmitButton = (button, className) => {
|
|
752
803
|
const buttonStyle = getRegularButtonClasses({
|
|
753
804
|
className: 'text-white',
|
|
754
805
|
version: button?.version,
|
|
755
806
|
});
|
|
756
|
-
return (jsx("button", { type: "submit", className:
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
const useForm$1 = ({ initialFormState, errorsInitialState, handleSubmit, }) => {
|
|
760
|
-
const [formState, setFormState] = useState(initialFormState);
|
|
761
|
-
const [errors, setErrors] = useState(errorsInitialState || {});
|
|
762
|
-
const handleChange = useCallback((state) => setFormState((oldState) => ({ ...oldState, ...state })), []);
|
|
763
|
-
const handleChangeErrors = useCallback((state) => setErrors((oldState) => ({ ...oldState, ...state })), []);
|
|
764
|
-
const sendForm = useCallback(async (sendData) => {
|
|
765
|
-
const errorsTemp = [];
|
|
766
|
-
const validateData = Object.keys(formState)
|
|
767
|
-
.filter((_) => Object.keys(errors).includes(_))
|
|
768
|
-
.reduce((obj, key) => {
|
|
769
|
-
obj[key] = formState[key];
|
|
770
|
-
return obj;
|
|
771
|
-
}, {});
|
|
772
|
-
for (const [key, value] of Object.entries(validateData)) {
|
|
773
|
-
const error = validate(key, value);
|
|
774
|
-
errorsTemp.push(error);
|
|
775
|
-
handleChangeErrors({ [key]: error });
|
|
776
|
-
}
|
|
777
|
-
if (errorsTemp.some((_) => _.length !== 0)) {
|
|
778
|
-
return;
|
|
779
|
-
}
|
|
780
|
-
handleSubmit && (await handleSubmit(sendData));
|
|
781
|
-
}, [formState]);
|
|
782
|
-
return {
|
|
783
|
-
formState,
|
|
784
|
-
handleChange,
|
|
785
|
-
errors,
|
|
786
|
-
handleChangeErrors,
|
|
787
|
-
sendForm,
|
|
788
|
-
};
|
|
807
|
+
return (jsx("button", { type: "submit", className: style('p-4', buttonStyle, className), children: button?.text ? button.text : 'Отправить заявку' }));
|
|
789
808
|
};
|
|
790
809
|
|
|
791
810
|
const initialFormState$4 = {
|
|
792
|
-
acquiringType: 'Торговый эквайринг',
|
|
793
|
-
region: '',
|
|
811
|
+
acquiringType: { key: 'Торговый эквайринг' },
|
|
794
812
|
fullName: '',
|
|
795
813
|
inn: '',
|
|
796
814
|
name: '',
|
|
797
815
|
phone: '',
|
|
798
|
-
|
|
816
|
+
onlineCheckout: false,
|
|
799
817
|
posTerminal: false,
|
|
800
818
|
};
|
|
801
|
-
const
|
|
802
|
-
acquiringType:
|
|
803
|
-
region:
|
|
804
|
-
fullName:
|
|
805
|
-
inn:
|
|
806
|
-
name:
|
|
807
|
-
phone:
|
|
808
|
-
};
|
|
819
|
+
const acquiringValidator = objectValidator({
|
|
820
|
+
acquiringType: defaultValidator,
|
|
821
|
+
region: defaultValidator,
|
|
822
|
+
fullName: defaultValidator,
|
|
823
|
+
inn: innValidator,
|
|
824
|
+
name: nameValidator,
|
|
825
|
+
phone: phoneValidator,
|
|
826
|
+
});
|
|
809
827
|
const ApplicationFormAcquiring = JSX((props) => {
|
|
810
|
-
const { button, link,
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
const onSubmit = (e) => {
|
|
819
|
-
e.preventDefault();
|
|
820
|
-
sendForm({
|
|
821
|
-
typeForm: 'acqr',
|
|
822
|
-
region: regions.find((_) => _.code === region)?.name || '',
|
|
823
|
-
partnerComments: `Вид эквайринга=${acquiringType}/Онлайн касса=${onlineСheckout}/POS-терминал=${posTerminal}`,
|
|
824
|
-
fullName,
|
|
825
|
-
inn,
|
|
826
|
-
name,
|
|
827
|
-
phone,
|
|
828
|
-
});
|
|
829
|
-
};
|
|
830
|
-
return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderAcquiringRegion({
|
|
831
|
-
acquiringType,
|
|
832
|
-
regions,
|
|
833
|
-
region,
|
|
834
|
-
handleChange,
|
|
835
|
-
errors,
|
|
836
|
-
handleChangeErrors,
|
|
837
|
-
}), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderAcquiringDataOrganization({
|
|
828
|
+
const { button, link, onSubmit } = props;
|
|
829
|
+
const handleSubmit = useCallback((formState) => {
|
|
830
|
+
const { acquiringType, region, fullName, inn, name, phone, onlineCheckout, posTerminal } = formState;
|
|
831
|
+
isValidationSuccess(acquiringValidator(formState)) &&
|
|
832
|
+
onSubmit({
|
|
833
|
+
typeForm: 'acqr',
|
|
834
|
+
region: region?.text || '',
|
|
835
|
+
partnerComments: `Вид эквайринга=${acquiringType?.key || ''}/Онлайн касса=${onlineCheckout}/POS-терминал=${posTerminal}`,
|
|
838
836
|
fullName,
|
|
839
837
|
inn,
|
|
840
838
|
name,
|
|
841
839
|
phone,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
posTerminal,
|
|
848
|
-
handleChange,
|
|
849
|
-
}), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
840
|
+
});
|
|
841
|
+
}, [onSubmit]);
|
|
842
|
+
const [, { field, ...formProps }] = useForm(initialFormState$4, handleSubmit);
|
|
843
|
+
const regions = useGetRegions();
|
|
844
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderAcquiringRegion({ regions, field }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderAcquiringDataOrganization(field), renderSlideCheckboxes(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
850
845
|
});
|
|
851
846
|
|
|
852
|
-
const renderBusinessCardDataOrganization = (
|
|
847
|
+
const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
|
|
853
848
|
|
|
854
|
-
const renderRegion$1 = ({ regions,
|
|
849
|
+
const renderRegion$1 = ({ regions, field }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }) }));
|
|
855
850
|
|
|
856
851
|
const initialFormState$3 = {
|
|
857
|
-
region: '',
|
|
858
852
|
name: '',
|
|
859
853
|
phone: '',
|
|
860
854
|
inn: '',
|
|
861
855
|
mail: '',
|
|
862
856
|
};
|
|
857
|
+
const businessCardValidator = objectValidator({
|
|
858
|
+
region: defaultValidator,
|
|
859
|
+
name: nameValidator,
|
|
860
|
+
phone: phoneValidator,
|
|
861
|
+
inn: innValidator,
|
|
862
|
+
mail: defaultValidator,
|
|
863
|
+
});
|
|
863
864
|
const ApplicationFormBusinessCard = JSX((props) => {
|
|
864
|
-
const { button, link,
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
const regions = useGetRegions();
|
|
872
|
-
const onSubmit = (e) => {
|
|
873
|
-
e.preventDefault();
|
|
874
|
-
sendForm({
|
|
875
|
-
typeForm: 'bcrd',
|
|
876
|
-
region: regions.find((_) => _.code === region)?.name || '',
|
|
877
|
-
name,
|
|
878
|
-
phone,
|
|
879
|
-
inn,
|
|
880
|
-
mail,
|
|
881
|
-
});
|
|
882
|
-
};
|
|
883
|
-
return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [renderRegion$1({
|
|
884
|
-
regions,
|
|
885
|
-
region,
|
|
886
|
-
handleChange,
|
|
887
|
-
errors,
|
|
888
|
-
handleChangeErrors,
|
|
889
|
-
}), renderBusinessCardDataOrganization({
|
|
865
|
+
const { button, link, onSubmit } = props;
|
|
866
|
+
const handleSubmit = useCallback((formState) => {
|
|
867
|
+
const { region, name, phone, inn, mail } = formState;
|
|
868
|
+
isValidationSuccess(businessCardValidator(formState)) &&
|
|
869
|
+
onSubmit({
|
|
870
|
+
typeForm: 'bcrd',
|
|
871
|
+
region: region?.text || '',
|
|
890
872
|
name,
|
|
891
873
|
phone,
|
|
892
874
|
inn,
|
|
893
875
|
mail,
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
876
|
+
});
|
|
877
|
+
}, [onSubmit]);
|
|
878
|
+
const [, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
|
|
879
|
+
const regions = useGetRegions();
|
|
880
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [renderRegion$1({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
898
881
|
});
|
|
899
882
|
|
|
900
883
|
const BRANCHES_URL = '/api/v1/branches';
|
|
@@ -908,58 +891,63 @@
|
|
|
908
891
|
return result || EMPTY_VALUE$1;
|
|
909
892
|
};
|
|
910
893
|
|
|
911
|
-
const MIN_CREDIT_AMOUNT =
|
|
912
|
-
const MAX_CREDIT_AMOUNT =
|
|
913
|
-
const ITEMS_CREDIT_AMOUNT = ['От
|
|
894
|
+
const MIN_CREDIT_AMOUNT = 1000;
|
|
895
|
+
const MAX_CREDIT_AMOUNT = 1000000000;
|
|
896
|
+
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
914
897
|
const MIN_CREDIT_TERM = 1;
|
|
915
|
-
const MAX_CREDIT_TERM =
|
|
916
|
-
const ITEMS_CREDIT_TERM = ['От 1
|
|
898
|
+
const MAX_CREDIT_TERM = 180;
|
|
899
|
+
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
917
900
|
|
|
918
|
-
const renderCreditDataOrganization = (
|
|
901
|
+
const renderCreditDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('mail') })] })] }));
|
|
919
902
|
|
|
920
903
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', {}).format(number);
|
|
921
904
|
|
|
922
905
|
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
923
906
|
|
|
924
|
-
|
|
907
|
+
function parseDecimal(value) {
|
|
908
|
+
const rawValue = (value || '').replace(/\D/g, '');
|
|
909
|
+
const unsafeDecimal = parseInt(rawValue, 10);
|
|
910
|
+
return Number.isNaN(unsafeDecimal) ? 0 : unsafeDecimal;
|
|
911
|
+
}
|
|
925
912
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
const handleChange = (e) => {
|
|
929
|
-
if (!onChange) {
|
|
930
|
-
return;
|
|
931
|
-
}
|
|
932
|
-
onChange(clamp(Number(getSanitizedValue(e.target.value)), min, max));
|
|
933
|
-
};
|
|
913
|
+
function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
|
|
914
|
+
const rangeValue = list.length ? list.indexOf(value) : value;
|
|
934
915
|
const inputStyle = {
|
|
935
|
-
backgroundSize: `${(((
|
|
916
|
+
backgroundSize: `${(((rangeValue - min) * 100) / (max - min)).toFixed(2)}% 100%`,
|
|
936
917
|
};
|
|
937
|
-
return (jsxs("div", {
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
918
|
+
return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-4", children: list.map((_, i) => (jsx("div", { className: `w-2 h-2 rounded-full ${rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main'}` }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
|
|
919
|
+
const rawValue = parseDecimal(e.target?.value);
|
|
920
|
+
const newValue = list.length ? list[rawValue] : rawValue;
|
|
921
|
+
onChange && onChange(newValue || 0);
|
|
922
|
+
}) }) })] }));
|
|
942
923
|
}
|
|
943
924
|
|
|
944
|
-
const
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
const
|
|
925
|
+
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
926
|
+
const DEFAULT_MIN = 1;
|
|
927
|
+
const DEFAULT_MAX = 100;
|
|
928
|
+
const InputRange = JSX(({ className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, }) => {
|
|
929
|
+
const [isFocused, setFocused] = useState(false);
|
|
930
|
+
const handleChange = useCallback((e) => {
|
|
931
|
+
onChange && onChange(parseDecimal(e.target?.value));
|
|
932
|
+
}, [onChange]);
|
|
933
|
+
const handleFocus = useCallback(() => {
|
|
934
|
+
setFocused(true);
|
|
935
|
+
}, []);
|
|
936
|
+
const handleBlur = useCallback(() => {
|
|
937
|
+
setFocused(false);
|
|
938
|
+
onChange && onChange(list.length ? closestValue(list)(value) : clamp(value || 0, min, max));
|
|
939
|
+
}, [onChange, value]);
|
|
940
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('m-0 mt-2 font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'p-0 pl-4 box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), value: isFocused ? value : addSpacesBetweenNumbers(value), disabled: disabled, onInput: handleChange, onFocus: handleFocus, onBlur: handleBlur }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
941
|
+
});
|
|
942
|
+
const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
943
|
+
const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: item }, String(i)))) }));
|
|
944
|
+
|
|
945
|
+
const renderCreditParameters = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD" }) }), jsx(InputRange, { items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })] }), jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432" }) }), jsx(InputRange, { items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })] })] }));
|
|
946
|
+
|
|
947
|
+
const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: branches.map(({ branchCode = '', address = '' }) => ({
|
|
948
|
+
key: branchCode,
|
|
949
|
+
text: address,
|
|
950
|
+
})), ...withValidator(field('department'), defaultValidator) }) })] }));
|
|
963
951
|
|
|
964
952
|
const initialFormState$2 = {
|
|
965
953
|
amount: MIN_CREDIT_AMOUNT,
|
|
@@ -969,91 +957,60 @@
|
|
|
969
957
|
name: '',
|
|
970
958
|
phone: '',
|
|
971
959
|
mail: '',
|
|
972
|
-
region: '',
|
|
973
|
-
department: '',
|
|
974
960
|
annualRevenue: '',
|
|
975
961
|
};
|
|
976
|
-
const
|
|
977
|
-
annualRevenue:
|
|
978
|
-
inn:
|
|
979
|
-
name:
|
|
980
|
-
phone:
|
|
981
|
-
region:
|
|
982
|
-
department:
|
|
983
|
-
};
|
|
984
|
-
const ApplicationFormCredit = JSX(({ button, link,
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
});
|
|
991
|
-
const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
|
|
992
|
-
const branches = useBranches(region).filter((branch) => branch.address);
|
|
993
|
-
const onSubmit = (e) => {
|
|
994
|
-
e.preventDefault();
|
|
995
|
-
sendForm({
|
|
996
|
-
typeForm: 'cred',
|
|
997
|
-
fullName,
|
|
998
|
-
inn,
|
|
999
|
-
name,
|
|
1000
|
-
phone,
|
|
1001
|
-
mail,
|
|
1002
|
-
region: regions.find((_) => _.code === region)?.name || '',
|
|
1003
|
-
department: branches.find((_) => _.branchCode === department)?.address || '',
|
|
1004
|
-
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
1005
|
-
});
|
|
1006
|
-
};
|
|
1007
|
-
return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderCreditDataOrganization({
|
|
962
|
+
const creditValidator = objectValidator({
|
|
963
|
+
annualRevenue: defaultValidator,
|
|
964
|
+
inn: innValidator,
|
|
965
|
+
name: nameValidator,
|
|
966
|
+
phone: phoneValidator,
|
|
967
|
+
region: defaultValidator,
|
|
968
|
+
department: defaultValidator,
|
|
969
|
+
});
|
|
970
|
+
const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
|
|
971
|
+
const handleSubmit = useCallback((formState) => {
|
|
972
|
+
const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
|
|
973
|
+
isValidationSuccess(creditValidator(formState)) &&
|
|
974
|
+
onSubmit({
|
|
975
|
+
typeForm: 'cred',
|
|
1008
976
|
fullName,
|
|
1009
977
|
inn,
|
|
1010
978
|
name,
|
|
1011
979
|
phone,
|
|
1012
980
|
mail,
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
handleChange,
|
|
1023
|
-
errors,
|
|
1024
|
-
handleChangeErrors,
|
|
1025
|
-
}), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
981
|
+
region: region?.text || '',
|
|
982
|
+
department: department?.text || '',
|
|
983
|
+
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
984
|
+
});
|
|
985
|
+
}, [onSubmit]);
|
|
986
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$2, handleSubmit);
|
|
987
|
+
const regions = useGetRegions();
|
|
988
|
+
const branches = useBranches(formState.region?.key).filter((branch) => branch?.address);
|
|
989
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderCreditDataOrganization(field), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderRegionDepartment({ regions, branches, field }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
1026
990
|
});
|
|
1027
991
|
|
|
1028
992
|
const initialFormState$1 = {
|
|
1029
993
|
name: '',
|
|
1030
994
|
phone: '',
|
|
1031
995
|
};
|
|
996
|
+
const depositValidator = objectValidator({
|
|
997
|
+
name: nameValidator,
|
|
998
|
+
phone: phoneValidator,
|
|
999
|
+
});
|
|
1032
1000
|
const ApplicationFormDeposit = JSX((props) => {
|
|
1033
|
-
const { button, link,
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
const { name, phone } = formState;
|
|
1040
|
-
const onSubmit = (e) => {
|
|
1041
|
-
e.preventDefault();
|
|
1042
|
-
sendForm({
|
|
1043
|
-
typeForm: 'dpst',
|
|
1044
|
-
name,
|
|
1045
|
-
phone,
|
|
1046
|
-
});
|
|
1047
|
-
};
|
|
1048
|
-
return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), renderDataOrganization({
|
|
1001
|
+
const { button, link, onSubmit } = props;
|
|
1002
|
+
const handleSubmit = useCallback((formState) => {
|
|
1003
|
+
const { name, phone } = formState;
|
|
1004
|
+
isValidationSuccess(depositValidator(formState)) &&
|
|
1005
|
+
onSubmit({
|
|
1006
|
+
typeForm: 'dpst',
|
|
1049
1007
|
name,
|
|
1050
1008
|
phone,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1009
|
+
});
|
|
1010
|
+
}, [onSubmit]);
|
|
1011
|
+
const [, { field, ...formProps }] = useForm(initialFormState$1, handleSubmit);
|
|
1012
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
|
|
1055
1013
|
});
|
|
1056
|
-
const renderDataOrganization = ({ name, phone, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0418\u043C\u044F", error: errors['name'], value: name, onChange: (value) => handleChange({ name: value }), onBlur: (value) => handleChangeErrors({ name: validate('name', value) }) }), jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", error: errors['phone'], value: phone, onChange: (value) => handleChange({ phone: value }), onBlur: (value) => handleChangeErrors({ phone: validate('phone', value) }) })] }));
|
|
1057
1014
|
|
|
1058
1015
|
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
1059
1016
|
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
@@ -1102,15 +1059,25 @@
|
|
|
1102
1059
|
fill: 'white',
|
|
1103
1060
|
},
|
|
1104
1061
|
];
|
|
1105
|
-
const Checkbox = JSX(({ className,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1062
|
+
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1063
|
+
const handleChange = useCallback((e) => {
|
|
1064
|
+
if (disabled) {
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
e.preventDefault();
|
|
1068
|
+
onChange && onChange(!value);
|
|
1069
|
+
}, [onChange, disabled, value]);
|
|
1070
|
+
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1071
|
+
return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: "checkbox", "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? jsx("span", { className: "font-sans ml-3 text-l-light", children: text }) : null] }) }));
|
|
1109
1072
|
});
|
|
1073
|
+
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1110
1074
|
|
|
1111
|
-
const renderQuestionsInterested = (
|
|
1075
|
+
const renderQuestionsInterested = (field) => {
|
|
1076
|
+
const textField = field('text');
|
|
1077
|
+
return (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", ...field('currencyControl') }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('documentaryOperations') }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('conversionOperations') })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }));
|
|
1078
|
+
};
|
|
1112
1079
|
|
|
1113
|
-
const renderWedDataOrganization = (
|
|
1080
|
+
const renderWedDataOrganization = (field) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }) })] }), jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(PhoneInputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 text-l w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) }) })] })] }));
|
|
1114
1081
|
|
|
1115
1082
|
const initialFormState = {
|
|
1116
1083
|
fullName: '',
|
|
@@ -1122,53 +1089,34 @@
|
|
|
1122
1089
|
conversionOperations: false,
|
|
1123
1090
|
text: '',
|
|
1124
1091
|
};
|
|
1125
|
-
const
|
|
1126
|
-
fullName:
|
|
1127
|
-
name:
|
|
1128
|
-
phone:
|
|
1129
|
-
mail:
|
|
1130
|
-
|
|
1131
|
-
};
|
|
1092
|
+
const webValidator = objectValidator({
|
|
1093
|
+
fullName: defaultValidator,
|
|
1094
|
+
name: nameValidator,
|
|
1095
|
+
phone: phoneValidator,
|
|
1096
|
+
mail: defaultValidator,
|
|
1097
|
+
});
|
|
1132
1098
|
const ApplicationFormWed = JSX((props) => {
|
|
1133
|
-
const { button, link,
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
|
|
1140
|
-
const onSubmit = (e) => {
|
|
1141
|
-
e.preventDefault();
|
|
1142
|
-
sendForm({
|
|
1143
|
-
typeForm: 'kved',
|
|
1144
|
-
fullName,
|
|
1145
|
-
name,
|
|
1146
|
-
phone,
|
|
1147
|
-
mail,
|
|
1148
|
-
partnerComments: `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`,
|
|
1149
|
-
});
|
|
1150
|
-
};
|
|
1151
|
-
return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderWedDataOrganization({
|
|
1099
|
+
const { button, link, onSubmit } = props;
|
|
1100
|
+
const handleSubmit = useCallback((formState) => {
|
|
1101
|
+
const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
|
|
1102
|
+
isValidationSuccess(webValidator(formState)) &&
|
|
1103
|
+
onSubmit({
|
|
1104
|
+
typeForm: 'kved',
|
|
1152
1105
|
fullName,
|
|
1153
1106
|
name,
|
|
1154
1107
|
phone,
|
|
1155
1108
|
mail,
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
documentaryOperations,
|
|
1162
|
-
conversionOperations,
|
|
1163
|
-
text,
|
|
1164
|
-
handleChange,
|
|
1165
|
-
}), jsxs("div", { className: "flex items-center pb-9 mb-9 border-b border-main-divider", children: [renderSubmitButton(button, 'mr-5'), jsx(Footnote, { link: link })] }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "text-center mb-4" }), renderContacts()] }));
|
|
1109
|
+
partnerComments: `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`,
|
|
1110
|
+
});
|
|
1111
|
+
}, [onSubmit]);
|
|
1112
|
+
const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
|
|
1113
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderWedDataOrganization(field), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "text-center mb-4" }), renderQuestionsInterested(field), jsxs("div", { className: "flex items-center pb-9 mb-9 border-b border-main-divider", children: [renderSubmitButton(button, 'mr-5'), jsx(Footnote, { link: link })] }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "text-center mb-4" }), renderContacts()] }));
|
|
1166
1114
|
});
|
|
1167
1115
|
|
|
1168
|
-
const ResponseNotification = JSX(({
|
|
1169
|
-
const
|
|
1170
|
-
const backgroundColor =
|
|
1171
|
-
return (jsxs("div", { className: `flex items-center mt-5 p-5 rounded-md ${backgroundColor}`, children: [
|
|
1116
|
+
const ResponseNotification = JSX(({ responseType }) => {
|
|
1117
|
+
const responseOK = responseType === 'OK';
|
|
1118
|
+
const backgroundColor = responseOK ? 'bg-responce-ok' : 'bg-responce-fail';
|
|
1119
|
+
return (jsxs("div", { className: `flex items-center mt-5 p-5 rounded-md ${backgroundColor}`, children: [responseOK ? (jsx(ImgInner, { image: { icon: 'ResponceOKIcon' }, width: "42", height: "42", className: "mr-4" })) : (jsx(ImgInner, { image: { icon: 'ResponceFailIcon' }, width: "37", height: "34", className: "mr-4" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-1" }), jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
|
|
1172
1120
|
});
|
|
1173
1121
|
|
|
1174
1122
|
const COMPONENTS_MAP = {
|
|
@@ -1180,17 +1128,17 @@
|
|
|
1180
1128
|
};
|
|
1181
1129
|
const API = CorporateLeadAPI();
|
|
1182
1130
|
const ApplicationForm = JSX((props) => {
|
|
1183
|
-
const { className
|
|
1184
|
-
const [
|
|
1131
|
+
const { className, title, typeForm = 'credit', button, link, ...rest } = props;
|
|
1132
|
+
const [responseType, setResponseType] = useState('');
|
|
1185
1133
|
const handleSubmit = useCallback(async (data) => {
|
|
1186
1134
|
const status = (await API.send(data)) ? 'OK' : 'Fail';
|
|
1187
1135
|
setResponseType(status);
|
|
1188
1136
|
return status;
|
|
1189
1137
|
}, []);
|
|
1190
|
-
return (jsx(BlockWrapper, { className:
|
|
1138
|
+
return (jsx(BlockWrapper, { className: style('font-sans bg-white p-default pb-9', className), ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit }), responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
|
|
1191
1139
|
});
|
|
1192
1140
|
|
|
1193
|
-
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
1141
|
+
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-default flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
|
|
1194
1142
|
const renderStep$1 = (benefit, i) => {
|
|
1195
1143
|
const description = benefit.description;
|
|
1196
1144
|
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5 h-full", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$4(description)] })] }, String(i)));
|
|
@@ -1219,34 +1167,34 @@
|
|
|
1219
1167
|
|
|
1220
1168
|
const headlineVersionStyles = {
|
|
1221
1169
|
XXL: {
|
|
1222
|
-
wrapper: 'gap-[18px]',
|
|
1223
1170
|
title: { headingType: 'h0', as: 'h1' },
|
|
1224
1171
|
descriptionSize: 'text-h5',
|
|
1172
|
+
descriptionStyle: 'mt-5',
|
|
1225
1173
|
},
|
|
1226
1174
|
XL: {
|
|
1227
|
-
wrapper: 'gap-4',
|
|
1228
1175
|
title: { headingType: 'h1', as: 'h1' },
|
|
1229
1176
|
descriptionSize: 'text-xl-light',
|
|
1177
|
+
descriptionStyle: 'mt-4',
|
|
1230
1178
|
},
|
|
1231
1179
|
L: {
|
|
1232
|
-
wrapper: 'gap-4',
|
|
1233
1180
|
title: { headingType: 'h2', as: 'h2' },
|
|
1234
1181
|
descriptionSize: 'text-xl-light',
|
|
1182
|
+
descriptionStyle: 'mt-4',
|
|
1235
1183
|
},
|
|
1236
1184
|
M: {
|
|
1237
|
-
wrapper: 'gap-3',
|
|
1238
1185
|
title: { headingType: 'h3', as: 'h3' },
|
|
1239
1186
|
descriptionSize: 'text-xl-light',
|
|
1187
|
+
descriptionStyle: 'mt-3',
|
|
1240
1188
|
},
|
|
1241
1189
|
S: {
|
|
1242
|
-
wrapper: 'gap-2',
|
|
1243
1190
|
title: { headingType: 'h4', as: 'h4' },
|
|
1244
1191
|
descriptionSize: 'text-xl-light',
|
|
1192
|
+
descriptionStyle: 'mt-2',
|
|
1245
1193
|
},
|
|
1246
1194
|
XS: {
|
|
1247
|
-
wrapper: 'gap-2',
|
|
1248
1195
|
title: { headingType: 'h5', as: 'h5' },
|
|
1249
1196
|
descriptionSize: 'text-l-light',
|
|
1197
|
+
descriptionStyle: 'mt-2',
|
|
1250
1198
|
},
|
|
1251
1199
|
};
|
|
1252
1200
|
// TODO Move to Gallery and rename
|
|
@@ -1263,13 +1211,14 @@
|
|
|
1263
1211
|
|
|
1264
1212
|
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
|
|
1265
1213
|
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
1266
|
-
const paddingStyle = isPadding ? 'p-
|
|
1267
|
-
|
|
1214
|
+
const paddingStyle = isPadding ? 'p-default' : '';
|
|
1215
|
+
const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
|
|
1216
|
+
return (jsxs(BlockWrapper, { className: style(paddingStyle, className), version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, align: align, ...descriptionStyle, children: description })) : null] }));
|
|
1268
1217
|
});
|
|
1269
1218
|
|
|
1270
1219
|
const Bonus = JSX((props) => {
|
|
1271
1220
|
const { className = '', title, description, bonusItems, ...rest } = props;
|
|
1272
|
-
return (jsx(BlockWrapper, { className: `p-
|
|
1221
|
+
return (jsx(BlockWrapper, { className: `p-default pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M" }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems?.length
|
|
1273
1222
|
? bonusItems.map((_, i) => (jsxs("div", { className: "flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0", children: [_?.title ? jsx(Text, { size: "text-h4", children: _.title }) : null, _?.description ? (jsx("div", { className: "mt-2", children: jsx(Paragraph, { size: "text-xl", font: "font-light", children: _.description }) })) : null, jsxs("div", { className: "flex justify-between items-end mt-3", children: [renderButtonsSection(_?.buttons), _.bonusItemContent?.bonusType
|
|
1274
1223
|
? renderBonusItemContent(_.bonusItemContent)
|
|
1275
1224
|
: null] })] }, String(i))))
|
|
@@ -1287,7 +1236,7 @@
|
|
|
1287
1236
|
right: 'text-right',
|
|
1288
1237
|
};
|
|
1289
1238
|
|
|
1290
|
-
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-
|
|
1239
|
+
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-default flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
1291
1240
|
const renderBonusBenefit = ({ icon, title, description }, i) => {
|
|
1292
1241
|
return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
|
|
1293
1242
|
};
|
|
@@ -1313,7 +1262,7 @@
|
|
|
1313
1262
|
return (jsxs("li", { className: "flex items-center gap-3.5 mb-3 last:mb-0", children: [icon?.icon ? (jsx(ImgInner, { image: icon, className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider" })) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, jsx("span", { className: "text-xl-light", children: text })] }, key));
|
|
1314
1263
|
};
|
|
1315
1264
|
|
|
1316
|
-
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
1265
|
+
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `p-default pb-9 ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }), jsx("div", { className: "flex gap-5", children: cards?.length ? cards.map((_, i) => jsx(BusinessCard, { ..._ }, String(i))) : null })] })));
|
|
1317
1266
|
|
|
1318
1267
|
const ButtonBlock = JSX(({ button, className, ...rest }) => (jsx(BlockWrapper, { className: style('!bg-transparent', className), ...rest, children: renderButtonsSection([button]) })));
|
|
1319
1268
|
|
|
@@ -1420,18 +1369,17 @@
|
|
|
1420
1369
|
const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
|
|
1421
1370
|
const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = 'business-calculator-data';
|
|
1422
1371
|
|
|
1423
|
-
const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: style('
|
|
1372
|
+
const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName, fractionDigits = 2, }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: style('font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate.toFixed(fractionDigits)).replace('.', ',') }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
1424
1373
|
|
|
1425
1374
|
const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: text })) : null;
|
|
1426
1375
|
|
|
1427
1376
|
const DEFAULT_MONEY_STEP = 1000;
|
|
1428
|
-
function renderWantedSumInput(
|
|
1429
|
-
const { moneyValue, minSum, maxSum, step = DEFAULT_MONEY_STEP, isShowItems = true } = params;
|
|
1377
|
+
function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
|
|
1430
1378
|
const items = [
|
|
1431
|
-
`От ${addSpacesBetweenNumbers(
|
|
1432
|
-
`До ${addSpacesBetweenNumbers(
|
|
1379
|
+
`От ${addSpacesBetweenNumbers(rest.min || 0)} ₽`,
|
|
1380
|
+
`До ${addSpacesBetweenNumbers(rest.max || 0)} ₽`,
|
|
1433
1381
|
];
|
|
1434
|
-
return
|
|
1382
|
+
return jsx(InputRange, { items: isShowItems ? items : [], step: step, ...rest });
|
|
1435
1383
|
}
|
|
1436
1384
|
|
|
1437
1385
|
const getBonus = (params, bonusTravelValue, bonusOtherValue) => {
|
|
@@ -1465,62 +1413,48 @@
|
|
|
1465
1413
|
};
|
|
1466
1414
|
|
|
1467
1415
|
const BonusCalculatorForm = JSX(({ className = '', sourceBookDir = '', buttons, footnote }) => {
|
|
1468
|
-
const [
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
const userInputParams = {
|
|
1473
|
-
travelExpenseValue,
|
|
1474
|
-
restExpenseValue,
|
|
1475
|
-
};
|
|
1416
|
+
const [userInputParams, { field }] = useForm({
|
|
1417
|
+
travelExpenseValue: DEFAULT_TRAVEL_MIN_SUM,
|
|
1418
|
+
restExpenseValue: DEFAULT_REST_MIN_SUM,
|
|
1419
|
+
});
|
|
1476
1420
|
const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } = useBonusCalculatorParams(userInputParams, sourceBookDir);
|
|
1477
|
-
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput(
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1421
|
+
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
|
|
1422
|
+
title: 'Сумма покупок в категории путешествия, ₽',
|
|
1423
|
+
min: minSumTravel,
|
|
1424
|
+
max: maxSumTravel,
|
|
1481
1425
|
step: 500,
|
|
1482
1426
|
isShowItems: false,
|
|
1483
|
-
|
|
1427
|
+
...field('travelExpenseValue'),
|
|
1428
|
+
}), renderWantedSumInput({
|
|
1429
|
+
title: 'Сумма покупок в остальных категориях, ₽',
|
|
1484
1430
|
className: 'mt-7',
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
moneyValue: restExpenseValue,
|
|
1431
|
+
min: minSumOther,
|
|
1432
|
+
max: maxSumOther,
|
|
1488
1433
|
step: 500,
|
|
1489
1434
|
isShowItems: false,
|
|
1490
|
-
|
|
1435
|
+
...field('restExpenseValue'),
|
|
1436
|
+
})] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]", fractionDigits: 0 })) : null }), jsxs("div", { className: "w-full max-w-[350px]", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1491
1437
|
});
|
|
1492
1438
|
|
|
1493
1439
|
const STEP_DAYS = 1;
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
const daysText = (days) => {
|
|
1497
|
-
const text = Number(days) % 10 === 1 ? 'дня' : 'дней';
|
|
1498
|
-
return `${days} ${text}`;
|
|
1499
|
-
};
|
|
1500
|
-
return (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${daysText(minDays)}`, `До ${daysText(maxDays)}`], min: minDays, max: maxDays, step: STEP_DAYS, value: clamp(daysValue, minDays, maxDays), onChange: callback }));
|
|
1501
|
-
}
|
|
1440
|
+
const renderDaysInput = (props) => (jsx(InputRange, { className: "mt-7", items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
|
|
1441
|
+
const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
|
|
1502
1442
|
|
|
1503
1443
|
const orientationStyleMap = {
|
|
1504
1444
|
horizontal: 'gap-10',
|
|
1505
1445
|
vertical: 'flex-col gap-3',
|
|
1506
1446
|
};
|
|
1507
|
-
const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text,
|
|
1447
|
+
const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
|
|
1508
1448
|
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
text: 'Ежемесячно',
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
text: 'В конце срока',
|
|
1519
|
-
},
|
|
1520
|
-
];
|
|
1521
|
-
function renderInterestPayment({ isMonthlyInterestPayment, callback, title, orientation = 'horizontal', }) {
|
|
1522
|
-
return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx("div", { children: jsx(RadioButtonGroup, { orientation: orientation, items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => callback && callback(text === EVERY_MONTH) }) })] }));
|
|
1523
|
-
}
|
|
1449
|
+
const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, onChange, }) => (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
|
|
1450
|
+
|
|
1451
|
+
const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
|
|
1452
|
+
...props,
|
|
1453
|
+
items: [
|
|
1454
|
+
{ id: 'everyMonth', text: 'Ежемесячно' },
|
|
1455
|
+
{ id: 'atEndTerm', text: 'В конце срока' },
|
|
1456
|
+
],
|
|
1457
|
+
});
|
|
1524
1458
|
|
|
1525
1459
|
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-1 pt-1 pl-5 pb-1.5", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-[250px] mt-3.5", children: jsxs(Paragraph, { size: "text-xl-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
|
|
1526
1460
|
|
|
@@ -1610,101 +1544,47 @@
|
|
|
1610
1544
|
};
|
|
1611
1545
|
|
|
1612
1546
|
const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
|
|
1613
|
-
const [
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
const [isSmallBusiness, toggleIsSmallBusiness] = useState(false);
|
|
1622
|
-
const handleIsSmallBusiness = useCallback((_) => toggleIsSmallBusiness(_), []);
|
|
1623
|
-
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
1624
|
-
const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
|
|
1625
|
-
const userInputParams = {
|
|
1626
|
-
moneyValue,
|
|
1627
|
-
daysValue,
|
|
1628
|
-
isReplenished,
|
|
1629
|
-
isPartialWithdrawal,
|
|
1630
|
-
isSmallBusiness,
|
|
1631
|
-
isMonthlyInterestPayment,
|
|
1632
|
-
};
|
|
1547
|
+
const [userInputParams, { field }] = useForm({
|
|
1548
|
+
moneyValue: BUSINESS_DEFAULT_SUM,
|
|
1549
|
+
daysValue: BUSINESS_DEFAULT_DAYS,
|
|
1550
|
+
isReplenished: false,
|
|
1551
|
+
isPartialWithdrawal: false,
|
|
1552
|
+
isSmallBusiness: false,
|
|
1553
|
+
isMonthlyInterestPayment: false,
|
|
1554
|
+
});
|
|
1633
1555
|
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
1634
1556
|
const { income, finalSum, rate, depositeName, isShowUnknownRate } = calculatorParams;
|
|
1635
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "w-[486px]", children: [renderWantedSumInput(
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1557
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "w-[486px]", children: [renderWantedSumInput({
|
|
1558
|
+
title: 'Сумма вклада, ₽',
|
|
1559
|
+
min: calculatorParams.minSum,
|
|
1560
|
+
max: calculatorParams.maxSum,
|
|
1561
|
+
...field('moneyValue'),
|
|
1562
|
+
value: calculatorParams.moneyValue,
|
|
1563
|
+
}), renderDaysInput({
|
|
1564
|
+
title: 'Срок вклада, дни',
|
|
1565
|
+
min: calculatorParams.minDays,
|
|
1566
|
+
max: calculatorParams.maxDays,
|
|
1567
|
+
...field('daysValue'),
|
|
1568
|
+
value: calculatorParams.daysValue,
|
|
1569
|
+
}), jsxs("div", { className: "mt-7 flex justify-between", children: [renderBusinessDepositParamsForm(calculatorParams, field), renderInterestPayment({
|
|
1643
1570
|
title: 'Выплата процентов',
|
|
1644
1571
|
orientation: 'vertical',
|
|
1572
|
+
...field('isMonthlyInterestPayment'),
|
|
1645
1573
|
})] })] }), isShowUnknownRate ? (jsx(UnknownRate, {})) : (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" })), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), jsx("div", { className: "mt-7", children: renderFootnote(footnote) })] })] }), jsx("div", { className: "mt-5", children: renderFootnote(bottomFootnote) })] }));
|
|
1646
1574
|
});
|
|
1647
|
-
const renderBusinessDepositParamsForm = (
|
|
1648
|
-
|
|
1649
|
-
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
1650
|
-
const InputListRange = JSX(({ className, title, items = [], list = [], value = list[0], disabled = false, onChange }) => {
|
|
1651
|
-
const min = 0;
|
|
1652
|
-
const max = list.length - 1;
|
|
1653
|
-
const step = 1;
|
|
1654
|
-
const handleTextChange = (e) => {
|
|
1655
|
-
if (!onChange) {
|
|
1656
|
-
return;
|
|
1657
|
-
}
|
|
1658
|
-
const newValue = parseInt(e.target.value);
|
|
1659
|
-
const closetValue = list.reduce(function (prev, curr) {
|
|
1660
|
-
return Math.abs(curr - newValue) < Math.abs(prev - newValue) ? curr : prev;
|
|
1661
|
-
});
|
|
1662
|
-
onChange(Number(getSanitizedValue(closetValue.toString())));
|
|
1663
|
-
};
|
|
1664
|
-
const handleRangeChange = (e) => {
|
|
1665
|
-
if (!onChange) {
|
|
1666
|
-
return;
|
|
1667
|
-
}
|
|
1668
|
-
const val = list.at(clamp(parseInt(e.target.value), min, max)) || 0;
|
|
1669
|
-
onChange(Number(getSanitizedValue(val.toString())));
|
|
1670
|
-
};
|
|
1671
|
-
const valueIndex = list.findIndex((item) => item === value) || 0;
|
|
1672
|
-
const inputStyle = {
|
|
1673
|
-
backgroundSize: `${(((valueIndex - min) * 100) / (max - min)).toFixed(2)}% 100%`,
|
|
1674
|
-
};
|
|
1675
|
-
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light text-primary-text", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md
|
|
1676
|
-
outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text ${DISABLED_INPUT_CLASSES}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: handleTextChange, onBlur: handleTextChange }), list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-4", children: list.map(renderTick(valueIndex, disabled)) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", type: "range", min: min, max: max, step: step, value: valueIndex, disabled: disabled, onChange: handleRangeChange, style: inputStyle }) })] }), renderRangeCaption(items)] }));
|
|
1677
|
-
});
|
|
1678
|
-
const renderTick = (valueIndex, disabled) => (value, i) => (jsx("span", { className: `w-2 h-2 rounded-full ${valueIndex <= i || disabled ? 'bg-gray' : 'bg-primary-main'}` }, String(i)));
|
|
1679
|
-
function renderRangeCaption(items) {
|
|
1680
|
-
return (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) }));
|
|
1681
|
-
}
|
|
1575
|
+
const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { className: "mt-3", disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal }), jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", ...field('isSmallBusiness'), value: calculatorParams.isSmallBusiness })] }));
|
|
1682
1576
|
|
|
1683
1577
|
const STEP_MONTHS = 1;
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
const monthText = (month) => {
|
|
1687
|
-
const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
|
|
1688
|
-
return `${month} ${text}`;
|
|
1689
|
-
};
|
|
1690
|
-
return availableMonths?.length ? (jsx(InputListRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], list: availableMonths, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback })) : (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
|
|
1691
|
-
}
|
|
1578
|
+
const renderMonthsInput = ({ min = 0, max = 0, availableMonths, ...rest }) => (jsx(InputRange, { className: "mt-7", items: [`От ${monthText(min)}`, `До ${monthText(max)}`], step: STEP_MONTHS, ...(availableMonths?.length ? { list: availableMonths } : { min, max }), ...rest }));
|
|
1579
|
+
const monthText = (month) => `${month} ${Number(month) % 10 === 1 ? 'месяца' : 'месяцев'}`;
|
|
1692
1580
|
|
|
1693
|
-
const
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
id:
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
{
|
|
1701
|
-
id: DIFFERENTIAL,
|
|
1702
|
-
text: 'Дифференцированный',
|
|
1703
|
-
},
|
|
1704
|
-
];
|
|
1705
|
-
function renderPaymentType({ isAnnuity, callback, title, orientation = 'horizontal', }) {
|
|
1706
|
-
return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => callback && callback(text === ANNUITY) })] }));
|
|
1707
|
-
}
|
|
1581
|
+
const renderPaymentType = (props) => renderBinaryRadioButtonGroup({
|
|
1582
|
+
...props,
|
|
1583
|
+
items: [
|
|
1584
|
+
{ id: 'annuity', text: 'Аннуитетный' },
|
|
1585
|
+
{ id: 'differential', text: 'Дифференцированный' },
|
|
1586
|
+
],
|
|
1587
|
+
});
|
|
1708
1588
|
|
|
1709
1589
|
/**
|
|
1710
1590
|
* Формулы расчёта аннуитетных и дифференцированных платежей:
|
|
@@ -1775,72 +1655,48 @@
|
|
|
1775
1655
|
return isExclude || userInputParams[fieldKey] === row[fieldKey];
|
|
1776
1656
|
};
|
|
1777
1657
|
|
|
1778
|
-
const CreditCalculatorForm = JSX(({ className
|
|
1779
|
-
const [
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
const [moneyValue, setMoneyValue] = useState(CREDIT_DEFAULT_SUM);
|
|
1789
|
-
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
1790
|
-
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1791
|
-
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
1792
|
-
const userInputParams = {
|
|
1793
|
-
isAnnuity,
|
|
1794
|
-
isInsurance,
|
|
1795
|
-
isSalaryClient,
|
|
1796
|
-
isPensionClient,
|
|
1797
|
-
isStateEmployee,
|
|
1798
|
-
moneyValue,
|
|
1799
|
-
monthsValue,
|
|
1800
|
-
};
|
|
1658
|
+
const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
1659
|
+
const [userInputParams, { field }] = useForm({
|
|
1660
|
+
isAnnuity: false,
|
|
1661
|
+
isInsurance: true,
|
|
1662
|
+
isSalaryClient: false,
|
|
1663
|
+
isPensionClient: false,
|
|
1664
|
+
isStateEmployee: false,
|
|
1665
|
+
moneyValue: CREDIT_DEFAULT_SUM,
|
|
1666
|
+
monthsValue: DEFAULT_MONTHS,
|
|
1667
|
+
});
|
|
1801
1668
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
id: OFFICE_REGISTRATION,
|
|
1827
|
-
text: 'Офис Банка',
|
|
1828
|
-
},
|
|
1829
|
-
{
|
|
1830
|
-
id: REMOTE_REGISTRATION,
|
|
1831
|
-
text: 'Дистанционно',
|
|
1832
|
-
},
|
|
1833
|
-
];
|
|
1834
|
-
function renderRegistrationType({ isRemoteRegistration, callback, title, orientation = 'horizontal', }) {
|
|
1835
|
-
return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx("div", { children: jsx(RadioButtonGroup, { orientation: orientation, items: registrationTypeItems, checkedItem: isRemoteRegistration ? REMOTE_REGISTRATION : OFFICE_REGISTRATION, onChange: (text) => callback && callback(text === REMOTE_REGISTRATION) }) })] }));
|
|
1836
|
-
}
|
|
1669
|
+
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
|
|
1670
|
+
title: 'Сумма кредита, ₽',
|
|
1671
|
+
step: 500,
|
|
1672
|
+
min: calculatorParams.minSum,
|
|
1673
|
+
max: calculatorParams.maxSum,
|
|
1674
|
+
...field('moneyValue'),
|
|
1675
|
+
value: calculatorParams.moneyValue,
|
|
1676
|
+
}), renderMonthsInput({
|
|
1677
|
+
title: 'Срок кредита, месяцев',
|
|
1678
|
+
min: calculatorParams.minMonths,
|
|
1679
|
+
max: calculatorParams.maxMonths,
|
|
1680
|
+
...field('monthsValue'),
|
|
1681
|
+
value: calculatorParams.monthsValue,
|
|
1682
|
+
}), jsx("div", { className: "mt-7", children: renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1683
|
+
});
|
|
1684
|
+
const renderCreditParamsForm = (params, field) => (jsxs("div", { children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
|
|
1685
|
+
|
|
1686
|
+
const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
|
|
1687
|
+
...props,
|
|
1688
|
+
items: [
|
|
1689
|
+
{ id: 'remote', text: 'Дистанционно' },
|
|
1690
|
+
{ id: 'office', text: 'Офис Банка' },
|
|
1691
|
+
],
|
|
1692
|
+
});
|
|
1837
1693
|
|
|
1838
1694
|
const arrayByRange = (start, stop, step = 1) => Array.from({ length: Math.abs(stop - start) / step + 1 }, (value, index) => stop >= start ? start + index * step : start - index * step);
|
|
1839
1695
|
|
|
1840
1696
|
const useDepositCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
|
|
1841
1697
|
const { moneyValue, monthsValue } = userInputParams;
|
|
1842
1698
|
const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
|
|
1843
|
-
const defaultMonth = data?.rateRows[0]
|
|
1699
|
+
const defaultMonth = data?.rateRows?.[0]
|
|
1844
1700
|
? getMiddleMonth(data.rateRows[0].minMonths, data.rateRows[0].maxMonths)
|
|
1845
1701
|
: 1;
|
|
1846
1702
|
const isExcludeMonthlyInterestPayment = !paramsViewSettings?.isShowMonthlyInterestPayment;
|
|
@@ -1889,48 +1745,45 @@
|
|
|
1889
1745
|
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
|
|
1890
1746
|
const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
|
|
1891
1747
|
|
|
1892
|
-
const DepositCalculatorForm = JSX(({ className
|
|
1893
|
-
const [
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
const handleIsRemoteRegistration = useCallback((_) => toggleIsRemoteRegistration(_), []);
|
|
1900
|
-
const userInputParams = {
|
|
1901
|
-
moneyValue,
|
|
1902
|
-
monthsValue,
|
|
1903
|
-
isMonthlyInterestPayment,
|
|
1904
|
-
isRemoteRegistration,
|
|
1905
|
-
};
|
|
1906
|
-
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
1748
|
+
const DepositCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
1749
|
+
const [userInputParams, { field }] = useForm({
|
|
1750
|
+
moneyValue: DEPOSIT_DEFAULT_SUM,
|
|
1751
|
+
monthsValue: 0,
|
|
1752
|
+
isMonthlyInterestPayment: false,
|
|
1753
|
+
isRemoteRegistration: false,
|
|
1754
|
+
});
|
|
1907
1755
|
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
1908
1756
|
const { defaultMonth, income, finalSum, rate } = calculatorParams;
|
|
1757
|
+
const { onChange: setMonthsValue } = field('monthsValue');
|
|
1909
1758
|
useEffect(() => {
|
|
1910
|
-
setMonthsValue(defaultMonth);
|
|
1759
|
+
setMonthsValue && setMonthsValue(defaultMonth);
|
|
1911
1760
|
}, [defaultMonth]);
|
|
1912
|
-
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput(
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1761
|
+
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
|
|
1762
|
+
title: 'Сумма вклада, ₽',
|
|
1763
|
+
min: calculatorParams.minSum,
|
|
1764
|
+
max: calculatorParams.maxSum,
|
|
1765
|
+
...field('moneyValue'),
|
|
1766
|
+
value: calculatorParams.moneyValue,
|
|
1767
|
+
}), renderMonthsInput({
|
|
1768
|
+
title: 'Срок вклада, месяцев',
|
|
1769
|
+
min: calculatorParams.minMonths,
|
|
1770
|
+
max: calculatorParams.maxMonths,
|
|
1771
|
+
availableMonths: calculatorParams.availableMonths,
|
|
1772
|
+
...field('monthsValue'),
|
|
1773
|
+
value: calculatorParams.monthsValue,
|
|
1774
|
+
}), jsx("div", { className: "mt-7", children: renderDepositParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1775
|
+
});
|
|
1776
|
+
const renderDepositParamsForm = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-7", children: [params.isShowMonthlyInterestPayment
|
|
1924
1777
|
? renderInterestPayment({
|
|
1925
|
-
isMonthlyInterestPayment,
|
|
1926
|
-
callback: handleIsMonthlyInterestPayment,
|
|
1927
1778
|
title: 'Выплата процентов',
|
|
1779
|
+
...field('isMonthlyInterestPayment'),
|
|
1780
|
+
value: params.isMonthlyInterestPayment,
|
|
1928
1781
|
})
|
|
1929
|
-
: null, isShowRemoteRegistration
|
|
1782
|
+
: null, params.isShowRemoteRegistration
|
|
1930
1783
|
? renderRegistrationType({
|
|
1931
|
-
isRemoteRegistration,
|
|
1932
|
-
callback: handleIsRemoteRegistration,
|
|
1933
1784
|
title: 'Оформление',
|
|
1785
|
+
...field('isRemoteRegistration'),
|
|
1786
|
+
value: params.isRemoteRegistration,
|
|
1934
1787
|
})
|
|
1935
1788
|
: null] }));
|
|
1936
1789
|
|
|
@@ -1960,7 +1813,7 @@
|
|
|
1960
1813
|
itemCount: calculatorTabs?.length,
|
|
1961
1814
|
visibleItemCount: COLUMNS_FOR_SCROLL,
|
|
1962
1815
|
});
|
|
1963
|
-
return (jsxs(BlockWrapper, { className:
|
|
1816
|
+
return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden relative w-100', className), ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
|
|
1964
1817
|
? renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
|
|
1965
1818
|
: null, renderArrows({
|
|
1966
1819
|
...controls,
|
|
@@ -1979,11 +1832,10 @@
|
|
|
1979
1832
|
const iconClassName = isActive ? '' : `text-primary-main`;
|
|
1980
1833
|
const iconVersion = tab?.icon?.iconVersion;
|
|
1981
1834
|
const activeIconStyle = isActive ? 'white' : 'normal';
|
|
1982
|
-
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className:
|
|
1983
|
-
${btnClassName}`, children: [jsx(ImgInner, { className: `h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`, image: {
|
|
1835
|
+
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: style('box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]', btnClassName), children: [jsx(ImgInner, { className: `h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`, image: {
|
|
1984
1836
|
...tab?.icon,
|
|
1985
1837
|
iconVersion: iconVersion ?? activeIconStyle,
|
|
1986
|
-
}, width: "24", height: "24" }), jsxs("div", { className: "border-0", children: [jsx("div", { className:
|
|
1838
|
+
}, width: "24", height: "24" }), jsxs("div", { className: "border-0", children: [jsx("div", { className: btnTitleClassName, children: tab?.title }), jsx("div", { className: btnDescClassName, children: tab.description })] })] }, String(i)));
|
|
1987
1839
|
}
|
|
1988
1840
|
function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
|
|
1989
1841
|
const CARD_SHIFT = 388;
|
|
@@ -1995,6 +1847,8 @@
|
|
|
1995
1847
|
})) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
1996
1848
|
}
|
|
1997
1849
|
|
|
1850
|
+
const getSanitizedValue = (_) => _.replace(/\s/g, '');
|
|
1851
|
+
|
|
1998
1852
|
const adjustValue = (val) => onlyOneDot(setZeroStart(replaceCommaToDot(getSanitizedValue(val))));
|
|
1999
1853
|
const localNumberFormat = (val) => new Intl.NumberFormat('ru-RU', {
|
|
2000
1854
|
minimumFractionDigits: 0,
|
|
@@ -2013,22 +1867,16 @@
|
|
|
2013
1867
|
};
|
|
2014
1868
|
const replaceCommaToDot = (val) => String(val.replace(',', '.').replace(/[^.\d]/g, ''));
|
|
2015
1869
|
|
|
2016
|
-
const CurrencyInput = JSX(({ className = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1870
|
+
const CurrencyInput = JSX(({ className = '', value = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
2017
1871
|
const handleChange = useCallback((inputValue) => {
|
|
2018
|
-
if (!onChange) {
|
|
2019
|
-
return;
|
|
2020
|
-
}
|
|
2021
1872
|
const adjustedVal = adjustValue(inputValue);
|
|
2022
1873
|
const clampVal = getClampValue(adjustedVal, clamp(Number(adjustedVal), minValue, maxValue));
|
|
2023
|
-
onChange(
|
|
2024
|
-
}, [onChange]);
|
|
2025
|
-
const handleBlur = useCallback((inputValue) => {
|
|
2026
|
-
if (!onChange) {
|
|
2027
|
-
return;
|
|
2028
|
-
}
|
|
2029
|
-
onChange(localNumberFormat(inputValue));
|
|
1874
|
+
onChange && onChange(clampVal);
|
|
2030
1875
|
}, [onChange]);
|
|
2031
|
-
|
|
1876
|
+
const handleBlur = useCallback(() => {
|
|
1877
|
+
onChange && onChange(localNumberFormat(value));
|
|
1878
|
+
}, [onChange, value]);
|
|
1879
|
+
return (jsx(Input, { className: className, inputClassName: "w-full", value: value, onChange: handleChange, onBlur: handleBlur, ...inputProps, children: jsx("span", { className: "text-xl-light absolute right-4 bottom-4", children: "\u20BD" }) }));
|
|
2032
1880
|
});
|
|
2033
1881
|
const getClampValue = (val, clampVal) => Number(val) === clampVal ? val : String(clampVal);
|
|
2034
1882
|
|
|
@@ -2045,7 +1893,7 @@
|
|
|
2045
1893
|
? getDisabledButtonClasses({ version: button?.version })
|
|
2046
1894
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
2047
1895
|
const link = useLink();
|
|
2048
|
-
return (jsxs(BlockWrapper, { className: `p-
|
|
1896
|
+
return (jsxs(BlockWrapper, { className: `p-default flex flex-col items-center ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: handleChange, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
|
|
2049
1897
|
});
|
|
2050
1898
|
|
|
2051
1899
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
@@ -2265,9 +2113,10 @@
|
|
|
2265
2113
|
}, [scrollRight, onScrollRight, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
|
|
2266
2114
|
return (jsxs("div", { children: [renderBlur(isBlur, scroll), canMoveLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'left-8' : 'left-0'), onClick: handleScrollLeft })) : null, canMoveRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'right-8' : 'right-0'), onClick: handleScrollRight })) : null] }));
|
|
2267
2115
|
});
|
|
2268
|
-
const renderBlur = (isBlur, scroll) =>
|
|
2116
|
+
const renderBlur = (isBlur, scroll) => isBlur ? (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })) : null] })) : null;
|
|
2269
2117
|
|
|
2270
2118
|
const ITEMS_GAP = 4;
|
|
2119
|
+
|
|
2271
2120
|
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, isAlignCenter = false, ...rest }) => {
|
|
2272
2121
|
const { blocks: childBlocks = [] } = rest.block || {};
|
|
2273
2122
|
const count = itemCount || childBlocks?.length;
|
|
@@ -2280,7 +2129,7 @@
|
|
|
2280
2129
|
});
|
|
2281
2130
|
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
2282
2131
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
2283
|
-
return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: style(getAlignStyle(isAlignCenter), 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
|
|
2132
|
+
return (jsx(BlockWrapper, { className: style(getPaddingStyle$1(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: style(getAlignStyle(isAlignCenter), 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
|
|
2284
2133
|
...rest,
|
|
2285
2134
|
renderProps: isBankHistoryCarousel
|
|
2286
2135
|
? (block, options) => renderBlock$1(block, options, {
|
|
@@ -2288,7 +2137,7 @@
|
|
|
2288
2137
|
activeIndex: activeIndex,
|
|
2289
2138
|
})
|
|
2290
2139
|
: renderBlock$1,
|
|
2291
|
-
}) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? renderDots(containerRef, dotsActiveIndex,
|
|
2140
|
+
}) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? renderDots(containerRef, dotsActiveIndex, count) : null] }) }));
|
|
2292
2141
|
});
|
|
2293
2142
|
Carousel.childrenTypes = [
|
|
2294
2143
|
'CarouselCard',
|
|
@@ -2303,7 +2152,7 @@
|
|
|
2303
2152
|
'CarouselInvestmentCard',
|
|
2304
2153
|
'CarouselEventCard',
|
|
2305
2154
|
];
|
|
2306
|
-
const getPaddingStyle = (isPadding) => (isPadding ? 'p-
|
|
2155
|
+
const getPaddingStyle$1 = (isPadding) => (isPadding ? 'p-default' : '');
|
|
2307
2156
|
const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
|
|
2308
2157
|
const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
|
|
2309
2158
|
|
|
@@ -2437,8 +2286,8 @@
|
|
|
2437
2286
|
|
|
2438
2287
|
const CarouselProductCard = JSX(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, isFullWidth = true, items = [], target, title, version = 'primary', ...rest }) => {
|
|
2439
2288
|
return (jsxs(BlockWrapper, { className: style('h-full flex flex-col justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], {
|
|
2440
|
-
className: style('p-6 pt-0', isFullWidth ? '' : '
|
|
2441
|
-
isVertical: isFullWidth
|
|
2289
|
+
className: style('p-6 pt-0', isFullWidth ? '' : 'self-center min-w-[158px]'),
|
|
2290
|
+
isVertical: isFullWidth,
|
|
2442
2291
|
})] }));
|
|
2443
2292
|
});
|
|
2444
2293
|
const renderImage$3 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image })) : null] }));
|
|
@@ -2448,9 +2297,9 @@
|
|
|
2448
2297
|
const renderItems = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted })) : null;
|
|
2449
2298
|
|
|
2450
2299
|
const CarouselProgramsCard = JSX(({ className = '', title, icon, list = [], href, target, ...rest }) => {
|
|
2451
|
-
return (jsx(BlockWrapper, { className: style('border border-gray', className), ...rest, children: jsxs(LinkWrapper, { className: "flex", href: href, target: target, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? jsx(ImgInner, { image: icon }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: "mb-3.5", headingType: "h5", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$
|
|
2300
|
+
return (jsx(BlockWrapper, { className: style('border border-gray', className), ...rest, children: jsxs(LinkWrapper, { className: "flex", href: href, target: target, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? jsx(ImgInner, { image: icon }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: "mb-3.5", headingType: "h5", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$2) })) : null] })] }) }));
|
|
2452
2301
|
});
|
|
2453
|
-
const renderList$
|
|
2302
|
+
const renderList$2 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: "text-h6", children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
|
|
2454
2303
|
|
|
2455
2304
|
const ICONS_MAP = [
|
|
2456
2305
|
{
|
|
@@ -2512,7 +2361,7 @@
|
|
|
2512
2361
|
return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
|
|
2513
2362
|
});
|
|
2514
2363
|
|
|
2515
|
-
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: style('p-9 border border-gray min-w-96', className), ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
|
|
2364
|
+
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: style('p-9 border border-gray h-full min-w-96', className), ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
|
|
2516
2365
|
|
|
2517
2366
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2518
2367
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
@@ -2536,20 +2385,24 @@
|
|
|
2536
2385
|
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
2537
2386
|
});
|
|
2538
2387
|
|
|
2388
|
+
const getPaddingStyle = (isHighlighting) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
|
|
2389
|
+
|
|
2390
|
+
const descriptionSize = 'text-h6';
|
|
2391
|
+
|
|
2392
|
+
const renderCardInfo = (cell, i) => {
|
|
2393
|
+
const { title, description, buttons } = cell;
|
|
2394
|
+
return (jsxs("div", { className: "py-5 border-b border-main-divider", children: [title ? (jsx("div", { className: "opacity-80", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: title }) })) : null, description ? (jsx("div", { className: "mt-1", children: jsx(Text, { size: descriptionSize, color: "text-primary-text", children: description }) })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2539
2397
|
const VISIBLE_CELLS_COUNT = 1;
|
|
2540
|
-
const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, cardCells = [], ...rest }) => {
|
|
2398
|
+
const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting = false, button, cardCells = [], ...rest }) => {
|
|
2541
2399
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
2542
2400
|
const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
|
|
2543
2401
|
const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
|
|
2544
|
-
return (jsxs(BlockWrapper, { className: style('relative border border-gray
|
|
2402
|
+
return (jsxs(BlockWrapper, { className: style('relative border border-gray flex flex-col', getPaddingStyle(isHighlighting), className), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock$1(icon), title ? jsx(Heading, { className: "text-center pt-2", headingType: "h5", title: title }) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$1 : null })) : null] }));
|
|
2545
2403
|
});
|
|
2546
|
-
const renderIconBlock$1 = (icon) => (
|
|
2547
|
-
const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-8 pt-20' : 'mt-20 pt-8';
|
|
2404
|
+
const renderIconBlock$1 = (icon) => (jsx("div", { className: "w-[267px] min-w-[267px] self-center", children: icon?.src || icon?.icon ? jsx(ImgInner, { image: icon }) : null }));
|
|
2548
2405
|
const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
2549
|
-
const renderCardInfo = (cell, i) => {
|
|
2550
|
-
const { title, description, buttons } = cell;
|
|
2551
|
-
return (jsxs("div", { className: "py-5 border-b border-main-divider", children: [title ? (jsx("div", { className: "text-secondary-text text-m-light opacity-80", children: cell.title })) : null, description ? (jsx("div", { className: "text-primary-text text-h6 mt-1", children: cell.description })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
|
|
2552
|
-
};
|
|
2553
2406
|
const renderHitIcon = () => (jsxs("div", { className: "absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "23", height: "22" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: "\u0425\u0418\u0422" })] }));
|
|
2554
2407
|
|
|
2555
2408
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
@@ -2621,7 +2474,7 @@
|
|
|
2621
2474
|
});
|
|
2622
2475
|
const renderShowMoreToggleButton = ({ isShowAllRow, onClick, }) => (jsx("div", { className: "pr-12", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: onClick, className: "mt-5 flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans text-xs-light font-medium py-3", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
|
|
2623
2476
|
|
|
2624
|
-
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `flex p-
|
|
2477
|
+
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `flex p-default ${className}`, version: version, ...rest, children: [info?.length ? renderBlocks(info) : null, contacts?.length ? renderBlocks(contacts) : null] })));
|
|
2625
2478
|
const renderBlocks = (info) => (jsx("div", { className: "flex grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index })) }));
|
|
2626
2479
|
const renderBlocksColumn = ({ column, index }) => column ? (jsx("div", { className: "flex flex-col grow basis-0 pr-11 last:pr-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { className: "mt-6 first:mt-0", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "XS", align: "text-left" }), additionalDescription ? (jsx("div", { className: "mt-1.5 opacity-80", children: jsx(Paragraph, { size: "text-m", font: "font-light", children: additionalDescription }) })) : null, button ? jsx(Button, { className: "mt-6", ...button }) : null] }, String(key)))) }, `col-${String(index)}`)) : null;
|
|
2627
2480
|
|
|
@@ -2854,23 +2707,6 @@
|
|
|
2854
2707
|
return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
|
|
2855
2708
|
};
|
|
2856
2709
|
|
|
2857
|
-
const useForm = (initialState = {}) => {
|
|
2858
|
-
const [formState, setFormState] = useState(initialState);
|
|
2859
|
-
const handlersMap = useRef({});
|
|
2860
|
-
const register = (fieldName) => {
|
|
2861
|
-
if (!handlersMap.current) {
|
|
2862
|
-
return {};
|
|
2863
|
-
}
|
|
2864
|
-
const handler = (value) => {
|
|
2865
|
-
setFormState((prev) => ({ ...prev, [fieldName]: value }));
|
|
2866
|
-
};
|
|
2867
|
-
handlersMap.current[fieldName] ||= handler;
|
|
2868
|
-
return { value: formState?.[fieldName], onChange: handlersMap.current[fieldName] };
|
|
2869
|
-
};
|
|
2870
|
-
const resetForm = useCallback(() => setFormState({}), []);
|
|
2871
|
-
return { formState, register, resetForm };
|
|
2872
|
-
};
|
|
2873
|
-
|
|
2874
2710
|
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
|
|
2875
2711
|
return (jsxs("button", { className: style('flex justify-center w-full px-0 py-5 border border-transparent outline-none focus:border-primary-text', disabled
|
|
2876
2712
|
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
@@ -2922,25 +2758,26 @@
|
|
|
2922
2758
|
return items.map((item) => (jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
2923
2759
|
});
|
|
2924
2760
|
|
|
2925
|
-
const renderFormItem = (filtrationSchema,
|
|
2761
|
+
const renderFormItem = (filtrationSchema, field) => (key) => {
|
|
2926
2762
|
const item = filtrationSchema[key];
|
|
2927
2763
|
const type = item?.type;
|
|
2928
2764
|
switch (type) {
|
|
2929
2765
|
case 'array':
|
|
2930
|
-
return renderCheckboxes(key,
|
|
2766
|
+
return renderCheckboxes(key, field)(item);
|
|
2931
2767
|
default:
|
|
2932
2768
|
return null;
|
|
2933
2769
|
}
|
|
2934
2770
|
};
|
|
2935
|
-
const renderCheckboxes = (key,
|
|
2771
|
+
const renderCheckboxes = (key, field) => (item) => {
|
|
2936
2772
|
const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
2937
2773
|
[];
|
|
2938
|
-
return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: true, ...
|
|
2774
|
+
return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: true, ...field(key) })] }, key));
|
|
2939
2775
|
};
|
|
2940
2776
|
|
|
2777
|
+
const initialFiltrationState = {};
|
|
2941
2778
|
const Filtration = JSX(({ className, filtrationSchema = {}, resetButton, ...rest }) => {
|
|
2942
|
-
const {
|
|
2943
|
-
return (jsxs(BlockWrapper, { className: style(className), version: "transparent", ...rest, children: [jsxs("form", { className: "flex justify-between bg-white p-9 mb-1", children: [jsx("div", { className: "flex gap-11", children: Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema,
|
|
2779
|
+
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
2780
|
+
return (jsxs(BlockWrapper, { className: style(className), version: "transparent", ...rest, children: [jsxs("form", { className: "flex justify-between bg-white p-9 mb-1", children: [jsx("div", { className: "flex gap-11", children: Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, field)) }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72", onClick: reset, ...resetButton }) })) : null] }), jsx(FiltrationInner, { filtrationState: filtrationState, ...rest })] }));
|
|
2944
2781
|
});
|
|
2945
2782
|
Filtration.childrenTypes = ['ProductTile'];
|
|
2946
2783
|
Filtration.childSchema = (content) => content?.filtrationSchema || {};
|
|
@@ -2971,12 +2808,12 @@
|
|
|
2971
2808
|
'bg-white': 'text-primary-text',
|
|
2972
2809
|
transparent: 'text-white',
|
|
2973
2810
|
};
|
|
2974
|
-
const renderTitle$
|
|
2811
|
+
const renderTitle$2 = (title, bgColor, className) => {
|
|
2975
2812
|
return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
|
|
2976
2813
|
};
|
|
2977
2814
|
|
|
2978
2815
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
|
|
2979
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$
|
|
2816
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$2(children || logo?.title, bgColor) : null] }));
|
|
2980
2817
|
});
|
|
2981
2818
|
|
|
2982
2819
|
const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
@@ -3166,14 +3003,6 @@
|
|
|
3166
3003
|
return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-10 -right-12", onClick: onClose }), head] }), children] }) })) : null;
|
|
3167
3004
|
});
|
|
3168
3005
|
|
|
3169
|
-
function useBool(defaultValue = false) {
|
|
3170
|
-
const [value, setValue] = useState(defaultValue);
|
|
3171
|
-
const setTrue = useCallback(() => setValue(true), []);
|
|
3172
|
-
const setFalse = useCallback(() => setValue(false), []);
|
|
3173
|
-
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
3174
|
-
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
3175
|
-
}
|
|
3176
|
-
|
|
3177
3006
|
function useDialogProps(id, initOpen = false) {
|
|
3178
3007
|
const [isOpened, { setTrue: open, setFalse: close }] = useBool(initOpen);
|
|
3179
3008
|
const [params, setParams] = useState({ id });
|
|
@@ -3315,7 +3144,7 @@
|
|
|
3315
3144
|
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
3316
3145
|
});
|
|
3317
3146
|
|
|
3318
|
-
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
3147
|
+
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-default ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
|
|
3319
3148
|
const renderCalendar = (calendar) => {
|
|
3320
3149
|
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
3321
3150
|
const colSize = 100 / colCount;
|
|
@@ -3607,7 +3436,7 @@
|
|
|
3607
3436
|
'': '',
|
|
3608
3437
|
};
|
|
3609
3438
|
|
|
3610
|
-
const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', isPadding ? 'p-
|
|
3439
|
+
const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', isPadding ? 'p-default' : '', gapStyles[gap], className), version: version, isTheme: isTheme, ...rest, children: renderChildren(rest) })));
|
|
3611
3440
|
HorizontalLayout.childrenTypes = {
|
|
3612
3441
|
exclude: ['HorizontalLayout'],
|
|
3613
3442
|
};
|
|
@@ -3756,7 +3585,7 @@
|
|
|
3756
3585
|
double: 'flex-wrap',
|
|
3757
3586
|
single: 'flex-col',
|
|
3758
3587
|
};
|
|
3759
|
-
const LinkDocs = JSX(({ className = '', title, description, align = 'text-center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: style('p-
|
|
3588
|
+
const LinkDocs = JSX(({ className = '', title, description, align = 'text-center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: style('p-default', className), ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, align: align, headlineVersion: "M", as: "h2" }), documents?.length ? (jsx("div", { className: style('mt-8 flex gap-6', linkColumnsModeStyleMap[columnsMode]), role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { doc: doc, icon: icon ? (jsx(ImgInner, { className: "min-w-6 min-h-6", image: icon, width: "24", height: "24" })) : null }) }, String(i)))) })) : null] })));
|
|
3760
3589
|
|
|
3761
3590
|
const getColSpan = (className) => {
|
|
3762
3591
|
const colSpanPrefix = 'col-span-';
|
|
@@ -3779,12 +3608,12 @@
|
|
|
3779
3608
|
|
|
3780
3609
|
const MobileAppTile = JSX(({ className = '', title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, headingType = 'h4', alignTitle = 'left', description, ...rest }) => {
|
|
3781
3610
|
const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
|
|
3782
|
-
return (jsxs(BlockWrapper, { className: `flex justify-between p-
|
|
3611
|
+
return (jsxs(BlockWrapper, { className: `flex justify-between p-default box-border relative min-h-80 ${getTileMinHeight(className)} ${className}`, version: version, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-7 w-full ${AlignText[alignTitle]}` })) : null, buttons: renderButtonsSection(buttons, {
|
|
3783
3612
|
className: 'mt-8',
|
|
3784
3613
|
buttonClassName: 'min-w-[168px]',
|
|
3785
|
-
}), children: [renderDescription$2(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList(items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
|
|
3614
|
+
}), children: [renderDescription$2(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
|
|
3786
3615
|
});
|
|
3787
|
-
const renderList = (items) => {
|
|
3616
|
+
const renderList$1 = (items) => {
|
|
3788
3617
|
return items?.length ? (jsx(List, { items: items, itemClassName: "text-l-light mb-2 last:mb-0" })) : (jsx("span", { className: "text-m-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
|
|
3789
3618
|
};
|
|
3790
3619
|
const renderDescription$2 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
|
|
@@ -4272,7 +4101,7 @@
|
|
|
4272
4101
|
const ProductBlock = JSX((props) => {
|
|
4273
4102
|
const { className = '', breadcrumbs, backwardButton, version = 'primary', ...rest } = props;
|
|
4274
4103
|
const buttonVersion = version === 'primary' ? version : 'white';
|
|
4275
|
-
return (jsxs(BlockWrapper, { className: style('overflow-hidden p-
|
|
4104
|
+
return (jsxs(BlockWrapper, { className: style('overflow-hidden p-default flex flex-col box-border min-h-[454px]', className), version: version, ...rest, children: [backwardButton?.text ? renderBackwardButton(backwardButton, buttonVersion) : null, breadcrumbs?.length ? (jsx("div", { className: "text-xs-light mb-6", children: joinList(jsx("span", { className: style('mx-2', breadcrumbStyle), children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { className: breadcrumbStyle, ...breadcrumb }, String(i))))) })) : null, jsx(ProductBlockInner, { className: "mt-10", version: version, ...rest })] }));
|
|
4276
4105
|
});
|
|
4277
4106
|
|
|
4278
4107
|
const ProductGallery = JSX(({ className = '', slides = [], ...rest }) => {
|
|
@@ -4664,9 +4493,9 @@
|
|
|
4664
4493
|
const count = tab.ref && page?.blocks
|
|
4665
4494
|
? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
4666
4495
|
: 0;
|
|
4667
|
-
return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$
|
|
4496
|
+
return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$1(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
|
|
4668
4497
|
};
|
|
4669
|
-
const renderTitle$
|
|
4498
|
+
const renderTitle$1 = (title, active, isScrollable) => {
|
|
4670
4499
|
const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
|
|
4671
4500
|
const titleClassName = isScrollable
|
|
4672
4501
|
? `${TEXT_CLASSES} ${activeClassName}`
|
|
@@ -4906,9 +4735,9 @@
|
|
|
4906
4735
|
});
|
|
4907
4736
|
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
|
|
4908
4737
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
4909
|
-
return (jsxs(BlockWrapper, { className: `p-
|
|
4738
|
+
return (jsxs(BlockWrapper, { className: `p-default overflow-hidden relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle({ title, description }), renderDescription$1(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
|
|
4910
4739
|
});
|
|
4911
|
-
function renderTitle
|
|
4740
|
+
function renderTitle({ title, description }) {
|
|
4912
4741
|
return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
|
|
4913
4742
|
}
|
|
4914
4743
|
function renderDescription$1(description) {
|
|
@@ -4923,13 +4752,16 @@
|
|
|
4923
4752
|
})] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
4924
4753
|
});
|
|
4925
4754
|
|
|
4926
|
-
const TextBlock = JSX(({ className = '', title, description, iconVersion, image, __html, ...rest }) => {
|
|
4927
|
-
return (jsxs(BlockWrapper, { className:
|
|
4755
|
+
const TextBlock = JSX(({ className = '', title, description, iconVersion, image, __html, items = [], ...rest }) => {
|
|
4756
|
+
return (jsxs(BlockWrapper, { className: style('px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10', className), ...rest, children: [iconVersion === 'small' ? jsx("div", { className: "mt-1", children: renderIcon() }) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "flex flex-col w-fit gap-3", children: [title ? (jsx(Text, { size: "text-l", font: "font-medium", color: "text-primary-text group-data-secondary:text-white", children: title })) : null, description ? renderDescription(description) : null, items?.length ? renderList(items, true) : null, __html ? jsx(RichText, { __html: __html }) : null] })] }));
|
|
4928
4757
|
});
|
|
4929
4758
|
const renderIcon = () => (jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main`, children: "i" }));
|
|
4930
|
-
const renderImage = (image) =>
|
|
4931
|
-
const renderTitle = (title) => (jsx(Text, { size: "text-l", font: "font-medium", color: "text-primary-text group-data-secondary:text-white", children: title }));
|
|
4759
|
+
const renderImage = (image) => image?.src ? jsx(ImgInner, { className: "h-fit", image: image }) : null;
|
|
4932
4760
|
const renderDescription = (description) => (jsx(Paragraph, { size: "text-s", color: "text-secondary-text group-data-secondary:text-white", children: description }));
|
|
4761
|
+
const renderList = (items, bullets) => {
|
|
4762
|
+
const listStyle = bullets ? 'list-disc pl-6' : '';
|
|
4763
|
+
return (jsx("ul", { className: style('text-secondary-text group-data-secondary:text-white/80', listStyle), children: items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-s", font: "font-light", children: _ }) }, `listItem-${i}`))) }));
|
|
4764
|
+
};
|
|
4933
4765
|
|
|
4934
4766
|
const Tags = JSX((props) => {
|
|
4935
4767
|
const { tags, className = '' } = props;
|
|
@@ -4950,7 +4782,7 @@
|
|
|
4950
4782
|
};
|
|
4951
4783
|
const VerticalLayout = JSX(({ className = '', gap = '', align = 'stretch', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => {
|
|
4952
4784
|
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
4953
|
-
return (jsx(BlockWrapper, { className: style('relative', 'flex flex-col [&>*]:max-w-full', isPadding ? 'p-
|
|
4785
|
+
return (jsx(BlockWrapper, { className: style('relative', 'flex flex-col [&>*]:max-w-full', isPadding ? 'p-default' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({
|
|
4954
4786
|
...rest,
|
|
4955
4787
|
renderProps: (block, options) => renderBlock$1(block, options, { className: innerPaddingStyle }),
|
|
4956
4788
|
}) }));
|
|
@@ -5174,7 +5006,7 @@
|
|
|
5174
5006
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
5175
5007
|
}
|
|
5176
5008
|
|
|
5177
|
-
const packageVersion = "0.10.
|
|
5009
|
+
const packageVersion = "0.10.7";
|
|
5178
5010
|
|
|
5179
5011
|
exports.Blocks = Blocks;
|
|
5180
5012
|
exports.ContentPage = ContentPage;
|