@redneckz/wildless-cms-uni-blocks 0.14.729 → 0.14.731
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +32 -44
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
- package/bundle/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
- package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
- package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
- package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/bundle/components/CreditCardForm/renderInfo.d.ts +2 -2
- package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/bundle/components/CreditForm/CreditFormStep.d.ts +2 -2
- package/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -2
- package/bundle/components/CreditForm/renderInfo.d.ts +2 -2
- package/bundle/components/CreditForm/renderInputs.d.ts +2 -2
- package/bundle/components/CreditForm/renderStep.d.ts +2 -2
- package/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/bundle/model/FormTypeFieldDef.d.ts +2 -0
- package/bundle/model/InputSectionsType.d.ts +10 -1
- package/bundle/services/retail/model/RetailFormContent.d.ts +1 -17
- package/bundle/services/retail/utils/calculateInputs.d.ts +3 -2
- package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
- package/bundle/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
- package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/bundle/ui-kit/FormField/getObjectValidator.d.ts +1 -1
- package/bundle/ui-kit/FormField/getPremium.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
- package/dist/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +2 -2
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +6 -35
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/renderInputs.js +2 -2
- package/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
- package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/renderInfo.d.ts +2 -2
- package/dist/components/CreditCardForm/renderInfo.js.map +1 -1
- package/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +2 -2
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.d.ts +2 -2
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/renderInfo.d.ts +2 -2
- package/dist/components/CreditForm/renderInfo.js.map +1 -1
- package/dist/components/CreditForm/renderInputs.d.ts +2 -2
- package/dist/components/CreditForm/renderStep.d.ts +2 -2
- package/dist/components/CreditForm/renderStep.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/dist/model/FormTypeFieldDef.d.ts +2 -0
- package/dist/model/FormTypeFieldDef.js +2 -0
- package/dist/model/FormTypeFieldDef.js.map +1 -0
- package/dist/model/InputSectionsType.d.ts +10 -1
- package/dist/services/retail/model/RetailFormContent.d.ts +1 -17
- package/dist/services/retail/model/RetailFormContent.js +0 -2
- package/dist/services/retail/model/RetailFormContent.js.map +1 -1
- package/dist/services/retail/utils/calculateInputs.d.ts +3 -2
- package/dist/services/retail/utils/calculateInputs.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePickerInput.js +21 -7
- package/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/dist/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
- package/dist/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.d.ts +1 -1
- package/dist/ui-kit/FormField/getPremium.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
- package/lib/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +2 -2
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +6 -35
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/renderInputs.js +2 -2
- package/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
- package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/renderInfo.d.ts +2 -2
- package/lib/components/CreditCardForm/renderInfo.js.map +1 -1
- package/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +2 -2
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.d.ts +2 -2
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/renderInfo.d.ts +2 -2
- package/lib/components/CreditForm/renderInfo.js.map +1 -1
- package/lib/components/CreditForm/renderInputs.d.ts +2 -2
- package/lib/components/CreditForm/renderStep.d.ts +2 -2
- package/lib/components/CreditForm/renderStep.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/lib/model/FormTypeFieldDef.d.ts +2 -0
- package/lib/model/FormTypeFieldDef.js +2 -0
- package/lib/model/FormTypeFieldDef.js.map +1 -0
- package/lib/model/InputSectionsType.d.ts +10 -1
- package/lib/services/retail/model/RetailFormContent.d.ts +1 -17
- package/lib/services/retail/model/RetailFormContent.js +0 -2
- package/lib/services/retail/model/RetailFormContent.js.map +1 -1
- package/lib/services/retail/utils/calculateInputs.d.ts +3 -2
- package/lib/services/retail/utils/calculateInputs.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePickerInput.js +21 -7
- package/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/lib/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
- package/lib/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.d.ts +1 -1
- package/lib/ui-kit/FormField/getPremium.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +32 -44
- 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 +3 -60
- package/mobile/bundle/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
- package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
- package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/renderInfo.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/renderInfo.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/renderStep.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +2 -0
- package/mobile/bundle/model/InputSectionsType.d.ts +10 -1
- package/mobile/bundle/services/retail/model/RetailFormContent.d.ts +1 -17
- package/mobile/bundle/services/retail/utils/calculateInputs.d.ts +3 -2
- package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
- package/mobile/bundle/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/getObjectValidator.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/getPremium.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +2 -2
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +6 -35
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderInputs.js +2 -2
- package/mobile/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderInfo.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/renderInfo.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +2 -2
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderInfo.d.ts +2 -2
- package/mobile/dist/components/CreditForm/renderInfo.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -2
- package/mobile/dist/components/CreditForm/renderStep.d.ts +2 -2
- package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/mobile/dist/model/FormTypeFieldDef.d.ts +2 -0
- package/mobile/dist/model/FormTypeFieldDef.js +2 -0
- package/mobile/dist/model/FormTypeFieldDef.js.map +1 -0
- package/mobile/dist/model/InputSectionsType.d.ts +10 -1
- package/mobile/dist/services/retail/model/RetailFormContent.d.ts +1 -17
- package/mobile/dist/services/retail/model/RetailFormContent.js +0 -2
- package/mobile/dist/services/retail/model/RetailFormContent.js.map +1 -1
- package/mobile/dist/services/retail/utils/calculateInputs.d.ts +3 -2
- package/mobile/dist/services/retail/utils/calculateInputs.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js +21 -7
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
- package/mobile/dist/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getPremium.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +2 -2
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +6 -35
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderInputs.js +2 -2
- package/mobile/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderInfo.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/renderInfo.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +2 -2
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderInfo.d.ts +2 -2
- package/mobile/lib/components/CreditForm/renderInfo.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -2
- package/mobile/lib/components/CreditForm/renderStep.d.ts +2 -2
- package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/mobile/lib/model/FormTypeFieldDef.d.ts +2 -0
- package/mobile/lib/model/FormTypeFieldDef.js +2 -0
- package/mobile/lib/model/FormTypeFieldDef.js.map +1 -0
- package/mobile/lib/model/InputSectionsType.d.ts +10 -1
- package/mobile/lib/services/retail/model/RetailFormContent.d.ts +1 -17
- package/mobile/lib/services/retail/model/RetailFormContent.js +0 -2
- package/mobile/lib/services/retail/model/RetailFormContent.js.map +1 -1
- package/mobile/lib/services/retail/utils/calculateInputs.d.ts +3 -2
- package/mobile/lib/services/retail/utils/calculateInputs.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js +21 -7
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
- package/mobile/lib/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getPremium.d.ts +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -22
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -2
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +4 -72
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +48 -54
- package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -43
- package/mobile/src/components/ApplicationLeadForm/renderInputs.tsx +5 -5
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +2 -2
- package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +4 -5
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +4 -3
- package/mobile/src/components/CreditCardForm/renderInfo.tsx +2 -2
- package/mobile/src/components/CreditCardForm/renderInputs.tsx +2 -2
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -2
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +4 -4
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +2 -2
- package/mobile/src/components/CreditForm/renderInfo.tsx +2 -2
- package/mobile/src/components/CreditForm/renderInputs.tsx +2 -2
- package/mobile/src/components/CreditForm/renderStep.tsx +2 -2
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +2 -2
- package/mobile/src/model/FormTypeFieldDef.ts +20 -0
- package/mobile/src/model/InputSectionsType.ts +12 -1
- package/mobile/src/services/retail/model/RetailFormContent.ts +1 -42
- package/mobile/src/services/retail/utils/calculateInputs.ts +3 -2
- package/mobile/src/ui-kit/DatePicker/DatePickerInput.tsx +37 -7
- package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +6 -5
- package/mobile/src/ui-kit/FormField/Fields/AddressBranchField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/EmailField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/getConsentDataProcessing.tsx +1 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +3 -5
- package/mobile/src/ui-kit/FormField/getNamesFromInput.tsx +1 -1
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
- package/mobile/src/ui-kit/FormField/getPremium.tsx +2 -2
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -22
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -2
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +4 -72
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +48 -54
- package/src/components/ApplicationLeadForm/applicationFormData.tsx +2 -2
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -43
- package/src/components/ApplicationLeadForm/renderInputs.tsx +5 -5
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -2
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +2 -2
- package/src/components/CreditCardForm/CreditCardFormContent.ts +4 -5
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +4 -3
- package/src/components/CreditCardForm/renderInfo.tsx +2 -2
- package/src/components/CreditCardForm/renderInputs.tsx +2 -2
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -2
- package/src/components/CreditForm/CreditFormStep.tsx +4 -4
- package/src/components/CreditForm/creditFormStepsData.tsx +2 -2
- package/src/components/CreditForm/renderInfo.tsx +2 -2
- package/src/components/CreditForm/renderInputs.tsx +2 -2
- package/src/components/CreditForm/renderStep.tsx +2 -2
- package/src/components/CreditForm/useCreditFormAPI.tsx +2 -2
- package/src/model/FormTypeFieldDef.ts +20 -0
- package/src/model/InputSectionsType.ts +12 -1
- package/src/services/retail/model/RetailFormContent.ts +1 -42
- package/src/services/retail/utils/calculateInputs.ts +3 -2
- package/src/ui-kit/DatePicker/DatePickerInput.tsx +37 -7
- package/src/ui-kit/FormField/CustomFieldProps.ts +6 -5
- package/src/ui-kit/FormField/Fields/AddressBranchField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/EmailField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +1 -1
- package/src/ui-kit/FormField/getConsentDataProcessing.tsx +1 -1
- package/src/ui-kit/FormField/getField.tsx +3 -5
- package/src/ui-kit/FormField/getNamesFromInput.tsx +1 -1
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
- package/src/ui-kit/FormField/getPremium.tsx +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateInputs.js","sourceRoot":"","sources":["../../../../src/services/retail/utils/calculateInputs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"calculateInputs.js","sourceRoot":"","sources":["../../../../src/services/retail/utils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C,EAAE,IAAI,EAAY,EAAE,QAAkB,EAAE,EAAE,CAClE,IAAI,KAAK,aAAa,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,SAAS,EAAY,EAAE,QAAkB,EAAE,EAAE,CAC5E,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QAC5B,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,EAAE,IAA2B,CAAC,CAAC;QAEnE,OAAO,CAAC,KAAK,CAAE,SAAoB,EAAE,GAAG,IAAI,SAAS,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AAEL,MAAM,kBAAkB,GAAG,CAAC,EAAE,IAAI,EAAY,EAAE,QAAkB,EAAE,EAAE,CACpE,IAAI,KAAK,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAE,EAAE,CAC7C,QAAQ,CAAC,oBAAoB,CAAC,EAAE,GAAG,KAAK,iBAAiB,CAAC"}
|
|
@@ -22,10 +22,7 @@ export const DatePickerInput = JSX(({ setSelectedMonth, setSelectedYear, classNa
|
|
|
22
22
|
};
|
|
23
23
|
const onBlur = () => {
|
|
24
24
|
if (checkIsValidDate(inputValue)) {
|
|
25
|
-
|
|
26
|
-
onChange?.(new Date(Number(year), Number(month) - 1, Number(day)));
|
|
27
|
-
setSelectedMonth(Number(month) - 1);
|
|
28
|
-
setSelectedYear(Number(year));
|
|
25
|
+
updateSelectedDate({ inputValue, setSelectedMonth, setSelectedYear, onChange });
|
|
29
26
|
}
|
|
30
27
|
else {
|
|
31
28
|
setInputValue(value || '');
|
|
@@ -40,6 +37,9 @@ export const DatePickerInput = JSX(({ setSelectedMonth, setSelectedYear, classNa
|
|
|
40
37
|
useEffect(() => {
|
|
41
38
|
setInputValue(value || '');
|
|
42
39
|
}, [value]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
updateSelectedDate({ inputValue, setSelectedMonth, setSelectedYear, onChange });
|
|
42
|
+
}, [inputValue]);
|
|
43
43
|
return (_jsxs("div", { onClick: onInputClick, className: style('relative', className), children: [_jsx("input", { ref: ref, className: "h-full w-full px-m text-l text-black focus-visible:outline-none", value: inputValue, type: "text", onChange: handleChange, onBlur: onBlur, disabled: disabled }), disabled ? null : _jsx(Icon, { className: "mr-s", ...ICON_PROPS })] }));
|
|
44
44
|
});
|
|
45
45
|
const isValidYear = (year) => Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
|
|
@@ -54,11 +54,25 @@ const checkIsValidDate = (date) => {
|
|
|
54
54
|
currentDate.setDate(currentDate.getDate() + 1);
|
|
55
55
|
maxDateOfMonth++;
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
57
|
+
return Number(day) > 0 && Number(day) <= maxDateOfMonth;
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
return false;
|
|
63
61
|
};
|
|
62
|
+
const parseDate = (inputValue) => {
|
|
63
|
+
const [dayStr, monthStr, yearStr] = inputValue.split('.');
|
|
64
|
+
return {
|
|
65
|
+
day: Number(dayStr),
|
|
66
|
+
month: Number(monthStr) - 1,
|
|
67
|
+
year: Number(yearStr),
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
const updateSelectedDate = ({ inputValue, setSelectedMonth, setSelectedYear, onChange, }) => {
|
|
71
|
+
if (checkIsValidDate(inputValue)) {
|
|
72
|
+
const { day, month, year } = parseDate(inputValue);
|
|
73
|
+
setSelectedMonth(month);
|
|
74
|
+
setSelectedYear(year);
|
|
75
|
+
onChange?.(new Date(year, month, day));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
64
78
|
//# sourceMappingURL=DatePickerInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerInput.js","sourceRoot":"","sources":["../../../src/ui-kit/DatePicker/DatePickerInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,UAAU,GAAgF;IAC9F,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePickerInput.js","sourceRoot":"","sources":["../../../src/ui-kit/DatePicker/DatePickerInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,UAAU,GAAgF;IAC9F,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACb,CAAC;AAmBF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAChC,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IACvF,M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;gBAC/C,cAAc,EAAE,CAAC;aAClB;YAED,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC;SACzD;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,UAAkB,EAAE,EAAE;IACvC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1D,OAAO;QACL,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC3B,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC;KACtB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,EAC1B,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,QAAQ,GACgB,EAAE,EAAE;IAC5B,IAAI,gBAAgB,CAAC,UAAU,CAAC,EAAE;QAChC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACxB,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;KACxC;AACH,CAAC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
|
|
1
2
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
|
-
import { type
|
|
3
|
+
import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
|
|
3
4
|
export interface CustomFieldProps {
|
|
4
5
|
field: FormFieldRegisterer<any>;
|
|
5
6
|
input?: FieldDef;
|
|
6
7
|
url?: string;
|
|
7
8
|
params?: Record<string, any>;
|
|
8
|
-
|
|
9
|
+
}
|
|
10
|
+
export interface CustomFieldPropsWithTypeForm extends CustomFieldProps {
|
|
11
|
+
typeForm?: FormTypeFieldDef;
|
|
9
12
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
|
|
2
2
|
export declare const getConsentDataProcessing: (inputs: FieldDef[]) => FieldDef | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getField.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/getField.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"getField.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/getField.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAA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K,GAAI;IAC7D,GAAG,EAAE,CAAC,KAAuB,EAAE,EAAE,CAAC,KAAC,QAAQ,OAAK,KAAK,GAAI;IACzD,OAAO,EAAE,CAAC,KAAuB,EAAE,EAAE,CAAC,KAAC,YAAY,OAAK,KAAK,GAAI;CAClE,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GACnB,CACE,KAA+B,EAC/B,MAA4B,EAC5B,iBAAwC,EAAE,EAC1C,EAAE,CACJ,CAAC,KAAe,EAAE,CAAS,EAAE,EAAE;IAC7B,MAAM,eAAe,GAAG;QACtB,GAAG,SAAS;QACZ,GAAG,cAAc;KAClB,CAAC;IAEF,OAAO,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CACvC,wBAAsB,eAAe,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,IAA1E,MAAM,CAAC,CAAC,CAAC,CAAwE,CAC5F,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type FieldDef } from '../../
|
|
1
|
+
import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
|
|
2
2
|
export declare const getNamesFromInput: (inputs: FieldDef[]) => (import("./NameFieldDef").NameFieldDef | undefined)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FieldDef } from '../../
|
|
1
|
+
import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
|
|
2
2
|
import { type Validator } from '../../validation/validator';
|
|
3
3
|
export declare const validatorObj: Record<string, Validator>;
|
|
4
4
|
export declare const getObjectValidator: (inputs: FieldDef[]) => Record<string, Validator>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const getPremium: (typeForm?:
|
|
1
|
+
import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
|
|
2
|
+
export declare const getPremium: (typeForm?: FormTypeFieldDef) => boolean;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
5
5
|
import { type ColumnsCount } from '../../model/ColumnCount';
|
|
6
|
+
import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
|
|
6
7
|
import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
7
8
|
import { type InputSectionsType } from '../../model/InputSectionsType';
|
|
8
9
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
@@ -83,27 +84,6 @@ export type FieldInfoDef = FieldDefaultDef &
|
|
|
83
84
|
|
|
84
85
|
export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
|
|
85
86
|
|
|
86
|
-
/** @hidden */
|
|
87
|
-
export type TypeFormFieldDef =
|
|
88
|
-
| ''
|
|
89
|
-
| 'ACQR'
|
|
90
|
-
| 'ANALITIC'
|
|
91
|
-
| 'ANTIFRAUD'
|
|
92
|
-
| 'BCRD'
|
|
93
|
-
| 'BROK'
|
|
94
|
-
| 'BROKACCOUNT'
|
|
95
|
-
| 'COLLECTION'
|
|
96
|
-
| 'CORRUPTION'
|
|
97
|
-
| 'CRED'
|
|
98
|
-
| 'DPST'
|
|
99
|
-
| 'PRODUCT'
|
|
100
|
-
| 'SELFCOLLECTION'
|
|
101
|
-
| 'KVED'
|
|
102
|
-
| 'ULTRASERVICE'
|
|
103
|
-
| 'FEEDBACK'
|
|
104
|
-
| 'FEEDBACK_QS'
|
|
105
|
-
| 'OUTSERVICE';
|
|
106
|
-
|
|
107
87
|
/** @hidden */
|
|
108
88
|
export type EndpointType = 'lead' | 'sendcorporatelead';
|
|
109
89
|
|
|
@@ -157,7 +137,7 @@ export type ApplicationFormContent = UniBlockContent &
|
|
|
157
137
|
/** @default "" */
|
|
158
138
|
target?: Target;
|
|
159
139
|
};
|
|
160
|
-
typeForm?:
|
|
140
|
+
typeForm?: FormTypeFieldDef;
|
|
161
141
|
endpoint?: EndpointType;
|
|
162
142
|
/** @title Дополнительные параметры формы */
|
|
163
143
|
additionalParams?: additionalParamsType;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useForm } from '../../hooks/useForm';
|
|
4
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
4
5
|
import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
|
|
5
6
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
6
7
|
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
@@ -10,7 +11,7 @@ import { ResponseTypeDialog } from '../../ui-kit/ResponseTypeDialog/ResponseType
|
|
|
10
11
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
11
12
|
import { style } from '../../utils/style';
|
|
12
13
|
import { applicationFormData } from './applicationFormData';
|
|
13
|
-
import { type ApplicationLeadFormContent
|
|
14
|
+
import { type ApplicationLeadFormContent } from './ApplicationLeadFormContent';
|
|
14
15
|
import { renderInputs } from './renderInputs';
|
|
15
16
|
import { renderSubmitButton } from './renderSubmitButton';
|
|
16
17
|
import { useApplicationLeadApi } from './useApplicationLeadApi';
|
|
@@ -21,7 +22,7 @@ interface ApplicationLeadFormProps extends ApplicationLeadFormContent, UniBlockP
|
|
|
21
22
|
export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
22
23
|
({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
|
|
23
24
|
const inputs = useMemo(
|
|
24
|
-
() => (applicationFormData?.flatMap((_) => _?.inputs) || []) as
|
|
25
|
+
() => (applicationFormData?.flatMap((_) => _?.inputs) || []) as FieldRetailDef[],
|
|
25
26
|
[applicationFormData],
|
|
26
27
|
);
|
|
27
28
|
|
|
@@ -1,87 +1,19 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import { type InputRetailSectionsType } from '../../model/InputSectionsType';
|
|
3
3
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
4
|
-
import { type NameFieldDef } from '../../ui-kit/FormField/NameFieldDef';
|
|
5
|
-
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
/** @title Обязательно для заполнения */
|
|
9
|
-
required?: boolean;
|
|
10
|
-
}
|
|
5
|
+
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
11
6
|
|
|
12
7
|
export type SubmitButtonProps = TextProps & {
|
|
13
8
|
version?: LinkButtonVersion;
|
|
14
9
|
};
|
|
15
10
|
|
|
16
|
-
export type ConditionFieldProps = {
|
|
17
|
-
/** @title Условия отображения полей формы */
|
|
18
|
-
condition?: {
|
|
19
|
-
name: NameFieldDef;
|
|
20
|
-
/** @title Значения при которых отображаются поля */
|
|
21
|
-
values: string[];
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type FilledByEsiaProps = {
|
|
26
|
-
/** @title Заполняется через госуслуги */
|
|
27
|
-
filledByEsia?: boolean;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type FieldDefaultDef = Required &
|
|
31
|
-
TextProps &
|
|
32
|
-
LabelProps &
|
|
33
|
-
ConditionFieldProps &
|
|
34
|
-
FilledByEsiaProps & {
|
|
35
|
-
name?: NameFieldDef;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @title Поля ввода по умолчанию
|
|
40
|
-
* @default {"fieldType": "common"}
|
|
41
|
-
*/
|
|
42
|
-
export type FieldCommonDef = FieldDefaultDef & {
|
|
43
|
-
/** @default "common" */
|
|
44
|
-
fieldType: 'common';
|
|
45
|
-
dadata?: boolean;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @title Значение по умолчанию
|
|
50
|
-
* @enumNames ["Валютный контроль","Документарные операции","Конверсионные операции","Иные вопросы ВЭД"]
|
|
51
|
-
*/
|
|
52
|
-
type VedTypes = 'currencyControl' | 'documentOperations' | 'conversionTransactions' | 'otherIssues';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @title Поле ввода ВЭД
|
|
56
|
-
* @default {"fieldType": "ved", "name": "vedTypes", "defaultValue": "currencyControl"}
|
|
57
|
-
*/
|
|
58
|
-
export type FieldVedDef = FieldDefaultDef & {
|
|
59
|
-
/** @default "ved" */
|
|
60
|
-
fieldType: 'ved';
|
|
61
|
-
defaultValue?: VedTypes;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @title Текст для отображения в карточке информации
|
|
66
|
-
* @default {"fieldType": "info"}
|
|
67
|
-
*/
|
|
68
|
-
export type FieldInfoDef = FieldDefaultDef & {
|
|
69
|
-
/** @default "info" */
|
|
70
|
-
fieldType: 'info';
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @title Поле
|
|
75
|
-
* @default { "fieldType": "common" }
|
|
76
|
-
*/
|
|
77
|
-
export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
|
|
78
|
-
|
|
79
11
|
/**
|
|
80
12
|
* @title Форма заявки настраиваемая
|
|
81
13
|
*/
|
|
82
14
|
export type ApplicationLeadFormContent = UniBlockContent &
|
|
83
15
|
TitleProps &
|
|
84
|
-
|
|
16
|
+
InputRetailSectionsType & {
|
|
85
17
|
/** @title Кнопка */
|
|
86
18
|
button?: SubmitButtonProps;
|
|
87
19
|
/** @title Номер кредитной программы */
|
|
@@ -3,10 +3,7 @@ import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { type FormFieldRegisterer, type VNode } from '../../services/retail/external/types';
|
|
4
4
|
import { InputsConsentsMap } from '../../services/retail/inputs';
|
|
5
5
|
import { type LeadFormState } from '../../services/retail/model/LeadFormState';
|
|
6
|
-
import {
|
|
7
|
-
type FieldDef,
|
|
8
|
-
type TypeFormFieldDef,
|
|
9
|
-
} from '../../services/retail/model/RetailFormContent';
|
|
6
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
10
7
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
11
8
|
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
12
9
|
import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
|
|
@@ -18,66 +15,63 @@ import { renderErrorText } from '../../ui-kit/Input/renderErrorText';
|
|
|
18
15
|
import { withValidator } from '../../validation/withValidator';
|
|
19
16
|
|
|
20
17
|
export interface GroupedConsentsProps {
|
|
21
|
-
inputs?:
|
|
22
|
-
typeForm?: TypeFormFieldDef;
|
|
18
|
+
inputs?: FieldRetailDef[];
|
|
23
19
|
field: FormFieldRegisterer<LeadFormState>;
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
const CONSENT_ALL_DOCS_TEXT = 'Согласие на все документы';
|
|
27
23
|
const CONSENT_REQUIRED = 'Отметьте все обязательные соглашения';
|
|
28
24
|
|
|
29
|
-
export const GroupedConsents = JSX<GroupedConsentsProps>(
|
|
30
|
-
|
|
31
|
-
const isChecked = inputs.every((_) => Boolean(field(_.name as keyof LeadFormState).value));
|
|
25
|
+
export const GroupedConsents = JSX<GroupedConsentsProps>(({ inputs = [], field, key }) => {
|
|
26
|
+
const isChecked = inputs.every((_) => Boolean(field(_.name as keyof LeadFormState).value));
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
const handleGeneralToggle = (value: boolean) => {
|
|
29
|
+
for (const item of inputs) {
|
|
30
|
+
const itemField = field(item.name as keyof LeadFormState);
|
|
31
|
+
itemField?.onChange && itemField.onChange(value);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
),
|
|
35
|
+
const hasValidationErrors = useMemo(
|
|
36
|
+
() =>
|
|
37
|
+
inputs
|
|
38
|
+
?.filter((_) => _.required)
|
|
39
|
+
?.some((_) =>
|
|
40
|
+
Boolean(
|
|
41
|
+
withValidator(
|
|
42
|
+
field(_?.name as keyof LeadFormState),
|
|
43
|
+
validatorObj[_?.name as keyof LeadFormState],
|
|
44
|
+
).error,
|
|
51
45
|
),
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
),
|
|
47
|
+
[inputs],
|
|
48
|
+
);
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
50
|
+
return (
|
|
51
|
+
<div className="w-fit">
|
|
52
|
+
<Foldable
|
|
53
|
+
isFoldButtonOnTop
|
|
54
|
+
unfoldedByDefault
|
|
55
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
56
|
+
<FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
|
|
57
|
+
{inputs.map(getField(field, {}, InputsConsentsMap))}
|
|
58
|
+
</FoldableSection>
|
|
59
|
+
)}
|
|
60
|
+
renderFoldButton={renderGeneralCheckbox(
|
|
61
|
+
<div>
|
|
62
|
+
<Checkbox
|
|
63
|
+
value={isChecked}
|
|
64
|
+
onChange={handleGeneralToggle}
|
|
65
|
+
text={CONSENT_ALL_DOCS_TEXT}
|
|
66
|
+
key={key}
|
|
67
|
+
/>
|
|
68
|
+
{renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')}
|
|
69
|
+
</div>,
|
|
70
|
+
)}
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
});
|
|
81
75
|
|
|
82
76
|
const renderGeneralCheckbox =
|
|
83
77
|
(generalCheckBox: VNode) =>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SectionsRetailProps } from '../../model/InputSectionsType';
|
|
2
2
|
|
|
3
|
-
export const applicationFormData:
|
|
3
|
+
export const applicationFormData: SectionsRetailProps[] = [
|
|
4
4
|
{
|
|
5
5
|
columns: 2,
|
|
6
6
|
inputs: [
|
|
@@ -1,64 +1,29 @@
|
|
|
1
1
|
import type { LeadFormState } from '../../services/retail/model/LeadFormState';
|
|
2
|
-
import {
|
|
3
|
-
FEEDBACK_METHOD,
|
|
4
|
-
SERVICE_DIRECTIONS,
|
|
5
|
-
SERVICE_TYPES,
|
|
6
|
-
} from '../../ui-kit/FormField/constants';
|
|
7
|
-
import { ACQUIRING_TYPES } from '../../ui-kit/FormField/Fields/AcquiringField';
|
|
8
|
-
import { VED_TYPES } from '../../ui-kit/FormField/Fields/VedField';
|
|
9
|
-
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
2
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
10
3
|
|
|
11
4
|
const initialFormState = {
|
|
12
|
-
typeForm: '',
|
|
13
|
-
region: { key: '', text: '' },
|
|
14
5
|
surname: '',
|
|
15
6
|
name: '',
|
|
16
|
-
|
|
17
|
-
secondaryPhone: '',
|
|
18
|
-
organizationPhone: '',
|
|
19
|
-
comment: '',
|
|
20
|
-
product: '',
|
|
21
|
-
partnerComments: '',
|
|
22
|
-
annualRevenue: '',
|
|
23
|
-
term: 12,
|
|
24
|
-
amount: 100000,
|
|
25
|
-
acquiringType: ACQUIRING_TYPES[0],
|
|
26
|
-
serviceType: SERVICE_TYPES[0],
|
|
27
|
-
feedbackMethod: FEEDBACK_METHOD[0],
|
|
28
|
-
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
29
|
-
vedTypes: VED_TYPES[0],
|
|
7
|
+
middleName: '',
|
|
30
8
|
limitedBirthday: undefined,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
posTerminal: false,
|
|
34
|
-
consentDataProcessing: false,
|
|
9
|
+
phone: '',
|
|
10
|
+
email: '',
|
|
35
11
|
processPersonalDataFlg: false,
|
|
36
12
|
consentProviderFlg: false,
|
|
37
13
|
consentOthersFlg: false,
|
|
38
14
|
consentInformFlg: false,
|
|
39
|
-
|
|
40
|
-
participantDateRegistration: undefined,
|
|
41
|
-
currency: '',
|
|
42
|
-
paymentSystem: { name: '', type: '' },
|
|
43
|
-
cardCategory: { key: '', text: '' },
|
|
44
|
-
codeWord: '',
|
|
45
|
-
addressRetail: { key: '', text: '' },
|
|
15
|
+
consentPfrFlg: false,
|
|
46
16
|
};
|
|
47
17
|
|
|
48
18
|
export const getInitialFormState = (
|
|
49
|
-
inputs:
|
|
19
|
+
inputs: FieldRetailDef[],
|
|
50
20
|
savedForm: LeadFormState | null,
|
|
51
21
|
): LeadFormState => {
|
|
52
22
|
if (savedForm) {
|
|
53
23
|
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
54
24
|
}
|
|
55
25
|
|
|
56
|
-
const formState = Object.fromEntries(
|
|
57
|
-
inputs.map((_) => [
|
|
58
|
-
_.name,
|
|
59
|
-
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
|
|
60
|
-
]),
|
|
61
|
-
);
|
|
26
|
+
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
62
27
|
|
|
63
|
-
return { ...formState
|
|
28
|
+
return { ...formState };
|
|
64
29
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { InputsApplicationLeadMap } from '../../services/retail/inputs';
|
|
2
|
-
import { type
|
|
2
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
3
3
|
import { getField } from '../../ui-kit/FormField/getField';
|
|
4
4
|
import { CONSENTS } from './consents';
|
|
5
5
|
import { GroupedConsents, type GroupedConsentsProps } from './GroupedConsents';
|
|
6
6
|
|
|
7
|
-
export const renderInputs = ({ field,
|
|
7
|
+
export const renderInputs = ({ field, inputs }: GroupedConsentsProps) => {
|
|
8
8
|
const { consentInputs, restInputs } = splitInputs(inputs || []);
|
|
9
9
|
|
|
10
10
|
return consentInputs.length > 2 ? (
|
|
11
11
|
<div>
|
|
12
|
-
{restInputs.map(getField(field, {
|
|
12
|
+
{restInputs.map(getField(field, {}, { ...InputsApplicationLeadMap }))}
|
|
13
13
|
<GroupedConsents inputs={consentInputs} field={field} />
|
|
14
14
|
</div>
|
|
15
15
|
) : (
|
|
16
|
-
(inputs || [])?.map(getField(field, {
|
|
16
|
+
(inputs || [])?.map(getField(field, {}, { ...InputsApplicationLeadMap }))
|
|
17
17
|
);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
const splitInputs = (inputs?:
|
|
20
|
+
const splitInputs = (inputs?: FieldRetailDef[]) => ({
|
|
21
21
|
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name || '')) || [],
|
|
22
22
|
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name || '')) || [],
|
|
23
23
|
});
|
|
@@ -7,6 +7,7 @@ import { getTaskById } from '../../api/RetailAPI/getTaskById';
|
|
|
7
7
|
import { updateUserProfile } from '../../api/RetailAPI/updateUserProfile';
|
|
8
8
|
import { updateUserTask } from '../../api/RetailAPI/updateUserTask';
|
|
9
9
|
import { type LeadFormState } from '../../services/retail/model/LeadFormState';
|
|
10
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
10
11
|
import { getUpdateUserProfileData } from '../../services/retail/utils/getUpdateUserProfile';
|
|
11
12
|
import { useConsentBkiDialog } from '../../ui-kit/ConsentBkiDialog/useConsentBkiDialog';
|
|
12
13
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
@@ -17,13 +18,12 @@ import { VerifyPhoneDialog } from '../../ui-kit/VerifyPhoneDialog/VerifyPhoneDia
|
|
|
17
18
|
import { formatPhone } from '../../utils/formatPhone';
|
|
18
19
|
import { objectValidator } from '../../validation/objectValidator';
|
|
19
20
|
import { isValidationSuccess } from '../../validation/validator';
|
|
20
|
-
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
21
21
|
import { CONSENTS } from './consents';
|
|
22
22
|
import { getLeadFormTaskData } from './getLeadFormTaskData';
|
|
23
23
|
import { useSaveUserData, type UserData } from './useSaveUserData';
|
|
24
24
|
|
|
25
25
|
interface ApplicationLeadApiProps {
|
|
26
|
-
inputs:
|
|
26
|
+
inputs: FieldRetailDef[];
|
|
27
27
|
programId: string;
|
|
28
28
|
nextStepLink: string;
|
|
29
29
|
}
|
|
@@ -4,14 +4,14 @@ import { updateProfileEsia } from '../../api/RetailAPI/updateProfileEsia';
|
|
|
4
4
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
5
5
|
import { useSetter } from '../../hooks/useSetter';
|
|
6
6
|
import { type LeadFormState } from '../../services/retail/model/LeadFormState';
|
|
7
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
7
8
|
import { safeJsonParse } from '../../utils/safeJsonParse';
|
|
8
|
-
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
9
9
|
import { getInitialFormState } from './getInitialFormState';
|
|
10
10
|
import { parseEsiaProfile } from './pasreEsiaProfile';
|
|
11
11
|
import { useLeadFormStore } from './useLeadFormStore';
|
|
12
12
|
|
|
13
13
|
export const useInitApplicationLead = (
|
|
14
|
-
inputs:
|
|
14
|
+
inputs: FieldRetailDef[],
|
|
15
15
|
nextStepLink: string,
|
|
16
16
|
): [LeadFormState, { isLoading: boolean }] => {
|
|
17
17
|
const navigator = locationNavigator();
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { type TitleProps } from '../../model/HeadlineType';
|
|
3
|
-
import { type InputSectionsType } from '../../model/InputSectionsType';
|
|
3
|
+
import { type InputSectionsType, type SectionsRetailProps } from '../../model/InputSectionsType';
|
|
4
4
|
import { type LeadFormState } from '../../services/retail/model/LeadFormState';
|
|
5
|
+
import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
|
|
5
6
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
6
|
-
import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
|
|
7
|
-
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
8
7
|
|
|
9
8
|
/** @hidden */
|
|
10
9
|
export interface RenderInputsProps {
|
|
11
|
-
inputs?:
|
|
10
|
+
inputs?: FieldRetailDef[];
|
|
12
11
|
field: FormFieldRegisterer<LeadFormState>;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
export type CreditCardSectionsProps =
|
|
14
|
+
export type CreditCardSectionsProps = SectionsRetailProps & {
|
|
16
15
|
type?: 'courier' | 'office';
|
|
17
16
|
};
|
|
18
17
|
|