@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -1068,6 +1068,7 @@
|
|
|
1068
1068
|
ev.preventDefault();
|
|
1069
1069
|
resetOnSubmit ? reset() : setDirtyForm(true);
|
|
1070
1070
|
onSubmit && onSubmit(formState, ev);
|
|
1071
|
+
return formState;
|
|
1071
1072
|
}, [onSubmit, formState]);
|
|
1072
1073
|
return [
|
|
1073
1074
|
formState,
|
|
@@ -4105,10 +4106,58 @@
|
|
|
4105
4106
|
|
|
4106
4107
|
const updateProfileEsia = (body) => doRequest('/esia/updateProfileEsia', 'POST', body);
|
|
4107
4108
|
|
|
4109
|
+
const parseEsiaProfile = (esiaProfile) => {
|
|
4110
|
+
const { profile, addInfo, document, addressRegistration, addressFact } = esiaProfile;
|
|
4111
|
+
return {
|
|
4112
|
+
name: profile?.name,
|
|
4113
|
+
surname: profile?.surname,
|
|
4114
|
+
middleName: profile?.midname,
|
|
4115
|
+
birthday: profile?.birthDate,
|
|
4116
|
+
phone: normalizePhone(profile?.phone),
|
|
4117
|
+
email: profile?.email,
|
|
4118
|
+
dulIssueDateField: document?.dulIssueDate,
|
|
4119
|
+
dulIssuedBy: document?.dulIssuedBy,
|
|
4120
|
+
dulNumber: document?.dulNumber,
|
|
4121
|
+
dulSerie: document?.dulSerie,
|
|
4122
|
+
dulSubdivisionCode: document?.dulSubdivisionCode,
|
|
4123
|
+
snils: addInfo?.snils,
|
|
4124
|
+
birthPlace: addInfo?.birthPlace,
|
|
4125
|
+
addressRegistration: buildAddress(addressRegistration),
|
|
4126
|
+
addressFact: buildAddress(addressFact),
|
|
4127
|
+
};
|
|
4128
|
+
};
|
|
4129
|
+
const concatFullAddress = (address) => {
|
|
4130
|
+
return address.reduce((acc, value) => {
|
|
4131
|
+
if (value) {
|
|
4132
|
+
return acc ? `${acc}, ${value}` : value;
|
|
4133
|
+
}
|
|
4134
|
+
return acc;
|
|
4135
|
+
}, '');
|
|
4136
|
+
};
|
|
4137
|
+
const buildAddress = (fields) => {
|
|
4138
|
+
const { postcode, region, regionCode, locality, city, street, house, building, block, apartment, } = fields;
|
|
4139
|
+
const place = locality || city;
|
|
4140
|
+
const fullAddress = concatFullAddress([
|
|
4141
|
+
postcode,
|
|
4142
|
+
region,
|
|
4143
|
+
place,
|
|
4144
|
+
street ? `ул ${street}` : undefined,
|
|
4145
|
+
house ? `д ${house}` : undefined,
|
|
4146
|
+
block ? `к ${block}` : undefined,
|
|
4147
|
+
building ? `стр ${building}` : undefined,
|
|
4148
|
+
apartment ? `кв ${apartment}` : undefined,
|
|
4149
|
+
]);
|
|
4150
|
+
return {
|
|
4151
|
+
...fields,
|
|
4152
|
+
regionCode: regionCode?.key,
|
|
4153
|
+
fullAddress,
|
|
4154
|
+
};
|
|
4155
|
+
};
|
|
4156
|
+
|
|
4108
4157
|
const useInitApplicationLead = (nextStepLink) => {
|
|
4109
4158
|
const [isLoading, setIsLoading] = useState(false);
|
|
4110
4159
|
const [profileId] = useLocalStorage('profileId');
|
|
4111
|
-
const [,
|
|
4160
|
+
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
4112
4161
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
4113
4162
|
const code = params.get('code');
|
|
4114
4163
|
const state = params.get('state');
|
|
@@ -4120,7 +4169,10 @@
|
|
|
4120
4169
|
state,
|
|
4121
4170
|
redirectUri: globalThis.location?.href,
|
|
4122
4171
|
});
|
|
4123
|
-
|
|
4172
|
+
setLeadForm({
|
|
4173
|
+
...leadForm,
|
|
4174
|
+
...parseEsiaProfile(data),
|
|
4175
|
+
});
|
|
4124
4176
|
globalThis.location.href = nextStepLink;
|
|
4125
4177
|
}
|
|
4126
4178
|
}, []);
|
|
@@ -4130,7 +4182,6 @@
|
|
|
4130
4182
|
updateEsiaProfile();
|
|
4131
4183
|
}
|
|
4132
4184
|
else {
|
|
4133
|
-
setEsiaData('');
|
|
4134
4185
|
sessionStorage.removeItem('accessToken');
|
|
4135
4186
|
sessionStorage.removeItem('refreshToken');
|
|
4136
4187
|
}
|
|
@@ -4140,12 +4191,12 @@
|
|
|
4140
4191
|
};
|
|
4141
4192
|
};
|
|
4142
4193
|
|
|
4143
|
-
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead',
|
|
4194
|
+
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', sections = [], button, ...rest }) => {
|
|
4144
4195
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
4145
4196
|
const [responseType, setResponseType] = useState('');
|
|
4146
4197
|
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
4147
4198
|
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
4148
|
-
const initialFormState = getInitialFormState$1(inputs, leadForm
|
|
4199
|
+
const initialFormState = getInitialFormState$1(inputs, leadForm);
|
|
4149
4200
|
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
4150
4201
|
inputs,
|
|
4151
4202
|
programId,
|
|
@@ -4153,7 +4204,7 @@
|
|
|
4153
4204
|
saveForm: setLeadForm,
|
|
4154
4205
|
});
|
|
4155
4206
|
if (responseStatus) {
|
|
4156
|
-
const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus
|
|
4207
|
+
const responseTypeDialog = useResponseTypeDialog({ responseType: responseStatus });
|
|
4157
4208
|
responseTypeDialog.open();
|
|
4158
4209
|
}
|
|
4159
4210
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
@@ -4176,17 +4227,17 @@
|
|
|
4176
4227
|
} }), jsx("div", { className: "z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m", children: jsx(Timer, { interval: interval, time: time, setTime: setTime }) })] }), __html ? jsx(RichText, { __html: __html }) : null] })] }));
|
|
4177
4228
|
});
|
|
4178
4229
|
|
|
4179
|
-
const ApplicationStatus = JSX(({ title, description: dsc, infoCard, sectionInfoTitle, sectionInfo, sectionAdditionalTitle, sectionInfoAdditional, buttonText, interval, ...props }) => (jsxs(BlockWrapper, { ...props, children: [jsxs("div", { className: "flex flex-col md:flex-row items-center", children: [jsx(Headline, { headlineVersion: "M", title: title, description: dsc, align: "text-left", padding: "p-xl", className: "w-full" }), interval ? jsx(TimerCircle, { interval: interval }) : null] }), jsx(SectionInfo, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
|
|
4230
|
+
const ApplicationStatus = JSX(({ title, description: dsc, infoCard, sectionInfoTitle, sectionInfo, sectionAdditionalTitle, sectionInfoAdditional, buttonText, interval, ...props }) => (jsxs(BlockWrapper, { ...props, children: [jsxs("div", { className: "flex flex-col md:flex-row items-center", children: [jsx(Headline, { headlineVersion: "M", title: title, description: dsc, align: "text-left", padding: "p-xl", className: "w-full" }), interval ? jsx(TimerCircle, { interval: interval }) : null] }), jsx(SectionInfo$1, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo$1, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
|
|
4180
4231
|
text: infoCard?.link?.text,
|
|
4181
4232
|
} })) : null, buttonText ? jsx(Button, { className: "w-full mt-lg", children: buttonText }) : null] })));
|
|
4182
|
-
const SectionInfo = ({ title, items, countColumns = false, }) => {
|
|
4233
|
+
const SectionInfo$1 = ({ title, items, countColumns = false, }) => {
|
|
4183
4234
|
const isMobile = useMobileMode();
|
|
4184
4235
|
if (!items) {
|
|
4185
4236
|
return null;
|
|
4186
4237
|
}
|
|
4187
|
-
return (jsxs("div", { children: [jsx("hr", { className: "w-full h-px bg-main-gray border-0" }), jsxs("div", { className: "p-xl", children: [title ? (jsx(Text, { color: "text-primary-text", size: "text-h5", children: jsx("div", { className: style({ 'mb-m': Boolean(title) }), children: title }) })) : null, items ? (jsx("div", { className: style('grid grid-cols-1 gap-m', inputColumnStyles(countColumns || isMobile ? 1 : 2)), children: items.map((item, index) => (jsx("div", { children: renderItem(item) }, index))) })) : null] })] }));
|
|
4238
|
+
return (jsxs("div", { children: [jsx("hr", { className: "w-full h-px bg-main-gray border-0" }), jsxs("div", { className: "p-xl", children: [title ? (jsx(Text, { color: "text-primary-text", size: "text-h5", children: jsx("div", { className: style({ 'mb-m': Boolean(title) }), children: title }) })) : null, items ? (jsx("div", { className: style('grid grid-cols-1 gap-m', inputColumnStyles(countColumns || isMobile ? 1 : 2)), children: items.map((item, index) => (jsx("div", { children: renderItem$1(item) }, index))) })) : null] })] }));
|
|
4188
4239
|
};
|
|
4189
|
-
const renderItem = ({ label, description }) => (jsxs("div", { className: "flex flex-col", children: [jsx(Text, { color: "text-secondary-text", size: "text-l", children: label }), jsx(Text, { color: "text-primary-text", size: "text-xl", children: description })] }));
|
|
4240
|
+
const renderItem$1 = ({ label, description }) => (jsxs("div", { className: "flex flex-col", children: [jsx(Text, { color: "text-secondary-text", size: "text-l", children: label }), jsx(Text, { color: "text-primary-text", size: "text-xl", children: description })] }));
|
|
4190
4241
|
|
|
4191
4242
|
const NotFound = JSX(({ title, description }) => {
|
|
4192
4243
|
const isMobileMode = useMobileMode();
|
|
@@ -5093,9 +5144,9 @@
|
|
|
5093
5144
|
isInsurance: 'isInsurance',
|
|
5094
5145
|
moneyValue: 'maxSum',
|
|
5095
5146
|
};
|
|
5096
|
-
const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, ...rest }) => {
|
|
5147
|
+
const CalculatorCredit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, registerSubmit, ...rest }) => {
|
|
5097
5148
|
const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
|
|
5098
|
-
const [userInputParams, { field }] = useForm({
|
|
5149
|
+
const [userInputParams, { field, onSubmit }] = useForm({
|
|
5099
5150
|
moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
|
|
5100
5151
|
monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
|
|
5101
5152
|
isAnnuity: Boolean(defaultParams?.isAnnuity),
|
|
@@ -5104,6 +5155,7 @@
|
|
|
5104
5155
|
isPensionClient: Boolean(defaultParams?.isEnablePensionClient),
|
|
5105
5156
|
isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
|
|
5106
5157
|
});
|
|
5158
|
+
registerSubmit?.(onSubmit);
|
|
5107
5159
|
const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
|
|
5108
5160
|
const paymentTypeElement = renderPaymentType({
|
|
5109
5161
|
title: 'Тип платежа',
|
|
@@ -5815,13 +5867,149 @@
|
|
|
5815
5867
|
|
|
5816
5868
|
const ProgressBar = JSX(({ step = 10, description, showPercentage = true }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? jsxs("div", { className: "absolute left-2/4 text-green", children: [step, "%"] }) : null, description ? jsx("div", { className: "text-right mr-4 text-gray", children: description }) : null] })] })));
|
|
5817
5869
|
|
|
5818
|
-
const CreditFormProgress = JSX(({ step =
|
|
5819
|
-
const progress = useMemo(() => (
|
|
5820
|
-
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold", children: ["\u0428\u0430\u0433 ", step
|
|
5870
|
+
const CreditFormProgress = JSX(({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
|
|
5871
|
+
const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
|
|
5872
|
+
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold mr-s", children: ["\u0428\u0430\u0433 ", step, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
|
|
5873
|
+
});
|
|
5874
|
+
|
|
5875
|
+
var STATUS_TYPE;
|
|
5876
|
+
(function (STATUS_TYPE) {
|
|
5877
|
+
STATUS_TYPE["process"] = "IN_PROCESS";
|
|
5878
|
+
STATUS_TYPE["ok"] = "OK";
|
|
5879
|
+
STATUS_TYPE["fail"] = "FAILED";
|
|
5880
|
+
STATUS_TYPE["rework"] = "REWORK";
|
|
5881
|
+
})(STATUS_TYPE || (STATUS_TYPE = {}));
|
|
5882
|
+
const getTaskStatus = (body) => doRequest('/user-data/getTaskStatus', 'POST', body);
|
|
5883
|
+
|
|
5884
|
+
const sendSignalToProcess = (body) => doRequest('/public-data/sendSignalToProcess', 'POST', body);
|
|
5885
|
+
|
|
5886
|
+
const CreditFormStatus = JSX(({ title, description: dsc, infoCard, sectionInfoTitle, sectionInfo, sectionAdditionalTitle, sectionInfoAdditional, buttonText, interval, ...props }) => (jsxs(BlockWrapper, { ...props, children: [jsxs("div", { className: "flex flex-col md:flex-row items-center", children: [jsx(Headline, { headlineVersion: "M", title: title, description: dsc, align: "text-left", padding: "p-xl", className: "w-full" }), interval ? jsx(TimerCircle, { interval: interval }) : null] }), jsx(SectionInfo, { title: sectionInfoTitle, items: sectionInfo }), jsx(SectionInfo, { title: sectionAdditionalTitle, items: sectionInfoAdditional, countColumns: true }), infoCard?.__html ? (jsx(InfoCard, { __html: infoCard?.__html, icon: infoCard?.icon, link: {
|
|
5887
|
+
text: infoCard?.link?.text,
|
|
5888
|
+
} })) : null, buttonText ? (jsx(LinkButton, { href: "/natural", text: buttonText, version: "primary", className: "w-full mt-lg" })) : null] })));
|
|
5889
|
+
const SectionInfo = ({ title, items, countColumns = false, }) => {
|
|
5890
|
+
const isMobile = useMobileMode();
|
|
5891
|
+
if (!items) {
|
|
5892
|
+
return null;
|
|
5893
|
+
}
|
|
5894
|
+
return (jsxs("div", { children: [jsx("hr", { className: "w-full h-px bg-main-gray border-0" }), jsxs("div", { className: "p-xl", children: [title ? (jsx(Text, { color: "text-primary-text", size: "text-h5", children: jsx("div", { className: style({ 'mb-m': Boolean(title) }), children: title }) })) : null, items ? (jsx("div", { className: style('grid grid-cols-1 gap-m', inputColumnStyles(countColumns || isMobile ? 1 : 2)), children: items.map((item, index) => (jsx("div", { children: renderItem(item) }, index))) })) : null] })] }));
|
|
5895
|
+
};
|
|
5896
|
+
const renderItem = ({ label, description }) => (jsxs("div", { className: "flex flex-col", children: [jsx(Text, { color: "text-secondary-text", size: "text-l", children: label }), jsx(Text, { color: "text-primary-text", size: "text-xl", children: description })] }));
|
|
5897
|
+
|
|
5898
|
+
const FailedStatusContent = JSX(() => (jsx(CreditFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0412\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", description: "\u0412 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u043C\u043E\u043C\u0435\u043D\u0442 \u0411\u0430\u043D\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C \u0412\u0430\u0448\u0443 \u0437\u0430\u044F\u0432\u043A\u0443 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442.\n \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0434\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u043F\u043E\u0437\u0436\u0435. \u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u0432 \u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB.", buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })));
|
|
5899
|
+
|
|
5900
|
+
const PendingStatusContent = JSX(() => {
|
|
5901
|
+
const [leadForm] = useLocalStorage('leadForm');
|
|
5902
|
+
return (jsx(CreditFormStatus, { interval: 300, title: "\u0417\u0430\u044F\u0432\u043A\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430", description: "\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u043E\u043A\u043D\u043E, \u0441\u043A\u043E\u0440\u043E \u0441\u043E\u043E\u0431\u0449\u0438\u043C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442", sectionInfoTitle: "\u0417\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u0443", sectionInfo: [
|
|
5903
|
+
{
|
|
5904
|
+
label: 'Название продукта',
|
|
5905
|
+
description: 'Кредит на любые цели',
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
label: 'Цель кредита',
|
|
5909
|
+
description: 'На любые цели',
|
|
5910
|
+
},
|
|
5911
|
+
{
|
|
5912
|
+
label: 'Сумма',
|
|
5913
|
+
description: leadForm?.moneyValue?.toLocaleString() + ' ₽',
|
|
5914
|
+
},
|
|
5915
|
+
{
|
|
5916
|
+
label: 'Срок кредита',
|
|
5917
|
+
description: leadForm?.monthsValue + ' мес',
|
|
5918
|
+
},
|
|
5919
|
+
{
|
|
5920
|
+
label: 'Тип платежа',
|
|
5921
|
+
description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
|
|
5922
|
+
},
|
|
5923
|
+
] }));
|
|
5924
|
+
});
|
|
5925
|
+
|
|
5926
|
+
const ReworkStatusContent = JSX(() => {
|
|
5927
|
+
const [leadForm] = useLocalStorage('leadForm');
|
|
5928
|
+
return (jsx(CreditFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0432\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435, \u043D\u043E \u043D\u0430\u043C \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0434\u043B\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u044F \u0440\u0435\u0448\u0435\u043D\u0438\u044F", description: "\u041F\u043E\u0441\u0435\u0442\u0438\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430 \u0441 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u043C\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0438 \u0442\u0430\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u0430.", sectionAdditionalTitle: "\u0412 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0438 \u0411\u0430\u043D\u043A\u0430", sectionInfoAdditional: [
|
|
5929
|
+
{
|
|
5930
|
+
label: 'Регион',
|
|
5931
|
+
description: leadForm?.regionRetail?.text,
|
|
5932
|
+
},
|
|
5933
|
+
{
|
|
5934
|
+
label: 'Адрес',
|
|
5935
|
+
description: leadForm?.addressRetail?.text,
|
|
5936
|
+
},
|
|
5937
|
+
], sectionInfo: [
|
|
5938
|
+
{
|
|
5939
|
+
label: 'Основные документы:',
|
|
5940
|
+
description: '- Паспорт РФ',
|
|
5941
|
+
},
|
|
5942
|
+
], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
|
|
5943
|
+
});
|
|
5944
|
+
|
|
5945
|
+
const SuccessStatusContent = JSX(() => {
|
|
5946
|
+
const [leadForm] = useLocalStorage('leadForm');
|
|
5947
|
+
return (jsx(CreditFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo: [
|
|
5948
|
+
{
|
|
5949
|
+
label: 'Название продукта',
|
|
5950
|
+
description: 'Кредит на любые цели',
|
|
5951
|
+
},
|
|
5952
|
+
{
|
|
5953
|
+
label: 'Ставка',
|
|
5954
|
+
description: '14,5%',
|
|
5955
|
+
},
|
|
5956
|
+
{
|
|
5957
|
+
label: 'Ежемесячный платеж',
|
|
5958
|
+
description: '86 052 ₽',
|
|
5959
|
+
},
|
|
5960
|
+
{
|
|
5961
|
+
label: 'Срок кредита',
|
|
5962
|
+
description: leadForm?.monthsValue + ' мес',
|
|
5963
|
+
},
|
|
5964
|
+
{
|
|
5965
|
+
label: 'Тип платежа',
|
|
5966
|
+
description: leadForm?.isAnnuity ? 'Аннуитетный' : 'Дифференцированный',
|
|
5967
|
+
},
|
|
5968
|
+
], buttonText: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" }));
|
|
5821
5969
|
});
|
|
5822
5970
|
|
|
5971
|
+
const TASK_ID = 2816419;
|
|
5972
|
+
const SIGNAL_TYPES = [
|
|
5973
|
+
'CREATE_APPLICATION_SHORT_SIGNAL',
|
|
5974
|
+
'CREATE_APPLICATION_LOAN_V3_SIGNAL',
|
|
5975
|
+
];
|
|
5976
|
+
const CreditFormStatusTracker = JSX(() => {
|
|
5977
|
+
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
5978
|
+
useEffect(() => {
|
|
5979
|
+
for (const signalType of SIGNAL_TYPES) {
|
|
5980
|
+
sendSignalToProcess({ signalType, taskId: TASK_ID });
|
|
5981
|
+
}
|
|
5982
|
+
const trackStatus = () => getTaskStatus({ taskId: TASK_ID }).then((res) => {
|
|
5983
|
+
if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
|
|
5984
|
+
clearInterval(pullingInterval);
|
|
5985
|
+
setStatus(res.statusCd);
|
|
5986
|
+
}
|
|
5987
|
+
});
|
|
5988
|
+
const pullingInterval = setInterval(trackStatus, 30000);
|
|
5989
|
+
}, []);
|
|
5990
|
+
return renderStatus(status);
|
|
5991
|
+
});
|
|
5992
|
+
const renderStatus = (status) => {
|
|
5993
|
+
const statusesMap = {
|
|
5994
|
+
IN_PROCESS: jsx(PendingStatusContent, {}),
|
|
5995
|
+
FAILED: jsx(FailedStatusContent, {}),
|
|
5996
|
+
OK: jsx(SuccessStatusContent, {}),
|
|
5997
|
+
REWORK: jsx(ReworkStatusContent, {}),
|
|
5998
|
+
};
|
|
5999
|
+
return statusesMap[status] || null;
|
|
6000
|
+
};
|
|
6001
|
+
|
|
5823
6002
|
const formStateMap = {
|
|
5824
6003
|
0: {
|
|
6004
|
+
moneyValue: 0,
|
|
6005
|
+
monthsValue: 0,
|
|
6006
|
+
isAnnuity: false,
|
|
6007
|
+
isInsurance: false,
|
|
6008
|
+
isSalaryClient: false,
|
|
6009
|
+
isPensionClient: false,
|
|
6010
|
+
isStateEmployee: false,
|
|
6011
|
+
},
|
|
6012
|
+
1: {
|
|
5825
6013
|
surname: '',
|
|
5826
6014
|
name: '',
|
|
5827
6015
|
middleName: '',
|
|
@@ -5839,7 +6027,6 @@
|
|
|
5839
6027
|
fullAddress: '',
|
|
5840
6028
|
fiasCode: '',
|
|
5841
6029
|
},
|
|
5842
|
-
addressMatch: false,
|
|
5843
6030
|
participantDateRegistration: undefined,
|
|
5844
6031
|
addressFact: {
|
|
5845
6032
|
fullAddress: '',
|
|
@@ -5847,7 +6034,7 @@
|
|
|
5847
6034
|
},
|
|
5848
6035
|
housing: '',
|
|
5849
6036
|
},
|
|
5850
|
-
|
|
6037
|
+
2: {
|
|
5851
6038
|
amountWorkers: { key: '', text: '' },
|
|
5852
6039
|
beginDate: undefined,
|
|
5853
6040
|
employerActivities: { key: '', text: '' },
|
|
@@ -5868,7 +6055,7 @@
|
|
|
5868
6055
|
partInBusiness: undefined,
|
|
5869
6056
|
positionOrganization: { key: '', text: '' },
|
|
5870
6057
|
},
|
|
5871
|
-
|
|
6058
|
+
3: {
|
|
5872
6059
|
familyStatus: { key: '', text: '' },
|
|
5873
6060
|
dependents: undefined,
|
|
5874
6061
|
familyMembers: undefined,
|
|
@@ -5877,19 +6064,20 @@
|
|
|
5877
6064
|
snils: '',
|
|
5878
6065
|
armyIdFlg: false,
|
|
5879
6066
|
},
|
|
5880
|
-
|
|
6067
|
+
4: {
|
|
5881
6068
|
disablePeopleFlg: false,
|
|
5882
6069
|
bankruptcyFlg: false,
|
|
5883
6070
|
shareholderFlg: false,
|
|
5884
6071
|
legalEntityName: '',
|
|
5885
6072
|
creditInRshbCd: undefined,
|
|
5886
6073
|
},
|
|
5887
|
-
|
|
6074
|
+
5: {
|
|
5888
6075
|
regionRetail: '',
|
|
5889
6076
|
addressRetail: '',
|
|
5890
6077
|
bankEmployeeCode: '',
|
|
5891
6078
|
},
|
|
5892
6079
|
};
|
|
6080
|
+
|
|
5893
6081
|
const getInitialFormState = (step, localStorageData) => {
|
|
5894
6082
|
if (localStorageData) {
|
|
5895
6083
|
// TODO: Fill in for other fields with type Date
|
|
@@ -5904,10 +6092,17 @@
|
|
|
5904
6092
|
};
|
|
5905
6093
|
};
|
|
5906
6094
|
|
|
5907
|
-
const
|
|
5908
|
-
|
|
6095
|
+
const renderInfo$1 = (inputs = []) => {
|
|
6096
|
+
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
6097
|
+
return infoInputs.length
|
|
6098
|
+
? infoInputs.map(({ text, name }, i) => jsx(InfoCard, { __html: text }, `${name}_${i}`))
|
|
6099
|
+
: null;
|
|
5909
6100
|
};
|
|
5910
6101
|
|
|
6102
|
+
const renderInputs = ({ field, inputs }) => (inputs || [])?.map(getField(field, ''));
|
|
6103
|
+
|
|
6104
|
+
const renderStep$1 = ({ sections, field }) => sections?.map(({ inputs, columns, title }, i) => (jsxs("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: [renderInfo$1(inputs), renderTitle(title), renderInputs({ field, inputs })] }, `section-${i}`)));
|
|
6105
|
+
|
|
5911
6106
|
const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
|
|
5912
6107
|
const isFirstStep = step === 0;
|
|
5913
6108
|
return (jsxs("div", { className: 'flex justify-between', children: [jsx(Button, { onClick: onPrevStep, className: style('w-full @xl:w-auto'), type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { className: style('w-full @xl:w-auto'), type: "submit", children: "\u0414\u0430\u043B\u0435\u0435" })] }));
|
|
@@ -6030,7 +6225,7 @@
|
|
|
6030
6225
|
}
|
|
6031
6226
|
};
|
|
6032
6227
|
|
|
6033
|
-
const
|
|
6228
|
+
const useCreditFormAPI = ({ step, inputs, onNextStep, saveStep, finishForm, }) => {
|
|
6034
6229
|
const [taskId] = useLocalStorage('taskId');
|
|
6035
6230
|
const [profileId] = useLocalStorage('profileId');
|
|
6036
6231
|
const [participantId] = useLocalStorage('participantId');
|
|
@@ -6055,6 +6250,9 @@
|
|
|
6055
6250
|
return 'Fail';
|
|
6056
6251
|
}
|
|
6057
6252
|
onNextStep();
|
|
6253
|
+
if (step === 5) {
|
|
6254
|
+
finishForm?.(true);
|
|
6255
|
+
}
|
|
6058
6256
|
return 'OK';
|
|
6059
6257
|
}, []);
|
|
6060
6258
|
return {
|
|
@@ -6062,29 +6260,34 @@
|
|
|
6062
6260
|
};
|
|
6063
6261
|
};
|
|
6064
6262
|
|
|
6065
|
-
const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs }) => {
|
|
6263
|
+
const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs, renderStep = renderStep$1, isFormFinished, finishForm, }) => {
|
|
6066
6264
|
const [localStorageData, saveStep] = useLocalStorage('leadForm');
|
|
6067
6265
|
const initialState = getInitialFormState(step, localStorageData);
|
|
6068
|
-
const
|
|
6069
|
-
|
|
6266
|
+
const customSubmit = useRef(undefined);
|
|
6267
|
+
const registerSubmit = useCallback((submit) => {
|
|
6268
|
+
customSubmit.current = submit;
|
|
6269
|
+
}, []);
|
|
6270
|
+
const { handleSubmit } = useCreditFormAPI({
|
|
6070
6271
|
step,
|
|
6071
|
-
|
|
6272
|
+
inputs,
|
|
6273
|
+
onNextStep,
|
|
6072
6274
|
saveStep,
|
|
6275
|
+
finishForm,
|
|
6073
6276
|
});
|
|
6074
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
6075
|
-
|
|
6277
|
+
const [, { field, onSubmit }] = useForm(initialState, {
|
|
6278
|
+
onSubmit: (formData, ev) => {
|
|
6279
|
+
handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
|
|
6280
|
+
},
|
|
6281
|
+
});
|
|
6282
|
+
return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep({ sections, field, registerSubmit }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
6076
6283
|
});
|
|
6077
|
-
const renderStep$1 = ({ sections, field }) => {
|
|
6078
|
-
return sections?.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderInfo$1(_?.inputs), renderTitle(_?.title), renderInputs({ field, inputs: _?.inputs })] }, `section-${i}`)));
|
|
6079
|
-
};
|
|
6080
|
-
const renderInfo$1 = (inputs = []) => {
|
|
6081
|
-
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
6082
|
-
return infoInputs.length ? infoInputs.map(({ text }) => jsx(InfoCard, { __html: text })) : null;
|
|
6083
|
-
};
|
|
6084
6284
|
|
|
6085
6285
|
/* eslint-disable max-lines */
|
|
6086
6286
|
/* eslint-disable max-len */
|
|
6087
6287
|
const stepsSectionsMap = [
|
|
6288
|
+
[
|
|
6289
|
+
// zero step for calculator
|
|
6290
|
+
],
|
|
6088
6291
|
[
|
|
6089
6292
|
{
|
|
6090
6293
|
title: 'Персональные данные',
|
|
@@ -6315,8 +6518,8 @@
|
|
|
6315
6518
|
],
|
|
6316
6519
|
];
|
|
6317
6520
|
|
|
6318
|
-
const
|
|
6319
|
-
const
|
|
6521
|
+
const WIZARD_STEPS = 5;
|
|
6522
|
+
const WIZARD_TITLES = [
|
|
6320
6523
|
'Персональные данные',
|
|
6321
6524
|
'Данные о трудоустройстве',
|
|
6322
6525
|
'Данные о доходах и расходах',
|
|
@@ -6325,16 +6528,26 @@
|
|
|
6325
6528
|
];
|
|
6326
6529
|
const CreditForm = JSX(({ className, ...rest }) => {
|
|
6327
6530
|
const [step, setStep] = useState(0);
|
|
6328
|
-
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
6329
|
-
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
6330
6531
|
const handleNextStep = useCallback(() => {
|
|
6331
|
-
setStep((_) => Math.min(_ + 1,
|
|
6532
|
+
setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
|
|
6332
6533
|
}, []);
|
|
6333
6534
|
const handlePrevStep = useCallback(() => {
|
|
6334
6535
|
//TODO search hook - 1,
|
|
6335
6536
|
setStep((_) => Math.max(_ - 1, 0));
|
|
6336
6537
|
}, []);
|
|
6337
|
-
|
|
6538
|
+
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
6539
|
+
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
6540
|
+
const isStartStep = step === 0;
|
|
6541
|
+
const [isFormFinished, setIsFormFinished] = useState(false);
|
|
6542
|
+
return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [isStartStep || isFormFinished ? null : (jsx(CreditFormProgress, { stepsTitles: WIZARD_TITLES, step: step, totalSteps: WIZARD_STEPS })), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { step: step, inputs: inputs, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep, isFormFinished: isFormFinished, finishForm: setIsFormFinished, renderStep: isStartStep
|
|
6543
|
+
? ({ registerSubmit }) => (jsx(CalculatorCredit, { ...{
|
|
6544
|
+
title: 'Калькулятор кредита',
|
|
6545
|
+
footnote: 'Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка.',
|
|
6546
|
+
calcSource: {
|
|
6547
|
+
$ref: '/wcms-resources/credit-calculator-data.json',
|
|
6548
|
+
},
|
|
6549
|
+
}, registerSubmit: registerSubmit }))
|
|
6550
|
+
: undefined }, String(step)) })] }) }));
|
|
6338
6551
|
});
|
|
6339
6552
|
|
|
6340
6553
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
@@ -8596,7 +8809,7 @@
|
|
|
8596
8809
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
8597
8810
|
});
|
|
8598
8811
|
|
|
8599
|
-
const packageVersion = "0.14.
|
|
8812
|
+
const packageVersion = "0.14.637";
|
|
8600
8813
|
|
|
8601
8814
|
exports.Blocks = Blocks;
|
|
8602
8815
|
exports.ContentPage = ContentPage;
|