@redneckz/wildless-cms-uni-blocks 0.14.636 → 0.14.638
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/getTaskStatus.d.ts +14 -0
- package/bundle/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
- package/bundle/api/RetailAPI/updateProfileEsia.d.ts +7 -7
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +256 -43
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
- package/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
- package/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
- package/bundle/components/CreditForm/CreditForm.d.ts +2 -2
- package/bundle/components/CreditForm/CreditFormContent.d.ts +5 -23
- package/bundle/components/CreditForm/CreditFormProgress.d.ts +1 -1
- package/bundle/components/CreditForm/CreditFormStatus.d.ts +16 -0
- package/bundle/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
- package/bundle/components/CreditForm/CreditFormStep.d.ts +5 -6
- package/bundle/components/CreditForm/FailedStatusContent.d.ts +2 -0
- package/bundle/components/CreditForm/PendingStatusContent.d.ts +2 -0
- package/bundle/components/CreditForm/ReworkStatusContent.d.ts +2 -0
- package/bundle/components/CreditForm/SuccessStatusContent.d.ts +2 -0
- package/bundle/components/CreditForm/formStateMap.d.ts +72 -0
- package/bundle/components/CreditForm/getInitialFormState.d.ts +1 -63
- package/bundle/components/CreditForm/renderInfo.d.ts +3 -0
- package/bundle/components/CreditForm/renderStep.d.ts +11 -0
- package/{lib/components/CreditForm/useCreditFormApi.d.ts → bundle/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
- package/bundle/hooks/useForm.d.ts +1 -1
- package/bundle/model/InputSectionsType.d.ts +5 -0
- package/dist/api/RetailAPI/getTaskStatus.d.ts +14 -0
- package/dist/api/RetailAPI/getTaskStatus.js +13 -0
- package/dist/api/RetailAPI/getTaskStatus.js.map +1 -0
- package/dist/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
- package/dist/api/RetailAPI/sendSignalToProcess.js +6 -0
- package/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -0
- package/dist/api/RetailAPI/updateProfileEsia.d.ts +7 -7
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +52 -0
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
- package/dist/components/CalculatorCredit/CalculatorCredit.js +3 -2
- package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.d.ts +2 -2
- package/dist/components/CreditForm/CreditForm.js +17 -6
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormContent.d.ts +5 -23
- package/dist/components/CreditForm/CreditFormProgress.d.ts +1 -1
- package/dist/components/CreditForm/CreditFormProgress.js +3 -3
- package/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatus.d.ts +16 -0
- package/dist/components/CreditForm/CreditFormStatus.js +25 -0
- package/dist/components/CreditForm/CreditFormStatus.js.map +1 -0
- package/dist/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
- package/dist/components/CreditForm/CreditFormStatusTracker.js +42 -0
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
- package/dist/components/CreditForm/CreditFormStep.d.ts +5 -6
- package/dist/components/CreditForm/CreditFormStep.js +19 -19
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/FailedStatusContent.d.ts +2 -0
- package/dist/components/CreditForm/FailedStatusContent.js +7 -0
- package/dist/components/CreditForm/FailedStatusContent.js.map +1 -0
- package/dist/components/CreditForm/PendingStatusContent.d.ts +2 -0
- package/dist/components/CreditForm/PendingStatusContent.js +32 -0
- package/dist/components/CreditForm/PendingStatusContent.js.map +1 -0
- package/dist/components/CreditForm/ReworkStatusContent.d.ts +2 -0
- package/dist/components/CreditForm/ReworkStatusContent.js +25 -0
- package/dist/components/CreditForm/ReworkStatusContent.js.map +1 -0
- package/dist/components/CreditForm/SuccessStatusContent.d.ts +2 -0
- package/dist/components/CreditForm/SuccessStatusContent.js +32 -0
- package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -0
- package/dist/components/CreditForm/creditFormStepsData.js +3 -0
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/formStateMap.d.ts +72 -0
- package/dist/components/CreditForm/formStateMap.js +81 -0
- package/dist/components/CreditForm/formStateMap.js.map +1 -0
- package/dist/components/CreditForm/getInitialFormState.d.ts +1 -63
- package/dist/components/CreditForm/getInitialFormState.js +2 -71
- package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditForm/renderInfo.d.ts +3 -0
- package/dist/components/CreditForm/renderInfo.js +12 -0
- package/dist/components/CreditForm/renderInfo.js.map +1 -0
- package/dist/components/CreditForm/renderInputs.js +1 -3
- package/dist/components/CreditForm/renderInputs.js.map +1 -1
- package/dist/components/CreditForm/renderStep.d.ts +11 -0
- package/dist/components/CreditForm/renderStep.js +11 -0
- package/dist/components/CreditForm/renderStep.js.map +1 -0
- package/{bundle/components/CreditForm/useCreditFormApi.d.ts → dist/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
- package/dist/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +7 -4
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -0
- package/dist/hooks/useForm.d.ts +1 -1
- package/dist/hooks/useForm.js +1 -0
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/model/InputSectionsType.d.ts +5 -0
- package/dist/model/InputSectionsType.js +2 -0
- package/dist/model/InputSectionsType.js.map +1 -0
- package/lib/api/RetailAPI/getTaskStatus.d.ts +14 -0
- package/lib/api/RetailAPI/getTaskStatus.js +10 -0
- package/lib/api/RetailAPI/getTaskStatus.js.map +1 -0
- package/lib/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
- package/lib/api/RetailAPI/sendSignalToProcess.js +3 -0
- package/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -0
- package/lib/api/RetailAPI/updateProfileEsia.d.ts +7 -7
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +49 -0
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
- package/lib/components/CalculatorCredit/CalculatorCredit.js +3 -2
- package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.d.ts +2 -2
- package/lib/components/CreditForm/CreditForm.js +17 -6
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormContent.d.ts +5 -23
- package/lib/components/CreditForm/CreditFormProgress.d.ts +1 -1
- package/lib/components/CreditForm/CreditFormProgress.js +3 -3
- package/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatus.d.ts +16 -0
- package/lib/components/CreditForm/CreditFormStatus.js +23 -0
- package/lib/components/CreditForm/CreditFormStatus.js.map +1 -0
- package/lib/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
- package/lib/components/CreditForm/CreditFormStatusTracker.js +40 -0
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
- package/lib/components/CreditForm/CreditFormStep.d.ts +5 -6
- package/lib/components/CreditForm/CreditFormStep.js +19 -19
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/FailedStatusContent.d.ts +2 -0
- package/lib/components/CreditForm/FailedStatusContent.js +5 -0
- package/lib/components/CreditForm/FailedStatusContent.js.map +1 -0
- package/lib/components/CreditForm/PendingStatusContent.d.ts +2 -0
- package/lib/components/CreditForm/PendingStatusContent.js +30 -0
- package/lib/components/CreditForm/PendingStatusContent.js.map +1 -0
- package/lib/components/CreditForm/ReworkStatusContent.d.ts +2 -0
- package/lib/components/CreditForm/ReworkStatusContent.js +23 -0
- package/lib/components/CreditForm/ReworkStatusContent.js.map +1 -0
- package/lib/components/CreditForm/SuccessStatusContent.d.ts +2 -0
- package/lib/components/CreditForm/SuccessStatusContent.js +30 -0
- package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -0
- package/lib/components/CreditForm/creditFormStepsData.js +3 -0
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/formStateMap.d.ts +72 -0
- package/lib/components/CreditForm/formStateMap.js +79 -0
- package/lib/components/CreditForm/formStateMap.js.map +1 -0
- package/lib/components/CreditForm/getInitialFormState.d.ts +1 -63
- package/lib/components/CreditForm/getInitialFormState.js +1 -70
- package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditForm/renderInfo.d.ts +2 -0
- package/lib/components/CreditForm/renderInfo.js +9 -0
- package/lib/components/CreditForm/renderInfo.js.map +1 -0
- package/lib/components/CreditForm/renderInputs.js +1 -3
- package/lib/components/CreditForm/renderInputs.js.map +1 -1
- package/lib/components/CreditForm/renderStep.d.ts +10 -0
- package/lib/components/CreditForm/renderStep.js +8 -0
- package/lib/components/CreditForm/renderStep.js.map +1 -0
- package/{mobile/bundle/components/CreditForm/useCreditFormApi.d.ts → lib/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
- package/lib/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +5 -2
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -0
- package/lib/hooks/useForm.d.ts +1 -1
- package/lib/hooks/useForm.js +1 -0
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/model/InputSectionsType.d.ts +5 -0
- package/lib/model/InputSectionsType.js +2 -0
- package/lib/model/InputSectionsType.js.map +1 -0
- package/mobile/bundle/api/RetailAPI/getTaskStatus.d.ts +14 -0
- package/mobile/bundle/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
- package/mobile/bundle/api/RetailAPI/updateProfileEsia.d.ts +7 -7
- package/mobile/bundle/bundle.umd.js +260 -39
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
- package/mobile/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
- package/mobile/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
- package/mobile/bundle/components/CreditForm/CreditForm.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +5 -23
- package/mobile/bundle/components/CreditForm/CreditFormProgress.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/CreditFormStatus.d.ts +16 -0
- package/mobile/bundle/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +5 -6
- package/mobile/bundle/components/CreditForm/FailedStatusContent.d.ts +2 -0
- package/mobile/bundle/components/CreditForm/PendingStatusContent.d.ts +2 -0
- package/mobile/bundle/components/CreditForm/ReworkStatusContent.d.ts +2 -0
- package/mobile/bundle/components/CreditForm/SuccessStatusContent.d.ts +2 -0
- package/mobile/bundle/components/CreditForm/formStateMap.d.ts +72 -0
- package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +1 -63
- package/mobile/bundle/components/CreditForm/renderInfo.d.ts +3 -0
- package/mobile/bundle/components/CreditForm/renderStep.d.ts +11 -0
- package/{dist/components/CreditForm/useCreditFormApi.d.ts → mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts} +4 -3
- package/mobile/bundle/hooks/useForm.d.ts +1 -1
- package/mobile/bundle/model/InputSectionsType.d.ts +5 -0
- package/mobile/dist/api/RetailAPI/getTaskStatus.d.ts +14 -0
- package/mobile/dist/api/RetailAPI/getTaskStatus.js +13 -0
- package/mobile/dist/api/RetailAPI/getTaskStatus.js.map +1 -0
- package/mobile/dist/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
- package/mobile/dist/api/RetailAPI/sendSignalToProcess.js +6 -0
- package/mobile/dist/api/RetailAPI/sendSignalToProcess.js.map +1 -0
- package/mobile/dist/api/RetailAPI/updateProfileEsia.d.ts +7 -7
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +52 -0
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +3 -2
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.d.ts +2 -2
- package/mobile/dist/components/CreditForm/CreditForm.js +17 -6
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +5 -23
- package/mobile/dist/components/CreditForm/CreditFormProgress.d.ts +1 -1
- package/mobile/dist/components/CreditForm/CreditFormProgress.js +3 -3
- package/mobile/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatus.d.ts +16 -0
- package/mobile/dist/components/CreditForm/CreditFormStatus.js +25 -0
- package/mobile/dist/components/CreditForm/CreditFormStatus.js.map +1 -0
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +42 -0
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +5 -6
- package/mobile/dist/components/CreditForm/CreditFormStep.js +19 -19
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/FailedStatusContent.d.ts +2 -0
- package/mobile/dist/components/CreditForm/FailedStatusContent.js +7 -0
- package/mobile/dist/components/CreditForm/FailedStatusContent.js.map +1 -0
- package/mobile/dist/components/CreditForm/PendingStatusContent.d.ts +2 -0
- package/mobile/dist/components/CreditForm/PendingStatusContent.js +32 -0
- package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -0
- package/mobile/dist/components/CreditForm/ReworkStatusContent.d.ts +2 -0
- package/mobile/dist/components/CreditForm/ReworkStatusContent.js +25 -0
- package/mobile/dist/components/CreditForm/ReworkStatusContent.js.map +1 -0
- package/mobile/dist/components/CreditForm/SuccessStatusContent.d.ts +2 -0
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js +32 -0
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -0
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +3 -0
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/formStateMap.d.ts +72 -0
- package/mobile/dist/components/CreditForm/formStateMap.js +81 -0
- package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -0
- package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +1 -63
- package/mobile/dist/components/CreditForm/getInitialFormState.js +2 -71
- package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderInfo.d.ts +3 -0
- package/mobile/dist/components/CreditForm/renderInfo.js +12 -0
- package/mobile/dist/components/CreditForm/renderInfo.js.map +1 -0
- package/mobile/dist/components/CreditForm/renderInputs.js +1 -3
- package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderStep.d.ts +11 -0
- package/mobile/dist/components/CreditForm/renderStep.js +11 -0
- package/mobile/dist/components/CreditForm/renderStep.js.map +1 -0
- package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +13 -0
- package/mobile/dist/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +7 -4
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -0
- package/mobile/dist/hooks/useForm.d.ts +1 -1
- package/mobile/dist/hooks/useForm.js +1 -0
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/model/InputSectionsType.d.ts +5 -0
- package/mobile/dist/model/InputSectionsType.js +2 -0
- package/mobile/dist/model/InputSectionsType.js.map +1 -0
- package/mobile/lib/api/RetailAPI/getTaskStatus.d.ts +14 -0
- package/mobile/lib/api/RetailAPI/getTaskStatus.js +10 -0
- package/mobile/lib/api/RetailAPI/getTaskStatus.js.map +1 -0
- package/mobile/lib/api/RetailAPI/sendSignalToProcess.d.ts +11 -0
- package/mobile/lib/api/RetailAPI/sendSignalToProcess.js +3 -0
- package/mobile/lib/api/RetailAPI/sendSignalToProcess.js.map +1 -0
- package/mobile/lib/api/RetailAPI/updateProfileEsia.d.ts +7 -7
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -3
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -16
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +3 -0
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +49 -0
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +6 -3
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -0
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +3 -2
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.d.ts +2 -2
- package/mobile/lib/components/CreditForm/CreditForm.js +17 -6
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +5 -23
- package/mobile/lib/components/CreditForm/CreditFormProgress.d.ts +1 -1
- package/mobile/lib/components/CreditForm/CreditFormProgress.js +3 -3
- package/mobile/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatus.d.ts +16 -0
- package/mobile/lib/components/CreditForm/CreditFormStatus.js +23 -0
- package/mobile/lib/components/CreditForm/CreditFormStatus.js.map +1 -0
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.d.ts +2 -0
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +40 -0
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -0
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +5 -6
- package/mobile/lib/components/CreditForm/CreditFormStep.js +19 -19
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/FailedStatusContent.d.ts +2 -0
- package/mobile/lib/components/CreditForm/FailedStatusContent.js +5 -0
- package/mobile/lib/components/CreditForm/FailedStatusContent.js.map +1 -0
- package/mobile/lib/components/CreditForm/PendingStatusContent.d.ts +2 -0
- package/mobile/lib/components/CreditForm/PendingStatusContent.js +30 -0
- package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -0
- package/mobile/lib/components/CreditForm/ReworkStatusContent.d.ts +2 -0
- package/mobile/lib/components/CreditForm/ReworkStatusContent.js +23 -0
- package/mobile/lib/components/CreditForm/ReworkStatusContent.js.map +1 -0
- package/mobile/lib/components/CreditForm/SuccessStatusContent.d.ts +2 -0
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js +30 -0
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -0
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +3 -0
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/formStateMap.d.ts +72 -0
- package/mobile/lib/components/CreditForm/formStateMap.js +79 -0
- package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -0
- package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +1 -63
- package/mobile/lib/components/CreditForm/getInitialFormState.js +1 -70
- package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderInfo.d.ts +3 -0
- package/mobile/lib/components/CreditForm/renderInfo.js +9 -0
- package/mobile/lib/components/CreditForm/renderInfo.js.map +1 -0
- package/mobile/lib/components/CreditForm/renderInputs.js +1 -3
- package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderStep.d.ts +11 -0
- package/mobile/lib/components/CreditForm/renderStep.js +8 -0
- package/mobile/lib/components/CreditForm/renderStep.js.map +1 -0
- package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +13 -0
- package/mobile/lib/components/CreditForm/{useCreditFormApi.js → useCreditFormAPI.js} +5 -2
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -0
- package/mobile/lib/hooks/useForm.d.ts +1 -1
- package/mobile/lib/hooks/useForm.js +1 -0
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/model/InputSectionsType.d.ts +5 -0
- package/mobile/lib/model/InputSectionsType.js +2 -0
- package/mobile/lib/model/InputSectionsType.js.map +1 -0
- package/mobile/src/api/RetailAPI/getTaskStatus.ts +16 -0
- package/mobile/src/api/RetailAPI/sendSignalToProcess.ts +19 -0
- package/mobile/src/api/RetailAPI/updateProfileEsia.ts +7 -7
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +3 -3
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -3
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +3 -16
- package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +69 -0
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -3
- package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +8 -1
- package/mobile/src/components/CreditForm/CreditForm.tsx +38 -11
- package/mobile/src/components/CreditForm/CreditFormContent.ts +6 -30
- package/mobile/src/components/CreditForm/CreditFormProgress.tsx +5 -5
- package/mobile/src/components/CreditForm/CreditFormStatus.tsx +119 -0
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +47 -0
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +39 -36
- package/mobile/src/components/CreditForm/FailedStatusContent.tsx +11 -0
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +38 -0
- package/mobile/src/components/CreditForm/ReworkStatusContent.tsx +32 -0
- package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +37 -0
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +3 -0
- package/mobile/src/components/CreditForm/formStateMap.tsx +151 -0
- package/mobile/src/components/CreditForm/getInitialFormState.tsx +1 -136
- package/mobile/src/components/CreditForm/renderInfo.tsx +10 -0
- package/mobile/src/components/CreditForm/renderInputs.tsx +2 -3
- package/mobile/src/components/CreditForm/renderStep.tsx +25 -0
- package/mobile/src/components/CreditForm/{useCreditFormApi.tsx → useCreditFormAPI.tsx} +14 -3
- package/mobile/src/hooks/useForm.ts +3 -1
- package/mobile/src/model/InputSectionsType.ts +6 -0
- package/package.json +2 -2
- package/src/api/RetailAPI/getTaskStatus.ts +16 -0
- package/src/api/RetailAPI/sendSignalToProcess.ts +19 -0
- package/src/api/RetailAPI/updateProfileEsia.ts +7 -7
- package/src/components/ApplicationForm/ApplicationFormContent.ts +3 -3
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.tsx +0 -2
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +0 -2
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -3
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +3 -16
- package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +69 -0
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +8 -3
- package/src/components/CalculatorCredit/CalculatorCredit.tsx +8 -1
- package/src/components/CreditForm/CreditForm.tsx +38 -11
- package/src/components/CreditForm/CreditFormContent.ts +6 -30
- package/src/components/CreditForm/CreditFormProgress.tsx +5 -5
- package/src/components/CreditForm/CreditFormStatus.tsx +119 -0
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +47 -0
- package/src/components/CreditForm/CreditFormStep.tsx +39 -36
- package/src/components/CreditForm/FailedStatusContent.tsx +11 -0
- package/src/components/CreditForm/PendingStatusContent.tsx +38 -0
- package/src/components/CreditForm/ReworkStatusContent.tsx +32 -0
- package/src/components/CreditForm/SuccessStatusContent.tsx +37 -0
- package/src/components/CreditForm/creditFormStepsData.tsx +3 -0
- package/src/components/CreditForm/formStateMap.tsx +151 -0
- package/src/components/CreditForm/getInitialFormState.tsx +1 -136
- package/src/components/CreditForm/renderInfo.tsx +10 -0
- package/src/components/CreditForm/renderInputs.tsx +2 -3
- package/src/components/CreditForm/renderStep.tsx +25 -0
- package/src/components/CreditForm/{useCreditFormApi.tsx → useCreditFormAPI.tsx} +14 -3
- package/src/hooks/useForm.ts +3 -1
- package/src/model/InputSectionsType.ts +6 -0
- package/bundle/api/FileStorage.d.ts +0 -18
- package/dist/api/FileStorage.d.ts +0 -18
- package/dist/api/FileStorage.js +0 -60
- package/dist/api/FileStorage.js.map +0 -1
- package/dist/components/CreditForm/useCreditFormApi.js.map +0 -1
- package/lib/api/FileStorage.d.ts +0 -18
- package/lib/api/FileStorage.js +0 -58
- package/lib/api/FileStorage.js.map +0 -1
- package/lib/components/CreditForm/useCreditFormApi.js.map +0 -1
- package/mobile/bundle/api/FileStorage.d.ts +0 -18
- package/mobile/dist/api/FileStorage.d.ts +0 -18
- package/mobile/dist/api/FileStorage.js +0 -60
- package/mobile/dist/api/FileStorage.js.map +0 -1
- package/mobile/dist/components/CreditForm/useCreditFormApi.d.ts +0 -12
- package/mobile/dist/components/CreditForm/useCreditFormApi.js.map +0 -1
- package/mobile/lib/api/FileStorage.d.ts +0 -18
- package/mobile/lib/api/FileStorage.js +0 -58
- package/mobile/lib/api/FileStorage.js.map +0 -1
- package/mobile/lib/components/CreditForm/useCreditFormApi.d.ts +0 -12
- package/mobile/lib/components/CreditForm/useCreditFormApi.js.map +0 -1
- package/mobile/src/api/FileStorage.ts +0 -99
- package/src/api/FileStorage.ts +0 -99
|
@@ -1,64 +1,2 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type Address } from '../ApplicationLeadForm/getInitialFormState';
|
|
3
|
-
export interface FormStateMap {
|
|
4
|
-
0: {
|
|
5
|
-
surname?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
middleName?: string;
|
|
8
|
-
sex?: string;
|
|
9
|
-
birthday?: Date;
|
|
10
|
-
birthPlace?: string;
|
|
11
|
-
phone?: string;
|
|
12
|
-
email?: string;
|
|
13
|
-
dulSerie?: number;
|
|
14
|
-
dulNumber?: number;
|
|
15
|
-
dulIssueDateField?: Date;
|
|
16
|
-
dulSubdivisionCode?: string;
|
|
17
|
-
dulIssuedBy?: string;
|
|
18
|
-
addressRegistration?: Address;
|
|
19
|
-
addressMatch?: boolean;
|
|
20
|
-
participantDateRegistration?: Date;
|
|
21
|
-
addressFact?: Address;
|
|
22
|
-
housing?: string;
|
|
23
|
-
};
|
|
24
|
-
1: {
|
|
25
|
-
amountWorkers?: Option;
|
|
26
|
-
beginDate?: Date;
|
|
27
|
-
employerActivities?: Option;
|
|
28
|
-
employerOrganization?: Option;
|
|
29
|
-
employment?: Option;
|
|
30
|
-
experience5Years?: string;
|
|
31
|
-
inn?: number;
|
|
32
|
-
jobsNumber?: string;
|
|
33
|
-
lastJobExperience?: string;
|
|
34
|
-
legalForm?: string;
|
|
35
|
-
organization?: Option;
|
|
36
|
-
organizationAddress?: Address;
|
|
37
|
-
organizationName?: string;
|
|
38
|
-
organizationPhone?: string;
|
|
39
|
-
partInBusiness?: number;
|
|
40
|
-
positionOrganization?: Option;
|
|
41
|
-
};
|
|
42
|
-
2: {
|
|
43
|
-
familyStatus?: Option;
|
|
44
|
-
dependents?: number;
|
|
45
|
-
familyMembers?: number;
|
|
46
|
-
mandatoryIncome?: number;
|
|
47
|
-
otherPayments?: number;
|
|
48
|
-
snils?: string;
|
|
49
|
-
armyIdFlg?: boolean;
|
|
50
|
-
};
|
|
51
|
-
3: {
|
|
52
|
-
disablePeopleFlg?: boolean;
|
|
53
|
-
bankruptcyFlg?: boolean;
|
|
54
|
-
shareholderFlg?: boolean;
|
|
55
|
-
legalEntityName?: string;
|
|
56
|
-
creditInRshbCd?: Option;
|
|
57
|
-
};
|
|
58
|
-
4: {
|
|
59
|
-
regionRetail?: string;
|
|
60
|
-
addressRetail?: string;
|
|
61
|
-
bankEmployeeCode?: string;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
1
|
+
import { type FormStateMap } from './formStateMap';
|
|
64
2
|
export declare const getInitialFormState: <Step extends keyof FormStateMap>(step: Step, localStorageData: Record<string, any> | null) => FormStateMap[Step];
|
|
@@ -1,73 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
0: {
|
|
3
|
-
surname: '',
|
|
4
|
-
name: '',
|
|
5
|
-
middleName: '',
|
|
6
|
-
sex: '',
|
|
7
|
-
birthday: undefined,
|
|
8
|
-
birthPlace: '',
|
|
9
|
-
phone: '',
|
|
10
|
-
email: '',
|
|
11
|
-
dulSerie: undefined,
|
|
12
|
-
dulNumber: undefined,
|
|
13
|
-
dulIssueDateField: undefined,
|
|
14
|
-
dulSubdivisionCode: '',
|
|
15
|
-
dulIssuedBy: '',
|
|
16
|
-
addressRegistration: {
|
|
17
|
-
fullAddress: '',
|
|
18
|
-
fiasCode: '',
|
|
19
|
-
},
|
|
20
|
-
addressMatch: false,
|
|
21
|
-
participantDateRegistration: undefined,
|
|
22
|
-
addressFact: {
|
|
23
|
-
fullAddress: '',
|
|
24
|
-
fiasCode: '',
|
|
25
|
-
},
|
|
26
|
-
housing: '',
|
|
27
|
-
},
|
|
28
|
-
1: {
|
|
29
|
-
amountWorkers: { key: '', text: '' },
|
|
30
|
-
beginDate: undefined,
|
|
31
|
-
employerActivities: { key: '', text: '' },
|
|
32
|
-
employerOrganization: { key: '', text: '' },
|
|
33
|
-
employment: { key: '', text: '' },
|
|
34
|
-
experience5Years: '',
|
|
35
|
-
inn: undefined,
|
|
36
|
-
jobsNumber: '',
|
|
37
|
-
lastJobExperience: '',
|
|
38
|
-
legalForm: '',
|
|
39
|
-
organization: { key: '', text: '' },
|
|
40
|
-
organizationAddress: {
|
|
41
|
-
fullAddress: '',
|
|
42
|
-
fiasCode: '',
|
|
43
|
-
},
|
|
44
|
-
organizationName: '',
|
|
45
|
-
organizationPhone: '',
|
|
46
|
-
partInBusiness: undefined,
|
|
47
|
-
positionOrganization: { key: '', text: '' },
|
|
48
|
-
},
|
|
49
|
-
2: {
|
|
50
|
-
familyStatus: { key: '', text: '' },
|
|
51
|
-
dependents: undefined,
|
|
52
|
-
familyMembers: undefined,
|
|
53
|
-
mandatoryIncome: undefined,
|
|
54
|
-
otherPayments: undefined,
|
|
55
|
-
snils: '',
|
|
56
|
-
armyIdFlg: false,
|
|
57
|
-
},
|
|
58
|
-
3: {
|
|
59
|
-
disablePeopleFlg: false,
|
|
60
|
-
bankruptcyFlg: false,
|
|
61
|
-
shareholderFlg: false,
|
|
62
|
-
legalEntityName: '',
|
|
63
|
-
creditInRshbCd: undefined,
|
|
64
|
-
},
|
|
65
|
-
4: {
|
|
66
|
-
regionRetail: '',
|
|
67
|
-
addressRetail: '',
|
|
68
|
-
bankEmployeeCode: '',
|
|
69
|
-
},
|
|
70
|
-
};
|
|
1
|
+
import { formStateMap } from './formStateMap.js';
|
|
71
2
|
export const getInitialFormState = (step, localStorageData) => {
|
|
72
3
|
if (localStorageData) {
|
|
73
4
|
// TODO: Fill in for other fields with type Date
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialFormState.js","sourceRoot":"","sources":["../../../src/components/CreditForm/getInitialFormState.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getInitialFormState.js","sourceRoot":"","sources":["../../../src/components/CreditForm/getInitialFormState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAAU,EACV,gBAA4C,EACxB,EAAE;IACtB,IAAI,gBAAgB,EAAE;QACpB,gDAAgD;QAChD,kCAAkC;QAClC,gBAAgB,CAAC,QAAQ,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,IAAI,CACtE,gBAAgB,EAAE,QAAmB,IAAI,IAAI,CAAC,GAAG,EAAE,CACrD,CAAC;QACF,gBAAgB,CAAC,2BAA2B,GAAG,IAAI,IAAI,CACpD,gBAAgB,EAAE,2BAAsC,IAAI,IAAI,CAAC,GAAG,EAAE,CACxE,CAAC;QACF,gBAAgB,CAAC,SAAS,GAAG,IAAI,IAAI,CAAE,gBAAgB,EAAE,SAAoB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;KAC9F;IAED,OAAO;QACL,GAAG,YAAY,CAAC,IAAI,CAAC;QACrB,GAAG,gBAAgB;KACpB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { InfoCard } from '../../ui-kit/InfoCard/InfoCard.js';
|
|
3
|
+
export const renderInfo = (inputs = []) => {
|
|
4
|
+
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
5
|
+
return infoInputs.length
|
|
6
|
+
? infoInputs.map(({ text, name }, i) => _jsx(InfoCard, { __html: text }, `${name}_${i}`))
|
|
7
|
+
: null;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=renderInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderInfo.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAqB,EAAE,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC;IAEhE,OAAO,UAAU,CAAC,MAAM;QACtB,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,KAAC,QAAQ,IAAsB,MAAM,EAAE,IAAI,IAA5B,GAAG,IAAI,IAAI,CAAC,EAAE,CAAkB,CAAC;QACxF,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { getField } from '../../ui-kit/FormField/getField.js';
|
|
2
|
-
export const renderInputs = ({ field, inputs }) =>
|
|
3
|
-
return (inputs || [])?.map(getField(field, ''));
|
|
4
|
-
};
|
|
2
|
+
export const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
|
|
5
3
|
//# sourceMappingURL=renderInputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderInputs.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderInputs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqB,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"renderInputs.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderInputs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqB,EAAE,EAAE,CACnE,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type FormFieldRegisterer, type FormOperatorProps } from '../../hooks/useForm';
|
|
3
|
+
import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
|
|
4
|
+
import { type FormStateMap } from './formStateMap';
|
|
5
|
+
export declare type CustomSubmit = FormOperatorProps<FormStateMap[keyof FormStateMap]>['onSubmit'];
|
|
6
|
+
export interface StepProps {
|
|
7
|
+
sections?: SectionsProps[];
|
|
8
|
+
field: FormFieldRegisterer<FormStateMap[keyof FormStateMap]>;
|
|
9
|
+
registerSubmit?: (submit: CustomSubmit) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const renderStep: ({ sections, field }: StepProps) => JSX.Element[] | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle.js';
|
|
3
|
+
import { renderTitle } from '../../ui-kit/FormField/renderTitle.js';
|
|
4
|
+
import { style } from '../../utils/style.js';
|
|
5
|
+
import { renderInfo } from './renderInfo.js';
|
|
6
|
+
import { renderInputs } from './renderInputs.js';
|
|
7
|
+
export const renderStep = ({ sections, field }) => sections?.map(({ inputs, columns, title }, i) => (_jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo(inputs), renderTitle(title), renderInputs({ field, inputs })] }, `section-${i}`)));
|
|
8
|
+
//# sourceMappingURL=renderStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/CreditForm/renderStep.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAU9C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAa,EAAE,EAAE,CAC3D,QAAQ,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/C,eAA0B,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,aACnF,UAAU,CAAC,MAAM,CAAC,EAClB,WAAW,CAAC,KAAK,CAAC,EAClB,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAHxB,WAAW,CAAC,EAAE,CAIlB,CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
2
|
+
import { type FormStateMap } from './formStateMap';
|
|
3
|
+
declare type CreditFormApiProps = {
|
|
4
|
+
step: number;
|
|
5
|
+
inputs: FieldDef[];
|
|
6
|
+
onNextStep: () => void;
|
|
7
|
+
saveStep: (value: Record<string, any>) => void;
|
|
8
|
+
finishForm?: (bool: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const useCreditFormAPI: ({ step, inputs, onNextStep, saveStep, finishForm, }: CreditFormApiProps) => {
|
|
11
|
+
handleSubmit: (formData: FormStateMap[keyof FormStateMap]) => Promise<void | "OK" | "Fail">;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -5,7 +5,7 @@ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator.js
|
|
|
5
5
|
import { objectValidator } from '../../validation/objectValidator.js';
|
|
6
6
|
import { isValidationSuccess } from '../../validation/validator.js';
|
|
7
7
|
import { getCreditFormTaskData } from './getCreditFormTaskData.js';
|
|
8
|
-
export const
|
|
8
|
+
export const useCreditFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
|
|
9
9
|
const [taskId] = useLocalStorage('taskId');
|
|
10
10
|
const [profileId] = useLocalStorage('profileId');
|
|
11
11
|
const [participantId] = useLocalStorage('participantId');
|
|
@@ -30,10 +30,13 @@ export const useCreditFormApi = ({ inputs, step, onNextStep, saveStep }) => {
|
|
|
30
30
|
return 'Fail';
|
|
31
31
|
}
|
|
32
32
|
onNextStep();
|
|
33
|
+
if (step === 5) {
|
|
34
|
+
finishForm?.(true);
|
|
35
|
+
}
|
|
33
36
|
return 'OK';
|
|
34
37
|
}, []);
|
|
35
38
|
return {
|
|
36
39
|
handleSubmit,
|
|
37
40
|
};
|
|
38
41
|
};
|
|
39
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=useCreditFormAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreditFormAPI.js","sourceRoot":"","sources":["../../../src/components/CreditForm/useCreditFormAPI.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAUhE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,GACS,EAAE,EAAE;IACvB,MAAM,CAAC,MAAM,CAAC,GAAG,eAAe,CAAS,QAAQ,CAAC,CAAC;IACnD,MAAM,CAAC,SAAS,CAAC,GAAG,eAAe,CAAS,WAAW,CAAC,CAAC;IACzD,MAAM,CAAC,aAAa,CAAC,GAAG,eAAe,CAAS,eAAe,CAAC,CAAC;IAEjE,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,EAAE,QAA0C,EAAE,EAAE;QACpF,MAAM,iBAAiB,GAAG,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtE,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE;YACrD,OAAO,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACxC;QAED,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEnB,IAAI;YACF,IAAI,MAAM,IAAI,SAAS,IAAI,aAAa,EAAE;gBACxC,MAAM,cAAc,CAClB,qBAAqB,CAAC;oBACpB,aAAa;oBACb,MAAM;oBACN,SAAS;oBACT,IAAI;oBACJ,QAAQ,EAAE,QAAe;iBAC1B,CAAC,CACH,CAAC;aACH;SACF;QAAC,OAAO,EAAE,EAAE;YACX,OAAO,MAAM,CAAC;SACf;QAED,UAAU,EAAE,CAAC;QAEb,IAAI,IAAI,KAAK,CAAC,EAAE;YACd,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC;SACpB;QAED,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -13,7 +13,7 @@ export interface FormOperatorProps<FormState extends Record<string, any>> {
|
|
|
13
13
|
field: FormFieldRegisterer<FormState>;
|
|
14
14
|
update: (_: FormState) => void;
|
|
15
15
|
reset: () => void;
|
|
16
|
-
onSubmit?: (ev: PreventableEvent) =>
|
|
16
|
+
onSubmit?: (ev: PreventableEvent) => FormState;
|
|
17
17
|
}
|
|
18
18
|
export declare const useForm: <FormState extends Record<string, any>>(initialState: FormState, { resetOnSubmit, onSubmit, normalize, }?: {
|
|
19
19
|
resetOnSubmit?: boolean | undefined;
|
|
@@ -42,6 +42,7 @@ export const useForm = (initialState, { resetOnSubmit, onSubmit, normalize, } =
|
|
|
42
42
|
ev.preventDefault();
|
|
43
43
|
resetOnSubmit ? reset() : setDirtyForm(true);
|
|
44
44
|
onSubmit && onSubmit(formState, ev);
|
|
45
|
+
return formState;
|
|
45
46
|
}, [onSubmit, formState]);
|
|
46
47
|
return [
|
|
47
48
|
formState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForm.js","sourceRoot":"","sources":["../../src/hooks/useForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAG/E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAwBhD,kDAAkD;AAClD,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,YAAuB,EACvB,EACE,aAAa,EACb,QAAQ,EACR,SAAS,MAKP,EAAE,EACqC,EAAE;IAC7C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAY,YAAY,CAAC,CAAC;IAC1E,MAAM,YAAY,GAAG,WAAW,CAC9B,SAAS;QACP,CAAC,CAAC,CAAC,CAA+C,EAAE,EAAE,CAClD,kBAAkB,CAChB,CAAC,YAAY,QAAQ;YACnB,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE;gBACP,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBAEtC,OAAO,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;YAC9D,CAAC;YACH,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CACjB;QACL,CAAC,CAAC,kBAAkB,EACtB,CAAC,SAAS,CAAC,CACZ,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,IAA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'./doRequest';
|
|
2
|
+
|
|
3
|
+
export enum STATUS_TYPE {
|
|
4
|
+
process = 'IN_PROCESS',
|
|
5
|
+
ok = 'OK',
|
|
6
|
+
fail = 'FAILED',
|
|
7
|
+
rework = 'REWORK',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface GetTaskStatusResponse {
|
|
11
|
+
statusCd: STATUS_TYPE;
|
|
12
|
+
taskId: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getTaskStatus = (body: { taskId: number }) =>
|
|
16
|
+
doRequest<GetTaskStatusResponse>('/user-data/getTaskStatus', 'POST', body);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { doRequest } from './doRequest';
|
|
2
|
+
|
|
3
|
+
export type SignalType =
|
|
4
|
+
| 'CREATE_APPLICATION_SHORT_SIGNAL'
|
|
5
|
+
| 'CREATE_APPLICATION_LOAN_V3_SIGNAL'
|
|
6
|
+
| 'KILL_DRAFT_PROCESS_SIGNAL';
|
|
7
|
+
|
|
8
|
+
interface SendSignalToProcess {
|
|
9
|
+
signalType: SignalType;
|
|
10
|
+
taskId: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface SendSignalToProcessResponse {
|
|
14
|
+
statusCd: string;
|
|
15
|
+
taskId: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const sendSignalToProcess = (body: SendSignalToProcess) =>
|
|
19
|
+
doRequest<SendSignalToProcessResponse>('/public-data/sendSignalToProcess', 'POST', body);
|
|
@@ -14,7 +14,7 @@ export type UpdateProfileEsiaResponse = {
|
|
|
14
14
|
surname: string;
|
|
15
15
|
name: string;
|
|
16
16
|
midname: string;
|
|
17
|
-
birthDate:
|
|
17
|
+
birthDate: Date;
|
|
18
18
|
phone: string;
|
|
19
19
|
email: string;
|
|
20
20
|
esiaAccountType: {
|
|
@@ -42,11 +42,11 @@ export type UpdateProfileEsiaResponse = {
|
|
|
42
42
|
value: string;
|
|
43
43
|
};
|
|
44
44
|
city: string;
|
|
45
|
-
locality:
|
|
45
|
+
locality: string;
|
|
46
46
|
street: string;
|
|
47
47
|
house: string;
|
|
48
|
-
building:
|
|
49
|
-
block:
|
|
48
|
+
building: string;
|
|
49
|
+
block: string;
|
|
50
50
|
apartment: string;
|
|
51
51
|
};
|
|
52
52
|
addressFact: {
|
|
@@ -58,11 +58,11 @@ export type UpdateProfileEsiaResponse = {
|
|
|
58
58
|
value: string;
|
|
59
59
|
};
|
|
60
60
|
city: string;
|
|
61
|
-
locality:
|
|
61
|
+
locality: string;
|
|
62
62
|
street: string;
|
|
63
63
|
house: string;
|
|
64
|
-
building:
|
|
65
|
-
block:
|
|
64
|
+
building: string;
|
|
65
|
+
block: string;
|
|
66
66
|
apartment: string;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
5
5
|
import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
6
|
+
import { type InputSectionsType } from '../../model/InputSectionsType';
|
|
6
7
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
7
8
|
import { type Target } from '../../model/LinkProps';
|
|
8
9
|
import { type NameFieldDef } from '../../ui-kit/FormField/NameFieldDef';
|
|
@@ -140,7 +141,8 @@ type additionalParamsType = hideProductDef | showProductDef;
|
|
|
140
141
|
*/
|
|
141
142
|
export type ApplicationFormContent = UniBlockContent &
|
|
142
143
|
TitleProps &
|
|
143
|
-
AspectsProps &
|
|
144
|
+
AspectsProps &
|
|
145
|
+
InputSectionsType & {
|
|
144
146
|
/** @title Кнопка */
|
|
145
147
|
button?: SubmitButtonProps;
|
|
146
148
|
/**
|
|
@@ -154,8 +156,6 @@ export type ApplicationFormContent = UniBlockContent &
|
|
|
154
156
|
target?: Target;
|
|
155
157
|
};
|
|
156
158
|
typeForm?: TypeFormFieldDef;
|
|
157
|
-
/** @hidden */
|
|
158
|
-
sections?: SectionsProps[];
|
|
159
159
|
endpoint?: EndpointType;
|
|
160
160
|
/** @title Дополнительные параметры формы */
|
|
161
161
|
additionalParams?: additionalParamsType;
|
|
@@ -24,7 +24,6 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
24
24
|
title,
|
|
25
25
|
programId = '',
|
|
26
26
|
nextStepLink = '/credit-lead',
|
|
27
|
-
typeForm = '',
|
|
28
27
|
sections = [],
|
|
29
28
|
button,
|
|
30
29
|
...rest
|
|
@@ -34,7 +33,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
34
33
|
|
|
35
34
|
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
36
35
|
const [leadForm, setLeadForm] = useLocalStorage<FormState>('leadForm');
|
|
37
|
-
const initialFormState = getInitialFormState(inputs, leadForm
|
|
36
|
+
const initialFormState = getInitialFormState(inputs, leadForm);
|
|
38
37
|
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
39
38
|
inputs,
|
|
40
39
|
programId,
|
|
@@ -43,7 +42,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
43
42
|
});
|
|
44
43
|
|
|
45
44
|
if (responseStatus) {
|
|
46
|
-
const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus
|
|
45
|
+
const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus });
|
|
47
46
|
responseTypeDialog.open();
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
3
|
+
import { type InputSectionsType } from '../../model/InputSectionsType';
|
|
3
4
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
4
|
-
import { type Target } from '../../model/LinkProps';
|
|
5
5
|
import { type NameFieldDef } from '../../ui-kit/FormField/NameFieldDef';
|
|
6
6
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
7
7
|
import { type FormState } from './getInitialFormState';
|
|
@@ -113,27 +113,14 @@ export type SectionsProps = TitleProps & {
|
|
|
113
113
|
* @title Форма заявки настраиваемая
|
|
114
114
|
*/
|
|
115
115
|
export type ApplicationLeadFormContent = UniBlockContent &
|
|
116
|
-
TitleProps &
|
|
116
|
+
TitleProps &
|
|
117
|
+
InputSectionsType & {
|
|
117
118
|
/** @title Кнопка */
|
|
118
119
|
button?: SubmitButtonProps;
|
|
119
|
-
/**
|
|
120
|
-
* @title Условия передачи данных
|
|
121
|
-
* @required ["text", "href"]
|
|
122
|
-
*/
|
|
123
|
-
link?: TextProps & {
|
|
124
|
-
/** @title URL (href) */
|
|
125
|
-
href?: string;
|
|
126
|
-
/** @default "" */
|
|
127
|
-
target?: Target;
|
|
128
|
-
};
|
|
129
120
|
/** @title Номер кредитной программы */
|
|
130
121
|
programId?: string;
|
|
131
122
|
/** @title адресс следующей страницы заявки */
|
|
132
123
|
nextStepLink?: string;
|
|
133
|
-
typeForm?: TypeFormFieldDef;
|
|
134
|
-
/** @hidden */
|
|
135
|
-
sections?: SectionsProps[];
|
|
136
|
-
endpoint?: EndpointType;
|
|
137
124
|
};
|
|
138
125
|
|
|
139
126
|
/** @hidden */
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type UpdateProfileEsiaResponse } from '../../api/RetailAPI/updateProfileEsia';
|
|
2
|
+
import { normalizePhone } from '../../ui-kit/PhoneInput/normalizePhone';
|
|
3
|
+
import { type Address, type FormState } from './getInitialFormState';
|
|
4
|
+
|
|
5
|
+
export const parseEsiaProfile = (esiaProfile: UpdateProfileEsiaResponse): FormState => {
|
|
6
|
+
const { profile, addInfo, document, addressRegistration, addressFact } = esiaProfile;
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
name: profile?.name,
|
|
10
|
+
surname: profile?.surname,
|
|
11
|
+
middleName: profile?.midname,
|
|
12
|
+
birthday: profile?.birthDate,
|
|
13
|
+
phone: normalizePhone(profile?.phone),
|
|
14
|
+
email: profile?.email,
|
|
15
|
+
dulIssueDateField: document?.dulIssueDate,
|
|
16
|
+
dulIssuedBy: document?.dulIssuedBy,
|
|
17
|
+
dulNumber: document?.dulNumber,
|
|
18
|
+
dulSerie: document?.dulSerie,
|
|
19
|
+
dulSubdivisionCode: document?.dulSubdivisionCode,
|
|
20
|
+
snils: addInfo?.snils,
|
|
21
|
+
birthPlace: addInfo?.birthPlace,
|
|
22
|
+
addressRegistration: buildAddress(addressRegistration),
|
|
23
|
+
addressFact: buildAddress(addressFact),
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const concatFullAddress = (address: Array<string | undefined>): string => {
|
|
28
|
+
return address.reduce((acc: string, value) => {
|
|
29
|
+
if (value) {
|
|
30
|
+
return acc ? `${acc}, ${value}` : value;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return acc;
|
|
34
|
+
}, '');
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const buildAddress = (fields: UpdateProfileEsiaResponse['addressRegistration']): Address => {
|
|
38
|
+
const {
|
|
39
|
+
postcode,
|
|
40
|
+
region,
|
|
41
|
+
regionCode,
|
|
42
|
+
locality,
|
|
43
|
+
city,
|
|
44
|
+
street,
|
|
45
|
+
house,
|
|
46
|
+
building,
|
|
47
|
+
block,
|
|
48
|
+
apartment,
|
|
49
|
+
} = fields;
|
|
50
|
+
|
|
51
|
+
const place = locality || city;
|
|
52
|
+
|
|
53
|
+
const fullAddress = concatFullAddress([
|
|
54
|
+
postcode,
|
|
55
|
+
region,
|
|
56
|
+
place,
|
|
57
|
+
street ? `ул ${street}` : undefined,
|
|
58
|
+
house ? `д ${house}` : undefined,
|
|
59
|
+
block ? `к ${block}` : undefined,
|
|
60
|
+
building ? `стр ${building}` : undefined,
|
|
61
|
+
apartment ? `кв ${apartment}` : undefined,
|
|
62
|
+
]);
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
...fields,
|
|
66
|
+
regionCode: regionCode?.key,
|
|
67
|
+
fullAddress,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -2,11 +2,13 @@ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
2
2
|
|
|
3
3
|
import { updateProfileEsia } from '../../api/RetailAPI/updateProfileEsia';
|
|
4
4
|
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
5
|
+
import { type FormState } from './getInitialFormState';
|
|
6
|
+
import { parseEsiaProfile } from './pasreEsiaProfile';
|
|
5
7
|
|
|
6
8
|
export const useInitApplicationLead = (nextStepLink: string) => {
|
|
7
9
|
const [isLoading, setIsLoading] = useState(false);
|
|
8
10
|
const [profileId] = useLocalStorage<string>('profileId');
|
|
9
|
-
const [,
|
|
11
|
+
const [leadForm, setLeadForm] = useLocalStorage<FormState>('leadForm');
|
|
10
12
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
11
13
|
const code = params.get('code');
|
|
12
14
|
const state = params.get('state');
|
|
@@ -20,7 +22,11 @@ export const useInitApplicationLead = (nextStepLink: string) => {
|
|
|
20
22
|
redirectUri: globalThis.location?.href,
|
|
21
23
|
});
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
setLeadForm({
|
|
26
|
+
...leadForm,
|
|
27
|
+
...parseEsiaProfile(data),
|
|
28
|
+
});
|
|
29
|
+
|
|
24
30
|
globalThis.location.href = nextStepLink;
|
|
25
31
|
}
|
|
26
32
|
}, []);
|
|
@@ -30,7 +36,6 @@ export const useInitApplicationLead = (nextStepLink: string) => {
|
|
|
30
36
|
setIsLoading(true);
|
|
31
37
|
updateEsiaProfile();
|
|
32
38
|
} else {
|
|
33
|
-
setEsiaData('');
|
|
34
39
|
sessionStorage.removeItem('accessToken');
|
|
35
40
|
sessionStorage.removeItem('refreshToken');
|
|
36
41
|
}
|
|
@@ -18,6 +18,7 @@ import { renderWantedSumInput } from '../../ui-kit/Calculator/renderWantedSumInp
|
|
|
18
18
|
import { setDefaultParamsCalc } from '../../ui-kit/Calculator/setDefaultParamsCalc';
|
|
19
19
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
20
20
|
import { renderButtonsSection } from '../../ui-kit/LinkButton/renderButtonsSection';
|
|
21
|
+
import { type PreventableEvent } from '../../ui-kit/PreventableEvent';
|
|
21
22
|
import { UniBlock } from '../../UniBlock/UniBlock';
|
|
22
23
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
23
24
|
import { clamp } from '../../utils/clamp';
|
|
@@ -44,7 +45,9 @@ const MAP = {
|
|
|
44
45
|
export interface CalculatorDepositProps extends CalculatorCreditContent, UniBlockProps {
|
|
45
46
|
className?: string;
|
|
46
47
|
calcSource?: CreditCalculatorData & JSONRefObject;
|
|
48
|
+
registerSubmit?: (submit: ((ev: PreventableEvent) => Record<string, any>) | undefined) => void;
|
|
47
49
|
}
|
|
50
|
+
|
|
48
51
|
export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
49
52
|
({
|
|
50
53
|
className,
|
|
@@ -54,10 +57,12 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
|
54
57
|
footnote,
|
|
55
58
|
paramsViewSettings,
|
|
56
59
|
defaultParams,
|
|
60
|
+
registerSubmit,
|
|
57
61
|
...rest
|
|
58
62
|
}) => {
|
|
59
63
|
const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
|
|
60
|
-
|
|
64
|
+
|
|
65
|
+
const [userInputParams, { field, onSubmit }] = useForm({
|
|
61
66
|
moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
|
|
62
67
|
monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
|
|
63
68
|
isAnnuity: Boolean(defaultParams?.isAnnuity),
|
|
@@ -67,6 +72,8 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
|
67
72
|
isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
|
|
68
73
|
});
|
|
69
74
|
|
|
75
|
+
registerSubmit?.(onSubmit);
|
|
76
|
+
|
|
70
77
|
const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
|
|
71
78
|
const paymentTypeElement = renderPaymentType({
|
|
72
79
|
title: 'Тип платежа',
|