@redneckz/wildless-cms-uni-blocks 0.14.587 → 0.14.589
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/api/RetailApi/RetailApi.d.ts +3 -1
- package/bundle/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +188 -58
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/bundle/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
- package/bundle/ui-kit/FormField/validators.d.ts +2 -0
- package/bundle/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/cosmos-static/icons/RefreshIcon.svg +1 -0
- package/cosmos-static/icons/sprites.svg +1 -0
- package/dist/api/RetailApi/RetailApi.d.ts +3 -1
- package/dist/api/RetailApi/RetailApi.js +15 -1
- package/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/dist/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormContent.js +1 -0
- package/dist/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +22 -0
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/dist/ui-kit/CaptchaDialog/checkCaptcha.js +16 -0
- package/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/dist/ui-kit/CaptchaDialog/createCaptcha.js +9 -0
- package/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +15 -0
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/DulIssueDateField.js +9 -0
- package/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/DulIssuedBy.js +9 -0
- package/dist/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/DulNumberField.js +9 -0
- package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/DulSerieField.js +9 -0
- package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js +9 -0
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
- package/dist/ui-kit/FormField/getField.js +10 -0
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +5 -0
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/dist/ui-kit/FormField/validators.d.ts +2 -0
- package/dist/ui-kit/FormField/validators.js +3 -1
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -29
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +21 -0
- package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +59 -0
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/lib/api/RetailApi/RetailApi.d.ts +3 -1
- package/lib/api/RetailApi/RetailApi.js +15 -1
- package/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/lib/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormContent.js +1 -0
- package/lib/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.fixture.d.ts +6 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +20 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/lib/ui-kit/CaptchaDialog/checkCaptcha.js +13 -0
- package/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/lib/ui-kit/CaptchaDialog/createCaptcha.js +6 -0
- package/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +12 -0
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/DulIssueDateField.js +7 -0
- package/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/DulIssuedBy.js +7 -0
- package/lib/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/DulNumberField.js +7 -0
- package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/DulSerieField.js +7 -0
- package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js +7 -0
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
- package/lib/ui-kit/FormField/getField.js +10 -0
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +6 -1
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/ui-kit/FormField/validators.d.ts +2 -0
- package/lib/ui-kit/FormField/validators.js +2 -0
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +21 -30
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +18 -0
- package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +56 -0
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/mobile/bundle/api/RetailApi/RetailApi.d.ts +3 -1
- package/mobile/bundle/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/mobile/bundle/bundle.umd.js +188 -58
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/mobile/bundle/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +2 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/mobile/dist/api/RetailApi/RetailApi.d.ts +3 -1
- package/mobile/dist/api/RetailApi/RetailApi.js +15 -1
- package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/dist/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.js +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +22 -0
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js +16 -0
- package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js +9 -0
- package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +15 -0
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/getField.js +10 -0
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +5 -0
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/validators.js +3 -1
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -29
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +21 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +59 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.d.ts +3 -1
- package/mobile/lib/api/RetailApi/RetailApi.js +15 -1
- package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/lib/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.js +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +20 -0
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js +13 -0
- package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js +6 -0
- package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +12 -0
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/getField.js +10 -0
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +6 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.d.ts +2 -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/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +21 -30
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +18 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +56 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/mobile/src/api/RetailApi/RetailApi.ts +18 -1
- package/mobile/src/api/RetailApi/RetailApiTypes.ts +4 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +7 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +6 -1
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -0
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -4
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/RefreshIcon.svg +3 -0
- package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +68 -0
- package/mobile/src/ui-kit/CaptchaDialog/checkCaptcha.ts +25 -0
- package/mobile/src/ui-kit/CaptchaDialog/createCaptcha.ts +6 -0
- package/mobile/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +12 -0
- package/mobile/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +12 -0
- package/mobile/src/ui-kit/FormField/Fields/DulIssuedBy.tsx +12 -0
- package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +13 -0
- package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +13 -0
- package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCode.tsx +17 -0
- package/mobile/src/ui-kit/FormField/getField.tsx +10 -0
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +7 -0
- package/mobile/src/ui-kit/FormField/validators.ts +8 -0
- package/mobile/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +3 -2
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +66 -51
- package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +37 -0
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +2 -1
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +71 -0
- package/package.json +2 -2
- package/src/api/RetailApi/RetailApi.ts +18 -1
- package/src/api/RetailApi/RetailApiTypes.ts +4 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +7 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +6 -1
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -0
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -4
- package/src/icons/IconName.ts +353 -6
- package/src/icons/RefreshIcon.svg +3 -0
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.fixture.tsx +11 -0
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +68 -0
- package/src/ui-kit/CaptchaDialog/checkCaptcha.ts +25 -0
- package/src/ui-kit/CaptchaDialog/createCaptcha.ts +6 -0
- package/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +12 -0
- package/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +12 -0
- package/src/ui-kit/FormField/Fields/DulIssuedBy.tsx +12 -0
- package/src/ui-kit/FormField/Fields/DulNumberField.tsx +13 -0
- package/src/ui-kit/FormField/Fields/DulSerieField.tsx +13 -0
- package/src/ui-kit/FormField/Fields/DulSubdivisionCode.tsx +17 -0
- package/src/ui-kit/FormField/getField.tsx +10 -0
- package/src/ui-kit/FormField/getObjectValidator.tsx +7 -0
- package/src/ui-kit/FormField/validators.ts +8 -0
- package/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +3 -2
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +11 -8
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +66 -51
- package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +37 -0
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +2 -1
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +71 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleSendCode.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/handleSendCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAgB3D,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,EACnC,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,UAAU,GACU,EAAE,EAAE;IACxB,IAAI;QACF,MAAM,UAAU,CAAC,QAAQ,CAAC;YACxB,WAAW,EAAE,WAAW;YACxB,eAAe,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE;SAC3C,CAAC,CAAC;QACH,UAAU,CAAC,CAAC,CAAC,CAAC;QACd,cAAc,CAAC,GAAG,CAAC,CAAC;QACpB,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAAC,OAAO,CAAM,EAAE;QACf,IAAI,CAAC,EAAE,MAAM,KAAK,GAAG,EAAE;YACrB,aAAa,CAAC,IAAI,EAAE,CAAC;SACtB;KACF;AACH,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { VerifyPhoneDialog } from './VerifyPhoneDialog.js';
|
|
|
4
4
|
export const useVerifyPhoneDialog = (props) => {
|
|
5
5
|
const { open, close } = useDialogManager();
|
|
6
6
|
return {
|
|
7
|
-
open: (options = {}) => open(_jsx(VerifyPhoneDialog, { ...props }), options),
|
|
7
|
+
open: (options = {}) => open(_jsx(VerifyPhoneDialog, { onClose: close, ...props }), options),
|
|
8
8
|
close,
|
|
9
9
|
};
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVerifyPhoneDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAErF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACpE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE3C,OAAO;QACL,IAAI,EAAE,CAAC,UAAyB,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"useVerifyPhoneDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAErF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACpE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE3C,OAAO;QACL,IAAI,EAAE,CAAC,UAAyB,EAAE,EAAE,EAAE,CACpC,IAAI,CAAC,KAAC,iBAAiB,IAAC,OAAO,EAAE,KAAK,KAAM,KAAK,GAAI,EAAE,OAAO,CAAC;QACjE,KAAK;KACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare type useVerifyPhoneDialogSubmitProps = {
|
|
2
|
+
values: string[];
|
|
3
|
+
close?: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const useVerifyPhoneDialogSubmit: ({ close, values }: useVerifyPhoneDialogSubmitProps) => {
|
|
6
|
+
handleSubmit: () => Promise<void>;
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
errorText: string;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
timeNextReq: number;
|
|
11
|
+
isSubmitButtonDisabled: boolean;
|
|
12
|
+
setTimeNextReq: (value: number | ((prevState: number) => number)) => void;
|
|
13
|
+
setIsTimerStarted: (value: boolean | ((prevState: boolean) => boolean)) => void;
|
|
14
|
+
setAttemps: (value: number | ((prevState: number) => number)) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { RETAIL_API } from '../../api/RetailApi/RetailApi.js';
|
|
3
|
+
export const useVerifyPhoneDialogSubmit = ({ close, values }) => {
|
|
4
|
+
const [hasError, setHasError] = useState(false);
|
|
5
|
+
const [errorText, setErrorText] = useState('');
|
|
6
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
7
|
+
const [timeNextReq, setTimeNextReq] = useState(0);
|
|
8
|
+
const [isTimerStarted, setIsTimerStarted] = useState(false);
|
|
9
|
+
const [attemps, setAttemps] = useState(0);
|
|
10
|
+
const resetError = useCallback(() => {
|
|
11
|
+
setHasError(false);
|
|
12
|
+
setErrorText('');
|
|
13
|
+
}, []);
|
|
14
|
+
const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
|
|
15
|
+
const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
|
|
16
|
+
const handleSubmit = useCallback(async () => {
|
|
17
|
+
try {
|
|
18
|
+
setIsTimerStarted(false);
|
|
19
|
+
setTimeNextReq(0);
|
|
20
|
+
setAttemps(attemps + 1);
|
|
21
|
+
setIsLoading(true);
|
|
22
|
+
await RETAIL_API.CheckCode({
|
|
23
|
+
smsText: values.join(''),
|
|
24
|
+
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
25
|
+
});
|
|
26
|
+
resetError();
|
|
27
|
+
close && close();
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
setIsLoading(false);
|
|
31
|
+
attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
|
|
32
|
+
setHasError(true);
|
|
33
|
+
}
|
|
34
|
+
}, [values, attemps]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (isTimeExpired) {
|
|
37
|
+
setHasError(true);
|
|
38
|
+
setErrorText('Код просрочен');
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
setHasError(false);
|
|
42
|
+
}
|
|
43
|
+
}, [isTimeExpired]);
|
|
44
|
+
return {
|
|
45
|
+
handleSubmit,
|
|
46
|
+
hasError,
|
|
47
|
+
errorText,
|
|
48
|
+
isLoading,
|
|
49
|
+
timeNextReq,
|
|
50
|
+
isSubmitButtonDisabled,
|
|
51
|
+
setTimeNextReq,
|
|
52
|
+
setIsTimerStarted,
|
|
53
|
+
setAttemps,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=useVerifyPhoneDialogSubmit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVerifyPhoneDialogSubmit.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAO3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAmC,EAAE,EAAE;IAC/F,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE1C,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnB,YAAY,CAAC,EAAE,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,WAAW,KAAK,CAAC,IAAI,cAAc,EACzC,CAAC,WAAW,EAAE,cAAc,CAAC,CAC9B,CAAC;IAEF,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,aAAa,EAC5D,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC1C,IAAI;YACF,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,cAAc,CAAC,CAAC,CAAC,CAAC;YAClB,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;YACxB,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,UAAU,CAAC,SAAS,CAAC;gBACzB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,eAAe,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE;aAC3C,CAAC,CAAC;YACH,UAAU,EAAE,CAAC;YACb,KAAK,IAAI,KAAK,EAAE,CAAC;SAClB;QAAC,MAAM;YACN,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;YAC3F,WAAW,CAAC,IAAI,CAAC,CAAC;SACnB;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,EAAE;YACjB,WAAW,CAAC,IAAI,CAAC,CAAC;YAClB,YAAY,CAAC,eAAe,CAAC,CAAC;SAC/B;aAAM;YACL,WAAW,CAAC,KAAK,CAAC,CAAC;SACpB;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO;QACL,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,WAAW;QACX,sBAAsB;QACtB,cAAc;QACd,iBAAiB;QACjB,UAAU;KACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CheckCodeBody, type CreateDraftTaskBody, type CreateDraftTaskResponse, type CreateUserProfileBody, type CreateUserProfileResponse, type SendCodeBody, type UpdateUserProfileBody, type UpdateUserTaskBody } from './RetailApiTypes';
|
|
1
|
+
import { type CapchaTextType, type CheckCodeBody, type CreateDraftTaskBody, type CreateDraftTaskResponse, type CreateUserProfileBody, type CreateUserProfileResponse, type SendCodeBody, type UpdateUserProfileBody, type UpdateUserTaskBody } from './RetailApiTypes';
|
|
2
2
|
export declare const RETAIL_API: {
|
|
3
3
|
CreateUserProfile: (body: CreateUserProfileBody) => Promise<CreateUserProfileResponse>;
|
|
4
4
|
UpdateUserProfile: (body: UpdateUserProfileBody) => Promise<unknown>;
|
|
@@ -6,4 +6,6 @@ export declare const RETAIL_API: {
|
|
|
6
6
|
UpdateUserTask: (body: UpdateUserTaskBody) => Promise<unknown>;
|
|
7
7
|
SendCode: (body: SendCodeBody) => Promise<unknown>;
|
|
8
8
|
CheckCode: (body: CheckCodeBody) => Promise<void>;
|
|
9
|
+
CreateCaptcha: (phoneNumber: string) => Promise<Response>;
|
|
10
|
+
CheckCaptcha: (body: CapchaTextType) => Promise<Response>;
|
|
9
11
|
};
|
|
@@ -1130,9 +1130,9 @@
|
|
|
1130
1130
|
onChange && onChange(!value);
|
|
1131
1131
|
}, [onChange, disabled, value]);
|
|
1132
1132
|
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1133
|
-
return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$
|
|
1133
|
+
return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$3(text)] }) }));
|
|
1134
1134
|
});
|
|
1135
|
-
const renderText$
|
|
1135
|
+
const renderText$3 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1136
1136
|
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1137
1137
|
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1138
1138
|
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
@@ -1429,6 +1429,8 @@
|
|
|
1429
1429
|
const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
|
|
1430
1430
|
const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
|
|
1431
1431
|
const lengthStringValidator = (maxLength) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= maxLength)(ERROR_MESSAGE);
|
|
1432
|
+
const serieValidator = validator((_) => typeof _ === 'string' && _.length === 4)(ERROR_MESSAGE);
|
|
1433
|
+
const numberValidator = validator((_) => typeof _ === 'string' && _.length === 6)(ERROR_MESSAGE);
|
|
1432
1434
|
const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
|
|
1433
1435
|
const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
|
|
1434
1436
|
const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
|
|
@@ -1471,6 +1473,11 @@
|
|
|
1471
1473
|
employerOrganization: defaultValidator,
|
|
1472
1474
|
positionOrganization: defaultValidator,
|
|
1473
1475
|
email: emailValidator,
|
|
1476
|
+
dulSerie: serieValidator,
|
|
1477
|
+
dulNumber: numberValidator,
|
|
1478
|
+
dulIssueDateField: defaultValidator,
|
|
1479
|
+
dulSubdivisionCode: numberValidator,
|
|
1480
|
+
dulIssuedBy: defaultValidator,
|
|
1474
1481
|
fullName: nameValidator,
|
|
1475
1482
|
inn: innValidator,
|
|
1476
1483
|
legalForm: defaultValidator,
|
|
@@ -1918,6 +1925,16 @@
|
|
|
1918
1925
|
|
|
1919
1926
|
const DesiredMeetingDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438", ...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, input?.required) })));
|
|
1920
1927
|
|
|
1928
|
+
const DulIssueDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...getValidation(field('dulIssueDateField'), validatorObj.dulIssueDateField, input?.required) })));
|
|
1929
|
+
|
|
1930
|
+
const DulIssuedBy = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...getValidation(field('dulIssuedBy'), validatorObj.dulIssuedBy, input?.required) })));
|
|
1931
|
+
|
|
1932
|
+
const DulNumberField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", type: "number", ...getValidation(field('dulNumber'), validatorObj.dulNumber, input?.required) })));
|
|
1933
|
+
|
|
1934
|
+
const DulSerieField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", type: "number", ...getValidation(field('dulSerie'), validatorObj.dulSerie, input?.required) })));
|
|
1935
|
+
|
|
1936
|
+
const DulSubdivisionCode = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", type: "number", ...getValidation(field('dulSubdivisionCode'), validatorObj.dulSubdivisionCode, input?.required) })));
|
|
1937
|
+
|
|
1921
1938
|
const EducationField = JSX(({ field, input }) => {
|
|
1922
1939
|
const { data: education } = useLeadFormData('EDUCATION_LEVEL');
|
|
1923
1940
|
return (jsx(SelectField, { field: field, source: education, label: "\u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435", fieldName: "education", input: input }));
|
|
@@ -2224,6 +2241,11 @@
|
|
|
2224
2241
|
snils: jsx(SnilsField, { field: field, input: input }),
|
|
2225
2242
|
conscription: jsx(ConscriptionField, { field: field, input: input }),
|
|
2226
2243
|
armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
|
|
2244
|
+
dulSerie: jsx(DulSerieField, { field: field, input: input }),
|
|
2245
|
+
dulNumber: jsx(DulNumberField, { field: field, input: input }),
|
|
2246
|
+
dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
|
|
2247
|
+
dulSubdivisionCode: jsx(DulSubdivisionCode, { field: field, input: input }),
|
|
2248
|
+
dulIssuedBy: jsx(DulIssuedBy, { field: field, input: input }),
|
|
2227
2249
|
};
|
|
2228
2250
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
2229
2251
|
};
|
|
@@ -2536,6 +2558,7 @@
|
|
|
2536
2558
|
|
|
2537
2559
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
2538
2560
|
|
|
2561
|
+
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2539
2562
|
const getAthorizationHeaders = () => {
|
|
2540
2563
|
const token = sessionStorage.getItem('accessToken');
|
|
2541
2564
|
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
@@ -2549,7 +2572,18 @@
|
|
|
2549
2572
|
},
|
|
2550
2573
|
credentials: 'include',
|
|
2551
2574
|
body: body ? JSON.stringify(body) : null,
|
|
2552
|
-
})
|
|
2575
|
+
})
|
|
2576
|
+
.then((response) => {
|
|
2577
|
+
if (response.ok) {
|
|
2578
|
+
return getResponse(response);
|
|
2579
|
+
}
|
|
2580
|
+
else {
|
|
2581
|
+
throw response;
|
|
2582
|
+
}
|
|
2583
|
+
})
|
|
2584
|
+
.catch((error) => {
|
|
2585
|
+
throw error;
|
|
2586
|
+
});
|
|
2553
2587
|
const saveToken = (data) => {
|
|
2554
2588
|
sessionStorage.setItem('accessToken', data.access_token);
|
|
2555
2589
|
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
@@ -2561,6 +2595,8 @@
|
|
|
2561
2595
|
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2562
2596
|
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2563
2597
|
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2598
|
+
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2599
|
+
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2564
2600
|
};
|
|
2565
2601
|
|
|
2566
2602
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
@@ -2625,6 +2661,71 @@
|
|
|
2625
2661
|
},
|
|
2626
2662
|
});
|
|
2627
2663
|
|
|
2664
|
+
const ICON_SIZE$1 = { width: '103', height: '21' };
|
|
2665
|
+
|
|
2666
|
+
const logoTitleSizeStyle = 'text-s';
|
|
2667
|
+
|
|
2668
|
+
const ICON_VERSION_MAP = {
|
|
2669
|
+
'bg-white': 'color',
|
|
2670
|
+
transparent: 'white',
|
|
2671
|
+
};
|
|
2672
|
+
const SVG_COLOR = {
|
|
2673
|
+
'bg-white': 'text-primary-main',
|
|
2674
|
+
transparent: 'text-white',
|
|
2675
|
+
};
|
|
2676
|
+
const renderImage = (bgColor, image, size) => {
|
|
2677
|
+
const img = image?.src
|
|
2678
|
+
? image
|
|
2679
|
+
: {
|
|
2680
|
+
icon: image?.icon || 'LogoIcon',
|
|
2681
|
+
iconVersion: ICON_VERSION_MAP[bgColor],
|
|
2682
|
+
};
|
|
2683
|
+
return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
|
|
2684
|
+
};
|
|
2685
|
+
|
|
2686
|
+
const TEXT_COLOR = {
|
|
2687
|
+
'bg-white': 'text-primary-text',
|
|
2688
|
+
transparent: 'text-white',
|
|
2689
|
+
};
|
|
2690
|
+
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: logo?.href ?? href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE$1), showTitle
|
|
2691
|
+
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
2692
|
+
: null] })));
|
|
2693
|
+
|
|
2694
|
+
const checkCaptcha = async ({ code, setHasError, close, sendCode = noop, }) => {
|
|
2695
|
+
const response = await RETAIL_API.CheckCaptcha({ captchaText: code });
|
|
2696
|
+
if ((await response.text()) === 'ERROR') {
|
|
2697
|
+
setHasError(true);
|
|
2698
|
+
}
|
|
2699
|
+
else {
|
|
2700
|
+
sendCode();
|
|
2701
|
+
close?.();
|
|
2702
|
+
}
|
|
2703
|
+
};
|
|
2704
|
+
|
|
2705
|
+
const createCaptcha = async (setCaptcha, phoneNumber) => {
|
|
2706
|
+
const response = await RETAIL_API.CreateCaptcha(phoneNumber);
|
|
2707
|
+
setCaptcha(URL.createObjectURL(await response.blob()));
|
|
2708
|
+
};
|
|
2709
|
+
|
|
2710
|
+
const CaptchaDialog = JSX(({ phoneNumber, close, sendCode, onClose }) => {
|
|
2711
|
+
const [captcha, setCaptcha] = useState('');
|
|
2712
|
+
const [code, setCode] = useState('');
|
|
2713
|
+
const [hasError, setHasError] = useState(false);
|
|
2714
|
+
useEffect(() => {
|
|
2715
|
+
createCaptcha(setCaptcha, phoneNumber);
|
|
2716
|
+
}, []);
|
|
2717
|
+
return (jsx(Dialog, { head: jsx(Logo, {}), onClose: onClose, className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-[140px] w-[300px]", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: () => createCaptcha(setCaptcha, phoneNumber), className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: () => checkCaptcha({ code, setHasError, close, sendCode }), version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] })] }) }));
|
|
2718
|
+
});
|
|
2719
|
+
|
|
2720
|
+
const useCaptchaDialog = (initialProps, onClose) => {
|
|
2721
|
+
const { open, close, closeAll } = useDialogManager();
|
|
2722
|
+
return {
|
|
2723
|
+
open: () => open(jsx(CaptchaDialog, { close: close, onClose: onClose, ...initialProps })),
|
|
2724
|
+
close,
|
|
2725
|
+
closeAll,
|
|
2726
|
+
};
|
|
2727
|
+
};
|
|
2728
|
+
|
|
2628
2729
|
const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
|
|
2629
2730
|
'backdrop-blur': blur,
|
|
2630
2731
|
}), children: jsx("div", { className: style('inline-block h-28 w-28', 'animate-spin rounded-full', 'border-8 border-solid border-current', 'border-r-transparent', color), role: "status" }) })));
|
|
@@ -2649,7 +2750,24 @@
|
|
|
2649
2750
|
return `${minutes}:${seconds}`;
|
|
2650
2751
|
};
|
|
2651
2752
|
|
|
2652
|
-
const
|
|
2753
|
+
const handleSendCode = async ({ phoneNumber, captchaDialog, setTimeNextReq, setIsTimerStarted, setAttemps, }) => {
|
|
2754
|
+
try {
|
|
2755
|
+
await RETAIL_API.SendCode({
|
|
2756
|
+
phoneNumber: phoneNumber,
|
|
2757
|
+
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
2758
|
+
});
|
|
2759
|
+
setAttemps(0);
|
|
2760
|
+
setTimeNextReq(180);
|
|
2761
|
+
setIsTimerStarted(true);
|
|
2762
|
+
}
|
|
2763
|
+
catch (e) {
|
|
2764
|
+
if (e?.status === 429) {
|
|
2765
|
+
captchaDialog.open();
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
};
|
|
2769
|
+
|
|
2770
|
+
const InputCode = JSX(({ values, setValues, hasError, errorText }) => {
|
|
2653
2771
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
2654
2772
|
const inputRefs = useRef([]);
|
|
2655
2773
|
useEffect(() => {
|
|
@@ -2686,7 +2804,7 @@
|
|
|
2686
2804
|
inputRefs.current = [];
|
|
2687
2805
|
}
|
|
2688
2806
|
inputRefs.current[index] = ref;
|
|
2689
|
-
}, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children:
|
|
2807
|
+
}, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children: errorText }) : null] }));
|
|
2690
2808
|
});
|
|
2691
2809
|
const getInputStyle = (index, values, hasError = false) => {
|
|
2692
2810
|
const isInputEmpty = !values[index];
|
|
@@ -2697,42 +2815,85 @@
|
|
|
2697
2815
|
return (jsx(Button, { type: "button", onClick: onClick, disabled: isDisabled, children: jsx(Text, { font: "font-medium", children: text }) }));
|
|
2698
2816
|
});
|
|
2699
2817
|
|
|
2700
|
-
const
|
|
2701
|
-
const { close } = useDialogManager();
|
|
2702
|
-
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
2818
|
+
const useVerifyPhoneDialogSubmit = ({ close, values }) => {
|
|
2703
2819
|
const [hasError, setHasError] = useState(false);
|
|
2820
|
+
const [errorText, setErrorText] = useState('');
|
|
2704
2821
|
const [isLoading, setIsLoading] = useState(false);
|
|
2705
|
-
const [timeNextReq, setTimeNextReq] = useState(
|
|
2706
|
-
const
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
});
|
|
2822
|
+
const [timeNextReq, setTimeNextReq] = useState(0);
|
|
2823
|
+
const [isTimerStarted, setIsTimerStarted] = useState(false);
|
|
2824
|
+
const [attemps, setAttemps] = useState(0);
|
|
2825
|
+
const resetError = useCallback(() => {
|
|
2826
|
+
setHasError(false);
|
|
2827
|
+
setErrorText('');
|
|
2712
2828
|
}, []);
|
|
2829
|
+
const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
|
|
2830
|
+
const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
|
|
2713
2831
|
const handleSubmit = useCallback(async () => {
|
|
2714
2832
|
try {
|
|
2833
|
+
setIsTimerStarted(false);
|
|
2834
|
+
setTimeNextReq(0);
|
|
2835
|
+
setAttemps(attemps + 1);
|
|
2715
2836
|
setIsLoading(true);
|
|
2716
2837
|
await RETAIL_API.CheckCode({
|
|
2717
2838
|
smsText: values.join(''),
|
|
2718
2839
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
2719
2840
|
});
|
|
2720
|
-
|
|
2721
|
-
close();
|
|
2722
|
-
onClose && onClose();
|
|
2841
|
+
resetError();
|
|
2842
|
+
close && close();
|
|
2723
2843
|
}
|
|
2724
2844
|
catch {
|
|
2725
2845
|
setIsLoading(false);
|
|
2846
|
+
attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
|
|
2726
2847
|
setHasError(true);
|
|
2727
2848
|
}
|
|
2728
|
-
}, [values]);
|
|
2729
|
-
|
|
2849
|
+
}, [values, attemps]);
|
|
2850
|
+
useEffect(() => {
|
|
2851
|
+
if (isTimeExpired) {
|
|
2852
|
+
setHasError(true);
|
|
2853
|
+
setErrorText('Код просрочен');
|
|
2854
|
+
}
|
|
2855
|
+
else {
|
|
2856
|
+
setHasError(false);
|
|
2857
|
+
}
|
|
2858
|
+
}, [isTimeExpired]);
|
|
2859
|
+
return {
|
|
2860
|
+
handleSubmit,
|
|
2861
|
+
hasError,
|
|
2862
|
+
errorText,
|
|
2863
|
+
isLoading,
|
|
2864
|
+
timeNextReq,
|
|
2865
|
+
isSubmitButtonDisabled,
|
|
2866
|
+
setTimeNextReq,
|
|
2867
|
+
setIsTimerStarted,
|
|
2868
|
+
setAttemps,
|
|
2869
|
+
};
|
|
2870
|
+
};
|
|
2871
|
+
|
|
2872
|
+
const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = '', phoneNumber = '+79999999999', }) => {
|
|
2873
|
+
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
2874
|
+
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttemps, } = useVerifyPhoneDialogSubmit({ values, close });
|
|
2875
|
+
const sendCode = useCallback(() => {
|
|
2876
|
+
handleSendCode({
|
|
2877
|
+
phoneNumber,
|
|
2878
|
+
captchaDialog,
|
|
2879
|
+
setTimeNextReq,
|
|
2880
|
+
setIsTimerStarted,
|
|
2881
|
+
setAttemps,
|
|
2882
|
+
});
|
|
2883
|
+
}, []);
|
|
2884
|
+
const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode }, onClose);
|
|
2885
|
+
useEffect(() => {
|
|
2886
|
+
sendCode();
|
|
2887
|
+
}, []);
|
|
2888
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "S", isEmbedded: true }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$2(timeNextReq, setTimeNextReq, sendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
2730
2889
|
});
|
|
2890
|
+
const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
|
|
2891
|
+
const renderText$2 = (timeNextReq, setTimeNextReq, sendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-primary-main", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-primary-main ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: sendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
|
|
2731
2892
|
|
|
2732
2893
|
const useVerifyPhoneDialog = (props) => {
|
|
2733
2894
|
const { open, close } = useDialogManager();
|
|
2734
2895
|
return {
|
|
2735
|
-
open: (options = {}) => open(jsx(VerifyPhoneDialog, { ...props }), options),
|
|
2896
|
+
open: (options = {}) => open(jsx(VerifyPhoneDialog, { onClose: close, ...props }), options),
|
|
2736
2897
|
close,
|
|
2737
2898
|
};
|
|
2738
2899
|
};
|
|
@@ -2759,7 +2920,7 @@
|
|
|
2759
2920
|
programId,
|
|
2760
2921
|
});
|
|
2761
2922
|
await RETAIL_API.UpdateUserTask(getUpdateUserTaskData(participantId, taskId, profileId, formData));
|
|
2762
|
-
|
|
2923
|
+
globalThis.location.href = '/credit-lead';
|
|
2763
2924
|
}
|
|
2764
2925
|
catch {
|
|
2765
2926
|
setResponseStatus('Fail');
|
|
@@ -2767,7 +2928,7 @@
|
|
|
2767
2928
|
};
|
|
2768
2929
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2769
2930
|
const verifyPhoneDialog = useVerifyPhoneDialog({
|
|
2770
|
-
|
|
2931
|
+
close: handleSuccessVerify,
|
|
2771
2932
|
...verifyPhoneContent(formData?.phone),
|
|
2772
2933
|
});
|
|
2773
2934
|
verifyPhoneDialog.open();
|
|
@@ -2785,14 +2946,13 @@
|
|
|
2785
2946
|
const verifyPhoneContent = (phone) => ({
|
|
2786
2947
|
title: 'Подтвердите номер телефона',
|
|
2787
2948
|
description: `Мы отправили код на ${phone}`,
|
|
2788
|
-
|
|
2949
|
+
phoneNumber: formatPhone(phone),
|
|
2789
2950
|
textButton: 'Оформить',
|
|
2790
2951
|
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
|
|
2791
2952
|
<ul><li>соглашение о порядке использования простой электронной подписи,
|
|
2792
2953
|
</li><li>согласие на обработку персональных данных,
|
|
2793
2954
|
</li><li>предоставление и подписание прочих согласий Банка,
|
|
2794
2955
|
</li><li>согласие на запрос в ПФР</li></ul>`,
|
|
2795
|
-
href: '/credit-lead',
|
|
2796
2956
|
});
|
|
2797
2957
|
|
|
2798
2958
|
const useInitApplicationLead = () => {
|
|
@@ -4525,7 +4685,7 @@
|
|
|
4525
4685
|
return null;
|
|
4526
4686
|
};
|
|
4527
4687
|
|
|
4528
|
-
const ICON_SIZE
|
|
4688
|
+
const ICON_SIZE = { width: '24', height: '24' };
|
|
4529
4689
|
const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
|
|
4530
4690
|
const pages = useMemo(() => Array.from({ length: totalPages }).fill({
|
|
4531
4691
|
currentPage,
|
|
@@ -4544,7 +4704,7 @@
|
|
|
4544
4704
|
}, [currentPage, totalPages]);
|
|
4545
4705
|
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
4546
4706
|
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
4547
|
-
return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE
|
|
4707
|
+
return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE }) }), jsxs("div", { className: "flex @lg:gap-2xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 3 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 2 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE }) })] }));
|
|
4548
4708
|
};
|
|
4549
4709
|
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
4550
4710
|
|
|
@@ -4920,36 +5080,6 @@
|
|
|
4920
5080
|
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
|
|
4921
5081
|
});
|
|
4922
5082
|
|
|
4923
|
-
const ICON_SIZE = { width: '103', height: '21' };
|
|
4924
|
-
|
|
4925
|
-
const logoTitleSizeStyle = 'text-s';
|
|
4926
|
-
|
|
4927
|
-
const ICON_VERSION_MAP = {
|
|
4928
|
-
'bg-white': 'color',
|
|
4929
|
-
transparent: 'white',
|
|
4930
|
-
};
|
|
4931
|
-
const SVG_COLOR = {
|
|
4932
|
-
'bg-white': 'text-primary-main',
|
|
4933
|
-
transparent: 'text-white',
|
|
4934
|
-
};
|
|
4935
|
-
const renderImage = (bgColor, image, size) => {
|
|
4936
|
-
const img = image?.src
|
|
4937
|
-
? image
|
|
4938
|
-
: {
|
|
4939
|
-
icon: image?.icon || 'LogoIcon',
|
|
4940
|
-
iconVersion: ICON_VERSION_MAP[bgColor],
|
|
4941
|
-
};
|
|
4942
|
-
return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
|
|
4943
|
-
};
|
|
4944
|
-
|
|
4945
|
-
const TEXT_COLOR = {
|
|
4946
|
-
'bg-white': 'text-primary-text',
|
|
4947
|
-
transparent: 'text-white',
|
|
4948
|
-
};
|
|
4949
|
-
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: logo?.href ?? href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE), showTitle
|
|
4950
|
-
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
4951
|
-
: null] })));
|
|
4952
|
-
|
|
4953
5083
|
const BUTTON_STYLE = {
|
|
4954
5084
|
default: 'bg-main-divider text-primary-main rounded hover:text-primary-main',
|
|
4955
5085
|
transparent: 'backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white',
|
|
@@ -6908,7 +7038,7 @@
|
|
|
6908
7038
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6909
7039
|
});
|
|
6910
7040
|
|
|
6911
|
-
const packageVersion = "0.14.
|
|
7041
|
+
const packageVersion = "0.14.588";
|
|
6912
7042
|
|
|
6913
7043
|
exports.Blocks = Blocks;
|
|
6914
7044
|
exports.ContentPage = ContentPage;
|