@redneckz/wildless-cms-uni-blocks 0.9.2 → 0.9.4
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/bin/migration-scripts/0.5.14.js +6 -0
- package/bin/migration-scripts/0.8.17.js +6 -0
- package/bin/migration-scripts/0.8.24.js +2 -2
- package/bin/migration-scripts/0.8.8.js +6 -0
- package/bin/migration-scripts/0.9.1.js +70 -0
- package/bin/migration-scripts/{0.8.31.js → 0.9.3.js} +14 -12
- package/bundle/EventBus/defaultEventBus.d.ts +3 -2
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +237 -185
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/renderBankOffices.d.ts +1 -1
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -3
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/bundle/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
- package/bundle/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
- package/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/bundle/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/bundle/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
- package/bundle/components/SafeDepositRental/utils.d.ts +1 -1
- package/bundle/components/Tabs/TabActivationEvent.d.ts +5 -0
- package/bundle/components/Tabs/Tabs.d.ts +1 -5
- package/bundle/hooks/useLocation.d.ts +1 -1
- package/bundle/services/search/useSearch.d.ts +7 -2
- package/bundle/ui-kit/Dialog/Dialog.d.ts +1 -0
- package/bundle/ui-kit/Dialog/DialogAction.d.ts +12 -0
- package/bundle/ui-kit/Dialog/useDialog.d.ts +4 -0
- package/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
- package/bundle/ui-kit/Dialog/useDialogProps.d.ts +5 -0
- package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
- package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
- package/bundle/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
- package/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
- package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
- package/{lib/ui-kit/SearchBar/SearchBarInput.d.ts → bundle/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
- package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -2
- package/bundle/utils/noop.d.ts +1 -0
- package/bundle/utils/useDebouncedEffect.d.ts +1 -0
- package/dist/EventBus/defaultEventBus.d.ts +3 -2
- package/dist/EventBus/defaultEventBus.js.map +1 -1
- package/dist/components/ApplicationForm/renderBankOffices.d.ts +1 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +1 -3
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +8 -7
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.js +5 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -3
- package/dist/components/Header/HeaderSecondaryMenu.js +10 -13
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +1 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.mobile.js +2 -4
- package/dist/components/RollupItem/RollupItem.mobile.js.map +1 -1
- package/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
- package/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
- package/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
- package/dist/components/SafeDepositRental/utils.d.ts +1 -1
- package/dist/components/Tabs/TabActivationEvent.d.ts +5 -0
- package/dist/components/{Accordion/AccordionContent.js → Tabs/TabActivationEvent.js} +1 -1
- package/dist/components/Tabs/TabActivationEvent.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +1 -5
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +1 -3
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/hooks/useLink.js +3 -0
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/hooks/useLocation.d.ts +1 -1
- package/dist/hooks/useLocation.js +2 -2
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/services/search/useSearch.d.ts +7 -2
- package/dist/services/search/useSearch.js +15 -18
- package/dist/services/search/useSearch.js.map +1 -1
- package/dist/ui-kit/Dialog/Dialog.d.ts +1 -0
- package/dist/ui-kit/Dialog/Dialog.js +2 -6
- package/dist/ui-kit/Dialog/Dialog.js.map +1 -1
- package/dist/ui-kit/Dialog/DialogAction.d.ts +12 -0
- package/dist/ui-kit/{Location/LocationProps.js → Dialog/DialogAction.js} +1 -1
- package/dist/ui-kit/Dialog/DialogAction.js.map +1 -0
- package/dist/ui-kit/Dialog/useDialog.d.ts +4 -0
- package/dist/ui-kit/Dialog/useDialog.js +9 -0
- package/dist/ui-kit/Dialog/useDialog.js.map +1 -0
- package/dist/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
- package/dist/ui-kit/Dialog/useDialogHandlers.js +21 -0
- package/dist/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
- package/dist/ui-kit/Dialog/useDialogProps.d.ts +5 -0
- package/dist/ui-kit/Dialog/useDialogProps.js +37 -0
- package/dist/ui-kit/Dialog/useDialogProps.js.map +1 -0
- package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
- package/dist/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
- package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
- package/dist/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
- package/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
- package/dist/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
- package/dist/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
- package/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -0
- package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
- package/dist/ui-kit/SearchBar/SearchBarInner.js +13 -40
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
- package/dist/ui-kit/SearchDialog/SearchDialog.js +40 -0
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
- package/dist/ui-kit/{SearchBar/SearchBarInput.d.ts → SearchDialog/SearchInput.d.ts} +2 -2
- package/{mobile/dist/ui-kit/SearchBar/SearchBarInput.js → dist/ui-kit/SearchDialog/SearchInput.js} +3 -3
- package/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -0
- package/dist/ui-kit/TopItem/TopItem.d.ts +1 -2
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/noop.d.ts +1 -0
- package/dist/utils/noop.js +7 -0
- package/dist/utils/noop.js.map +1 -0
- package/dist/utils/useDebouncedEffect.d.ts +1 -0
- package/dist/utils/useDebouncedEffect.js +11 -0
- package/dist/utils/useDebouncedEffect.js.map +1 -0
- package/lib/EventBus/defaultEventBus.d.ts +3 -2
- package/lib/EventBus/defaultEventBus.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/renderBankOffices.d.ts +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +1 -3
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +8 -7
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.js +5 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -3
- package/lib/components/Header/HeaderSecondaryMenu.js +10 -13
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +1 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.mobile.js +2 -4
- package/lib/components/RollupItem/RollupItem.mobile.js.map +1 -1
- package/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
- package/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
- package/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
- package/lib/components/SafeDepositRental/utils.d.ts +1 -1
- package/lib/components/Tabs/TabActivationEvent.d.ts +5 -0
- package/lib/components/Tabs/TabActivationEvent.js +2 -0
- package/lib/components/Tabs/TabActivationEvent.js.map +1 -0
- package/lib/components/Tabs/Tabs.d.ts +1 -5
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +1 -3
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/hooks/useLink.js +3 -0
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +1 -1
- package/lib/hooks/useLocation.js +2 -2
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/services/search/useSearch.d.ts +7 -2
- package/lib/services/search/useSearch.js +16 -19
- package/lib/services/search/useSearch.js.map +1 -1
- package/lib/ui-kit/Dialog/Dialog.d.ts +1 -0
- package/lib/ui-kit/Dialog/Dialog.js +3 -7
- package/lib/ui-kit/Dialog/Dialog.js.map +1 -1
- package/lib/ui-kit/Dialog/DialogAction.d.ts +12 -0
- package/lib/ui-kit/Dialog/DialogAction.js +2 -0
- package/lib/ui-kit/Dialog/DialogAction.js.map +1 -0
- package/lib/ui-kit/Dialog/useDialog.d.ts +4 -0
- package/lib/ui-kit/Dialog/useDialog.js +6 -0
- package/lib/ui-kit/Dialog/useDialog.js.map +1 -0
- package/lib/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
- package/lib/ui-kit/Dialog/useDialogHandlers.js +18 -0
- package/lib/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
- package/lib/ui-kit/Dialog/useDialogProps.d.ts +5 -0
- package/lib/ui-kit/Dialog/useDialogProps.js +34 -0
- package/lib/ui-kit/Dialog/useDialogProps.js.map +1 -0
- package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
- package/lib/ui-kit/{Location/Location.fixture.d.ts → LocationDialog/LocationDialog.fixture.d.ts} +0 -0
- package/lib/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
- package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
- package/lib/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
- package/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
- package/lib/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
- package/lib/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
- package/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -0
- package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
- package/lib/ui-kit/SearchBar/SearchBarInner.js +14 -41
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
- package/lib/ui-kit/SearchDialog/SearchDialog.js +38 -0
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
- package/{bundle/ui-kit/SearchBar/SearchBarInput.d.ts → lib/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
- package/lib/ui-kit/{SearchBar/SearchBarInput.js → SearchDialog/SearchInput.js} +2 -2
- package/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -0
- package/lib/ui-kit/TopItem/TopItem.d.ts +1 -2
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/noop.d.ts +1 -0
- package/lib/utils/noop.js +4 -0
- package/lib/utils/noop.js.map +1 -0
- package/lib/utils/useDebouncedEffect.d.ts +1 -0
- package/lib/utils/useDebouncedEffect.js +8 -0
- package/lib/utils/useDebouncedEffect.js.map +1 -0
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +3 -2
- package/mobile/bundle/bundle.umd.js +257 -218
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/renderBankOffices.d.ts +1 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -3
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/mobile/bundle/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
- package/mobile/bundle/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
- package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/mobile/bundle/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
- package/mobile/bundle/components/SafeDepositRental/utils.d.ts +1 -1
- package/mobile/bundle/components/Tabs/TabActivationEvent.d.ts +5 -0
- package/mobile/bundle/components/Tabs/Tabs.d.ts +1 -5
- package/mobile/bundle/hooks/useLocation.d.ts +1 -1
- package/mobile/bundle/services/search/useSearch.d.ts +7 -2
- package/mobile/bundle/ui-kit/Dialog/Dialog.d.ts +1 -0
- package/mobile/bundle/ui-kit/Dialog/DialogAction.d.ts +12 -0
- package/mobile/bundle/ui-kit/Dialog/useDialog.d.ts +4 -0
- package/mobile/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
- package/mobile/bundle/ui-kit/Dialog/useDialogProps.d.ts +5 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
- package/mobile/bundle/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
- package/mobile/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
- package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
- package/mobile/bundle/ui-kit/{SearchBar/SearchBarInput.d.ts → SearchDialog/SearchInput.d.ts} +2 -2
- package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -2
- package/mobile/bundle/utils/noop.d.ts +1 -0
- package/mobile/bundle/utils/useDebouncedEffect.d.ts +1 -0
- package/mobile/dist/EventBus/defaultEventBus.d.ts +3 -2
- package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderBankOffices.d.ts +1 -1
- package/mobile/dist/components/Blocks.js +1 -3
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +8 -7
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +10 -13
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +2 -4
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
- package/mobile/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
- package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/utils.d.ts +1 -1
- package/mobile/dist/components/Tabs/TabActivationEvent.d.ts +5 -0
- package/mobile/dist/components/{Accordion/AccordionContent.js → Tabs/TabActivationEvent.js} +1 -1
- package/mobile/dist/components/Tabs/TabActivationEvent.js.map +1 -0
- package/mobile/dist/components/Tabs/Tabs.d.ts +1 -5
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +1 -3
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/hooks/useLink.js +3 -0
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/hooks/useLocation.d.ts +1 -1
- package/mobile/dist/hooks/useLocation.js +2 -2
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/services/search/useSearch.d.ts +7 -2
- package/mobile/dist/services/search/useSearch.js +15 -18
- package/mobile/dist/services/search/useSearch.js.map +1 -1
- package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +1 -0
- package/mobile/dist/ui-kit/Dialog/Dialog.js +2 -6
- package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/Dialog/DialogAction.d.ts +12 -0
- package/mobile/dist/ui-kit/{Location/LocationProps.js → Dialog/DialogAction.js} +1 -1
- package/mobile/dist/ui-kit/Dialog/DialogAction.js.map +1 -0
- package/mobile/dist/ui-kit/Dialog/useDialog.d.ts +4 -0
- package/mobile/dist/ui-kit/Dialog/useDialog.js +9 -0
- package/mobile/dist/ui-kit/Dialog/useDialog.js.map +1 -0
- package/mobile/dist/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
- package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js +21 -0
- package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
- package/mobile/dist/ui-kit/Dialog/useDialogProps.d.ts +5 -0
- package/mobile/dist/ui-kit/Dialog/useDialogProps.js +37 -0
- package/mobile/dist/ui-kit/Dialog/useDialogProps.js.map +1 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
- package/mobile/dist/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
- package/mobile/dist/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
- package/mobile/dist/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
- package/mobile/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -0
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +13 -40
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +40 -0
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
- package/mobile/dist/ui-kit/SearchDialog/SearchInput.d.ts +9 -0
- package/{dist/ui-kit/SearchBar/SearchBarInput.js → mobile/dist/ui-kit/SearchDialog/SearchInput.js} +3 -3
- package/mobile/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -0
- package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -2
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/noop.d.ts +1 -0
- package/mobile/dist/utils/noop.js +7 -0
- package/mobile/dist/utils/noop.js.map +1 -0
- package/mobile/dist/utils/useDebouncedEffect.d.ts +1 -0
- package/mobile/dist/utils/useDebouncedEffect.js +11 -0
- package/mobile/dist/utils/useDebouncedEffect.js.map +1 -0
- package/mobile/lib/EventBus/defaultEventBus.d.ts +3 -2
- package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderBankOffices.d.ts +1 -1
- package/mobile/lib/components/Blocks.js +1 -3
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +8 -7
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +10 -13
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +2 -4
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
- package/mobile/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
- package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/utils.d.ts +1 -1
- package/mobile/lib/components/Tabs/TabActivationEvent.d.ts +5 -0
- package/mobile/lib/components/Tabs/TabActivationEvent.js +2 -0
- package/mobile/lib/components/Tabs/TabActivationEvent.js.map +1 -0
- package/mobile/lib/components/Tabs/Tabs.d.ts +1 -5
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +1 -3
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/hooks/useLink.js +3 -0
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +1 -1
- package/mobile/lib/hooks/useLocation.js +2 -2
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/services/search/useSearch.d.ts +7 -2
- package/mobile/lib/services/search/useSearch.js +16 -19
- package/mobile/lib/services/search/useSearch.js.map +1 -1
- package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +1 -0
- package/mobile/lib/ui-kit/Dialog/Dialog.js +3 -7
- package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/Dialog/DialogAction.d.ts +12 -0
- package/mobile/lib/ui-kit/Dialog/DialogAction.js +2 -0
- package/mobile/lib/ui-kit/Dialog/DialogAction.js.map +1 -0
- package/mobile/lib/ui-kit/Dialog/useDialog.d.ts +4 -0
- package/mobile/lib/ui-kit/Dialog/useDialog.js +6 -0
- package/mobile/lib/ui-kit/Dialog/useDialog.js.map +1 -0
- package/mobile/lib/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
- package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js +18 -0
- package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
- package/mobile/lib/ui-kit/Dialog/useDialogProps.d.ts +5 -0
- package/mobile/lib/ui-kit/Dialog/useDialogProps.js +34 -0
- package/mobile/lib/ui-kit/Dialog/useDialogProps.js.map +1 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
- package/mobile/lib/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
- package/mobile/lib/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
- package/mobile/lib/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
- package/mobile/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -0
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +14 -41
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +38 -0
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
- package/mobile/lib/ui-kit/SearchDialog/SearchInput.d.ts +9 -0
- package/mobile/lib/ui-kit/{SearchBar/SearchBarInput.js → SearchDialog/SearchInput.js} +2 -2
- package/mobile/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -0
- package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -2
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/noop.d.ts +1 -0
- package/mobile/lib/utils/noop.js +4 -0
- package/mobile/lib/utils/noop.js.map +1 -0
- package/mobile/lib/utils/useDebouncedEffect.d.ts +1 -0
- package/mobile/lib/utils/useDebouncedEffect.js +8 -0
- package/mobile/lib/utils/useDebouncedEffect.js.map +1 -0
- package/mobile/src/EventBus/defaultEventBus.ts +3 -2
- package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/mobile/src/components/Blocks.ts +1 -3
- package/mobile/src/components/ContentPage/ContentPage.tsx +15 -12
- package/mobile/src/components/Footer/Footer.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +18 -42
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
- package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +2 -10
- package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +2 -2
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
- package/mobile/src/{hooks → components/SafeDepositRental}/useSafeBoxes.ts +1 -1
- package/mobile/src/components/SafeDepositRental/utils.ts +1 -1
- package/mobile/src/components/Tabs/TabActivationEvent.ts +6 -0
- package/mobile/src/components/Tabs/Tabs.tsx +0 -5
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +1 -3
- package/mobile/src/hooks/useLink.ts +4 -0
- package/mobile/src/hooks/useLocation.ts +5 -8
- package/mobile/src/services/search/useSearch.ts +26 -23
- package/mobile/src/ui-kit/Dialog/Dialog.tsx +6 -14
- package/mobile/src/ui-kit/Dialog/DialogAction.ts +14 -0
- package/mobile/src/ui-kit/Dialog/useDialog.ts +6 -0
- package/mobile/src/ui-kit/Dialog/useDialogHandlers.ts +28 -0
- package/mobile/src/ui-kit/Dialog/useDialogProps.ts +45 -0
- package/mobile/src/ui-kit/{Location/Location.tsx → LocationDialog/LocationDialog.tsx} +38 -29
- package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +20 -0
- package/mobile/src/ui-kit/{Location → LocationDialog}/SearchBar.tsx +0 -0
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +17 -85
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +65 -0
- package/{src/ui-kit/SearchBar/SearchBarInput.tsx → mobile/src/ui-kit/SearchDialog/SearchInput.tsx} +2 -2
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -2
- package/mobile/src/utils/noop.ts +3 -0
- package/mobile/src/utils/useDebouncedEffect.ts +14 -0
- package/package.json +1 -1
- package/src/EventBus/defaultEventBus.ts +3 -2
- package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/src/components/Blocks.mobile.ts +1 -3
- package/src/components/Blocks.ts +0 -2
- package/src/components/ContentPage/ContentPage.tsx +15 -12
- package/src/components/Footer/Footer.fixture.tsx +17 -0
- package/src/components/Footer/Footer.mobile.tsx +1 -1
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Header/Header.tsx +12 -2
- package/src/components/Header/HeaderSecondaryMenu.tsx +18 -42
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
- package/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
- package/src/components/RollupItem/RollupItem.mobile.tsx +2 -10
- package/src/components/RollupItem/RollupItem.tsx +1 -1
- package/src/components/SafeDepositRental/RegionsAndBranches.tsx +1 -1
- package/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +2 -2
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
- package/src/{hooks → components/SafeDepositRental}/useSafeBoxes.ts +1 -1
- package/src/components/SafeDepositRental/utils.ts +1 -1
- package/src/components/Tabs/TabActivationEvent.ts +6 -0
- package/src/components/Tabs/Tabs.tsx +0 -5
- package/src/components/VerticalLayout/VerticalLayout.tsx +1 -3
- package/src/hooks/useLink.ts +4 -0
- package/src/hooks/useLocation.ts +5 -8
- package/src/services/search/useSearch.ts +26 -23
- package/src/ui-kit/Dialog/Dialog.tsx +6 -14
- package/src/ui-kit/Dialog/DialogAction.ts +14 -0
- package/src/ui-kit/Dialog/useDialog.ts +6 -0
- package/src/ui-kit/Dialog/useDialogHandlers.ts +28 -0
- package/src/ui-kit/Dialog/useDialogProps.ts +45 -0
- package/src/ui-kit/{Location/Location.fixture.tsx → LocationDialog/LocationDialog.fixture.tsx} +3 -5
- package/src/ui-kit/{Location/Location.tsx → LocationDialog/LocationDialog.tsx} +38 -29
- package/src/ui-kit/LocationDialog/LocationDialogProps.ts +20 -0
- package/src/ui-kit/{Location → LocationDialog}/SearchBar.tsx +0 -0
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +17 -85
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +65 -0
- package/{mobile/src/ui-kit/SearchBar/SearchBarInput.tsx → src/ui-kit/SearchDialog/SearchInput.tsx} +2 -2
- package/src/ui-kit/TopItem/TopItem.tsx +1 -2
- package/src/utils/noop.ts +3 -0
- package/src/utils/useDebouncedEffect.ts +14 -0
- package/bin/migration-scripts/0.4.5.js +0 -109
- package/bin/migration-scripts/0.5.10.js +0 -36
- package/bin/migration-scripts/0.6.16.js +0 -90
- package/bin/migration-scripts/0.6.34.js +0 -53
- package/bundle/components/Accordion/Accordion.d.ts +0 -5
- package/bundle/components/Accordion/Accordion.mobile.d.ts +0 -5
- package/bundle/components/Accordion/AccordionContent.d.ts +0 -19
- package/bundle/ui-kit/Location/Location.d.ts +0 -2
- package/bundle/ui-kit/Location/LocationProps.d.ts +0 -16
- package/dist/components/Accordion/Accordion.d.ts +0 -5
- package/dist/components/Accordion/Accordion.js +0 -12
- package/dist/components/Accordion/Accordion.js.map +0 -1
- package/dist/components/Accordion/Accordion.mobile.d.ts +0 -5
- package/dist/components/Accordion/Accordion.mobile.js +0 -11
- package/dist/components/Accordion/Accordion.mobile.js.map +0 -1
- package/dist/components/Accordion/AccordionContent.d.ts +0 -19
- package/dist/components/Accordion/AccordionContent.js.map +0 -1
- package/dist/hooks/useSafeBoxes.js.map +0 -1
- package/dist/ui-kit/Location/Location.d.ts +0 -2
- package/dist/ui-kit/Location/Location.js.map +0 -1
- package/dist/ui-kit/Location/LocationProps.d.ts +0 -16
- package/dist/ui-kit/Location/LocationProps.js.map +0 -1
- package/dist/ui-kit/Location/SearchBar.js.map +0 -1
- package/dist/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
- package/lib/components/Accordion/Accordion.d.ts +0 -5
- package/lib/components/Accordion/Accordion.fixture.d.ts +0 -7
- package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +0 -8
- package/lib/components/Accordion/Accordion.js +0 -10
- package/lib/components/Accordion/Accordion.js.map +0 -1
- package/lib/components/Accordion/Accordion.mobile.d.ts +0 -5
- package/lib/components/Accordion/Accordion.mobile.js +0 -9
- package/lib/components/Accordion/Accordion.mobile.js.map +0 -1
- package/lib/components/Accordion/AccordionContent.d.ts +0 -19
- package/lib/components/Accordion/AccordionContent.js +0 -2
- package/lib/components/Accordion/AccordionContent.js.map +0 -1
- package/lib/hooks/useSafeBoxes.js.map +0 -1
- package/lib/ui-kit/Location/Location.d.ts +0 -2
- package/lib/ui-kit/Location/Location.js.map +0 -1
- package/lib/ui-kit/Location/LocationProps.d.ts +0 -16
- package/lib/ui-kit/Location/LocationProps.js +0 -2
- package/lib/ui-kit/Location/LocationProps.js.map +0 -1
- package/lib/ui-kit/Location/SearchBar.js.map +0 -1
- package/lib/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
- package/mobile/bundle/components/Accordion/Accordion.d.ts +0 -5
- package/mobile/bundle/components/Accordion/AccordionContent.d.ts +0 -19
- package/mobile/bundle/ui-kit/Location/Location.d.ts +0 -2
- package/mobile/bundle/ui-kit/Location/LocationProps.d.ts +0 -16
- package/mobile/dist/components/Accordion/Accordion.d.ts +0 -5
- package/mobile/dist/components/Accordion/Accordion.js +0 -11
- package/mobile/dist/components/Accordion/Accordion.js.map +0 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +0 -19
- package/mobile/dist/components/Accordion/AccordionContent.js.map +0 -1
- package/mobile/dist/hooks/useSafeBoxes.js.map +0 -1
- package/mobile/dist/ui-kit/Location/Location.d.ts +0 -2
- package/mobile/dist/ui-kit/Location/Location.js.map +0 -1
- package/mobile/dist/ui-kit/Location/LocationProps.d.ts +0 -16
- package/mobile/dist/ui-kit/Location/LocationProps.js.map +0 -1
- package/mobile/dist/ui-kit/Location/SearchBar.js.map +0 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.d.ts +0 -9
- package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
- package/mobile/lib/components/Accordion/Accordion.d.ts +0 -5
- package/mobile/lib/components/Accordion/Accordion.js +0 -9
- package/mobile/lib/components/Accordion/Accordion.js.map +0 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +0 -19
- package/mobile/lib/components/Accordion/AccordionContent.js +0 -2
- package/mobile/lib/components/Accordion/AccordionContent.js.map +0 -1
- package/mobile/lib/hooks/useSafeBoxes.js.map +0 -1
- package/mobile/lib/ui-kit/Location/Location.d.ts +0 -2
- package/mobile/lib/ui-kit/Location/Location.js.map +0 -1
- package/mobile/lib/ui-kit/Location/LocationProps.d.ts +0 -16
- package/mobile/lib/ui-kit/Location/LocationProps.js +0 -2
- package/mobile/lib/ui-kit/Location/LocationProps.js.map +0 -1
- package/mobile/lib/ui-kit/Location/SearchBar.js.map +0 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.d.ts +0 -9
- package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
- package/mobile/src/components/Accordion/Accordion.example.json +0 -54
- package/mobile/src/components/Accordion/Accordion.tsx +0 -27
- package/mobile/src/components/Accordion/Accordion.ui.json +0 -1
- package/mobile/src/components/Accordion/AccordionContent.ts +0 -22
- package/mobile/src/ui-kit/Location/LocationProps.ts +0 -25
- package/src/components/Accordion/Accordion.example.json +0 -54
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +0 -64
- package/src/components/Accordion/Accordion.fixture.tsx +0 -113
- package/src/components/Accordion/Accordion.mobile.tsx +0 -27
- package/src/components/Accordion/Accordion.tsx +0 -33
- package/src/components/Accordion/Accordion.ui.json +0 -1
- package/src/components/Accordion/AccordionContent.ts +0 -22
- package/src/ui-kit/Location/LocationProps.ts +0 -25
package/bundle/bundle.umd.js
CHANGED
|
@@ -236,61 +236,27 @@
|
|
|
236
236
|
return JSXTmpl;
|
|
237
237
|
};
|
|
238
238
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
console.warn(`No block with "${type}" is registered`);
|
|
255
|
-
}
|
|
256
|
-
const BlockComponent = type && blocksRegistry[type];
|
|
257
|
-
return blockDecorator({
|
|
258
|
-
blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
|
|
259
|
-
className, block.style || defaultStyle),
|
|
260
|
-
block,
|
|
261
|
-
ancestors,
|
|
262
|
-
// Adjusted by decorator block and blockClassName
|
|
263
|
-
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
264
|
-
const { content } = adjustedBlock;
|
|
265
|
-
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
|
|
266
|
-
},
|
|
267
|
-
}, key);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
const EMPTY_ANCESTORS = [];
|
|
271
|
-
const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
|
|
272
|
-
...options,
|
|
273
|
-
key: `${key ? key : _.type}-${j}`,
|
|
274
|
-
ancestors: options.parent
|
|
275
|
-
? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
|
|
276
|
-
: ancestors,
|
|
277
|
-
}));
|
|
278
|
-
|
|
279
|
-
function renderChildren({ children, block, options, renderProps, }) {
|
|
280
|
-
if (children) {
|
|
281
|
-
return children;
|
|
239
|
+
function CorporateLeadAPI() {
|
|
240
|
+
async function send(body) {
|
|
241
|
+
try {
|
|
242
|
+
const response = await fetch('/api/v1/sendcorporatelead', {
|
|
243
|
+
method: 'POST',
|
|
244
|
+
headers: { 'Content-Type': 'application/json' },
|
|
245
|
+
mode: 'cors',
|
|
246
|
+
body: JSON.stringify(body),
|
|
247
|
+
});
|
|
248
|
+
const data = await response.json();
|
|
249
|
+
return data;
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
282
254
|
}
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
|
|
255
|
+
return {
|
|
256
|
+
send,
|
|
257
|
+
};
|
|
286
258
|
}
|
|
287
259
|
|
|
288
|
-
const AlignText = {
|
|
289
|
-
left: 'text-left',
|
|
290
|
-
center: 'text-center',
|
|
291
|
-
right: 'text-right',
|
|
292
|
-
};
|
|
293
|
-
|
|
294
260
|
class EventBus {
|
|
295
261
|
subscribers = {};
|
|
296
262
|
subjectsStateMap = {};
|
|
@@ -358,6 +324,11 @@
|
|
|
358
324
|
return useIntersectionObserver(observerCallback, { sensitivity: 1 });
|
|
359
325
|
}
|
|
360
326
|
|
|
327
|
+
const style = (...atoms) => atoms
|
|
328
|
+
.flatMap((_) => _)
|
|
329
|
+
.filter(Boolean)
|
|
330
|
+
.join(' ');
|
|
331
|
+
|
|
361
332
|
const blockStyles = {
|
|
362
333
|
primary: 'bg-white text-primary-text',
|
|
363
334
|
secondary: 'bg-primary-main text-white',
|
|
@@ -387,32 +358,6 @@
|
|
|
387
358
|
};
|
|
388
359
|
const Heading = JSX(({ className = '', headingType = 'h3', as: Tag = 'h3', title, children }) => (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children })));
|
|
389
360
|
|
|
390
|
-
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
391
|
-
|
|
392
|
-
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${AlignText[accordionAlignTitle]}`, title: title })) : null, description ? (jsx("div", { className: "mb-2.5", children: jsx(Paragraph, { size: "text-l", children: description }) })) : null, jsx("div", { className: "list-none m-0 p-0", children: renderChildren(rest) })] })));
|
|
393
|
-
Accordion.childrenTypes = ['Accordion'];
|
|
394
|
-
|
|
395
|
-
function CorporateLeadAPI() {
|
|
396
|
-
async function send(body) {
|
|
397
|
-
try {
|
|
398
|
-
const response = await fetch('/api/v1/sendcorporatelead', {
|
|
399
|
-
method: 'POST',
|
|
400
|
-
headers: { 'Content-Type': 'application/json' },
|
|
401
|
-
mode: 'cors',
|
|
402
|
-
body: JSON.stringify(body),
|
|
403
|
-
});
|
|
404
|
-
const data = await response.json();
|
|
405
|
-
return data;
|
|
406
|
-
}
|
|
407
|
-
catch (e) {
|
|
408
|
-
return null;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
return {
|
|
412
|
-
send,
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
|
|
416
361
|
const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, onBlur, ...inputProps }) => {
|
|
417
362
|
const handleChange = useCallback((e) => {
|
|
418
363
|
const validInputValue = e.target.validity.valid ? e.target.value : value;
|
|
@@ -536,6 +481,11 @@
|
|
|
536
481
|
},
|
|
537
482
|
];
|
|
538
483
|
|
|
484
|
+
const useDialog = (id = '') => ({
|
|
485
|
+
open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
|
|
486
|
+
close: () => defaultEventBus.fire('dialog', { type: 'close' }),
|
|
487
|
+
});
|
|
488
|
+
|
|
539
489
|
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
540
490
|
|
|
541
491
|
const isURL = (href) => Boolean(href?.includes(':'));
|
|
@@ -590,6 +540,7 @@
|
|
|
590
540
|
|
|
591
541
|
function useLink(isRemote = false) {
|
|
592
542
|
const router = useRouter();
|
|
543
|
+
const { close } = useDialog();
|
|
593
544
|
return (props) => ({
|
|
594
545
|
...props,
|
|
595
546
|
href: isRemote ? props.href : adjustHref(router)(props.href),
|
|
@@ -603,6 +554,7 @@
|
|
|
603
554
|
// Default routing
|
|
604
555
|
return;
|
|
605
556
|
}
|
|
557
|
+
close();
|
|
606
558
|
// Client routing
|
|
607
559
|
ev?.preventDefault();
|
|
608
560
|
router.push(href);
|
|
@@ -683,6 +635,8 @@
|
|
|
683
635
|
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, children }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, children: children })));
|
|
684
636
|
const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
|
|
685
637
|
|
|
638
|
+
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
639
|
+
|
|
686
640
|
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
687
641
|
|
|
688
642
|
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
@@ -1216,6 +1170,12 @@
|
|
|
1216
1170
|
const renderBonusCount = (_) => (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [_.bonusCount ? (jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount })) : null, _.bonusName ? (jsx("span", { className: "text-h2 bg-clip-text text-transparent bg-green-to-yellow", children: _.bonusName })) : null] }));
|
|
1217
1171
|
const renderBonusImage = (_) => _.image ? jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full`, image: _.image }) : null;
|
|
1218
1172
|
|
|
1173
|
+
const AlignText = {
|
|
1174
|
+
left: 'text-left',
|
|
1175
|
+
center: 'text-center',
|
|
1176
|
+
right: 'text-right',
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1219
1179
|
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
1220
1180
|
const renderBonusBenefit = ({ icon, title, description }, i) => {
|
|
1221
1181
|
return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", width: "auto", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
|
|
@@ -1836,6 +1796,50 @@
|
|
|
1836
1796
|
return (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: handleChange, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
|
|
1837
1797
|
});
|
|
1838
1798
|
|
|
1799
|
+
const DEFAULT_SLOT_NAME = null;
|
|
1800
|
+
|
|
1801
|
+
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
1802
|
+
|
|
1803
|
+
const DEFAULT_ANCESTORS = [];
|
|
1804
|
+
const defaultStyle = 'col-span-12';
|
|
1805
|
+
function renderBlock(block, options) {
|
|
1806
|
+
const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', extraProps = {}, } = options;
|
|
1807
|
+
const { type } = block;
|
|
1808
|
+
if (!(type && type in blocksRegistry)) {
|
|
1809
|
+
console.warn(`No block with "${type}" is registered`);
|
|
1810
|
+
}
|
|
1811
|
+
const BlockComponent = type && blocksRegistry[type];
|
|
1812
|
+
return blockDecorator({
|
|
1813
|
+
blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
|
|
1814
|
+
className, block.style || defaultStyle),
|
|
1815
|
+
block,
|
|
1816
|
+
ancestors,
|
|
1817
|
+
// Adjusted by decorator block and blockClassName
|
|
1818
|
+
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
1819
|
+
const { content } = adjustedBlock;
|
|
1820
|
+
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
|
|
1821
|
+
},
|
|
1822
|
+
}, key);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
const EMPTY_ANCESTORS = [];
|
|
1826
|
+
const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
|
|
1827
|
+
...options,
|
|
1828
|
+
key: `${key ? key : _.type}-${j}`,
|
|
1829
|
+
ancestors: options.parent
|
|
1830
|
+
? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
|
|
1831
|
+
: ancestors,
|
|
1832
|
+
}));
|
|
1833
|
+
|
|
1834
|
+
function renderChildren({ children, block, options, renderProps, }) {
|
|
1835
|
+
if (children) {
|
|
1836
|
+
return children;
|
|
1837
|
+
}
|
|
1838
|
+
return block && options
|
|
1839
|
+
? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
|
|
1840
|
+
: null;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1839
1843
|
const mapChildren = (mapper) => (children) => {
|
|
1840
1844
|
if (children === null || children === undefined) {
|
|
1841
1845
|
return children;
|
|
@@ -2653,14 +2657,34 @@
|
|
|
2653
2657
|
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
|
|
2654
2658
|
});
|
|
2655
2659
|
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
2661
|
-
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
2660
|
+
const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
2661
|
+
|
|
2662
|
+
function assertUnreachable(x) {
|
|
2663
|
+
throw new Error(x);
|
|
2662
2664
|
}
|
|
2663
2665
|
|
|
2666
|
+
function useDialogHandlers({ onOpen, onClose } = {}) {
|
|
2667
|
+
useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
|
|
2668
|
+
switch (action.type) {
|
|
2669
|
+
case 'open':
|
|
2670
|
+
onOpen && onOpen(action);
|
|
2671
|
+
break;
|
|
2672
|
+
case 'close':
|
|
2673
|
+
onClose && onClose();
|
|
2674
|
+
break;
|
|
2675
|
+
default:
|
|
2676
|
+
assertUnreachable(action);
|
|
2677
|
+
}
|
|
2678
|
+
}), [onOpen, onClose]);
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
const useDebouncedEffect = (effect, deps, delay = 300) => useEffect(() => {
|
|
2682
|
+
const timerId = setTimeout(effect, delay);
|
|
2683
|
+
return () => {
|
|
2684
|
+
clearTimeout(timerId);
|
|
2685
|
+
};
|
|
2686
|
+
}, deps);
|
|
2687
|
+
|
|
2664
2688
|
const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
|
|
2665
2689
|
const desc = (cmp) => (a, b) => -cmp(a, b);
|
|
2666
2690
|
|
|
@@ -2785,37 +2809,27 @@
|
|
|
2785
2809
|
const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
|
|
2786
2810
|
|
|
2787
2811
|
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
2788
|
-
const useSearch = (basePathList = ['/']) => {
|
|
2789
|
-
const [query, setQuery] = useState('');
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2812
|
+
const useSearch = ({ basePathList = ['/'], initialQuery = '', wasOpened, }) => {
|
|
2813
|
+
const [query, setQuery] = useState(initialQuery || '');
|
|
2814
|
+
useEffect(() => {
|
|
2815
|
+
if (initialQuery !== undefined && initialQuery !== null) {
|
|
2816
|
+
setQuery(initialQuery);
|
|
2817
|
+
}
|
|
2818
|
+
}, [initialQuery]);
|
|
2819
|
+
const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
|
|
2820
|
+
[wasOpened, ...basePathList]);
|
|
2796
2821
|
const { data } = useAsyncData(key, fetchSearchIndex);
|
|
2797
2822
|
const [result, setResult] = useState(null);
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
}
|
|
2803
|
-
}, 300);
|
|
2804
|
-
return () => {
|
|
2805
|
-
clearTimeout(timerId);
|
|
2806
|
-
};
|
|
2823
|
+
useDebouncedEffect(() => {
|
|
2824
|
+
if (data) {
|
|
2825
|
+
setResult(data.map(search(query)));
|
|
2826
|
+
}
|
|
2807
2827
|
}, [data, query]);
|
|
2808
|
-
return [result, { value: query, onChange: setQuery
|
|
2828
|
+
return [result, { value: query, onChange: setQuery }];
|
|
2809
2829
|
};
|
|
2810
2830
|
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
|
|
2811
2831
|
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2814
|
-
const Dialog = JSX(({ className, head, children, onClose }) => {
|
|
2815
|
-
const handleClose = useCallback((ev) => {
|
|
2816
|
-
ev.preventDefault();
|
|
2817
|
-
onClose && onClose();
|
|
2818
|
-
}, [onClose]);
|
|
2832
|
+
const Dialog = JSX(({ className, isOpened, head, children, onClose }) => {
|
|
2819
2833
|
useEffect(() => {
|
|
2820
2834
|
const handleEscape = ({ key }) => {
|
|
2821
2835
|
if (key === 'Escape') {
|
|
@@ -2827,9 +2841,47 @@
|
|
|
2827
2841
|
globalThis.document?.removeEventListener('keydown', handleEscape);
|
|
2828
2842
|
};
|
|
2829
2843
|
}, [onClose]);
|
|
2830
|
-
return (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick:
|
|
2844
|
+
return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: onClose }), head] }), children] }) })) : null;
|
|
2831
2845
|
});
|
|
2832
2846
|
|
|
2847
|
+
function useBool(defaultValue = false) {
|
|
2848
|
+
const [value, setValue] = useState(defaultValue);
|
|
2849
|
+
const setTrue = useCallback(() => setValue(true), []);
|
|
2850
|
+
const setFalse = useCallback(() => setValue(false), []);
|
|
2851
|
+
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
2852
|
+
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
function useDialogProps(id) {
|
|
2856
|
+
const [isOpened, { setTrue: open, setFalse: close }] = useBool();
|
|
2857
|
+
const [params, setParams] = useState({ id });
|
|
2858
|
+
const wasOpened = useRef(isOpened);
|
|
2859
|
+
wasOpened.current ||= isOpened;
|
|
2860
|
+
const handleOpen = useCallback((_) => {
|
|
2861
|
+
if (_.id === id) {
|
|
2862
|
+
setParams(_);
|
|
2863
|
+
open();
|
|
2864
|
+
}
|
|
2865
|
+
else {
|
|
2866
|
+
close();
|
|
2867
|
+
}
|
|
2868
|
+
}, [id]);
|
|
2869
|
+
useDialogHandlers({
|
|
2870
|
+
onOpen: handleOpen,
|
|
2871
|
+
onClose: close,
|
|
2872
|
+
});
|
|
2873
|
+
const handleCloseAsEventSource = useCallback(() => {
|
|
2874
|
+
close();
|
|
2875
|
+
defaultEventBus.fire('dialog', { type: 'close' });
|
|
2876
|
+
}, []);
|
|
2877
|
+
return {
|
|
2878
|
+
...params,
|
|
2879
|
+
isOpened,
|
|
2880
|
+
wasOpened: wasOpened.current,
|
|
2881
|
+
onClose: handleCloseAsEventSource,
|
|
2882
|
+
};
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2833
2885
|
const Sitemap = JSX(({ className, topItems }) => {
|
|
2834
2886
|
const link = useLink(true);
|
|
2835
2887
|
return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
|
|
@@ -2845,43 +2897,30 @@
|
|
|
2845
2897
|
return (jsx("a", { className: style('text-l-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
2846
2898
|
});
|
|
2847
2899
|
|
|
2848
|
-
const
|
|
2900
|
+
const SearchInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
|
|
2849
2901
|
const handleChange = useCallback((ev) => {
|
|
2850
2902
|
onChange && onChange(ev.target?.value || '');
|
|
2851
2903
|
}, [onChange]);
|
|
2852
2904
|
return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-4 pointer-events-none", children: jsx(ImgInner, { image: { icon: 'LoupeIcon' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 pl-12 w-full text-l text-black outline-none box-border', 'border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text', isMobile ? '' : 'h-full'), value: value, type: "text", name: "search-bar-input", placeholder: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
2853
2905
|
});
|
|
2854
2906
|
|
|
2855
|
-
const
|
|
2856
|
-
const
|
|
2907
|
+
const SEARCH_DIALOG_ID = 'search';
|
|
2908
|
+
const SearchDialog = JSX(({ topItems }) => {
|
|
2909
|
+
const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
|
|
2857
2910
|
const basePathList = topItems?.map((_) => _.href || '/');
|
|
2858
|
-
const [searchResult, searchInputProps] = useSearch(
|
|
2859
|
-
|
|
2911
|
+
const [searchResult, searchInputProps] = useSearch({
|
|
2912
|
+
basePathList,
|
|
2913
|
+
initialQuery: dialogProps.message,
|
|
2914
|
+
wasOpened: dialogProps.wasOpened,
|
|
2915
|
+
});
|
|
2860
2916
|
const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
|
|
2861
2917
|
useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
|
|
2862
|
-
|
|
2863
|
-
const handleInitialInputChange = useCallback((_) => {
|
|
2864
|
-
onChange(_);
|
|
2865
|
-
if (isQueryLongEnough(_)) {
|
|
2866
|
-
openSearchDialog();
|
|
2867
|
-
}
|
|
2868
|
-
}, [onChange, isQueryLongEnough]);
|
|
2869
|
-
const handleInitialInputFocus = useCallback(() => {
|
|
2870
|
-
onFocus();
|
|
2871
|
-
if (isQueryLongEnough(value)) {
|
|
2872
|
-
openSearchDialog();
|
|
2873
|
-
}
|
|
2874
|
-
}, [value, onFocus]);
|
|
2875
|
-
return (jsxs("div", { className: className, children: [jsx(SearchBarInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange, onFocus: handleInitialInputFocus }), isMobile ? (jsx(CloseButton, { className: "absolute top-2 right-3", onClick: (e) => {
|
|
2876
|
-
e.preventDefault();
|
|
2877
|
-
onChange('');
|
|
2878
|
-
} })) : null, isSearchDialogOpen ? (jsx(Dialog, { head: jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: jsx(Sitemap, { topItems: searchItems }) })) : null] }));
|
|
2918
|
+
return (jsx(Dialog, { ...dialogProps, head: jsx(SearchInput, { className: "my-5", autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
|
|
2879
2919
|
});
|
|
2880
|
-
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
2881
2920
|
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
2882
2921
|
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
2883
2922
|
..._,
|
|
2884
|
-
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
|
|
2923
|
+
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
|
|
2885
2924
|
}))
|
|
2886
2925
|
: [];
|
|
2887
2926
|
// Temp
|
|
@@ -2893,6 +2932,22 @@
|
|
|
2893
2932
|
}
|
|
2894
2933
|
}
|
|
2895
2934
|
|
|
2935
|
+
const MIN_QUERY_LEN = 3;
|
|
2936
|
+
const SearchBarInner = JSX(({ className, isMobile }) => {
|
|
2937
|
+
const [value, setValue] = useState('');
|
|
2938
|
+
const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
|
|
2939
|
+
useDialogHandlers({ onClose: resetQueryOnDialogClose });
|
|
2940
|
+
const { open } = useDialog(SEARCH_DIALOG_ID);
|
|
2941
|
+
const handleInitialInputChange = useCallback((_) => {
|
|
2942
|
+
setValue(_);
|
|
2943
|
+
if (isQueryLongEnough(_)) {
|
|
2944
|
+
open(_);
|
|
2945
|
+
}
|
|
2946
|
+
}, []);
|
|
2947
|
+
return (jsxs("div", { className: className, children: [jsx(SearchInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange }), isMobile ? (jsx(CloseButton, { className: "absolute top-2 right-3", onClick: resetQueryOnDialogClose })) : null] }));
|
|
2948
|
+
});
|
|
2949
|
+
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
2950
|
+
|
|
2896
2951
|
const SearchBar$1 = JSX((props) => jsx(SearchBarInner, { ...props }));
|
|
2897
2952
|
|
|
2898
2953
|
const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "https://www.rshb.ru/feedback/question/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
|
|
@@ -2935,7 +2990,7 @@
|
|
|
2935
2990
|
const fallback = rest.options?.page?.fallback;
|
|
2936
2991
|
const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
|
|
2937
2992
|
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
2938
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow"
|
|
2993
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
2939
2994
|
});
|
|
2940
2995
|
|
|
2941
2996
|
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
|
|
@@ -2954,22 +3009,6 @@
|
|
|
2954
3009
|
const renderMonthNames = (item, colSize) => item.month?.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
|
|
2955
3010
|
const renderMonthImages = (item) => item.month?.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(ImgInner, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
2956
3011
|
|
|
2957
|
-
const isHrefActive = (router) => ({ href }) => withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
|
|
2958
|
-
|
|
2959
|
-
const isTopItemActive = (router) => isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
|
|
2960
|
-
|
|
2961
|
-
const TopItem = JSX(({ className = '', active, flat, children, ...rest }) => {
|
|
2962
|
-
const link = useLink(true);
|
|
2963
|
-
const { href, target, text, onClick } = link(rest);
|
|
2964
|
-
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
2965
|
-
});
|
|
2966
|
-
const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
|
|
2967
|
-
? 'rounded-md border-primary-main group-data-transparent:border-white'
|
|
2968
|
-
: 'border-transparent', flat ? '' : 'px-4 py-2');
|
|
2969
|
-
const getTextStyle$1 = (active = false, flat = false) => style('font-sans text-s-light', active
|
|
2970
|
-
? 'text-primary-main'
|
|
2971
|
-
: style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
2972
|
-
|
|
2973
3012
|
const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
|
|
2974
3013
|
function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
|
|
2975
3014
|
const cachedFetcher = useCallback(async (...args) => {
|
|
@@ -2991,7 +3030,7 @@
|
|
|
2991
3030
|
}
|
|
2992
3031
|
|
|
2993
3032
|
const REGION_URL = '/api/v1/region';
|
|
2994
|
-
function useLocation(defaultLocation) {
|
|
3033
|
+
function useLocation(defaultLocation = 'Москва') {
|
|
2995
3034
|
const currentLocation = getLocalStorageLocation();
|
|
2996
3035
|
const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
|
|
2997
3036
|
const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
|
|
@@ -3003,7 +3042,7 @@
|
|
|
3003
3042
|
const onChangeLocation = useCallback((region) => {
|
|
3004
3043
|
globalThis.localStorage?.setItem('location', JSON.stringify({ manual: true, region }));
|
|
3005
3044
|
setLocation(region);
|
|
3006
|
-
}, [
|
|
3045
|
+
}, []);
|
|
3007
3046
|
return [location, onChangeLocation];
|
|
3008
3047
|
}
|
|
3009
3048
|
const getLocalStorageLocation = () => {
|
|
@@ -3016,6 +3055,10 @@
|
|
|
3016
3055
|
}
|
|
3017
3056
|
};
|
|
3018
3057
|
|
|
3058
|
+
const isHrefActive = (router) => ({ href }) => withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
|
|
3059
|
+
|
|
3060
|
+
const isTopItemActive = (router) => isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
|
|
3061
|
+
|
|
3019
3062
|
const REGIONS_URL = '/api/v1/regions';
|
|
3020
3063
|
function useRegions() {
|
|
3021
3064
|
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
@@ -3038,13 +3081,19 @@
|
|
|
3038
3081
|
});
|
|
3039
3082
|
|
|
3040
3083
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
3041
|
-
const
|
|
3084
|
+
const LOCATION_DIALOG_ID = 'location';
|
|
3085
|
+
const LocationDialog = JSX(({ currentLocation, onChangeLocation, foreignOffices }) => {
|
|
3086
|
+
const dialogProps = useDialogProps(LOCATION_DIALOG_ID);
|
|
3042
3087
|
const [query, setQuery] = useState('');
|
|
3043
3088
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
3044
3089
|
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
3045
|
-
|
|
3090
|
+
const handleChangeLocation = useCallback((region) => {
|
|
3091
|
+
dialogProps.onClose && dialogProps.onClose();
|
|
3092
|
+
onChangeLocation && onChangeLocation(region);
|
|
3093
|
+
}, [dialogProps.onClose, onChangeLocation]);
|
|
3094
|
+
return (jsxs(Dialog, { ...dialogProps, head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
3046
3095
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
3047
|
-
.map(renderRegion(
|
|
3096
|
+
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
|
|
3048
3097
|
});
|
|
3049
3098
|
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
3050
3099
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
@@ -3052,10 +3101,9 @@
|
|
|
3052
3101
|
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
3053
3102
|
}));
|
|
3054
3103
|
const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick: close, children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
|
|
3055
|
-
const renderRegionGroup = (
|
|
3056
|
-
const renderRegion = (
|
|
3104
|
+
const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
|
|
3105
|
+
const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
3057
3106
|
onChangeLocation && onChangeLocation(region);
|
|
3058
|
-
onClose && onClose();
|
|
3059
3107
|
}, children: region.name || '' }) }, region.id));
|
|
3060
3108
|
const ForeignOffices = JSX(({ foreignOffices }) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-7 pt-7", children: [jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
|
|
3061
3109
|
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
@@ -3064,6 +3112,18 @@
|
|
|
3064
3112
|
return (jsxs("div", { className: "flex gap-x-3", children: [icon ? jsx(ImgInner, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })) : null] }));
|
|
3065
3113
|
});
|
|
3066
3114
|
|
|
3115
|
+
const TopItem = JSX(({ className = '', active, flat, children, ...rest }) => {
|
|
3116
|
+
const link = useLink(true);
|
|
3117
|
+
const { href, target, text, onClick } = link(rest);
|
|
3118
|
+
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
3119
|
+
});
|
|
3120
|
+
const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
|
|
3121
|
+
? 'rounded-md border-primary-main group-data-transparent:border-white'
|
|
3122
|
+
: 'border-transparent', flat ? '' : 'px-4 py-2');
|
|
3123
|
+
const getTextStyle$1 = (active = false, flat = false) => style('font-sans text-s-light', active
|
|
3124
|
+
? 'text-primary-main'
|
|
3125
|
+
: style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
3126
|
+
|
|
3067
3127
|
const HeaderSecondaryMenuButton = JSX(({ className, isRounded, disabled, ariaLabel, image, onClick }) => (jsx("button", { className: style('group/btn border-0 p-0 flex items-center bg-inherit', isRounded
|
|
3068
3128
|
? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
|
|
3069
3129
|
: 'w-6 h-6 text-primary-text hover:text-primary-main', 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, children: jsx(ImgInner, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0", asSVG: true }) })));
|
|
@@ -3123,16 +3183,13 @@
|
|
|
3123
3183
|
});
|
|
3124
3184
|
const renderChatBotButton = ({ className, iconVersion, onClick }) => (jsx(HeaderSecondaryMenuButton, { className: style(CHAT_BUTTON_EXTERNAL_NAME, className), image: { icon: 'HeadphonesIcon', iconVersion }, ariaLabel: "\u0427\u0430\u0442", onClick: onClick }));
|
|
3125
3185
|
|
|
3126
|
-
const HeaderSecondaryMenu = JSX(({
|
|
3127
|
-
const [isShowLocationModal, { setTrue: showLocationModal, setFalse: hideLocationModal }] = useBool();
|
|
3128
|
-
const [location, onChangeLocation] = useLocation(defaultLocation);
|
|
3186
|
+
const HeaderSecondaryMenu = JSX(({ className, version, locationName: location, officesLink }) => {
|
|
3129
3187
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
3130
|
-
const
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, onClose: hideLocationModal })) : null] }));
|
|
3188
|
+
const { open: openLocationModal } = useDialog(LOCATION_DIALOG_ID);
|
|
3189
|
+
const handleOpenLocationModal = useCallback(() => openLocationModal(), []);
|
|
3190
|
+
const { open: openSearchModal } = useDialog(SEARCH_DIALOG_ID);
|
|
3191
|
+
const handleOpenSearchModal = useCallback(() => openSearchModal(), []);
|
|
3192
|
+
return (jsxs("div", { className: style('flex items-center gap-5', className), children: [jsx(TopItem, { flat: true, href: "#", text: location, onClick: handleOpenLocationModal }), officesLink ? jsx(TopItem, { flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" }) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A", onClick: handleOpenSearchModal }), projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null] }));
|
|
3136
3193
|
});
|
|
3137
3194
|
|
|
3138
3195
|
const findActiveSubItem = (router) => (items = []) => {
|
|
@@ -3201,7 +3258,8 @@
|
|
|
3201
3258
|
const router = useRouter();
|
|
3202
3259
|
const { topItems, logo, defaultLocation, foreignOffices, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
3203
3260
|
const activeTopItem = topItems?.find(isTopItemActive(router));
|
|
3204
|
-
|
|
3261
|
+
const [location, onChangeLocation] = useLocation(defaultLocation);
|
|
3262
|
+
return (jsxs(BlockWrapper, { tag: "header", className: style('pt-6 px-20', showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5', className), version: version, ...rest, children: [jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", locationName: location.name, officesLink: officesLink })] }), jsx("div", { className: style('mt-6 h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items })) : null] }), jsx(SearchDialog, { topItems: topItems }), jsx(LocationDialog, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation })] }));
|
|
3205
3263
|
});
|
|
3206
3264
|
|
|
3207
3265
|
const gapStyles = {
|
|
@@ -3216,7 +3274,7 @@
|
|
|
3216
3274
|
|
|
3217
3275
|
const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('grid grid-cols-12', isPadding ? 'p-12' : '', gapStyles[gap], className), version: version, isTheme: isTheme, ...rest, children: renderChildren(rest) })));
|
|
3218
3276
|
HorizontalLayout.childrenTypes = {
|
|
3219
|
-
exclude: ['HorizontalLayout'
|
|
3277
|
+
exclude: ['HorizontalLayout'],
|
|
3220
3278
|
};
|
|
3221
3279
|
|
|
3222
3280
|
const ImgBlock = JSX((props) => {
|
|
@@ -3797,10 +3855,6 @@
|
|
|
3797
3855
|
return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
|
|
3798
3856
|
});
|
|
3799
3857
|
|
|
3800
|
-
function assertUnreachable(x) {
|
|
3801
|
-
throw new Error(x);
|
|
3802
|
-
}
|
|
3803
|
-
|
|
3804
3858
|
// TODO: Create universal function for this case
|
|
3805
3859
|
const renderBenefit$2 =
|
|
3806
3860
|
// Linter doesn't understand that switch processes all cases
|
|
@@ -4017,7 +4071,7 @@
|
|
|
4017
4071
|
|
|
4018
4072
|
const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: `grid grid-cols-12 gap-5 [&>*]:p-0`, isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) })));
|
|
4019
4073
|
RollupItem.childrenTypes = {
|
|
4020
|
-
exclude: ['RollupItem'
|
|
4074
|
+
exclude: ['RollupItem'],
|
|
4021
4075
|
};
|
|
4022
4076
|
const renderFoldButton = ({ version, label: defaultLabel, isUnfolded, onToggle, }) => {
|
|
4023
4077
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
@@ -4622,9 +4676,7 @@
|
|
|
4622
4676
|
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
4623
4677
|
return (jsx(BlockWrapper, { className: style('flex flex-col [&>*]:max-w-full', isPadding ? 'p-12' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } }) }));
|
|
4624
4678
|
});
|
|
4625
|
-
VerticalLayout.childrenTypes =
|
|
4626
|
-
exclude: ['Accordion', 'OtherProducts'],
|
|
4627
|
-
};
|
|
4679
|
+
VerticalLayout.childrenTypes = [];
|
|
4628
4680
|
|
|
4629
4681
|
const MIN_COL_SPAN = 10;
|
|
4630
4682
|
const getPaddings = (className) => getColSpan(className) < MIN_COL_SPAN ? 'py-6 px-11' : 'py-12 px-32';
|
|
@@ -4635,7 +4687,6 @@
|
|
|
4635
4687
|
});
|
|
4636
4688
|
|
|
4637
4689
|
const Blocks = {
|
|
4638
|
-
Accordion,
|
|
4639
4690
|
ApplicationForm,
|
|
4640
4691
|
BenefitsBlock,
|
|
4641
4692
|
Bonus,
|
|
@@ -4792,7 +4843,6 @@
|
|
|
4792
4843
|
const ContentPage = JSX((props) => {
|
|
4793
4844
|
const { className = '', blocksRegistry, blockDecorator, data = {} } = props;
|
|
4794
4845
|
const { style: pageStyle, blocks, slots, likeControl, colorPalette = 'pc' } = data;
|
|
4795
|
-
const [overflowStyle, setOverflowStyle] = useState('');
|
|
4796
4846
|
const options = {
|
|
4797
4847
|
key: '',
|
|
4798
4848
|
page: data,
|
|
@@ -4801,10 +4851,12 @@
|
|
|
4801
4851
|
parent: data,
|
|
4802
4852
|
};
|
|
4803
4853
|
useBlockRouterProvider();
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4854
|
+
const [isSomeDialogOpened, { setTrue: setSomeDialogOpened, setFalse: resetSomeDialogOpened }] = useBool();
|
|
4855
|
+
useDialogHandlers({
|
|
4856
|
+
onOpen: setSomeDialogOpened,
|
|
4857
|
+
onClose: resetSomeDialogOpened,
|
|
4858
|
+
});
|
|
4859
|
+
return (jsxs("section", { className: style('relative', pageStyle, className, isSomeDialogOpened ? 'overflow-hidden h-screen' : ''), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, {
|
|
4808
4860
|
...options,
|
|
4809
4861
|
slotName: 'header',
|
|
4810
4862
|
}) })) : null, jsxs("div", { className: "container grid grid-cols-12 gap-1", children: [renderBlocksList(blocks, options), slots?.footer
|
|
@@ -4820,7 +4872,7 @@
|
|
|
4820
4872
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4821
4873
|
}
|
|
4822
4874
|
|
|
4823
|
-
const packageVersion = "0.9.
|
|
4875
|
+
const packageVersion = "0.9.4";
|
|
4824
4876
|
|
|
4825
4877
|
exports.Blocks = Blocks;
|
|
4826
4878
|
exports.ContentPage = ContentPage;
|