@redneckz/wildless-cms-uni-blocks 0.14.637 → 0.14.639
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +215 -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/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/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/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 +14 -74
- 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/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/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 +13 -73
- 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/bundle.umd.js +219 -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/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/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/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 +14 -74
- 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/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/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 +13 -73
- 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/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/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 +13 -143
- 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/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/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 +13 -143
- 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
|
@@ -22,7 +22,7 @@ export interface FormOperatorProps<FormState extends Record<string, any>> {
|
|
|
22
22
|
field: FormFieldRegisterer<FormState>;
|
|
23
23
|
update: (_: FormState) => void;
|
|
24
24
|
reset: () => void;
|
|
25
|
-
onSubmit?: (ev: PreventableEvent) =>
|
|
25
|
+
onSubmit?: (ev: PreventableEvent) => FormState;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -98,6 +98,8 @@ export const useForm = <FormState extends Record<string, any>>(
|
|
|
98
98
|
resetOnSubmit ? reset() : setDirtyForm(true);
|
|
99
99
|
|
|
100
100
|
onSubmit && onSubmit(formState, ev);
|
|
101
|
+
|
|
102
|
+
return formState;
|
|
101
103
|
},
|
|
102
104
|
[onSubmit, formState],
|
|
103
105
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.639",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"path": "lib/common.css"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
|
-
"limit": "
|
|
213
|
+
"limit": "86 kB",
|
|
214
214
|
"path": "bundle/bundle.umd.min.js"
|
|
215
215
|
}
|
|
216
216
|
],
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { doRequest } from './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);
|
|
@@ -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 */
|
|
@@ -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: 'Тип платежа',
|
|
@@ -7,13 +7,17 @@ import {
|
|
|
7
7
|
type FieldDef,
|
|
8
8
|
type SectionsProps,
|
|
9
9
|
} from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
10
|
+
import { CalculatorCredit } from '../CalculatorCredit/CalculatorCredit';
|
|
10
11
|
import { type CreditFormContent } from './CreditFormContent';
|
|
11
12
|
import { CreditFormProgress } from './CreditFormProgress';
|
|
12
13
|
import { CreditFormStep } from './CreditFormStep';
|
|
13
14
|
import { stepsSectionsMap } from './creditFormStepsData';
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
interface CreditFormWizardProps extends CreditFormContent, UniBlockProps {}
|
|
17
|
+
|
|
18
|
+
const WIZARD_STEPS = 5;
|
|
19
|
+
|
|
20
|
+
const WIZARD_TITLES = [
|
|
17
21
|
'Персональные данные',
|
|
18
22
|
'Данные о трудоустройстве',
|
|
19
23
|
'Данные о доходах и расходах',
|
|
@@ -21,16 +25,11 @@ const STEPS_TITLES = [
|
|
|
21
25
|
'Отделение Банка',
|
|
22
26
|
];
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export const CreditForm = JSX<CreditFormProps>(({ className, ...rest }) => {
|
|
28
|
+
export const CreditForm = JSX<CreditFormWizardProps>(({ className, ...rest }) => {
|
|
27
29
|
const [step, setStep] = useState(0);
|
|
28
|
-
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
29
|
-
|
|
30
|
-
const inputs = (sections?.flatMap((_: SectionsProps) => _?.inputs) || []) as FieldDef[];
|
|
31
30
|
|
|
32
31
|
const handleNextStep = useCallback(() => {
|
|
33
|
-
setStep((_) => Math.min(_ + 1,
|
|
32
|
+
setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
|
|
34
33
|
}, []);
|
|
35
34
|
|
|
36
35
|
const handlePrevStep = useCallback(() => {
|
|
@@ -38,18 +37,46 @@ export const CreditForm = JSX<CreditFormProps>(({ className, ...rest }) => {
|
|
|
38
37
|
setStep((_) => Math.max(_ - 1, 0));
|
|
39
38
|
}, []);
|
|
40
39
|
|
|
40
|
+
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
41
|
+
|
|
42
|
+
const inputs = (sections?.flatMap((_: SectionsProps) => _?.inputs) || []) as FieldDef[];
|
|
43
|
+
|
|
44
|
+
const isStartStep = step === 0;
|
|
45
|
+
const [isFormFinished, setIsFormFinished] = useState(false);
|
|
46
|
+
|
|
41
47
|
return (
|
|
42
48
|
<BlockWrapper className={style('bg-transparent', className)} defaultPadding="p-6xl" {...rest}>
|
|
43
49
|
<div className="container grid grid-cols-12">
|
|
44
|
-
|
|
50
|
+
{isStartStep || isFormFinished ? null : (
|
|
51
|
+
<CreditFormProgress stepsTitles={WIZARD_TITLES} step={step} totalSteps={WIZARD_STEPS} />
|
|
52
|
+
)}
|
|
45
53
|
<div className="py-lg px-5xl mt-2xs bg-white col-span-12">
|
|
46
54
|
<CreditFormStep
|
|
47
|
-
inputs={inputs}
|
|
48
55
|
key={String(step)}
|
|
49
56
|
step={step}
|
|
57
|
+
inputs={inputs}
|
|
50
58
|
sections={sections}
|
|
51
59
|
onNextStep={handleNextStep}
|
|
52
60
|
onPrevStep={handlePrevStep}
|
|
61
|
+
isFormFinished={isFormFinished}
|
|
62
|
+
finishForm={setIsFormFinished}
|
|
63
|
+
renderStep={
|
|
64
|
+
isStartStep
|
|
65
|
+
? ({ registerSubmit }) => (
|
|
66
|
+
<CalculatorCredit
|
|
67
|
+
{...{
|
|
68
|
+
title: 'Калькулятор кредита',
|
|
69
|
+
footnote:
|
|
70
|
+
'Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка.',
|
|
71
|
+
calcSource: {
|
|
72
|
+
$ref: '/wcms-resources/credit-calculator-data.json',
|
|
73
|
+
},
|
|
74
|
+
}}
|
|
75
|
+
registerSubmit={registerSubmit}
|
|
76
|
+
/>
|
|
77
|
+
)
|
|
78
|
+
: undefined
|
|
79
|
+
}
|
|
53
80
|
/>
|
|
54
81
|
</div>
|
|
55
82
|
</div>
|
|
@@ -1,46 +1,22 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
2
|
+
import { type TitleProps } from '../../model/HeadlineType';
|
|
3
|
+
import { type InputSectionsType } from '../../model/InputSectionsType';
|
|
4
4
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
type SectionsProps,
|
|
8
|
-
type SubmitButtonProps,
|
|
9
|
-
} from '../ApplicationForm/ApplicationFormContent';
|
|
10
|
-
import {
|
|
11
|
-
type FieldDef,
|
|
12
|
-
type TypeFormFieldDef,
|
|
13
|
-
} from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
14
|
-
import { type FormStateMap } from './getInitialFormState';
|
|
5
|
+
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
6
|
+
import { type FormStateMap } from './formStateMap';
|
|
15
7
|
|
|
16
8
|
/**
|
|
17
9
|
* @title Форма заявки на потребительский кредит настраиваемая
|
|
18
10
|
*/
|
|
19
11
|
export type CreditFormContent = UniBlockContent &
|
|
20
|
-
TitleProps &
|
|
21
|
-
|
|
22
|
-
button?: SubmitButtonProps;
|
|
23
|
-
/**
|
|
24
|
-
* @title Условия передачи данных
|
|
25
|
-
* @required ["text", "href"]
|
|
26
|
-
*/
|
|
27
|
-
link?: TextProps & {
|
|
28
|
-
/** @title URL (href) */
|
|
29
|
-
href?: string;
|
|
30
|
-
/** @default "" */
|
|
31
|
-
target?: Target;
|
|
32
|
-
};
|
|
12
|
+
TitleProps &
|
|
13
|
+
InputSectionsType & {
|
|
33
14
|
/** @title Номер кредитной программы */
|
|
34
15
|
programId?: string;
|
|
35
|
-
typeForm?: TypeFormFieldDef;
|
|
36
|
-
/** @hidden */
|
|
37
|
-
sections?: SectionsProps[];
|
|
38
|
-
endpoint?: EndpointType;
|
|
39
16
|
};
|
|
40
17
|
|
|
41
18
|
/** @hidden */
|
|
42
19
|
export interface RenderInputsProps {
|
|
43
20
|
inputs?: FieldDef[];
|
|
44
|
-
typeForm?: TypeFormFieldDef | string;
|
|
45
21
|
field: FormFieldRegisterer<FormStateMap[keyof FormStateMap]>;
|
|
46
22
|
}
|
|
@@ -4,19 +4,19 @@ import { ProgressBar } from '../../ui-kit/ProgressBar/ProgressBar';
|
|
|
4
4
|
|
|
5
5
|
export interface CreditFormProgressProps {
|
|
6
6
|
step: number;
|
|
7
|
-
totalSteps
|
|
7
|
+
totalSteps?: number;
|
|
8
8
|
stepsTitles?: string[];
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const CreditFormProgress = JSX<CreditFormProgressProps>(
|
|
12
|
-
({ step =
|
|
13
|
-
const progress = useMemo(() => (
|
|
12
|
+
({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
|
|
13
|
+
const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div className="py-lg px-5xl bg-white col-span-12">
|
|
17
17
|
<div>
|
|
18
|
-
<span className="font-bold">
|
|
19
|
-
Шаг {step
|
|
18
|
+
<span className="font-bold mr-s">
|
|
19
|
+
Шаг {step} из {totalSteps}.
|
|
20
20
|
</span>
|
|
21
21
|
{stepsTitles[step] || null}
|
|
22
22
|
<ProgressBar step={progress} showPercentage={false} />
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useMobileMode } from '../../hooks/useMobileMode';
|
|
3
|
+
import { type DescriptionProps, type LabelProps } from '../../model/HeadlineType';
|
|
4
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
|
+
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
6
|
+
import { InfoCard, type InfoCardProps } from '../../ui-kit/InfoCard/InfoCard';
|
|
7
|
+
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
8
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
9
|
+
import { TimerCircle } from '../../ui-kit/TimerCircle/TimerCircle';
|
|
10
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
11
|
+
import { style } from '../../utils/style';
|
|
12
|
+
import { Headline } from '../Headline/Headline';
|
|
13
|
+
|
|
14
|
+
type CreditFormStatusProps = UniBlockProps & {
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
interval?: number;
|
|
18
|
+
sectionInfoTitle?: string;
|
|
19
|
+
sectionInfo?: (LabelProps & DescriptionProps)[];
|
|
20
|
+
sectionAdditionalTitle?: string;
|
|
21
|
+
sectionInfoAdditional?: (LabelProps & DescriptionProps)[];
|
|
22
|
+
buttonText?: string;
|
|
23
|
+
infoCard?: InfoCardProps;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const CreditFormStatus = JSX<CreditFormStatusProps>(
|
|
27
|
+
({
|
|
28
|
+
title,
|
|
29
|
+
description: dsc,
|
|
30
|
+
infoCard,
|
|
31
|
+
sectionInfoTitle,
|
|
32
|
+
sectionInfo,
|
|
33
|
+
sectionAdditionalTitle,
|
|
34
|
+
sectionInfoAdditional,
|
|
35
|
+
buttonText,
|
|
36
|
+
interval,
|
|
37
|
+
...props
|
|
38
|
+
}) => (
|
|
39
|
+
<BlockWrapper {...props}>
|
|
40
|
+
<div className="flex flex-col md:flex-row items-center">
|
|
41
|
+
<Headline
|
|
42
|
+
headlineVersion="M"
|
|
43
|
+
title={title}
|
|
44
|
+
description={dsc}
|
|
45
|
+
align="text-left"
|
|
46
|
+
padding="p-xl"
|
|
47
|
+
className="w-full"
|
|
48
|
+
/>
|
|
49
|
+
{interval ? <TimerCircle interval={interval} /> : null}
|
|
50
|
+
</div>
|
|
51
|
+
<SectionInfo title={sectionInfoTitle} items={sectionInfo} />
|
|
52
|
+
<SectionInfo title={sectionAdditionalTitle} items={sectionInfoAdditional} countColumns />
|
|
53
|
+
{infoCard?.__html ? (
|
|
54
|
+
<InfoCard
|
|
55
|
+
__html={infoCard?.__html}
|
|
56
|
+
icon={infoCard?.icon}
|
|
57
|
+
link={{
|
|
58
|
+
text: infoCard?.link?.text,
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
) : null}
|
|
62
|
+
{buttonText ? (
|
|
63
|
+
<LinkButton href="/natural" text={buttonText} version="primary" className="w-full mt-lg" />
|
|
64
|
+
) : null}
|
|
65
|
+
</BlockWrapper>
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
const SectionInfo = ({
|
|
70
|
+
title,
|
|
71
|
+
items,
|
|
72
|
+
countColumns = false,
|
|
73
|
+
}: {
|
|
74
|
+
title?: string;
|
|
75
|
+
items?: (LabelProps & DescriptionProps)[];
|
|
76
|
+
countColumns?: boolean;
|
|
77
|
+
}) => {
|
|
78
|
+
const isMobile = useMobileMode();
|
|
79
|
+
|
|
80
|
+
if (!items) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div>
|
|
86
|
+
<hr className="w-full h-px bg-main-gray border-0" />
|
|
87
|
+
<div className="p-xl">
|
|
88
|
+
{title ? (
|
|
89
|
+
<Text color="text-primary-text" size="text-h5">
|
|
90
|
+
<div className={style({ 'mb-m': Boolean(title) })}>{title}</div>
|
|
91
|
+
</Text>
|
|
92
|
+
) : null}
|
|
93
|
+
{items ? (
|
|
94
|
+
<div
|
|
95
|
+
className={style(
|
|
96
|
+
'grid grid-cols-1 gap-m',
|
|
97
|
+
inputColumnStyles(countColumns || isMobile ? 1 : 2),
|
|
98
|
+
)}
|
|
99
|
+
>
|
|
100
|
+
{items.map((item, index) => (
|
|
101
|
+
<div key={index}>{renderItem(item)}</div>
|
|
102
|
+
))}
|
|
103
|
+
</div>
|
|
104
|
+
) : null}
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const renderItem = ({ label, description }: LabelProps & DescriptionProps) => (
|
|
111
|
+
<div className="flex flex-col">
|
|
112
|
+
<Text color="text-secondary-text" size="text-l">
|
|
113
|
+
{label}
|
|
114
|
+
</Text>
|
|
115
|
+
<Text color="text-primary-text" size="text-xl">
|
|
116
|
+
{description}
|
|
117
|
+
</Text>
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { getTaskStatus, STATUS_TYPE } from '../../api/RetailAPI/getTaskStatus';
|
|
4
|
+
import { sendSignalToProcess, type SignalType } from '../../api/RetailAPI/sendSignalToProcess';
|
|
5
|
+
import { FailedStatusContent } from './FailedStatusContent';
|
|
6
|
+
import { PendingStatusContent } from './PendingStatusContent';
|
|
7
|
+
import { ReworkStatusContent } from './ReworkStatusContent';
|
|
8
|
+
import { SuccessStatusContent } from './SuccessStatusContent';
|
|
9
|
+
|
|
10
|
+
const TASK_ID = 2816419;
|
|
11
|
+
const SIGNAL_TYPES: SignalType[] = [
|
|
12
|
+
'CREATE_APPLICATION_SHORT_SIGNAL',
|
|
13
|
+
'CREATE_APPLICATION_LOAN_V3_SIGNAL',
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export const CreditFormStatusTracker = JSX(() => {
|
|
17
|
+
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
for (const signalType of SIGNAL_TYPES) {
|
|
21
|
+
sendSignalToProcess({ signalType, taskId: TASK_ID });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const trackStatus = () =>
|
|
25
|
+
getTaskStatus({ taskId: TASK_ID }).then((res) => {
|
|
26
|
+
if (res.statusCd && res.statusCd !== STATUS_TYPE.process) {
|
|
27
|
+
clearInterval(pullingInterval);
|
|
28
|
+
setStatus(res.statusCd);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const pullingInterval = setInterval(trackStatus, 30000);
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
35
|
+
return renderStatus(status);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const renderStatus = (status: STATUS_TYPE) => {
|
|
39
|
+
const statusesMap: Record<STATUS_TYPE, JSX.Element> = {
|
|
40
|
+
IN_PROCESS: <PendingStatusContent />,
|
|
41
|
+
FAILED: <FailedStatusContent />,
|
|
42
|
+
OK: <SuccessStatusContent />,
|
|
43
|
+
REWORK: <ReworkStatusContent />,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return statusesMap[status] || null;
|
|
47
|
+
};
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { useForm } from '../../hooks/useForm';
|
|
3
4
|
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
4
|
-
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
5
|
-
import { renderTitle } from '../../ui-kit/FormField/renderTitle';
|
|
6
|
-
import { InfoCard } from '../../ui-kit/InfoCard/InfoCard';
|
|
7
|
-
import { style } from '../../utils/style';
|
|
8
5
|
import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
|
|
9
6
|
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { CreditFormStatusTracker } from './CreditFormStatusTracker';
|
|
8
|
+
import { type FormStateMap } from './formStateMap';
|
|
9
|
+
import { getInitialFormState } from './getInitialFormState';
|
|
10
|
+
import { renderStep as defaultRenderStep, type CustomSubmit, type StepProps } from './renderStep';
|
|
12
11
|
import { StepsNavigationButtons } from './StepsNavigationButtons';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
export interface StepProps {
|
|
16
|
-
sections?: SectionsProps[];
|
|
17
|
-
field: FormFieldRegisterer<FormStateMap[keyof FormStateMap]>;
|
|
18
|
-
}
|
|
12
|
+
import { useCreditFormAPI } from './useCreditFormAPI';
|
|
19
13
|
|
|
20
14
|
export interface CreditFormStepProps {
|
|
21
15
|
step: number;
|
|
@@ -23,43 +17,52 @@ export interface CreditFormStepProps {
|
|
|
23
17
|
inputs: FieldDef[];
|
|
24
18
|
onNextStep: () => void;
|
|
25
19
|
onPrevStep: () => void;
|
|
20
|
+
renderStep?: (props: StepProps) => JSX.Element | JSX.Element[] | undefined;
|
|
21
|
+
isFormFinished: boolean;
|
|
22
|
+
finishForm?: (bool: boolean) => void;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
export const CreditFormStep = JSX<CreditFormStepProps>(
|
|
29
|
-
({
|
|
26
|
+
({
|
|
27
|
+
step,
|
|
28
|
+
sections,
|
|
29
|
+
onPrevStep,
|
|
30
|
+
onNextStep,
|
|
31
|
+
inputs,
|
|
32
|
+
renderStep = defaultRenderStep,
|
|
33
|
+
isFormFinished,
|
|
34
|
+
finishForm,
|
|
35
|
+
}) => {
|
|
30
36
|
const [localStorageData, saveStep] = useLocalStorage<Record<string, any>>('leadForm');
|
|
31
37
|
const initialState = getInitialFormState(step as keyof FormStateMap, localStorageData);
|
|
32
38
|
|
|
33
|
-
const
|
|
34
|
-
|
|
39
|
+
const customSubmit = useRef<CustomSubmit | undefined>(undefined);
|
|
40
|
+
|
|
41
|
+
const registerSubmit = useCallback((submit?: CustomSubmit) => {
|
|
42
|
+
customSubmit.current = submit;
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
const { handleSubmit } = useCreditFormAPI({
|
|
35
46
|
step,
|
|
36
|
-
|
|
47
|
+
inputs,
|
|
48
|
+
onNextStep,
|
|
37
49
|
saveStep,
|
|
50
|
+
finishForm,
|
|
38
51
|
});
|
|
39
52
|
|
|
40
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
53
|
+
const [, { field, onSubmit }] = useForm(initialState, {
|
|
54
|
+
onSubmit: (formData, ev) => {
|
|
55
|
+
handleSubmit({ ...formData, ...customSubmit.current?.(ev) });
|
|
56
|
+
},
|
|
57
|
+
});
|
|
41
58
|
|
|
42
|
-
return (
|
|
59
|
+
return isFormFinished ? (
|
|
60
|
+
<CreditFormStatusTracker />
|
|
61
|
+
) : (
|
|
43
62
|
<form onSubmit={onSubmit} className="space-y-m">
|
|
44
|
-
{renderStep({ sections, field })}
|
|
63
|
+
{renderStep({ sections, field, registerSubmit })}
|
|
45
64
|
<StepsNavigationButtons step={step} onPrevStep={onPrevStep} />
|
|
46
65
|
</form>
|
|
47
66
|
);
|
|
48
67
|
},
|
|
49
68
|
);
|
|
50
|
-
|
|
51
|
-
const renderStep = ({ sections, field }: StepProps) => {
|
|
52
|
-
return sections?.map((_, i) => (
|
|
53
|
-
<div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}>
|
|
54
|
-
{renderInfo(_?.inputs)}
|
|
55
|
-
{renderTitle(_?.title)}
|
|
56
|
-
{renderInputs({ field, inputs: _?.inputs })}
|
|
57
|
-
</div>
|
|
58
|
-
));
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const renderInfo = (inputs: FieldDef[] = []) => {
|
|
62
|
-
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
63
|
-
|
|
64
|
-
return infoInputs.length ? infoInputs.map(({ text }) => <InfoCard __html={text} />) : null;
|
|
65
|
-
};
|