@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -403,58 +403,39 @@
|
|
|
403
403
|
].join(' ');
|
|
404
404
|
|
|
405
405
|
class EventBus {
|
|
406
|
-
|
|
406
|
+
subscribers = {};
|
|
407
407
|
subjectsStateMap = {};
|
|
408
|
-
emitter = this;
|
|
409
|
-
observable = this;
|
|
410
408
|
subscribe(type, listener) {
|
|
411
|
-
this.
|
|
412
|
-
this.
|
|
413
|
-
|
|
409
|
+
this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
|
|
410
|
+
const latestEvent = this.subjectsStateMap[type];
|
|
411
|
+
if (latestEvent) {
|
|
412
|
+
listener(latestEvent);
|
|
413
|
+
}
|
|
414
414
|
return () => {
|
|
415
415
|
this.unsubscribe(type, listener);
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
unsubscribe(type, listener) {
|
|
419
|
-
|
|
420
|
-
if (index && index !== -1) {
|
|
421
|
-
this.subscribersMap[type]?.splice(index, 1);
|
|
422
|
-
}
|
|
419
|
+
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
423
420
|
}
|
|
424
421
|
fire(type, event) {
|
|
425
422
|
const isSubjectDeclared = type in this.subjectsStateMap;
|
|
426
423
|
if (isSubjectDeclared) {
|
|
427
|
-
this.subject(type, event);
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
this.fireSubscribers(this.subscribersMap[type], event);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
subject(type, event) {
|
|
434
|
-
if (this.subjectsStateMap[type] !== event) {
|
|
435
424
|
this.subjectsStateMap[type] = event;
|
|
436
|
-
this.fireSubscribers(this.subscribersMap[type], event);
|
|
437
425
|
}
|
|
438
|
-
|
|
439
|
-
delete this.subjectsStateMap[type];
|
|
440
|
-
};
|
|
426
|
+
this.subscribers[type]?.forEach((s) => s(event));
|
|
441
427
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
for (const _ of subscribers) {
|
|
447
|
-
_(event);
|
|
448
|
-
}
|
|
428
|
+
subject(type, event) {
|
|
429
|
+
this.subjectsStateMap[type] = event;
|
|
449
430
|
}
|
|
450
431
|
}
|
|
451
432
|
|
|
452
433
|
const defaultEventBus = new EventBus();
|
|
453
434
|
|
|
454
435
|
const useDialogManager = () => ({
|
|
455
|
-
open: (dialog, options = {}) => defaultEventBus.
|
|
456
|
-
close: () => defaultEventBus.
|
|
457
|
-
closeAll: () => defaultEventBus.
|
|
436
|
+
open: (dialog, options = {}) => defaultEventBus.fire('dialog', { type: 'open', dialog, ...options }),
|
|
437
|
+
close: () => defaultEventBus.fire('dialog', { type: 'close' }),
|
|
438
|
+
closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
|
|
458
439
|
});
|
|
459
440
|
|
|
460
441
|
const adjustBase = (href, basePath = '') => href.replace(basePath, '') || '/';
|
|
@@ -1109,48 +1090,10 @@
|
|
|
1109
1090
|
{ key: 'phone', text: 'Телефонный звонок' },
|
|
1110
1091
|
{ key: 'email', text: 'Электронное сообщение' },
|
|
1111
1092
|
];
|
|
1112
|
-
// TODO Тоже надо рефакторить - файлик constants
|
|
1113
1093
|
const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
|
|
1114
1094
|
|
|
1115
1095
|
const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
|
|
1116
1096
|
|
|
1117
|
-
const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1118
|
-
|
|
1119
|
-
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1120
|
-
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) => {
|
|
1121
|
-
const resultOptions = { ...commonOptions, ...options };
|
|
1122
|
-
return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
|
|
1123
|
-
}) }));
|
|
1124
|
-
});
|
|
1125
|
-
|
|
1126
|
-
const defaultCheckStyle = 'appearance-none w-5 h-5 border-solid flex-none';
|
|
1127
|
-
|
|
1128
|
-
const CHECK_PATHS = [
|
|
1129
|
-
{
|
|
1130
|
-
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',
|
|
1131
|
-
fillRule: 'evenodd',
|
|
1132
|
-
clipRule: 'evenodd',
|
|
1133
|
-
fill: 'white',
|
|
1134
|
-
},
|
|
1135
|
-
];
|
|
1136
|
-
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1137
|
-
const handleChange = useCallback((e) => {
|
|
1138
|
-
if (disabled) {
|
|
1139
|
-
return;
|
|
1140
|
-
}
|
|
1141
|
-
e.preventDefault();
|
|
1142
|
-
onChange && onChange(!value);
|
|
1143
|
-
}, [onChange, disabled, value]);
|
|
1144
|
-
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" }));
|
|
1145
|
-
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$2(text)] }) }));
|
|
1146
|
-
});
|
|
1147
|
-
const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1148
|
-
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1149
|
-
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1150
|
-
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
1151
|
-
|
|
1152
|
-
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)] })));
|
|
1153
|
-
|
|
1154
1097
|
function useBool(defaultValue = false) {
|
|
1155
1098
|
const [value, setValue] = useState(defaultValue);
|
|
1156
1099
|
const setTrue = useCallback(() => setValue(true), []);
|
|
@@ -1212,6 +1155,8 @@
|
|
|
1212
1155
|
const getValidStyle = (valid) => (valid ? inputValidStyle : 'border-error');
|
|
1213
1156
|
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1214
1157
|
|
|
1158
|
+
const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1159
|
+
|
|
1215
1160
|
const DEFAULT_HINTS_COUNT = 10;
|
|
1216
1161
|
const defaultResponseItemHandler = (item) => item?.value || '';
|
|
1217
1162
|
const getResponseHandler = (itemHandler) => (response) => {
|
|
@@ -1316,9 +1261,9 @@
|
|
|
1316
1261
|
};
|
|
1317
1262
|
|
|
1318
1263
|
const usePopupManager = () => ({
|
|
1319
|
-
open: (popup, options) => defaultEventBus.
|
|
1320
|
-
update: (popup, options) => defaultEventBus.
|
|
1321
|
-
close: () => defaultEventBus.
|
|
1264
|
+
open: (popup, options) => defaultEventBus.fire('popup', { type: 'open', popup, ...options }),
|
|
1265
|
+
update: (popup, options) => defaultEventBus.fire('popup', { type: 'update', popup, ...options }),
|
|
1266
|
+
close: () => defaultEventBus.fire('popup', { type: 'close' }),
|
|
1322
1267
|
});
|
|
1323
1268
|
|
|
1324
1269
|
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()))) })));
|
|
@@ -1587,7 +1532,6 @@
|
|
|
1587
1532
|
};
|
|
1588
1533
|
};
|
|
1589
1534
|
|
|
1590
|
-
// TODO Зачем это?
|
|
1591
1535
|
const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
|
|
1592
1536
|
|
|
1593
1537
|
const ACQUIRING_TYPES = [
|
|
@@ -1801,6 +1745,41 @@
|
|
|
1801
1745
|
|
|
1802
1746
|
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) })));
|
|
1803
1747
|
|
|
1748
|
+
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1749
|
+
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) => {
|
|
1750
|
+
const resultOptions = { ...commonOptions, ...options };
|
|
1751
|
+
return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
|
|
1752
|
+
}) }));
|
|
1753
|
+
});
|
|
1754
|
+
|
|
1755
|
+
const defaultCheckStyle = 'appearance-none w-5 h-5 border-solid flex-none';
|
|
1756
|
+
|
|
1757
|
+
const CHECK_PATHS = [
|
|
1758
|
+
{
|
|
1759
|
+
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',
|
|
1760
|
+
fillRule: 'evenodd',
|
|
1761
|
+
clipRule: 'evenodd',
|
|
1762
|
+
fill: 'white',
|
|
1763
|
+
},
|
|
1764
|
+
];
|
|
1765
|
+
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1766
|
+
const handleChange = useCallback((e) => {
|
|
1767
|
+
if (disabled) {
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1770
|
+
e.preventDefault();
|
|
1771
|
+
onChange && onChange(!value);
|
|
1772
|
+
}, [onChange, disabled, value]);
|
|
1773
|
+
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" }));
|
|
1774
|
+
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$2(text)] }) }));
|
|
1775
|
+
});
|
|
1776
|
+
const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1777
|
+
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1778
|
+
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1779
|
+
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
1780
|
+
|
|
1781
|
+
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)] })));
|
|
1782
|
+
|
|
1804
1783
|
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) })));
|
|
1805
1784
|
|
|
1806
1785
|
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') })));
|
|
@@ -1986,17 +1965,109 @@
|
|
|
1986
1965
|
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 }));
|
|
1987
1966
|
});
|
|
1988
1967
|
|
|
1989
|
-
const
|
|
1968
|
+
const CONSENTS = {
|
|
1969
|
+
processPersonalDataLeadFlg: {
|
|
1970
|
+
text: 'Согласие на обработку персональных данных',
|
|
1971
|
+
docId: 4,
|
|
1972
|
+
},
|
|
1973
|
+
consentProviderFlg: {
|
|
1974
|
+
text: 'Согласие об использовании простой электронной подписи',
|
|
1975
|
+
docId: 5,
|
|
1976
|
+
},
|
|
1977
|
+
consentPfrFlg: {
|
|
1978
|
+
text: 'Согласие на запрос в ПФР',
|
|
1979
|
+
docId: 3,
|
|
1980
|
+
},
|
|
1981
|
+
consentPhotoFlg: {
|
|
1982
|
+
text: 'Прочие согласия (согласие на фотографирование)',
|
|
1983
|
+
docId: 1,
|
|
1984
|
+
},
|
|
1985
|
+
consentAssignmentClaimsFlg: {
|
|
1986
|
+
text: 'Прочие согласия (согласие на уступку прав требований)',
|
|
1987
|
+
docId: 1,
|
|
1988
|
+
},
|
|
1989
|
+
consentCollectionFlg: {
|
|
1990
|
+
text: 'Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)',
|
|
1991
|
+
docId: 1,
|
|
1992
|
+
},
|
|
1993
|
+
consentInformFlg: {
|
|
1994
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
1995
|
+
docId: 14,
|
|
1996
|
+
},
|
|
1997
|
+
consentToReceiveMaterials: {
|
|
1998
|
+
text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
|
|
1999
|
+
},
|
|
2000
|
+
};
|
|
2001
|
+
|
|
2002
|
+
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" }) })));
|
|
1990
2003
|
|
|
1991
|
-
const
|
|
2004
|
+
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
2005
|
+
const { close } = useDialogManager();
|
|
2006
|
+
const handleClose = useCallback(() => {
|
|
2007
|
+
close();
|
|
2008
|
+
onClose && onClose();
|
|
2009
|
+
}, [onClose]);
|
|
2010
|
+
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 })] }));
|
|
2011
|
+
});
|
|
1992
2012
|
|
|
1993
|
-
const
|
|
2013
|
+
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2014
|
+
const getAthorizationHeaders = () => {
|
|
2015
|
+
const token = sessionStorage.getItem('accessToken');
|
|
2016
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2017
|
+
};
|
|
2018
|
+
const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
|
|
2019
|
+
const request = async (url, method, body) => await fetch('https://retail-light-api.cprb.dev.rshbdev.ru/api/v1' + url, {
|
|
2020
|
+
method,
|
|
2021
|
+
headers: {
|
|
2022
|
+
'Content-Type': 'application/json',
|
|
2023
|
+
...getAthorizationHeaders(),
|
|
2024
|
+
},
|
|
2025
|
+
credentials: 'include',
|
|
2026
|
+
body: body ? JSON.stringify(body) : null,
|
|
2027
|
+
})
|
|
2028
|
+
.then((response) => {
|
|
2029
|
+
if (response.ok) {
|
|
2030
|
+
return getResponse(response);
|
|
2031
|
+
}
|
|
2032
|
+
else {
|
|
2033
|
+
throw response;
|
|
2034
|
+
}
|
|
2035
|
+
})
|
|
2036
|
+
.catch((error) => {
|
|
2037
|
+
throw error;
|
|
2038
|
+
});
|
|
2039
|
+
const saveToken = (data) => {
|
|
2040
|
+
sessionStorage.setItem('accessToken', data.access_token);
|
|
2041
|
+
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
2042
|
+
};
|
|
2043
|
+
const RETAIL_API = {
|
|
2044
|
+
CreateUserProfile: async (body) => await request('/public-data/createUserProfile', 'POST', body),
|
|
2045
|
+
UpdateUserProfile: async (body) => await request('/user-data/updateUserProfile', 'PUT', body),
|
|
2046
|
+
CreateDraftTask: async (body) => await request('/user-data/createDraftTask', 'POST', body),
|
|
2047
|
+
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2048
|
+
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2049
|
+
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2050
|
+
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2051
|
+
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2052
|
+
GetFileByID: async (id) => await request(`/feedback/file?id=${id}`, 'GET'),
|
|
2053
|
+
};
|
|
1994
2054
|
|
|
1995
|
-
const
|
|
2055
|
+
const getDocument = async (id) => {
|
|
2056
|
+
const response = await RETAIL_API.GetFileByID(id);
|
|
2057
|
+
return URL.createObjectURL(await response.blob());
|
|
2058
|
+
};
|
|
1996
2059
|
|
|
1997
|
-
const
|
|
2060
|
+
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
2061
|
+
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
2062
|
+
const { open } = useDialogManager();
|
|
2063
|
+
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)] }));
|
|
2064
|
+
});
|
|
2065
|
+
const handleOpenDocument = async (id, open) => {
|
|
2066
|
+
const document = await getDocument(id);
|
|
2067
|
+
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" }) }));
|
|
2068
|
+
};
|
|
1998
2069
|
|
|
1999
|
-
const
|
|
2070
|
+
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);
|
|
2000
2071
|
|
|
2001
2072
|
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 })));
|
|
2002
2073
|
|
|
@@ -2089,11 +2160,9 @@
|
|
|
2089
2160
|
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 })));
|
|
2090
2161
|
|
|
2091
2162
|
const REGIONS_URL = '/api/v1/regions';
|
|
2092
|
-
const EMPTY_REGIONS = [];
|
|
2093
|
-
// TODO Почему url можно менять? Разве смысл не в инкапсуляции api url. Тоже под рефакторинг попадает
|
|
2094
2163
|
function useRegions(url = REGIONS_URL) {
|
|
2095
2164
|
const { data } = useAsyncData(url, fetchJSONUnsafe);
|
|
2096
|
-
return Array.isArray(data) ? data :
|
|
2165
|
+
return Array.isArray(data) ? data : [];
|
|
2097
2166
|
}
|
|
2098
2167
|
|
|
2099
2168
|
const LocalitiesField = JSX(({ field, input }) => {
|
|
@@ -2175,8 +2244,6 @@
|
|
|
2175
2244
|
|
|
2176
2245
|
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);
|
|
2177
2246
|
|
|
2178
|
-
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) })));
|
|
2179
|
-
|
|
2180
2247
|
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) })));
|
|
2181
2248
|
const arrayToOptions = (array) => (array ?? []).map((_) => ({ key: _, value: _ }));
|
|
2182
2249
|
|
|
@@ -2331,15 +2398,15 @@
|
|
|
2331
2398
|
serviceDirection: jsx(ServiceDirectionField, { field: field, input: input }),
|
|
2332
2399
|
bankEmpolee: jsx(BankEmpoleeField, { field: field }),
|
|
2333
2400
|
secondaryPhone: jsx(SecondaryPhoneField, { field: field }),
|
|
2334
|
-
consentToReceiveMaterials: jsx(
|
|
2335
|
-
processPersonalDataLeadFlg: jsx(
|
|
2336
|
-
consentProviderFlg: jsx(
|
|
2337
|
-
consentPhotoFlg: jsx(
|
|
2338
|
-
consentAssignmentClaimsFlg: jsx(
|
|
2339
|
-
consentCollectionFlg: jsx(
|
|
2340
|
-
consentInformFlg: jsx(
|
|
2401
|
+
consentToReceiveMaterials: jsx(ConsentField, { field: field, input: input }),
|
|
2402
|
+
processPersonalDataLeadFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2403
|
+
consentProviderFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2404
|
+
consentPhotoFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2405
|
+
consentAssignmentClaimsFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2406
|
+
consentCollectionFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2407
|
+
consentInformFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2408
|
+
consentPfrFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2341
2409
|
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') })),
|
|
2342
|
-
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') })),
|
|
2343
2410
|
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input, url: getRegionUrl(typeForm) })),
|
|
2344
2411
|
education: jsx(EducationField, { field: field, input: input }),
|
|
2345
2412
|
housing: jsx(HousingField, { field: field, input: input }),
|
|
@@ -2351,7 +2418,6 @@
|
|
|
2351
2418
|
positionOrganization: jsx(PositionOrganizationField, { field: field, input: input }),
|
|
2352
2419
|
familyStatus: jsx(FamilyStatusField, { field: field, input: input }),
|
|
2353
2420
|
children: jsx(ChildrenField, { field: field, input: input }),
|
|
2354
|
-
// eslint-disable-next-line max-lines
|
|
2355
2421
|
familyMembers: jsx(FamilyMembersField, { field: field, input: input }),
|
|
2356
2422
|
dependents: jsx(DependentsField, { field: field, input: input }),
|
|
2357
2423
|
totalIncome: jsx(TotalIncomeField, { field: field, input: input }),
|
|
@@ -2361,6 +2427,7 @@
|
|
|
2361
2427
|
armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
|
|
2362
2428
|
dulSerie: jsx(DulSerieField, { field: field, input: input }),
|
|
2363
2429
|
dulNumber: jsx(DulNumberField, { field: field, input: input }),
|
|
2430
|
+
// eslint-disable-next-line max-lines
|
|
2364
2431
|
dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
|
|
2365
2432
|
dulSubdivisionCode: jsx(DulSubdivisionCodeField, { field: field, input: input }),
|
|
2366
2433
|
dulIssuedBy: jsx(DulIssuedByField, { field: field, input: input }),
|
|
@@ -2406,17 +2473,6 @@
|
|
|
2406
2473
|
: '', className), type: type, role: role, onClick: onClick, children: children }));
|
|
2407
2474
|
});
|
|
2408
2475
|
|
|
2409
|
-
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" }) })));
|
|
2410
|
-
|
|
2411
|
-
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
2412
|
-
const { close } = useDialogManager();
|
|
2413
|
-
const handleClose = useCallback(() => {
|
|
2414
|
-
close();
|
|
2415
|
-
onClose && onClose();
|
|
2416
|
-
}, [onClose]);
|
|
2417
|
-
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 })] }));
|
|
2418
|
-
});
|
|
2419
|
-
|
|
2420
2476
|
const ResponseTypeDialog = JSX(function ({ responseType, typeForm, }) {
|
|
2421
2477
|
const responseOK = responseType === 'OK';
|
|
2422
2478
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
@@ -2577,17 +2633,6 @@
|
|
|
2577
2633
|
return [storedValue, setValue];
|
|
2578
2634
|
}
|
|
2579
2635
|
|
|
2580
|
-
const CONSENTS = [
|
|
2581
|
-
'processPersonalDataLeadFlg',
|
|
2582
|
-
'consentProviderFlg',
|
|
2583
|
-
'consentPfrFlg',
|
|
2584
|
-
'consentPhotoFlg',
|
|
2585
|
-
'consentAssignmentClaimsFlg',
|
|
2586
|
-
'consentCollectionFlg',
|
|
2587
|
-
'consentInformFlg',
|
|
2588
|
-
'consentToReceiveMaterials',
|
|
2589
|
-
];
|
|
2590
|
-
|
|
2591
2636
|
const initialFormState = {
|
|
2592
2637
|
typeForm: '',
|
|
2593
2638
|
region: { key: '', text: '' },
|
|
@@ -2635,14 +2680,6 @@
|
|
|
2635
2680
|
return { ...formState, typeForm: { key: typeForm, text: '' } };
|
|
2636
2681
|
};
|
|
2637
2682
|
|
|
2638
|
-
const FoldableWrapper = JSX(({ className, children }) => (jsx("div", { className: className, role: "group", children: children })));
|
|
2639
|
-
/**
|
|
2640
|
-
* Какой то бесполезный компонент. Его можно заменить на useBool
|
|
2641
|
-
* Лучше оставить только обёрточный div с необходимой атрибутикой
|
|
2642
|
-
* и сделать пассивный компонент
|
|
2643
|
-
*
|
|
2644
|
-
* @deprecated
|
|
2645
|
-
*/
|
|
2646
2683
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2647
2684
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2648
2685
|
const onToggle = useCallback(() => {
|
|
@@ -2650,7 +2687,7 @@
|
|
|
2650
2687
|
}, []);
|
|
2651
2688
|
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
2652
2689
|
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
2653
|
-
return isFoldButtonOnTop ? (jsxs(
|
|
2690
|
+
return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
|
|
2654
2691
|
});
|
|
2655
2692
|
|
|
2656
2693
|
function useResizeObserver(callback, deps) {
|
|
@@ -2696,53 +2733,12 @@
|
|
|
2696
2733
|
const hasValidationErrors = useMemo(() => inputs
|
|
2697
2734
|
?.filter((_) => _.required)
|
|
2698
2735
|
?.some((_) => Boolean(withValidator(field(_?.name), validatorObj[_?.name]).error)), [inputs]);
|
|
2699
|
-
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 : '')] })) }) }));
|
|
2736
|
+
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 : '')] })) }) }));
|
|
2700
2737
|
});
|
|
2701
2738
|
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" }) })] }));
|
|
2702
2739
|
|
|
2703
2740
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
2704
2741
|
|
|
2705
|
-
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2706
|
-
const getAthorizationHeaders = () => {
|
|
2707
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2708
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2709
|
-
};
|
|
2710
|
-
const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
|
|
2711
|
-
const request = async (url, method, body) => await fetch('https://retail-light-api.cprb.dev.rshbdev.ru/api/v1' + url, {
|
|
2712
|
-
method,
|
|
2713
|
-
headers: {
|
|
2714
|
-
'Content-Type': 'application/json',
|
|
2715
|
-
...getAthorizationHeaders(),
|
|
2716
|
-
},
|
|
2717
|
-
credentials: 'include',
|
|
2718
|
-
body: body ? JSON.stringify(body) : null,
|
|
2719
|
-
})
|
|
2720
|
-
.then((response) => {
|
|
2721
|
-
if (response.ok) {
|
|
2722
|
-
return getResponse(response);
|
|
2723
|
-
}
|
|
2724
|
-
else {
|
|
2725
|
-
throw response;
|
|
2726
|
-
}
|
|
2727
|
-
})
|
|
2728
|
-
.catch((error) => {
|
|
2729
|
-
throw error;
|
|
2730
|
-
});
|
|
2731
|
-
const saveToken = (data) => {
|
|
2732
|
-
sessionStorage.setItem('accessToken', data.access_token);
|
|
2733
|
-
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
2734
|
-
};
|
|
2735
|
-
const RETAIL_API = {
|
|
2736
|
-
CreateUserProfile: async (body) => await request('/public-data/createUserProfile', 'POST', body),
|
|
2737
|
-
UpdateUserProfile: async (body) => await request('/user-data/updateUserProfile', 'PUT', body),
|
|
2738
|
-
CreateDraftTask: async (body) => await request('/user-data/createDraftTask', 'POST', body),
|
|
2739
|
-
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2740
|
-
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2741
|
-
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2742
|
-
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2743
|
-
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2744
|
-
};
|
|
2745
|
-
|
|
2746
2742
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
2747
2743
|
const { name = '', surname = '', middleName = '', birthday = '', phone = '', email = '', processPersonalDataLeadFlg, consentProviderFlg, consentPfrFlg, consentPhotoFlg, consentAssignmentClaimsFlg, consentCollectionFlg, consentInformFlg, } = formData;
|
|
2748
2744
|
return {
|
|
@@ -3076,10 +3072,13 @@
|
|
|
3076
3072
|
setResponseStatus('Fail');
|
|
3077
3073
|
}
|
|
3078
3074
|
};
|
|
3075
|
+
const acceptedConsents = Object.keys(CONSENTS)
|
|
3076
|
+
.filter((_) => formData[_])
|
|
3077
|
+
.map((_) => CONSENTS[_]);
|
|
3079
3078
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
3080
3079
|
const verifyPhoneDialog = useVerifyPhoneDialog({
|
|
3081
3080
|
close: handleSuccessVerify,
|
|
3082
|
-
...verifyPhoneContent(formData?.phone),
|
|
3081
|
+
...verifyPhoneContent(formData?.phone, acceptedConsents),
|
|
3083
3082
|
});
|
|
3084
3083
|
verifyPhoneDialog.open();
|
|
3085
3084
|
}
|
|
@@ -3093,17 +3092,14 @@
|
|
|
3093
3092
|
responseStatus,
|
|
3094
3093
|
};
|
|
3095
3094
|
};
|
|
3096
|
-
const verifyPhoneContent = (phone) => ({
|
|
3095
|
+
const verifyPhoneContent = (phone, consents) => ({
|
|
3097
3096
|
title: 'Подтвердите номер телефона',
|
|
3098
3097
|
description: `Мы отправили код на ${phone}`,
|
|
3099
3098
|
phoneNumber: formatPhone(phone),
|
|
3100
3099
|
textButton: 'Оформить',
|
|
3101
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span
|
|
3102
|
-
<ul><li>соглашение о порядке использования простой электронной подписи,
|
|
3103
|
-
</li><li>согласие на обработку персональных данных,
|
|
3104
|
-
</li><li>предоставление и подписание прочих согласий Банка,
|
|
3105
|
-
</li><li>согласие на запрос в ПФР</li></ul>`,
|
|
3100
|
+
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
|
|
3106
3101
|
});
|
|
3102
|
+
const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
3107
3103
|
|
|
3108
3104
|
const useInitApplicationLead = () => {
|
|
3109
3105
|
useEffect(() => {
|
|
@@ -3141,8 +3137,8 @@
|
|
|
3141
3137
|
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm)));
|
|
3142
3138
|
};
|
|
3143
3139
|
const splitInputs = (inputs) => ({
|
|
3144
|
-
consentInputs: inputs?.filter((_) => CONSENTS.includes(_.name)) || [],
|
|
3145
|
-
restInputs: inputs?.filter((_) => !CONSENTS.includes(_.name)) || [],
|
|
3140
|
+
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
|
|
3141
|
+
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
|
|
3146
3142
|
});
|
|
3147
3143
|
|
|
3148
3144
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -4751,37 +4747,31 @@
|
|
|
4751
4747
|
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)] }) }) })));
|
|
4752
4748
|
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;
|
|
4753
4749
|
|
|
4754
|
-
const useSubjectState = (eventBus, type, initialState) => {
|
|
4755
|
-
const [state, setState] = useState(initialState);
|
|
4756
|
-
useEffect(() => eventBus.subscribe(type, setState), [eventBus, type]);
|
|
4757
|
-
return state;
|
|
4758
|
-
};
|
|
4759
|
-
|
|
4760
4750
|
const renderCardInfo = (cell, i) => {
|
|
4761
4751
|
const { title, description, buttons } = cell;
|
|
4762
4752
|
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)));
|
|
4763
4753
|
};
|
|
4764
4754
|
|
|
4765
|
-
const
|
|
4766
|
-
const
|
|
4767
|
-
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
4768
|
-
? [
|
|
4769
|
-
: [
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
parent
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4755
|
+
const CarouselTariffsCard = JSX(({ className = '', title, align = 'text-center', icon, button, visibleCellsCount = 1, cardCells = [], options, data, ...rest }) => {
|
|
4756
|
+
const cellsNode = cardCells.map(renderCardInfo);
|
|
4757
|
+
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
4758
|
+
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
4759
|
+
: [cellsNode, []];
|
|
4760
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
4761
|
+
useEffect(() => defaultEventBus.subscribe('fold', (event) => {
|
|
4762
|
+
if (options?.parent !== undefined && event.parent === options?.parent) {
|
|
4763
|
+
setIsVisible(event.isUnfolded);
|
|
4764
|
+
}
|
|
4765
|
+
}), [options?.parent]);
|
|
4766
|
+
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
|
|
4767
|
+
? renderFoldButton$3(options?.parent, data, isVisible)
|
|
4768
|
+
: null })) : (jsx("div", { children: visibleCells }))] }));
|
|
4769
|
+
});
|
|
4770
|
+
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: () => {
|
|
4771
|
+
if (parent !== undefined) {
|
|
4772
|
+
defaultEventBus.fire('fold', { type: 'fold', isUnfolded: !isUnfolded, parent });
|
|
4773
|
+
}
|
|
4774
|
+
}, type: "button", ...(isUnfolded ? getAspectsAttributes(data) : {}), children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
4785
4775
|
|
|
4786
4776
|
const ContactsBlock = JSX(({ className, contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: style('flex', className), defaultPadding: "p-6xl", version: version, ...rest, children: [info?.length ? renderBlocks(info) : null, contacts?.length ? renderBlocks(contacts) : null] })));
|
|
4787
4777
|
const renderBlocks = (info) => (jsx("div", { className: "flex gap-5xl grow basis-0", children: info.map((column, i) => renderBlocksColumn({ column, i })) }));
|
|
@@ -4953,46 +4943,47 @@
|
|
|
4953
4943
|
};
|
|
4954
4944
|
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] })));
|
|
4955
4945
|
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
else {
|
|
4963
|
-
eventBus.subject(type, state);
|
|
4964
|
-
}
|
|
4965
|
-
}, [eventBus, type]);
|
|
4966
|
-
return useCallback((_) => eventBus.fire(type, _), [eventBus, type]);
|
|
4967
|
-
}
|
|
4946
|
+
const useLatestEvent = (eventBus, type, initialEvent) => {
|
|
4947
|
+
const [latestEvent, setLatestEvent] = useState(initialEvent || null);
|
|
4948
|
+
useEffect(() => eventBus.subscribe(type, (_) => setLatestEvent(_)), [eventBus, type]);
|
|
4949
|
+
const fireEvent = useCallback((_) => eventBus.fire(type, _), [eventBus, type]);
|
|
4950
|
+
return [latestEvent, fireEvent];
|
|
4951
|
+
};
|
|
4968
4952
|
|
|
4969
4953
|
const REGION_URL = '/api/v1/region';
|
|
4970
4954
|
const LOCATION_STORAGE_KEY = 'location';
|
|
4971
4955
|
function useLocation(defaultLocation = 'Москва') {
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
storeLocation(await fetchJSON(REGION_URL));
|
|
4982
|
-
}
|
|
4983
|
-
const storedLocation = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
|
|
4984
|
-
try {
|
|
4985
|
-
return storedLocation && JSON.parse(storedLocation);
|
|
4986
|
-
}
|
|
4987
|
-
catch (ex) {
|
|
4988
|
-
// Do nothing
|
|
4956
|
+
const [currentLocation, fireCurrentLocation] = useLatestEvent(defaultEventBus, 'location', restoreLocation() ?? { name: defaultLocation });
|
|
4957
|
+
const selectCurrentLocation = useCallback((_) => {
|
|
4958
|
+
storeLocation(_);
|
|
4959
|
+
fireCurrentLocation(_);
|
|
4960
|
+
}, []);
|
|
4961
|
+
const { data } = useAsyncData(hasStoredLocation() ? null : REGION_URL, fetchJSONUnsafe);
|
|
4962
|
+
useEffect(() => {
|
|
4963
|
+
if (data && !hasStoredLocation()) {
|
|
4964
|
+
fireCurrentLocation(data);
|
|
4989
4965
|
}
|
|
4990
|
-
|
|
4991
|
-
};
|
|
4992
|
-
}
|
|
4993
|
-
function storeLocation(_) {
|
|
4994
|
-
_ && globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
|
|
4966
|
+
}, [data]);
|
|
4967
|
+
return [currentLocation ?? { name: defaultLocation }, selectCurrentLocation];
|
|
4995
4968
|
}
|
|
4969
|
+
const hasStoredLocation = () => Boolean(globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY));
|
|
4970
|
+
const restoreLocation = () => {
|
|
4971
|
+
try {
|
|
4972
|
+
const data = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
|
|
4973
|
+
return data && JSON.parse(data);
|
|
4974
|
+
}
|
|
4975
|
+
catch (ex) {
|
|
4976
|
+
return null;
|
|
4977
|
+
}
|
|
4978
|
+
};
|
|
4979
|
+
const storeLocation = (_) => {
|
|
4980
|
+
try {
|
|
4981
|
+
globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
|
|
4982
|
+
}
|
|
4983
|
+
catch (ex) {
|
|
4984
|
+
// Do nothing
|
|
4985
|
+
}
|
|
4986
|
+
};
|
|
4996
4987
|
|
|
4997
4988
|
var Currency;
|
|
4998
4989
|
(function (Currency) {
|
|
@@ -5134,7 +5125,7 @@
|
|
|
5134
5125
|
}
|
|
5135
5126
|
|
|
5136
5127
|
const ExchangeRateTile = JSX(({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
|
|
5137
|
-
const currentLocation =
|
|
5128
|
+
const [currentLocation] = useLocation();
|
|
5138
5129
|
const exchangeRates = useFetchExchangeRateData(currentLocation);
|
|
5139
5130
|
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
5140
5131
|
const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
|
|
@@ -5673,33 +5664,27 @@
|
|
|
5673
5664
|
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" })] }));
|
|
5674
5665
|
});
|
|
5675
5666
|
|
|
5676
|
-
const SelectedLocation = JSX(({ defaultLocation }) => {
|
|
5677
|
-
const currentLocation = useLocationState(defaultLocation);
|
|
5678
|
-
const link = useLink();
|
|
5679
|
-
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
5680
|
-
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;
|
|
5681
|
-
});
|
|
5682
|
-
|
|
5683
5667
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
5684
5668
|
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
5685
|
-
const
|
|
5669
|
+
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
5670
|
+
const link = useLink();
|
|
5671
|
+
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
5686
5672
|
const [query, setQuery] = useState('');
|
|
5687
|
-
const
|
|
5688
|
-
const
|
|
5689
|
-
const regionsGroupByLetter = useMemo(() => groupBy(regions, regionFirstLetter), [regions]);
|
|
5673
|
+
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
5674
|
+
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
5690
5675
|
const { close } = useDialogManager();
|
|
5691
5676
|
const handleChangeLocation = useCallback((region) => {
|
|
5692
|
-
|
|
5677
|
+
selectCurrentLocation(region);
|
|
5693
5678
|
close();
|
|
5694
5679
|
}, []);
|
|
5695
|
-
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(
|
|
5680
|
+
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
|
|
5696
5681
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
5697
5682
|
.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)] }));
|
|
5698
5683
|
});
|
|
5699
|
-
const regionFirstLetter = (region) => region.name?.charAt(0)
|
|
5684
|
+
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
5700
5685
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
5701
5686
|
...region,
|
|
5702
|
-
name: region.name?.replace(/республика|область|край'/gi, '').trim()
|
|
5687
|
+
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
5703
5688
|
}));
|
|
5704
5689
|
|
|
5705
5690
|
const useLocationDialog = (props) => {
|
|
@@ -5727,7 +5712,7 @@
|
|
|
5727
5712
|
|
|
5728
5713
|
const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
|
|
5729
5714
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
5730
|
-
const currentLocation =
|
|
5715
|
+
const [currentLocation] = useLocation(rest?.branches?.default);
|
|
5731
5716
|
const searchDialog = useSearchDialog(rest);
|
|
5732
5717
|
const locationDialog = useLocationDialog(rest);
|
|
5733
5718
|
const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
|
|
@@ -6566,7 +6551,7 @@
|
|
|
6566
6551
|
designDisabledPeople: (item) => Boolean(item.designDisabledPeople),
|
|
6567
6552
|
};
|
|
6568
6553
|
const AtmsMap = JSX(({ descriptionData, className }) => {
|
|
6569
|
-
const currentLocation =
|
|
6554
|
+
const [currentLocation] = useLocation();
|
|
6570
6555
|
const regionCode = currentLocation?.code ?? '000';
|
|
6571
6556
|
const { data: officesData, isLoad } = useAtms(regionCode);
|
|
6572
6557
|
return (jsx(OfficesAtmsMapLayout, { className: className, filterItems: filterItems, data: officesData, isLoad: isLoad, initFilterState: INITIAL_FILTRATION_STATE, renderCard: renderAtmCard, getBalloon: getAtmPoint, title: `Банкоматы филиала ${currentLocation?.name}`, descriptionData: descriptionData }));
|
|
@@ -6785,7 +6770,7 @@
|
|
|
6785
6770
|
};
|
|
6786
6771
|
|
|
6787
6772
|
const OfficesMap = JSX(({ className }) => {
|
|
6788
|
-
const currentLocation =
|
|
6773
|
+
const [currentLocation] = useLocation();
|
|
6789
6774
|
const regionCode = currentLocation?.code ?? '000';
|
|
6790
6775
|
const { data, isLoad } = useOffices(regionCode);
|
|
6791
6776
|
return (jsx(OfficesAtmsMapLayout, { className: className, data: data?.branches, isLoad: isLoad, remoteWorkplaces: data?.remoteWorkplaces, renderCard: renderOfficeCard, renderRemoteWorkplaceCard: renderRemoteWorkplaceCard, getBalloon: getOfficePoint, getBalloonRemoteWorkplaces: getRemoteWorkplacePoint, title: `Офисы филиала ${currentLocation?.name}` }));
|
|
@@ -7469,7 +7454,7 @@
|
|
|
7469
7454
|
onClose && onClose(dialogs[dialogs.length - 1]);
|
|
7470
7455
|
pop();
|
|
7471
7456
|
}, [dialogs, onClose]);
|
|
7472
|
-
useEffect(() => defaultEventBus.
|
|
7457
|
+
useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
|
|
7473
7458
|
switch (action.type) {
|
|
7474
7459
|
case 'open':
|
|
7475
7460
|
push(action);
|
|
@@ -7526,7 +7511,7 @@
|
|
|
7526
7511
|
const close = useCallback(() => {
|
|
7527
7512
|
setPopup(null);
|
|
7528
7513
|
}, []);
|
|
7529
|
-
useEffect(() => defaultEventBus.
|
|
7514
|
+
useEffect(() => defaultEventBus.subscribe('popup', (action) => {
|
|
7530
7515
|
switch (action.type) {
|
|
7531
7516
|
case 'open':
|
|
7532
7517
|
case 'update':
|
|
@@ -7581,7 +7566,7 @@
|
|
|
7581
7566
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7582
7567
|
});
|
|
7583
7568
|
|
|
7584
|
-
const packageVersion = "0.14.
|
|
7569
|
+
const packageVersion = "0.14.601";
|
|
7585
7570
|
|
|
7586
7571
|
exports.Blocks = Blocks;
|
|
7587
7572
|
exports.ContentPage = ContentPage;
|