@redneckz/wildless-cms-uni-blocks 0.14.683 → 0.14.684
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/updateUserTask.d.ts +5 -4
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +696 -653
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
- package/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
- package/bundle/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
- package/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
- package/bundle/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
- package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -1
- package/bundle/components/CreditCardForm/renderStep.d.ts +2 -2
- package/bundle/components/CreditForm/CreditForm.d.ts +5 -2
- package/bundle/components/CreditForm/CreditFormContent.d.ts +4 -5
- package/bundle/components/CreditForm/CreditFormStep.d.ts +2 -3
- package/bundle/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
- package/bundle/components/CreditForm/getCalcData.d.ts +3 -0
- package/bundle/components/CreditForm/getZeroStepData.d.ts +1 -1
- package/bundle/components/CreditForm/renderInputs.d.ts +2 -1
- package/bundle/components/CreditForm/renderStep.d.ts +2 -2
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
- package/bundle/components/OfficesAtmsMap/filterItems.d.ts +2 -0
- package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/bundle/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/getField.d.ts +1 -1
- package/dist/api/RetailAPI/getCardTypes.js +1 -1
- package/dist/api/RetailAPI/getCardTypes.js.map +1 -1
- package/dist/api/RetailAPI/updateUserTask.d.ts +5 -4
- package/dist/api/RetailAPI/updateUserTask.js +1 -1
- package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/renderInputs.js +1 -1
- package/dist/components/ApplicationForm/renderInputs.js.map +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
- package/dist/components/CalculatorCredit/CalculatorCredit.js +5 -3
- package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/dist/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
- package/dist/components/CalculatorCredit/defaultValueAdapter.js +18 -0
- package/dist/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
- package/dist/components/CreditCardForm/CreditCardForm.js +4 -4
- package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
- package/dist/components/CreditCardForm/CreditCardFormStatus.js +3 -1
- package/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js +2 -14
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
- package/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/renderInputs.d.ts +2 -1
- package/dist/components/CreditCardForm/renderInputs.js +1 -1
- package/dist/components/CreditCardForm/renderInputs.js.map +1 -1
- package/dist/components/CreditCardForm/renderStep.d.ts +2 -2
- package/dist/components/CreditCardForm/renderStep.js +2 -2
- package/dist/components/CreditCardForm/renderStep.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.d.ts +5 -2
- package/dist/components/CreditForm/CreditForm.js +6 -20
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormContent.d.ts +4 -5
- package/dist/components/CreditForm/CreditFormStatusTracker.js +10 -10
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +2 -3
- package/dist/components/CreditForm/CreditFormStep.js +5 -10
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
- package/dist/components/CreditForm/ProgramsSourceProps.js +2 -0
- package/dist/components/CreditForm/ProgramsSourceProps.js.map +1 -0
- package/dist/components/CreditForm/creditFormStepsData.js +9 -1
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/formStateMap.js +9 -7
- package/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/dist/components/CreditForm/getCalcData.d.ts +3 -0
- package/dist/components/CreditForm/getCalcData.js +16 -0
- package/dist/components/CreditForm/getCalcData.js.map +1 -0
- package/dist/components/CreditForm/getCreditFormTaskData.js +3 -2
- package/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/dist/components/CreditForm/getSecondStepData.js +0 -1
- package/dist/components/CreditForm/getSecondStepData.js.map +1 -1
- package/dist/components/CreditForm/getZeroStepData.d.ts +1 -1
- package/dist/components/CreditForm/getZeroStepData.js +3 -8
- package/dist/components/CreditForm/getZeroStepData.js.map +1 -1
- package/dist/components/CreditForm/renderInputs.d.ts +2 -1
- package/dist/components/CreditForm/renderInputs.js +1 -1
- package/dist/components/CreditForm/renderInputs.js.map +1 -1
- package/dist/components/CreditForm/renderStep.d.ts +2 -2
- package/dist/components/CreditForm/renderStep.js +2 -2
- package/dist/components/CreditForm/renderStep.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -6
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/filterItems.d.ts +2 -0
- package/dist/components/OfficesAtmsMap/filterItems.js +9 -0
- package/dist/components/OfficesAtmsMap/filterItems.js.map +1 -0
- package/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js +3 -3
- package/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
- package/dist/hooks/useJSONRef/useJSONRef.js +13 -3
- package/dist/hooks/useJSONRef/useJSONRef.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/dist/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/CreditCalcField.js +15 -0
- package/dist/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/RegionField.js +3 -1
- package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/SelectField.js +4 -6
- package/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/dist/ui-kit/FormField/getField.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.js +5 -4
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/lib/api/RetailAPI/getCardTypes.js +1 -1
- package/lib/api/RetailAPI/getCardTypes.js.map +1 -1
- package/lib/api/RetailAPI/updateUserTask.d.ts +5 -4
- package/lib/api/RetailAPI/updateUserTask.js +2 -2
- package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/renderInputs.js +1 -1
- package/lib/components/ApplicationForm/renderInputs.js.map +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
- package/lib/components/CalculatorCredit/CalculatorCredit.js +5 -3
- package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/lib/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
- package/lib/components/CalculatorCredit/defaultValueAdapter.js +15 -0
- package/lib/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
- package/lib/components/CreditCardForm/CreditCardForm.js +4 -4
- package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
- package/lib/components/CreditCardForm/CreditCardFormStatus.js +3 -1
- package/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +2 -14
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
- package/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/renderInputs.d.ts +2 -1
- package/lib/components/CreditCardForm/renderInputs.js +1 -1
- package/lib/components/CreditCardForm/renderInputs.js.map +1 -1
- package/lib/components/CreditCardForm/renderStep.d.ts +2 -2
- package/lib/components/CreditCardForm/renderStep.js +2 -2
- package/lib/components/CreditCardForm/renderStep.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.d.ts +5 -2
- package/lib/components/CreditForm/CreditForm.js +6 -20
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormContent.d.ts +4 -5
- package/lib/components/CreditForm/CreditFormStatusTracker.js +11 -11
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +2 -3
- package/lib/components/CreditForm/CreditFormStep.js +6 -11
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
- package/lib/components/CreditForm/ProgramsSourceProps.js +2 -0
- package/lib/components/CreditForm/ProgramsSourceProps.js.map +1 -0
- package/lib/components/CreditForm/creditFormStepsData.js +9 -1
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/formStateMap.js +9 -7
- package/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/lib/components/CreditForm/getCalcData.d.ts +3 -0
- package/lib/components/CreditForm/getCalcData.js +13 -0
- package/lib/components/CreditForm/getCalcData.js.map +1 -0
- package/lib/components/CreditForm/getCreditFormTaskData.js +3 -2
- package/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/lib/components/CreditForm/getSecondStepData.js +0 -1
- package/lib/components/CreditForm/getSecondStepData.js.map +1 -1
- package/lib/components/CreditForm/getZeroStepData.d.ts +1 -1
- package/lib/components/CreditForm/getZeroStepData.js +3 -8
- package/lib/components/CreditForm/getZeroStepData.js.map +1 -1
- package/lib/components/CreditForm/renderInputs.d.ts +2 -1
- package/lib/components/CreditForm/renderInputs.js +1 -1
- package/lib/components/CreditForm/renderInputs.js.map +1 -1
- package/lib/components/CreditForm/renderStep.d.ts +2 -2
- package/lib/components/CreditForm/renderStep.js +2 -2
- package/lib/components/CreditForm/renderStep.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +0 -4
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/filterItems.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/filterItems.js +6 -0
- package/lib/components/OfficesAtmsMap/filterItems.js.map +1 -0
- package/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js +1 -1
- package/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
- package/lib/hooks/useJSONRef/useJSONRef.js +13 -3
- package/lib/hooks/useJSONRef/useJSONRef.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/lib/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/CreditCalcField.js +13 -0
- package/lib/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/RegionField.js +3 -1
- package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/SelectField.js +4 -6
- package/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/lib/ui-kit/FormField/getField.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.js +5 -4
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +5 -4
- package/mobile/bundle/bundle.umd.js +698 -655
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
- package/mobile/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
- package/mobile/bundle/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
- package/mobile/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
- package/mobile/bundle/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
- package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -1
- package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/CreditForm.d.ts +5 -2
- package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +4 -5
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +2 -3
- package/mobile/bundle/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
- package/mobile/bundle/components/CreditForm/getCalcData.d.ts +3 -0
- package/mobile/bundle/components/CreditForm/getZeroStepData.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -1
- package/mobile/bundle/components/CreditForm/renderStep.d.ts +2 -2
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
- package/mobile/bundle/components/OfficesAtmsMap/filterItems.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/getField.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/getCardTypes.js +1 -1
- package/mobile/dist/api/RetailAPI/getCardTypes.js.map +1 -1
- package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +5 -4
- package/mobile/dist/api/RetailAPI/updateUserTask.js +1 -1
- package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderInputs.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +5 -3
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/dist/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
- package/mobile/dist/components/CalculatorCredit/defaultValueAdapter.js +18 -0
- package/mobile/dist/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js +4 -4
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js +3 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +2 -14
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -1
- package/mobile/dist/components/CreditCardForm/renderInputs.js +1 -1
- package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderStep.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/renderStep.js +2 -2
- package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.d.ts +5 -2
- package/mobile/dist/components/CreditForm/CreditForm.js +6 -20
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +4 -5
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +10 -10
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +2 -3
- package/mobile/dist/components/CreditForm/CreditFormStep.js +5 -10
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
- package/mobile/dist/components/CreditForm/ProgramsSourceProps.js +2 -0
- package/mobile/dist/components/CreditForm/ProgramsSourceProps.js.map +1 -0
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +9 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/formStateMap.js +9 -7
- package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditForm/getCalcData.d.ts +3 -0
- package/mobile/dist/components/CreditForm/getCalcData.js +16 -0
- package/mobile/dist/components/CreditForm/getCalcData.js.map +1 -0
- package/mobile/dist/components/CreditForm/getCreditFormTaskData.js +3 -2
- package/mobile/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getSecondStepData.js +0 -1
- package/mobile/dist/components/CreditForm/getSecondStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getZeroStepData.d.ts +1 -1
- package/mobile/dist/components/CreditForm/getZeroStepData.js +3 -8
- package/mobile/dist/components/CreditForm/getZeroStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -1
- package/mobile/dist/components/CreditForm/renderInputs.js +1 -1
- package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderStep.d.ts +2 -2
- package/mobile/dist/components/CreditForm/renderStep.js +2 -2
- package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -6
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/filterItems.d.ts +2 -0
- package/mobile/dist/components/OfficesAtmsMap/filterItems.js +9 -0
- package/mobile/dist/components/OfficesAtmsMap/filterItems.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js +3 -3
- package/mobile/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
- package/mobile/dist/hooks/useJSONRef/useJSONRef.js +13 -3
- package/mobile/dist/hooks/useJSONRef/useJSONRef.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.js +15 -0
- package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +3 -1
- package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/SelectField.js +4 -6
- package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +5 -4
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/api/RetailAPI/getCardTypes.js +1 -1
- package/mobile/lib/api/RetailAPI/getCardTypes.js.map +1 -1
- package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +5 -4
- package/mobile/lib/api/RetailAPI/updateUserTask.js +2 -2
- package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderInputs.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +5 -3
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/lib/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
- package/mobile/lib/components/CalculatorCredit/defaultValueAdapter.js +15 -0
- package/mobile/lib/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js +4 -4
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js +3 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +2 -14
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -1
- package/mobile/lib/components/CreditCardForm/renderInputs.js +1 -1
- package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderStep.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/renderStep.js +2 -2
- package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.d.ts +5 -2
- package/mobile/lib/components/CreditForm/CreditForm.js +6 -20
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +4 -5
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +11 -11
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +2 -3
- package/mobile/lib/components/CreditForm/CreditFormStep.js +6 -11
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
- package/mobile/lib/components/CreditForm/ProgramsSourceProps.js +2 -0
- package/mobile/lib/components/CreditForm/ProgramsSourceProps.js.map +1 -0
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +9 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/formStateMap.js +9 -7
- package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditForm/getCalcData.d.ts +3 -0
- package/mobile/lib/components/CreditForm/getCalcData.js +13 -0
- package/mobile/lib/components/CreditForm/getCalcData.js.map +1 -0
- package/mobile/lib/components/CreditForm/getCreditFormTaskData.js +3 -2
- package/mobile/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getSecondStepData.js +0 -1
- package/mobile/lib/components/CreditForm/getSecondStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getZeroStepData.d.ts +1 -1
- package/mobile/lib/components/CreditForm/getZeroStepData.js +3 -8
- package/mobile/lib/components/CreditForm/getZeroStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -1
- package/mobile/lib/components/CreditForm/renderInputs.js +1 -1
- package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderStep.d.ts +2 -2
- package/mobile/lib/components/CreditForm/renderStep.js +2 -2
- package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +0 -4
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/filterItems.d.ts +2 -0
- package/mobile/lib/components/OfficesAtmsMap/filterItems.js +6 -0
- package/mobile/lib/components/OfficesAtmsMap/filterItems.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
- package/mobile/lib/hooks/useJSONRef/useJSONRef.js +13 -3
- package/mobile/lib/hooks/useJSONRef/useJSONRef.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.js +13 -0
- package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +3 -1
- package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/SelectField.js +4 -6
- package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +5 -4
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/src/api/RetailAPI/getCardTypes.ts +1 -1
- package/mobile/src/api/RetailAPI/updateUserTask.ts +6 -5
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderInputs.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -1
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +13 -7
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +19 -7
- package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +7 -5
- package/mobile/src/components/CalculatorCredit/defaultValueAdapter.ts +26 -0
- package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +4 -8
- package/mobile/src/components/CreditCardForm/CreditCardFormStatus.tsx +7 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +14 -8
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +3 -18
- package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +24 -21
- package/mobile/src/components/CreditCardForm/renderInputs.tsx +3 -2
- package/mobile/src/components/CreditCardForm/renderStep.tsx +3 -4
- package/mobile/src/components/CreditForm/CreditForm.tsx +12 -30
- package/mobile/src/components/CreditForm/CreditFormContent.ts +5 -8
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +14 -13
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +10 -24
- package/mobile/src/components/CreditForm/ProgramsSourceProps.tsx +20 -0
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +9 -1
- package/mobile/src/components/CreditForm/formStateMap.tsx +9 -7
- package/mobile/src/components/CreditForm/getCalcData.ts +19 -0
- package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +3 -2
- package/mobile/src/components/CreditForm/getSecondStepData.tsx +0 -1
- package/mobile/src/components/CreditForm/getZeroStepData.ts +7 -11
- package/mobile/src/components/CreditForm/renderInputs.tsx +3 -2
- package/mobile/src/components/CreditForm/renderStep.tsx +3 -3
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +0 -9
- package/mobile/src/components/OfficesAtmsMap/filterItems.tsx +11 -0
- package/mobile/src/components/OfficesAtmsMap/useOfficesAtmsMapData.tsx +1 -1
- package/mobile/src/hooks/useJSONRef/useJSONRef.ts +21 -4
- package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +14 -10
- package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +1 -0
- package/mobile/src/ui-kit/FormField/Fields/CreditCalcField.tsx +24 -0
- package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +4 -1
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +1 -0
- package/mobile/src/ui-kit/FormField/SelectField.tsx +4 -6
- package/mobile/src/ui-kit/FormField/getField.tsx +5 -4
- package/package.json +3 -2
- package/src/api/RetailAPI/getCardTypes.ts +1 -1
- package/src/api/RetailAPI/updateUserTask.ts +6 -5
- package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/src/components/ApplicationForm/renderInputs.tsx +2 -2
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -1
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +13 -7
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +19 -7
- package/src/components/CalculatorCredit/CalculatorCredit.tsx +7 -5
- package/src/components/CalculatorCredit/defaultValueAdapter.ts +26 -0
- package/src/components/CreditCardForm/CreditCardForm.tsx +4 -8
- package/src/components/CreditCardForm/CreditCardFormStatus.tsx +7 -1
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +14 -8
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +3 -18
- package/src/components/CreditCardForm/PendingStatusContent.tsx +24 -21
- package/src/components/CreditCardForm/renderInputs.tsx +3 -2
- package/src/components/CreditCardForm/renderStep.tsx +3 -4
- package/src/components/CreditForm/CreditForm.fixture.tsx +6 -1
- package/src/components/CreditForm/CreditForm.tsx +12 -30
- package/src/components/CreditForm/CreditFormContent.ts +5 -8
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +14 -13
- package/src/components/CreditForm/CreditFormStep.tsx +10 -24
- package/src/components/CreditForm/ProgramsSourceProps.tsx +20 -0
- package/src/components/CreditForm/creditFormStepsData.tsx +9 -1
- package/src/components/CreditForm/formStateMap.tsx +9 -7
- package/src/components/CreditForm/getCalcData.ts +19 -0
- package/src/components/CreditForm/getCreditFormTaskData.ts +3 -2
- package/src/components/CreditForm/getSecondStepData.tsx +0 -1
- package/src/components/CreditForm/getZeroStepData.ts +7 -11
- package/src/components/CreditForm/renderInputs.tsx +3 -2
- package/src/components/CreditForm/renderStep.tsx +3 -3
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +0 -9
- package/src/components/OfficesAtmsMap/filterItems.tsx +11 -0
- package/src/components/OfficesAtmsMap/useOfficesAtmsMapData.tsx +1 -1
- package/src/hooks/useJSONRef/useJSONRef.ts +21 -4
- package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +14 -10
- package/src/ui-kit/FormField/CustomFieldProps.ts +1 -0
- package/src/ui-kit/FormField/Fields/CreditCalcField.tsx +24 -0
- package/src/ui-kit/FormField/Fields/RegionField.tsx +4 -1
- package/src/ui-kit/FormField/NameFieldDef.ts +1 -0
- package/src/ui-kit/FormField/SelectField.tsx +4 -6
- package/src/ui-kit/FormField/getField.tsx +5 -4
|
@@ -4,15 +4,32 @@ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
4
4
|
import { fetchRefs } from './fetchRefs';
|
|
5
5
|
import { resolveBlockProps } from './resolveBlockProps';
|
|
6
6
|
|
|
7
|
+
type RefsMap = Record<string, JSONNode>;
|
|
8
|
+
|
|
7
9
|
export const useJSONRef = <C>(content: C, fallback?: Record<string, unknown>): C => {
|
|
8
10
|
const refs = collectRef(content as JSONNode);
|
|
9
11
|
|
|
10
|
-
const [refsMap, setRefsMap] = useState<
|
|
12
|
+
const [refsMap, setRefsMap] = useState<RefsMap>({});
|
|
11
13
|
useEffect(() => {
|
|
12
|
-
|
|
13
|
-
fetchRefs(refs).then(setRefsMap);
|
|
14
|
-
}
|
|
14
|
+
resolveRefs(refs).then(setRefsMap);
|
|
15
15
|
}, [refs.join()]);
|
|
16
16
|
|
|
17
17
|
return refs.length ? resolveBlockProps(content, { ...fallback, ...refsMap }) : content;
|
|
18
18
|
};
|
|
19
|
+
|
|
20
|
+
const resolveRefs = async (refs: string[], parentRefsMap: RefsMap = {}): Promise<RefsMap> => {
|
|
21
|
+
if (refs.length) {
|
|
22
|
+
const refsMap = await fetchRefs(refs);
|
|
23
|
+
const unionRefsMap = { ...parentRefsMap, ...refsMap };
|
|
24
|
+
|
|
25
|
+
const additRefs = Object.entries(refsMap).flatMap(([, v]) => collectRef(v));
|
|
26
|
+
|
|
27
|
+
if (additRefs.length) {
|
|
28
|
+
return resolveRefs(additRefs, unionRefsMap);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return unionRefsMap;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return parentRefsMap;
|
|
35
|
+
};
|
|
@@ -9,17 +9,21 @@ export const useConsentBkiDialog = (onClose: () => void) => {
|
|
|
9
9
|
const verifyPhoneDialog = useVerifyPhoneDialog();
|
|
10
10
|
|
|
11
11
|
const handleSuccessVerify = (profileId?: number) => async (smsCode?: string) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
try {
|
|
13
|
+
if (profileId) {
|
|
14
|
+
await updateUserProfile({
|
|
15
|
+
profile: {
|
|
16
|
+
id: profileId,
|
|
17
|
+
consentBkiFlg: true,
|
|
18
|
+
smsConsentBki: smsCode,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
onClose();
|
|
24
|
+
} catch (ex) {
|
|
25
|
+
console.log(ex);
|
|
26
|
+
}
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
const handleSubmitBkiConstent =
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { CalculatorCredit } from '../../../components/CalculatorCredit/CalculatorCredit';
|
|
4
|
+
import { type CreditCalculatorUserInputParams } from '../../../components/CalculatorCredit/CalculatorCreditContent';
|
|
5
|
+
import { defaultValueAdapter } from '../../../components/CalculatorCredit/defaultValueAdapter';
|
|
6
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
7
|
+
|
|
8
|
+
const FIELD_NAME = 'calculator';
|
|
9
|
+
|
|
10
|
+
export const CreditCalcField = JSX<CustomFieldProps>(({ field, params }) => {
|
|
11
|
+
const handleChange = useCallback((_: CreditCalculatorUserInputParams) => {
|
|
12
|
+
field(FIELD_NAME).onChange?.(_);
|
|
13
|
+
}, []);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<CalculatorCredit
|
|
17
|
+
{...params?.calcData}
|
|
18
|
+
defaultParams={defaultValueAdapter(
|
|
19
|
+
field(FIELD_NAME).value as CreditCalculatorUserInputParams,
|
|
20
|
+
)}
|
|
21
|
+
onChange={handleChange}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
});
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { getRegionUrl } from '../../../components/ApplicationForm/getRegionUrl';
|
|
3
4
|
import { useRegions } from '../../../hooks/useRegions';
|
|
4
5
|
import { SelectControl } from '../../Select/SelectControl';
|
|
5
6
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
6
7
|
import { validatorObj } from '../getObjectValidator';
|
|
7
8
|
import { getValidation } from '../getValidation';
|
|
8
9
|
|
|
9
|
-
export const RegionField = JSX<CustomFieldProps>(({ field, input,
|
|
10
|
+
export const RegionField = JSX<CustomFieldProps>(({ field, input, params }) => {
|
|
11
|
+
const url = getRegionUrl(params?.typeForm as string | undefined);
|
|
12
|
+
|
|
10
13
|
const regions = useRegions(url);
|
|
11
14
|
|
|
12
15
|
return (
|
|
@@ -33,12 +33,10 @@ export const SelectField = UniBlock<SelectFieldProps>(
|
|
|
33
33
|
isSearch = false,
|
|
34
34
|
}) => {
|
|
35
35
|
const leadOptions: Option[] =
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}))) ||
|
|
41
|
-
[];
|
|
36
|
+
source?.map((_: LeadProps) => ({
|
|
37
|
+
key: _.key || '',
|
|
38
|
+
text: _.value,
|
|
39
|
+
})) || [];
|
|
42
40
|
|
|
43
41
|
return (
|
|
44
42
|
<SelectControl
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* eslint-disable max-lines-per-function */
|
|
3
3
|
//TODO: Убрать обращение к компонентам т.к. ApplicationForm
|
|
4
4
|
import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
|
|
5
|
-
import { getRegionUrl } from '../../components/ApplicationForm/getRegionUrl';
|
|
6
5
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
7
6
|
import { InputControl } from '../Input/InputControl';
|
|
8
7
|
import { AcquiringField } from './Fields/AcquiringField';
|
|
@@ -29,6 +28,7 @@ import { CommentField } from './Fields/CommentField';
|
|
|
29
28
|
import { ConfirmationIncomeField } from './Fields/ConfirmationIncomeField';
|
|
30
29
|
import { ConscriptionField } from './Fields/ConscriptionField';
|
|
31
30
|
import { ConsentField } from './Fields/ConsentField';
|
|
31
|
+
import { CreditCalcField } from './Fields/CreditCalcField';
|
|
32
32
|
import { CreditInRshbCdField } from './Fields/CreditInRshbCdField';
|
|
33
33
|
import { CurrencyField } from './Fields/CurrencyField';
|
|
34
34
|
import { DeliveryDateFiels } from './Fields/DeliveryDateFiels';
|
|
@@ -99,9 +99,9 @@ const PRODUCT_REF = {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
export const getField =
|
|
102
|
-
(field: FormFieldRegisterer<any>,
|
|
102
|
+
(field: FormFieldRegisterer<any>, params?: Record<string, any>) =>
|
|
103
103
|
(input: FieldDef, i: number) => {
|
|
104
|
-
const isPremium = typeForm === 'ULTRASERVICE' || typeForm === 'PREMIUMSERVICE';
|
|
104
|
+
const isPremium = params?.typeForm === 'ULTRASERVICE' || params?.typeForm === 'PREMIUMSERVICE';
|
|
105
105
|
|
|
106
106
|
const InputsMap = {
|
|
107
107
|
surname: <SurnameField field={field} input={input} />,
|
|
@@ -157,7 +157,7 @@ export const getField =
|
|
|
157
157
|
region: isPremium ? (
|
|
158
158
|
<RegionPremiumField field={field} />
|
|
159
159
|
) : (
|
|
160
|
-
<RegionField field={field} input={input}
|
|
160
|
+
<RegionField field={field} input={input} params={params} />
|
|
161
161
|
),
|
|
162
162
|
education: <EducationField field={field} input={input} />,
|
|
163
163
|
housing: <HousingField field={field} input={input} />,
|
|
@@ -205,6 +205,7 @@ export const getField =
|
|
|
205
205
|
confirmationIncome: <ConfirmationIncomeField field={field} input={input} />,
|
|
206
206
|
methodObtain: <MethodObtainField field={field} input={input} />,
|
|
207
207
|
deliveryDate: <DeliveryDateFiels field={field} input={input} />,
|
|
208
|
+
calculator: <CreditCalcField field={field} params={params} />,
|
|
208
209
|
};
|
|
209
210
|
|
|
210
211
|
return isRenderField({ input, field }) ? (
|
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.684",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"cypress": "^13.13.0",
|
|
134
134
|
"cypress-visual-regression": "5.0.0",
|
|
135
|
+
"cypress-wait-until": "^3.0.1",
|
|
135
136
|
"react": ">=18.3.1",
|
|
136
137
|
"react-dom": ">=18.3.1"
|
|
137
138
|
},
|
|
@@ -214,7 +215,7 @@
|
|
|
214
215
|
"path": "lib/common.css"
|
|
215
216
|
},
|
|
216
217
|
{
|
|
217
|
-
"limit": "
|
|
218
|
+
"limit": "100 kB",
|
|
218
219
|
"path": "bundle/bundle.umd.min.js"
|
|
219
220
|
}
|
|
220
221
|
],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
2
|
-
import {
|
|
2
|
+
import { doRequest } from './doRequest';
|
|
3
3
|
|
|
4
4
|
type ParticipantAddress = {
|
|
5
5
|
addressType: {
|
|
@@ -83,6 +83,7 @@ export type Participant = {
|
|
|
83
83
|
participantAddresses?: ParticipantAddress[];
|
|
84
84
|
participantIncomes?: ParticipantIncome[];
|
|
85
85
|
payrollCardRshbFlg?: boolean;
|
|
86
|
+
consentInsuranceFlg?: boolean;
|
|
86
87
|
positionCd?: Option;
|
|
87
88
|
registrationDate?: string;
|
|
88
89
|
seniority?: string;
|
|
@@ -107,9 +108,6 @@ export type Participant = {
|
|
|
107
108
|
paymentSystemTypeCd?: string;
|
|
108
109
|
classCard?: Option;
|
|
109
110
|
codeWord?: string;
|
|
110
|
-
loanAmount?: number;
|
|
111
|
-
creditPeriod?: number;
|
|
112
|
-
paymentTypeCd?: PaymentType;
|
|
113
111
|
};
|
|
114
112
|
|
|
115
113
|
export type UpdateUserTaskBody = {
|
|
@@ -131,6 +129,9 @@ export type UpdateUserTaskBody = {
|
|
|
131
129
|
esiaAccountTypeCd?: {
|
|
132
130
|
key: 'VERIFIED' | 'STANDARD' | 'SIMPLIFIED';
|
|
133
131
|
};
|
|
132
|
+
loanAmount?: number;
|
|
133
|
+
creditPeriod?: number;
|
|
134
|
+
paymentTypeCd?: PaymentType;
|
|
134
135
|
};
|
|
135
136
|
};
|
|
136
137
|
|
|
@@ -141,4 +142,4 @@ export type CreateUserProfileResponse = {
|
|
|
141
142
|
};
|
|
142
143
|
|
|
143
144
|
export const updateUserTask = (body: UpdateUserTaskBody) =>
|
|
144
|
-
|
|
145
|
+
doRequest('/user-data/updateUserTask', 'PUT', body);
|
|
@@ -92,7 +92,7 @@ export const ApplicationForm = JSX<ApplicationFormProps>(
|
|
|
92
92
|
className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}
|
|
93
93
|
>
|
|
94
94
|
{renderTitle(_.title)}
|
|
95
|
-
{(_?.inputs || [])?.map(getField(field, typeForm))}
|
|
95
|
+
{(_?.inputs || [])?.map(getField(field, { typeForm }))}
|
|
96
96
|
</div>
|
|
97
97
|
))}
|
|
98
98
|
{renderAgreementSubmit(
|
|
@@ -11,11 +11,11 @@ export const renderInputs = ({ field, typeForm = '', inputs }: GroupedConsentsPr
|
|
|
11
11
|
|
|
12
12
|
return consentInputs.length > 2 ? (
|
|
13
13
|
<div>
|
|
14
|
-
{restInputs.map(getField(field, typeForm))}
|
|
14
|
+
{restInputs.map(getField(field, { typeForm }))}
|
|
15
15
|
<GroupedConsents inputs={consentInputs} field={field} />
|
|
16
16
|
</div>
|
|
17
17
|
) : (
|
|
18
|
-
(inputs || [])?.map(getField(field, typeForm))
|
|
18
|
+
(inputs || [])?.map(getField(field, { typeForm }))
|
|
19
19
|
);
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -49,7 +49,7 @@ export const GroupedConsents = JSX<GroupedConsentsProps>(
|
|
|
49
49
|
unfoldedByDefault
|
|
50
50
|
renderFoldableSection={({ isUnfolded }) => (
|
|
51
51
|
<FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
|
|
52
|
-
{inputs.map(getField(field, typeForm))}
|
|
52
|
+
{inputs.map(getField(field, { typeForm }))}
|
|
53
53
|
</FoldableSection>
|
|
54
54
|
)}
|
|
55
55
|
renderFoldButton={renderGeneralCheckbox(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
|
+
import { type PaymentType } from '../../api/RetailAPI/updateUserTask';
|
|
2
3
|
import {
|
|
3
4
|
FEEDBACK_METHOD,
|
|
4
5
|
SERVICE_DIRECTIONS,
|
|
@@ -143,14 +144,19 @@ export interface FormState extends FormConsents, FormStateDeliveryType {
|
|
|
143
144
|
cardCategory?: Option;
|
|
144
145
|
codeWord?: string;
|
|
145
146
|
esiaAccountTypeCd?: Option;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
calculator?: {
|
|
148
|
+
moneyValue?: number;
|
|
149
|
+
monthsValue?: number;
|
|
150
|
+
isAnnuity?: boolean;
|
|
151
|
+
isInsurance?: boolean;
|
|
152
|
+
isSalaryClient?: boolean;
|
|
153
|
+
isPensionClient?: boolean;
|
|
154
|
+
isStateEmployee?: boolean;
|
|
155
|
+
};
|
|
153
156
|
addressRetail?: Option;
|
|
157
|
+
loanAmount?: number;
|
|
158
|
+
creditPeriod?: number;
|
|
159
|
+
paymentTypeCd?: PaymentType;
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
const initialFormState = {
|
|
@@ -24,6 +24,13 @@ type ApplicationLeadApiProps = {
|
|
|
24
24
|
saveForm: (value: FormState) => void;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
type UserData = {
|
|
28
|
+
participantId: number;
|
|
29
|
+
taskId: number;
|
|
30
|
+
profileId: number;
|
|
31
|
+
programId: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
27
34
|
export const useApplicationLeadApi = ({
|
|
28
35
|
inputs,
|
|
29
36
|
programId,
|
|
@@ -34,15 +41,20 @@ export const useApplicationLeadApi = ({
|
|
|
34
41
|
const [, setTaskId] = useLocalStorage<number>('taskId');
|
|
35
42
|
const [, setProfileId] = useLocalStorage<number>('profileId');
|
|
36
43
|
const [, setParticipantId] = useLocalStorage<number>('participantId');
|
|
44
|
+
const [, setProgramId] = useLocalStorage<string>('programId');
|
|
37
45
|
const esiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
38
46
|
const consentBkiDialog = useConsentBkiDialog(esiaLoginDialog.open);
|
|
39
47
|
const verifyPhoneDialog = useVerifyPhoneDialog();
|
|
40
48
|
|
|
41
|
-
const saveUserData = useCallback(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
const saveUserData = useCallback(
|
|
50
|
+
({ participantId, taskId, profileId, programId: programNumber }: UserData) => {
|
|
51
|
+
setParticipantId(participantId);
|
|
52
|
+
setTaskId(taskId);
|
|
53
|
+
setProfileId(profileId);
|
|
54
|
+
setProgramId(programNumber);
|
|
55
|
+
},
|
|
56
|
+
[],
|
|
57
|
+
);
|
|
46
58
|
|
|
47
59
|
// eslint-disable-next-line consistent-return
|
|
48
60
|
const handleSubmit = useCallback(async (formData: FormState) => {
|
|
@@ -103,7 +115,7 @@ const updateUserData = async ({
|
|
|
103
115
|
programId: string;
|
|
104
116
|
profileId: number;
|
|
105
117
|
formData: FormState;
|
|
106
|
-
saveUserData: (
|
|
118
|
+
saveUserData: (userData: UserData) => void;
|
|
107
119
|
saveForm: (formData: FormState) => void;
|
|
108
120
|
}) => {
|
|
109
121
|
const transformedForm = transformOtherConsentsField(formData);
|
|
@@ -124,7 +136,7 @@ const updateUserData = async ({
|
|
|
124
136
|
}),
|
|
125
137
|
);
|
|
126
138
|
|
|
127
|
-
saveUserData(participantId, taskId, profileId);
|
|
139
|
+
saveUserData({ participantId, taskId, profileId, programId });
|
|
128
140
|
saveForm(formData);
|
|
129
141
|
};
|
|
130
142
|
|
|
@@ -18,7 +18,6 @@ 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';
|
|
22
21
|
import { UniBlock } from '../../UniBlock/UniBlock';
|
|
23
22
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
24
23
|
import { clamp } from '../../utils/clamp';
|
|
@@ -29,6 +28,7 @@ import {
|
|
|
29
28
|
type CreditCalculatorParams,
|
|
30
29
|
type CreditCalculatorParamsViewSettings,
|
|
31
30
|
type CreditCalculatorSourceBookParams,
|
|
31
|
+
type CreditCalculatorUserInputParams,
|
|
32
32
|
} from './CalculatorCreditContent';
|
|
33
33
|
import { getCreditCalculatorParams } from './getCreditCalculatorParams';
|
|
34
34
|
import { isDefaultParams } from './isDefaultParams';
|
|
@@ -45,7 +45,7 @@ const MAP = {
|
|
|
45
45
|
export interface CalculatorDepositProps extends CalculatorCreditContent, UniBlockProps {
|
|
46
46
|
className?: string;
|
|
47
47
|
calcSource?: CreditCalculatorData & JSONRefObject;
|
|
48
|
-
|
|
48
|
+
onChange?: (params: CreditCalculatorUserInputParams) => void;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
@@ -57,12 +57,12 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
|
57
57
|
footnote,
|
|
58
58
|
paramsViewSettings,
|
|
59
59
|
defaultParams,
|
|
60
|
-
|
|
60
|
+
onChange,
|
|
61
61
|
...rest
|
|
62
62
|
}) => {
|
|
63
63
|
const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
|
|
64
64
|
|
|
65
|
-
const [userInputParams, { field,
|
|
65
|
+
const [userInputParams, { field, isDirty }] = useForm({
|
|
66
66
|
moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
|
|
67
67
|
monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
|
|
68
68
|
isAnnuity: Boolean(defaultParams?.isAnnuity),
|
|
@@ -72,7 +72,9 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
|
72
72
|
isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
isDirty && onChange?.(userInputParams);
|
|
77
|
+
}, [userInputParams, isDirty]);
|
|
76
78
|
|
|
77
79
|
const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
|
|
78
80
|
const paymentTypeElement = renderPaymentType({
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CreditCalculatorUserInputParams,
|
|
3
|
+
type CreditDefaultParams,
|
|
4
|
+
} from './CalculatorCreditContent';
|
|
5
|
+
|
|
6
|
+
export const PARAMS_MAP = {
|
|
7
|
+
moneyValue: 'sum',
|
|
8
|
+
monthsValue: 'period',
|
|
9
|
+
isInsurance: 'isEnableInsurance',
|
|
10
|
+
isPensionClient: 'isEnablePensionClient',
|
|
11
|
+
isStateEmployee: 'isEnableStateEmployee',
|
|
12
|
+
isSalaryClient: 'isEnableSalaryClient',
|
|
13
|
+
isAnnuity: 'isAnnuity',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const defaultValueAdapter = (
|
|
17
|
+
value?: CreditCalculatorUserInputParams,
|
|
18
|
+
isInverse = false,
|
|
19
|
+
): CreditDefaultParams => {
|
|
20
|
+
const keysMap = isInverse ? swap(PARAMS_MAP) : PARAMS_MAP;
|
|
21
|
+
|
|
22
|
+
return Object.fromEntries(Object.entries(value ?? {}).map(([k, v]) => [keysMap[k], v]));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const swap = (_: Record<string, string>) =>
|
|
26
|
+
Object.fromEntries(Object.entries(_).map(([k, v]) => [v, k]));
|
|
@@ -11,9 +11,9 @@ import { stepsSectionsMap } from './creditCardFormStepsData';
|
|
|
11
11
|
|
|
12
12
|
interface CreditCardFormWizardProps extends CreditCardFormContent, UniBlockProps {}
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const STEPS = 6;
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const TITLES = [
|
|
17
17
|
'Параметры карты',
|
|
18
18
|
'Персональные данные',
|
|
19
19
|
'Данные о трудоустройстве',
|
|
@@ -34,7 +34,7 @@ export const CreditCardForm = JSX<CreditCardFormWizardProps>(({ className, ...re
|
|
|
34
34
|
useEffect(updateRefreshToken, []);
|
|
35
35
|
|
|
36
36
|
const handleNextStep = useCallback(() => {
|
|
37
|
-
setStep((_) => Math.min(_ + 1,
|
|
37
|
+
setStep((_) => Math.min(_ + 1, STEPS));
|
|
38
38
|
scrollToTop();
|
|
39
39
|
}, []);
|
|
40
40
|
|
|
@@ -52,11 +52,7 @@ export const CreditCardForm = JSX<CreditCardFormWizardProps>(({ className, ...re
|
|
|
52
52
|
<BlockWrapper className={style('bg-transparent', className)} defaultPadding="p-0" {...rest}>
|
|
53
53
|
<div ref={formContainerRef} className="container grid grid-cols-12">
|
|
54
54
|
{isFormFinished ? null : (
|
|
55
|
-
<CreditCardFormProgress
|
|
56
|
-
stepsTitles={WIZARD_TITLES}
|
|
57
|
-
step={step}
|
|
58
|
-
totalSteps={WIZARD_STEPS}
|
|
59
|
-
/>
|
|
55
|
+
<CreditCardFormProgress stepsTitles={TITLES} step={step} totalSteps={STEPS} />
|
|
60
56
|
)}
|
|
61
57
|
<div className="py-lg px-5xl mt-2xs bg-white col-span-12">
|
|
62
58
|
<CreditCardFormStep
|
|
@@ -15,6 +15,7 @@ type CreditCardFormStatusProps = UniBlockProps & {
|
|
|
15
15
|
title?: string;
|
|
16
16
|
description?: string;
|
|
17
17
|
interval?: number;
|
|
18
|
+
intervalExpireAction?: () => void;
|
|
18
19
|
sectionInfoTitle?: string;
|
|
19
20
|
sectionInfo?: (LabelProps & DescriptionProps)[];
|
|
20
21
|
sectionAdditionalTitle?: string;
|
|
@@ -34,6 +35,9 @@ export const CreditCardFormStatus = JSX<CreditCardFormStatusProps>(
|
|
|
34
35
|
sectionInfoAdditional,
|
|
35
36
|
buttonText,
|
|
36
37
|
interval,
|
|
38
|
+
intervalExpireAction = () => {
|
|
39
|
+
return;
|
|
40
|
+
},
|
|
37
41
|
...props
|
|
38
42
|
}) => (
|
|
39
43
|
<BlockWrapper {...props}>
|
|
@@ -46,7 +50,9 @@ export const CreditCardFormStatus = JSX<CreditCardFormStatusProps>(
|
|
|
46
50
|
padding="p-xl"
|
|
47
51
|
className="w-full"
|
|
48
52
|
/>
|
|
49
|
-
{interval ?
|
|
53
|
+
{interval ? (
|
|
54
|
+
<TimerCircle interval={interval} intervalExpireAction={intervalExpireAction} />
|
|
55
|
+
) : null}
|
|
50
56
|
</div>
|
|
51
57
|
<SectionInfo title={sectionInfoTitle} items={sectionInfo} />
|
|
52
58
|
<SectionInfo title={sectionAdditionalTitle} items={sectionInfoAdditional} countColumns />
|
|
@@ -2,6 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { getTaskStatus, STATUS_TYPE } from '../../api/RetailAPI/getTaskStatus';
|
|
4
4
|
import { sendSignalToProcess, type SignalType } from '../../api/RetailAPI/sendSignalToProcess';
|
|
5
|
+
import { useInterval } from '../../hooks/useInterval';
|
|
5
6
|
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
6
7
|
import { type VNode } from '../../model/VNode';
|
|
7
8
|
import { FailedStatusContent } from './FailedStatusContent';
|
|
@@ -24,25 +25,30 @@ export const CreditCardFormStatusTracker = JSX(() => {
|
|
|
24
25
|
await sendSignalToProcess({ signalType, taskId });
|
|
25
26
|
}
|
|
26
27
|
})();
|
|
28
|
+
}, [taskId]);
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
const trackStatus = useCallback(
|
|
31
|
+
async (stopInterval: () => void) => {
|
|
29
32
|
const res = await getTaskStatus({ taskId });
|
|
30
33
|
|
|
31
34
|
if (res && res?.statusCd !== STATUS_TYPE.process) {
|
|
32
|
-
|
|
35
|
+
stopInterval();
|
|
33
36
|
setStatus(res.statusCd);
|
|
34
37
|
}
|
|
35
|
-
},
|
|
38
|
+
},
|
|
39
|
+
[taskId],
|
|
40
|
+
);
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
}, []);
|
|
42
|
+
useInterval(trackStatus, 30000);
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
const handleExpire = () => setStatus(STATUS_TYPE.rework);
|
|
45
|
+
|
|
46
|
+
return renderStatus(status, handleExpire);
|
|
41
47
|
});
|
|
42
48
|
|
|
43
|
-
const renderStatus = (status: STATUS_TYPE) => {
|
|
49
|
+
const renderStatus = (status: STATUS_TYPE, handleExpire: () => void) => {
|
|
44
50
|
const statusesMap: Record<STATUS_TYPE, VNode> = {
|
|
45
|
-
IN_PROCESS: <PendingStatusContent />,
|
|
51
|
+
IN_PROCESS: <PendingStatusContent handleExpireTimer={handleExpire} />,
|
|
46
52
|
CANCELLED: <FailedStatusContent />,
|
|
47
53
|
APPROVED: <SuccessStatusContent />,
|
|
48
54
|
REVISION: <ReworkStatusContent />,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
2
|
import { useForm } from '../../hooks/useForm';
|
|
4
3
|
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
5
4
|
import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
|
|
6
5
|
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
7
|
-
import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
|
|
8
6
|
import { CreditCardFormStatusTracker } from './CreditCardFormStatusTracker';
|
|
9
7
|
import { getInitialFormState } from './getInitialFormState';
|
|
10
|
-
import { renderStep
|
|
8
|
+
import { renderStep } from './renderStep';
|
|
11
9
|
import { StepsNavigationButtons } from './StepsNavigationButtons';
|
|
12
10
|
import { useCreditCardFormAPI } from './useCreditCardFormAPI';
|
|
13
11
|
|
|
@@ -25,14 +23,8 @@ export const CreditCardFormStep = JSX<CreditCardFormStepProps>(
|
|
|
25
23
|
const [localStorageData, saveStep] = useLocalStorage<Record<string, any>>('leadForm');
|
|
26
24
|
const initialState = getInitialFormState(step, localStorageData);
|
|
27
25
|
|
|
28
|
-
const customSubmit = useRef<CustomSubmit | undefined>(undefined);
|
|
29
|
-
|
|
30
26
|
const inputs = (sections?.flatMap((_: SectionsProps) => _?.inputs) || []) as FieldDef[];
|
|
31
27
|
|
|
32
|
-
const registerSubmit = useCallback((submit?: CustomSubmit) => {
|
|
33
|
-
customSubmit.current = submit;
|
|
34
|
-
}, []);
|
|
35
|
-
|
|
36
28
|
const { handleSubmit } = useCreditCardFormAPI({
|
|
37
29
|
step,
|
|
38
30
|
inputs,
|
|
@@ -42,21 +34,14 @@ export const CreditCardFormStep = JSX<CreditCardFormStepProps>(
|
|
|
42
34
|
});
|
|
43
35
|
|
|
44
36
|
const [, { field, onSubmit }] = useForm(initialState, {
|
|
45
|
-
onSubmit:
|
|
46
|
-
handleSubmit({ ...formData, ...customSubmit.current?.(ev) } as FormState);
|
|
47
|
-
},
|
|
37
|
+
onSubmit: handleSubmit,
|
|
48
38
|
});
|
|
49
39
|
|
|
50
40
|
return isFormFinished ? (
|
|
51
41
|
<CreditCardFormStatusTracker />
|
|
52
42
|
) : (
|
|
53
43
|
<form onSubmit={onSubmit} className="space-y-m">
|
|
54
|
-
{renderStep({
|
|
55
|
-
sections,
|
|
56
|
-
field,
|
|
57
|
-
step,
|
|
58
|
-
registerSubmit,
|
|
59
|
-
})}
|
|
44
|
+
{renderStep({ sections, field, step })}
|
|
60
45
|
<StepsNavigationButtons step={step} onPrevStep={onPrevStep} />
|
|
61
46
|
</form>
|
|
62
47
|
);
|