@redneckz/wildless-cms-uni-blocks 0.14.688 → 0.14.690
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/bundle.umd.js +277 -346
- package/bundle/bundle.umd.min.js +1 -1
- package/{dist/components/CreditCardForm/getFirstStepData.d.ts → bundle/components/CreditCardForm/getCardData.d.ts} +1 -1
- package/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/bundle/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
- package/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
- package/bundle/hooks/useLocalStorage.d.ts +1 -1
- package/bundle/hooks/useOnEscape.d.ts +1 -0
- package/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
- package/bundle/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
- package/bundle/ui-kit/DialogManager/DialogAction.d.ts +8 -9
- package/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
- package/bundle/ui-kit/DialogManager/useDialog.d.ts +9 -0
- package/bundle/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
- package/bundle/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
- package/bundle/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
- package/bundle/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
- package/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
- package/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
- package/bundle/ui-kit/FormField/SelectField.d.ts +1 -0
- package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/bundle/ui-kit/PopupManager/PopupAction.d.ts +7 -10
- package/bundle/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
- package/bundle/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
- package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
- package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
- package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
- package/dist/components/ApplicationForm/ApplicationForm.js +5 -4
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +7 -11
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +23 -18
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/dist/components/CreditCardForm/calculateInputs.js +2 -1
- package/dist/components/CreditCardForm/calculateInputs.js.map +1 -1
- package/dist/components/CreditCardForm/creditCardFormStepsData.js +18 -9
- package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/{bundle/components/CreditCardForm/getFirstStepData.d.ts → dist/components/CreditCardForm/getCardData.d.ts} +1 -1
- package/dist/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +4 -4
- package/dist/components/CreditCardForm/getCardData.js.map +1 -0
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/dist/components/CreditForm/calculateInputs.js +1 -1
- package/dist/components/CreditForm/calculateInputs.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.js +6 -6
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +7 -6
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +2 -2
- package/dist/components/LinkDocs/ReportDialogButton.js +15 -0
- package/dist/components/LinkDocs/ReportDialogButton.js.map +1 -0
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +8 -10
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
- package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
- package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/dist/hooks/useLocalStorage.d.ts +1 -1
- package/dist/hooks/useLocalStorage.js +8 -4
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useMobileMode.js +6 -5
- package/dist/hooks/useMobileMode.js.map +1 -1
- package/dist/hooks/useOnEscape.d.ts +1 -0
- package/dist/hooks/useOnEscape.js +14 -0
- package/dist/hooks/useOnEscape.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js +1 -10
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/DialogManager/DialogAction.d.ts +8 -9
- package/dist/ui-kit/DialogManager/DialogManager.js +10 -26
- package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
- package/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
- package/dist/ui-kit/DialogManager/useDialog.d.ts +9 -0
- package/dist/ui-kit/DialogManager/useDialog.js +18 -0
- package/dist/ui-kit/DialogManager/useDialog.js.map +1 -0
- package/dist/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
- package/dist/ui-kit/DialogManager/useDialogManager.js +2 -5
- package/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/dist/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
- package/dist/ui-kit/DialogManager/useDialogsList.js +8 -32
- package/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/dist/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
- package/dist/ui-kit/DocumentDialog/DocumentDialog.js +9 -0
- package/dist/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
- package/dist/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
- package/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js +19 -0
- package/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
- package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
- package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AddressField.js +14 -1
- package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
- package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
- package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
- package/dist/ui-kit/FormField/SelectField.d.ts +1 -0
- package/dist/ui-kit/FormField/SelectField.js +4 -2
- package/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/dist/ui-kit/Input/useInputPopup.js +2 -1
- package/dist/ui-kit/Input/useInputPopup.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -6
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/PopupManager/PopupAction.d.ts +7 -10
- package/dist/ui-kit/PopupManager/PopupManager.js +7 -24
- package/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/dist/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
- package/dist/ui-kit/PopupManager/usePopupManager.js +2 -5
- package/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/dist/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
- package/dist/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/dist/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +4 -3
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
- package/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/dist/ui-kit/Select/useSelectPopup.js +2 -1
- package/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +14 -23
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +5 -4
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -12
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +24 -19
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/lib/components/CreditCardForm/calculateInputs.js +2 -1
- package/lib/components/CreditCardForm/calculateInputs.js.map +1 -1
- package/lib/components/CreditCardForm/creditCardFormStepsData.js +18 -9
- package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/lib/components/CreditCardForm/{getFirstStepData.d.ts → getCardData.d.ts} +1 -1
- package/lib/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +2 -2
- package/lib/components/CreditCardForm/getCardData.js.map +1 -0
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/lib/components/CreditForm/calculateInputs.js +1 -1
- package/lib/components/CreditForm/calculateInputs.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.js +6 -6
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +7 -6
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/ReportDialogButton.js +13 -0
- package/lib/components/LinkDocs/ReportDialogButton.js.map +1 -0
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +8 -10
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
- package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
- package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/lib/hooks/useLocalStorage.d.ts +1 -1
- package/lib/hooks/useLocalStorage.js +8 -4
- package/lib/hooks/useLocalStorage.js.map +1 -1
- package/lib/hooks/useMobileMode.js +6 -5
- package/lib/hooks/useMobileMode.js.map +1 -1
- package/lib/hooks/useOnEscape.d.ts +1 -0
- package/lib/hooks/useOnEscape.js +11 -0
- package/lib/hooks/useOnEscape.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js +1 -10
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/DialogManager/DialogAction.d.ts +8 -9
- package/lib/ui-kit/DialogManager/DialogManager.js +11 -27
- package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
- package/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
- package/lib/ui-kit/DialogManager/useDialog.d.ts +9 -0
- package/lib/ui-kit/DialogManager/useDialog.js +15 -0
- package/lib/ui-kit/DialogManager/useDialog.js.map +1 -0
- package/lib/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
- package/lib/ui-kit/DialogManager/useDialogManager.js +2 -5
- package/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/lib/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
- package/lib/ui-kit/DialogManager/useDialogsList.js +8 -32
- package/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/lib/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
- package/lib/ui-kit/DocumentDialog/DocumentDialog.js +7 -0
- package/lib/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
- package/lib/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
- package/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js +16 -0
- package/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
- package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
- package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AddressField.js +14 -1
- package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
- package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
- package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
- package/lib/ui-kit/FormField/SelectField.d.ts +1 -0
- package/lib/ui-kit/FormField/SelectField.js +4 -2
- package/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/lib/ui-kit/Input/useInputPopup.js +2 -1
- package/lib/ui-kit/Input/useInputPopup.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -6
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/PopupManager/PopupAction.d.ts +7 -10
- package/lib/ui-kit/PopupManager/PopupManager.js +8 -25
- package/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/lib/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
- package/lib/ui-kit/PopupManager/usePopupManager.js +2 -5
- package/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/lib/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
- package/lib/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/lib/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +4 -3
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
- package/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/lib/ui-kit/Select/useSelectPopup.js +2 -1
- package/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +15 -24
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +301 -374
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CreditCardForm/{getFirstStepData.d.ts → getCardData.d.ts} +1 -1
- package/mobile/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/mobile/bundle/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
- package/mobile/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
- package/mobile/bundle/hooks/useLocalStorage.d.ts +1 -1
- package/mobile/bundle/hooks/useOnEscape.d.ts +1 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
- package/mobile/bundle/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
- package/mobile/bundle/ui-kit/DialogManager/DialogAction.d.ts +8 -9
- package/mobile/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
- package/mobile/bundle/ui-kit/DialogManager/useDialog.d.ts +9 -0
- package/mobile/bundle/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
- package/mobile/bundle/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
- package/mobile/bundle/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
- package/mobile/bundle/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
- package/mobile/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
- package/mobile/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
- package/mobile/bundle/ui-kit/FormField/SelectField.d.ts +1 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/PopupManager/PopupAction.d.ts +7 -10
- package/mobile/bundle/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
- package/mobile/bundle/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +5 -4
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +7 -11
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +23 -18
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/mobile/dist/components/CreditCardForm/calculateInputs.js +2 -1
- package/mobile/dist/components/CreditCardForm/calculateInputs.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +18 -9
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getCardData.d.ts +3 -0
- package/mobile/dist/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +4 -4
- package/mobile/dist/components/CreditCardForm/getCardData.js.map +1 -0
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/mobile/dist/components/CreditForm/calculateInputs.js +1 -1
- package/mobile/dist/components/CreditForm/calculateInputs.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +6 -6
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +7 -6
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +2 -2
- package/mobile/dist/components/LinkDocs/ReportDialogButton.js +15 -0
- package/mobile/dist/components/LinkDocs/ReportDialogButton.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +8 -10
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
- package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
- package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/mobile/dist/hooks/useLocalStorage.d.ts +1 -1
- package/mobile/dist/hooks/useLocalStorage.js +8 -4
- package/mobile/dist/hooks/useLocalStorage.js.map +1 -1
- package/mobile/dist/hooks/useMobileMode.js +6 -5
- package/mobile/dist/hooks/useMobileMode.js.map +1 -1
- package/mobile/dist/hooks/useOnEscape.d.ts +1 -0
- package/mobile/dist/hooks/useOnEscape.js +14 -0
- package/mobile/dist/hooks/useOnEscape.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -10
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/DialogAction.d.ts +8 -9
- package/mobile/dist/ui-kit/DialogManager/DialogManager.js +10 -26
- package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
- package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/useDialog.d.ts +9 -0
- package/mobile/dist/ui-kit/DialogManager/useDialog.js +18 -0
- package/mobile/dist/ui-kit/DialogManager/useDialog.js.map +1 -0
- package/mobile/dist/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
- package/mobile/dist/ui-kit/DialogManager/useDialogManager.js +2 -5
- package/mobile/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.js +8 -32
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/mobile/dist/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
- package/mobile/dist/ui-kit/DocumentDialog/DocumentDialog.js +9 -0
- package/mobile/dist/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
- package/mobile/dist/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
- package/mobile/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js +19 -0
- package/mobile/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
- package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
- package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +14 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
- package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/SelectField.d.ts +1 -0
- package/mobile/dist/ui-kit/FormField/SelectField.js +4 -2
- package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/dist/ui-kit/Input/useInputPopup.js +2 -1
- package/mobile/dist/ui-kit/Input/useInputPopup.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -6
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/PopupManager/PopupAction.d.ts +7 -10
- package/mobile/dist/ui-kit/PopupManager/PopupManager.js +7 -24
- package/mobile/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/mobile/dist/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
- package/mobile/dist/ui-kit/PopupManager/usePopupManager.js +2 -5
- package/mobile/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/mobile/dist/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/mobile/dist/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +4 -3
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/dist/ui-kit/Select/useSelectPopup.js +2 -1
- package/mobile/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +14 -23
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +5 -4
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -12
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +24 -19
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/mobile/lib/components/CreditCardForm/calculateInputs.js +2 -1
- package/mobile/lib/components/CreditCardForm/calculateInputs.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +18 -9
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getCardData.d.ts +3 -0
- package/mobile/lib/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +2 -2
- package/mobile/lib/components/CreditCardForm/getCardData.js.map +1 -0
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
- package/mobile/lib/components/CreditForm/calculateInputs.js +1 -1
- package/mobile/lib/components/CreditForm/calculateInputs.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +6 -6
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +7 -6
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/lib/components/LinkDocs/ReportDialogButton.js +13 -0
- package/mobile/lib/components/LinkDocs/ReportDialogButton.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +8 -10
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
- package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
- package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/mobile/lib/hooks/useLocalStorage.d.ts +1 -1
- package/mobile/lib/hooks/useLocalStorage.js +8 -4
- package/mobile/lib/hooks/useLocalStorage.js.map +1 -1
- package/mobile/lib/hooks/useMobileMode.js +6 -5
- package/mobile/lib/hooks/useMobileMode.js.map +1 -1
- package/mobile/lib/hooks/useOnEscape.d.ts +1 -0
- package/mobile/lib/hooks/useOnEscape.js +11 -0
- package/mobile/lib/hooks/useOnEscape.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -10
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/DialogAction.d.ts +8 -9
- package/mobile/lib/ui-kit/DialogManager/DialogManager.js +11 -27
- package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
- package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/useDialog.d.ts +9 -0
- package/mobile/lib/ui-kit/DialogManager/useDialog.js +15 -0
- package/mobile/lib/ui-kit/DialogManager/useDialog.js.map +1 -0
- package/mobile/lib/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
- package/mobile/lib/ui-kit/DialogManager/useDialogManager.js +2 -5
- package/mobile/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.js +8 -32
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/mobile/lib/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
- package/mobile/lib/ui-kit/DocumentDialog/DocumentDialog.js +7 -0
- package/mobile/lib/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
- package/mobile/lib/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
- package/mobile/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js +16 -0
- package/mobile/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
- package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
- package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +14 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
- package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/SelectField.d.ts +1 -0
- package/mobile/lib/ui-kit/FormField/SelectField.js +4 -2
- package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
- package/mobile/lib/ui-kit/Input/useInputPopup.js +2 -1
- package/mobile/lib/ui-kit/Input/useInputPopup.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -6
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/PopupManager/PopupAction.d.ts +7 -10
- package/mobile/lib/ui-kit/PopupManager/PopupManager.js +8 -25
- package/mobile/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/mobile/lib/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
- package/mobile/lib/ui-kit/PopupManager/usePopupManager.js +2 -5
- package/mobile/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/mobile/lib/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/mobile/lib/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +4 -3
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/lib/ui-kit/Select/useSelectPopup.js +2 -1
- package/mobile/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +15 -24
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +7 -4
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +8 -13
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -9
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +34 -27
- package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +1 -1
- package/mobile/src/components/CreditCardForm/calculateInputs.ts +6 -3
- package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +18 -9
- package/mobile/src/components/CreditCardForm/{getFirstStepData.tsx → getCardData.tsx} +1 -1
- package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -2
- package/mobile/src/components/CreditForm/calculateInputs.ts +3 -3
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +6 -6
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +7 -6
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/mobile/src/components/LinkDocs/{RepordDialogButton.tsx → ReportDialogButton.tsx} +9 -9
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +11 -11
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +8 -10
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +12 -23
- package/mobile/src/components/StickyBottomMenu/useBottomMenuItemDialog.tsx +48 -46
- package/mobile/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +18 -36
- package/mobile/src/hooks/useLocalStorage.ts +13 -6
- package/mobile/src/hooks/useMobileMode.ts +7 -7
- package/mobile/src/hooks/useOnEscape.ts +14 -0
- package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +50 -53
- package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +3 -9
- package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +51 -57
- package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +9 -13
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +12 -23
- package/mobile/src/ui-kit/DialogManager/DialogAction.ts +8 -10
- package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +11 -32
- package/mobile/src/ui-kit/DialogManager/isDialogOpen.ts +2 -2
- package/mobile/src/ui-kit/DialogManager/useDialog.tsx +31 -0
- package/mobile/src/ui-kit/DialogManager/useDialogManager.ts +2 -12
- package/mobile/src/ui-kit/DialogManager/useDialogsList.ts +13 -47
- package/mobile/src/ui-kit/DocumentDialog/DocumentDialog.tsx +23 -0
- package/mobile/src/ui-kit/DocumentDialog/uaeDocumentDialog.ts +18 -0
- package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +5 -6
- package/mobile/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +5 -17
- package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +14 -1
- package/mobile/src/ui-kit/FormField/Fields/CreditInRshbCdField.tsx +3 -2
- package/mobile/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -0
- package/mobile/src/ui-kit/FormField/SelectField.tsx +5 -4
- package/mobile/src/ui-kit/Input/useInputPopup.tsx +2 -1
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +5 -6
- package/mobile/src/ui-kit/PopupManager/PopupAction.ts +7 -12
- package/mobile/src/ui-kit/PopupManager/PopupManager.tsx +10 -35
- package/mobile/src/ui-kit/PopupManager/usePopupManager.tsx +2 -9
- package/mobile/src/ui-kit/ReportDialog/ReportDialog.tsx +5 -10
- package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +30 -34
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +4 -3
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +3 -2
- package/mobile/src/ui-kit/Select/useSelectPopup.tsx +15 -15
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +19 -32
- package/package.json +2 -2
- package/src/components/ApplicationForm/ApplicationForm.tsx +7 -4
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +13 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +8 -13
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -9
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +34 -27
- package/src/components/CreditCardForm/StepsNavigationButtons.tsx +1 -1
- package/src/components/CreditCardForm/calculateInputs.ts +6 -3
- package/src/components/CreditCardForm/creditCardFormStepsData.tsx +18 -9
- package/src/components/CreditCardForm/{getFirstStepData.tsx → getCardData.tsx} +1 -1
- package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -2
- package/src/components/CreditForm/calculateInputs.ts +3 -3
- package/src/components/CreditForm/creditFormStepsData.tsx +6 -6
- package/src/components/Header/HeaderSecondaryMenu.tsx +7 -6
- package/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/src/components/LinkDocs/{RepordDialogButton.tsx → ReportDialogButton.tsx} +9 -9
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +11 -11
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +8 -10
- package/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +12 -23
- package/src/components/StickyBottomMenu/useBottomMenuItemDialog.tsx +48 -46
- package/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +18 -36
- package/src/hooks/useLocalStorage.ts +13 -6
- package/src/hooks/useMobileMode.ts +7 -7
- package/src/hooks/useOnEscape.ts +14 -0
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +50 -53
- package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +3 -9
- package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +51 -57
- package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +9 -13
- package/src/ui-kit/DialogManager/Dialog.tsx +12 -23
- package/src/ui-kit/DialogManager/DialogAction.ts +8 -10
- package/src/ui-kit/DialogManager/DialogManager.tsx +11 -32
- package/src/ui-kit/DialogManager/isDialogOpen.ts +2 -2
- package/src/ui-kit/DialogManager/useDialog.tsx +31 -0
- package/src/ui-kit/DialogManager/useDialogManager.ts +2 -12
- package/src/ui-kit/DialogManager/useDialogsList.ts +13 -47
- package/src/ui-kit/DocumentDialog/DocumentDialog.tsx +23 -0
- package/src/ui-kit/DocumentDialog/uaeDocumentDialog.ts +18 -0
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +5 -6
- package/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +5 -17
- package/src/ui-kit/FormField/Fields/AddressField.tsx +14 -1
- package/src/ui-kit/FormField/Fields/CreditInRshbCdField.tsx +3 -2
- package/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -0
- package/src/ui-kit/FormField/SelectField.tsx +5 -4
- package/src/ui-kit/Input/useInputPopup.tsx +2 -1
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +5 -6
- package/src/ui-kit/PopupManager/PopupAction.ts +7 -12
- package/src/ui-kit/PopupManager/PopupManager.tsx +10 -35
- package/src/ui-kit/PopupManager/usePopupManager.tsx +2 -9
- package/src/ui-kit/ReportDialog/ReportDialog.tsx +5 -10
- package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +30 -34
- package/src/ui-kit/SearchBar/SearchBar.tsx +4 -3
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +3 -2
- package/src/ui-kit/Select/useSelectPopup.tsx +15 -15
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +19 -32
- package/bundle/EventBus/useLatestEvent.d.ts +0 -2
- package/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
- package/bundle/ui-kit/Checkbox/getDocument.d.ts +0 -1
- package/bundle/ui-kit/DialogManager/openDocument.d.ts +0 -9
- package/bundle/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
- package/bundle/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
- package/bundle/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
- package/bundle/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
- package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
- package/dist/EventBus/useLatestEvent.d.ts +0 -2
- package/dist/EventBus/useLatestEvent.js +0 -11
- package/dist/EventBus/useLatestEvent.js.map +0 -1
- package/dist/components/CreditCardForm/getFirstStepData.js.map +0 -1
- package/dist/components/LinkDocs/RepordDialogButton.js +0 -17
- package/dist/components/LinkDocs/RepordDialogButton.js.map +0 -1
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -15
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
- package/dist/ui-kit/Checkbox/getDocument.d.ts +0 -1
- package/dist/ui-kit/Checkbox/getDocument.js +0 -9
- package/dist/ui-kit/Checkbox/getDocument.js.map +0 -1
- package/dist/ui-kit/DialogManager/openDocument.d.ts +0 -9
- package/dist/ui-kit/DialogManager/openDocument.js +0 -12
- package/dist/ui-kit/DialogManager/openDocument.js.map +0 -1
- package/dist/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
- package/dist/ui-kit/LocationDialog/useLocationDialog.js +0 -14
- package/dist/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
- package/dist/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
- package/dist/ui-kit/ReportDialog/useReportDialog.js +0 -14
- package/dist/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
- package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
- package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -14
- package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
- package/dist/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
- package/dist/ui-kit/SearchDialog/useSearchDialog.js +0 -14
- package/dist/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -14
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
- package/lib/EventBus/useLatestEvent.d.ts +0 -2
- package/lib/EventBus/useLatestEvent.js +0 -8
- package/lib/EventBus/useLatestEvent.js.map +0 -1
- package/lib/components/CreditCardForm/getFirstStepData.js.map +0 -1
- package/lib/components/LinkDocs/RepordDialogButton.js +0 -15
- package/lib/components/LinkDocs/RepordDialogButton.js.map +0 -1
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -12
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
- package/lib/ui-kit/Checkbox/getDocument.d.ts +0 -1
- package/lib/ui-kit/Checkbox/getDocument.js +0 -6
- package/lib/ui-kit/Checkbox/getDocument.js.map +0 -1
- package/lib/ui-kit/DialogManager/openDocument.d.ts +0 -9
- package/lib/ui-kit/DialogManager/openDocument.js +0 -9
- package/lib/ui-kit/DialogManager/openDocument.js.map +0 -1
- package/lib/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
- package/lib/ui-kit/LocationDialog/useLocationDialog.js +0 -11
- package/lib/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
- package/lib/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
- package/lib/ui-kit/ReportDialog/useReportDialog.js +0 -11
- package/lib/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
- package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
- package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -11
- package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
- package/lib/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
- package/lib/ui-kit/SearchDialog/useSearchDialog.js +0 -11
- package/lib/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -11
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
- package/mobile/bundle/EventBus/useLatestEvent.d.ts +0 -2
- package/mobile/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
- package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +0 -1
- package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +0 -9
- package/mobile/bundle/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
- package/mobile/bundle/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
- package/mobile/bundle/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
- package/mobile/bundle/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
- package/mobile/dist/EventBus/useLatestEvent.d.ts +0 -2
- package/mobile/dist/EventBus/useLatestEvent.js +0 -11
- package/mobile/dist/EventBus/useLatestEvent.js.map +0 -1
- package/mobile/dist/components/CreditCardForm/getFirstStepData.d.ts +0 -3
- package/mobile/dist/components/CreditCardForm/getFirstStepData.js.map +0 -1
- package/mobile/dist/components/LinkDocs/RepordDialogButton.js +0 -17
- package/mobile/dist/components/LinkDocs/RepordDialogButton.js.map +0 -1
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -15
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
- package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +0 -1
- package/mobile/dist/ui-kit/Checkbox/getDocument.js +0 -9
- package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +0 -1
- package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +0 -9
- package/mobile/dist/ui-kit/DialogManager/openDocument.js +0 -12
- package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +0 -1
- package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
- package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.js +0 -14
- package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
- package/mobile/dist/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
- package/mobile/dist/ui-kit/ReportDialog/useReportDialog.js +0 -14
- package/mobile/dist/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
- package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
- package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -14
- package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
- package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
- package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.js +0 -14
- package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -14
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
- package/mobile/lib/EventBus/useLatestEvent.d.ts +0 -2
- package/mobile/lib/EventBus/useLatestEvent.js +0 -8
- package/mobile/lib/EventBus/useLatestEvent.js.map +0 -1
- package/mobile/lib/components/CreditCardForm/getFirstStepData.d.ts +0 -3
- package/mobile/lib/components/CreditCardForm/getFirstStepData.js.map +0 -1
- package/mobile/lib/components/LinkDocs/RepordDialogButton.js +0 -15
- package/mobile/lib/components/LinkDocs/RepordDialogButton.js.map +0 -1
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -12
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
- package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +0 -1
- package/mobile/lib/ui-kit/Checkbox/getDocument.js +0 -6
- package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +0 -1
- package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +0 -9
- package/mobile/lib/ui-kit/DialogManager/openDocument.js +0 -9
- package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +0 -1
- package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
- package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.js +0 -11
- package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
- package/mobile/lib/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
- package/mobile/lib/ui-kit/ReportDialog/useReportDialog.js +0 -11
- package/mobile/lib/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
- package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
- package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -11
- package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
- package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
- package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.js +0 -11
- package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -11
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
- package/mobile/src/EventBus/useLatestEvent.ts +0 -16
- package/mobile/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +0 -12
- package/mobile/src/ui-kit/Checkbox/getDocument.ts +0 -7
- package/mobile/src/ui-kit/DialogManager/openDocument.tsx +0 -27
- package/mobile/src/ui-kit/LocationDialog/useLocationDialog.tsx +0 -11
- package/mobile/src/ui-kit/ReportDialog/useReportDialog.tsx +0 -11
- package/mobile/src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx +0 -17
- package/mobile/src/ui-kit/SearchDialog/useSearchDialog.tsx +0 -12
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +0 -12
- package/src/EventBus/useLatestEvent.ts +0 -16
- package/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +0 -12
- package/src/ui-kit/Checkbox/getDocument.ts +0 -7
- package/src/ui-kit/DialogManager/openDocument.tsx +0 -27
- package/src/ui-kit/LocationDialog/useLocationDialog.tsx +0 -11
- package/src/ui-kit/ReportDialog/useReportDialog.tsx +0 -11
- package/src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx +0 -17
- package/src/ui-kit/SearchDialog/useSearchDialog.tsx +0 -12
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +0 -12
- /package/bundle/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
- /package/dist/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
- /package/lib/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
- /package/mobile/bundle/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
- /package/mobile/dist/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
- /package/mobile/lib/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -415,6 +415,17 @@
|
|
|
415
415
|
handlerDecorator._impl = impl;
|
|
416
416
|
};
|
|
417
417
|
|
|
418
|
+
function useEmitterWithActions(eventBus, type) {
|
|
419
|
+
const cache = useRef({});
|
|
420
|
+
return useMemo(() => new Proxy({}, {
|
|
421
|
+
get(_, actionType) {
|
|
422
|
+
cache.current ||= {};
|
|
423
|
+
cache.current[actionType] ||= action => eventBus.fire(type, { ...(action ?? {}), type: actionType });
|
|
424
|
+
return cache.current[actionType];
|
|
425
|
+
}
|
|
426
|
+
}), [eventBus, type]);
|
|
427
|
+
}
|
|
428
|
+
|
|
418
429
|
class EventBus {
|
|
419
430
|
watchers = new Set();
|
|
420
431
|
subscribersMap = {};
|
|
@@ -466,11 +477,7 @@
|
|
|
466
477
|
|
|
467
478
|
const defaultEventBus = new EventBus();
|
|
468
479
|
|
|
469
|
-
const useDialogManager = () => (
|
|
470
|
-
open: (dialog, options = {}) => defaultEventBus.fire('dialog', { type: 'open', dialog, ...options }),
|
|
471
|
-
close: () => defaultEventBus.fire('dialog', { type: 'close' }),
|
|
472
|
-
closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
|
|
473
|
-
});
|
|
480
|
+
const useDialogManager = () => useEmitterWithActions(defaultEventBus.emitter, 'dialog');
|
|
474
481
|
|
|
475
482
|
const adjustBase = (href, basePath = '') => href?.replace(basePath, '') || '/';
|
|
476
483
|
|
|
@@ -602,17 +609,18 @@
|
|
|
602
609
|
|
|
603
610
|
const INITIAL_MOBILE_MODE = false;
|
|
604
611
|
|
|
612
|
+
const MOBILE_WIDTH = 1024;
|
|
613
|
+
const MOBILE_QUERY = `(max-width: ${MOBILE_WIDTH}px)`;
|
|
605
614
|
const useMobileMode = () => {
|
|
606
|
-
const
|
|
607
|
-
const [isMobileMode, setIsMobileMode] = useState(INITIAL_MOBILE_MODE);
|
|
615
|
+
const [isMobileMode, setMobileMode] = useState(INITIAL_MOBILE_MODE);
|
|
608
616
|
useEffect(() => {
|
|
609
|
-
const mqList = globalThis.matchMedia?.(
|
|
617
|
+
const mqList = globalThis.matchMedia?.(MOBILE_QUERY);
|
|
610
618
|
const mqHandler = () => {
|
|
611
|
-
|
|
619
|
+
setMobileMode(Boolean(mqList?.matches));
|
|
612
620
|
};
|
|
613
621
|
mqList?.addEventListener('change', mqHandler);
|
|
614
622
|
if (mqList?.matches) {
|
|
615
|
-
|
|
623
|
+
setMobileMode(true);
|
|
616
624
|
}
|
|
617
625
|
return () => {
|
|
618
626
|
mqList?.removeEventListener('change', mqHandler);
|
|
@@ -1201,6 +1209,18 @@
|
|
|
1201
1209
|
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-lg", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, children] }) }));
|
|
1202
1210
|
});
|
|
1203
1211
|
|
|
1212
|
+
function useDialog(Dialog, initialProps = {}) {
|
|
1213
|
+
const { open, close, ...rest } = useDialogManager();
|
|
1214
|
+
const openDialog = useCallback((props, options = {}) => open({
|
|
1215
|
+
dialog: (jsx(Dialog, { ...initialProps, ...props, onClose: () => {
|
|
1216
|
+
close();
|
|
1217
|
+
props.onClose?.();
|
|
1218
|
+
} })),
|
|
1219
|
+
...options,
|
|
1220
|
+
}), [Dialog, open, close]);
|
|
1221
|
+
return { open: openDialog, close, ...rest };
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1204
1224
|
const getConsentDataProcessing = (inputs) => inputs?.find((_) => _?.name === 'consentDataProcessing');
|
|
1205
1225
|
|
|
1206
1226
|
function useBool(defaultValue = false) {
|
|
@@ -1372,11 +1392,7 @@
|
|
|
1372
1392
|
return debouncedCallback;
|
|
1373
1393
|
};
|
|
1374
1394
|
|
|
1375
|
-
const usePopupManager = () => (
|
|
1376
|
-
open: (popup, options) => defaultEventBus.fire('popup', { type: 'open', popup, ...options }),
|
|
1377
|
-
update: (popup, options) => defaultEventBus.fire('popup', { type: 'update', popup, ...options }),
|
|
1378
|
-
close: () => defaultEventBus.fire('popup', { type: 'close' }),
|
|
1379
|
-
});
|
|
1395
|
+
const usePopupManager = () => useEmitterWithActions(defaultEventBus.emitter, 'popup');
|
|
1380
1396
|
|
|
1381
1397
|
const InputPopup = JSX(({ options, onChange }) => (jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl", role: "list", children: options?.map((item, key) => (jsx("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "listitem", onMouseDown: () => onChange(item), children: jsx("span", { className: "min-h-6", children: item.processedValue }) }, key.toString()))) })));
|
|
1382
1398
|
|
|
@@ -1426,7 +1442,8 @@
|
|
|
1426
1442
|
debouncedGetHintsList(value);
|
|
1427
1443
|
prevInputValue.current = value;
|
|
1428
1444
|
}
|
|
1429
|
-
popup.
|
|
1445
|
+
popup.open({
|
|
1446
|
+
popup: jsx(InputPopup, { options: hintsList, value: value, onChange: handleChange }),
|
|
1430
1447
|
top: top + globalThis.scrollY + height,
|
|
1431
1448
|
left,
|
|
1432
1449
|
width,
|
|
@@ -1494,7 +1511,8 @@
|
|
|
1494
1511
|
}
|
|
1495
1512
|
const inputElement = inputRef.current;
|
|
1496
1513
|
const { top, left, width, height } = inputElement.getBoundingClientRect();
|
|
1497
|
-
popup.
|
|
1514
|
+
popup.open({
|
|
1515
|
+
popup: (jsx(SelectPopup, { popupRef: popupRef, options: options, value: value, query: query, onChange: handleChange, iconVersion: iconVersion })),
|
|
1498
1516
|
top: top + window.scrollY + height,
|
|
1499
1517
|
left,
|
|
1500
1518
|
width,
|
|
@@ -1882,8 +1900,21 @@
|
|
|
1882
1900
|
}, []);
|
|
1883
1901
|
const onChange = useCallback((value) => {
|
|
1884
1902
|
field?.(fieldName)?.onChange?.({
|
|
1885
|
-
|
|
1903
|
+
apartment: '',
|
|
1904
|
+
city: '',
|
|
1905
|
+
district: '',
|
|
1886
1906
|
fullAddress: value,
|
|
1907
|
+
fiasCode: '',
|
|
1908
|
+
house: '',
|
|
1909
|
+
locality: '',
|
|
1910
|
+
okatoRegionCode: '',
|
|
1911
|
+
postcode: '',
|
|
1912
|
+
region: '',
|
|
1913
|
+
regionCode: '',
|
|
1914
|
+
street: '',
|
|
1915
|
+
qc: '',
|
|
1916
|
+
qcComplete: '',
|
|
1917
|
+
qcHouse: '',
|
|
1887
1918
|
});
|
|
1888
1919
|
}, []);
|
|
1889
1920
|
return (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, fieldName), label: "\u0410\u0434\u0440\u0435\u0441", ...getValidation(field(fieldName), validatorObj[fieldName], input?.required), value: fieldValue.fullAddress, onChange: onChange, ...input, onDaDataChange: onDaDataChange }));
|
|
@@ -2611,12 +2642,14 @@
|
|
|
2611
2642
|
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
2612
2643
|
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') })));
|
|
2613
2644
|
|
|
2614
|
-
const SelectField = UniBlock(({ field, source,
|
|
2645
|
+
const SelectField = UniBlock(({ field, source, fieldName, input, placeholder = 'Выберите из списка',
|
|
2646
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2647
|
+
options, ...rest }) => {
|
|
2615
2648
|
const leadOptions = source?.map((_) => ({
|
|
2616
2649
|
key: _.key || '',
|
|
2617
2650
|
text: _.value,
|
|
2618
2651
|
})) || [];
|
|
2619
|
-
return (jsx(SelectControl, { placeholder: placeholder,
|
|
2652
|
+
return (jsx(SelectControl, { placeholder: placeholder, options: leadOptions, ...getValidation(field(fieldName), validatorObj[fieldName], input?.required), ...rest }));
|
|
2620
2653
|
});
|
|
2621
2654
|
|
|
2622
2655
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
@@ -2927,11 +2960,15 @@
|
|
|
2927
2960
|
};
|
|
2928
2961
|
|
|
2929
2962
|
function useLocalStorage(key) {
|
|
2930
|
-
const
|
|
2963
|
+
const initialValue = globalThis.localStorage?.getItem(key);
|
|
2964
|
+
const [storedValue, setStoredValue] = useState(initialValue ? JSON.parse(initialValue) : null);
|
|
2931
2965
|
const setValue = useCallback((value) => {
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2966
|
+
setStoredValue((oldValue) => {
|
|
2967
|
+
const newValue = value instanceof Function ? value(oldValue) : value;
|
|
2968
|
+
globalThis.localStorage?.setItem(key, JSON.stringify(newValue));
|
|
2969
|
+
return newValue;
|
|
2970
|
+
});
|
|
2971
|
+
}, [key]);
|
|
2935
2972
|
return [storedValue, setValue];
|
|
2936
2973
|
}
|
|
2937
2974
|
|
|
@@ -2999,6 +3036,11 @@
|
|
|
2999
3036
|
},
|
|
3000
3037
|
};
|
|
3001
3038
|
|
|
3039
|
+
const feedbackById = async (id, convertToPng = false) => {
|
|
3040
|
+
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
|
|
3041
|
+
return response ? await response.blob() : new Blob();
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3002
3044
|
function useButton() {
|
|
3003
3045
|
return (props) => ({
|
|
3004
3046
|
...props,
|
|
@@ -3031,37 +3073,28 @@
|
|
|
3031
3073
|
: '', className), type: type, role: role, onClick: onClick, children: children }));
|
|
3032
3074
|
});
|
|
3033
3075
|
|
|
3034
|
-
const feedbackById = async (id, convertToPng = false) => {
|
|
3035
|
-
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
|
|
3036
|
-
return response ? await response.blob() : new Blob();
|
|
3037
|
-
};
|
|
3038
|
-
|
|
3039
|
-
const getDocument = async (id, convertToPng = false) => {
|
|
3040
|
-
const response = await feedbackById(id, convertToPng);
|
|
3041
|
-
return URL.createObjectURL(response);
|
|
3042
|
-
};
|
|
3043
|
-
|
|
3044
3076
|
const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", type: "button", children: jsx(Icon, { name: "CloseIcon", width: "20", height: "20", iconVersion: "gray" }) })));
|
|
3045
3077
|
|
|
3046
|
-
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
3047
|
-
const { close } = useDialogManager();
|
|
3048
|
-
const handleClose = useCallback(() => {
|
|
3049
|
-
close();
|
|
3050
|
-
onClose && onClose();
|
|
3051
|
-
}, [onClose]);
|
|
3052
|
-
return (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white pt-0 p-lg', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
3053
|
-
});
|
|
3078
|
+
const Dialog = JSX(({ className, head, children, onClose, onClick }) => (jsxs("div", { className: style('relative min-h-full bg-white pt-0 p-lg', className), role: "dialog", onClick: onClick, children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: onClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] })));
|
|
3054
3079
|
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3080
|
+
// TODO Перенесено как есть из openDocument. Требует рефакторинга
|
|
3081
|
+
const DocumentDialog = JSX(({ src, convertToPng, onClose }) => (jsxs(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", onClose: onClose, children: [convertToPng ? (jsx("img", { src: src })) : (jsx("iframe", { src: `${src}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" })), jsx(Button, { className: "mx-auto mt-m", type: "button", onClick: onClose, children: "\u041E\u0437\u043D\u0430\u043A\u043E\u043C\u0438\u0442\u044C\u0441\u044F" })] })));
|
|
3082
|
+
|
|
3083
|
+
const useDocumentDialog = (docId) => {
|
|
3084
|
+
const { open } = useDialog(DocumentDialog);
|
|
3085
|
+
const isMobileMode = useMobileMode();
|
|
3086
|
+
return useCallback(async () => {
|
|
3087
|
+
if (docId) {
|
|
3088
|
+
const src = URL.createObjectURL(await feedbackById(docId, isMobileMode));
|
|
3089
|
+
open({ src });
|
|
3090
|
+
}
|
|
3091
|
+
}, [open, docId, isMobileMode]);
|
|
3058
3092
|
};
|
|
3059
3093
|
|
|
3060
3094
|
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
3061
3095
|
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
3062
|
-
const
|
|
3063
|
-
|
|
3064
|
-
return (jsxs("div", { className: className, children: [jsxs("div", { className: "flex flex-wrap gap-x-m", children: [jsx(Checkbox, { ...props }), docId ? (jsx(LinkButton, { className: "text-primary-main", onClick: () => openDocument({ open, close, id: docId, convertToPng: isMobile }), children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
|
|
3096
|
+
const openDocument = useDocumentDialog(docId);
|
|
3097
|
+
return (jsxs("div", { className: className, children: [jsxs("div", { className: "flex flex-wrap gap-x-m", children: [jsx(Checkbox, { ...props }), docId ? (jsx(LinkButton, { className: "text-primary-main", onClick: openDocument, children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
|
|
3065
3098
|
});
|
|
3066
3099
|
|
|
3067
3100
|
const ConsentField = JSX(({ field, input }) => input && input.name ? (jsx(CheckboxWithDoc, { text: CONSENTS[input.name]?.text, docId: CONSENTS[input.name]?.docId, ...getValidation(field(input.name), validatorObj[input.name], input?.required) })) : null);
|
|
@@ -3378,12 +3411,12 @@
|
|
|
3378
3411
|
return (jsx(CalculatorCredit, { ...params?.calcData, defaultParams: defaultValueAdapter(field(FIELD_NAME$9).value), onChange: handleChange }));
|
|
3379
3412
|
});
|
|
3380
3413
|
|
|
3381
|
-
const LABEL_TEXT = `Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /
|
|
3382
|
-
вкладчиком с долей участия более 20% уставного капитала руководителем,
|
|
3414
|
+
const LABEL_TEXT = `Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /
|
|
3415
|
+
вкладчиком с долей участия более 20% уставного капитала руководителем,
|
|
3383
3416
|
которого Вы являетесь, кредит в АО «Россельхозбанк»`;
|
|
3384
3417
|
const CreditInRshbCdField = JSX(({ field, input }) => {
|
|
3385
3418
|
const { data: creditInRshbCd } = useLeadFormData('CREDIT_IN_RSHB');
|
|
3386
|
-
return (jsx(SelectField, { field: field, source: creditInRshbCd, label: LABEL_TEXT, fieldName: "creditInRshbCd", input: input }));
|
|
3419
|
+
return (jsx(SelectField, { field: field, source: creditInRshbCd, label: LABEL_TEXT, fieldName: "creditInRshbCd", input: input, disabled: !field?.('shareholderFlg')?.value }));
|
|
3387
3420
|
});
|
|
3388
3421
|
|
|
3389
3422
|
const RadioButtonGroupControl = JSX(({ className, label, onChange, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), onChange: (_) => onChange && onChange(_), ...rest }), renderErrorText(error)] })));
|
|
@@ -3514,7 +3547,7 @@
|
|
|
3514
3547
|
const LastJobExperienceField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0421\u0442\u0430\u0436 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043B\u0435\u0442", type: "number", maxLength: 2, ...getValidation(field('lastJobExperience'), validatorObj.lastJobExperience, input?.required), ...input })));
|
|
3515
3548
|
|
|
3516
3549
|
const LegalEntityNameField = JSX(({ field, input }) => {
|
|
3517
|
-
return (jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430", ...input, ...getValidation(field('legalEntityName'), validatorObj.legalEntityName, input?.required) }));
|
|
3550
|
+
return (jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043B\u0438\u0446\u0430", ...input, ...getValidation(field('legalEntityName'), validatorObj.legalEntityName, input?.required), disabled: !field?.('shareholderFlg')?.value }));
|
|
3518
3551
|
});
|
|
3519
3552
|
|
|
3520
3553
|
const LegalFormField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u041F\u0424", placeholder: "\u041E\u041E\u041E, \u041F\u0410\u041E \u0438 \u0434\u0440.", ...getValidation(field('legalForm'), validatorObj.legalForm, input?.required), ...input })));
|
|
@@ -3911,29 +3944,17 @@
|
|
|
3911
3944
|
|
|
3912
3945
|
const renderTitle = (title) => title ? (jsx("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: jsx(Text, { size: "text-h6", children: title }) })) : null;
|
|
3913
3946
|
|
|
3914
|
-
const ResponseTypeDialog = JSX(
|
|
3947
|
+
const ResponseTypeDialog = JSX(({ responseType, typeForm, onClose }) => {
|
|
3915
3948
|
const responseOK = responseType === 'OK';
|
|
3916
3949
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
3917
|
-
const { close } = useDialogManager();
|
|
3918
|
-
const handleClose = useCallback(() => {
|
|
3919
|
-
close();
|
|
3920
|
-
}, []);
|
|
3921
3950
|
const responseOKDescription = typeForm === 'ANTIFRAUD'
|
|
3922
3951
|
? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
|
|
3923
3952
|
можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка
|
|
3924
3953
|
не звонят с использованием мессенджеров.`
|
|
3925
3954
|
: 'Совсем скоро мы с вами свяжемся';
|
|
3926
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto
|
|
3955
|
+
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md space-x-m", children: [jsx(Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "136", height: "136" }), jsx(Headline, { className: "w-full", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', description: responseOK ? responseOKDescription : 'Пожалуйста, повторите позднее', headlineVersion: "XS", isEmbedded: true }), jsx(Button, { type: "button", onClick: onClose, children: "\u0425\u043E\u0440\u043E\u0448\u043E" })] }) }));
|
|
3927
3956
|
});
|
|
3928
3957
|
|
|
3929
|
-
const useResponseTypeDialog = (initialProps) => {
|
|
3930
|
-
const { open, close } = useDialogManager();
|
|
3931
|
-
return {
|
|
3932
|
-
open: (props, options = {}) => open(jsx(ResponseTypeDialog, { ...initialProps, ...props }), options),
|
|
3933
|
-
close,
|
|
3934
|
-
};
|
|
3935
|
-
};
|
|
3936
|
-
|
|
3937
3958
|
const objectValidator = (validatorsMap) => (o) => (o &&
|
|
3938
3959
|
Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
|
|
3939
3960
|
[];
|
|
@@ -4024,7 +4045,7 @@
|
|
|
4024
4045
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
4025
4046
|
const initialFormState = getInitialFormState$3(inputs, typeForm);
|
|
4026
4047
|
const [responseType, setResponseType] = useState('');
|
|
4027
|
-
const responseTypeDialog =
|
|
4048
|
+
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
4028
4049
|
const handleSubmit = useCallback(async (formData, ev) => {
|
|
4029
4050
|
const inputsFiltered = getFilteredInputs(inputs, formData);
|
|
4030
4051
|
const feedbackValidator = objectValidator(getObjectValidator(inputsFiltered));
|
|
@@ -4035,14 +4056,14 @@
|
|
|
4035
4056
|
const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
|
|
4036
4057
|
setResponseType(status);
|
|
4037
4058
|
if (status) {
|
|
4038
|
-
responseTypeDialog.open({ responseType: status });
|
|
4059
|
+
responseTypeDialog.open({ typeForm, responseType: status });
|
|
4039
4060
|
}
|
|
4040
4061
|
if (status === 'OK' && data) {
|
|
4041
4062
|
const aspects = useAspects();
|
|
4042
4063
|
handleAspects({ aspectsAttributes: data, aspects, ev });
|
|
4043
4064
|
}
|
|
4044
4065
|
return status;
|
|
4045
|
-
}, []);
|
|
4066
|
+
}, [typeForm]);
|
|
4046
4067
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4047
4068
|
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
4048
4069
|
useEffect(() => {
|
|
@@ -4238,7 +4259,7 @@
|
|
|
4238
4259
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
4239
4260
|
: null] })));
|
|
4240
4261
|
|
|
4241
|
-
const CaptchaDialog = JSX(({ phoneNumber,
|
|
4262
|
+
const CaptchaDialog = JSX(({ phoneNumber, sendCode, onClose }) => {
|
|
4242
4263
|
const [captcha, setCaptcha] = useState('');
|
|
4243
4264
|
const [code, setCode] = useState('');
|
|
4244
4265
|
const [hasError, setHasError] = useState(false);
|
|
@@ -4246,28 +4267,19 @@
|
|
|
4246
4267
|
const isValidCode = await checkCaptcha({ captchaText: code });
|
|
4247
4268
|
if (isValidCode) {
|
|
4248
4269
|
sendCode?.();
|
|
4249
|
-
|
|
4270
|
+
onClose?.();
|
|
4250
4271
|
}
|
|
4251
4272
|
else {
|
|
4252
4273
|
setHasError(isValidCode);
|
|
4253
4274
|
}
|
|
4254
|
-
}, [code]);
|
|
4275
|
+
}, [code, sendCode]);
|
|
4255
4276
|
const handleCreateCaptcha = useCallback(() => {
|
|
4256
4277
|
(async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
|
|
4257
4278
|
}, []);
|
|
4258
4279
|
useEffect(handleCreateCaptcha, []);
|
|
4259
|
-
return (jsx(Dialog, {
|
|
4280
|
+
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", head: jsx(Logo, {}), onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-36 w-72", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: handleCreateCaptcha, className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: handleCheckCaptcha, version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] })] }) }));
|
|
4260
4281
|
});
|
|
4261
4282
|
|
|
4262
|
-
const useCaptchaDialog = (initialProps, onClose) => {
|
|
4263
|
-
const { open, close, closeAll } = useDialogManager();
|
|
4264
|
-
return {
|
|
4265
|
-
open: () => open(jsx(CaptchaDialog, { close: close, onClose: onClose, ...initialProps })),
|
|
4266
|
-
close,
|
|
4267
|
-
closeAll,
|
|
4268
|
-
};
|
|
4269
|
-
};
|
|
4270
|
-
|
|
4271
4283
|
const Timer = JSX(({ time, setTime, className }) => {
|
|
4272
4284
|
useEffect(() => {
|
|
4273
4285
|
const timer = setInterval(() => {
|
|
@@ -4340,94 +4352,77 @@
|
|
|
4340
4352
|
}
|
|
4341
4353
|
};
|
|
4342
4354
|
|
|
4343
|
-
const useVerifyPhoneDialogSubmit = ({
|
|
4344
|
-
const [hasError, setHasError] = useState(false);
|
|
4355
|
+
const useVerifyPhoneDialogSubmit = ({ values, onSuccess, }) => {
|
|
4345
4356
|
const [errorText, setErrorText] = useState('');
|
|
4346
4357
|
const [isLoading, setIsLoading] = useState(false);
|
|
4347
4358
|
const [timeNextReq, setTimeNextReq] = useState(0);
|
|
4348
4359
|
const [isTimerStarted, setIsTimerStarted] = useState(false);
|
|
4349
|
-
const [
|
|
4350
|
-
const resetError = useCallback(() =>
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
}, []);
|
|
4354
|
-
const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
|
|
4355
|
-
const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
|
|
4360
|
+
const [attempts, setAttempts] = useState(0);
|
|
4361
|
+
const resetError = useCallback(() => setErrorText(''), []);
|
|
4362
|
+
const isTimeExpired = Boolean(timeNextReq === 0 && isTimerStarted);
|
|
4363
|
+
const isSubmitButtonDisabled = attempts > 2 || isTimeExpired || !values.every(Boolean);
|
|
4356
4364
|
const handleSubmit = useCallback(async () => {
|
|
4357
4365
|
try {
|
|
4358
4366
|
setIsTimerStarted(false);
|
|
4359
4367
|
setTimeNextReq(0);
|
|
4360
|
-
|
|
4368
|
+
setAttempts((_) => _ + 1);
|
|
4361
4369
|
setIsLoading(true);
|
|
4362
4370
|
await checkCode({
|
|
4363
4371
|
smsText: values.join(''),
|
|
4364
4372
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
4365
4373
|
});
|
|
4366
4374
|
resetError();
|
|
4367
|
-
|
|
4375
|
+
onSuccess?.(values.join(''));
|
|
4368
4376
|
}
|
|
4369
4377
|
catch {
|
|
4378
|
+
setErrorText(attempts > 1 ? 'Исчерпан лимит ввода смс-кода' : 'Неверный код');
|
|
4379
|
+
}
|
|
4380
|
+
finally {
|
|
4370
4381
|
setIsLoading(false);
|
|
4371
|
-
attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
|
|
4372
|
-
setHasError(true);
|
|
4373
4382
|
}
|
|
4374
|
-
}, [values,
|
|
4383
|
+
}, [values, attempts]);
|
|
4375
4384
|
useEffect(() => {
|
|
4376
|
-
|
|
4377
|
-
setHasError(true);
|
|
4378
|
-
setErrorText('Код просрочен');
|
|
4379
|
-
}
|
|
4380
|
-
else {
|
|
4381
|
-
setHasError(false);
|
|
4382
|
-
}
|
|
4385
|
+
setErrorText(isTimeExpired ? 'Код просрочен' : '');
|
|
4383
4386
|
}, [isTimeExpired]);
|
|
4384
4387
|
return {
|
|
4385
4388
|
handleSubmit,
|
|
4386
|
-
hasError,
|
|
4389
|
+
hasError: Boolean(errorText),
|
|
4387
4390
|
errorText,
|
|
4388
4391
|
isLoading,
|
|
4389
4392
|
timeNextReq,
|
|
4390
4393
|
isSubmitButtonDisabled,
|
|
4391
4394
|
setTimeNextReq,
|
|
4392
4395
|
setIsTimerStarted,
|
|
4393
|
-
|
|
4396
|
+
setAttempts,
|
|
4394
4397
|
};
|
|
4395
4398
|
};
|
|
4396
4399
|
|
|
4397
|
-
const VerifyPhoneDialog = JSX(({
|
|
4400
|
+
const VerifyPhoneDialog = JSX(({ title, description, __html, code = true, codeLength = 4, textButton = 'Далее', phoneNumber = '+79999999999', onSuccess = noop, onClose = noop, }) => {
|
|
4398
4401
|
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
4399
|
-
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted,
|
|
4402
|
+
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttempts, } = useVerifyPhoneDialogSubmit({ values, onSuccess });
|
|
4403
|
+
const captchaDialog = useDialog(CaptchaDialog);
|
|
4400
4404
|
const handleSendCode = useCallback(async () => {
|
|
4401
4405
|
const isSuccessSendCode = await sendCode({
|
|
4402
|
-
phoneNumber
|
|
4406
|
+
phoneNumber,
|
|
4403
4407
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
4404
4408
|
});
|
|
4405
4409
|
if (isSuccessSendCode) {
|
|
4406
|
-
|
|
4410
|
+
setAttempts(0);
|
|
4407
4411
|
setTimeNextReq(180);
|
|
4408
4412
|
setIsTimerStarted(true);
|
|
4409
4413
|
}
|
|
4410
4414
|
else {
|
|
4411
|
-
captchaDialog.open();
|
|
4415
|
+
captchaDialog.open({ phoneNumber, sendCode: handleSendCode, onClose });
|
|
4412
4416
|
}
|
|
4413
|
-
}, []);
|
|
4414
|
-
const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode: handleSendCode }, onClose);
|
|
4417
|
+
}, [phoneNumber, onClose]);
|
|
4415
4418
|
useEffect(() => {
|
|
4416
4419
|
handleSendCode();
|
|
4417
4420
|
}, []);
|
|
4418
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0", children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "XS", isEmbedded: true, as: "h6" }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$1(timeNextReq, setTimeNextReq, handleSendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
4421
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "XS", isEmbedded: true, as: "h6" }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$1(timeNextReq, setTimeNextReq, handleSendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
4419
4422
|
});
|
|
4420
4423
|
const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
|
|
4421
4424
|
const renderText$1 = (timeNextReq, setTimeNextReq, handleSendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-base ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: handleSendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
|
|
4422
4425
|
|
|
4423
|
-
const useVerifyPhoneDialog = () => {
|
|
4424
|
-
const { open, close } = useDialogManager();
|
|
4425
|
-
return {
|
|
4426
|
-
open: (handleClose, props) => open(jsx(VerifyPhoneDialog, { onClose: close, close: handleClose, ...props })),
|
|
4427
|
-
close,
|
|
4428
|
-
};
|
|
4429
|
-
};
|
|
4430
|
-
|
|
4431
4426
|
const defaultConsentText = {
|
|
4432
4427
|
title: 'Подпишите согласие на запрос в БКИ',
|
|
4433
4428
|
description: 'Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту',
|
|
@@ -4436,33 +4431,31 @@
|
|
|
4436
4431
|
title: 'Вы уверены, что хотите отказаться от запроса в БКИ',
|
|
4437
4432
|
description: 'Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения',
|
|
4438
4433
|
};
|
|
4439
|
-
const
|
|
4434
|
+
const ITEMS$1 = [
|
|
4435
|
+
{ id: 'SIGNED', text: 'Подписать' },
|
|
4436
|
+
{ id: 'REFUSE', text: 'Отказаться' },
|
|
4437
|
+
];
|
|
4438
|
+
const CONSENT_BKI_ID = 2;
|
|
4439
|
+
const ConsentBkiDialog = JSX(({ onSubmit = noop, onClose = noop }) => {
|
|
4440
4440
|
const [confirmStatus, setConfirmStatus] = useState('');
|
|
4441
|
-
const [
|
|
4442
|
-
const
|
|
4443
|
-
const
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
handleSubmit(confirmStatus);
|
|
4447
|
-
}, [confirmStatus]);
|
|
4441
|
+
const [showRefuseContent, setShowRefuseContent] = useState(false);
|
|
4442
|
+
const openDocument = useDocumentDialog(CONSENT_BKI_ID);
|
|
4443
|
+
const handleSubmit = useCallback(() => {
|
|
4444
|
+
onSubmit(confirmStatus);
|
|
4445
|
+
}, [onSubmit, confirmStatus]);
|
|
4448
4446
|
const handleConfirmChange = useCallback((value) => {
|
|
4449
4447
|
setConfirmStatus(value);
|
|
4450
4448
|
if (value === 'REFUSE') {
|
|
4451
|
-
|
|
4449
|
+
setShowRefuseContent(true);
|
|
4452
4450
|
}
|
|
4453
4451
|
}, []);
|
|
4454
|
-
const consentText =
|
|
4455
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx("div", { role: "button", onClick:
|
|
4452
|
+
const consentText = showRefuseContent ? refuseConsentText : defaultConsentText;
|
|
4453
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx("div", { role: "button", onClick: openDocument, children: jsx(Heading, { className: "text-center text-balance", headingType: "h2", title: consentText.title }) }), jsx(Paragraph, { align: "text-center", children: consentText.description }), jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: ITEMS$1, value: confirmStatus, onChange: handleConfirmChange }), jsx(Button, { disabled: !confirmStatus, type: "button", onClick: handleSubmit, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" })] }) }));
|
|
4456
4454
|
});
|
|
4457
|
-
const ITEMS$1 = [
|
|
4458
|
-
{ id: 'SIGNED', text: 'Подписать' },
|
|
4459
|
-
{ id: 'REFUSE', text: 'Отказаться' },
|
|
4460
|
-
];
|
|
4461
|
-
const CONSENT_BKI_ID = 2;
|
|
4462
4455
|
|
|
4463
4456
|
const useConsentBkiDialog = (onClose) => {
|
|
4464
|
-
const { open
|
|
4465
|
-
const verifyPhoneDialog =
|
|
4457
|
+
const { open } = useDialog(ConsentBkiDialog);
|
|
4458
|
+
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
4466
4459
|
const handleSuccessVerify = (profileId) => async (smsCode) => {
|
|
4467
4460
|
try {
|
|
4468
4461
|
if (profileId) {
|
|
@@ -4481,16 +4474,18 @@
|
|
|
4481
4474
|
}
|
|
4482
4475
|
};
|
|
4483
4476
|
const handleSubmitBkiConstent = (phone, profileId) => async (confirmStatus) => {
|
|
4484
|
-
close();
|
|
4485
4477
|
if (confirmStatus === 'SIGNED' && phone) {
|
|
4486
|
-
verifyPhoneDialog.open(
|
|
4478
|
+
verifyPhoneDialog.open({
|
|
4479
|
+
...verifyPhoneContent$1(phone),
|
|
4480
|
+
onSuccess: handleSuccessVerify(profileId),
|
|
4481
|
+
});
|
|
4487
4482
|
}
|
|
4488
4483
|
else {
|
|
4489
4484
|
onClose();
|
|
4490
4485
|
}
|
|
4491
4486
|
};
|
|
4492
4487
|
return {
|
|
4493
|
-
open: (phone, profileId) => open(
|
|
4488
|
+
open: (phone, profileId) => open({ onSubmit: handleSubmitBkiConstent(phone, profileId), onClose }),
|
|
4494
4489
|
};
|
|
4495
4490
|
};
|
|
4496
4491
|
const verifyPhoneContent$1 = (phone) => ({
|
|
@@ -4504,30 +4499,25 @@
|
|
|
4504
4499
|
|
|
4505
4500
|
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
4506
4501
|
|
|
4507
|
-
const EsiaLoginDialog = JSX(
|
|
4502
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
4508
4503
|
const navigator = locationNavigator();
|
|
4509
4504
|
const handleAuth = useCallback(async () => {
|
|
4510
4505
|
const resp = await getLink({
|
|
4511
4506
|
redirectUri: navigator.href,
|
|
4512
4507
|
});
|
|
4513
|
-
if (resp) {
|
|
4508
|
+
if (resp?.link) {
|
|
4514
4509
|
navigator.assign(resp.link);
|
|
4515
4510
|
}
|
|
4516
4511
|
}, []);
|
|
4517
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose:
|
|
4512
|
+
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full", children: [jsxs("ul", { className: "list-disc", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "flex items-center justify-between w-full m-0", children: [jsx(Button, { type: "button", onClick: handleAuth, children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: onClose, children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
|
|
4518
4513
|
});
|
|
4519
4514
|
|
|
4520
4515
|
const useEsiaLoginDialog = (nextStepLink) => {
|
|
4521
|
-
const { open
|
|
4516
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
4522
4517
|
const navigator = locationNavigator();
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
}, []);
|
|
4527
|
-
return {
|
|
4528
|
-
open: (options = {}) => open(jsx(EsiaLoginDialog, { handleClose: handleClose }), options),
|
|
4529
|
-
close,
|
|
4530
|
-
};
|
|
4518
|
+
return useCallback(() => {
|
|
4519
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
4520
|
+
}, [open, nextStepLink]);
|
|
4531
4521
|
};
|
|
4532
4522
|
|
|
4533
4523
|
const fieldsNamesToContactKeysMap = {
|
|
@@ -4635,9 +4625,9 @@
|
|
|
4635
4625
|
const [, setProfileId] = useLocalStorage('profileId');
|
|
4636
4626
|
const [, setParticipantId] = useLocalStorage('participantId');
|
|
4637
4627
|
const [, setProgramId] = useLocalStorage('programId');
|
|
4638
|
-
const
|
|
4639
|
-
const consentBkiDialog = useConsentBkiDialog(
|
|
4640
|
-
const verifyPhoneDialog =
|
|
4628
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
4629
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
4630
|
+
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
4641
4631
|
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber }) => {
|
|
4642
4632
|
setParticipantId(participantId);
|
|
4643
4633
|
setTaskId(taskId);
|
|
@@ -4648,7 +4638,7 @@
|
|
|
4648
4638
|
const handleSubmit = useCallback(async (formData) => {
|
|
4649
4639
|
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
4650
4640
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
4651
|
-
return
|
|
4641
|
+
return;
|
|
4652
4642
|
}
|
|
4653
4643
|
try {
|
|
4654
4644
|
const profileId = await createUserProfile({
|
|
@@ -4674,7 +4664,10 @@
|
|
|
4674
4664
|
const acceptedConsents = Object.keys(CONSENTS)
|
|
4675
4665
|
.filter((_) => formData[_])
|
|
4676
4666
|
.map((_) => CONSENTS[_]?.text);
|
|
4677
|
-
verifyPhoneDialog.open(
|
|
4667
|
+
verifyPhoneDialog.open({
|
|
4668
|
+
...verifyPhoneContent(formData?.phone, acceptedConsents),
|
|
4669
|
+
onSuccess: handleSuccessVerify,
|
|
4670
|
+
});
|
|
4678
4671
|
}
|
|
4679
4672
|
}
|
|
4680
4673
|
catch {
|
|
@@ -4778,32 +4771,36 @@
|
|
|
4778
4771
|
|
|
4779
4772
|
const useInitApplicationLead = (nextStepLink) => {
|
|
4780
4773
|
const navigator = locationNavigator();
|
|
4781
|
-
const [isLoading,
|
|
4782
|
-
const [
|
|
4783
|
-
const
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
const state = params.get('state');
|
|
4787
|
-
const updateEsiaProfile = useCallback(async () => {
|
|
4788
|
-
if (profileId && code && state) {
|
|
4774
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
4775
|
+
const [, setLeadForm] = useLocalStorage('leadForm');
|
|
4776
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
4777
|
+
startLoading();
|
|
4778
|
+
try {
|
|
4789
4779
|
const data = await updateProfileEsia({
|
|
4790
|
-
profileId
|
|
4780
|
+
profileId,
|
|
4791
4781
|
code,
|
|
4792
4782
|
state,
|
|
4793
|
-
redirectUri:
|
|
4783
|
+
redirectUri: globalThis.location?.href,
|
|
4794
4784
|
});
|
|
4795
|
-
data
|
|
4796
|
-
setLeadForm({
|
|
4797
|
-
...
|
|
4785
|
+
if (data) {
|
|
4786
|
+
setLeadForm((_) => ({
|
|
4787
|
+
..._,
|
|
4798
4788
|
...parseEsiaProfile(data),
|
|
4799
|
-
});
|
|
4789
|
+
}));
|
|
4790
|
+
}
|
|
4800
4791
|
navigator.assign(nextStepLink);
|
|
4801
4792
|
}
|
|
4802
|
-
|
|
4793
|
+
finally {
|
|
4794
|
+
endLoading();
|
|
4795
|
+
}
|
|
4796
|
+
}, [nextStepLink]);
|
|
4803
4797
|
useEffect(() => {
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4798
|
+
const profileId = JSON.parse(globalThis.localStorage?.getItem('profileId') ?? 'null');
|
|
4799
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
4800
|
+
const code = params.get('code');
|
|
4801
|
+
const state = params.get('state');
|
|
4802
|
+
if (profileId && code && state) {
|
|
4803
|
+
updateEsiaProfile(profileId, code, state);
|
|
4807
4804
|
}
|
|
4808
4805
|
else {
|
|
4809
4806
|
sessionStorage.removeItem('accessToken');
|
|
@@ -4817,7 +4814,6 @@
|
|
|
4817
4814
|
|
|
4818
4815
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
|
|
4819
4816
|
const inputs = (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
4820
|
-
const [responseType, setResponseType] = useState('');
|
|
4821
4817
|
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
4822
4818
|
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
4823
4819
|
const initialFormState = getInitialFormState$2(inputs, leadForm);
|
|
@@ -4827,17 +4823,13 @@
|
|
|
4827
4823
|
nextStepLink,
|
|
4828
4824
|
saveForm: setLeadForm,
|
|
4829
4825
|
});
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
responseTypeDialog.open();
|
|
4833
|
-
}
|
|
4834
|
-
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4826
|
+
const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4827
|
+
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
4835
4828
|
useEffect(() => {
|
|
4836
|
-
if (
|
|
4837
|
-
|
|
4838
|
-
reset();
|
|
4829
|
+
if (responseStatus) {
|
|
4830
|
+
responseTypeDialog.open({ responseType: responseStatus });
|
|
4839
4831
|
}
|
|
4840
|
-
}, [
|
|
4832
|
+
}, [responseStatus]);
|
|
4841
4833
|
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$2({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
4842
4834
|
});
|
|
4843
4835
|
|
|
@@ -6502,7 +6494,6 @@
|
|
|
6502
6494
|
});
|
|
6503
6495
|
const checkIsRetiree$1 = (step, getValue) => step === 2 && getValue('employment')?.key === 'RETIREE';
|
|
6504
6496
|
const checkBusinessOwner$1 = ({ name }, getValue) => name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
|
|
6505
|
-
const checkConsentPfrFlg$1 = ({ name }, getValue) => name === 'snils' && !getValue('consentPfrFlg');
|
|
6506
6497
|
const checkAddressFillFromESIA$1 = ({ name, filledByEsia }, getValue) => name?.startsWith('address') && getValue('esiaAccountTypeCd')?.key && filledByEsia;
|
|
6507
6498
|
const checkAddressFact$1 = ({ name }, getValue) => name === 'addressFact' && getValue('addressMatch');
|
|
6508
6499
|
const checkCondition$1 = ({ condition }, getValue) => condition?.name &&
|
|
@@ -6510,6 +6501,8 @@
|
|
|
6510
6501
|
const dataValue = getValue(condition?.name);
|
|
6511
6502
|
return _ !== (dataValue?.key ?? dataValue);
|
|
6512
6503
|
});
|
|
6504
|
+
const checkConsentPfrFlg$1 = ({ name }, getValue) => name === 'snils' && isSnilsRequired$1(getValue);
|
|
6505
|
+
const isSnilsRequired$1 = (getValue) => getValue('confirmationIncome')?.key !== 'PFR_CERTIFICATE';
|
|
6513
6506
|
|
|
6514
6507
|
const renderInfo$2 = (inputs = []) => {
|
|
6515
6508
|
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
@@ -6529,10 +6522,20 @@
|
|
|
6529
6522
|
|
|
6530
6523
|
const StepsNavigationButtons$1 = JSX(({ step, onPrevStep }) => {
|
|
6531
6524
|
const isFirstStep = step === 0;
|
|
6532
|
-
const isFinalStep = step ===
|
|
6525
|
+
const isFinalStep = step === 5;
|
|
6533
6526
|
return (jsxs("div", { className: "flex justify-between gap-m", children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { type: "submit", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
6534
6527
|
});
|
|
6535
6528
|
|
|
6529
|
+
const getCardData = (formData) => {
|
|
6530
|
+
const { currency, paymentSystem, cardCategory, codeWord } = formData;
|
|
6531
|
+
return {
|
|
6532
|
+
currencyCode: currency,
|
|
6533
|
+
paymentSystemTypeCd: paymentSystem,
|
|
6534
|
+
classCard: cardCategory,
|
|
6535
|
+
codeWord: codeWord,
|
|
6536
|
+
};
|
|
6537
|
+
};
|
|
6538
|
+
|
|
6536
6539
|
const getFifthStepData$1 = (formData) => {
|
|
6537
6540
|
const { bankruptcyFlg, shareholderFlg, legalEntityName, creditInRshbCd } = formData;
|
|
6538
6541
|
return {
|
|
@@ -6543,16 +6546,6 @@
|
|
|
6543
6546
|
};
|
|
6544
6547
|
};
|
|
6545
6548
|
|
|
6546
|
-
const getFirstStepData$1 = (formData) => {
|
|
6547
|
-
const { currency, paymentSystem, cardCategory, codeWord } = formData;
|
|
6548
|
-
return {
|
|
6549
|
-
currencyCode: currency,
|
|
6550
|
-
paymentSystemTypeCd: paymentSystem,
|
|
6551
|
-
classCard: cardCategory,
|
|
6552
|
-
codeWord: codeWord,
|
|
6553
|
-
};
|
|
6554
|
-
};
|
|
6555
|
-
|
|
6556
6549
|
const getFourthStepData$1 = (formData) => {
|
|
6557
6550
|
const { familyStatus, dependents, familyMembers, children, wages, mandatoryPayments, incomeAverage, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
6558
6551
|
return {
|
|
@@ -6681,6 +6674,7 @@
|
|
|
6681
6674
|
...getCurrentStepData$1(step, formData),
|
|
6682
6675
|
},
|
|
6683
6676
|
],
|
|
6677
|
+
...getCardData(formData),
|
|
6684
6678
|
...getDeliveryData(formData),
|
|
6685
6679
|
},
|
|
6686
6680
|
};
|
|
@@ -6688,7 +6682,7 @@
|
|
|
6688
6682
|
const getCurrentStepData$1 = (step, formData) => {
|
|
6689
6683
|
switch (step) {
|
|
6690
6684
|
case 0:
|
|
6691
|
-
return
|
|
6685
|
+
return {};
|
|
6692
6686
|
case 1:
|
|
6693
6687
|
return getSecondStepData$1(formData);
|
|
6694
6688
|
case 2:
|
|
@@ -6790,8 +6784,8 @@
|
|
|
6790
6784
|
{ fieldType: 'common', name: 'middleName', dadata: true, filledByEsia: true },
|
|
6791
6785
|
{ fieldType: 'common', name: 'sex', required: true },
|
|
6792
6786
|
{ fieldType: 'common', name: 'limitedBirthday', required: true, filledByEsia: true },
|
|
6793
|
-
{ fieldType: 'common', name: 'birthPlace', required: true },
|
|
6794
|
-
{ fieldType: 'common', name: 'phone', required: true },
|
|
6787
|
+
{ fieldType: 'common', name: 'birthPlace', required: true, filledByEsia: true },
|
|
6788
|
+
{ fieldType: 'common', name: 'phone', required: true, filledByEsia: true },
|
|
6795
6789
|
{ fieldType: 'common', name: 'email', required: true, dadata: true },
|
|
6796
6790
|
],
|
|
6797
6791
|
},
|
|
@@ -6875,7 +6869,7 @@
|
|
|
6875
6869
|
},
|
|
6876
6870
|
{
|
|
6877
6871
|
inputs: [
|
|
6878
|
-
{ fieldType: 'common', name: 'employment' },
|
|
6872
|
+
{ fieldType: 'common', name: 'employment', required: true },
|
|
6879
6873
|
{ fieldType: 'common', name: 'organizationName', required: true, dadata: true },
|
|
6880
6874
|
],
|
|
6881
6875
|
},
|
|
@@ -6888,15 +6882,15 @@
|
|
|
6888
6882
|
},
|
|
6889
6883
|
{
|
|
6890
6884
|
inputs: [
|
|
6891
|
-
{ fieldType: 'common', name: 'organization', required:
|
|
6892
|
-
{ fieldType: 'common', name: 'amountWorkers', required:
|
|
6885
|
+
{ fieldType: 'common', name: 'organization', required: true },
|
|
6886
|
+
{ fieldType: 'common', name: 'amountWorkers', required: true },
|
|
6893
6887
|
],
|
|
6894
6888
|
},
|
|
6895
6889
|
{
|
|
6896
6890
|
columns: 2,
|
|
6897
6891
|
inputs: [
|
|
6898
|
-
{ fieldType: 'common', name: 'employerActivities', required:
|
|
6899
|
-
{ fieldType: 'common', name: 'employerOrganization', required:
|
|
6892
|
+
{ fieldType: 'common', name: 'employerActivities', required: true },
|
|
6893
|
+
{ fieldType: 'common', name: 'employerOrganization', required: true },
|
|
6900
6894
|
{ fieldType: 'common', name: 'generalSeniority', required: true },
|
|
6901
6895
|
{ fieldType: 'common', name: 'lastJobExperience', required: true },
|
|
6902
6896
|
{ fieldType: 'common', name: 'experience5Years', required: true },
|
|
@@ -6917,7 +6911,7 @@
|
|
|
6917
6911
|
{
|
|
6918
6912
|
columns: 2,
|
|
6919
6913
|
inputs: [
|
|
6920
|
-
{ fieldType: 'common', name: 'positionOrganization', required:
|
|
6914
|
+
{ fieldType: 'common', name: 'positionOrganization', required: true },
|
|
6921
6915
|
{
|
|
6922
6916
|
fieldType: 'common',
|
|
6923
6917
|
name: 'partInBusiness',
|
|
@@ -6964,6 +6958,10 @@
|
|
|
6964
6958
|
},
|
|
6965
6959
|
],
|
|
6966
6960
|
},
|
|
6961
|
+
{
|
|
6962
|
+
columns: 1,
|
|
6963
|
+
inputs: [{ fieldType: 'common', name: 'confirmationIncome', required: true }],
|
|
6964
|
+
},
|
|
6967
6965
|
{
|
|
6968
6966
|
columns: 1,
|
|
6969
6967
|
inputs: [{ fieldType: 'common', name: 'wages', required: true }],
|
|
@@ -7001,7 +6999,12 @@
|
|
|
7001
6999
|
inputs: [{ fieldType: 'common', name: 'shareholderFlg' }],
|
|
7002
7000
|
},
|
|
7003
7001
|
{
|
|
7004
|
-
inputs: [
|
|
7002
|
+
inputs: [
|
|
7003
|
+
{
|
|
7004
|
+
fieldType: 'common',
|
|
7005
|
+
name: 'legalEntityName',
|
|
7006
|
+
},
|
|
7007
|
+
],
|
|
7005
7008
|
},
|
|
7006
7009
|
{
|
|
7007
7010
|
inputs: [{ fieldType: 'common', name: 'creditInRshbCd' }],
|
|
@@ -7374,7 +7377,6 @@
|
|
|
7374
7377
|
});
|
|
7375
7378
|
const checkIsRetiree = (step, getValue) => step === 2 && getValue('employment')?.key === 'RETIREE';
|
|
7376
7379
|
const checkBusinessOwner = ({ name }, getValue) => name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
|
|
7377
|
-
const checkConsentPfrFlg = ({ name }, getValue) => name === 'snils' && isSnilsRequired(getValue);
|
|
7378
7380
|
const checkAddressFillFromESIA = ({ name, filledByEsia }, getValue) => name?.startsWith('address') && getValue('esiaAccountTypeCd')?.key && filledByEsia;
|
|
7379
7381
|
const checkAddressFact = ({ name }, getValue) => name === 'addressFact' && getValue('addressMatch');
|
|
7380
7382
|
const checkCondition = ({ condition }, getValue) => condition?.name &&
|
|
@@ -7382,6 +7384,7 @@
|
|
|
7382
7384
|
const dataValue = getValue(condition?.name);
|
|
7383
7385
|
return _ !== (dataValue?.key ?? dataValue);
|
|
7384
7386
|
});
|
|
7387
|
+
const checkConsentPfrFlg = ({ name }, getValue) => name === 'snils' && isSnilsRequired(getValue);
|
|
7385
7388
|
const isSnilsRequired = (getValue) => getValue('confirmationIncome')?.key !== 'PFR_CERTIFICATE';
|
|
7386
7389
|
|
|
7387
7390
|
const renderInfo$1 = (inputs = []) => {
|
|
@@ -7737,7 +7740,7 @@
|
|
|
7737
7740
|
},
|
|
7738
7741
|
{
|
|
7739
7742
|
inputs: [
|
|
7740
|
-
{ fieldType: 'common', name: 'employment' },
|
|
7743
|
+
{ fieldType: 'common', name: 'employment', required: true },
|
|
7741
7744
|
{ fieldType: 'common', name: 'organizationName', required: true, dadata: true },
|
|
7742
7745
|
],
|
|
7743
7746
|
},
|
|
@@ -7750,15 +7753,15 @@
|
|
|
7750
7753
|
},
|
|
7751
7754
|
{
|
|
7752
7755
|
inputs: [
|
|
7753
|
-
{ fieldType: 'common', name: 'organization', required:
|
|
7754
|
-
{ fieldType: 'common', name: 'amountWorkers', required:
|
|
7756
|
+
{ fieldType: 'common', name: 'organization', required: true },
|
|
7757
|
+
{ fieldType: 'common', name: 'amountWorkers', required: true },
|
|
7755
7758
|
],
|
|
7756
7759
|
},
|
|
7757
7760
|
{
|
|
7758
7761
|
columns: 2,
|
|
7759
7762
|
inputs: [
|
|
7760
|
-
{ fieldType: 'common', name: 'employerActivities', required:
|
|
7761
|
-
{ fieldType: 'common', name: 'employerOrganization', required:
|
|
7763
|
+
{ fieldType: 'common', name: 'employerActivities', required: true },
|
|
7764
|
+
{ fieldType: 'common', name: 'employerOrganization', required: true },
|
|
7762
7765
|
{ fieldType: 'common', name: 'generalSeniority', required: true },
|
|
7763
7766
|
{ fieldType: 'common', name: 'lastJobExperience', required: true },
|
|
7764
7767
|
{ fieldType: 'common', name: 'experience5Years', required: true },
|
|
@@ -7779,7 +7782,7 @@
|
|
|
7779
7782
|
{
|
|
7780
7783
|
columns: 2,
|
|
7781
7784
|
inputs: [
|
|
7782
|
-
{ fieldType: 'common', name: 'positionOrganization', required:
|
|
7785
|
+
{ fieldType: 'common', name: 'positionOrganization', required: true },
|
|
7783
7786
|
{
|
|
7784
7787
|
fieldType: 'common',
|
|
7785
7788
|
name: 'partInBusiness',
|
|
@@ -8648,14 +8651,14 @@
|
|
|
8648
8651
|
};
|
|
8649
8652
|
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
|
|
8650
8653
|
|
|
8651
|
-
const SearchDialog = JSX(({ initialQuery, navigationItems }) => {
|
|
8654
|
+
const SearchDialog = JSX(({ initialQuery, navigationItems, onClose }) => {
|
|
8652
8655
|
const basePathList = useMemo(() => navigationItems?.map((_) => _.href || '/'), [navigationItems]);
|
|
8653
8656
|
const [searchResult, searchInputProps] = useSearch({
|
|
8654
8657
|
basePathList,
|
|
8655
8658
|
initialQuery,
|
|
8656
8659
|
});
|
|
8657
8660
|
const searchItems = useMemo(() => combineTopItemsAndSearchResult(navigationItems)(searchResult), [navigationItems, searchResult]);
|
|
8658
|
-
return (jsx(Dialog, { head: jsx(SearchInput, { autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { navigationItems: searchItems }) }));
|
|
8661
|
+
return (jsx(Dialog, { head: jsx(SearchInput, { autoFocus: true, ...searchInputProps }), onClose: onClose, children: jsx(Sitemap, { navigationItems: searchItems }) }));
|
|
8659
8662
|
});
|
|
8660
8663
|
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
8661
8664
|
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
@@ -8664,23 +8667,15 @@
|
|
|
8664
8667
|
}))
|
|
8665
8668
|
: [];
|
|
8666
8669
|
|
|
8667
|
-
const useSearchDialog = (initialProps = {}) => {
|
|
8668
|
-
const { open, close } = useDialogManager();
|
|
8669
|
-
return {
|
|
8670
|
-
open: (props = {}, options = {}) => open(jsx(SearchDialog, { ...initialProps, ...props }), options),
|
|
8671
|
-
close,
|
|
8672
|
-
};
|
|
8673
|
-
};
|
|
8674
|
-
|
|
8675
8670
|
const MIN_QUERY_LEN = 3;
|
|
8676
8671
|
const SearchBar$1 = JSX(({ className, search, ...rest }) => {
|
|
8677
8672
|
const [value, setValue] = useState('');
|
|
8678
8673
|
const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
|
|
8679
|
-
const searchDialog =
|
|
8674
|
+
const searchDialog = useDialog(SearchDialog, rest);
|
|
8680
8675
|
const handleInitialInputChange = useCallback((_) => {
|
|
8681
8676
|
setValue(_);
|
|
8682
8677
|
if (isQueryLongEnough(_)) {
|
|
8683
|
-
searchDialog.open({ initialQuery: _
|
|
8678
|
+
searchDialog.open({ initialQuery: _, onClose: resetQueryOnDialogClose });
|
|
8684
8679
|
}
|
|
8685
8680
|
}, [resetQueryOnDialogClose, searchDialog]);
|
|
8686
8681
|
return (jsxs("div", { className: style('relative', className), role: "search", children: [jsx(SearchInput, { value: value, placeholder: search?.placeholder, onChange: handleInitialInputChange }), jsx(CloseButton, { className: "absolute top-0 right-0 sm:hidden", onClose: resetQueryOnDialogClose })] }));
|
|
@@ -8928,18 +8923,17 @@
|
|
|
8928
8923
|
});
|
|
8929
8924
|
|
|
8930
8925
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
8931
|
-
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
8926
|
+
const LocationDialog = JSX(({ foreignOffices, branches, onClose }) => {
|
|
8932
8927
|
const locationStore = useDefaultLocation(branches?.default);
|
|
8933
8928
|
const [query, setQuery] = useState('');
|
|
8934
8929
|
const rawRegions = useRegions();
|
|
8935
8930
|
const regions = useMemo(() => cleanUpRegions(rawRegions).sort((a, b) => a.name.localeCompare(b.name)), [rawRegions]);
|
|
8936
8931
|
const regionsGroupByLetter = useMemo(() => groupBy(regions, regionFirstLetter), [regions]);
|
|
8937
|
-
const { close } = useDialogManager();
|
|
8938
8932
|
const handleChangeLocation = useCallback((_) => {
|
|
8939
8933
|
locationStore.location = _;
|
|
8940
|
-
|
|
8941
|
-
}, [locationStore]);
|
|
8942
|
-
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), jsx(SelectedLocation, { defaultLocation: branches?.default }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
8934
|
+
onClose?.();
|
|
8935
|
+
}, [locationStore, onClose]);
|
|
8936
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), jsx(SelectedLocation, { defaultLocation: branches?.default }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), onClose: onClose, children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
8943
8937
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
8944
8938
|
.map(renderRegion(branches?.dataSelect, handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-3 md:columns-4 lg:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation, branches?.dataSelect)) })), renderForeignOffices(foreignOffices)] }));
|
|
8945
8939
|
});
|
|
@@ -8949,14 +8943,6 @@
|
|
|
8949
8943
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() ?? '',
|
|
8950
8944
|
}));
|
|
8951
8945
|
|
|
8952
|
-
const useLocationDialog = (props) => {
|
|
8953
|
-
const { open, close } = useDialogManager();
|
|
8954
|
-
return {
|
|
8955
|
-
open: (options = {}) => open(jsx(LocationDialog, { ...props }), options),
|
|
8956
|
-
close,
|
|
8957
|
-
};
|
|
8958
|
-
};
|
|
8959
|
-
|
|
8960
8946
|
const TopItem = JSX(({ className = '', active, flat, children, data, ...rest }) => {
|
|
8961
8947
|
const link = useLink();
|
|
8962
8948
|
const { href, target, text, onClick } = link(rest);
|
|
@@ -8975,10 +8961,10 @@
|
|
|
8975
8961
|
const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
|
|
8976
8962
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
8977
8963
|
const currentLocation = useLocation(rest?.branches?.default);
|
|
8978
|
-
const searchDialog =
|
|
8979
|
-
const locationDialog =
|
|
8980
|
-
const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
|
|
8981
|
-
const openLocationDialog = useCallback(() => locationDialog.open(), [locationDialog]);
|
|
8964
|
+
const searchDialog = useDialog(SearchDialog, rest);
|
|
8965
|
+
const locationDialog = useDialog(LocationDialog, rest);
|
|
8966
|
+
const openSearchDialog = useCallback(() => searchDialog.open({}), [searchDialog]);
|
|
8967
|
+
const openLocationDialog = useCallback(() => locationDialog.open({}), [locationDialog]);
|
|
8982
8968
|
return (jsxs("div", { className: style('flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg', className), role: "navigation", children: [rest?.branches?.visible ? (jsx(TopItem, { className: "whitespace-nowrap text-ellipsis overflow-hidden", flat: true, href: "#", text: currentLocation?.name, data: getAspectsWithInclude(rest?.branches?.dataClick, currentLocation?.name ?? ''), onClick: openLocationDialog })) : null, rest?.officesAtms?.href ? (jsx(TopItem, { className: "whitespace-nowrap", flat: true, ...rest.officesAtms })) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: rest?.search?.ariaLabel ?? 'Поиск', onClick: openSearchDialog, data: rest?.search?.data })] }));
|
|
8983
8969
|
});
|
|
8984
8970
|
|
|
@@ -9241,31 +9227,16 @@
|
|
|
9241
9227
|
return docFormat.includes('/') ? docFormat.replace(regexp, '') : docFormat;
|
|
9242
9228
|
};
|
|
9243
9229
|
|
|
9244
|
-
const ReportDialog = JSX(({ href, __html, target }) => {
|
|
9245
|
-
const { close } = useDialogManager();
|
|
9230
|
+
const ReportDialog = JSX(({ href, __html, target, onClose }) => {
|
|
9246
9231
|
const router = useRouter();
|
|
9247
9232
|
const adjustedHref = adjustHref(router)(href);
|
|
9248
|
-
|
|
9249
|
-
close();
|
|
9250
|
-
}, []);
|
|
9251
|
-
return (jsxs(Dialog, { className: "my-6xl min-h-fit w-fit mx-auto", children: [__html ? jsx(RichText, { __html: __html }) : null, jsxs("div", { className: "flex flex-row mx-auto w-fit gap-lg py-lg", children: [jsx(LinkButton, { text: "\u042F \u0441\u043E\u0433\u043B\u0430\u0441\u0435\u043D", version: "primary", target: target, href: adjustedHref, onClick: handleClose }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, children: "\u042F \u043D\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0435\u043D" })] }), jsx("div", { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u00AB\u042F \u0421\u041E\u0413\u041B\u0410\u0421\u0415\u041D\u00BB \u043D\u0438\u0436\u0435 \u0412\u044B \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F. \u0420\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u0438\u043B\u0438 \u0440\u0430\u0441\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u044E\u0431\u043E\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043D\u043D\u043E\u0433\u043E \u0417\u0430\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u043B\u044E\u0431\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438, \u0438\u043B\u0438 \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u0438 \u0432 \u043D\u0435\u043C \u0437\u0430\u043F\u0440\u0435\u0449\u0435\u043D\u043E.\u00BB" })] }));
|
|
9233
|
+
return (jsxs(Dialog, { className: "my-6xl min-h-fit w-fit mx-auto", onClose: onClose, children: [__html ? jsx(RichText, { __html: __html }) : null, jsxs("div", { className: "flex flex-row mx-auto w-fit gap-lg py-lg", children: [jsx(LinkButton, { text: "\u042F \u0441\u043E\u0433\u043B\u0430\u0441\u0435\u043D", version: "primary", target: target, href: adjustedHref, onClick: onClose }), jsx(Button, { type: "button", version: "secondary", onClick: onClose, children: "\u042F \u043D\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0435\u043D" })] }), jsx("div", { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u00AB\u042F \u0421\u041E\u0413\u041B\u0410\u0421\u0415\u041D\u00BB \u043D\u0438\u0436\u0435 \u0412\u044B \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F. \u0420\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u0438\u043B\u0438 \u0440\u0430\u0441\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u044E\u0431\u043E\u0439 \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043D\u043D\u043E\u0433\u043E \u0417\u0430\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u043B\u044E\u0431\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438, \u0438\u043B\u0438 \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u0438 \u0432 \u043D\u0435\u043C \u0437\u0430\u043F\u0440\u0435\u0449\u0435\u043D\u043E.\u00BB" })] }));
|
|
9252
9234
|
});
|
|
9253
9235
|
|
|
9254
|
-
const useReportDialog = (props) => {
|
|
9255
|
-
const { open, close } = useDialogManager();
|
|
9256
|
-
return {
|
|
9257
|
-
open: (options = {}) => open(jsx(ReportDialog, { ...props }), options),
|
|
9258
|
-
close,
|
|
9259
|
-
};
|
|
9260
|
-
};
|
|
9261
|
-
|
|
9262
9236
|
const ReportDialogButton = JSX(({ text, href, target, __html, icon }) => {
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
}
|
|
9266
|
-
const reportDialog = useReportDialog({ __html, href, target });
|
|
9267
|
-
const openReportDialog = useCallback(() => reportDialog.open(), [reportDialog]);
|
|
9268
|
-
return (jsxs("button", { className: "flex gap-s text-primary-text no-underline hover:text-primary-main", onClick: openReportDialog, children: [renderImg(icon), jsx(Text, { font: "font-light", children: text })] }));
|
|
9237
|
+
const { open } = useDialog(ReportDialog);
|
|
9238
|
+
const openReportDialog = useCallback(() => open({ __html, href, target }), [__html, href, target]);
|
|
9239
|
+
return text ? (jsxs("button", { className: "flex gap-s text-primary-text no-underline hover:text-primary-main", onClick: openReportDialog, children: [renderImg(icon), jsx(Text, { font: "font-light", children: text })] })) : null;
|
|
9269
9240
|
});
|
|
9270
9241
|
|
|
9271
9242
|
const linkColumnsModeStyleMap = {
|
|
@@ -10281,6 +10252,25 @@
|
|
|
10281
10252
|
return opened && __html ? (jsx("div", { className: "container fixed left-0 right-0 bottom-0 z-50", role: "dialog", children: jsxs("div", { className: "bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black", children: [jsx("div", { className: "sm:flex-1", children: jsx(RichText, { __html: __html }) }), jsx("div", { className: "ml-s sm:ml-0 w-36 flex justify-end", children: jsx(CloseButton, { className: "bg-main-gray rounded-md w-11 h-11", onClose: handleClose }) })] }) })) : null;
|
|
10282
10253
|
});
|
|
10283
10254
|
|
|
10255
|
+
function useOnEscape(handler) {
|
|
10256
|
+
const escapeHandler = useCallback(({ key }) => {
|
|
10257
|
+
if (key === 'Escape') {
|
|
10258
|
+
handler();
|
|
10259
|
+
}
|
|
10260
|
+
}, [handler]);
|
|
10261
|
+
useEventListener(globalThis.document, 'keydown', escapeHandler);
|
|
10262
|
+
}
|
|
10263
|
+
|
|
10264
|
+
function useObservableWithActions(eventBus, type, handlersMap) {
|
|
10265
|
+
useEffect(() => eventBus.subscribe(type, action => {
|
|
10266
|
+
const actionType = action?.type;
|
|
10267
|
+
if (actionType && typeof actionType === 'string') {
|
|
10268
|
+
const handler = handlersMap[actionType];
|
|
10269
|
+
handler && handler(action);
|
|
10270
|
+
}
|
|
10271
|
+
}), [eventBus, type, ...Object.values(handlersMap)]);
|
|
10272
|
+
}
|
|
10273
|
+
|
|
10284
10274
|
function useList(initialList = []) {
|
|
10285
10275
|
const [list, setList] = useState(initialList);
|
|
10286
10276
|
const push = useCallback((item) => setList(_ => [..._, item]), []);
|
|
@@ -10290,72 +10280,30 @@
|
|
|
10290
10280
|
return [list, { setList, push, pop, remove, clear }];
|
|
10291
10281
|
}
|
|
10292
10282
|
|
|
10293
|
-
|
|
10294
|
-
throw new Error(x);
|
|
10295
|
-
}
|
|
10296
|
-
|
|
10297
|
-
const useDialogsList = ({ onCloseAll, onClose, } = {}) => {
|
|
10283
|
+
const useDialogsList = () => {
|
|
10298
10284
|
const [dialogs, { push, pop, clear }] = useList();
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
pop();
|
|
10306
|
-
}, [dialogs, onClose]);
|
|
10307
|
-
useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
|
|
10308
|
-
if (!action) {
|
|
10309
|
-
return;
|
|
10310
|
-
}
|
|
10311
|
-
switch (action.type) {
|
|
10312
|
-
case 'open':
|
|
10313
|
-
push(action);
|
|
10314
|
-
break;
|
|
10315
|
-
case 'close':
|
|
10316
|
-
if (action.all) {
|
|
10317
|
-
closeAll();
|
|
10318
|
-
}
|
|
10319
|
-
else {
|
|
10320
|
-
close();
|
|
10321
|
-
}
|
|
10322
|
-
break;
|
|
10323
|
-
default:
|
|
10324
|
-
assertUnreachable(action);
|
|
10325
|
-
}
|
|
10326
|
-
}), [closeAll, close]);
|
|
10327
|
-
return dialogs;
|
|
10285
|
+
useObservableWithActions(defaultEventBus.observable, 'dialog', {
|
|
10286
|
+
open: push,
|
|
10287
|
+
close: pop,
|
|
10288
|
+
closeAll: clear,
|
|
10289
|
+
});
|
|
10290
|
+
return [dialogs, { close: pop, closeAll: clear }];
|
|
10328
10291
|
};
|
|
10329
10292
|
|
|
10330
10293
|
const DialogManager = JSX(() => {
|
|
10331
|
-
const
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
}
|
|
10335
|
-
}, []);
|
|
10336
|
-
const handleClose = useCallback((_) => {
|
|
10337
|
-
_?.onClose && _.onClose();
|
|
10338
|
-
}, []);
|
|
10339
|
-
const dialogs = useDialogsList({ onCloseAll: handleCloseAll, onClose: handleClose });
|
|
10340
|
-
const { close } = useDialogManager();
|
|
10341
|
-
const escapeHandler = useCallback(({ key }) => {
|
|
10342
|
-
if (key === 'Escape') {
|
|
10343
|
-
close();
|
|
10344
|
-
}
|
|
10345
|
-
}, []);
|
|
10346
|
-
useEventListener(globalThis.document, 'keydown', escapeHandler);
|
|
10294
|
+
const [dialogs, { close }] = useDialogsList();
|
|
10295
|
+
const hasDialogs = Boolean(dialogs.length);
|
|
10296
|
+
useOnEscape(close);
|
|
10347
10297
|
useEffect(() => {
|
|
10348
|
-
if (
|
|
10349
|
-
globalThis.document?.body.classList.add('no-scrollbar');
|
|
10350
|
-
globalThis.document?.body.classList.add('overflow-hidden');
|
|
10298
|
+
if (hasDialogs) {
|
|
10299
|
+
globalThis.document?.body.classList.add('no-scrollbar', 'overflow-hidden');
|
|
10351
10300
|
}
|
|
10352
10301
|
else {
|
|
10353
|
-
globalThis.document?.body.classList.remove('no-scrollbar');
|
|
10354
|
-
globalThis.document?.body.classList.remove('overflow-hidden');
|
|
10302
|
+
globalThis.document?.body.classList.remove('no-scrollbar', 'overflow-hidden');
|
|
10355
10303
|
}
|
|
10356
|
-
}, [
|
|
10357
|
-
return
|
|
10358
|
-
hidden: i !== dialogs.length - 1,
|
|
10304
|
+
}, [hasDialogs]);
|
|
10305
|
+
return hasDialogs ? (jsx("div", { className: "fixed inset-0 z-50", role: "dialog", children: dialogs.map(({ dialog, id }, i) => (jsx("div", { className: style('absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50', {
|
|
10306
|
+
hidden: i !== dialogs.length - 1, // TODO Чего?)
|
|
10359
10307
|
}), children: dialog }, String(id || i)))) })) : null;
|
|
10360
10308
|
});
|
|
10361
10309
|
|
|
@@ -10364,28 +10312,11 @@
|
|
|
10364
10312
|
const close = useCallback(() => {
|
|
10365
10313
|
setPopup(null);
|
|
10366
10314
|
}, []);
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
case 'open':
|
|
10373
|
-
case 'update':
|
|
10374
|
-
setPopup(action);
|
|
10375
|
-
break;
|
|
10376
|
-
case 'close':
|
|
10377
|
-
close();
|
|
10378
|
-
break;
|
|
10379
|
-
default:
|
|
10380
|
-
assertUnreachable(action);
|
|
10381
|
-
}
|
|
10382
|
-
}), []);
|
|
10383
|
-
const escapeHandler = useCallback(({ key }) => {
|
|
10384
|
-
if (key === 'Escape') {
|
|
10385
|
-
close();
|
|
10386
|
-
}
|
|
10387
|
-
}, [close]);
|
|
10388
|
-
useEventListener(globalThis.document, 'keydown', escapeHandler);
|
|
10315
|
+
useObservableWithActions(defaultEventBus.observable, 'popup', {
|
|
10316
|
+
open: setPopup,
|
|
10317
|
+
close,
|
|
10318
|
+
});
|
|
10319
|
+
useOnEscape(close);
|
|
10389
10320
|
return popup ? (jsx("div", { className: style('z-50', popup.fixed ? 'fixed' : 'absolute'), style: {
|
|
10390
10321
|
left: `${popup.left}px`,
|
|
10391
10322
|
top: `${popup.top}px`,
|
|
@@ -10423,7 +10354,7 @@
|
|
|
10423
10354
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10424
10355
|
});
|
|
10425
10356
|
|
|
10426
|
-
const packageVersion = "0.14.
|
|
10357
|
+
const packageVersion = "0.14.689";
|
|
10427
10358
|
|
|
10428
10359
|
exports.Blocks = Blocks;
|
|
10429
10360
|
exports.ContentPage = ContentPage;
|