@redneckz/wildless-cms-uni-blocks 0.14.697 → 0.14.699
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/model/EOrganizationActivityTypes.d.ts +23 -0
- package/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/bundle/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/bundle/bundle.umd.js +400 -265
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/bundle/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
- package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
- package/bundle/components/CreditCardForm/calculateInputs.d.ts +2 -2
- package/bundle/components/CreditCardForm/formStateMap.d.ts +2 -2
- package/bundle/components/CreditCardForm/getCardData.d.ts +2 -2
- package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
- package/bundle/components/CreditCardForm/getFifthStepData.d.ts +2 -2
- package/bundle/components/CreditCardForm/getFourthStepData.d.ts +2 -2
- package/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -2
- package/bundle/components/CreditCardForm/getSecondStepData.d.ts +2 -2
- package/bundle/components/CreditCardForm/getSixthStepData.d.ts +4 -4
- package/bundle/components/CreditCardForm/getThirdStepData.d.ts +2 -2
- package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/bundle/components/CreditCardForm/renderStep.d.ts +3 -3
- package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/bundle/components/CreditForm/calculateInputs.d.ts +2 -2
- package/bundle/components/CreditForm/formStateMap.d.ts +2 -2
- package/bundle/components/CreditForm/getCalcData.d.ts +2 -2
- package/bundle/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
- package/bundle/components/CreditForm/getFifthStepData.d.ts +2 -2
- package/bundle/components/CreditForm/getFirstStepData.d.ts +2 -2
- package/bundle/components/CreditForm/getFourthStepData.d.ts +2 -2
- package/bundle/components/CreditForm/getInitialFormState.d.ts +2 -2
- package/bundle/components/CreditForm/getSecondStepData.d.ts +2 -2
- package/bundle/components/CreditForm/getThirdStepData.d.ts +2 -2
- package/bundle/components/CreditForm/getZeroStepData.d.ts +2 -2
- package/bundle/components/CreditForm/renderInputs.d.ts +2 -2
- package/bundle/components/CreditForm/renderStep.d.ts +3 -3
- package/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/bundle/components/CreditForm/utils.d.ts +1 -1
- package/bundle/hooks/useCreditFormStore.d.ts +13 -0
- package/bundle/hooks/useLeadFormData.d.ts +1 -1
- package/bundle/hooks/useSetter.d.ts +2 -0
- package/bundle/ui-kit/DialogManager/useDialog.d.ts +4 -1
- package/bundle/ui-kit/FormField/SelectField.d.ts +1 -7
- package/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/bundle/ui-kit/FormField/validators.d.ts +1 -1
- package/bundle/ui-kit/Input/getValidStyle.d.ts +1 -0
- package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/bundle/utils/safeJsonParse.d.ts +1 -0
- package/dist/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/dist/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/dist/api/RetailAPI/model/LeadFormData.js +2 -0
- package/dist/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/dist/api/RetailAPI/utils/getOrganizationParams.js +101 -0
- package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/dist/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/dist/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -7
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/dist/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/dist/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/dist/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +11 -8
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
- package/dist/components/ApplicationLeadForm/useLeadFormStore.js +6 -0
- package/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
- package/dist/components/CreditCardForm/CreditCardForm.js +1 -2
- package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
- package/dist/components/CreditCardForm/calculateInputs.d.ts +2 -2
- package/dist/components/CreditCardForm/formStateMap.d.ts +2 -2
- package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/dist/components/CreditCardForm/getCardData.d.ts +2 -2
- package/dist/components/CreditCardForm/getCardData.js.map +1 -1
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/dist/components/CreditCardForm/getFifthStepData.d.ts +2 -2
- package/dist/components/CreditCardForm/getFifthStepData.js.map +1 -1
- package/dist/components/CreditCardForm/getFourthStepData.d.ts +2 -2
- package/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -2
- package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditCardForm/getSecondStepData.d.ts +2 -2
- package/dist/components/CreditCardForm/getSecondStepData.js.map +1 -1
- package/dist/components/CreditCardForm/getSixthStepData.d.ts +4 -4
- package/dist/components/CreditCardForm/getSixthStepData.js.map +1 -1
- package/dist/components/CreditCardForm/getThirdStepData.d.ts +2 -2
- package/dist/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/dist/components/CreditCardForm/renderStep.d.ts +3 -3
- package/dist/components/CreditCardForm/renderStep.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.js +1 -2
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditForm/calculateInputs.d.ts +2 -2
- package/dist/components/CreditForm/formStateMap.d.ts +2 -2
- package/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/dist/components/CreditForm/getCalcData.d.ts +2 -2
- package/dist/components/CreditForm/getCalcData.js.map +1 -1
- package/dist/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
- package/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/dist/components/CreditForm/getFifthStepData.d.ts +2 -2
- package/dist/components/CreditForm/getFifthStepData.js.map +1 -1
- package/dist/components/CreditForm/getFirstStepData.d.ts +2 -2
- package/dist/components/CreditForm/getFirstStepData.js.map +1 -1
- package/dist/components/CreditForm/getFourthStepData.d.ts +2 -2
- package/dist/components/CreditForm/getFourthStepData.js.map +1 -1
- package/dist/components/CreditForm/getInitialFormState.d.ts +2 -2
- package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditForm/getSecondStepData.d.ts +2 -2
- package/dist/components/CreditForm/getSecondStepData.js.map +1 -1
- package/dist/components/CreditForm/getThirdStepData.d.ts +2 -2
- package/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/dist/components/CreditForm/getZeroStepData.d.ts +2 -2
- package/dist/components/CreditForm/getZeroStepData.js.map +1 -1
- package/dist/components/CreditForm/renderInputs.d.ts +2 -2
- package/dist/components/CreditForm/renderStep.d.ts +3 -3
- package/dist/components/CreditForm/renderStep.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/components/CreditForm/utils.d.ts +1 -1
- package/dist/hooks/useCreditFormStore.d.ts +13 -0
- package/dist/hooks/useCreditFormStore.js +8 -0
- package/dist/hooks/useCreditFormStore.js.map +1 -0
- package/dist/hooks/useLeadFormData.d.ts +1 -1
- package/dist/hooks/useLocalStorage.js +2 -1
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useSetter.d.ts +2 -0
- package/dist/hooks/useSetter.js +14 -0
- package/dist/hooks/useSetter.js.map +1 -0
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/DialogManager/useDialog.d.ts +4 -1
- package/dist/ui-kit/DialogManager/useDialog.js.map +1 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
- package/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CreditCalcField.js +1 -1
- package/dist/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +4 -3
- package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/dist/ui-kit/FormField/SelectField.d.ts +1 -7
- package/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/dist/ui-kit/FormField/updateOrganizationFields.js +17 -0
- package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/dist/ui-kit/FormField/validators.d.ts +1 -1
- package/dist/ui-kit/Input/Input.js +2 -3
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/getValidStyle.d.ts +1 -0
- package/dist/ui-kit/Input/getValidStyle.js +6 -0
- package/dist/ui-kit/Input/getValidStyle.js.map +1 -0
- package/dist/ui-kit/RichText/RichText.js +3 -6
- package/dist/ui-kit/RichText/RichText.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -1
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/utils/safeJsonParse.d.ts +1 -0
- package/dist/utils/safeJsonParse.js +12 -0
- package/dist/utils/safeJsonParse.js.map +1 -0
- package/lib/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/lib/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/lib/api/RetailAPI/model/LeadFormData.js +2 -0
- package/lib/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/lib/api/RetailAPI/utils/getOrganizationParams.js +95 -0
- package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/lib/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/lib/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -8
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/lib/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/lib/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/lib/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +12 -9
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
- package/lib/components/ApplicationLeadForm/useLeadFormStore.js +3 -0
- package/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
- package/lib/components/CreditCardForm/CreditCardForm.fixture.mobile.d.ts +5 -0
- package/lib/components/CreditCardForm/CreditCardForm.js +1 -2
- package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
- package/lib/components/CreditCardForm/calculateInputs.d.ts +2 -2
- package/lib/components/CreditCardForm/formStateMap.d.ts +2 -2
- package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/lib/components/CreditCardForm/getCardData.d.ts +2 -2
- package/lib/components/CreditCardForm/getCardData.js.map +1 -1
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/lib/components/CreditCardForm/getFifthStepData.d.ts +2 -2
- package/lib/components/CreditCardForm/getFifthStepData.js.map +1 -1
- package/lib/components/CreditCardForm/getFourthStepData.d.ts +2 -2
- package/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -2
- package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditCardForm/getSecondStepData.d.ts +2 -2
- package/lib/components/CreditCardForm/getSecondStepData.js.map +1 -1
- package/lib/components/CreditCardForm/getSixthStepData.d.ts +4 -4
- package/lib/components/CreditCardForm/getSixthStepData.js.map +1 -1
- package/lib/components/CreditCardForm/getThirdStepData.d.ts +2 -2
- package/lib/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/lib/components/CreditCardForm/renderStep.d.ts +3 -3
- package/lib/components/CreditCardForm/renderStep.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.fixture.mobile.d.ts +5 -0
- package/lib/components/CreditForm/CreditForm.js +1 -2
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditForm/calculateInputs.d.ts +2 -2
- package/lib/components/CreditForm/formStateMap.d.ts +2 -2
- package/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/lib/components/CreditForm/getCalcData.d.ts +2 -2
- package/lib/components/CreditForm/getCalcData.js.map +1 -1
- package/lib/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
- package/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/lib/components/CreditForm/getFifthStepData.d.ts +2 -2
- package/lib/components/CreditForm/getFifthStepData.js.map +1 -1
- package/lib/components/CreditForm/getFirstStepData.d.ts +2 -2
- package/lib/components/CreditForm/getFirstStepData.js.map +1 -1
- package/lib/components/CreditForm/getFourthStepData.d.ts +2 -2
- package/lib/components/CreditForm/getFourthStepData.js.map +1 -1
- package/lib/components/CreditForm/getInitialFormState.d.ts +2 -2
- package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditForm/getSecondStepData.d.ts +2 -2
- package/lib/components/CreditForm/getSecondStepData.js.map +1 -1
- package/lib/components/CreditForm/getThirdStepData.d.ts +2 -2
- package/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/lib/components/CreditForm/getZeroStepData.d.ts +2 -2
- package/lib/components/CreditForm/getZeroStepData.js.map +1 -1
- package/lib/components/CreditForm/renderInputs.d.ts +2 -2
- package/lib/components/CreditForm/renderStep.d.ts +3 -3
- package/lib/components/CreditForm/renderStep.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/components/CreditForm/utils.d.ts +1 -1
- package/lib/hooks/useCreditFormStore.d.ts +13 -0
- package/lib/hooks/useCreditFormStore.js +5 -0
- package/lib/hooks/useCreditFormStore.js.map +1 -0
- package/lib/hooks/useLeadFormData.d.ts +1 -1
- package/lib/hooks/useLocalStorage.js +2 -1
- package/lib/hooks/useLocalStorage.js.map +1 -1
- package/lib/hooks/useSetter.d.ts +2 -0
- package/lib/hooks/useSetter.js +11 -0
- package/lib/hooks/useSetter.js.map +1 -0
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/DialogManager/useDialog.d.ts +4 -1
- package/lib/ui-kit/DialogManager/useDialog.js.map +1 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
- package/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CreditCalcField.js +1 -1
- package/lib/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +4 -3
- package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/lib/ui-kit/FormField/SelectField.d.ts +1 -7
- package/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/lib/ui-kit/FormField/updateOrganizationFields.js +14 -0
- package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/lib/ui-kit/FormField/validators.d.ts +1 -1
- package/lib/ui-kit/Input/Input.js +1 -2
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/getValidStyle.d.ts +1 -0
- package/lib/ui-kit/Input/getValidStyle.js +3 -0
- package/lib/ui-kit/Input/getValidStyle.js.map +1 -0
- package/lib/ui-kit/RichText/RichText.js +3 -6
- package/lib/ui-kit/RichText/RichText.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -1
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/utils/safeJsonParse.d.ts +1 -0
- package/lib/utils/safeJsonParse.js +9 -0
- package/lib/utils/safeJsonParse.js.map +1 -0
- package/mobile/bundle/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/mobile/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/mobile/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/mobile/bundle/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/mobile/bundle/bundle.umd.js +400 -265
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/mobile/bundle/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
- package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/calculateInputs.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/formStateMap.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getCardData.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getFifthStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getFourthStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getSecondStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getSixthStepData.d.ts +4 -4
- package/mobile/bundle/components/CreditCardForm/getThirdStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +3 -3
- package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/calculateInputs.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/formStateMap.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getCalcData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getFifthStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getFirstStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getFourthStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getSecondStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getThirdStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/getZeroStepData.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/renderStep.d.ts +3 -3
- package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/mobile/bundle/components/CreditForm/utils.d.ts +1 -1
- package/mobile/bundle/hooks/useCreditFormStore.d.ts +13 -0
- package/mobile/bundle/hooks/useLeadFormData.d.ts +1 -1
- package/mobile/bundle/hooks/useSetter.d.ts +2 -0
- package/mobile/bundle/ui-kit/DialogManager/useDialog.d.ts +4 -1
- package/mobile/bundle/ui-kit/FormField/SelectField.d.ts +1 -7
- package/mobile/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -1
- package/mobile/bundle/ui-kit/Input/getValidStyle.d.ts +1 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/mobile/bundle/utils/safeJsonParse.d.ts +1 -0
- package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/mobile/dist/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/mobile/dist/api/RetailAPI/model/LeadFormData.js +2 -0
- package/mobile/dist/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js +101 -0
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/mobile/dist/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -7
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +11 -8
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js +6 -0
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js +1 -2
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/calculateInputs.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/formStateMap.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getCardData.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getCardData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getFifthStepData.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getFifthStepData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getFourthStepData.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getSecondStepData.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getSecondStepData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getSixthStepData.d.ts +4 -4
- package/mobile/dist/components/CreditCardForm/getSixthStepData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getThirdStepData.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/renderStep.d.ts +3 -3
- package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -1
- 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/CreditForm.js +1 -2
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/calculateInputs.d.ts +2 -2
- package/mobile/dist/components/CreditForm/formStateMap.d.ts +2 -2
- package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditForm/getCalcData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getCalcData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getFifthStepData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getFifthStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getFirstStepData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getFirstStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getFourthStepData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getFourthStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditForm/getSecondStepData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getSecondStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getZeroStepData.d.ts +2 -2
- package/mobile/dist/components/CreditForm/getZeroStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -2
- package/mobile/dist/components/CreditForm/renderStep.d.ts +3 -3
- package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/utils.d.ts +1 -1
- package/mobile/dist/hooks/useCreditFormStore.d.ts +13 -0
- package/mobile/dist/hooks/useCreditFormStore.js +8 -0
- package/mobile/dist/hooks/useCreditFormStore.js.map +1 -0
- package/mobile/dist/hooks/useLeadFormData.d.ts +1 -1
- package/mobile/dist/hooks/useLocalStorage.js +2 -1
- package/mobile/dist/hooks/useLocalStorage.js.map +1 -1
- package/mobile/dist/hooks/useSetter.d.ts +2 -0
- package/mobile/dist/hooks/useSetter.js +14 -0
- package/mobile/dist/hooks/useSetter.js.map +1 -0
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/useDialog.d.ts +4 -1
- package/mobile/dist/ui-kit/DialogManager/useDialog.js.map +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +4 -3
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/SelectField.d.ts +1 -7
- package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +17 -0
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +2 -3
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/getValidStyle.d.ts +1 -0
- package/mobile/dist/ui-kit/Input/getValidStyle.js +6 -0
- package/mobile/dist/ui-kit/Input/getValidStyle.js.map +1 -0
- package/mobile/dist/ui-kit/RichText/RichText.js +3 -6
- package/mobile/dist/ui-kit/RichText/RichText.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/utils/safeJsonParse.d.ts +1 -0
- package/mobile/dist/utils/safeJsonParse.js +12 -0
- package/mobile/dist/utils/safeJsonParse.js.map +1 -0
- package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/mobile/lib/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/mobile/lib/api/RetailAPI/model/LeadFormData.js +2 -0
- package/mobile/lib/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js +95 -0
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/mobile/lib/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -8
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +12 -9
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +15 -0
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js +3 -0
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -0
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js +1 -2
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/calculateInputs.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/formStateMap.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getCardData.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getCardData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getFifthStepData.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getFifthStepData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getFourthStepData.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getSecondStepData.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getSecondStepData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getSixthStepData.d.ts +4 -4
- package/mobile/lib/components/CreditCardForm/getSixthStepData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getThirdStepData.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/getThirdStepData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/renderStep.d.ts +3 -3
- package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -1
- 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/CreditForm.js +1 -2
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/calculateInputs.d.ts +2 -2
- package/mobile/lib/components/CreditForm/formStateMap.d.ts +2 -2
- package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditForm/getCalcData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getCalcData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getCreditFormTaskData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getFifthStepData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getFifthStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getFirstStepData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getFirstStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getFourthStepData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getFourthStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditForm/getSecondStepData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getSecondStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getZeroStepData.d.ts +2 -2
- package/mobile/lib/components/CreditForm/getZeroStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -2
- package/mobile/lib/components/CreditForm/renderStep.d.ts +3 -3
- package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/utils.d.ts +1 -1
- package/mobile/lib/hooks/useCreditFormStore.d.ts +13 -0
- package/mobile/lib/hooks/useCreditFormStore.js +5 -0
- package/mobile/lib/hooks/useCreditFormStore.js.map +1 -0
- package/mobile/lib/hooks/useLeadFormData.d.ts +1 -1
- package/mobile/lib/hooks/useLocalStorage.js +2 -1
- package/mobile/lib/hooks/useLocalStorage.js.map +1 -1
- package/mobile/lib/hooks/useSetter.d.ts +2 -0
- package/mobile/lib/hooks/useSetter.js +11 -0
- package/mobile/lib/hooks/useSetter.js.map +1 -0
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +2 -10
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/useDialog.d.ts +4 -1
- package/mobile/lib/ui-kit/DialogManager/useDialog.js.map +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +4 -3
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/SelectField.d.ts +1 -7
- package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +14 -0
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +1 -2
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/getValidStyle.d.ts +1 -0
- package/mobile/lib/ui-kit/Input/getValidStyle.js +3 -0
- package/mobile/lib/ui-kit/Input/getValidStyle.js.map +1 -0
- package/mobile/lib/ui-kit/RichText/RichText.js +3 -6
- package/mobile/lib/ui-kit/RichText/RichText.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +5 -3
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/utils/safeJsonParse.d.ts +1 -0
- package/mobile/lib/utils/safeJsonParse.js +9 -0
- package/mobile/lib/utils/safeJsonParse.js.map +1 -0
- package/mobile/src/api/RetailAPI/model/EOrganizationActivityTypes.ts +23 -0
- package/mobile/src/api/RetailAPI/model/LeadFormData.ts +7 -0
- package/mobile/src/api/RetailAPI/utils/getOrganizationParams.ts +126 -0
- package/mobile/src/api/RetailAPI/utils/getUpdateUserProfile.ts +4 -2
- package/mobile/src/api/dadataHints/dadataHintsType.ts +3 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +6 -8
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -5
- package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +152 -0
- package/mobile/src/components/ApplicationLeadForm/consents.ts +3 -3
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -160
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/{useApplicationLeadApi.ts → useApplicationLeadApi.tsx} +19 -34
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -10
- package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +12 -0
- package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +1 -2
- package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +2 -2
- package/mobile/src/components/CreditCardForm/calculateInputs.ts +2 -2
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getCardData.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
- package/mobile/src/components/CreditCardForm/getFifthStepData.ts +2 -2
- package/mobile/src/components/CreditCardForm/getFourthStepData.ts +2 -2
- package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getSecondStepData.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getSixthStepData.ts +4 -4
- package/mobile/src/components/CreditCardForm/getThirdStepData.tsx +2 -2
- package/mobile/src/components/CreditCardForm/renderInputs.tsx +2 -2
- package/mobile/src/components/CreditCardForm/renderStep.tsx +4 -4
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -3
- package/mobile/src/components/CreditForm/CreditForm.tsx +1 -2
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +2 -2
- package/mobile/src/components/CreditForm/calculateInputs.ts +2 -2
- package/mobile/src/components/CreditForm/formStateMap.tsx +2 -2
- package/mobile/src/components/CreditForm/getCalcData.ts +2 -2
- package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +3 -3
- package/mobile/src/components/CreditForm/getFifthStepData.ts +2 -2
- package/mobile/src/components/CreditForm/getFirstStepData.tsx +2 -2
- package/mobile/src/components/CreditForm/getFourthStepData.ts +2 -2
- package/mobile/src/components/CreditForm/getInitialFormState.tsx +2 -2
- package/mobile/src/components/CreditForm/getSecondStepData.tsx +2 -2
- package/mobile/src/components/CreditForm/getThirdStepData.ts +2 -2
- package/mobile/src/components/CreditForm/getZeroStepData.ts +2 -2
- package/mobile/src/components/CreditForm/renderInputs.tsx +2 -2
- package/mobile/src/components/CreditForm/renderStep.tsx +4 -4
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
- package/mobile/src/components/CreditForm/utils.ts +1 -1
- package/mobile/src/hooks/useCreditFormStore.tsx +13 -0
- package/mobile/src/hooks/useLeadFormData.ts +1 -1
- package/mobile/src/hooks/useLocalStorage.ts +2 -1
- package/mobile/src/hooks/useSetter.ts +16 -0
- package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +1 -1
- package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +2 -11
- package/mobile/src/ui-kit/DialogManager/useDialog.tsx +2 -1
- package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +4 -4
- package/mobile/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/CreditCalcField.tsx +1 -0
- package/mobile/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +5 -5
- package/mobile/src/ui-kit/FormField/Fields/OrganizationField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +5 -1
- package/mobile/src/ui-kit/FormField/SelectField.tsx +1 -8
- package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
- package/mobile/src/ui-kit/FormField/validators.ts +1 -1
- package/mobile/src/ui-kit/Input/Input.tsx +1 -3
- package/mobile/src/ui-kit/Input/getValidStyle.tsx +3 -0
- package/mobile/src/ui-kit/RichText/RichText.tsx +21 -21
- package/mobile/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +4 -3
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +21 -26
- package/mobile/src/utils/safeJsonParse.ts +7 -0
- package/package.json +1 -1
- package/src/api/RetailAPI/model/EOrganizationActivityTypes.ts +23 -0
- package/src/api/RetailAPI/model/LeadFormData.ts +7 -0
- package/src/api/RetailAPI/utils/getOrganizationParams.ts +126 -0
- package/src/api/RetailAPI/utils/getUpdateUserProfile.ts +4 -2
- package/src/api/dadataHints/dadataHintsType.ts +3 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.tsx +15 -23
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +6 -8
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -5
- package/src/components/ApplicationLeadForm/LeadFormState.ts +152 -0
- package/src/components/ApplicationLeadForm/consents.ts +3 -3
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -160
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
- package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +2 -2
- package/src/components/ApplicationLeadForm/{useApplicationLeadApi.ts → useApplicationLeadApi.tsx} +19 -34
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -10
- package/src/components/ApplicationLeadForm/useLeadFormStore.ts +12 -0
- package/src/components/CreditCardForm/CreditCardForm.fixture.mobile.tsx +25 -0
- package/src/components/CreditCardForm/CreditCardForm.tsx +1 -2
- package/src/components/CreditCardForm/CreditCardFormContent.ts +2 -2
- package/src/components/CreditCardForm/calculateInputs.ts +2 -2
- package/src/components/CreditCardForm/formStateMap.tsx +2 -2
- package/src/components/CreditCardForm/getCardData.tsx +2 -2
- package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
- package/src/components/CreditCardForm/getFifthStepData.ts +2 -2
- package/src/components/CreditCardForm/getFourthStepData.ts +2 -2
- package/src/components/CreditCardForm/getInitialFormState.tsx +2 -2
- package/src/components/CreditCardForm/getSecondStepData.tsx +2 -2
- package/src/components/CreditCardForm/getSixthStepData.ts +4 -4
- package/src/components/CreditCardForm/getThirdStepData.tsx +2 -2
- package/src/components/CreditCardForm/renderInputs.tsx +2 -2
- package/src/components/CreditCardForm/renderStep.tsx +4 -4
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -3
- package/src/components/CreditForm/CreditForm.fixture.mobile.tsx +30 -0
- package/src/components/CreditForm/CreditForm.tsx +1 -2
- package/src/components/CreditForm/PendingStatusContent.tsx +2 -2
- package/src/components/CreditForm/calculateInputs.ts +2 -2
- package/src/components/CreditForm/formStateMap.tsx +2 -2
- package/src/components/CreditForm/getCalcData.ts +2 -2
- package/src/components/CreditForm/getCreditFormTaskData.ts +3 -3
- package/src/components/CreditForm/getFifthStepData.ts +2 -2
- package/src/components/CreditForm/getFirstStepData.tsx +2 -2
- package/src/components/CreditForm/getFourthStepData.ts +2 -2
- package/src/components/CreditForm/getInitialFormState.tsx +2 -2
- package/src/components/CreditForm/getSecondStepData.tsx +2 -2
- package/src/components/CreditForm/getThirdStepData.ts +2 -2
- package/src/components/CreditForm/getZeroStepData.ts +2 -2
- package/src/components/CreditForm/renderInputs.tsx +2 -2
- package/src/components/CreditForm/renderStep.tsx +4 -4
- package/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
- package/src/components/CreditForm/utils.ts +1 -1
- package/src/hooks/useCreditFormStore.tsx +13 -0
- package/src/hooks/useLeadFormData.ts +1 -1
- package/src/hooks/useLocalStorage.ts +2 -1
- package/src/hooks/useSetter.ts +16 -0
- package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +1 -1
- package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +2 -11
- package/src/ui-kit/DialogManager/useDialog.tsx +2 -1
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +4 -4
- package/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/CreditCalcField.tsx +1 -0
- package/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/InnField.tsx +5 -5
- package/src/ui-kit/FormField/Fields/OrganizationField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +5 -1
- package/src/ui-kit/FormField/SelectField.tsx +1 -8
- package/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
- package/src/ui-kit/FormField/validators.ts +1 -1
- package/src/ui-kit/Input/Input.tsx +1 -3
- package/src/ui-kit/Input/getValidStyle.tsx +3 -0
- package/src/ui-kit/RichText/RichText.tsx +21 -21
- package/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +4 -3
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +7 -10
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +21 -26
- package/src/utils/safeJsonParse.ts +7 -0
- package/bundle/ui-kit/RichText/getHtmlText.d.ts +0 -1
- package/dist/ui-kit/RichText/getHtmlText.d.ts +0 -1
- package/dist/ui-kit/RichText/getHtmlText.js +0 -5
- package/dist/ui-kit/RichText/getHtmlText.js.map +0 -1
- package/lib/ui-kit/RichText/getHtmlText.d.ts +0 -1
- package/lib/ui-kit/RichText/getHtmlText.js +0 -2
- package/lib/ui-kit/RichText/getHtmlText.js.map +0 -1
- package/mobile/bundle/ui-kit/RichText/getHtmlText.d.ts +0 -1
- package/mobile/dist/ui-kit/RichText/getHtmlText.d.ts +0 -1
- package/mobile/dist/ui-kit/RichText/getHtmlText.js +0 -5
- package/mobile/dist/ui-kit/RichText/getHtmlText.js.map +0 -1
- package/mobile/lib/ui-kit/RichText/getHtmlText.d.ts +0 -1
- package/mobile/lib/ui-kit/RichText/getHtmlText.js +0 -2
- package/mobile/lib/ui-kit/RichText/getHtmlText.js.map +0 -1
- package/mobile/src/ui-kit/RichText/getHtmlText.tsx +0 -1
- package/src/ui-kit/RichText/getHtmlText.tsx +0 -1
|
@@ -4,7 +4,7 @@ import { createUserProfile } from '../../api/RetailAPI/createUserProfile';
|
|
|
4
4
|
import { updateUserProfile } from '../../api/RetailAPI/updateUserProfile';
|
|
5
5
|
import { updateUserTask } from '../../api/RetailAPI/updateUserTask';
|
|
6
6
|
import { getUpdateUserProfileData } from '../../api/RetailAPI/utils/getUpdateUserProfile';
|
|
7
|
-
import {
|
|
7
|
+
import { useSetter } from '../../hooks/useSetter';
|
|
8
8
|
import { useConsentBkiDialog } from '../../ui-kit/ConsentBkiDialog/useConsentBkiDialog';
|
|
9
9
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
10
10
|
import { useEsiaLoginDialog } from '../../ui-kit/EsiaLoginDialog/useEsiaLoginDialog';
|
|
@@ -15,34 +15,31 @@ import { objectValidator } from '../../validation/objectValidator';
|
|
|
15
15
|
import { isValidationSuccess } from '../../validation/validator';
|
|
16
16
|
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
17
17
|
import { CONSENTS } from './consents';
|
|
18
|
-
import { type FormState } from './getInitialFormState';
|
|
19
18
|
import { getLeadFormTaskData } from './getLeadFormTaskData';
|
|
19
|
+
import { type LeadFormState } from './LeadFormState';
|
|
20
|
+
import { useLeadFormStore } from './useLeadFormStore';
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
interface ApplicationLeadApiProps {
|
|
22
23
|
inputs: FieldDef[];
|
|
23
24
|
programId: string;
|
|
24
25
|
nextStepLink: string;
|
|
25
|
-
|
|
26
|
-
};
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
interface UserData {
|
|
29
29
|
participantId: number;
|
|
30
30
|
taskId: number;
|
|
31
31
|
profileId: number;
|
|
32
32
|
programId: string;
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
|
|
35
35
|
export const useApplicationLeadApi = ({
|
|
36
36
|
inputs,
|
|
37
37
|
programId,
|
|
38
38
|
nextStepLink,
|
|
39
|
-
saveForm,
|
|
40
39
|
}: ApplicationLeadApiProps) => {
|
|
41
40
|
const [responseStatus, setResponseStatus] = useState<'OK' | 'Fail' | ''>('');
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const [, setParticipantId] = useLocalStorage<number>('participantId');
|
|
45
|
-
const [, setProgramId] = useLocalStorage<string>('programId');
|
|
41
|
+
const leadFormStore = useLeadFormStore();
|
|
42
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
46
43
|
|
|
47
44
|
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
48
45
|
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
@@ -50,16 +47,16 @@ export const useApplicationLeadApi = ({
|
|
|
50
47
|
|
|
51
48
|
const saveUserData = useCallback(
|
|
52
49
|
({ participantId, taskId, profileId, programId: programNumber }: UserData) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
leadFormStore.participantId = participantId;
|
|
51
|
+
leadFormStore.taskId = taskId;
|
|
52
|
+
leadFormStore.profileId = profileId;
|
|
53
|
+
leadFormStore.programId = programNumber;
|
|
57
54
|
},
|
|
58
55
|
[],
|
|
59
56
|
);
|
|
60
57
|
|
|
61
58
|
// eslint-disable-next-line consistent-return
|
|
62
|
-
const handleSubmit = useCallback(async (formData:
|
|
59
|
+
const handleSubmit = useCallback(async (formData: LeadFormState) => {
|
|
63
60
|
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
64
61
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
65
62
|
return;
|
|
@@ -92,7 +89,8 @@ export const useApplicationLeadApi = ({
|
|
|
92
89
|
.map((_) => CONSENTS[_]?.text);
|
|
93
90
|
|
|
94
91
|
verifyPhoneDialog.open({
|
|
95
|
-
|
|
92
|
+
phone: formData?.phone,
|
|
93
|
+
consents: acceptedConsents,
|
|
96
94
|
onSuccess: handleSuccessVerify,
|
|
97
95
|
});
|
|
98
96
|
}
|
|
@@ -116,9 +114,9 @@ const updateUserData = async ({
|
|
|
116
114
|
}: {
|
|
117
115
|
programId: string;
|
|
118
116
|
profileId: number;
|
|
119
|
-
formData:
|
|
117
|
+
formData: LeadFormState;
|
|
120
118
|
saveUserData: (userData: UserData) => void;
|
|
121
|
-
saveForm: (formData:
|
|
119
|
+
saveForm: (formData: LeadFormState) => void;
|
|
122
120
|
}) => {
|
|
123
121
|
const transformedForm = transformOtherConsentsField(formData);
|
|
124
122
|
|
|
@@ -146,20 +144,7 @@ const updateUserData = async ({
|
|
|
146
144
|
saveForm(formData);
|
|
147
145
|
};
|
|
148
146
|
|
|
149
|
-
const
|
|
150
|
-
title: 'Подтвердите номер телефона',
|
|
151
|
-
description: `Мы отправили код на ${phone}`,
|
|
152
|
-
phoneNumber: formatPhone(phone),
|
|
153
|
-
textButton: 'Далее',
|
|
154
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(
|
|
155
|
-
consents,
|
|
156
|
-
)}`,
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
const consentsToList = (consents?: string[]) =>
|
|
160
|
-
`<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
161
|
-
|
|
162
|
-
const transformOtherConsentsField = (formData: FormState): FormState => {
|
|
147
|
+
const transformOtherConsentsField = (formData: LeadFormState): LeadFormState => {
|
|
163
148
|
const { consentOthersFlg, ...form } = formData;
|
|
164
149
|
|
|
165
150
|
return {
|
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
1
|
+
import { useCallback, useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
3
3
|
import { updateProfileEsia } from '../../api/RetailAPI/updateProfileEsia';
|
|
4
4
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useSetter } from '../../hooks/useSetter';
|
|
6
|
+
import { safeJsonParse } from '../../utils/safeJsonParse';
|
|
7
|
+
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
8
|
+
import { getInitialFormState } from './getInitialFormState';
|
|
9
|
+
import { type LeadFormState } from './LeadFormState';
|
|
7
10
|
import { parseEsiaProfile } from './pasreEsiaProfile';
|
|
11
|
+
import { useLeadFormStore } from './useLeadFormStore';
|
|
8
12
|
|
|
9
|
-
export const useInitApplicationLead = (
|
|
13
|
+
export const useInitApplicationLead = (
|
|
14
|
+
inputs: FieldDef[],
|
|
15
|
+
nextStepLink: string,
|
|
16
|
+
): [LeadFormState, { isLoading: boolean }] => {
|
|
10
17
|
const navigator = locationNavigator();
|
|
11
18
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
12
|
-
|
|
19
|
+
|
|
20
|
+
const leadFormStore = useLeadFormStore();
|
|
21
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
22
|
+
|
|
23
|
+
const initialFormState = useMemo(
|
|
24
|
+
() => getInitialFormState(inputs, leadFormStore.leadForm),
|
|
25
|
+
[inputs, leadFormStore.leadForm],
|
|
26
|
+
);
|
|
13
27
|
|
|
14
28
|
const updateEsiaProfile = useCallback(
|
|
15
29
|
async (profileId: string, code: string, state: string) => {
|
|
@@ -23,7 +37,7 @@ export const useInitApplicationLead = (nextStepLink: string) => {
|
|
|
23
37
|
});
|
|
24
38
|
|
|
25
39
|
if (data) {
|
|
26
|
-
|
|
40
|
+
saveForm((_) => ({
|
|
27
41
|
..._,
|
|
28
42
|
...parseEsiaProfile(data),
|
|
29
43
|
}));
|
|
@@ -38,7 +52,9 @@ export const useInitApplicationLead = (nextStepLink: string) => {
|
|
|
38
52
|
);
|
|
39
53
|
|
|
40
54
|
useEffect(() => {
|
|
41
|
-
const profileId: string =
|
|
55
|
+
const profileId: string = <string>(
|
|
56
|
+
safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? '')
|
|
57
|
+
);
|
|
42
58
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
43
59
|
const code = params.get('code');
|
|
44
60
|
const state = params.get('state');
|
|
@@ -51,7 +67,5 @@ export const useInitApplicationLead = (nextStepLink: string) => {
|
|
|
51
67
|
}
|
|
52
68
|
}, []);
|
|
53
69
|
|
|
54
|
-
return {
|
|
55
|
-
isLoading,
|
|
56
|
-
};
|
|
70
|
+
return [initialFormState, { isLoading }];
|
|
57
71
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useLocalStore } from '@redneckz/uni-jsx/lib/Store/useLocalStore';
|
|
2
|
+
import { type LeadFormState } from './LeadFormState';
|
|
3
|
+
|
|
4
|
+
export interface LeadFormStoreSlice {
|
|
5
|
+
leadForm: LeadFormState;
|
|
6
|
+
taskId: number;
|
|
7
|
+
profileId: number;
|
|
8
|
+
participantId: number;
|
|
9
|
+
programId: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const useLeadFormStore = () => useLocalStore<LeadFormStoreSlice>();
|
|
@@ -3,7 +3,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from '@redneckz/uni
|
|
|
3
3
|
import { updateRefreshToken } from '../../api/RetailAPI/updateRefreshToken';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
6
|
-
import { style } from '../../utils/style';
|
|
7
6
|
import { type CreditCardFormContent } from './CreditCardFormContent';
|
|
8
7
|
import { CreditCardFormProgress } from './CreditCardFormProgress';
|
|
9
8
|
import { CreditCardFormStep } from './CreditCardFormStep';
|
|
@@ -49,7 +48,7 @@ export const CreditCardForm = JSX<CreditCardFormWizardProps>(({ className, ...re
|
|
|
49
48
|
const [isFormFinished, setIsFormFinished] = useState(false);
|
|
50
49
|
|
|
51
50
|
return (
|
|
52
|
-
<BlockWrapper className={
|
|
51
|
+
<BlockWrapper className={className} {...rest}>
|
|
53
52
|
<div ref={formContainerRef} className="container grid grid-cols-12">
|
|
54
53
|
{isFormFinished ? null : (
|
|
55
54
|
<CreditCardFormProgress stepsTitles={TITLES} step={step} totalSteps={STEPS} />
|
|
@@ -4,12 +4,12 @@ import { type InputSectionsType } from '../../model/InputSectionsType';
|
|
|
4
4
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
5
5
|
import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
|
|
6
6
|
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
7
|
-
import { type
|
|
7
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
8
8
|
|
|
9
9
|
/** @hidden */
|
|
10
10
|
export interface RenderInputsProps {
|
|
11
11
|
inputs?: FieldDef[];
|
|
12
|
-
field: FormFieldRegisterer<
|
|
12
|
+
field: FormFieldRegisterer<LeadFormState>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type CreditCardSectionsProps = SectionsProps & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
2
2
|
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
4
4
|
|
|
5
|
-
export type GetValue = <K extends keyof
|
|
5
|
+
export type GetValue = <K extends keyof LeadFormState>(name: K) => LeadFormState[K];
|
|
6
6
|
|
|
7
7
|
export const calculateInputs = (getValue: GetValue) => (inputs: FieldDef[], step: number) =>
|
|
8
8
|
inputs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
2
2
|
|
|
3
|
-
export const formStateMap: Partial<
|
|
3
|
+
export const formStateMap: Partial<LeadFormState>[] = [
|
|
4
4
|
{
|
|
5
5
|
paymentSystem: '',
|
|
6
6
|
currency: '810',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
|
|
4
|
-
export const getCardData = (formData:
|
|
4
|
+
export const getCardData = (formData: LeadFormState): Partial<Participant> => {
|
|
5
5
|
const { currency, paymentSystem, cardCategory, codeWord } = formData;
|
|
6
6
|
|
|
7
7
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Participant, type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
4
4
|
import { getCardData } from './getCardData';
|
|
5
5
|
import { getFifthStepData } from './getFifthStepData';
|
|
6
6
|
import { getFourthStepData } from './getFourthStepData';
|
|
@@ -12,7 +12,7 @@ type getCreditCardFormTaskDataProps = {
|
|
|
12
12
|
participantId: number;
|
|
13
13
|
taskId: number;
|
|
14
14
|
profileId: number;
|
|
15
|
-
formData:
|
|
15
|
+
formData: LeadFormState;
|
|
16
16
|
step?: number;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -52,7 +52,7 @@ export const getCreditCardFormTaskData = ({
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
const getCurrentStepData = (step: number, formData:
|
|
55
|
+
const getCurrentStepData = (step: number, formData: LeadFormState): Partial<Participant> => {
|
|
56
56
|
switch (step) {
|
|
57
57
|
case 0:
|
|
58
58
|
return {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
|
|
4
|
-
export const getFifthStepData = (formData:
|
|
4
|
+
export const getFifthStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
5
5
|
const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
|
|
6
6
|
|
|
7
7
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
import { getParticipantIncomes } from '../CreditForm/utils';
|
|
4
4
|
|
|
5
|
-
export const getFourthStepData = (formData:
|
|
5
|
+
export const getFourthStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
6
6
|
const {
|
|
7
7
|
familyStatus,
|
|
8
8
|
dependents,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
2
2
|
import { formStateMap } from './formStateMap';
|
|
3
3
|
|
|
4
4
|
export const getInitialFormState = (
|
|
5
5
|
step: number,
|
|
6
6
|
localStorageData: Record<string, any> | null,
|
|
7
|
-
):
|
|
7
|
+
): LeadFormState => ({
|
|
8
8
|
...formStateMap[step],
|
|
9
9
|
...localStorageData,
|
|
10
10
|
limitedBirthday: transformStringToData(localStorageData?.limitedBirthday as string),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { formatDate } from '../../utils/formatDate';
|
|
3
3
|
import { formatPhone } from '../../utils/formatPhone';
|
|
4
|
-
import { type
|
|
4
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
5
5
|
import { getParticipantAddresses, getParticipantContacts } from '../CreditForm/utils';
|
|
6
6
|
|
|
7
|
-
export const getSecondStepData = (formData:
|
|
7
|
+
export const getSecondStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
8
8
|
const {
|
|
9
9
|
name,
|
|
10
10
|
surname,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { dateToISO } from '../../utils/dateToISO';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
import { getParticipantAddresses } from '../CreditForm/utils';
|
|
4
4
|
|
|
5
|
-
export const getDeliveryData = (formData:
|
|
5
|
+
export const getDeliveryData = (formData: LeadFormState) => {
|
|
6
6
|
const { methodObtain, deliveryDate = '' } = formData;
|
|
7
7
|
|
|
8
8
|
const isCourierDelivery = methodObtain === 'courier';
|
|
@@ -16,7 +16,7 @@ export const getDeliveryData = (formData: FormState) => {
|
|
|
16
16
|
: {};
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const getOfficeCode = (formData:
|
|
19
|
+
export const getOfficeCode = (formData: LeadFormState) => {
|
|
20
20
|
const { addressRetail, methodObtain } = formData;
|
|
21
21
|
|
|
22
22
|
const isOfficeObtain = addressRetail?.key && methodObtain === 'office';
|
|
@@ -28,7 +28,7 @@ export const getOfficeCode = (formData: FormState) => {
|
|
|
28
28
|
: {};
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export const getSixthStepData = (formData:
|
|
31
|
+
export const getSixthStepData = (formData: LeadFormState) => {
|
|
32
32
|
const { addressCourier, methodObtain } = formData;
|
|
33
33
|
|
|
34
34
|
const isCourierDelivery = methodObtain === 'courier';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { formatDate } from '../../utils/formatDate';
|
|
3
3
|
import { formatPhone } from '../../utils/formatPhone';
|
|
4
|
-
import { type
|
|
4
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
5
5
|
import { getParticipantAddresses, getParticipantContacts } from '../CreditForm/utils';
|
|
6
6
|
|
|
7
|
-
export const getThirdStepData = (formData:
|
|
7
|
+
export const getThirdStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
8
8
|
const {
|
|
9
9
|
beginDate,
|
|
10
10
|
employment,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { getField } from '../../ui-kit/FormField/getField';
|
|
3
3
|
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
4
|
-
import { type
|
|
4
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
5
5
|
|
|
6
6
|
export interface RenderInputsProps {
|
|
7
7
|
inputs: FieldDef[];
|
|
8
|
-
field: FormFieldRegisterer<
|
|
8
|
+
field: FormFieldRegisterer<LeadFormState>;
|
|
9
9
|
params?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -2,16 +2,16 @@ import { type FormFieldRegisterer, type FormOperatorProps } from '../../hooks/us
|
|
|
2
2
|
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
3
3
|
import { renderTitle } from '../../ui-kit/FormField/renderTitle';
|
|
4
4
|
import { style } from '../../utils/style';
|
|
5
|
-
import { type
|
|
5
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
6
6
|
import { calculateInputs, checkCondition, type GetValue } from './calculateInputs';
|
|
7
7
|
import { type CreditCardSectionsProps } from './CreditCardFormContent';
|
|
8
8
|
import { renderInfo } from './renderInfo';
|
|
9
9
|
import { renderInputs } from './renderInputs';
|
|
10
10
|
|
|
11
|
-
export type CustomSubmit = FormOperatorProps<
|
|
11
|
+
export type CustomSubmit = FormOperatorProps<LeadFormState>['onSubmit'];
|
|
12
12
|
export interface StepProps {
|
|
13
13
|
sections?: CreditCardSectionsProps[];
|
|
14
|
-
field: FormFieldRegisterer<
|
|
14
|
+
field: FormFieldRegisterer<LeadFormState>;
|
|
15
15
|
step: number;
|
|
16
16
|
params?: Record<string, any>;
|
|
17
17
|
}
|
|
@@ -32,6 +32,6 @@ export const renderStep = ({ sections, field, step, params }: StepProps) =>
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
const getValue =
|
|
35
|
-
(field: FormFieldRegisterer<
|
|
35
|
+
(field: FormFieldRegisterer<LeadFormState>): GetValue =>
|
|
36
36
|
(name) =>
|
|
37
37
|
field(name)?.value;
|
|
@@ -5,7 +5,7 @@ import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
|
|
|
5
5
|
import { objectValidator } from '../../validation/objectValidator';
|
|
6
6
|
import { isValidationSuccess } from '../../validation/validator';
|
|
7
7
|
import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
|
|
8
|
-
import { type
|
|
8
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
9
9
|
import { calculateInputs, type GetValue } from './calculateInputs';
|
|
10
10
|
import { getCreditCardFormTaskData } from './getCreditCardFormTaskData';
|
|
11
11
|
|
|
@@ -29,7 +29,7 @@ export const useCreditCardFormAPI = ({
|
|
|
29
29
|
const [profileId] = useLocalStorage<number>('profileId');
|
|
30
30
|
const [participantId] = useLocalStorage<number>('participantId');
|
|
31
31
|
|
|
32
|
-
const handleSubmit = useCallback(async (formData:
|
|
32
|
+
const handleSubmit = useCallback(async (formData: LeadFormState) => {
|
|
33
33
|
const feedbackValidator = objectValidator(
|
|
34
34
|
getObjectValidator(calculateInputs(getValue(formData))(inputs, step)),
|
|
35
35
|
);
|
|
@@ -78,6 +78,6 @@ const resetForm = (isFinalStep: boolean, response: Response) => {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
const getValue =
|
|
81
|
-
(formData:
|
|
81
|
+
(formData: LeadFormState): GetValue =>
|
|
82
82
|
(name) =>
|
|
83
83
|
formData[name];
|
|
@@ -4,7 +4,6 @@ import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { UniBlock } from '../../UniBlock/UniBlock';
|
|
6
6
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
7
|
-
import { style } from '../../utils/style';
|
|
8
7
|
import { type CreditFormContent } from './CreditFormContent';
|
|
9
8
|
import { CreditFormProgress } from './CreditFormProgress';
|
|
10
9
|
import { CreditFormStep } from './CreditFormStep';
|
|
@@ -54,7 +53,7 @@ export const CreditForm = UniBlock<CreditFormProps>(({ className, programsSource
|
|
|
54
53
|
const [isFormFinished, setIsFormFinished] = useState(false);
|
|
55
54
|
|
|
56
55
|
return (
|
|
57
|
-
<BlockWrapper className={
|
|
56
|
+
<BlockWrapper className={className} {...rest}>
|
|
58
57
|
<div ref={formContainerRef} className="container grid grid-cols-12">
|
|
59
58
|
{isStartStep || isFormFinished ? null : (
|
|
60
59
|
<CreditFormProgress stepsTitles={STEP_TITLES} step={step} totalSteps={STEPS} />
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
4
4
|
import { CreditFormStatus } from './CreditFormStatus';
|
|
5
5
|
|
|
6
6
|
export const PendingStatusContent = JSX(
|
|
7
7
|
({ handleExpireTimer }: { handleExpireTimer: () => void }) => {
|
|
8
|
-
const [leadForm] = useLocalStorage<
|
|
8
|
+
const [leadForm] = useLocalStorage<LeadFormState>('leadForm');
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<CreditFormStatus
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
2
2
|
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
4
4
|
|
|
5
|
-
export type GetValue = <K extends keyof
|
|
5
|
+
export type GetValue = <K extends keyof LeadFormState>(name: K) => LeadFormState[K];
|
|
6
6
|
|
|
7
7
|
export const calculateInputs = (getValue: GetValue) => (inputs: FieldDef[], step: number) =>
|
|
8
8
|
inputs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
2
2
|
|
|
3
|
-
export const formStateMap: Partial<
|
|
3
|
+
export const formStateMap: Partial<LeadFormState>[] = [
|
|
4
4
|
{
|
|
5
5
|
calculator: {
|
|
6
6
|
moneyValue: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PaymentType, type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
|
|
4
4
|
const PAYMENT_TYPE_DATA: Record<string, PaymentType> = {
|
|
5
5
|
annuity: { key: 'ANNUITY', value: 'Аннуитетный' },
|
|
@@ -7,7 +7,7 @@ const PAYMENT_TYPE_DATA: Record<string, PaymentType> = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const getCalcData = (
|
|
10
|
-
formData:
|
|
10
|
+
formData: LeadFormState,
|
|
11
11
|
): Pick<UpdateUserTaskBody['task'], 'loanAmount' | 'creditPeriod' | 'paymentTypeCd'> => {
|
|
12
12
|
const { moneyValue, monthsValue, isAnnuity } = formData?.calculator ?? {};
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Participant, type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
4
4
|
import { getCalcData } from './getCalcData';
|
|
5
5
|
import { getFifthStepData } from './getFifthStepData';
|
|
6
6
|
import { getFirstStepData } from './getFirstStepData';
|
|
@@ -13,7 +13,7 @@ type getCreditFormTaskDataProps = {
|
|
|
13
13
|
participantId: number;
|
|
14
14
|
taskId: number;
|
|
15
15
|
profileId: number;
|
|
16
|
-
formData:
|
|
16
|
+
formData: LeadFormState;
|
|
17
17
|
step?: number;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -55,7 +55,7 @@ export const getCreditFormTaskData = ({
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const getCurrentStepData = (step: number, formData:
|
|
58
|
+
const getCurrentStepData = (step: number, formData: LeadFormState): Partial<Participant> => {
|
|
59
59
|
switch (step) {
|
|
60
60
|
case 0:
|
|
61
61
|
return getZeroStepData(formData);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UpdateUserTaskBody } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
|
|
4
|
-
export const getFifthStepData = (formData:
|
|
4
|
+
export const getFifthStepData = (formData: LeadFormState): Partial<UpdateUserTaskBody['task']> => {
|
|
5
5
|
const { addressRetail } = formData;
|
|
6
6
|
|
|
7
7
|
return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { formatDate } from '../../utils/formatDate';
|
|
3
3
|
import { formatPhone } from '../../utils/formatPhone';
|
|
4
|
-
import { type
|
|
4
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
5
5
|
import { getParticipantAddresses, getParticipantContacts } from './utils';
|
|
6
6
|
|
|
7
|
-
export const getFirstStepData = (formData:
|
|
7
|
+
export const getFirstStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
8
8
|
const {
|
|
9
9
|
name,
|
|
10
10
|
surname,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
|
|
4
|
-
export const getFourthStepData = (formData:
|
|
4
|
+
export const getFourthStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
5
5
|
const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
|
|
6
6
|
|
|
7
7
|
return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
2
2
|
import { formStateMap } from './formStateMap';
|
|
3
3
|
|
|
4
4
|
export const getInitialFormState = (
|
|
5
5
|
step: number,
|
|
6
6
|
localStorageData: Record<string, any> | null,
|
|
7
|
-
):
|
|
7
|
+
): LeadFormState => ({
|
|
8
8
|
...formStateMap[step],
|
|
9
9
|
...localStorageData,
|
|
10
10
|
limitedBirthday: transformStringToData(localStorageData?.limitedBirthday as string),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
2
|
import { formatDate } from '../../utils/formatDate';
|
|
3
3
|
import { formatPhone } from '../../utils/formatPhone';
|
|
4
|
-
import { type
|
|
4
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
5
5
|
import { getParticipantAddresses, getParticipantContacts } from './utils';
|
|
6
6
|
|
|
7
|
-
export const getSecondStepData = (formData:
|
|
7
|
+
export const getSecondStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
8
8
|
const {
|
|
9
9
|
beginDate,
|
|
10
10
|
employment,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Participant } from '../../api/RetailAPI/updateUserTask';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
3
3
|
import { getParticipantIncomes } from './utils';
|
|
4
4
|
|
|
5
|
-
export const getThirdStepData = (formData:
|
|
5
|
+
export const getThirdStepData = (formData: LeadFormState): Partial<Participant> => {
|
|
6
6
|
const {
|
|
7
7
|
familyStatus,
|
|
8
8
|
dependents,
|