@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -1122,9 +1122,9 @@
|
|
|
1122
1122
|
onChange && onChange(!value);
|
|
1123
1123
|
}, [onChange, disabled, value]);
|
|
1124
1124
|
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" }));
|
|
1125
|
-
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$
|
|
1125
|
+
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$2(text)] }) }));
|
|
1126
1126
|
});
|
|
1127
|
-
const renderText$
|
|
1127
|
+
const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1128
1128
|
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1129
1129
|
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1130
1130
|
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
@@ -1421,6 +1421,8 @@
|
|
|
1421
1421
|
const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
|
|
1422
1422
|
const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
|
|
1423
1423
|
const lengthStringValidator = (maxLength) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= maxLength)(ERROR_MESSAGE);
|
|
1424
|
+
const serieValidator = validator((_) => typeof _ === 'string' && _.length === 4)(ERROR_MESSAGE);
|
|
1425
|
+
const numberValidator = validator((_) => typeof _ === 'string' && _.length === 6)(ERROR_MESSAGE);
|
|
1424
1426
|
const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
|
|
1425
1427
|
const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
|
|
1426
1428
|
const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
|
|
@@ -1463,6 +1465,11 @@
|
|
|
1463
1465
|
employerOrganization: defaultValidator,
|
|
1464
1466
|
positionOrganization: defaultValidator,
|
|
1465
1467
|
email: emailValidator,
|
|
1468
|
+
dulSerie: serieValidator,
|
|
1469
|
+
dulNumber: numberValidator,
|
|
1470
|
+
dulIssueDateField: defaultValidator,
|
|
1471
|
+
dulSubdivisionCode: numberValidator,
|
|
1472
|
+
dulIssuedBy: defaultValidator,
|
|
1466
1473
|
fullName: nameValidator,
|
|
1467
1474
|
inn: innValidator,
|
|
1468
1475
|
legalForm: defaultValidator,
|
|
@@ -1910,6 +1917,16 @@
|
|
|
1910
1917
|
|
|
1911
1918
|
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) })));
|
|
1912
1919
|
|
|
1920
|
+
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) })));
|
|
1921
|
+
|
|
1922
|
+
const DulIssuedBy = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...getValidation(field('dulIssuedBy'), validatorObj.dulIssuedBy, input?.required) })));
|
|
1923
|
+
|
|
1924
|
+
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) })));
|
|
1925
|
+
|
|
1926
|
+
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) })));
|
|
1927
|
+
|
|
1928
|
+
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) })));
|
|
1929
|
+
|
|
1913
1930
|
const EducationField = JSX(({ field, input }) => {
|
|
1914
1931
|
const { data: education } = useLeadFormData('EDUCATION_LEVEL');
|
|
1915
1932
|
return (jsx(SelectField, { field: field, source: education, label: "\u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435", fieldName: "education", input: input }));
|
|
@@ -2216,6 +2233,11 @@
|
|
|
2216
2233
|
snils: jsx(SnilsField, { field: field, input: input }),
|
|
2217
2234
|
conscription: jsx(ConscriptionField, { field: field, input: input }),
|
|
2218
2235
|
armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
|
|
2236
|
+
dulSerie: jsx(DulSerieField, { field: field, input: input }),
|
|
2237
|
+
dulNumber: jsx(DulNumberField, { field: field, input: input }),
|
|
2238
|
+
dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
|
|
2239
|
+
dulSubdivisionCode: jsx(DulSubdivisionCode, { field: field, input: input }),
|
|
2240
|
+
dulIssuedBy: jsx(DulIssuedBy, { field: field, input: input }),
|
|
2219
2241
|
};
|
|
2220
2242
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
2221
2243
|
};
|
|
@@ -2528,6 +2550,7 @@
|
|
|
2528
2550
|
|
|
2529
2551
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
2530
2552
|
|
|
2553
|
+
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2531
2554
|
const getAthorizationHeaders = () => {
|
|
2532
2555
|
const token = sessionStorage.getItem('accessToken');
|
|
2533
2556
|
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
@@ -2541,7 +2564,18 @@
|
|
|
2541
2564
|
},
|
|
2542
2565
|
credentials: 'include',
|
|
2543
2566
|
body: body ? JSON.stringify(body) : null,
|
|
2544
|
-
})
|
|
2567
|
+
})
|
|
2568
|
+
.then((response) => {
|
|
2569
|
+
if (response.ok) {
|
|
2570
|
+
return getResponse(response);
|
|
2571
|
+
}
|
|
2572
|
+
else {
|
|
2573
|
+
throw response;
|
|
2574
|
+
}
|
|
2575
|
+
})
|
|
2576
|
+
.catch((error) => {
|
|
2577
|
+
throw error;
|
|
2578
|
+
});
|
|
2545
2579
|
const saveToken = (data) => {
|
|
2546
2580
|
sessionStorage.setItem('accessToken', data.access_token);
|
|
2547
2581
|
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
@@ -2553,6 +2587,8 @@
|
|
|
2553
2587
|
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2554
2588
|
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2555
2589
|
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2590
|
+
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2591
|
+
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2556
2592
|
};
|
|
2557
2593
|
|
|
2558
2594
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
@@ -2617,6 +2653,71 @@
|
|
|
2617
2653
|
},
|
|
2618
2654
|
});
|
|
2619
2655
|
|
|
2656
|
+
const ICON_SIZE$1 = { width: '118', height: '24' };
|
|
2657
|
+
|
|
2658
|
+
const logoTitleSizeStyle = '';
|
|
2659
|
+
|
|
2660
|
+
const ICON_VERSION_MAP = {
|
|
2661
|
+
'bg-white': 'color',
|
|
2662
|
+
transparent: 'white',
|
|
2663
|
+
};
|
|
2664
|
+
const SVG_COLOR = {
|
|
2665
|
+
'bg-white': 'text-primary-main',
|
|
2666
|
+
transparent: 'text-white',
|
|
2667
|
+
};
|
|
2668
|
+
const renderImage = (bgColor, image, size) => {
|
|
2669
|
+
const img = image?.src
|
|
2670
|
+
? image
|
|
2671
|
+
: {
|
|
2672
|
+
icon: image?.icon || 'LogoIcon',
|
|
2673
|
+
iconVersion: ICON_VERSION_MAP[bgColor],
|
|
2674
|
+
};
|
|
2675
|
+
return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
|
|
2676
|
+
};
|
|
2677
|
+
|
|
2678
|
+
const TEXT_COLOR = {
|
|
2679
|
+
'bg-white': 'text-primary-text',
|
|
2680
|
+
transparent: 'text-white',
|
|
2681
|
+
};
|
|
2682
|
+
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
|
|
2683
|
+
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
2684
|
+
: null] })));
|
|
2685
|
+
|
|
2686
|
+
const checkCaptcha = async ({ code, setHasError, close, sendCode = noop, }) => {
|
|
2687
|
+
const response = await RETAIL_API.CheckCaptcha({ captchaText: code });
|
|
2688
|
+
if ((await response.text()) === 'ERROR') {
|
|
2689
|
+
setHasError(true);
|
|
2690
|
+
}
|
|
2691
|
+
else {
|
|
2692
|
+
sendCode();
|
|
2693
|
+
close?.();
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
|
|
2697
|
+
const createCaptcha = async (setCaptcha, phoneNumber) => {
|
|
2698
|
+
const response = await RETAIL_API.CreateCaptcha(phoneNumber);
|
|
2699
|
+
setCaptcha(URL.createObjectURL(await response.blob()));
|
|
2700
|
+
};
|
|
2701
|
+
|
|
2702
|
+
const CaptchaDialog = JSX(({ phoneNumber, close, sendCode, onClose }) => {
|
|
2703
|
+
const [captcha, setCaptcha] = useState('');
|
|
2704
|
+
const [code, setCode] = useState('');
|
|
2705
|
+
const [hasError, setHasError] = useState(false);
|
|
2706
|
+
useEffect(() => {
|
|
2707
|
+
createCaptcha(setCaptcha, phoneNumber);
|
|
2708
|
+
}, []);
|
|
2709
|
+
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" })] })] }) }));
|
|
2710
|
+
});
|
|
2711
|
+
|
|
2712
|
+
const useCaptchaDialog = (initialProps, onClose) => {
|
|
2713
|
+
const { open, close, closeAll } = useDialogManager();
|
|
2714
|
+
return {
|
|
2715
|
+
open: () => open(jsx(CaptchaDialog, { close: close, onClose: onClose, ...initialProps })),
|
|
2716
|
+
close,
|
|
2717
|
+
closeAll,
|
|
2718
|
+
};
|
|
2719
|
+
};
|
|
2720
|
+
|
|
2620
2721
|
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, {
|
|
2621
2722
|
'backdrop-blur': blur,
|
|
2622
2723
|
}), 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" }) })));
|
|
@@ -2641,7 +2742,24 @@
|
|
|
2641
2742
|
return `${minutes}:${seconds}`;
|
|
2642
2743
|
};
|
|
2643
2744
|
|
|
2644
|
-
const
|
|
2745
|
+
const handleSendCode = async ({ phoneNumber, captchaDialog, setTimeNextReq, setIsTimerStarted, setAttemps, }) => {
|
|
2746
|
+
try {
|
|
2747
|
+
await RETAIL_API.SendCode({
|
|
2748
|
+
phoneNumber: phoneNumber,
|
|
2749
|
+
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
2750
|
+
});
|
|
2751
|
+
setAttemps(0);
|
|
2752
|
+
setTimeNextReq(180);
|
|
2753
|
+
setIsTimerStarted(true);
|
|
2754
|
+
}
|
|
2755
|
+
catch (e) {
|
|
2756
|
+
if (e?.status === 429) {
|
|
2757
|
+
captchaDialog.open();
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
};
|
|
2761
|
+
|
|
2762
|
+
const InputCode = JSX(({ values, setValues, hasError, errorText }) => {
|
|
2645
2763
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
2646
2764
|
const inputRefs = useRef([]);
|
|
2647
2765
|
useEffect(() => {
|
|
@@ -2678,7 +2796,7 @@
|
|
|
2678
2796
|
inputRefs.current = [];
|
|
2679
2797
|
}
|
|
2680
2798
|
inputRefs.current[index] = ref;
|
|
2681
|
-
}, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children:
|
|
2799
|
+
}, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children: errorText }) : null] }));
|
|
2682
2800
|
});
|
|
2683
2801
|
const getInputStyle = (index, values, hasError = false) => {
|
|
2684
2802
|
const isInputEmpty = !values[index];
|
|
@@ -2689,42 +2807,85 @@
|
|
|
2689
2807
|
return (jsx(Button, { type: "button", onClick: onClick, disabled: isDisabled, children: jsx(Text, { font: "font-medium", children: text }) }));
|
|
2690
2808
|
});
|
|
2691
2809
|
|
|
2692
|
-
const
|
|
2693
|
-
const { close } = useDialogManager();
|
|
2694
|
-
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
2810
|
+
const useVerifyPhoneDialogSubmit = ({ close, values }) => {
|
|
2695
2811
|
const [hasError, setHasError] = useState(false);
|
|
2812
|
+
const [errorText, setErrorText] = useState('');
|
|
2696
2813
|
const [isLoading, setIsLoading] = useState(false);
|
|
2697
|
-
const [timeNextReq, setTimeNextReq] = useState(
|
|
2698
|
-
const
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
});
|
|
2814
|
+
const [timeNextReq, setTimeNextReq] = useState(0);
|
|
2815
|
+
const [isTimerStarted, setIsTimerStarted] = useState(false);
|
|
2816
|
+
const [attemps, setAttemps] = useState(0);
|
|
2817
|
+
const resetError = useCallback(() => {
|
|
2818
|
+
setHasError(false);
|
|
2819
|
+
setErrorText('');
|
|
2704
2820
|
}, []);
|
|
2821
|
+
const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
|
|
2822
|
+
const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
|
|
2705
2823
|
const handleSubmit = useCallback(async () => {
|
|
2706
2824
|
try {
|
|
2825
|
+
setIsTimerStarted(false);
|
|
2826
|
+
setTimeNextReq(0);
|
|
2827
|
+
setAttemps(attemps + 1);
|
|
2707
2828
|
setIsLoading(true);
|
|
2708
2829
|
await RETAIL_API.CheckCode({
|
|
2709
2830
|
smsText: values.join(''),
|
|
2710
2831
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
2711
2832
|
});
|
|
2712
|
-
|
|
2713
|
-
close();
|
|
2714
|
-
onClose && onClose();
|
|
2833
|
+
resetError();
|
|
2834
|
+
close && close();
|
|
2715
2835
|
}
|
|
2716
2836
|
catch {
|
|
2717
2837
|
setIsLoading(false);
|
|
2838
|
+
attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
|
|
2718
2839
|
setHasError(true);
|
|
2719
2840
|
}
|
|
2720
|
-
}, [values]);
|
|
2721
|
-
|
|
2841
|
+
}, [values, attemps]);
|
|
2842
|
+
useEffect(() => {
|
|
2843
|
+
if (isTimeExpired) {
|
|
2844
|
+
setHasError(true);
|
|
2845
|
+
setErrorText('Код просрочен');
|
|
2846
|
+
}
|
|
2847
|
+
else {
|
|
2848
|
+
setHasError(false);
|
|
2849
|
+
}
|
|
2850
|
+
}, [isTimeExpired]);
|
|
2851
|
+
return {
|
|
2852
|
+
handleSubmit,
|
|
2853
|
+
hasError,
|
|
2854
|
+
errorText,
|
|
2855
|
+
isLoading,
|
|
2856
|
+
timeNextReq,
|
|
2857
|
+
isSubmitButtonDisabled,
|
|
2858
|
+
setTimeNextReq,
|
|
2859
|
+
setIsTimerStarted,
|
|
2860
|
+
setAttemps,
|
|
2861
|
+
};
|
|
2862
|
+
};
|
|
2863
|
+
|
|
2864
|
+
const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = '', phoneNumber = '+79999999999', }) => {
|
|
2865
|
+
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
2866
|
+
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttemps, } = useVerifyPhoneDialogSubmit({ values, close });
|
|
2867
|
+
const sendCode = useCallback(() => {
|
|
2868
|
+
handleSendCode({
|
|
2869
|
+
phoneNumber,
|
|
2870
|
+
captchaDialog,
|
|
2871
|
+
setTimeNextReq,
|
|
2872
|
+
setIsTimerStarted,
|
|
2873
|
+
setAttemps,
|
|
2874
|
+
});
|
|
2875
|
+
}, []);
|
|
2876
|
+
const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode }, onClose);
|
|
2877
|
+
useEffect(() => {
|
|
2878
|
+
sendCode();
|
|
2879
|
+
}, []);
|
|
2880
|
+
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$1(timeNextReq, setTimeNextReq, sendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
2722
2881
|
});
|
|
2882
|
+
const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
|
|
2883
|
+
const renderText$1 = (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" }));
|
|
2723
2884
|
|
|
2724
2885
|
const useVerifyPhoneDialog = (props) => {
|
|
2725
2886
|
const { open, close } = useDialogManager();
|
|
2726
2887
|
return {
|
|
2727
|
-
open: (options = {}) => open(jsx(VerifyPhoneDialog, { ...props }), options),
|
|
2888
|
+
open: (options = {}) => open(jsx(VerifyPhoneDialog, { onClose: close, ...props }), options),
|
|
2728
2889
|
close,
|
|
2729
2890
|
};
|
|
2730
2891
|
};
|
|
@@ -2751,7 +2912,7 @@
|
|
|
2751
2912
|
programId,
|
|
2752
2913
|
});
|
|
2753
2914
|
await RETAIL_API.UpdateUserTask(getUpdateUserTaskData(participantId, taskId, profileId, formData));
|
|
2754
|
-
|
|
2915
|
+
globalThis.location.href = '/credit-lead';
|
|
2755
2916
|
}
|
|
2756
2917
|
catch {
|
|
2757
2918
|
setResponseStatus('Fail');
|
|
@@ -2759,7 +2920,7 @@
|
|
|
2759
2920
|
};
|
|
2760
2921
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2761
2922
|
const verifyPhoneDialog = useVerifyPhoneDialog({
|
|
2762
|
-
|
|
2923
|
+
close: handleSuccessVerify,
|
|
2763
2924
|
...verifyPhoneContent(formData?.phone),
|
|
2764
2925
|
});
|
|
2765
2926
|
verifyPhoneDialog.open();
|
|
@@ -2777,14 +2938,13 @@
|
|
|
2777
2938
|
const verifyPhoneContent = (phone) => ({
|
|
2778
2939
|
title: 'Подтвердите номер телефона',
|
|
2779
2940
|
description: `Мы отправили код на ${phone}`,
|
|
2780
|
-
|
|
2941
|
+
phoneNumber: formatPhone(phone),
|
|
2781
2942
|
textButton: 'Оформить',
|
|
2782
2943
|
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
|
|
2783
2944
|
<ul><li>соглашение о порядке использования простой электронной подписи,
|
|
2784
2945
|
</li><li>согласие на обработку персональных данных,
|
|
2785
2946
|
</li><li>предоставление и подписание прочих согласий Банка,
|
|
2786
2947
|
</li><li>согласие на запрос в ПФР</li></ul>`,
|
|
2787
|
-
href: '/credit-lead',
|
|
2788
2948
|
});
|
|
2789
2949
|
|
|
2790
2950
|
const useInitApplicationLead = () => {
|
|
@@ -4533,7 +4693,7 @@
|
|
|
4533
4693
|
return null;
|
|
4534
4694
|
};
|
|
4535
4695
|
|
|
4536
|
-
const ICON_SIZE
|
|
4696
|
+
const ICON_SIZE = { width: '24', height: '24' };
|
|
4537
4697
|
const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
|
|
4538
4698
|
const pages = useMemo(() => Array.from({ length: totalPages }).fill({
|
|
4539
4699
|
currentPage,
|
|
@@ -4552,7 +4712,7 @@
|
|
|
4552
4712
|
}, [currentPage, totalPages]);
|
|
4553
4713
|
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
4554
4714
|
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
4555
|
-
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
|
|
4715
|
+
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 }) })] }));
|
|
4556
4716
|
};
|
|
4557
4717
|
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
4558
4718
|
|
|
@@ -4873,36 +5033,6 @@
|
|
|
4873
5033
|
|
|
4874
5034
|
const LEFT_COLUMN_STYLE = 'w-full lg:w-52';
|
|
4875
5035
|
|
|
4876
|
-
const ICON_SIZE = { width: '118', height: '24' };
|
|
4877
|
-
|
|
4878
|
-
const logoTitleSizeStyle = '';
|
|
4879
|
-
|
|
4880
|
-
const ICON_VERSION_MAP = {
|
|
4881
|
-
'bg-white': 'color',
|
|
4882
|
-
transparent: 'white',
|
|
4883
|
-
};
|
|
4884
|
-
const SVG_COLOR = {
|
|
4885
|
-
'bg-white': 'text-primary-main',
|
|
4886
|
-
transparent: 'text-white',
|
|
4887
|
-
};
|
|
4888
|
-
const renderImage = (bgColor, image, size) => {
|
|
4889
|
-
const img = image?.src
|
|
4890
|
-
? image
|
|
4891
|
-
: {
|
|
4892
|
-
icon: image?.icon || 'LogoIcon',
|
|
4893
|
-
iconVersion: ICON_VERSION_MAP[bgColor],
|
|
4894
|
-
};
|
|
4895
|
-
return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
|
|
4896
|
-
};
|
|
4897
|
-
|
|
4898
|
-
const TEXT_COLOR = {
|
|
4899
|
-
'bg-white': 'text-primary-text',
|
|
4900
|
-
transparent: 'text-white',
|
|
4901
|
-
};
|
|
4902
|
-
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
|
|
4903
|
-
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
4904
|
-
: null] })));
|
|
4905
|
-
|
|
4906
5036
|
function useDebouncedEffect(effect, deps, delay = 300) {
|
|
4907
5037
|
useEffect(() => {
|
|
4908
5038
|
const timerId = globalThis.setTimeout(effect, delay);
|
|
@@ -7281,7 +7411,7 @@
|
|
|
7281
7411
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7282
7412
|
});
|
|
7283
7413
|
|
|
7284
|
-
const packageVersion = "0.14.
|
|
7414
|
+
const packageVersion = "0.14.588";
|
|
7285
7415
|
|
|
7286
7416
|
exports.Blocks = Blocks;
|
|
7287
7417
|
exports.ContentPage = ContentPage;
|