@redneckz/wildless-cms-uni-blocks 0.14.698 → 0.14.699
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/api/RetailAPI/model/EOrganizationActivityTypes.d.ts +23 -0
- package/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/bundle/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/bundle/bundle.umd.js +381 -256
- 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/model/EOrganizationActivityTypes.d.ts +23 -0
- package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/dist/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/dist/api/RetailAPI/model/LeadFormData.js +2 -0
- package/dist/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/dist/api/RetailAPI/utils/getOrganizationParams.js +101 -0
- package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/dist/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/dist/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -7
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/dist/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/dist/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/dist/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +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.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/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/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/EmployerActivitiesField.js +10 -2
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +4 -3
- package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/dist/ui-kit/FormField/SelectField.d.ts +1 -7
- package/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/dist/ui-kit/FormField/updateOrganizationFields.js +17 -0
- package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/dist/ui-kit/FormField/validators.d.ts +1 -1
- package/dist/ui-kit/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/model/EOrganizationActivityTypes.d.ts +23 -0
- package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/lib/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/lib/api/RetailAPI/model/LeadFormData.js +2 -0
- package/lib/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/lib/api/RetailAPI/utils/getOrganizationParams.js +95 -0
- package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/lib/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/lib/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -8
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/lib/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/lib/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/lib/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +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.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/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/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/EmployerActivitiesField.js +10 -2
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +4 -3
- package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/lib/ui-kit/FormField/SelectField.d.ts +1 -7
- package/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/lib/ui-kit/FormField/updateOrganizationFields.js +14 -0
- package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/lib/ui-kit/FormField/validators.d.ts +1 -1
- package/lib/ui-kit/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/model/EOrganizationActivityTypes.d.ts +23 -0
- package/mobile/bundle/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/mobile/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/mobile/bundle/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/mobile/bundle/bundle.umd.js +381 -256
- 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/model/EOrganizationActivityTypes.d.ts +23 -0
- package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/mobile/dist/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/mobile/dist/api/RetailAPI/model/LeadFormData.js +2 -0
- package/mobile/dist/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js +101 -0
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/mobile/dist/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -7
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +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.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/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/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/EmployerActivitiesField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +4 -3
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/SelectField.d.ts +1 -7
- package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +17 -0
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -1
- package/mobile/dist/ui-kit/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/model/EOrganizationActivityTypes.d.ts +23 -0
- package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js +2 -0
- package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +1 -0
- package/mobile/lib/api/RetailAPI/model/LeadFormData.d.ts +7 -0
- package/mobile/lib/api/RetailAPI/model/LeadFormData.js +2 -0
- package/mobile/lib/api/RetailAPI/model/LeadFormData.js.map +1 -0
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +17 -0
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js +95 -0
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -0
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +2 -2
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js +1 -0
- package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +1 -1
- package/mobile/lib/api/dadataHints/dadataHintsType.d.ts +3 -0
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -8
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +147 -0
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js +2 -0
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +3 -3
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -148
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +3 -5
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +5 -6
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -19
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +4 -2
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +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.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/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/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/EmployerActivitiesField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +4 -3
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js +10 -2
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +4 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/SelectField.d.ts +1 -7
- package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +4 -0
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +14 -0
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -1
- package/mobile/lib/ui-kit/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/model/EOrganizationActivityTypes.ts +23 -0
- package/mobile/src/api/RetailAPI/model/LeadFormData.ts +7 -0
- package/mobile/src/api/RetailAPI/utils/getOrganizationParams.ts +126 -0
- package/mobile/src/api/RetailAPI/utils/getUpdateUserProfile.ts +4 -2
- package/mobile/src/api/dadataHints/dadataHintsType.ts +3 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +6 -8
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -5
- package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +152 -0
- package/mobile/src/components/ApplicationLeadForm/consents.ts +3 -3
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -160
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/{useApplicationLeadApi.ts → useApplicationLeadApi.tsx} +19 -34
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +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 +2 -2
- package/mobile/src/components/CreditCardForm/getCardData.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
- package/mobile/src/components/CreditCardForm/getFifthStepData.ts +2 -2
- package/mobile/src/components/CreditCardForm/getFourthStepData.ts +2 -2
- package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getSecondStepData.tsx +2 -2
- package/mobile/src/components/CreditCardForm/getSixthStepData.ts +4 -4
- package/mobile/src/components/CreditCardForm/getThirdStepData.tsx +2 -2
- package/mobile/src/components/CreditCardForm/renderInputs.tsx +2 -2
- package/mobile/src/components/CreditCardForm/renderStep.tsx +4 -4
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -3
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +2 -2
- package/mobile/src/components/CreditForm/calculateInputs.ts +2 -2
- package/mobile/src/components/CreditForm/formStateMap.tsx +2 -2
- package/mobile/src/components/CreditForm/getCalcData.ts +2 -2
- package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +3 -3
- package/mobile/src/components/CreditForm/getFifthStepData.ts +2 -2
- package/mobile/src/components/CreditForm/getFirstStepData.tsx +2 -2
- package/mobile/src/components/CreditForm/getFourthStepData.ts +2 -2
- package/mobile/src/components/CreditForm/getInitialFormState.tsx +2 -2
- package/mobile/src/components/CreditForm/getSecondStepData.tsx +2 -2
- package/mobile/src/components/CreditForm/getThirdStepData.ts +2 -2
- package/mobile/src/components/CreditForm/getZeroStepData.ts +2 -2
- package/mobile/src/components/CreditForm/renderInputs.tsx +2 -2
- package/mobile/src/components/CreditForm/renderStep.tsx +4 -4
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
- package/mobile/src/components/CreditForm/utils.ts +1 -1
- package/mobile/src/hooks/useCreditFormStore.tsx +13 -0
- package/mobile/src/hooks/useLeadFormData.ts +1 -1
- package/mobile/src/hooks/useSetter.ts +16 -0
- 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/EmployerActivitiesField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +5 -5
- package/mobile/src/ui-kit/FormField/Fields/OrganizationField.tsx +12 -2
- package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +5 -1
- package/mobile/src/ui-kit/FormField/SelectField.tsx +1 -8
- package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
- package/mobile/src/ui-kit/FormField/validators.ts +1 -1
- package/mobile/src/ui-kit/RichText/RichText.tsx +21 -21
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +20 -25
- package/package.json +1 -1
- package/src/api/RetailAPI/model/EOrganizationActivityTypes.ts +23 -0
- package/src/api/RetailAPI/model/LeadFormData.ts +7 -0
- package/src/api/RetailAPI/utils/getOrganizationParams.ts +126 -0
- package/src/api/RetailAPI/utils/getUpdateUserProfile.ts +4 -2
- package/src/api/dadataHints/dadataHintsType.ts +3 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +6 -8
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -2
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -5
- package/src/components/ApplicationLeadForm/LeadFormState.ts +152 -0
- package/src/components/ApplicationLeadForm/consents.ts +3 -3
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -160
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
- package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +2 -2
- package/src/components/ApplicationLeadForm/{useApplicationLeadApi.ts → useApplicationLeadApi.tsx} +19 -34
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +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 +2 -2
- package/src/components/CreditCardForm/getCardData.tsx +2 -2
- package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -3
- package/src/components/CreditCardForm/getFifthStepData.ts +2 -2
- package/src/components/CreditCardForm/getFourthStepData.ts +2 -2
- package/src/components/CreditCardForm/getInitialFormState.tsx +2 -2
- package/src/components/CreditCardForm/getSecondStepData.tsx +2 -2
- package/src/components/CreditCardForm/getSixthStepData.ts +4 -4
- package/src/components/CreditCardForm/getThirdStepData.tsx +2 -2
- package/src/components/CreditCardForm/renderInputs.tsx +2 -2
- package/src/components/CreditCardForm/renderStep.tsx +4 -4
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -3
- package/src/components/CreditForm/PendingStatusContent.tsx +2 -2
- package/src/components/CreditForm/calculateInputs.ts +2 -2
- package/src/components/CreditForm/formStateMap.tsx +2 -2
- package/src/components/CreditForm/getCalcData.ts +2 -2
- package/src/components/CreditForm/getCreditFormTaskData.ts +3 -3
- package/src/components/CreditForm/getFifthStepData.ts +2 -2
- package/src/components/CreditForm/getFirstStepData.tsx +2 -2
- package/src/components/CreditForm/getFourthStepData.ts +2 -2
- package/src/components/CreditForm/getInitialFormState.tsx +2 -2
- package/src/components/CreditForm/getSecondStepData.tsx +2 -2
- package/src/components/CreditForm/getThirdStepData.ts +2 -2
- package/src/components/CreditForm/getZeroStepData.ts +2 -2
- package/src/components/CreditForm/renderInputs.tsx +2 -2
- package/src/components/CreditForm/renderStep.tsx +4 -4
- package/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
- package/src/components/CreditForm/utils.ts +1 -1
- package/src/hooks/useCreditFormStore.tsx +13 -0
- package/src/hooks/useLeadFormData.ts +1 -1
- package/src/hooks/useSetter.ts +16 -0
- 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/EmployerActivitiesField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/InnField.tsx +5 -5
- package/src/ui-kit/FormField/Fields/OrganizationField.tsx +12 -2
- package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +5 -1
- package/src/ui-kit/FormField/SelectField.tsx +1 -8
- package/src/ui-kit/FormField/updateOrganizationFields.ts +40 -0
- package/src/ui-kit/FormField/validators.ts +1 -1
- package/src/ui-kit/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
|
@@ -672,15 +672,11 @@
|
|
|
672
672
|
? 'bg-secondary-light text-primary-main'
|
|
673
673
|
: '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;
|
|
674
674
|
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
const EMPTY_HTML = '<p><br></p>';
|
|
678
|
-
const RichText = JSX((props) => {
|
|
679
|
-
const { __html = '', richVersion = '', itemSize = 'list-m', isDotted = true } = props;
|
|
675
|
+
const RichText = JSX(({ __html = '', richVersion = '', itemSize = 'list-m', isDotted = true, children }) => {
|
|
680
676
|
const dotStyle = isDotted ? '' : 'without-dots';
|
|
681
|
-
return __html
|
|
677
|
+
return __html || children ? (
|
|
682
678
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
683
|
-
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;
|
|
679
|
+
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;
|
|
684
680
|
});
|
|
685
681
|
|
|
686
682
|
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;
|
|
@@ -2672,6 +2668,154 @@
|
|
|
2672
2668
|
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
2673
2669
|
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') })));
|
|
2674
2670
|
|
|
2671
|
+
function copy(source, target) {
|
|
2672
|
+
for (const [k, v] of source.entries()) {
|
|
2673
|
+
if (v !== null && v !== undefined) {
|
|
2674
|
+
target.setItem(k, v);
|
|
2675
|
+
}
|
|
2676
|
+
else {
|
|
2677
|
+
target.removeItem(k);
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
function replicate(primary, secondary) {
|
|
2683
|
+
copy(primary, secondary);
|
|
2684
|
+
copy(secondary, primary);
|
|
2685
|
+
return primary.bus.watch(({ type, event }) => {
|
|
2686
|
+
if (event !== null && event !== undefined) {
|
|
2687
|
+
secondary.setItem(type, event);
|
|
2688
|
+
}
|
|
2689
|
+
else {
|
|
2690
|
+
secondary.removeItem(type);
|
|
2691
|
+
}
|
|
2692
|
+
});
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
class StorageAdapter {
|
|
2696
|
+
storage;
|
|
2697
|
+
bus;
|
|
2698
|
+
get size() {
|
|
2699
|
+
return this.storage?.length ?? 0;
|
|
2700
|
+
}
|
|
2701
|
+
constructor(storage, bus = new EventBus()) {
|
|
2702
|
+
this.storage = storage;
|
|
2703
|
+
this.bus = bus;
|
|
2704
|
+
}
|
|
2705
|
+
hasItem(key) {
|
|
2706
|
+
return Boolean(this.storage?.getItem(String(key)));
|
|
2707
|
+
}
|
|
2708
|
+
getItem(key) {
|
|
2709
|
+
const _ = this.storage?.getItem(String(key)) ?? null;
|
|
2710
|
+
try {
|
|
2711
|
+
return JSON.parse(String(_));
|
|
2712
|
+
}
|
|
2713
|
+
catch (ex) {
|
|
2714
|
+
return null;
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
entries() {
|
|
2718
|
+
return Array.from({ length: this.size }, (_, i) => {
|
|
2719
|
+
const k = String(this.storage?.key(i));
|
|
2720
|
+
return [k, this.getItem(k)];
|
|
2721
|
+
});
|
|
2722
|
+
}
|
|
2723
|
+
setItem(key, value) {
|
|
2724
|
+
if (value !== null) {
|
|
2725
|
+
this.storage?.setItem(String(key), JSON.stringify(value));
|
|
2726
|
+
}
|
|
2727
|
+
else {
|
|
2728
|
+
this.storage?.removeItem(String(key));
|
|
2729
|
+
}
|
|
2730
|
+
this.bus?.subject(key, value);
|
|
2731
|
+
}
|
|
2732
|
+
removeItem(key) {
|
|
2733
|
+
this.storage?.removeItem(String(key));
|
|
2734
|
+
this.bus?.subject(key, null);
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
class Store {
|
|
2739
|
+
bus;
|
|
2740
|
+
store = new Map();
|
|
2741
|
+
get size() {
|
|
2742
|
+
return this.store.size;
|
|
2743
|
+
}
|
|
2744
|
+
constructor(bus = new EventBus()) {
|
|
2745
|
+
this.bus = bus;
|
|
2746
|
+
}
|
|
2747
|
+
hasItem(key) {
|
|
2748
|
+
return this.store.has(key);
|
|
2749
|
+
}
|
|
2750
|
+
getItem(key) {
|
|
2751
|
+
return this.store.get(key);
|
|
2752
|
+
}
|
|
2753
|
+
entries() {
|
|
2754
|
+
return this.store.entries();
|
|
2755
|
+
}
|
|
2756
|
+
setItem(key, value) {
|
|
2757
|
+
this.store.set(key, value);
|
|
2758
|
+
this.bus.subject(key, value);
|
|
2759
|
+
}
|
|
2760
|
+
removeItem(key) {
|
|
2761
|
+
this.store.delete(key);
|
|
2762
|
+
this.bus.subject(key, null);
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
function useRerender() {
|
|
2767
|
+
const [, setCount] = useState(0);
|
|
2768
|
+
return useCallback(() => setCount(_ => (_ + 1) % (1 << 16)), []);
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
const DEFAULT_METHODS = {};
|
|
2772
|
+
/**
|
|
2773
|
+
* MobX like reactivity (simplified).
|
|
2774
|
+
* Can be used to migrate from Redux/MobX or something else
|
|
2775
|
+
*
|
|
2776
|
+
* @param store
|
|
2777
|
+
* @returns reactive proxy backed by store
|
|
2778
|
+
*/
|
|
2779
|
+
function useStore(store, methods = DEFAULT_METHODS) {
|
|
2780
|
+
const deps = useRef(null);
|
|
2781
|
+
const render = useRerender();
|
|
2782
|
+
useEffect(() => store.bus.watch(ev => {
|
|
2783
|
+
if (deps.current?.has(String(ev.type))) {
|
|
2784
|
+
render();
|
|
2785
|
+
}
|
|
2786
|
+
}), [store, render]);
|
|
2787
|
+
return useMemo(() => new Proxy(methods, {
|
|
2788
|
+
get(_, key) {
|
|
2789
|
+
deps.current ||= new Set();
|
|
2790
|
+
deps.current.add(key);
|
|
2791
|
+
return store.getItem(key);
|
|
2792
|
+
},
|
|
2793
|
+
has(_, key) {
|
|
2794
|
+
deps.current ||= new Set();
|
|
2795
|
+
deps.current.add(key);
|
|
2796
|
+
return store.hasItem(key);
|
|
2797
|
+
},
|
|
2798
|
+
set(_, key, value) {
|
|
2799
|
+
store.setItem(key, value);
|
|
2800
|
+
return true;
|
|
2801
|
+
},
|
|
2802
|
+
deleteProperty(_, key) {
|
|
2803
|
+
store.removeItem(key);
|
|
2804
|
+
return true;
|
|
2805
|
+
}
|
|
2806
|
+
}), [store]);
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
const localStore = new Store(); // localStorage cache
|
|
2810
|
+
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
2811
|
+
function useLocalStore(methods) {
|
|
2812
|
+
return useStore(localStore, methods);
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
const useCreditFormStore = () => {
|
|
2816
|
+
return useLocalStore();
|
|
2817
|
+
};
|
|
2818
|
+
|
|
2675
2819
|
const SelectField = UniBlock(({ field, source, fieldName, input, placeholder = 'Выберите из списка',
|
|
2676
2820
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2677
2821
|
options, ...rest }) => {
|
|
@@ -2683,8 +2827,14 @@
|
|
|
2683
2827
|
});
|
|
2684
2828
|
|
|
2685
2829
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
2686
|
-
const { data
|
|
2687
|
-
|
|
2830
|
+
const { data } = useLeadFormData('EMPLOYEES_NUMBER');
|
|
2831
|
+
const store = useCreditFormStore();
|
|
2832
|
+
useEffect(() => {
|
|
2833
|
+
if (data) {
|
|
2834
|
+
store.amountWorkers = data;
|
|
2835
|
+
}
|
|
2836
|
+
}, [data]);
|
|
2837
|
+
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 }));
|
|
2688
2838
|
});
|
|
2689
2839
|
|
|
2690
2840
|
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) })));
|
|
@@ -3513,13 +3663,25 @@
|
|
|
3513
3663
|
});
|
|
3514
3664
|
|
|
3515
3665
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
3516
|
-
const { data
|
|
3517
|
-
|
|
3666
|
+
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
3667
|
+
const store = useCreditFormStore();
|
|
3668
|
+
useEffect(() => {
|
|
3669
|
+
if (data) {
|
|
3670
|
+
store.employerActivities = data;
|
|
3671
|
+
}
|
|
3672
|
+
}, [data]);
|
|
3673
|
+
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 }));
|
|
3518
3674
|
});
|
|
3519
3675
|
|
|
3520
3676
|
const EmployerOrganizationField = JSX(({ field, input }) => {
|
|
3521
|
-
const { data
|
|
3522
|
-
|
|
3677
|
+
const { data } = useLeadFormData('ORGANIZATION_KIND');
|
|
3678
|
+
const store = useCreditFormStore();
|
|
3679
|
+
useEffect(() => {
|
|
3680
|
+
if (data) {
|
|
3681
|
+
store.employerOrganization = data;
|
|
3682
|
+
}
|
|
3683
|
+
}, [data]);
|
|
3684
|
+
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 }));
|
|
3523
3685
|
});
|
|
3524
3686
|
|
|
3525
3687
|
const EmploymentField = JSX(({ field, input }) => {
|
|
@@ -3573,11 +3735,118 @@
|
|
|
3573
3735
|
return (jsx(SelectField, { field: field, source: housing, label: "\u0422\u0438\u043F \u0436\u0438\u043B\u044C\u044F", fieldName: "housing", input: input }));
|
|
3574
3736
|
});
|
|
3575
3737
|
|
|
3738
|
+
const getOrganizationActivityType = (options, okved) => {
|
|
3739
|
+
if (!okved) {
|
|
3740
|
+
return null;
|
|
3741
|
+
}
|
|
3742
|
+
const getOptionByKey = getOptionOp(options);
|
|
3743
|
+
const okvedType = +okved?.split('.')[0];
|
|
3744
|
+
const secondOkvedType = +okved?.split('.')[1];
|
|
3745
|
+
switch (okvedType) {
|
|
3746
|
+
case 1:
|
|
3747
|
+
return getOptionByKey("AGRICULTURE" /* EOrganizationActivityTypes.AGRICULTURE */);
|
|
3748
|
+
case 35:
|
|
3749
|
+
return getOptionByKey("FUEL_AND_ENERGY" /* EOrganizationActivityTypes.FUEL_AND_ENERGY */);
|
|
3750
|
+
case 41:
|
|
3751
|
+
case 42:
|
|
3752
|
+
case 43:
|
|
3753
|
+
return getOptionByKey("CONSTRUCTION" /* EOrganizationActivityTypes.CONSTRUCTION */);
|
|
3754
|
+
case 46:
|
|
3755
|
+
case 47:
|
|
3756
|
+
return getOptionByKey("TRADE" /* EOrganizationActivityTypes.TRADE */);
|
|
3757
|
+
case 55:
|
|
3758
|
+
case 79:
|
|
3759
|
+
return getOptionByKey("TOURISM" /* EOrganizationActivityTypes.TOURISM */);
|
|
3760
|
+
case 62:
|
|
3761
|
+
return getOptionByKey("TECHNOLOGY" /* EOrganizationActivityTypes.TECHNOLOGY */);
|
|
3762
|
+
case 63:
|
|
3763
|
+
return getOptionByKey("CONSULTING_SERVICE" /* EOrganizationActivityTypes.CONSULTING_SERVICE */);
|
|
3764
|
+
case 64:
|
|
3765
|
+
return getOptionByKey("BANK" /* EOrganizationActivityTypes.BANK */);
|
|
3766
|
+
case 65:
|
|
3767
|
+
return getOptionByKey("INSURER" /* EOrganizationActivityTypes.INSURER */);
|
|
3768
|
+
case 66:
|
|
3769
|
+
return getOptionByKey("FINANCIAL_INSTITUTIONS" /* EOrganizationActivityTypes.FINANCIAL_INSTITUTIONS */);
|
|
3770
|
+
case 72:
|
|
3771
|
+
case 74:
|
|
3772
|
+
return getOptionByKey("SCIENCE" /* EOrganizationActivityTypes.SCIENCE */);
|
|
3773
|
+
case 80:
|
|
3774
|
+
return getOptionByKey("SECURITY" /* EOrganizationActivityTypes.SECURITY */);
|
|
3775
|
+
case 84: {
|
|
3776
|
+
if (secondOkvedType < 22) {
|
|
3777
|
+
return getOptionByKey("GOVERNANCE" /* EOrganizationActivityTypes.GOVERNANCE */);
|
|
3778
|
+
}
|
|
3779
|
+
if (secondOkvedType === 22) {
|
|
3780
|
+
return getOptionByKey("ARMY" /* EOrganizationActivityTypes.ARMY */);
|
|
3781
|
+
}
|
|
3782
|
+
return getOptionByKey("OTHER_SECTORS" /* EOrganizationActivityTypes.OTHER_SECTORS */);
|
|
3783
|
+
}
|
|
3784
|
+
case 85:
|
|
3785
|
+
return getOptionByKey("EDUCATION" /* EOrganizationActivityTypes.EDUCATION */);
|
|
3786
|
+
case 86:
|
|
3787
|
+
return getOptionByKey("HEALTHCARE" /* EOrganizationActivityTypes.HEALTHCARE */);
|
|
3788
|
+
case 87:
|
|
3789
|
+
return getOptionByKey("SOCIAL_SPHERE" /* EOrganizationActivityTypes.SOCIAL_SPHERE */);
|
|
3790
|
+
default: {
|
|
3791
|
+
if (okvedType >= 10 && okvedType <= 33) {
|
|
3792
|
+
return getOptionByKey("INDUSTRY" /* EOrganizationActivityTypes.INDUSTRY */);
|
|
3793
|
+
}
|
|
3794
|
+
if (okvedType >= 5 && okvedType <= 9) {
|
|
3795
|
+
return getOptionByKey("FUEL_AND_ENERGY" /* EOrganizationActivityTypes.FUEL_AND_ENERGY */);
|
|
3796
|
+
}
|
|
3797
|
+
if (okvedType >= 49 && okvedType <= 53) {
|
|
3798
|
+
return getOptionByKey("TRANSPORT" /* EOrganizationActivityTypes.TRANSPORT */);
|
|
3799
|
+
}
|
|
3800
|
+
return getOptionByKey("OTHER_SECTORS" /* EOrganizationActivityTypes.OTHER_SECTORS */);
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
};
|
|
3804
|
+
const getEmployeesNumberOption = (options, count) => {
|
|
3805
|
+
const [option] = [options?.find((_) => Number(count) <= Number(_.description))].map((_) => ({
|
|
3806
|
+
key: _?.key ?? '',
|
|
3807
|
+
text: _?.value ?? '',
|
|
3808
|
+
}));
|
|
3809
|
+
return option;
|
|
3810
|
+
};
|
|
3811
|
+
const getOrganizationKind = (options, okopf) => {
|
|
3812
|
+
const getOptionByKey = getOptionOp(options);
|
|
3813
|
+
if ([40001, 40002, 71610].includes(okopf)) {
|
|
3814
|
+
return getOptionByKey('FOREIGN');
|
|
3815
|
+
}
|
|
3816
|
+
return getOptionByKey('RUSSIAN');
|
|
3817
|
+
};
|
|
3818
|
+
const getOrganizationType = (options, okopf, inn) => {
|
|
3819
|
+
const getOptionByKey = getOptionOp(options);
|
|
3820
|
+
if (inn === '7725114488') {
|
|
3821
|
+
return getOptionByKey('RSHB');
|
|
3822
|
+
}
|
|
3823
|
+
if (okopf === 50102) {
|
|
3824
|
+
return getOptionByKey('SOLE_TRADER');
|
|
3825
|
+
}
|
|
3826
|
+
if (okopf >= 75000 && okopf <= 75505 && okopf !== 75500) {
|
|
3827
|
+
return getOptionByKey('BUDGETARY');
|
|
3828
|
+
}
|
|
3829
|
+
return getOptionByKey('COMMERCIAL');
|
|
3830
|
+
};
|
|
3831
|
+
const getOptionOp = (options) => (key) => options.map((_) => ({ key, text: _.value || '' })).find((_) => _.key === key) ?? null;
|
|
3832
|
+
|
|
3833
|
+
const updateOrganizationFields = (store, field, item) => {
|
|
3834
|
+
const inn = item.data?.inn ?? '';
|
|
3835
|
+
const okopf = Number(item.data?.opf?.code);
|
|
3836
|
+
const okved = item.data?.okved ?? '';
|
|
3837
|
+
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
3838
|
+
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3839
|
+
field?.('amountWorkers')?.onChange?.(getEmployeesNumberOption(store?.amountWorkers, item.data?.employee_count));
|
|
3840
|
+
field?.('employerActivities')?.onChange?.(getOrganizationActivityType(store?.employerActivities ?? [], okved));
|
|
3841
|
+
field?.('organization')?.onChange?.(getOrganizationType(store?.organization ?? [], okopf, inn));
|
|
3842
|
+
field?.('employerOrganization')?.onChange?.(getOrganizationKind(store?.employerOrganization ?? [], okopf));
|
|
3843
|
+
};
|
|
3844
|
+
|
|
3576
3845
|
const InnField = JSX(({ field, input }) => {
|
|
3846
|
+
const store = useCreditFormStore();
|
|
3577
3847
|
const onDaDataChange = useCallback((item) => {
|
|
3578
|
-
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
3579
3848
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
3580
|
-
field
|
|
3849
|
+
updateOrganizationFields(store, field, item);
|
|
3581
3850
|
}, []);
|
|
3582
3851
|
return (jsx(InputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...getValidation(field('inn'), validatorObj.inn, input?.required), onDaDataChange: onDaDataChange }));
|
|
3583
3852
|
});
|
|
@@ -3637,14 +3906,21 @@
|
|
|
3637
3906
|
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);
|
|
3638
3907
|
|
|
3639
3908
|
const OrganizationField = JSX(({ field, input }) => {
|
|
3640
|
-
const { data
|
|
3641
|
-
|
|
3909
|
+
const { data } = useLeadFormData('ORGANIZATION_TYPE');
|
|
3910
|
+
const store = useCreditFormStore();
|
|
3911
|
+
useEffect(() => {
|
|
3912
|
+
if (data) {
|
|
3913
|
+
store.organization = data;
|
|
3914
|
+
}
|
|
3915
|
+
}, [data]);
|
|
3916
|
+
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 }));
|
|
3642
3917
|
});
|
|
3643
3918
|
|
|
3644
3919
|
const OrganizationNameField = JSX(({ field, input }) => {
|
|
3920
|
+
const store = useCreditFormStore();
|
|
3645
3921
|
const onDaDataChange = useCallback((item) => {
|
|
3646
3922
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
3647
|
-
field
|
|
3923
|
+
updateOrganizationFields(store, field, item);
|
|
3648
3924
|
}, []);
|
|
3649
3925
|
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 }));
|
|
3650
3926
|
});
|
|
@@ -4173,58 +4449,6 @@
|
|
|
4173
4449
|
},
|
|
4174
4450
|
];
|
|
4175
4451
|
|
|
4176
|
-
const initialFormState = {
|
|
4177
|
-
typeForm: '',
|
|
4178
|
-
region: { key: '', text: '' },
|
|
4179
|
-
addressBranch: { key: '', text: '' },
|
|
4180
|
-
surname: '',
|
|
4181
|
-
name: '',
|
|
4182
|
-
phone: '',
|
|
4183
|
-
secondaryPhone: '',
|
|
4184
|
-
organizationPhone: '',
|
|
4185
|
-
comment: '',
|
|
4186
|
-
product: '',
|
|
4187
|
-
partnerComments: '',
|
|
4188
|
-
annualRevenue: '',
|
|
4189
|
-
term: 12,
|
|
4190
|
-
amount: 100000,
|
|
4191
|
-
acquiringType: ACQUIRING_TYPES[0],
|
|
4192
|
-
serviceType: SERVICE_TYPES[0],
|
|
4193
|
-
feedbackMethod: FEEDBACK_METHOD[0],
|
|
4194
|
-
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
4195
|
-
vedTypes: VED_TYPES[0],
|
|
4196
|
-
birthday: undefined,
|
|
4197
|
-
limitedBirthday: undefined,
|
|
4198
|
-
isClient: false,
|
|
4199
|
-
onlineCheckout: false,
|
|
4200
|
-
posTerminal: false,
|
|
4201
|
-
consentToReceiveMaterials: false,
|
|
4202
|
-
consentDataProcessing: false,
|
|
4203
|
-
processPersonalDataFlg: false,
|
|
4204
|
-
consentProviderFlg: false,
|
|
4205
|
-
consentOthersFlg: false,
|
|
4206
|
-
consentInformFlg: false,
|
|
4207
|
-
addressRegistration: '',
|
|
4208
|
-
participantDateRegistration: undefined,
|
|
4209
|
-
currency: '',
|
|
4210
|
-
paymentSystem: '',
|
|
4211
|
-
cardCategory: { key: '', text: '' },
|
|
4212
|
-
codeWord: '',
|
|
4213
|
-
addressRetail: { key: '', text: '' },
|
|
4214
|
-
};
|
|
4215
|
-
const getInitialFormState$2 = (inputs, savedForm, typeForm = '') => {
|
|
4216
|
-
if (savedForm) {
|
|
4217
|
-
const formStateCopy = { ...savedForm };
|
|
4218
|
-
formStateCopy.limitedBirthday = new Date(formStateCopy?.limitedBirthday || 0);
|
|
4219
|
-
return formStateCopy;
|
|
4220
|
-
}
|
|
4221
|
-
const formState = Object.fromEntries(inputs.map((_) => [
|
|
4222
|
-
_.name,
|
|
4223
|
-
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
|
|
4224
|
-
]));
|
|
4225
|
-
return { ...formState, typeForm: { key: typeForm, text: '' } };
|
|
4226
|
-
};
|
|
4227
|
-
|
|
4228
4452
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
4229
4453
|
|
|
4230
4454
|
const createDraftTask = async (body) => {
|
|
@@ -4238,6 +4462,7 @@
|
|
|
4238
4462
|
|
|
4239
4463
|
const updateUserTask = (body) => doRequest('/user-data/updateUserTask', 'PUT', body);
|
|
4240
4464
|
|
|
4465
|
+
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
4241
4466
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
4242
4467
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', processPersonalDataFlg, consentProviderFlg, consentPfrFlg, consentPhotoFlg, consentAssignmentClaimsFlg, consentCollectionFlg, consentInformFlg, } = formData;
|
|
4243
4468
|
return {
|
|
@@ -4260,6 +4485,16 @@
|
|
|
4260
4485
|
};
|
|
4261
4486
|
};
|
|
4262
4487
|
|
|
4488
|
+
const useSetter = (target, key) => useCallback((value) => {
|
|
4489
|
+
const newValue = value instanceof Function ? value(target[key]) : value;
|
|
4490
|
+
if (newValue !== null && newValue !== undefined) {
|
|
4491
|
+
target[key] = newValue;
|
|
4492
|
+
}
|
|
4493
|
+
else {
|
|
4494
|
+
delete target[key];
|
|
4495
|
+
}
|
|
4496
|
+
}, [target, key]);
|
|
4497
|
+
|
|
4263
4498
|
const sendCode = (body) => fetchRetailJSON('/sms/sendCode', 'POST', body).then((res) => !isErrorResult(res, body.phoneNumber));
|
|
4264
4499
|
const isErrorResult = (res, phoneNumber) => Boolean(res) &&
|
|
4265
4500
|
typeof res !== 'string' &&
|
|
@@ -4439,10 +4674,11 @@
|
|
|
4439
4674
|
};
|
|
4440
4675
|
};
|
|
4441
4676
|
|
|
4442
|
-
const VerifyPhoneDialog = JSX(({
|
|
4677
|
+
const VerifyPhoneDialog = JSX(({ phone, code = true, codeLength = 4, consents, onSuccess = noop, onClose = noop }) => {
|
|
4443
4678
|
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
4444
4679
|
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttempts, } = useVerifyPhoneDialogSubmit({ values, onSuccess });
|
|
4445
4680
|
const captchaDialog = useDialog(CaptchaDialog);
|
|
4681
|
+
const phoneNumber = formatPhone(phone);
|
|
4446
4682
|
const handleSendCode = useCallback(async () => {
|
|
4447
4683
|
const isSuccessSendCode = await sendCode({
|
|
4448
4684
|
phoneNumber,
|
|
@@ -4460,9 +4696,9 @@
|
|
|
4460
4696
|
useEffect(() => {
|
|
4461
4697
|
handleSendCode();
|
|
4462
4698
|
}, []);
|
|
4463
|
-
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:
|
|
4699
|
+
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$2(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] }) }));
|
|
4464
4700
|
});
|
|
4465
|
-
const
|
|
4701
|
+
const renderNextButton = (isDisabled, onClick) => (jsx(SubmitButton, { text: "\u0414\u0430\u043B\u0435\u0435", isDisabled: isDisabled, onClick: onClick }));
|
|
4466
4702
|
const renderText$2 = (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" }));
|
|
4467
4703
|
|
|
4468
4704
|
const defaultConsentText = {
|
|
@@ -4518,7 +4754,8 @@
|
|
|
4518
4754
|
const handleSubmitBkiConstent = (phone, profileId) => async (confirmStatus) => {
|
|
4519
4755
|
if (confirmStatus === 'SIGNED' && phone) {
|
|
4520
4756
|
verifyPhoneDialog.open({
|
|
4521
|
-
|
|
4757
|
+
phone,
|
|
4758
|
+
consents: ['согласие на запрос информации в БКИ'],
|
|
4522
4759
|
onSuccess: handleSuccessVerify(profileId),
|
|
4523
4760
|
});
|
|
4524
4761
|
}
|
|
@@ -4530,14 +4767,6 @@
|
|
|
4530
4767
|
open: (phone, profileId) => open({ onSubmit: handleSubmitBkiConstent(phone, profileId), onClose }),
|
|
4531
4768
|
};
|
|
4532
4769
|
};
|
|
4533
|
-
const verifyPhoneContent$1 = (phone) => ({
|
|
4534
|
-
title: 'Подтвердите номер телефона',
|
|
4535
|
-
description: `Мы отправили код на ${phone}`,
|
|
4536
|
-
phoneNumber: formatPhone(phone),
|
|
4537
|
-
textButton: 'Далее',
|
|
4538
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
|
|
4539
|
-
<ul><li>согласие на запрос информации в БКИ</li></ul>`,
|
|
4540
|
-
});
|
|
4541
4770
|
|
|
4542
4771
|
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
4543
4772
|
|
|
@@ -4670,20 +4899,20 @@
|
|
|
4670
4899
|
};
|
|
4671
4900
|
};
|
|
4672
4901
|
|
|
4673
|
-
const
|
|
4902
|
+
const useLeadFormStore = () => useLocalStore();
|
|
4903
|
+
|
|
4904
|
+
const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
|
|
4674
4905
|
const [responseStatus, setResponseStatus] = useState('');
|
|
4675
|
-
const
|
|
4676
|
-
const
|
|
4677
|
-
const [, setParticipantId] = useLocalStorage('participantId');
|
|
4678
|
-
const [, setProgramId] = useLocalStorage('programId');
|
|
4906
|
+
const leadFormStore = useLeadFormStore();
|
|
4907
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
4679
4908
|
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
4680
4909
|
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
4681
4910
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
4682
4911
|
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber }) => {
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4912
|
+
leadFormStore.participantId = participantId;
|
|
4913
|
+
leadFormStore.taskId = taskId;
|
|
4914
|
+
leadFormStore.profileId = profileId;
|
|
4915
|
+
leadFormStore.programId = programNumber;
|
|
4687
4916
|
}, []);
|
|
4688
4917
|
// eslint-disable-next-line consistent-return
|
|
4689
4918
|
const handleSubmit = useCallback(async (formData) => {
|
|
@@ -4716,7 +4945,8 @@
|
|
|
4716
4945
|
.filter((_) => formData[_])
|
|
4717
4946
|
.map((_) => CONSENTS[_]?.text);
|
|
4718
4947
|
verifyPhoneDialog.open({
|
|
4719
|
-
|
|
4948
|
+
phone: formData?.phone,
|
|
4949
|
+
consents: acceptedConsents,
|
|
4720
4950
|
onSuccess: handleSuccessVerify,
|
|
4721
4951
|
});
|
|
4722
4952
|
}
|
|
@@ -4751,14 +4981,6 @@
|
|
|
4751
4981
|
saveUserData({ participantId, taskId, profileId, programId });
|
|
4752
4982
|
saveForm(formData);
|
|
4753
4983
|
};
|
|
4754
|
-
const verifyPhoneContent = (phone, consents) => ({
|
|
4755
|
-
title: 'Подтвердите номер телефона',
|
|
4756
|
-
description: `Мы отправили код на ${phone}`,
|
|
4757
|
-
phoneNumber: formatPhone(phone),
|
|
4758
|
-
textButton: 'Далее',
|
|
4759
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
|
|
4760
|
-
});
|
|
4761
|
-
const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
4762
4984
|
const transformOtherConsentsField = (formData) => {
|
|
4763
4985
|
const { consentOthersFlg, ...form } = formData;
|
|
4764
4986
|
return {
|
|
@@ -4771,6 +4993,56 @@
|
|
|
4771
4993
|
|
|
4772
4994
|
const updateProfileEsia = (body) => fetchRetailJSON('/esia/updateProfileEsia', 'POST', body);
|
|
4773
4995
|
|
|
4996
|
+
const initialFormState = {
|
|
4997
|
+
typeForm: '',
|
|
4998
|
+
region: { key: '', text: '' },
|
|
4999
|
+
addressBranch: { key: '', text: '' },
|
|
5000
|
+
surname: '',
|
|
5001
|
+
name: '',
|
|
5002
|
+
phone: '',
|
|
5003
|
+
secondaryPhone: '',
|
|
5004
|
+
organizationPhone: '',
|
|
5005
|
+
comment: '',
|
|
5006
|
+
product: '',
|
|
5007
|
+
partnerComments: '',
|
|
5008
|
+
annualRevenue: '',
|
|
5009
|
+
term: 12,
|
|
5010
|
+
amount: 100000,
|
|
5011
|
+
acquiringType: ACQUIRING_TYPES[0],
|
|
5012
|
+
serviceType: SERVICE_TYPES[0],
|
|
5013
|
+
feedbackMethod: FEEDBACK_METHOD[0],
|
|
5014
|
+
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
5015
|
+
vedTypes: VED_TYPES[0],
|
|
5016
|
+
birthday: undefined,
|
|
5017
|
+
limitedBirthday: undefined,
|
|
5018
|
+
isClient: false,
|
|
5019
|
+
onlineCheckout: false,
|
|
5020
|
+
posTerminal: false,
|
|
5021
|
+
consentToReceiveMaterials: false,
|
|
5022
|
+
consentDataProcessing: false,
|
|
5023
|
+
processPersonalDataFlg: false,
|
|
5024
|
+
consentProviderFlg: false,
|
|
5025
|
+
consentOthersFlg: false,
|
|
5026
|
+
consentInformFlg: false,
|
|
5027
|
+
addressRegistration: '',
|
|
5028
|
+
participantDateRegistration: undefined,
|
|
5029
|
+
currency: '',
|
|
5030
|
+
paymentSystem: '',
|
|
5031
|
+
cardCategory: { key: '', text: '' },
|
|
5032
|
+
codeWord: '',
|
|
5033
|
+
addressRetail: { key: '', text: '' },
|
|
5034
|
+
};
|
|
5035
|
+
const getInitialFormState$2 = (inputs, savedForm) => {
|
|
5036
|
+
if (savedForm) {
|
|
5037
|
+
return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
|
|
5038
|
+
}
|
|
5039
|
+
const formState = Object.fromEntries(inputs.map((_) => [
|
|
5040
|
+
_.name,
|
|
5041
|
+
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
|
|
5042
|
+
]));
|
|
5043
|
+
return { ...formState, typeForm: { key: '', text: '' } };
|
|
5044
|
+
};
|
|
5045
|
+
|
|
4774
5046
|
const parseEsiaProfile = (esiaProfile) => {
|
|
4775
5047
|
const { profile, addInfo, document, addressRegistration, addressFact } = esiaProfile;
|
|
4776
5048
|
return {
|
|
@@ -4820,10 +5092,12 @@
|
|
|
4820
5092
|
};
|
|
4821
5093
|
};
|
|
4822
5094
|
|
|
4823
|
-
const useInitApplicationLead = (nextStepLink) => {
|
|
5095
|
+
const useInitApplicationLead = (inputs, nextStepLink) => {
|
|
4824
5096
|
const navigator = locationNavigator();
|
|
4825
5097
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
4826
|
-
const
|
|
5098
|
+
const leadFormStore = useLeadFormStore();
|
|
5099
|
+
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
5100
|
+
const initialFormState = useMemo(() => getInitialFormState$2(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
4827
5101
|
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
4828
5102
|
startLoading();
|
|
4829
5103
|
try {
|
|
@@ -4834,7 +5108,7 @@
|
|
|
4834
5108
|
redirectUri: globalThis.location?.href,
|
|
4835
5109
|
});
|
|
4836
5110
|
if (data) {
|
|
4837
|
-
|
|
5111
|
+
saveForm((_) => ({
|
|
4838
5112
|
..._,
|
|
4839
5113
|
...parseEsiaProfile(data),
|
|
4840
5114
|
}));
|
|
@@ -4858,21 +5132,16 @@
|
|
|
4858
5132
|
sessionStorage.removeItem('refreshToken');
|
|
4859
5133
|
}
|
|
4860
5134
|
}, []);
|
|
4861
|
-
return {
|
|
4862
|
-
isLoading,
|
|
4863
|
-
};
|
|
5135
|
+
return [initialFormState, { isLoading }];
|
|
4864
5136
|
};
|
|
4865
5137
|
|
|
4866
5138
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
|
|
4867
|
-
const inputs = (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
4868
|
-
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
4869
|
-
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
4870
|
-
const initialFormState = getInitialFormState$2(inputs, leadForm);
|
|
5139
|
+
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
5140
|
+
const [initialFormState, { isLoading }] = useInitApplicationLead(inputs, nextStepLink);
|
|
4871
5141
|
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
4872
5142
|
inputs,
|
|
4873
5143
|
programId,
|
|
4874
5144
|
nextStepLink,
|
|
4875
|
-
saveForm: setLeadForm,
|
|
4876
5145
|
});
|
|
4877
5146
|
const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4878
5147
|
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
@@ -8159,150 +8428,6 @@
|
|
|
8159
8428
|
};
|
|
8160
8429
|
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] })));
|
|
8161
8430
|
|
|
8162
|
-
function copy(source, target) {
|
|
8163
|
-
for (const [k, v] of source.entries()) {
|
|
8164
|
-
if (v !== null && v !== undefined) {
|
|
8165
|
-
target.setItem(k, v);
|
|
8166
|
-
}
|
|
8167
|
-
else {
|
|
8168
|
-
target.removeItem(k);
|
|
8169
|
-
}
|
|
8170
|
-
}
|
|
8171
|
-
}
|
|
8172
|
-
|
|
8173
|
-
function replicate(primary, secondary) {
|
|
8174
|
-
copy(primary, secondary);
|
|
8175
|
-
copy(secondary, primary);
|
|
8176
|
-
return primary.bus.watch(({ type, event }) => {
|
|
8177
|
-
if (event !== null && event !== undefined) {
|
|
8178
|
-
secondary.setItem(type, event);
|
|
8179
|
-
}
|
|
8180
|
-
else {
|
|
8181
|
-
secondary.removeItem(type);
|
|
8182
|
-
}
|
|
8183
|
-
});
|
|
8184
|
-
}
|
|
8185
|
-
|
|
8186
|
-
class StorageAdapter {
|
|
8187
|
-
storage;
|
|
8188
|
-
bus;
|
|
8189
|
-
get size() {
|
|
8190
|
-
return this.storage?.length ?? 0;
|
|
8191
|
-
}
|
|
8192
|
-
constructor(storage, bus = new EventBus()) {
|
|
8193
|
-
this.storage = storage;
|
|
8194
|
-
this.bus = bus;
|
|
8195
|
-
}
|
|
8196
|
-
hasItem(key) {
|
|
8197
|
-
return Boolean(this.storage?.getItem(String(key)));
|
|
8198
|
-
}
|
|
8199
|
-
getItem(key) {
|
|
8200
|
-
const _ = this.storage?.getItem(String(key)) ?? null;
|
|
8201
|
-
try {
|
|
8202
|
-
return JSON.parse(String(_));
|
|
8203
|
-
}
|
|
8204
|
-
catch (ex) {
|
|
8205
|
-
return null;
|
|
8206
|
-
}
|
|
8207
|
-
}
|
|
8208
|
-
entries() {
|
|
8209
|
-
return Array.from({ length: this.size }, (_, i) => {
|
|
8210
|
-
const k = String(this.storage?.key(i));
|
|
8211
|
-
return [k, this.getItem(k)];
|
|
8212
|
-
});
|
|
8213
|
-
}
|
|
8214
|
-
setItem(key, value) {
|
|
8215
|
-
if (value !== null) {
|
|
8216
|
-
this.storage?.setItem(String(key), JSON.stringify(value));
|
|
8217
|
-
}
|
|
8218
|
-
else {
|
|
8219
|
-
this.storage?.removeItem(String(key));
|
|
8220
|
-
}
|
|
8221
|
-
this.bus?.subject(key, value);
|
|
8222
|
-
}
|
|
8223
|
-
removeItem(key) {
|
|
8224
|
-
this.storage?.removeItem(String(key));
|
|
8225
|
-
this.bus?.subject(key, null);
|
|
8226
|
-
}
|
|
8227
|
-
}
|
|
8228
|
-
|
|
8229
|
-
class Store {
|
|
8230
|
-
bus;
|
|
8231
|
-
store = new Map();
|
|
8232
|
-
get size() {
|
|
8233
|
-
return this.store.size;
|
|
8234
|
-
}
|
|
8235
|
-
constructor(bus = new EventBus()) {
|
|
8236
|
-
this.bus = bus;
|
|
8237
|
-
}
|
|
8238
|
-
hasItem(key) {
|
|
8239
|
-
return this.store.has(key);
|
|
8240
|
-
}
|
|
8241
|
-
getItem(key) {
|
|
8242
|
-
return this.store.get(key);
|
|
8243
|
-
}
|
|
8244
|
-
entries() {
|
|
8245
|
-
return this.store.entries();
|
|
8246
|
-
}
|
|
8247
|
-
setItem(key, value) {
|
|
8248
|
-
this.store.set(key, value);
|
|
8249
|
-
this.bus.subject(key, value);
|
|
8250
|
-
}
|
|
8251
|
-
removeItem(key) {
|
|
8252
|
-
this.store.delete(key);
|
|
8253
|
-
this.bus.subject(key, null);
|
|
8254
|
-
}
|
|
8255
|
-
}
|
|
8256
|
-
|
|
8257
|
-
function useRerender() {
|
|
8258
|
-
const [, setCount] = useState(0);
|
|
8259
|
-
return useCallback(() => setCount(_ => (_ + 1) % (1 << 16)), []);
|
|
8260
|
-
}
|
|
8261
|
-
|
|
8262
|
-
const DEFAULT_METHODS = {};
|
|
8263
|
-
/**
|
|
8264
|
-
* MobX like reactivity (simplified).
|
|
8265
|
-
* Can be used to migrate from Redux/MobX or something else
|
|
8266
|
-
*
|
|
8267
|
-
* @param store
|
|
8268
|
-
* @returns reactive proxy backed by store
|
|
8269
|
-
*/
|
|
8270
|
-
function useStore(store, methods = DEFAULT_METHODS) {
|
|
8271
|
-
const deps = useRef(null);
|
|
8272
|
-
const render = useRerender();
|
|
8273
|
-
useEffect(() => store.bus.watch(ev => {
|
|
8274
|
-
if (deps.current?.has(String(ev.type))) {
|
|
8275
|
-
render();
|
|
8276
|
-
}
|
|
8277
|
-
}), [store, render]);
|
|
8278
|
-
return useMemo(() => new Proxy(methods, {
|
|
8279
|
-
get(_, key) {
|
|
8280
|
-
deps.current ||= new Set();
|
|
8281
|
-
deps.current.add(key);
|
|
8282
|
-
return store.getItem(key);
|
|
8283
|
-
},
|
|
8284
|
-
has(_, key) {
|
|
8285
|
-
deps.current ||= new Set();
|
|
8286
|
-
deps.current.add(key);
|
|
8287
|
-
return store.hasItem(key);
|
|
8288
|
-
},
|
|
8289
|
-
set(_, key, value) {
|
|
8290
|
-
store.setItem(key, value);
|
|
8291
|
-
return true;
|
|
8292
|
-
},
|
|
8293
|
-
deleteProperty(_, key) {
|
|
8294
|
-
store.removeItem(key);
|
|
8295
|
-
return true;
|
|
8296
|
-
}
|
|
8297
|
-
}), [store]);
|
|
8298
|
-
}
|
|
8299
|
-
|
|
8300
|
-
const localStore = new Store(); // localStorage cache
|
|
8301
|
-
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
8302
|
-
function useLocalStore(methods) {
|
|
8303
|
-
return useStore(localStore, methods);
|
|
8304
|
-
}
|
|
8305
|
-
|
|
8306
8431
|
const REGION_URL = `${API_BASE_URI}/region`;
|
|
8307
8432
|
function useLocation(defaultLocation = 'Москва') {
|
|
8308
8433
|
const locationStore = useLocalStore();
|
|
@@ -10043,7 +10168,7 @@
|
|
|
10043
10168
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10044
10169
|
});
|
|
10045
10170
|
|
|
10046
|
-
const packageVersion = "0.14.
|
|
10171
|
+
const packageVersion = "0.14.698";
|
|
10047
10172
|
|
|
10048
10173
|
exports.Blocks = Blocks;
|
|
10049
10174
|
exports.ContentPage = ContentPage;
|