@redneckz/wildless-cms-uni-blocks 0.14.600 → 0.14.602
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/EventBus/EventBus.d.ts +4 -17
- package/bundle/EventBus/defaultEventBus.d.ts +13 -2
- package/bundle/EventBus/useLatestEvent.d.ts +2 -0
- package/bundle/api/RetailApi/RetailApi.d.ts +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +243 -258
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/bundle/hooks/useLocation.d.ts +1 -2
- package/bundle/model/LinkProps.d.ts +3 -1
- package/bundle/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/bundle/ui-kit/Foldable/Foldable.d.ts +1 -11
- package/bundle/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/dist/EventBus/EventBus.d.ts +4 -17
- package/dist/EventBus/EventBus.js +10 -29
- package/dist/EventBus/EventBus.js.map +1 -1
- package/dist/EventBus/defaultEventBus.d.ts +13 -2
- package/dist/EventBus/defaultEventBus.js.map +1 -1
- package/dist/EventBus/useLatestEvent.d.ts +2 -0
- package/dist/EventBus/useLatestEvent.js +11 -0
- package/dist/EventBus/useLatestEvent.js.map +1 -0
- package/dist/api/RetailApi/RetailApi.d.ts +1 -0
- package/dist/api/RetailApi/RetailApi.js +1 -0
- package/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/dist/components/ApplicationLeadForm/consents.js +33 -10
- package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +25 -11
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/OfficesAtmsMap/AtmsMap.js +1 -1
- package/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesMap.js +1 -1
- package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/hooks/useLocation.d.ts +1 -2
- package/dist/hooks/useLocation.js +33 -27
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/hooks/useRegions.js +1 -3
- package/dist/hooks/useRegions.js.map +1 -1
- package/dist/model/LinkProps.d.ts +3 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +21 -0
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/dist/ui-kit/Checkbox/getDocument.js +9 -0
- package/dist/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/dist/ui-kit/DialogManager/useDialogManager.js +3 -3
- package/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/dist/ui-kit/DialogManager/useDialogsList.js +1 -1
- package/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.d.ts +1 -11
- package/dist/ui-kit/Foldable/Foldable.js +2 -10
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ConsentField.js +10 -0
- package/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/dist/ui-kit/FormField/constants.js +0 -1
- package/dist/ui-kit/FormField/constants.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +10 -17
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getValidation.js +0 -1
- package/dist/ui-kit/FormField/getValidation.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +12 -9
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/PopupManager/PopupManager.js +1 -1
- package/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/dist/ui-kit/PopupManager/usePopupManager.js +3 -3
- package/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/lib/EventBus/EventBus.d.ts +4 -17
- package/lib/EventBus/EventBus.js +10 -29
- package/lib/EventBus/EventBus.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +13 -2
- package/lib/EventBus/defaultEventBus.js.map +1 -1
- package/lib/EventBus/useLatestEvent.d.ts +2 -0
- package/lib/EventBus/useLatestEvent.js +8 -0
- package/lib/EventBus/useLatestEvent.js.map +1 -0
- package/lib/api/RetailApi/RetailApi.d.ts +1 -0
- package/lib/api/RetailApi/RetailApi.js +1 -0
- package/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/lib/components/ApplicationLeadForm/consents.js +33 -10
- package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +26 -12
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +2 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/OfficesAtmsMap/AtmsMap.js +2 -2
- package/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesMap.js +2 -2
- package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +1 -2
- package/lib/hooks/useLocation.js +33 -26
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/hooks/useRegions.js +1 -3
- package/lib/hooks/useRegions.js.map +1 -1
- package/lib/model/LinkProps.d.ts +3 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +19 -0
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/lib/ui-kit/Checkbox/getDocument.js +6 -0
- package/lib/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/lib/ui-kit/DialogManager/useDialogManager.js +3 -3
- package/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/lib/ui-kit/DialogManager/useDialogsList.js +1 -1
- package/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.d.ts +1 -11
- package/lib/ui-kit/Foldable/Foldable.js +2 -10
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ConsentField.js +8 -0
- package/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/lib/ui-kit/FormField/constants.js +0 -1
- package/lib/ui-kit/FormField/constants.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +10 -17
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getValidation.js +0 -1
- package/lib/ui-kit/FormField/getValidation.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +13 -10
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/PopupManager/PopupManager.js +1 -1
- package/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/lib/ui-kit/PopupManager/usePopupManager.js +3 -3
- package/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/mobile/bundle/EventBus/EventBus.d.ts +4 -17
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +13 -2
- package/mobile/bundle/EventBus/useLatestEvent.d.ts +2 -0
- package/mobile/bundle/api/RetailApi/RetailApi.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +243 -258
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/mobile/bundle/hooks/useLocation.d.ts +1 -2
- package/mobile/bundle/model/LinkProps.d.ts +3 -1
- package/mobile/bundle/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +1 -11
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/mobile/dist/EventBus/EventBus.d.ts +4 -17
- package/mobile/dist/EventBus/EventBus.js +10 -29
- package/mobile/dist/EventBus/EventBus.js.map +1 -1
- package/mobile/dist/EventBus/defaultEventBus.d.ts +13 -2
- package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/dist/EventBus/useLatestEvent.d.ts +2 -0
- package/mobile/dist/EventBus/useLatestEvent.js +11 -0
- package/mobile/dist/EventBus/useLatestEvent.js.map +1 -0
- package/mobile/dist/api/RetailApi/RetailApi.d.ts +1 -0
- package/mobile/dist/api/RetailApi/RetailApi.js +1 -0
- package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.js +33 -10
- package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +25 -11
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/hooks/useLocation.d.ts +1 -2
- package/mobile/dist/hooks/useLocation.js +33 -27
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/hooks/useRegions.js +1 -3
- package/mobile/dist/hooks/useRegions.js.map +1 -1
- package/mobile/dist/model/LinkProps.d.ts +3 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +21 -0
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/mobile/dist/ui-kit/Checkbox/getDocument.js +9 -0
- package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/mobile/dist/ui-kit/DialogManager/useDialogManager.js +3 -3
- package/mobile/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.js +1 -1
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +1 -11
- package/mobile/dist/ui-kit/Foldable/Foldable.js +2 -10
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js +10 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/constants.js +0 -1
- package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +10 -17
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getValidation.js +0 -1
- package/mobile/dist/ui-kit/FormField/getValidation.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +12 -9
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/PopupManager/PopupManager.js +1 -1
- package/mobile/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/mobile/dist/ui-kit/PopupManager/usePopupManager.js +3 -3
- package/mobile/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/mobile/lib/EventBus/EventBus.d.ts +4 -17
- package/mobile/lib/EventBus/EventBus.js +10 -29
- package/mobile/lib/EventBus/EventBus.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +13 -2
- package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/lib/EventBus/useLatestEvent.d.ts +2 -0
- package/mobile/lib/EventBus/useLatestEvent.js +8 -0
- package/mobile/lib/EventBus/useLatestEvent.js.map +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.d.ts +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.js +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +33 -10
- package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +26 -12
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +6 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +2 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js +2 -2
- package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +2 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +1 -2
- package/mobile/lib/hooks/useLocation.js +33 -26
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/hooks/useRegions.js +1 -3
- package/mobile/lib/hooks/useRegions.js.map +1 -1
- package/mobile/lib/model/LinkProps.d.ts +3 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +19 -0
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/mobile/lib/ui-kit/Checkbox/getDocument.js +6 -0
- package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/mobile/lib/ui-kit/DialogManager/useDialogManager.js +3 -3
- package/mobile/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.js +1 -1
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +1 -11
- package/mobile/lib/ui-kit/Foldable/Foldable.js +2 -10
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js +8 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/constants.js +0 -1
- package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +10 -17
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getValidation.js +0 -1
- package/mobile/lib/ui-kit/FormField/getValidation.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +13 -10
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/PopupManager/PopupManager.js +1 -1
- package/mobile/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/mobile/lib/ui-kit/PopupManager/usePopupManager.js +3 -3
- package/mobile/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
- package/mobile/src/EventBus/EventBus.ts +15 -51
- package/mobile/src/EventBus/defaultEventBus.ts +14 -2
- package/mobile/src/EventBus/useLatestEvent.ts +16 -0
- package/mobile/src/api/RetailApi/RetailApi.ts +1 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -0
- package/mobile/src/components/ApplicationLeadForm/consents.ts +40 -10
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +12 -9
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +14 -7
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +66 -23
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +6 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
- package/mobile/src/components/OfficesAtmsMap/AtmsMap.tsx +3 -2
- package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +2 -2
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
- package/mobile/src/hooks/useLocation.ts +44 -30
- package/mobile/src/hooks/useRegions.ts +1 -4
- package/mobile/src/model/LinkProps.ts +4 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +48 -0
- package/mobile/src/ui-kit/Checkbox/getDocument.ts +7 -0
- package/mobile/src/ui-kit/DialogManager/useDialogManager.ts +3 -3
- package/mobile/src/ui-kit/DialogManager/useDialogsList.ts +1 -1
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +5 -21
- package/mobile/src/ui-kit/FormField/Fields/ConsentField.tsx +16 -0
- package/mobile/src/ui-kit/FormField/constants.tsx +0 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +11 -19
- package/mobile/src/ui-kit/FormField/getValidation.tsx +0 -1
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +25 -13
- package/mobile/src/ui-kit/PopupManager/PopupManager.tsx +1 -1
- package/mobile/src/ui-kit/PopupManager/usePopupManager.tsx +3 -3
- package/package.json +1 -1
- package/src/EventBus/EventBus.ts +15 -51
- package/src/EventBus/defaultEventBus.ts +14 -2
- package/src/EventBus/useLatestEvent.ts +16 -0
- package/src/api/RetailApi/RetailApi.ts +1 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -0
- package/src/components/ApplicationLeadForm/consents.ts +40 -10
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +12 -9
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +14 -7
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +66 -23
- package/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +6 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
- package/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
- package/src/components/OfficesAtmsMap/AtmsMap.tsx +3 -2
- package/src/components/OfficesAtmsMap/OfficesMap.tsx +2 -2
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
- package/src/hooks/useLocation.ts +44 -30
- package/src/hooks/useRegions.ts +1 -4
- package/src/model/LinkProps.ts +4 -1
- package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +48 -0
- package/src/ui-kit/Checkbox/getDocument.ts +7 -0
- package/src/ui-kit/DialogManager/useDialogManager.ts +3 -3
- package/src/ui-kit/DialogManager/useDialogsList.ts +1 -1
- package/src/ui-kit/Foldable/Foldable.tsx +5 -21
- package/src/ui-kit/FormField/Fields/ConsentField.tsx +16 -0
- package/src/ui-kit/FormField/constants.tsx +0 -1
- package/src/ui-kit/FormField/getField.tsx +11 -19
- package/src/ui-kit/FormField/getValidation.tsx +0 -1
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +25 -13
- package/src/ui-kit/PopupManager/PopupManager.tsx +1 -1
- package/src/ui-kit/PopupManager/usePopupManager.tsx +3 -3
- package/bundle/EventBus/useSubject.d.ts +0 -2
- package/bundle/EventBus/useSubjectState.d.ts +0 -2
- package/bundle/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
- package/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
- package/bundle/hooks/useReducer.d.ts +0 -4
- package/bundle/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/bundle/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
- package/dist/EventBus/useSubject.d.ts +0 -2
- package/dist/EventBus/useSubject.js +0 -17
- package/dist/EventBus/useSubject.js.map +0 -1
- package/dist/EventBus/useSubjectState.d.ts +0 -2
- package/dist/EventBus/useSubjectState.js +0 -10
- package/dist/EventBus/useSubjectState.js.map +0 -1
- package/dist/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
- package/dist/components/CarouselTariffsCard/CardCellsSection.js +0 -18
- package/dist/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
- package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
- package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -5
- package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
- package/dist/hooks/useReducer.d.ts +0 -4
- package/dist/hooks/useReducer.js +0 -12
- package/dist/hooks/useReducer.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentInformField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentProviderField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/dist/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
- package/dist/ui-kit/LocationDialog/SelectedLocation.js +0 -15
- package/dist/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
- package/lib/EventBus/useSubject.d.ts +0 -2
- package/lib/EventBus/useSubject.js +0 -14
- package/lib/EventBus/useSubject.js.map +0 -1
- package/lib/EventBus/useSubjectState.d.ts +0 -2
- package/lib/EventBus/useSubjectState.js +0 -7
- package/lib/EventBus/useSubjectState.js.map +0 -1
- package/lib/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
- package/lib/components/CarouselTariffsCard/CardCellsSection.js +0 -16
- package/lib/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
- package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
- package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -3
- package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
- package/lib/hooks/useReducer.d.ts +0 -4
- package/lib/hooks/useReducer.js +0 -9
- package/lib/hooks/useReducer.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentInformField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentProviderField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/lib/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
- package/lib/ui-kit/LocationDialog/SelectedLocation.js +0 -13
- package/lib/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
- package/mobile/bundle/EventBus/useSubject.d.ts +0 -2
- package/mobile/bundle/EventBus/useSubjectState.d.ts +0 -2
- package/mobile/bundle/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
- package/mobile/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
- package/mobile/bundle/hooks/useReducer.d.ts +0 -4
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/mobile/bundle/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
- package/mobile/dist/EventBus/useSubject.d.ts +0 -2
- package/mobile/dist/EventBus/useSubject.js +0 -17
- package/mobile/dist/EventBus/useSubject.js.map +0 -1
- package/mobile/dist/EventBus/useSubjectState.d.ts +0 -2
- package/mobile/dist/EventBus/useSubjectState.js +0 -10
- package/mobile/dist/EventBus/useSubjectState.js.map +0 -1
- package/mobile/dist/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
- package/mobile/dist/components/CarouselTariffsCard/CardCellsSection.js +0 -18
- package/mobile/dist/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
- package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
- package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -5
- package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
- package/mobile/dist/hooks/useReducer.d.ts +0 -4
- package/mobile/dist/hooks/useReducer.js +0 -12
- package/mobile/dist/hooks/useReducer.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/mobile/dist/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
- package/mobile/dist/ui-kit/LocationDialog/SelectedLocation.js +0 -15
- package/mobile/dist/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
- package/mobile/lib/EventBus/useSubject.d.ts +0 -2
- package/mobile/lib/EventBus/useSubject.js +0 -14
- package/mobile/lib/EventBus/useSubject.js.map +0 -1
- package/mobile/lib/EventBus/useSubjectState.d.ts +0 -2
- package/mobile/lib/EventBus/useSubjectState.js +0 -7
- package/mobile/lib/EventBus/useSubjectState.js.map +0 -1
- package/mobile/lib/components/CarouselTariffsCard/CardCellsSection.d.ts +0 -9
- package/mobile/lib/components/CarouselTariffsCard/CardCellsSection.js +0 -16
- package/mobile/lib/components/CarouselTariffsCard/CardCellsSection.js.map +0 -1
- package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +0 -9
- package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +0 -3
- package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +0 -1
- package/mobile/lib/hooks/useReducer.d.ts +0 -4
- package/mobile/lib/hooks/useReducer.js +0 -9
- package/mobile/lib/hooks/useReducer.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/mobile/lib/ui-kit/LocationDialog/SelectedLocation.d.ts +0 -5
- package/mobile/lib/ui-kit/LocationDialog/SelectedLocation.js +0 -13
- package/mobile/lib/ui-kit/LocationDialog/SelectedLocation.js.map +0 -1
- package/mobile/src/EventBus/useSubject.ts +0 -19
- package/mobile/src/EventBus/useSubjectState.ts +0 -13
- package/mobile/src/components/CarouselTariffsCard/CardCellsSection.tsx +0 -54
- package/mobile/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +0 -11
- package/mobile/src/hooks/useReducer.ts +0 -21
- package/mobile/src/ui-kit/FormField/Fields/ConsentAssignmentField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ConsentCollectionField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ConsentInformField.tsx +0 -12
- package/mobile/src/ui-kit/FormField/Fields/ConsentPhotoField.tsx +0 -12
- package/mobile/src/ui-kit/FormField/Fields/ConsentProviderField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ProcessPersonalDataField.tsx +0 -16
- package/mobile/src/ui-kit/LocationDialog/SelectedLocation.tsx +0 -27
- package/src/EventBus/useSubject.ts +0 -19
- package/src/EventBus/useSubjectState.ts +0 -13
- package/src/components/CarouselTariffsCard/CardCellsSection.tsx +0 -54
- package/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +0 -11
- package/src/hooks/useReducer.ts +0 -21
- package/src/ui-kit/FormField/Fields/ConsentAssignmentField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentCollectionField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentInformField.tsx +0 -12
- package/src/ui-kit/FormField/Fields/ConsentPhotoField.tsx +0 -12
- package/src/ui-kit/FormField/Fields/ConsentProviderField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ProcessPersonalDataField.tsx +0 -16
- package/src/ui-kit/LocationDialog/SelectedLocation.tsx +0 -27
|
@@ -411,58 +411,39 @@
|
|
|
411
411
|
].join(' ');
|
|
412
412
|
|
|
413
413
|
class EventBus {
|
|
414
|
-
|
|
414
|
+
subscribers = {};
|
|
415
415
|
subjectsStateMap = {};
|
|
416
|
-
emitter = this;
|
|
417
|
-
observable = this;
|
|
418
416
|
subscribe(type, listener) {
|
|
419
|
-
this.
|
|
420
|
-
this.
|
|
421
|
-
|
|
417
|
+
this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
|
|
418
|
+
const latestEvent = this.subjectsStateMap[type];
|
|
419
|
+
if (latestEvent) {
|
|
420
|
+
listener(latestEvent);
|
|
421
|
+
}
|
|
422
422
|
return () => {
|
|
423
423
|
this.unsubscribe(type, listener);
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
unsubscribe(type, listener) {
|
|
427
|
-
|
|
428
|
-
if (index && index !== -1) {
|
|
429
|
-
this.subscribersMap[type]?.splice(index, 1);
|
|
430
|
-
}
|
|
427
|
+
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
431
428
|
}
|
|
432
429
|
fire(type, event) {
|
|
433
430
|
const isSubjectDeclared = type in this.subjectsStateMap;
|
|
434
431
|
if (isSubjectDeclared) {
|
|
435
|
-
this.subject(type, event);
|
|
436
|
-
}
|
|
437
|
-
else {
|
|
438
|
-
this.fireSubscribers(this.subscribersMap[type], event);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
subject(type, event) {
|
|
442
|
-
if (this.subjectsStateMap[type] !== event) {
|
|
443
432
|
this.subjectsStateMap[type] = event;
|
|
444
|
-
this.fireSubscribers(this.subscribersMap[type], event);
|
|
445
433
|
}
|
|
446
|
-
|
|
447
|
-
delete this.subjectsStateMap[type];
|
|
448
|
-
};
|
|
434
|
+
this.subscribers[type]?.forEach((s) => s(event));
|
|
449
435
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
for (const _ of subscribers) {
|
|
455
|
-
_(event);
|
|
456
|
-
}
|
|
436
|
+
subject(type, event) {
|
|
437
|
+
this.subjectsStateMap[type] = event;
|
|
457
438
|
}
|
|
458
439
|
}
|
|
459
440
|
|
|
460
441
|
const defaultEventBus = new EventBus();
|
|
461
442
|
|
|
462
443
|
const useDialogManager = () => ({
|
|
463
|
-
open: (dialog, options = {}) => defaultEventBus.
|
|
464
|
-
close: () => defaultEventBus.
|
|
465
|
-
closeAll: () => defaultEventBus.
|
|
444
|
+
open: (dialog, options = {}) => defaultEventBus.fire('dialog', { type: 'open', dialog, ...options }),
|
|
445
|
+
close: () => defaultEventBus.fire('dialog', { type: 'close' }),
|
|
446
|
+
closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
|
|
466
447
|
});
|
|
467
448
|
|
|
468
449
|
const adjustBase = (href, basePath = '') => href.replace(basePath, '') || '/';
|
|
@@ -1117,48 +1098,10 @@
|
|
|
1117
1098
|
{ key: 'phone', text: 'Телефонный звонок' },
|
|
1118
1099
|
{ key: 'email', text: 'Электронное сообщение' },
|
|
1119
1100
|
];
|
|
1120
|
-
// TODO Тоже надо рефакторить - файлик constants
|
|
1121
1101
|
const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
|
|
1122
1102
|
|
|
1123
1103
|
const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
|
|
1124
1104
|
|
|
1125
|
-
const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1126
|
-
|
|
1127
|
-
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1128
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1129
|
-
const resultOptions = { ...commonOptions, ...options };
|
|
1130
|
-
return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
|
|
1131
|
-
}) }));
|
|
1132
|
-
});
|
|
1133
|
-
|
|
1134
|
-
const defaultCheckStyle = 'appearance-none w-5 h-5 border-solid flex-none';
|
|
1135
|
-
|
|
1136
|
-
const CHECK_PATHS = [
|
|
1137
|
-
{
|
|
1138
|
-
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1139
|
-
fillRule: 'evenodd',
|
|
1140
|
-
clipRule: 'evenodd',
|
|
1141
|
-
fill: 'white',
|
|
1142
|
-
},
|
|
1143
|
-
];
|
|
1144
|
-
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1145
|
-
const handleChange = useCallback((e) => {
|
|
1146
|
-
if (disabled) {
|
|
1147
|
-
return;
|
|
1148
|
-
}
|
|
1149
|
-
e.preventDefault();
|
|
1150
|
-
onChange && onChange(!value);
|
|
1151
|
-
}, [onChange, disabled, value]);
|
|
1152
|
-
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1153
|
-
return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$3(text)] }) }));
|
|
1154
|
-
});
|
|
1155
|
-
const renderText$3 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1156
|
-
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1157
|
-
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1158
|
-
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
1159
|
-
|
|
1160
|
-
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
1161
|
-
|
|
1162
1105
|
function useBool(defaultValue = false) {
|
|
1163
1106
|
const [value, setValue] = useState(defaultValue);
|
|
1164
1107
|
const setTrue = useCallback(() => setValue(true), []);
|
|
@@ -1220,6 +1163,8 @@
|
|
|
1220
1163
|
const getValidStyle = (valid) => (valid ? inputValidStyle : 'border-error');
|
|
1221
1164
|
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1222
1165
|
|
|
1166
|
+
const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1167
|
+
|
|
1223
1168
|
const DEFAULT_HINTS_COUNT = 10;
|
|
1224
1169
|
const defaultResponseItemHandler = (item) => item?.value || '';
|
|
1225
1170
|
const getResponseHandler = (itemHandler) => (response) => {
|
|
@@ -1324,9 +1269,9 @@
|
|
|
1324
1269
|
};
|
|
1325
1270
|
|
|
1326
1271
|
const usePopupManager = () => ({
|
|
1327
|
-
open: (popup, options) => defaultEventBus.
|
|
1328
|
-
update: (popup, options) => defaultEventBus.
|
|
1329
|
-
close: () => defaultEventBus.
|
|
1272
|
+
open: (popup, options) => defaultEventBus.fire('popup', { type: 'open', popup, ...options }),
|
|
1273
|
+
update: (popup, options) => defaultEventBus.fire('popup', { type: 'update', popup, ...options }),
|
|
1274
|
+
close: () => defaultEventBus.fire('popup', { type: 'close' }),
|
|
1330
1275
|
});
|
|
1331
1276
|
|
|
1332
1277
|
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()))) })));
|
|
@@ -1595,7 +1540,6 @@
|
|
|
1595
1540
|
};
|
|
1596
1541
|
};
|
|
1597
1542
|
|
|
1598
|
-
// TODO Зачем это?
|
|
1599
1543
|
const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
|
|
1600
1544
|
|
|
1601
1545
|
const ACQUIRING_TYPES = [
|
|
@@ -1809,6 +1753,41 @@
|
|
|
1809
1753
|
|
|
1810
1754
|
const AnnualRevenueField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...getValidation(field('annualRevenue'), validatorObj.annualRevenue, input?.required) })));
|
|
1811
1755
|
|
|
1756
|
+
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1757
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1758
|
+
const resultOptions = { ...commonOptions, ...options };
|
|
1759
|
+
return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
|
|
1760
|
+
}) }));
|
|
1761
|
+
});
|
|
1762
|
+
|
|
1763
|
+
const defaultCheckStyle = 'appearance-none w-5 h-5 border-solid flex-none';
|
|
1764
|
+
|
|
1765
|
+
const CHECK_PATHS = [
|
|
1766
|
+
{
|
|
1767
|
+
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1768
|
+
fillRule: 'evenodd',
|
|
1769
|
+
clipRule: 'evenodd',
|
|
1770
|
+
fill: 'white',
|
|
1771
|
+
},
|
|
1772
|
+
];
|
|
1773
|
+
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1774
|
+
const handleChange = useCallback((e) => {
|
|
1775
|
+
if (disabled) {
|
|
1776
|
+
return;
|
|
1777
|
+
}
|
|
1778
|
+
e.preventDefault();
|
|
1779
|
+
onChange && onChange(!value);
|
|
1780
|
+
}, [onChange, disabled, value]);
|
|
1781
|
+
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1782
|
+
return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$3(text)] }) }));
|
|
1783
|
+
});
|
|
1784
|
+
const renderText$3 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1785
|
+
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1786
|
+
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1787
|
+
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
1788
|
+
|
|
1789
|
+
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
1790
|
+
|
|
1812
1791
|
const ArmyIdFlgField = JSX(({ field }) => (jsx(CheckboxWithError, { text: "\u041D\u0430\u043B\u0438\u0447\u0438\u0435 \u0432\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u0431\u0438\u043B\u0435\u0442\u0430", ...getValidation(field('armyIdFlg'), validatorObj.armyIdFlg) })));
|
|
1813
1792
|
|
|
1814
1793
|
const BankEmpoleeField = JSX(({ field }) => (jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') })));
|
|
@@ -1994,17 +1973,109 @@
|
|
|
1994
1973
|
return (jsx(SelectField, { field: field, source: conscription, label: "\u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u043E\u0435\u043D\u043D\u043E\u043E\u0431\u044F\u0437\u0430\u043D\u043D\u043E\u0433\u043E", fieldName: "conscription", input: input }));
|
|
1995
1974
|
});
|
|
1996
1975
|
|
|
1997
|
-
const
|
|
1976
|
+
const CONSENTS = {
|
|
1977
|
+
processPersonalDataLeadFlg: {
|
|
1978
|
+
text: 'Согласие на обработку персональных данных',
|
|
1979
|
+
docId: 4,
|
|
1980
|
+
},
|
|
1981
|
+
consentProviderFlg: {
|
|
1982
|
+
text: 'Согласие об использовании простой электронной подписи',
|
|
1983
|
+
docId: 5,
|
|
1984
|
+
},
|
|
1985
|
+
consentPfrFlg: {
|
|
1986
|
+
text: 'Согласие на запрос в ПФР',
|
|
1987
|
+
docId: 3,
|
|
1988
|
+
},
|
|
1989
|
+
consentPhotoFlg: {
|
|
1990
|
+
text: 'Прочие согласия (согласие на фотографирование)',
|
|
1991
|
+
docId: 1,
|
|
1992
|
+
},
|
|
1993
|
+
consentAssignmentClaimsFlg: {
|
|
1994
|
+
text: 'Прочие согласия (согласие на уступку прав требований)',
|
|
1995
|
+
docId: 1,
|
|
1996
|
+
},
|
|
1997
|
+
consentCollectionFlg: {
|
|
1998
|
+
text: 'Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)',
|
|
1999
|
+
docId: 1,
|
|
2000
|
+
},
|
|
2001
|
+
consentInformFlg: {
|
|
2002
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
2003
|
+
docId: 14,
|
|
2004
|
+
},
|
|
2005
|
+
consentToReceiveMaterials: {
|
|
2006
|
+
text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
|
|
2007
|
+
},
|
|
2008
|
+
};
|
|
2009
|
+
|
|
2010
|
+
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" }) })));
|
|
1998
2011
|
|
|
1999
|
-
const
|
|
2012
|
+
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
2013
|
+
const { close } = useDialogManager();
|
|
2014
|
+
const handleClose = useCallback(() => {
|
|
2015
|
+
close();
|
|
2016
|
+
onClose && onClose();
|
|
2017
|
+
}, [onClose]);
|
|
2018
|
+
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 })] }));
|
|
2019
|
+
});
|
|
2000
2020
|
|
|
2001
|
-
const
|
|
2021
|
+
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2022
|
+
const getAthorizationHeaders = () => {
|
|
2023
|
+
const token = sessionStorage.getItem('accessToken');
|
|
2024
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2025
|
+
};
|
|
2026
|
+
const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
|
|
2027
|
+
const request = async (url, method, body) => await fetch('https://retail-light-api.cprb.dev.rshbdev.ru/api/v1' + url, {
|
|
2028
|
+
method,
|
|
2029
|
+
headers: {
|
|
2030
|
+
'Content-Type': 'application/json',
|
|
2031
|
+
...getAthorizationHeaders(),
|
|
2032
|
+
},
|
|
2033
|
+
credentials: 'include',
|
|
2034
|
+
body: body ? JSON.stringify(body) : null,
|
|
2035
|
+
})
|
|
2036
|
+
.then((response) => {
|
|
2037
|
+
if (response.ok) {
|
|
2038
|
+
return getResponse(response);
|
|
2039
|
+
}
|
|
2040
|
+
else {
|
|
2041
|
+
throw response;
|
|
2042
|
+
}
|
|
2043
|
+
})
|
|
2044
|
+
.catch((error) => {
|
|
2045
|
+
throw error;
|
|
2046
|
+
});
|
|
2047
|
+
const saveToken = (data) => {
|
|
2048
|
+
sessionStorage.setItem('accessToken', data.access_token);
|
|
2049
|
+
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
2050
|
+
};
|
|
2051
|
+
const RETAIL_API = {
|
|
2052
|
+
CreateUserProfile: async (body) => await request('/public-data/createUserProfile', 'POST', body),
|
|
2053
|
+
UpdateUserProfile: async (body) => await request('/user-data/updateUserProfile', 'PUT', body),
|
|
2054
|
+
CreateDraftTask: async (body) => await request('/user-data/createDraftTask', 'POST', body),
|
|
2055
|
+
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2056
|
+
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2057
|
+
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2058
|
+
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2059
|
+
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2060
|
+
GetFileByID: async (id) => await request(`/feedback/file?id=${id}`, 'GET'),
|
|
2061
|
+
};
|
|
2002
2062
|
|
|
2003
|
-
const
|
|
2063
|
+
const getDocument = async (id) => {
|
|
2064
|
+
const response = await RETAIL_API.GetFileByID(id);
|
|
2065
|
+
return URL.createObjectURL(await response.blob());
|
|
2066
|
+
};
|
|
2004
2067
|
|
|
2005
|
-
const
|
|
2068
|
+
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
2069
|
+
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
2070
|
+
const { open } = useDialogManager();
|
|
2071
|
+
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: () => handleOpenDocument(docId, open), children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
|
|
2072
|
+
});
|
|
2073
|
+
const handleOpenDocument = async (id, open) => {
|
|
2074
|
+
const document = await getDocument(id);
|
|
2075
|
+
open(jsx(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", children: jsx("iframe", { src: `${document}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" }) }));
|
|
2076
|
+
};
|
|
2006
2077
|
|
|
2007
|
-
const
|
|
2078
|
+
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);
|
|
2008
2079
|
|
|
2009
2080
|
const DependentsField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0438\u0436\u0434\u0438\u0432\u0435\u043D\u0446\u0435\u0432", placeholder: "\u0417\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u0435\u0442\u0435\u0439 \u0434\u043E 18 \u043B\u0435\u0442", type: "number", ...getValidation(field('dependents'), validatorObj.dependents, input?.required), ...input })));
|
|
2010
2081
|
|
|
@@ -2097,11 +2168,9 @@
|
|
|
2097
2168
|
const LegalFormField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u041F\u0424", placeholder: "\u041E\u041E\u041E, \u041F\u0410\u041E \u0438 \u0434\u0440.", ...getValidation(field('legalForm'), validatorObj.legalForm, input?.required), ...input })));
|
|
2098
2169
|
|
|
2099
2170
|
const REGIONS_URL = '/api/v1/regions';
|
|
2100
|
-
const EMPTY_REGIONS = [];
|
|
2101
|
-
// TODO Почему url можно менять? Разве смысл не в инкапсуляции api url. Тоже под рефакторинг попадает
|
|
2102
2171
|
function useRegions(url = REGIONS_URL) {
|
|
2103
2172
|
const { data } = useAsyncData(url, fetchJSONUnsafe);
|
|
2104
|
-
return Array.isArray(data) ? data :
|
|
2173
|
+
return Array.isArray(data) ? data : [];
|
|
2105
2174
|
}
|
|
2106
2175
|
|
|
2107
2176
|
const LocalitiesField = JSX(({ field, input }) => {
|
|
@@ -2183,8 +2252,6 @@
|
|
|
2183
2252
|
|
|
2184
2253
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
2185
2254
|
|
|
2186
|
-
const ProcessPersonalDataField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", ...getValidation(field('processPersonalDataLeadFlg'), validatorObj.processPersonalDataLeadFlg, input?.required) })));
|
|
2187
|
-
|
|
2188
2255
|
const ProductField = UniBlock(({ field, source }) => (jsx(SelectControl, { placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0434\u0443\u043A\u0442", label: "\u041F\u0440\u043E\u0434\u0443\u043A\u0442", options: arrayToOptions(source?.productList), ...withValidator(field('product'), validatorObj.product) })));
|
|
2189
2256
|
const arrayToOptions = (array) => (array ?? []).map((_) => ({ key: _, value: _ }));
|
|
2190
2257
|
|
|
@@ -2339,15 +2406,15 @@
|
|
|
2339
2406
|
serviceDirection: jsx(ServiceDirectionField, { field: field, input: input }),
|
|
2340
2407
|
bankEmpolee: jsx(BankEmpoleeField, { field: field }),
|
|
2341
2408
|
secondaryPhone: jsx(SecondaryPhoneField, { field: field }),
|
|
2342
|
-
consentToReceiveMaterials: jsx(
|
|
2343
|
-
processPersonalDataLeadFlg: jsx(
|
|
2344
|
-
consentProviderFlg: jsx(
|
|
2345
|
-
consentPhotoFlg: jsx(
|
|
2346
|
-
consentAssignmentClaimsFlg: jsx(
|
|
2347
|
-
consentCollectionFlg: jsx(
|
|
2348
|
-
consentInformFlg: jsx(
|
|
2409
|
+
consentToReceiveMaterials: jsx(ConsentField, { field: field, input: input }),
|
|
2410
|
+
processPersonalDataLeadFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2411
|
+
consentProviderFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2412
|
+
consentPhotoFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2413
|
+
consentAssignmentClaimsFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2414
|
+
consentCollectionFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2415
|
+
consentInformFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2416
|
+
consentPfrFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2349
2417
|
applicationDate: (jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })),
|
|
2350
|
-
consentPfrFlg: (jsx(CheckboxWithError, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u043D\u0430 \u0437\u0430\u043F\u0440\u043E\u0441 \u0432 \u041F\u0424\u0420", ...field('consentPfrFlg') })),
|
|
2351
2418
|
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input, url: getRegionUrl(typeForm) })),
|
|
2352
2419
|
education: jsx(EducationField, { field: field, input: input }),
|
|
2353
2420
|
housing: jsx(HousingField, { field: field, input: input }),
|
|
@@ -2359,7 +2426,6 @@
|
|
|
2359
2426
|
positionOrganization: jsx(PositionOrganizationField, { field: field, input: input }),
|
|
2360
2427
|
familyStatus: jsx(FamilyStatusField, { field: field, input: input }),
|
|
2361
2428
|
children: jsx(ChildrenField, { field: field, input: input }),
|
|
2362
|
-
// eslint-disable-next-line max-lines
|
|
2363
2429
|
familyMembers: jsx(FamilyMembersField, { field: field, input: input }),
|
|
2364
2430
|
dependents: jsx(DependentsField, { field: field, input: input }),
|
|
2365
2431
|
totalIncome: jsx(TotalIncomeField, { field: field, input: input }),
|
|
@@ -2369,6 +2435,7 @@
|
|
|
2369
2435
|
armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
|
|
2370
2436
|
dulSerie: jsx(DulSerieField, { field: field, input: input }),
|
|
2371
2437
|
dulNumber: jsx(DulNumberField, { field: field, input: input }),
|
|
2438
|
+
// eslint-disable-next-line max-lines
|
|
2372
2439
|
dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
|
|
2373
2440
|
dulSubdivisionCode: jsx(DulSubdivisionCodeField, { field: field, input: input }),
|
|
2374
2441
|
dulIssuedBy: jsx(DulIssuedByField, { field: field, input: input }),
|
|
@@ -2414,17 +2481,6 @@
|
|
|
2414
2481
|
: '', className), type: type, role: role, onClick: onClick, children: children }));
|
|
2415
2482
|
});
|
|
2416
2483
|
|
|
2417
|
-
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" }) })));
|
|
2418
|
-
|
|
2419
|
-
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
2420
|
-
const { close } = useDialogManager();
|
|
2421
|
-
const handleClose = useCallback(() => {
|
|
2422
|
-
close();
|
|
2423
|
-
onClose && onClose();
|
|
2424
|
-
}, [onClose]);
|
|
2425
|
-
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 })] }));
|
|
2426
|
-
});
|
|
2427
|
-
|
|
2428
2484
|
const ResponseTypeDialog = JSX(function ({ responseType, typeForm, }) {
|
|
2429
2485
|
const responseOK = responseType === 'OK';
|
|
2430
2486
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
@@ -2585,17 +2641,6 @@
|
|
|
2585
2641
|
return [storedValue, setValue];
|
|
2586
2642
|
}
|
|
2587
2643
|
|
|
2588
|
-
const CONSENTS = [
|
|
2589
|
-
'processPersonalDataLeadFlg',
|
|
2590
|
-
'consentProviderFlg',
|
|
2591
|
-
'consentPfrFlg',
|
|
2592
|
-
'consentPhotoFlg',
|
|
2593
|
-
'consentAssignmentClaimsFlg',
|
|
2594
|
-
'consentCollectionFlg',
|
|
2595
|
-
'consentInformFlg',
|
|
2596
|
-
'consentToReceiveMaterials',
|
|
2597
|
-
];
|
|
2598
|
-
|
|
2599
2644
|
const initialFormState = {
|
|
2600
2645
|
typeForm: '',
|
|
2601
2646
|
region: { key: '', text: '' },
|
|
@@ -2643,14 +2688,6 @@
|
|
|
2643
2688
|
return { ...formState, typeForm: { key: typeForm, text: '' } };
|
|
2644
2689
|
};
|
|
2645
2690
|
|
|
2646
|
-
const FoldableWrapper = JSX(({ className, children }) => (jsx("div", { className: className, role: "group", children: children })));
|
|
2647
|
-
/**
|
|
2648
|
-
* Какой то бесполезный компонент. Его можно заменить на useBool
|
|
2649
|
-
* Лучше оставить только обёрточный div с необходимой атрибутикой
|
|
2650
|
-
* и сделать пассивный компонент
|
|
2651
|
-
*
|
|
2652
|
-
* @deprecated
|
|
2653
|
-
*/
|
|
2654
2691
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2655
2692
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2656
2693
|
const onToggle = useCallback(() => {
|
|
@@ -2658,7 +2695,7 @@
|
|
|
2658
2695
|
}, []);
|
|
2659
2696
|
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
2660
2697
|
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
2661
|
-
return isFoldButtonOnTop ? (jsxs(
|
|
2698
|
+
return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
|
|
2662
2699
|
});
|
|
2663
2700
|
|
|
2664
2701
|
function useResizeObserver(callback, deps) {
|
|
@@ -2704,53 +2741,12 @@
|
|
|
2704
2741
|
const hasValidationErrors = useMemo(() => inputs
|
|
2705
2742
|
?.filter((_) => _.required)
|
|
2706
2743
|
?.some((_) => Boolean(withValidator(field(_?.name), validatorObj[_?.name]).error)), [inputs]);
|
|
2707
|
-
return (jsx("div", { className: "w-fit", children: jsx(Foldable, { isFoldButtonOnTop: true, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, className: "flex flex-col pl-2xl", children: inputs.map(getField(field, typeForm)) })), renderFoldButton: renderGeneralCheckbox(jsxs("div", { children: [jsx(Checkbox, { value: isChecked, onChange: handleGeneralToggle, text: CONSENT_ALL_DOCS_TEXT }, key), renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')] })) }) }));
|
|
2744
|
+
return (jsx("div", { className: "w-fit", children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: true, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, className: "flex flex-col pl-2xl", children: inputs.map(getField(field, typeForm)) })), renderFoldButton: renderGeneralCheckbox(jsxs("div", { children: [jsx(Checkbox, { value: isChecked, onChange: handleGeneralToggle, text: CONSENT_ALL_DOCS_TEXT }, key), renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')] })) }) }));
|
|
2708
2745
|
});
|
|
2709
2746
|
const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (jsxs("div", { className: "flex items-start", children: [generalCheckBox, jsx("button", { onClick: foldableData.onToggle, className: "px-m py-2xs", children: jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
|
|
2710
2747
|
|
|
2711
2748
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
2712
2749
|
|
|
2713
|
-
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2714
|
-
const getAthorizationHeaders = () => {
|
|
2715
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2716
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2717
|
-
};
|
|
2718
|
-
const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
|
|
2719
|
-
const request = async (url, method, body) => await fetch('https://retail-light-api.cprb.dev.rshbdev.ru/api/v1' + url, {
|
|
2720
|
-
method,
|
|
2721
|
-
headers: {
|
|
2722
|
-
'Content-Type': 'application/json',
|
|
2723
|
-
...getAthorizationHeaders(),
|
|
2724
|
-
},
|
|
2725
|
-
credentials: 'include',
|
|
2726
|
-
body: body ? JSON.stringify(body) : null,
|
|
2727
|
-
})
|
|
2728
|
-
.then((response) => {
|
|
2729
|
-
if (response.ok) {
|
|
2730
|
-
return getResponse(response);
|
|
2731
|
-
}
|
|
2732
|
-
else {
|
|
2733
|
-
throw response;
|
|
2734
|
-
}
|
|
2735
|
-
})
|
|
2736
|
-
.catch((error) => {
|
|
2737
|
-
throw error;
|
|
2738
|
-
});
|
|
2739
|
-
const saveToken = (data) => {
|
|
2740
|
-
sessionStorage.setItem('accessToken', data.access_token);
|
|
2741
|
-
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
2742
|
-
};
|
|
2743
|
-
const RETAIL_API = {
|
|
2744
|
-
CreateUserProfile: async (body) => await request('/public-data/createUserProfile', 'POST', body),
|
|
2745
|
-
UpdateUserProfile: async (body) => await request('/user-data/updateUserProfile', 'PUT', body),
|
|
2746
|
-
CreateDraftTask: async (body) => await request('/user-data/createDraftTask', 'POST', body),
|
|
2747
|
-
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2748
|
-
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2749
|
-
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2750
|
-
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2751
|
-
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2752
|
-
};
|
|
2753
|
-
|
|
2754
2750
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
2755
2751
|
const { name = '', surname = '', middleName = '', birthday = '', phone = '', email = '', processPersonalDataLeadFlg, consentProviderFlg, consentPfrFlg, consentPhotoFlg, consentAssignmentClaimsFlg, consentCollectionFlg, consentInformFlg, } = formData;
|
|
2756
2752
|
return {
|
|
@@ -3084,10 +3080,13 @@
|
|
|
3084
3080
|
setResponseStatus('Fail');
|
|
3085
3081
|
}
|
|
3086
3082
|
};
|
|
3083
|
+
const acceptedConsents = Object.keys(CONSENTS)
|
|
3084
|
+
.filter((_) => formData[_])
|
|
3085
|
+
.map((_) => CONSENTS[_]);
|
|
3087
3086
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
3088
3087
|
const verifyPhoneDialog = useVerifyPhoneDialog({
|
|
3089
3088
|
close: handleSuccessVerify,
|
|
3090
|
-
...verifyPhoneContent(formData?.phone),
|
|
3089
|
+
...verifyPhoneContent(formData?.phone, acceptedConsents),
|
|
3091
3090
|
});
|
|
3092
3091
|
verifyPhoneDialog.open();
|
|
3093
3092
|
}
|
|
@@ -3101,17 +3100,14 @@
|
|
|
3101
3100
|
responseStatus,
|
|
3102
3101
|
};
|
|
3103
3102
|
};
|
|
3104
|
-
const verifyPhoneContent = (phone) => ({
|
|
3103
|
+
const verifyPhoneContent = (phone, consents) => ({
|
|
3105
3104
|
title: 'Подтвердите номер телефона',
|
|
3106
3105
|
description: `Мы отправили код на ${phone}`,
|
|
3107
3106
|
phoneNumber: formatPhone(phone),
|
|
3108
3107
|
textButton: 'Оформить',
|
|
3109
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span
|
|
3110
|
-
<ul><li>соглашение о порядке использования простой электронной подписи,
|
|
3111
|
-
</li><li>согласие на обработку персональных данных,
|
|
3112
|
-
</li><li>предоставление и подписание прочих согласий Банка,
|
|
3113
|
-
</li><li>согласие на запрос в ПФР</li></ul>`,
|
|
3108
|
+
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
|
|
3114
3109
|
});
|
|
3110
|
+
const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
3115
3111
|
|
|
3116
3112
|
const useInitApplicationLead = () => {
|
|
3117
3113
|
useEffect(() => {
|
|
@@ -3149,8 +3145,8 @@
|
|
|
3149
3145
|
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm)));
|
|
3150
3146
|
};
|
|
3151
3147
|
const splitInputs = (inputs) => ({
|
|
3152
|
-
consentInputs: inputs?.filter((_) => CONSENTS.includes(_.name)) || [],
|
|
3153
|
-
restInputs: inputs?.filter((_) => !CONSENTS.includes(_.name)) || [],
|
|
3148
|
+
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
|
|
3149
|
+
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
|
|
3154
3150
|
});
|
|
3155
3151
|
|
|
3156
3152
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -4747,37 +4743,31 @@
|
|
|
4747
4743
|
const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, isDotted, __html, socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, data, ...rest }) => (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", data: getAspectsWithInclude(data), children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, stretched: true, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), __html ? jsx(RichText, { __html: __html, isDotted: isDotted, itemSize: "list-s" }) : null, renderAdditionalDescription(additionalDescription, align)] }) }) })));
|
|
4748
4744
|
const renderAdditionalDescription = (additionalDescription, align) => additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", align: align, children: additionalDescription })) : null;
|
|
4749
4745
|
|
|
4750
|
-
const useSubjectState = (eventBus, type, initialState) => {
|
|
4751
|
-
const [state, setState] = useState(initialState);
|
|
4752
|
-
useEffect(() => eventBus.subscribe(type, setState), [eventBus, type]);
|
|
4753
|
-
return state;
|
|
4754
|
-
};
|
|
4755
|
-
|
|
4756
4746
|
const renderCardInfo = (cell, i) => {
|
|
4757
4747
|
const { title, description, buttons } = cell;
|
|
4758
4748
|
return (jsxs("div", { className: "py-lg border-b border-main-divider", children: [title ? (jsx("div", { className: "opacity-80", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: title }) })) : null, description ? (jsx("div", { className: "mt-2xs", children: jsx(Text, { size: "text-xl", color: "text-primary-text", children: description }) })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
|
|
4759
4749
|
};
|
|
4760
4750
|
|
|
4761
|
-
const
|
|
4762
|
-
const
|
|
4763
|
-
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
4764
|
-
? [
|
|
4765
|
-
: [
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
parent
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4751
|
+
const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, data, ...rest }) => {
|
|
4752
|
+
const cellsNode = cardCells.map(renderCardInfo);
|
|
4753
|
+
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
4754
|
+
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
4755
|
+
: [cellsNode, []];
|
|
4756
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
4757
|
+
useEffect(() => defaultEventBus.subscribe('fold', (event) => {
|
|
4758
|
+
if (options?.parent !== undefined && event.parent === options?.parent) {
|
|
4759
|
+
setIsVisible(event.isUnfolded);
|
|
4760
|
+
}
|
|
4761
|
+
}), [options?.parent]);
|
|
4762
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (jsx(Foldable, { renderFoldableSection: () => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isVisible, children: hiddenCells })] })), renderFoldButton: cardCells.length >= visibleCellsCount
|
|
4763
|
+
? renderFoldButton$3(options?.parent, data, isVisible)
|
|
4764
|
+
: null })) : (jsx("div", { children: visibleCells }))] }));
|
|
4765
|
+
});
|
|
4766
|
+
const renderFoldButton$3 = (parent, data, isUnfolded = false) => () => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: () => {
|
|
4767
|
+
if (parent !== undefined) {
|
|
4768
|
+
defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
|
|
4769
|
+
}
|
|
4770
|
+
}, type: "button", ...(isUnfolded ? getAspectsAttributes(data) : {}), children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
4781
4771
|
|
|
4782
4772
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
4783
4773
|
|
|
@@ -4944,46 +4934,47 @@
|
|
|
4944
4934
|
};
|
|
4945
4935
|
const ErrorBlock = JSX(({ className = '', title, description, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-center items-center', className), defaultPadding: style('p-6xl'), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center", children: renderErrorContent(error) }), jsx(Headline, { title: title, description: description, headlineVersion: "XL", isEmbedded: true, className: "mb-2xl last:mb-0" }), button?.text ? (jsx(LinkButton, { version: button?.version, text: button?.text, ...button })) : null] })));
|
|
4946
4936
|
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
else {
|
|
4954
|
-
eventBus.subject(type, state);
|
|
4955
|
-
}
|
|
4956
|
-
}, [eventBus, type]);
|
|
4957
|
-
return useCallback((_) => eventBus.fire(type, _), [eventBus, type]);
|
|
4958
|
-
}
|
|
4937
|
+
const useLatestEvent = (eventBus, type, initialEvent) => {
|
|
4938
|
+
const [latestEvent, setLatestEvent] = useState(initialEvent || null);
|
|
4939
|
+
useEffect(() => eventBus.subscribe(type, (_) => setLatestEvent(_)), [eventBus, type]);
|
|
4940
|
+
const fireEvent = useCallback((_) => eventBus.fire(type, _), [eventBus, type]);
|
|
4941
|
+
return [latestEvent, fireEvent];
|
|
4942
|
+
};
|
|
4959
4943
|
|
|
4960
4944
|
const REGION_URL = '/api/v1/region';
|
|
4961
4945
|
const LOCATION_STORAGE_KEY = 'location';
|
|
4962
4946
|
function useLocation(defaultLocation = 'Москва') {
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
storeLocation(await fetchJSON(REGION_URL));
|
|
4973
|
-
}
|
|
4974
|
-
const storedLocation = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
|
|
4975
|
-
try {
|
|
4976
|
-
return storedLocation && JSON.parse(storedLocation);
|
|
4977
|
-
}
|
|
4978
|
-
catch (ex) {
|
|
4979
|
-
// Do nothing
|
|
4947
|
+
const [currentLocation, fireCurrentLocation] = useLatestEvent(defaultEventBus, 'location', restoreLocation() ?? { name: defaultLocation });
|
|
4948
|
+
const selectCurrentLocation = useCallback((_) => {
|
|
4949
|
+
storeLocation(_);
|
|
4950
|
+
fireCurrentLocation(_);
|
|
4951
|
+
}, []);
|
|
4952
|
+
const { data } = useAsyncData(hasStoredLocation() ? null : REGION_URL, fetchJSONUnsafe);
|
|
4953
|
+
useEffect(() => {
|
|
4954
|
+
if (data && !hasStoredLocation()) {
|
|
4955
|
+
fireCurrentLocation(data);
|
|
4980
4956
|
}
|
|
4981
|
-
|
|
4982
|
-
};
|
|
4983
|
-
}
|
|
4984
|
-
function storeLocation(_) {
|
|
4985
|
-
_ && globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
|
|
4957
|
+
}, [data]);
|
|
4958
|
+
return [currentLocation ?? { name: defaultLocation }, selectCurrentLocation];
|
|
4986
4959
|
}
|
|
4960
|
+
const hasStoredLocation = () => Boolean(globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY));
|
|
4961
|
+
const restoreLocation = () => {
|
|
4962
|
+
try {
|
|
4963
|
+
const data = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
|
|
4964
|
+
return data && JSON.parse(data);
|
|
4965
|
+
}
|
|
4966
|
+
catch (ex) {
|
|
4967
|
+
return null;
|
|
4968
|
+
}
|
|
4969
|
+
};
|
|
4970
|
+
const storeLocation = (_) => {
|
|
4971
|
+
try {
|
|
4972
|
+
globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
|
|
4973
|
+
}
|
|
4974
|
+
catch (ex) {
|
|
4975
|
+
// Do nothing
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4987
4978
|
|
|
4988
4979
|
var Currency;
|
|
4989
4980
|
(function (Currency) {
|
|
@@ -5125,7 +5116,7 @@
|
|
|
5125
5116
|
}
|
|
5126
5117
|
|
|
5127
5118
|
const ExchangeRateTile = JSX(({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
|
|
5128
|
-
const currentLocation =
|
|
5119
|
+
const [currentLocation] = useLocation();
|
|
5129
5120
|
const exchangeRates = useFetchExchangeRateData(currentLocation);
|
|
5130
5121
|
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
5131
5122
|
const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
|
|
@@ -5978,7 +5969,7 @@
|
|
|
5978
5969
|
designDisabledPeople: (item) => Boolean(item.designDisabledPeople),
|
|
5979
5970
|
};
|
|
5980
5971
|
const AtmsMap = JSX(({ descriptionData, className }) => {
|
|
5981
|
-
const currentLocation =
|
|
5972
|
+
const [currentLocation] = useLocation();
|
|
5982
5973
|
const regionCode = currentLocation?.code ?? '000';
|
|
5983
5974
|
const { data: officesData, isLoad } = useAtms(regionCode);
|
|
5984
5975
|
return (jsx(OfficesAtmsMapLayout, { className: className, filterItems: filterItems, data: officesData, isLoad: isLoad, initFilterState: INITIAL_FILTRATION_STATE, renderCard: renderAtmCard, getBalloon: getAtmPoint, title: `Банкоматы филиала ${currentLocation?.name}`, descriptionData: descriptionData }));
|
|
@@ -6197,7 +6188,7 @@
|
|
|
6197
6188
|
};
|
|
6198
6189
|
|
|
6199
6190
|
const OfficesMap = JSX(({ className }) => {
|
|
6200
|
-
const currentLocation =
|
|
6191
|
+
const [currentLocation] = useLocation();
|
|
6201
6192
|
const regionCode = currentLocation?.code ?? '000';
|
|
6202
6193
|
const { data, isLoad } = useOffices(regionCode);
|
|
6203
6194
|
return (jsx(OfficesAtmsMapLayout, { className: className, data: data?.branches, isLoad: isLoad, remoteWorkplaces: data?.remoteWorkplaces, renderCard: renderOfficeCard, renderRemoteWorkplaceCard: renderRemoteWorkplaceCard, getBalloon: getOfficePoint, getBalloonRemoteWorkplaces: getRemoteWorkplacePoint, title: `Офисы филиала ${currentLocation?.name}` }));
|
|
@@ -6445,7 +6436,7 @@
|
|
|
6445
6436
|
onClose && onClose(dialogs[dialogs.length - 1]);
|
|
6446
6437
|
pop();
|
|
6447
6438
|
}, [dialogs, onClose]);
|
|
6448
|
-
useEffect(() => defaultEventBus.
|
|
6439
|
+
useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
|
|
6449
6440
|
switch (action.type) {
|
|
6450
6441
|
case 'open':
|
|
6451
6442
|
push(action);
|
|
@@ -6554,33 +6545,27 @@
|
|
|
6554
6545
|
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: style(inputValidStyle, `h-12 pl-m w-full peer text-l text-black rounded-md box-border`), value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
|
|
6555
6546
|
});
|
|
6556
6547
|
|
|
6557
|
-
const SelectedLocation = JSX(({ defaultLocation }) => {
|
|
6558
|
-
const currentLocation = useLocationState(defaultLocation);
|
|
6559
|
-
const link = useLink();
|
|
6560
|
-
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
6561
|
-
return currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null;
|
|
6562
|
-
});
|
|
6563
|
-
|
|
6564
6548
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
6565
6549
|
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
6566
|
-
const
|
|
6550
|
+
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
6551
|
+
const link = useLink();
|
|
6552
|
+
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
6567
6553
|
const [query, setQuery] = useState('');
|
|
6568
|
-
const
|
|
6569
|
-
const
|
|
6570
|
-
const regionsGroupByLetter = useMemo(() => groupBy(regions, regionFirstLetter), [regions]);
|
|
6554
|
+
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
6555
|
+
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
6571
6556
|
const { close } = useDialogManager();
|
|
6572
6557
|
const handleChangeLocation = useCallback((region) => {
|
|
6573
|
-
|
|
6558
|
+
selectCurrentLocation(region);
|
|
6574
6559
|
close();
|
|
6575
6560
|
}, []);
|
|
6576
|
-
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(
|
|
6561
|
+
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" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
6577
6562
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
6578
6563
|
.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)] }));
|
|
6579
6564
|
});
|
|
6580
|
-
const regionFirstLetter = (region) => region.name?.charAt(0)
|
|
6565
|
+
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
6581
6566
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
6582
6567
|
...region,
|
|
6583
|
-
name: region.name?.replace(/республика|область|край'/gi, '').trim()
|
|
6568
|
+
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
6584
6569
|
}));
|
|
6585
6570
|
|
|
6586
6571
|
const useLocationDialog = (props) => {
|
|
@@ -6593,7 +6578,7 @@
|
|
|
6593
6578
|
|
|
6594
6579
|
const BurgerMenuDialog = JSX(({ menuRef, menuItem, locationDialogProps, closeAll }) => {
|
|
6595
6580
|
const locationDialog = useLocationDialog(locationDialogProps || {});
|
|
6596
|
-
const { name: location } =
|
|
6581
|
+
const [{ name: location }] = useLocation();
|
|
6597
6582
|
const menuDimensions = menuRef?.current?.getBoundingClientRect();
|
|
6598
6583
|
const basePath = getBasePath(env.SITE_URL);
|
|
6599
6584
|
const handleIframeLoad = () => {
|
|
@@ -7153,7 +7138,7 @@
|
|
|
7153
7138
|
const close = useCallback(() => {
|
|
7154
7139
|
setPopup(null);
|
|
7155
7140
|
}, []);
|
|
7156
|
-
useEffect(() => defaultEventBus.
|
|
7141
|
+
useEffect(() => defaultEventBus.subscribe('popup', (action) => {
|
|
7157
7142
|
switch (action.type) {
|
|
7158
7143
|
case 'open':
|
|
7159
7144
|
case 'update':
|
|
@@ -7208,7 +7193,7 @@
|
|
|
7208
7193
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7209
7194
|
});
|
|
7210
7195
|
|
|
7211
|
-
const packageVersion = "0.14.
|
|
7196
|
+
const packageVersion = "0.14.601";
|
|
7212
7197
|
|
|
7213
7198
|
exports.Blocks = Blocks;
|
|
7214
7199
|
exports.ContentPage = ContentPage;
|