@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -1203,6 +1203,27 @@
|
|
|
1203
1203
|
const cyrillicPattern = /^[а-яё-]*$/i;
|
|
1204
1204
|
const isCyrillic = (_ = '') => cyrillicPattern.test(_);
|
|
1205
1205
|
|
|
1206
|
+
const isDateValid = (value, limits) => {
|
|
1207
|
+
if (!value || isNaN(value.getTime())) {
|
|
1208
|
+
return false;
|
|
1209
|
+
}
|
|
1210
|
+
const { minLimit, maxLimit } = limits;
|
|
1211
|
+
const time = value.getTime();
|
|
1212
|
+
return isValidMin(time, minLimit) && isValidMax(time, maxLimit);
|
|
1213
|
+
};
|
|
1214
|
+
const isValidMin = (time, minLimit) => {
|
|
1215
|
+
if (!minLimit || isNaN(minLimit.getTime())) {
|
|
1216
|
+
return true;
|
|
1217
|
+
}
|
|
1218
|
+
return time > minLimit.getTime();
|
|
1219
|
+
};
|
|
1220
|
+
const isValidMax = (time, maxLimit) => {
|
|
1221
|
+
if (!maxLimit || isNaN(maxLimit.getTime())) {
|
|
1222
|
+
return true;
|
|
1223
|
+
}
|
|
1224
|
+
return time < maxLimit.getTime();
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1206
1227
|
const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
|
|
1207
1228
|
|
|
1208
1229
|
const ERROR_MESSAGE$1 = 'Некорректно заполненное поле';
|
|
@@ -1219,6 +1240,7 @@
|
|
|
1219
1240
|
const emailValidate = (email) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(email);
|
|
1220
1241
|
const emailValidator = (errorMsg) => validator((_) => emailValidate(_))(errorMsg);
|
|
1221
1242
|
const isValidInnLength = (value) => typeof value === 'string' && (value.length === 10 || value.length === 12);
|
|
1243
|
+
const birthdayValidator = (errorMsg) => validator((_) => isDateValid(_, { maxLimit: new Date() }))(errorMsg);
|
|
1222
1244
|
|
|
1223
1245
|
const validatorObj$1 = {
|
|
1224
1246
|
fullName: defaultValidator(),
|
|
@@ -1241,7 +1263,7 @@
|
|
|
1241
1263
|
surname: nameValidator('Укажите свою фамилию на кириллице'),
|
|
1242
1264
|
name: nameValidator('Укажите своё имя на кириллице (без сокращений)'),
|
|
1243
1265
|
middleName: nameValidator('Укажите своё отчество на кириллице'),
|
|
1244
|
-
birthday:
|
|
1266
|
+
birthday: birthdayValidator('Укажите дату рождения'),
|
|
1245
1267
|
phone: phoneValidator('Укажите номер телефона'),
|
|
1246
1268
|
email: emailValidator('Укажите электронную почту'),
|
|
1247
1269
|
inn: innValidator('Укажите ИНН'),
|
|
@@ -1255,6 +1277,20 @@
|
|
|
1255
1277
|
callbackTime: defaultValidator(),
|
|
1256
1278
|
questionProduct: defaultValidator(),
|
|
1257
1279
|
russianPhone: russianPhoneValidator('Укажите номер телефона'),
|
|
1280
|
+
cityOfResidence: defaultValidator(),
|
|
1281
|
+
internshipStartDate: defaultValidator(),
|
|
1282
|
+
internshipEndDate: defaultValidator(),
|
|
1283
|
+
university: defaultValidator(),
|
|
1284
|
+
fieldOfStudy: defaultValidator(),
|
|
1285
|
+
courseYear: defaultValidator(),
|
|
1286
|
+
graduationYear: defaultValidator(),
|
|
1287
|
+
averageGrade: defaultValidator(),
|
|
1288
|
+
skillsAndKnowledge: defaultValidator(),
|
|
1289
|
+
educationLevel: defaultSelectValidator(),
|
|
1290
|
+
motivationForInternship: defaultValidator(),
|
|
1291
|
+
workExperience: defaultValidator(),
|
|
1292
|
+
internshipDirection: defaultValidator(),
|
|
1293
|
+
workingHours: defaultValidator(),
|
|
1258
1294
|
};
|
|
1259
1295
|
const getFormValidator = (fieldDefs, externalValidatorObj = {}) => {
|
|
1260
1296
|
const requiredFields = fieldDefs.filter((_) => Boolean(_?.required && _?.name));
|
|
@@ -1415,6 +1451,32 @@
|
|
|
1415
1451
|
{ id: 'conversionTransactions', text: 'Конверсионные операции' },
|
|
1416
1452
|
{ id: 'otherIssues', text: 'Иные вопросы ВЭД' },
|
|
1417
1453
|
];
|
|
1454
|
+
const INTERNSHIP_DIRECTION = [
|
|
1455
|
+
{ key: 'economics', text: 'Экономика и финансы' },
|
|
1456
|
+
{ key: 'audit', text: 'Аудит' },
|
|
1457
|
+
{ key: 'law', text: 'Юриспруденция' },
|
|
1458
|
+
{ key: 'it', text: 'ИТ' },
|
|
1459
|
+
{ key: 'marketing', text: 'Маркетинг' },
|
|
1460
|
+
{ key: 'hr', text: 'HR' },
|
|
1461
|
+
{ key: 'analytics', text: 'Аналитика' },
|
|
1462
|
+
{ key: 'management', text: 'Менеджмент' },
|
|
1463
|
+
{ key: 'administration', text: 'ГМУ' },
|
|
1464
|
+
{ key: 'design', text: 'Дизайн' },
|
|
1465
|
+
{ key: 'journalism', text: 'Журналистика' },
|
|
1466
|
+
{ key: 'contact', text: 'Контакт-центр' },
|
|
1467
|
+
{ key: 'other', text: 'Другое' },
|
|
1468
|
+
];
|
|
1469
|
+
const WORKING_HOURS = [
|
|
1470
|
+
{ key: '20', text: '20' },
|
|
1471
|
+
{ key: '30', text: '30' },
|
|
1472
|
+
{ key: '40', text: '40' },
|
|
1473
|
+
];
|
|
1474
|
+
const EDUCATION_LEVEL = [
|
|
1475
|
+
{ key: 'bachelor', text: 'Бакалавриат' },
|
|
1476
|
+
{ key: 'specialist', text: 'Специалитет' },
|
|
1477
|
+
{ key: 'master', text: 'Магистратура' },
|
|
1478
|
+
{ key: 'doctorate', text: 'Аспирантура' },
|
|
1479
|
+
];
|
|
1418
1480
|
|
|
1419
1481
|
// TODO Базовая функицональность всех Control - надо вынести и привязать к required флагу
|
|
1420
1482
|
const getRequiredLabel = ({ label, required = false }) => label && required ? `${label}*` : label;
|
|
@@ -1466,6 +1528,9 @@
|
|
|
1466
1528
|
|
|
1467
1529
|
const getValidStyle = (valid) => (valid ? inputValidStyle : 'border-error');
|
|
1468
1530
|
|
|
1531
|
+
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1532
|
+
const borderStyle = 'border-dashed';
|
|
1533
|
+
|
|
1469
1534
|
const Input = JSX(
|
|
1470
1535
|
// eslint-disable-next-line max-lines-per-function
|
|
1471
1536
|
({ key, className, id, name, type = 'text', label, placeholder, value = '', valid = true, pattern, autoFocus = false, isTextarea = false, disabled = false, children, onChange, onFocus, onBlur, }) => {
|
|
@@ -1484,7 +1549,6 @@
|
|
|
1484
1549
|
const ariaLabel = label ?? name ?? id;
|
|
1485
1550
|
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] }));
|
|
1486
1551
|
});
|
|
1487
|
-
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1488
1552
|
|
|
1489
1553
|
const InputWrapper = JSX(({ className, label, value = '', error, errors, type, isInteger, placeholder, maxLength, inputRef, isOpen, onOpen, onClose, required, onChange = noop, ...rest }) => {
|
|
1490
1554
|
const popupRef = useOutsideClick(onClose);
|
|
@@ -1721,6 +1785,33 @@
|
|
|
1721
1785
|
|
|
1722
1786
|
const API_BASE_URI = '/api/v1';
|
|
1723
1787
|
|
|
1788
|
+
const ENDPOINT_MAPPING = {
|
|
1789
|
+
lead: {
|
|
1790
|
+
withTypeForm: true,
|
|
1791
|
+
isNaturalEndpoint: true,
|
|
1792
|
+
},
|
|
1793
|
+
sendcorporatelead: {
|
|
1794
|
+
withTypeForm: true,
|
|
1795
|
+
isNaturalEndpoint: false,
|
|
1796
|
+
},
|
|
1797
|
+
practice: {
|
|
1798
|
+
withTypeForm: false,
|
|
1799
|
+
isNaturalEndpoint: true,
|
|
1800
|
+
},
|
|
1801
|
+
internship: {
|
|
1802
|
+
withTypeForm: false,
|
|
1803
|
+
isNaturalEndpoint: true,
|
|
1804
|
+
},
|
|
1805
|
+
initcorporatelead: {
|
|
1806
|
+
withTypeForm: false,
|
|
1807
|
+
isNaturalEndpoint: false,
|
|
1808
|
+
},
|
|
1809
|
+
callback: {
|
|
1810
|
+
withTypeForm: false,
|
|
1811
|
+
isNaturalEndpoint: true,
|
|
1812
|
+
},
|
|
1813
|
+
};
|
|
1814
|
+
|
|
1724
1815
|
const formatDate = (date, toTimeStamp = false) => {
|
|
1725
1816
|
if (typeof date === 'string') {
|
|
1726
1817
|
return date.split('-').reverse().join('.');
|
|
@@ -1735,16 +1826,22 @@
|
|
|
1735
1826
|
|
|
1736
1827
|
const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
|
|
1737
1828
|
|
|
1738
|
-
const getSubmitBody = (body,
|
|
1739
|
-
const
|
|
1829
|
+
const getSubmitBody = ({ body, endpoint, router }) => {
|
|
1830
|
+
const isNaturalPerson = endpoint && ENDPOINT_MAPPING[endpoint].isNaturalEndpoint;
|
|
1831
|
+
const withTypeForm = endpoint && ENDPOINT_MAPPING[endpoint].withTypeForm;
|
|
1832
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, partnerSymbolCode, internshipEndDate, internshipStartDate, ...staticBody } = body;
|
|
1740
1833
|
return {
|
|
1741
|
-
typeForm,
|
|
1834
|
+
...(withTypeForm ? { typeForm } : {}),
|
|
1742
1835
|
...getRegion(region, isNaturalPerson),
|
|
1743
1836
|
...getEmail(email, isNaturalPerson),
|
|
1744
1837
|
...getPhone(phone),
|
|
1745
1838
|
...getPhone(russianPhone),
|
|
1746
|
-
...getFormatDate(
|
|
1747
|
-
...
|
|
1839
|
+
...(isNaturalPerson ? getFormatDate([[birthday, 'birthday']]) : { birthday }),
|
|
1840
|
+
...getFormatDate([
|
|
1841
|
+
[desiredMeetingDate, 'desiredMeetingDate'],
|
|
1842
|
+
[internshipEndDate, 'internshipEndDate'],
|
|
1843
|
+
[internshipStartDate, 'internshipStartDate'],
|
|
1844
|
+
]),
|
|
1748
1845
|
...(typeForm === 'FEEDBACK'
|
|
1749
1846
|
? {}
|
|
1750
1847
|
: {
|
|
@@ -1768,7 +1865,7 @@
|
|
|
1768
1865
|
};
|
|
1769
1866
|
};
|
|
1770
1867
|
const getPhone = (phone) => (phone ? { phone: formatPhone(phone) } : {});
|
|
1771
|
-
const getFormatDate = (
|
|
1868
|
+
const getFormatDate = (dates) => Object.fromEntries(dates.filter(([value]) => value).map(([value, key]) => [key, formatDate(value)]));
|
|
1772
1869
|
const getRegion = (region, isNaturalPerson = true) => ({
|
|
1773
1870
|
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
1774
1871
|
});
|
|
@@ -1792,11 +1889,14 @@
|
|
|
1792
1889
|
: {};
|
|
1793
1890
|
|
|
1794
1891
|
function LeadServiceAPI() {
|
|
1795
|
-
async function send(body, router,
|
|
1796
|
-
const
|
|
1797
|
-
const
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1892
|
+
async function send({ body, router, endpoint }) {
|
|
1893
|
+
const calculatedEndpoint = endpoint && getEndpoint(endpoint, body);
|
|
1894
|
+
const url = `${API_BASE_URI}/${calculatedEndpoint}`;
|
|
1895
|
+
const submitBody = getSubmitBody({
|
|
1896
|
+
body,
|
|
1897
|
+
endpoint,
|
|
1898
|
+
router,
|
|
1899
|
+
});
|
|
1800
1900
|
try {
|
|
1801
1901
|
const response = await LeadServiceFetch(url, submitBody);
|
|
1802
1902
|
if (!response?.ok) {
|
|
@@ -1827,7 +1927,7 @@
|
|
|
1827
1927
|
const submitBody = {
|
|
1828
1928
|
requestId: reqId,
|
|
1829
1929
|
confimationCode: code,
|
|
1830
|
-
leadRequest: getSubmitBody(body
|
|
1930
|
+
leadRequest: getSubmitBody({ body }),
|
|
1831
1931
|
};
|
|
1832
1932
|
try {
|
|
1833
1933
|
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
@@ -1837,9 +1937,9 @@
|
|
|
1837
1937
|
return null;
|
|
1838
1938
|
}
|
|
1839
1939
|
}
|
|
1840
|
-
async function sendPhoneCallRequest(body,
|
|
1940
|
+
async function sendPhoneCallRequest(body, endpoint) {
|
|
1841
1941
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1842
|
-
const submitBody = getSubmitBody(body,
|
|
1942
|
+
const submitBody = getSubmitBody({ body, endpoint });
|
|
1843
1943
|
const formatSubmitBody = getFormatCallbackSubmitBody(submitBody);
|
|
1844
1944
|
try {
|
|
1845
1945
|
const response = await LeadServiceFetch(`${API_BASE_URI}/callback`, formatSubmitBody);
|
|
@@ -1874,6 +1974,13 @@
|
|
|
1874
1974
|
clientTimezone: getUserTimezoneOffset(),
|
|
1875
1975
|
};
|
|
1876
1976
|
};
|
|
1977
|
+
const getEndpoint = (endpoint, body) => {
|
|
1978
|
+
const { serviceDirection } = body;
|
|
1979
|
+
if (endpoint === 'lead' && serviceDirection !== 'Юридическое лицо / ИП') {
|
|
1980
|
+
return 'lead';
|
|
1981
|
+
}
|
|
1982
|
+
return endpoint;
|
|
1983
|
+
};
|
|
1877
1984
|
|
|
1878
1985
|
const handleAspects = async ({ aspectsAttributes, aspects, ev }) => {
|
|
1879
1986
|
for (const { aspectName, params } of aspectsAttributes ?? []) {
|
|
@@ -1903,8 +2010,8 @@
|
|
|
1903
2010
|
},
|
|
1904
2011
|
});
|
|
1905
2012
|
};
|
|
1906
|
-
const handleCallback = async ({ formatData, data, aspects = {}, ev, typeForm, responseTypeDialog, onSuccess = noop, }) => {
|
|
1907
|
-
const response = await API$2.sendPhoneCallRequest(formatData);
|
|
2013
|
+
const handleCallback = async ({ formatData, data, aspects = {}, ev, typeForm, responseTypeDialog, onSuccess = noop, endpoint, }) => {
|
|
2014
|
+
const response = await API$2.sendPhoneCallRequest(formatData, endpoint);
|
|
1908
2015
|
onSuccess();
|
|
1909
2016
|
if (response?.status === 'success') {
|
|
1910
2017
|
responseTypeDialog.open({ ok: true, typeForm });
|
|
@@ -1924,7 +2031,7 @@
|
|
|
1924
2031
|
}
|
|
1925
2032
|
};
|
|
1926
2033
|
const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, withSnowplow, }) => {
|
|
1927
|
-
const response = await API$2.send(formatData, router, endpoint
|
|
2034
|
+
const response = await API$2.send({ body: formatData, router, endpoint });
|
|
1928
2035
|
const ok = Boolean(response);
|
|
1929
2036
|
responseTypeDialog.open({ ok });
|
|
1930
2037
|
if (ok) {
|
|
@@ -2200,6 +2307,10 @@
|
|
|
2200
2307
|
|
|
2201
2308
|
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') })));
|
|
2202
2309
|
|
|
2310
|
+
const AverageGradeField = JSX(({ field, input }) => {
|
|
2311
|
+
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 }));
|
|
2312
|
+
});
|
|
2313
|
+
|
|
2203
2314
|
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 })));
|
|
2204
2315
|
|
|
2205
2316
|
const useElementSpace = (ref, heightEl) => {
|
|
@@ -2314,7 +2425,7 @@
|
|
|
2314
2425
|
const START_YEAR = 1940;
|
|
2315
2426
|
const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
|
|
2316
2427
|
|
|
2317
|
-
const ICON_PROPS$
|
|
2428
|
+
const ICON_PROPS$2 = {
|
|
2318
2429
|
name: 'CalendarIcon',
|
|
2319
2430
|
iconVersion: 'black',
|
|
2320
2431
|
width: '24',
|
|
@@ -2349,7 +2460,7 @@
|
|
|
2349
2460
|
useEffect(() => {
|
|
2350
2461
|
updateSelectedDate({ inputValue, setSelectedMonth, setSelectedYear, onChange });
|
|
2351
2462
|
}, [inputValue]);
|
|
2352
|
-
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$
|
|
2463
|
+
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 })] }));
|
|
2353
2464
|
});
|
|
2354
2465
|
const isValidYear = (year) => Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
|
|
2355
2466
|
const isValidMonth = (month) => Number(month) > 0 && Number(month) < 13;
|
|
@@ -2456,7 +2567,7 @@
|
|
|
2456
2567
|
onChange?.(new Date(selectedYear, selectedMonth, Math.min(maxDateOfMonth, value.getDate())));
|
|
2457
2568
|
};
|
|
2458
2569
|
|
|
2459
|
-
const ICON_PROPS = {
|
|
2570
|
+
const ICON_PROPS$1 = {
|
|
2460
2571
|
name: 'ArrowUpIcon',
|
|
2461
2572
|
iconVersion: 'black',
|
|
2462
2573
|
width: '24',
|
|
@@ -2498,18 +2609,21 @@
|
|
|
2498
2609
|
setSelectedYear,
|
|
2499
2610
|
}), isCalendarVisible && !disabled ? (jsxs("div", { className: style('absolute bg-white z-20 select-none', {
|
|
2500
2611
|
'bottom-full': spaceAbove,
|
|
2501
|
-
}), 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] })] }));
|
|
2612
|
+
}), 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] })] }));
|
|
2502
2613
|
});
|
|
2503
2614
|
|
|
2504
2615
|
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)] })));
|
|
2505
2616
|
|
|
2506
|
-
const BirthdayField = JSX(({ field, input }) =>
|
|
2617
|
+
const BirthdayField = JSX(({ field, input }) => {
|
|
2618
|
+
const today = new Date();
|
|
2619
|
+
return (jsx(DatePickerControl, { label: input?.label || 'Дата рождения', ...field(input?.name ?? ''), maxDate: today, ...input }));
|
|
2620
|
+
});
|
|
2507
2621
|
|
|
2508
2622
|
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 ?? '') })));
|
|
2509
2623
|
|
|
2510
2624
|
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 })));
|
|
2511
2625
|
|
|
2512
|
-
const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...field(input?.name ?? ''), placeholder:
|
|
2626
|
+
const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...field(input?.name ?? ''), placeholder: input?.placeholder ?? 'Ваше сообщение', isTextarea: true, ...input })));
|
|
2513
2627
|
|
|
2514
2628
|
function useAsyncEffect(effect, deps) {
|
|
2515
2629
|
useEffect(() => {
|
|
@@ -2648,6 +2762,355 @@
|
|
|
2648
2762
|
|
|
2649
2763
|
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 })));
|
|
2650
2764
|
|
|
2765
|
+
const ACCEPTED_EXTENSIONS_TEXT = 'Поддерживаемые форматы файлов';
|
|
2766
|
+
const MAX_SIZE_TEXT = 'Максимальный размер файла';
|
|
2767
|
+
const EMPTY_FILE_ERROR_TEXT = 'Ошибка загрузки файла. Убедитесь, что файл не пустой';
|
|
2768
|
+
const EXTENSIONS_ERROR_TEXT = 'Файл не соответствует допустимым расширениям';
|
|
2769
|
+
const MAX_SIZE_ERROR_TEXT = 'Файл превышает допустимый размер';
|
|
2770
|
+
const DEFAULT_ERROR_TEXT = 'Ошибка при загрузке файла. Попробуйте загрузить файл позднее';
|
|
2771
|
+
|
|
2772
|
+
const FILE_CHECK_URL = 'uploadFile';
|
|
2773
|
+
const SUCCESS_STATUS = 'SUCCESS';
|
|
2774
|
+
async function sendFile({ file, onProgress = noop }) {
|
|
2775
|
+
return new Promise((resolve, reject) => {
|
|
2776
|
+
const formData = new FormData();
|
|
2777
|
+
formData.append('file', file);
|
|
2778
|
+
let processingAnimation = undefined;
|
|
2779
|
+
const xhr = new XMLHttpRequest();
|
|
2780
|
+
let lastProgress;
|
|
2781
|
+
xhr.upload.onprogress = (event) => {
|
|
2782
|
+
if (event.lengthComputable) {
|
|
2783
|
+
const percentComplete = (event.loaded / event.total) * 50;
|
|
2784
|
+
onProgress(percentComplete);
|
|
2785
|
+
}
|
|
2786
|
+
};
|
|
2787
|
+
xhr.upload.onload = () => {
|
|
2788
|
+
let current = 50;
|
|
2789
|
+
onProgress(current);
|
|
2790
|
+
processingAnimation = window.setInterval(() => {
|
|
2791
|
+
current += 0.2;
|
|
2792
|
+
lastProgress = current;
|
|
2793
|
+
if (current < 90) {
|
|
2794
|
+
onProgress(current);
|
|
2795
|
+
}
|
|
2796
|
+
else {
|
|
2797
|
+
onProgress(90);
|
|
2798
|
+
window.clearInterval(processingAnimation);
|
|
2799
|
+
}
|
|
2800
|
+
}, 100);
|
|
2801
|
+
};
|
|
2802
|
+
xhr.onload = async () => {
|
|
2803
|
+
try {
|
|
2804
|
+
const response = JSON.parse(xhr.responseText);
|
|
2805
|
+
if (response.status === 'SUCCESS') {
|
|
2806
|
+
window.clearInterval(processingAnimation);
|
|
2807
|
+
await animateToFull(lastProgress, onProgress);
|
|
2808
|
+
resolve(response);
|
|
2809
|
+
}
|
|
2810
|
+
else {
|
|
2811
|
+
reject(new Error(response.errorDesc ?? DEFAULT_ERROR_TEXT));
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
catch (e) {
|
|
2815
|
+
reject(new Error(DEFAULT_ERROR_TEXT));
|
|
2816
|
+
}
|
|
2817
|
+
};
|
|
2818
|
+
xhr.onerror = () => {
|
|
2819
|
+
reject(new Error(DEFAULT_ERROR_TEXT));
|
|
2820
|
+
};
|
|
2821
|
+
xhr.open('POST', `${API_BASE_URI}/${FILE_CHECK_URL}`);
|
|
2822
|
+
xhr.send(formData);
|
|
2823
|
+
});
|
|
2824
|
+
}
|
|
2825
|
+
const animateToFull = (current, onProgress) => new Promise((resolve) => {
|
|
2826
|
+
let value = current;
|
|
2827
|
+
const increment = (100 - current) / 30;
|
|
2828
|
+
const interval = 16;
|
|
2829
|
+
const step = () => {
|
|
2830
|
+
value += increment;
|
|
2831
|
+
if (value >= 100) {
|
|
2832
|
+
onProgress(100);
|
|
2833
|
+
resolve();
|
|
2834
|
+
}
|
|
2835
|
+
else {
|
|
2836
|
+
onProgress(value);
|
|
2837
|
+
setTimeout(step, interval);
|
|
2838
|
+
}
|
|
2839
|
+
};
|
|
2840
|
+
step();
|
|
2841
|
+
});
|
|
2842
|
+
|
|
2843
|
+
const useDragAndDrop = ({ onFileSelected, onReset, uploadResponse, onFileChanged, }) => {
|
|
2844
|
+
const [isDragActive, setIsDragActive] = useState(false);
|
|
2845
|
+
const handleDrag = (e) => {
|
|
2846
|
+
e.preventDefault();
|
|
2847
|
+
if (uploadResponse) {
|
|
2848
|
+
return;
|
|
2849
|
+
}
|
|
2850
|
+
setIsDragActive(true);
|
|
2851
|
+
};
|
|
2852
|
+
const handleLeave = () => setIsDragActive(false);
|
|
2853
|
+
const handleDrop = async (e) => {
|
|
2854
|
+
e.preventDefault();
|
|
2855
|
+
if (uploadResponse) {
|
|
2856
|
+
return;
|
|
2857
|
+
}
|
|
2858
|
+
onReset();
|
|
2859
|
+
setIsDragActive(false);
|
|
2860
|
+
const file = e.dataTransfer?.files?.[0];
|
|
2861
|
+
if (file) {
|
|
2862
|
+
await onFileSelected({ file, onFileChanged });
|
|
2863
|
+
}
|
|
2864
|
+
};
|
|
2865
|
+
return { handleDrag, handleLeave, handleDrop, isDragActive };
|
|
2866
|
+
};
|
|
2867
|
+
|
|
2868
|
+
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] })] })));
|
|
2869
|
+
|
|
2870
|
+
const ICON_PROPS = {
|
|
2871
|
+
name: 'DocIcon',
|
|
2872
|
+
iconVersion: 'black',
|
|
2873
|
+
width: '24',
|
|
2874
|
+
height: '24',
|
|
2875
|
+
};
|
|
2876
|
+
const renderFileInput = ({ label, inputRef, id, key, type, name, pattern, disabled, onChange = noop, onFocus, onBlur, extensions, uploadResponse, file, }) => {
|
|
2877
|
+
const ariaLabel = label ?? name ?? id;
|
|
2878
|
+
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) => {
|
|
2879
|
+
e?.target?.files && onChange(e?.target?.files[0]);
|
|
2880
|
+
}, onFocus: onFocus, onBlur: onBlur, accept: extensionsToAccept(extensions) }, key)] })) }));
|
|
2881
|
+
};
|
|
2882
|
+
const extensionsToAccept = (extensions = []) => {
|
|
2883
|
+
return extensions
|
|
2884
|
+
.map((ext) => {
|
|
2885
|
+
const str = String(ext).trim();
|
|
2886
|
+
return str.startsWith('.') ? str : '.' + str;
|
|
2887
|
+
})
|
|
2888
|
+
.map((ext) => ext.toLowerCase())
|
|
2889
|
+
.filter((ext, index, arr) => arr.indexOf(ext) === index)
|
|
2890
|
+
.join(', ');
|
|
2891
|
+
};
|
|
2892
|
+
const renderFileName = (file) => jsx("span", { children: file?.name });
|
|
2893
|
+
|
|
2894
|
+
const renderInfoText = (extensions, maxSize) => {
|
|
2895
|
+
const extensionsMessage = extensions
|
|
2896
|
+
? `${ACCEPTED_EXTENSIONS_TEXT} - ${extensions.join(', ')}. `
|
|
2897
|
+
: '';
|
|
2898
|
+
const maxSizeMessage = maxSize ? `${MAX_SIZE_TEXT} - ${maxSize}Мб.` : '';
|
|
2899
|
+
return (jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: extensionsMessage + maxSizeMessage }));
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
const animateStepWithMinDuration = ({ from, to, onUpdate = noop, minDuration = 300, }) => {
|
|
2903
|
+
return new Promise((resolve) => {
|
|
2904
|
+
const startTime = performance.now();
|
|
2905
|
+
const animate = () => {
|
|
2906
|
+
const currentTime = performance.now();
|
|
2907
|
+
const elapsed = currentTime - startTime;
|
|
2908
|
+
const animationProgress = Math.min(elapsed / minDuration, 1);
|
|
2909
|
+
const easeProgress = 1 - Math.pow(1 - animationProgress, 3);
|
|
2910
|
+
const value = from + (to - from) * easeProgress;
|
|
2911
|
+
onUpdate(value);
|
|
2912
|
+
if (animationProgress < 1) {
|
|
2913
|
+
requestAnimationFrame(animate);
|
|
2914
|
+
}
|
|
2915
|
+
else {
|
|
2916
|
+
onUpdate(to);
|
|
2917
|
+
resolve();
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
requestAnimationFrame(animate);
|
|
2921
|
+
});
|
|
2922
|
+
};
|
|
2923
|
+
|
|
2924
|
+
const checkFileExtension = async (file, extensions) => {
|
|
2925
|
+
const fileExt = file.name.split('.')[1];
|
|
2926
|
+
console.log(fileExt, extensions);
|
|
2927
|
+
if (!extensions?.includes(fileExt)) {
|
|
2928
|
+
throw new Error(EXTENSIONS_ERROR_TEXT);
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
|
|
2932
|
+
const EXT_TO_MIME = {
|
|
2933
|
+
pdf: 'application/pdf',
|
|
2934
|
+
doc: 'application/msword',
|
|
2935
|
+
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
2936
|
+
pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
2937
|
+
};
|
|
2938
|
+
const checkFileMimeType = async (file, extensions) => {
|
|
2939
|
+
const fileMimeType = file?.type ?? '';
|
|
2940
|
+
const expectedMimeTypes = (extensions || [])
|
|
2941
|
+
.map((ext) => EXT_TO_MIME[ext])
|
|
2942
|
+
.filter((mime) => mime !== undefined);
|
|
2943
|
+
if (!expectedMimeTypes.includes(fileMimeType)) {
|
|
2944
|
+
throw new Error(EXTENSIONS_ERROR_TEXT);
|
|
2945
|
+
}
|
|
2946
|
+
};
|
|
2947
|
+
|
|
2948
|
+
const getFileSignature = (file) => {
|
|
2949
|
+
return new Promise((resolve, reject) => {
|
|
2950
|
+
const reader = new FileReader();
|
|
2951
|
+
reader.onload = () => {
|
|
2952
|
+
const buffer = reader.result;
|
|
2953
|
+
const bytes = new Uint8Array(buffer);
|
|
2954
|
+
const hex = Array.from(bytes)
|
|
2955
|
+
.map((b) => b.toString(16).padStart(2, '0'))
|
|
2956
|
+
.join(' ');
|
|
2957
|
+
resolve(hex);
|
|
2958
|
+
};
|
|
2959
|
+
reader.onerror = reject;
|
|
2960
|
+
return file && reader.readAsArrayBuffer(file.slice(0, 8));
|
|
2961
|
+
});
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
const SIGNATURES = {
|
|
2965
|
+
pdf: '25 50 44 46 2d',
|
|
2966
|
+
docx: '50 4b 03 04',
|
|
2967
|
+
pptx: '50 4b 03 04',
|
|
2968
|
+
xlsx: '50 4b 03 04',
|
|
2969
|
+
doc: 'D0 CF 11 E0 A1 B1 1A E1',
|
|
2970
|
+
};
|
|
2971
|
+
const checkFileSignature = async (file, expectedTypes) => {
|
|
2972
|
+
const hexSignature = await getFileSignature(file);
|
|
2973
|
+
const isValid = (expectedTypes ?? []).some((type) => {
|
|
2974
|
+
const expectedSignature = SIGNATURES[type]?.toLowerCase();
|
|
2975
|
+
console.log(expectedSignature);
|
|
2976
|
+
console.log(hexSignature);
|
|
2977
|
+
return expectedSignature && hexSignature.startsWith(expectedSignature);
|
|
2978
|
+
});
|
|
2979
|
+
if (!isValid) {
|
|
2980
|
+
throw new Error(EXTENSIONS_ERROR_TEXT);
|
|
2981
|
+
}
|
|
2982
|
+
};
|
|
2983
|
+
|
|
2984
|
+
const checkFileSize = async (file, maxSizeMB) => {
|
|
2985
|
+
if (maxSizeMB && file.size > maxSizeMB * 1024 * 1024) {
|
|
2986
|
+
throw new Error(MAX_SIZE_ERROR_TEXT);
|
|
2987
|
+
}
|
|
2988
|
+
if (file.size === 0) {
|
|
2989
|
+
throw new Error(EMPTY_FILE_ERROR_TEXT);
|
|
2990
|
+
}
|
|
2991
|
+
};
|
|
2992
|
+
|
|
2993
|
+
const DEBOUNCE_DELAY = 500;
|
|
2994
|
+
const useVerifyFile = ({ onUploadError = noop, onFileSelected = noop, extensions, maxSizeMB, onUploadResponse = noop, }) => {
|
|
2995
|
+
const [progress, setProgress] = useState(0);
|
|
2996
|
+
const [isFileUploading, setIsFileUploading] = useState(false);
|
|
2997
|
+
const debouncedOnFileUploaded = useMemo(() => debounce((isUploading) => setIsFileUploading(isUploading), DEBOUNCE_DELAY), [setIsFileUploading]);
|
|
2998
|
+
const debouncedOnUploadError = useMemo(() => debounce((message) => onUploadError(message), DEBOUNCE_DELAY), [onUploadError]);
|
|
2999
|
+
const debouncedOnUploadResponse = useMemo(() => debounce((response) => onUploadResponse(response), DEBOUNCE_DELAY), [onUploadResponse]);
|
|
3000
|
+
const verifyFile = async ({ file, onFileChanged = noop }) => {
|
|
3001
|
+
onFileSelected(file);
|
|
3002
|
+
setIsFileUploading(true);
|
|
3003
|
+
const checks = [
|
|
3004
|
+
() => checkFileExtension(file, extensions),
|
|
3005
|
+
() => checkFileSize(file, maxSizeMB),
|
|
3006
|
+
() => checkFileSignature(file, extensions),
|
|
3007
|
+
() => checkFileMimeType(file, extensions),
|
|
3008
|
+
];
|
|
3009
|
+
const checkProgressStep = 50 / checks.length;
|
|
3010
|
+
let currentProgress = 0;
|
|
3011
|
+
try {
|
|
3012
|
+
for (let i = 0; i < checks.length; i++) {
|
|
3013
|
+
const checkPromise = checks[i];
|
|
3014
|
+
await checkPromise();
|
|
3015
|
+
const targetProgress = (i + 1) * checkProgressStep;
|
|
3016
|
+
await animateStepWithMinDuration({
|
|
3017
|
+
from: currentProgress,
|
|
3018
|
+
to: targetProgress,
|
|
3019
|
+
onUpdate: setProgress,
|
|
3020
|
+
minDuration: 300,
|
|
3021
|
+
});
|
|
3022
|
+
currentProgress = targetProgress;
|
|
3023
|
+
}
|
|
3024
|
+
const response = await sendFile({
|
|
3025
|
+
file,
|
|
3026
|
+
onProgress: setProgress,
|
|
3027
|
+
});
|
|
3028
|
+
debouncedOnUploadResponse(response);
|
|
3029
|
+
onFileChanged(response?.fileId ?? '');
|
|
3030
|
+
if (response?.status === SUCCESS_STATUS) {
|
|
3031
|
+
debouncedOnFileUploaded?.(false);
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
catch (e) {
|
|
3035
|
+
const errorMessage = e instanceof Error ? e.message : DEFAULT_ERROR_TEXT;
|
|
3036
|
+
debouncedOnUploadError(errorMessage);
|
|
3037
|
+
onFileChanged('');
|
|
3038
|
+
}
|
|
3039
|
+
debouncedOnFileUploaded?.(false);
|
|
3040
|
+
};
|
|
3041
|
+
return { verifyFile, isFileUploading, progress };
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3044
|
+
const InputFile = JSX(
|
|
3045
|
+
// eslint-disable-next-line max-lines-per-function
|
|
3046
|
+
({ key, className, id, name, type = 'file', label, valid = true, pattern, autoFocus = false, extensions, children, onFocus, onBlur, maxSizeMB, error, onFileChanged = noop, }) => {
|
|
3047
|
+
const inputRef = useRef(null);
|
|
3048
|
+
const [selectedFile, setSelectedFile] = useState(null);
|
|
3049
|
+
const [uploadError, setUploadError] = useState('');
|
|
3050
|
+
const [uploadResponse, setUploadResponse] = useState(null);
|
|
3051
|
+
const { verifyFile, isFileUploading, progress } = useVerifyFile({
|
|
3052
|
+
onUploadError: setUploadError,
|
|
3053
|
+
onUploadResponse: setUploadResponse,
|
|
3054
|
+
onFileSelected: setSelectedFile,
|
|
3055
|
+
extensions,
|
|
3056
|
+
maxSizeMB,
|
|
3057
|
+
});
|
|
3058
|
+
useEffect(() => {
|
|
3059
|
+
if (autoFocus) {
|
|
3060
|
+
inputRef.current?.focus();
|
|
3061
|
+
}
|
|
3062
|
+
}, [autoFocus, inputRef]);
|
|
3063
|
+
const handleFileChange = async (file) => {
|
|
3064
|
+
handleResetFile();
|
|
3065
|
+
if (file) {
|
|
3066
|
+
await verifyFile({ file, onFileChanged });
|
|
3067
|
+
}
|
|
3068
|
+
};
|
|
3069
|
+
const handleResetFile = () => {
|
|
3070
|
+
setSelectedFile(null);
|
|
3071
|
+
setUploadError('');
|
|
3072
|
+
setUploadResponse(null);
|
|
3073
|
+
onFileChanged('');
|
|
3074
|
+
};
|
|
3075
|
+
const { handleDrag, handleLeave, handleDrop, isDragActive } = useDragAndDrop({
|
|
3076
|
+
onReset: handleResetFile,
|
|
3077
|
+
onFileSelected: verifyFile,
|
|
3078
|
+
uploadResponse,
|
|
3079
|
+
onFileChanged,
|
|
3080
|
+
});
|
|
3081
|
+
const paddingStyle = children ? 'pr-3xl' : '';
|
|
3082
|
+
const validStyle = getValidStyle(valid);
|
|
3083
|
+
const activeDragStyle = isDragActive ? 'border-primary-hover' : '';
|
|
3084
|
+
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({
|
|
3085
|
+
label,
|
|
3086
|
+
inputRef,
|
|
3087
|
+
id,
|
|
3088
|
+
key,
|
|
3089
|
+
type,
|
|
3090
|
+
name,
|
|
3091
|
+
pattern,
|
|
3092
|
+
disabled: Boolean(uploadResponse || isFileUploading),
|
|
3093
|
+
onChange: handleFileChange,
|
|
3094
|
+
onFocus,
|
|
3095
|
+
onBlur,
|
|
3096
|
+
extensions,
|
|
3097
|
+
uploadResponse,
|
|
3098
|
+
file: selectedFile,
|
|
3099
|
+
})) }), uploadResponse?.status === SUCCESS_STATUS ? (jsx(CloseButton, { className: "absolute top-0 right-0 z-10", onClose: handleResetFile })) : null, renderInfoText(extensions, maxSizeMB), renderErrorText(error || uploadError), children] }));
|
|
3100
|
+
});
|
|
3101
|
+
|
|
3102
|
+
const InputFileControl = JSX(({ label, value = '', error, type, inputRef, required, ...rest }) => {
|
|
3103
|
+
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 }) }));
|
|
3104
|
+
});
|
|
3105
|
+
|
|
3106
|
+
const FileUploadField = JSX(({ field, input }) => {
|
|
3107
|
+
const [fileId, setFileId] = useState('');
|
|
3108
|
+
useEffect(() => {
|
|
3109
|
+
field('fileId')?.onChange?.(fileId);
|
|
3110
|
+
}, [fileId]);
|
|
3111
|
+
return (jsx(InputFileControl, { type: "file", label: input?.name ?? '', ...field(input?.name ?? ''), ...input, onFileChanged: setFileId }));
|
|
3112
|
+
});
|
|
3113
|
+
|
|
2651
3114
|
const FullNameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0418\u041E", ...field(input?.name ?? ''), ...input })));
|
|
2652
3115
|
|
|
2653
3116
|
const FullRegionField = JSX(({ field, input, params }) => {
|
|
@@ -2662,6 +3125,38 @@
|
|
|
2662
3125
|
|
|
2663
3126
|
const InnField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? '') })));
|
|
2664
3127
|
|
|
3128
|
+
const INTERNSHIP_END_DATE_ERROR = 'Некорректно заполненное поле';
|
|
3129
|
+
const InternshipEndDateField = JSX(({ field, input }) => {
|
|
3130
|
+
const [startDate, setStartDate] = useState();
|
|
3131
|
+
const [internshipEndDateError, setInternshipEndDateError] = useState('');
|
|
3132
|
+
const [internshipEndDateValue, setInternshipEndDateValue] = useState();
|
|
3133
|
+
useEffect(() => {
|
|
3134
|
+
setStartDate(field('internshipStartDate').value);
|
|
3135
|
+
}, [field('internshipStartDate').value]);
|
|
3136
|
+
const handleInputChange = (value) => {
|
|
3137
|
+
setInternshipEndDateValue(value);
|
|
3138
|
+
field(input?.name ?? '')?.onChange?.(value);
|
|
3139
|
+
setInternshipEndDateError(isDateValid(value, { minLimit: startDate }) ? '' : INTERNSHIP_END_DATE_ERROR);
|
|
3140
|
+
};
|
|
3141
|
+
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 }));
|
|
3142
|
+
});
|
|
3143
|
+
|
|
3144
|
+
const INTERNSHIP_START_DATE_ERROR = 'Некорректно заполненное поле';
|
|
3145
|
+
const InternshipStartDateField = JSX(({ field, input }) => {
|
|
3146
|
+
const [endDate, setEndDate] = useState();
|
|
3147
|
+
const [internshipStartDateError, setInternshipStartDateError] = useState('');
|
|
3148
|
+
const [internshipStartDateValue, setInternshipStartDateValue] = useState();
|
|
3149
|
+
useEffect(() => {
|
|
3150
|
+
setEndDate(field('internshipEndDate').value);
|
|
3151
|
+
}, [field('internshipEndDate').value]);
|
|
3152
|
+
const handleInputChange = (value) => {
|
|
3153
|
+
setInternshipStartDateValue(value);
|
|
3154
|
+
field(input?.name ?? '')?.onChange?.(value);
|
|
3155
|
+
setInternshipStartDateError(isDateValid(value, { maxLimit: endDate }) ? '' : INTERNSHIP_START_DATE_ERROR);
|
|
3156
|
+
};
|
|
3157
|
+
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 }));
|
|
3158
|
+
});
|
|
3159
|
+
|
|
2665
3160
|
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)] })));
|
|
2666
3161
|
|
|
2667
3162
|
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"' })));
|
|
@@ -2792,6 +3287,8 @@
|
|
|
2792
3287
|
: withValidator(fieldPhone, validatorObj$1.secondaryPhone)) }));
|
|
2793
3288
|
});
|
|
2794
3289
|
|
|
3290
|
+
const SelectField$1 = JSX(({ field, input, label, options }) => (jsx(SelectControl, { label: label, options: options, ...field(input?.name ?? ''), ...input })));
|
|
3291
|
+
|
|
2795
3292
|
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 })));
|
|
2796
3293
|
|
|
2797
3294
|
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') })));
|
|
@@ -2805,6 +3302,8 @@
|
|
|
2805
3302
|
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
2806
3303
|
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') })));
|
|
2807
3304
|
|
|
3305
|
+
const TextField = JSX(({ field, input, label }) => (jsx(InputControl, { label: label, maxLength: 60, ...field(input?.name ?? ''), ...input })));
|
|
3306
|
+
|
|
2808
3307
|
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 })));
|
|
2809
3308
|
|
|
2810
3309
|
const orientationStyleMap = {
|
|
@@ -2825,22 +3324,6 @@
|
|
|
2825
3324
|
|
|
2826
3325
|
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 })));
|
|
2827
3326
|
|
|
2828
|
-
const RefWrapper = JSX(({ onFieldRef = noop, children }) => {
|
|
2829
|
-
const ref = useRef(null);
|
|
2830
|
-
useEffect(() => {
|
|
2831
|
-
if (ref.current) {
|
|
2832
|
-
onFieldRef(ref.current);
|
|
2833
|
-
}
|
|
2834
|
-
}, []);
|
|
2835
|
-
return jsx("div", { ref: ref, children: children });
|
|
2836
|
-
});
|
|
2837
|
-
|
|
2838
|
-
function shouldRenderField({ input, field, }) {
|
|
2839
|
-
const { condition } = input;
|
|
2840
|
-
const { value } = field(condition?.name || '');
|
|
2841
|
-
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
3327
|
const PRODUCT_REF = {
|
|
2845
3328
|
$ref: '/wcms-resources/outservice-productlist.json',
|
|
2846
3329
|
};
|
|
@@ -2891,7 +3374,39 @@
|
|
|
2891
3374
|
questionProduct: QuestionProductField,
|
|
2892
3375
|
callbackTime: CallbackTimeField,
|
|
2893
3376
|
russianPhone: PhoneField,
|
|
3377
|
+
cityOfResidence: (props) => jsx(TextField, { ...props, label: "\u0413\u043E\u0440\u043E\u0434 \u043F\u0440\u043E\u0436\u0438\u0432\u0430\u043D\u0438\u044F" }),
|
|
3378
|
+
internshipStartDate: InternshipStartDateField,
|
|
3379
|
+
internshipEndDate: InternshipEndDateField,
|
|
3380
|
+
university: (props) => jsx(TextField, { ...props, label: "\u0412\u0423\u0417" }),
|
|
3381
|
+
courseYear: (props) => jsx(TextField, { ...props, label: "\u041A\u0443\u0440\u0441" }),
|
|
3382
|
+
graduationYear: (props) => jsx(TextField, { ...props, label: "\u0413\u043E\u0434 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F" }),
|
|
3383
|
+
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" }),
|
|
3384
|
+
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 })),
|
|
3385
|
+
averageGrade: AverageGradeField,
|
|
3386
|
+
skillsAndKnowledge: CommentField,
|
|
3387
|
+
workExperience: CommentField,
|
|
3388
|
+
motivationForInternship: CommentField,
|
|
3389
|
+
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 })),
|
|
3390
|
+
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 })),
|
|
3391
|
+
fileUpload: FileUploadField,
|
|
2894
3392
|
};
|
|
3393
|
+
|
|
3394
|
+
const RefWrapper = JSX(({ onFieldRef = noop, children }) => {
|
|
3395
|
+
const ref = useRef(null);
|
|
3396
|
+
useEffect(() => {
|
|
3397
|
+
if (ref.current) {
|
|
3398
|
+
onFieldRef(ref.current);
|
|
3399
|
+
}
|
|
3400
|
+
}, []);
|
|
3401
|
+
return jsx("div", { ref: ref, children: children });
|
|
3402
|
+
});
|
|
3403
|
+
|
|
3404
|
+
function shouldRenderField({ input, field, }) {
|
|
3405
|
+
const { condition } = input;
|
|
3406
|
+
const { value } = field(condition?.name || '');
|
|
3407
|
+
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
3408
|
+
}
|
|
3409
|
+
|
|
2895
3410
|
const getField = (field, params, externalInputs = {}) => (input, i) => {
|
|
2896
3411
|
const fieldsRegister = {
|
|
2897
3412
|
...InputsMap$1,
|
|
@@ -3087,7 +3602,7 @@
|
|
|
3087
3602
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog$1);
|
|
3088
3603
|
const handleSubmit = useCallback(async (formData, ev) => {
|
|
3089
3604
|
const formatData = getFormatData({ ...formData, ...additionalParams });
|
|
3090
|
-
await executeHandler(
|
|
3605
|
+
await executeHandler({
|
|
3091
3606
|
formatData,
|
|
3092
3607
|
ev,
|
|
3093
3608
|
typeForm,
|
|
@@ -3097,9 +3612,8 @@
|
|
|
3097
3612
|
responseTypeDialog,
|
|
3098
3613
|
verifyPhoneDialog,
|
|
3099
3614
|
onSuccess,
|
|
3100
|
-
endpoint,
|
|
3101
3615
|
withSnowplow,
|
|
3102
|
-
});
|
|
3616
|
+
}, endpoint);
|
|
3103
3617
|
}, [typeForm]);
|
|
3104
3618
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
3105
3619
|
resetOnSubmit: true,
|
|
@@ -3115,9 +3629,9 @@
|
|
|
3115
3629
|
typeForm,
|
|
3116
3630
|
})] }), isContacts ? renderContacts() : null] }));
|
|
3117
3631
|
});
|
|
3118
|
-
const executeHandler = async (
|
|
3119
|
-
const handler = handlerMap[endpoint] || handlerMap.default;
|
|
3120
|
-
await handler(context);
|
|
3632
|
+
const executeHandler = async (context, endpoint) => {
|
|
3633
|
+
const handler = (endpoint && handlerMap[endpoint]) || handlerMap.default;
|
|
3634
|
+
await handler({ ...context, endpoint });
|
|
3121
3635
|
};
|
|
3122
3636
|
|
|
3123
3637
|
const mapProductTypeToName = {
|
|
@@ -3585,11 +4099,7 @@
|
|
|
3585
4099
|
},
|
|
3586
4100
|
consentOthersFlg: {
|
|
3587
4101
|
text: 'Прочие согласия',
|
|
3588
|
-
docId:
|
|
3589
|
-
},
|
|
3590
|
-
consentInformMaterialsFlg: {
|
|
3591
|
-
text: 'Согласие на получение информационных материалов',
|
|
3592
|
-
docId: 18,
|
|
4102
|
+
docId: 1,
|
|
3593
4103
|
},
|
|
3594
4104
|
};
|
|
3595
4105
|
const DEBIT_CARD_CONSENTS = {
|
|
@@ -3624,7 +4134,6 @@
|
|
|
3624
4134
|
{ name: 'consentOthersFlg', required: true },
|
|
3625
4135
|
{ name: 'consentInformFlg' },
|
|
3626
4136
|
{ name: 'consentPfrFlg' },
|
|
3627
|
-
{ name: 'consentInformMaterialsFlg' },
|
|
3628
4137
|
{ name: 'consentFATCA', required: true },
|
|
3629
4138
|
];
|
|
3630
4139
|
return [
|
|
@@ -5903,7 +6412,6 @@
|
|
|
5903
6412
|
consentOthersFlg: ConsentField,
|
|
5904
6413
|
consentInformFlg: ConsentField,
|
|
5905
6414
|
consentPfrFlg: ConsentField,
|
|
5906
|
-
consentInformMaterialsFlg: ConsentField,
|
|
5907
6415
|
consentFATCA: ConsentField,
|
|
5908
6416
|
};
|
|
5909
6417
|
const InputsRetailMap = {
|
|
@@ -7022,7 +7530,7 @@
|
|
|
7022
7530
|
}
|
|
7023
7531
|
};
|
|
7024
7532
|
const transformConsentsFields = (formData, productType) => {
|
|
7025
|
-
const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg,
|
|
7533
|
+
const { consentOthersFlg, consentPfrFlg, processPersonalDataFlg, consentInformFlg, consentProviderFlg, consentFATCA, } = formData;
|
|
7026
7534
|
let consents;
|
|
7027
7535
|
if (productType === 'credit') {
|
|
7028
7536
|
consents = {
|
|
@@ -7033,7 +7541,6 @@
|
|
|
7033
7541
|
}
|
|
7034
7542
|
else if (productType === 'creditCard') {
|
|
7035
7543
|
consents = {
|
|
7036
|
-
consentInformMaterialsFlg,
|
|
7037
7544
|
consentPhotoFlg: false,
|
|
7038
7545
|
};
|
|
7039
7546
|
}
|
|
@@ -7162,7 +7669,6 @@
|
|
|
7162
7669
|
consentOthersFlg: false,
|
|
7163
7670
|
consentInformFlg: false,
|
|
7164
7671
|
consentPfrFlg: false,
|
|
7165
|
-
consentInformMaterialsFlg: false,
|
|
7166
7672
|
consentPhotoFlg: false,
|
|
7167
7673
|
consentFATCA: false,
|
|
7168
7674
|
};
|
|
@@ -9007,8 +9513,6 @@
|
|
|
9007
9513
|
const renderBlocks = (info) => (jsx("div", { className: "flex gap-5xl grow basis-0", children: info.map((column, i) => renderBlocksColumn({ column, i })) }));
|
|
9008
9514
|
const renderBlocksColumn = ({ column, i }) => column ? (jsx("div", { className: "flex flex-col gap-xl grow basis-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { children: [jsx(Headline, { title: title, description: description, headlineVersion: "XS", align: "text-left", isEmbedded: true }), additionalDescription ? (jsx("div", { className: "mt-xs opacity-80", children: jsx(Paragraph, { size: "text-m", font: "font-light", children: additionalDescription }) })) : null, jsx("div", { className: style({ 'mt-xl': Boolean(button?.text) }), children: renderButtonsSection([button]) })] }, String(key)))) }, `col-${String(i)}`)) : null;
|
|
9009
9515
|
|
|
9010
|
-
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] })] })));
|
|
9011
|
-
|
|
9012
9516
|
const CreditCardFormProgress = JSX(({ step = 1, totalSteps = 6, stepsTitles = [] }) => {
|
|
9013
9517
|
const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
|
|
9014
9518
|
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 })] }) }));
|
|
@@ -13175,7 +13679,7 @@
|
|
|
13175
13679
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13176
13680
|
});
|
|
13177
13681
|
|
|
13178
|
-
const packageVersion = "0.14.
|
|
13682
|
+
const packageVersion = "0.14.989";
|
|
13179
13683
|
|
|
13180
13684
|
exports.Blocks = Blocks;
|
|
13181
13685
|
exports.ContentPage = ContentPage;
|