@redneckz/wildless-cms-uni-blocks 0.9.3 → 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.9.1.js +70 -0
- 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/{mobile/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/{bundle/ui-kit/SearchBar/SearchBarInput.d.ts → mobile/bundle/ui-kit/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/mobile/src/ui-kit/{SearchBar/SearchBarInput.tsx → 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/src/ui-kit/{SearchBar/SearchBarInput.tsx → 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/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
|
@@ -236,84 +236,41 @@
|
|
|
236
236
|
return JSXTmpl;
|
|
237
237
|
};
|
|
238
238
|
|
|
239
|
-
const
|
|
239
|
+
const HeadingClass = {
|
|
240
|
+
h0: 'text-m-title',
|
|
241
|
+
h1: 'text-m-title',
|
|
242
|
+
h2: 'text-m-title',
|
|
243
|
+
h3: 'text-h6',
|
|
244
|
+
h4: 'text-m-title-xs',
|
|
245
|
+
h5: 'text-m-title-xs',
|
|
246
|
+
h6: 'text-m-title-xs',
|
|
247
|
+
};
|
|
248
|
+
const Heading = JSX((props) => {
|
|
249
|
+
const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
|
|
250
|
+
return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
|
|
251
|
+
});
|
|
240
252
|
|
|
241
253
|
const style = (...atoms) => atoms
|
|
242
254
|
.flatMap((_) => _)
|
|
243
255
|
.filter(Boolean)
|
|
244
256
|
.join(' ');
|
|
245
257
|
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
const DEFAULT_ANCESTORS = [];
|
|
249
|
-
const defaultStyle = 'col-span-12';
|
|
250
|
-
function renderBlock(block, options) {
|
|
251
|
-
const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', extraProps = {}, } = options;
|
|
252
|
-
const { type } = block;
|
|
253
|
-
if (!(type && type in blocksRegistry)) {
|
|
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) {
|
|
258
|
+
const mapChildren = (mapper) => (children) => {
|
|
259
|
+
if (children === null || children === undefined) {
|
|
281
260
|
return children;
|
|
282
261
|
}
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
: null;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
class EventBus {
|
|
289
|
-
subscribers = {};
|
|
290
|
-
subjectsStateMap = {};
|
|
291
|
-
subscribe(type, listener) {
|
|
292
|
-
this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
|
|
293
|
-
const latestEvent = this.subjectsStateMap[type];
|
|
294
|
-
if (latestEvent) {
|
|
295
|
-
listener(latestEvent);
|
|
296
|
-
}
|
|
297
|
-
return () => {
|
|
298
|
-
this.unsubscribe(type, listener);
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
unsubscribe(type, listener) {
|
|
302
|
-
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
303
|
-
}
|
|
304
|
-
fire(type, event) {
|
|
305
|
-
const isSubjectDeclared = type in this.subjectsStateMap;
|
|
306
|
-
if (isSubjectDeclared) {
|
|
307
|
-
this.subjectsStateMap[type] = event;
|
|
308
|
-
}
|
|
309
|
-
this.subscribers[type]?.forEach((s) => s(event));
|
|
310
|
-
}
|
|
311
|
-
subject(type, event) {
|
|
312
|
-
this.subjectsStateMap[type] = event;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
262
|
+
return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
|
|
263
|
+
};
|
|
315
264
|
|
|
316
|
-
const
|
|
265
|
+
const HEADER_HEIGHT = 170;
|
|
266
|
+
const FOOTER_HEIGHT = 48;
|
|
267
|
+
const BLOCKS_GAP = 4;
|
|
268
|
+
const PAGE_PADDINGS_X = 20;
|
|
269
|
+
const DEFAULT_HEIGHT = 866;
|
|
270
|
+
const getContainerHeight = (minHeight) => ({
|
|
271
|
+
height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
|
|
272
|
+
minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
|
|
273
|
+
});
|
|
317
274
|
|
|
318
275
|
const SENSITIVITY_SCALE = 10;
|
|
319
276
|
function useIntersectionObserver(observerCallback, { sensitivity, rootRef } = {}) {
|
|
@@ -339,73 +296,6 @@
|
|
|
339
296
|
.concat(1);
|
|
340
297
|
}
|
|
341
298
|
|
|
342
|
-
const blockRouterEventBus = new EventBus();
|
|
343
|
-
|
|
344
|
-
function useBlockIntersectionObserver(block) {
|
|
345
|
-
const observerCallback = useCallback((entries) => {
|
|
346
|
-
if (!block || !entries?.length) {
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
const intersection = entries[entries.length - 1];
|
|
350
|
-
blockRouterEventBus.fire('intersection', { block, intersection });
|
|
351
|
-
}, [block]);
|
|
352
|
-
return useIntersectionObserver(observerCallback, { sensitivity: 1 });
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
const blockStyles = {
|
|
356
|
-
primary: 'bg-white text-primary-text',
|
|
357
|
-
secondary: 'bg-primary-main text-white',
|
|
358
|
-
gray: 'bg-main-divider text-primary-text',
|
|
359
|
-
transparent: 'bg-transparent text-primary-text',
|
|
360
|
-
'': '',
|
|
361
|
-
};
|
|
362
|
-
const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, extraProps = {}, children, }) => {
|
|
363
|
-
const Tag = tag;
|
|
364
|
-
const ref = useBlockIntersectionObserver(block);
|
|
365
|
-
const [isHidden, setHidden] = useState(false);
|
|
366
|
-
useEffect(() => defaultEventBus.subscribe('tab', (event) => {
|
|
367
|
-
setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
|
|
368
|
-
}), [block]);
|
|
369
|
-
return (jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, ...extraProps, children: children }));
|
|
370
|
-
});
|
|
371
|
-
const groupStyle = (isGroup) => (isGroup ? 'group' : '');
|
|
372
|
-
|
|
373
|
-
const HeadingClass = {
|
|
374
|
-
h0: 'text-m-title',
|
|
375
|
-
h1: 'text-m-title',
|
|
376
|
-
h2: 'text-m-title',
|
|
377
|
-
h3: 'text-h6',
|
|
378
|
-
h4: 'text-m-title-xs',
|
|
379
|
-
h5: 'text-m-title-xs',
|
|
380
|
-
h6: 'text-m-title-xs',
|
|
381
|
-
};
|
|
382
|
-
const Heading = JSX((props) => {
|
|
383
|
-
const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
|
|
384
|
-
return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
388
|
-
|
|
389
|
-
const Accordion = JSX(({ title, description, className = '', ...rest }) => (jsxs(BlockWrapper, { className: `py-6 px-4 ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-2 text-center", title: title }) : null, description ? (jsx("div", { className: "mb-5", children: jsx(Paragraph, { size: "text-m", font: "font-light", align: "text-center", children: description }) })) : null, jsx("div", { className: "list-none m-0 p-0", children: renderChildren(rest) })] })));
|
|
390
|
-
Accordion.childrenTypes = ['Accordion'];
|
|
391
|
-
|
|
392
|
-
const mapChildren = (mapper) => (children) => {
|
|
393
|
-
if (children === null || children === undefined) {
|
|
394
|
-
return children;
|
|
395
|
-
}
|
|
396
|
-
return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
const HEADER_HEIGHT = 170;
|
|
400
|
-
const FOOTER_HEIGHT = 48;
|
|
401
|
-
const BLOCKS_GAP = 4;
|
|
402
|
-
const PAGE_PADDINGS_X = 20;
|
|
403
|
-
const DEFAULT_HEIGHT = 866;
|
|
404
|
-
const getContainerHeight = (minHeight) => ({
|
|
405
|
-
height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
|
|
406
|
-
minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
|
|
407
|
-
});
|
|
408
|
-
|
|
409
299
|
const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
|
|
410
300
|
const observerCallback = useCallback((entries) => {
|
|
411
301
|
if (entries.length && onIntersection) {
|
|
@@ -559,6 +449,41 @@
|
|
|
559
449
|
return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, minHeight: minHeight, children: children }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version })) : null] }));
|
|
560
450
|
});
|
|
561
451
|
|
|
452
|
+
class EventBus {
|
|
453
|
+
subscribers = {};
|
|
454
|
+
subjectsStateMap = {};
|
|
455
|
+
subscribe(type, listener) {
|
|
456
|
+
this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
|
|
457
|
+
const latestEvent = this.subjectsStateMap[type];
|
|
458
|
+
if (latestEvent) {
|
|
459
|
+
listener(latestEvent);
|
|
460
|
+
}
|
|
461
|
+
return () => {
|
|
462
|
+
this.unsubscribe(type, listener);
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
unsubscribe(type, listener) {
|
|
466
|
+
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
467
|
+
}
|
|
468
|
+
fire(type, event) {
|
|
469
|
+
const isSubjectDeclared = type in this.subjectsStateMap;
|
|
470
|
+
if (isSubjectDeclared) {
|
|
471
|
+
this.subjectsStateMap[type] = event;
|
|
472
|
+
}
|
|
473
|
+
this.subscribers[type]?.forEach((s) => s(event));
|
|
474
|
+
}
|
|
475
|
+
subject(type, event) {
|
|
476
|
+
this.subjectsStateMap[type] = event;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
const defaultEventBus = new EventBus();
|
|
481
|
+
|
|
482
|
+
const useDialog = (id = '') => ({
|
|
483
|
+
open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
|
|
484
|
+
close: () => defaultEventBus.fire('dialog', { type: 'close' }),
|
|
485
|
+
});
|
|
486
|
+
|
|
562
487
|
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
563
488
|
|
|
564
489
|
const isURL = (href) => Boolean(href?.includes(':'));
|
|
@@ -613,6 +538,7 @@
|
|
|
613
538
|
|
|
614
539
|
function useLink(isRemote = false) {
|
|
615
540
|
const router = useRouter();
|
|
541
|
+
const { close } = useDialog();
|
|
616
542
|
return (props) => ({
|
|
617
543
|
...props,
|
|
618
544
|
href: isRemote ? props.href : adjustHref(router)(props.href),
|
|
@@ -626,6 +552,7 @@
|
|
|
626
552
|
// Default routing
|
|
627
553
|
return;
|
|
628
554
|
}
|
|
555
|
+
close();
|
|
629
556
|
// Client routing
|
|
630
557
|
ev?.preventDefault();
|
|
631
558
|
router.push(href);
|
|
@@ -888,14 +815,65 @@
|
|
|
888
815
|
return data || {};
|
|
889
816
|
}
|
|
890
817
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
|
|
818
|
+
const blockRouterEventBus = new EventBus();
|
|
819
|
+
|
|
820
|
+
function useBlockIntersectionObserver(block) {
|
|
821
|
+
const observerCallback = useCallback((entries) => {
|
|
822
|
+
if (!block || !entries?.length) {
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
const intersection = entries[entries.length - 1];
|
|
826
|
+
blockRouterEventBus.fire('intersection', { block, intersection });
|
|
827
|
+
}, [block]);
|
|
828
|
+
return useIntersectionObserver(observerCallback, { sensitivity: 1 });
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
const blockStyles = {
|
|
832
|
+
primary: 'bg-white text-primary-text',
|
|
833
|
+
secondary: 'bg-primary-main text-white',
|
|
834
|
+
gray: 'bg-main-divider text-primary-text',
|
|
835
|
+
transparent: 'bg-transparent text-primary-text',
|
|
836
|
+
'': '',
|
|
837
|
+
};
|
|
838
|
+
const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, extraProps = {}, children, }) => {
|
|
839
|
+
const Tag = tag;
|
|
840
|
+
const ref = useBlockIntersectionObserver(block);
|
|
841
|
+
const [isHidden, setHidden] = useState(false);
|
|
842
|
+
useEffect(() => defaultEventBus.subscribe('tab', (event) => {
|
|
843
|
+
setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
|
|
844
|
+
}), [block]);
|
|
845
|
+
return (jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, ...extraProps, children: children }));
|
|
846
|
+
});
|
|
847
|
+
const groupStyle = (isGroup) => (isGroup ? 'group' : '');
|
|
848
|
+
|
|
849
|
+
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(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
850
|
+
|
|
851
|
+
function assertUnreachable(x) {
|
|
852
|
+
throw new Error(x);
|
|
897
853
|
}
|
|
898
854
|
|
|
855
|
+
function useDialogHandlers({ onOpen, onClose } = {}) {
|
|
856
|
+
useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
|
|
857
|
+
switch (action.type) {
|
|
858
|
+
case 'open':
|
|
859
|
+
onOpen && onOpen(action);
|
|
860
|
+
break;
|
|
861
|
+
case 'close':
|
|
862
|
+
onClose && onClose();
|
|
863
|
+
break;
|
|
864
|
+
default:
|
|
865
|
+
assertUnreachable(action);
|
|
866
|
+
}
|
|
867
|
+
}), [onOpen, onClose]);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
const useDebouncedEffect = (effect, deps, delay = 300) => useEffect(() => {
|
|
871
|
+
const timerId = setTimeout(effect, delay);
|
|
872
|
+
return () => {
|
|
873
|
+
clearTimeout(timerId);
|
|
874
|
+
};
|
|
875
|
+
}, deps);
|
|
876
|
+
|
|
899
877
|
const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
|
|
900
878
|
const desc = (cmp) => (a, b) => -cmp(a, b);
|
|
901
879
|
|
|
@@ -1020,37 +998,27 @@
|
|
|
1020
998
|
const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
|
|
1021
999
|
|
|
1022
1000
|
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
1023
|
-
const useSearch = (basePathList = ['/']) => {
|
|
1024
|
-
const [query, setQuery] = useState('');
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1001
|
+
const useSearch = ({ basePathList = ['/'], initialQuery = '', wasOpened, }) => {
|
|
1002
|
+
const [query, setQuery] = useState(initialQuery || '');
|
|
1003
|
+
useEffect(() => {
|
|
1004
|
+
if (initialQuery !== undefined && initialQuery !== null) {
|
|
1005
|
+
setQuery(initialQuery);
|
|
1006
|
+
}
|
|
1007
|
+
}, [initialQuery]);
|
|
1008
|
+
const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
|
|
1009
|
+
[wasOpened, ...basePathList]);
|
|
1031
1010
|
const { data } = useAsyncData(key, fetchSearchIndex);
|
|
1032
1011
|
const [result, setResult] = useState(null);
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
}
|
|
1038
|
-
}, 300);
|
|
1039
|
-
return () => {
|
|
1040
|
-
clearTimeout(timerId);
|
|
1041
|
-
};
|
|
1012
|
+
useDebouncedEffect(() => {
|
|
1013
|
+
if (data) {
|
|
1014
|
+
setResult(data.map(search(query)));
|
|
1015
|
+
}
|
|
1042
1016
|
}, [data, query]);
|
|
1043
|
-
return [result, { value: query, onChange: setQuery
|
|
1017
|
+
return [result, { value: query, onChange: setQuery }];
|
|
1044
1018
|
};
|
|
1045
1019
|
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
|
|
1046
1020
|
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
const Dialog = JSX(({ className, head, children, onClose }) => {
|
|
1050
|
-
const handleClose = useCallback((ev) => {
|
|
1051
|
-
ev.preventDefault();
|
|
1052
|
-
onClose && onClose();
|
|
1053
|
-
}, [onClose]);
|
|
1021
|
+
const Dialog = JSX(({ className, isOpened, head, children, onClose }) => {
|
|
1054
1022
|
useEffect(() => {
|
|
1055
1023
|
const handleEscape = ({ key }) => {
|
|
1056
1024
|
if (key === 'Escape') {
|
|
@@ -1062,9 +1030,47 @@
|
|
|
1062
1030
|
globalThis.document?.removeEventListener('keydown', handleEscape);
|
|
1063
1031
|
};
|
|
1064
1032
|
}, [onClose]);
|
|
1065
|
-
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:
|
|
1033
|
+
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;
|
|
1066
1034
|
});
|
|
1067
1035
|
|
|
1036
|
+
function useBool(defaultValue = false) {
|
|
1037
|
+
const [value, setValue] = useState(defaultValue);
|
|
1038
|
+
const setTrue = useCallback(() => setValue(true), []);
|
|
1039
|
+
const setFalse = useCallback(() => setValue(false), []);
|
|
1040
|
+
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
1041
|
+
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
function useDialogProps(id) {
|
|
1045
|
+
const [isOpened, { setTrue: open, setFalse: close }] = useBool();
|
|
1046
|
+
const [params, setParams] = useState({ id });
|
|
1047
|
+
const wasOpened = useRef(isOpened);
|
|
1048
|
+
wasOpened.current ||= isOpened;
|
|
1049
|
+
const handleOpen = useCallback((_) => {
|
|
1050
|
+
if (_.id === id) {
|
|
1051
|
+
setParams(_);
|
|
1052
|
+
open();
|
|
1053
|
+
}
|
|
1054
|
+
else {
|
|
1055
|
+
close();
|
|
1056
|
+
}
|
|
1057
|
+
}, [id]);
|
|
1058
|
+
useDialogHandlers({
|
|
1059
|
+
onOpen: handleOpen,
|
|
1060
|
+
onClose: close,
|
|
1061
|
+
});
|
|
1062
|
+
const handleCloseAsEventSource = useCallback(() => {
|
|
1063
|
+
close();
|
|
1064
|
+
defaultEventBus.fire('dialog', { type: 'close' });
|
|
1065
|
+
}, []);
|
|
1066
|
+
return {
|
|
1067
|
+
...params,
|
|
1068
|
+
isOpened,
|
|
1069
|
+
wasOpened: wasOpened.current,
|
|
1070
|
+
onClose: handleCloseAsEventSource,
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1068
1074
|
const Sitemap = JSX(({ className, topItems }) => {
|
|
1069
1075
|
const link = useLink(true);
|
|
1070
1076
|
return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
|
|
@@ -1080,43 +1086,30 @@
|
|
|
1080
1086
|
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}` }));
|
|
1081
1087
|
});
|
|
1082
1088
|
|
|
1083
|
-
const
|
|
1089
|
+
const SearchInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
|
|
1084
1090
|
const handleChange = useCallback((ev) => {
|
|
1085
1091
|
onChange && onChange(ev.target?.value || '');
|
|
1086
1092
|
}, [onChange]);
|
|
1087
1093
|
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(Img, { 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 })] }));
|
|
1088
1094
|
});
|
|
1089
1095
|
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1096
|
+
const SEARCH_DIALOG_ID = 'search';
|
|
1097
|
+
JSX(({ topItems }) => {
|
|
1098
|
+
const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
|
|
1092
1099
|
const basePathList = topItems?.map((_) => _.href || '/');
|
|
1093
|
-
const [searchResult, searchInputProps] = useSearch(
|
|
1094
|
-
|
|
1100
|
+
const [searchResult, searchInputProps] = useSearch({
|
|
1101
|
+
basePathList,
|
|
1102
|
+
initialQuery: dialogProps.message,
|
|
1103
|
+
wasOpened: dialogProps.wasOpened,
|
|
1104
|
+
});
|
|
1095
1105
|
const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
|
|
1096
1106
|
useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
|
|
1097
|
-
|
|
1098
|
-
const handleInitialInputChange = useCallback((_) => {
|
|
1099
|
-
onChange(_);
|
|
1100
|
-
if (isQueryLongEnough(_)) {
|
|
1101
|
-
openSearchDialog();
|
|
1102
|
-
}
|
|
1103
|
-
}, [onChange, isQueryLongEnough]);
|
|
1104
|
-
const handleInitialInputFocus = useCallback(() => {
|
|
1105
|
-
onFocus();
|
|
1106
|
-
if (isQueryLongEnough(value)) {
|
|
1107
|
-
openSearchDialog();
|
|
1108
|
-
}
|
|
1109
|
-
}, [value, onFocus]);
|
|
1110
|
-
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) => {
|
|
1111
|
-
e.preventDefault();
|
|
1112
|
-
onChange('');
|
|
1113
|
-
} })) : null, isSearchDialogOpen ? (jsx(Dialog, { head: jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: jsx(Sitemap, { topItems: searchItems }) })) : null] }));
|
|
1107
|
+
return (jsx(Dialog, { ...dialogProps, head: jsx(SearchInput, { className: "my-5", autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
|
|
1114
1108
|
});
|
|
1115
|
-
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
1116
1109
|
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
1117
1110
|
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
1118
1111
|
..._,
|
|
1119
|
-
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
|
|
1112
|
+
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
|
|
1120
1113
|
}))
|
|
1121
1114
|
: [];
|
|
1122
1115
|
// Temp
|
|
@@ -1128,6 +1121,22 @@
|
|
|
1128
1121
|
}
|
|
1129
1122
|
}
|
|
1130
1123
|
|
|
1124
|
+
const MIN_QUERY_LEN = 3;
|
|
1125
|
+
const SearchBarInner = JSX(({ className, isMobile }) => {
|
|
1126
|
+
const [value, setValue] = useState('');
|
|
1127
|
+
const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
|
|
1128
|
+
useDialogHandlers({ onClose: resetQueryOnDialogClose });
|
|
1129
|
+
const { open } = useDialog(SEARCH_DIALOG_ID);
|
|
1130
|
+
const handleInitialInputChange = useCallback((_) => {
|
|
1131
|
+
setValue(_);
|
|
1132
|
+
if (isQueryLongEnough(_)) {
|
|
1133
|
+
open(_);
|
|
1134
|
+
}
|
|
1135
|
+
}, []);
|
|
1136
|
+
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] }));
|
|
1137
|
+
});
|
|
1138
|
+
const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
|
|
1139
|
+
|
|
1131
1140
|
const SearchBar = JSX((props) => (jsx(SearchBarInner, { ...props, isMobile: true })));
|
|
1132
1141
|
|
|
1133
1142
|
const getIconWithVersion = (icon, version = 'primary') => ({
|
|
@@ -1174,13 +1183,48 @@
|
|
|
1174
1183
|
return (jsx("div", { className: `col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${className}`, children: href ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "flex justify-center align-middle rounded-md bg-primary-main w-12 h-12", children: jsx(Logo, { className: "w-8", bgColor: "transparent", showTitle: true }) }), jsxs("a", { href: href, target: "_blank", className: "flex flex-col justify-center pl-3", children: [jsx("div", { className: "text-s font-medium mb-[3px]", children: title }), jsx("div", { className: "text-s text-secondary-text", children: description })] })] })) : null }));
|
|
1175
1184
|
});
|
|
1176
1185
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1186
|
+
const DEFAULT_SLOT_NAME = null;
|
|
1187
|
+
|
|
1188
|
+
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
1189
|
+
|
|
1190
|
+
const DEFAULT_ANCESTORS = [];
|
|
1191
|
+
const defaultStyle = 'col-span-12';
|
|
1192
|
+
function renderBlock(block, options) {
|
|
1193
|
+
const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', extraProps = {}, } = options;
|
|
1194
|
+
const { type } = block;
|
|
1195
|
+
if (!(type && type in blocksRegistry)) {
|
|
1196
|
+
console.warn(`No block with "${type}" is registered`);
|
|
1197
|
+
}
|
|
1198
|
+
const BlockComponent = type && blocksRegistry[type];
|
|
1199
|
+
return blockDecorator({
|
|
1200
|
+
blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
|
|
1201
|
+
className, block.style || defaultStyle),
|
|
1202
|
+
block,
|
|
1203
|
+
ancestors,
|
|
1204
|
+
// Adjusted by decorator block and blockClassName
|
|
1205
|
+
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
1206
|
+
const { content } = adjustedBlock;
|
|
1207
|
+
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
|
|
1208
|
+
},
|
|
1209
|
+
}, key);
|
|
1179
1210
|
}
|
|
1180
1211
|
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1212
|
+
const EMPTY_ANCESTORS = [];
|
|
1213
|
+
const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
|
|
1214
|
+
...options,
|
|
1215
|
+
key: `${key ? key : _.type}-${j}`,
|
|
1216
|
+
ancestors: options.parent
|
|
1217
|
+
? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
|
|
1218
|
+
: ancestors,
|
|
1219
|
+
}));
|
|
1220
|
+
|
|
1221
|
+
function renderChildren({ children, block, options, renderProps, }) {
|
|
1222
|
+
if (children) {
|
|
1223
|
+
return children;
|
|
1224
|
+
}
|
|
1225
|
+
return block && options
|
|
1226
|
+
? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
|
|
1227
|
+
: null;
|
|
1184
1228
|
}
|
|
1185
1229
|
|
|
1186
1230
|
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
|
|
@@ -1217,11 +1261,10 @@
|
|
|
1217
1261
|
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
1218
1262
|
|
|
1219
1263
|
const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => {
|
|
1220
|
-
|
|
1221
|
-
return (jsx(BlockWrapper, { className: style('border-b border-solid border-main-divider w-full', bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0', className), tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) }));
|
|
1264
|
+
return (jsx(BlockWrapper, { className: style('border-b border-solid border-main-divider w-full', className), tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) }));
|
|
1222
1265
|
});
|
|
1223
1266
|
RollupItem.childrenTypes = {
|
|
1224
|
-
exclude: ['RollupItem'
|
|
1267
|
+
exclude: ['RollupItem'],
|
|
1225
1268
|
};
|
|
1226
1269
|
const renderFoldButton = ({ version, label: defaultLabel, isUnfolded, onToggle, className = '', primaryIcon, }) => {
|
|
1227
1270
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
@@ -1325,7 +1368,7 @@
|
|
|
1325
1368
|
const fallback = rest.options?.page?.fallback;
|
|
1326
1369
|
const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
|
|
1327
1370
|
const { documents, relatedEnterprises, contacts, socialMedia, horizontalNavigationTitle } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
1328
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: `px-4 py-[26px] ${className}`, ...rest, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, hasButton: true }), jsx("div", { className: "m-0 p-0", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }), jsx("div", { children: sitemap?.dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android", ...rest }), jsx(SearchBar, { className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
1371
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: `px-4 py-[26px] ${className}`, ...rest, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, hasButton: true }), jsx("div", { className: "m-0 p-0", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }), jsx("div", { className: "mt-4", children: sitemap?.dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android", ...rest }), jsx(SearchBar, { className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
1329
1372
|
});
|
|
1330
1373
|
const renderSubMenuItem = (menu, i) => {
|
|
1331
1374
|
const { icon, href, text } = menu;
|
|
@@ -1371,7 +1414,7 @@
|
|
|
1371
1414
|
}
|
|
1372
1415
|
|
|
1373
1416
|
const REGION_URL = '/api/v1/region';
|
|
1374
|
-
function useLocation(defaultLocation) {
|
|
1417
|
+
function useLocation(defaultLocation = 'Москва') {
|
|
1375
1418
|
const currentLocation = getLocalStorageLocation();
|
|
1376
1419
|
const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
|
|
1377
1420
|
const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
|
|
@@ -1383,7 +1426,7 @@
|
|
|
1383
1426
|
const onChangeLocation = useCallback((region) => {
|
|
1384
1427
|
globalThis.localStorage?.setItem('location', JSON.stringify({ manual: true, region }));
|
|
1385
1428
|
setLocation(region);
|
|
1386
|
-
}, [
|
|
1429
|
+
}, []);
|
|
1387
1430
|
return [location, onChangeLocation];
|
|
1388
1431
|
}
|
|
1389
1432
|
const getLocalStorageLocation = () => {
|
|
@@ -1423,6 +1466,8 @@
|
|
|
1423
1466
|
return (jsxs(BlockWrapper, { tag: "header", version: version, ...rest, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: handleBurgerMenuShow, bgColor: bgColor, logo: logo }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-12", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", active: _ === activeSubItem, ..._ }, String(i)))) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { onClick: handleBurgerMenuShow, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx("div", { className: "list-none m-0 p-0", children: topItems?.map((item, i) => (jsx(RollupItem, { label: item.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }) })) : null] }));
|
|
1424
1467
|
});
|
|
1425
1468
|
|
|
1469
|
+
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
1470
|
+
|
|
1426
1471
|
const headlineVersionStyles = {
|
|
1427
1472
|
XXL: {
|
|
1428
1473
|
wrapper: 'gap-[18px]',
|
|
@@ -1614,10 +1659,6 @@
|
|
|
1614
1659
|
return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
|
|
1615
1660
|
});
|
|
1616
1661
|
|
|
1617
|
-
function assertUnreachable(x) {
|
|
1618
|
-
throw new Error(x);
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
1662
|
const checkCanRenderIcon = (icon) => Boolean(icon?.icon || icon?.src);
|
|
1622
1663
|
|
|
1623
1664
|
const STEPS_BLOCK_STYLE = {
|
|
@@ -1744,12 +1785,9 @@
|
|
|
1744
1785
|
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
1745
1786
|
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 } }) }));
|
|
1746
1787
|
});
|
|
1747
|
-
VerticalLayout.childrenTypes =
|
|
1748
|
-
exclude: ['Accordion', 'OtherProducts'],
|
|
1749
|
-
};
|
|
1788
|
+
VerticalLayout.childrenTypes = [];
|
|
1750
1789
|
|
|
1751
1790
|
const Blocks = {
|
|
1752
|
-
Accordion,
|
|
1753
1791
|
ComparisonTable,
|
|
1754
1792
|
Footer,
|
|
1755
1793
|
Header,
|
|
@@ -1758,11 +1796,11 @@
|
|
|
1758
1796
|
LinkList,
|
|
1759
1797
|
MobileAppTile,
|
|
1760
1798
|
ProductBlock,
|
|
1761
|
-
RollupItem,
|
|
1762
1799
|
StepsBlock,
|
|
1763
1800
|
TariffsTable,
|
|
1764
1801
|
TextBlock,
|
|
1765
1802
|
Placeholder,
|
|
1803
|
+
RollupItem,
|
|
1766
1804
|
VerticalLayout,
|
|
1767
1805
|
};
|
|
1768
1806
|
|
|
@@ -1865,7 +1903,6 @@
|
|
|
1865
1903
|
const ContentPage = JSX((props) => {
|
|
1866
1904
|
const { className = '', blocksRegistry, blockDecorator, data = {} } = props;
|
|
1867
1905
|
const { style: pageStyle, blocks, slots, likeControl, colorPalette = 'pc' } = data;
|
|
1868
|
-
const [overflowStyle, setOverflowStyle] = useState('');
|
|
1869
1906
|
const options = {
|
|
1870
1907
|
key: '',
|
|
1871
1908
|
page: data,
|
|
@@ -1874,10 +1911,12 @@
|
|
|
1874
1911
|
parent: data,
|
|
1875
1912
|
};
|
|
1876
1913
|
useBlockRouterProvider();
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1914
|
+
const [isSomeDialogOpened, { setTrue: setSomeDialogOpened, setFalse: resetSomeDialogOpened }] = useBool();
|
|
1915
|
+
useDialogHandlers({
|
|
1916
|
+
onOpen: setSomeDialogOpened,
|
|
1917
|
+
onClose: resetSomeDialogOpened,
|
|
1918
|
+
});
|
|
1919
|
+
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, {
|
|
1881
1920
|
...options,
|
|
1882
1921
|
slotName: 'header',
|
|
1883
1922
|
}) })) : null, jsxs("div", { className: "container grid grid-cols-12 gap-1", children: [renderBlocksList(blocks, options), slots?.footer
|
|
@@ -1897,7 +1936,7 @@
|
|
|
1897
1936
|
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
1898
1937
|
}
|
|
1899
1938
|
|
|
1900
|
-
const packageVersion = "0.9.
|
|
1939
|
+
const packageVersion = "0.9.4";
|
|
1901
1940
|
|
|
1902
1941
|
exports.Blocks = Blocks;
|
|
1903
1942
|
exports.ContentPage = ContentPage;
|