@redneckz/wildless-cms-uni-blocks 0.14.989 → 0.14.990
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/api/LeadServiceAPI.d.ts +8 -2
- package/bundle/api/getSubmitBody.d.ts +201 -97
- package/bundle/api/sendFile.d.ts +16 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +562 -50
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +8 -2
- package/bundle/components/ApplicationForm/constants.d.ts +7 -0
- package/bundle/components/ApplicationForm/handlers.d.ts +3 -2
- package/bundle/hooks/useDragAndDrop.d.ts +16 -0
- package/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/bundle/model/InputTypes.d.ts +1 -1
- package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/bundle/ui-kit/FormField/Fields/AddressBranchField.d.ts +1 -2
- package/bundle/ui-kit/FormField/Fields/AverageGradeField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/FileIdField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/FileUpload.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/InternshipEndDateField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/InternshipStartDateField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/SelectField.d.ts +6 -0
- package/bundle/ui-kit/FormField/Fields/TextField.d.ts +2 -0
- package/bundle/ui-kit/FormField/InputsMap.d.ts +62 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/constants.d.ts +3 -0
- package/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/bundle/ui-kit/Input/InputFile.d.ts +2 -0
- package/bundle/ui-kit/Input/InputFileControl.d.ts +2 -0
- package/bundle/ui-kit/Input/InputProps.d.ts +6 -1
- package/bundle/ui-kit/Input/checks/checkFIleExtension.d.ts +1 -0
- package/bundle/ui-kit/Input/checks/checkFileMimeType.d.ts +1 -0
- package/bundle/ui-kit/Input/checks/checkFileSignature.d.ts +3 -0
- package/bundle/ui-kit/Input/checks/checkFileSize.d.ts +1 -0
- package/bundle/ui-kit/Input/checks/getFileSignature.d.ts +1 -0
- package/bundle/ui-kit/Input/constants.d.ts +6 -0
- package/bundle/ui-kit/Input/renderFileInput.d.ts +12 -0
- package/bundle/ui-kit/Input/renderInfoText.d.ts +1 -0
- package/bundle/ui-kit/Input/styles.d.ts +2 -0
- package/bundle/ui-kit/Input/useVerifyFile.d.ts +17 -0
- package/bundle/ui-kit/PreventableEvent.d.ts +4 -0
- package/bundle/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
- package/bundle/utils/animateStepWithMinDuration.d.ts +8 -0
- package/bundle/utils/isDateValid.d.ts +4 -0
- package/dist/api/LeadServiceAPI.d.ts +8 -2
- package/dist/api/LeadServiceAPI.js +18 -8
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/api/getSubmitBody.d.ts +201 -97
- package/dist/api/getSubmitBody.js +13 -6
- package/dist/api/getSubmitBody.js.map +1 -1
- package/dist/api/sendFile.d.ts +16 -0
- package/dist/api/sendFile.js +78 -0
- package/dist/api/sendFile.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +5 -6
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +8 -2
- package/dist/components/ApplicationForm/constants.d.ts +7 -0
- package/dist/components/ApplicationForm/constants.js +29 -0
- package/dist/components/ApplicationForm/constants.js.map +1 -0
- package/dist/components/ApplicationForm/handlers.d.ts +3 -2
- package/dist/components/ApplicationForm/handlers.js +3 -3
- package/dist/components/ApplicationForm/handlers.js.map +1 -1
- package/dist/hooks/useDragAndDrop.d.ts +16 -0
- package/dist/hooks/useDragAndDrop.js +29 -0
- package/dist/hooks/useDragAndDrop.js.map +1 -0
- package/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/dist/model/InputTypes.d.ts +1 -1
- package/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/dist/ui-kit/FormField/Fields/AddressBranchField.d.ts +1 -2
- package/dist/ui-kit/FormField/Fields/AverageGradeField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/AverageGradeField.js +9 -0
- package/dist/ui-kit/FormField/Fields/AverageGradeField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/BirthdayField.js +4 -1
- package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CommentField.js +1 -1
- package/dist/ui-kit/FormField/Fields/CommentField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/FileIdField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/FileIdField.js +7 -0
- package/dist/ui-kit/FormField/Fields/FileIdField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/FileUpload.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/FileUpload.js +14 -0
- package/dist/ui-kit/FormField/Fields/FileUpload.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/InternshipEndDateField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/InternshipEndDateField.js +23 -0
- package/dist/ui-kit/FormField/Fields/InternshipEndDateField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/InternshipStartDateField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/InternshipStartDateField.js +23 -0
- package/dist/ui-kit/FormField/Fields/InternshipStartDateField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/SelectField.d.ts +6 -0
- package/dist/ui-kit/FormField/Fields/SelectField.js +7 -0
- package/dist/ui-kit/FormField/Fields/SelectField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/TextField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/TextField.js +7 -0
- package/dist/ui-kit/FormField/Fields/TextField.js.map +1 -0
- package/dist/ui-kit/FormField/InputsMap.d.ts +62 -0
- package/dist/ui-kit/FormField/InputsMap.js +119 -0
- package/dist/ui-kit/FormField/InputsMap.js.map +1 -0
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/constants.d.ts +3 -0
- package/dist/ui-kit/FormField/constants.js +27 -1
- package/dist/ui-kit/FormField/constants.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +2 -94
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +15 -1
- 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 +4 -1
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +2 -2
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputFile.d.ts +2 -0
- package/dist/ui-kit/Input/InputFile.js +75 -0
- package/dist/ui-kit/Input/InputFile.js.map +1 -0
- package/dist/ui-kit/Input/InputFileControl.d.ts +2 -0
- package/dist/ui-kit/Input/InputFileControl.js +10 -0
- package/dist/ui-kit/Input/InputFileControl.js.map +1 -0
- package/dist/ui-kit/Input/InputProps.d.ts +6 -1
- package/dist/ui-kit/Input/checks/checkFIleExtension.d.ts +1 -0
- package/dist/ui-kit/Input/checks/checkFIleExtension.js +12 -0
- package/dist/ui-kit/Input/checks/checkFIleExtension.js.map +1 -0
- package/dist/ui-kit/Input/checks/checkFileMimeType.d.ts +1 -0
- package/dist/ui-kit/Input/checks/checkFileMimeType.js +20 -0
- package/dist/ui-kit/Input/checks/checkFileMimeType.js.map +1 -0
- package/dist/ui-kit/Input/checks/checkFileSignature.d.ts +3 -0
- package/dist/ui-kit/Input/checks/checkFileSignature.js +25 -0
- package/dist/ui-kit/Input/checks/checkFileSignature.js.map +1 -0
- package/dist/ui-kit/Input/checks/checkFileSize.d.ts +1 -0
- package/dist/ui-kit/Input/checks/checkFileSize.js +13 -0
- package/dist/ui-kit/Input/checks/checkFileSize.js.map +1 -0
- package/dist/ui-kit/Input/checks/getFileSignature.d.ts +1 -0
- package/dist/ui-kit/Input/checks/getFileSignature.js +19 -0
- package/dist/ui-kit/Input/checks/getFileSignature.js.map +1 -0
- package/dist/ui-kit/Input/constants.d.ts +6 -0
- package/dist/ui-kit/Input/constants.js +9 -0
- package/dist/ui-kit/Input/constants.js.map +1 -0
- package/dist/ui-kit/Input/renderFileInput.d.ts +12 -0
- package/dist/ui-kit/Input/renderFileInput.js +33 -0
- package/dist/ui-kit/Input/renderFileInput.js.map +1 -0
- package/dist/ui-kit/Input/renderInfoText.d.ts +1 -0
- package/dist/ui-kit/Input/renderInfoText.js +14 -0
- package/dist/ui-kit/Input/renderInfoText.js.map +1 -0
- package/dist/ui-kit/Input/styles.d.ts +2 -0
- package/dist/ui-kit/Input/styles.js +5 -0
- package/dist/ui-kit/Input/styles.js.map +1 -0
- package/dist/ui-kit/Input/useVerifyFile.d.ts +17 -0
- package/dist/ui-kit/Input/useVerifyFile.js +64 -0
- package/dist/ui-kit/Input/useVerifyFile.js.map +1 -0
- package/dist/ui-kit/PreventableEvent.d.ts +4 -0
- package/dist/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/ui-kit/ProgressBar/ProgressBar.js +1 -1
- package/dist/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/utils/animateStepWithMinDuration.d.ts +8 -0
- package/dist/utils/animateStepWithMinDuration.js +26 -0
- package/dist/utils/animateStepWithMinDuration.js.map +1 -0
- package/dist/utils/isDateValid.d.ts +4 -0
- package/dist/utils/isDateValid.js +24 -0
- package/dist/utils/isDateValid.js.map +1 -0
- package/lib/api/LeadServiceAPI.d.ts +8 -2
- package/lib/api/LeadServiceAPI.js +18 -8
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/api/getSubmitBody.d.ts +201 -97
- package/lib/api/getSubmitBody.js +13 -6
- package/lib/api/getSubmitBody.js.map +1 -1
- package/lib/api/sendFile.d.ts +16 -0
- package/lib/api/sendFile.js +75 -0
- package/lib/api/sendFile.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +2 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +5 -6
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +8 -2
- package/lib/components/ApplicationForm/constants.d.ts +7 -0
- package/lib/components/ApplicationForm/constants.js +27 -0
- package/lib/components/ApplicationForm/constants.js.map +1 -0
- package/lib/components/ApplicationForm/handlers.d.ts +3 -2
- package/lib/components/ApplicationForm/handlers.js +3 -3
- package/lib/components/ApplicationForm/handlers.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/hooks/useDragAndDrop.d.ts +16 -0
- package/lib/hooks/useDragAndDrop.js +26 -0
- package/lib/hooks/useDragAndDrop.js.map +1 -0
- package/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/lib/model/InputTypes.d.ts +1 -1
- package/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/lib/ui-kit/FormField/Fields/AddressBranchField.d.ts +1 -2
- package/lib/ui-kit/FormField/Fields/AverageGradeField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/AverageGradeField.js +7 -0
- package/lib/ui-kit/FormField/Fields/AverageGradeField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/BirthdayField.js +4 -1
- package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CommentField.js +1 -1
- package/lib/ui-kit/FormField/Fields/CommentField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/FileIdField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/FileIdField.js +5 -0
- package/lib/ui-kit/FormField/Fields/FileIdField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/FileUpload.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/FileUpload.js +12 -0
- package/lib/ui-kit/FormField/Fields/FileUpload.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/InternshipEndDateField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/InternshipEndDateField.js +21 -0
- package/lib/ui-kit/FormField/Fields/InternshipEndDateField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/InternshipStartDateField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/InternshipStartDateField.js +21 -0
- package/lib/ui-kit/FormField/Fields/InternshipStartDateField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/SelectField.d.ts +6 -0
- package/lib/ui-kit/FormField/Fields/SelectField.js +5 -0
- package/lib/ui-kit/FormField/Fields/SelectField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/TextField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/TextField.js +5 -0
- package/lib/ui-kit/FormField/Fields/TextField.js.map +1 -0
- package/lib/ui-kit/FormField/InputsMap.d.ts +62 -0
- package/lib/ui-kit/FormField/InputsMap.js +117 -0
- package/lib/ui-kit/FormField/InputsMap.js.map +1 -0
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/constants.d.ts +3 -0
- package/lib/ui-kit/FormField/constants.js +26 -0
- package/lib/ui-kit/FormField/constants.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +1 -93
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +16 -2
- 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 +2 -0
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputFile.d.ts +2 -0
- package/lib/ui-kit/Input/InputFile.js +73 -0
- package/lib/ui-kit/Input/InputFile.js.map +1 -0
- package/lib/ui-kit/Input/InputFileControl.d.ts +2 -0
- package/lib/ui-kit/Input/InputFileControl.js +8 -0
- package/lib/ui-kit/Input/InputFileControl.js.map +1 -0
- package/lib/ui-kit/Input/InputProps.d.ts +6 -1
- package/lib/ui-kit/Input/checks/checkFIleExtension.d.ts +1 -0
- package/lib/ui-kit/Input/checks/checkFIleExtension.js +9 -0
- package/lib/ui-kit/Input/checks/checkFIleExtension.js.map +1 -0
- package/lib/ui-kit/Input/checks/checkFileMimeType.d.ts +1 -0
- package/lib/ui-kit/Input/checks/checkFileMimeType.js +17 -0
- package/lib/ui-kit/Input/checks/checkFileMimeType.js.map +1 -0
- package/lib/ui-kit/Input/checks/checkFileSignature.d.ts +3 -0
- package/lib/ui-kit/Input/checks/checkFileSignature.js +22 -0
- package/lib/ui-kit/Input/checks/checkFileSignature.js.map +1 -0
- package/lib/ui-kit/Input/checks/checkFileSize.d.ts +1 -0
- package/lib/ui-kit/Input/checks/checkFileSize.js +10 -0
- package/lib/ui-kit/Input/checks/checkFileSize.js.map +1 -0
- package/lib/ui-kit/Input/checks/getFileSignature.d.ts +1 -0
- package/lib/ui-kit/Input/checks/getFileSignature.js +16 -0
- package/lib/ui-kit/Input/checks/getFileSignature.js.map +1 -0
- package/lib/ui-kit/Input/constants.d.ts +6 -0
- package/lib/ui-kit/Input/constants.js +7 -0
- package/lib/ui-kit/Input/constants.js.map +1 -0
- package/lib/ui-kit/Input/renderFileInput.d.ts +12 -0
- package/lib/ui-kit/Input/renderFileInput.js +30 -0
- package/lib/ui-kit/Input/renderFileInput.js.map +1 -0
- package/lib/ui-kit/Input/renderInfoText.d.ts +1 -0
- package/lib/ui-kit/Input/renderInfoText.js +11 -0
- package/lib/ui-kit/Input/renderInfoText.js.map +1 -0
- package/lib/ui-kit/Input/styles.d.ts +2 -0
- package/lib/ui-kit/Input/styles.js +3 -0
- package/lib/ui-kit/Input/styles.js.map +1 -0
- package/lib/ui-kit/Input/useVerifyFile.d.ts +17 -0
- package/lib/ui-kit/Input/useVerifyFile.js +61 -0
- package/lib/ui-kit/Input/useVerifyFile.js.map +1 -0
- package/lib/ui-kit/PreventableEvent.d.ts +4 -0
- package/lib/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
- package/lib/ui-kit/ProgressBar/ProgressBar.js +1 -1
- package/lib/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/utils/animateStepWithMinDuration.d.ts +8 -0
- package/lib/utils/animateStepWithMinDuration.js +23 -0
- package/lib/utils/animateStepWithMinDuration.js.map +1 -0
- package/lib/utils/isDateValid.d.ts +4 -0
- package/lib/utils/isDateValid.js +21 -0
- package/lib/utils/isDateValid.js.map +1 -0
- package/mobile/bundle/api/LeadServiceAPI.d.ts +8 -2
- package/mobile/bundle/api/getSubmitBody.d.ts +201 -97
- package/mobile/bundle/api/sendFile.d.ts +16 -0
- package/mobile/bundle/bundle.umd.js +562 -50
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +8 -2
- package/mobile/bundle/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/bundle/components/ApplicationForm/handlers.d.ts +3 -2
- package/mobile/bundle/hooks/useDragAndDrop.d.ts +16 -0
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/bundle/model/InputTypes.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/FormField/Fields/AddressBranchField.d.ts +1 -2
- package/mobile/bundle/ui-kit/FormField/Fields/AverageGradeField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/FileIdField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/FileUpload.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/InternshipEndDateField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/InternshipStartDateField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/SelectField.d.ts +6 -0
- package/mobile/bundle/ui-kit/FormField/Fields/TextField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/InputsMap.d.ts +62 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/constants.d.ts +3 -0
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/InputFile.d.ts +2 -0
- package/mobile/bundle/ui-kit/Input/InputFileControl.d.ts +2 -0
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +6 -1
- package/mobile/bundle/ui-kit/Input/checks/checkFIleExtension.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/checks/checkFileMimeType.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/checks/checkFileSignature.d.ts +3 -0
- package/mobile/bundle/ui-kit/Input/checks/checkFileSize.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/checks/getFileSignature.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/constants.d.ts +6 -0
- package/mobile/bundle/ui-kit/Input/renderFileInput.d.ts +12 -0
- package/mobile/bundle/ui-kit/Input/renderInfoText.d.ts +1 -0
- package/mobile/bundle/ui-kit/Input/styles.d.ts +2 -0
- package/mobile/bundle/ui-kit/Input/useVerifyFile.d.ts +17 -0
- package/mobile/bundle/ui-kit/PreventableEvent.d.ts +4 -0
- package/mobile/bundle/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
- package/mobile/bundle/utils/animateStepWithMinDuration.d.ts +8 -0
- package/mobile/bundle/utils/isDateValid.d.ts +4 -0
- package/mobile/dist/api/LeadServiceAPI.d.ts +8 -2
- package/mobile/dist/api/LeadServiceAPI.js +18 -8
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/api/getSubmitBody.d.ts +201 -97
- package/mobile/dist/api/getSubmitBody.js +13 -6
- package/mobile/dist/api/getSubmitBody.js.map +1 -1
- package/mobile/dist/api/sendFile.d.ts +16 -0
- package/mobile/dist/api/sendFile.js +78 -0
- package/mobile/dist/api/sendFile.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +5 -6
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +8 -2
- package/mobile/dist/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/dist/components/ApplicationForm/constants.js +29 -0
- package/mobile/dist/components/ApplicationForm/constants.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/handlers.d.ts +3 -2
- package/mobile/dist/components/ApplicationForm/handlers.js +3 -3
- package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/dist/hooks/useDragAndDrop.d.ts +16 -0
- package/mobile/dist/hooks/useDragAndDrop.js +29 -0
- package/mobile/dist/hooks/useDragAndDrop.js.map +1 -0
- package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/dist/model/InputTypes.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/AddressBranchField.d.ts +1 -2
- package/mobile/dist/ui-kit/FormField/Fields/AverageGradeField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/AverageGradeField.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/AverageGradeField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +4 -1
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CommentField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CommentField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/FileIdField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/FileIdField.js +7 -0
- package/mobile/dist/ui-kit/FormField/Fields/FileIdField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/FileUpload.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/FileUpload.js +14 -0
- package/mobile/dist/ui-kit/FormField/Fields/FileUpload.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/InternshipEndDateField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/InternshipEndDateField.js +23 -0
- package/mobile/dist/ui-kit/FormField/Fields/InternshipEndDateField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/InternshipStartDateField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/InternshipStartDateField.js +23 -0
- package/mobile/dist/ui-kit/FormField/Fields/InternshipStartDateField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/SelectField.d.ts +6 -0
- package/mobile/dist/ui-kit/FormField/Fields/SelectField.js +7 -0
- package/mobile/dist/ui-kit/FormField/Fields/SelectField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/TextField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/TextField.js +7 -0
- package/mobile/dist/ui-kit/FormField/Fields/TextField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/InputsMap.d.ts +62 -0
- package/mobile/dist/ui-kit/FormField/InputsMap.js +119 -0
- package/mobile/dist/ui-kit/FormField/InputsMap.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/constants.d.ts +3 -0
- package/mobile/dist/ui-kit/FormField/constants.js +27 -1
- package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +2 -94
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +15 -1
- 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 +4 -1
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +2 -2
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputFile.d.ts +2 -0
- package/mobile/dist/ui-kit/Input/InputFile.js +75 -0
- package/mobile/dist/ui-kit/Input/InputFile.js.map +1 -0
- package/mobile/dist/ui-kit/Input/InputFileControl.d.ts +2 -0
- package/mobile/dist/ui-kit/Input/InputFileControl.js +10 -0
- package/mobile/dist/ui-kit/Input/InputFileControl.js.map +1 -0
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +6 -1
- package/mobile/dist/ui-kit/Input/checks/checkFIleExtension.d.ts +1 -0
- package/mobile/dist/ui-kit/Input/checks/checkFIleExtension.js +12 -0
- package/mobile/dist/ui-kit/Input/checks/checkFIleExtension.js.map +1 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileMimeType.d.ts +1 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileMimeType.js +20 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileMimeType.js.map +1 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileSignature.d.ts +3 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileSignature.js +25 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileSignature.js.map +1 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileSize.d.ts +1 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileSize.js +13 -0
- package/mobile/dist/ui-kit/Input/checks/checkFileSize.js.map +1 -0
- package/mobile/dist/ui-kit/Input/checks/getFileSignature.d.ts +1 -0
- package/mobile/dist/ui-kit/Input/checks/getFileSignature.js +19 -0
- package/mobile/dist/ui-kit/Input/checks/getFileSignature.js.map +1 -0
- package/mobile/dist/ui-kit/Input/constants.d.ts +6 -0
- package/mobile/dist/ui-kit/Input/constants.js +9 -0
- package/mobile/dist/ui-kit/Input/constants.js.map +1 -0
- package/mobile/dist/ui-kit/Input/renderFileInput.d.ts +12 -0
- package/mobile/dist/ui-kit/Input/renderFileInput.js +33 -0
- package/mobile/dist/ui-kit/Input/renderFileInput.js.map +1 -0
- package/mobile/dist/ui-kit/Input/renderInfoText.d.ts +1 -0
- package/mobile/dist/ui-kit/Input/renderInfoText.js +14 -0
- package/mobile/dist/ui-kit/Input/renderInfoText.js.map +1 -0
- package/mobile/dist/ui-kit/Input/styles.d.ts +2 -0
- package/mobile/dist/ui-kit/Input/styles.js +5 -0
- package/mobile/dist/ui-kit/Input/styles.js.map +1 -0
- package/mobile/dist/ui-kit/Input/useVerifyFile.d.ts +17 -0
- package/mobile/dist/ui-kit/Input/useVerifyFile.js +64 -0
- package/mobile/dist/ui-kit/Input/useVerifyFile.js.map +1 -0
- package/mobile/dist/ui-kit/PreventableEvent.d.ts +4 -0
- package/mobile/dist/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
- package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js +1 -1
- package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
- package/mobile/dist/utils/animateStepWithMinDuration.d.ts +8 -0
- package/mobile/dist/utils/animateStepWithMinDuration.js +26 -0
- package/mobile/dist/utils/animateStepWithMinDuration.js.map +1 -0
- package/mobile/dist/utils/isDateValid.d.ts +4 -0
- package/mobile/dist/utils/isDateValid.js +24 -0
- package/mobile/dist/utils/isDateValid.js.map +1 -0
- package/mobile/lib/api/LeadServiceAPI.d.ts +8 -2
- package/mobile/lib/api/LeadServiceAPI.js +18 -8
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/api/getSubmitBody.d.ts +201 -97
- package/mobile/lib/api/getSubmitBody.js +13 -6
- package/mobile/lib/api/getSubmitBody.js.map +1 -1
- package/mobile/lib/api/sendFile.d.ts +16 -0
- package/mobile/lib/api/sendFile.js +75 -0
- package/mobile/lib/api/sendFile.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +5 -6
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +8 -2
- package/mobile/lib/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/lib/components/ApplicationForm/constants.js +27 -0
- package/mobile/lib/components/ApplicationForm/constants.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/handlers.d.ts +3 -2
- package/mobile/lib/components/ApplicationForm/handlers.js +3 -3
- package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -1
- package/mobile/lib/hooks/useDragAndDrop.d.ts +16 -0
- package/mobile/lib/hooks/useDragAndDrop.js +26 -0
- package/mobile/lib/hooks/useDragAndDrop.js.map +1 -0
- package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/lib/model/InputTypes.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/AddressBranchField.d.ts +1 -2
- package/mobile/lib/ui-kit/FormField/Fields/AverageGradeField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/AverageGradeField.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/AverageGradeField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +4 -1
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CommentField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CommentField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/FileIdField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/FileIdField.js +5 -0
- package/mobile/lib/ui-kit/FormField/Fields/FileIdField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/FileUpload.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/FileUpload.js +12 -0
- package/mobile/lib/ui-kit/FormField/Fields/FileUpload.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/InternshipEndDateField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/InternshipEndDateField.js +21 -0
- package/mobile/lib/ui-kit/FormField/Fields/InternshipEndDateField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/InternshipStartDateField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/InternshipStartDateField.js +21 -0
- package/mobile/lib/ui-kit/FormField/Fields/InternshipStartDateField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/SelectField.d.ts +6 -0
- package/mobile/lib/ui-kit/FormField/Fields/SelectField.js +5 -0
- package/mobile/lib/ui-kit/FormField/Fields/SelectField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/TextField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/TextField.js +5 -0
- package/mobile/lib/ui-kit/FormField/Fields/TextField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/InputsMap.d.ts +62 -0
- package/mobile/lib/ui-kit/FormField/InputsMap.js +117 -0
- package/mobile/lib/ui-kit/FormField/InputsMap.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/constants.d.ts +3 -0
- package/mobile/lib/ui-kit/FormField/constants.js +26 -0
- package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +1 -93
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +16 -2
- 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 +2 -0
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputFile.d.ts +2 -0
- package/mobile/lib/ui-kit/Input/InputFile.js +73 -0
- package/mobile/lib/ui-kit/Input/InputFile.js.map +1 -0
- package/mobile/lib/ui-kit/Input/InputFileControl.d.ts +2 -0
- package/mobile/lib/ui-kit/Input/InputFileControl.js +8 -0
- package/mobile/lib/ui-kit/Input/InputFileControl.js.map +1 -0
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +6 -1
- package/mobile/lib/ui-kit/Input/checks/checkFIleExtension.d.ts +1 -0
- package/mobile/lib/ui-kit/Input/checks/checkFIleExtension.js +9 -0
- package/mobile/lib/ui-kit/Input/checks/checkFIleExtension.js.map +1 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileMimeType.d.ts +1 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileMimeType.js +17 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileMimeType.js.map +1 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileSignature.d.ts +3 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileSignature.js +22 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileSignature.js.map +1 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileSize.d.ts +1 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileSize.js +10 -0
- package/mobile/lib/ui-kit/Input/checks/checkFileSize.js.map +1 -0
- package/mobile/lib/ui-kit/Input/checks/getFileSignature.d.ts +1 -0
- package/mobile/lib/ui-kit/Input/checks/getFileSignature.js +16 -0
- package/mobile/lib/ui-kit/Input/checks/getFileSignature.js.map +1 -0
- package/mobile/lib/ui-kit/Input/constants.d.ts +6 -0
- package/mobile/lib/ui-kit/Input/constants.js +7 -0
- package/mobile/lib/ui-kit/Input/constants.js.map +1 -0
- package/mobile/lib/ui-kit/Input/renderFileInput.d.ts +12 -0
- package/mobile/lib/ui-kit/Input/renderFileInput.js +30 -0
- package/mobile/lib/ui-kit/Input/renderFileInput.js.map +1 -0
- package/mobile/lib/ui-kit/Input/renderInfoText.d.ts +1 -0
- package/mobile/lib/ui-kit/Input/renderInfoText.js +11 -0
- package/mobile/lib/ui-kit/Input/renderInfoText.js.map +1 -0
- package/mobile/lib/ui-kit/Input/styles.d.ts +2 -0
- package/mobile/lib/ui-kit/Input/styles.js +3 -0
- package/mobile/lib/ui-kit/Input/styles.js.map +1 -0
- package/mobile/lib/ui-kit/Input/useVerifyFile.d.ts +17 -0
- package/mobile/lib/ui-kit/Input/useVerifyFile.js +61 -0
- package/mobile/lib/ui-kit/Input/useVerifyFile.js.map +1 -0
- package/mobile/lib/ui-kit/PreventableEvent.d.ts +4 -0
- package/mobile/lib/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
- package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js +1 -1
- package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
- package/mobile/lib/utils/animateStepWithMinDuration.d.ts +8 -0
- package/mobile/lib/utils/animateStepWithMinDuration.js +23 -0
- package/mobile/lib/utils/animateStepWithMinDuration.js.map +1 -0
- package/mobile/lib/utils/isDateValid.d.ts +4 -0
- package/mobile/lib/utils/isDateValid.js +21 -0
- package/mobile/lib/utils/isDateValid.js.map +1 -0
- package/mobile/src/api/LeadServiceAPI.ts +29 -9
- package/mobile/src/api/getSubmitBody.ts +28 -7
- package/mobile/src/api/sendFile.ts +97 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +192 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +22 -16
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +16 -2
- package/mobile/src/components/ApplicationForm/constants.ts +33 -0
- package/mobile/src/components/ApplicationForm/handlers.ts +5 -3
- package/mobile/src/hooks/useDragAndDrop.ts +48 -0
- package/mobile/src/model/FormTypeFieldDef.ts +2 -1
- package/mobile/src/model/InputTypes.ts +1 -1
- package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +1 -0
- package/mobile/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/AverageGradeField.tsx +14 -0
- package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +12 -7
- package/mobile/src/ui-kit/FormField/Fields/CommentField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/FileIdField.tsx +7 -0
- package/mobile/src/ui-kit/FormField/Fields/FileUpload.tsx +22 -0
- package/mobile/src/ui-kit/FormField/Fields/InternshipEndDateField.tsx +38 -0
- package/mobile/src/ui-kit/FormField/Fields/InternshipStartDateField.tsx +38 -0
- package/mobile/src/ui-kit/FormField/Fields/SelectField.tsx +12 -0
- package/mobile/src/ui-kit/FormField/Fields/TextField.tsx +7 -0
- package/mobile/src/ui-kit/FormField/InputsMap.tsx +133 -0
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +17 -1
- package/mobile/src/ui-kit/FormField/constants.tsx +29 -0
- package/mobile/src/ui-kit/FormField/getField.tsx +1 -105
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +16 -1
- package/mobile/src/ui-kit/FormField/validators.ts +4 -0
- package/mobile/src/ui-kit/Input/Input.tsx +1 -2
- package/mobile/src/ui-kit/Input/InputFile.tsx +132 -0
- package/mobile/src/ui-kit/Input/InputFileControl.tsx +22 -0
- package/mobile/src/ui-kit/Input/InputProps.ts +10 -1
- package/mobile/src/ui-kit/Input/checks/checkFIleExtension.ts +9 -0
- package/mobile/src/ui-kit/Input/checks/checkFileMimeType.ts +20 -0
- package/mobile/src/ui-kit/Input/checks/checkFileSignature.ts +30 -0
- package/mobile/src/ui-kit/Input/checks/checkFileSize.ts +10 -0
- package/mobile/src/ui-kit/Input/checks/getFileSignature.ts +16 -0
- package/mobile/src/ui-kit/Input/constants.ts +6 -0
- package/mobile/src/ui-kit/Input/renderFileInput.tsx +87 -0
- package/mobile/src/ui-kit/Input/renderInfoText.tsx +15 -0
- package/mobile/src/ui-kit/Input/styles.ts +2 -0
- package/mobile/src/ui-kit/Input/useVerifyFile.ts +100 -0
- package/mobile/src/ui-kit/PreventableEvent.ts +5 -0
- package/mobile/src/ui-kit/ProgressBar/ProgressBar.tsx +7 -2
- package/mobile/src/utils/animateStepWithMinDuration.ts +38 -0
- package/mobile/src/utils/isDateValid.ts +33 -0
- package/package.json +2 -2
- package/src/api/LeadServiceAPI.ts +29 -9
- package/src/api/getSubmitBody.ts +28 -7
- package/src/api/sendFile.ts +97 -0
- package/src/components/ApplicationForm/ApplicationForm.example.json +192 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +132 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +22 -16
- package/src/components/ApplicationForm/ApplicationFormContent.ts +16 -2
- package/src/components/ApplicationForm/constants.ts +33 -0
- package/src/components/ApplicationForm/handlers.ts +5 -3
- package/src/hooks/useDragAndDrop.ts +48 -0
- package/src/model/FormTypeFieldDef.ts +2 -1
- package/src/model/InputTypes.ts +1 -1
- package/src/ui-kit/FormField/CustomFieldProps.ts +1 -0
- package/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/AverageGradeField.tsx +14 -0
- package/src/ui-kit/FormField/Fields/BirthdayField.tsx +12 -7
- package/src/ui-kit/FormField/Fields/CommentField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/FileIdField.tsx +7 -0
- package/src/ui-kit/FormField/Fields/FileUpload.tsx +22 -0
- package/src/ui-kit/FormField/Fields/InternshipEndDateField.tsx +38 -0
- package/src/ui-kit/FormField/Fields/InternshipStartDateField.tsx +38 -0
- package/src/ui-kit/FormField/Fields/SelectField.tsx +12 -0
- package/src/ui-kit/FormField/Fields/TextField.tsx +7 -0
- package/src/ui-kit/FormField/InputsMap.tsx +133 -0
- package/src/ui-kit/FormField/NameFieldDef.ts +17 -1
- package/src/ui-kit/FormField/constants.tsx +29 -0
- package/src/ui-kit/FormField/getField.tsx +1 -105
- package/src/ui-kit/FormField/getObjectValidator.tsx +16 -1
- package/src/ui-kit/FormField/validators.ts +4 -0
- package/src/ui-kit/Input/Input.tsx +1 -2
- package/src/ui-kit/Input/InputFile.tsx +132 -0
- package/src/ui-kit/Input/InputFileControl.tsx +22 -0
- package/src/ui-kit/Input/InputProps.ts +10 -1
- package/src/ui-kit/Input/checks/checkFIleExtension.ts +9 -0
- package/src/ui-kit/Input/checks/checkFileMimeType.ts +20 -0
- package/src/ui-kit/Input/checks/checkFileSignature.ts +30 -0
- package/src/ui-kit/Input/checks/checkFileSize.ts +10 -0
- package/src/ui-kit/Input/checks/getFileSignature.ts +16 -0
- package/src/ui-kit/Input/constants.ts +6 -0
- package/src/ui-kit/Input/renderFileInput.tsx +87 -0
- package/src/ui-kit/Input/renderInfoText.tsx +15 -0
- package/src/ui-kit/Input/styles.ts +2 -0
- package/src/ui-kit/Input/useVerifyFile.ts +100 -0
- package/src/ui-kit/PreventableEvent.ts +5 -0
- package/src/ui-kit/ProgressBar/ProgressBar.tsx +7 -2
- package/src/utils/animateStepWithMinDuration.ts +38 -0
- package/src/utils/isDateValid.ts +33 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface AnimateProgressProps {
|
|
2
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
onUpdate: (value: number) => void;
|
|
5
|
+
minDuration: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const animateStepWithMinDuration: ({ from, to, onUpdate, minDuration, }: AnimateProgressProps) => Promise<void>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { noop } from './noop.js';
|
|
2
|
+
export const animateStepWithMinDuration = ({ from, to, onUpdate = noop, minDuration = 300, }) => {
|
|
3
|
+
return new Promise((resolve) => {
|
|
4
|
+
const startTime = performance.now();
|
|
5
|
+
const animate = () => {
|
|
6
|
+
const currentTime = performance.now();
|
|
7
|
+
const elapsed = currentTime - startTime;
|
|
8
|
+
const animationProgress = Math.min(elapsed / minDuration, 1);
|
|
9
|
+
const easeProgress = 1 - Math.pow(1 - animationProgress, 3);
|
|
10
|
+
const value = from + (to - from) * easeProgress;
|
|
11
|
+
onUpdate(value);
|
|
12
|
+
if (animationProgress < 1) {
|
|
13
|
+
requestAnimationFrame(animate);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
onUpdate(to);
|
|
17
|
+
resolve();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
requestAnimationFrame(animate);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=animateStepWithMinDuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animateStepWithMinDuration.js","sourceRoot":"","sources":["../../src/utils/animateStepWithMinDuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAS9B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,IAAI,EACJ,EAAE,EACF,QAAQ,GAAG,IAAI,EACf,WAAW,GAAG,GAAG,GACI,EAAiB,EAAE;IACxC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAEpC,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YACtC,MAAM,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;YACxC,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC;YAC7D,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,iBAAiB,EAAE,CAAC,CAAC,CAAC;YAC5D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,YAAY,CAAC;YAEhD,QAAQ,CAAC,KAAK,CAAC,CAAC;YAEhB,IAAI,iBAAiB,GAAG,CAAC,EAAE;gBACzB,qBAAqB,CAAC,OAAO,CAAC,CAAC;aAChC;iBAAM;gBACL,QAAQ,CAAC,EAAE,CAAC,CAAC;gBACb,OAAO,EAAE,CAAC;aACX;QACH,CAAC,CAAC;QAEF,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const isDateValid = (value, limits) => {
|
|
2
|
+
if (!value || isNaN(value.getTime())) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
const { minLimit, maxLimit } = limits;
|
|
6
|
+
const time = value.getTime();
|
|
7
|
+
return isValidMin(time, minLimit) && isValidMax(time, maxLimit);
|
|
8
|
+
};
|
|
9
|
+
const isValidMin = (time, minLimit) => {
|
|
10
|
+
if (!minLimit || isNaN(minLimit.getTime())) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return time > minLimit.getTime();
|
|
14
|
+
};
|
|
15
|
+
const isValidMax = (time, maxLimit) => {
|
|
16
|
+
if (!maxLimit || isNaN(maxLimit.getTime())) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return time < maxLimit.getTime();
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=isDateValid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isDateValid.js","sourceRoot":"","sources":["../../src/utils/isDateValid.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,KAAW,EACX,MAGC,EACQ,EAAE;IACX,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE;QACpC,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAEtC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;IAE7B,OAAO,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,QAAsB,EAAW,EAAE;IACnE,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE;QAC1C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,IAAI,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,QAAsB,EAAW,EAAE;IACnE,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE;QAC1C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,IAAI,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;AACnC,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JSONRecord, type JSONScalar } from '@redneckz/json-op';
|
|
2
|
+
import { type EndpointType } from '../components/ApplicationForm/ApplicationFormContent';
|
|
2
3
|
import { type Router } from '../external/useRouter';
|
|
3
4
|
import { getUserTimezoneOffset } from '../utils/getTimezone';
|
|
4
5
|
import { API_BASE_URI } from './apiBaseUrl';
|
|
@@ -42,15 +43,24 @@ type PhoneOnly = {
|
|
|
42
43
|
phone?: string;
|
|
43
44
|
};
|
|
44
45
|
|
|
46
|
+
export type sendProps = {
|
|
47
|
+
body: LeadRequest;
|
|
48
|
+
router: Router;
|
|
49
|
+
endpoint?: EndpointType;
|
|
50
|
+
};
|
|
51
|
+
|
|
45
52
|
type SubmitBody = PhoneOnly | LeadRequest | CheckCodeProps | VerifiedLeadRequest;
|
|
46
53
|
|
|
47
54
|
export function LeadServiceAPI() {
|
|
48
|
-
async function send(body
|
|
49
|
-
const
|
|
55
|
+
async function send({ body, router, endpoint }: sendProps) {
|
|
56
|
+
const calculatedEndpoint = endpoint && getEndpoint(endpoint, body);
|
|
57
|
+
const url = `${API_BASE_URI}/${calculatedEndpoint}`;
|
|
50
58
|
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
const submitBody = getSubmitBody({
|
|
60
|
+
body,
|
|
61
|
+
endpoint,
|
|
62
|
+
router,
|
|
63
|
+
});
|
|
54
64
|
|
|
55
65
|
try {
|
|
56
66
|
const response = await LeadServiceFetch(url, submitBody);
|
|
@@ -88,8 +98,8 @@ export function LeadServiceAPI() {
|
|
|
88
98
|
async function checkCode({ reqId, code, body }: CheckCodeProps): Promise<CheckCodeResponse> {
|
|
89
99
|
const submitBody = {
|
|
90
100
|
requestId: reqId,
|
|
91
|
-
confimationCode: code,
|
|
92
|
-
leadRequest: getSubmitBody(body
|
|
101
|
+
confimationCode: code, // не исправлять опечатку!
|
|
102
|
+
leadRequest: getSubmitBody({ body }),
|
|
93
103
|
};
|
|
94
104
|
try {
|
|
95
105
|
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
@@ -100,9 +110,9 @@ export function LeadServiceAPI() {
|
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
112
|
|
|
103
|
-
async function sendPhoneCallRequest(body: LeadRequest,
|
|
113
|
+
async function sendPhoneCallRequest(body: LeadRequest, endpoint?: EndpointType) {
|
|
104
114
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
105
|
-
const submitBody = getSubmitBody(body,
|
|
115
|
+
const submitBody = getSubmitBody({ body, endpoint });
|
|
106
116
|
|
|
107
117
|
const formatSubmitBody = getFormatCallbackSubmitBody(submitBody);
|
|
108
118
|
|
|
@@ -145,3 +155,13 @@ const getFormatCallbackSubmitBody = (submitBody: Partial<LeadRequest>): SubmitBo
|
|
|
145
155
|
clientTimezone: getUserTimezoneOffset(),
|
|
146
156
|
};
|
|
147
157
|
};
|
|
158
|
+
|
|
159
|
+
const getEndpoint = (endpoint: EndpointType, body: LeadRequest) => {
|
|
160
|
+
const { serviceDirection } = body;
|
|
161
|
+
|
|
162
|
+
if (endpoint === 'lead' && serviceDirection !== 'Юридическое лицо / ИП') {
|
|
163
|
+
return 'lead';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return endpoint;
|
|
167
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { JSONRecord, JSONScalar } from '@redneckz/json-op';
|
|
2
|
+
import { type EndpointType } from '../components/ApplicationForm/ApplicationFormContent';
|
|
3
|
+
import { ENDPOINT_MAPPING } from '../components/ApplicationForm/constants';
|
|
2
4
|
import type { Router } from '../external/useRouter';
|
|
3
5
|
import { formatDate } from '../utils/formatDate';
|
|
4
6
|
import { formatPhone } from '../utils/formatPhone';
|
|
@@ -10,7 +12,19 @@ type PFFormData = {
|
|
|
10
12
|
partnerSymbolCode?: string;
|
|
11
13
|
};
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
type submitBodyProps = {
|
|
16
|
+
body: LeadRequest;
|
|
17
|
+
endpoint?: EndpointType;
|
|
18
|
+
isNaturalPerson?: boolean;
|
|
19
|
+
router?: Router;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type DateField = [string, string];
|
|
23
|
+
|
|
24
|
+
export const getSubmitBody = ({ body, endpoint, router }: submitBodyProps) => {
|
|
25
|
+
const isNaturalPerson = endpoint && ENDPOINT_MAPPING[endpoint].isNaturalEndpoint;
|
|
26
|
+
const withTypeForm = endpoint && ENDPOINT_MAPPING[endpoint].withTypeForm;
|
|
27
|
+
|
|
14
28
|
const {
|
|
15
29
|
typeForm,
|
|
16
30
|
region,
|
|
@@ -18,7 +32,6 @@ export const getSubmitBody = (body: LeadRequest, isNaturalPerson: boolean, route
|
|
|
18
32
|
email,
|
|
19
33
|
birthday,
|
|
20
34
|
desiredMeetingDate,
|
|
21
|
-
inn,
|
|
22
35
|
fullRegion,
|
|
23
36
|
addressBranch,
|
|
24
37
|
secondaryPhone = '',
|
|
@@ -27,17 +40,23 @@ export const getSubmitBody = (body: LeadRequest, isNaturalPerson: boolean, route
|
|
|
27
40
|
partnerName,
|
|
28
41
|
russianPhone,
|
|
29
42
|
partnerSymbolCode,
|
|
43
|
+
internshipEndDate,
|
|
44
|
+
internshipStartDate,
|
|
30
45
|
...staticBody
|
|
31
46
|
} = body;
|
|
32
47
|
|
|
33
48
|
return {
|
|
34
|
-
typeForm,
|
|
49
|
+
...(withTypeForm ? { typeForm } : {}),
|
|
35
50
|
...getRegion(region, isNaturalPerson),
|
|
36
51
|
...getEmail(email, isNaturalPerson),
|
|
37
52
|
...getPhone(phone),
|
|
38
53
|
...getPhone(russianPhone),
|
|
39
|
-
...getFormatDate(
|
|
40
|
-
...
|
|
54
|
+
...(isNaturalPerson ? getFormatDate([[birthday as string, 'birthday']]) : { birthday }),
|
|
55
|
+
...getFormatDate([
|
|
56
|
+
[desiredMeetingDate as string, 'desiredMeetingDate'],
|
|
57
|
+
[internshipEndDate as string, 'internshipEndDate'],
|
|
58
|
+
[internshipStartDate as string, 'internshipStartDate'],
|
|
59
|
+
]),
|
|
41
60
|
...(typeForm === 'FEEDBACK'
|
|
42
61
|
? {}
|
|
43
62
|
: {
|
|
@@ -64,8 +83,10 @@ export const getPhoneBody = (phone?: string) => {
|
|
|
64
83
|
|
|
65
84
|
export const getPhone = (phone?: string) => (phone ? { phone: formatPhone(phone) } : {});
|
|
66
85
|
|
|
67
|
-
const getFormatDate = (
|
|
68
|
-
|
|
86
|
+
const getFormatDate = (dates: DateField[]): Record<string, string> =>
|
|
87
|
+
Object.fromEntries(
|
|
88
|
+
dates.filter(([value]) => value).map(([value, key]) => [key, formatDate(value)]),
|
|
89
|
+
);
|
|
69
90
|
|
|
70
91
|
const getRegion = (region: JSONRecord | JSONScalar | null, isNaturalPerson = true) => ({
|
|
71
92
|
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { DEFAULT_ERROR_TEXT } from '../ui-kit/Input/constants';
|
|
2
|
+
import { noop } from '../utils/noop';
|
|
3
|
+
import { API_BASE_URI } from './apiBaseUrl';
|
|
4
|
+
|
|
5
|
+
const FILE_CHECK_URL = 'uploadFile';
|
|
6
|
+
export const SUCCESS_STATUS = 'SUCCESS';
|
|
7
|
+
export const ERROR_STATUS = 'ERROR';
|
|
8
|
+
export type StatusType = typeof SUCCESS_STATUS | typeof ERROR_STATUS;
|
|
9
|
+
type ErrorCode = '0' | '1';
|
|
10
|
+
|
|
11
|
+
export interface CheckFileProps {
|
|
12
|
+
file: File;
|
|
13
|
+
onProgress?: (value: number) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type ResponseData = {
|
|
17
|
+
status?: StatusType;
|
|
18
|
+
fileId?: string;
|
|
19
|
+
errorDesc?: string;
|
|
20
|
+
errorCode?: ErrorCode;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export async function sendFile({ file, onProgress = noop }: CheckFileProps): Promise<ResponseData> {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
const formData = new FormData();
|
|
26
|
+
formData.append('file', file);
|
|
27
|
+
|
|
28
|
+
let processingAnimation: number | undefined = undefined;
|
|
29
|
+
|
|
30
|
+
const xhr = new XMLHttpRequest();
|
|
31
|
+
let lastProgress: number;
|
|
32
|
+
xhr.upload.onprogress = (event) => {
|
|
33
|
+
if (event.lengthComputable) {
|
|
34
|
+
const percentComplete = (event.loaded / event.total) * 50;
|
|
35
|
+
onProgress(percentComplete);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
xhr.upload.onload = () => {
|
|
40
|
+
let current = 50;
|
|
41
|
+
onProgress(current);
|
|
42
|
+
|
|
43
|
+
processingAnimation = window.setInterval(() => {
|
|
44
|
+
current += 0.2;
|
|
45
|
+
lastProgress = current;
|
|
46
|
+
if (current < 90) {
|
|
47
|
+
onProgress(current);
|
|
48
|
+
} else {
|
|
49
|
+
onProgress(90);
|
|
50
|
+
window.clearInterval(processingAnimation);
|
|
51
|
+
}
|
|
52
|
+
}, 100);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
xhr.onload = async () => {
|
|
56
|
+
try {
|
|
57
|
+
const response: ResponseData = JSON.parse(xhr.responseText);
|
|
58
|
+
if (response.status === 'SUCCESS') {
|
|
59
|
+
window.clearInterval(processingAnimation);
|
|
60
|
+
await animateToFull(lastProgress, onProgress);
|
|
61
|
+
resolve(response);
|
|
62
|
+
} else {
|
|
63
|
+
reject(new Error(response.errorDesc ?? DEFAULT_ERROR_TEXT));
|
|
64
|
+
}
|
|
65
|
+
} catch (e) {
|
|
66
|
+
reject(new Error(DEFAULT_ERROR_TEXT));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
xhr.onerror = () => {
|
|
71
|
+
reject(new Error(DEFAULT_ERROR_TEXT));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
xhr.open('POST', `${API_BASE_URI}/${FILE_CHECK_URL}`);
|
|
75
|
+
xhr.send(formData);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const animateToFull = (current: number, onProgress: (value: number) => void): Promise<void> =>
|
|
80
|
+
new Promise((resolve) => {
|
|
81
|
+
let value = current;
|
|
82
|
+
const increment = (100 - current) / 30;
|
|
83
|
+
const interval = 16;
|
|
84
|
+
|
|
85
|
+
const step = () => {
|
|
86
|
+
value += increment;
|
|
87
|
+
if (value >= 100) {
|
|
88
|
+
onProgress(100);
|
|
89
|
+
resolve();
|
|
90
|
+
} else {
|
|
91
|
+
onProgress(value);
|
|
92
|
+
setTimeout(step, interval);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
step();
|
|
97
|
+
});
|
|
@@ -1590,5 +1590,197 @@
|
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
+
],
|
|
1594
|
+
[
|
|
1595
|
+
"Форма практики",
|
|
1596
|
+
{
|
|
1597
|
+
"content": {
|
|
1598
|
+
"version": "primary",
|
|
1599
|
+
"padding": "",
|
|
1600
|
+
"title": "Подать заявку на прохождение практики",
|
|
1601
|
+
"typeForm": "PRACTICE",
|
|
1602
|
+
"endpoint": "practice",
|
|
1603
|
+
"sections": [
|
|
1604
|
+
{ "title": "О себе", "inputs": [] },
|
|
1605
|
+
{
|
|
1606
|
+
"inputs": [
|
|
1607
|
+
{
|
|
1608
|
+
"name": "fullname",
|
|
1609
|
+
"required": true
|
|
1610
|
+
}
|
|
1611
|
+
]
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"columns": 2,
|
|
1615
|
+
"inputs": [
|
|
1616
|
+
{
|
|
1617
|
+
"name": "birthday",
|
|
1618
|
+
"required": true
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
"name": "phone",
|
|
1622
|
+
"required": true
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"name": "email",
|
|
1626
|
+
"required": true
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"name": "cityOfResidence",
|
|
1630
|
+
"required": true
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
"name": "internshipStartDate",
|
|
1634
|
+
"required": true
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"name": "internshipEndDate",
|
|
1638
|
+
"required": true
|
|
1639
|
+
}
|
|
1640
|
+
]
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"title": "Образование и опыт",
|
|
1644
|
+
"columns": 2,
|
|
1645
|
+
"inputs": [
|
|
1646
|
+
{ "name": "university", "required": true },
|
|
1647
|
+
{ "name": "fieldOfStudy", "required": true },
|
|
1648
|
+
{ "name": "courseYear", "required": true },
|
|
1649
|
+
{ "name": "graduationYear", "required": true },
|
|
1650
|
+
{ "name": "averageGrade", "required": true },
|
|
1651
|
+
{ "name": "educationLevel", "required": true }
|
|
1652
|
+
]
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"inputs": [
|
|
1656
|
+
{
|
|
1657
|
+
"name": "skillsAndKnowledge",
|
|
1658
|
+
"placeholder": "Навыки и знания. Что умеете делать?",
|
|
1659
|
+
"required": true
|
|
1660
|
+
}
|
|
1661
|
+
]
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"inputs": [
|
|
1665
|
+
{
|
|
1666
|
+
"name": "fileUpload",
|
|
1667
|
+
"label": "Прикрепите ваше резюме",
|
|
1668
|
+
"extensions": ["pdf", "doc", "docx", "pptx"],
|
|
1669
|
+
"maxSizeMB": 10
|
|
1670
|
+
},
|
|
1671
|
+
{ "name": "fileId" }
|
|
1672
|
+
]
|
|
1673
|
+
}
|
|
1674
|
+
],
|
|
1675
|
+
"button": {
|
|
1676
|
+
"text": "Отправить заявку",
|
|
1677
|
+
"version": "primary"
|
|
1678
|
+
},
|
|
1679
|
+
"link": {
|
|
1680
|
+
"text": "Согласен на обработку персональных данных",
|
|
1681
|
+
"href": "/privacy-policy",
|
|
1682
|
+
"target": "_blank"
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
],
|
|
1687
|
+
[
|
|
1688
|
+
"Форма стажировки",
|
|
1689
|
+
{
|
|
1690
|
+
"content": {
|
|
1691
|
+
"version": "primary",
|
|
1692
|
+
"padding": "",
|
|
1693
|
+
"title": "Подать заявку на прохождение стажировки",
|
|
1694
|
+
"typeForm": "INTERN",
|
|
1695
|
+
"endpoint": "internship",
|
|
1696
|
+
"sections": [
|
|
1697
|
+
{
|
|
1698
|
+
"title": "О себе",
|
|
1699
|
+
"inputs": []
|
|
1700
|
+
},
|
|
1701
|
+
{ "inputs": [{ "name": "fullName", "required": true }] },
|
|
1702
|
+
{
|
|
1703
|
+
"columns": 2,
|
|
1704
|
+
"inputs": [
|
|
1705
|
+
{
|
|
1706
|
+
"name": "birthday",
|
|
1707
|
+
"required": true
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"name": "phone",
|
|
1711
|
+
"required": true
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"name": "email",
|
|
1715
|
+
"required": true
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "cityOfResidence",
|
|
1719
|
+
"required": true
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "internshipDirection",
|
|
1723
|
+
"required": true
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"name": "workingHours",
|
|
1727
|
+
"required": true
|
|
1728
|
+
}
|
|
1729
|
+
]
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
"title": "Образование и опыт",
|
|
1733
|
+
"columns": 2,
|
|
1734
|
+
"inputs": [
|
|
1735
|
+
{ "name": "university", "required": true },
|
|
1736
|
+
{ "name": "fieldOfStudy", "required": true },
|
|
1737
|
+
{ "name": "courseYear", "required": true },
|
|
1738
|
+
{ "name": "graduationYear", "required": true },
|
|
1739
|
+
{ "name": "averageGrade", "required": true },
|
|
1740
|
+
{ "name": "educationLevel", "required": true }
|
|
1741
|
+
]
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"inputs": [
|
|
1745
|
+
{
|
|
1746
|
+
"name": "skillsAndKnowledge",
|
|
1747
|
+
"placeholder": "Навыки и знания. Что умеете делать?",
|
|
1748
|
+
"required": true
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "workExperience",
|
|
1752
|
+
"placeholder": "Опыт работы или стажировки",
|
|
1753
|
+
"required": true
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"name": "motivationForInternship",
|
|
1757
|
+
"placeholder": "Почему хотите пойти на стажировку?",
|
|
1758
|
+
"required": true
|
|
1759
|
+
}
|
|
1760
|
+
]
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"inputs": [
|
|
1764
|
+
{
|
|
1765
|
+
"name": "fileUpload",
|
|
1766
|
+
"label": "Прикрепите ваше резюме",
|
|
1767
|
+
"extensions": ["pdf", "doc", "docx", "pptx"],
|
|
1768
|
+
"maxSizeMB": 10
|
|
1769
|
+
},
|
|
1770
|
+
{ "name": "fileId" }
|
|
1771
|
+
]
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
"button": {
|
|
1775
|
+
"text": "Отправить заявку",
|
|
1776
|
+
"version": "primary"
|
|
1777
|
+
},
|
|
1778
|
+
"link": {
|
|
1779
|
+
"text": "Согласен на обработку персональных данных",
|
|
1780
|
+
"href": "/privacy-policy",
|
|
1781
|
+
"target": "_blank"
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1593
1785
|
]
|
|
1594
1786
|
]
|
|
@@ -11,7 +11,11 @@ import { ResponseTypeDialog } from '../../ui-kit/ResponseTypeDialog/ResponseType
|
|
|
11
11
|
import { UniBlock } from '../../UniBlock/UniBlock';
|
|
12
12
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
13
13
|
import { style } from '../../utils/style';
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
type ApplicationFormContent,
|
|
16
|
+
type EndpointType,
|
|
17
|
+
type FieldDef,
|
|
18
|
+
} from './ApplicationFormContent';
|
|
15
19
|
import { getFormatData } from './getFormatData';
|
|
16
20
|
import { getInitialFormState, type FormState } from './getInitialFormState';
|
|
17
21
|
import {
|
|
@@ -72,19 +76,21 @@ export const ApplicationForm = UniBlock<ApplicationFormProps>(
|
|
|
72
76
|
async (formData: FormState, ev: PreventableEventWithTarget) => {
|
|
73
77
|
const formatData = getFormatData({ ...formData, ...additionalParams });
|
|
74
78
|
|
|
75
|
-
await executeHandler(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
await executeHandler(
|
|
80
|
+
{
|
|
81
|
+
formatData,
|
|
82
|
+
ev,
|
|
83
|
+
typeForm,
|
|
84
|
+
data,
|
|
85
|
+
aspects,
|
|
86
|
+
router,
|
|
87
|
+
responseTypeDialog,
|
|
88
|
+
verifyPhoneDialog,
|
|
89
|
+
onSuccess,
|
|
90
|
+
withSnowplow,
|
|
91
|
+
},
|
|
85
92
|
endpoint,
|
|
86
|
-
|
|
87
|
-
});
|
|
93
|
+
);
|
|
88
94
|
},
|
|
89
95
|
[typeForm],
|
|
90
96
|
);
|
|
@@ -118,7 +124,7 @@ export const ApplicationForm = UniBlock<ApplicationFormProps>(
|
|
|
118
124
|
},
|
|
119
125
|
);
|
|
120
126
|
|
|
121
|
-
const executeHandler = async (
|
|
122
|
-
const handler = handlerMap[endpoint] || handlerMap.default;
|
|
123
|
-
await handler(context);
|
|
127
|
+
const executeHandler = async (context: HandlerProps, endpoint?: EndpointType): Promise<void> => {
|
|
128
|
+
const handler = (endpoint && handlerMap[endpoint]) || handlerMap.default;
|
|
129
|
+
await handler({ ...context, endpoint });
|
|
124
130
|
};
|
|
@@ -32,18 +32,32 @@ export type FilledByEsiaProps = {
|
|
|
32
32
|
filledByEsia?: boolean;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
/** @hidden */
|
|
36
|
+
export type FileProps = {
|
|
37
|
+
maxSize?: number;
|
|
38
|
+
extensions?: string[];
|
|
39
|
+
};
|
|
40
|
+
|
|
35
41
|
export type FieldDef = Required &
|
|
36
42
|
LabelProps &
|
|
37
43
|
ConditionFieldProps &
|
|
38
44
|
FilledByEsiaProps &
|
|
39
|
-
PlaceholderProps &
|
|
45
|
+
PlaceholderProps &
|
|
46
|
+
FileProps & {
|
|
40
47
|
name?: NameFieldDef;
|
|
41
48
|
dadata?: boolean;
|
|
42
49
|
defaultValue?: string;
|
|
50
|
+
customName?: string;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
/** @hidden */
|
|
46
|
-
export type EndpointType =
|
|
54
|
+
export type EndpointType =
|
|
55
|
+
| 'lead'
|
|
56
|
+
| 'initcorporatelead'
|
|
57
|
+
| 'sendcorporatelead'
|
|
58
|
+
| 'callback'
|
|
59
|
+
| 'practice'
|
|
60
|
+
| 'internship';
|
|
47
61
|
|
|
48
62
|
/**
|
|
49
63
|
* @title Секция полей ввода
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { EndpointType } from './ApplicationFormContent';
|
|
2
|
+
|
|
3
|
+
type EndpointInfo = {
|
|
4
|
+
withTypeForm: boolean;
|
|
5
|
+
isNaturalEndpoint: boolean;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const ENDPOINT_MAPPING: Record<EndpointType, EndpointInfo> = {
|
|
9
|
+
lead: {
|
|
10
|
+
withTypeForm: true,
|
|
11
|
+
isNaturalEndpoint: true,
|
|
12
|
+
},
|
|
13
|
+
sendcorporatelead: {
|
|
14
|
+
withTypeForm: true,
|
|
15
|
+
isNaturalEndpoint: false,
|
|
16
|
+
},
|
|
17
|
+
practice: {
|
|
18
|
+
withTypeForm: false,
|
|
19
|
+
isNaturalEndpoint: true,
|
|
20
|
+
},
|
|
21
|
+
internship: {
|
|
22
|
+
withTypeForm: false,
|
|
23
|
+
isNaturalEndpoint: true,
|
|
24
|
+
},
|
|
25
|
+
initcorporatelead: {
|
|
26
|
+
withTypeForm: false,
|
|
27
|
+
isNaturalEndpoint: false,
|
|
28
|
+
},
|
|
29
|
+
callback: {
|
|
30
|
+
withTypeForm: false,
|
|
31
|
+
isNaturalEndpoint: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -5,9 +5,11 @@ import { type Aspects } from '../../hooks/useAspects/useAspects';
|
|
|
5
5
|
import { type AspectsDef, type SnowplowEventAspect } from '../../model/AspectsProps';
|
|
6
6
|
import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
|
|
7
7
|
import { noop } from '../../utils/noop';
|
|
8
|
+
import { type EndpointType } from './ApplicationFormContent';
|
|
8
9
|
|
|
9
10
|
export type HandlerProps = {
|
|
10
11
|
formatData: LeadRequest;
|
|
12
|
+
endpoint?: EndpointType;
|
|
11
13
|
data?: AspectsDef[];
|
|
12
14
|
aspects?: Aspects;
|
|
13
15
|
ev: PreventableEventWithTarget;
|
|
@@ -16,7 +18,6 @@ export type HandlerProps = {
|
|
|
16
18
|
verifyPhoneDialog?: any;
|
|
17
19
|
responseTypeDialog?: any;
|
|
18
20
|
onSuccess?: () => void;
|
|
19
|
-
endpoint?: string;
|
|
20
21
|
withSnowplow?: boolean;
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -61,8 +62,9 @@ export const handleCallback = async ({
|
|
|
61
62
|
typeForm,
|
|
62
63
|
responseTypeDialog,
|
|
63
64
|
onSuccess = noop,
|
|
65
|
+
endpoint,
|
|
64
66
|
}: HandlerProps) => {
|
|
65
|
-
const response = await API.sendPhoneCallRequest(formatData);
|
|
67
|
+
const response = await API.sendPhoneCallRequest(formatData, endpoint);
|
|
66
68
|
|
|
67
69
|
onSuccess();
|
|
68
70
|
|
|
@@ -92,7 +94,7 @@ export const handleDefault = async ({
|
|
|
92
94
|
endpoint,
|
|
93
95
|
withSnowplow,
|
|
94
96
|
}: HandlerProps) => {
|
|
95
|
-
const response = await API.send(formatData, router, endpoint
|
|
97
|
+
const response = await API.send({ body: formatData, router, endpoint });
|
|
96
98
|
const ok = Boolean(response);
|
|
97
99
|
|
|
98
100
|
responseTypeDialog.open({ ok });
|