@redneckz/wildless-cms-uni-blocks 0.14.687 → 0.14.689
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 +232 -313
- package/bundle/bundle.umd.min.js +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/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 +11 -7
- 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/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 +16 -19
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +10 -9
- 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/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.js +8 -12
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +11 -7
- 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/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 +16 -19
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +10 -9
- 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/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 +256 -341
- package/mobile/bundle/bundle.umd.min.js +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/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 +11 -7
- 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/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 +16 -19
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +10 -9
- 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/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 +11 -7
- 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/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 +16 -19
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +10 -9
- 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/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 +12 -10
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +34 -27
- 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 +52 -57
- package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +10 -14
- 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/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 +19 -14
- 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.tsx +8 -13
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +12 -10
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +34 -27
- 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 +52 -57
- package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +10 -14
- 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/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.fixture.tsx +1 -6
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +19 -14
- 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/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/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/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/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
|
@@ -423,6 +423,17 @@
|
|
|
423
423
|
handlerDecorator._impl = impl;
|
|
424
424
|
};
|
|
425
425
|
|
|
426
|
+
function useEmitterWithActions(eventBus, type) {
|
|
427
|
+
const cache = useRef({});
|
|
428
|
+
return useMemo(() => new Proxy({}, {
|
|
429
|
+
get(_, actionType) {
|
|
430
|
+
cache.current ||= {};
|
|
431
|
+
cache.current[actionType] ||= action => eventBus.fire(type, { ...(action ?? {}), type: actionType });
|
|
432
|
+
return cache.current[actionType];
|
|
433
|
+
}
|
|
434
|
+
}), [eventBus, type]);
|
|
435
|
+
}
|
|
436
|
+
|
|
426
437
|
class EventBus {
|
|
427
438
|
watchers = new Set();
|
|
428
439
|
subscribersMap = {};
|
|
@@ -474,11 +485,7 @@
|
|
|
474
485
|
|
|
475
486
|
const defaultEventBus = new EventBus();
|
|
476
487
|
|
|
477
|
-
const useDialogManager = () => (
|
|
478
|
-
open: (dialog, options = {}) => defaultEventBus.fire('dialog', { type: 'open', dialog, ...options }),
|
|
479
|
-
close: () => defaultEventBus.fire('dialog', { type: 'close' }),
|
|
480
|
-
closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
|
|
481
|
-
});
|
|
488
|
+
const useDialogManager = () => useEmitterWithActions(defaultEventBus.emitter, 'dialog');
|
|
482
489
|
|
|
483
490
|
const adjustBase = (href, basePath = '') => href?.replace(basePath, '') || '/';
|
|
484
491
|
|
|
@@ -610,17 +617,18 @@
|
|
|
610
617
|
|
|
611
618
|
const INITIAL_MOBILE_MODE = true;
|
|
612
619
|
|
|
620
|
+
const MOBILE_WIDTH = 1024;
|
|
621
|
+
const MOBILE_QUERY = `(max-width: ${MOBILE_WIDTH}px)`;
|
|
613
622
|
const useMobileMode = () => {
|
|
614
|
-
const
|
|
615
|
-
const [isMobileMode, setIsMobileMode] = useState(INITIAL_MOBILE_MODE);
|
|
623
|
+
const [isMobileMode, setMobileMode] = useState(INITIAL_MOBILE_MODE);
|
|
616
624
|
useEffect(() => {
|
|
617
|
-
const mqList = globalThis.matchMedia?.(
|
|
625
|
+
const mqList = globalThis.matchMedia?.(MOBILE_QUERY);
|
|
618
626
|
const mqHandler = () => {
|
|
619
|
-
|
|
627
|
+
setMobileMode(Boolean(mqList?.matches));
|
|
620
628
|
};
|
|
621
629
|
mqList?.addEventListener('change', mqHandler);
|
|
622
630
|
if (mqList?.matches) {
|
|
623
|
-
|
|
631
|
+
setMobileMode(true);
|
|
624
632
|
}
|
|
625
633
|
return () => {
|
|
626
634
|
mqList?.removeEventListener('change', mqHandler);
|
|
@@ -1209,6 +1217,18 @@
|
|
|
1209
1217
|
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] }) }));
|
|
1210
1218
|
});
|
|
1211
1219
|
|
|
1220
|
+
function useDialog(Dialog, initialProps = {}) {
|
|
1221
|
+
const { open, close, ...rest } = useDialogManager();
|
|
1222
|
+
const openDialog = useCallback((props, options = {}) => open({
|
|
1223
|
+
dialog: (jsx(Dialog, { ...initialProps, ...props, onClose: () => {
|
|
1224
|
+
close();
|
|
1225
|
+
props.onClose?.();
|
|
1226
|
+
} })),
|
|
1227
|
+
...options,
|
|
1228
|
+
}), [Dialog, open, close]);
|
|
1229
|
+
return { open: openDialog, close, ...rest };
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1212
1232
|
const getConsentDataProcessing = (inputs) => inputs?.find((_) => _?.name === 'consentDataProcessing');
|
|
1213
1233
|
|
|
1214
1234
|
function useBool(defaultValue = false) {
|
|
@@ -1380,11 +1400,7 @@
|
|
|
1380
1400
|
return debouncedCallback;
|
|
1381
1401
|
};
|
|
1382
1402
|
|
|
1383
|
-
const usePopupManager = () => (
|
|
1384
|
-
open: (popup, options) => defaultEventBus.fire('popup', { type: 'open', popup, ...options }),
|
|
1385
|
-
update: (popup, options) => defaultEventBus.fire('popup', { type: 'update', popup, ...options }),
|
|
1386
|
-
close: () => defaultEventBus.fire('popup', { type: 'close' }),
|
|
1387
|
-
});
|
|
1403
|
+
const usePopupManager = () => useEmitterWithActions(defaultEventBus.emitter, 'popup');
|
|
1388
1404
|
|
|
1389
1405
|
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()))) })));
|
|
1390
1406
|
|
|
@@ -1434,7 +1450,8 @@
|
|
|
1434
1450
|
debouncedGetHintsList(value);
|
|
1435
1451
|
prevInputValue.current = value;
|
|
1436
1452
|
}
|
|
1437
|
-
popup.
|
|
1453
|
+
popup.open({
|
|
1454
|
+
popup: jsx(InputPopup, { options: hintsList, value: value, onChange: handleChange }),
|
|
1438
1455
|
top: top + globalThis.scrollY + height,
|
|
1439
1456
|
left,
|
|
1440
1457
|
width,
|
|
@@ -1502,7 +1519,8 @@
|
|
|
1502
1519
|
}
|
|
1503
1520
|
const inputElement = inputRef.current;
|
|
1504
1521
|
const { top, left, width, height } = inputElement.getBoundingClientRect();
|
|
1505
|
-
popup.
|
|
1522
|
+
popup.open({
|
|
1523
|
+
popup: (jsx(SelectPopup, { popupRef: popupRef, options: options, value: value, query: query, onChange: handleChange, iconVersion: iconVersion })),
|
|
1506
1524
|
top: top + window.scrollY + height,
|
|
1507
1525
|
left,
|
|
1508
1526
|
width,
|
|
@@ -1890,8 +1908,21 @@
|
|
|
1890
1908
|
}, []);
|
|
1891
1909
|
const onChange = useCallback((value) => {
|
|
1892
1910
|
field?.(fieldName)?.onChange?.({
|
|
1893
|
-
|
|
1911
|
+
apartment: '',
|
|
1912
|
+
city: '',
|
|
1913
|
+
district: '',
|
|
1894
1914
|
fullAddress: value,
|
|
1915
|
+
fiasCode: '',
|
|
1916
|
+
house: '',
|
|
1917
|
+
locality: '',
|
|
1918
|
+
okatoRegionCode: '',
|
|
1919
|
+
postcode: '',
|
|
1920
|
+
region: '',
|
|
1921
|
+
regionCode: '',
|
|
1922
|
+
street: '',
|
|
1923
|
+
qc: '',
|
|
1924
|
+
qcComplete: '',
|
|
1925
|
+
qcHouse: '',
|
|
1895
1926
|
});
|
|
1896
1927
|
}, []);
|
|
1897
1928
|
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 }));
|
|
@@ -2935,11 +2966,15 @@
|
|
|
2935
2966
|
};
|
|
2936
2967
|
|
|
2937
2968
|
function useLocalStorage(key) {
|
|
2938
|
-
const
|
|
2969
|
+
const initialValue = globalThis.localStorage?.getItem(key);
|
|
2970
|
+
const [storedValue, setStoredValue] = useState(initialValue ? JSON.parse(initialValue) : null);
|
|
2939
2971
|
const setValue = useCallback((value) => {
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2972
|
+
setStoredValue((oldValue) => {
|
|
2973
|
+
const newValue = value instanceof Function ? value(oldValue) : value;
|
|
2974
|
+
globalThis.localStorage?.setItem(key, JSON.stringify(newValue));
|
|
2975
|
+
return newValue;
|
|
2976
|
+
});
|
|
2977
|
+
}, [key]);
|
|
2943
2978
|
return [storedValue, setValue];
|
|
2944
2979
|
}
|
|
2945
2980
|
|
|
@@ -3007,6 +3042,11 @@
|
|
|
3007
3042
|
},
|
|
3008
3043
|
};
|
|
3009
3044
|
|
|
3045
|
+
const feedbackById = async (id, convertToPng = false) => {
|
|
3046
|
+
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
|
|
3047
|
+
return response ? await response.blob() : new Blob();
|
|
3048
|
+
};
|
|
3049
|
+
|
|
3010
3050
|
function useButton() {
|
|
3011
3051
|
return (props) => ({
|
|
3012
3052
|
...props,
|
|
@@ -3039,37 +3079,28 @@
|
|
|
3039
3079
|
: '', className), type: type, role: role, onClick: onClick, children: children }));
|
|
3040
3080
|
});
|
|
3041
3081
|
|
|
3042
|
-
const feedbackById = async (id, convertToPng = false) => {
|
|
3043
|
-
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
|
|
3044
|
-
return response ? await response.blob() : new Blob();
|
|
3045
|
-
};
|
|
3046
|
-
|
|
3047
|
-
const getDocument = async (id, convertToPng = false) => {
|
|
3048
|
-
const response = await feedbackById(id, convertToPng);
|
|
3049
|
-
return URL.createObjectURL(response);
|
|
3050
|
-
};
|
|
3051
|
-
|
|
3052
3082
|
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" }) })));
|
|
3053
3083
|
|
|
3054
|
-
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
onClose && onClose();
|
|
3059
|
-
}, [onClose]);
|
|
3060
|
-
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 })] }));
|
|
3061
|
-
});
|
|
3084
|
+
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 })] })));
|
|
3085
|
+
|
|
3086
|
+
// TODO Перенесено как есть из openDocument. Требует рефакторинга
|
|
3087
|
+
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" })] })));
|
|
3062
3088
|
|
|
3063
|
-
const
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3089
|
+
const useDocumentDialog = (docId) => {
|
|
3090
|
+
const { open } = useDialog(DocumentDialog);
|
|
3091
|
+
const isMobileMode = useMobileMode();
|
|
3092
|
+
return useCallback(async () => {
|
|
3093
|
+
if (docId) {
|
|
3094
|
+
const src = URL.createObjectURL(await feedbackById(docId, isMobileMode));
|
|
3095
|
+
open({ src });
|
|
3096
|
+
}
|
|
3097
|
+
}, [open, docId, isMobileMode]);
|
|
3066
3098
|
};
|
|
3067
3099
|
|
|
3068
3100
|
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
3069
3101
|
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
3070
|
-
const
|
|
3071
|
-
|
|
3072
|
-
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)] }));
|
|
3102
|
+
const openDocument = useDocumentDialog(docId);
|
|
3103
|
+
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)] }));
|
|
3073
3104
|
});
|
|
3074
3105
|
|
|
3075
3106
|
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);
|
|
@@ -3919,29 +3950,17 @@
|
|
|
3919
3950
|
|
|
3920
3951
|
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;
|
|
3921
3952
|
|
|
3922
|
-
const ResponseTypeDialog = JSX(
|
|
3953
|
+
const ResponseTypeDialog = JSX(({ responseType, typeForm, onClose }) => {
|
|
3923
3954
|
const responseOK = responseType === 'OK';
|
|
3924
3955
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
3925
|
-
const { close } = useDialogManager();
|
|
3926
|
-
const handleClose = useCallback(() => {
|
|
3927
|
-
close();
|
|
3928
|
-
}, []);
|
|
3929
3956
|
const responseOKDescription = typeForm === 'ANTIFRAUD'
|
|
3930
3957
|
? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
|
|
3931
3958
|
можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка
|
|
3932
3959
|
не звонят с использованием мессенджеров.`
|
|
3933
3960
|
: 'Совсем скоро мы с вами свяжемся';
|
|
3934
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto
|
|
3961
|
+
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" })] }) }));
|
|
3935
3962
|
});
|
|
3936
3963
|
|
|
3937
|
-
const useResponseTypeDialog = (initialProps) => {
|
|
3938
|
-
const { open, close } = useDialogManager();
|
|
3939
|
-
return {
|
|
3940
|
-
open: (props, options = {}) => open(jsx(ResponseTypeDialog, { ...initialProps, ...props }), options),
|
|
3941
|
-
close,
|
|
3942
|
-
};
|
|
3943
|
-
};
|
|
3944
|
-
|
|
3945
3964
|
const objectValidator = (validatorsMap) => (o) => (o &&
|
|
3946
3965
|
Object.entries(validatorsMap).flatMap(([key, validator]) => validator(o[key]))) ||
|
|
3947
3966
|
[];
|
|
@@ -4032,7 +4051,7 @@
|
|
|
4032
4051
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
4033
4052
|
const initialFormState = getInitialFormState$3(inputs, typeForm);
|
|
4034
4053
|
const [responseType, setResponseType] = useState('');
|
|
4035
|
-
const responseTypeDialog =
|
|
4054
|
+
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
4036
4055
|
const handleSubmit = useCallback(async (formData, ev) => {
|
|
4037
4056
|
const inputsFiltered = getFilteredInputs(inputs, formData);
|
|
4038
4057
|
const feedbackValidator = objectValidator(getObjectValidator(inputsFiltered));
|
|
@@ -4043,14 +4062,14 @@
|
|
|
4043
4062
|
const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
|
|
4044
4063
|
setResponseType(status);
|
|
4045
4064
|
if (status) {
|
|
4046
|
-
responseTypeDialog.open({ responseType: status });
|
|
4065
|
+
responseTypeDialog.open({ typeForm, responseType: status });
|
|
4047
4066
|
}
|
|
4048
4067
|
if (status === 'OK' && data) {
|
|
4049
4068
|
const aspects = useAspects();
|
|
4050
4069
|
handleAspects({ aspectsAttributes: data, aspects, ev });
|
|
4051
4070
|
}
|
|
4052
4071
|
return status;
|
|
4053
|
-
}, []);
|
|
4072
|
+
}, [typeForm]);
|
|
4054
4073
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4055
4074
|
const fieldName = getConsentDataProcessing(inputs)?.name;
|
|
4056
4075
|
useEffect(() => {
|
|
@@ -4246,7 +4265,7 @@
|
|
|
4246
4265
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
4247
4266
|
: null] })));
|
|
4248
4267
|
|
|
4249
|
-
const CaptchaDialog = JSX(({ phoneNumber,
|
|
4268
|
+
const CaptchaDialog = JSX(({ phoneNumber, sendCode, onClose }) => {
|
|
4250
4269
|
const [captcha, setCaptcha] = useState('');
|
|
4251
4270
|
const [code, setCode] = useState('');
|
|
4252
4271
|
const [hasError, setHasError] = useState(false);
|
|
@@ -4254,28 +4273,19 @@
|
|
|
4254
4273
|
const isValidCode = await checkCaptcha({ captchaText: code });
|
|
4255
4274
|
if (isValidCode) {
|
|
4256
4275
|
sendCode?.();
|
|
4257
|
-
|
|
4276
|
+
onClose?.();
|
|
4258
4277
|
}
|
|
4259
4278
|
else {
|
|
4260
4279
|
setHasError(isValidCode);
|
|
4261
4280
|
}
|
|
4262
|
-
}, [code]);
|
|
4281
|
+
}, [code, sendCode]);
|
|
4263
4282
|
const handleCreateCaptcha = useCallback(() => {
|
|
4264
4283
|
(async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
|
|
4265
4284
|
}, []);
|
|
4266
4285
|
useEffect(handleCreateCaptcha, []);
|
|
4267
|
-
return (jsx(Dialog, {
|
|
4286
|
+
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" })] })] }) }));
|
|
4268
4287
|
});
|
|
4269
4288
|
|
|
4270
|
-
const useCaptchaDialog = (initialProps, onClose) => {
|
|
4271
|
-
const { open, close, closeAll } = useDialogManager();
|
|
4272
|
-
return {
|
|
4273
|
-
open: () => open(jsx(CaptchaDialog, { close: close, onClose: onClose, ...initialProps })),
|
|
4274
|
-
close,
|
|
4275
|
-
closeAll,
|
|
4276
|
-
};
|
|
4277
|
-
};
|
|
4278
|
-
|
|
4279
4289
|
const Timer = JSX(({ time, setTime, className }) => {
|
|
4280
4290
|
useEffect(() => {
|
|
4281
4291
|
const timer = setInterval(() => {
|
|
@@ -4348,94 +4358,77 @@
|
|
|
4348
4358
|
}
|
|
4349
4359
|
};
|
|
4350
4360
|
|
|
4351
|
-
const useVerifyPhoneDialogSubmit = ({
|
|
4352
|
-
const [hasError, setHasError] = useState(false);
|
|
4361
|
+
const useVerifyPhoneDialogSubmit = ({ values, onSuccess, }) => {
|
|
4353
4362
|
const [errorText, setErrorText] = useState('');
|
|
4354
4363
|
const [isLoading, setIsLoading] = useState(false);
|
|
4355
4364
|
const [timeNextReq, setTimeNextReq] = useState(0);
|
|
4356
4365
|
const [isTimerStarted, setIsTimerStarted] = useState(false);
|
|
4357
|
-
const [
|
|
4358
|
-
const resetError = useCallback(() =>
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
}, []);
|
|
4362
|
-
const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
|
|
4363
|
-
const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
|
|
4366
|
+
const [attempts, setAttempts] = useState(0);
|
|
4367
|
+
const resetError = useCallback(() => setErrorText(''), []);
|
|
4368
|
+
const isTimeExpired = Boolean(timeNextReq === 0 && isTimerStarted);
|
|
4369
|
+
const isSubmitButtonDisabled = attempts > 2 || isTimeExpired || !values.every(Boolean);
|
|
4364
4370
|
const handleSubmit = useCallback(async () => {
|
|
4365
4371
|
try {
|
|
4366
4372
|
setIsTimerStarted(false);
|
|
4367
4373
|
setTimeNextReq(0);
|
|
4368
|
-
|
|
4374
|
+
setAttempts((_) => _ + 1);
|
|
4369
4375
|
setIsLoading(true);
|
|
4370
4376
|
await checkCode({
|
|
4371
4377
|
smsText: values.join(''),
|
|
4372
4378
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
4373
4379
|
});
|
|
4374
4380
|
resetError();
|
|
4375
|
-
|
|
4381
|
+
onSuccess?.(values.join(''));
|
|
4376
4382
|
}
|
|
4377
4383
|
catch {
|
|
4384
|
+
setErrorText(attempts > 1 ? 'Исчерпан лимит ввода смс-кода' : 'Неверный код');
|
|
4385
|
+
}
|
|
4386
|
+
finally {
|
|
4378
4387
|
setIsLoading(false);
|
|
4379
|
-
attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
|
|
4380
|
-
setHasError(true);
|
|
4381
4388
|
}
|
|
4382
|
-
}, [values,
|
|
4389
|
+
}, [values, attempts]);
|
|
4383
4390
|
useEffect(() => {
|
|
4384
|
-
|
|
4385
|
-
setHasError(true);
|
|
4386
|
-
setErrorText('Код просрочен');
|
|
4387
|
-
}
|
|
4388
|
-
else {
|
|
4389
|
-
setHasError(false);
|
|
4390
|
-
}
|
|
4391
|
+
setErrorText(isTimeExpired ? 'Код просрочен' : '');
|
|
4391
4392
|
}, [isTimeExpired]);
|
|
4392
4393
|
return {
|
|
4393
4394
|
handleSubmit,
|
|
4394
|
-
hasError,
|
|
4395
|
+
hasError: Boolean(errorText),
|
|
4395
4396
|
errorText,
|
|
4396
4397
|
isLoading,
|
|
4397
4398
|
timeNextReq,
|
|
4398
4399
|
isSubmitButtonDisabled,
|
|
4399
4400
|
setTimeNextReq,
|
|
4400
4401
|
setIsTimerStarted,
|
|
4401
|
-
|
|
4402
|
+
setAttempts,
|
|
4402
4403
|
};
|
|
4403
4404
|
};
|
|
4404
4405
|
|
|
4405
|
-
const VerifyPhoneDialog = JSX(({
|
|
4406
|
+
const VerifyPhoneDialog = JSX(({ title, description, __html, code = true, codeLength = 4, textButton = 'Далее', phoneNumber = '+79999999999', onSuccess = noop, onClose = noop, }) => {
|
|
4406
4407
|
const [values, setValues] = useState(Array(codeLength).fill(''));
|
|
4407
|
-
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted,
|
|
4408
|
+
const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttempts, } = useVerifyPhoneDialogSubmit({ values, onSuccess });
|
|
4409
|
+
const captchaDialog = useDialog(CaptchaDialog);
|
|
4408
4410
|
const handleSendCode = useCallback(async () => {
|
|
4409
4411
|
const isSuccessSendCode = await sendCode({
|
|
4410
|
-
phoneNumber
|
|
4412
|
+
phoneNumber,
|
|
4411
4413
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
4412
4414
|
});
|
|
4413
4415
|
if (isSuccessSendCode) {
|
|
4414
|
-
|
|
4416
|
+
setAttempts(0);
|
|
4415
4417
|
setTimeNextReq(180);
|
|
4416
4418
|
setIsTimerStarted(true);
|
|
4417
4419
|
}
|
|
4418
4420
|
else {
|
|
4419
|
-
captchaDialog.open();
|
|
4421
|
+
captchaDialog.open({ phoneNumber, sendCode: handleSendCode, onClose });
|
|
4420
4422
|
}
|
|
4421
|
-
}, []);
|
|
4422
|
-
const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode: handleSendCode }, onClose);
|
|
4423
|
+
}, [phoneNumber, onClose]);
|
|
4423
4424
|
useEffect(() => {
|
|
4424
4425
|
handleSendCode();
|
|
4425
4426
|
}, []);
|
|
4426
|
-
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$2(timeNextReq, setTimeNextReq, handleSendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
4427
|
+
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$2(timeNextReq, setTimeNextReq, handleSendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
4427
4428
|
});
|
|
4428
4429
|
const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
|
|
4429
4430
|
const renderText$2 = (timeNextReq, setTimeNextReq, handleSendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-base ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: handleSendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
|
|
4430
4431
|
|
|
4431
|
-
const useVerifyPhoneDialog = () => {
|
|
4432
|
-
const { open, close } = useDialogManager();
|
|
4433
|
-
return {
|
|
4434
|
-
open: (handleClose, props) => open(jsx(VerifyPhoneDialog, { onClose: close, close: handleClose, ...props })),
|
|
4435
|
-
close,
|
|
4436
|
-
};
|
|
4437
|
-
};
|
|
4438
|
-
|
|
4439
4432
|
const defaultConsentText = {
|
|
4440
4433
|
title: 'Подпишите согласие на запрос в БКИ',
|
|
4441
4434
|
description: 'Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту',
|
|
@@ -4444,33 +4437,32 @@
|
|
|
4444
4437
|
title: 'Вы уверены, что хотите отказаться от запроса в БКИ',
|
|
4445
4438
|
description: 'Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения',
|
|
4446
4439
|
};
|
|
4447
|
-
const
|
|
4440
|
+
const ITEMS$1 = [
|
|
4441
|
+
{ id: 'SIGNED', text: 'Подписать' },
|
|
4442
|
+
{ id: 'REFUSE', text: 'Отказаться' },
|
|
4443
|
+
];
|
|
4444
|
+
const CONSENT_BKI_ID = 2;
|
|
4445
|
+
const ConsentBkiDialog = JSX(({ onSubmit = noop, onClose = noop }) => {
|
|
4448
4446
|
const [confirmStatus, setConfirmStatus] = useState('');
|
|
4449
|
-
const [
|
|
4450
|
-
const
|
|
4451
|
-
const
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
}, [confirmStatus]);
|
|
4447
|
+
const [showRefuseContent, setShowRefuseContent] = useState(false);
|
|
4448
|
+
const openDocument = useDocumentDialog(CONSENT_BKI_ID);
|
|
4449
|
+
const handleSubmit = useCallback(() => {
|
|
4450
|
+
onSubmit(confirmStatus);
|
|
4451
|
+
onClose();
|
|
4452
|
+
}, [onSubmit, confirmStatus]);
|
|
4456
4453
|
const handleConfirmChange = useCallback((value) => {
|
|
4457
4454
|
setConfirmStatus(value);
|
|
4458
4455
|
if (value === 'REFUSE') {
|
|
4459
|
-
|
|
4456
|
+
setShowRefuseContent(true);
|
|
4460
4457
|
}
|
|
4461
4458
|
}, []);
|
|
4462
|
-
const consentText =
|
|
4463
|
-
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:
|
|
4459
|
+
const consentText = showRefuseContent ? refuseConsentText : defaultConsentText;
|
|
4460
|
+
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" })] }) }));
|
|
4464
4461
|
});
|
|
4465
|
-
const ITEMS$1 = [
|
|
4466
|
-
{ id: 'SIGNED', text: 'Подписать' },
|
|
4467
|
-
{ id: 'REFUSE', text: 'Отказаться' },
|
|
4468
|
-
];
|
|
4469
|
-
const CONSENT_BKI_ID = 2;
|
|
4470
4462
|
|
|
4471
4463
|
const useConsentBkiDialog = (onClose) => {
|
|
4472
|
-
const { open
|
|
4473
|
-
const verifyPhoneDialog =
|
|
4464
|
+
const { open } = useDialog(ConsentBkiDialog);
|
|
4465
|
+
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
4474
4466
|
const handleSuccessVerify = (profileId) => async (smsCode) => {
|
|
4475
4467
|
try {
|
|
4476
4468
|
if (profileId) {
|
|
@@ -4489,53 +4481,50 @@
|
|
|
4489
4481
|
}
|
|
4490
4482
|
};
|
|
4491
4483
|
const handleSubmitBkiConstent = (phone, profileId) => async (confirmStatus) => {
|
|
4492
|
-
close();
|
|
4493
4484
|
if (confirmStatus === 'SIGNED' && phone) {
|
|
4494
|
-
verifyPhoneDialog.open(
|
|
4485
|
+
verifyPhoneDialog.open({
|
|
4486
|
+
...verifyPhoneContent$1(phone),
|
|
4487
|
+
onClose: handleSuccessVerify(profileId),
|
|
4488
|
+
});
|
|
4495
4489
|
}
|
|
4496
4490
|
else {
|
|
4497
4491
|
onClose();
|
|
4498
4492
|
}
|
|
4499
4493
|
};
|
|
4500
4494
|
return {
|
|
4501
|
-
open: (phone, profileId) => open(
|
|
4495
|
+
open: (phone, profileId) => open({ onSubmit: handleSubmitBkiConstent(phone, profileId), onClose }),
|
|
4502
4496
|
};
|
|
4503
4497
|
};
|
|
4504
4498
|
const verifyPhoneContent$1 = (phone) => ({
|
|
4505
4499
|
title: 'Подтвердите номер телефона',
|
|
4506
4500
|
description: `Мы отправили код на ${phone}`,
|
|
4507
4501
|
phoneNumber: formatPhone(phone),
|
|
4508
|
-
textButton: '
|
|
4502
|
+
textButton: 'Далее',
|
|
4509
4503
|
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
|
|
4510
4504
|
<ul><li>согласие на запрос информации в БКИ</li></ul>`,
|
|
4511
4505
|
});
|
|
4512
4506
|
|
|
4513
4507
|
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
4514
4508
|
|
|
4515
|
-
const EsiaLoginDialog = JSX(
|
|
4509
|
+
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
4516
4510
|
const navigator = locationNavigator();
|
|
4517
4511
|
const handleAuth = useCallback(async () => {
|
|
4518
4512
|
const resp = await getLink({
|
|
4519
4513
|
redirectUri: navigator.href,
|
|
4520
4514
|
});
|
|
4521
|
-
if (resp) {
|
|
4515
|
+
if (resp?.link) {
|
|
4522
4516
|
navigator.assign(resp.link);
|
|
4523
4517
|
}
|
|
4524
4518
|
}, []);
|
|
4525
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose:
|
|
4519
|
+
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" })] })] }) }));
|
|
4526
4520
|
});
|
|
4527
4521
|
|
|
4528
4522
|
const useEsiaLoginDialog = (nextStepLink) => {
|
|
4529
|
-
const { open
|
|
4523
|
+
const { open } = useDialog(EsiaLoginDialog);
|
|
4530
4524
|
const navigator = locationNavigator();
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
}, []);
|
|
4535
|
-
return {
|
|
4536
|
-
open: (options = {}) => open(jsx(EsiaLoginDialog, { handleClose: handleClose }), options),
|
|
4537
|
-
close,
|
|
4538
|
-
};
|
|
4525
|
+
return useCallback(() => {
|
|
4526
|
+
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
4527
|
+
}, [open, nextStepLink]);
|
|
4539
4528
|
};
|
|
4540
4529
|
|
|
4541
4530
|
const fieldsNamesToContactKeysMap = {
|
|
@@ -4643,9 +4632,9 @@
|
|
|
4643
4632
|
const [, setProfileId] = useLocalStorage('profileId');
|
|
4644
4633
|
const [, setParticipantId] = useLocalStorage('participantId');
|
|
4645
4634
|
const [, setProgramId] = useLocalStorage('programId');
|
|
4646
|
-
const
|
|
4647
|
-
const consentBkiDialog = useConsentBkiDialog(
|
|
4648
|
-
const verifyPhoneDialog =
|
|
4635
|
+
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
4636
|
+
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
4637
|
+
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
4649
4638
|
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber }) => {
|
|
4650
4639
|
setParticipantId(participantId);
|
|
4651
4640
|
setTaskId(taskId);
|
|
@@ -4656,7 +4645,7 @@
|
|
|
4656
4645
|
const handleSubmit = useCallback(async (formData) => {
|
|
4657
4646
|
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
4658
4647
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
4659
|
-
return
|
|
4648
|
+
return;
|
|
4660
4649
|
}
|
|
4661
4650
|
try {
|
|
4662
4651
|
const profileId = await createUserProfile({
|
|
@@ -4682,7 +4671,10 @@
|
|
|
4682
4671
|
const acceptedConsents = Object.keys(CONSENTS)
|
|
4683
4672
|
.filter((_) => formData[_])
|
|
4684
4673
|
.map((_) => CONSENTS[_]?.text);
|
|
4685
|
-
verifyPhoneDialog.open(
|
|
4674
|
+
verifyPhoneDialog.open({
|
|
4675
|
+
...verifyPhoneContent(formData?.phone, acceptedConsents),
|
|
4676
|
+
onSuccess: handleSuccessVerify,
|
|
4677
|
+
});
|
|
4686
4678
|
}
|
|
4687
4679
|
}
|
|
4688
4680
|
catch {
|
|
@@ -4719,7 +4711,7 @@
|
|
|
4719
4711
|
title: 'Подтвердите номер телефона',
|
|
4720
4712
|
description: `Мы отправили код на ${phone}`,
|
|
4721
4713
|
phoneNumber: formatPhone(phone),
|
|
4722
|
-
textButton: '
|
|
4714
|
+
textButton: 'Далее',
|
|
4723
4715
|
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
|
|
4724
4716
|
});
|
|
4725
4717
|
const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
@@ -4786,32 +4778,36 @@
|
|
|
4786
4778
|
|
|
4787
4779
|
const useInitApplicationLead = (nextStepLink) => {
|
|
4788
4780
|
const navigator = locationNavigator();
|
|
4789
|
-
const [isLoading,
|
|
4790
|
-
const [
|
|
4791
|
-
const
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
const state = params.get('state');
|
|
4795
|
-
const updateEsiaProfile = useCallback(async () => {
|
|
4796
|
-
if (profileId && code && state) {
|
|
4781
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
4782
|
+
const [, setLeadForm] = useLocalStorage('leadForm');
|
|
4783
|
+
const updateEsiaProfile = useCallback(async (profileId, code, state) => {
|
|
4784
|
+
startLoading();
|
|
4785
|
+
try {
|
|
4797
4786
|
const data = await updateProfileEsia({
|
|
4798
|
-
profileId
|
|
4787
|
+
profileId,
|
|
4799
4788
|
code,
|
|
4800
4789
|
state,
|
|
4801
|
-
redirectUri:
|
|
4790
|
+
redirectUri: globalThis.location?.href,
|
|
4802
4791
|
});
|
|
4803
|
-
data
|
|
4804
|
-
setLeadForm({
|
|
4805
|
-
...
|
|
4792
|
+
if (data) {
|
|
4793
|
+
setLeadForm((_) => ({
|
|
4794
|
+
..._,
|
|
4806
4795
|
...parseEsiaProfile(data),
|
|
4807
|
-
});
|
|
4796
|
+
}));
|
|
4797
|
+
}
|
|
4808
4798
|
navigator.assign(nextStepLink);
|
|
4809
4799
|
}
|
|
4810
|
-
|
|
4800
|
+
finally {
|
|
4801
|
+
endLoading();
|
|
4802
|
+
}
|
|
4803
|
+
}, [nextStepLink]);
|
|
4811
4804
|
useEffect(() => {
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4805
|
+
const profileId = JSON.parse(globalThis.localStorage?.getItem('profileId') ?? 'null');
|
|
4806
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
4807
|
+
const code = params.get('code');
|
|
4808
|
+
const state = params.get('state');
|
|
4809
|
+
if (profileId && code && state) {
|
|
4810
|
+
updateEsiaProfile(profileId, code, state);
|
|
4815
4811
|
}
|
|
4816
4812
|
else {
|
|
4817
4813
|
sessionStorage.removeItem('accessToken');
|
|
@@ -4825,7 +4821,6 @@
|
|
|
4825
4821
|
|
|
4826
4822
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
|
|
4827
4823
|
const inputs = (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
4828
|
-
const [responseType, setResponseType] = useState('');
|
|
4829
4824
|
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
4830
4825
|
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
4831
4826
|
const initialFormState = getInitialFormState$2(inputs, leadForm);
|
|
@@ -4835,17 +4830,13 @@
|
|
|
4835
4830
|
nextStepLink,
|
|
4836
4831
|
saveForm: setLeadForm,
|
|
4837
4832
|
});
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
responseTypeDialog.open();
|
|
4841
|
-
}
|
|
4842
|
-
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4833
|
+
const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
4834
|
+
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
4843
4835
|
useEffect(() => {
|
|
4844
|
-
if (
|
|
4845
|
-
|
|
4846
|
-
reset();
|
|
4836
|
+
if (responseStatus) {
|
|
4837
|
+
responseTypeDialog.open({ responseType: responseStatus });
|
|
4847
4838
|
}
|
|
4848
|
-
}, [
|
|
4839
|
+
}, [responseStatus]);
|
|
4849
4840
|
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)] }) }));
|
|
4850
4841
|
});
|
|
4851
4842
|
|
|
@@ -8653,31 +8644,16 @@
|
|
|
8653
8644
|
return docFormat.includes('/') ? docFormat.replace(regexp, '') : docFormat;
|
|
8654
8645
|
};
|
|
8655
8646
|
|
|
8656
|
-
const ReportDialog = JSX(({ href, __html, target }) => {
|
|
8657
|
-
const { close } = useDialogManager();
|
|
8647
|
+
const ReportDialog = JSX(({ href, __html, target, onClose }) => {
|
|
8658
8648
|
const router = useRouter();
|
|
8659
8649
|
const adjustedHref = adjustHref(router)(href);
|
|
8660
|
-
|
|
8661
|
-
close();
|
|
8662
|
-
}, []);
|
|
8663
|
-
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" })] }));
|
|
8650
|
+
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" })] }));
|
|
8664
8651
|
});
|
|
8665
8652
|
|
|
8666
|
-
const useReportDialog = (props) => {
|
|
8667
|
-
const { open, close } = useDialogManager();
|
|
8668
|
-
return {
|
|
8669
|
-
open: (options = {}) => open(jsx(ReportDialog, { ...props }), options),
|
|
8670
|
-
close,
|
|
8671
|
-
};
|
|
8672
|
-
};
|
|
8673
|
-
|
|
8674
8653
|
const ReportDialogButton = JSX(({ text, href, target, __html, icon }) => {
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
}
|
|
8678
|
-
const reportDialog = useReportDialog({ __html, href, target });
|
|
8679
|
-
const openReportDialog = useCallback(() => reportDialog.open(), [reportDialog]);
|
|
8680
|
-
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 })] }));
|
|
8654
|
+
const { open } = useDialog(ReportDialog);
|
|
8655
|
+
const openReportDialog = useCallback(() => open({ __html, href, target }), [__html, href, target]);
|
|
8656
|
+
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;
|
|
8681
8657
|
});
|
|
8682
8658
|
|
|
8683
8659
|
const linkColumnsModeStyleMap = {
|
|
@@ -9231,30 +9207,39 @@
|
|
|
9231
9207
|
|
|
9232
9208
|
const StickyBottomMenuItem = JSX(({ isActive, item, onClick }) => (jsxs("div", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), title: item?.title || '', onClick: onClick, children: [jsx(Icon, { className: "w-6 h-6", name: item?.icon?.icon, iconVersion: isActive ? 'color' : 'black' }), item?.title || ''] })));
|
|
9233
9209
|
|
|
9234
|
-
const StickyBottomMenuDialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
9235
|
-
const { close } = useDialogManager();
|
|
9236
|
-
const handleClose = useCallback(() => {
|
|
9237
|
-
close();
|
|
9238
|
-
onClose && onClose();
|
|
9239
|
-
}, [onClose]);
|
|
9240
|
-
return (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white p-0 rounded-xl top-32', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 rounded-xl bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-1.5 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
9241
|
-
});
|
|
9210
|
+
const StickyBottomMenuDialog = JSX(({ className, head, children, onClose, onClick }) => (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white p-0 rounded-xl top-32', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 rounded-xl bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-1.5 right-0", onClose: onClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] })));
|
|
9242
9211
|
|
|
9243
|
-
const useBottomMenuItemDialog = ({ menuRef, dialogRef,
|
|
9244
|
-
const
|
|
9212
|
+
const useBottomMenuItemDialog = ({ menuRef, dialogRef, leftItems, rightItems, onClose, }) => {
|
|
9213
|
+
const { open, close } = useDialogManager();
|
|
9214
|
+
const handleIframeLoad = useCallback(() => {
|
|
9215
|
+
const ifDoc = document.getElementsByTagName('iframe')['iframe-dialog'];
|
|
9216
|
+
ifDoc.style.height = `${ifDoc?.contentWindow?.document.body.offsetHeight}px`;
|
|
9217
|
+
}, []);
|
|
9218
|
+
return useCallback((index, itemsPosition) => {
|
|
9245
9219
|
const requiredArray = itemsPosition === 'left' ? leftItems : rightItems;
|
|
9246
9220
|
const menuDimensions = menuRef?.current?.getBoundingClientRect();
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9221
|
+
open({
|
|
9222
|
+
id: itemsPosition === 'left' ? leftItems[index].title : rightItems[index].title,
|
|
9223
|
+
dialog: (jsx(StickyBottomMenuDialog, { className: "mt-[20%] border-t border-current", head: jsx("div", { className: "flex items-center justify-center px-xl", children: jsx(Heading, { as: "h4", title: requiredArray[index].description || requiredArray[index].title }) }), onClick: (e) => e.stopPropagation(), onClose: () => {
|
|
9224
|
+
close();
|
|
9225
|
+
onClose?.();
|
|
9226
|
+
}, children: jsx("div", { className: "bg-white pb-20 pt-1 text-l", ref: dialogRef, children: jsx("iframe", { id: "iframe-dialog", src: requiredArray[index]?.src, width: menuDimensions?.width ?? 0, onLoad: handleIframeLoad }) }) })),
|
|
9227
|
+
});
|
|
9228
|
+
}, [handleIframeLoad, leftItems, rightItems, onClose]);
|
|
9254
9229
|
};
|
|
9255
9230
|
|
|
9256
9231
|
const isDialogOpen = (id, dialogs) => Boolean(dialogs.find((item) => item.id === id, id));
|
|
9257
9232
|
|
|
9233
|
+
function useObservableWithActions(eventBus, type, handlersMap) {
|
|
9234
|
+
useEffect(() => eventBus.subscribe(type, action => {
|
|
9235
|
+
const actionType = action?.type;
|
|
9236
|
+
if (actionType && typeof actionType === 'string') {
|
|
9237
|
+
const handler = handlersMap[actionType];
|
|
9238
|
+
handler && handler(action);
|
|
9239
|
+
}
|
|
9240
|
+
}), [eventBus, type, ...Object.values(handlersMap)]);
|
|
9241
|
+
}
|
|
9242
|
+
|
|
9258
9243
|
function useList(initialList = []) {
|
|
9259
9244
|
const [list, setList] = useState(initialList);
|
|
9260
9245
|
const push = useCallback((item) => setList(_ => [..._, item]), []);
|
|
@@ -9264,41 +9249,14 @@
|
|
|
9264
9249
|
return [list, { setList, push, pop, remove, clear }];
|
|
9265
9250
|
}
|
|
9266
9251
|
|
|
9267
|
-
|
|
9268
|
-
throw new Error(x);
|
|
9269
|
-
}
|
|
9270
|
-
|
|
9271
|
-
const useDialogsList = ({ onCloseAll, onClose, } = {}) => {
|
|
9252
|
+
const useDialogsList = () => {
|
|
9272
9253
|
const [dialogs, { push, pop, clear }] = useList();
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
pop();
|
|
9280
|
-
}, [dialogs, onClose]);
|
|
9281
|
-
useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
|
|
9282
|
-
if (!action) {
|
|
9283
|
-
return;
|
|
9284
|
-
}
|
|
9285
|
-
switch (action.type) {
|
|
9286
|
-
case 'open':
|
|
9287
|
-
push(action);
|
|
9288
|
-
break;
|
|
9289
|
-
case 'close':
|
|
9290
|
-
if (action.all) {
|
|
9291
|
-
closeAll();
|
|
9292
|
-
}
|
|
9293
|
-
else {
|
|
9294
|
-
close();
|
|
9295
|
-
}
|
|
9296
|
-
break;
|
|
9297
|
-
default:
|
|
9298
|
-
assertUnreachable(action);
|
|
9299
|
-
}
|
|
9300
|
-
}), [closeAll, close]);
|
|
9301
|
-
return dialogs;
|
|
9254
|
+
useObservableWithActions(defaultEventBus.observable, 'dialog', {
|
|
9255
|
+
open: push,
|
|
9256
|
+
close: pop,
|
|
9257
|
+
closeAll: clear,
|
|
9258
|
+
});
|
|
9259
|
+
return [dialogs, { close: pop, closeAll: clear }];
|
|
9302
9260
|
};
|
|
9303
9261
|
|
|
9304
9262
|
const groupBy = (list, keyGetter) => {
|
|
@@ -9398,18 +9356,17 @@
|
|
|
9398
9356
|
});
|
|
9399
9357
|
|
|
9400
9358
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
9401
|
-
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
9359
|
+
const LocationDialog = JSX(({ foreignOffices, branches, onClose }) => {
|
|
9402
9360
|
const locationStore = useDefaultLocation(branches?.default);
|
|
9403
9361
|
const [query, setQuery] = useState('');
|
|
9404
9362
|
const rawRegions = useRegions();
|
|
9405
9363
|
const regions = useMemo(() => cleanUpRegions(rawRegions).sort((a, b) => a.name.localeCompare(b.name)), [rawRegions]);
|
|
9406
9364
|
const regionsGroupByLetter = useMemo(() => groupBy(regions, regionFirstLetter), [regions]);
|
|
9407
|
-
const { close } = useDialogManager();
|
|
9408
9365
|
const handleChangeLocation = useCallback((_) => {
|
|
9409
9366
|
locationStore.location = _;
|
|
9410
|
-
|
|
9411
|
-
}, [locationStore]);
|
|
9412
|
-
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
|
|
9367
|
+
onClose?.();
|
|
9368
|
+
}, [locationStore, onClose]);
|
|
9369
|
+
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
|
|
9413
9370
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
9414
9371
|
.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)] }));
|
|
9415
9372
|
});
|
|
@@ -9419,16 +9376,8 @@
|
|
|
9419
9376
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() ?? '',
|
|
9420
9377
|
}));
|
|
9421
9378
|
|
|
9422
|
-
const
|
|
9423
|
-
const
|
|
9424
|
-
return {
|
|
9425
|
-
open: (options = {}) => open(jsx(LocationDialog, { ...props }), options),
|
|
9426
|
-
close,
|
|
9427
|
-
};
|
|
9428
|
-
};
|
|
9429
|
-
|
|
9430
|
-
const BurgerMenuDialog = JSX(({ menuRef, menuItem, locationDialogProps, closeAll }) => {
|
|
9431
|
-
const locationDialog = useLocationDialog(locationDialogProps || {});
|
|
9379
|
+
const BurgerMenuDialog = JSX(({ menuRef, menuItem, locationDialogProps, onClose }) => {
|
|
9380
|
+
const locationDialog = useDialog(LocationDialog, locationDialogProps);
|
|
9432
9381
|
const { name: location } = useLocation();
|
|
9433
9382
|
const menuDimensions = menuRef?.current?.getBoundingClientRect();
|
|
9434
9383
|
const basePath = getBasePath(env.SITE_URL);
|
|
@@ -9446,10 +9395,10 @@
|
|
|
9446
9395
|
useEffect(() => {
|
|
9447
9396
|
const onMessage = (e) => {
|
|
9448
9397
|
if (e.data.type === 'location') {
|
|
9449
|
-
locationDialog.open();
|
|
9398
|
+
locationDialog.open({});
|
|
9450
9399
|
}
|
|
9451
9400
|
if (e.data.type === 'reload') {
|
|
9452
|
-
|
|
9401
|
+
onClose?.();
|
|
9453
9402
|
}
|
|
9454
9403
|
if (e.data.type === 'resize') {
|
|
9455
9404
|
const ifDoc = document.getElementsByTagName('iframe')['iframe-dialog'];
|
|
@@ -9462,26 +9411,17 @@
|
|
|
9462
9411
|
return () => {
|
|
9463
9412
|
globalThis.removeEventListener('message', onMessage);
|
|
9464
9413
|
};
|
|
9465
|
-
}, []);
|
|
9466
|
-
return (jsx(StickyBottomMenuDialog, {
|
|
9414
|
+
}, [onClose]);
|
|
9415
|
+
return (jsx(StickyBottomMenuDialog, { head: jsx("div", { className: "flex items-center justify-center px-xl", children: jsx(Heading, { as: "h4", title: menuItem?.title, className: "font-medium" }) }), onClick: (e) => e.stopPropagation(), onClose: onClose, children: jsx("div", { className: "bg-white pb-20 pt-1 text-l", children: jsx("iframe", { id: "iframe-dialog", name: "burger-menu-iframe", onLoad: () => handleIframeLoad(), src: menuItem?.src, width: menuDimensions?.width || 0 }) }) }));
|
|
9467
9416
|
});
|
|
9468
9417
|
|
|
9469
9418
|
const BURGER_MENU_DIALOG_ID = 'burgerMenuDialog';
|
|
9470
|
-
const useBurgerMenuDialog = ({ menuRef, centralMenuItem,
|
|
9471
|
-
const
|
|
9419
|
+
const useBurgerMenuDialog = ({ menuRef, centralMenuItem, locationDialogProps, onClose = noop, }) => {
|
|
9420
|
+
const { open } = useDialog(BurgerMenuDialog);
|
|
9421
|
+
const [dialogs] = useDialogsList(); // TODO Рефакторинг
|
|
9472
9422
|
const isBurgerMenuOpen = isDialogOpen(BURGER_MENU_DIALOG_ID, dialogs);
|
|
9473
|
-
const
|
|
9474
|
-
|
|
9475
|
-
});
|
|
9476
|
-
const toggle = () => {
|
|
9477
|
-
if (isBurgerMenuOpen) {
|
|
9478
|
-
closeAll();
|
|
9479
|
-
}
|
|
9480
|
-
else {
|
|
9481
|
-
open();
|
|
9482
|
-
}
|
|
9483
|
-
};
|
|
9484
|
-
return [isBurgerMenuOpen, { toggle }];
|
|
9423
|
+
const openDialog = useCallback(() => open({ menuRef, locationDialogProps, menuItem: centralMenuItem, onClose }, { id: BURGER_MENU_DIALOG_ID }), [menuRef, locationDialogProps, centralMenuItem, onClose]);
|
|
9424
|
+
return [isBurgerMenuOpen, { toggle: isBurgerMenuOpen ? onClose : openDialog }];
|
|
9485
9425
|
};
|
|
9486
9426
|
|
|
9487
9427
|
const EMPTY_MENU = [];
|
|
@@ -9494,34 +9434,32 @@
|
|
|
9494
9434
|
const rightItems = lateralMenuItems.slice(middleIdx);
|
|
9495
9435
|
const [activeIndex, setActiveIndex] = useState(-1);
|
|
9496
9436
|
const [currentItemPosition, setCurrentItemPosition] = useState('');
|
|
9497
|
-
const {
|
|
9498
|
-
const
|
|
9437
|
+
const { closeAll } = useDialogManager();
|
|
9438
|
+
const handleClose = useCallback(() => {
|
|
9499
9439
|
setActiveIndex(-1);
|
|
9500
9440
|
setCurrentItemPosition('');
|
|
9501
9441
|
closeAll();
|
|
9502
9442
|
}, [closeAll]);
|
|
9503
|
-
const dialogRef = useOutsideClick(
|
|
9443
|
+
const dialogRef = useOutsideClick(handleClose);
|
|
9504
9444
|
const menuRef = useRef(null);
|
|
9505
9445
|
const [isBurgerMenuDialogOpen, { toggle }] = useBurgerMenuDialog({
|
|
9506
9446
|
menuRef,
|
|
9507
9447
|
centralMenuItem,
|
|
9508
|
-
closeAll,
|
|
9509
|
-
openDialog,
|
|
9510
9448
|
locationDialogProps: rest.header,
|
|
9449
|
+
onClose: handleClose,
|
|
9511
9450
|
});
|
|
9512
|
-
const
|
|
9451
|
+
const openBottomMenuItemDialog = useBottomMenuItemDialog({
|
|
9513
9452
|
menuRef,
|
|
9514
9453
|
dialogRef,
|
|
9515
|
-
closeDialog,
|
|
9516
|
-
openDialog,
|
|
9517
9454
|
leftItems,
|
|
9518
9455
|
rightItems,
|
|
9456
|
+
onClose: handleClose,
|
|
9519
9457
|
});
|
|
9520
9458
|
const handleMenuBurgerClick = useCallback((e) => {
|
|
9521
|
-
closeDialog();
|
|
9522
9459
|
e.stopPropagation();
|
|
9460
|
+
handleClose();
|
|
9523
9461
|
toggle();
|
|
9524
|
-
}, [
|
|
9462
|
+
}, [handleClose, toggle]);
|
|
9525
9463
|
const handleMenuItemClick = useCallback((index, itemsPosition) => {
|
|
9526
9464
|
setCurrentItemPosition(itemsPosition);
|
|
9527
9465
|
setActiveIndex(index);
|
|
@@ -9954,35 +9892,29 @@
|
|
|
9954
9892
|
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;
|
|
9955
9893
|
});
|
|
9956
9894
|
|
|
9957
|
-
|
|
9958
|
-
const handleCloseAll = useCallback((dialogActions) => {
|
|
9959
|
-
for (const _ of dialogActions) {
|
|
9960
|
-
_?.onClose && _.onClose();
|
|
9961
|
-
}
|
|
9962
|
-
}, []);
|
|
9963
|
-
const handleClose = useCallback((_) => {
|
|
9964
|
-
_?.onClose && _.onClose();
|
|
9965
|
-
}, []);
|
|
9966
|
-
const dialogs = useDialogsList({ onCloseAll: handleCloseAll, onClose: handleClose });
|
|
9967
|
-
const { close } = useDialogManager();
|
|
9895
|
+
function useOnEscape(handler) {
|
|
9968
9896
|
const escapeHandler = useCallback(({ key }) => {
|
|
9969
9897
|
if (key === 'Escape') {
|
|
9970
|
-
|
|
9898
|
+
handler();
|
|
9971
9899
|
}
|
|
9972
|
-
}, []);
|
|
9900
|
+
}, [handler]);
|
|
9973
9901
|
useEventListener(globalThis.document, 'keydown', escapeHandler);
|
|
9902
|
+
}
|
|
9903
|
+
|
|
9904
|
+
const DialogManager = JSX(() => {
|
|
9905
|
+
const [dialogs, { close }] = useDialogsList();
|
|
9906
|
+
const hasDialogs = Boolean(dialogs.length);
|
|
9907
|
+
useOnEscape(close);
|
|
9974
9908
|
useEffect(() => {
|
|
9975
|
-
if (
|
|
9976
|
-
globalThis.document?.body.classList.add('no-scrollbar');
|
|
9977
|
-
globalThis.document?.body.classList.add('overflow-hidden');
|
|
9909
|
+
if (hasDialogs) {
|
|
9910
|
+
globalThis.document?.body.classList.add('no-scrollbar', 'overflow-hidden');
|
|
9978
9911
|
}
|
|
9979
9912
|
else {
|
|
9980
|
-
globalThis.document?.body.classList.remove('no-scrollbar');
|
|
9981
|
-
globalThis.document?.body.classList.remove('overflow-hidden');
|
|
9913
|
+
globalThis.document?.body.classList.remove('no-scrollbar', 'overflow-hidden');
|
|
9982
9914
|
}
|
|
9983
|
-
}, [
|
|
9984
|
-
return
|
|
9985
|
-
hidden: i !== dialogs.length - 1,
|
|
9915
|
+
}, [hasDialogs]);
|
|
9916
|
+
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', {
|
|
9917
|
+
hidden: i !== dialogs.length - 1, // TODO Чего?)
|
|
9986
9918
|
}), children: dialog }, String(id || i)))) })) : null;
|
|
9987
9919
|
});
|
|
9988
9920
|
|
|
@@ -9991,28 +9923,11 @@
|
|
|
9991
9923
|
const close = useCallback(() => {
|
|
9992
9924
|
setPopup(null);
|
|
9993
9925
|
}, []);
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
case 'open':
|
|
10000
|
-
case 'update':
|
|
10001
|
-
setPopup(action);
|
|
10002
|
-
break;
|
|
10003
|
-
case 'close':
|
|
10004
|
-
close();
|
|
10005
|
-
break;
|
|
10006
|
-
default:
|
|
10007
|
-
assertUnreachable(action);
|
|
10008
|
-
}
|
|
10009
|
-
}), []);
|
|
10010
|
-
const escapeHandler = useCallback(({ key }) => {
|
|
10011
|
-
if (key === 'Escape') {
|
|
10012
|
-
close();
|
|
10013
|
-
}
|
|
10014
|
-
}, [close]);
|
|
10015
|
-
useEventListener(globalThis.document, 'keydown', escapeHandler);
|
|
9926
|
+
useObservableWithActions(defaultEventBus.observable, 'popup', {
|
|
9927
|
+
open: setPopup,
|
|
9928
|
+
close,
|
|
9929
|
+
});
|
|
9930
|
+
useOnEscape(close);
|
|
10016
9931
|
return popup ? (jsx("div", { className: style('z-50', popup.fixed ? 'fixed' : 'absolute'), style: {
|
|
10017
9932
|
left: `${popup.left}px`,
|
|
10018
9933
|
top: `${popup.top}px`,
|
|
@@ -10050,7 +9965,7 @@
|
|
|
10050
9965
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10051
9966
|
});
|
|
10052
9967
|
|
|
10053
|
-
const packageVersion = "0.14.
|
|
9968
|
+
const packageVersion = "0.14.688";
|
|
10054
9969
|
|
|
10055
9970
|
exports.Blocks = Blocks;
|
|
10056
9971
|
exports.ContentPage = ContentPage;
|