@redneckz/wildless-cms-uni-blocks 0.14.988 → 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 +564 -60
- 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/retail/inputs.d.ts +0 -1
- package/bundle/retail/model/LeadFormState.d.ts +1 -1
- package/bundle/retail/model/NameFieldDef.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/components/ApplicationLeadForm/applicationFormData.js +0 -1
- package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/consents.js +1 -5
- package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -2
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.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/retail/inputs.d.ts +0 -1
- package/dist/retail/inputs.js +0 -1
- package/dist/retail/inputs.js.map +1 -1
- package/dist/retail/model/LeadFormState.d.ts +1 -1
- package/dist/retail/model/NameFieldDef.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/ApplicationLeadForm/applicationFormData.js +0 -1
- package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/consents.js +1 -5
- package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -2
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +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/retail/inputs.d.ts +0 -1
- package/lib/retail/inputs.js +0 -1
- package/lib/retail/inputs.js.map +1 -1
- package/lib/retail/model/LeadFormState.d.ts +1 -1
- package/lib/retail/model/NameFieldDef.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 +564 -60
- 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/retail/inputs.d.ts +0 -1
- package/mobile/bundle/retail/model/LeadFormState.d.ts +1 -1
- package/mobile/bundle/retail/model/NameFieldDef.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/components/ApplicationLeadForm/applicationFormData.js +0 -1
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.js +1 -5
- package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -2
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.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/retail/inputs.d.ts +0 -1
- package/mobile/dist/retail/inputs.js +0 -1
- package/mobile/dist/retail/inputs.js.map +1 -1
- package/mobile/dist/retail/model/LeadFormState.d.ts +1 -1
- package/mobile/dist/retail/model/NameFieldDef.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/components/ApplicationLeadForm/applicationFormData.js +0 -1
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +1 -5
- package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -2
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.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/retail/inputs.d.ts +0 -1
- package/mobile/lib/retail/inputs.js +0 -1
- package/mobile/lib/retail/inputs.js.map +1 -1
- package/mobile/lib/retail/model/LeadFormState.d.ts +1 -1
- package/mobile/lib/retail/model/NameFieldDef.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/components/ApplicationLeadForm/applicationFormData.tsx +0 -1
- package/mobile/src/components/ApplicationLeadForm/consents.ts +1 -5
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +0 -1
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +0 -2
- 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/retail/inputs.tsx +0 -1
- package/mobile/src/retail/model/LeadFormState.ts +1 -1
- package/mobile/src/retail/model/NameFieldDef.ts +0 -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/components/ApplicationLeadForm/applicationFormData.tsx +0 -1
- package/src/components/ApplicationLeadForm/consents.ts +1 -5
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +0 -1
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +0 -2
- package/src/hooks/useDragAndDrop.ts +48 -0
- package/src/model/FormTypeFieldDef.ts +2 -1
- package/src/model/InputTypes.ts +1 -1
- package/src/retail/inputs.tsx +0 -1
- package/src/retail/model/LeadFormState.ts +1 -1
- package/src/retail/model/NameFieldDef.ts +0 -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
|
@@ -1211,6 +1211,27 @@
|
|
|
1211
1211
|
const cyrillicPattern = /^[а-яё-]*$/i;
|
|
1212
1212
|
const isCyrillic = (_ = '') => cyrillicPattern.test(_);
|
|
1213
1213
|
|
|
1214
|
+
const isDateValid = (value, limits) => {
|
|
1215
|
+
if (!value || isNaN(value.getTime())) {
|
|
1216
|
+
return false;
|
|
1217
|
+
}
|
|
1218
|
+
const { minLimit, maxLimit } = limits;
|
|
1219
|
+
const time = value.getTime();
|
|
1220
|
+
return isValidMin(time, minLimit) && isValidMax(time, maxLimit);
|
|
1221
|
+
};
|
|
1222
|
+
const isValidMin = (time, minLimit) => {
|
|
1223
|
+
if (!minLimit || isNaN(minLimit.getTime())) {
|
|
1224
|
+
return true;
|
|
1225
|
+
}
|
|
1226
|
+
return time > minLimit.getTime();
|
|
1227
|
+
};
|
|
1228
|
+
const isValidMax = (time, maxLimit) => {
|
|
1229
|
+
if (!maxLimit || isNaN(maxLimit.getTime())) {
|
|
1230
|
+
return true;
|
|
1231
|
+
}
|
|
1232
|
+
return time < maxLimit.getTime();
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1214
1235
|
const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
|
|
1215
1236
|
|
|
1216
1237
|
const ERROR_MESSAGE$1 = 'Некорректно заполненное поле';
|
|
@@ -1227,6 +1248,7 @@
|
|
|
1227
1248
|
const emailValidate = (email) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(email);
|
|
1228
1249
|
const emailValidator = (errorMsg) => validator((_) => emailValidate(_))(errorMsg);
|
|
1229
1250
|
const isValidInnLength = (value) => typeof value === 'string' && (value.length === 10 || value.length === 12);
|
|
1251
|
+
const birthdayValidator = (errorMsg) => validator((_) => isDateValid(_, { maxLimit: new Date() }))(errorMsg);
|
|
1230
1252
|
|
|
1231
1253
|
const validatorObj$1 = {
|
|
1232
1254
|
fullName: defaultValidator(),
|
|
@@ -1249,7 +1271,7 @@
|
|
|
1249
1271
|
surname: nameValidator('Укажите свою фамилию на кириллице'),
|
|
1250
1272
|
name: nameValidator('Укажите своё имя на кириллице (без сокращений)'),
|
|
1251
1273
|
middleName: nameValidator('Укажите своё отчество на кириллице'),
|
|
1252
|
-
birthday:
|
|
1274
|
+
birthday: birthdayValidator('Укажите дату рождения'),
|
|
1253
1275
|
phone: phoneValidator('Укажите номер телефона'),
|
|
1254
1276
|
email: emailValidator('Укажите электронную почту'),
|
|
1255
1277
|
inn: innValidator('Укажите ИНН'),
|
|
@@ -1263,6 +1285,20 @@
|
|
|
1263
1285
|
callbackTime: defaultValidator(),
|
|
1264
1286
|
questionProduct: defaultValidator(),
|
|
1265
1287
|
russianPhone: russianPhoneValidator('Укажите номер телефона'),
|
|
1288
|
+
cityOfResidence: defaultValidator(),
|
|
1289
|
+
internshipStartDate: defaultValidator(),
|
|
1290
|
+
internshipEndDate: defaultValidator(),
|
|
1291
|
+
university: defaultValidator(),
|
|
1292
|
+
fieldOfStudy: defaultValidator(),
|
|
1293
|
+
courseYear: defaultValidator(),
|
|
1294
|
+
graduationYear: defaultValidator(),
|
|
1295
|
+
averageGrade: defaultValidator(),
|
|
1296
|
+
skillsAndKnowledge: defaultValidator(),
|
|
1297
|
+
educationLevel: defaultSelectValidator(),
|
|
1298
|
+
motivationForInternship: defaultValidator(),
|
|
1299
|
+
workExperience: defaultValidator(),
|
|
1300
|
+
internshipDirection: defaultValidator(),
|
|
1301
|
+
workingHours: defaultValidator(),
|
|
1266
1302
|
};
|
|
1267
1303
|
const getFormValidator = (fieldDefs, externalValidatorObj = {}) => {
|
|
1268
1304
|
const requiredFields = fieldDefs.filter((_) => Boolean(_?.required && _?.name));
|
|
@@ -1423,6 +1459,32 @@
|
|
|
1423
1459
|
{ id: 'conversionTransactions', text: 'Конверсионные операции' },
|
|
1424
1460
|
{ id: 'otherIssues', text: 'Иные вопросы ВЭД' },
|
|
1425
1461
|
];
|
|
1462
|
+
const INTERNSHIP_DIRECTION = [
|
|
1463
|
+
{ key: 'economics', text: 'Экономика и финансы' },
|
|
1464
|
+
{ key: 'audit', text: 'Аудит' },
|
|
1465
|
+
{ key: 'law', text: 'Юриспруденция' },
|
|
1466
|
+
{ key: 'it', text: 'ИТ' },
|
|
1467
|
+
{ key: 'marketing', text: 'Маркетинг' },
|
|
1468
|
+
{ key: 'hr', text: 'HR' },
|
|
1469
|
+
{ key: 'analytics', text: 'Аналитика' },
|
|
1470
|
+
{ key: 'management', text: 'Менеджмент' },
|
|
1471
|
+
{ key: 'administration', text: 'ГМУ' },
|
|
1472
|
+
{ key: 'design', text: 'Дизайн' },
|
|
1473
|
+
{ key: 'journalism', text: 'Журналистика' },
|
|
1474
|
+
{ key: 'contact', text: 'Контакт-центр' },
|
|
1475
|
+
{ key: 'other', text: 'Другое' },
|
|
1476
|
+
];
|
|
1477
|
+
const WORKING_HOURS = [
|
|
1478
|
+
{ key: '20', text: '20' },
|
|
1479
|
+
{ key: '30', text: '30' },
|
|
1480
|
+
{ key: '40', text: '40' },
|
|
1481
|
+
];
|
|
1482
|
+
const EDUCATION_LEVEL = [
|
|
1483
|
+
{ key: 'bachelor', text: 'Бакалавриат' },
|
|
1484
|
+
{ key: 'specialist', text: 'Специалитет' },
|
|
1485
|
+
{ key: 'master', text: 'Магистратура' },
|
|
1486
|
+
{ key: 'doctorate', text: 'Аспирантура' },
|
|
1487
|
+
];
|
|
1426
1488
|
|
|
1427
1489
|
// TODO Базовая функицональность всех Control - надо вынести и привязать к required флагу
|
|
1428
1490
|
const getRequiredLabel = ({ label, required = false }) => label && required ? `${label}*` : label;
|
|
@@ -1474,6 +1536,9 @@
|
|
|
1474
1536
|
|
|
1475
1537
|
const getValidStyle = (valid) => (valid ? inputValidStyle : 'border-error');
|
|
1476
1538
|
|
|
1539
|
+
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1540
|
+
const borderStyle = 'border-dashed';
|
|
1541
|
+
|
|
1477
1542
|
const Input = JSX(
|
|
1478
1543
|
// eslint-disable-next-line max-lines-per-function
|
|
1479
1544
|
({ key, className, id, name, type = 'text', label, placeholder, value = '', valid = true, pattern, autoFocus = false, isTextarea = false, disabled = false, children, onChange, onFocus, onBlur, }) => {
|
|
@@ -1492,7 +1557,6 @@
|
|
|
1492
1557
|
const ariaLabel = label ?? name ?? id;
|
|
1493
1558
|
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { className: "space-y-xs", children: [renderLabel$1(label), isTextarea ? (jsx("textarea", { className: style('block resize-y min-h-24', defaultStyle$1, validStyle), id: style('textarea', id), value: value, name: name || id, placeholder: placeholder, disabled: disabled, "aria-label": ariaLabel, onChange: handleChange, onFocus: onFocus, onBlur: onBlur }, key)) : (jsx("input", { ref: inputRef, className: style('h-14', defaultStyle$1, paddingStyle, validStyle), id: id, type: type, value: value, name: name || id, placeholder: placeholder, pattern: pattern, disabled: disabled, "aria-label": ariaLabel, onChange: handleChange, onFocus: onFocus, onBlur: onBlur }, key))] }), children] }));
|
|
1494
1559
|
});
|
|
1495
|
-
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1496
1560
|
|
|
1497
1561
|
const InputWrapper = JSX(({ className, label, value = '', error, errors, type, isInteger, placeholder, maxLength, inputRef, isOpen, onOpen, onClose, required, onChange = noop, ...rest }) => {
|
|
1498
1562
|
const popupRef = useOutsideClick(onClose);
|
|
@@ -1729,6 +1793,33 @@
|
|
|
1729
1793
|
|
|
1730
1794
|
const API_BASE_URI = '/api/v1';
|
|
1731
1795
|
|
|
1796
|
+
const ENDPOINT_MAPPING = {
|
|
1797
|
+
lead: {
|
|
1798
|
+
withTypeForm: true,
|
|
1799
|
+
isNaturalEndpoint: true,
|
|
1800
|
+
},
|
|
1801
|
+
sendcorporatelead: {
|
|
1802
|
+
withTypeForm: true,
|
|
1803
|
+
isNaturalEndpoint: false,
|
|
1804
|
+
},
|
|
1805
|
+
practice: {
|
|
1806
|
+
withTypeForm: false,
|
|
1807
|
+
isNaturalEndpoint: true,
|
|
1808
|
+
},
|
|
1809
|
+
internship: {
|
|
1810
|
+
withTypeForm: false,
|
|
1811
|
+
isNaturalEndpoint: true,
|
|
1812
|
+
},
|
|
1813
|
+
initcorporatelead: {
|
|
1814
|
+
withTypeForm: false,
|
|
1815
|
+
isNaturalEndpoint: false,
|
|
1816
|
+
},
|
|
1817
|
+
callback: {
|
|
1818
|
+
withTypeForm: false,
|
|
1819
|
+
isNaturalEndpoint: true,
|
|
1820
|
+
},
|
|
1821
|
+
};
|
|
1822
|
+
|
|
1732
1823
|
const formatDate = (date, toTimeStamp = false) => {
|
|
1733
1824
|
if (typeof date === 'string') {
|
|
1734
1825
|
return date.split('-').reverse().join('.');
|
|
@@ -1743,16 +1834,22 @@
|
|
|
1743
1834
|
|
|
1744
1835
|
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
1745
1836
|
|
|
1746
|
-
const getSubmitBody = (body,
|
|
1747
|
-
const
|
|
1837
|
+
const getSubmitBody = ({ body, endpoint, router }) => {
|
|
1838
|
+
const isNaturalPerson = endpoint && ENDPOINT_MAPPING[endpoint].isNaturalEndpoint;
|
|
1839
|
+
const withTypeForm = endpoint && ENDPOINT_MAPPING[endpoint].withTypeForm;
|
|
1840
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, partnerSymbolCode, internshipEndDate, internshipStartDate, ...staticBody } = body;
|
|
1748
1841
|
return {
|
|
1749
|
-
typeForm,
|
|
1842
|
+
...(withTypeForm ? { typeForm } : {}),
|
|
1750
1843
|
...getRegion(region, isNaturalPerson),
|
|
1751
1844
|
...getEmail(email, isNaturalPerson),
|
|
1752
1845
|
...getPhone(phone),
|
|
1753
1846
|
...getPhone(russianPhone),
|
|
1754
|
-
...getFormatDate(
|
|
1755
|
-
...
|
|
1847
|
+
...(isNaturalPerson ? getFormatDate([[birthday, 'birthday']]) : { birthday }),
|
|
1848
|
+
...getFormatDate([
|
|
1849
|
+
[desiredMeetingDate, 'desiredMeetingDate'],
|
|
1850
|
+
[internshipEndDate, 'internshipEndDate'],
|
|
1851
|
+
[internshipStartDate, 'internshipStartDate'],
|
|
1852
|
+
]),
|
|
1756
1853
|
...(typeForm === 'FEEDBACK'
|
|
1757
1854
|
? {}
|
|
1758
1855
|
: {
|
|
@@ -1776,7 +1873,7 @@
|
|
|
1776
1873
|
};
|
|
1777
1874
|
};
|
|
1778
1875
|
const getPhone = (phone) => (phone ? { phone: formatPhone(phone) } : {});
|
|
1779
|
-
const getFormatDate = (
|
|
1876
|
+
const getFormatDate = (dates) => Object.fromEntries(dates.filter(([value]) => value).map(([value, key]) => [key, formatDate(value)]));
|
|
1780
1877
|
const getRegion = (region, isNaturalPerson = true) => ({
|
|
1781
1878
|
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
1782
1879
|
});
|
|
@@ -1800,11 +1897,14 @@
|
|
|
1800
1897
|
: {};
|
|
1801
1898
|
|
|
1802
1899
|
function LeadServiceAPI() {
|
|
1803
|
-
async function send(body, router,
|
|
1804
|
-
const
|
|
1805
|
-
const
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1900
|
+
async function send({ body, router, endpoint }) {
|
|
1901
|
+
const calculatedEndpoint = endpoint && getEndpoint(endpoint, body);
|
|
1902
|
+
const url = `${API_BASE_URI}/${calculatedEndpoint}`;
|
|
1903
|
+
const submitBody = getSubmitBody({
|
|
1904
|
+
body,
|
|
1905
|
+
endpoint,
|
|
1906
|
+
router,
|
|
1907
|
+
});
|
|
1808
1908
|
try {
|
|
1809
1909
|
const response = await LeadServiceFetch(url, submitBody);
|
|
1810
1910
|
if (!response?.ok) {
|
|
@@ -1835,7 +1935,7 @@
|
|
|
1835
1935
|
const submitBody = {
|
|
1836
1936
|
requestId: reqId,
|
|
1837
1937
|
confimationCode: code,
|
|
1838
|
-
leadRequest: getSubmitBody(body
|
|
1938
|
+
leadRequest: getSubmitBody({ body }),
|
|
1839
1939
|
};
|
|
1840
1940
|
try {
|
|
1841
1941
|
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
@@ -1845,9 +1945,9 @@
|
|
|
1845
1945
|
return null;
|
|
1846
1946
|
}
|
|
1847
1947
|
}
|
|
1848
|
-
async function sendPhoneCallRequest(body,
|
|
1948
|
+
async function sendPhoneCallRequest(body, endpoint) {
|
|
1849
1949
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1850
|
-
const submitBody = getSubmitBody(body,
|
|
1950
|
+
const submitBody = getSubmitBody({ body, endpoint });
|
|
1851
1951
|
const formatSubmitBody = getFormatCallbackSubmitBody(submitBody);
|
|
1852
1952
|
try {
|
|
1853
1953
|
const response = await LeadServiceFetch(`${API_BASE_URI}/callback`, formatSubmitBody);
|
|
@@ -1882,6 +1982,13 @@
|
|
|
1882
1982
|
clientTimezone: getUserTimezoneOffset(),
|
|
1883
1983
|
};
|
|
1884
1984
|
};
|
|
1985
|
+
const getEndpoint = (endpoint, body) => {
|
|
1986
|
+
const { serviceDirection } = body;
|
|
1987
|
+
if (endpoint === 'lead' && serviceDirection !== 'Юридическое лицо / ИП') {
|
|
1988
|
+
return 'lead';
|
|
1989
|
+
}
|
|
1990
|
+
return endpoint;
|
|
1991
|
+
};
|
|
1885
1992
|
|
|
1886
1993
|
const handleAspects = async ({ aspectsAttributes, aspects, ev }) => {
|
|
1887
1994
|
for (const { aspectName, params } of aspectsAttributes ?? []) {
|
|
@@ -1911,8 +2018,8 @@
|
|
|
1911
2018
|
},
|
|
1912
2019
|
});
|
|
1913
2020
|
};
|
|
1914
|
-
const handleCallback = async ({ formatData, data, aspects = {}, ev, typeForm, responseTypeDialog, onSuccess = noop, }) => {
|
|
1915
|
-
const response = await API$2.sendPhoneCallRequest(formatData);
|
|
2021
|
+
const handleCallback = async ({ formatData, data, aspects = {}, ev, typeForm, responseTypeDialog, onSuccess = noop, endpoint, }) => {
|
|
2022
|
+
const response = await API$2.sendPhoneCallRequest(formatData, endpoint);
|
|
1916
2023
|
onSuccess();
|
|
1917
2024
|
if (response?.status === 'success') {
|
|
1918
2025
|
responseTypeDialog.open({ ok: true, typeForm });
|
|
@@ -1932,7 +2039,7 @@
|
|
|
1932
2039
|
}
|
|
1933
2040
|
};
|
|
1934
2041
|
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, withSnowplow, }) => {
|
|
1935
|
-
const response = await API$2.send(formatData, router, endpoint
|
|
2042
|
+
const response = await API$2.send({ body: formatData, router, endpoint });
|
|
1936
2043
|
const ok = Boolean(response);
|
|
1937
2044
|
responseTypeDialog.open({ ok });
|
|
1938
2045
|
if (ok) {
|
|
@@ -2208,6 +2315,10 @@
|
|
|
2208
2315
|
|
|
2209
2316
|
const ApplierTypeField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0440\u0430\u0442\u0438\u0432\u0448\u0435\u0433\u043E\u0441\u044F", ...input, options: APPLIER_TYPES, ...field('applierType') })));
|
|
2210
2317
|
|
|
2318
|
+
const AverageGradeField = JSX(({ field, input }) => {
|
|
2319
|
+
return (jsx(InputControl, { label: "\u0421\u0440\u0435\u0434\u043D\u0438\u0439 \u0431\u0430\u043B\u043B \u043E\u0431\u0443\u0447\u0435\u043D\u0438\u044F", type: "number", ...field(input?.name ?? ''), ...input }));
|
|
2320
|
+
});
|
|
2321
|
+
|
|
2211
2322
|
const BankEmpoleeField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field(input?.name ?? ''), ...input })));
|
|
2212
2323
|
|
|
2213
2324
|
const useElementSpace = (ref, heightEl) => {
|
|
@@ -2322,7 +2433,7 @@
|
|
|
2322
2433
|
const START_YEAR = 1940;
|
|
2323
2434
|
const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
|
|
2324
2435
|
|
|
2325
|
-
const ICON_PROPS$
|
|
2436
|
+
const ICON_PROPS$2 = {
|
|
2326
2437
|
name: 'CalendarIcon',
|
|
2327
2438
|
iconVersion: 'black',
|
|
2328
2439
|
width: '24',
|
|
@@ -2357,7 +2468,7 @@
|
|
|
2357
2468
|
useEffect(() => {
|
|
2358
2469
|
updateSelectedDate({ inputValue, setSelectedMonth, setSelectedYear, onChange });
|
|
2359
2470
|
}, [inputValue]);
|
|
2360
|
-
return (jsxs("div", { onClick: onInputClick, className: style('relative', className), children: [jsx("input", { ref: ref, className: "h-full w-full px-m text-l text-black focus-visible:outline-none rounded-none", value: inputValue, type: "text", onChange: handleChange, onBlur: onBlur, disabled: disabled }), disabled ? null : jsx(Icon, { className: "mr-s", ...ICON_PROPS$
|
|
2471
|
+
return (jsxs("div", { onClick: onInputClick, className: style('relative', className), children: [jsx("input", { ref: ref, className: "h-full w-full px-m text-l text-black focus-visible:outline-none rounded-none", value: inputValue, type: "text", onChange: handleChange, onBlur: onBlur, disabled: disabled }), disabled ? null : jsx(Icon, { className: "mr-s", ...ICON_PROPS$2 })] }));
|
|
2361
2472
|
});
|
|
2362
2473
|
const isValidYear = (year) => Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
|
|
2363
2474
|
const isValidMonth = (month) => Number(month) > 0 && Number(month) < 13;
|
|
@@ -2464,7 +2575,7 @@
|
|
|
2464
2575
|
onChange?.(new Date(selectedYear, selectedMonth, Math.min(maxDateOfMonth, value.getDate())));
|
|
2465
2576
|
};
|
|
2466
2577
|
|
|
2467
|
-
const ICON_PROPS = {
|
|
2578
|
+
const ICON_PROPS$1 = {
|
|
2468
2579
|
name: 'ArrowUpIcon',
|
|
2469
2580
|
iconVersion: 'black',
|
|
2470
2581
|
width: '24',
|
|
@@ -2506,18 +2617,21 @@
|
|
|
2506
2617
|
setSelectedYear,
|
|
2507
2618
|
}), isCalendarVisible && !disabled ? (jsxs("div", { className: style('absolute bg-white z-20 select-none', {
|
|
2508
2619
|
'bottom-full': spaceAbove,
|
|
2509
|
-
}), children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, min: minDate, max: maxDate, weekends: weekends, onDateSelect: handleDateSelect })] })) : null] })] }));
|
|
2620
|
+
}), children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS$1, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS$1, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, min: minDate, max: maxDate, weekends: weekends, onDateSelect: handleDateSelect })] })) : null] })] }));
|
|
2510
2621
|
});
|
|
2511
2622
|
|
|
2512
2623
|
const DatePickerControl = JSX(({ className, label, error, required, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(DatePicker, { label: getRequiredLabel({ label, required }), valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
|
|
2513
2624
|
|
|
2514
|
-
const BirthdayField = JSX(({ field, input }) =>
|
|
2625
|
+
const BirthdayField = JSX(({ field, input }) => {
|
|
2626
|
+
const today = new Date();
|
|
2627
|
+
return (jsx(DatePickerControl, { label: input?.label || 'Дата рождения', ...field(input?.name ?? ''), maxDate: today, ...input }));
|
|
2628
|
+
});
|
|
2515
2629
|
|
|
2516
2630
|
const CallbackTimeField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041A\u043E\u0433\u0434\u0430 \u043F\u0435\u0440\u0435\u0437\u0432\u043E\u043D\u0438\u0442\u044C?", ...input, options: CALLBACK_TIME, ...field(input?.name ?? '') })));
|
|
2517
2631
|
|
|
2518
2632
|
const CollectionCountField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
2519
2633
|
|
|
2520
|
-
const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...field(input?.name ?? ''), placeholder:
|
|
2634
|
+
const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...field(input?.name ?? ''), placeholder: input?.placeholder ?? 'Ваше сообщение', isTextarea: true, ...input })));
|
|
2521
2635
|
|
|
2522
2636
|
function useAsyncEffect(effect, deps) {
|
|
2523
2637
|
useEffect(() => {
|
|
@@ -2656,6 +2770,355 @@
|
|
|
2656
2770
|
|
|
2657
2771
|
const FeedbackMethodField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430", options: FEEDBACK_METHOD, ...field(input?.name ?? ''), ...input })));
|
|
2658
2772
|
|
|
2773
|
+
const ACCEPTED_EXTENSIONS_TEXT = 'Поддерживаемые форматы файлов';
|
|
2774
|
+
const MAX_SIZE_TEXT = 'Максимальный размер файла';
|
|
2775
|
+
const EMPTY_FILE_ERROR_TEXT = 'Ошибка загрузки файла. Убедитесь, что файл не пустой';
|
|
2776
|
+
const EXTENSIONS_ERROR_TEXT = 'Файл не соответствует допустимым расширениям';
|
|
2777
|
+
const MAX_SIZE_ERROR_TEXT = 'Файл превышает допустимый размер';
|
|
2778
|
+
const DEFAULT_ERROR_TEXT = 'Ошибка при загрузке файла. Попробуйте загрузить файл позднее';
|
|
2779
|
+
|
|
2780
|
+
const FILE_CHECK_URL = 'uploadFile';
|
|
2781
|
+
const SUCCESS_STATUS = 'SUCCESS';
|
|
2782
|
+
async function sendFile({ file, onProgress = noop }) {
|
|
2783
|
+
return new Promise((resolve, reject) => {
|
|
2784
|
+
const formData = new FormData();
|
|
2785
|
+
formData.append('file', file);
|
|
2786
|
+
let processingAnimation = undefined;
|
|
2787
|
+
const xhr = new XMLHttpRequest();
|
|
2788
|
+
let lastProgress;
|
|
2789
|
+
xhr.upload.onprogress = (event) => {
|
|
2790
|
+
if (event.lengthComputable) {
|
|
2791
|
+
const percentComplete = (event.loaded / event.total) * 50;
|
|
2792
|
+
onProgress(percentComplete);
|
|
2793
|
+
}
|
|
2794
|
+
};
|
|
2795
|
+
xhr.upload.onload = () => {
|
|
2796
|
+
let current = 50;
|
|
2797
|
+
onProgress(current);
|
|
2798
|
+
processingAnimation = window.setInterval(() => {
|
|
2799
|
+
current += 0.2;
|
|
2800
|
+
lastProgress = current;
|
|
2801
|
+
if (current < 90) {
|
|
2802
|
+
onProgress(current);
|
|
2803
|
+
}
|
|
2804
|
+
else {
|
|
2805
|
+
onProgress(90);
|
|
2806
|
+
window.clearInterval(processingAnimation);
|
|
2807
|
+
}
|
|
2808
|
+
}, 100);
|
|
2809
|
+
};
|
|
2810
|
+
xhr.onload = async () => {
|
|
2811
|
+
try {
|
|
2812
|
+
const response = JSON.parse(xhr.responseText);
|
|
2813
|
+
if (response.status === 'SUCCESS') {
|
|
2814
|
+
window.clearInterval(processingAnimation);
|
|
2815
|
+
await animateToFull(lastProgress, onProgress);
|
|
2816
|
+
resolve(response);
|
|
2817
|
+
}
|
|
2818
|
+
else {
|
|
2819
|
+
reject(new Error(response.errorDesc ?? DEFAULT_ERROR_TEXT));
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
catch (e) {
|
|
2823
|
+
reject(new Error(DEFAULT_ERROR_TEXT));
|
|
2824
|
+
}
|
|
2825
|
+
};
|
|
2826
|
+
xhr.onerror = () => {
|
|
2827
|
+
reject(new Error(DEFAULT_ERROR_TEXT));
|
|
2828
|
+
};
|
|
2829
|
+
xhr.open('POST', `${API_BASE_URI}/${FILE_CHECK_URL}`);
|
|
2830
|
+
xhr.send(formData);
|
|
2831
|
+
});
|
|
2832
|
+
}
|
|
2833
|
+
const animateToFull = (current, onProgress) => new Promise((resolve) => {
|
|
2834
|
+
let value = current;
|
|
2835
|
+
const increment = (100 - current) / 30;
|
|
2836
|
+
const interval = 16;
|
|
2837
|
+
const step = () => {
|
|
2838
|
+
value += increment;
|
|
2839
|
+
if (value >= 100) {
|
|
2840
|
+
onProgress(100);
|
|
2841
|
+
resolve();
|
|
2842
|
+
}
|
|
2843
|
+
else {
|
|
2844
|
+
onProgress(value);
|
|
2845
|
+
setTimeout(step, interval);
|
|
2846
|
+
}
|
|
2847
|
+
};
|
|
2848
|
+
step();
|
|
2849
|
+
});
|
|
2850
|
+
|
|
2851
|
+
const useDragAndDrop = ({ onFileSelected, onReset, uploadResponse, onFileChanged, }) => {
|
|
2852
|
+
const [isDragActive, setIsDragActive] = useState(false);
|
|
2853
|
+
const handleDrag = (e) => {
|
|
2854
|
+
e.preventDefault();
|
|
2855
|
+
if (uploadResponse) {
|
|
2856
|
+
return;
|
|
2857
|
+
}
|
|
2858
|
+
setIsDragActive(true);
|
|
2859
|
+
};
|
|
2860
|
+
const handleLeave = () => setIsDragActive(false);
|
|
2861
|
+
const handleDrop = async (e) => {
|
|
2862
|
+
e.preventDefault();
|
|
2863
|
+
if (uploadResponse) {
|
|
2864
|
+
return;
|
|
2865
|
+
}
|
|
2866
|
+
onReset();
|
|
2867
|
+
setIsDragActive(false);
|
|
2868
|
+
const file = e.dataTransfer?.files?.[0];
|
|
2869
|
+
if (file) {
|
|
2870
|
+
await onFileSelected({ file, onFileChanged });
|
|
2871
|
+
}
|
|
2872
|
+
};
|
|
2873
|
+
return { handleDrag, handleLeave, handleDrop, isDragActive };
|
|
2874
|
+
};
|
|
2875
|
+
|
|
2876
|
+
const ProgressBar = JSX(({ step = 10, description, showPercentage = true, isOnlyInteger = false }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? (jsxs("div", { className: "absolute left-2/4 text-green", children: [isOnlyInteger ? Math.round(step) : step, "%"] })) : null, description ? jsx("div", { className: "text-right pr-m text-gray", children: description }) : null] })] })));
|
|
2877
|
+
|
|
2878
|
+
const ICON_PROPS = {
|
|
2879
|
+
name: 'DocIcon',
|
|
2880
|
+
iconVersion: 'black',
|
|
2881
|
+
width: '24',
|
|
2882
|
+
height: '24',
|
|
2883
|
+
};
|
|
2884
|
+
const renderFileInput = ({ label, inputRef, id, key, type, name, pattern, disabled, onChange = noop, onFocus, onBlur, extensions, uploadResponse, file, }) => {
|
|
2885
|
+
const ariaLabel = label ?? name ?? id;
|
|
2886
|
+
return (jsx("div", { children: uploadResponse?.status === SUCCESS_STATUS ? (renderFileName(file)) : (jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Icon, { className: "inline-block", ...ICON_PROPS }), renderLabel$1(label), jsx("input", { ref: inputRef, className: style('h-14 hidden'), id: id, type: type, name: name || id, pattern: pattern, disabled: disabled, "aria-label": ariaLabel, onChange: (e) => {
|
|
2887
|
+
e?.target?.files && onChange(e?.target?.files[0]);
|
|
2888
|
+
}, onFocus: onFocus, onBlur: onBlur, accept: extensionsToAccept(extensions) }, key)] })) }));
|
|
2889
|
+
};
|
|
2890
|
+
const extensionsToAccept = (extensions = []) => {
|
|
2891
|
+
return extensions
|
|
2892
|
+
.map((ext) => {
|
|
2893
|
+
const str = String(ext).trim();
|
|
2894
|
+
return str.startsWith('.') ? str : '.' + str;
|
|
2895
|
+
})
|
|
2896
|
+
.map((ext) => ext.toLowerCase())
|
|
2897
|
+
.filter((ext, index, arr) => arr.indexOf(ext) === index)
|
|
2898
|
+
.join(', ');
|
|
2899
|
+
};
|
|
2900
|
+
const renderFileName = (file) => jsx("span", { children: file?.name });
|
|
2901
|
+
|
|
2902
|
+
const renderInfoText = (extensions, maxSize) => {
|
|
2903
|
+
const extensionsMessage = extensions
|
|
2904
|
+
? `${ACCEPTED_EXTENSIONS_TEXT} - ${extensions.join(', ')}. `
|
|
2905
|
+
: '';
|
|
2906
|
+
const maxSizeMessage = maxSize ? `${MAX_SIZE_TEXT} - ${maxSize}Мб.` : '';
|
|
2907
|
+
return (jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: extensionsMessage + maxSizeMessage }));
|
|
2908
|
+
};
|
|
2909
|
+
|
|
2910
|
+
const animateStepWithMinDuration = ({ from, to, onUpdate = noop, minDuration = 300, }) => {
|
|
2911
|
+
return new Promise((resolve) => {
|
|
2912
|
+
const startTime = performance.now();
|
|
2913
|
+
const animate = () => {
|
|
2914
|
+
const currentTime = performance.now();
|
|
2915
|
+
const elapsed = currentTime - startTime;
|
|
2916
|
+
const animationProgress = Math.min(elapsed / minDuration, 1);
|
|
2917
|
+
const easeProgress = 1 - Math.pow(1 - animationProgress, 3);
|
|
2918
|
+
const value = from + (to - from) * easeProgress;
|
|
2919
|
+
onUpdate(value);
|
|
2920
|
+
if (animationProgress < 1) {
|
|
2921
|
+
requestAnimationFrame(animate);
|
|
2922
|
+
}
|
|
2923
|
+
else {
|
|
2924
|
+
onUpdate(to);
|
|
2925
|
+
resolve();
|
|
2926
|
+
}
|
|
2927
|
+
};
|
|
2928
|
+
requestAnimationFrame(animate);
|
|
2929
|
+
});
|
|
2930
|
+
};
|
|
2931
|
+
|
|
2932
|
+
const checkFileExtension = async (file, extensions) => {
|
|
2933
|
+
const fileExt = file.name.split('.')[1];
|
|
2934
|
+
console.log(fileExt, extensions);
|
|
2935
|
+
if (!extensions?.includes(fileExt)) {
|
|
2936
|
+
throw new Error(EXTENSIONS_ERROR_TEXT);
|
|
2937
|
+
}
|
|
2938
|
+
};
|
|
2939
|
+
|
|
2940
|
+
const EXT_TO_MIME = {
|
|
2941
|
+
pdf: 'application/pdf',
|
|
2942
|
+
doc: 'application/msword',
|
|
2943
|
+
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
2944
|
+
pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
2945
|
+
};
|
|
2946
|
+
const checkFileMimeType = async (file, extensions) => {
|
|
2947
|
+
const fileMimeType = file?.type ?? '';
|
|
2948
|
+
const expectedMimeTypes = (extensions || [])
|
|
2949
|
+
.map((ext) => EXT_TO_MIME[ext])
|
|
2950
|
+
.filter((mime) => mime !== undefined);
|
|
2951
|
+
if (!expectedMimeTypes.includes(fileMimeType)) {
|
|
2952
|
+
throw new Error(EXTENSIONS_ERROR_TEXT);
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2955
|
+
|
|
2956
|
+
const getFileSignature = (file) => {
|
|
2957
|
+
return new Promise((resolve, reject) => {
|
|
2958
|
+
const reader = new FileReader();
|
|
2959
|
+
reader.onload = () => {
|
|
2960
|
+
const buffer = reader.result;
|
|
2961
|
+
const bytes = new Uint8Array(buffer);
|
|
2962
|
+
const hex = Array.from(bytes)
|
|
2963
|
+
.map((b) => b.toString(16).padStart(2, '0'))
|
|
2964
|
+
.join(' ');
|
|
2965
|
+
resolve(hex);
|
|
2966
|
+
};
|
|
2967
|
+
reader.onerror = reject;
|
|
2968
|
+
return file && reader.readAsArrayBuffer(file.slice(0, 8));
|
|
2969
|
+
});
|
|
2970
|
+
};
|
|
2971
|
+
|
|
2972
|
+
const SIGNATURES = {
|
|
2973
|
+
pdf: '25 50 44 46 2d',
|
|
2974
|
+
docx: '50 4b 03 04',
|
|
2975
|
+
pptx: '50 4b 03 04',
|
|
2976
|
+
xlsx: '50 4b 03 04',
|
|
2977
|
+
doc: 'D0 CF 11 E0 A1 B1 1A E1',
|
|
2978
|
+
};
|
|
2979
|
+
const checkFileSignature = async (file, expectedTypes) => {
|
|
2980
|
+
const hexSignature = await getFileSignature(file);
|
|
2981
|
+
const isValid = (expectedTypes ?? []).some((type) => {
|
|
2982
|
+
const expectedSignature = SIGNATURES[type]?.toLowerCase();
|
|
2983
|
+
console.log(expectedSignature);
|
|
2984
|
+
console.log(hexSignature);
|
|
2985
|
+
return expectedSignature && hexSignature.startsWith(expectedSignature);
|
|
2986
|
+
});
|
|
2987
|
+
if (!isValid) {
|
|
2988
|
+
throw new Error(EXTENSIONS_ERROR_TEXT);
|
|
2989
|
+
}
|
|
2990
|
+
};
|
|
2991
|
+
|
|
2992
|
+
const checkFileSize = async (file, maxSizeMB) => {
|
|
2993
|
+
if (maxSizeMB && file.size > maxSizeMB * 1024 * 1024) {
|
|
2994
|
+
throw new Error(MAX_SIZE_ERROR_TEXT);
|
|
2995
|
+
}
|
|
2996
|
+
if (file.size === 0) {
|
|
2997
|
+
throw new Error(EMPTY_FILE_ERROR_TEXT);
|
|
2998
|
+
}
|
|
2999
|
+
};
|
|
3000
|
+
|
|
3001
|
+
const DEBOUNCE_DELAY = 500;
|
|
3002
|
+
const useVerifyFile = ({ onUploadError = noop, onFileSelected = noop, extensions, maxSizeMB, onUploadResponse = noop, }) => {
|
|
3003
|
+
const [progress, setProgress] = useState(0);
|
|
3004
|
+
const [isFileUploading, setIsFileUploading] = useState(false);
|
|
3005
|
+
const debouncedOnFileUploaded = useMemo(() => debounce((isUploading) => setIsFileUploading(isUploading), DEBOUNCE_DELAY), [setIsFileUploading]);
|
|
3006
|
+
const debouncedOnUploadError = useMemo(() => debounce((message) => onUploadError(message), DEBOUNCE_DELAY), [onUploadError]);
|
|
3007
|
+
const debouncedOnUploadResponse = useMemo(() => debounce((response) => onUploadResponse(response), DEBOUNCE_DELAY), [onUploadResponse]);
|
|
3008
|
+
const verifyFile = async ({ file, onFileChanged = noop }) => {
|
|
3009
|
+
onFileSelected(file);
|
|
3010
|
+
setIsFileUploading(true);
|
|
3011
|
+
const checks = [
|
|
3012
|
+
() => checkFileExtension(file, extensions),
|
|
3013
|
+
() => checkFileSize(file, maxSizeMB),
|
|
3014
|
+
() => checkFileSignature(file, extensions),
|
|
3015
|
+
() => checkFileMimeType(file, extensions),
|
|
3016
|
+
];
|
|
3017
|
+
const checkProgressStep = 50 / checks.length;
|
|
3018
|
+
let currentProgress = 0;
|
|
3019
|
+
try {
|
|
3020
|
+
for (let i = 0; i < checks.length; i++) {
|
|
3021
|
+
const checkPromise = checks[i];
|
|
3022
|
+
await checkPromise();
|
|
3023
|
+
const targetProgress = (i + 1) * checkProgressStep;
|
|
3024
|
+
await animateStepWithMinDuration({
|
|
3025
|
+
from: currentProgress,
|
|
3026
|
+
to: targetProgress,
|
|
3027
|
+
onUpdate: setProgress,
|
|
3028
|
+
minDuration: 300,
|
|
3029
|
+
});
|
|
3030
|
+
currentProgress = targetProgress;
|
|
3031
|
+
}
|
|
3032
|
+
const response = await sendFile({
|
|
3033
|
+
file,
|
|
3034
|
+
onProgress: setProgress,
|
|
3035
|
+
});
|
|
3036
|
+
debouncedOnUploadResponse(response);
|
|
3037
|
+
onFileChanged(response?.fileId ?? '');
|
|
3038
|
+
if (response?.status === SUCCESS_STATUS) {
|
|
3039
|
+
debouncedOnFileUploaded?.(false);
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
catch (e) {
|
|
3043
|
+
const errorMessage = e instanceof Error ? e.message : DEFAULT_ERROR_TEXT;
|
|
3044
|
+
debouncedOnUploadError(errorMessage);
|
|
3045
|
+
onFileChanged('');
|
|
3046
|
+
}
|
|
3047
|
+
debouncedOnFileUploaded?.(false);
|
|
3048
|
+
};
|
|
3049
|
+
return { verifyFile, isFileUploading, progress };
|
|
3050
|
+
};
|
|
3051
|
+
|
|
3052
|
+
const InputFile = JSX(
|
|
3053
|
+
// eslint-disable-next-line max-lines-per-function
|
|
3054
|
+
({ key, className, id, name, type = 'file', label, valid = true, pattern, autoFocus = false, extensions, children, onFocus, onBlur, maxSizeMB, error, onFileChanged = noop, }) => {
|
|
3055
|
+
const inputRef = useRef(null);
|
|
3056
|
+
const [selectedFile, setSelectedFile] = useState(null);
|
|
3057
|
+
const [uploadError, setUploadError] = useState('');
|
|
3058
|
+
const [uploadResponse, setUploadResponse] = useState(null);
|
|
3059
|
+
const { verifyFile, isFileUploading, progress } = useVerifyFile({
|
|
3060
|
+
onUploadError: setUploadError,
|
|
3061
|
+
onUploadResponse: setUploadResponse,
|
|
3062
|
+
onFileSelected: setSelectedFile,
|
|
3063
|
+
extensions,
|
|
3064
|
+
maxSizeMB,
|
|
3065
|
+
});
|
|
3066
|
+
useEffect(() => {
|
|
3067
|
+
if (autoFocus) {
|
|
3068
|
+
inputRef.current?.focus();
|
|
3069
|
+
}
|
|
3070
|
+
}, [autoFocus, inputRef]);
|
|
3071
|
+
const handleFileChange = async (file) => {
|
|
3072
|
+
handleResetFile();
|
|
3073
|
+
if (file) {
|
|
3074
|
+
await verifyFile({ file, onFileChanged });
|
|
3075
|
+
}
|
|
3076
|
+
};
|
|
3077
|
+
const handleResetFile = () => {
|
|
3078
|
+
setSelectedFile(null);
|
|
3079
|
+
setUploadError('');
|
|
3080
|
+
setUploadResponse(null);
|
|
3081
|
+
onFileChanged('');
|
|
3082
|
+
};
|
|
3083
|
+
const { handleDrag, handleLeave, handleDrop, isDragActive } = useDragAndDrop({
|
|
3084
|
+
onReset: handleResetFile,
|
|
3085
|
+
onFileSelected: verifyFile,
|
|
3086
|
+
uploadResponse,
|
|
3087
|
+
onFileChanged,
|
|
3088
|
+
});
|
|
3089
|
+
const paddingStyle = children ? 'pr-3xl' : '';
|
|
3090
|
+
const validStyle = getValidStyle(valid);
|
|
3091
|
+
const activeDragStyle = isDragActive ? 'border-primary-hover' : '';
|
|
3092
|
+
return (jsxs("div", { className: style('relative', className), onDragEnter: handleDrag, onDragOver: handleDrag, onDragLeave: handleLeave, onDrop: handleDrop, children: [jsx("label", { className: style('h-14 cursor-pointer space-y-xs block', defaultStyle$1, paddingStyle, borderStyle, validStyle, activeDragStyle), children: isFileUploading ? (jsx("div", { children: jsx(ProgressBar, { step: progress, isOnlyInteger: true }) })) : (renderFileInput({
|
|
3093
|
+
label,
|
|
3094
|
+
inputRef,
|
|
3095
|
+
id,
|
|
3096
|
+
key,
|
|
3097
|
+
type,
|
|
3098
|
+
name,
|
|
3099
|
+
pattern,
|
|
3100
|
+
disabled: Boolean(uploadResponse || isFileUploading),
|
|
3101
|
+
onChange: handleFileChange,
|
|
3102
|
+
onFocus,
|
|
3103
|
+
onBlur,
|
|
3104
|
+
extensions,
|
|
3105
|
+
uploadResponse,
|
|
3106
|
+
file: selectedFile,
|
|
3107
|
+
})) }), uploadResponse?.status === SUCCESS_STATUS ? (jsx(CloseButton, { className: "absolute top-0 right-0 z-10", onClose: handleResetFile })) : null, renderInfoText(extensions, maxSizeMB), renderErrorText(error || uploadError), children] }));
|
|
3108
|
+
});
|
|
3109
|
+
|
|
3110
|
+
const InputFileControl = JSX(({ label, value = '', error, type, inputRef, required, ...rest }) => {
|
|
3111
|
+
return (jsx("div", { ref: inputRef, children: jsx(InputFile, { type: type || 'file', "aria-label": label, label: getRequiredLabel({ label, required }), valid: Boolean(!error), value: value, error: error, ...rest }) }));
|
|
3112
|
+
});
|
|
3113
|
+
|
|
3114
|
+
const FileUploadField = JSX(({ field, input }) => {
|
|
3115
|
+
const [fileId, setFileId] = useState('');
|
|
3116
|
+
useEffect(() => {
|
|
3117
|
+
field('fileId')?.onChange?.(fileId);
|
|
3118
|
+
}, [fileId]);
|
|
3119
|
+
return (jsx(InputFileControl, { type: "file", label: input?.name ?? '', ...field(input?.name ?? ''), ...input, onFileChanged: setFileId }));
|
|
3120
|
+
});
|
|
3121
|
+
|
|
2659
3122
|
const FullNameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0418\u041E", ...field(input?.name ?? ''), ...input })));
|
|
2660
3123
|
|
|
2661
3124
|
const FullRegionField = JSX(({ field, input, params }) => {
|
|
@@ -2670,6 +3133,38 @@
|
|
|
2670
3133
|
|
|
2671
3134
|
const InnField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? '') })));
|
|
2672
3135
|
|
|
3136
|
+
const INTERNSHIP_END_DATE_ERROR = 'Некорректно заполненное поле';
|
|
3137
|
+
const InternshipEndDateField = JSX(({ field, input }) => {
|
|
3138
|
+
const [startDate, setStartDate] = useState();
|
|
3139
|
+
const [internshipEndDateError, setInternshipEndDateError] = useState('');
|
|
3140
|
+
const [internshipEndDateValue, setInternshipEndDateValue] = useState();
|
|
3141
|
+
useEffect(() => {
|
|
3142
|
+
setStartDate(field('internshipStartDate').value);
|
|
3143
|
+
}, [field('internshipStartDate').value]);
|
|
3144
|
+
const handleInputChange = (value) => {
|
|
3145
|
+
setInternshipEndDateValue(value);
|
|
3146
|
+
field(input?.name ?? '')?.onChange?.(value);
|
|
3147
|
+
setInternshipEndDateError(isDateValid(value, { minLimit: startDate }) ? '' : INTERNSHIP_END_DATE_ERROR);
|
|
3148
|
+
};
|
|
3149
|
+
return (jsx(DatePickerControl, { label: input?.label || 'Дата окончания практики', ...field(input?.name ?? ''), ...input, value: internshipEndDateValue, error: field(input?.name ?? '')?.error || internshipEndDateError, errors: [field(input?.name ?? '')?.error || internshipEndDateError], onChange: handleInputChange, minDate: startDate }));
|
|
3150
|
+
});
|
|
3151
|
+
|
|
3152
|
+
const INTERNSHIP_START_DATE_ERROR = 'Некорректно заполненное поле';
|
|
3153
|
+
const InternshipStartDateField = JSX(({ field, input }) => {
|
|
3154
|
+
const [endDate, setEndDate] = useState();
|
|
3155
|
+
const [internshipStartDateError, setInternshipStartDateError] = useState('');
|
|
3156
|
+
const [internshipStartDateValue, setInternshipStartDateValue] = useState();
|
|
3157
|
+
useEffect(() => {
|
|
3158
|
+
setEndDate(field('internshipEndDate').value);
|
|
3159
|
+
}, [field('internshipEndDate').value]);
|
|
3160
|
+
const handleInputChange = (value) => {
|
|
3161
|
+
setInternshipStartDateValue(value);
|
|
3162
|
+
field(input?.name ?? '')?.onChange?.(value);
|
|
3163
|
+
setInternshipStartDateError(isDateValid(value, { maxLimit: endDate }) ? '' : INTERNSHIP_START_DATE_ERROR);
|
|
3164
|
+
};
|
|
3165
|
+
return (jsx(DatePickerControl, { label: input?.label || 'Дата начала практики', ...field(input?.name ?? ''), ...input, value: internshipStartDateValue, error: internshipStartDateError || field(input?.name ?? '')?.error, errors: [internshipStartDateError ?? field(input?.name ?? '')?.error], onChange: handleInputChange, maxDate: endDate }));
|
|
3166
|
+
});
|
|
3167
|
+
|
|
2673
3168
|
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
2674
3169
|
|
|
2675
3170
|
const IsClientField = JSX(({ field, input }) => (jsx(CheckboxWithError, { ...field(input?.name ?? ''), ...input, text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })));
|
|
@@ -2800,6 +3295,8 @@
|
|
|
2800
3295
|
: withValidator(fieldPhone, validatorObj$1.secondaryPhone)) }));
|
|
2801
3296
|
});
|
|
2802
3297
|
|
|
3298
|
+
const SelectField$1 = JSX(({ field, input, label, options }) => (jsx(SelectControl, { label: label, options: options, ...field(input?.name ?? ''), ...input })));
|
|
3299
|
+
|
|
2803
3300
|
const ServiceDirectionField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...field(input?.name ?? ''), ...input })));
|
|
2804
3301
|
|
|
2805
3302
|
const SituationDescriptionField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438", ...input, ...field('situationDescription') })));
|
|
@@ -2813,6 +3310,8 @@
|
|
|
2813
3310
|
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
2814
3311
|
const TermField = JSX(({ field }) => (jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })));
|
|
2815
3312
|
|
|
3313
|
+
const TextField = JSX(({ field, input, label }) => (jsx(InputControl, { label: label, maxLength: 60, ...field(input?.name ?? ''), ...input })));
|
|
3314
|
+
|
|
2816
3315
|
const UltraPremiumField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...field(input?.name ?? ''), ...input })));
|
|
2817
3316
|
|
|
2818
3317
|
const orientationStyleMap = {
|
|
@@ -2833,22 +3332,6 @@
|
|
|
2833
3332
|
|
|
2834
3333
|
const ConsentToReceiveMaterialsField = JSX(({ field, input }) => (jsx(Checkbox, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u043D\u0430 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0438 \u0430\u043D\u0430\u043B\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u043E\u0432 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435", ...field(input?.name ?? ''), ...input })));
|
|
2835
3334
|
|
|
2836
|
-
const RefWrapper = JSX(({ onFieldRef = noop, children }) => {
|
|
2837
|
-
const ref = useRef(null);
|
|
2838
|
-
useEffect(() => {
|
|
2839
|
-
if (ref.current) {
|
|
2840
|
-
onFieldRef(ref.current);
|
|
2841
|
-
}
|
|
2842
|
-
}, []);
|
|
2843
|
-
return jsx("div", { ref: ref, children: children });
|
|
2844
|
-
});
|
|
2845
|
-
|
|
2846
|
-
function shouldRenderField({ input, field, }) {
|
|
2847
|
-
const { condition } = input;
|
|
2848
|
-
const { value } = field(condition?.name || '');
|
|
2849
|
-
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
3335
|
const PRODUCT_REF = {
|
|
2853
3336
|
$ref: '/wcms-resources/outservice-productlist.json',
|
|
2854
3337
|
};
|
|
@@ -2899,7 +3382,39 @@
|
|
|
2899
3382
|
questionProduct: QuestionProductField,
|
|
2900
3383
|
callbackTime: CallbackTimeField,
|
|
2901
3384
|
russianPhone: PhoneField,
|
|
3385
|
+
cityOfResidence: (props) => jsx(TextField, { ...props, label: "\u0413\u043E\u0440\u043E\u0434 \u043F\u0440\u043E\u0436\u0438\u0432\u0430\u043D\u0438\u044F" }),
|
|
3386
|
+
internshipStartDate: InternshipStartDateField,
|
|
3387
|
+
internshipEndDate: InternshipEndDateField,
|
|
3388
|
+
university: (props) => jsx(TextField, { ...props, label: "\u0412\u0423\u0417" }),
|
|
3389
|
+
courseYear: (props) => jsx(TextField, { ...props, label: "\u041A\u0443\u0440\u0441" }),
|
|
3390
|
+
graduationYear: (props) => jsx(TextField, { ...props, label: "\u0413\u043E\u0434 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F" }),
|
|
3391
|
+
fieldOfStudy: (props) => jsx(TextField, { ...props, label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0443\u0447\u0435\u043D\u0438\u044F" }),
|
|
3392
|
+
educationLevel: (props) => (jsx(SelectField$1, { ...props, label: "\u0421\u0442\u0443\u043F\u0435\u043D\u044C \u043E\u0431\u0443\u0447\u0435\u043D\u0438\u044F", options: EDUCATION_LEVEL })),
|
|
3393
|
+
averageGrade: AverageGradeField,
|
|
3394
|
+
skillsAndKnowledge: CommentField,
|
|
3395
|
+
workExperience: CommentField,
|
|
3396
|
+
motivationForInternship: CommentField,
|
|
3397
|
+
internshipDirection: (props) => (jsx(SelectField$1, { ...props, label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u0436\u0438\u0440\u043E\u0432\u043A\u0438", options: INTERNSHIP_DIRECTION })),
|
|
3398
|
+
workingHours: (props) => (jsx(SelectField$1, { ...props, label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u0447\u0430\u0441\u043E\u0432", options: WORKING_HOURS })),
|
|
3399
|
+
fileUpload: FileUploadField,
|
|
2902
3400
|
};
|
|
3401
|
+
|
|
3402
|
+
const RefWrapper = JSX(({ onFieldRef = noop, children }) => {
|
|
3403
|
+
const ref = useRef(null);
|
|
3404
|
+
useEffect(() => {
|
|
3405
|
+
if (ref.current) {
|
|
3406
|
+
onFieldRef(ref.current);
|
|
3407
|
+
}
|
|
3408
|
+
}, []);
|
|
3409
|
+
return jsx("div", { ref: ref, children: children });
|
|
3410
|
+
});
|
|
3411
|
+
|
|
3412
|
+
function shouldRenderField({ input, field, }) {
|
|
3413
|
+
const { condition } = input;
|
|
3414
|
+
const { value } = field(condition?.name || '');
|
|
3415
|
+
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
3416
|
+
}
|
|
3417
|
+
|
|
2903
3418
|
const getField = (field, params, externalInputs = {}) => (input, i) => {
|
|
2904
3419
|
const fieldsRegister = {
|
|
2905
3420
|
...InputsMap$1,
|
|
@@ -3095,7 +3610,7 @@
|
|
|
3095
3610
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog$1);
|
|
3096
3611
|
const handleSubmit = useCallback(async (formData, ev) => {
|
|
3097
3612
|
const formatData = getFormatData({ ...formData, ...additionalParams });
|
|
3098
|
-
await executeHandler(
|
|
3613
|
+
await executeHandler({
|
|
3099
3614
|
formatData,
|
|
3100
3615
|
ev,
|
|
3101
3616
|
typeForm,
|
|
@@ -3105,9 +3620,8 @@
|
|
|
3105
3620
|
responseTypeDialog,
|
|
3106
3621
|
verifyPhoneDialog,
|
|
3107
3622
|
onSuccess,
|
|
3108
|
-
endpoint,
|
|
3109
3623
|
withSnowplow,
|
|
3110
|
-
});
|
|
3624
|
+
}, endpoint);
|
|
3111
3625
|
}, [typeForm]);
|
|
3112
3626
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
3113
3627
|
resetOnSubmit: true,
|
|
@@ -3123,9 +3637,9 @@
|
|
|
3123
3637
|
typeForm,
|
|
3124
3638
|
})] }), isContacts ? renderContacts() : null] }));
|
|
3125
3639
|
});
|
|
3126
|
-
const executeHandler = async (
|
|
3127
|
-
const handler = handlerMap[endpoint] || handlerMap.default;
|
|
3128
|
-
await handler(context);
|
|
3640
|
+
const executeHandler = async (context, endpoint) => {
|
|
3641
|
+
const handler = (endpoint && handlerMap[endpoint]) || handlerMap.default;
|
|
3642
|
+
await handler({ ...context, endpoint });
|
|
3129
3643
|
};
|
|
3130
3644
|
|
|
3131
3645
|
const mapProductTypeToName = {
|
|
@@ -3593,11 +4107,7 @@
|
|
|
3593
4107
|
},
|
|
3594
4108
|
consentOthersFlg: {
|
|
3595
4109
|
text: 'Прочие согласия',
|
|
3596
|
-
docId:
|
|
3597
|
-
},
|
|
3598
|
-
consentInformMaterialsFlg: {
|
|
3599
|
-
text: 'Согласие на получение информационных материалов',
|
|
3600
|
-
docId: 18,
|
|
4110
|
+
docId: 1,
|
|
3601
4111
|
},
|
|
3602
4112
|
};
|
|
3603
4113
|
const DEBIT_CARD_CONSENTS = {
|
|
@@ -3632,7 +4142,6 @@
|
|
|
3632
4142
|
{ name: 'consentOthersFlg', required: true },
|
|
3633
4143
|
{ name: 'consentInformFlg' },
|
|
3634
4144
|
{ name: 'consentPfrFlg' },
|
|
3635
|
-
{ name: 'consentInformMaterialsFlg' },
|
|
3636
4145
|
{ name: 'consentFATCA', required: true },
|
|
3637
4146
|
];
|
|
3638
4147
|
return [
|
|
@@ -5911,7 +6420,6 @@
|
|
|
5911
6420
|
consentOthersFlg: ConsentField,
|
|
5912
6421
|
consentInformFlg: ConsentField,
|
|
5913
6422
|
consentPfrFlg: ConsentField,
|
|
5914
|
-
consentInformMaterialsFlg: ConsentField,
|
|
5915
6423
|
consentFATCA: ConsentField,
|
|
5916
6424
|
};
|
|
5917
6425
|
const InputsRetailMap = {
|
|
@@ -7030,7 +7538,7 @@
|
|
|
7030
7538
|
}
|
|
7031
7539
|
};
|
|
7032
7540
|
const transformConsentsFields = (formData, productType) => {
|
|
7033
|
-
const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg,
|
|
7541
|
+
const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg, consentFATCA, } = formData;
|
|
7034
7542
|
let consents;
|
|
7035
7543
|
if (productType === 'credit') {
|
|
7036
7544
|
consents = {
|
|
@@ -7041,7 +7549,6 @@
|
|
|
7041
7549
|
}
|
|
7042
7550
|
else if (productType === 'creditCard') {
|
|
7043
7551
|
consents = {
|
|
7044
|
-
consentInformMaterialsFlg,
|
|
7045
7552
|
consentPhotoFlg: false,
|
|
7046
7553
|
};
|
|
7047
7554
|
}
|
|
@@ -7170,7 +7677,6 @@
|
|
|
7170
7677
|
consentOthersFlg: false,
|
|
7171
7678
|
consentInformFlg: false,
|
|
7172
7679
|
consentPfrFlg: false,
|
|
7173
|
-
consentInformMaterialsFlg: false,
|
|
7174
7680
|
consentPhotoFlg: false,
|
|
7175
7681
|
consentFATCA: false,
|
|
7176
7682
|
};
|
|
@@ -8999,8 +9505,6 @@
|
|
|
8999
9505
|
const showIncreasedPercents = (currentCashback, cashback) => INCREASED_PERCENTS.includes(currentCashback.percent.key) ||
|
|
9000
9506
|
!cashback.some((_) => INCREASED_PERCENTS.includes(_.percent.key));
|
|
9001
9507
|
|
|
9002
|
-
const ProgressBar = JSX(({ step = 10, description, showPercentage = true }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? jsxs("div", { className: "absolute left-2/4 text-green", children: [step, "%"] }) : null, description ? jsx("div", { className: "text-right pr-m text-gray", children: description }) : null] })] })));
|
|
9003
|
-
|
|
9004
9508
|
const CreditCardFormProgress = JSX(({ step = 1, totalSteps = 6, stepsTitles = [] }) => {
|
|
9005
9509
|
const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
|
|
9006
9510
|
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold mr-s", children: ["\u0428\u0430\u0433 ", step + 1, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
|
|
@@ -12957,7 +13461,7 @@
|
|
|
12957
13461
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
12958
13462
|
});
|
|
12959
13463
|
|
|
12960
|
-
const packageVersion = "0.14.
|
|
13464
|
+
const packageVersion = "0.14.989";
|
|
12961
13465
|
|
|
12962
13466
|
exports.Blocks = Blocks;
|
|
12963
13467
|
exports.ContentPage = ContentPage;
|