@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
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback,
|
|
2
|
+
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type BranchesHeader, type ForeignOfficeProps } from '../../data/HeaderData';
|
|
4
|
+
import { useLink } from '../../hooks/useLink';
|
|
4
5
|
import { useLocation } from '../../hooks/useLocation';
|
|
5
6
|
import { useRegions, type Region } from '../../hooks/useRegions';
|
|
6
7
|
import { groupBy } from '../../utils/groupBy';
|
|
7
8
|
import { jaroWinklerDistance } from '../../utils/jaroWinklerDistance';
|
|
8
9
|
import { Dialog } from '../DialogManager/Dialog';
|
|
9
10
|
import { useDialogManager } from '../DialogManager/useDialogManager';
|
|
11
|
+
import { LinkWrapper } from '../LinkWrapper/LinkWrapper';
|
|
12
|
+
import { Paragraph } from '../Paragraph/Paragraph';
|
|
10
13
|
import { Text } from '../Text/Text';
|
|
11
14
|
import { renderForeignOffices } from './renderForeignOffices';
|
|
12
15
|
import { renderRegion } from './renderRegion';
|
|
13
16
|
import { renderRegionGroup } from './renderRegionGroup';
|
|
14
17
|
import { SearchBar } from './SearchBar';
|
|
15
|
-
import { SelectedLocation } from './SelectedLocation';
|
|
16
18
|
|
|
17
19
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
18
20
|
|
|
@@ -22,21 +24,22 @@ export interface LocationDialogProps {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branches }) => {
|
|
25
|
-
const
|
|
27
|
+
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
28
|
+
|
|
29
|
+
const link = useLink();
|
|
30
|
+
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
26
31
|
|
|
27
32
|
const [query, setQuery] = useState('');
|
|
28
33
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
() => cleanUpRegions(rawRegions).sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')),
|
|
32
|
-
[rawRegions],
|
|
34
|
+
const regions: Region[] = cleanUpRegions(useRegions()).sort((a, b) =>
|
|
35
|
+
a.name.localeCompare(b.name),
|
|
33
36
|
);
|
|
34
|
-
const regionsGroupByLetter
|
|
37
|
+
const regionsGroupByLetter: Map<string, Region[]> = groupBy(regions, regionFirstLetter);
|
|
35
38
|
|
|
36
39
|
const { close } = useDialogManager();
|
|
37
40
|
|
|
38
41
|
const handleChangeLocation = useCallback((region: Region) => {
|
|
39
|
-
|
|
42
|
+
selectCurrentLocation(region);
|
|
40
43
|
close();
|
|
41
44
|
}, []);
|
|
42
45
|
|
|
@@ -48,7 +51,16 @@ export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branch
|
|
|
48
51
|
<Text size="text-h4" color="text-primary-text">
|
|
49
52
|
Выберите филиал
|
|
50
53
|
</Text>
|
|
51
|
-
|
|
54
|
+
{currentLocation ? (
|
|
55
|
+
<div className="mb-s">
|
|
56
|
+
<Paragraph size="text-l" color="text-primary-text">
|
|
57
|
+
Сейчас выбран:
|
|
58
|
+
<LinkWrapper href={href} className="inline mx-2xs text-primary-main">
|
|
59
|
+
{currentLocation.name}
|
|
60
|
+
</LinkWrapper>
|
|
61
|
+
</Paragraph>
|
|
62
|
+
</div>
|
|
63
|
+
) : null}
|
|
52
64
|
<SearchBar onSearch={setQuery} searchTerm={query} />
|
|
53
65
|
</div>
|
|
54
66
|
}
|
|
@@ -74,10 +86,10 @@ export const LocationDialog = JSX<LocationDialogProps>(({ foreignOffices, branch
|
|
|
74
86
|
);
|
|
75
87
|
});
|
|
76
88
|
|
|
77
|
-
const regionFirstLetter = (region: Region) => region.name?.charAt(0)
|
|
89
|
+
const regionFirstLetter = (region: Region) => region.name?.charAt(0) || '';
|
|
78
90
|
|
|
79
|
-
const cleanUpRegions = (regions: Region[])
|
|
91
|
+
const cleanUpRegions = (regions: Region[]) =>
|
|
80
92
|
regions.map((region) => ({
|
|
81
93
|
...region,
|
|
82
|
-
name: region.name?.replace(/республика|область|край'/gi, '').trim()
|
|
94
|
+
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
83
95
|
}));
|
|
@@ -4,8 +4,8 @@ import { type PopupOptions } from './PopupAction';
|
|
|
4
4
|
|
|
5
5
|
export const usePopupManager = () => ({
|
|
6
6
|
open: (popup: VNode, options: PopupOptions) =>
|
|
7
|
-
defaultEventBus.
|
|
7
|
+
defaultEventBus.fire('popup', { type: 'open', popup, ...options }),
|
|
8
8
|
update: (popup: VNode, options: PopupOptions) =>
|
|
9
|
-
defaultEventBus.
|
|
10
|
-
close: () => defaultEventBus.
|
|
9
|
+
defaultEventBus.fire('popup', { type: 'update', popup, ...options }),
|
|
10
|
+
close: () => defaultEventBus.fire('popup', { type: 'close' }),
|
|
11
11
|
});
|
package/package.json
CHANGED
package/src/EventBus/EventBus.ts
CHANGED
|
@@ -1,72 +1,36 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
type Cleanup = () => void;
|
|
4
|
-
|
|
5
|
-
export interface EventBusObservable<EM extends Record<string, any>> {
|
|
6
|
-
subscribe<K extends keyof EM>(type: K, listener: Subscriber<EM[K]>): Cleanup;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface EventBusEmitter<EM extends Record<string, any>> {
|
|
10
|
-
fire<K extends keyof EM>(type: K, event: EM[K]): void;
|
|
11
|
-
subject<K extends keyof EM>(type: K, event: EM[K]): Cleanup;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export class EventBus<EM extends Record<string, any>>
|
|
15
|
-
implements EventBusObservable<EM>, EventBusEmitter<EM>
|
|
16
|
-
{
|
|
17
|
-
private subscribersMap: Partial<Record<keyof EM, Subscriber<EM[keyof EM]>[]>> = {};
|
|
1
|
+
export class EventBus<EM extends Record<string, any>> {
|
|
2
|
+
private subscribers: Partial<Record<keyof EM, Array<(ev: EM[keyof EM]) => void>>> = {};
|
|
18
3
|
private subjectsStateMap: Partial<EM> = {};
|
|
19
4
|
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
subscribe<K extends keyof EM>(type: K, listener: (event: EM[K]) => void) {
|
|
6
|
+
this.subscribers[type] = (this.subscribers[type] || []).concat(
|
|
7
|
+
listener as (ev: EM[keyof EM]) => void,
|
|
8
|
+
);
|
|
22
9
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.fireSubscribers([listener], this.subjectsStateMap[type]);
|
|
10
|
+
const latestEvent = this.subjectsStateMap[type];
|
|
11
|
+
if (latestEvent) {
|
|
12
|
+
listener(latestEvent as EM[K]);
|
|
13
|
+
}
|
|
28
14
|
|
|
29
15
|
return () => {
|
|
30
16
|
this.unsubscribe(type, listener);
|
|
31
17
|
};
|
|
32
18
|
}
|
|
33
19
|
|
|
34
|
-
private unsubscribe<K extends keyof EM>(type: K, listener:
|
|
35
|
-
|
|
36
|
-
if (index && index !== -1) {
|
|
37
|
-
this.subscribersMap[type]?.splice(index, 1);
|
|
38
|
-
}
|
|
20
|
+
private unsubscribe<K extends keyof EM>(type: K, listener: (event: EM[K]) => void) {
|
|
21
|
+
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
39
22
|
}
|
|
40
23
|
|
|
41
24
|
fire<K extends keyof EM>(type: K, event: EM[K]) {
|
|
42
25
|
const isSubjectDeclared = type in this.subjectsStateMap;
|
|
43
26
|
if (isSubjectDeclared) {
|
|
44
|
-
this.subject(type, event);
|
|
45
|
-
} else {
|
|
46
|
-
this.fireSubscribers(this.subscribersMap[type], event);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
subject<K extends keyof EM>(type: K, event: EM[K]): Cleanup {
|
|
51
|
-
if (this.subjectsStateMap[type] !== event) {
|
|
52
27
|
this.subjectsStateMap[type] = event;
|
|
53
|
-
this.fireSubscribers(this.subscribersMap[type], event);
|
|
54
28
|
}
|
|
55
29
|
|
|
56
|
-
|
|
57
|
-
delete this.subjectsStateMap[type];
|
|
58
|
-
};
|
|
30
|
+
this.subscribers[type]?.forEach((s) => s(event));
|
|
59
31
|
}
|
|
60
32
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
event: EM[K] | undefined,
|
|
64
|
-
) {
|
|
65
|
-
if (!subscribers || !event) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
for (const _ of subscribers) {
|
|
69
|
-
_(event);
|
|
70
|
-
}
|
|
33
|
+
subject<K extends keyof EM>(type: K, event: EM[K]) {
|
|
34
|
+
this.subjectsStateMap[type] = event;
|
|
71
35
|
}
|
|
72
36
|
}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
import { type CarouselTariffsCardAction } from '../components/CarouselTariffsCard/CarouselTariffsCardAction';
|
|
2
|
+
import { type Tab } from '../components/TabsLayout/TabsLayoutContent';
|
|
1
3
|
import { type Region } from '../hooks/useRegions';
|
|
2
4
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
3
5
|
import { type PopupAction } from '../ui-kit/PopupManager/PopupAction';
|
|
4
6
|
import { EventBus } from './EventBus';
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
interface TabActivationEvent {
|
|
9
|
+
type?: Tab['type'];
|
|
10
|
+
groupName?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface GlobalEventMap {
|
|
7
15
|
location: Region;
|
|
8
16
|
dialog: DialogAction;
|
|
9
17
|
popup: PopupAction;
|
|
10
|
-
|
|
18
|
+
tab: TabActivationEvent;
|
|
19
|
+
fold: CarouselTariffsCardAction;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const defaultEventBus = new EventBus<GlobalEventMap>();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { type EventBus } from './EventBus';
|
|
3
|
+
|
|
4
|
+
export const useLatestEvent = <EM extends Record<string, any>, K extends keyof EM>(
|
|
5
|
+
eventBus: EventBus<EM>,
|
|
6
|
+
type: K,
|
|
7
|
+
initialEvent?: EM[K],
|
|
8
|
+
): [EM[K] | null, (_: EM[K]) => void] => {
|
|
9
|
+
const [latestEvent, setLatestEvent] = useState<EM[K] | null>(initialEvent || null);
|
|
10
|
+
|
|
11
|
+
useEffect(() => eventBus.subscribe(type, (_) => setLatestEvent(_)), [eventBus, type]);
|
|
12
|
+
|
|
13
|
+
const fireEvent = useCallback((_: EM[K]) => eventBus.fire(type, _), [eventBus, type]);
|
|
14
|
+
|
|
15
|
+
return [latestEvent, fireEvent];
|
|
16
|
+
};
|
|
@@ -65,4 +65,5 @@ export const RETAIL_API = {
|
|
|
65
65
|
await request<Response>(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
66
66
|
CheckCaptcha: async (body: CapchaTextType) =>
|
|
67
67
|
await request<Response>('/sms/checkCaptcha', 'POST', body),
|
|
68
|
+
GetFileByID: async (id: number) => await request<Response>(`/feedback/file?id=${id}`, 'GET'),
|
|
68
69
|
};
|
|
@@ -34,12 +34,12 @@ export default {
|
|
|
34
34
|
{
|
|
35
35
|
inputs: [
|
|
36
36
|
{ fieldType: 'common', name: 'processPersonalDataLeadFlg', required: true },
|
|
37
|
+
{ fieldType: 'common', name: 'consentInformFlg', required: true },
|
|
37
38
|
{ fieldType: 'common', name: 'consentProviderFlg', required: true },
|
|
38
39
|
{ fieldType: 'common', name: 'consentPfrFlg' },
|
|
39
40
|
{ fieldType: 'common', name: 'consentPhotoFlg', required: true },
|
|
40
41
|
{ fieldType: 'common', name: 'consentAssignmentClaimsFlg', required: true },
|
|
41
42
|
{ fieldType: 'common', name: 'consentCollectionFlg', required: true },
|
|
42
|
-
{ fieldType: 'common', name: 'consentInformFlg', required: true },
|
|
43
43
|
],
|
|
44
44
|
},
|
|
45
45
|
]}
|
|
@@ -87,6 +87,6 @@ const renderInputs = ({ field, typeForm = '', inputs }: GroupedConsentsProps) =>
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
const splitInputs = (inputs?: FieldDef[]) => ({
|
|
90
|
-
consentInputs: inputs?.filter((_) => CONSENTS.includes(_.name)) || [],
|
|
91
|
-
restInputs: inputs?.filter((_) => !CONSENTS.includes(_.name)) || [],
|
|
90
|
+
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
|
|
91
|
+
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
|
|
92
92
|
});
|
|
@@ -39,6 +39,7 @@ export const GroupedConsents = JSX<GroupedConsentsProps>(
|
|
|
39
39
|
<div className="w-fit">
|
|
40
40
|
<Foldable
|
|
41
41
|
isFoldButtonOnTop
|
|
42
|
+
unfoldedByDefault
|
|
42
43
|
renderFoldableSection={({ isUnfolded }) => (
|
|
43
44
|
<FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
|
|
44
45
|
{inputs.map(getField(field, typeForm))}
|
|
@@ -1,10 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { type FormConsents } from './getInitialFormState';
|
|
2
|
+
|
|
3
|
+
type ConsentData = {
|
|
4
|
+
text: string;
|
|
5
|
+
docId?: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const CONSENTS: Record<keyof FormConsents, ConsentData> = {
|
|
9
|
+
processPersonalDataLeadFlg: {
|
|
10
|
+
text: 'Согласие на обработку персональных данных',
|
|
11
|
+
docId: 4,
|
|
12
|
+
},
|
|
13
|
+
consentProviderFlg: {
|
|
14
|
+
text: 'Согласие об использовании простой электронной подписи',
|
|
15
|
+
docId: 5,
|
|
16
|
+
},
|
|
17
|
+
consentPfrFlg: {
|
|
18
|
+
text: 'Согласие на запрос в ПФР',
|
|
19
|
+
docId: 3,
|
|
20
|
+
},
|
|
21
|
+
consentPhotoFlg: {
|
|
22
|
+
text: 'Прочие согласия (согласие на фотографирование)',
|
|
23
|
+
docId: 1,
|
|
24
|
+
},
|
|
25
|
+
consentAssignmentClaimsFlg: {
|
|
26
|
+
text: 'Прочие согласия (согласие на уступку прав требований)',
|
|
27
|
+
docId: 1,
|
|
28
|
+
},
|
|
29
|
+
consentCollectionFlg: {
|
|
30
|
+
text: 'Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)',
|
|
31
|
+
docId: 1,
|
|
32
|
+
},
|
|
33
|
+
consentInformFlg: {
|
|
34
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
35
|
+
docId: 14,
|
|
36
|
+
},
|
|
37
|
+
consentToReceiveMaterials: {
|
|
38
|
+
text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -8,7 +8,18 @@ import { VED_TYPES } from '../../ui-kit/FormField/Fields/VedField';
|
|
|
8
8
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
9
9
|
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
10
10
|
|
|
11
|
-
export interface
|
|
11
|
+
export interface FormConsents {
|
|
12
|
+
processPersonalDataLeadFlg?: boolean;
|
|
13
|
+
consentProviderFlg?: boolean;
|
|
14
|
+
consentPfrFlg?: boolean;
|
|
15
|
+
consentPhotoFlg?: boolean;
|
|
16
|
+
consentAssignmentClaimsFlg?: boolean;
|
|
17
|
+
consentCollectionFlg?: boolean;
|
|
18
|
+
consentInformFlg?: boolean;
|
|
19
|
+
consentToReceiveMaterials?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface FormState extends FormConsents {
|
|
12
23
|
typeForm?: Option | string;
|
|
13
24
|
surname?: string;
|
|
14
25
|
name?: string;
|
|
@@ -65,14 +76,6 @@ export interface FormState {
|
|
|
65
76
|
localities?: string[];
|
|
66
77
|
partnerComments?: string;
|
|
67
78
|
consentDataProcessing?: boolean;
|
|
68
|
-
processPersonalDataLeadFlg?: boolean;
|
|
69
|
-
consentProviderFlg?: boolean;
|
|
70
|
-
consentPfrFlg?: boolean;
|
|
71
|
-
consentPhotoFlg?: boolean;
|
|
72
|
-
consentAssignmentClaimsFlg?: boolean;
|
|
73
|
-
consentCollectionFlg?: boolean;
|
|
74
|
-
consentInformFlg?: boolean;
|
|
75
|
-
consentToReceiveMaterials?: boolean;
|
|
76
79
|
familyStatus?: string;
|
|
77
80
|
children?: number;
|
|
78
81
|
familyMembers?: number;
|
|
@@ -9,6 +9,7 @@ import { formatPhone } from '../../utils/formatPhone';
|
|
|
9
9
|
import { objectValidator } from '../../validation/objectValidator';
|
|
10
10
|
import { isValidationSuccess } from '../../validation/validator';
|
|
11
11
|
import { type FieldDef } from './ApplicationLeadFormContent';
|
|
12
|
+
import { CONSENTS } from './consents';
|
|
12
13
|
import { type FormState } from './getInitialFormState';
|
|
13
14
|
|
|
14
15
|
type ApplicationLeadApiProps = {
|
|
@@ -61,10 +62,15 @@ export const useApplicationLeadApi = ({ inputs, programId, saveForm }: Applicati
|
|
|
61
62
|
setResponseStatus('Fail');
|
|
62
63
|
}
|
|
63
64
|
};
|
|
65
|
+
|
|
66
|
+
const acceptedConsents: string[] = Object.keys(CONSENTS)
|
|
67
|
+
.filter((_) => formData[_])
|
|
68
|
+
.map((_) => CONSENTS[_]);
|
|
69
|
+
|
|
64
70
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
65
71
|
const verifyPhoneDialog = useVerifyPhoneDialog({
|
|
66
72
|
close: handleSuccessVerify,
|
|
67
|
-
...verifyPhoneContent(formData?.phone),
|
|
73
|
+
...verifyPhoneContent(formData?.phone, acceptedConsents),
|
|
68
74
|
});
|
|
69
75
|
verifyPhoneDialog.open();
|
|
70
76
|
}
|
|
@@ -79,14 +85,15 @@ export const useApplicationLeadApi = ({ inputs, programId, saveForm }: Applicati
|
|
|
79
85
|
};
|
|
80
86
|
};
|
|
81
87
|
|
|
82
|
-
const verifyPhoneContent = (phone: string) => ({
|
|
88
|
+
const verifyPhoneContent = (phone: string, consents: string[]) => ({
|
|
83
89
|
title: 'Подтвердите номер телефона',
|
|
84
90
|
description: `Мы отправили код на ${phone}`,
|
|
85
91
|
phoneNumber: formatPhone(phone),
|
|
86
92
|
textButton: 'Оформить',
|
|
87
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</li><li>предоставление и подписание прочих согласий Банка,
|
|
91
|
-
</li><li>согласие на запрос в ПФР</li></ul>`,
|
|
93
|
+
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(
|
|
94
|
+
consents,
|
|
95
|
+
)}`,
|
|
92
96
|
});
|
|
97
|
+
|
|
98
|
+
const consentsToList = (consents?: string[]) =>
|
|
99
|
+
`<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { defaultEventBus } from '../../EventBus/defaultEventBus';
|
|
4
|
+
import { type AspectsDef } from '../../model/AspectsProps';
|
|
5
|
+
import { type Slot } from '../../model/ContentPageDef';
|
|
6
|
+
import { type VNode } from '../../model/VNode';
|
|
4
7
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
8
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
9
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
5
10
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
11
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
6
12
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
13
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
8
14
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
15
|
+
import { getAspectsAttributes } from '../../utils/dataAttributes';
|
|
9
16
|
import { isIcon } from '../../utils/isIcon';
|
|
10
17
|
import { style } from '../../utils/style';
|
|
11
|
-
import { CardCellsSection } from './CardCellsSection';
|
|
12
18
|
import { type CarouselTariffsCardContent } from './CarouselTariffsCardContent';
|
|
13
|
-
import {
|
|
19
|
+
import { renderCardInfo } from './renderCardInfo';
|
|
14
20
|
|
|
15
21
|
export interface CarouselTariffsCardProps extends CarouselTariffsCardContent, UniBlockProps {}
|
|
16
22
|
|
|
17
23
|
export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
|
|
18
24
|
({
|
|
19
|
-
className,
|
|
25
|
+
className = '',
|
|
20
26
|
title,
|
|
21
27
|
align = 'text-center',
|
|
22
28
|
icon,
|
|
@@ -27,20 +33,22 @@ export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
|
|
|
27
33
|
data,
|
|
28
34
|
...rest
|
|
29
35
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
const cellsNode = cardCells.map(renderCardInfo);
|
|
37
|
+
|
|
38
|
+
const [visibleCells, hiddenCells] =
|
|
39
|
+
visibleCellsCount > 0
|
|
40
|
+
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
41
|
+
: [cellsNode, []];
|
|
42
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
useEffect(
|
|
38
45
|
() =>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
defaultEventBus.subscribe('fold', (event) => {
|
|
47
|
+
if (options?.parent !== undefined && event.parent === options?.parent) {
|
|
48
|
+
setIsVisible(event.isUnfolded);
|
|
49
|
+
}
|
|
42
50
|
}),
|
|
43
|
-
[
|
|
51
|
+
[options?.parent],
|
|
44
52
|
);
|
|
45
53
|
|
|
46
54
|
return (
|
|
@@ -54,14 +62,49 @@ export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
|
|
|
54
62
|
<Heading className={style('pt-xs', align)} headingType="h5" title={title} />
|
|
55
63
|
) : null}
|
|
56
64
|
{button?.text ? <LinkButton className="w-full mt-m mb-lg" {...button} /> : null}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
{hiddenCells.length ? (
|
|
66
|
+
<Foldable
|
|
67
|
+
renderFoldableSection={() => (
|
|
68
|
+
<div>
|
|
69
|
+
{visibleCells}
|
|
70
|
+
<FoldableSection isUnfolded={isVisible}>{hiddenCells}</FoldableSection>
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
renderFoldButton={
|
|
74
|
+
cardCells.length >= visibleCellsCount
|
|
75
|
+
? renderFoldButton(options?.parent, data, isVisible)
|
|
76
|
+
: null
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
) : (
|
|
80
|
+
<div>{visibleCells}</div>
|
|
81
|
+
)}
|
|
64
82
|
</BlockWrapper>
|
|
65
83
|
);
|
|
66
84
|
},
|
|
67
85
|
);
|
|
86
|
+
|
|
87
|
+
const renderFoldButton =
|
|
88
|
+
(parent?: Slot, data?: AspectsDef[], isUnfolded = false) =>
|
|
89
|
+
(): VNode =>
|
|
90
|
+
(
|
|
91
|
+
<button
|
|
92
|
+
className="w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center"
|
|
93
|
+
onClick={() => {
|
|
94
|
+
if (parent !== undefined) {
|
|
95
|
+
defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
|
|
96
|
+
}
|
|
97
|
+
}}
|
|
98
|
+
type="button"
|
|
99
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
100
|
+
{...(isUnfolded ? getAspectsAttributes(data) : {})}
|
|
101
|
+
>
|
|
102
|
+
<div>{isUnfolded ? 'Скрыть' : 'Подробнее о тарифе'}</div>
|
|
103
|
+
<Icon
|
|
104
|
+
className="text-primary-text"
|
|
105
|
+
name={isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon'}
|
|
106
|
+
width="16"
|
|
107
|
+
height="16"
|
|
108
|
+
/>
|
|
109
|
+
</button>
|
|
110
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from '../../hooks/useLocation';
|
|
3
3
|
import { BaseTile } from '../../ui-kit/BaseTile/BaseTile';
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
@@ -19,7 +19,7 @@ export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlock
|
|
|
19
19
|
|
|
20
20
|
export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
|
|
21
21
|
({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
|
|
22
|
-
const currentLocation =
|
|
22
|
+
const [currentLocation] = useLocation();
|
|
23
23
|
const exchangeRates = useFetchExchangeRateData(currentLocation);
|
|
24
24
|
|
|
25
25
|
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
@@ -4,7 +4,7 @@ import { type SearchHeaderProps } from '../../data/CommonData';
|
|
|
4
4
|
import { type HeaderData } from '../../data/HeaderData';
|
|
5
5
|
import { type NavigationData } from '../../data/NavigationData';
|
|
6
6
|
import { getAspectsWithInclude } from '../../hooks/useAspects/aspects/getAspectsWithInclude';
|
|
7
|
-
import {
|
|
7
|
+
import { useLocation } from '../../hooks/useLocation';
|
|
8
8
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
9
9
|
import { type IconVersion } from '../../model/IconVersion';
|
|
10
10
|
import { useLocationDialog } from '../../ui-kit/LocationDialog/useLocationDialog';
|
|
@@ -22,7 +22,7 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
22
22
|
({ className, version, ...rest }) => {
|
|
23
23
|
const iconVersion: IconVersion = version === 'transparent' ? 'white' : 'black';
|
|
24
24
|
|
|
25
|
-
const currentLocation =
|
|
25
|
+
const [currentLocation] = useLocation(rest?.branches?.default);
|
|
26
26
|
|
|
27
27
|
const searchDialog = useSearchDialog(rest);
|
|
28
28
|
const locationDialog = useLocationDialog(rest);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from '../../hooks/useLocation';
|
|
3
3
|
import { type AtmsDef } from './OfficesAtmsMapContent';
|
|
4
4
|
import { OfficesAtmsMapLayout } from './OfficesAtmsMapLayout';
|
|
5
5
|
import { type Atm } from './OfficesAtmsMapProps';
|
|
@@ -30,7 +30,8 @@ export interface AtmsMapProps {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export const AtmsMap = JSX<AtmsMapProps>(({ descriptionData, className }) => {
|
|
33
|
-
const currentLocation =
|
|
33
|
+
const [currentLocation] = useLocation();
|
|
34
|
+
|
|
34
35
|
const regionCode = currentLocation?.code ?? '000';
|
|
35
36
|
|
|
36
37
|
const { data: officesData, isLoad } = useAtms(regionCode);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from '../../hooks/useLocation';
|
|
3
3
|
import { OfficesAtmsMapLayout } from './OfficesAtmsMapLayout';
|
|
4
4
|
import { getOfficePoint, renderOfficeCard } from './renderOfficeCard';
|
|
5
5
|
import { getRemoteWorkplacePoint, renderRemoteWorkplaceCard } from './renderRemoteWorkplaceCard';
|
|
@@ -10,7 +10,7 @@ export interface OfficesMapProps {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const OfficesMap = JSX<OfficesMapProps>(({ className }) => {
|
|
13
|
-
const currentLocation =
|
|
13
|
+
const [currentLocation] = useLocation();
|
|
14
14
|
const regionCode = currentLocation?.code ?? '000';
|
|
15
15
|
const { data, isLoad } = useOffices(regionCode);
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ import { type HeaderData } from '../../data/HeaderData';
|
|
|
4
4
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
5
5
|
import { type StickyMenuItem } from '../../data/StickyMobileData';
|
|
6
6
|
import { env } from '../../Env';
|
|
7
|
-
import {
|
|
7
|
+
import { useLocation } from '../../hooks/useLocation';
|
|
8
8
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
9
9
|
import { useLocationDialog } from '../../ui-kit/LocationDialog/useLocationDialog';
|
|
10
10
|
import { getBasePath } from '../../utils/getBasePath';
|
|
@@ -22,7 +22,7 @@ export interface BurgerMenuDialogProps {
|
|
|
22
22
|
export const BurgerMenuDialog = JSX<BurgerMenuDialogProps>(
|
|
23
23
|
({ menuRef, menuItem, locationDialogProps, closeAll }) => {
|
|
24
24
|
const locationDialog = useLocationDialog(locationDialogProps || {});
|
|
25
|
-
const { name: location } =
|
|
25
|
+
const [{ name: location }] = useLocation();
|
|
26
26
|
const menuDimensions = menuRef?.current?.getBoundingClientRect();
|
|
27
27
|
const basePath = getBasePath(env.SITE_URL);
|
|
28
28
|
|