@redneckz/wildless-cms-uni-blocks 0.14.609 → 0.14.617
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/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +385 -151
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/bundle/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
- package/bundle/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
- package/bundle/components/CreditForm/CreditForm.d.ts +2 -9
- package/bundle/components/CreditForm/CreditFormContent.d.ts +9 -1
- package/bundle/components/CreditForm/CreditFormStep.d.ts +17 -0
- package/bundle/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
- package/bundle/components/CreditForm/creditFormStepsData.d.ts +40 -2
- package/bundle/components/CreditForm/getInitialFormState.d.ts +62 -0
- package/bundle/components/CreditForm/renderInputs.d.ts +3 -0
- package/bundle/components/CreditForm/useCreditFormApi.d.ts +11 -0
- package/bundle/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
- package/bundle/ui-kit/DatePicker/getYears.d.ts +1 -0
- package/bundle/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
- package/bundle/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/bundle/ui-kit/InfoCard/InfoCard.d.ts +3 -2
- package/bundle/ui-kit/Input/InputNumberControl.d.ts +2 -0
- package/bundle/ui-kit/Input/InputProps.d.ts +2 -1
- package/bundle/ui-kit/InputNumber/InputNumber.d.ts +2 -0
- package/bundle/utils/normalizeWithMask.d.ts +1 -0
- package/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
- package/dist/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
- package/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
- package/dist/components/ApplicationStatus/ApplicationStatus.js +25 -0
- package/dist/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
- package/dist/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
- package/dist/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
- package/dist/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.d.ts +2 -9
- package/dist/components/CreditForm/CreditForm.js +11 -19
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormContent.d.ts +9 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +17 -0
- package/dist/components/CreditForm/CreditFormStep.js +33 -0
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -0
- package/dist/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js +2 -12
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.d.ts +40 -2
- package/dist/components/CreditForm/creditFormStepsData.js +31 -26
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/getInitialFormState.d.ts +62 -0
- package/dist/components/CreditForm/getInitialFormState.js +77 -0
- package/dist/components/CreditForm/getInitialFormState.js.map +1 -0
- package/dist/components/CreditForm/renderInputs.d.ts +3 -0
- package/dist/components/CreditForm/renderInputs.js +8 -0
- package/dist/components/CreditForm/renderInputs.js.map +1 -0
- package/dist/components/CreditForm/useCreditFormApi.d.ts +11 -0
- package/dist/components/CreditForm/useCreditFormApi.js +28 -0
- package/dist/components/CreditForm/useCreditFormApi.js.map +1 -0
- package/dist/ui-kit/DatePicker/DatePicker.js +16 -5
- package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
- package/dist/ui-kit/DatePicker/DatePickerInput.js +66 -0
- package/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
- package/dist/ui-kit/DatePicker/getYears.d.ts +1 -0
- package/dist/ui-kit/DatePicker/getYears.js +3 -3
- package/dist/ui-kit/DatePicker/getYears.js.map +1 -1
- package/dist/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
- package/dist/ui-kit/DatePicker/useDatePickerManager.js +29 -3
- package/dist/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DependentsField.js +2 -2
- package/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DulNumberField.js +2 -2
- package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DulSerieField.js +2 -2
- package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
- package/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
- package/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
- package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +2 -2
- package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
- package/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
- package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -0
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/SelectField.js +1 -1
- package/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +2 -0
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +6 -5
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/dist/ui-kit/FormField/validators.d.ts +1 -0
- package/dist/ui-kit/FormField/validators.js +3 -1
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/dist/ui-kit/InfoCard/InfoCard.d.ts +3 -2
- package/dist/ui-kit/InfoCard/InfoCard.js +2 -1
- package/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/dist/ui-kit/Input/InputNumberControl.d.ts +2 -0
- package/dist/ui-kit/Input/InputNumberControl.js +10 -0
- package/dist/ui-kit/Input/InputNumberControl.js.map +1 -0
- package/dist/ui-kit/Input/InputProps.d.ts +2 -1
- package/dist/ui-kit/InputNumber/InputNumber.d.ts +2 -0
- package/dist/ui-kit/InputNumber/InputNumber.js +12 -0
- package/dist/ui-kit/InputNumber/InputNumber.js.map +1 -0
- package/dist/ui-kit/SnilsInput/SnilsInput.js +2 -2
- package/dist/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/dist/ui-kit/TimerCircle/TimerCircle.js +3 -2
- package/dist/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/dist/utils/normalizeWithMask.d.ts +1 -0
- package/dist/utils/normalizeWithMask.js +20 -0
- package/dist/utils/normalizeWithMask.js.map +1 -0
- package/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
- package/lib/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
- package/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
- package/lib/components/ApplicationStatus/ApplicationStatus.fixture.d.ts +9 -0
- package/lib/components/ApplicationStatus/ApplicationStatus.js +23 -0
- package/lib/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
- package/lib/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
- package/lib/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
- package/lib/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.d.ts +2 -9
- package/lib/components/CreditForm/CreditForm.js +12 -20
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormContent.d.ts +9 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +17 -0
- package/lib/components/CreditForm/CreditFormStep.js +31 -0
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -0
- package/lib/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js +2 -12
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.d.ts +40 -2
- package/lib/components/CreditForm/creditFormStepsData.js +31 -26
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/getInitialFormState.d.ts +62 -0
- package/lib/components/CreditForm/getInitialFormState.js +74 -0
- package/lib/components/CreditForm/getInitialFormState.js.map +1 -0
- package/lib/components/CreditForm/renderInputs.d.ts +2 -0
- package/lib/components/CreditForm/renderInputs.js +5 -0
- package/lib/components/CreditForm/renderInputs.js.map +1 -0
- package/lib/components/CreditForm/useCreditFormApi.d.ts +11 -0
- package/lib/components/CreditForm/useCreditFormApi.js +25 -0
- package/lib/components/CreditForm/useCreditFormApi.js.map +1 -0
- package/lib/ui-kit/DatePicker/DatePicker.js +16 -5
- package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
- package/lib/ui-kit/DatePicker/DatePickerInput.js +64 -0
- package/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
- package/lib/ui-kit/DatePicker/getYears.d.ts +1 -0
- package/lib/ui-kit/DatePicker/getYears.js +1 -1
- package/lib/ui-kit/DatePicker/getYears.js.map +1 -1
- package/lib/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
- package/lib/ui-kit/DatePicker/useDatePickerManager.js +29 -3
- package/lib/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DependentsField.js +2 -2
- package/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DulNumberField.js +2 -2
- package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DulSerieField.js +2 -2
- package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
- package/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
- package/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
- package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +2 -2
- package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
- package/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
- package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +7 -0
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/SelectField.js +1 -1
- package/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +2 -0
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +7 -6
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/ui-kit/FormField/validators.d.ts +1 -0
- package/lib/ui-kit/FormField/validators.js +1 -0
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/lib/ui-kit/InfoCard/InfoCard.d.ts +3 -2
- package/lib/ui-kit/InfoCard/InfoCard.js +2 -1
- package/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/lib/ui-kit/Input/InputNumberControl.d.ts +2 -0
- package/lib/ui-kit/Input/InputNumberControl.js +8 -0
- package/lib/ui-kit/Input/InputNumberControl.js.map +1 -0
- package/lib/ui-kit/Input/InputProps.d.ts +2 -1
- package/lib/ui-kit/InputNumber/InputNumber.d.ts +2 -0
- package/lib/ui-kit/InputNumber/InputNumber.js +10 -0
- package/lib/ui-kit/InputNumber/InputNumber.js.map +1 -0
- package/lib/ui-kit/SnilsInput/SnilsInput.js +2 -2
- package/lib/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/lib/ui-kit/TimerCircle/TimerCircle.js +3 -2
- package/lib/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/lib/utils/normalizeWithMask.d.ts +1 -0
- package/lib/utils/normalizeWithMask.js +17 -0
- package/lib/utils/normalizeWithMask.js.map +1 -0
- package/mobile/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
- package/mobile/bundle/bundle.umd.js +364 -151
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/mobile/bundle/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
- package/mobile/bundle/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
- package/mobile/bundle/components/CreditForm/CreditForm.d.ts +2 -9
- package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +9 -1
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +17 -0
- package/mobile/bundle/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +40 -2
- package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +62 -0
- package/mobile/bundle/components/CreditForm/renderInputs.d.ts +3 -0
- package/mobile/bundle/components/CreditForm/useCreditFormApi.d.ts +11 -0
- package/mobile/bundle/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
- package/mobile/bundle/ui-kit/DatePicker/getYears.d.ts +1 -0
- package/mobile/bundle/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
- package/mobile/bundle/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/bundle/ui-kit/InfoCard/InfoCard.d.ts +3 -2
- package/mobile/bundle/ui-kit/Input/InputNumberControl.d.ts +2 -0
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/bundle/ui-kit/InputNumber/InputNumber.d.ts +2 -0
- package/mobile/bundle/utils/normalizeWithMask.d.ts +1 -0
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
- package/mobile/dist/components/ApplicationStatus/ApplicationStatus.js +25 -0
- package/mobile/dist/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
- package/mobile/dist/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
- package/mobile/dist/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
- package/mobile/dist/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
- package/mobile/dist/components/CreditForm/CreditForm.d.ts +2 -9
- package/mobile/dist/components/CreditForm/CreditForm.js +11 -19
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +9 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +17 -0
- package/mobile/dist/components/CreditForm/CreditFormStep.js +33 -0
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -0
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -12
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +40 -2
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +31 -26
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +62 -0
- package/mobile/dist/components/CreditForm/getInitialFormState.js +77 -0
- package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -0
- package/mobile/dist/components/CreditForm/renderInputs.d.ts +3 -0
- package/mobile/dist/components/CreditForm/renderInputs.js +8 -0
- package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -0
- package/mobile/dist/components/CreditForm/useCreditFormApi.d.ts +11 -0
- package/mobile/dist/components/CreditForm/useCreditFormApi.js +28 -0
- package/mobile/dist/components/CreditForm/useCreditFormApi.js.map +1 -0
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js +16 -5
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js +66 -0
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
- package/mobile/dist/ui-kit/DatePicker/getYears.d.ts +1 -0
- package/mobile/dist/ui-kit/DatePicker/getYears.js +3 -3
- package/mobile/dist/ui-kit/DatePicker/getYears.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
- package/mobile/dist/ui-kit/DatePicker/useDatePickerManager.js +29 -3
- package/mobile/dist/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/SelectField.js +1 -1
- package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +2 -0
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +6 -5
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/dist/ui-kit/FormField/validators.js +3 -1
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/dist/ui-kit/InfoCard/InfoCard.d.ts +3 -2
- package/mobile/dist/ui-kit/InfoCard/InfoCard.js +2 -1
- package/mobile/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputNumberControl.d.ts +2 -0
- package/mobile/dist/ui-kit/Input/InputNumberControl.js +10 -0
- package/mobile/dist/ui-kit/Input/InputNumberControl.js.map +1 -0
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/dist/ui-kit/InputNumber/InputNumber.d.ts +2 -0
- package/mobile/dist/ui-kit/InputNumber/InputNumber.js +12 -0
- package/mobile/dist/ui-kit/InputNumber/InputNumber.js.map +1 -0
- package/mobile/dist/ui-kit/SnilsInput/SnilsInput.js +2 -2
- package/mobile/dist/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/mobile/dist/ui-kit/TimerCircle/TimerCircle.js +3 -2
- package/mobile/dist/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/mobile/dist/utils/normalizeWithMask.d.ts +1 -0
- package/mobile/dist/utils/normalizeWithMask.js +20 -0
- package/mobile/dist/utils/normalizeWithMask.js.map +1 -0
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +2 -1
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.js +39 -34
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationStatus/ApplicationStatus.d.ts +5 -0
- package/mobile/lib/components/ApplicationStatus/ApplicationStatus.js +23 -0
- package/mobile/lib/components/ApplicationStatus/ApplicationStatus.js.map +1 -0
- package/mobile/lib/components/ApplicationStatus/ApplicationStatusContent.d.ts +18 -0
- package/mobile/lib/components/ApplicationStatus/ApplicationStatusContent.js +2 -0
- package/mobile/lib/components/ApplicationStatus/ApplicationStatusContent.js.map +1 -0
- package/mobile/lib/components/CreditForm/CreditForm.d.ts +2 -9
- package/mobile/lib/components/CreditForm/CreditForm.js +12 -20
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +9 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +17 -0
- package/mobile/lib/components/CreditForm/CreditFormStep.js +31 -0
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -0
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.d.ts +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -12
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +40 -2
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +31 -26
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +62 -0
- package/mobile/lib/components/CreditForm/getInitialFormState.js +74 -0
- package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -0
- package/mobile/lib/components/CreditForm/renderInputs.d.ts +3 -0
- package/mobile/lib/components/CreditForm/renderInputs.js +5 -0
- package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -0
- package/mobile/lib/components/CreditForm/useCreditFormApi.d.ts +11 -0
- package/mobile/lib/components/CreditForm/useCreditFormApi.js +25 -0
- package/mobile/lib/components/CreditForm/useCreditFormApi.js.map +1 -0
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js +16 -5
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.d.ts +10 -0
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js +64 -0
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -0
- package/mobile/lib/ui-kit/DatePicker/getYears.d.ts +1 -0
- package/mobile/lib/ui-kit/DatePicker/getYears.js +1 -1
- package/mobile/lib/ui-kit/DatePicker/getYears.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/useDatePickerManager.d.ts +3 -1
- package/mobile/lib/ui-kit/DatePicker/useDatePickerManager.js +29 -3
- package/mobile/lib/ui-kit/DatePicker/useDatePickerManager.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/SelectField.js +1 -1
- package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +2 -0
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +7 -6
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/lib/ui-kit/FormField/validators.js +1 -0
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/ui-kit/InfoCard/InfoCard.d.ts +3 -2
- package/mobile/lib/ui-kit/InfoCard/InfoCard.js +2 -1
- package/mobile/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputNumberControl.d.ts +2 -0
- package/mobile/lib/ui-kit/Input/InputNumberControl.js +8 -0
- package/mobile/lib/ui-kit/Input/InputNumberControl.js.map +1 -0
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/lib/ui-kit/InputNumber/InputNumber.d.ts +2 -0
- package/mobile/lib/ui-kit/InputNumber/InputNumber.js +10 -0
- package/mobile/lib/ui-kit/InputNumber/InputNumber.js.map +1 -0
- package/mobile/lib/ui-kit/SnilsInput/SnilsInput.js +2 -2
- package/mobile/lib/ui-kit/SnilsInput/SnilsInput.js.map +1 -1
- package/mobile/lib/ui-kit/TimerCircle/TimerCircle.js +3 -2
- package/mobile/lib/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/mobile/lib/utils/normalizeWithMask.d.ts +1 -0
- package/mobile/lib/utils/normalizeWithMask.js +17 -0
- package/mobile/lib/utils/normalizeWithMask.js.map +1 -0
- package/mobile/src/api/RetailAPI/utils/getUpdateUserTask.ts +49 -35
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -3
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +4 -2
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +2 -2
- package/mobile/src/components/ApplicationStatus/ApplicationStatus.example.json +6 -0
- package/mobile/src/components/ApplicationStatus/ApplicationStatus.tsx +108 -0
- package/mobile/src/components/ApplicationStatus/ApplicationStatus.ui.json +1 -0
- package/mobile/src/components/ApplicationStatus/ApplicationStatusContent.ts +19 -0
- package/mobile/src/components/CreditForm/CreditForm.tsx +36 -56
- package/mobile/src/components/CreditForm/CreditFormContent.ts +13 -1
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +65 -0
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +19 -38
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +31 -26
- package/mobile/src/components/CreditForm/getInitialFormState.tsx +145 -0
- package/mobile/src/components/CreditForm/renderInputs.tsx +6 -0
- package/mobile/src/components/CreditForm/useCreditFormApi.tsx +36 -0
- package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +34 -13
- package/mobile/src/ui-kit/DatePicker/DatePickerInput.tsx +100 -0
- package/mobile/src/ui-kit/DatePicker/getYears.ts +1 -1
- package/mobile/src/ui-kit/DatePicker/useDatePickerManager.ts +51 -3
- package/mobile/src/ui-kit/FormField/Fields/DependentsField.tsx +3 -3
- package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +3 -3
- package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +3 -3
- package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +3 -3
- package/mobile/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +3 -2
- package/mobile/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +3 -3
- package/mobile/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +3 -2
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +3 -3
- package/mobile/src/ui-kit/FormField/Fields/JobsNumberField.tsx +5 -5
- package/mobile/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +3 -2
- package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +15 -0
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +2 -1
- package/mobile/src/ui-kit/FormField/SelectField.tsx +3 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +2 -0
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +7 -7
- package/mobile/src/ui-kit/FormField/validators.ts +5 -0
- package/mobile/src/ui-kit/InfoCard/InfoCard.tsx +9 -3
- package/mobile/src/ui-kit/Input/InputNumberControl.tsx +18 -0
- package/mobile/src/ui-kit/Input/InputProps.ts +2 -1
- package/mobile/src/ui-kit/InputNumber/InputNumber.tsx +24 -0
- package/mobile/src/ui-kit/SnilsInput/SnilsInput.tsx +2 -2
- package/mobile/src/ui-kit/TimerCircle/TimerCircle.tsx +9 -4
- package/mobile/src/utils/normalizeWithMask.ts +23 -0
- package/package.json +2 -2
- package/src/api/RetailAPI/utils/getUpdateUserTask.ts +49 -35
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -3
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +4 -2
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +2 -2
- package/src/components/ApplicationStatus/ApplicationStatus.example.json +6 -0
- package/src/components/ApplicationStatus/ApplicationStatus.fixture.tsx +129 -0
- package/src/components/ApplicationStatus/ApplicationStatus.tsx +108 -0
- package/src/components/ApplicationStatus/ApplicationStatus.ui.json +1 -0
- package/src/components/ApplicationStatus/ApplicationStatusContent.ts +19 -0
- package/src/components/Blocks.ts +2 -0
- package/src/components/CreditForm/CreditForm.fixture.tsx +9 -1
- package/src/components/CreditForm/CreditForm.tsx +36 -56
- package/src/components/CreditForm/CreditFormContent.ts +13 -1
- package/src/components/CreditForm/CreditFormStep.tsx +65 -0
- package/src/components/CreditForm/StepsNavigationButtons.tsx +19 -38
- package/src/components/CreditForm/creditFormStepsData.tsx +31 -26
- package/src/components/CreditForm/getInitialFormState.tsx +145 -0
- package/src/components/CreditForm/renderInputs.tsx +6 -0
- package/src/components/CreditForm/useCreditFormApi.tsx +36 -0
- package/src/ui-kit/DatePicker/DatePicker.tsx +34 -13
- package/src/ui-kit/DatePicker/DatePickerInput.tsx +100 -0
- package/src/ui-kit/DatePicker/getYears.ts +1 -1
- package/src/ui-kit/DatePicker/useDatePickerManager.ts +51 -3
- package/src/ui-kit/FormField/Fields/DependentsField.tsx +3 -3
- package/src/ui-kit/FormField/Fields/DulNumberField.tsx +3 -3
- package/src/ui-kit/FormField/Fields/DulSerieField.tsx +3 -3
- package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +3 -3
- package/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +3 -2
- package/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +3 -3
- package/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +3 -2
- package/src/ui-kit/FormField/Fields/InnField.tsx +3 -3
- package/src/ui-kit/FormField/Fields/JobsNumberField.tsx +5 -5
- package/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +3 -2
- package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +15 -0
- package/src/ui-kit/FormField/NameFieldDef.ts +2 -1
- package/src/ui-kit/FormField/SelectField.tsx +3 -1
- package/src/ui-kit/FormField/getField.tsx +2 -0
- package/src/ui-kit/FormField/getObjectValidator.tsx +7 -7
- package/src/ui-kit/FormField/validators.ts +5 -0
- package/src/ui-kit/InfoCard/InfoCard.tsx +9 -3
- package/src/ui-kit/Input/InputNumberControl.tsx +18 -0
- package/src/ui-kit/Input/InputProps.ts +2 -1
- package/src/ui-kit/InputNumber/InputNumber.tsx +24 -0
- package/src/ui-kit/SnilsInput/SnilsInput.tsx +2 -2
- package/src/ui-kit/TimerCircle/TimerCircle.tsx +9 -4
- package/src/utils/normalizeWithMask.ts +23 -0
- package/bundle/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
- package/dist/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
- package/dist/ui-kit/SnilsInput/normalizeSnils.js +0 -23
- package/dist/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
- package/lib/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
- package/lib/ui-kit/SnilsInput/normalizeSnils.js +0 -20
- package/lib/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
- package/mobile/bundle/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
- package/mobile/dist/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
- package/mobile/dist/ui-kit/SnilsInput/normalizeSnils.js +0 -23
- package/mobile/dist/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
- package/mobile/lib/ui-kit/SnilsInput/normalizeSnils.d.ts +0 -1
- package/mobile/lib/ui-kit/SnilsInput/normalizeSnils.js +0 -20
- package/mobile/lib/ui-kit/SnilsInput/normalizeSnils.js.map +0 -1
- package/mobile/src/ui-kit/SnilsInput/normalizeSnils.ts +0 -29
- package/src/ui-kit/SnilsInput/normalizeSnils.ts +0 -29
package/bundle/bundle.umd.js
CHANGED
|
@@ -1410,6 +1410,7 @@
|
|
|
1410
1410
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
1411
1411
|
const defaultValidator = (errorMsg) => required(errorMsg ? errorMsg : ERROR_MESSAGE);
|
|
1412
1412
|
const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
|
|
1413
|
+
const jobNumberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length > 0 && _.length <= 2)(errorMsg ? errorMsg : ERROR_MESSAGE);
|
|
1413
1414
|
const nameValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length > 1)(errorMsg ? errorMsg : ERROR_MESSAGE);
|
|
1414
1415
|
const lengthStringValidator = (maxLength, errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= maxLength)(errorMsg ? errorMsg : ERROR_MESSAGE);
|
|
1415
1416
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
@@ -1467,10 +1468,10 @@
|
|
|
1467
1468
|
inn: innValidator('Укажите ИНН'),
|
|
1468
1469
|
legalForm: defaultValidator('Укажите ОПФ'),
|
|
1469
1470
|
organizationName: defaultValidator('Укажите наименование организации'),
|
|
1470
|
-
generalSeniority:
|
|
1471
|
-
lastJobExperience:
|
|
1472
|
-
experience5Years:
|
|
1473
|
-
jobsNumber:
|
|
1471
|
+
generalSeniority: jobNumberValidator('Укажите количество лет стажа'),
|
|
1472
|
+
lastJobExperience: jobNumberValidator('Укажите стаж на последнем месте работы'),
|
|
1473
|
+
experience5Years: jobNumberValidator('Укажите общий стаж за последние 5 лет'),
|
|
1474
|
+
jobsNumber: jobNumberValidator('Укажите количество мест работы за последние 5 лет'),
|
|
1474
1475
|
beginDate: defaultValidator('Укажите дату заключения трудового договора'),
|
|
1475
1476
|
fullAddress: defaultValidator(),
|
|
1476
1477
|
partnerComments: defaultValidator(),
|
|
@@ -1512,9 +1513,10 @@
|
|
|
1512
1513
|
shareholderFlg: defaultValidator(),
|
|
1513
1514
|
legalEntityName: defaultValidator(),
|
|
1514
1515
|
bankEmployeeCode: defaultValidator(),
|
|
1516
|
+
partInBusiness: defaultValidator(),
|
|
1515
1517
|
};
|
|
1516
1518
|
const getObjectValidator = (inputs) => {
|
|
1517
|
-
const requiredInputs = getNamesFromInput(inputs.filter((_) => (
|
|
1519
|
+
const requiredInputs = getNamesFromInput(inputs.filter((_) => Boolean(_?.required)));
|
|
1518
1520
|
return Object.fromEntries(requiredInputs.map((_) => [_, validatorObj?.[_]]));
|
|
1519
1521
|
};
|
|
1520
1522
|
|
|
@@ -1732,7 +1734,7 @@
|
|
|
1732
1734
|
const leadDescription = (source && source?.map((_) => _.description)) || [];
|
|
1733
1735
|
return (jsx(SelectControl, { placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430", label: label, options: arrayToOptions$1(leadDescription), ...getValidation(field(fieldName), validatorObj[fieldName], input?.required) }));
|
|
1734
1736
|
});
|
|
1735
|
-
const arrayToOptions$1 = (array) => (array ?? []).map((_) => ({ key: _,
|
|
1737
|
+
const arrayToOptions$1 = (array) => (array ?? []).map((_) => ({ key: _, text: _ }));
|
|
1736
1738
|
|
|
1737
1739
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
1738
1740
|
const { data: amountWorkers } = useLeadFormData('EMPLOYEES_NUMBER');
|
|
@@ -1855,6 +1857,83 @@
|
|
|
1855
1857
|
}) })] }));
|
|
1856
1858
|
});
|
|
1857
1859
|
|
|
1860
|
+
function normalizeWithMask(value, pattern) {
|
|
1861
|
+
const valueNumbers = value.replace(/\D/g, '');
|
|
1862
|
+
if (valueNumbers === '' || value?.length === pattern.length) {
|
|
1863
|
+
return value;
|
|
1864
|
+
}
|
|
1865
|
+
const patternInArr = [...pattern];
|
|
1866
|
+
const firstPlaceholderIndex = patternInArr.findIndex(isPlaceholder$1);
|
|
1867
|
+
const valueWildcardIndicies = patternInArr.map((_, i) => isWildcard$1(_) ? patternInArr.slice(0, i).filter(isWildcard$1).length : -1);
|
|
1868
|
+
const applyPlaceholder = (_, i) => isDigit$1(_) ? _ : valueNumbers.charAt(valueWildcardIndicies[i]) || _;
|
|
1869
|
+
const resultInArr = patternInArr.map(applyPlaceholder);
|
|
1870
|
+
const resultLength = valueWildcardIndicies.indexOf(valueNumbers.length - 1) + 1;
|
|
1871
|
+
return resultInArr.slice(0, Math.max(firstPlaceholderIndex, resultLength)).join('');
|
|
1872
|
+
}
|
|
1873
|
+
const isPlaceholder$1 = (_) => _ === '_';
|
|
1874
|
+
const isDigit$1 = (_) => /\d/.test(_);
|
|
1875
|
+
const isWildcard$1 = (_) => isPlaceholder$1(_) || isDigit$1(_);
|
|
1876
|
+
|
|
1877
|
+
const START_YEAR = 1940;
|
|
1878
|
+
const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
|
|
1879
|
+
|
|
1880
|
+
const ICON_PROPS$1 = {
|
|
1881
|
+
name: 'CalendarIcon',
|
|
1882
|
+
iconVersion: 'black',
|
|
1883
|
+
width: '24',
|
|
1884
|
+
height: '24',
|
|
1885
|
+
};
|
|
1886
|
+
const DatePickerInput = JSX(({ setSelectedMonth, setSelectedYear, className, value, onChange, onClick }) => {
|
|
1887
|
+
const ref = useRef(null);
|
|
1888
|
+
const [inputValue, setInputValue] = useState(value || '');
|
|
1889
|
+
const handleChange = (ev) => {
|
|
1890
|
+
const val = ev.target?.value;
|
|
1891
|
+
if (typeof val === 'string' && val?.length < 11) {
|
|
1892
|
+
setInputValue(normalizeWithMask(val, '__.__.____'));
|
|
1893
|
+
}
|
|
1894
|
+
};
|
|
1895
|
+
const onBlur = () => {
|
|
1896
|
+
if (checkIsValidDate(inputValue)) {
|
|
1897
|
+
const [day, month, year] = inputValue.split('.');
|
|
1898
|
+
onChange?.(new Date(Number(year), Number(month) - 1, Number(day)));
|
|
1899
|
+
setSelectedMonth(Number(month) - 1);
|
|
1900
|
+
setSelectedYear(Number(year));
|
|
1901
|
+
}
|
|
1902
|
+
else {
|
|
1903
|
+
setInputValue(value || '');
|
|
1904
|
+
}
|
|
1905
|
+
};
|
|
1906
|
+
const onInputClick = () => {
|
|
1907
|
+
if (ref.current !== null) {
|
|
1908
|
+
ref.current.focus();
|
|
1909
|
+
}
|
|
1910
|
+
onClick?.();
|
|
1911
|
+
};
|
|
1912
|
+
useEffect(() => {
|
|
1913
|
+
setInputValue(value || '');
|
|
1914
|
+
}, [value]);
|
|
1915
|
+
return (jsxs("div", { onClick: onInputClick, className: style('relative', className), children: [jsx("input", { ref: ref, className: "h-full w-full px-m text-l text-black focus-visible:outline-none", value: inputValue, type: "text", onChange: handleChange, onBlur: onBlur }), jsx(Icon, { className: "mr-s", ...ICON_PROPS$1 })] }));
|
|
1916
|
+
});
|
|
1917
|
+
const isValidYear = (year) => Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
|
|
1918
|
+
const isValidMonth = (month) => Number(month) > 0 && Number(month) < 13;
|
|
1919
|
+
const checkIsValidDate = (date) => {
|
|
1920
|
+
const [day, month, year] = date.split('.');
|
|
1921
|
+
if (isValidYear(year)) {
|
|
1922
|
+
if (isValidMonth(month)) {
|
|
1923
|
+
const currentDate = new Date(Number(year), Number(month) - 1, 1);
|
|
1924
|
+
let maxDateOfMonth = 0;
|
|
1925
|
+
while (currentDate.getMonth() === Number(month) - 1) {
|
|
1926
|
+
currentDate.setDate(currentDate.getDate() + 1);
|
|
1927
|
+
maxDateOfMonth++;
|
|
1928
|
+
}
|
|
1929
|
+
if (Number(day) > 0 && Number(day) <= maxDateOfMonth) {
|
|
1930
|
+
return true;
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
return false;
|
|
1935
|
+
};
|
|
1936
|
+
|
|
1858
1937
|
const months = [
|
|
1859
1938
|
'Январь',
|
|
1860
1939
|
'Февраль',
|
|
@@ -1870,15 +1949,12 @@
|
|
|
1870
1949
|
'Декабрь',
|
|
1871
1950
|
];
|
|
1872
1951
|
|
|
1873
|
-
const START_YEAR = 1940;
|
|
1874
|
-
const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
|
|
1875
|
-
|
|
1876
1952
|
const MONTHS_COUNT = 11;
|
|
1877
1953
|
const MONTHS_OPTIONS = months.map((key) => ({ key }));
|
|
1878
1954
|
const YEARS_OPTIONS = getYears()
|
|
1879
1955
|
.reverse()
|
|
1880
1956
|
.map((key) => ({ key: String(key) }));
|
|
1881
|
-
const useDatePickerManager = ({ onShowCalendar, showCalendar, selectedMonth, onMonthSelect, onYearSelect, selectedYear, }) => {
|
|
1957
|
+
const useDatePickerManager = ({ onShowCalendar, showCalendar, selectedMonth, onMonthSelect, onYearSelect, selectedYear, onChange, value, }) => {
|
|
1882
1958
|
const close = useCallback(() => showCalendar && onShowCalendar(false), [showCalendar]);
|
|
1883
1959
|
const ref = useOutsideClick(close);
|
|
1884
1960
|
const handleChangeVisibleCalendar = useCallback(() => onShowCalendar(!showCalendar), [showCalendar]);
|
|
@@ -1900,8 +1976,21 @@
|
|
|
1900
1976
|
onYearSelect(selectedYear - 1);
|
|
1901
1977
|
}
|
|
1902
1978
|
}, [selectedMonth]);
|
|
1903
|
-
const handleSelectMonth = useCallback(({ key }) =>
|
|
1904
|
-
|
|
1979
|
+
const handleSelectMonth = useCallback(({ key }) => {
|
|
1980
|
+
onMonthSelect(months.indexOf(key));
|
|
1981
|
+
const maxDateOfMonth = calculateMaxDaysOfMonth(selectedYear, months.indexOf(key));
|
|
1982
|
+
handleChangeMonth({
|
|
1983
|
+
maxDateOfMonth,
|
|
1984
|
+
selectedYear,
|
|
1985
|
+
selectedMonth: months.indexOf(key),
|
|
1986
|
+
value,
|
|
1987
|
+
onChange,
|
|
1988
|
+
});
|
|
1989
|
+
}, [value]);
|
|
1990
|
+
const handleSelectYear = useCallback(({ key }) => {
|
|
1991
|
+
onYearSelect(Number(key));
|
|
1992
|
+
value && onChange?.(new Date(Number(key), selectedMonth, value?.getDate()));
|
|
1993
|
+
}, [value]);
|
|
1905
1994
|
return {
|
|
1906
1995
|
handleChangeVisibleCalendar,
|
|
1907
1996
|
handleNextMonth,
|
|
@@ -1913,6 +2002,19 @@
|
|
|
1913
2002
|
ref,
|
|
1914
2003
|
};
|
|
1915
2004
|
};
|
|
2005
|
+
const calculateMaxDaysOfMonth = (selectedYear, selectedMonth) => {
|
|
2006
|
+
const date = new Date(selectedYear, selectedMonth, 1);
|
|
2007
|
+
let maxDateOfMonth = 0;
|
|
2008
|
+
while (date.getMonth() === selectedMonth) {
|
|
2009
|
+
maxDateOfMonth++;
|
|
2010
|
+
date.setDate(date.getDate() + 1);
|
|
2011
|
+
}
|
|
2012
|
+
return maxDateOfMonth;
|
|
2013
|
+
};
|
|
2014
|
+
const handleChangeMonth = ({ maxDateOfMonth, selectedYear, selectedMonth, value, onChange, }) => {
|
|
2015
|
+
value &&
|
|
2016
|
+
onChange?.(new Date(selectedYear, selectedMonth, Math.min(maxDateOfMonth, value.getDate())));
|
|
2017
|
+
};
|
|
1916
2018
|
|
|
1917
2019
|
const ICON_PROPS = {
|
|
1918
2020
|
name: 'ArrowUpIcon',
|
|
@@ -1925,9 +2027,11 @@
|
|
|
1925
2027
|
iconVersion: 'black',
|
|
1926
2028
|
isBorder: false,
|
|
1927
2029
|
};
|
|
1928
|
-
const formStyle = 'flex justify-between items-center h-14
|
|
2030
|
+
const formStyle = 'flex justify-between items-center h-14 py-s border rounded-md cursor-pointer ' +
|
|
1929
2031
|
'hover:border-black active:border-black focus:border-black';
|
|
1930
|
-
const DatePicker = JSX(
|
|
2032
|
+
const DatePicker = JSX(
|
|
2033
|
+
// eslint-disable-next-line max-lines-per-function
|
|
2034
|
+
({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
|
|
1931
2035
|
const [showCalendar, { setValue }] = useBool(false);
|
|
1932
2036
|
const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
|
|
1933
2037
|
const [selectedYear, setSelectedYear] = useState(value?.getFullYear() || new Date().getFullYear());
|
|
@@ -1938,13 +2042,22 @@
|
|
|
1938
2042
|
selectedYear,
|
|
1939
2043
|
selectedMonth,
|
|
1940
2044
|
showCalendar,
|
|
2045
|
+
onChange,
|
|
2046
|
+
value,
|
|
1941
2047
|
});
|
|
1942
2048
|
const spaceAbove = useElementSpace(ref, 370);
|
|
1943
|
-
return (jsxs("div", { className: style('space-y-xs', className), ref: ref, children: [renderLabel(label), jsxs("div", { className: "relative", children: [renderDatePickerForm(
|
|
2049
|
+
return (jsxs("div", { className: style('space-y-xs', className), ref: ref, children: [renderLabel(label), jsxs("div", { className: "relative", children: [renderDatePickerForm({
|
|
2050
|
+
handleChangeVisibleCalendar,
|
|
2051
|
+
value,
|
|
2052
|
+
valid,
|
|
2053
|
+
onChange,
|
|
2054
|
+
setSelectedMonth,
|
|
2055
|
+
setSelectedYear,
|
|
2056
|
+
}), showCalendar ? (jsxs("div", { className: style('absolute bg-white z-20 select-none', {
|
|
1944
2057
|
'bottom-full': spaceAbove,
|
|
1945
2058
|
}), children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate, setValue: setValue })] })) : null] })] }));
|
|
1946
2059
|
});
|
|
1947
|
-
const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (
|
|
2060
|
+
const renderDatePickerForm = ({ handleChangeVisibleCalendar, value, valid, onChange, setSelectedMonth, setSelectedYear, }) => (jsx(DatePickerInput, { onChange: onChange, onClick: handleChangeVisibleCalendar, value: value && formatDate(value), setSelectedMonth: setSelectedMonth, setSelectedYear: setSelectedYear, className: style(formStyle, valid ? 'border-gray' : 'border-error') }));
|
|
1948
2061
|
|
|
1949
2062
|
const DatePickerControl = JSX(({ className, label, error, errors, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(DatePicker, { label: getRequiredLabel({ label, errors }), valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
|
|
1950
2063
|
|
|
@@ -2052,7 +2165,15 @@
|
|
|
2052
2165
|
return (jsx(SelectField, { field: field, source: creditInRshbCd, label: LABEL_TEXT, fieldName: "creditInRshbCd", input: input }));
|
|
2053
2166
|
});
|
|
2054
2167
|
|
|
2055
|
-
const
|
|
2168
|
+
const InputNumber = JSX(({ children, onChange, inputLength, ...inputProps }) => {
|
|
2169
|
+
const handleChange = useCallback((v) => onChange && inputLength && v.length <= inputLength && onChange(normalizeInput(v)), [onChange]);
|
|
2170
|
+
return (jsx(Input, { ...inputProps, onChange: handleChange, onFocus: (ev) => handleChange(ev?.target?.value || ''), children: children }));
|
|
2171
|
+
});
|
|
2172
|
+
const normalizeInput = (value) => value.replace(/\D/g, '');
|
|
2173
|
+
|
|
2174
|
+
const InputNumberControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(InputNumber, { "aria-label": label, label: getRequiredLabel({ label, errors: rest?.errors }), valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
|
|
2175
|
+
|
|
2176
|
+
const DependentsField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0438\u0436\u0434\u0438\u0432\u0435\u043D\u0446\u0435\u0432", placeholder: "\u0417\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u0435\u0442\u0435\u0439 \u0434\u043E 18 \u043B\u0435\u0442", inputLength: 2, ...getValidation(field('dependents'), validatorObj.dependents, input?.required), ...input })));
|
|
2056
2177
|
|
|
2057
2178
|
const DesiredMeetingDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438", ...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, input?.required) })));
|
|
2058
2179
|
|
|
@@ -2068,15 +2189,15 @@
|
|
|
2068
2189
|
return (jsx(InputControl, { label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...getValidation(field('dulIssuedBy'), validatorObj.dulIssuedBy, input?.required), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
|
|
2069
2190
|
});
|
|
2070
2191
|
|
|
2071
|
-
const DulNumberField = JSX(({ field, input }) => (jsx(
|
|
2192
|
+
const DulNumberField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", inputLength: 6, ...getValidation(field('dulNumber'), validatorObj.dulNumber, input?.required) })));
|
|
2072
2193
|
|
|
2073
|
-
const DulSerieField = JSX(({ field, input }) => (jsx(
|
|
2194
|
+
const DulSerieField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", inputLength: 4, ...getValidation(field('dulSerie'), validatorObj.dulSerie, input?.required) })));
|
|
2074
2195
|
|
|
2075
2196
|
const DulSubdivisionCodeField = JSX(({ field, input }) => {
|
|
2076
2197
|
const onDaDataChange = useCallback((item) => {
|
|
2077
2198
|
field?.('dulIssuedBy')?.onChange?.(item?.data?.name);
|
|
2078
2199
|
}, []);
|
|
2079
|
-
return (jsx(
|
|
2200
|
+
return (jsx(InputNumberControl, { label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", ...input, inputLength: 6, ...getValidation(field('dulSubdivisionCode'), validatorObj.dulSubdivisionCode, input?.required), onDaDataChange: onDaDataChange }));
|
|
2080
2201
|
});
|
|
2081
2202
|
|
|
2082
2203
|
const EducationField = JSX(({ field, input }) => {
|
|
@@ -2106,9 +2227,9 @@
|
|
|
2106
2227
|
|
|
2107
2228
|
const ExpensesField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0440\u0430\u0441\u0445\u043E\u0434\u044B \u0432 \u043C\u0435\u0441\u044F\u0446", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", type: "number", ...getValidation(field('expenses'), validatorObj.expenses, input?.required), ...input })));
|
|
2108
2229
|
|
|
2109
|
-
const Experience5YearsField = JSX(({ field, input }) => (jsx(
|
|
2230
|
+
const Experience5YearsField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", inputLength: 2, ...getValidation(field('experience5Years'), validatorObj.experience5Years, input?.required), ...input })));
|
|
2110
2231
|
|
|
2111
|
-
const FamilyMembersField = JSX(({ field, input }) => (jsx(
|
|
2232
|
+
const FamilyMembersField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0447\u043B\u0435\u043D\u043E\u0432 \u0441\u0435\u043C\u044C\u0438", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", inputLength: 2, ...getValidation(field('familyMembers'), validatorObj.familyMembers, input?.required), ...input })));
|
|
2112
2233
|
|
|
2113
2234
|
const FamilyStatusField = JSX(({ field, input }) => {
|
|
2114
2235
|
const { data: familyStatus } = useLeadFormData('MARITAL_STATUS');
|
|
@@ -2134,7 +2255,7 @@
|
|
|
2134
2255
|
|
|
2135
2256
|
const FullNameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0418\u041E", ...getValidation(field('fullName'), validatorObj.fullName, input?.required), ...input })));
|
|
2136
2257
|
|
|
2137
|
-
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(
|
|
2258
|
+
const GeneralSeniorityField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u041E\u0431\u0449\u0438\u0439 \u0441\u0442\u0430\u0436", inputLength: 2, placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", ...getValidation(field('generalSeniority'), validatorObj.generalSeniority, input?.required), ...input })));
|
|
2138
2259
|
|
|
2139
2260
|
const HousingField = JSX(({ field, input }) => {
|
|
2140
2261
|
const { data: housing } = useLeadFormData('HOUSE_TYPE');
|
|
@@ -2146,14 +2267,14 @@
|
|
|
2146
2267
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
2147
2268
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
2148
2269
|
}, []);
|
|
2149
|
-
return (jsx(
|
|
2270
|
+
return (jsx(InputNumberControl, { label: "\u0418\u041D\u041D", inputLength: 12, ...input, ...getValidation(field('inn'), validatorObj.inn, input?.required), onDaDataChange: onDaDataChange }));
|
|
2150
2271
|
});
|
|
2151
2272
|
|
|
2152
2273
|
const IsClientField = JSX(({ field }) => (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"' })));
|
|
2153
2274
|
|
|
2154
|
-
const JobsNumberField = JSX(({ field, input }) => (jsx(
|
|
2275
|
+
const JobsNumberField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", inputLength: 2, ...getValidation(field('jobsNumber'), validatorObj.jobsNumber, input?.required), ...input })));
|
|
2155
2276
|
|
|
2156
|
-
const LastJobExperienceField = JSX(({ field, input }) => (jsx(
|
|
2277
|
+
const LastJobExperienceField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", inputLength: 2, ...getValidation(field('lastJobExperience'), validatorObj.lastJobExperience, input?.required), ...input })));
|
|
2157
2278
|
|
|
2158
2279
|
const LegalEntityNameField = JSX(({ field, input }) => {
|
|
2159
2280
|
return (jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430", ...input, ...getValidation(field('legalEntityName'), validatorObj.legalEntityName, input?.required) }));
|
|
@@ -2214,23 +2335,25 @@
|
|
|
2214
2335
|
|
|
2215
2336
|
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...getValidation(field('participantDateRegistration'), validatorObj.participantDateRegistration, input?.required) })));
|
|
2216
2337
|
|
|
2338
|
+
const PartInBusinessField = JSX(({ field, input }) => (jsx(InputNumberControl, { label: "\u0414\u043E\u043B\u044F \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0432 \u0431\u0438\u0437\u043D\u0435\u0441\u0435", placeholder: "\u0432 %", inputLength: 2, ...getValidation(field('partInBusiness'), validatorObj.partInBusiness, input?.required), ...input })));
|
|
2339
|
+
|
|
2217
2340
|
const PartnerCommentsField = JSX(({ field, input }) => {
|
|
2218
2341
|
const { required, ...rest } = input;
|
|
2219
2342
|
return (jsx(InputControl, { ...getValidation(field('partnerComments'), validatorObj.partnerComments, required), 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", isTextarea: true, ...rest }));
|
|
2220
2343
|
});
|
|
2221
2344
|
|
|
2222
|
-
const isPlaceholder
|
|
2223
|
-
const isDigit
|
|
2224
|
-
const isWildcard
|
|
2345
|
+
const isPlaceholder = (_) => _ === '_';
|
|
2346
|
+
const isDigit = (_) => /\d/.test(_);
|
|
2347
|
+
const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
|
|
2225
2348
|
const phonePattern = [...'+7 (___) ___-__-__'];
|
|
2226
|
-
const firstPlaceholderIndex
|
|
2227
|
-
const phoneWildcardIndicies = phonePattern.map((_, i) => isWildcard
|
|
2349
|
+
const firstPlaceholderIndex = phonePattern.findIndex(isPlaceholder);
|
|
2350
|
+
const phoneWildcardIndicies = phonePattern.map((_, i) => isWildcard(_) ? phonePattern.slice(0, i).filter(isWildcard).length : -1);
|
|
2228
2351
|
function normalizePhone(phone) {
|
|
2229
2352
|
const phoneNumbers = phone.replace(/\D/g, '');
|
|
2230
|
-
const applyPlaceholder = (_, i) => isDigit
|
|
2353
|
+
const applyPlaceholder = (_, i) => isDigit(_) ? _ : phoneNumbers.charAt(phoneWildcardIndicies[i]) || _;
|
|
2231
2354
|
const result = phonePattern.map(applyPlaceholder);
|
|
2232
2355
|
const resultLength = phoneWildcardIndicies.indexOf(phoneNumbers.length - 1) + 1;
|
|
2233
|
-
return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex
|
|
2356
|
+
return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex, resultLength)) : result).join('');
|
|
2234
2357
|
}
|
|
2235
2358
|
|
|
2236
2359
|
const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
|
|
@@ -2304,28 +2427,8 @@
|
|
|
2304
2427
|
|
|
2305
2428
|
const ShareholderFlgField = JSX(({ field }) => (jsx(CheckboxWithError, { text: "\u042F \u044F\u0432\u043B\u044F\u044E\u0441\u044C \u0430\u043A\u0446\u0438\u043E\u043D\u0435\u0440\u043E\u043C / \u0443\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u043E\u043C / \u0447\u043B\u0435\u043D\u043E\u043C / \u043F\u0430\u0439\u0449\u0438\u043A\u043E\u043C / \u0432\u043A\u043B\u0430\u0434\u0447\u0438\u043A\u043E\u043C \u0441 \u0434\u043E\u043B\u0435\u0439 \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0431\u043E\u043B\u0435\u0435 20% \u0443\u0441\u0442\u0430\u0432\u043D\u043E\u0433\u043E \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0430 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430", ...getValidation(field('shareholderFlg'), validatorObj.shareholderFlg) })));
|
|
2306
2429
|
|
|
2307
|
-
const isPlaceholder = (_) => _ === '_';
|
|
2308
|
-
const isDigit = (_) => /\d/.test(_);
|
|
2309
|
-
const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
|
|
2310
|
-
const snilsPattern = [...'___-___-___ __'];
|
|
2311
|
-
const firstPlaceholderIndex = snilsPattern.findIndex(isPlaceholder);
|
|
2312
|
-
const snilsWildcardIndicies = snilsPattern.map((_, i) => isWildcard(_) ? snilsPattern.slice(0, i).filter(isWildcard).length : -1);
|
|
2313
|
-
function normalizeSnils(snils) {
|
|
2314
|
-
const snilsNumbers = snils.replace(/\D/g, '');
|
|
2315
|
-
const applyPlaceholder = (_, i) => isDigit(_) ? _ : snilsNumbers.charAt(snilsWildcardIndicies[i]) || _;
|
|
2316
|
-
const result = snilsPattern.map(applyPlaceholder);
|
|
2317
|
-
const resultLength = snilsWildcardIndicies.indexOf(snilsNumbers.length - 1) + 1;
|
|
2318
|
-
const isCursorStart = snilsNumbers.length === 0;
|
|
2319
|
-
if (!isCursorStart) {
|
|
2320
|
-
return (resultLength ? result.slice(0, Math.max(firstPlaceholderIndex, resultLength)) : result).join('');
|
|
2321
|
-
}
|
|
2322
|
-
else {
|
|
2323
|
-
return '';
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
2430
|
const SnilsInput = JSX(({ children, onChange, ...inputProps }) => {
|
|
2328
|
-
const handleChange = useCallback((v) => onChange && onChange(
|
|
2431
|
+
const handleChange = useCallback((v) => onChange && onChange(normalizeWithMask(v, '___-___-___ __')), [onChange]);
|
|
2329
2432
|
const handleBlur = useCallback((v) => {
|
|
2330
2433
|
if (v === '___-___-___ __') {
|
|
2331
2434
|
onChange && onChange('');
|
|
@@ -2461,6 +2564,7 @@
|
|
|
2461
2564
|
legalEntityName: jsx(LegalEntityNameField, { field: field, input: input }),
|
|
2462
2565
|
creditInRshbCd: jsx(CreditInRshbCdField, { field: field, input: input }),
|
|
2463
2566
|
bankEmployeeCode: jsx(BankEmpoleeCodeField, { field: field, input: input }),
|
|
2567
|
+
partInBusiness: jsx(PartInBusinessField, { field: field, input: input }),
|
|
2464
2568
|
};
|
|
2465
2569
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
2466
2570
|
};
|
|
@@ -2586,7 +2690,7 @@
|
|
|
2586
2690
|
consentToReceiveMaterials: false,
|
|
2587
2691
|
consentDataProcessing: false,
|
|
2588
2692
|
};
|
|
2589
|
-
const getInitialFormState$
|
|
2693
|
+
const getInitialFormState$2 = (inputs, typeForm = '') => {
|
|
2590
2694
|
const formState = Object.fromEntries(inputs.map((_) => [
|
|
2591
2695
|
_.name,
|
|
2592
2696
|
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState$1[_.name],
|
|
@@ -2611,7 +2715,7 @@
|
|
|
2611
2715
|
// eslint-disable-next-line max-lines-per-function
|
|
2612
2716
|
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, ...rest }) => {
|
|
2613
2717
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
2614
|
-
const initialFormState = getInitialFormState$
|
|
2718
|
+
const initialFormState = getInitialFormState$2(inputs, typeForm);
|
|
2615
2719
|
const [responseType, setResponseType] = useState('');
|
|
2616
2720
|
const handleSubmit = useCallback(async (formData, ev) => {
|
|
2617
2721
|
const inputsFiltered = getFilteredInputs(inputs, formData);
|
|
@@ -2718,7 +2822,7 @@
|
|
|
2718
2822
|
});
|
|
2719
2823
|
const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (jsxs("div", { className: "flex items-start", children: [generalCheckBox, jsx("button", { onClick: foldableData.onToggle, className: "px-m py-2xs", type: "button", children: jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
|
|
2720
2824
|
|
|
2721
|
-
const renderInputs = ({ field, typeForm = '', inputs }) => {
|
|
2825
|
+
const renderInputs$1 = ({ field, typeForm = '', inputs }) => {
|
|
2722
2826
|
const { consentInputs, restInputs } = splitInputs(inputs || []);
|
|
2723
2827
|
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm)));
|
|
2724
2828
|
};
|
|
@@ -2727,6 +2831,7 @@
|
|
|
2727
2831
|
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
|
|
2728
2832
|
});
|
|
2729
2833
|
|
|
2834
|
+
/* eslint-disable max-lines */
|
|
2730
2835
|
const initialFormState = {
|
|
2731
2836
|
typeForm: '',
|
|
2732
2837
|
region: { key: '', text: '' },
|
|
@@ -2759,9 +2864,9 @@
|
|
|
2759
2864
|
participantAddress: '',
|
|
2760
2865
|
participantDateRegistration: undefined,
|
|
2761
2866
|
};
|
|
2762
|
-
const getInitialFormState = (inputs, savedForm, typeForm = '') => {
|
|
2867
|
+
const getInitialFormState$1 = (inputs, savedForm, typeForm = '') => {
|
|
2763
2868
|
if (savedForm) {
|
|
2764
|
-
const formState =
|
|
2869
|
+
const formState = { ...savedForm };
|
|
2765
2870
|
formState.birthday = new Date(formState?.birthday || 0);
|
|
2766
2871
|
return formState;
|
|
2767
2872
|
}
|
|
@@ -2804,44 +2909,47 @@
|
|
|
2804
2909
|
};
|
|
2805
2910
|
};
|
|
2806
2911
|
|
|
2807
|
-
const getUpdateUserTaskData = ({ participantId, taskId, profileId, formData, }) =>
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
{
|
|
2825
|
-
contactTypeCd: {
|
|
2826
|
-
key: 'EMAIL',
|
|
2827
|
-
},
|
|
2828
|
-
value: formData?.email,
|
|
2912
|
+
const getUpdateUserTaskData = ({ participantId, taskId, profileId, formData, }) => {
|
|
2913
|
+
const { name = '', surname = '', middleName = '', birthday = '', phone = '', email = '', } = formData;
|
|
2914
|
+
return {
|
|
2915
|
+
sendToBank: true,
|
|
2916
|
+
taskKind: 'SHORT',
|
|
2917
|
+
task: {
|
|
2918
|
+
taskSource: globalThis.location.origin,
|
|
2919
|
+
id: taskId,
|
|
2920
|
+
participants: [
|
|
2921
|
+
{
|
|
2922
|
+
birthDate: formatDate(birthday, true),
|
|
2923
|
+
id: participantId,
|
|
2924
|
+
midname: middleName,
|
|
2925
|
+
name: name,
|
|
2926
|
+
surname: surname,
|
|
2927
|
+
profile: {
|
|
2928
|
+
id: profileId,
|
|
2829
2929
|
},
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2930
|
+
participantContacts: [
|
|
2931
|
+
{
|
|
2932
|
+
contactTypeCd: {
|
|
2933
|
+
key: 'EMAIL',
|
|
2934
|
+
},
|
|
2935
|
+
value: email,
|
|
2936
|
+
},
|
|
2937
|
+
{
|
|
2938
|
+
contactTypeCd: {
|
|
2939
|
+
key: 'MAIN_PHONE',
|
|
2940
|
+
},
|
|
2941
|
+
value: formatPhone(phone),
|
|
2833
2942
|
},
|
|
2834
|
-
|
|
2943
|
+
],
|
|
2944
|
+
roleCd: {
|
|
2945
|
+
key: 'BORROWER',
|
|
2946
|
+
value: 'Заемщик',
|
|
2835
2947
|
},
|
|
2836
|
-
],
|
|
2837
|
-
roleCd: {
|
|
2838
|
-
key: 'BORROWER',
|
|
2839
|
-
value: 'Заемщик',
|
|
2840
2948
|
},
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
}
|
|
2844
|
-
}
|
|
2949
|
+
],
|
|
2950
|
+
},
|
|
2951
|
+
};
|
|
2952
|
+
};
|
|
2845
2953
|
|
|
2846
2954
|
const ICON_SIZE$1 = { width: '118', height: '24' };
|
|
2847
2955
|
|
|
@@ -3198,7 +3306,7 @@
|
|
|
3198
3306
|
formData: transformedForm,
|
|
3199
3307
|
}));
|
|
3200
3308
|
saveUserData(participantId, taskId, profileId);
|
|
3201
|
-
saveForm(
|
|
3309
|
+
saveForm(formData);
|
|
3202
3310
|
}
|
|
3203
3311
|
catch {
|
|
3204
3312
|
setResponseStatus('Fail');
|
|
@@ -3253,7 +3361,7 @@
|
|
|
3253
3361
|
const [responseType, setResponseType] = useState('');
|
|
3254
3362
|
useInitApplicationLead();
|
|
3255
3363
|
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
3256
|
-
const initialFormState = getInitialFormState(inputs, leadForm, typeForm);
|
|
3364
|
+
const initialFormState = getInitialFormState$1(inputs, leadForm, typeForm);
|
|
3257
3365
|
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
3258
3366
|
inputs,
|
|
3259
3367
|
programId,
|
|
@@ -3270,9 +3378,31 @@
|
|
|
3270
3378
|
reset();
|
|
3271
3379
|
}
|
|
3272
3380
|
}, [responseType]);
|
|
3273
|
-
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs({ field,
|
|
3381
|
+
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
3382
|
+
});
|
|
3383
|
+
|
|
3384
|
+
const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black', link }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsxs("div", { className: "", children: [jsx(RichText, { __html: __html }), link?.text ? jsx(LinkButton, { className: "text-primary-main", children: link.text }) : null] })] })));
|
|
3385
|
+
|
|
3386
|
+
const TimerCircle = JSX(({ interval = 0, title, __html }) => {
|
|
3387
|
+
const [time, setTime] = useState(interval);
|
|
3388
|
+
const gradientPercentage = 100 - ((interval - time) / interval) * 100;
|
|
3389
|
+
return (jsxs("div", { children: [title ? jsx(Headline, { title: title, headlineVersion: "S" }) : null, jsxs("div", { className: "flex justify-center items-center flex-col", children: [jsxs("div", { className: style(`relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5`), children: [jsx("div", { className: "absolute inset-0 rounded-full", style: {
|
|
3390
|
+
background: `conic-gradient(rgb(66, 171, 68) ${gradientPercentage}%, rgb(125, 126, 127) 0deg)`,
|
|
3391
|
+
} }), jsx("div", { className: "z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m", children: jsx(Timer, { interval: interval, time: time, setTime: setTime }) })] }), __html ? jsx(RichText, { __html: __html }) : null] })] }));
|
|
3274
3392
|
});
|
|
3275
3393
|
|
|
3394
|
+
const ApplicationStatus = JSX(({ title, description: dsc, infoCard, sectionInfoTitle, sectionInfo, sectionAdditionalTitle, sectionInfoAdditional, buttonText, interval, ...props }) => (jsxs(BlockWrapper, { ...props, children: [jsxs("div", { className: "flex flex-col md:flex-row items-center", children: [jsx(Headline, { headlineVersion: "M", title: title, description: dsc, align: "text-left", padding: "p-xl", className: "w-full" }), interval ? jsx(TimerCircle, { interval: interval }) : null] }), jsx(SectionInfo, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
|
|
3395
|
+
text: infoCard?.link?.text,
|
|
3396
|
+
} })) : null, buttonText ? jsx(Button, { className: "w-full mt-lg", children: buttonText }) : null] })));
|
|
3397
|
+
const SectionInfo = ({ title, items, countColumns = false, }) => {
|
|
3398
|
+
const isMobile = useMobileMode();
|
|
3399
|
+
if (!items) {
|
|
3400
|
+
return null;
|
|
3401
|
+
}
|
|
3402
|
+
return (jsxs("div", { children: [jsx("hr", { className: "w-full h-px bg-main-gray border-0" }), jsxs("div", { className: "p-xl", children: [title ? (jsx(Text, { color: "text-primary-text", size: "text-h5", children: jsx("div", { className: style({ 'mb-m': Boolean(title) }), children: title }) })) : null, items ? (jsx("div", { className: style('grid grid-cols-1 gap-m', inputColumnStyles(countColumns || isMobile ? 1 : 2)), children: items.map((item, index) => (jsx("div", { children: renderItem(item) }, index))) })) : null] })] }));
|
|
3403
|
+
};
|
|
3404
|
+
const renderItem = ({ label, description }) => (jsxs("div", { className: "flex flex-col", children: [jsx(Text, { color: "text-secondary-text", size: "text-l", children: label }), jsx(Text, { color: "text-primary-text", size: "text-xl", children: description })] }));
|
|
3405
|
+
|
|
3276
3406
|
const NotFound = JSX(({ title, description }) => {
|
|
3277
3407
|
const isMobileMode = useMobileMode();
|
|
3278
3408
|
return (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: isMobileMode ? 'L' : 'S', isEmbedded: true, className: "space-y-s" })] }));
|
|
@@ -4909,8 +5039,6 @@
|
|
|
4909
5039
|
const renderBlocks = (info) => (jsx("div", { className: "flex gap-5xl grow basis-0", children: info.map((column, i) => renderBlocksColumn({ column, i })) }));
|
|
4910
5040
|
const renderBlocksColumn = ({ column, i }) => column ? (jsx("div", { className: "flex flex-col gap-xl grow basis-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { children: [jsx(Headline, { title: title, description: description, headlineVersion: "XS", align: "text-left", isEmbedded: true }), additionalDescription ? (jsx("div", { className: "mt-xs opacity-80", children: jsx(Paragraph, { size: "text-m", font: "font-light", children: additionalDescription }) })) : null, jsx("div", { className: style({ 'mt-xl': Boolean(button?.text) }), children: renderButtonsSection([button]) })] }, String(key)))) }, `col-${String(i)}`)) : null;
|
|
4911
5041
|
|
|
4912
|
-
const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black' }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsx(RichText, { __html: __html })] })));
|
|
4913
|
-
|
|
4914
5042
|
const ProgressBar = JSX(({ step = 10, description, showPercentage = true }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? jsxs("div", { className: "absolute left-2/4 text-green", children: [step, "%"] }) : null, description ? jsx("div", { className: "text-right mr-4 text-gray", children: description }) : null] })] })));
|
|
4915
5043
|
|
|
4916
5044
|
const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
|
|
@@ -4918,8 +5046,125 @@
|
|
|
4918
5046
|
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold", children: ["\u0428\u0430\u0433 ", step, " \u0438\u0437 ", totalSteps, "."] }), ' ', stepsTitles[step - 1] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
|
|
4919
5047
|
});
|
|
4920
5048
|
|
|
5049
|
+
const formStateMap = {
|
|
5050
|
+
1: {
|
|
5051
|
+
surname: '',
|
|
5052
|
+
name: '',
|
|
5053
|
+
middleName: '',
|
|
5054
|
+
sex: '',
|
|
5055
|
+
birthday: undefined,
|
|
5056
|
+
birthPlace: '',
|
|
5057
|
+
phone: '',
|
|
5058
|
+
email: '',
|
|
5059
|
+
dulSerie: undefined,
|
|
5060
|
+
dulNumber: undefined,
|
|
5061
|
+
dulIssueDateField: undefined,
|
|
5062
|
+
dulSubdivisionCode: '',
|
|
5063
|
+
dulIssuedBy: '',
|
|
5064
|
+
participantAddress: '',
|
|
5065
|
+
participantDateRegistration: undefined,
|
|
5066
|
+
fullAddress: '',
|
|
5067
|
+
housing: '',
|
|
5068
|
+
},
|
|
5069
|
+
2: {
|
|
5070
|
+
employment: { key: '', text: '' },
|
|
5071
|
+
organizationName: '',
|
|
5072
|
+
inn: undefined,
|
|
5073
|
+
legalForm: '',
|
|
5074
|
+
organization: { key: '', text: '' },
|
|
5075
|
+
amountWorkers: { key: '', text: '' },
|
|
5076
|
+
employerActivities: { key: '', text: '' },
|
|
5077
|
+
employerOrganization: { key: '', text: '' },
|
|
5078
|
+
lastJobExperience: '',
|
|
5079
|
+
experience5Years: '',
|
|
5080
|
+
jobsNumber: '',
|
|
5081
|
+
phone: '',
|
|
5082
|
+
beginDate: undefined,
|
|
5083
|
+
positionOrganization: { key: '', text: '' },
|
|
5084
|
+
partInBusiness: undefined,
|
|
5085
|
+
fullAddress: '',
|
|
5086
|
+
},
|
|
5087
|
+
3: {
|
|
5088
|
+
familyStatus: { key: '', text: '' },
|
|
5089
|
+
dependents: undefined,
|
|
5090
|
+
familyMembers: undefined,
|
|
5091
|
+
mandatoryIncome: undefined,
|
|
5092
|
+
otherPayments: undefined,
|
|
5093
|
+
snils: '',
|
|
5094
|
+
armyIdFlg: false,
|
|
5095
|
+
},
|
|
5096
|
+
4: {
|
|
5097
|
+
disablePeopleFlg: '',
|
|
5098
|
+
bankruptcyFlg: '',
|
|
5099
|
+
shareholderFlg: '',
|
|
5100
|
+
legalEntityName: '',
|
|
5101
|
+
creditInRshbCd: '',
|
|
5102
|
+
},
|
|
5103
|
+
5: {
|
|
5104
|
+
region: '',
|
|
5105
|
+
addressBranch: '',
|
|
5106
|
+
bankEmployeeCode: '',
|
|
5107
|
+
},
|
|
5108
|
+
};
|
|
5109
|
+
const getInitialFormState = (step, localStorageData) => {
|
|
5110
|
+
if (localStorageData) {
|
|
5111
|
+
// TODO: Fill in for other fields with type Date
|
|
5112
|
+
// TODO: Take it out to the helper
|
|
5113
|
+
localStorageData.birthday = localStorageData.dulIssueDateField = new Date(localStorageData?.birthday || Date.now());
|
|
5114
|
+
localStorageData.participantDateRegistration = new Date(localStorageData?.participantDateRegistration || Date.now());
|
|
5115
|
+
localStorageData.beginDate = new Date(localStorageData?.beginDate || Date.now());
|
|
5116
|
+
}
|
|
5117
|
+
return {
|
|
5118
|
+
...formStateMap[step],
|
|
5119
|
+
...localStorageData,
|
|
5120
|
+
};
|
|
5121
|
+
};
|
|
5122
|
+
|
|
5123
|
+
const renderInputs = ({ field, inputs }) => {
|
|
5124
|
+
return (inputs || [])?.map(getField(field, ''));
|
|
5125
|
+
};
|
|
5126
|
+
|
|
5127
|
+
const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
|
|
5128
|
+
return (jsxs("div", { className: 'flex justify-between', children: [jsx(Button, { onClick: onPrevStep, className: style('w-full @xl:w-auto'), type: "button", version: "secondary", disabled: step === 1, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { className: style('w-full @xl:w-auto'), type: "submit", children: "\u0414\u0430\u043B\u0435\u0435" })] }));
|
|
5129
|
+
});
|
|
5130
|
+
|
|
5131
|
+
const useCreditFormApi = ({ inputs, onNextStep, saveStep }) => {
|
|
5132
|
+
const handleSubmit = useCallback(async (formData) => {
|
|
5133
|
+
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
5134
|
+
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
5135
|
+
return 'Fail';
|
|
5136
|
+
}
|
|
5137
|
+
saveStep(formData);
|
|
5138
|
+
onNextStep();
|
|
5139
|
+
return 'OK';
|
|
5140
|
+
}, []);
|
|
5141
|
+
return {
|
|
5142
|
+
handleSubmit,
|
|
5143
|
+
};
|
|
5144
|
+
};
|
|
5145
|
+
|
|
5146
|
+
const CreditFormStep = JSX(({ totalSteps, step, sections, onPrevStep, onNextStep, inputs }) => {
|
|
5147
|
+
const [localStorageData, saveStep] = useLocalStorage('leadForm');
|
|
5148
|
+
const initialState = getInitialFormState(step, localStorageData);
|
|
5149
|
+
const { handleSubmit } = useCreditFormApi({
|
|
5150
|
+
inputs,
|
|
5151
|
+
onNextStep: onNextStep,
|
|
5152
|
+
saveStep,
|
|
5153
|
+
});
|
|
5154
|
+
const [, { field, onSubmit }] = useForm(initialState, { onSubmit: handleSubmit });
|
|
5155
|
+
return (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$1({ sections, field }), jsx(StepsNavigationButtons, { step: step, totalSteps: totalSteps, onPrevStep: onPrevStep })] }));
|
|
5156
|
+
});
|
|
5157
|
+
const renderStep$1 = ({ sections, field }) => {
|
|
5158
|
+
return sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderInfo$1(_?.inputs), renderTitle(_?.title), renderInputs({ field, inputs: _?.inputs })] }, `section-${i}`)));
|
|
5159
|
+
};
|
|
5160
|
+
const renderInfo$1 = (inputs = []) => {
|
|
5161
|
+
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
5162
|
+
return infoInputs.length ? infoInputs.map(({ text }) => jsx(InfoCard, { __html: text })) : null;
|
|
5163
|
+
};
|
|
5164
|
+
|
|
4921
5165
|
/* eslint-disable max-lines */
|
|
4922
5166
|
/* eslint-disable max-len */
|
|
5167
|
+
//TODO: DO List
|
|
4923
5168
|
const stepsSectionsMap = {
|
|
4924
5169
|
1: [
|
|
4925
5170
|
{
|
|
@@ -4952,24 +5197,27 @@
|
|
|
4952
5197
|
{
|
|
4953
5198
|
fieldType: 'common',
|
|
4954
5199
|
name: 'education',
|
|
4955
|
-
required: true,
|
|
4956
5200
|
},
|
|
4957
5201
|
],
|
|
4958
5202
|
},
|
|
4959
5203
|
{
|
|
4960
5204
|
title: 'Адрес регистрации по месту жительства',
|
|
5205
|
+
columns: 1,
|
|
5206
|
+
inputs: [],
|
|
5207
|
+
},
|
|
5208
|
+
{
|
|
5209
|
+
inputs: [{ fieldType: 'common', name: 'participantAddress', required: true, dadata: true }],
|
|
5210
|
+
},
|
|
5211
|
+
{
|
|
4961
5212
|
columns: 2,
|
|
4962
|
-
inputs: [
|
|
4963
|
-
{ fieldType: 'common', name: 'participantAddress', required: true },
|
|
4964
|
-
{ fieldType: 'common', name: 'participantAddress', required: true, dadata: true },
|
|
4965
|
-
],
|
|
5213
|
+
inputs: [{ fieldType: 'common', name: 'participantDateRegistration', required: true }],
|
|
4966
5214
|
},
|
|
4967
5215
|
{
|
|
4968
5216
|
title: 'Адрес фактического проживания (место пребывания РФ)',
|
|
4969
5217
|
columns: 2,
|
|
4970
5218
|
inputs: [
|
|
4971
5219
|
{ fieldType: 'common', name: 'fullAddress', required: true, dadata: true },
|
|
4972
|
-
{ fieldType: 'common', name: 'housing'
|
|
5220
|
+
{ fieldType: 'common', name: 'housing' },
|
|
4973
5221
|
],
|
|
4974
5222
|
},
|
|
4975
5223
|
],
|
|
@@ -4988,7 +5236,7 @@
|
|
|
4988
5236
|
},
|
|
4989
5237
|
{
|
|
4990
5238
|
inputs: [
|
|
4991
|
-
{ fieldType: 'common', name: 'employment'
|
|
5239
|
+
{ fieldType: 'common', name: 'employment' },
|
|
4992
5240
|
{ fieldType: 'common', name: 'organizationName', required: true, dadata: true },
|
|
4993
5241
|
],
|
|
4994
5242
|
},
|
|
@@ -5001,15 +5249,15 @@
|
|
|
5001
5249
|
},
|
|
5002
5250
|
{
|
|
5003
5251
|
inputs: [
|
|
5004
|
-
{ fieldType: 'common', name: 'organization', required:
|
|
5005
|
-
{ fieldType: 'common', name: 'amountWorkers', required:
|
|
5252
|
+
{ fieldType: 'common', name: 'organization', required: false },
|
|
5253
|
+
{ fieldType: 'common', name: 'amountWorkers', required: false },
|
|
5006
5254
|
],
|
|
5007
5255
|
},
|
|
5008
5256
|
{
|
|
5009
5257
|
columns: 2,
|
|
5010
5258
|
inputs: [
|
|
5011
|
-
{ fieldType: 'common', name: 'employerActivities', required:
|
|
5012
|
-
{ fieldType: 'common', name: 'employerOrganization', required:
|
|
5259
|
+
{ fieldType: 'common', name: 'employerActivities', required: false },
|
|
5260
|
+
{ fieldType: 'common', name: 'employerOrganization', required: false },
|
|
5013
5261
|
{ fieldType: 'common', name: 'generalSeniority', required: true },
|
|
5014
5262
|
{ fieldType: 'common', name: 'lastJobExperience', required: true },
|
|
5015
5263
|
{ fieldType: 'common', name: 'experience5Years', required: true },
|
|
@@ -5020,7 +5268,13 @@
|
|
|
5020
5268
|
inputs: [
|
|
5021
5269
|
{ fieldType: 'common', name: 'phone', label: 'Телефон работодателя', required: true },
|
|
5022
5270
|
{ fieldType: 'common', name: 'beginDate', required: true },
|
|
5023
|
-
|
|
5271
|
+
],
|
|
5272
|
+
},
|
|
5273
|
+
{
|
|
5274
|
+
columns: 2,
|
|
5275
|
+
inputs: [
|
|
5276
|
+
{ fieldType: 'common', name: 'positionOrganization', required: false },
|
|
5277
|
+
{ fieldType: 'common', name: 'partInBusiness', required: true },
|
|
5024
5278
|
],
|
|
5025
5279
|
},
|
|
5026
5280
|
{
|
|
@@ -5037,20 +5291,15 @@
|
|
|
5037
5291
|
},
|
|
5038
5292
|
{
|
|
5039
5293
|
columns: 1,
|
|
5040
|
-
inputs: [{ fieldType: 'common', name: 'familyStatus' }],
|
|
5294
|
+
inputs: [{ fieldType: 'common', name: 'familyStatus', required: true }],
|
|
5041
5295
|
},
|
|
5042
5296
|
{
|
|
5043
5297
|
columns: 1,
|
|
5044
|
-
inputs: [{ fieldType: 'common', name: 'dependents' }],
|
|
5298
|
+
inputs: [{ fieldType: 'common', name: 'dependents', required: true }],
|
|
5045
5299
|
},
|
|
5046
5300
|
{
|
|
5047
|
-
columns:
|
|
5048
|
-
inputs: [
|
|
5049
|
-
{ fieldType: 'common', name: 'familyMembers' },
|
|
5050
|
-
{ fieldType: 'common', name: 'familyMembers' },
|
|
5051
|
-
{ fieldType: 'common', name: 'retirementIncome' },
|
|
5052
|
-
{ fieldType: 'common', name: 'otherIncome' },
|
|
5053
|
-
],
|
|
5301
|
+
columns: 1,
|
|
5302
|
+
inputs: [{ fieldType: 'common', name: 'familyMembers', required: true }],
|
|
5054
5303
|
},
|
|
5055
5304
|
{
|
|
5056
5305
|
title: 'Совокупный доход',
|
|
@@ -5065,15 +5314,15 @@
|
|
|
5065
5314
|
},
|
|
5066
5315
|
{
|
|
5067
5316
|
columns: 1,
|
|
5068
|
-
inputs: [{ fieldType: 'common', name: 'mandatoryIncome' }],
|
|
5317
|
+
inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
|
|
5069
5318
|
},
|
|
5070
5319
|
{
|
|
5071
5320
|
columns: 1,
|
|
5072
|
-
inputs: [{ fieldType: 'common', name: 'otherPayments' }],
|
|
5321
|
+
inputs: [{ fieldType: 'common', name: 'otherPayments', required: true }],
|
|
5073
5322
|
},
|
|
5074
5323
|
{
|
|
5075
5324
|
columns: 1,
|
|
5076
|
-
inputs: [{ fieldType: 'common', name: 'snils' }],
|
|
5325
|
+
inputs: [{ fieldType: 'common', name: 'snils', required: true }],
|
|
5077
5326
|
},
|
|
5078
5327
|
{
|
|
5079
5328
|
columns: 2,
|
|
@@ -5109,10 +5358,10 @@
|
|
|
5109
5358
|
inputs: [],
|
|
5110
5359
|
},
|
|
5111
5360
|
{
|
|
5112
|
-
inputs: [{ fieldType: 'common', name: 'region' }],
|
|
5361
|
+
inputs: [{ fieldType: 'common', name: 'region', required: true }],
|
|
5113
5362
|
},
|
|
5114
5363
|
{
|
|
5115
|
-
inputs: [{ fieldType: 'common', name: 'addressBranch' }],
|
|
5364
|
+
inputs: [{ fieldType: 'common', name: 'addressBranch', required: true }],
|
|
5116
5365
|
},
|
|
5117
5366
|
{
|
|
5118
5367
|
title: 'Код представителя Банка',
|
|
@@ -5133,20 +5382,6 @@
|
|
|
5133
5382
|
],
|
|
5134
5383
|
};
|
|
5135
5384
|
|
|
5136
|
-
const StepsNavigationButtons = JSX(({ step, setStep, totalSteps }) => {
|
|
5137
|
-
const handleNext = () => {
|
|
5138
|
-
if (step < totalSteps) {
|
|
5139
|
-
setStep(step + 1);
|
|
5140
|
-
}
|
|
5141
|
-
};
|
|
5142
|
-
const handlePrev = () => {
|
|
5143
|
-
if (step > 1) {
|
|
5144
|
-
setStep(step - 1);
|
|
5145
|
-
}
|
|
5146
|
-
};
|
|
5147
|
-
return (jsxs("div", { className: 'flex justify-between', children: [jsx(Button, { onClick: handlePrev, className: style('w-full @xl:w-auto'), type: "button", version: "secondary", disabled: step === 1, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { onClick: handleNext, className: style('w-full @xl:w-auto'), type: "button", disabled: step === totalSteps, children: "\u0414\u0430\u043B\u0435\u0435" })] }));
|
|
5148
|
-
});
|
|
5149
|
-
|
|
5150
5385
|
const STEPS_COUNT = 5;
|
|
5151
5386
|
const STEPS_TITLES = [
|
|
5152
5387
|
'Персональные данные',
|
|
@@ -5155,21 +5390,19 @@
|
|
|
5155
5390
|
'Дополнительные сведения',
|
|
5156
5391
|
'Отделение Банка',
|
|
5157
5392
|
];
|
|
5158
|
-
const CreditForm = JSX(({ className,
|
|
5393
|
+
const CreditForm = JSX(({ className, ...rest }) => {
|
|
5159
5394
|
const [step, setStep] = useState(1);
|
|
5395
|
+
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
5160
5396
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
5161
|
-
const
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5397
|
+
const handleNextStep = useCallback(() => {
|
|
5398
|
+
setStep((_) => Math.min(_ + 1, STEPS_COUNT));
|
|
5399
|
+
}, []);
|
|
5400
|
+
const handlePrevStep = useCallback(() => {
|
|
5401
|
+
//TODO search hook - 1,
|
|
5402
|
+
setStep((_) => Math.max(_ - 1, 0));
|
|
5403
|
+
}, []);
|
|
5404
|
+
return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [jsx(CreditFormProgress, { stepsTitles: STEPS_TITLES, step: step, totalSteps: STEPS_COUNT }), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { inputs: inputs, totalSteps: STEPS_COUNT, step: step, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep }, String(step)) })] }) }));
|
|
5165
5405
|
});
|
|
5166
|
-
const renderStep$1 = ({ sections, field, typeForm }) => {
|
|
5167
|
-
return sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderInfo$1(_?.inputs), renderTitle(_?.title), renderInputs({ field, typeForm, inputs: _?.inputs })] }, `section-${i}`)));
|
|
5168
|
-
};
|
|
5169
|
-
const renderInfo$1 = (inputs = []) => {
|
|
5170
|
-
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
5171
|
-
return infoInputs.length ? infoInputs.map(({ text }) => jsx(InfoCard, { __html: text })) : null;
|
|
5172
|
-
};
|
|
5173
5406
|
|
|
5174
5407
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
5175
5408
|
|
|
@@ -7737,6 +7970,7 @@
|
|
|
7737
7970
|
AdTile,
|
|
7738
7971
|
ApplicationForm,
|
|
7739
7972
|
ApplicationLeadForm,
|
|
7973
|
+
ApplicationStatus,
|
|
7740
7974
|
BankAccountFiltration,
|
|
7741
7975
|
BenefitsBlock,
|
|
7742
7976
|
BonusBenefitsBlock,
|
|
@@ -7961,7 +8195,7 @@
|
|
|
7961
8195
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7962
8196
|
});
|
|
7963
8197
|
|
|
7964
|
-
const packageVersion = "0.14.
|
|
8198
|
+
const packageVersion = "0.14.616";
|
|
7965
8199
|
|
|
7966
8200
|
exports.Blocks = Blocks;
|
|
7967
8201
|
exports.ContentPage = ContentPage;
|