@redneckz/wildless-cms-uni-blocks 0.14.698 → 0.14.700
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/getPaymentSystems.d.ts +2 -4
- package/bundle/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/bundle/api/RetailAPI/updateUserTask.d.ts +5 -1
- 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 +399 -275
- 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/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/dist/api/RetailAPI/getPaymentSystems.js +1 -4
- package/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
- 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/updateUserTask.d.ts +5 -1
- package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
- 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 +4 -6
- 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 +9 -7
- 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/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 +1 -1
- 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/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/components/GrantSupport/GrantSupport.js +1 -1
- package/dist/components/GrantSupport/GrantSupport.js.map +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/useSetter.d.ts +2 -0
- package/dist/hooks/useSetter.js +14 -0
- package/dist/hooks/useSetter.js.map +1 -0
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.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.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/CardCategoryField.js +1 -1
- package/dist/ui-kit/FormField/Fields/CardCategoryField.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/Fields/PaymentSystemField.js +3 -1
- package/dist/ui-kit/FormField/Fields/PaymentSystemField.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/getObjectValidator.js +10 -10
- package/dist/ui-kit/FormField/getObjectValidator.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/RichText/RichText.js +3 -6
- package/dist/ui-kit/RichText/RichText.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/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/lib/api/RetailAPI/getPaymentSystems.js +1 -4
- package/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
- 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/updateUserTask.d.ts +5 -1
- package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
- 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.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 +4 -6
- 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 +10 -8
- 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/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 +1 -1
- 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/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/components/GrantSupport/GrantSupport.js +1 -1
- package/lib/components/GrantSupport/GrantSupport.js.map +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/useSetter.d.ts +2 -0
- package/lib/hooks/useSetter.js +11 -0
- package/lib/hooks/useSetter.js.map +1 -0
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.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.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/CardCategoryField.js +1 -1
- package/lib/ui-kit/FormField/Fields/CardCategoryField.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/Fields/PaymentSystemField.js +4 -2
- package/lib/ui-kit/FormField/Fields/PaymentSystemField.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/getObjectValidator.js +10 -10
- package/lib/ui-kit/FormField/getObjectValidator.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/RichText/RichText.js +3 -6
- package/lib/ui-kit/RichText/RichText.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/mobile/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- 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/updateUserTask.d.ts +5 -1
- 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 +399 -275
- 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/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -5
- package/mobile/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/mobile/dist/api/RetailAPI/getPaymentSystems.js +1 -4
- package/mobile/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
- 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/updateUserTask.d.ts +5 -1
- package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
- 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 +4 -6
- 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 +9 -7
- 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/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 +1 -1
- 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/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/components/GrantSupport/GrantSupport.js +1 -1
- package/mobile/dist/components/GrantSupport/GrantSupport.js.map +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/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/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.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.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/CardCategoryField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.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/Fields/PaymentSystemField.js +3 -1
- package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.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/getObjectValidator.js +10 -10
- package/mobile/dist/ui-kit/FormField/getObjectValidator.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/RichText/RichText.js +3 -6
- package/mobile/dist/ui-kit/RichText/RichText.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/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
- package/mobile/lib/api/RetailAPI/getPaymentSystems.js +1 -4
- package/mobile/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
- 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/updateUserTask.d.ts +5 -1
- package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
- 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 +4 -6
- 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 +10 -8
- 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/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 +1 -1
- 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/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/components/GrantSupport/GrantSupport.js +1 -1
- package/mobile/lib/components/GrantSupport/GrantSupport.js.map +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/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/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.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.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/CardCategoryField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.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/Fields/PaymentSystemField.js +4 -2
- package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.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/getObjectValidator.js +10 -10
- package/mobile/lib/ui-kit/FormField/getObjectValidator.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/RichText/RichText.js +3 -6
- package/mobile/lib/ui-kit/RichText/RichText.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/src/api/RetailAPI/getPaymentSystems.ts +3 -10
- 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/updateUserTask.ts +6 -1
- 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 +6 -161
- 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 +20 -9
- package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +12 -0
- 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 +3 -3
- 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/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/components/GrantSupport/GrantSupport.tsx +1 -1
- package/mobile/src/hooks/useCreditFormStore.tsx +13 -0
- package/mobile/src/hooks/useLeadFormData.ts +1 -1
- package/mobile/src/hooks/useSetter.ts +16 -0
- package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.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 +2 -2
- package/mobile/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
- 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/Fields/PaymentSystemField.tsx +14 -6
- package/mobile/src/ui-kit/FormField/SelectField.tsx +1 -8
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
- 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/RichText/RichText.tsx +21 -21
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +20 -25
- package/package.json +1 -1
- package/src/api/RetailAPI/getPaymentSystems.ts +3 -10
- package/src/api/RetailAPI/model/EOrganizationActivityTypes.ts +23 -0
- package/src/api/RetailAPI/model/LeadFormData.ts +7 -0
- package/src/api/RetailAPI/updateUserTask.ts +6 -1
- 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.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 +6 -161
- 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 +20 -9
- package/src/components/ApplicationLeadForm/useLeadFormStore.ts +12 -0
- package/src/components/CreditCardForm/CreditCardFormContent.ts +2 -2
- package/src/components/CreditCardForm/calculateInputs.ts +2 -2
- package/src/components/CreditCardForm/formStateMap.tsx +3 -3
- 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/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/components/GrantSupport/GrantSupport.tsx +1 -1
- package/src/hooks/useCreditFormStore.tsx +13 -0
- package/src/hooks/useLeadFormData.ts +1 -1
- package/src/hooks/useSetter.ts +16 -0
- package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.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 +2 -2
- package/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
- 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/Fields/PaymentSystemField.tsx +14 -6
- package/src/ui-kit/FormField/SelectField.tsx +1 -8
- package/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
- package/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
- package/src/ui-kit/FormField/validators.ts +1 -1
- package/src/ui-kit/RichText/RichText.tsx +21 -21
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +7 -10
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +20 -25
- 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
package/bundle/bundle.umd.js
CHANGED
|
@@ -664,15 +664,11 @@
|
|
|
664
664
|
? 'bg-secondary-light text-primary-main'
|
|
665
665
|
: 'bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black'), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: icon.iconVersion || benefitsVersion } }) })) : null;
|
|
666
666
|
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
const EMPTY_HTML = '<p><br></p>';
|
|
670
|
-
const RichText = JSX((props) => {
|
|
671
|
-
const { __html = '', richVersion = '', itemSize = 'list-m', isDotted = true } = props;
|
|
667
|
+
const RichText = JSX(({ __html = '', richVersion = '', itemSize = 'list-m', isDotted = true, children }) => {
|
|
672
668
|
const dotStyle = isDotted ? '' : 'without-dots';
|
|
673
|
-
return __html
|
|
669
|
+
return __html || children ? (
|
|
674
670
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
675
|
-
jsx("div", { "data-component": "rich-text-container", children: jsx("div", { className: style(richVersion, itemSize, 'md-container group-data-secondary:text-white group-data-gray:text-secondary-text', dotStyle), dangerouslySetInnerHTML: { __html } }) })) : null;
|
|
671
|
+
jsx("div", { "data-component": "rich-text-container", children: jsx("div", { className: style(richVersion, itemSize, 'md-container group-data-secondary:text-white group-data-gray:text-secondary-text', dotStyle), dangerouslySetInnerHTML: __html ? { __html } : undefined, children: children }) })) : null;
|
|
676
672
|
});
|
|
677
673
|
|
|
678
674
|
const renderBenefitDescription = (description, i) => description ? (jsx(Paragraph, { font: "font-light", size: "text-m", color: "text-secondary-text group-data-secondary:text-white", children: description }, `description-${i}`)) : null;
|
|
@@ -1206,7 +1202,7 @@
|
|
|
1206
1202
|
|
|
1207
1203
|
const ApplicationFormLayout = JSX((props) => {
|
|
1208
1204
|
const { className, title, children, ...rest } = props;
|
|
1209
|
-
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container
|
|
1205
|
+
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container space-y-lg", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, children] }) }));
|
|
1210
1206
|
});
|
|
1211
1207
|
|
|
1212
1208
|
function useDialog(Dialog, initialProps = {}) {
|
|
@@ -1628,14 +1624,14 @@
|
|
|
1628
1624
|
birthday: defaultValidator('Укажите дату рождения'),
|
|
1629
1625
|
limitedBirthday: limitedBirthdayValidator(),
|
|
1630
1626
|
birthPlace: defaultValidator('Укажите место рождения'),
|
|
1631
|
-
education:
|
|
1632
|
-
housing:
|
|
1633
|
-
employment:
|
|
1634
|
-
organization:
|
|
1635
|
-
amountWorkers:
|
|
1636
|
-
employerActivities:
|
|
1637
|
-
employerOrganization:
|
|
1638
|
-
positionOrganization:
|
|
1627
|
+
education: defaultSelectValidator('Выберите ваше образование'),
|
|
1628
|
+
housing: defaultSelectValidator('Выберите тип жилья'),
|
|
1629
|
+
employment: defaultSelectValidator('Выберите информацию о трудоустройстве'),
|
|
1630
|
+
organization: defaultSelectValidator('Выберите тип организации'),
|
|
1631
|
+
amountWorkers: defaultSelectValidator('Выберите информацию о количестве сотрудников'),
|
|
1632
|
+
employerActivities: defaultSelectValidator('Выберите вид деятельности организации'),
|
|
1633
|
+
employerOrganization: defaultSelectValidator('Выберите вид организации'),
|
|
1634
|
+
positionOrganization: defaultSelectValidator('Выберите вашу должность'),
|
|
1639
1635
|
dulSerie: serieValidator('Укажите серию паспорта'),
|
|
1640
1636
|
dulNumber: numberValidator('Укажите номер паспорта'),
|
|
1641
1637
|
dulIssueDateField: defaultValidator('Укажите дату выдачи паспорта'),
|
|
@@ -1671,7 +1667,7 @@
|
|
|
1671
1667
|
consentPfrFlg: agreementValidator,
|
|
1672
1668
|
consentOthersFlg: agreementValidator,
|
|
1673
1669
|
consentInformFlg: agreementValidator,
|
|
1674
|
-
familyStatus:
|
|
1670
|
+
familyStatus: defaultSelectValidator('Выберите семейное положение'),
|
|
1675
1671
|
children: lengthStringValidator(2, 'Укажите количество детей'),
|
|
1676
1672
|
familyMembers: lengthStringValidator(2, 'Укажите количество членов семьи'),
|
|
1677
1673
|
dependents: lengthStringValidator(2, 'Укажите количество иждивенцев'),
|
|
@@ -1697,7 +1693,7 @@
|
|
|
1697
1693
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
1698
1694
|
addressMatch: defaultValidator(),
|
|
1699
1695
|
codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
|
|
1700
|
-
confirmationIncome:
|
|
1696
|
+
confirmationIncome: defaultSelectValidator(),
|
|
1701
1697
|
deliveryDate: defaultValidator('Укажите дату доставки'),
|
|
1702
1698
|
addressCourier: addressDaDataValidator(),
|
|
1703
1699
|
cardCategory: defaultValidator('Укажите категорию карты'),
|
|
@@ -2664,6 +2660,154 @@
|
|
|
2664
2660
|
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
2665
2661
|
const AmountField = JSX(({ field }) => (jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })));
|
|
2666
2662
|
|
|
2663
|
+
function copy(source, target) {
|
|
2664
|
+
for (const [k, v] of source.entries()) {
|
|
2665
|
+
if (v !== null && v !== undefined) {
|
|
2666
|
+
target.setItem(k, v);
|
|
2667
|
+
}
|
|
2668
|
+
else {
|
|
2669
|
+
target.removeItem(k);
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
function replicate(primary, secondary) {
|
|
2675
|
+
copy(primary, secondary);
|
|
2676
|
+
copy(secondary, primary);
|
|
2677
|
+
return primary.bus.watch(({ type, event }) => {
|
|
2678
|
+
if (event !== null && event !== undefined) {
|
|
2679
|
+
secondary.setItem(type, event);
|
|
2680
|
+
}
|
|
2681
|
+
else {
|
|
2682
|
+
secondary.removeItem(type);
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
class StorageAdapter {
|
|
2688
|
+
storage;
|
|
2689
|
+
bus;
|
|
2690
|
+
get size() {
|
|
2691
|
+
return this.storage?.length ?? 0;
|
|
2692
|
+
}
|
|
2693
|
+
constructor(storage, bus = new EventBus()) {
|
|
2694
|
+
this.storage = storage;
|
|
2695
|
+
this.bus = bus;
|
|
2696
|
+
}
|
|
2697
|
+
hasItem(key) {
|
|
2698
|
+
return Boolean(this.storage?.getItem(String(key)));
|
|
2699
|
+
}
|
|
2700
|
+
getItem(key) {
|
|
2701
|
+
const _ = this.storage?.getItem(String(key)) ?? null;
|
|
2702
|
+
try {
|
|
2703
|
+
return JSON.parse(String(_));
|
|
2704
|
+
}
|
|
2705
|
+
catch (ex) {
|
|
2706
|
+
return null;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
entries() {
|
|
2710
|
+
return Array.from({ length: this.size }, (_, i) => {
|
|
2711
|
+
const k = String(this.storage?.key(i));
|
|
2712
|
+
return [k, this.getItem(k)];
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
setItem(key, value) {
|
|
2716
|
+
if (value !== null) {
|
|
2717
|
+
this.storage?.setItem(String(key), JSON.stringify(value));
|
|
2718
|
+
}
|
|
2719
|
+
else {
|
|
2720
|
+
this.storage?.removeItem(String(key));
|
|
2721
|
+
}
|
|
2722
|
+
this.bus?.subject(key, value);
|
|
2723
|
+
}
|
|
2724
|
+
removeItem(key) {
|
|
2725
|
+
this.storage?.removeItem(String(key));
|
|
2726
|
+
this.bus?.subject(key, null);
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
class Store {
|
|
2731
|
+
bus;
|
|
2732
|
+
store = new Map();
|
|
2733
|
+
get size() {
|
|
2734
|
+
return this.store.size;
|
|
2735
|
+
}
|
|
2736
|
+
constructor(bus = new EventBus()) {
|
|
2737
|
+
this.bus = bus;
|
|
2738
|
+
}
|
|
2739
|
+
hasItem(key) {
|
|
2740
|
+
return this.store.has(key);
|
|
2741
|
+
}
|
|
2742
|
+
getItem(key) {
|
|
2743
|
+
return this.store.get(key);
|
|
2744
|
+
}
|
|
2745
|
+
entries() {
|
|
2746
|
+
return this.store.entries();
|
|
2747
|
+
}
|
|
2748
|
+
setItem(key, value) {
|
|
2749
|
+
this.store.set(key, value);
|
|
2750
|
+
this.bus.subject(key, value);
|
|
2751
|
+
}
|
|
2752
|
+
removeItem(key) {
|
|
2753
|
+
this.store.delete(key);
|
|
2754
|
+
this.bus.subject(key, null);
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
function useRerender() {
|
|
2759
|
+
const [, setCount] = useState(0);
|
|
2760
|
+
return useCallback(() => setCount(_ => (_ + 1) % (1 << 16)), []);
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
const DEFAULT_METHODS = {};
|
|
2764
|
+
/**
|
|
2765
|
+
* MobX like reactivity (simplified).
|
|
2766
|
+
* Can be used to migrate from Redux/MobX or something else
|
|
2767
|
+
*
|
|
2768
|
+
* @param store
|
|
2769
|
+
* @returns reactive proxy backed by store
|
|
2770
|
+
*/
|
|
2771
|
+
function useStore(store, methods = DEFAULT_METHODS) {
|
|
2772
|
+
const deps = useRef(null);
|
|
2773
|
+
const render = useRerender();
|
|
2774
|
+
useEffect(() => store.bus.watch(ev => {
|
|
2775
|
+
if (deps.current?.has(String(ev.type))) {
|
|
2776
|
+
render();
|
|
2777
|
+
}
|
|
2778
|
+
}), [store, render]);
|
|
2779
|
+
return useMemo(() => new Proxy(methods, {
|
|
2780
|
+
get(_, key) {
|
|
2781
|
+
deps.current ||= new Set();
|
|
2782
|
+
deps.current.add(key);
|
|
2783
|
+
return store.getItem(key);
|
|
2784
|
+
},
|
|
2785
|
+
has(_, key) {
|
|
2786
|
+
deps.current ||= new Set();
|
|
2787
|
+
deps.current.add(key);
|
|
2788
|
+
return store.hasItem(key);
|
|
2789
|
+
},
|
|
2790
|
+
set(_, key, value) {
|
|
2791
|
+
store.setItem(key, value);
|
|
2792
|
+
return true;
|
|
2793
|
+
},
|
|
2794
|
+
deleteProperty(_, key) {
|
|
2795
|
+
store.removeItem(key);
|
|
2796
|
+
return true;
|
|
2797
|
+
}
|
|
2798
|
+
}), [store]);
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
const localStore = new Store(); // localStorage cache
|
|
2802
|
+
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
2803
|
+
function useLocalStore(methods) {
|
|
2804
|
+
return useStore(localStore, methods);
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
const useCreditFormStore = () => {
|
|
2808
|
+
return useLocalStore();
|
|
2809
|
+
};
|
|
2810
|
+
|
|
2667
2811
|
const SelectField = UniBlock(({ field, source, fieldName, input, placeholder = 'Выберите из списка',
|
|
2668
2812
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2669
2813
|
options, ...rest }) => {
|
|
@@ -2675,8 +2819,14 @@
|
|
|
2675
2819
|
});
|
|
2676
2820
|
|
|
2677
2821
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
2678
|
-
const { data
|
|
2679
|
-
|
|
2822
|
+
const { data } = useLeadFormData('EMPLOYEES_NUMBER');
|
|
2823
|
+
const store = useCreditFormStore();
|
|
2824
|
+
useEffect(() => {
|
|
2825
|
+
if (data) {
|
|
2826
|
+
store.amountWorkers = data;
|
|
2827
|
+
}
|
|
2828
|
+
}, [data]);
|
|
2829
|
+
return (jsx(SelectField, { field: field, source: store.amountWorkers ?? [], label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0445 \u0432 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", fieldName: "amountWorkers", input: input }));
|
|
2680
2830
|
});
|
|
2681
2831
|
|
|
2682
2832
|
const AnnualRevenueField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...getValidation(field('annualRevenue'), validatorObj.annualRevenue, input?.required) })));
|
|
@@ -3007,7 +3157,7 @@
|
|
|
3007
3157
|
const [cardTypes, setCardTypes] = useState([]);
|
|
3008
3158
|
const [programId] = useLocalStorage('programId');
|
|
3009
3159
|
const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
|
|
3010
|
-
const selectedPaymentSystem = field('paymentSystem')
|
|
3160
|
+
const selectedPaymentSystem = field('paymentSystem')?.value?.type;
|
|
3011
3161
|
useEffect(() => {
|
|
3012
3162
|
if (selectedPaymentSystem && programId) {
|
|
3013
3163
|
(async () => {
|
|
@@ -3505,13 +3655,25 @@
|
|
|
3505
3655
|
});
|
|
3506
3656
|
|
|
3507
3657
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
3508
|
-
const { data
|
|
3509
|
-
|
|
3658
|
+
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
3659
|
+
const store = useCreditFormStore();
|
|
3660
|
+
useEffect(() => {
|
|
3661
|
+
if (data) {
|
|
3662
|
+
store.employerActivities = data;
|
|
3663
|
+
}
|
|
3664
|
+
}, [data]);
|
|
3665
|
+
return (jsx(SelectField, { field: field, source: store.employerActivities ?? [], label: "\u0412\u0438\u0434 \u0434\u0435\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438-\u0440\u0430\u0431\u043E\u0442\u043E\u0434\u0430\u0442\u0435\u043B\u044F", fieldName: "employerActivities", input: input }));
|
|
3510
3666
|
});
|
|
3511
3667
|
|
|
3512
3668
|
const EmployerOrganizationField = JSX(({ field, input }) => {
|
|
3513
|
-
const { data
|
|
3514
|
-
|
|
3669
|
+
const { data } = useLeadFormData('ORGANIZATION_KIND');
|
|
3670
|
+
const store = useCreditFormStore();
|
|
3671
|
+
useEffect(() => {
|
|
3672
|
+
if (data) {
|
|
3673
|
+
store.employerOrganization = data;
|
|
3674
|
+
}
|
|
3675
|
+
}, [data]);
|
|
3676
|
+
return (jsx(SelectField, { field: field, source: store.employerOrganization ?? [], label: "\u0412\u0438\u0434 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043E\u0442\u043E\u0434\u0430\u0442\u0435\u043B\u044F", fieldName: "employerOrganization", input: input }));
|
|
3515
3677
|
});
|
|
3516
3678
|
|
|
3517
3679
|
const EmploymentField = JSX(({ field, input }) => {
|
|
@@ -3565,11 +3727,118 @@
|
|
|
3565
3727
|
return (jsx(SelectField, { field: field, source: housing, label: "\u0422\u0438\u043F \u0436\u0438\u043B\u044C\u044F", fieldName: "housing", input: input }));
|
|
3566
3728
|
});
|
|
3567
3729
|
|
|
3730
|
+
const getOrganizationActivityType = (options, okved) => {
|
|
3731
|
+
if (!okved) {
|
|
3732
|
+
return null;
|
|
3733
|
+
}
|
|
3734
|
+
const getOptionByKey = getOptionOp(options);
|
|
3735
|
+
const okvedType = +okved?.split('.')[0];
|
|
3736
|
+
const secondOkvedType = +okved?.split('.')[1];
|
|
3737
|
+
switch (okvedType) {
|
|
3738
|
+
case 1:
|
|
3739
|
+
return getOptionByKey("AGRICULTURE" /* EOrganizationActivityTypes.AGRICULTURE */);
|
|
3740
|
+
case 35:
|
|
3741
|
+
return getOptionByKey("FUEL_AND_ENERGY" /* EOrganizationActivityTypes.FUEL_AND_ENERGY */);
|
|
3742
|
+
case 41:
|
|
3743
|
+
case 42:
|
|
3744
|
+
case 43:
|
|
3745
|
+
return getOptionByKey("CONSTRUCTION" /* EOrganizationActivityTypes.CONSTRUCTION */);
|
|
3746
|
+
case 46:
|
|
3747
|
+
case 47:
|
|
3748
|
+
return getOptionByKey("TRADE" /* EOrganizationActivityTypes.TRADE */);
|
|
3749
|
+
case 55:
|
|
3750
|
+
case 79:
|
|
3751
|
+
return getOptionByKey("TOURISM" /* EOrganizationActivityTypes.TOURISM */);
|
|
3752
|
+
case 62:
|
|
3753
|
+
return getOptionByKey("TECHNOLOGY" /* EOrganizationActivityTypes.TECHNOLOGY */);
|
|
3754
|
+
case 63:
|
|
3755
|
+
return getOptionByKey("CONSULTING_SERVICE" /* EOrganizationActivityTypes.CONSULTING_SERVICE */);
|
|
3756
|
+
case 64:
|
|
3757
|
+
return getOptionByKey("BANK" /* EOrganizationActivityTypes.BANK */);
|
|
3758
|
+
case 65:
|
|
3759
|
+
return getOptionByKey("INSURER" /* EOrganizationActivityTypes.INSURER */);
|
|
3760
|
+
case 66:
|
|
3761
|
+
return getOptionByKey("FINANCIAL_INSTITUTIONS" /* EOrganizationActivityTypes.FINANCIAL_INSTITUTIONS */);
|
|
3762
|
+
case 72:
|
|
3763
|
+
case 74:
|
|
3764
|
+
return getOptionByKey("SCIENCE" /* EOrganizationActivityTypes.SCIENCE */);
|
|
3765
|
+
case 80:
|
|
3766
|
+
return getOptionByKey("SECURITY" /* EOrganizationActivityTypes.SECURITY */);
|
|
3767
|
+
case 84: {
|
|
3768
|
+
if (secondOkvedType < 22) {
|
|
3769
|
+
return getOptionByKey("GOVERNANCE" /* EOrganizationActivityTypes.GOVERNANCE */);
|
|
3770
|
+
}
|
|
3771
|
+
if (secondOkvedType === 22) {
|
|
3772
|
+
return getOptionByKey("ARMY" /* EOrganizationActivityTypes.ARMY */);
|
|
3773
|
+
}
|
|
3774
|
+
return getOptionByKey("OTHER_SECTORS" /* EOrganizationActivityTypes.OTHER_SECTORS */);
|
|
3775
|
+
}
|
|
3776
|
+
case 85:
|
|
3777
|
+
return getOptionByKey("EDUCATION" /* EOrganizationActivityTypes.EDUCATION */);
|
|
3778
|
+
case 86:
|
|
3779
|
+
return getOptionByKey("HEALTHCARE" /* EOrganizationActivityTypes.HEALTHCARE */);
|
|
3780
|
+
case 87:
|
|
3781
|
+
return getOptionByKey("SOCIAL_SPHERE" /* EOrganizationActivityTypes.SOCIAL_SPHERE */);
|
|
3782
|
+
default: {
|
|
3783
|
+
if (okvedType >= 10 && okvedType <= 33) {
|
|
3784
|
+
return getOptionByKey("INDUSTRY" /* EOrganizationActivityTypes.INDUSTRY */);
|
|
3785
|
+
}
|
|
3786
|
+
if (okvedType >= 5 && okvedType <= 9) {
|
|
3787
|
+
return getOptionByKey("FUEL_AND_ENERGY" /* EOrganizationActivityTypes.FUEL_AND_ENERGY */);
|
|
3788
|
+
}
|
|
3789
|
+
if (okvedType >= 49 && okvedType <= 53) {
|
|
3790
|
+
return getOptionByKey("TRANSPORT" /* EOrganizationActivityTypes.TRANSPORT */);
|
|
3791
|
+
}
|
|
3792
|
+
return getOptionByKey("OTHER_SECTORS" /* EOrganizationActivityTypes.OTHER_SECTORS */);
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
};
|
|
3796
|
+
const getEmployeesNumberOption = (options, count) => {
|
|
3797
|
+
const [option] = [options?.find((_) => Number(count) <= Number(_.description))].map((_) => ({
|
|
3798
|
+
key: _?.key ?? '',
|
|
3799
|
+
text: _?.value ?? '',
|
|
3800
|
+
}));
|
|
3801
|
+
return option;
|
|
3802
|
+
};
|
|
3803
|
+
const getOrganizationKind = (options, okopf) => {
|
|
3804
|
+
const getOptionByKey = getOptionOp(options);
|
|
3805
|
+
if ([40001, 40002, 71610].includes(okopf)) {
|
|
3806
|
+
return getOptionByKey('FOREIGN');
|
|
3807
|
+
}
|
|
3808
|
+
return getOptionByKey('RUSSIAN');
|
|
3809
|
+
};
|
|
3810
|
+
const getOrganizationType = (options, okopf, inn) => {
|
|
3811
|
+
const getOptionByKey = getOptionOp(options);
|
|
3812
|
+
if (inn === '7725114488') {
|
|
3813
|
+
return getOptionByKey('RSHB');
|
|
3814
|
+
}
|
|
3815
|
+
if (okopf === 50102) {
|
|
3816
|
+
return getOptionByKey('SOLE_TRADER');
|
|
3817
|
+
}
|
|
3818
|
+
if (okopf >= 75000 && okopf <= 75505 && okopf !== 75500) {
|
|
3819
|
+
return getOptionByKey('BUDGETARY');
|
|
3820
|
+
}
|
|
3821
|
+
return getOptionByKey('COMMERCIAL');
|
|
3822
|
+
};
|
|
3823
|
+
const getOptionOp = (options) => (key) => options.map((_) => ({ key, text: _.value || '' })).find((_) => _.key === key) ?? null;
|
|
3824
|
+
|
|
3825
|
+
const updateOrganizationFields = (store, field, item) => {
|
|
3826
|
+
const inn = item.data?.inn ?? '';
|
|
3827
|
+
const okopf = Number(item.data?.opf?.code);
|
|
3828
|
+
const okved = item.data?.okved ?? '';
|
|
3829
|
+
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
3830
|
+
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3831
|
+
field?.('amountWorkers')?.onChange?.(getEmployeesNumberOption(store?.amountWorkers, item.data?.employee_count));
|
|
3832
|
+
field?.('employerActivities')?.onChange?.(getOrganizationActivityType(store?.employerActivities ?? [], okved));
|
|
3833
|
+
field?.('organization')?.onChange?.(getOrganizationType(store?.organization ?? [], okopf, inn));
|
|
3834
|
+
field?.('employerOrganization')?.onChange?.(getOrganizationKind(store?.employerOrganization ?? [], okopf));
|
|
3835
|
+
};
|
|
3836
|
+
|
|
3568
3837
|
const InnField = JSX(({ field, input }) => {
|
|
3838
|
+
const store = useCreditFormStore();
|
|
3569
3839
|
const onDaDataChange = useCallback((item) => {
|
|
3570
|
-
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3571
3840
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
3572
|
-
field
|
|
3841
|
+
updateOrganizationFields(store, field, item);
|
|
3573
3842
|
}, []);
|
|
3574
3843
|
return (jsx(InputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...getValidation(field('inn'), validatorObj.inn, input?.required), onDaDataChange: onDaDataChange }));
|
|
3575
3844
|
});
|
|
@@ -3629,14 +3898,21 @@
|
|
|
3629
3898
|
const OnlineCheckoutField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') })) : null);
|
|
3630
3899
|
|
|
3631
3900
|
const OrganizationField = JSX(({ field, input }) => {
|
|
3632
|
-
const { data
|
|
3633
|
-
|
|
3901
|
+
const { data } = useLeadFormData('ORGANIZATION_TYPE');
|
|
3902
|
+
const store = useCreditFormStore();
|
|
3903
|
+
useEffect(() => {
|
|
3904
|
+
if (data) {
|
|
3905
|
+
store.organization = data;
|
|
3906
|
+
}
|
|
3907
|
+
}, [data]);
|
|
3908
|
+
return (jsx(SelectField, { field: field, source: store.organization ?? [], label: "\u0422\u0438\u043F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", fieldName: "organization", input: input }));
|
|
3634
3909
|
});
|
|
3635
3910
|
|
|
3636
3911
|
const OrganizationNameField = JSX(({ field, input }) => {
|
|
3912
|
+
const store = useCreditFormStore();
|
|
3637
3913
|
const onDaDataChange = useCallback((item) => {
|
|
3638
3914
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
3639
|
-
field
|
|
3915
|
+
updateOrganizationFields(store, field, item);
|
|
3640
3916
|
}, []);
|
|
3641
3917
|
return (jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...getValidation(field('organizationName'), validatorObj.organizationName, input?.required), onDaDataChange: onDaDataChange }));
|
|
3642
3918
|
});
|
|
@@ -3663,10 +3939,7 @@
|
|
|
3663
3939
|
const data = await fetchRetailJSON('/public-data/creditProgramConditions', 'POST', {
|
|
3664
3940
|
creditProgramId,
|
|
3665
3941
|
});
|
|
3666
|
-
return
|
|
3667
|
-
id: paymentSystem.type,
|
|
3668
|
-
text: paymentSystem.name,
|
|
3669
|
-
})) ?? []);
|
|
3942
|
+
return data?.paymentSystems || [];
|
|
3670
3943
|
};
|
|
3671
3944
|
|
|
3672
3945
|
const PaymentSystemField = JSX(({ field, input }) => {
|
|
@@ -3681,8 +3954,10 @@
|
|
|
3681
3954
|
})();
|
|
3682
3955
|
}
|
|
3683
3956
|
}, []);
|
|
3684
|
-
|
|
3957
|
+
const handleChange = useCallback((type) => onChange?.(paymentSystemOptions?.find((_) => _.type === type)), [paymentSystemOptions, onChange]);
|
|
3958
|
+
return (jsx(RadioButtonGroupControl, { label: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430", orientation: "horizontal", items: formatPaymentSystems(paymentSystemOptions), ...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required), value: value?.type, onChange: handleChange }));
|
|
3685
3959
|
});
|
|
3960
|
+
const formatPaymentSystems = (paymentSystems) => paymentSystems?.map((_) => ({ id: _.type, text: _.name })) ?? [];
|
|
3686
3961
|
|
|
3687
3962
|
const isPlaceholder = (_) => _ === '_';
|
|
3688
3963
|
const isDigit = (_) => /\d/.test(_);
|
|
@@ -4165,58 +4440,6 @@
|
|
|
4165
4440
|
},
|
|
4166
4441
|
];
|
|
4167
4442
|
|
|
4168
|
-
const initialFormState = {
|
|
4169
|
-
typeForm: '',
|
|
4170
|
-
region: { key: '', text: '' },
|
|
4171
|
-
addressBranch: { key: '', text: '' },
|
|
4172
|
-
surname: '',
|
|
4173
|
-
name: '',
|
|
4174
|
-
phone: '',
|
|
4175
|
-
secondaryPhone: '',
|
|
4176
|
-
organizationPhone: '',
|
|
4177
|
-
comment: '',
|
|
4178
|
-
product: '',
|
|
4179
|
-
partnerComments: '',
|
|
4180
|
-
annualRevenue: '',
|
|
4181
|
-
term: 12,
|
|
4182
|
-
amount: 100000,
|
|
4183
|
-
acquiringType: ACQUIRING_TYPES[0],
|
|
4184
|
-
serviceType: SERVICE_TYPES[0],
|
|
4185
|
-
feedbackMethod: FEEDBACK_METHOD[0],
|
|
4186
|
-
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
4187
|
-
vedTypes: VED_TYPES[0],
|
|
4188
|
-
birthday: undefined,
|
|
4189
|
-
limitedBirthday: undefined,
|
|
4190
|
-
isClient: false,
|
|
4191
|
-
onlineCheckout: false,
|
|
4192
|
-
posTerminal: false,
|
|
4193
|
-
consentToReceiveMaterials: false,
|
|
4194
|
-
consentDataProcessing: false,
|
|
4195
|
-
processPersonalDataFlg: false,
|
|
4196
|
-
consentProviderFlg: false,
|
|
4197
|
-
consentOthersFlg: false,
|
|
4198
|
-
consentInformFlg: false,
|
|
4199
|
-
addressRegistration: '',
|
|
4200
|
-
participantDateRegistration: undefined,
|
|
4201
|
-
currency: '',
|
|
4202
|
-
paymentSystem: '',
|
|
4203
|
-
cardCategory: { key: '', text: '' },
|
|
4204
|
-
codeWord: '',
|
|
4205
|
-
addressRetail: { key: '', text: '' },
|
|
4206
|
-
};
|
|
4207
|
-
const getInitialFormState$2 = (inputs, savedForm, typeForm = '') => {
|
|
4208
|
-
if (savedForm) {
|
|
4209
|
-
const formStateCopy = { ...savedForm };
|
|
4210
|
-
formStateCopy.limitedBirthday = new Date(formStateCopy?.limitedBirthday || 0);
|
|
4211
|
-
return formStateCopy;
|
|
4212
|
-
}
|
|
4213
|
-
const formState = Object.fromEntries(inputs.map((_) => [
|
|
4214
|
-
_.name,
|
|
4215
|
-
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
|
|
4216
|
-
]));
|
|
4217
|
-
return { ...formState, typeForm: { key: typeForm, text: '' } };
|
|
4218
|
-
};
|
|
4219
|
-
|
|
4220
4443
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
4221
4444
|
|
|
4222
4445
|
const createDraftTask = async (body) => {
|
|
@@ -4230,6 +4453,7 @@
|
|
|
4230
4453
|
|
|
4231
4454
|
const updateUserTask = (body) => doRequest('/user-data/updateUserTask', 'PUT', body);
|
|
4232
4455
|
|
|
4456
|
+
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
4233
4457
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
4234
4458
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', processPersonalDataFlg, consentProviderFlg, consentPfrFlg, consentPhotoFlg, consentAssignmentClaimsFlg, consentCollectionFlg, consentInformFlg, } = formData;
|
|
4235
4459
|
return {
|
|
@@ -4252,6 +4476,16 @@
|
|
|
4252
4476
|
};
|
|
4253
4477
|
};
|
|
4254
4478
|
|
|
4479
|
+
const useSetter = (target, key) => useCallback((value) => {
|
|
4480
|
+
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
4481
|
+
if (newValue !== null && newValue !== undefined) {
|
|
4482
|
+
target[key] = newValue;
|
|
4483
|
+
}
|
|
4484
|
+
else {
|
|
4485
|
+
delete target[key];
|
|
4486
|
+
}
|
|
4487
|
+
}, [target, key]);
|
|
4488
|
+
|
|
4255
4489
|
const sendCode = (body) => fetchRetailJSON('/sms/sendCode', 'POST', body).then((res) => !isErrorResult(res, body.phoneNumber));
|
|
4256
4490
|
const isErrorResult = (res, phoneNumber) => Boolean(res) &&
|
|
4257
4491
|
typeof res !== 'string' &&
|
|
@@ -4431,10 +4665,11 @@
|
|
|
4431
4665
|
};
|
|
4432
4666
|
};
|
|
4433
4667
|
|
|
4434
|
-
const VerifyPhoneDialog = JSX(({
|
|
4668
|
+
const VerifyPhoneDialog = JSX(({ phone, code = true, codeLength = 4, consents, onSuccess = noop, onClose = noop }) => {
|
|
4435
4669
|
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
4436
4670
|
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttempts, } = useVerifyPhoneDialogSubmit({ values, onSuccess });
|
|
4437
4671
|
const captchaDialog = useDialog(CaptchaDialog);
|
|
4672
|
+
const phoneNumber = formatPhone(phone);
|
|
4438
4673
|
const handleSendCode = useCallback(async () => {
|
|
4439
4674
|
const isSuccessSendCode = await sendCode({
|
|
4440
4675
|
phoneNumber,
|
|
@@ -4452,9 +4687,9 @@
|
|
|
4452
4687
|
useEffect(() => {
|
|
4453
4688
|
handleSendCode();
|
|
4454
4689
|
}, []);
|
|
4455
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title:
|
|
4690
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430", description: `Мы отправили код на ${phone}`, headlineVersion: "XS", isEmbedded: true, as: "h6" }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$1(timeNextReq, setTimeNextReq, handleSendCode), jsxs(RichText, { itemSize: "list-s", children: [jsx("span", { children: "\u0412\u0432\u043E\u0434\u044F \u043A\u043E\u0434, \u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E, \u0447\u0442\u043E \u043E\u0437\u043D\u0430\u043A\u043E\u043C\u043B\u0435\u043D \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u044E: " }), jsx("ul", { children: consents?.map((_, i) => (jsx("li", { children: _ }, `${_}-${i}`))) })] }), renderNextButton(isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
4456
4691
|
});
|
|
4457
|
-
const
|
|
4692
|
+
const renderNextButton = (isDisabled, onClick) => (jsx(SubmitButton, { text: "\u0414\u0430\u043B\u0435\u0435", isDisabled: isDisabled, onClick: onClick }));
|
|
4458
4693
|
const renderText$1 = (timeNextReq, setTimeNextReq, handleSendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-base ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: handleSendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
|
|
4459
4694
|
|
|
4460
4695
|
const defaultConsentText = {
|
|
@@ -4510,7 +4745,8 @@
|
|
|
4510
4745
|
const handleSubmitBkiConstent = (phone, profileId) => async (confirmStatus) => {
|
|
4511
4746
|
if (confirmStatus === 'SIGNED' && phone) {
|
|
4512
4747
|
verifyPhoneDialog.open({
|
|
4513
|
-
|
|
4748
|
+
phone,
|
|
4749
|
+
consents: ['согласие на запрос информации в БКИ'],
|
|
4514
4750
|
onSuccess: handleSuccessVerify(profileId),
|
|
4515
4751
|
});
|
|
4516
4752
|
}
|
|
@@ -4522,14 +4758,6 @@
|
|
|
4522
4758
|
open: (phone, profileId) => open({ onSubmit: handleSubmitBkiConstent(phone, profileId), onClose }),
|
|
4523
4759
|
};
|
|
4524
4760
|
};
|
|
4525
|
-
const verifyPhoneContent$1 = (phone) => ({
|
|
4526
|
-
title: 'Подтвердите номер телефона',
|
|
4527
|
-
description: `Мы отправили код на ${phone}`,
|
|
4528
|
-
phoneNumber: formatPhone(phone),
|
|
4529
|
-
textButton: 'Далее',
|
|
4530
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
|
|
4531
|
-
<ul><li>согласие на запрос информации в БКИ</li></ul>`,
|
|
4532
|
-
});
|
|
4533
4761
|
|
|
4534
4762
|
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
4535
4763
|
|
|
@@ -4662,20 +4890,20 @@
|
|
|
4662
4890
|
};
|
|
4663
4891
|
};
|
|
4664
4892
|
|
|
4665
|
-
const
|
|
4893
|
+
const useLeadFormStore = () => useLocalStore();
|
|
4894
|
+
|
|
4895
|
+
const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
|
|
4666
4896
|
const [responseStatus, setResponseStatus] = useState('');
|
|
4667
|
-
const
|
|
4668
|
-
const
|
|
4669
|
-
const [, setParticipantId] = useLocalStorage('participantId');
|
|
4670
|
-
const [, setProgramId] = useLocalStorage('programId');
|
|
4897
|
+
const leadFormStore = useLeadFormStore();
|
|
4898
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
4671
4899
|
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
4672
4900
|
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
4673
4901
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
4674
4902
|
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber }) => {
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4903
|
+
leadFormStore.participantId = participantId;
|
|
4904
|
+
leadFormStore.taskId = taskId;
|
|
4905
|
+
leadFormStore.profileId = profileId;
|
|
4906
|
+
leadFormStore.programId = programNumber;
|
|
4679
4907
|
}, []);
|
|
4680
4908
|
// eslint-disable-next-line consistent-return
|
|
4681
4909
|
const handleSubmit = useCallback(async (formData) => {
|
|
@@ -4708,7 +4936,8 @@
|
|
|
4708
4936
|
.filter((_) => formData[_])
|
|
4709
4937
|
.map((_) => CONSENTS[_]?.text);
|
|
4710
4938
|
verifyPhoneDialog.open({
|
|
4711
|
-
|
|
4939
|
+
phone: formData?.phone,
|
|
4940
|
+
consents: acceptedConsents,
|
|
4712
4941
|
onSuccess: handleSuccessVerify,
|
|
4713
4942
|
});
|
|
4714
4943
|
}
|
|
@@ -4743,14 +4972,6 @@
|
|
|
4743
4972
|
saveUserData({ participantId, taskId, profileId, programId });
|
|
4744
4973
|
saveForm(formData);
|
|
4745
4974
|
};
|
|
4746
|
-
const verifyPhoneContent = (phone, consents) => ({
|
|
4747
|
-
title: 'Подтвердите номер телефона',
|
|
4748
|
-
description: `Мы отправили код на ${phone}`,
|
|
4749
|
-
phoneNumber: formatPhone(phone),
|
|
4750
|
-
textButton: 'Далее',
|
|
4751
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
|
|
4752
|
-
});
|
|
4753
|
-
const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
4754
4975
|
const transformOtherConsentsField = (formData) => {
|
|
4755
4976
|
const { consentOthersFlg, ...form } = formData;
|
|
4756
4977
|
return {
|
|
@@ -4763,6 +4984,56 @@
|
|
|
4763
4984
|
|
|
4764
4985
|
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
4765
4986
|
|
|
4987
|
+
const initialFormState = {
|
|
4988
|
+
typeForm: '',
|
|
4989
|
+
region: { key: '', text: '' },
|
|
4990
|
+
addressBranch: { key: '', text: '' },
|
|
4991
|
+
surname: '',
|
|
4992
|
+
name: '',
|
|
4993
|
+
phone: '',
|
|
4994
|
+
secondaryPhone: '',
|
|
4995
|
+
organizationPhone: '',
|
|
4996
|
+
comment: '',
|
|
4997
|
+
product: '',
|
|
4998
|
+
partnerComments: '',
|
|
4999
|
+
annualRevenue: '',
|
|
5000
|
+
term: 12,
|
|
5001
|
+
amount: 100000,
|
|
5002
|
+
acquiringType: ACQUIRING_TYPES[0],
|
|
5003
|
+
serviceType: SERVICE_TYPES[0],
|
|
5004
|
+
feedbackMethod: FEEDBACK_METHOD[0],
|
|
5005
|
+
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
5006
|
+
vedTypes: VED_TYPES[0],
|
|
5007
|
+
birthday: undefined,
|
|
5008
|
+
limitedBirthday: undefined,
|
|
5009
|
+
isClient: false,
|
|
5010
|
+
onlineCheckout: false,
|
|
5011
|
+
posTerminal: false,
|
|
5012
|
+
consentToReceiveMaterials: false,
|
|
5013
|
+
consentDataProcessing: false,
|
|
5014
|
+
processPersonalDataFlg: false,
|
|
5015
|
+
consentProviderFlg: false,
|
|
5016
|
+
consentOthersFlg: false,
|
|
5017
|
+
consentInformFlg: false,
|
|
5018
|
+
addressRegistration: '',
|
|
5019
|
+
participantDateRegistration: undefined,
|
|
5020
|
+
currency: '',
|
|
5021
|
+
paymentSystem: { name: '', type: '' },
|
|
5022
|
+
cardCategory: { key: '', text: '' },
|
|
5023
|
+
codeWord: '',
|
|
5024
|
+
addressRetail: { key: '', text: '' },
|
|
5025
|
+
};
|
|
5026
|
+
const getInitialFormState$2 = (inputs, savedForm) => {
|
|
5027
|
+
if (savedForm) {
|
|
5028
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5029
|
+
}
|
|
5030
|
+
const formState = Object.fromEntries(inputs.map((_) => [
|
|
5031
|
+
_.name,
|
|
5032
|
+
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
|
|
5033
|
+
]));
|
|
5034
|
+
return { ...formState, typeForm: { key: '', text: '' } };
|
|
5035
|
+
};
|
|
5036
|
+
|
|
4766
5037
|
const parseEsiaProfile = (esiaProfile) => {
|
|
4767
5038
|
const { profile, addInfo, document, addressRegistration, addressFact } = esiaProfile;
|
|
4768
5039
|
return {
|
|
@@ -4812,10 +5083,12 @@
|
|
|
4812
5083
|
};
|
|
4813
5084
|
};
|
|
4814
5085
|
|
|
4815
|
-
const useInitApplicationLead = (nextStepLink) => {
|
|
5086
|
+
const useInitApplicationLead = (inputs, nextStepLink) => {
|
|
4816
5087
|
const navigator = locationNavigator();
|
|
4817
5088
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
4818
|
-
const
|
|
5089
|
+
const leadFormStore = useLeadFormStore();
|
|
5090
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
5091
|
+
const initialFormState = useMemo(() => getInitialFormState$2(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
4819
5092
|
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
4820
5093
|
startLoading();
|
|
4821
5094
|
try {
|
|
@@ -4826,7 +5099,7 @@
|
|
|
4826
5099
|
redirectUri: globalThis.location?.href,
|
|
4827
5100
|
});
|
|
4828
5101
|
if (data) {
|
|
4829
|
-
|
|
5102
|
+
saveForm((_) => ({
|
|
4830
5103
|
..._,
|
|
4831
5104
|
...parseEsiaProfile(data),
|
|
4832
5105
|
}));
|
|
@@ -4850,21 +5123,16 @@
|
|
|
4850
5123
|
sessionStorage.removeItem('refreshToken');
|
|
4851
5124
|
}
|
|
4852
5125
|
}, []);
|
|
4853
|
-
return {
|
|
4854
|
-
isLoading,
|
|
4855
|
-
};
|
|
5126
|
+
return [initialFormState, { isLoading }];
|
|
4856
5127
|
};
|
|
4857
5128
|
|
|
4858
5129
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
|
|
4859
|
-
const inputs = (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
4860
|
-
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
4861
|
-
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
4862
|
-
const initialFormState = getInitialFormState$2(inputs, leadForm);
|
|
5130
|
+
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
5131
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead(inputs, nextStepLink);
|
|
4863
5132
|
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
4864
5133
|
inputs,
|
|
4865
5134
|
programId,
|
|
4866
5135
|
nextStepLink,
|
|
4867
|
-
saveForm: setLeadForm,
|
|
4868
5136
|
});
|
|
4869
5137
|
const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4870
5138
|
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
@@ -6411,7 +6679,7 @@
|
|
|
6411
6679
|
|
|
6412
6680
|
const formStateMap$1 = [
|
|
6413
6681
|
{
|
|
6414
|
-
paymentSystem: '',
|
|
6682
|
+
paymentSystem: { name: '', type: '' },
|
|
6415
6683
|
currency: '810',
|
|
6416
6684
|
codeWord: '',
|
|
6417
6685
|
},
|
|
@@ -8168,150 +8436,6 @@
|
|
|
8168
8436
|
};
|
|
8169
8437
|
const ErrorBlock = JSX(({ className = '', title, description, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-center items-center', className), defaultPadding: style('p-6xl'), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center", children: renderErrorContent(error) }), jsx(Headline, { title: title, description: description, headlineVersion: "XL", isEmbedded: true, className: "mb-2xl last:mb-0" }), button?.text ? (jsx(LinkButton, { version: button?.version, text: button?.text, ...button })) : null] })));
|
|
8170
8438
|
|
|
8171
|
-
function copy(source, target) {
|
|
8172
|
-
for (const [k, v] of source.entries()) {
|
|
8173
|
-
if (v !== null && v !== undefined) {
|
|
8174
|
-
target.setItem(k, v);
|
|
8175
|
-
}
|
|
8176
|
-
else {
|
|
8177
|
-
target.removeItem(k);
|
|
8178
|
-
}
|
|
8179
|
-
}
|
|
8180
|
-
}
|
|
8181
|
-
|
|
8182
|
-
function replicate(primary, secondary) {
|
|
8183
|
-
copy(primary, secondary);
|
|
8184
|
-
copy(secondary, primary);
|
|
8185
|
-
return primary.bus.watch(({ type, event }) => {
|
|
8186
|
-
if (event !== null && event !== undefined) {
|
|
8187
|
-
secondary.setItem(type, event);
|
|
8188
|
-
}
|
|
8189
|
-
else {
|
|
8190
|
-
secondary.removeItem(type);
|
|
8191
|
-
}
|
|
8192
|
-
});
|
|
8193
|
-
}
|
|
8194
|
-
|
|
8195
|
-
class StorageAdapter {
|
|
8196
|
-
storage;
|
|
8197
|
-
bus;
|
|
8198
|
-
get size() {
|
|
8199
|
-
return this.storage?.length ?? 0;
|
|
8200
|
-
}
|
|
8201
|
-
constructor(storage, bus = new EventBus()) {
|
|
8202
|
-
this.storage = storage;
|
|
8203
|
-
this.bus = bus;
|
|
8204
|
-
}
|
|
8205
|
-
hasItem(key) {
|
|
8206
|
-
return Boolean(this.storage?.getItem(String(key)));
|
|
8207
|
-
}
|
|
8208
|
-
getItem(key) {
|
|
8209
|
-
const _ = this.storage?.getItem(String(key)) ?? null;
|
|
8210
|
-
try {
|
|
8211
|
-
return JSON.parse(String(_));
|
|
8212
|
-
}
|
|
8213
|
-
catch (ex) {
|
|
8214
|
-
return null;
|
|
8215
|
-
}
|
|
8216
|
-
}
|
|
8217
|
-
entries() {
|
|
8218
|
-
return Array.from({ length: this.size }, (_, i) => {
|
|
8219
|
-
const k = String(this.storage?.key(i));
|
|
8220
|
-
return [k, this.getItem(k)];
|
|
8221
|
-
});
|
|
8222
|
-
}
|
|
8223
|
-
setItem(key, value) {
|
|
8224
|
-
if (value !== null) {
|
|
8225
|
-
this.storage?.setItem(String(key), JSON.stringify(value));
|
|
8226
|
-
}
|
|
8227
|
-
else {
|
|
8228
|
-
this.storage?.removeItem(String(key));
|
|
8229
|
-
}
|
|
8230
|
-
this.bus?.subject(key, value);
|
|
8231
|
-
}
|
|
8232
|
-
removeItem(key) {
|
|
8233
|
-
this.storage?.removeItem(String(key));
|
|
8234
|
-
this.bus?.subject(key, null);
|
|
8235
|
-
}
|
|
8236
|
-
}
|
|
8237
|
-
|
|
8238
|
-
class Store {
|
|
8239
|
-
bus;
|
|
8240
|
-
store = new Map();
|
|
8241
|
-
get size() {
|
|
8242
|
-
return this.store.size;
|
|
8243
|
-
}
|
|
8244
|
-
constructor(bus = new EventBus()) {
|
|
8245
|
-
this.bus = bus;
|
|
8246
|
-
}
|
|
8247
|
-
hasItem(key) {
|
|
8248
|
-
return this.store.has(key);
|
|
8249
|
-
}
|
|
8250
|
-
getItem(key) {
|
|
8251
|
-
return this.store.get(key);
|
|
8252
|
-
}
|
|
8253
|
-
entries() {
|
|
8254
|
-
return this.store.entries();
|
|
8255
|
-
}
|
|
8256
|
-
setItem(key, value) {
|
|
8257
|
-
this.store.set(key, value);
|
|
8258
|
-
this.bus.subject(key, value);
|
|
8259
|
-
}
|
|
8260
|
-
removeItem(key) {
|
|
8261
|
-
this.store.delete(key);
|
|
8262
|
-
this.bus.subject(key, null);
|
|
8263
|
-
}
|
|
8264
|
-
}
|
|
8265
|
-
|
|
8266
|
-
function useRerender() {
|
|
8267
|
-
const [, setCount] = useState(0);
|
|
8268
|
-
return useCallback(() => setCount(_ => (_ + 1) % (1 << 16)), []);
|
|
8269
|
-
}
|
|
8270
|
-
|
|
8271
|
-
const DEFAULT_METHODS = {};
|
|
8272
|
-
/**
|
|
8273
|
-
* MobX like reactivity (simplified).
|
|
8274
|
-
* Can be used to migrate from Redux/MobX or something else
|
|
8275
|
-
*
|
|
8276
|
-
* @param store
|
|
8277
|
-
* @returns reactive proxy backed by store
|
|
8278
|
-
*/
|
|
8279
|
-
function useStore(store, methods = DEFAULT_METHODS) {
|
|
8280
|
-
const deps = useRef(null);
|
|
8281
|
-
const render = useRerender();
|
|
8282
|
-
useEffect(() => store.bus.watch(ev => {
|
|
8283
|
-
if (deps.current?.has(String(ev.type))) {
|
|
8284
|
-
render();
|
|
8285
|
-
}
|
|
8286
|
-
}), [store, render]);
|
|
8287
|
-
return useMemo(() => new Proxy(methods, {
|
|
8288
|
-
get(_, key) {
|
|
8289
|
-
deps.current ||= new Set();
|
|
8290
|
-
deps.current.add(key);
|
|
8291
|
-
return store.getItem(key);
|
|
8292
|
-
},
|
|
8293
|
-
has(_, key) {
|
|
8294
|
-
deps.current ||= new Set();
|
|
8295
|
-
deps.current.add(key);
|
|
8296
|
-
return store.hasItem(key);
|
|
8297
|
-
},
|
|
8298
|
-
set(_, key, value) {
|
|
8299
|
-
store.setItem(key, value);
|
|
8300
|
-
return true;
|
|
8301
|
-
},
|
|
8302
|
-
deleteProperty(_, key) {
|
|
8303
|
-
store.removeItem(key);
|
|
8304
|
-
return true;
|
|
8305
|
-
}
|
|
8306
|
-
}), [store]);
|
|
8307
|
-
}
|
|
8308
|
-
|
|
8309
|
-
const localStore = new Store(); // localStorage cache
|
|
8310
|
-
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
8311
|
-
function useLocalStore(methods) {
|
|
8312
|
-
return useStore(localStore, methods);
|
|
8313
|
-
}
|
|
8314
|
-
|
|
8315
8439
|
const REGION_URL = `${API_BASE_URI}/region`;
|
|
8316
8440
|
function useLocation(defaultLocation = 'Москва') {
|
|
8317
8441
|
const locationStore = useLocalStore();
|
|
@@ -8796,7 +8920,7 @@
|
|
|
8796
8920
|
});
|
|
8797
8921
|
const regionHref = regions?.find((_) => _.name === region.key)?.href;
|
|
8798
8922
|
const buttonText = button?.text ? button.text : 'Перейти';
|
|
8799
|
-
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container
|
|
8923
|
+
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
|
|
8800
8924
|
});
|
|
8801
8925
|
|
|
8802
8926
|
function useActiveRoute(items = []) {
|
|
@@ -10420,7 +10544,7 @@
|
|
|
10420
10544
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10421
10545
|
});
|
|
10422
10546
|
|
|
10423
|
-
const packageVersion = "0.14.
|
|
10547
|
+
const packageVersion = "0.14.699";
|
|
10424
10548
|
|
|
10425
10549
|
exports.Blocks = Blocks;
|
|
10426
10550
|
exports.ContentPage = ContentPage;
|