@redneckz/wildless-cms-uni-blocks 0.10.4 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.9.9.js +8 -6
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +323 -411
- 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/Filtration/renderFormItem.d.ts +2 -2
- 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/CookiePopup/CookiePopup.d.ts +8 -0
- package/bundle/ui-kit/Dialog/useDialogProps.d.ts +1 -1
- package/bundle/ui-kit/Input/InputProps.d.ts +4 -2
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -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/components/ApplicationForm/AcquiringFormState.js +2 -0
- 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/dist/components/ApplicationForm/CreditFormState.js +2 -0
- 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 +5 -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/BusinessDepositCalculatorForm.js +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.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 +1 -1
- 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/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +2 -1
- package/dist/components/ContentPage/ContentPage.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 +1 -1
- package/dist/components/Headline/Headline.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 +31 -8
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +9 -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/CookiePopup/CookiePopup.d.ts +8 -0
- package/dist/ui-kit/CookiePopup/CookiePopup.js +22 -0
- package/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/dist/ui-kit/Dialog/CloseButton.js +1 -1
- package/dist/ui-kit/Dialog/CloseButton.js.map +1 -1
- package/dist/ui-kit/Dialog/Dialog.js +1 -1
- package/dist/ui-kit/Dialog/Dialog.js.map +1 -1
- package/dist/ui-kit/Dialog/useDialogProps.d.ts +1 -1
- package/dist/ui-kit/Dialog/useDialogProps.js +2 -2
- package/dist/ui-kit/Dialog/useDialogProps.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/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- 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/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/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 +5 -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/BusinessDepositCalculatorForm.js +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.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.js +1 -1
- 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/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +2 -1
- package/lib/components/ContentPage/ContentPage.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.js +1 -1
- package/lib/components/Headline/Headline.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 +31 -8
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +9 -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/CookiePopup/CookiePopup.d.ts +8 -0
- package/lib/ui-kit/CookiePopup/CookiePopup.js +20 -0
- package/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js +8 -14
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/lib/ui-kit/Dialog/CloseButton.js +1 -1
- package/lib/ui-kit/Dialog/CloseButton.js.map +1 -1
- package/lib/ui-kit/Dialog/Dialog.js +1 -1
- package/lib/ui-kit/Dialog/Dialog.js.map +1 -1
- package/lib/ui-kit/Dialog/useDialogProps.d.ts +1 -1
- package/lib/ui-kit/Dialog/useDialogProps.js +2 -2
- package/lib/ui-kit/Dialog/useDialogProps.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/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- 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/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/mobile/bundle/bundle.umd.js +50 -18
- 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/Filtration/renderFormItem.d.ts +2 -2
- 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/CookiePopup/CookiePopup.d.ts +8 -0
- package/mobile/bundle/ui-kit/Dialog/useDialogProps.d.ts +1 -1
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +4 -2
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -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 +5 -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/BusinessDepositCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.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 +1 -1
- 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/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +2 -1
- package/mobile/dist/components/ContentPage/ContentPage.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 +1 -1
- package/mobile/dist/components/Headline/Headline.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 +31 -8
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +9 -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/CookiePopup/CookiePopup.d.ts +8 -0
- package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js +22 -0
- package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
- 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/Dialog/CloseButton.js +1 -1
- package/mobile/dist/ui-kit/Dialog/CloseButton.js.map +1 -1
- package/mobile/dist/ui-kit/Dialog/Dialog.js +1 -1
- package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/Dialog/useDialogProps.d.ts +1 -1
- package/mobile/dist/ui-kit/Dialog/useDialogProps.js +2 -2
- package/mobile/dist/ui-kit/Dialog/useDialogProps.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/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- 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/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/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 +5 -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/BusinessDepositCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.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 +1 -1
- 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/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- 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/ContactsBlock/ContactsBlock.js +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +2 -1
- package/mobile/lib/components/ContentPage/ContentPage.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 +1 -1
- package/mobile/lib/components/Headline/Headline.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 +31 -8
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +9 -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/CookiePopup/CookiePopup.d.ts +8 -0
- package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js +20 -0
- package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -0
- 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/Dialog/CloseButton.js +1 -1
- package/mobile/lib/ui-kit/Dialog/CloseButton.js.map +1 -1
- package/mobile/lib/ui-kit/Dialog/Dialog.js +1 -1
- package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/Dialog/useDialogProps.d.ts +1 -1
- package/mobile/lib/ui-kit/Dialog/useDialogProps.js +2 -2
- package/mobile/lib/ui-kit/Dialog/useDialogProps.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/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- 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/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/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 +5 -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/BusinessDepositCalculatorForm.tsx +3 -3
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +1 -1
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +7 -3
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- 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/ContactsBlock/ContactsBlock.tsx +1 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +5 -0
- 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 +1 -1
- 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 +61 -13
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +39 -25
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +2 -2
- package/mobile/src/ui-kit/CookiePopup/CookiePopup.tsx +64 -0
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +8 -16
- package/mobile/src/ui-kit/Dialog/CloseButton.tsx +1 -1
- package/mobile/src/ui-kit/Dialog/Dialog.tsx +1 -1
- package/mobile/src/ui-kit/Dialog/useDialogProps.ts +2 -1
- 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/LinkWrapper/LinkWrapper.tsx +13 -10
- 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/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/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 +5 -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/BusinessDepositCalculatorForm.tsx +3 -3
- package/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
- package/src/components/CardTransfer/CardTransfer.tsx +1 -1
- package/src/components/Carousel/Carousel.fixture.tsx +1 -1
- package/src/components/Carousel/Carousel.tsx +1 -1
- package/src/components/Carousel/CarouselScrollButtons.tsx +7 -3
- package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- 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/ContactsBlock/ContactsBlock.tsx +1 -1
- package/src/components/ContentPage/ContentPage.tsx +5 -0
- 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.tsx +1 -1
- 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 +61 -13
- package/src/ui-kit/Checkbox/Checkbox.tsx +39 -25
- package/src/ui-kit/Checkbox/CheckboxProps.ts +2 -2
- package/src/ui-kit/CookiePopup/CookiePopup.tsx +64 -0
- package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +8 -16
- package/src/ui-kit/Dialog/CloseButton.tsx +1 -1
- package/src/ui-kit/Dialog/Dialog.tsx +1 -1
- package/src/ui-kit/Dialog/useDialogProps.ts +2 -1
- package/src/ui-kit/Input/Input.tsx +11 -19
- package/src/ui-kit/Input/InputProps.ts +4 -2
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +13 -10
- 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/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/tailwind.config.cjs +4 -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/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/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/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/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/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/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/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/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 = (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
|
+
};
|
|
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
|
-
const validate = (key, value) => {
|
|
634
|
-
switch (key) {
|
|
635
|
-
case 'name':
|
|
636
|
-
return isName(value);
|
|
637
|
-
case 'inn':
|
|
638
|
-
return isTin(value);
|
|
639
|
-
case 'mail':
|
|
640
|
-
return isEmpty(value);
|
|
641
|
-
case 'phone':
|
|
642
|
-
return isEmpty(value);
|
|
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 })] })));
|
|
650
700
|
|
|
651
|
-
const
|
|
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);
|
|
710
|
+
|
|
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,14 +891,14 @@
|
|
|
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
|
|
|
@@ -941,25 +924,12 @@
|
|
|
941
924
|
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)))) }));
|
|
942
925
|
}
|
|
943
926
|
|
|
944
|
-
const
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
min: MIN_CREDIT_AMOUNT,
|
|
951
|
-
max: MAX_CREDIT_AMOUNT,
|
|
952
|
-
items: ITEMS_CREDIT_AMOUNT,
|
|
953
|
-
}), renderInputRange({
|
|
954
|
-
label: 'Срок кредита, месяцев',
|
|
955
|
-
value: term,
|
|
956
|
-
onChange: (value) => handleChange({ term: value }),
|
|
957
|
-
min: MIN_CREDIT_TERM,
|
|
958
|
-
max: MAX_CREDIT_TERM,
|
|
959
|
-
items: ITEMS_CREDIT_TERM,
|
|
960
|
-
})] }));
|
|
961
|
-
|
|
962
|
-
const renderRegionDepartment = ({ regions, region, branches, department, handleChange, errors, handleChangeErrors, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: regions, fieldValue: "code", fieldLabel: "name", error: errors['region'], selected: region, setSelected: (value) => handleChange({ region: value, department: '' }), onValidate: (value) => handleChangeErrors({ region: validate('region', value) }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { data: branches, fieldValue: "branchCode", fieldLabel: "address", error: errors['department'], selected: department, setSelected: (value) => handleChange({ department: value }), onValidate: (value) => handleChangeErrors({ department: validate('department', value) }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
|
|
927
|
+
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') })] })] }));
|
|
928
|
+
|
|
929
|
+
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 = '' }) => ({
|
|
930
|
+
key: branchCode,
|
|
931
|
+
text: address,
|
|
932
|
+
})), ...withValidator(field('department'), defaultValidator) }) })] }));
|
|
963
933
|
|
|
964
934
|
const initialFormState$2 = {
|
|
965
935
|
amount: MIN_CREDIT_AMOUNT,
|
|
@@ -969,91 +939,60 @@
|
|
|
969
939
|
name: '',
|
|
970
940
|
phone: '',
|
|
971
941
|
mail: '',
|
|
972
|
-
region: '',
|
|
973
|
-
department: '',
|
|
974
942
|
annualRevenue: '',
|
|
975
943
|
};
|
|
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({
|
|
944
|
+
const creditValidator = objectValidator({
|
|
945
|
+
annualRevenue: defaultValidator,
|
|
946
|
+
inn: innValidator,
|
|
947
|
+
name: nameValidator,
|
|
948
|
+
phone: phoneValidator,
|
|
949
|
+
region: defaultValidator,
|
|
950
|
+
department: defaultValidator,
|
|
951
|
+
});
|
|
952
|
+
const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
|
|
953
|
+
const handleSubmit = useCallback((formState) => {
|
|
954
|
+
const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
|
|
955
|
+
isValidationSuccess(creditValidator(formState)) &&
|
|
956
|
+
onSubmit({
|
|
957
|
+
typeForm: 'cred',
|
|
1008
958
|
fullName,
|
|
1009
959
|
inn,
|
|
1010
960
|
name,
|
|
1011
961
|
phone,
|
|
1012
962
|
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 })] }));
|
|
963
|
+
region: region?.text || '',
|
|
964
|
+
department: department?.text || '',
|
|
965
|
+
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
966
|
+
});
|
|
967
|
+
}, [onSubmit]);
|
|
968
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$2, handleSubmit);
|
|
969
|
+
const regions = useGetRegions();
|
|
970
|
+
const branches = useBranches(formState.region?.key).filter((branch) => branch?.address);
|
|
971
|
+
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
972
|
});
|
|
1027
973
|
|
|
1028
974
|
const initialFormState$1 = {
|
|
1029
975
|
name: '',
|
|
1030
976
|
phone: '',
|
|
1031
977
|
};
|
|
978
|
+
const depositValidator = objectValidator({
|
|
979
|
+
name: nameValidator,
|
|
980
|
+
phone: phoneValidator,
|
|
981
|
+
});
|
|
1032
982
|
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({
|
|
983
|
+
const { button, link, onSubmit } = props;
|
|
984
|
+
const handleSubmit = useCallback((formState) => {
|
|
985
|
+
const { name, phone } = formState;
|
|
986
|
+
isValidationSuccess(depositValidator(formState)) &&
|
|
987
|
+
onSubmit({
|
|
988
|
+
typeForm: 'dpst',
|
|
1049
989
|
name,
|
|
1050
990
|
phone,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
991
|
+
});
|
|
992
|
+
}, [onSubmit]);
|
|
993
|
+
const [, { field, ...formProps }] = useForm(initialFormState$1, handleSubmit);
|
|
994
|
+
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
995
|
});
|
|
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
996
|
|
|
1058
997
|
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
1059
998
|
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
@@ -1102,15 +1041,22 @@
|
|
|
1102
1041
|
fill: 'white',
|
|
1103
1042
|
},
|
|
1104
1043
|
];
|
|
1105
|
-
const Checkbox = JSX(({ className,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1044
|
+
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1045
|
+
const handleChange = useCallback((e) => {
|
|
1046
|
+
e.preventDefault();
|
|
1047
|
+
onChange && onChange(!value);
|
|
1048
|
+
}, [onChange, value]);
|
|
1049
|
+
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" }));
|
|
1050
|
+
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
1051
|
});
|
|
1052
|
+
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1110
1053
|
|
|
1111
|
-
const renderQuestionsInterested = (
|
|
1054
|
+
const renderQuestionsInterested = (field) => {
|
|
1055
|
+
const textField = field('text');
|
|
1056
|
+
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 || '')) })] }));
|
|
1057
|
+
};
|
|
1112
1058
|
|
|
1113
|
-
const renderWedDataOrganization = (
|
|
1059
|
+
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
1060
|
|
|
1115
1061
|
const initialFormState = {
|
|
1116
1062
|
fullName: '',
|
|
@@ -1122,53 +1068,34 @@
|
|
|
1122
1068
|
conversionOperations: false,
|
|
1123
1069
|
text: '',
|
|
1124
1070
|
};
|
|
1125
|
-
const
|
|
1126
|
-
fullName:
|
|
1127
|
-
name:
|
|
1128
|
-
phone:
|
|
1129
|
-
mail:
|
|
1130
|
-
|
|
1131
|
-
};
|
|
1071
|
+
const webValidator = objectValidator({
|
|
1072
|
+
fullName: defaultValidator,
|
|
1073
|
+
name: nameValidator,
|
|
1074
|
+
phone: phoneValidator,
|
|
1075
|
+
mail: defaultValidator,
|
|
1076
|
+
});
|
|
1132
1077
|
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({
|
|
1078
|
+
const { button, link, onSubmit } = props;
|
|
1079
|
+
const handleSubmit = useCallback((formState) => {
|
|
1080
|
+
const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
|
|
1081
|
+
isValidationSuccess(webValidator(formState)) &&
|
|
1082
|
+
onSubmit({
|
|
1083
|
+
typeForm: 'kved',
|
|
1152
1084
|
fullName,
|
|
1153
1085
|
name,
|
|
1154
1086
|
phone,
|
|
1155
1087
|
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()] }));
|
|
1088
|
+
partnerComments: `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`,
|
|
1089
|
+
});
|
|
1090
|
+
}, [onSubmit]);
|
|
1091
|
+
const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
|
|
1092
|
+
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
1093
|
});
|
|
1167
1094
|
|
|
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: [
|
|
1095
|
+
const ResponseNotification = JSX(({ responseType }) => {
|
|
1096
|
+
const responseOK = responseType === 'OK';
|
|
1097
|
+
const backgroundColor = responseOK ? 'bg-responce-ok' : 'bg-responce-fail';
|
|
1098
|
+
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
1099
|
});
|
|
1173
1100
|
|
|
1174
1101
|
const COMPONENTS_MAP = {
|
|
@@ -1180,17 +1107,17 @@
|
|
|
1180
1107
|
};
|
|
1181
1108
|
const API = CorporateLeadAPI();
|
|
1182
1109
|
const ApplicationForm = JSX((props) => {
|
|
1183
|
-
const { className
|
|
1184
|
-
const [
|
|
1110
|
+
const { className, title, typeForm = 'credit', button, link, ...rest } = props;
|
|
1111
|
+
const [responseType, setResponseType] = useState('');
|
|
1185
1112
|
const handleSubmit = useCallback(async (data) => {
|
|
1186
1113
|
const status = (await API.send(data)) ? 'OK' : 'Fail';
|
|
1187
1114
|
setResponseType(status);
|
|
1188
1115
|
return status;
|
|
1189
1116
|
}, []);
|
|
1190
|
-
return (jsx(BlockWrapper, { className:
|
|
1117
|
+
return (jsx(BlockWrapper, { className: style('font-sans bg-white p-12 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
1118
|
});
|
|
1192
1119
|
|
|
1193
|
-
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
1120
|
+
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
1121
|
const renderStep$1 = (benefit, i) => {
|
|
1195
1122
|
const description = benefit.description;
|
|
1196
1123
|
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)));
|
|
@@ -1263,13 +1190,13 @@
|
|
|
1263
1190
|
|
|
1264
1191
|
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
|
|
1265
1192
|
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
1266
|
-
const paddingStyle = isPadding ? 'p-
|
|
1193
|
+
const paddingStyle = isPadding ? 'p-default' : '';
|
|
1267
1194
|
return (jsxs(BlockWrapper, { className: style('flex flex-col', paddingStyle, versionStyle.wrapper, 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, children: description })) : null] }));
|
|
1268
1195
|
});
|
|
1269
1196
|
|
|
1270
1197
|
const Bonus = JSX((props) => {
|
|
1271
1198
|
const { className = '', title, description, bonusItems, ...rest } = props;
|
|
1272
|
-
return (jsx(BlockWrapper, { className: `p-
|
|
1199
|
+
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
1200
|
? 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
1201
|
? renderBonusItemContent(_.bonusItemContent)
|
|
1275
1202
|
: null] })] }, String(i))))
|
|
@@ -1287,7 +1214,7 @@
|
|
|
1287
1214
|
right: 'text-right',
|
|
1288
1215
|
};
|
|
1289
1216
|
|
|
1290
|
-
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-
|
|
1217
|
+
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
1218
|
const renderBonusBenefit = ({ icon, title, description }, i) => {
|
|
1292
1219
|
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
1220
|
};
|
|
@@ -1313,7 +1240,7 @@
|
|
|
1313
1240
|
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
1241
|
};
|
|
1315
1242
|
|
|
1316
|
-
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
1243
|
+
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
1244
|
|
|
1318
1245
|
const ButtonBlock = JSX(({ button, className, ...rest }) => (jsx(BlockWrapper, { className: style('!bg-transparent', className), ...rest, children: renderButtonsSection([button]) })));
|
|
1319
1246
|
|
|
@@ -1504,7 +1431,7 @@
|
|
|
1504
1431
|
horizontal: 'gap-10',
|
|
1505
1432
|
vertical: 'flex-col gap-3',
|
|
1506
1433
|
};
|
|
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,
|
|
1434
|
+
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
1435
|
|
|
1509
1436
|
const EVERY_MONTH = 'everyMonth';
|
|
1510
1437
|
const AT_END_TERM = 'atEndTerm';
|
|
@@ -1644,7 +1571,7 @@
|
|
|
1644
1571
|
orientation: 'vertical',
|
|
1645
1572
|
})] })] }), 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
1573
|
});
|
|
1647
|
-
const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit,
|
|
1574
|
+
const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit, value: isReplenished, onChange: handleIsReplenished }), jsx(Checkbox, { className: "mt-3", disabled: isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", value: isPartialWithdrawal, onChange: handleIsPartialWithdrawal }), 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", value: isSmallBusiness, onChange: handleIsSmallBusiness })] }));
|
|
1648
1575
|
|
|
1649
1576
|
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
1650
1577
|
const InputListRange = JSX(({ className, title, items = [], list = [], value = list[0], disabled = false, onChange }) => {
|
|
@@ -1817,7 +1744,7 @@
|
|
|
1817
1744
|
}), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1818
1745
|
});
|
|
1819
1746
|
const renderRate = (rate) => (jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
|
|
1820
|
-
const renderCreditParamsForm = ({ isSalaryClient, isStateEmployee, isPensionClient, isInsurance, isShowSalaryClient, isShowStateEmployee, isShowPensionClient, isShowInsurance, handleIsSalaryClient, handleIsStateEmployee, handleIsPensionClient, handleIsInsurance, }) => (jsxs("div", { children: [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",
|
|
1747
|
+
const renderCreditParamsForm = ({ isSalaryClient, isStateEmployee, isPensionClient, isInsurance, isShowSalaryClient, isShowStateEmployee, isShowPensionClient, isShowInsurance, handleIsSalaryClient, handleIsStateEmployee, handleIsPensionClient, handleIsInsurance, }) => (jsxs("div", { children: [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", value: isSalaryClient, onChange: handleIsSalaryClient })) : null, 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", value: isStateEmployee, onChange: handleIsStateEmployee })) : null, 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", value: isPensionClient, onChange: handleIsPensionClient })) : null, 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", value: isInsurance, onChange: handleIsInsurance })) : null] }));
|
|
1821
1748
|
|
|
1822
1749
|
const REMOTE_REGISTRATION = 'remote';
|
|
1823
1750
|
const OFFICE_REGISTRATION = 'office';
|
|
@@ -2013,22 +1940,16 @@
|
|
|
2013
1940
|
};
|
|
2014
1941
|
const replaceCommaToDot = (val) => String(val.replace(',', '.').replace(/[^.\d]/g, ''));
|
|
2015
1942
|
|
|
2016
|
-
const CurrencyInput = JSX(({ className = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1943
|
+
const CurrencyInput = JSX(({ className = '', value = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
2017
1944
|
const handleChange = useCallback((inputValue) => {
|
|
2018
|
-
if (!onChange) {
|
|
2019
|
-
return;
|
|
2020
|
-
}
|
|
2021
1945
|
const adjustedVal = adjustValue(inputValue);
|
|
2022
1946
|
const clampVal = getClampValue(adjustedVal, clamp(Number(adjustedVal), minValue, maxValue));
|
|
2023
|
-
onChange(
|
|
1947
|
+
onChange && onChange(clampVal);
|
|
2024
1948
|
}, [onChange]);
|
|
2025
|
-
const handleBlur = useCallback((
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
onChange(localNumberFormat(inputValue));
|
|
2030
|
-
}, [onChange]);
|
|
2031
|
-
return (jsx(Input, { className: className, inputClassName: "w-full", onChange: handleChange, onBlur: handleBlur, ...inputProps, children: jsx("span", { className: "text-xl-light absolute right-4 bottom-4", children: "\u20BD" }) }));
|
|
1949
|
+
const handleBlur = useCallback(() => {
|
|
1950
|
+
onChange && onChange(localNumberFormat(value));
|
|
1951
|
+
}, [onChange, value]);
|
|
1952
|
+
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
1953
|
});
|
|
2033
1954
|
const getClampValue = (val, clampVal) => Number(val) === clampVal ? val : String(clampVal);
|
|
2034
1955
|
|
|
@@ -2045,7 +1966,7 @@
|
|
|
2045
1966
|
? getDisabledButtonClasses({ version: button?.version })
|
|
2046
1967
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
2047
1968
|
const link = useLink();
|
|
2048
|
-
return (jsxs(BlockWrapper, { className: `p-
|
|
1969
|
+
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
1970
|
});
|
|
2050
1971
|
|
|
2051
1972
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
@@ -2265,7 +2186,7 @@
|
|
|
2265
2186
|
}, [scrollRight, onScrollRight, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
|
|
2266
2187
|
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
2188
|
});
|
|
2268
|
-
const renderBlur = (isBlur, scroll) =>
|
|
2189
|
+
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
2190
|
|
|
2270
2191
|
const ITEMS_GAP = 4;
|
|
2271
2192
|
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, isAlignCenter = false, ...rest }) => {
|
|
@@ -2303,7 +2224,7 @@
|
|
|
2303
2224
|
'CarouselInvestmentCard',
|
|
2304
2225
|
'CarouselEventCard',
|
|
2305
2226
|
];
|
|
2306
|
-
const getPaddingStyle = (isPadding) => (isPadding ? 'p-
|
|
2227
|
+
const getPaddingStyle = (isPadding) => (isPadding ? 'p-default' : '');
|
|
2307
2228
|
const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
|
|
2308
2229
|
const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
|
|
2309
2230
|
|
|
@@ -2362,8 +2283,8 @@
|
|
|
2362
2283
|
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: `border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${className}`, ...rest, children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Paragraph, { size: "text-m", align: "text-left", font: "font-light", children: description }) })) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, renderButtonsSection([button], { buttonClassName: 'mt-5 w-full' })] })));
|
|
2363
2284
|
const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
2364
2285
|
|
|
2365
|
-
const LinkWrapper = JSX(({ className = '', href, target, children }) => {
|
|
2366
|
-
const link = useLink();
|
|
2286
|
+
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
2287
|
+
const link = useLink({ isRemote });
|
|
2367
2288
|
const linkProps = link({ href, target });
|
|
2368
2289
|
const Tag = href ? 'a' : 'div';
|
|
2369
2290
|
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
|
|
@@ -2407,7 +2328,7 @@
|
|
|
2407
2328
|
|
|
2408
2329
|
const MAX_LINKS_COUNT = 10;
|
|
2409
2330
|
const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, ...rest }) => {
|
|
2410
|
-
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(Headline, { className: "pt-6", isPadding: false, description:
|
|
2331
|
+
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(Headline, { className: "pt-6", isPadding: false, description: additionalDescription, align: "text-left" })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
2411
2332
|
});
|
|
2412
2333
|
const renderLinks = (links) => {
|
|
2413
2334
|
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
@@ -2437,8 +2358,8 @@
|
|
|
2437
2358
|
|
|
2438
2359
|
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
2360
|
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
|
|
2361
|
+
className: style('p-6 pt-0', isFullWidth ? '' : 'self-center min-w-[158px]'),
|
|
2362
|
+
isVertical: isFullWidth,
|
|
2442
2363
|
})] }));
|
|
2443
2364
|
});
|
|
2444
2365
|
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 +2369,9 @@
|
|
|
2448
2369
|
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
2370
|
|
|
2450
2371
|
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$
|
|
2372
|
+
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
2373
|
});
|
|
2453
|
-
const renderList$
|
|
2374
|
+
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
2375
|
|
|
2455
2376
|
const ICONS_MAP = [
|
|
2456
2377
|
{
|
|
@@ -2512,7 +2433,7 @@
|
|
|
2512
2433
|
return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
|
|
2513
2434
|
});
|
|
2514
2435
|
|
|
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 }) })));
|
|
2436
|
+
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
2437
|
|
|
2517
2438
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2518
2439
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
@@ -2621,7 +2542,7 @@
|
|
|
2621
2542
|
});
|
|
2622
2543
|
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
2544
|
|
|
2624
|
-
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `flex p-
|
|
2545
|
+
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
2546
|
const renderBlocks = (info) => (jsx("div", { className: "flex grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index })) }));
|
|
2626
2547
|
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
2548
|
|
|
@@ -2854,23 +2775,6 @@
|
|
|
2854
2775
|
return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
|
|
2855
2776
|
};
|
|
2856
2777
|
|
|
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
2778
|
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
|
|
2875
2779
|
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
2780
|
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
@@ -2922,25 +2826,26 @@
|
|
|
2922
2826
|
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
2827
|
});
|
|
2924
2828
|
|
|
2925
|
-
const renderFormItem = (filtrationSchema,
|
|
2829
|
+
const renderFormItem = (filtrationSchema, field) => (key) => {
|
|
2926
2830
|
const item = filtrationSchema[key];
|
|
2927
2831
|
const type = item?.type;
|
|
2928
2832
|
switch (type) {
|
|
2929
2833
|
case 'array':
|
|
2930
|
-
return renderCheckboxes(key,
|
|
2834
|
+
return renderCheckboxes(key, field)(item);
|
|
2931
2835
|
default:
|
|
2932
2836
|
return null;
|
|
2933
2837
|
}
|
|
2934
2838
|
};
|
|
2935
|
-
const renderCheckboxes = (key,
|
|
2839
|
+
const renderCheckboxes = (key, field) => (item) => {
|
|
2936
2840
|
const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
2937
2841
|
[];
|
|
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, ...
|
|
2842
|
+
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
2843
|
};
|
|
2940
2844
|
|
|
2845
|
+
const initialFiltrationState = {};
|
|
2941
2846
|
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,
|
|
2847
|
+
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
2848
|
+
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
2849
|
});
|
|
2945
2850
|
Filtration.childrenTypes = ['ProductTile'];
|
|
2946
2851
|
Filtration.childSchema = (content) => content?.filtrationSchema || {};
|
|
@@ -2971,15 +2876,15 @@
|
|
|
2971
2876
|
'bg-white': 'text-primary-text',
|
|
2972
2877
|
transparent: 'text-white',
|
|
2973
2878
|
};
|
|
2974
|
-
const renderTitle$
|
|
2879
|
+
const renderTitle$2 = (title, bgColor, className) => {
|
|
2975
2880
|
return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
|
|
2976
2881
|
};
|
|
2977
2882
|
|
|
2978
2883
|
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$
|
|
2884
|
+
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
2885
|
});
|
|
2981
2886
|
|
|
2982
|
-
const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('
|
|
2887
|
+
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" }) })));
|
|
2983
2888
|
|
|
2984
2889
|
function assertUnreachable(x) {
|
|
2985
2890
|
throw new Error(x);
|
|
@@ -3163,19 +3068,11 @@
|
|
|
3163
3068
|
globalThis.document?.removeEventListener('keydown', handleEscape);
|
|
3164
3069
|
};
|
|
3165
3070
|
}, [onClose]);
|
|
3166
|
-
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-
|
|
3071
|
+
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
3072
|
});
|
|
3168
3073
|
|
|
3169
|
-
function
|
|
3170
|
-
const [
|
|
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
|
-
function useDialogProps(id) {
|
|
3178
|
-
const [isOpened, { setTrue: open, setFalse: close }] = useBool();
|
|
3074
|
+
function useDialogProps(id, initOpen = false) {
|
|
3075
|
+
const [isOpened, { setTrue: open, setFalse: close }] = useBool(initOpen);
|
|
3179
3076
|
const [params, setParams] = useState({ id });
|
|
3180
3077
|
const wasOpened = useRef(isOpened);
|
|
3181
3078
|
wasOpened.current ||= isOpened;
|
|
@@ -3315,7 +3212,7 @@
|
|
|
3315
3212
|
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
3213
|
});
|
|
3317
3214
|
|
|
3318
|
-
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
3215
|
+
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
3216
|
const renderCalendar = (calendar) => {
|
|
3320
3217
|
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
3321
3218
|
const colSize = 100 / colCount;
|
|
@@ -3607,7 +3504,7 @@
|
|
|
3607
3504
|
'': '',
|
|
3608
3505
|
};
|
|
3609
3506
|
|
|
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-
|
|
3507
|
+
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
3508
|
HorizontalLayout.childrenTypes = {
|
|
3612
3509
|
exclude: ['HorizontalLayout'],
|
|
3613
3510
|
};
|
|
@@ -3756,7 +3653,7 @@
|
|
|
3756
3653
|
double: 'flex-wrap',
|
|
3757
3654
|
single: 'flex-col',
|
|
3758
3655
|
};
|
|
3759
|
-
const LinkDocs = JSX(({ className = '', title, description, align = 'text-center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: style('p-
|
|
3656
|
+
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
3657
|
|
|
3761
3658
|
const getColSpan = (className) => {
|
|
3762
3659
|
const colSpanPrefix = 'col-span-';
|
|
@@ -3779,12 +3676,12 @@
|
|
|
3779
3676
|
|
|
3780
3677
|
const MobileAppTile = JSX(({ className = '', title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, headingType = 'h4', alignTitle = 'left', description, ...rest }) => {
|
|
3781
3678
|
const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
|
|
3782
|
-
return (jsxs(BlockWrapper, { className: `flex justify-between p-
|
|
3679
|
+
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
3680
|
className: 'mt-8',
|
|
3784
3681
|
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] }));
|
|
3682
|
+
}), 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
3683
|
});
|
|
3787
|
-
const renderList = (items) => {
|
|
3684
|
+
const renderList$1 = (items) => {
|
|
3788
3685
|
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
3686
|
};
|
|
3790
3687
|
const renderDescription$2 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
|
|
@@ -4272,7 +4169,7 @@
|
|
|
4272
4169
|
const ProductBlock = JSX((props) => {
|
|
4273
4170
|
const { className = '', breadcrumbs, backwardButton, version = 'primary', ...rest } = props;
|
|
4274
4171
|
const buttonVersion = version === 'primary' ? version : 'white';
|
|
4275
|
-
return (jsxs(BlockWrapper, { className: style('overflow-hidden p-
|
|
4172
|
+
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
4173
|
});
|
|
4277
4174
|
|
|
4278
4175
|
const ProductGallery = JSX(({ className = '', slides = [], ...rest }) => {
|
|
@@ -4664,9 +4561,9 @@
|
|
|
4664
4561
|
const count = tab.ref && page?.blocks
|
|
4665
4562
|
? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
4666
4563
|
: 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$
|
|
4564
|
+
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
4565
|
};
|
|
4669
|
-
const renderTitle$
|
|
4566
|
+
const renderTitle$1 = (title, active, isScrollable) => {
|
|
4670
4567
|
const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
|
|
4671
4568
|
const titleClassName = isScrollable
|
|
4672
4569
|
? `${TEXT_CLASSES} ${activeClassName}`
|
|
@@ -4906,9 +4803,9 @@
|
|
|
4906
4803
|
});
|
|
4907
4804
|
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
|
|
4908
4805
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
4909
|
-
return (jsxs(BlockWrapper, { className: `p-
|
|
4806
|
+
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
4807
|
});
|
|
4911
|
-
function renderTitle
|
|
4808
|
+
function renderTitle({ title, description }) {
|
|
4912
4809
|
return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
|
|
4913
4810
|
}
|
|
4914
4811
|
function renderDescription$1(description) {
|
|
@@ -4923,13 +4820,16 @@
|
|
|
4923
4820
|
})] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
4924
4821
|
});
|
|
4925
4822
|
|
|
4926
|
-
const TextBlock = JSX(({ className = '', title, description, iconVersion, image, __html, ...rest }) => {
|
|
4927
|
-
return (jsxs(BlockWrapper, { className:
|
|
4823
|
+
const TextBlock = JSX(({ className = '', title, description, iconVersion, image, __html, items = [], ...rest }) => {
|
|
4824
|
+
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
4825
|
});
|
|
4929
4826
|
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 }));
|
|
4827
|
+
const renderImage = (image) => image?.src ? jsx(ImgInner, { className: "h-fit", image: image }) : null;
|
|
4932
4828
|
const renderDescription = (description) => (jsx(Paragraph, { size: "text-s", color: "text-secondary-text group-data-secondary:text-white", children: description }));
|
|
4829
|
+
const renderList = (items, bullets) => {
|
|
4830
|
+
const listStyle = bullets ? 'list-disc pl-6' : '';
|
|
4831
|
+
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}`))) }));
|
|
4832
|
+
};
|
|
4933
4833
|
|
|
4934
4834
|
const Tags = JSX((props) => {
|
|
4935
4835
|
const { tags, className = '' } = props;
|
|
@@ -4950,7 +4850,7 @@
|
|
|
4950
4850
|
};
|
|
4951
4851
|
const VerticalLayout = JSX(({ className = '', gap = '', align = 'stretch', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => {
|
|
4952
4852
|
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
4953
|
-
return (jsx(BlockWrapper, { className: style('relative', 'flex flex-col [&>*]:max-w-full', isPadding ? 'p-
|
|
4853
|
+
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
4854
|
...rest,
|
|
4955
4855
|
renderProps: (block, options) => renderBlock$1(block, options, { className: innerPaddingStyle }),
|
|
4956
4856
|
}) }));
|
|
@@ -5089,6 +4989,18 @@
|
|
|
5089
4989
|
}, [scrollTarget]);
|
|
5090
4990
|
}
|
|
5091
4991
|
|
|
4992
|
+
const COOKIE_DIALOG_ID = 'cookie';
|
|
4993
|
+
const LOCAL_STORAGE_NAME = 'cookieClose';
|
|
4994
|
+
const CookiePopup = JSX(({ termLink, personalDataPolicyLink }) => {
|
|
4995
|
+
const { isOpened, onClose } = useDialogProps(COOKIE_DIALOG_ID, !globalThis.localStorage?.getItem(LOCAL_STORAGE_NAME));
|
|
4996
|
+
const handleClose = useCallback(() => {
|
|
4997
|
+
globalThis.localStorage?.setItem(LOCAL_STORAGE_NAME, 'true');
|
|
4998
|
+
onClose && onClose();
|
|
4999
|
+
}, [onClose]);
|
|
5000
|
+
return isOpened ? (jsx("div", { className: "container z-40 fixed bottom-0 left-0 right-0 pointer-events-none", children: jsxs("div", { className: "bg-white m-6 p-6 rounded-md flex items-center pointer-events-auto shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx("div", { className: "flex-1", children: jsxs(Paragraph, { size: "text-s-light", color: "text-primary-text", children: ["\u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442", jsx(LinkWrapper, { isRemote: true, className: style(getStyleLinkWrapper(termLink?.href)), ...termLink, children: "cookie" }), "(\u0444\u0430\u0439\u043B\u044B \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u043E \u043F\u0440\u043E\u0448\u043B\u044B\u0445 \u043F\u043E\u0441\u0435\u0449\u0435\u043D\u0438\u044F\u0445 \u0441\u0430\u0439\u0442\u0430) \u0434\u043B\u044F \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043E\u0432 \u0438 \u0443\u0434\u043E\u0431\u0441\u0442\u0432\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u043F\u0440\u0435\u0442\u0438\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 cookie \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u0432\u043E\u0435\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.", jsx(LinkWrapper, { isRemote: true, className: style(getStyleLinkWrapper(personalDataPolicyLink?.href)), ...personalDataPolicyLink, children: "\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u0412\u0430\u0448\u0438\u0445 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" }), "\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C\u0438 \u0424\u0435\u0434\u0435\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u0430\u043A\u043E\u043D\u0430 \u043E\u0442 27.07.2006 \u2116 152-\u04243 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB."] }) }), jsx("div", { className: "w-24 flex justify-end", children: jsx(CloseButton, { className: "bg-main-gray rounded-md", onClick: handleClose }) })] }) })) : null;
|
|
5001
|
+
});
|
|
5002
|
+
const getStyleLinkWrapper = (href) => ['inline mx-1', href ? 'text-green-dark' : ''];
|
|
5003
|
+
|
|
5092
5004
|
const api = LikeAPI();
|
|
5093
5005
|
function useLikeService(pagePath) {
|
|
5094
5006
|
const [likeCount, setLikeCount] = useState(0);
|
|
@@ -5154,7 +5066,7 @@
|
|
|
5154
5066
|
...options,
|
|
5155
5067
|
slotName: 'footer',
|
|
5156
5068
|
})
|
|
5157
|
-
: null] }), likeControl ? renderLikeControl() : null] }));
|
|
5069
|
+
: null] }), likeControl ? renderLikeControl() : null, jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
|
|
5158
5070
|
});
|
|
5159
5071
|
ContentPage.childrenTypes = [];
|
|
5160
5072
|
ContentPage.slots = () => ['header', 'footer'];
|
|
@@ -5162,7 +5074,7 @@
|
|
|
5162
5074
|
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" }) }));
|
|
5163
5075
|
}
|
|
5164
5076
|
|
|
5165
|
-
const packageVersion = "0.10.
|
|
5077
|
+
const packageVersion = "0.10.6";
|
|
5166
5078
|
|
|
5167
5079
|
exports.Blocks = Blocks;
|
|
5168
5080
|
exports.ContentPage = ContentPage;
|