@redneckz/wildless-cms-uni-blocks 0.14.609 → 0.14.616
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 +384 -150
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- 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 +1 -0
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.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 +1 -0
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.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 +363 -150
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- 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 +1 -0
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.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 +1 -0
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +2 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.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 +1 -1
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +4 -1
- 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 +1 -1
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +4 -1
- 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 +27 -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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
/* eslint-disable max-len */
|
|
3
3
|
|
|
4
|
+
//TODO: DO List
|
|
4
5
|
export const stepsSectionsMap = {
|
|
5
6
|
1: [
|
|
6
7
|
{
|
|
@@ -33,24 +34,27 @@ export const stepsSectionsMap = {
|
|
|
33
34
|
{
|
|
34
35
|
fieldType: 'common',
|
|
35
36
|
name: 'education',
|
|
36
|
-
required: true,
|
|
37
37
|
},
|
|
38
38
|
],
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
title: 'Адрес регистрации по месту жительства',
|
|
42
|
+
columns: 1,
|
|
43
|
+
inputs: [],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
inputs: [{ fieldType: 'common', name: 'participantAddress', required: true, dadata: true }],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
42
49
|
columns: 2,
|
|
43
|
-
inputs: [
|
|
44
|
-
{ fieldType: 'common', name: 'participantAddress', required: true },
|
|
45
|
-
{ fieldType: 'common', name: 'participantAddress', required: true, dadata: true },
|
|
46
|
-
],
|
|
50
|
+
inputs: [{ fieldType: 'common', name: 'participantDateRegistration', required: true }],
|
|
47
51
|
},
|
|
48
52
|
{
|
|
49
53
|
title: 'Адрес фактического проживания (место пребывания РФ)',
|
|
50
54
|
columns: 2,
|
|
51
55
|
inputs: [
|
|
52
56
|
{ fieldType: 'common', name: 'fullAddress', required: true, dadata: true },
|
|
53
|
-
{ fieldType: 'common', name: 'housing'
|
|
57
|
+
{ fieldType: 'common', name: 'housing' },
|
|
54
58
|
],
|
|
55
59
|
},
|
|
56
60
|
],
|
|
@@ -69,7 +73,7 @@ export const stepsSectionsMap = {
|
|
|
69
73
|
},
|
|
70
74
|
{
|
|
71
75
|
inputs: [
|
|
72
|
-
{ fieldType: 'common', name: 'employment'
|
|
76
|
+
{ fieldType: 'common', name: 'employment' },
|
|
73
77
|
{ fieldType: 'common', name: 'organizationName', required: true, dadata: true },
|
|
74
78
|
],
|
|
75
79
|
},
|
|
@@ -82,15 +86,15 @@ export const stepsSectionsMap = {
|
|
|
82
86
|
},
|
|
83
87
|
{
|
|
84
88
|
inputs: [
|
|
85
|
-
{ fieldType: 'common', name: 'organization', required:
|
|
86
|
-
{ fieldType: 'common', name: 'amountWorkers', required:
|
|
89
|
+
{ fieldType: 'common', name: 'organization', required: false },
|
|
90
|
+
{ fieldType: 'common', name: 'amountWorkers', required: false },
|
|
87
91
|
],
|
|
88
92
|
},
|
|
89
93
|
{
|
|
90
94
|
columns: 2,
|
|
91
95
|
inputs: [
|
|
92
|
-
{ fieldType: 'common', name: 'employerActivities', required:
|
|
93
|
-
{ fieldType: 'common', name: 'employerOrganization', required:
|
|
96
|
+
{ fieldType: 'common', name: 'employerActivities', required: false },
|
|
97
|
+
{ fieldType: 'common', name: 'employerOrganization', required: false },
|
|
94
98
|
{ fieldType: 'common', name: 'generalSeniority', required: true },
|
|
95
99
|
{ fieldType: 'common', name: 'lastJobExperience', required: true },
|
|
96
100
|
{ fieldType: 'common', name: 'experience5Years', required: true },
|
|
@@ -101,7 +105,13 @@ export const stepsSectionsMap = {
|
|
|
101
105
|
inputs: [
|
|
102
106
|
{ fieldType: 'common', name: 'phone', label: 'Телефон работодателя', required: true },
|
|
103
107
|
{ fieldType: 'common', name: 'beginDate', required: true },
|
|
104
|
-
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
columns: 2,
|
|
112
|
+
inputs: [
|
|
113
|
+
{ fieldType: 'common', name: 'positionOrganization', required: false },
|
|
114
|
+
{ fieldType: 'common', name: 'partInBusiness', required: true },
|
|
105
115
|
],
|
|
106
116
|
},
|
|
107
117
|
{
|
|
@@ -118,20 +128,15 @@ export const stepsSectionsMap = {
|
|
|
118
128
|
},
|
|
119
129
|
{
|
|
120
130
|
columns: 1,
|
|
121
|
-
inputs: [{ fieldType: 'common', name: 'familyStatus' }],
|
|
131
|
+
inputs: [{ fieldType: 'common', name: 'familyStatus', required: true }],
|
|
122
132
|
},
|
|
123
133
|
{
|
|
124
134
|
columns: 1,
|
|
125
|
-
inputs: [{ fieldType: 'common', name: 'dependents' }],
|
|
135
|
+
inputs: [{ fieldType: 'common', name: 'dependents', required: true }],
|
|
126
136
|
},
|
|
127
137
|
{
|
|
128
|
-
columns:
|
|
129
|
-
inputs: [
|
|
130
|
-
{ fieldType: 'common', name: 'familyMembers' },
|
|
131
|
-
{ fieldType: 'common', name: 'familyMembers' },
|
|
132
|
-
{ fieldType: 'common', name: 'retirementIncome' },
|
|
133
|
-
{ fieldType: 'common', name: 'otherIncome' },
|
|
134
|
-
],
|
|
138
|
+
columns: 1,
|
|
139
|
+
inputs: [{ fieldType: 'common', name: 'familyMembers', required: true }],
|
|
135
140
|
},
|
|
136
141
|
{
|
|
137
142
|
title: 'Совокупный доход',
|
|
@@ -146,15 +151,15 @@ export const stepsSectionsMap = {
|
|
|
146
151
|
},
|
|
147
152
|
{
|
|
148
153
|
columns: 1,
|
|
149
|
-
inputs: [{ fieldType: 'common', name: 'mandatoryIncome' }],
|
|
154
|
+
inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
|
|
150
155
|
},
|
|
151
156
|
{
|
|
152
157
|
columns: 1,
|
|
153
|
-
inputs: [{ fieldType: 'common', name: 'otherPayments' }],
|
|
158
|
+
inputs: [{ fieldType: 'common', name: 'otherPayments', required: true }],
|
|
154
159
|
},
|
|
155
160
|
{
|
|
156
161
|
columns: 1,
|
|
157
|
-
inputs: [{ fieldType: 'common', name: 'snils' }],
|
|
162
|
+
inputs: [{ fieldType: 'common', name: 'snils', required: true }],
|
|
158
163
|
},
|
|
159
164
|
{
|
|
160
165
|
columns: 2,
|
|
@@ -190,10 +195,10 @@ export const stepsSectionsMap = {
|
|
|
190
195
|
inputs: [],
|
|
191
196
|
},
|
|
192
197
|
{
|
|
193
|
-
inputs: [{ fieldType: 'common', name: 'region' }],
|
|
198
|
+
inputs: [{ fieldType: 'common', name: 'region', required: true }],
|
|
194
199
|
},
|
|
195
200
|
{
|
|
196
|
-
inputs: [{ fieldType: 'common', name: 'addressBranch' }],
|
|
201
|
+
inputs: [{ fieldType: 'common', name: 'addressBranch', required: true }],
|
|
197
202
|
},
|
|
198
203
|
{
|
|
199
204
|
title: 'Код представителя Банка',
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { Option } from '../../ui-kit/Select/Option';
|
|
2
|
+
|
|
3
|
+
export interface FormStateMap {
|
|
4
|
+
1: {
|
|
5
|
+
surname?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
middleName?: string;
|
|
8
|
+
sex?: string;
|
|
9
|
+
birthday?: Date;
|
|
10
|
+
birthPlace?: string;
|
|
11
|
+
phone?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
dulSerie?: number;
|
|
14
|
+
dulNumber?: number;
|
|
15
|
+
dulIssueDateField?: Date;
|
|
16
|
+
dulSubdivisionCode?: string;
|
|
17
|
+
dulIssuedBy?: string;
|
|
18
|
+
participantAddress?: string;
|
|
19
|
+
participantDateRegistration?: Date;
|
|
20
|
+
fullAddress?: string;
|
|
21
|
+
housing?: string;
|
|
22
|
+
};
|
|
23
|
+
2: {
|
|
24
|
+
employment?: Option;
|
|
25
|
+
organizationName?: string;
|
|
26
|
+
inn?: number;
|
|
27
|
+
legalForm?: string;
|
|
28
|
+
organization?: Option;
|
|
29
|
+
amountWorkers?: Option;
|
|
30
|
+
employerActivities?: Option;
|
|
31
|
+
employerOrganization?: Option;
|
|
32
|
+
lastJobExperience?: string;
|
|
33
|
+
experience5Years?: string;
|
|
34
|
+
jobsNumber?: string;
|
|
35
|
+
phone?: string;
|
|
36
|
+
beginDate?: Date;
|
|
37
|
+
positionOrganization?: Option;
|
|
38
|
+
partInBusiness?: number;
|
|
39
|
+
fullAddress?: string;
|
|
40
|
+
};
|
|
41
|
+
3: {
|
|
42
|
+
familyStatus?: Option;
|
|
43
|
+
dependents?: number;
|
|
44
|
+
familyMembers?: number;
|
|
45
|
+
mandatoryIncome?: number;
|
|
46
|
+
otherPayments?: number;
|
|
47
|
+
snils?: string;
|
|
48
|
+
armyIdFlg?: boolean;
|
|
49
|
+
};
|
|
50
|
+
4: {
|
|
51
|
+
disablePeopleFlg?: string;
|
|
52
|
+
bankruptcyFlg?: string;
|
|
53
|
+
shareholderFlg?: string;
|
|
54
|
+
legalEntityName?: string;
|
|
55
|
+
creditInRshbCd?: string;
|
|
56
|
+
};
|
|
57
|
+
5: {
|
|
58
|
+
region?: string;
|
|
59
|
+
addressBranch?: string;
|
|
60
|
+
bankEmployeeCode?: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const formStateMap: FormStateMap = {
|
|
65
|
+
1: {
|
|
66
|
+
surname: '',
|
|
67
|
+
name: '',
|
|
68
|
+
middleName: '',
|
|
69
|
+
sex: '',
|
|
70
|
+
birthday: undefined,
|
|
71
|
+
birthPlace: '',
|
|
72
|
+
phone: '',
|
|
73
|
+
email: '',
|
|
74
|
+
dulSerie: undefined,
|
|
75
|
+
dulNumber: undefined,
|
|
76
|
+
dulIssueDateField: undefined,
|
|
77
|
+
dulSubdivisionCode: '',
|
|
78
|
+
dulIssuedBy: '',
|
|
79
|
+
participantAddress: '',
|
|
80
|
+
participantDateRegistration: undefined,
|
|
81
|
+
fullAddress: '',
|
|
82
|
+
housing: '',
|
|
83
|
+
},
|
|
84
|
+
2: {
|
|
85
|
+
employment: { key: '', text: '' },
|
|
86
|
+
organizationName: '',
|
|
87
|
+
inn: undefined,
|
|
88
|
+
legalForm: '',
|
|
89
|
+
organization: { key: '', text: '' },
|
|
90
|
+
amountWorkers: { key: '', text: '' },
|
|
91
|
+
employerActivities: { key: '', text: '' },
|
|
92
|
+
employerOrganization: { key: '', text: '' },
|
|
93
|
+
lastJobExperience: '',
|
|
94
|
+
experience5Years: '',
|
|
95
|
+
jobsNumber: '',
|
|
96
|
+
phone: '',
|
|
97
|
+
beginDate: undefined,
|
|
98
|
+
positionOrganization: { key: '', text: '' },
|
|
99
|
+
partInBusiness: undefined,
|
|
100
|
+
fullAddress: '',
|
|
101
|
+
},
|
|
102
|
+
3: {
|
|
103
|
+
familyStatus: { key: '', text: '' },
|
|
104
|
+
dependents: undefined,
|
|
105
|
+
familyMembers: undefined,
|
|
106
|
+
mandatoryIncome: undefined,
|
|
107
|
+
otherPayments: undefined,
|
|
108
|
+
snils: '',
|
|
109
|
+
armyIdFlg: false,
|
|
110
|
+
},
|
|
111
|
+
4: {
|
|
112
|
+
disablePeopleFlg: '',
|
|
113
|
+
bankruptcyFlg: '',
|
|
114
|
+
shareholderFlg: '',
|
|
115
|
+
legalEntityName: '',
|
|
116
|
+
creditInRshbCd: '',
|
|
117
|
+
},
|
|
118
|
+
5: {
|
|
119
|
+
region: '',
|
|
120
|
+
addressBranch: '',
|
|
121
|
+
bankEmployeeCode: '',
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export const getInitialFormState = <Step extends keyof FormStateMap>(
|
|
126
|
+
step: Step,
|
|
127
|
+
localStorageData: Record<string, any> | null,
|
|
128
|
+
): FormStateMap[Step] => {
|
|
129
|
+
if (localStorageData) {
|
|
130
|
+
// TODO: Fill in for other fields with type Date
|
|
131
|
+
// TODO: Take it out to the helper
|
|
132
|
+
localStorageData.birthday = localStorageData.dulIssueDateField = new Date(
|
|
133
|
+
(localStorageData?.birthday as string) || Date.now(),
|
|
134
|
+
);
|
|
135
|
+
localStorageData.participantDateRegistration = new Date(
|
|
136
|
+
(localStorageData?.participantDateRegistration as string) || Date.now(),
|
|
137
|
+
);
|
|
138
|
+
localStorageData.beginDate = new Date((localStorageData?.beginDate as string) || Date.now());
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
...formStateMap[step],
|
|
143
|
+
...localStorageData,
|
|
144
|
+
};
|
|
145
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
|
|
3
|
+
import { objectValidator } from '../../validation/objectValidator';
|
|
4
|
+
import { isValidationSuccess } from '../../validation/validator';
|
|
5
|
+
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
6
|
+
import { type FormStateMap } from './getInitialFormState';
|
|
7
|
+
|
|
8
|
+
type CreditFormApiProps = {
|
|
9
|
+
inputs: FieldDef[];
|
|
10
|
+
onNextStep: () => void;
|
|
11
|
+
saveStep: (value: Record<string, any>) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const useCreditFormApi = ({ inputs, onNextStep, saveStep }: CreditFormApiProps) => {
|
|
15
|
+
const handleSubmit = useCallback(async (formData: FormStateMap[keyof FormStateMap]) => {
|
|
16
|
+
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
17
|
+
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
18
|
+
return 'Fail';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// TODO: add updateUserTask here
|
|
23
|
+
} catch (ex) {
|
|
24
|
+
return 'Fail';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
saveStep(formData);
|
|
28
|
+
onNextStep();
|
|
29
|
+
|
|
30
|
+
return 'OK';
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
handleSubmit,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -10,9 +10,9 @@ import { type ControlProps } from '../ControlProps';
|
|
|
10
10
|
import { Icon } from '../Icon/Icon';
|
|
11
11
|
import { type IconName } from '../Icon/IconProps';
|
|
12
12
|
import { renderLabel } from '../Input/renderLabel';
|
|
13
|
-
import { Paragraph } from '../Paragraph/Paragraph';
|
|
14
13
|
import { Select } from '../Select/Select';
|
|
15
14
|
import { Calendar } from './Calendar';
|
|
15
|
+
import { DatePickerInput } from './DatePickerInput';
|
|
16
16
|
import { months } from './months';
|
|
17
17
|
import { useDatePickerManager } from './useDatePickerManager';
|
|
18
18
|
|
|
@@ -30,7 +30,7 @@ const SELECT_PROPS: { className: string; iconVersion: IconVersion; isBorder: boo
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
const formStyle =
|
|
33
|
-
'flex justify-between items-center h-14
|
|
33
|
+
'flex justify-between items-center h-14 py-s border rounded-md cursor-pointer ' +
|
|
34
34
|
'hover:border-black active:border-black focus:border-black';
|
|
35
35
|
|
|
36
36
|
interface DatePickerProps extends ControlProps<Date>, LabelProps {
|
|
@@ -41,6 +41,7 @@ interface DatePickerProps extends ControlProps<Date>, LabelProps {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export const DatePicker = JSX<DatePickerProps>(
|
|
44
|
+
// eslint-disable-next-line max-lines-per-function
|
|
44
45
|
({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
|
|
45
46
|
const [showCalendar, { setValue }] = useBool(false);
|
|
46
47
|
const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
|
|
@@ -64,6 +65,8 @@ export const DatePicker = JSX<DatePickerProps>(
|
|
|
64
65
|
selectedYear,
|
|
65
66
|
selectedMonth,
|
|
66
67
|
showCalendar,
|
|
68
|
+
onChange,
|
|
69
|
+
value,
|
|
67
70
|
});
|
|
68
71
|
|
|
69
72
|
const spaceAbove = useElementSpace(ref, 370);
|
|
@@ -72,7 +75,14 @@ export const DatePicker = JSX<DatePickerProps>(
|
|
|
72
75
|
<div className={style('space-y-xs', className)} ref={ref}>
|
|
73
76
|
{renderLabel(label)}
|
|
74
77
|
<div className="relative">
|
|
75
|
-
{renderDatePickerForm(
|
|
78
|
+
{renderDatePickerForm({
|
|
79
|
+
handleChangeVisibleCalendar,
|
|
80
|
+
value,
|
|
81
|
+
valid,
|
|
82
|
+
onChange,
|
|
83
|
+
setSelectedMonth,
|
|
84
|
+
setSelectedYear,
|
|
85
|
+
})}
|
|
76
86
|
{showCalendar ? (
|
|
77
87
|
<div
|
|
78
88
|
className={style('absolute bg-white z-20 select-none', {
|
|
@@ -116,16 +126,27 @@ export const DatePicker = JSX<DatePickerProps>(
|
|
|
116
126
|
},
|
|
117
127
|
);
|
|
118
128
|
|
|
119
|
-
const renderDatePickerForm = (
|
|
120
|
-
handleChangeVisibleCalendar
|
|
121
|
-
value
|
|
122
|
-
valid
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
const renderDatePickerForm = ({
|
|
130
|
+
handleChangeVisibleCalendar,
|
|
131
|
+
value,
|
|
132
|
+
valid,
|
|
133
|
+
onChange,
|
|
134
|
+
setSelectedMonth,
|
|
135
|
+
setSelectedYear,
|
|
136
|
+
}: {
|
|
137
|
+
handleChangeVisibleCalendar: () => void;
|
|
138
|
+
value: Date | undefined;
|
|
139
|
+
valid: boolean;
|
|
140
|
+
setSelectedMonth: (selectedMonth: number) => void;
|
|
141
|
+
setSelectedYear: (selectedYear: number) => void;
|
|
142
|
+
onChange?: (value: Date) => void;
|
|
143
|
+
}) => (
|
|
144
|
+
<DatePickerInput
|
|
145
|
+
onChange={onChange}
|
|
125
146
|
onClick={handleChangeVisibleCalendar}
|
|
147
|
+
value={value && formatDate(value)}
|
|
148
|
+
setSelectedMonth={setSelectedMonth}
|
|
149
|
+
setSelectedYear={setSelectedYear}
|
|
126
150
|
className={style(formStyle, valid ? 'border-gray' : 'border-error')}
|
|
127
|
-
>
|
|
128
|
-
<Paragraph>{value && formatDate(value)}</Paragraph>
|
|
129
|
-
<Icon {...ICON_PROPS} name="CalendarIcon" />
|
|
130
|
-
</div>
|
|
151
|
+
></DatePickerInput>
|
|
131
152
|
);
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useEffect, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { type IconVersion } from '../../model/IconVersion';
|
|
4
|
+
import { normalizeWithMask } from '../../utils/normalizeWithMask';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
import { Icon } from '../Icon/Icon';
|
|
7
|
+
import { type IconName } from '../Icon/IconProps';
|
|
8
|
+
import { START_YEAR } from './getYears';
|
|
9
|
+
|
|
10
|
+
const ICON_PROPS: { name: IconName; iconVersion: IconVersion; width: string; height: string } = {
|
|
11
|
+
name: 'CalendarIcon',
|
|
12
|
+
iconVersion: 'black',
|
|
13
|
+
width: '24',
|
|
14
|
+
height: '24',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
interface DatePickerInputProps {
|
|
18
|
+
setSelectedMonth: (selectedMonth: number) => void;
|
|
19
|
+
setSelectedYear: (selectedYear: number) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
onChange?: (value: Date) => void;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const DatePickerInput = JSX<DatePickerInputProps>(
|
|
27
|
+
({ setSelectedMonth, setSelectedYear, className, value, onChange, onClick }) => {
|
|
28
|
+
const ref = useRef<HTMLInputElement | null>(null);
|
|
29
|
+
const [inputValue, setInputValue] = useState<string>(value || '');
|
|
30
|
+
|
|
31
|
+
const handleChange = (ev: { target?: { value?: string } }) => {
|
|
32
|
+
const val = ev.target?.value;
|
|
33
|
+
if (typeof val === 'string' && val?.length < 11) {
|
|
34
|
+
setInputValue(normalizeWithMask(val, '__.__.____'));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const onBlur = () => {
|
|
39
|
+
if (checkIsValidDate(inputValue)) {
|
|
40
|
+
const [day, month, year] = inputValue.split('.');
|
|
41
|
+
onChange?.(new Date(Number(year), Number(month) - 1, Number(day)));
|
|
42
|
+
setSelectedMonth(Number(month) - 1);
|
|
43
|
+
setSelectedYear(Number(year));
|
|
44
|
+
} else {
|
|
45
|
+
setInputValue(value || '');
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const onInputClick = () => {
|
|
50
|
+
if (ref.current !== null) {
|
|
51
|
+
ref.current.focus();
|
|
52
|
+
}
|
|
53
|
+
onClick?.();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
setInputValue(value || '');
|
|
58
|
+
}, [value]);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<div onClick={onInputClick} className={style('relative', className)}>
|
|
62
|
+
<input
|
|
63
|
+
ref={ref}
|
|
64
|
+
className="h-full w-full px-m text-l text-black focus-visible:outline-none"
|
|
65
|
+
value={inputValue}
|
|
66
|
+
type="text"
|
|
67
|
+
onChange={handleChange}
|
|
68
|
+
onBlur={onBlur}
|
|
69
|
+
/>
|
|
70
|
+
<Icon className="mr-s" {...ICON_PROPS} />
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
const isValidYear = (year: string) =>
|
|
77
|
+
Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
|
|
78
|
+
|
|
79
|
+
const isValidMonth = (month: string) => Number(month) > 0 && Number(month) < 13;
|
|
80
|
+
|
|
81
|
+
const checkIsValidDate = (date: string) => {
|
|
82
|
+
const [day, month, year] = date.split('.');
|
|
83
|
+
|
|
84
|
+
if (isValidYear(year)) {
|
|
85
|
+
if (isValidMonth(month)) {
|
|
86
|
+
const currentDate = new Date(Number(year), Number(month) - 1, 1);
|
|
87
|
+
let maxDateOfMonth = 0;
|
|
88
|
+
while (currentDate.getMonth() === Number(month) - 1) {
|
|
89
|
+
currentDate.setDate(currentDate.getDate() + 1);
|
|
90
|
+
maxDateOfMonth++;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (Number(day) > 0 && Number(day) <= maxDateOfMonth) {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return false;
|
|
100
|
+
};
|
|
@@ -17,6 +17,8 @@ interface UseDatePickerManagerParams {
|
|
|
17
17
|
onMonthSelect: (num: number) => void;
|
|
18
18
|
selectedYear: number;
|
|
19
19
|
onYearSelect: (num: number) => void;
|
|
20
|
+
onChange?: (date: Date) => void;
|
|
21
|
+
value?: Date;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export const useDatePickerManager = ({
|
|
@@ -26,6 +28,8 @@ export const useDatePickerManager = ({
|
|
|
26
28
|
onMonthSelect,
|
|
27
29
|
onYearSelect,
|
|
28
30
|
selectedYear,
|
|
31
|
+
onChange,
|
|
32
|
+
value,
|
|
29
33
|
}: UseDatePickerManagerParams) => {
|
|
30
34
|
const close = useCallback(() => showCalendar && onShowCalendar(false), [showCalendar]);
|
|
31
35
|
const ref = useOutsideClick<HTMLDivElement>(close);
|
|
@@ -54,10 +58,26 @@ export const useDatePickerManager = ({
|
|
|
54
58
|
}, [selectedMonth]);
|
|
55
59
|
|
|
56
60
|
const handleSelectMonth = useCallback(
|
|
57
|
-
({ key }: Option) =>
|
|
58
|
-
|
|
61
|
+
({ key }: Option) => {
|
|
62
|
+
onMonthSelect(months.indexOf(key));
|
|
63
|
+
const maxDateOfMonth = calculateMaxDaysOfMonth(selectedYear, months.indexOf(key));
|
|
64
|
+
handleChangeMonth({
|
|
65
|
+
maxDateOfMonth,
|
|
66
|
+
selectedYear,
|
|
67
|
+
selectedMonth: months.indexOf(key),
|
|
68
|
+
value,
|
|
69
|
+
onChange,
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
[value],
|
|
73
|
+
);
|
|
74
|
+
const handleSelectYear = useCallback(
|
|
75
|
+
({ key }: Option) => {
|
|
76
|
+
onYearSelect(Number(key));
|
|
77
|
+
value && onChange?.(new Date(Number(key), selectedMonth, value?.getDate()));
|
|
78
|
+
},
|
|
79
|
+
[value],
|
|
59
80
|
);
|
|
60
|
-
const handleSelectYear = useCallback(({ key }: Option) => onYearSelect(Number(key)), []);
|
|
61
81
|
|
|
62
82
|
return {
|
|
63
83
|
handleChangeVisibleCalendar,
|
|
@@ -70,3 +90,31 @@ export const useDatePickerManager = ({
|
|
|
70
90
|
ref,
|
|
71
91
|
};
|
|
72
92
|
};
|
|
93
|
+
|
|
94
|
+
const calculateMaxDaysOfMonth = (selectedYear: number, selectedMonth: number) => {
|
|
95
|
+
const date = new Date(selectedYear, selectedMonth, 1);
|
|
96
|
+
let maxDateOfMonth = 0;
|
|
97
|
+
while (date.getMonth() === selectedMonth) {
|
|
98
|
+
maxDateOfMonth++;
|
|
99
|
+
date.setDate(date.getDate() + 1);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return maxDateOfMonth;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const handleChangeMonth = ({
|
|
106
|
+
maxDateOfMonth,
|
|
107
|
+
selectedYear,
|
|
108
|
+
selectedMonth,
|
|
109
|
+
value,
|
|
110
|
+
onChange,
|
|
111
|
+
}: {
|
|
112
|
+
maxDateOfMonth: number;
|
|
113
|
+
selectedYear: number;
|
|
114
|
+
selectedMonth: number;
|
|
115
|
+
value?: Date;
|
|
116
|
+
onChange?: (value: Date) => void;
|
|
117
|
+
}) => {
|
|
118
|
+
value &&
|
|
119
|
+
onChange?.(new Date(selectedYear, selectedMonth, Math.min(maxDateOfMonth, value.getDate())));
|
|
120
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { InputNumberControl } from '../../Input/InputNumberControl';
|
|
3
3
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
4
|
import { validatorObj } from '../getObjectValidator';
|
|
5
5
|
import { getValidation } from '../getValidation';
|
|
6
6
|
|
|
7
7
|
export const DependentsField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
8
|
-
<
|
|
8
|
+
<InputNumberControl
|
|
9
9
|
label="Количество иждивенцев"
|
|
10
10
|
placeholder="За исключение детей до 18 лет"
|
|
11
|
-
|
|
11
|
+
inputLength={2}
|
|
12
12
|
{...getValidation(field('dependents'), validatorObj.dependents, input?.required)}
|
|
13
13
|
{...input}
|
|
14
14
|
/>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { InputNumberControl } from '../../Input/InputNumberControl';
|
|
3
3
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
4
|
import { validatorObj } from '../getObjectValidator';
|
|
5
5
|
import { getValidation } from '../getValidation';
|
|
6
6
|
|
|
7
7
|
export const DulNumberField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
8
|
-
<
|
|
8
|
+
<InputNumberControl
|
|
9
9
|
label="Номер документа"
|
|
10
|
-
|
|
10
|
+
inputLength={6}
|
|
11
11
|
{...getValidation(field('dulNumber'), validatorObj.dulNumber, input?.required)}
|
|
12
12
|
/>
|
|
13
13
|
));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { InputNumberControl } from '../../Input/InputNumberControl';
|
|
3
3
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
4
|
import { validatorObj } from '../getObjectValidator';
|
|
5
5
|
import { getValidation } from '../getValidation';
|
|
6
6
|
|
|
7
7
|
export const DulSerieField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
8
|
-
<
|
|
8
|
+
<InputNumberControl
|
|
9
9
|
label="Серия документа"
|
|
10
|
-
|
|
10
|
+
inputLength={4}
|
|
11
11
|
{...getValidation(field('dulSerie'), validatorObj.dulSerie, input?.required)}
|
|
12
12
|
/>
|
|
13
13
|
));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type DaDataSuggestion } from '../../../api/dadataHints/dadataHintsType';
|
|
4
|
-
import {
|
|
4
|
+
import { InputNumberControl } from '../../Input/InputNumberControl';
|
|
5
5
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
6
6
|
import { validatorObj } from '../getObjectValidator';
|
|
7
7
|
import { getValidation } from '../getValidation';
|
|
@@ -12,10 +12,10 @@ export const DulSubdivisionCodeField = JSX<CustomFieldProps>(({ field, input })
|
|
|
12
12
|
}, []);
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<
|
|
15
|
+
<InputNumberControl
|
|
16
16
|
label="Код подразделения"
|
|
17
|
-
type="number"
|
|
18
17
|
{...input}
|
|
18
|
+
inputLength={6}
|
|
19
19
|
{...getValidation(
|
|
20
20
|
field('dulSubdivisionCode'),
|
|
21
21
|
validatorObj.dulSubdivisionCode,
|