@redneckz/wildless-cms-uni-blocks 0.14.154 → 0.14.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/api/LeadServiceAPI.d.ts +10 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +131 -220
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/AddressBranchField.d.ts +2 -1
- package/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
- package/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
- package/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
- package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
- package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
- package/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
- package/bundle/components/ApplicationForm/DatePickerControl.d.ts +1 -0
- package/bundle/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
- package/bundle/components/ApplicationForm/SelectControl.d.ts +2 -0
- package/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
- package/bundle/hooks/useForm.d.ts +4 -1
- package/bundle/hooks/usePremiumBranchesByRegions.d.ts +1 -0
- package/bundle/ui-kit/Input/InputProps.d.ts +1 -0
- package/dist/api/LeadServiceAPI.d.ts +10 -1
- package/dist/api/LeadServiceAPI.js +23 -1
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/ApplicationForm/AddressBranchField.d.ts +2 -1
- package/dist/components/ApplicationForm/AddressBranchField.js +7 -4
- package/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +3 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
- package/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
- package/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +10 -21
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +6 -14
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
- package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
- package/dist/components/ApplicationForm/ApplicationFormWed.js +12 -20
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/DatePickerControl.d.ts +1 -0
- package/dist/components/ApplicationForm/DatePickerControl.js +1 -1
- package/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/dist/components/ApplicationForm/InputControl.js +1 -1
- package/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/dist/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
- package/dist/components/ApplicationForm/RegionPremiumField.js +17 -0
- package/dist/components/ApplicationForm/RegionPremiumField.js.map +1 -0
- package/dist/components/ApplicationForm/SelectControl.d.ts +2 -0
- package/dist/components/ApplicationForm/SelectControl.js +1 -1
- package/dist/components/ApplicationForm/SelectControl.js.map +1 -1
- package/dist/components/ApplicationForm/handleSubmit.js +3 -51
- package/dist/components/ApplicationForm/handleSubmit.js.map +1 -1
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
- package/dist/components/ApplicationForm/renderWedDataOrganization.js +3 -3
- package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/dist/hooks/useForm.d.ts +4 -1
- package/dist/hooks/useForm.js +2 -2
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/hooks/usePremiumBranchesByRegions.d.ts +1 -0
- package/dist/hooks/usePremiumBranchesByRegions.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +1 -0
- package/dist/utils/formatPhone.js +1 -1
- package/dist/utils/formatPhone.js.map +1 -1
- package/lib/api/LeadServiceAPI.d.ts +10 -1
- package/lib/api/LeadServiceAPI.js +23 -1
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/AddressBranchField.d.ts +2 -1
- package/lib/components/ApplicationForm/AddressBranchField.js +7 -4
- package/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +3 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
- package/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
- package/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +10 -21
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +7 -15
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
- package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
- package/lib/components/ApplicationForm/ApplicationFormWed.js +12 -20
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/DatePickerControl.d.ts +1 -0
- package/lib/components/ApplicationForm/DatePickerControl.js +1 -1
- package/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/lib/components/ApplicationForm/InputControl.js +1 -1
- package/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/lib/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
- package/lib/components/ApplicationForm/RegionPremiumField.js +15 -0
- package/lib/components/ApplicationForm/RegionPremiumField.js.map +1 -0
- package/lib/components/ApplicationForm/SelectControl.d.ts +2 -0
- package/lib/components/ApplicationForm/SelectControl.js +1 -1
- package/lib/components/ApplicationForm/SelectControl.js.map +1 -1
- package/lib/components/ApplicationForm/handleSubmit.js +3 -51
- package/lib/components/ApplicationForm/handleSubmit.js.map +1 -1
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
- package/lib/components/ApplicationForm/renderWedDataOrganization.js +3 -3
- package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/lib/hooks/useForm.d.ts +4 -1
- package/lib/hooks/useForm.js +2 -2
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/usePremiumBranchesByRegions.d.ts +1 -0
- package/lib/hooks/usePremiumBranchesByRegions.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +1 -0
- package/lib/utils/formatPhone.js +1 -1
- package/lib/utils/formatPhone.js.map +1 -1
- package/mobile/bundle/api/LeadServiceAPI.d.ts +10 -1
- package/mobile/bundle/bundle.umd.js +131 -220
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/AddressBranchField.d.ts +2 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
- package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
- package/mobile/bundle/components/ApplicationForm/DatePickerControl.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
- package/mobile/bundle/components/ApplicationForm/SelectControl.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
- package/mobile/bundle/hooks/useForm.d.ts +4 -1
- package/mobile/bundle/hooks/usePremiumBranchesByRegions.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +1 -0
- package/mobile/dist/api/LeadServiceAPI.d.ts +10 -1
- package/mobile/dist/api/LeadServiceAPI.js +23 -1
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/AddressBranchField.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/AddressBranchField.js +7 -4
- package/mobile/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +3 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
- package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +10 -21
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +6 -14
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
- package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +12 -20
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/DatePickerControl.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/InputControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
- package/mobile/dist/components/ApplicationForm/RegionPremiumField.js +17 -0
- package/mobile/dist/components/ApplicationForm/RegionPremiumField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/SelectControl.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/SelectControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/handleSubmit.js +3 -51
- package/mobile/dist/components/ApplicationForm/handleSubmit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +3 -3
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/dist/hooks/useForm.d.ts +4 -1
- package/mobile/dist/hooks/useForm.js +2 -2
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/hooks/usePremiumBranchesByRegions.d.ts +1 -0
- package/mobile/dist/hooks/usePremiumBranchesByRegions.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +1 -0
- package/mobile/dist/utils/formatPhone.js +1 -1
- package/mobile/dist/utils/formatPhone.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.d.ts +10 -1
- package/mobile/lib/api/LeadServiceAPI.js +23 -1
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/AddressBranchField.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/AddressBranchField.js +7 -4
- package/mobile/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +3 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +6 -11
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +3 -11
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +10 -16
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +0 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js +4 -12
- package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +3 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +10 -21
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +6 -9
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +7 -7
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +7 -15
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +5 -15
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +6 -27
- package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.d.ts +6 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +12 -20
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/DatePickerControl.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/InputControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/RegionPremiumField.d.ts +6 -0
- package/mobile/lib/components/ApplicationForm/RegionPremiumField.js +15 -0
- package/mobile/lib/components/ApplicationForm/RegionPremiumField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/SelectControl.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/SelectControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/handleSubmit.js +3 -51
- package/mobile/lib/components/ApplicationForm/handleSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.d.ts +1 -4
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +3 -3
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/lib/hooks/useForm.d.ts +4 -1
- package/mobile/lib/hooks/useForm.js +2 -2
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/hooks/usePremiumBranchesByRegions.d.ts +1 -0
- package/mobile/lib/hooks/usePremiumBranchesByRegions.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +1 -0
- package/mobile/lib/utils/formatPhone.js +1 -1
- package/mobile/lib/utils/formatPhone.js.map +1 -1
- package/mobile/src/api/LeadServiceAPI.ts +50 -3
- package/mobile/src/components/ApplicationForm/AddressBranchField.tsx +21 -15
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +7 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +12 -12
- package/mobile/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +6 -15
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +24 -18
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +0 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormCorruption.tsx +8 -20
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +13 -29
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +8 -10
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +20 -22
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +7 -17
- package/mobile/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +9 -23
- package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +12 -49
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +25 -27
- package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +3 -2
- package/mobile/src/components/ApplicationForm/InputControl.tsx +3 -3
- package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
- package/mobile/src/components/ApplicationForm/RegionPremiumField.tsx +28 -0
- package/mobile/src/components/ApplicationForm/SelectControl.tsx +10 -6
- package/mobile/src/components/ApplicationForm/handleSubmit.tsx +3 -52
- package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +4 -4
- package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +4 -2
- package/mobile/src/components/ApplicationForm/renderUserData.tsx +3 -3
- package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +4 -20
- package/mobile/src/hooks/useForm.ts +3 -2
- package/mobile/src/hooks/usePremiumBranchesByRegions.ts +1 -0
- package/mobile/src/ui-kit/Input/InputProps.ts +1 -0
- package/mobile/src/utils/formatPhone.ts +1 -1
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +50 -3
- package/src/components/ApplicationForm/AddressBranchField.tsx +21 -15
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationForm.tsx +7 -1
- package/src/components/ApplicationForm/ApplicationForm.ui.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +12 -12
- package/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +6 -15
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +24 -18
- package/src/components/ApplicationForm/ApplicationFormContent.ts +0 -1
- package/src/components/ApplicationForm/ApplicationFormCorruption.tsx +8 -20
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +13 -29
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +8 -10
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +20 -22
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +7 -17
- package/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +9 -23
- package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +12 -49
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +25 -27
- package/src/components/ApplicationForm/DatePickerControl.tsx +3 -2
- package/src/components/ApplicationForm/InputControl.tsx +3 -3
- package/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
- package/src/components/ApplicationForm/RegionPremiumField.tsx +28 -0
- package/src/components/ApplicationForm/SelectControl.tsx +10 -6
- package/src/components/ApplicationForm/handleSubmit.tsx +3 -52
- package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +4 -4
- package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +4 -2
- package/src/components/ApplicationForm/renderUserData.tsx +3 -3
- package/src/components/ApplicationForm/renderWedDataOrganization.tsx +4 -20
- package/src/hooks/useForm.ts +3 -2
- package/src/hooks/usePremiumBranchesByRegions.ts +1 -0
- package/src/ui-kit/Input/InputProps.ts +1 -0
- package/src/utils/formatPhone.ts +1 -1
- package/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
- package/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
- package/bundle/components/ApplicationForm/renderTextarea.d.ts +0 -11
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -11
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
- package/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
- package/dist/components/ApplicationForm/renderSlideCheckboxes.js +0 -7
- package/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
- package/dist/components/ApplicationForm/renderTextarea.d.ts +0 -11
- package/dist/components/ApplicationForm/renderTextarea.js +0 -10
- package/dist/components/ApplicationForm/renderTextarea.js.map +0 -1
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -3
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -8
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
- package/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -3
- package/lib/components/ApplicationForm/renderSlideCheckboxes.js +0 -4
- package/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
- package/lib/components/ApplicationForm/renderTextarea.d.ts +0 -10
- package/lib/components/ApplicationForm/renderTextarea.js +0 -7
- package/lib/components/ApplicationForm/renderTextarea.js.map +0 -1
- package/mobile/bundle/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
- package/mobile/bundle/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
- package/mobile/bundle/components/ApplicationForm/renderTextarea.d.ts +0 -11
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -11
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
- package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js +0 -7
- package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.d.ts +0 -11
- package/mobile/dist/components/ApplicationForm/renderTextarea.js +0 -10
- package/mobile/dist/components/ApplicationForm/renderTextarea.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.d.ts +0 -4
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +0 -8
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.d.ts +0 -4
- package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js +0 -4
- package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.d.ts +0 -11
- package/mobile/lib/components/ApplicationForm/renderTextarea.js +0 -7
- package/mobile/lib/components/ApplicationForm/renderTextarea.js.map +0 -1
- package/mobile/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +0 -22
- package/mobile/src/components/ApplicationForm/renderSlideCheckboxes.tsx +0 -10
- package/mobile/src/components/ApplicationForm/renderTextarea.tsx +0 -42
- package/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +0 -22
- package/src/components/ApplicationForm/renderSlideCheckboxes.tsx +0 -10
- package/src/components/ApplicationForm/renderTextarea.tsx +0 -42
package/bundle/bundle.umd.js
CHANGED
|
@@ -928,15 +928,35 @@
|
|
|
928
928
|
return content ? (jsx(ClientOnly, { children: jsx(ProductBlock, { ...content, ...props }) })) : null;
|
|
929
929
|
});
|
|
930
930
|
|
|
931
|
+
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
932
|
+
|
|
931
933
|
function LeadServiceAPI() {
|
|
934
|
+
// eslint-disable-next-line complexity
|
|
932
935
|
async function send(body, isIndividualType = false) {
|
|
933
936
|
const url = isIndividualType ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
|
|
937
|
+
const { typeForm, region, phone = '', email, birthday, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, ...staticBody } = body;
|
|
938
|
+
const submitBody = {
|
|
939
|
+
typeForm,
|
|
940
|
+
[isIndividualType ? 'regionBranch' : 'region']: region,
|
|
941
|
+
[isIndividualType ? 'phoneNumber' : 'phone']: formatPhone(phone),
|
|
942
|
+
[isIndividualType ? 'email' : 'mail']: email,
|
|
943
|
+
...(isIndividualType ? { birthday } : { inn, fullName }),
|
|
944
|
+
...(typeForm === 'FEEDBACK'
|
|
945
|
+
? {}
|
|
946
|
+
: {
|
|
947
|
+
addressBranch,
|
|
948
|
+
bankEmpolee,
|
|
949
|
+
applicationDate,
|
|
950
|
+
...getSecondaryPhone(secondaryPhone),
|
|
951
|
+
}),
|
|
952
|
+
...staticBody,
|
|
953
|
+
};
|
|
934
954
|
try {
|
|
935
955
|
const response = await fetch(url, {
|
|
936
956
|
method: 'POST',
|
|
937
957
|
headers: { 'Content-Type': 'application/json' },
|
|
938
958
|
mode: 'cors',
|
|
939
|
-
body: JSON.stringify(
|
|
959
|
+
body: JSON.stringify(submitBody),
|
|
940
960
|
});
|
|
941
961
|
if (!response?.ok) {
|
|
942
962
|
return null;
|
|
@@ -952,10 +972,13 @@
|
|
|
952
972
|
send,
|
|
953
973
|
};
|
|
954
974
|
}
|
|
975
|
+
const getSecondaryPhone = (secondaryPhone) => !secondaryPhone || secondaryPhone === '+7 ('
|
|
976
|
+
? {}
|
|
977
|
+
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
955
978
|
|
|
956
979
|
const identity = (_) => _;
|
|
957
980
|
|
|
958
|
-
const useForm = (initialState, onSubmit) => {
|
|
981
|
+
const useForm = (initialState, { resetOnSubmit, onSubmit } = {}) => {
|
|
959
982
|
const [formState, setFormState] = useState(initialState);
|
|
960
983
|
const [isDirtyForm, setDirtyForm] = useState(false);
|
|
961
984
|
const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
|
|
@@ -986,7 +1009,7 @@
|
|
|
986
1009
|
}, [initialState]);
|
|
987
1010
|
const handleSubmit = useCallback((e) => {
|
|
988
1011
|
e.preventDefault();
|
|
989
|
-
setDirtyForm(true);
|
|
1012
|
+
resetOnSubmit ? reset() : setDirtyForm(true);
|
|
990
1013
|
onSubmit && onSubmit(formState);
|
|
991
1014
|
}, [onSubmit, formState]);
|
|
992
1015
|
return [
|
|
@@ -1001,7 +1024,7 @@
|
|
|
1001
1024
|
];
|
|
1002
1025
|
};
|
|
1003
1026
|
|
|
1004
|
-
const
|
|
1027
|
+
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-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s 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-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
|
|
1005
1028
|
|
|
1006
1029
|
const objectValidator = (validatorsMap) => (o) => (o &&
|
|
1007
1030
|
Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
|
|
@@ -1050,7 +1073,7 @@
|
|
|
1050
1073
|
|
|
1051
1074
|
const renderErrorText = (error) => (jsx("div", { className: "h-4", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1052
1075
|
|
|
1053
|
-
const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: placeholder }), renderErrorText(error)] })));
|
|
1076
|
+
const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
|
|
1054
1077
|
|
|
1055
1078
|
const isPlaceholder = (_) => _ === '_';
|
|
1056
1079
|
const isDigit = (_) => /\d/.test(_);
|
|
@@ -1071,7 +1094,7 @@
|
|
|
1071
1094
|
return (jsx(Input, { onChange: handleChange, onFocus: (event) => handleChange(event?.target?.value || ''), ...inputProps, children: children }));
|
|
1072
1095
|
});
|
|
1073
1096
|
|
|
1074
|
-
const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
|
|
1097
|
+
const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
|
|
1075
1098
|
|
|
1076
1099
|
const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
|
|
1077
1100
|
|
|
@@ -1084,7 +1107,7 @@
|
|
|
1084
1107
|
const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
|
|
1085
1108
|
const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
|
|
1086
1109
|
|
|
1087
|
-
const renderAcquiringDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438
|
|
1110
|
+
const renderAcquiringDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { 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, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
|
|
1088
1111
|
|
|
1089
1112
|
const ACQUIRING_TYPES = [
|
|
1090
1113
|
{
|
|
@@ -1213,7 +1236,7 @@
|
|
|
1213
1236
|
const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
|
|
1214
1237
|
const getBorderStyle$1 = (isBorder, valid) => style(isBorder ? 'border rounded-md hover:border-primary-hover' : '', valid ? ' border-gray' : 'border-error');
|
|
1215
1238
|
|
|
1216
|
-
const SelectControl = JSX(({ className = '', error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error }), renderErrorText(error)] })));
|
|
1239
|
+
const SelectControl = JSX(({ className = '', label, error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error, label: rest?.errors ? `${label}*` : label }), renderErrorText(error)] })));
|
|
1217
1240
|
|
|
1218
1241
|
const RegionField = JSX(({ field }) => {
|
|
1219
1242
|
const regions = useRegions();
|
|
@@ -1222,10 +1245,6 @@
|
|
|
1222
1245
|
|
|
1223
1246
|
const renderAcquiringRegion = ({ field, title }) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, 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, ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) })] }));
|
|
1224
1247
|
|
|
1225
|
-
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-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s 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-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
|
|
1226
|
-
|
|
1227
|
-
const renderSlideCheckboxes = (field) => (jsxs("div", { 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') })] }));
|
|
1228
|
-
|
|
1229
1248
|
function useButton() {
|
|
1230
1249
|
return (props) => ({
|
|
1231
1250
|
...props,
|
|
@@ -1259,6 +1278,7 @@
|
|
|
1259
1278
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
1260
1279
|
|
|
1261
1280
|
const initialFormState$a = {
|
|
1281
|
+
typeForm: { key: 'acqr', text: 'Предупреждение о мошенничестве' },
|
|
1262
1282
|
acquiringType: { key: 'trade', text: 'Торговый эквайринг' },
|
|
1263
1283
|
fullName: '',
|
|
1264
1284
|
inn: '',
|
|
@@ -1278,25 +1298,20 @@
|
|
|
1278
1298
|
const ApplicationFormAcquiring = JSX((props) => {
|
|
1279
1299
|
const { button, link, onSubmit } = props;
|
|
1280
1300
|
const handleSubmit = useCallback((formState) => {
|
|
1281
|
-
const { acquiringType,
|
|
1301
|
+
const { acquiringType, onlineCheckout, posTerminal, ...usedForm } = formState;
|
|
1282
1302
|
const isTradeAcquiring = getSlideCheckboxes(acquiringType?.key);
|
|
1283
1303
|
const partnerComments = `Вид эквайринга=${acquiringType?.text || ''}${isTradeAcquiring
|
|
1284
1304
|
? `/Онлайн касса=${onlineCheckout}/POS-терминал=${posTerminal}`
|
|
1285
1305
|
: '/Онлайн касса=false/POS-терминал=false'}`;
|
|
1286
1306
|
const submitData = {
|
|
1287
|
-
typeForm: 'acqr',
|
|
1288
|
-
region: region?.text || '',
|
|
1289
1307
|
partnerComments,
|
|
1290
|
-
|
|
1291
|
-
inn,
|
|
1292
|
-
name,
|
|
1293
|
-
phone: formatPhone(phone),
|
|
1308
|
+
...usedForm,
|
|
1294
1309
|
};
|
|
1295
1310
|
isValidationSuccess(acquiringValidator(formState)) && onSubmit(submitData, false);
|
|
1296
1311
|
}, [onSubmit]);
|
|
1297
|
-
const [, { field, ...formProps }] = useForm(initialFormState$a, handleSubmit);
|
|
1312
|
+
const [, { field, ...formProps }] = useForm(initialFormState$a, { onSubmit: handleSubmit });
|
|
1298
1313
|
const isSlideCheckboxes = getSlideCheckboxes(field('acquiringType').value?.key);
|
|
1299
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' }), renderAcquiringDataOrganization(field, 'Данные организации'), isSlideCheckboxes ?
|
|
1314
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' }), renderAcquiringDataOrganization(field, 'Данные организации'), isSlideCheckboxes ? (jsxs("div", { 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') })] })) : null, renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1300
1315
|
});
|
|
1301
1316
|
const getSlideCheckboxes = (type) => type === 'all' || type === 'trade';
|
|
1302
1317
|
|
|
@@ -1485,14 +1500,14 @@
|
|
|
1485
1500
|
});
|
|
1486
1501
|
const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: style(formStyle, valid ? 'border-gray' : 'border-error'), children: [jsx(Paragraph, { children: value && formatDate(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
|
|
1487
1502
|
|
|
1488
|
-
const DatePickerControl = JSX(({ className, label, value = undefined, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx(DatePicker, { value: value, onChange: onChange, valid: Boolean(!error) }), renderErrorText(error)] })));
|
|
1503
|
+
const DatePickerControl = JSX(({ className, label, value = undefined, error, onChange, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: rest?.errors ? `${label}*` : label }) })) : null, jsx(DatePicker, { value: value, onChange: onChange, valid: Boolean(!error) }), renderErrorText(error)] })));
|
|
1489
1504
|
|
|
1490
1505
|
const initialUserFormState = {
|
|
1491
1506
|
surname: '',
|
|
1492
1507
|
name: '',
|
|
1493
1508
|
middleName: '',
|
|
1494
1509
|
};
|
|
1495
|
-
const renderUserData = (field, isBirthday = true) => (jsxs("div", { className: "space-y-s", children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F
|
|
1510
|
+
const renderUserData = (field, isBirthday = true) => (jsxs("div", { className: "space-y-s", children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), isBirthday ? (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) })) : null] }));
|
|
1496
1511
|
|
|
1497
1512
|
const initialFormState$9 = {
|
|
1498
1513
|
...initialUserFormState,
|
|
@@ -1509,60 +1524,43 @@
|
|
|
1509
1524
|
name: nameValidator,
|
|
1510
1525
|
birthday: defaultValidator,
|
|
1511
1526
|
phone: phoneValidator,
|
|
1512
|
-
isClient: checkboxValidator,
|
|
1513
1527
|
comment: defaultValidator,
|
|
1514
1528
|
consentDataProcessing: checkboxValidator,
|
|
1515
1529
|
});
|
|
1516
1530
|
const ApplicationFormAntiFraud = JSX(({ button, link, onSubmit }) => {
|
|
1517
1531
|
const handleSubmit = useCallback((formState) => {
|
|
1518
|
-
|
|
1519
|
-
const submitData = {
|
|
1520
|
-
...usedFields,
|
|
1521
|
-
typeForm: typeForm.key,
|
|
1522
|
-
phone: formatPhone(phone),
|
|
1523
|
-
};
|
|
1524
|
-
isValidationSuccess(feedbackValidator$2(formState)) && onSubmit(submitData, true);
|
|
1532
|
+
isValidationSuccess(feedbackValidator$2(formState)) && onSubmit(formState, true);
|
|
1525
1533
|
}, [onSubmit]);
|
|
1526
|
-
const [, { field, ...formProps }] = useForm(initialFormState$9, handleSubmit);
|
|
1527
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, true), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D
|
|
1534
|
+
const [, { field, ...formProps }] = useForm(initialFormState$9, { onSubmit: handleSubmit });
|
|
1535
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, true), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' }), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1528
1536
|
});
|
|
1529
1537
|
|
|
1530
|
-
const renderBusinessCardDataOrganization = (field) => (jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
|
|
1531
|
-
|
|
1532
1538
|
const initialFormState$8 = {
|
|
1539
|
+
typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
|
|
1533
1540
|
name: '',
|
|
1534
1541
|
phone: '',
|
|
1535
1542
|
inn: '',
|
|
1536
|
-
|
|
1543
|
+
email: '',
|
|
1537
1544
|
};
|
|
1538
1545
|
const businessCardValidator = objectValidator({
|
|
1539
1546
|
region: defaultValidator,
|
|
1540
1547
|
name: nameValidator,
|
|
1541
1548
|
phone: phoneValidator,
|
|
1542
1549
|
inn: innValidator,
|
|
1543
|
-
|
|
1550
|
+
email: defaultValidator,
|
|
1544
1551
|
});
|
|
1545
1552
|
const ApplicationFormBusinessCard = JSX((props) => {
|
|
1546
1553
|
const { button, link, onSubmit } = props;
|
|
1547
1554
|
const handleSubmit = useCallback((formState) => {
|
|
1548
|
-
|
|
1549
|
-
isValidationSuccess(businessCardValidator(formState)) &&
|
|
1550
|
-
onSubmit({
|
|
1551
|
-
typeForm: 'bcrd',
|
|
1552
|
-
region: region?.text || '',
|
|
1553
|
-
name,
|
|
1554
|
-
inn,
|
|
1555
|
-
mail,
|
|
1556
|
-
phone: formatPhone(phone),
|
|
1557
|
-
});
|
|
1555
|
+
isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
|
|
1558
1556
|
}, [onSubmit]);
|
|
1559
|
-
const [, { field, ...formProps }] = useForm(initialFormState$8, handleSubmit);
|
|
1560
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }),
|
|
1557
|
+
const [, { field, ...formProps }] = useForm(initialFormState$8, { onSubmit: handleSubmit });
|
|
1558
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }), jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1561
1559
|
});
|
|
1562
1560
|
|
|
1563
1561
|
const initialFormState$7 = {
|
|
1564
|
-
...initialUserFormState,
|
|
1565
1562
|
typeForm: { key: 'CORRUPTION', text: 'Факты коррупции' },
|
|
1563
|
+
...initialUserFormState,
|
|
1566
1564
|
phone: '',
|
|
1567
1565
|
email: '',
|
|
1568
1566
|
comment: '',
|
|
@@ -1580,17 +1578,10 @@
|
|
|
1580
1578
|
});
|
|
1581
1579
|
const ApplicationFormCorruption = JSX(({ button, link, onSubmit }) => {
|
|
1582
1580
|
const handleSubmit = useCallback((formState) => {
|
|
1583
|
-
|
|
1584
|
-
const submitData = {
|
|
1585
|
-
...usedFields,
|
|
1586
|
-
typeForm: typeForm.key,
|
|
1587
|
-
regionBranch: region?.text,
|
|
1588
|
-
phone: formatPhone(phone),
|
|
1589
|
-
};
|
|
1590
|
-
isValidationSuccess(feedbackValidator$1(formState)) && onSubmit(submitData, true);
|
|
1581
|
+
isValidationSuccess(feedbackValidator$1(formState)) && onSubmit(formState, true);
|
|
1591
1582
|
}, [onSubmit]);
|
|
1592
|
-
const [, { field, ...formProps }] = useForm(initialFormState$7, handleSubmit);
|
|
1593
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, false), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D
|
|
1583
|
+
const [, { field, ...formProps }] = useForm(initialFormState$7, { onSubmit: handleSubmit });
|
|
1584
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, false), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1594
1585
|
});
|
|
1595
1586
|
|
|
1596
1587
|
const BRANCHES_URL = '/api/v1/branches';
|
|
@@ -1604,6 +1595,22 @@
|
|
|
1604
1595
|
return result || EMPTY_VALUE$3;
|
|
1605
1596
|
};
|
|
1606
1597
|
|
|
1598
|
+
const REGIONS_URL = '/api/v1/premiumBranchesByRegions';
|
|
1599
|
+
function usePremiumBranchesByRegions() {
|
|
1600
|
+
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
1601
|
+
return data || [];
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
const AddressBranchField = JSX(({ field, regionKey, isPremium = false }) => {
|
|
1605
|
+
const addressBranch = isPremium
|
|
1606
|
+
? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
|
|
1607
|
+
: useBranches(regionKey).filter((branch) => branch?.address);
|
|
1608
|
+
return (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: (addressBranch || []).map(({ address = '' }) => ({
|
|
1609
|
+
key: address,
|
|
1610
|
+
text: address,
|
|
1611
|
+
})), ...withValidator(field('addressBranch'), defaultValidator) }));
|
|
1612
|
+
});
|
|
1613
|
+
|
|
1607
1614
|
const MIN_CREDIT_AMOUNT = 1000;
|
|
1608
1615
|
const MAX_CREDIT_AMOUNT = 1000000000;
|
|
1609
1616
|
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
@@ -1611,7 +1618,7 @@
|
|
|
1611
1618
|
const MAX_CREDIT_TERM = 180;
|
|
1612
1619
|
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
1613
1620
|
|
|
1614
|
-
const renderCreditDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { 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, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('
|
|
1621
|
+
const renderCreditDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { 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, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }));
|
|
1615
1622
|
|
|
1616
1623
|
const useNormalizedInput = (props, { normalize, format }) => {
|
|
1617
1624
|
const { value, onFocus, onBlur, onChange } = props;
|
|
@@ -1674,13 +1681,14 @@
|
|
|
1674
1681
|
const renderCreditParameters = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') }) }), jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') }) })] }));
|
|
1675
1682
|
|
|
1676
1683
|
const initialFormState$6 = {
|
|
1684
|
+
typeForm: { key: 'cred', text: 'Кредит' },
|
|
1677
1685
|
amount: MIN_CREDIT_AMOUNT,
|
|
1678
1686
|
term: 12,
|
|
1679
1687
|
fullName: '',
|
|
1680
1688
|
inn: '',
|
|
1681
1689
|
name: '',
|
|
1682
1690
|
phone: '',
|
|
1683
|
-
|
|
1691
|
+
email: '',
|
|
1684
1692
|
annualRevenue: '',
|
|
1685
1693
|
};
|
|
1686
1694
|
const creditValidator$1 = objectValidator({
|
|
@@ -1690,33 +1698,25 @@
|
|
|
1690
1698
|
name: nameValidator,
|
|
1691
1699
|
phone: phoneValidator,
|
|
1692
1700
|
region: defaultValidator,
|
|
1693
|
-
department: defaultValidator,
|
|
1694
1701
|
});
|
|
1695
1702
|
const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
|
|
1696
1703
|
const handleSubmit = useCallback((formState) => {
|
|
1697
|
-
const { amount, term,
|
|
1704
|
+
const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
|
|
1698
1705
|
isValidationSuccess(creditValidator$1(formState)) &&
|
|
1699
1706
|
onSubmit({
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
inn,
|
|
1703
|
-
name,
|
|
1704
|
-
phone: formatPhone(phone),
|
|
1705
|
-
mail,
|
|
1706
|
-
region: region?.text || '',
|
|
1707
|
-
department: department?.text || '',
|
|
1707
|
+
...usedFields,
|
|
1708
|
+
addressBranch: addressBranch?.text || '',
|
|
1708
1709
|
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
1709
1710
|
});
|
|
1710
1711
|
}, [onSubmit]);
|
|
1711
|
-
const [formState, { field, ...formProps }] = useForm(initialFormState$6,
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
text: address,
|
|
1716
|
-
})), ...withValidator(field('department'), defaultValidator) }) })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1712
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$6, {
|
|
1713
|
+
onSubmit: handleSubmit,
|
|
1714
|
+
});
|
|
1715
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderCreditParameters(field, 'Параметры'), renderCreditDataOrganization(field, 'Данные организации'), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: formState.region?.key }) })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1717
1716
|
});
|
|
1718
1717
|
|
|
1719
1718
|
const initialFormState$5 = {
|
|
1719
|
+
typeForm: { key: 'dpst', text: 'Заявка на депозит' },
|
|
1720
1720
|
name: '',
|
|
1721
1721
|
phone: '',
|
|
1722
1722
|
};
|
|
@@ -1726,15 +1726,12 @@
|
|
|
1726
1726
|
});
|
|
1727
1727
|
const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
|
|
1728
1728
|
const handleSubmit = useCallback((formState) => {
|
|
1729
|
-
|
|
1730
|
-
isValidationSuccess(depositValidator(formState)) &&
|
|
1731
|
-
onSubmit({
|
|
1732
|
-
typeForm: 'dpst',
|
|
1733
|
-
name,
|
|
1734
|
-
phone: formatPhone(phone),
|
|
1735
|
-
});
|
|
1729
|
+
isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
|
|
1736
1730
|
}, [onSubmit]);
|
|
1737
|
-
const [, { field, ...formProps }] = useForm(initialFormState$5,
|
|
1731
|
+
const [, { field, ...formProps }] = useForm(initialFormState$5, {
|
|
1732
|
+
onSubmit: handleSubmit,
|
|
1733
|
+
resetOnSubmit: false,
|
|
1734
|
+
});
|
|
1738
1735
|
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { 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", children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderSubmitButton(button), jsx(Footnote, { link: link })] }) }) }));
|
|
1739
1736
|
});
|
|
1740
1737
|
|
|
@@ -1773,23 +1770,7 @@
|
|
|
1773
1770
|
...feedbackValidatorDefaultObject,
|
|
1774
1771
|
addressBranch: defaultValidator,
|
|
1775
1772
|
});
|
|
1776
|
-
|
|
1777
|
-
typeForm: formState.typeForm.key,
|
|
1778
|
-
regionBranch: formState?.region?.text,
|
|
1779
|
-
addressBranch: formState.addressBranch?.text || '',
|
|
1780
|
-
surname: formState.surname,
|
|
1781
|
-
name: formState.name,
|
|
1782
|
-
middleName: formState.middleName,
|
|
1783
|
-
feedbackMethod: formState.feedbackMethod.text,
|
|
1784
|
-
phoneNumber: formatPhone(formState.phone),
|
|
1785
|
-
secondaryPhoneNumber: formState.secondaryPhone?.replace(/[^+\d]/g, ''),
|
|
1786
|
-
email: formState.email,
|
|
1787
|
-
bankEmpolee: formState.bankEmpolee,
|
|
1788
|
-
applicationDate: formState.applicationDate,
|
|
1789
|
-
comment: formState.comment,
|
|
1790
|
-
consentDataProcessing: formState.consentDataProcessing,
|
|
1791
|
-
};
|
|
1792
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, true);
|
|
1773
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
|
|
1793
1774
|
};
|
|
1794
1775
|
const handleSubmitLegal = (formState, onSubmit) => {
|
|
1795
1776
|
const feedbackValidator = objectValidator({
|
|
@@ -1797,45 +1778,14 @@
|
|
|
1797
1778
|
addressBranch: defaultValidator,
|
|
1798
1779
|
inn: innValidator,
|
|
1799
1780
|
});
|
|
1800
|
-
|
|
1801
|
-
typeForm: formState.typeForm.key,
|
|
1802
|
-
region: formState.region?.text,
|
|
1803
|
-
addressBranch: formState.addressBranch?.text || '',
|
|
1804
|
-
surname: formState.surname,
|
|
1805
|
-
name: formState.name,
|
|
1806
|
-
middleName: formState.middleName,
|
|
1807
|
-
inn: formState.inn,
|
|
1808
|
-
fullName: formState.fullName,
|
|
1809
|
-
feedbackMethod: formState.feedbackMethod.text,
|
|
1810
|
-
phone: formatPhone(formState.phone),
|
|
1811
|
-
secondaryPhoneNumber: formState?.secondaryPhone,
|
|
1812
|
-
mail: formState.email,
|
|
1813
|
-
bankEmpolee: formState.bankEmpolee,
|
|
1814
|
-
applicationDate: formState.applicationDate,
|
|
1815
|
-
comment: formState.comment,
|
|
1816
|
-
consentDataProcessing: formState.consentDataProcessing,
|
|
1817
|
-
};
|
|
1818
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, false);
|
|
1781
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
|
|
1819
1782
|
};
|
|
1820
1783
|
const handleSubmitQuestion = (formState, onSubmit) => {
|
|
1821
1784
|
const feedbackValidator = objectValidator({
|
|
1822
1785
|
...feedbackValidatorDefaultObject,
|
|
1823
1786
|
birthday: defaultValidator,
|
|
1824
1787
|
});
|
|
1825
|
-
|
|
1826
|
-
typeForm: formState.typeForm.key,
|
|
1827
|
-
regionBranch: formState.region?.text,
|
|
1828
|
-
surname: formState.surname,
|
|
1829
|
-
name: formState.name,
|
|
1830
|
-
middleName: formState.middleName,
|
|
1831
|
-
birthday: formState.birthday,
|
|
1832
|
-
feedbackMethod: formState.feedbackMethod.text,
|
|
1833
|
-
phoneNumber: formatPhone(formState.phone),
|
|
1834
|
-
email: formState.email,
|
|
1835
|
-
comment: formState.comment,
|
|
1836
|
-
consentDataProcessing: formState.consentDataProcessing,
|
|
1837
|
-
};
|
|
1838
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, true);
|
|
1788
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
|
|
1839
1789
|
};
|
|
1840
1790
|
|
|
1841
1791
|
const initialFormState$4 = {
|
|
@@ -1862,14 +1812,14 @@
|
|
|
1862
1812
|
handleSubmitIndividual(feedbackFormState, onSubmit);
|
|
1863
1813
|
}
|
|
1864
1814
|
}, [onSubmit]);
|
|
1865
|
-
const [formState, { field, ...formProps }] = useForm(initialFormState$4,
|
|
1815
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$4, {
|
|
1816
|
+
onSubmit: handleSubmit,
|
|
1817
|
+
});
|
|
1866
1818
|
const isQualityService = field('typeForm').value?.key === 'FEEDBACK_QS';
|
|
1867
1819
|
const isLegalEntity = getLegalEntity(field('typeForm').value?.key, field('serviceDirection').value?.key);
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
text: address,
|
|
1872
|
-
})), ...withValidator(field('addressBranch'), defaultValidator) })) : null, renderUserData(field, true), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D*", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { 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') })] })) : null, jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430*", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), defaultValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D*", ...withValidator(field('phone'), phoneValidator) }), isQualityService ? (jsxs("div", { children: [jsx(PhoneInputControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...field('secondaryPhone') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430*", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') }), jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430*", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435*", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1820
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(field('typeForm'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), defaultValidator) })) : null, jsx(RegionField, { field: field }), isQualityService ? (jsx(AddressBranchField, { field: field, regionKey: formState?.region?.key })) : null, renderUserData(field, true), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { 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') })] })) : null, jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), defaultValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), isQualityService ? (jsxs("div", { children: [jsx(PhoneInputControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...(!field('secondaryPhone').value || field('secondaryPhone').value === '+7 ('
|
|
1821
|
+
? field('secondaryPhone')
|
|
1822
|
+
: withValidator(field('secondaryPhone'), phoneValidator)) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') }), jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1873
1823
|
});
|
|
1874
1824
|
const getLegalEntity = (typeFormKey = '', serviceDirectionKey = '') => typeFormKey === 'FEEDBACK_QS' && serviceDirectionKey === 'Юридическое лицо / ИП';
|
|
1875
1825
|
|
|
@@ -1898,33 +1848,26 @@
|
|
|
1898
1848
|
phone: phoneValidator,
|
|
1899
1849
|
email: defaultValidator,
|
|
1900
1850
|
birthday: defaultValidator,
|
|
1851
|
+
consentDataProcessing: checkboxValidator,
|
|
1901
1852
|
});
|
|
1902
1853
|
const ApplicationFormIndividuals = JSX((props) => {
|
|
1903
|
-
const { button, link, product, onSubmit } = props;
|
|
1854
|
+
const { button, link, product = '', onSubmit } = props;
|
|
1904
1855
|
const handleSubmit = useCallback((formState) => {
|
|
1905
|
-
const { surname, name, middleName, phone, email, birthday, consentDataProcessing } = formState;
|
|
1906
1856
|
isValidationSuccess(individualsValidator(formState)) &&
|
|
1907
1857
|
onSubmit({
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
name,
|
|
1911
|
-
middleName,
|
|
1912
|
-
email,
|
|
1913
|
-
consentDataProcessing,
|
|
1914
|
-
phoneNumber: formatPhone(phone),
|
|
1915
|
-
birthday: birthday?.toISOString().slice(0, 10) || '',
|
|
1916
|
-
product: product || '',
|
|
1858
|
+
...formState,
|
|
1859
|
+
product,
|
|
1917
1860
|
}, true);
|
|
1918
1861
|
}, [onSubmit]);
|
|
1919
|
-
const [, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
|
|
1920
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F
|
|
1862
|
+
const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
|
|
1863
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1921
1864
|
});
|
|
1922
1865
|
|
|
1923
1866
|
const initialFormState$2 = {
|
|
1924
|
-
...initialUserFormState,
|
|
1925
1867
|
typeForm: { key: 'SELFCOLLECTION', text: 'Самоинкассация' },
|
|
1926
1868
|
fullName: '',
|
|
1927
1869
|
phone: '',
|
|
1870
|
+
consentDataProcessing: false,
|
|
1928
1871
|
};
|
|
1929
1872
|
const feedbackValidator = objectValidator({
|
|
1930
1873
|
typeForm: defaultValidator,
|
|
@@ -1934,24 +1877,20 @@
|
|
|
1934
1877
|
});
|
|
1935
1878
|
const ApplicationFormSelfCollection = JSX(({ button, link, onSubmit }) => {
|
|
1936
1879
|
const handleSubmit = useCallback((formState) => {
|
|
1937
|
-
|
|
1938
|
-
const submitData = {
|
|
1939
|
-
typeForm: typeForm.key,
|
|
1940
|
-
region: region?.text,
|
|
1941
|
-
name: fullName,
|
|
1942
|
-
phone: formatPhone(phone),
|
|
1943
|
-
};
|
|
1944
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, true);
|
|
1880
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
|
|
1945
1881
|
}, [onSubmit]);
|
|
1946
|
-
const [, { field, ...formProps }] = useForm(initialFormState$2, handleSubmit);
|
|
1947
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E
|
|
1882
|
+
const [, { field, ...formProps }] = useForm(initialFormState$2, { onSubmit: handleSubmit });
|
|
1883
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('fullName'), defaultValidator) }), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1948
1884
|
});
|
|
1949
1885
|
|
|
1950
|
-
const
|
|
1951
|
-
|
|
1952
|
-
const {
|
|
1953
|
-
|
|
1954
|
-
|
|
1886
|
+
const RegionPremiumField = JSX(({ field }) => {
|
|
1887
|
+
const branchByRegions = usePremiumBranchesByRegions();
|
|
1888
|
+
const regions = branchByRegions.map(({ region }) => ({
|
|
1889
|
+
key: region,
|
|
1890
|
+
text: region,
|
|
1891
|
+
}));
|
|
1892
|
+
return (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, ...withValidator(field('region'), defaultValidator) }));
|
|
1893
|
+
});
|
|
1955
1894
|
|
|
1956
1895
|
const SERVICE_TYPES = [
|
|
1957
1896
|
{ key: 'ULTRASERVICE', text: 'Ультра' },
|
|
@@ -1976,33 +1915,12 @@
|
|
|
1976
1915
|
});
|
|
1977
1916
|
const ApplicationFormUltraPremium = JSX(({ button, link, onSubmit, defaultType = 'PREMIUMSERVICE' }) => {
|
|
1978
1917
|
const handleSubmit = useCallback((formState) => {
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1981
|
-
typeForm: formState.typeForm.key,
|
|
1982
|
-
surname,
|
|
1983
|
-
name,
|
|
1984
|
-
middleName,
|
|
1985
|
-
phoneNumber: formatPhone(formState.phone),
|
|
1986
|
-
email,
|
|
1987
|
-
addressBranch: formState.addressBranch?.key,
|
|
1988
|
-
comment,
|
|
1989
|
-
consentDataProcessing,
|
|
1990
|
-
};
|
|
1991
|
-
console.log(submitData);
|
|
1992
|
-
isValidationSuccess(creditValidator(formState)) && onSubmit(submitData, true);
|
|
1918
|
+
const isValid = isValidationSuccess(creditValidator(formState));
|
|
1919
|
+
isValid && onSubmit(formState, true);
|
|
1993
1920
|
}, [onSubmit]);
|
|
1994
|
-
const [formState, { field, ...formProps }] = useForm({ ...initialFormState$1, typeForm: getDefaultFormType(defaultType) }, handleSubmit);
|
|
1995
|
-
const branchByRegions = usePremiumBranchesByRegions();
|
|
1996
|
-
const regions = branchByRegions.map(({ region }) => ({
|
|
1997
|
-
key: region,
|
|
1998
|
-
text: region,
|
|
1999
|
-
}));
|
|
1921
|
+
const [formState, { field, ...formProps }] = useForm({ ...initialFormState$1, typeForm: getDefaultFormType(defaultType) }, { onSubmit: handleSubmit });
|
|
2000
1922
|
const regionKey = formState?.region?.key;
|
|
2001
|
-
|
|
2002
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { title: "\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435", children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F*", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430*", ...withValidator(field('email'), defaultValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F*", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D*", ...withValidator(field('phone'), phoneValidator) }), jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F*", options: SERVICE_TYPES, ...withValidator(field('typeForm'), defaultValidator) })] })] }), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, 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, ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: formChildrenStyle, children: jsx(SelectControl, { className: "w-full", label: "\u0410\u0434\u0440\u0435\u0441*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", options: (addressBranches || []).map(({ address = '' }) => ({
|
|
2003
|
-
key: address,
|
|
2004
|
-
text: address,
|
|
2005
|
-
})), ...withValidator(field('addressBranch'), defaultValidator) }) })] }), jsx(InputControl, { ...field('comment'), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439, \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0438 \u043F\u0440\u043E\u0447\u0435\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1923
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { title: "\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435", children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('typeForm'), defaultValidator) })] })] }), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionPremiumField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: regionKey, isPremium: true }) })] }), jsx(InputControl, { ...field('comment'), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439, \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0438 \u043F\u0440\u043E\u0447\u0435\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
|
|
2006
1924
|
});
|
|
2007
1925
|
const getDefaultFormType = (defaultType) => SERVICE_TYPES.find((_) => _.key === defaultType);
|
|
2008
1926
|
|
|
@@ -2015,21 +1933,20 @@
|
|
|
2015
1933
|
return (jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: "gap-xl grid @xl:flex @xl:items-center", children: [jsx(Radio, { name: "vedTypes", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", value: "currencyControl", checked: value === 'currencyControl', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "documentOperations", checked: value === 'documentOperations', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "conversionTransactions", checked: value === 'conversionTransactions', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0418\u043D\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u0412\u042D\u0414", value: "otherIssues", checked: value === 'otherIssues', onChange: (_) => onChange && onChange(_) })] }) }));
|
|
2016
1934
|
};
|
|
2017
1935
|
|
|
2018
|
-
const
|
|
2019
|
-
const renderTextarea = ({ textField, text, placeholder = '', error }) => (jsxs("div", { children: [jsxs("label", { className: "space-y-xs", htmlFor: "textarea", children: [text ? (jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", children: text }) })) : null, jsx("textarea", { id: "textarea", placeholder: placeholder, className: style('block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray', activeTextareaStyles), value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }), renderErrorText(error)] }));
|
|
2020
|
-
|
|
2021
|
-
const renderWedDataOrganization = ({ field, regions }) => {
|
|
1936
|
+
const renderWedDataOrganization = ({ field }) => {
|
|
2022
1937
|
const isCurrencyControl = field('vedTypes').value === 'currencyControl';
|
|
2023
|
-
return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ?
|
|
1938
|
+
return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? jsx(RegionField, { field: field }) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-lg gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { 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, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('email') }) : null] })] }));
|
|
2024
1939
|
};
|
|
2025
1940
|
|
|
2026
1941
|
const initialFormState = {
|
|
1942
|
+
typeForm: { key: 'KVED', text: 'Заявка на консультацию ВЭД' },
|
|
1943
|
+
vedTypes: 'currencyControl',
|
|
2027
1944
|
fullName: '',
|
|
2028
1945
|
name: '',
|
|
2029
1946
|
phone: '',
|
|
2030
1947
|
inn: '',
|
|
2031
|
-
|
|
2032
|
-
|
|
1948
|
+
email: '',
|
|
1949
|
+
partnerComments: '',
|
|
2033
1950
|
};
|
|
2034
1951
|
const defaultValidators = {
|
|
2035
1952
|
fullName: defaultValidator,
|
|
@@ -2038,7 +1955,6 @@
|
|
|
2038
1955
|
};
|
|
2039
1956
|
const wedValidator = objectValidator({
|
|
2040
1957
|
...defaultValidators,
|
|
2041
|
-
mail: defaultValidator,
|
|
2042
1958
|
});
|
|
2043
1959
|
const wedValidatorCurrencyControl = objectValidator({
|
|
2044
1960
|
...defaultValidators,
|
|
@@ -2056,27 +1972,20 @@
|
|
|
2056
1972
|
const ApplicationFormWed = JSX((props) => {
|
|
2057
1973
|
const { button, link, onSubmit } = props;
|
|
2058
1974
|
const handleSubmit = useCallback((formState) => {
|
|
2059
|
-
const { fullName, name, phone,
|
|
1975
|
+
const { typeForm, fullName, name, phone, email, inn, region, vedTypes, partnerComments } = formState;
|
|
2060
1976
|
const data = {
|
|
2061
|
-
typeForm
|
|
1977
|
+
typeForm,
|
|
2062
1978
|
fullName,
|
|
2063
1979
|
name,
|
|
2064
|
-
phone
|
|
2065
|
-
text,
|
|
1980
|
+
phone,
|
|
2066
1981
|
vedTypes: getVedTypes(vedTypes),
|
|
2067
|
-
|
|
2068
|
-
...(!isCurrencyControl(vedTypes) ? {
|
|
1982
|
+
partnerComments,
|
|
1983
|
+
...(!isCurrencyControl(vedTypes) ? { email } : { inn, region }),
|
|
2069
1984
|
};
|
|
2070
1985
|
isValidationSuccess(getValidator(vedTypes)(formState)) && onSubmit(data);
|
|
2071
1986
|
}, [onSubmit]);
|
|
2072
|
-
const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
|
|
2073
|
-
|
|
2074
|
-
const textField = field('text');
|
|
2075
|
-
return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field, regions }), renderTextarea({
|
|
2076
|
-
textField,
|
|
2077
|
-
text: 'Обращение',
|
|
2078
|
-
placeholder: 'Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка',
|
|
2079
|
-
}), renderSubmitButton(button), 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: "@xl:text-center" }), renderContacts()] }));
|
|
1987
|
+
const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
1988
|
+
return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field }), jsx(InputControl, { label: "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435", 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", ...field('partnerComments'), isTextarea: true }), renderSubmitButton(button), 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: "@xl:text-center" }), renderContacts()] }));
|
|
2080
1989
|
});
|
|
2081
1990
|
|
|
2082
1991
|
const EmbeddableForms = {
|
|
@@ -2106,7 +2015,8 @@
|
|
|
2106
2015
|
const { className, formBlock, ...rest } = props;
|
|
2107
2016
|
const [responseType, setResponseType] = useState('');
|
|
2108
2017
|
const handleSubmit = useCallback(async (data, isIndividualType = false) => {
|
|
2109
|
-
const
|
|
2018
|
+
const formatData = getFormatData(data);
|
|
2019
|
+
const status = (await API.send(formatData, isIndividualType)) ? 'OK' : 'Fail';
|
|
2110
2020
|
setResponseType(status);
|
|
2111
2021
|
return status;
|
|
2112
2022
|
}, []);
|
|
@@ -2120,6 +2030,7 @@
|
|
|
2120
2030
|
const EmbeddedForm = EmbeddableForms[type];
|
|
2121
2031
|
return jsx(EmbeddedForm, { ...formBlock, onSubmit: handleSubmit });
|
|
2122
2032
|
};
|
|
2033
|
+
const getFormatData = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]));
|
|
2123
2034
|
|
|
2124
2035
|
const AlignStyles = 'text-center';
|
|
2125
2036
|
|
|
@@ -6191,7 +6102,7 @@
|
|
|
6191
6102
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
6192
6103
|
}
|
|
6193
6104
|
|
|
6194
|
-
const packageVersion = "0.14.
|
|
6105
|
+
const packageVersion = "0.14.154";
|
|
6195
6106
|
|
|
6196
6107
|
exports.Blocks = Blocks;
|
|
6197
6108
|
exports.ContentPage = ContentPage;
|