@sapui5/sap.ushell 1.141.3 → 1.143.0
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/package.json +1 -1
- package/src/main/js/sap/ushell/.library +1 -7
- package/src/main/js/sap/ushell/ApplicationType/UrlPostProcessing.js +7 -11
- package/src/main/js/sap/ushell/ApplicationType/utils.js +9 -9
- package/src/main/js/sap/ushell/ApplicationType/wdaResolution.js +18 -0
- package/src/main/js/sap/ushell/Fiori20Adapter.js +1 -1
- package/src/main/js/sap/ushell/Fiori20AdapterTest.js +1 -1
- package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
- package/src/main/js/sap/ushell/TechnicalParameters.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor/DefinitionParameterSetBuilder.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor/DependencyGraph.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor/Functions.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor/Resolvers.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor/TemplateParameterParser.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor/utils.js +1 -1
- package/src/main/js/sap/ushell/URLTemplateProcessor.js +1 -1
- package/src/main/js/sap/ushell/Ui5NativeServiceFactory.js +1 -1
- package/src/main/js/sap/ushell/Ui5ServiceFactory.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/ClientSideTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/CommonDataModelAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/LaunchPageAdapter.js +1 -3
- package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/PersonalizationAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/PersonalizationV2Adapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/Settings/UserLanguageAndRegion/UserLanguageAndRegion.view.xml +5 -12
- package/src/main/js/sap/ushell/adapters/cdm/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/modifyHome.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readCatalogs.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readHome.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/uri.transform.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/util/AppForInbound.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/util/cdmSiteUtils.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/AdapterBase.js +1 -2
- package/src/main/js/sap/ushell/adapters/cdm/v3/FlpLaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/StaticGroupsAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readApplications.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readCatalogs.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readHome.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readPages.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readUtils.js +2 -3
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readVisualizations.js +1 -1
- package/src/main/js/sap/ushell/adapters/cep/MenuAdapter.js +41 -24
- package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionInternalAdapter.js +3 -2
- package/src/main/js/sap/ushell/adapters/cep/SearchCEPAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cflp/UserDefaultParameterPersistenceAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/AdapterContainer.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/AppStateAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/ClientSideTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/FlpLaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionInternalAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/PageBuildingAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/PagePersistenceAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/PersonalizationAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/PersonalizationV2Adapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/SearchAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/SearchCEPAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/SupportTicketAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +1 -1
- package/src/main/js/sap/ushell/appIntegration/AppLifeCycle.js +94 -114
- package/src/main/js/sap/ushell/appIntegration/ApplicationContainer.js +43 -20
- package/src/main/js/sap/ushell/appIntegration/ApplicationContainerRenderer.js +0 -11
- package/src/main/js/sap/ushell/appIntegration/IframeApplicationContainer.js +89 -32
- package/src/main/js/sap/ushell/appIntegration/IframeApplicationContainerRenderer.js +53 -52
- package/src/main/js/sap/ushell/appIntegration/PostMessageHandler/LifecycleHandler.js +1 -3
- package/src/main/js/sap/ushell/appIntegration/PostMessageHandler/NWBCHandler.js +1 -1
- package/src/main/js/sap/ushell/appIntegration/PostMessageHandler/NavigationHandler.js +4 -4
- package/src/main/js/sap/ushell/appIntegration/PostMessageManager.js +58 -17
- package/src/main/js/sap/ushell/appIntegration/PostMessagePluginInterface.js +4 -0
- package/src/main/js/sap/ushell/appIntegration/UI5ApplicationContainer.js +15 -28
- package/src/main/js/sap/ushell/appIntegration/contracts/EmbeddedUI5Handler.js +16 -27
- package/src/main/js/sap/ushell/appIntegration/contracts/StatefulContainerV2Handler.js +2 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntime.js +6 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/baseRta/CheckConditions.js +0 -12
- package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/RendererExtensions.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppConfiguration.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppLifeCycle.js +20 -3
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppLifeCycleAgent.js +17 -6
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppState.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Bookmark.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/BookmarkV2.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/CommonDataModel.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Container.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/CrossApplicationNavigation.js +2 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension/Item.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/FlpLaunchPage.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/FrameBoundExtension.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/LaunchPage.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/MessageBroker.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolution.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolutionInternal.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Navigation.js +2 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ReferenceResolver.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigation.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigationInternal.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellUIService.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/UserInfo.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/LoadingConfiguration.json +4 -0
- package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/StepConfiguration.json +35 -17
- package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/logger.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/state.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/cdm/cdm.constants.js +0 -1
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/common/common.create.configcontract.core.js +29 -5
- package/src/main/js/sap/ushell/bootstrap/sandbox2.js +1 -1
- package/src/main/js/sap/ushell/components/appfinder/Component.js +2 -2
- package/src/main/js/sap/ushell/components/appfinder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/CatalogService.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/Component.js +5 -5
- package/src/main/js/sap/ushell/components/contentFinder/controller/AppSearch.controller.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/controller/ContentFinderDialog.controller.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/dialog/Component.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/dialog/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/contentFinderStandalone/Component.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinderStandalone/controller/ContentFinderStandalone.controller.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinderStandalone/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/factsheet/Component.js +1 -1
- package/src/main/js/sap/ushell/components/factsheet/factory/ThingInspector.js +2 -2
- package/src/main/js/sap/ushell/components/homepage/ActionMode.js +1 -1
- package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +3 -3
- package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +10 -10
- package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +1 -1
- package/src/main/js/sap/ushell/components/homepage/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/pages/ActionMode.js +1 -1
- package/src/main/js/sap/ushell/components/pages/Component.js +1 -1
- package/src/main/js/sap/ushell/components/pages/MyHomeImport.js +1 -1
- package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +3 -3
- package/src/main/js/sap/ushell/components/pages/controller/PagesAndSpaceId.js +4 -4
- package/src/main/js/sap/ushell/components/pages/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +1 -1
- package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/FloatingContainer/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/MenuBar/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +1 -1
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenuButton.controller.js +1 -1
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +25 -50
- package/src/main/js/sap/ushell/components/shell/Notifications/NotificationsList.controller.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Notifications/NotificationsListPopoverContent.view.xml +2 -2
- package/src/main/js/sap/ushell/components/shell/Notifications/NotificationsListPopoverHeader.fragment.xml +1 -1
- package/src/main/js/sap/ushell/components/shell/Notifications/NotificationsModule.js +169 -0
- package/src/main/js/sap/ushell/components/shell/PostLoadingHeaderEnhancement/Component.js +4 -4
- package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Search/Component.js +6 -2
- package/src/main/js/sap/ushell/components/shell/Search/SearchModule.js +58 -0
- package/src/main/js/sap/ushell/components/shell/Search/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/FrequentActivityProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/RecentSearchProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchServiceProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEPNew/Component.js +33 -22
- package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/FrequentActivityProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/RecentSearchProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/SearchProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/SearchServiceProvider.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEPNew/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/Component.js +2 -2
- package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.view.xml +0 -1
- package/src/main/js/sap/ushell/components/shell/Settings/appearance/Appearance.controller.js +35 -7
- package/src/main/js/sap/ushell/components/shell/Settings/appearance/Appearance.view.xml +1 -1
- package/src/main/js/sap/ushell/components/shell/ShellBar/Component.js +14 -9
- package/src/main/js/sap/ushell/components/shell/ShellBar/controller/ShellBar.controller.js +15 -21
- package/src/main/js/sap/ushell/components/shell/ShellBar/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/ShellBar/view/ShellBar.view.xml +23 -18
- package/src/main/js/sap/ushell/components/shell/SideNavigation/Component.js +1 -1
- package/src/main/js/sap/ushell/components/shell/SideNavigation/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/UserActionsMenu/Component.js +1 -1
- package/src/main/js/sap/ushell/components/shell/UserActionsMenu/UserActionsMenu.controller.js +5 -5
- package/src/main/js/sap/ushell/components/shell/UserActionsMenu/UserActionsMenu.fragment.xml +2 -2
- package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +1 -1
- package/src/main/js/sap/ushell/components/tiles/applauncher/StaticTile.controller.js +6 -6
- package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/DynamicTile.controller.js +6 -6
- package/src/main/js/sap/ushell/components/tiles/cdm/applauncher/StaticTile.controller.js +6 -6
- package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.controller.js +6 -6
- package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +1 -1
- package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
- package/src/main/js/sap/ushell/library.js +1 -8
- package/src/main/js/sap/ushell/modules/Assistant/AssistantAPI.js +94 -0
- package/src/main/js/sap/ushell/modules/Assistant/AssistantProvider.js +50 -0
- package/src/main/js/sap/ushell/modules/Assistant/VisualConfiguration.js +41 -0
- package/src/main/js/sap/ushell/modules/Assistant.js +56 -0
- package/src/main/js/sap/ushell/modules/BaseAPI.js +107 -0
- package/src/main/js/sap/ushell/modules/BaseProvider.js +43 -0
- package/src/main/js/sap/ushell/modules/Notifications/NotificationsAPI.js +253 -0
- package/src/main/js/sap/ushell/modules/Notifications/NotificationsProvider.js +50 -0
- package/src/main/js/sap/ushell/modules/Notifications.js +53 -0
- package/src/main/js/sap/ushell/modules/Search/SearchAPI.js +271 -0
- package/src/main/js/sap/ushell/modules/Search/SearchProvider.js +50 -0
- package/src/main/js/sap/ushell/modules/Search.js +56 -0
- package/src/main/js/sap/ushell/modules/loader/AbstractLoader.js +95 -0
- package/src/main/js/sap/ushell/modules/loader/AssistantLoader.js +156 -0
- package/src/main/js/sap/ushell/modules/loader/NotificationsLoader.js +148 -0
- package/src/main/js/sap/ushell/modules/loader/SearchLoader.js +153 -0
- package/src/main/js/sap/ushell/navigationMode.js +1 -1
- package/src/main/js/sap/ushell/performance/FesrEnhancer.js +136 -40
- package/src/main/js/sap/ushell/performance/ShellAnalytics.js +1 -1
- package/src/main/js/sap/ushell/performance/StatisticalRecord.js +26 -1
- package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
- package/src/main/js/sap/ushell/plugins/ghostapp/FakeModel.js +19 -14
- package/src/main/js/sap/ushell/renderer/Renderer.js +6 -7
- package/src/main/js/sap/ushell/renderer/Shell.controller.js +204 -102
- package/src/main/js/sap/ushell/renderer/Shell.view.js +1 -1
- package/src/main/js/sap/ushell/renderer/resources/resources.properties +7 -9
- package/src/main/js/sap/ushell/renderer/resources/resources_ar.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_bg.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_ca.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_cnr.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_cs.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_cy.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_da.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_de.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_el.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_en.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_en_GB.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_en_US_saprigi.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_es.properties +4 -5
- package/src/main/js/sap/ushell/renderer/resources/resources_es_MX.properties +5 -6
- package/src/main/js/sap/ushell/renderer/resources/resources_et.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_fi.properties +4 -5
- package/src/main/js/sap/ushell/renderer/resources/resources_fr.properties +5 -6
- package/src/main/js/sap/ushell/renderer/resources/resources_fr_CA.properties +1 -2
- package/src/main/js/sap/ushell/renderer/resources/resources_hi.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_hr.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_hu.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_id.properties +5 -6
- package/src/main/js/sap/ushell/renderer/resources/resources_it.properties +4 -5
- package/src/main/js/sap/ushell/renderer/resources/resources_iw.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_ja.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_kk.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_ko.properties +5 -6
- package/src/main/js/sap/ushell/renderer/resources/resources_lt.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_lv.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_mk.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_ms.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_nl.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_no.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_pl.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_pt.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_pt_PT.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_ro.properties +5 -6
- package/src/main/js/sap/ushell/renderer/resources/resources_ru.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_sh.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_sk.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_sl.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_sr.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_sv.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_th.properties +6 -7
- package/src/main/js/sap/ushell/renderer/resources/resources_tr.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_uk.properties +13 -14
- package/src/main/js/sap/ushell/renderer/resources/resources_vi.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_zh_CN.properties +3 -4
- package/src/main/js/sap/ushell/renderer/resources/resources_zh_TW.properties +3 -4
- package/src/main/js/sap/ushell/renderer/search/searchComponent/manifest.json +1 -1
- package/src/main/js/sap/ushell/renderer/shellHeader/ShellHeader.controller.js +0 -14
- package/src/main/js/sap/ushell/renderer/shellHeader/ShellHeader.fragment.xml +0 -1
- package/src/main/js/sap/ushell/services/AppConfiguration.js +5 -63
- package/src/main/js/sap/ushell/services/AppLifeCycle.js +45 -37
- package/src/main/js/sap/ushell/services/AppState.js +1 -1
- package/src/main/js/sap/ushell/services/Bookmark.js +1 -1
- package/src/main/js/sap/ushell/services/BookmarkV2.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/Formatter.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/InboundIndex.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/InboundProvider.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/PrelaunchOperations.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/Search.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/StagedLogger.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/SystemContext.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/Utils.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/VirtualInbounds.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution/XAppStateProcessing.js +1 -1
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +6 -5
- package/src/main/js/sap/ushell/services/CommonDataModel/SiteConverter.js +1 -1
- package/src/main/js/sap/ushell/services/CommonDataModel/vizTypeDefaults/VizTypeDefaults.js +1 -1
- package/src/main/js/sap/ushell/services/CommonDataModel.js +1 -1
- package/src/main/js/sap/ushell/services/Configuration.js +1 -1
- package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +1 -1
- package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +1 -1
- package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +13 -13
- package/src/main/js/sap/ushell/services/DarkModeSupport.js +1 -1
- package/src/main/js/sap/ushell/services/Extension/Item.js +1 -1
- package/src/main/js/sap/ushell/services/Extension.js +15 -3
- package/src/main/js/sap/ushell/services/FlpLaunchPage.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension/FloatingContainer.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension/Footer.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension/Item.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension/SidePane.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension/ToolArea.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension/UserSettingsEntry.js +1 -1
- package/src/main/js/sap/ushell/services/FrameBoundExtension.js +21 -8
- package/src/main/js/sap/ushell/services/LaunchPage.js +1 -1
- package/src/main/js/sap/ushell/services/Menu.js +1 -181
- package/src/main/js/sap/ushell/services/Message.js +1 -1
- package/src/main/js/sap/ushell/services/MessageBroker/MessageBrokerEngine.js +3 -3
- package/src/main/js/sap/ushell/services/MessageBroker.js +3 -3
- package/src/main/js/sap/ushell/services/MessageInternal.js +1 -1
- package/src/main/js/sap/ushell/services/NavTargetResolutionInternal.js +3 -3
- package/src/main/js/sap/ushell/services/Navigation/compatibility.js +1 -1
- package/src/main/js/sap/ushell/services/Navigation/utils.js +1 -1
- package/src/main/js/sap/ushell/services/Navigation.js +20 -20
- package/src/main/js/sap/ushell/services/NavigationDataProvider.js +1 -1
- package/src/main/js/sap/ushell/services/PageBuilding.js +1 -1
- package/src/main/js/sap/ushell/services/PagePersistence.js +1 -1
- package/src/main/js/sap/ushell/services/PageReferencing.js +1 -1
- package/src/main/js/sap/ushell/services/Pages.js +1 -1
- package/src/main/js/sap/ushell/services/Personalization.js +1 -1
- package/src/main/js/sap/ushell/services/PersonalizationV2.js +1 -1
- package/src/main/js/sap/ushell/services/PluginManager/SimpleExpression.js +1 -1
- package/src/main/js/sap/ushell/services/PluginManager.js +2 -6
- package/src/main/js/sap/ushell/services/ReferenceResolver.js +1 -1
- package/src/main/js/sap/ushell/services/Search.js +1 -1
- package/src/main/js/sap/ushell/services/SearchCEP.js +6 -7
- package/src/main/js/sap/ushell/services/SearchableContent.js +3 -5
- package/src/main/js/sap/ushell/services/ShellNavigation.js +1 -1
- package/src/main/js/sap/ushell/services/ShellNavigationHashChanger.js +52 -73
- package/src/main/js/sap/ushell/services/SmartNavigation.js +1 -1
- package/src/main/js/sap/ushell/services/SpaceContent.js +1 -1
- package/src/main/js/sap/ushell/services/UITracer.js +1 -1
- package/src/main/js/sap/ushell/services/URLParsing.js +65 -47
- package/src/main/js/sap/ushell/services/URLShortening.js +1 -1
- package/src/main/js/sap/ushell/services/URLTemplate.js +1 -1
- package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +6 -44
- package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +1 -1
- package/src/main/js/sap/ushell/services/UserDefaultParameters.js +1 -1
- package/src/main/js/sap/ushell/services/UserInfo.js +1 -1
- package/src/main/js/sap/ushell/services/UserRecents/RecentActivity.js +2 -2
- package/src/main/js/sap/ushell/services/UserRecents/RecentsList.js +1 -1
- package/src/main/js/sap/ushell/services/UserRecents.js +5 -5
- package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +1 -1
- package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +1 -1
- package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/ContentExtensionAdapterConfig.js +1 -1
- package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/FeaturedGroupConfig.js +1 -1
- package/src/main/js/sap/ushell/services/_CrossApplicationNavigation/utils.js +1 -1
- package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
- package/src/main/js/sap/ushell/state/StateManager.js +14 -5
- package/src/main/js/sap/ushell/state/StateRules.js +10 -1
- package/src/main/js/sap/ushell/state/modules/BackNavigation.js +1 -1
- package/src/main/js/sap/ushell/state/modules/ContentDensity.js +1 -1
- package/src/main/js/sap/ushell/state/modules/Favicon.js +1 -1
- package/src/main/js/sap/ushell/state/modules/HeaderLogo.js +1 -1
- package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +1 -1
- package/src/main/js/sap/ushell/themes/base/ApplicationContainer.less +0 -9
- package/src/main/js/sap/ushell/themes/base/ShellHeader.less +0 -14
- package/src/main/js/sap/ushell/themes/sap_belize_base/ApplicationContainer.less +0 -9
- package/src/main/js/sap/ushell/themes/sap_belize_base/ShellHeader.less +0 -14
- package/src/main/js/sap/ushell/themes/sap_bluecrystal_base/ApplicationContainer.less +0 -9
- package/src/main/js/sap/ushell/themes/sap_bluecrystal_base/ShellHeader.less +0 -14
- package/src/main/js/sap/ushell/themes/sap_hcb/base_ApplicationContainer.less +0 -9
- package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellHeader.less +0 -14
- package/src/main/js/sap/ushell/ui/ShellHeader.js +4 -29
- package/src/main/js/sap/ushell/ui/ShellHeaderRenderer.js +0 -14
- package/src/main/js/sap/ushell/ui/cards/FrequentActivitiesExtension.js +11 -11
- package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +12 -12
- package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
- package/src/main/js/sap/ushell/ui/launchpad/Section.js +1 -1
- package/src/main/js/sap/ushell/ui/launchpad/VizInstance.js +113 -22
- package/src/main/js/sap/ushell/ui/launchpad/VizInstanceCdm.js +0 -2
- package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +1 -1
- package/src/main/js/sap/ushell/ui/shell/ShellAppTitle.js +0 -8
- package/src/main/js/sap/ushell/ui/shell/ToolAreaItem.js +1 -1
- package/src/main/js/sap/ushell/ui/utils.js +1 -1
- package/src/main/js/sap/ushell/ui5service/ShellUIServiceFactory.js +1 -1
- package/src/main/js/sap/ushell/ui5service/UserStatus.js +1 -1
- package/src/main/js/sap/ushell/utils/SmartBusiness.js +139 -0
- package/src/main/js/sap/ushell/utils/UrlParsing.js +335 -208
- package/src/main/js/sap/ushell/utils/UrlShortening.js +1 -1
- package/src/main/js/sap/ushell/utils/workpage/WorkPageHost.js +1 -1
- package/src/main/js/sap/ushell/utils/workpage/WorkPageService.js +1 -1
- package/src/main/js/sap/ushell/utils/workpage/WorkPageVizInstantiation.js +1 -1
- package/src/main/js/sap/ushell/utils.js +36 -56
- package/src/test/js/sap/ushell/bootstrap/sandbox.js +1 -1
- package/ui5.yaml +19 -34
- package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +0 -228
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.accessibility.js +0 -277
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.controller.js +0 -2128
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.layout.js +0 -462
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +0 -182
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +0 -135
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +0 -400
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +0 -345
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnRenderer.js +0 -103
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +0 -147
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRenderer.js +0 -60
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +0 -277
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRowRenderer.js +0 -96
- package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +0 -59
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources.properties +0 -177
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ar.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_bg.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ca.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_cnr.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_cs.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_cy.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_da.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_de.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_el.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_GB.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_sappsd.properties +0 -79
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_saprigi.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_saptrc.properties +0 -90
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_es.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_es_MX.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_et.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_fi.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_fr.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_fr_CA.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hi.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hr.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hu.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_id.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_it.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_iw.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ja.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_kk.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ko.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_lt.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_lv.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_mk.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ms.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_nl.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_no.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_pl.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_pt.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_pt_PT.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ro.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ru.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sh.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sk.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sl.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sr.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sv.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_th.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_tr.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_uk.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_vi.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_zh_CN.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_zh_TW.properties +0 -93
- package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageBuilder.view.xml +0 -248
- package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageCellDeleteDialog.fragment.xml +0 -25
- package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageRowDeleteDialog.fragment.xml +0 -25
- package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +0 -67
- package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +0 -176
- package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +0 -50
- package/src/main/js/sap/ushell/components/workPageRuntime/view/WorkPageRuntime.view.xml +0 -37
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/Avatar.js +0 -119
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/Button.js +0 -219
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/Label.js +0 -75
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/ListItem.js +0 -76
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/ListItemBase.js +0 -39
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/ListItemGroup.js +0 -153
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/Menu.js +0 -185
- package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/MenuItem.js +0 -198
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-base.js +0 -576
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/IllustratedMessage.js +0 -98
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/NotificationList.js +0 -135
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/NotificationListGroupItem.js +0 -91
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/NotificationListItem.js +0 -134
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/NotificationListItemBase.js +0 -55
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/Search.js +0 -163
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchItem.js +0 -83
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchItemGroup.js +0 -36
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchMessageArea.js +0 -53
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchScope.js +0 -55
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBar.js +0 -380
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBarBranding.js +0 -78
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBarItem.js +0 -88
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBarSearch.js +0 -157
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBarSpacer.js +0 -49
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/UserMenu.js +0 -197
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/UserMenuAccount.js +0 -83
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/UserMenuItem.js +0 -42
- package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori.js +0 -1652
- package/src/main/js/sap/ushell/gen/ui5/webcomponents.js +0 -2823
- package/src/main/js/sap/ushell/services/PluginManager/Extensions.js +0 -58
- package/src/main/js/sap/ushell/services/PluginManager/HeaderExtensions.js +0 -35
- package/src/main/js/sap/ushell/services/PluginManager/MenuExtensions.js +0 -65
- package/src/main/js/sap/ushell/thirdparty/AccessibilityTextsHelper.js +0 -13
- package/src/main/js/sap/ushell/thirdparty/Avatar.js +0 -453
- package/src/main/js/sap/ushell/thirdparty/BusyIndicator.js +0 -233
- package/src/main/js/sap/ushell/thirdparty/Button.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/Button2.js +0 -656
- package/src/main/js/sap/ushell/thirdparty/FocusableElements.js +0 -10
- package/src/main/js/sap/ushell/thirdparty/Icon.js +0 -313
- package/src/main/js/sap/ushell/thirdparty/Icons.js +0 -234
- package/src/main/js/sap/ushell/thirdparty/IllustratedMessage.js +0 -1297
- package/src/main/js/sap/ushell/thirdparty/Label.js +0 -115
- package/src/main/js/sap/ushell/thirdparty/Link.js +0 -316
- package/src/main/js/sap/ushell/thirdparty/List.js +0 -1253
- package/src/main/js/sap/ushell/thirdparty/ListBoxItemGroupTemplate.js +0 -14
- package/src/main/js/sap/ushell/thirdparty/ListItemAdditionalText.css.js +0 -10
- package/src/main/js/sap/ushell/thirdparty/ListItemBase.js +0 -251
- package/src/main/js/sap/ushell/thirdparty/ListItemCustom.js +0 -1689
- package/src/main/js/sap/ushell/thirdparty/ListItemGroup.js +0 -637
- package/src/main/js/sap/ushell/thirdparty/Menu.js +0 -389
- package/src/main/js/sap/ushell/thirdparty/MenuItem.js +0 -10
- package/src/main/js/sap/ushell/thirdparty/MenuItem2.js +0 -762
- package/src/main/js/sap/ushell/thirdparty/NotificationList.js +0 -291
- package/src/main/js/sap/ushell/thirdparty/NotificationListGroupItem.js +0 -310
- package/src/main/js/sap/ushell/thirdparty/NotificationListItem.js +0 -534
- package/src/main/js/sap/ushell/thirdparty/NotificationListItemBase.js +0 -98
- package/src/main/js/sap/ushell/thirdparty/ResponsivePopover.js +0 -2312
- package/src/main/js/sap/ushell/thirdparty/SearchItem.js +0 -157
- package/src/main/js/sap/ushell/thirdparty/SearchItemGroup.js +0 -44
- package/src/main/js/sap/ushell/thirdparty/SearchMessageArea.js +0 -49
- package/src/main/js/sap/ushell/thirdparty/SearchScope.js +0 -39
- package/src/main/js/sap/ushell/thirdparty/ShellBar.js +0 -1809
- package/src/main/js/sap/ushell/thirdparty/ShellBarBranding.js +0 -119
- package/src/main/js/sap/ushell/thirdparty/ShellBarItem.js +0 -89
- package/src/main/js/sap/ushell/thirdparty/ShellBarSearch.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/ShellBarSearch2.js +0 -3453
- package/src/main/js/sap/ushell/thirdparty/ShellBarSpacer.js +0 -40
- package/src/main/js/sap/ushell/thirdparty/Tag.js +0 -302
- package/src/main/js/sap/ushell/thirdparty/Text.js +0 -127
- package/src/main/js/sap/ushell/thirdparty/Title.js +0 -167
- package/src/main/js/sap/ushell/thirdparty/UserMenu.js +0 -950
- package/src/main/js/sap/ushell/thirdparty/UserMenuAccount.js +0 -114
- package/src/main/js/sap/ushell/thirdparty/UserMenuItem.js +0 -61
- package/src/main/js/sap/ushell/thirdparty/ValueState.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/WrappingType.js +0 -24
- package/src/main/js/sap/ushell/thirdparty/_dynamics/InputComposition.js +0 -35
- package/src/main/js/sap/ushell/thirdparty/_dynamics/InputSuggestions.js +0 -397
- package/src/main/js/sap/ushell/thirdparty/_dynamics/ListItemStandardExpandableTextTemplate.js +0 -193
- package/src/main/js/sap/ushell/thirdparty/_dynamics/SAP-icons-TNT.js +0 -585
- package/src/main/js/sap/ushell/thirdparty/_dynamics/SAP-icons-TNT2.js +0 -585
- package/src/main/js/sap/ushell/thirdparty/_dynamics/SAP-icons-business-suite.js +0 -1194
- package/src/main/js/sap/ushell/thirdparty/_dynamics/SAP-icons-business-suite2.js +0 -1194
- package/src/main/js/sap/ushell/thirdparty/_dynamics/SAP-icons.js +0 -2509
- package/src/main/js/sap/ushell/thirdparty/_dynamics/SAP-icons2.js +0 -2509
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ar.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ar2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_bg.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_bg2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ca.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ca2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cnr.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cnr2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cs.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cs2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cy.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cy2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_da.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_da2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_de.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_de2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_el.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_el2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_GB.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_GB2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_sappsd.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_sappsd2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saprigi.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saprigi2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saptrc.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saptrc2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es_MX.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es_MX2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_et.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_et2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fi.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fi2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr_CA.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr_CA2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hi.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hi2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hr.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hr2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hu.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hu2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_id.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_id2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_it.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_it2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_iw.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_iw2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ja.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ja2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_kk.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_kk2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ko.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ko2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lt.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lt2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lv.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lv2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_mk.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_mk2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ms.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ms2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_nl.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_nl2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_no.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_no2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pl.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pl2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt_PT.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt_PT2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ro.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ro2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ru.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ru2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sh.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sh2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sk.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sk2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sl.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sl2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sr.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sr2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sv.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sv2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_th.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_th2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_tr.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_tr2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_uk.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_uk2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_vi.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_vi2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_CN.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_CN2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_TW.js +0 -866
- package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_TW2.js +0 -611
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css10.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css11.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css12.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css13.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css14.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css15.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css16.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css17.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css18.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css19.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css20.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css21.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css22.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css23.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css24.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css25.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css26.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css27.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css4.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css5.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css6.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css7.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css8.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css9.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/encodeXML.js +0 -87
- package/src/main/js/sap/ushell/thirdparty/event-strict.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/generateHighlightedMarkup.js +0 -9
- package/src/main/js/sap/ushell/thirdparty/i18n-defaults.js +0 -115
- package/src/main/js/sap/ushell/thirdparty/i18n-defaults2.js +0 -159
- package/src/main/js/sap/ushell/thirdparty/information.js +0 -100
- package/src/main/js/sap/ushell/thirdparty/information2.js +0 -13
- package/src/main/js/sap/ushell/thirdparty/overflow.js +0 -25
- package/src/main/js/sap/ushell/thirdparty/parameters-bundle.css.js +0 -11
- package/src/main/js/sap/ushell/thirdparty/parameters-bundle.css2.js +0 -44
- package/src/main/js/sap/ushell/thirdparty/parameters-bundle.css3.js +0 -8
- package/src/main/js/sap/ushell/thirdparty/query.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/slim-arrow-down.js +0 -44
- package/src/main/js/sap/ushell/thirdparty/sys-enter-2.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/toLowercaseEnumValue.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/ui5/webcomponents-icons/AllIcons.js +0 -26
- package/src/main/js/sap/ushell/thirdparty/ui5/webcomponents-icons-business-suite/AllIcons.js +0 -26
- package/src/main/js/sap/ushell/thirdparty/ui5/webcomponents-icons-tnt/AllIcons.js +0 -26
- package/src/main/js/sap/ushell/thirdparty/webcomponents-base.js +0 -4301
- package/src/main/js/sap/ushell/thirdparty/webcomponents-base2.js +0 -7
- package/src/main/js/sap/ushell/thirdparty/webcomponents-fiori.js +0 -146
- package/src/main/js/sap/ushell/thirdparty/webcomponents.js +0 -170
- package/src/main/js/sap/ushell/thirdparty/willShowContent.js +0 -7
|
@@ -1,2312 +0,0 @@
|
|
|
1
|
-
sap.ui.define(['exports', 'sap/ushell/thirdparty/webcomponents-base', 'sap/ushell/thirdparty/Icons', 'sap/ushell/thirdparty/parameters-bundle.css', 'sap/ushell/thirdparty/i18n-defaults2', 'sap/ushell/thirdparty/parameters-bundle.css2', 'sap/ushell/thirdparty/information', 'sap/ushell/thirdparty/Title', 'sap/ushell/thirdparty/ValueState', 'sap/ushell/thirdparty/toLowercaseEnumValue', 'sap/ushell/thirdparty/event-strict', 'sap/ushell/thirdparty/FocusableElements', 'sap/ushell/thirdparty/AccessibilityTextsHelper', 'sap/ushell/thirdparty/Icon', 'sap/ushell/thirdparty/Button2'], (function (exports, webcomponentsBase, Icons, parametersBundle_css$1, i18nDefaults, parametersBundle_css, information, Title, ValueState, toLowercaseEnumValue, eventStrict, FocusableElements, AccessibilityTextsHelper, Icon, Button) { 'use strict';
|
|
2
|
-
|
|
3
|
-
const e$1={toAttribute(t){return t instanceof HTMLElement?null:t},fromAttribute(t){return t}};
|
|
4
|
-
|
|
5
|
-
function PopubBlockLayerTemplate() {
|
|
6
|
-
return (parametersBundle_css.jsx("div", { class: "ui5-block-layer", onKeyDown: this._preventBlockLayerFocus, onMouseDown: this._preventBlockLayerFocus }));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function PopupTemplate(hooks) {
|
|
10
|
-
return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [PopubBlockLayerTemplate.call(this), parametersBundle_css.jsxs("section", { "root-element": true, style: this.styles.root, class: this.classes.root, role: this._role, "aria-describedby": this.ariaDescribedByIds, "aria-modal": this._ariaModal, "aria-label": this._ariaLabel, "aria-labelledby": this._ariaLabelledBy, onKeyDown: this._onkeydown, onFocusOut: this._onfocusout, onMouseUp: this._onmouseup, onMouseDown: this._onmousedown, children: [parametersBundle_css.jsx("span", { class: "first-fe", "data-ui5-focus-trap": true, role: "none", tabIndex: 0, onFocusIn: this.forwardToLast }), (hooks?.beforeContent || beforeContent$2).call(this), parametersBundle_css.jsx("div", { style: this.styles.content, class: this.classes.content, onScroll: this._scroll, part: "content", children: parametersBundle_css.jsx("slot", {}) }), this.ariaDescriptionText &&
|
|
11
|
-
parametersBundle_css.jsx("span", { id: "accessibleDescription", class: "ui5-hidden-text", children: this.ariaDescriptionText }), (hooks?.afterContent || afterContent$2).call(this), parametersBundle_css.jsx("span", { class: "last-fe", "data-ui5-focus-trap": true, role: "none", tabIndex: 0, onFocusIn: this.forwardToFirst })] })] }));
|
|
12
|
-
}
|
|
13
|
-
function beforeContent$2() { }
|
|
14
|
-
function afterContent$2() { }
|
|
15
|
-
|
|
16
|
-
function PopoverTemplate() {
|
|
17
|
-
return PopupTemplate.call(this, {
|
|
18
|
-
beforeContent: beforeContent$1,
|
|
19
|
-
afterContent: afterContent$1,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function beforeContent$1() {
|
|
23
|
-
return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [parametersBundle_css.jsx("span", { class: "ui5-popover-arrow", style: this.styles.arrow }), this._displayHeader &&
|
|
24
|
-
parametersBundle_css.jsx("header", { class: "ui5-popup-header-root", id: "ui5-popup-header", part: "header", children: this.header.length ?
|
|
25
|
-
parametersBundle_css.jsx("slot", { name: "header" })
|
|
26
|
-
:
|
|
27
|
-
parametersBundle_css.jsx(Title.Title, { level: "H1", class: "ui5-popup-header-text", children: this.headerText }) })] }));
|
|
28
|
-
}
|
|
29
|
-
function afterContent$1() {
|
|
30
|
-
return (parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: this._displayFooter && !!this.footer.length &&
|
|
31
|
-
parametersBundle_css.jsx("footer", { class: "ui5-popup-footer-root", part: "footer", children: parametersBundle_css.jsx("slot", { name: "footer" }) }) }));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const m$1=(t,a,e)=>Math.min(Math.max(t,a),Math.max(a,e));
|
|
35
|
-
|
|
36
|
-
const r=()=>{const e=webcomponentsBase.t();return e&&typeof e.focus=="function"?e:null},a=e=>{const n=r();return n?l(e,n):false},l=(e,n)=>{let t=e;if(t.shadowRoot&&(t=Array.from(t.shadowRoot.children).find(c=>c.localName!=="style"),!t))return false;if(t===n)return true;const o=t.localName==="slot"?t.assignedNodes():t.children;return o?Array.from(o).some(s=>l(s,n)):false},m=(e,n,t)=>e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,f=(e,n)=>{let t,o;if(e instanceof MouseEvent)t=e.clientX,o=e.clientY;else {const s=e.touches[0];t=s.clientX,o=s.clientY;}return m(t,o,n)};function d(e){return "isUI5Element"in e&&"_show"in e}const i=e=>{const n=e.parentElement||e.getRootNode&&e.getRootNode().host;return n&&(d(n)||n===document.documentElement)?n:i(n)};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Popup accessible roles.
|
|
40
|
-
* @public
|
|
41
|
-
*/
|
|
42
|
-
var PopupAccessibleRole;
|
|
43
|
-
(function (PopupAccessibleRole) {
|
|
44
|
-
/**
|
|
45
|
-
* Represents no ARIA role.
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
PopupAccessibleRole["None"] = "None";
|
|
49
|
-
/**
|
|
50
|
-
* Represents the ARIA role "dialog".
|
|
51
|
-
* @public
|
|
52
|
-
*/
|
|
53
|
-
PopupAccessibleRole["Dialog"] = "Dialog";
|
|
54
|
-
/**
|
|
55
|
-
* Represents the ARIA role "alertdialog".
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
PopupAccessibleRole["AlertDialog"] = "AlertDialog";
|
|
59
|
-
})(PopupAccessibleRole || (PopupAccessibleRole = {}));
|
|
60
|
-
var PopupAccessibleRole$1 = PopupAccessibleRole;
|
|
61
|
-
|
|
62
|
-
const OpenedPopupsRegistry = Icons.m("OpenedPopupsRegistry", { openedRegistry: [] });
|
|
63
|
-
const openUI5Support = Icons.n$1("OpenUI5Support");
|
|
64
|
-
function registerPopupWithOpenUI5Support(popupInfo) {
|
|
65
|
-
openUI5Support?.addOpenedPopup(popupInfo);
|
|
66
|
-
}
|
|
67
|
-
function unregisterPopupWithOpenUI5Support(popup) {
|
|
68
|
-
openUI5Support?.removeOpenedPopup(popup);
|
|
69
|
-
}
|
|
70
|
-
const addOpenedPopup = (instance, parentPopovers = []) => {
|
|
71
|
-
if (!OpenedPopupsRegistry.openedRegistry.some(popup => popup.instance === instance)) {
|
|
72
|
-
OpenedPopupsRegistry.openedRegistry.push({
|
|
73
|
-
instance,
|
|
74
|
-
parentPopovers,
|
|
75
|
-
});
|
|
76
|
-
registerPopupWithOpenUI5Support({
|
|
77
|
-
type: "WebComponent",
|
|
78
|
-
instance,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
_updateTopModalPopup();
|
|
82
|
-
if (OpenedPopupsRegistry.openedRegistry.length === 1) {
|
|
83
|
-
attachGlobalListener();
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const removeOpenedPopup = (instance) => {
|
|
87
|
-
OpenedPopupsRegistry.openedRegistry = OpenedPopupsRegistry.openedRegistry.filter(el => {
|
|
88
|
-
return el.instance !== instance;
|
|
89
|
-
});
|
|
90
|
-
unregisterPopupWithOpenUI5Support(instance);
|
|
91
|
-
_updateTopModalPopup();
|
|
92
|
-
if (!OpenedPopupsRegistry.openedRegistry.length) {
|
|
93
|
-
detachGlobalListener();
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
const getOpenedPopups = () => {
|
|
97
|
-
return [...OpenedPopupsRegistry.openedRegistry];
|
|
98
|
-
};
|
|
99
|
-
const _keydownListener = (event) => {
|
|
100
|
-
if (!OpenedPopupsRegistry.openedRegistry.length) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
if (webcomponentsBase.m$2(event)) {
|
|
104
|
-
const topmostPopup = OpenedPopupsRegistry.openedRegistry[OpenedPopupsRegistry.openedRegistry.length - 1].instance;
|
|
105
|
-
if (openUI5Support && topmostPopup !== openUI5Support.getTopmostPopup()) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
event.stopPropagation();
|
|
109
|
-
topmostPopup.closePopup(true);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
const attachGlobalListener = () => {
|
|
113
|
-
document.addEventListener("keydown", _keydownListener);
|
|
114
|
-
};
|
|
115
|
-
const detachGlobalListener = () => {
|
|
116
|
-
document.removeEventListener("keydown", _keydownListener);
|
|
117
|
-
};
|
|
118
|
-
const _updateTopModalPopup = () => {
|
|
119
|
-
let popup;
|
|
120
|
-
let hasModal = false;
|
|
121
|
-
for (let i = OpenedPopupsRegistry.openedRegistry.length - 1; i >= 0; i--) {
|
|
122
|
-
popup = OpenedPopupsRegistry.openedRegistry[i].instance;
|
|
123
|
-
if (!hasModal && popup.isModal) {
|
|
124
|
-
popup.isTopModalPopup = true;
|
|
125
|
-
hasModal = true;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
popup.isTopModalPopup = false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
134
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
135
|
-
var popupStlyes = `:host{min-width:1px;overflow:visible;border:none;inset:unset;margin:0;padding:0}:host(:focus-visible){outline:none}
|
|
136
|
-
`;
|
|
137
|
-
|
|
138
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
139
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
140
|
-
var popupBlockLayerStyles = `.ui5-block-layer{position:fixed;z-index:-1;display:none;inset:-500px;outline:none;pointer-events:all}
|
|
141
|
-
`;
|
|
142
|
-
|
|
143
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
144
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
145
|
-
var globalStyles = `.ui5-popup-scroll-blocker{overflow:hidden}
|
|
146
|
-
`;
|
|
147
|
-
|
|
148
|
-
var __decorate$3 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
149
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
150
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
151
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
152
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
153
|
-
};
|
|
154
|
-
var Popup_1;
|
|
155
|
-
const createBlockingStyle = () => {
|
|
156
|
-
if (!Icons.S("data-ui5-popup-scroll-blocker")) {
|
|
157
|
-
Icons.c$1(globalStyles, "data-ui5-popup-scroll-blocker");
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
createBlockingStyle();
|
|
161
|
-
const pageScrollingBlockers = new Set();
|
|
162
|
-
/**
|
|
163
|
-
* @class
|
|
164
|
-
* ### Overview
|
|
165
|
-
* Base class for all popup Web Components.
|
|
166
|
-
*
|
|
167
|
-
* If you need to create your own popup-like custom UI5 Web Components.
|
|
168
|
-
*
|
|
169
|
-
* 1. The Popup class handles modality:
|
|
170
|
-
* - The "isModal" getter can be overridden by derivatives to provide their own conditions when they are modal or not
|
|
171
|
-
* - Derivatives may call the "blockPageScrolling" and "unblockPageScrolling" static methods to temporarily remove scrollbars on the html element
|
|
172
|
-
* - Derivatives may call the "openPopup" and "closePopup" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer
|
|
173
|
-
*
|
|
174
|
-
* 2. Provides blocking layer (relevant for modal popups only):
|
|
175
|
-
* - Controlled by the "open" and "close" methods
|
|
176
|
-
*
|
|
177
|
-
* 3. The Popup class "traps" focus:
|
|
178
|
-
* - Derivatives may call the "applyInitialFocus" method (usually when opening, to transfer focus inside the popup)
|
|
179
|
-
*
|
|
180
|
-
* 4. The template of this component exposes two inline partials you can override in derivatives:
|
|
181
|
-
* - beforeContent (upper part of the box, useful for header/title/close button)
|
|
182
|
-
* - afterContent (lower part, useful for footer/action buttons)
|
|
183
|
-
* @constructor
|
|
184
|
-
* @extends UI5Element
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
187
|
-
let Popup = Popup_1 = class Popup extends webcomponentsBase.b {
|
|
188
|
-
constructor() {
|
|
189
|
-
super();
|
|
190
|
-
/**
|
|
191
|
-
* Defines if the focus should be returned to the previously focused element,
|
|
192
|
-
* when the popup closes.
|
|
193
|
-
* @default false
|
|
194
|
-
* @public
|
|
195
|
-
* @since 1.0.0-rc.8
|
|
196
|
-
*/
|
|
197
|
-
this.preventFocusRestore = false;
|
|
198
|
-
/**
|
|
199
|
-
* Allows setting a custom role.
|
|
200
|
-
* @default "Dialog"
|
|
201
|
-
* @public
|
|
202
|
-
* @since 1.10.0
|
|
203
|
-
*/
|
|
204
|
-
this.accessibleRole = "Dialog";
|
|
205
|
-
/**
|
|
206
|
-
* Indicates whether initial focus should be prevented.
|
|
207
|
-
* @public
|
|
208
|
-
* @default false
|
|
209
|
-
* @since 2.0.0
|
|
210
|
-
*/
|
|
211
|
-
this.preventInitialFocus = false;
|
|
212
|
-
/**
|
|
213
|
-
* Indicates if the element is the top modal popup
|
|
214
|
-
*
|
|
215
|
-
* This property is calculated automatically
|
|
216
|
-
* @private
|
|
217
|
-
* @default false
|
|
218
|
-
*/
|
|
219
|
-
this.isTopModalPopup = false;
|
|
220
|
-
/**
|
|
221
|
-
* @private
|
|
222
|
-
*/
|
|
223
|
-
this.onPhone = false;
|
|
224
|
-
/**
|
|
225
|
-
* @private
|
|
226
|
-
*/
|
|
227
|
-
this.onDesktop = false;
|
|
228
|
-
this._opened = false;
|
|
229
|
-
this._open = false;
|
|
230
|
-
this._resizeHandlerRegistered = false;
|
|
231
|
-
this._resizeHandler = this._resize.bind(this);
|
|
232
|
-
this._getRealDomRef = () => {
|
|
233
|
-
return this.shadowRoot.querySelector("[root-element]");
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
onBeforeRendering() {
|
|
237
|
-
this.onPhone = Icons.d();
|
|
238
|
-
this.onDesktop = Icons.f();
|
|
239
|
-
}
|
|
240
|
-
onAfterRendering() {
|
|
241
|
-
Icons.f$1().then(() => {
|
|
242
|
-
this._updateMediaRange();
|
|
243
|
-
});
|
|
244
|
-
if (this.open) {
|
|
245
|
-
this._registerResizeHandler();
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
this._deregisterResizeHandler();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
onEnterDOM() {
|
|
252
|
-
this.setAttribute("popover", "manual");
|
|
253
|
-
if (Icons.f()) {
|
|
254
|
-
this.setAttribute("desktop", "");
|
|
255
|
-
}
|
|
256
|
-
this.tabIndex = -1;
|
|
257
|
-
this.handleOpenOnEnterDOM();
|
|
258
|
-
this.setAttribute("data-sap-ui-fastnavgroup-container", "true");
|
|
259
|
-
AccessibilityTextsHelper.y(this, this._updateAssociatedLabelsTexts.bind(this));
|
|
260
|
-
}
|
|
261
|
-
handleOpenOnEnterDOM() {
|
|
262
|
-
if (this.open) {
|
|
263
|
-
this.showPopover();
|
|
264
|
-
this.openPopup();
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
onExitDOM() {
|
|
268
|
-
if (this._opened) {
|
|
269
|
-
Popup_1.unblockPageScrolling(this);
|
|
270
|
-
this._removeOpenedPopup();
|
|
271
|
-
}
|
|
272
|
-
webcomponentsBase.f.deregister(this, this._resizeHandler);
|
|
273
|
-
AccessibilityTextsHelper.T(this);
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Indicates if the element is open
|
|
277
|
-
* @public
|
|
278
|
-
* @default false
|
|
279
|
-
* @since 1.2.0
|
|
280
|
-
*/
|
|
281
|
-
set open(value) {
|
|
282
|
-
if (this._open === value) {
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
this._open = value;
|
|
286
|
-
if (value) {
|
|
287
|
-
this.openPopup();
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
this.closePopup();
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
get open() {
|
|
294
|
-
return this._open;
|
|
295
|
-
}
|
|
296
|
-
async openPopup() {
|
|
297
|
-
if (this._opened) {
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
const prevented = !this.fireDecoratorEvent("before-open");
|
|
301
|
-
if (prevented) {
|
|
302
|
-
this.open = false;
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
if (this.isModal) {
|
|
306
|
-
Popup_1.blockPageScrolling(this);
|
|
307
|
-
}
|
|
308
|
-
this._focusedElementBeforeOpen = r();
|
|
309
|
-
this._show();
|
|
310
|
-
this._opened = true;
|
|
311
|
-
if (this.getDomRef()) {
|
|
312
|
-
this._updateMediaRange();
|
|
313
|
-
}
|
|
314
|
-
this._addOpenedPopup();
|
|
315
|
-
this.open = true;
|
|
316
|
-
// initial focus, if focused element is statically created
|
|
317
|
-
await this.applyInitialFocus();
|
|
318
|
-
await Icons.f$1();
|
|
319
|
-
if (this.isConnected) {
|
|
320
|
-
this.fireDecoratorEvent("open");
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
_resize() {
|
|
324
|
-
this._updateMediaRange();
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Prevents the user from interacting with the content under the block layer
|
|
328
|
-
*/
|
|
329
|
-
_preventBlockLayerFocus(e) {
|
|
330
|
-
e.preventDefault();
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Temporarily removes scrollbars from the html element
|
|
334
|
-
* @protected
|
|
335
|
-
*/
|
|
336
|
-
static blockPageScrolling(popup) {
|
|
337
|
-
pageScrollingBlockers.add(popup);
|
|
338
|
-
if (pageScrollingBlockers.size !== 1) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
document.documentElement.classList.add("ui5-popup-scroll-blocker");
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Restores scrollbars on the html element, if needed
|
|
345
|
-
* @protected
|
|
346
|
-
*/
|
|
347
|
-
static unblockPageScrolling(popup) {
|
|
348
|
-
pageScrollingBlockers.delete(popup);
|
|
349
|
-
if (pageScrollingBlockers.size !== 0) {
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
document.documentElement.classList.remove("ui5-popup-scroll-blocker");
|
|
353
|
-
}
|
|
354
|
-
_scroll(e) {
|
|
355
|
-
this.fireDecoratorEvent("scroll", {
|
|
356
|
-
scrollTop: e.target.scrollTop,
|
|
357
|
-
targetRef: e.target,
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
_onkeydown(e) {
|
|
361
|
-
const isTabOutAttempt = e.target === this._root && webcomponentsBase.V(e);
|
|
362
|
-
// if the popup is closed, focus is already moved, so Enter keydown may result in click on the newly focused element
|
|
363
|
-
const isEnterOnClosedPopupChild = webcomponentsBase.b$1(e) && !this.open;
|
|
364
|
-
if (isTabOutAttempt || isEnterOnClosedPopupChild) {
|
|
365
|
-
e.preventDefault();
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
_onfocusout(e) {
|
|
369
|
-
// relatedTarget is the element, which will get focus. If no such element exists, focus the root.
|
|
370
|
-
// This happens after the mouse is released in order to not interrupt text selection.
|
|
371
|
-
if (!e.relatedTarget) {
|
|
372
|
-
this._shouldFocusRoot = true;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
_onmousedown(e) {
|
|
376
|
-
if (this.shadowRoot.contains(e.target)) {
|
|
377
|
-
this._shouldFocusRoot = true;
|
|
378
|
-
}
|
|
379
|
-
else {
|
|
380
|
-
this._shouldFocusRoot = false;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
_onmouseup() {
|
|
384
|
-
if (this._shouldFocusRoot) {
|
|
385
|
-
if (Icons.g()) {
|
|
386
|
-
this._root.focus();
|
|
387
|
-
}
|
|
388
|
-
this._shouldFocusRoot = false;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Focus trapping
|
|
393
|
-
* @private
|
|
394
|
-
*/
|
|
395
|
-
async forwardToFirst() {
|
|
396
|
-
const firstFocusable = await FocusableElements.b(this);
|
|
397
|
-
if (firstFocusable) {
|
|
398
|
-
firstFocusable.focus();
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
this._root.focus();
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Focus trapping
|
|
406
|
-
* @private
|
|
407
|
-
*/
|
|
408
|
-
async forwardToLast() {
|
|
409
|
-
const lastFocusable = await FocusableElements.H(this);
|
|
410
|
-
if (lastFocusable) {
|
|
411
|
-
lastFocusable.focus();
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
this._root.focus();
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Use this method to focus the element denoted by "initialFocus", if provided,
|
|
419
|
-
* or the first focusable element otherwise.
|
|
420
|
-
* @protected
|
|
421
|
-
*/
|
|
422
|
-
async applyInitialFocus() {
|
|
423
|
-
if (!this.preventInitialFocus) {
|
|
424
|
-
await this.applyFocus();
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Focuses the element denoted by `initialFocus`, if provided,
|
|
429
|
-
* or the first focusable element otherwise.
|
|
430
|
-
* @public
|
|
431
|
-
* @returns Promise that resolves when the focus is applied
|
|
432
|
-
*/
|
|
433
|
-
async applyFocus() {
|
|
434
|
-
// do nothing if the standard HTML autofocus is used
|
|
435
|
-
if (this.querySelector("[autofocus]")) {
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
await this._waitForDomRef();
|
|
439
|
-
if (this.getRootNode() === this) {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
let element;
|
|
443
|
-
if (this.initialFocus) {
|
|
444
|
-
element = this.getRootNode().getElementById(this.initialFocus)
|
|
445
|
-
|| document.getElementById(this.initialFocus);
|
|
446
|
-
}
|
|
447
|
-
element = element || await FocusableElements.b(this) || this._root; // in case of no focusable content focus the root
|
|
448
|
-
if (element) {
|
|
449
|
-
if (element === this._root) {
|
|
450
|
-
element.tabIndex = -1;
|
|
451
|
-
}
|
|
452
|
-
element.focus();
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
isFocusWithin() {
|
|
456
|
-
return a(this._root);
|
|
457
|
-
}
|
|
458
|
-
_updateMediaRange() {
|
|
459
|
-
this.mediaRange = webcomponentsBase.i$2.getCurrentRange(webcomponentsBase.i$2.RANGESETS.RANGE_4STEPS, this.getDomRef().offsetWidth);
|
|
460
|
-
}
|
|
461
|
-
_updateAssociatedLabelsTexts() {
|
|
462
|
-
this._associatedDescriptionRefTexts = AccessibilityTextsHelper.p(this);
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Adds the popup to the "opened popups registry"
|
|
466
|
-
* @protected
|
|
467
|
-
*/
|
|
468
|
-
_addOpenedPopup() {
|
|
469
|
-
addOpenedPopup(this);
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Closes the popup.
|
|
473
|
-
*/
|
|
474
|
-
closePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false) {
|
|
475
|
-
if (!this._opened) {
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
const prevented = !this.fireDecoratorEvent("before-close", { escPressed });
|
|
479
|
-
if (prevented) {
|
|
480
|
-
this.open = true;
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
this._opened = false;
|
|
484
|
-
if (this.isModal) {
|
|
485
|
-
Popup_1.unblockPageScrolling(this);
|
|
486
|
-
}
|
|
487
|
-
this.hide();
|
|
488
|
-
this.open = false;
|
|
489
|
-
if (!preventRegistryUpdate) {
|
|
490
|
-
this._removeOpenedPopup();
|
|
491
|
-
}
|
|
492
|
-
if (!this.preventFocusRestore && !preventFocusRestore) {
|
|
493
|
-
this.resetFocus();
|
|
494
|
-
}
|
|
495
|
-
this.fireDecoratorEvent("close");
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* Removes the popup from the "opened popups registry"
|
|
499
|
-
* @protected
|
|
500
|
-
*/
|
|
501
|
-
_removeOpenedPopup() {
|
|
502
|
-
removeOpenedPopup(this);
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* Returns the focus to the previously focused element
|
|
506
|
-
* @protected
|
|
507
|
-
*/
|
|
508
|
-
resetFocus() {
|
|
509
|
-
this._focusedElementBeforeOpen?.focus();
|
|
510
|
-
this._focusedElementBeforeOpen = null;
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Sets "block" display to the popup. The property can be overriden by derivatives of Popup.
|
|
514
|
-
* @protected
|
|
515
|
-
*/
|
|
516
|
-
_show() {
|
|
517
|
-
if (this.isConnected) {
|
|
518
|
-
this.setAttribute("popover", "manual");
|
|
519
|
-
this.showPopover();
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
_registerResizeHandler() {
|
|
523
|
-
if (!this._resizeHandlerRegistered) {
|
|
524
|
-
webcomponentsBase.f.register(this, this._resizeHandler);
|
|
525
|
-
this._resizeHandlerRegistered = true;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
_deregisterResizeHandler() {
|
|
529
|
-
if (this._resizeHandlerRegistered) {
|
|
530
|
-
webcomponentsBase.f.deregister(this, this._resizeHandler);
|
|
531
|
-
this._resizeHandlerRegistered = false;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Sets "none" display to the popup
|
|
536
|
-
* @protected
|
|
537
|
-
*/
|
|
538
|
-
hide() {
|
|
539
|
-
this.isConnected && this.hidePopover();
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* Ensures ariaLabel is never null or empty string
|
|
543
|
-
* @protected
|
|
544
|
-
*/
|
|
545
|
-
get _ariaLabel() {
|
|
546
|
-
return AccessibilityTextsHelper.A(this);
|
|
547
|
-
}
|
|
548
|
-
get _accInfoAriaDescription() {
|
|
549
|
-
return this.ariaDescriptionText || "";
|
|
550
|
-
}
|
|
551
|
-
get ariaDescriptionText() {
|
|
552
|
-
return this._associatedDescriptionRefTexts || AccessibilityTextsHelper.L(this);
|
|
553
|
-
}
|
|
554
|
-
get ariaDescriptionTextId() {
|
|
555
|
-
return this.ariaDescriptionText ? "accessibleDescription" : "";
|
|
556
|
-
}
|
|
557
|
-
get ariaDescribedByIds() {
|
|
558
|
-
return [
|
|
559
|
-
this.ariaDescriptionTextId,
|
|
560
|
-
].filter(Boolean).join(" ");
|
|
561
|
-
}
|
|
562
|
-
get _root() {
|
|
563
|
-
return this.shadowRoot.querySelector(".ui5-popup-root");
|
|
564
|
-
}
|
|
565
|
-
get _role() {
|
|
566
|
-
return (this.accessibleRole === PopupAccessibleRole$1.None) ? undefined : toLowercaseEnumValue.n(this.accessibleRole);
|
|
567
|
-
}
|
|
568
|
-
get _ariaModal() {
|
|
569
|
-
return this.accessibleRole === PopupAccessibleRole$1.None ? undefined : "true";
|
|
570
|
-
}
|
|
571
|
-
get contentDOM() {
|
|
572
|
-
return this.shadowRoot.querySelector(".ui5-popup-content");
|
|
573
|
-
}
|
|
574
|
-
get styles() {
|
|
575
|
-
return {
|
|
576
|
-
root: {},
|
|
577
|
-
content: {},
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
get classes() {
|
|
581
|
-
return {
|
|
582
|
-
root: {
|
|
583
|
-
"ui5-popup-root": true,
|
|
584
|
-
},
|
|
585
|
-
content: {
|
|
586
|
-
"ui5-popup-content": true,
|
|
587
|
-
},
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
};
|
|
591
|
-
__decorate$3([
|
|
592
|
-
webcomponentsBase.s()
|
|
593
|
-
], Popup.prototype, "initialFocus", void 0);
|
|
594
|
-
__decorate$3([
|
|
595
|
-
webcomponentsBase.s({ type: Boolean })
|
|
596
|
-
], Popup.prototype, "preventFocusRestore", void 0);
|
|
597
|
-
__decorate$3([
|
|
598
|
-
webcomponentsBase.s()
|
|
599
|
-
], Popup.prototype, "accessibleName", void 0);
|
|
600
|
-
__decorate$3([
|
|
601
|
-
webcomponentsBase.s()
|
|
602
|
-
], Popup.prototype, "accessibleNameRef", void 0);
|
|
603
|
-
__decorate$3([
|
|
604
|
-
webcomponentsBase.s()
|
|
605
|
-
], Popup.prototype, "accessibleRole", void 0);
|
|
606
|
-
__decorate$3([
|
|
607
|
-
webcomponentsBase.s()
|
|
608
|
-
], Popup.prototype, "accessibleDescription", void 0);
|
|
609
|
-
__decorate$3([
|
|
610
|
-
webcomponentsBase.s()
|
|
611
|
-
], Popup.prototype, "accessibleDescriptionRef", void 0);
|
|
612
|
-
__decorate$3([
|
|
613
|
-
webcomponentsBase.s({ noAttribute: true })
|
|
614
|
-
], Popup.prototype, "_associatedDescriptionRefTexts", void 0);
|
|
615
|
-
__decorate$3([
|
|
616
|
-
webcomponentsBase.s()
|
|
617
|
-
], Popup.prototype, "mediaRange", void 0);
|
|
618
|
-
__decorate$3([
|
|
619
|
-
webcomponentsBase.s({ type: Boolean })
|
|
620
|
-
], Popup.prototype, "preventInitialFocus", void 0);
|
|
621
|
-
__decorate$3([
|
|
622
|
-
webcomponentsBase.s({ type: Boolean, noAttribute: true })
|
|
623
|
-
], Popup.prototype, "isTopModalPopup", void 0);
|
|
624
|
-
__decorate$3([
|
|
625
|
-
webcomponentsBase.d({ type: HTMLElement, "default": true })
|
|
626
|
-
], Popup.prototype, "content", void 0);
|
|
627
|
-
__decorate$3([
|
|
628
|
-
webcomponentsBase.s({ type: Boolean })
|
|
629
|
-
], Popup.prototype, "onPhone", void 0);
|
|
630
|
-
__decorate$3([
|
|
631
|
-
webcomponentsBase.s({ type: Boolean })
|
|
632
|
-
], Popup.prototype, "onDesktop", void 0);
|
|
633
|
-
__decorate$3([
|
|
634
|
-
webcomponentsBase.s({ type: Boolean })
|
|
635
|
-
], Popup.prototype, "open", null);
|
|
636
|
-
Popup = Popup_1 = __decorate$3([
|
|
637
|
-
webcomponentsBase.m({
|
|
638
|
-
renderer: parametersBundle_css.y,
|
|
639
|
-
styles: [popupStlyes, popupBlockLayerStyles],
|
|
640
|
-
template: PopupTemplate,
|
|
641
|
-
})
|
|
642
|
-
/**
|
|
643
|
-
* Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.
|
|
644
|
-
* @public
|
|
645
|
-
*/
|
|
646
|
-
,
|
|
647
|
-
eventStrict.l("before-open", {
|
|
648
|
-
cancelable: true,
|
|
649
|
-
})
|
|
650
|
-
/**
|
|
651
|
-
* Fired after the component is opened.
|
|
652
|
-
* @public
|
|
653
|
-
*/
|
|
654
|
-
,
|
|
655
|
-
eventStrict.l("open")
|
|
656
|
-
/**
|
|
657
|
-
* Fired before the component is closed. This event can be cancelled, which will prevent the popup from closing.
|
|
658
|
-
* @public
|
|
659
|
-
* @param {boolean} escPressed Indicates that `ESC` key has triggered the event.
|
|
660
|
-
*/
|
|
661
|
-
,
|
|
662
|
-
eventStrict.l("before-close", {
|
|
663
|
-
cancelable: true,
|
|
664
|
-
})
|
|
665
|
-
/**
|
|
666
|
-
* Fired after the component is closed.
|
|
667
|
-
* @public
|
|
668
|
-
*/
|
|
669
|
-
,
|
|
670
|
-
eventStrict.l("close")
|
|
671
|
-
/**
|
|
672
|
-
* Fired whenever the popup content area is scrolled
|
|
673
|
-
* @private
|
|
674
|
-
*/
|
|
675
|
-
,
|
|
676
|
-
eventStrict.l("scroll", {
|
|
677
|
-
bubbles: true,
|
|
678
|
-
})
|
|
679
|
-
], Popup);
|
|
680
|
-
var Popup$1 = Popup;
|
|
681
|
-
|
|
682
|
-
const name$1 = "resize-corner";
|
|
683
|
-
const pathData$1 = "M384 160v32q0 12-10 22L182 406q-10 10-22 10h-32zM224 416l160-160v32q0 12-10 22l-96 96q-10 10-22 10h-32zm160-64v32q0 12-10 22t-22 10h-32z";
|
|
684
|
-
const ltr$1 = false;
|
|
685
|
-
const collection$1 = "SAP-icons-v4";
|
|
686
|
-
const packageName$1 = "sap/ushell/gen/ui5/webcomponents-icons";
|
|
687
|
-
|
|
688
|
-
Icons.y(name$1, { pathData: pathData$1, ltr: ltr$1, collection: collection$1, packageName: packageName$1 });
|
|
689
|
-
|
|
690
|
-
const name = "resize-corner";
|
|
691
|
-
const pathData = "M282 416q-11 0-18.5-7.5T256 390t7-18l109-109q7-7 18-7t18.5 7.5T416 282t-7 18L300 409q-7 7-18 7zm-160 0q-11 0-18.5-7.5T96 390t7-18l269-269q7-7 18-7t18.5 7.5T416 122t-7 18L140 409q-7 7-18 7z";
|
|
692
|
-
const ltr = false;
|
|
693
|
-
const collection = "SAP-icons-v5";
|
|
694
|
-
const packageName = "sap/ushell/gen/ui5/webcomponents-icons";
|
|
695
|
-
|
|
696
|
-
Icons.y(name, { pathData, ltr, collection, packageName });
|
|
697
|
-
|
|
698
|
-
var resizeCorner = "resize-corner";
|
|
699
|
-
|
|
700
|
-
function DialogTemplate() {
|
|
701
|
-
return PopupTemplate.call(this, {
|
|
702
|
-
beforeContent,
|
|
703
|
-
afterContent,
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
function beforeContent() {
|
|
707
|
-
return (parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: !!this._displayHeader &&
|
|
708
|
-
parametersBundle_css.jsx("header", { children: parametersBundle_css.jsxs("div", { class: "ui5-popup-header-root", id: "ui5-popup-header", role: "group", "aria-describedby": this.effectiveAriaDescribedBy, "aria-roledescription": this.ariaRoleDescriptionHeaderText, tabIndex: this._headerTabIndex, onKeyDown: this._onDragOrResizeKeyDown, onMouseDown: this._onDragMouseDown, part: "header", children: [this.hasValueState &&
|
|
709
|
-
parametersBundle_css.jsx(Icon.Icon, { class: "ui5-dialog-value-state-icon", name: this._dialogStateIcon }), this.header.length ?
|
|
710
|
-
parametersBundle_css.jsx("slot", { name: "header" })
|
|
711
|
-
:
|
|
712
|
-
parametersBundle_css.jsx(Title.Title, { level: "H1", id: "ui5-popup-header-text", class: "ui5-popup-header-text", children: this.headerText }), this.resizable ?
|
|
713
|
-
this.draggable ?
|
|
714
|
-
parametersBundle_css.jsx("span", { id: `${this._id}-descr`, "aria-hidden": "true", class: "ui5-hidden-text", children: this.ariaDescribedByHeaderTextDraggableAndResizable })
|
|
715
|
-
:
|
|
716
|
-
parametersBundle_css.jsx("span", { id: `${this._id}-descr`, "aria-hidden": "true", class: "ui5-hidden-text", children: this.ariaDescribedByHeaderTextResizable })
|
|
717
|
-
:
|
|
718
|
-
this.draggable &&
|
|
719
|
-
parametersBundle_css.jsx("span", { id: `${this._id}-descr`, "aria-hidden": "true", class: "ui5-hidden-text", children: this.ariaDescribedByHeaderTextDraggable })] }) }) }));
|
|
720
|
-
}
|
|
721
|
-
function afterContent() {
|
|
722
|
-
return (parametersBundle_css.jsxs(parametersBundle_css.Fragment, { children: [!!this.footer.length &&
|
|
723
|
-
parametersBundle_css.jsx("footer", { class: "ui5-popup-footer-root", part: "footer", children: parametersBundle_css.jsx("slot", { name: "footer" }) }), this._showResizeHandle &&
|
|
724
|
-
parametersBundle_css.jsx("div", { class: "ui5-popup-resize-handle", onMouseDown: this._onResizeMouseDown, children: parametersBundle_css.jsx(Icon.Icon, { name: resizeCorner }) })] }));
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
728
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
729
|
-
var PopupsCommonCss = `.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{position:fixed;background:var(--sapGroup_ContentBackground);border-radius:var(--_ui5-v2-15-0_popup_border_radius);min-height:2rem;box-sizing:border-box}:host([open]){display:flex}.ui5-popup-root{background:inherit;border-radius:inherit;width:100%;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;flex:1 1 auto;outline:none}.ui5-popup-root .ui5-popup-header-root{box-shadow:var(--_ui5-v2-15-0_popup_header_shadow);border-bottom:var(--_ui5-v2-15-0_popup_header_border)}.ui5-popup-content{color:var(--sapTextColor);flex:auto}.ui5-popup-content:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:calc(-1 * var(--sapContent_FocusWidth));border-radius:var(--_ui5-v2-15-0_popup_border_radius)}.ui5-popup-footer-root{background:var(--sapPageFooter_Background);border-top:1px solid var(--sapPageFooter_BorderColor);color:var(--sapPageFooter_TextColor)}.ui5-popup-header-root,.ui5-popup-footer-root,:host([header-text]) .ui5-popup-header-text{margin:0;display:flex;justify-content:center;align-items:center}.ui5-popup-header-root .ui5-popup-header-text{font-weight:var(--sapFontHeaderFamily);font-size:var(--sapFontHeader5Size);color:var(--sapPageHeader_TextColor)}.ui5-popup-content{overflow:auto;box-sizing:border-box}:host([header-text]) .ui5-popup-header-text{min-height:var(--_ui5-v2-15-0_popup_default_header_height);max-height:var(--_ui5-v2-15-0_popup_default_header_height);line-height:var(--_ui5-v2-15-0_popup_default_header_height);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:100%;display:inline-flex;justify-content:var(--_ui5-v2-15-0_popup_header_prop_header_text_alignment)}:host([header-text]) .ui5-popup-header-root{justify-content:var(--_ui5-v2-15-0_popup_header_prop_header_text_alignment)}:host(:not([header-text])) .ui5-popup-header-text{display:none}:host([media-range="S"]) .ui5-popup-content{padding:1rem var(--_ui5-v2-15-0_popup_content_padding_s)}:host([media-range="M"]) .ui5-popup-content,:host([media-range="L"]) .ui5-popup-content{padding:1rem var(--_ui5-v2-15-0_popup_content_padding_m_l)}:host([media-range="XL"]) .ui5-popup-content{padding:1rem var(--_ui5-v2-15-0_popup_content_padding_xl)}.ui5-popup-header-root{background:var(--sapPageHeader_Background)}:host([media-range="S"]) .ui5-popup-header-root,:host([media-range="S"]) .ui5-popup-footer-root{padding-left:var(--_ui5-v2-15-0_popup_header_footer_padding_s);padding-right:var(--_ui5-v2-15-0_popup_header_footer_padding_s)}:host([media-range="M"]) .ui5-popup-header-root,:host([media-range="L"]) .ui5-popup-header-root,:host([media-range="M"]) .ui5-popup-footer-root,:host([media-range="L"]) .ui5-popup-footer-root{padding-left:var(--_ui5-v2-15-0_popup_header_footer_padding_m_l);padding-right:var(--_ui5-v2-15-0_popup_header_footer_padding_m_l)}:host([media-range="XL"]) .ui5-popup-header-root,:host([media-range="XL"]) .ui5-popup-footer-root{padding-left:var(--_ui5-v2-15-0_popup_header_footer_padding_xl);padding-right:var(--_ui5-v2-15-0_popup_header_footer_padding_xl)}
|
|
730
|
-
`;
|
|
731
|
-
|
|
732
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
733
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
734
|
-
var dialogCSS = `.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{min-width:20rem;min-height:6rem;max-height:94%;max-width:90%;flex-direction:column;box-shadow:var(--sapContent_Shadow3);border-radius:var(--sapElement_BorderCornerRadius)}:host([stretch]){width:90%;height:94%}:host([stretch][on-phone]){width:100%;height:100%;max-height:100%;max-width:100%;border-radius:0;min-width:0}:host([draggable]) .ui5-popup-header-root,:host([draggable]) ::slotted([slot="header"]){cursor:move}:host([draggable]) .ui5-popup-header-root *{cursor:auto}:host([draggable]) .ui5-popup-root{user-select:text}::slotted([slot="header"]){max-width:100%}.ui5-popup-root{display:flex;flex-direction:column;max-width:100vw}.ui5-popup-header-root{position:relative}.ui5-popup-header-root:before{content:"";position:absolute;inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;height:var(--_ui5-v2-15-0_dialog_header_state_line_height);background:var(--sapObjectHeader_BorderColor)}:host([state="Negative"]) .ui5-popup-header-root:before{background:var(--sapErrorBorderColor)}:host([state="Information"]) .ui5-popup-header-root:before{background:var(--sapInformationBorderColor)}:host([state="Positive"]) .ui5-popup-header-root:before{background:var(--sapSuccessBorderColor)}:host([state="Critical"]) .ui5-popup-header-root:before{background:var(--sapWarningBorderColor)}.ui5-dialog-value-state-icon{margin-inline-end:.5rem;flex-shrink:0}:host([state="Negative"]) .ui5-dialog-value-state-icon{color:var(--sapNegativeElementColor)}:host([state="Information"]) .ui5-dialog-value-state-icon{color:var(--sapInformativeElementColor)}:host([state="Positive"]) .ui5-dialog-value-state-icon{color:var(--sapPositiveElementColor)}:host([state="Critical"]) .ui5-dialog-value-state-icon{color:var(--sapCriticalElementColor)}.ui5-popup-header-root{outline:none}:host([desktop]) .ui5-popup-header-root:focus:after,.ui5-popup-header-root:focus-visible:after{content:"";position:absolute;left:var(--_ui5-v2-15-0_dialog_header_focus_left_offset);bottom:var(--_ui5-v2-15-0_dialog_header_focus_bottom_offset);right:var(--_ui5-v2-15-0_dialog_header_focus_right_offset);top:var(--_ui5-v2-15-0_dialog_header_focus_top_offset);border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--_ui5-v2-15-0_dialog_header_border_radius) var(--_ui5-v2-15-0_dialog_header_border_radius) 0 0;pointer-events:none}:host([stretch]) .ui5-popup-content{width:100%;height:100%}.ui5-popup-content{min-height:var(--_ui5-v2-15-0_dialog_content_min_height);flex:1 1 auto}.ui5-popup-resize-handle{position:absolute;bottom:-.5rem;inset-inline-end:-.5rem;cursor:var(--_ui5-v2-15-0_dialog_resize_cursor);width:1.5rem;height:1.5rem;border-radius:50%}.ui5-popup-resize-handle [ui5-icon]{color:var(--sapButton_Lite_TextColor)}::slotted([slot="footer"]){height:var(--_ui5-v2-15-0_dialog_footer_height)}::slotted([slot="footer"][ui5-bar][design="Footer"]){border-top:none}::slotted([slot="header"][ui5-bar]){box-shadow:none}::slotted([slot="footer"][ui5-toolbar]){border:0}:host::backdrop{background-color:var(--_ui5-v2-15-0_popup_block_layer_background);opacity:var(--_ui5-v2-15-0_popup_block_layer_opacity)}.ui5-block-layer{display:block}
|
|
735
|
-
`;
|
|
736
|
-
|
|
737
|
-
var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
738
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
739
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
740
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
741
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
742
|
-
};
|
|
743
|
-
var Dialog_1;
|
|
744
|
-
/**
|
|
745
|
-
* Defines the step size at which this component would change by when being dragged or resized with the keyboard.
|
|
746
|
-
*/
|
|
747
|
-
const STEP_SIZE = 16;
|
|
748
|
-
/**
|
|
749
|
-
* Defines the icons corresponding to the dialog's state.
|
|
750
|
-
*/
|
|
751
|
-
const ICON_PER_STATE = {
|
|
752
|
-
[ValueState.o.Negative]: "error",
|
|
753
|
-
[ValueState.o.Critical]: "alert",
|
|
754
|
-
[ValueState.o.Positive]: "sys-enter-2",
|
|
755
|
-
[ValueState.o.Information]: "information",
|
|
756
|
-
};
|
|
757
|
-
/**
|
|
758
|
-
* @class
|
|
759
|
-
* ### Overview
|
|
760
|
-
* The `ui5-dialog` component is used to temporarily display some information in a
|
|
761
|
-
* size-limited window in front of the regular app screen.
|
|
762
|
-
* It is used to prompt the user for an action or a confirmation.
|
|
763
|
-
* The `ui5-dialog` interrupts the current app processing as it is the only focused UI element and
|
|
764
|
-
* the main screen is dimmed/blocked.
|
|
765
|
-
* The dialog combines concepts known from other technologies where the windows have
|
|
766
|
-
* names such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.
|
|
767
|
-
*
|
|
768
|
-
* The `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.
|
|
769
|
-
* To open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.
|
|
770
|
-
* The content of the `ui5-dialog` is fully customizable.
|
|
771
|
-
*
|
|
772
|
-
* ### Structure
|
|
773
|
-
* A `ui5-dialog` consists of a header, content, and a footer for action buttons.
|
|
774
|
-
* The `ui5-dialog` is usually displayed at the center of the screen.
|
|
775
|
-
* Its position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.
|
|
776
|
-
|
|
777
|
-
*
|
|
778
|
-
* ### Responsive Behavior
|
|
779
|
-
* The `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.
|
|
780
|
-
*
|
|
781
|
-
* **Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.
|
|
782
|
-
*
|
|
783
|
-
* For more information see the sample "Bar in Header/Footer".
|
|
784
|
-
|
|
785
|
-
* ### Keyboard Handling
|
|
786
|
-
*
|
|
787
|
-
* #### Basic Navigation
|
|
788
|
-
* When the `ui5-dialog` has the `draggable` property set to `true` and the header is focused, the user can move the dialog
|
|
789
|
-
* with the following keyboard shortcuts:
|
|
790
|
-
*
|
|
791
|
-
* - [Up] or [Down] arrow keys - Move the dialog up/down.
|
|
792
|
-
* - [Left] or [Right] arrow keys - Move the dialog left/right.
|
|
793
|
-
*
|
|
794
|
-
* #### Resizing
|
|
795
|
-
* When the `ui5-dialog` has the `resizable` property set to `true` and the header is focused, the user can change the size of the dialog
|
|
796
|
-
* with the following keyboard shortcuts:
|
|
797
|
-
*
|
|
798
|
-
* - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.
|
|
799
|
-
* - [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.
|
|
800
|
-
*
|
|
801
|
-
* ### ES6 Module Import
|
|
802
|
-
*
|
|
803
|
-
* `import "sap/ushell/gen/ui5/webcomponents/dist/Dialog";`
|
|
804
|
-
*
|
|
805
|
-
* @constructor
|
|
806
|
-
* @extends Popup
|
|
807
|
-
* @public
|
|
808
|
-
* @csspart header - Used to style the header of the component
|
|
809
|
-
* @csspart content - Used to style the content of the component
|
|
810
|
-
* @csspart footer - Used to style the footer of the component
|
|
811
|
-
*/
|
|
812
|
-
let Dialog = Dialog_1 = class Dialog extends Popup$1 {
|
|
813
|
-
constructor() {
|
|
814
|
-
super();
|
|
815
|
-
/**
|
|
816
|
-
* Determines if the dialog will be stretched to full screen on mobile. On desktop,
|
|
817
|
-
* the dialog will be stretched to approximately 90% of the viewport.
|
|
818
|
-
*
|
|
819
|
-
* **Note:** For better usability of the component it is recommended to set this property to "true" when the dialog is opened on phone.
|
|
820
|
-
* @default false
|
|
821
|
-
* @public
|
|
822
|
-
*/
|
|
823
|
-
this.stretch = false;
|
|
824
|
-
/**
|
|
825
|
-
* Determines whether the component is draggable.
|
|
826
|
-
* If this property is set to true, the Dialog will be draggable by its header.
|
|
827
|
-
*
|
|
828
|
-
* **Note:** The component can be draggable only in desktop mode.
|
|
829
|
-
*
|
|
830
|
-
* **Note:** This property overrides the default HTML "draggable" attribute native behavior.
|
|
831
|
-
* When "draggable" is set to true, the native browser "draggable"
|
|
832
|
-
* behavior is prevented and only the Dialog custom logic ("draggable by its header") works.
|
|
833
|
-
* @default false
|
|
834
|
-
* @since 1.0.0-rc.9
|
|
835
|
-
* @public
|
|
836
|
-
*/
|
|
837
|
-
this.draggable = false;
|
|
838
|
-
/**
|
|
839
|
-
* Configures the component to be resizable.
|
|
840
|
-
* If this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.
|
|
841
|
-
* In RTL languages, the resize handle will be placed in the bottom left corner.
|
|
842
|
-
*
|
|
843
|
-
* **Note:** The component can be resizable only in desktop mode.
|
|
844
|
-
*
|
|
845
|
-
* **Note:** Upon resizing, externally defined height and width styling will be ignored.
|
|
846
|
-
* @default false
|
|
847
|
-
* @since 1.0.0-rc.10
|
|
848
|
-
* @public
|
|
849
|
-
*/
|
|
850
|
-
this.resizable = false;
|
|
851
|
-
/**
|
|
852
|
-
* Defines the state of the `Dialog`.
|
|
853
|
-
*
|
|
854
|
-
* **Note:** If `"Negative"` and `"Critical"` states is set, it will change the
|
|
855
|
-
* accessibility role to "alertdialog", if the accessibleRole property is set to `"Dialog"`.
|
|
856
|
-
* @default "None"
|
|
857
|
-
* @public
|
|
858
|
-
* @since 1.0.0-rc.15
|
|
859
|
-
*/
|
|
860
|
-
this.state = "None";
|
|
861
|
-
this._draggedOrResized = false;
|
|
862
|
-
this._revertSize = () => {
|
|
863
|
-
Object.assign(this.style, {
|
|
864
|
-
top: "",
|
|
865
|
-
left: "",
|
|
866
|
-
width: "",
|
|
867
|
-
height: "",
|
|
868
|
-
});
|
|
869
|
-
};
|
|
870
|
-
this._screenResizeHandler = this._screenResize.bind(this);
|
|
871
|
-
this._dragMouseMoveHandler = this._onDragMouseMove.bind(this);
|
|
872
|
-
this._dragMouseUpHandler = this._onDragMouseUp.bind(this);
|
|
873
|
-
this._resizeMouseMoveHandler = this._onResizeMouseMove.bind(this);
|
|
874
|
-
this._resizeMouseUpHandler = this._onResizeMouseUp.bind(this);
|
|
875
|
-
this._dragStartHandler = this._handleDragStart.bind(this);
|
|
876
|
-
}
|
|
877
|
-
static _isHeader(element) {
|
|
878
|
-
return element.classList.contains("ui5-popup-header-root") || element.getAttribute("slot") === "header";
|
|
879
|
-
}
|
|
880
|
-
get isModal() {
|
|
881
|
-
return true;
|
|
882
|
-
}
|
|
883
|
-
get _ariaLabelledBy() {
|
|
884
|
-
let ariaLabelledById;
|
|
885
|
-
if (this.headerText && !this._ariaLabel) {
|
|
886
|
-
ariaLabelledById = "ui5-popup-header-text";
|
|
887
|
-
}
|
|
888
|
-
return ariaLabelledById;
|
|
889
|
-
}
|
|
890
|
-
get ariaRoleDescriptionHeaderText() {
|
|
891
|
-
return (this.resizable || this.draggable) ? Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;
|
|
892
|
-
}
|
|
893
|
-
get effectiveAriaDescribedBy() {
|
|
894
|
-
return (this.resizable || this.draggable) ? `${this._id}-descr` : undefined;
|
|
895
|
-
}
|
|
896
|
-
get ariaDescribedByHeaderTextResizable() {
|
|
897
|
-
return Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_DESCRIBEDBY_RESIZABLE);
|
|
898
|
-
}
|
|
899
|
-
get ariaDescribedByHeaderTextDraggable() {
|
|
900
|
-
return Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE);
|
|
901
|
-
}
|
|
902
|
-
get ariaDescribedByHeaderTextDraggableAndResizable() {
|
|
903
|
-
return Dialog_1.i18nBundle.getText(i18nDefaults.DIALOG_HEADER_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* Determines if the header should be shown.
|
|
907
|
-
*/
|
|
908
|
-
get _displayHeader() {
|
|
909
|
-
return this.header.length || this.headerText || this.draggable || this.resizable;
|
|
910
|
-
}
|
|
911
|
-
get _movable() {
|
|
912
|
-
return !this.stretch && this.onDesktop && (this.draggable || this.resizable);
|
|
913
|
-
}
|
|
914
|
-
get _headerTabIndex() {
|
|
915
|
-
return this._movable ? 0 : undefined;
|
|
916
|
-
}
|
|
917
|
-
get _showResizeHandle() {
|
|
918
|
-
return this.resizable && this.onDesktop;
|
|
919
|
-
}
|
|
920
|
-
get _minHeight() {
|
|
921
|
-
let minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);
|
|
922
|
-
const header = this._root.querySelector(".ui5-popup-header-root");
|
|
923
|
-
if (header) {
|
|
924
|
-
minHeight += header.offsetHeight;
|
|
925
|
-
}
|
|
926
|
-
const footer = this._root.querySelector(".ui5-popup-footer-root");
|
|
927
|
-
if (footer) {
|
|
928
|
-
minHeight += footer.offsetHeight;
|
|
929
|
-
}
|
|
930
|
-
return minHeight;
|
|
931
|
-
}
|
|
932
|
-
get hasValueState() {
|
|
933
|
-
return this.state !== ValueState.o.None;
|
|
934
|
-
}
|
|
935
|
-
get _dialogStateIcon() {
|
|
936
|
-
return ICON_PER_STATE[this.state];
|
|
937
|
-
}
|
|
938
|
-
get _role() {
|
|
939
|
-
if (this.accessibleRole === PopupAccessibleRole$1.None) {
|
|
940
|
-
return undefined;
|
|
941
|
-
}
|
|
942
|
-
if (this.state === ValueState.o.Negative || this.state === ValueState.o.Critical) {
|
|
943
|
-
return toLowercaseEnumValue.n(PopupAccessibleRole$1.AlertDialog);
|
|
944
|
-
}
|
|
945
|
-
return toLowercaseEnumValue.n(this.accessibleRole);
|
|
946
|
-
}
|
|
947
|
-
_show() {
|
|
948
|
-
super._show();
|
|
949
|
-
this._center();
|
|
950
|
-
}
|
|
951
|
-
onBeforeRendering() {
|
|
952
|
-
super.onBeforeRendering();
|
|
953
|
-
this._isRTL = this.effectiveDir === "rtl";
|
|
954
|
-
}
|
|
955
|
-
onEnterDOM() {
|
|
956
|
-
super.onEnterDOM();
|
|
957
|
-
this._attachScreenResizeHandler();
|
|
958
|
-
this.addEventListener("dragstart", this._dragStartHandler);
|
|
959
|
-
}
|
|
960
|
-
onExitDOM() {
|
|
961
|
-
super.onExitDOM();
|
|
962
|
-
this._detachScreenResizeHandler();
|
|
963
|
-
this.removeEventListener("dragstart", this._dragStartHandler);
|
|
964
|
-
}
|
|
965
|
-
/**
|
|
966
|
-
* @override
|
|
967
|
-
*/
|
|
968
|
-
_resize() {
|
|
969
|
-
super._resize();
|
|
970
|
-
if (!this._draggedOrResized) {
|
|
971
|
-
this._center();
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
_screenResize() {
|
|
975
|
-
this._center();
|
|
976
|
-
}
|
|
977
|
-
_attachScreenResizeHandler() {
|
|
978
|
-
if (!this._screenResizeHandlerAttached) {
|
|
979
|
-
window.addEventListener("resize", this._screenResizeHandler);
|
|
980
|
-
this._screenResizeHandlerAttached = true;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
_detachScreenResizeHandler() {
|
|
984
|
-
if (this._screenResizeHandlerAttached) {
|
|
985
|
-
window.removeEventListener("resize", this._screenResizeHandler);
|
|
986
|
-
this._screenResizeHandlerAttached = false; // prevent dialog from repositioning during resizing
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
_center() {
|
|
990
|
-
const height = window.innerHeight - this.offsetHeight, width = window.innerWidth - this.offsetWidth;
|
|
991
|
-
Object.assign(this.style, {
|
|
992
|
-
top: `${Math.round(height / 2)}px`,
|
|
993
|
-
left: `${Math.round(width / 2)}px`,
|
|
994
|
-
});
|
|
995
|
-
}
|
|
996
|
-
/**
|
|
997
|
-
* Event handlers
|
|
998
|
-
*/
|
|
999
|
-
_onDragMouseDown(e) {
|
|
1000
|
-
// allow dragging only on the header
|
|
1001
|
-
if (!this._movable || !this.draggable || !Dialog_1._isHeader(e.target)) {
|
|
1002
|
-
return;
|
|
1003
|
-
}
|
|
1004
|
-
const { top, left, } = this.getBoundingClientRect();
|
|
1005
|
-
const { width, height, } = window.getComputedStyle(this);
|
|
1006
|
-
Object.assign(this.style, {
|
|
1007
|
-
top: `${top}px`,
|
|
1008
|
-
left: `${left}px`,
|
|
1009
|
-
width: `${Math.round(Number.parseFloat(width) * 100) / 100}px`,
|
|
1010
|
-
height: `${Math.round(Number.parseFloat(height) * 100) / 100}px`,
|
|
1011
|
-
});
|
|
1012
|
-
this._x = e.clientX;
|
|
1013
|
-
this._y = e.clientY;
|
|
1014
|
-
this._draggedOrResized = true;
|
|
1015
|
-
this._attachMouseDragHandlers();
|
|
1016
|
-
}
|
|
1017
|
-
_onDragMouseMove(e) {
|
|
1018
|
-
e.preventDefault();
|
|
1019
|
-
const { clientX, clientY } = e;
|
|
1020
|
-
const calcX = this._x - clientX;
|
|
1021
|
-
const calcY = this._y - clientY;
|
|
1022
|
-
const { left, top, } = this.getBoundingClientRect();
|
|
1023
|
-
Object.assign(this.style, {
|
|
1024
|
-
left: `${Math.floor(left - calcX)}px`,
|
|
1025
|
-
top: `${Math.floor(top - calcY)}px`,
|
|
1026
|
-
});
|
|
1027
|
-
this._x = clientX;
|
|
1028
|
-
this._y = clientY;
|
|
1029
|
-
}
|
|
1030
|
-
_onDragMouseUp() {
|
|
1031
|
-
delete this._x;
|
|
1032
|
-
delete this._y;
|
|
1033
|
-
this._detachMouseDragHandlers();
|
|
1034
|
-
}
|
|
1035
|
-
_onDragOrResizeKeyDown(e) {
|
|
1036
|
-
if (!this._movable || !Dialog_1._isHeader(e.target)) {
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
if (this.draggable && [webcomponentsBase.P, webcomponentsBase._, webcomponentsBase.D, webcomponentsBase.R].some(key => key(e))) {
|
|
1040
|
-
this._dragWithEvent(e);
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
if (this.resizable && [webcomponentsBase.O, webcomponentsBase.N, webcomponentsBase.h, webcomponentsBase.I].some(key => key(e))) {
|
|
1044
|
-
this._resizeWithEvent(e);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
_dragWithEvent(e) {
|
|
1048
|
-
const { top, left, width, height, } = this.getBoundingClientRect();
|
|
1049
|
-
let newPos = 0;
|
|
1050
|
-
let posDirection = "top";
|
|
1051
|
-
switch (true) {
|
|
1052
|
-
case webcomponentsBase.P(e):
|
|
1053
|
-
newPos = top - STEP_SIZE;
|
|
1054
|
-
posDirection = "top";
|
|
1055
|
-
break;
|
|
1056
|
-
case webcomponentsBase._(e):
|
|
1057
|
-
newPos = top + STEP_SIZE;
|
|
1058
|
-
posDirection = "top";
|
|
1059
|
-
break;
|
|
1060
|
-
case webcomponentsBase.D(e):
|
|
1061
|
-
newPos = left - STEP_SIZE;
|
|
1062
|
-
posDirection = "left";
|
|
1063
|
-
break;
|
|
1064
|
-
case webcomponentsBase.R(e):
|
|
1065
|
-
newPos = left + STEP_SIZE;
|
|
1066
|
-
posDirection = "left";
|
|
1067
|
-
break;
|
|
1068
|
-
}
|
|
1069
|
-
newPos = m$1(newPos, 0, posDirection === "left" ? window.innerWidth - width : window.innerHeight - height);
|
|
1070
|
-
this.style[posDirection] = `${newPos}px`;
|
|
1071
|
-
}
|
|
1072
|
-
_resizeWithEvent(e) {
|
|
1073
|
-
this._draggedOrResized = true;
|
|
1074
|
-
this.addEventListener("ui5-before-close", this._revertSize, { once: true });
|
|
1075
|
-
const { top, left } = this.getBoundingClientRect(), style = window.getComputedStyle(this), minWidth = Number.parseFloat(style.minWidth), maxWidth = window.innerWidth - left, maxHeight = window.innerHeight - top;
|
|
1076
|
-
let width = Number.parseFloat(style.width), height = Number.parseFloat(style.height);
|
|
1077
|
-
switch (true) {
|
|
1078
|
-
case webcomponentsBase.O(e):
|
|
1079
|
-
height -= STEP_SIZE;
|
|
1080
|
-
break;
|
|
1081
|
-
case webcomponentsBase.N(e):
|
|
1082
|
-
height += STEP_SIZE;
|
|
1083
|
-
break;
|
|
1084
|
-
case webcomponentsBase.h(e):
|
|
1085
|
-
width -= STEP_SIZE;
|
|
1086
|
-
break;
|
|
1087
|
-
case webcomponentsBase.I(e):
|
|
1088
|
-
width += STEP_SIZE;
|
|
1089
|
-
break;
|
|
1090
|
-
}
|
|
1091
|
-
width = m$1(width, minWidth, maxWidth);
|
|
1092
|
-
height = m$1(height, this._minHeight, maxHeight);
|
|
1093
|
-
Object.assign(this.style, {
|
|
1094
|
-
width: `${width}px`,
|
|
1095
|
-
height: `${height}px`,
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
_attachMouseDragHandlers() {
|
|
1099
|
-
window.addEventListener("mousemove", this._dragMouseMoveHandler);
|
|
1100
|
-
window.addEventListener("mouseup", this._dragMouseUpHandler);
|
|
1101
|
-
}
|
|
1102
|
-
_detachMouseDragHandlers() {
|
|
1103
|
-
window.removeEventListener("mousemove", this._dragMouseMoveHandler);
|
|
1104
|
-
window.removeEventListener("mouseup", this._dragMouseUpHandler);
|
|
1105
|
-
}
|
|
1106
|
-
_onResizeMouseDown(e) {
|
|
1107
|
-
if (!this._movable || !this.resizable) {
|
|
1108
|
-
return;
|
|
1109
|
-
}
|
|
1110
|
-
e.preventDefault();
|
|
1111
|
-
const { top, left, } = this.getBoundingClientRect();
|
|
1112
|
-
const { width, height, minWidth, } = window.getComputedStyle(this);
|
|
1113
|
-
this._initialX = e.clientX;
|
|
1114
|
-
this._initialY = e.clientY;
|
|
1115
|
-
this._initialWidth = Number.parseFloat(width);
|
|
1116
|
-
this._initialHeight = Number.parseFloat(height);
|
|
1117
|
-
this._initialTop = top;
|
|
1118
|
-
this._initialLeft = left;
|
|
1119
|
-
this._minWidth = Number.parseFloat(minWidth);
|
|
1120
|
-
this._cachedMinHeight = this._minHeight;
|
|
1121
|
-
Object.assign(this.style, {
|
|
1122
|
-
top: `${top}px`,
|
|
1123
|
-
left: `${left}px`,
|
|
1124
|
-
});
|
|
1125
|
-
this._draggedOrResized = true;
|
|
1126
|
-
this._attachMouseResizeHandlers();
|
|
1127
|
-
}
|
|
1128
|
-
_onResizeMouseMove(e) {
|
|
1129
|
-
const { clientX, clientY } = e;
|
|
1130
|
-
let newWidth, newLeft;
|
|
1131
|
-
if (this._isRTL) {
|
|
1132
|
-
newWidth = m$1(this._initialWidth - (clientX - this._initialX), this._minWidth, this._initialLeft + this._initialWidth);
|
|
1133
|
-
// check if width is changed to avoid "left" jumping when max width is reached
|
|
1134
|
-
Object.assign(this.style, {
|
|
1135
|
-
width: `${newWidth}px`,
|
|
1136
|
-
});
|
|
1137
|
-
const deltaWidth = newWidth - this.getBoundingClientRect().width;
|
|
1138
|
-
const rightEdge = this._initialLeft + this._initialWidth + deltaWidth;
|
|
1139
|
-
newLeft = m$1(rightEdge - newWidth, 0, rightEdge - this._minWidth);
|
|
1140
|
-
}
|
|
1141
|
-
else {
|
|
1142
|
-
newWidth = m$1(this._initialWidth + (clientX - this._initialX), this._minWidth, window.innerWidth - this._initialLeft);
|
|
1143
|
-
}
|
|
1144
|
-
const newHeight = m$1(this._initialHeight + (clientY - this._initialY), this._cachedMinHeight, window.innerHeight - this._initialTop);
|
|
1145
|
-
Object.assign(this.style, {
|
|
1146
|
-
height: `${newHeight}px`,
|
|
1147
|
-
width: `${newWidth}px`,
|
|
1148
|
-
left: this._isRTL ? `${newLeft}px` : undefined,
|
|
1149
|
-
});
|
|
1150
|
-
}
|
|
1151
|
-
_onResizeMouseUp() {
|
|
1152
|
-
delete this._initialX;
|
|
1153
|
-
delete this._initialY;
|
|
1154
|
-
delete this._initialWidth;
|
|
1155
|
-
delete this._initialHeight;
|
|
1156
|
-
delete this._initialTop;
|
|
1157
|
-
delete this._initialLeft;
|
|
1158
|
-
delete this._minWidth;
|
|
1159
|
-
delete this._cachedMinHeight;
|
|
1160
|
-
this._detachMouseResizeHandlers();
|
|
1161
|
-
}
|
|
1162
|
-
_handleDragStart(e) {
|
|
1163
|
-
if (this.draggable) {
|
|
1164
|
-
e.preventDefault();
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
_attachMouseResizeHandlers() {
|
|
1168
|
-
window.addEventListener("mousemove", this._resizeMouseMoveHandler);
|
|
1169
|
-
window.addEventListener("mouseup", this._resizeMouseUpHandler);
|
|
1170
|
-
this.addEventListener("ui5-before-close", this._revertSize, { once: true });
|
|
1171
|
-
}
|
|
1172
|
-
_detachMouseResizeHandlers() {
|
|
1173
|
-
window.removeEventListener("mousemove", this._resizeMouseMoveHandler);
|
|
1174
|
-
window.removeEventListener("mouseup", this._resizeMouseUpHandler);
|
|
1175
|
-
}
|
|
1176
|
-
};
|
|
1177
|
-
__decorate$2([
|
|
1178
|
-
webcomponentsBase.s()
|
|
1179
|
-
], Dialog.prototype, "headerText", void 0);
|
|
1180
|
-
__decorate$2([
|
|
1181
|
-
webcomponentsBase.s({ type: Boolean })
|
|
1182
|
-
], Dialog.prototype, "stretch", void 0);
|
|
1183
|
-
__decorate$2([
|
|
1184
|
-
webcomponentsBase.s({ type: Boolean })
|
|
1185
|
-
], Dialog.prototype, "draggable", void 0);
|
|
1186
|
-
__decorate$2([
|
|
1187
|
-
webcomponentsBase.s({ type: Boolean })
|
|
1188
|
-
], Dialog.prototype, "resizable", void 0);
|
|
1189
|
-
__decorate$2([
|
|
1190
|
-
webcomponentsBase.s()
|
|
1191
|
-
], Dialog.prototype, "state", void 0);
|
|
1192
|
-
__decorate$2([
|
|
1193
|
-
webcomponentsBase.d()
|
|
1194
|
-
], Dialog.prototype, "header", void 0);
|
|
1195
|
-
__decorate$2([
|
|
1196
|
-
webcomponentsBase.d()
|
|
1197
|
-
], Dialog.prototype, "footer", void 0);
|
|
1198
|
-
__decorate$2([
|
|
1199
|
-
parametersBundle_css$1.i("sap/ushell/gen/ui5/webcomponents")
|
|
1200
|
-
], Dialog, "i18nBundle", void 0);
|
|
1201
|
-
Dialog = Dialog_1 = __decorate$2([
|
|
1202
|
-
webcomponentsBase.m({
|
|
1203
|
-
tag: "ui5-dialog",
|
|
1204
|
-
template: DialogTemplate,
|
|
1205
|
-
styles: [
|
|
1206
|
-
Popup$1.styles,
|
|
1207
|
-
PopupsCommonCss,
|
|
1208
|
-
dialogCSS,
|
|
1209
|
-
],
|
|
1210
|
-
})
|
|
1211
|
-
], Dialog);
|
|
1212
|
-
Dialog.define();
|
|
1213
|
-
var Dialog$1 = Dialog;
|
|
1214
|
-
|
|
1215
|
-
function ResponsivePopoverTemplate() {
|
|
1216
|
-
if (!this._isPhone) {
|
|
1217
|
-
return PopoverTemplate.call(this);
|
|
1218
|
-
}
|
|
1219
|
-
return (parametersBundle_css.jsxs(Dialog$1, { "root-element": true, accessibleName: this.accessibleName, accessibleNameRef: this.accessibleNameRef, accessibleDescription: this.accessibleDescription, accessibleDescriptionRef: this.accessibleDescriptionRef, accessibleRole: this.accessibleRole, stretch: true, preventInitialFocus: this.preventInitialFocus, preventFocusRestore: this.preventFocusRestore, initialFocus: this.initialFocus, onBeforeOpen: this._beforeDialogOpen, onOpen: this._afterDialogOpen, onBeforeClose: this._beforeDialogClose, onClose: this._afterDialogClose, exportparts: "content, header, footer", open: this.open, children: [!this._hideHeader && parametersBundle_css.jsx(parametersBundle_css.Fragment, { children: this.header.length ?
|
|
1220
|
-
parametersBundle_css.jsx("slot", { slot: "header", name: "header" })
|
|
1221
|
-
:
|
|
1222
|
-
parametersBundle_css.jsxs("div", { class: this.classes.header, slot: "header", children: [this.headerText &&
|
|
1223
|
-
parametersBundle_css.jsx(Title.Title, { level: "H1", wrappingType: "None", class: "ui5-popup-header-text ui5-responsive-popover-header-text", children: this.headerText }), !this._hideCloseButton &&
|
|
1224
|
-
parametersBundle_css.jsx(Button.Button, { icon: information.decline, design: "Transparent", accessibleName: this._closeDialogAriaLabel, onClick: this._dialogCloseButtonClick })] }) }), parametersBundle_css.jsx("slot", {}), parametersBundle_css.jsx("slot", { slot: "footer", name: "footer" })] }));
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* Popover placements.
|
|
1229
|
-
* @public
|
|
1230
|
-
*/
|
|
1231
|
-
var PopoverPlacement;
|
|
1232
|
-
(function (PopoverPlacement) {
|
|
1233
|
-
/**
|
|
1234
|
-
* Popover will be placed at the start of the reference element.
|
|
1235
|
-
* @public
|
|
1236
|
-
*/
|
|
1237
|
-
PopoverPlacement["Start"] = "Start";
|
|
1238
|
-
/**
|
|
1239
|
-
* Popover will be placed at the end of the reference element.
|
|
1240
|
-
* @public
|
|
1241
|
-
*/
|
|
1242
|
-
PopoverPlacement["End"] = "End";
|
|
1243
|
-
/**
|
|
1244
|
-
* Popover will be placed at the top of the reference element.
|
|
1245
|
-
* @public
|
|
1246
|
-
*/
|
|
1247
|
-
PopoverPlacement["Top"] = "Top";
|
|
1248
|
-
/**
|
|
1249
|
-
* Popover will be placed at the bottom of the reference element.
|
|
1250
|
-
* @public
|
|
1251
|
-
*/
|
|
1252
|
-
PopoverPlacement["Bottom"] = "Bottom";
|
|
1253
|
-
})(PopoverPlacement || (PopoverPlacement = {}));
|
|
1254
|
-
var PopoverPlacement$1 = PopoverPlacement;
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* Popover vertical align types.
|
|
1258
|
-
* @public
|
|
1259
|
-
*/
|
|
1260
|
-
var PopoverVerticalAlign;
|
|
1261
|
-
(function (PopoverVerticalAlign) {
|
|
1262
|
-
/**
|
|
1263
|
-
* @public
|
|
1264
|
-
*/
|
|
1265
|
-
PopoverVerticalAlign["Center"] = "Center";
|
|
1266
|
-
/**
|
|
1267
|
-
* Popover will be placed at the top of the reference control.
|
|
1268
|
-
* @public
|
|
1269
|
-
*/
|
|
1270
|
-
PopoverVerticalAlign["Top"] = "Top";
|
|
1271
|
-
/**
|
|
1272
|
-
* Popover will be placed at the bottom of the reference control.
|
|
1273
|
-
* @public
|
|
1274
|
-
*/
|
|
1275
|
-
PopoverVerticalAlign["Bottom"] = "Bottom";
|
|
1276
|
-
/**
|
|
1277
|
-
* Popover will be streched
|
|
1278
|
-
* @public
|
|
1279
|
-
*/
|
|
1280
|
-
PopoverVerticalAlign["Stretch"] = "Stretch";
|
|
1281
|
-
})(PopoverVerticalAlign || (PopoverVerticalAlign = {}));
|
|
1282
|
-
var PopoverVerticalAlign$1 = PopoverVerticalAlign;
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* Popover horizontal align types.
|
|
1286
|
-
* @public
|
|
1287
|
-
*/
|
|
1288
|
-
var PopoverHorizontalAlign;
|
|
1289
|
-
(function (PopoverHorizontalAlign) {
|
|
1290
|
-
/**
|
|
1291
|
-
* Popover is centered.
|
|
1292
|
-
* @public
|
|
1293
|
-
*/
|
|
1294
|
-
PopoverHorizontalAlign["Center"] = "Center";
|
|
1295
|
-
/**
|
|
1296
|
-
* Popover is aligned with the start of the target.
|
|
1297
|
-
* @public
|
|
1298
|
-
*/
|
|
1299
|
-
PopoverHorizontalAlign["Start"] = "Start";
|
|
1300
|
-
/**
|
|
1301
|
-
* Popover is aligned with the end of the target.
|
|
1302
|
-
* @public
|
|
1303
|
-
*/
|
|
1304
|
-
PopoverHorizontalAlign["End"] = "End";
|
|
1305
|
-
/**
|
|
1306
|
-
* Popover is stretched.
|
|
1307
|
-
* @public
|
|
1308
|
-
*/
|
|
1309
|
-
PopoverHorizontalAlign["Stretch"] = "Stretch";
|
|
1310
|
-
})(PopoverHorizontalAlign || (PopoverHorizontalAlign = {}));
|
|
1311
|
-
var PopoverHorizontalAlign$1 = PopoverHorizontalAlign;
|
|
1312
|
-
|
|
1313
|
-
const e=t=>t.parentElement?t.parentElement:t.parentNode.host;
|
|
1314
|
-
|
|
1315
|
-
let updateInterval;
|
|
1316
|
-
const intervalTimeout = 300;
|
|
1317
|
-
const openedRegistry = [];
|
|
1318
|
-
const repositionPopovers = () => {
|
|
1319
|
-
openedRegistry.forEach(popover => {
|
|
1320
|
-
popover.instance.reposition();
|
|
1321
|
-
});
|
|
1322
|
-
};
|
|
1323
|
-
const closePopoversIfLostFocus = () => {
|
|
1324
|
-
let activeElement = webcomponentsBase.t();
|
|
1325
|
-
if (activeElement.tagName === "IFRAME") {
|
|
1326
|
-
getRegistry().reverse().forEach(popup => {
|
|
1327
|
-
const popover = popup.instance;
|
|
1328
|
-
const opener = popover.getOpenerHTMLElement(popover.opener);
|
|
1329
|
-
while (activeElement) {
|
|
1330
|
-
if (activeElement === opener) {
|
|
1331
|
-
return;
|
|
1332
|
-
}
|
|
1333
|
-
activeElement = e(activeElement);
|
|
1334
|
-
}
|
|
1335
|
-
popover.closePopup(false, false, true);
|
|
1336
|
-
});
|
|
1337
|
-
}
|
|
1338
|
-
};
|
|
1339
|
-
const runUpdateInterval = () => {
|
|
1340
|
-
updateInterval = setInterval(() => {
|
|
1341
|
-
repositionPopovers();
|
|
1342
|
-
closePopoversIfLostFocus();
|
|
1343
|
-
}, intervalTimeout);
|
|
1344
|
-
};
|
|
1345
|
-
const stopUpdateInterval = () => {
|
|
1346
|
-
clearInterval(updateInterval);
|
|
1347
|
-
};
|
|
1348
|
-
const attachGlobalScrollHandler = () => {
|
|
1349
|
-
document.addEventListener("scroll", repositionPopovers, { capture: true });
|
|
1350
|
-
};
|
|
1351
|
-
const detachGlobalScrollHandler = () => {
|
|
1352
|
-
document.removeEventListener("scroll", repositionPopovers, { capture: true });
|
|
1353
|
-
};
|
|
1354
|
-
const attachScrollHandler = (popover) => {
|
|
1355
|
-
popover && popover.shadowRoot.addEventListener("scroll", repositionPopovers, { capture: true });
|
|
1356
|
-
};
|
|
1357
|
-
const detachScrollHandler = (popover) => {
|
|
1358
|
-
popover && popover.shadowRoot.removeEventListener("scroll", repositionPopovers, { capture: true });
|
|
1359
|
-
};
|
|
1360
|
-
const attachGlobalClickHandler = () => {
|
|
1361
|
-
document.addEventListener("mousedown", clickHandler, { capture: true });
|
|
1362
|
-
};
|
|
1363
|
-
const detachGlobalClickHandler = () => {
|
|
1364
|
-
document.removeEventListener("mousedown", clickHandler, { capture: true });
|
|
1365
|
-
};
|
|
1366
|
-
const clickHandler = (event) => {
|
|
1367
|
-
const openedPopups = getOpenedPopups();
|
|
1368
|
-
if (openedPopups.length === 0) {
|
|
1369
|
-
return;
|
|
1370
|
-
}
|
|
1371
|
-
const isTopPopupPopover = instanceOfPopover(openedPopups[openedPopups.length - 1].instance);
|
|
1372
|
-
if (!isTopPopupPopover) {
|
|
1373
|
-
return;
|
|
1374
|
-
}
|
|
1375
|
-
// loop all open popovers
|
|
1376
|
-
for (let i = (openedPopups.length - 1); i !== -1; i--) {
|
|
1377
|
-
const popup = openedPopups[i].instance;
|
|
1378
|
-
// if popup is modal, opener is clicked, popup is dialog skip closing
|
|
1379
|
-
if (popup.isModal || popup.isOpenerClicked(event)) {
|
|
1380
|
-
return;
|
|
1381
|
-
}
|
|
1382
|
-
if (f(event, popup.getBoundingClientRect())) {
|
|
1383
|
-
break;
|
|
1384
|
-
}
|
|
1385
|
-
popup.closePopup();
|
|
1386
|
-
}
|
|
1387
|
-
};
|
|
1388
|
-
const addOpenedPopover = (instance) => {
|
|
1389
|
-
const parentPopovers = getParentPopoversIfNested(instance);
|
|
1390
|
-
addOpenedPopup(instance, parentPopovers);
|
|
1391
|
-
openedRegistry.push({
|
|
1392
|
-
instance,
|
|
1393
|
-
parentPopovers,
|
|
1394
|
-
});
|
|
1395
|
-
attachScrollHandler(instance);
|
|
1396
|
-
if (openedRegistry.length === 1) {
|
|
1397
|
-
attachGlobalScrollHandler();
|
|
1398
|
-
attachGlobalClickHandler();
|
|
1399
|
-
runUpdateInterval();
|
|
1400
|
-
}
|
|
1401
|
-
};
|
|
1402
|
-
const removeOpenedPopover = (instance) => {
|
|
1403
|
-
const popoversToClose = [instance];
|
|
1404
|
-
for (let i = 0; i < openedRegistry.length; i++) {
|
|
1405
|
-
const indexOfCurrentInstance = openedRegistry[i].parentPopovers.indexOf(instance);
|
|
1406
|
-
if (openedRegistry[i].parentPopovers.length > 0 && indexOfCurrentInstance > -1) {
|
|
1407
|
-
popoversToClose.push(openedRegistry[i].instance);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
for (let i = popoversToClose.length - 1; i >= 0; i--) {
|
|
1411
|
-
for (let j = 0; j < openedRegistry.length; j++) {
|
|
1412
|
-
let indexOfItemToRemove = -1;
|
|
1413
|
-
if (popoversToClose[i] === openedRegistry[j].instance) {
|
|
1414
|
-
indexOfItemToRemove = j;
|
|
1415
|
-
}
|
|
1416
|
-
if (indexOfItemToRemove >= 0) {
|
|
1417
|
-
removeOpenedPopup(openedRegistry[indexOfItemToRemove].instance);
|
|
1418
|
-
detachScrollHandler(openedRegistry[indexOfItemToRemove].instance);
|
|
1419
|
-
const itemToClose = openedRegistry.splice(indexOfItemToRemove, 1);
|
|
1420
|
-
itemToClose[0].instance.closePopup(false, true);
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
if (!openedRegistry.length) {
|
|
1425
|
-
detachGlobalScrollHandler();
|
|
1426
|
-
detachGlobalClickHandler();
|
|
1427
|
-
stopUpdateInterval();
|
|
1428
|
-
}
|
|
1429
|
-
};
|
|
1430
|
-
const getRegistry = () => {
|
|
1431
|
-
return openedRegistry;
|
|
1432
|
-
};
|
|
1433
|
-
const getParentPopoversIfNested = (instance) => {
|
|
1434
|
-
let currentElement = instance.parentNode;
|
|
1435
|
-
const parentPopovers = [];
|
|
1436
|
-
while (currentElement && currentElement.parentNode) {
|
|
1437
|
-
for (let i = 0; i < openedRegistry.length; i++) {
|
|
1438
|
-
if (currentElement === openedRegistry[i].instance) {
|
|
1439
|
-
parentPopovers.push(currentElement);
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
currentElement = currentElement.parentNode;
|
|
1443
|
-
}
|
|
1444
|
-
return parentPopovers;
|
|
1445
|
-
};
|
|
1446
|
-
|
|
1447
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
1448
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
1449
|
-
var PopoverCss = `:host{box-shadow:var(--_ui5-v2-15-0_popover_box_shadow);background-color:var(--_ui5-v2-15-0_popover_background);max-width:calc(100vw - (100vw - 100%) - 2 * var(--_ui5-v2-15-0_popup_viewport_margin))}:host([hide-arrow]){box-shadow:var(--_ui5-v2-15-0_popover_no_arrow_box_shadow)}:host([actual-placement="Bottom"]) .ui5-popover-arrow{left:calc(50% - .5625rem);top:-.5rem;height:.5rem}:host([actual-placement="Bottom"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_upward_arrow_margin)}:host([actual-placement="Start"]) .ui5-popover-arrow{top:calc(50% - .5625rem);right:-.5625rem;width:.5625rem}:host([actual-placement="Start"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_right_arrow_margin)}:host([actual-placement="Top"]) .ui5-popover-arrow{left:calc(50% - .5625rem);height:.5625rem;top:100%}:host([actual-placement="Top"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_downward_arrow_margin)}:host(:not([actual-placement])) .ui5-popover-arrow,:host([actual-placement="End"]) .ui5-popover-arrow{left:-.5625rem;top:calc(50% - .5625rem);width:.5625rem;height:1rem}:host(:not([actual-placement])) .ui5-popover-arrow:after,:host([actual-placement="End"]) .ui5-popover-arrow:after{margin:var(--_ui5-v2-15-0_popover_left_arrow_margin)}:host([hide-arrow]) .ui5-popover-arrow{display:none}.ui5-popover-root{min-width:6.25rem}.ui5-popover-arrow{pointer-events:none;display:block;width:1rem;height:1rem;position:absolute;overflow:hidden}.ui5-popover-arrow:after{content:"";display:block;width:.7rem;height:.7rem;background-color:var(--_ui5-v2-15-0_popover_background);box-shadow:var(--_ui5-v2-15-0_popover_box_shadow);transform:rotate(-45deg)}:host([modal])::backdrop{background-color:var(--_ui5-v2-15-0_popup_block_layer_background);opacity:var(--_ui5-v2-15-0_popup_block_layer_opacity)}:host([modal]) .ui5-block-layer{display:block}
|
|
1450
|
-
`;
|
|
1451
|
-
|
|
1452
|
-
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1453
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1454
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1455
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1456
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1457
|
-
};
|
|
1458
|
-
var Popover_1;
|
|
1459
|
-
const ARROW_SIZE = 8;
|
|
1460
|
-
/**
|
|
1461
|
-
* @class
|
|
1462
|
-
*
|
|
1463
|
-
* ### Overview
|
|
1464
|
-
*
|
|
1465
|
-
* The `ui5-popover` component displays additional information for an object
|
|
1466
|
-
* in a compact way and without leaving the page.
|
|
1467
|
-
* The Popover can contain various UI elements, such as fields, tables, images, and charts.
|
|
1468
|
-
* It can also include actions in the footer.
|
|
1469
|
-
*
|
|
1470
|
-
* ### Structure
|
|
1471
|
-
*
|
|
1472
|
-
* The popover has three main areas:
|
|
1473
|
-
*
|
|
1474
|
-
* - Header (optional)
|
|
1475
|
-
* - Content
|
|
1476
|
-
* - Footer (optional)
|
|
1477
|
-
*
|
|
1478
|
-
* **Note:** The `ui5-popover` is closed when the user clicks
|
|
1479
|
-
* or taps outside the popover
|
|
1480
|
-
* or selects an action within the popover. You can prevent this with the
|
|
1481
|
-
* `modal` property.
|
|
1482
|
-
*
|
|
1483
|
-
* ### ES6 Module Import
|
|
1484
|
-
*
|
|
1485
|
-
* `import "sap/ushell/gen/ui5/webcomponents/dist/Popover.js";`
|
|
1486
|
-
*
|
|
1487
|
-
* @constructor
|
|
1488
|
-
* @extends Popup
|
|
1489
|
-
* @since 1.0.0-rc.6
|
|
1490
|
-
* @public
|
|
1491
|
-
* @csspart header - Used to style the header of the component
|
|
1492
|
-
* @csspart content - Used to style the content of the component
|
|
1493
|
-
* @csspart footer - Used to style the footer of the component
|
|
1494
|
-
*/
|
|
1495
|
-
let Popover = Popover_1 = class Popover extends Popup$1 {
|
|
1496
|
-
static get VIEWPORT_MARGIN() {
|
|
1497
|
-
return 10; // px
|
|
1498
|
-
}
|
|
1499
|
-
constructor() {
|
|
1500
|
-
super();
|
|
1501
|
-
/**
|
|
1502
|
-
* Determines on which side the component is placed at.
|
|
1503
|
-
* @default "End"
|
|
1504
|
-
* @public
|
|
1505
|
-
*/
|
|
1506
|
-
this.placement = "End";
|
|
1507
|
-
/**
|
|
1508
|
-
* Determines the horizontal alignment of the component.
|
|
1509
|
-
* @default "Center"
|
|
1510
|
-
* @public
|
|
1511
|
-
*/
|
|
1512
|
-
this.horizontalAlign = "Center";
|
|
1513
|
-
/**
|
|
1514
|
-
* Determines the vertical alignment of the component.
|
|
1515
|
-
* @default "Center"
|
|
1516
|
-
* @public
|
|
1517
|
-
*/
|
|
1518
|
-
this.verticalAlign = "Center";
|
|
1519
|
-
/**
|
|
1520
|
-
* Defines whether the component should close when
|
|
1521
|
-
* clicking/tapping outside of the popover.
|
|
1522
|
-
* If enabled, it blocks any interaction with the background.
|
|
1523
|
-
* @default false
|
|
1524
|
-
* @public
|
|
1525
|
-
*/
|
|
1526
|
-
this.modal = false;
|
|
1527
|
-
/**
|
|
1528
|
-
* Determines whether the component arrow is hidden.
|
|
1529
|
-
* @default false
|
|
1530
|
-
* @public
|
|
1531
|
-
* @since 1.0.0-rc.15
|
|
1532
|
-
*/
|
|
1533
|
-
this.hideArrow = false;
|
|
1534
|
-
/**
|
|
1535
|
-
* Determines if there is no enough space, the component can be placed
|
|
1536
|
-
* over the target.
|
|
1537
|
-
* @default false
|
|
1538
|
-
* @public
|
|
1539
|
-
*/
|
|
1540
|
-
this.allowTargetOverlap = false;
|
|
1541
|
-
/**
|
|
1542
|
-
* Sets the X translation of the arrow
|
|
1543
|
-
* @private
|
|
1544
|
-
*/
|
|
1545
|
-
this.arrowTranslateX = 0;
|
|
1546
|
-
/**
|
|
1547
|
-
* Sets the Y translation of the arrow
|
|
1548
|
-
* @private
|
|
1549
|
-
*/
|
|
1550
|
-
this.arrowTranslateY = 0;
|
|
1551
|
-
/**
|
|
1552
|
-
* Returns the calculated placement depending on the free space
|
|
1553
|
-
* @private
|
|
1554
|
-
*/
|
|
1555
|
-
this.actualPlacement = "End";
|
|
1556
|
-
}
|
|
1557
|
-
/**
|
|
1558
|
-
* Defines the ID or DOM Reference of the element at which the popover is shown.
|
|
1559
|
-
* When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.
|
|
1560
|
-
* You can only set the `opener` attribute to a DOM Reference when using JavaScript.
|
|
1561
|
-
* @public
|
|
1562
|
-
* @default undefined
|
|
1563
|
-
* @since 1.2.0
|
|
1564
|
-
*/
|
|
1565
|
-
set opener(value) {
|
|
1566
|
-
if (this._opener === value) {
|
|
1567
|
-
return;
|
|
1568
|
-
}
|
|
1569
|
-
this._opener = value;
|
|
1570
|
-
if (value && this.open) {
|
|
1571
|
-
this.openPopup();
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
get opener() {
|
|
1575
|
-
return this._opener;
|
|
1576
|
-
}
|
|
1577
|
-
async openPopup() {
|
|
1578
|
-
if (this._opened) {
|
|
1579
|
-
return;
|
|
1580
|
-
}
|
|
1581
|
-
const opener = this.getOpenerHTMLElement(this.opener);
|
|
1582
|
-
if (!opener) {
|
|
1583
|
-
return;
|
|
1584
|
-
}
|
|
1585
|
-
if (!opener || this.isOpenerOutsideViewport(opener.getBoundingClientRect())) {
|
|
1586
|
-
await Icons.f$1();
|
|
1587
|
-
this.open = false;
|
|
1588
|
-
this.fireDecoratorEvent("close");
|
|
1589
|
-
return;
|
|
1590
|
-
}
|
|
1591
|
-
this._openerRect = opener.getBoundingClientRect();
|
|
1592
|
-
await super.openPopup();
|
|
1593
|
-
}
|
|
1594
|
-
isOpenerClicked(e) {
|
|
1595
|
-
const target = e.target;
|
|
1596
|
-
const opener = this.getOpenerHTMLElement(this.opener);
|
|
1597
|
-
if (!opener) {
|
|
1598
|
-
return false;
|
|
1599
|
-
}
|
|
1600
|
-
if (target === opener) {
|
|
1601
|
-
return true;
|
|
1602
|
-
}
|
|
1603
|
-
if (this._isUI5AbstractElement(target) && target.getFocusDomRef() === opener) {
|
|
1604
|
-
return true;
|
|
1605
|
-
}
|
|
1606
|
-
return e.composedPath().indexOf(opener) > -1;
|
|
1607
|
-
}
|
|
1608
|
-
/**
|
|
1609
|
-
* Override for the _addOpenedPopup hook, which would otherwise just call addOpenedPopup(this)
|
|
1610
|
-
* @private
|
|
1611
|
-
*/
|
|
1612
|
-
_addOpenedPopup() {
|
|
1613
|
-
addOpenedPopover(this);
|
|
1614
|
-
}
|
|
1615
|
-
/**
|
|
1616
|
-
* Override for the _removeOpenedPopup hook, which would otherwise just call removeOpenedPopup(this)
|
|
1617
|
-
* @private
|
|
1618
|
-
*/
|
|
1619
|
-
_removeOpenedPopup() {
|
|
1620
|
-
removeOpenedPopover(this);
|
|
1621
|
-
}
|
|
1622
|
-
getOpenerHTMLElement(opener) {
|
|
1623
|
-
if (opener === undefined || opener === null) {
|
|
1624
|
-
return opener;
|
|
1625
|
-
}
|
|
1626
|
-
if (opener instanceof HTMLElement) {
|
|
1627
|
-
return this._isUI5AbstractElement(opener) ? opener.getFocusDomRef() : opener;
|
|
1628
|
-
}
|
|
1629
|
-
let rootNode = this.getRootNode();
|
|
1630
|
-
if (rootNode === this) {
|
|
1631
|
-
rootNode = document;
|
|
1632
|
-
}
|
|
1633
|
-
let openerHTMLElement = rootNode.getElementById(opener);
|
|
1634
|
-
if (rootNode instanceof ShadowRoot && !openerHTMLElement) {
|
|
1635
|
-
openerHTMLElement = document.getElementById(opener);
|
|
1636
|
-
}
|
|
1637
|
-
if (openerHTMLElement) {
|
|
1638
|
-
return this._isUI5AbstractElement(openerHTMLElement) ? openerHTMLElement.getFocusDomRef() : openerHTMLElement;
|
|
1639
|
-
}
|
|
1640
|
-
return openerHTMLElement;
|
|
1641
|
-
}
|
|
1642
|
-
shouldCloseDueToOverflow(placement, openerRect) {
|
|
1643
|
-
const threshold = 32;
|
|
1644
|
-
const limits = {
|
|
1645
|
-
"Start": openerRect.right,
|
|
1646
|
-
"End": openerRect.left,
|
|
1647
|
-
"Top": openerRect.top,
|
|
1648
|
-
"Bottom": openerRect.bottom,
|
|
1649
|
-
};
|
|
1650
|
-
const opener = this.getOpenerHTMLElement(this.opener);
|
|
1651
|
-
const closedPopupParent = i(opener);
|
|
1652
|
-
let overflowsBottom = false;
|
|
1653
|
-
let overflowsTop = false;
|
|
1654
|
-
if (closedPopupParent instanceof Popover_1) {
|
|
1655
|
-
const contentRect = closedPopupParent.getBoundingClientRect();
|
|
1656
|
-
overflowsBottom = openerRect.top > (contentRect.top + contentRect.height);
|
|
1657
|
-
overflowsTop = (openerRect.top + openerRect.height) < contentRect.top;
|
|
1658
|
-
}
|
|
1659
|
-
return (limits[placement] < 0 || (limits[placement] + threshold > closedPopupParent.innerHeight)) || overflowsBottom || overflowsTop;
|
|
1660
|
-
}
|
|
1661
|
-
shouldCloseDueToNoOpener(openerRect) {
|
|
1662
|
-
return openerRect.top === 0
|
|
1663
|
-
&& openerRect.bottom === 0
|
|
1664
|
-
&& openerRect.left === 0
|
|
1665
|
-
&& openerRect.right === 0;
|
|
1666
|
-
}
|
|
1667
|
-
isOpenerOutsideViewport(openerRect) {
|
|
1668
|
-
return openerRect.bottom < 0
|
|
1669
|
-
|| openerRect.top > window.innerHeight
|
|
1670
|
-
|| openerRect.right < 0
|
|
1671
|
-
|| openerRect.left > window.innerWidth;
|
|
1672
|
-
}
|
|
1673
|
-
/**
|
|
1674
|
-
* @override
|
|
1675
|
-
*/
|
|
1676
|
-
_resize() {
|
|
1677
|
-
super._resize();
|
|
1678
|
-
if (this.open) {
|
|
1679
|
-
this.reposition();
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
reposition() {
|
|
1683
|
-
this._show();
|
|
1684
|
-
}
|
|
1685
|
-
async _show() {
|
|
1686
|
-
super._show();
|
|
1687
|
-
const opener = this.getOpenerHTMLElement(this.opener);
|
|
1688
|
-
if (!opener) {
|
|
1689
|
-
Object.assign(this.style, {
|
|
1690
|
-
top: `0px`,
|
|
1691
|
-
left: `0px`,
|
|
1692
|
-
});
|
|
1693
|
-
return;
|
|
1694
|
-
}
|
|
1695
|
-
if (opener && webcomponentsBase.v(opener) && !opener.getDomRef()) {
|
|
1696
|
-
return;
|
|
1697
|
-
}
|
|
1698
|
-
if (!this._opened) {
|
|
1699
|
-
this._showOutsideViewport();
|
|
1700
|
-
}
|
|
1701
|
-
const popoverSize = this.getPopoverSize();
|
|
1702
|
-
let placement;
|
|
1703
|
-
if (popoverSize.width === 0 || popoverSize.height === 0) {
|
|
1704
|
-
// size can not be determined properly at this point, popover will be shown with the next reposition
|
|
1705
|
-
return;
|
|
1706
|
-
}
|
|
1707
|
-
if (this.open) {
|
|
1708
|
-
// update opener rect if it was changed during the popover being opened
|
|
1709
|
-
this._openerRect = opener.getBoundingClientRect();
|
|
1710
|
-
}
|
|
1711
|
-
if (this._oldPlacement && this.shouldCloseDueToNoOpener(this._openerRect) && this.isFocusWithin()) {
|
|
1712
|
-
// reuse the old placement as the opener is not available,
|
|
1713
|
-
// but keep the popover open as the focus is within
|
|
1714
|
-
placement = this._oldPlacement;
|
|
1715
|
-
}
|
|
1716
|
-
else {
|
|
1717
|
-
placement = this.calcPlacement(this._openerRect, popoverSize);
|
|
1718
|
-
}
|
|
1719
|
-
if (this._preventRepositionAndClose || this.isOpenerOutsideViewport(this._openerRect)) {
|
|
1720
|
-
await this._waitForDomRef();
|
|
1721
|
-
return this.closePopup();
|
|
1722
|
-
}
|
|
1723
|
-
this._oldPlacement = placement;
|
|
1724
|
-
this.actualPlacement = placement.placement;
|
|
1725
|
-
let left = m$1(this._left, Popover_1.VIEWPORT_MARGIN, document.documentElement.clientWidth - popoverSize.width - Popover_1.VIEWPORT_MARGIN);
|
|
1726
|
-
if (this.actualPlacement === PopoverPlacement$1.End) {
|
|
1727
|
-
left = Math.max(left, this._left);
|
|
1728
|
-
}
|
|
1729
|
-
let top = m$1(this._top, Popover_1.VIEWPORT_MARGIN, document.documentElement.clientHeight - popoverSize.height - Popover_1.VIEWPORT_MARGIN);
|
|
1730
|
-
if (this.actualPlacement === PopoverPlacement$1.Bottom) {
|
|
1731
|
-
top = Math.max(top, this._top);
|
|
1732
|
-
}
|
|
1733
|
-
this.arrowTranslateX = placement.arrow.x;
|
|
1734
|
-
this.arrowTranslateY = placement.arrow.y;
|
|
1735
|
-
top = this._adjustForIOSKeyboard(top);
|
|
1736
|
-
Object.assign(this.style, {
|
|
1737
|
-
top: `${top}px`,
|
|
1738
|
-
left: `${left}px`,
|
|
1739
|
-
});
|
|
1740
|
-
if (this.horizontalAlign === PopoverHorizontalAlign$1.Stretch && this._width) {
|
|
1741
|
-
this.style.width = this._width;
|
|
1742
|
-
}
|
|
1743
|
-
if (this.verticalAlign === PopoverVerticalAlign$1.Stretch && this._height) {
|
|
1744
|
-
this.style.height = this._height;
|
|
1745
|
-
}
|
|
1746
|
-
}
|
|
1747
|
-
/**
|
|
1748
|
-
* Adjust the desired top position to compensate for shift of the screen
|
|
1749
|
-
* caused by opened keyboard on iOS which affects all elements with position:fixed.
|
|
1750
|
-
* @private
|
|
1751
|
-
* @param top The target top in px.
|
|
1752
|
-
* @returns The adjusted top in px.
|
|
1753
|
-
*/
|
|
1754
|
-
_adjustForIOSKeyboard(top) {
|
|
1755
|
-
if (!Icons.w()) {
|
|
1756
|
-
return top;
|
|
1757
|
-
}
|
|
1758
|
-
const actualTop = Math.ceil(this.getBoundingClientRect().top);
|
|
1759
|
-
return top + (Number.parseInt(this.style.top || "0") - actualTop);
|
|
1760
|
-
}
|
|
1761
|
-
getPopoverSize(calcScrollHeight = false) {
|
|
1762
|
-
const rect = this.getBoundingClientRect();
|
|
1763
|
-
const width = rect.width;
|
|
1764
|
-
let height;
|
|
1765
|
-
const domRef = this.getDomRef();
|
|
1766
|
-
if (calcScrollHeight && domRef) {
|
|
1767
|
-
const header = domRef.querySelector(".ui5-popup-header-root");
|
|
1768
|
-
const content = domRef.querySelector(".ui5-popup-content");
|
|
1769
|
-
const footer = domRef.querySelector(".ui5-popup-footer-root");
|
|
1770
|
-
height = content?.scrollHeight || 0;
|
|
1771
|
-
height += header?.scrollHeight || 0;
|
|
1772
|
-
height += footer?.scrollHeight || 0;
|
|
1773
|
-
}
|
|
1774
|
-
else {
|
|
1775
|
-
height = rect.height;
|
|
1776
|
-
}
|
|
1777
|
-
return { width, height };
|
|
1778
|
-
}
|
|
1779
|
-
_showOutsideViewport() {
|
|
1780
|
-
Object.assign(this.style, {
|
|
1781
|
-
top: "-10000px",
|
|
1782
|
-
left: "-10000px",
|
|
1783
|
-
});
|
|
1784
|
-
}
|
|
1785
|
-
_isUI5AbstractElement(el) {
|
|
1786
|
-
return webcomponentsBase.v(el) && el.isUI5AbstractElement;
|
|
1787
|
-
}
|
|
1788
|
-
get arrowDOM() {
|
|
1789
|
-
return this.shadowRoot.querySelector(".ui5-popover-arrow");
|
|
1790
|
-
}
|
|
1791
|
-
/**
|
|
1792
|
-
* @protected
|
|
1793
|
-
*/
|
|
1794
|
-
focusOpener() {
|
|
1795
|
-
this.getOpenerHTMLElement(this.opener)?.focus();
|
|
1796
|
-
}
|
|
1797
|
-
/**
|
|
1798
|
-
* @private
|
|
1799
|
-
*/
|
|
1800
|
-
calcPlacement(targetRect, popoverSize) {
|
|
1801
|
-
let left = Popover_1.VIEWPORT_MARGIN;
|
|
1802
|
-
let top = 0;
|
|
1803
|
-
const allowTargetOverlap = this.allowTargetOverlap;
|
|
1804
|
-
const clientWidth = document.documentElement.clientWidth;
|
|
1805
|
-
const clientHeight = document.documentElement.clientHeight;
|
|
1806
|
-
let maxHeight = clientHeight;
|
|
1807
|
-
let maxWidth = clientWidth;
|
|
1808
|
-
const placement = this.getActualPlacement(targetRect);
|
|
1809
|
-
this._preventRepositionAndClose = this.shouldCloseDueToNoOpener(targetRect) || this.shouldCloseDueToOverflow(placement, targetRect);
|
|
1810
|
-
const isVertical = placement === PopoverPlacement$1.Top
|
|
1811
|
-
|| placement === PopoverPlacement$1.Bottom;
|
|
1812
|
-
if (this.horizontalAlign === PopoverHorizontalAlign$1.Stretch && isVertical) {
|
|
1813
|
-
popoverSize.width = targetRect.width;
|
|
1814
|
-
this._width = `${targetRect.width}px`;
|
|
1815
|
-
}
|
|
1816
|
-
else if (this.verticalAlign === PopoverVerticalAlign$1.Stretch && !isVertical) {
|
|
1817
|
-
popoverSize.height = targetRect.height;
|
|
1818
|
-
this._height = `${targetRect.height}px`;
|
|
1819
|
-
}
|
|
1820
|
-
const arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;
|
|
1821
|
-
// calc popover positions
|
|
1822
|
-
switch (placement) {
|
|
1823
|
-
case PopoverPlacement$1.Top:
|
|
1824
|
-
left = this.getVerticalLeft(targetRect, popoverSize);
|
|
1825
|
-
top = Math.max(targetRect.top - popoverSize.height - arrowOffset, 0);
|
|
1826
|
-
if (!allowTargetOverlap) {
|
|
1827
|
-
maxHeight = targetRect.top - arrowOffset;
|
|
1828
|
-
}
|
|
1829
|
-
break;
|
|
1830
|
-
case PopoverPlacement$1.Bottom:
|
|
1831
|
-
left = this.getVerticalLeft(targetRect, popoverSize);
|
|
1832
|
-
top = targetRect.bottom + arrowOffset;
|
|
1833
|
-
if (allowTargetOverlap) {
|
|
1834
|
-
top = Math.max(Math.min(top, clientHeight - popoverSize.height), 0);
|
|
1835
|
-
}
|
|
1836
|
-
else {
|
|
1837
|
-
maxHeight = clientHeight - targetRect.bottom - arrowOffset;
|
|
1838
|
-
}
|
|
1839
|
-
break;
|
|
1840
|
-
case PopoverPlacement$1.Start:
|
|
1841
|
-
left = Math.max(targetRect.left - popoverSize.width - arrowOffset, 0);
|
|
1842
|
-
top = this.getHorizontalTop(targetRect, popoverSize);
|
|
1843
|
-
if (!allowTargetOverlap) {
|
|
1844
|
-
maxWidth = targetRect.left - arrowOffset;
|
|
1845
|
-
}
|
|
1846
|
-
break;
|
|
1847
|
-
case PopoverPlacement$1.End:
|
|
1848
|
-
left = targetRect.left + targetRect.width + arrowOffset;
|
|
1849
|
-
top = this.getHorizontalTop(targetRect, popoverSize);
|
|
1850
|
-
if (allowTargetOverlap) {
|
|
1851
|
-
left = Math.max(Math.min(left, clientWidth - popoverSize.width), 0);
|
|
1852
|
-
}
|
|
1853
|
-
else {
|
|
1854
|
-
maxWidth = clientWidth - targetRect.right - arrowOffset;
|
|
1855
|
-
}
|
|
1856
|
-
break;
|
|
1857
|
-
}
|
|
1858
|
-
// correct popover positions
|
|
1859
|
-
if (isVertical) {
|
|
1860
|
-
if (popoverSize.width > clientWidth || left < Popover_1.VIEWPORT_MARGIN) {
|
|
1861
|
-
left = Popover_1.VIEWPORT_MARGIN;
|
|
1862
|
-
}
|
|
1863
|
-
else if (left + popoverSize.width > clientWidth - Popover_1.VIEWPORT_MARGIN) {
|
|
1864
|
-
left = clientWidth - Popover_1.VIEWPORT_MARGIN - popoverSize.width;
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
else {
|
|
1868
|
-
if (popoverSize.height > clientHeight || top < Popover_1.VIEWPORT_MARGIN) { // eslint-disable-line
|
|
1869
|
-
top = Popover_1.VIEWPORT_MARGIN;
|
|
1870
|
-
}
|
|
1871
|
-
else if (top + popoverSize.height > clientHeight - Popover_1.VIEWPORT_MARGIN) {
|
|
1872
|
-
top = clientHeight - Popover_1.VIEWPORT_MARGIN - popoverSize.height;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
this._maxHeight = Math.round(maxHeight - Popover_1.VIEWPORT_MARGIN);
|
|
1876
|
-
this._maxWidth = Math.round(maxWidth - Popover_1.VIEWPORT_MARGIN);
|
|
1877
|
-
if (this._left === undefined || Math.abs(this._left - left) > 1.5) {
|
|
1878
|
-
this._left = Math.round(left);
|
|
1879
|
-
}
|
|
1880
|
-
if (this._top === undefined || Math.abs(this._top - top) > 1.5) {
|
|
1881
|
-
this._top = Math.round(top);
|
|
1882
|
-
}
|
|
1883
|
-
const borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));
|
|
1884
|
-
const arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);
|
|
1885
|
-
this._left += this.getRTLCorrectionLeft();
|
|
1886
|
-
return {
|
|
1887
|
-
arrow: arrowPos,
|
|
1888
|
-
top: this._top,
|
|
1889
|
-
left: this._left,
|
|
1890
|
-
placement,
|
|
1891
|
-
};
|
|
1892
|
-
}
|
|
1893
|
-
getRTLCorrectionLeft() {
|
|
1894
|
-
return parseFloat(window.getComputedStyle(this).left) - this.getBoundingClientRect().left;
|
|
1895
|
-
}
|
|
1896
|
-
/**
|
|
1897
|
-
* Calculates the position for the arrow.
|
|
1898
|
-
* @private
|
|
1899
|
-
* @param targetRect BoundingClientRect of the target element
|
|
1900
|
-
* @param popoverSize Width and height of the popover
|
|
1901
|
-
* @param left Left offset of the popover
|
|
1902
|
-
* @param top Top offset of the popover
|
|
1903
|
-
* @param isVertical If the popover is positioned vertically to the target element
|
|
1904
|
-
* @param borderRadius Value of the border-radius property
|
|
1905
|
-
* @returns Arrow's coordinates
|
|
1906
|
-
*/
|
|
1907
|
-
getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius) {
|
|
1908
|
-
const horizontalAlign = this._actualHorizontalAlign;
|
|
1909
|
-
let arrowXCentered = horizontalAlign === PopoverHorizontalAlign$1.Center || horizontalAlign === PopoverHorizontalAlign$1.Stretch;
|
|
1910
|
-
if (horizontalAlign === PopoverHorizontalAlign$1.End && left <= targetRect.left) {
|
|
1911
|
-
arrowXCentered = true;
|
|
1912
|
-
}
|
|
1913
|
-
if (horizontalAlign === PopoverHorizontalAlign$1.Start && left + popoverSize.width >= targetRect.left + targetRect.width) {
|
|
1914
|
-
arrowXCentered = true;
|
|
1915
|
-
}
|
|
1916
|
-
let arrowTranslateX = 0;
|
|
1917
|
-
if (isVertical && arrowXCentered) {
|
|
1918
|
-
arrowTranslateX = targetRect.left + targetRect.width / 2 - left - popoverSize.width / 2;
|
|
1919
|
-
}
|
|
1920
|
-
let arrowTranslateY = 0;
|
|
1921
|
-
if (!isVertical) {
|
|
1922
|
-
arrowTranslateY = targetRect.top + targetRect.height / 2 - top - popoverSize.height / 2;
|
|
1923
|
-
}
|
|
1924
|
-
// Restricts the arrow's translate value along each dimension,
|
|
1925
|
-
// so that the arrow does not clip over the popover's rounded borders.
|
|
1926
|
-
const safeRangeForArrowY = popoverSize.height / 2 - borderRadius - ARROW_SIZE / 2 - 2;
|
|
1927
|
-
arrowTranslateY = m$1(arrowTranslateY, -safeRangeForArrowY, safeRangeForArrowY);
|
|
1928
|
-
const safeRangeForArrowX = popoverSize.width / 2 - borderRadius - ARROW_SIZE / 2 - 2;
|
|
1929
|
-
arrowTranslateX = m$1(arrowTranslateX, -safeRangeForArrowX, safeRangeForArrowX);
|
|
1930
|
-
return {
|
|
1931
|
-
x: Math.round(arrowTranslateX),
|
|
1932
|
-
y: Math.round(arrowTranslateY),
|
|
1933
|
-
};
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* Fallbacks to new placement, prioritizing `Left` and `Right` placements.
|
|
1937
|
-
* @private
|
|
1938
|
-
*/
|
|
1939
|
-
fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) {
|
|
1940
|
-
if (targetRect.left > popoverSize.width) {
|
|
1941
|
-
return PopoverPlacement$1.Start;
|
|
1942
|
-
}
|
|
1943
|
-
if (clientWidth - targetRect.right > targetRect.left) {
|
|
1944
|
-
return PopoverPlacement$1.End;
|
|
1945
|
-
}
|
|
1946
|
-
if (clientHeight - targetRect.bottom > popoverSize.height) {
|
|
1947
|
-
return PopoverPlacement$1.Bottom;
|
|
1948
|
-
}
|
|
1949
|
-
if (clientHeight - targetRect.bottom < targetRect.top) {
|
|
1950
|
-
return PopoverPlacement$1.Top;
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
getActualPlacement(targetRect) {
|
|
1954
|
-
const placement = this.placement;
|
|
1955
|
-
let actualPlacement = placement;
|
|
1956
|
-
const isVertical = placement === PopoverPlacement$1.Top
|
|
1957
|
-
|| placement === PopoverPlacement$1.Bottom;
|
|
1958
|
-
const popoverSize = this.getPopoverSize(!this.allowTargetOverlap);
|
|
1959
|
-
const clientWidth = document.documentElement.clientWidth;
|
|
1960
|
-
let clientHeight = document.documentElement.clientHeight;
|
|
1961
|
-
let popoverHeight = popoverSize.height;
|
|
1962
|
-
if (isVertical) {
|
|
1963
|
-
popoverHeight += this.hideArrow ? 0 : ARROW_SIZE;
|
|
1964
|
-
clientHeight -= Popover_1.VIEWPORT_MARGIN;
|
|
1965
|
-
}
|
|
1966
|
-
switch (placement) {
|
|
1967
|
-
case PopoverPlacement$1.Top:
|
|
1968
|
-
if (targetRect.top < popoverHeight
|
|
1969
|
-
&& targetRect.top < clientHeight - targetRect.bottom) {
|
|
1970
|
-
actualPlacement = PopoverPlacement$1.Bottom;
|
|
1971
|
-
}
|
|
1972
|
-
break;
|
|
1973
|
-
case PopoverPlacement$1.Bottom:
|
|
1974
|
-
if (clientHeight - targetRect.bottom < popoverHeight
|
|
1975
|
-
&& clientHeight - targetRect.bottom < targetRect.top) {
|
|
1976
|
-
actualPlacement = PopoverPlacement$1.Top;
|
|
1977
|
-
}
|
|
1978
|
-
break;
|
|
1979
|
-
case PopoverPlacement$1.Start:
|
|
1980
|
-
if (targetRect.left < popoverSize.width) {
|
|
1981
|
-
actualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;
|
|
1982
|
-
}
|
|
1983
|
-
break;
|
|
1984
|
-
case PopoverPlacement$1.End:
|
|
1985
|
-
if (clientWidth - targetRect.right < popoverSize.width) {
|
|
1986
|
-
actualPlacement = this.fallbackPlacement(clientWidth, clientHeight, targetRect, popoverSize) || placement;
|
|
1987
|
-
}
|
|
1988
|
-
break;
|
|
1989
|
-
}
|
|
1990
|
-
return actualPlacement;
|
|
1991
|
-
}
|
|
1992
|
-
getVerticalLeft(targetRect, popoverSize) {
|
|
1993
|
-
const horizontalAlign = this._actualHorizontalAlign;
|
|
1994
|
-
let left = Popover_1.VIEWPORT_MARGIN;
|
|
1995
|
-
switch (horizontalAlign) {
|
|
1996
|
-
case PopoverHorizontalAlign$1.Center:
|
|
1997
|
-
case PopoverHorizontalAlign$1.Stretch:
|
|
1998
|
-
left = targetRect.left - (popoverSize.width - targetRect.width) / 2;
|
|
1999
|
-
break;
|
|
2000
|
-
case PopoverHorizontalAlign$1.Start:
|
|
2001
|
-
left = targetRect.left;
|
|
2002
|
-
break;
|
|
2003
|
-
case PopoverHorizontalAlign$1.End:
|
|
2004
|
-
left = targetRect.right - popoverSize.width;
|
|
2005
|
-
break;
|
|
2006
|
-
}
|
|
2007
|
-
return left;
|
|
2008
|
-
}
|
|
2009
|
-
getHorizontalTop(targetRect, popoverSize) {
|
|
2010
|
-
let top = 0;
|
|
2011
|
-
switch (this.verticalAlign) {
|
|
2012
|
-
case PopoverVerticalAlign$1.Center:
|
|
2013
|
-
case PopoverVerticalAlign$1.Stretch:
|
|
2014
|
-
top = targetRect.top - (popoverSize.height - targetRect.height) / 2;
|
|
2015
|
-
break;
|
|
2016
|
-
case PopoverVerticalAlign$1.Top:
|
|
2017
|
-
top = targetRect.top;
|
|
2018
|
-
break;
|
|
2019
|
-
case PopoverVerticalAlign$1.Bottom:
|
|
2020
|
-
top = targetRect.bottom - popoverSize.height;
|
|
2021
|
-
break;
|
|
2022
|
-
}
|
|
2023
|
-
return top;
|
|
2024
|
-
}
|
|
2025
|
-
get isModal() {
|
|
2026
|
-
return this.modal;
|
|
2027
|
-
}
|
|
2028
|
-
get _ariaLabelledBy() {
|
|
2029
|
-
if (!this._ariaLabel && this._displayHeader) {
|
|
2030
|
-
return "ui5-popup-header";
|
|
2031
|
-
}
|
|
2032
|
-
return undefined;
|
|
2033
|
-
}
|
|
2034
|
-
get styles() {
|
|
2035
|
-
return {
|
|
2036
|
-
...super.styles,
|
|
2037
|
-
root: {
|
|
2038
|
-
"max-height": this._maxHeight ? `${this._maxHeight}px` : "",
|
|
2039
|
-
"max-width": this._maxWidth ? `${this._maxWidth}px` : "",
|
|
2040
|
-
},
|
|
2041
|
-
arrow: {
|
|
2042
|
-
transform: `translate(${this.arrowTranslateX}px, ${this.arrowTranslateY}px)`,
|
|
2043
|
-
},
|
|
2044
|
-
};
|
|
2045
|
-
}
|
|
2046
|
-
get classes() {
|
|
2047
|
-
const allClasses = super.classes;
|
|
2048
|
-
allClasses.root["ui5-popover-root"] = true;
|
|
2049
|
-
return allClasses;
|
|
2050
|
-
}
|
|
2051
|
-
/**
|
|
2052
|
-
* Hook for descendants to hide header.
|
|
2053
|
-
*/
|
|
2054
|
-
get _displayHeader() {
|
|
2055
|
-
return !!(this.header.length || this.headerText);
|
|
2056
|
-
}
|
|
2057
|
-
/**
|
|
2058
|
-
* Hook for descendants to hide footer.
|
|
2059
|
-
*/
|
|
2060
|
-
get _displayFooter() {
|
|
2061
|
-
return true;
|
|
2062
|
-
}
|
|
2063
|
-
get _actualHorizontalAlign() {
|
|
2064
|
-
if (this.effectiveDir === "rtl") {
|
|
2065
|
-
if (this.horizontalAlign === PopoverHorizontalAlign$1.Start) {
|
|
2066
|
-
return PopoverHorizontalAlign$1.End;
|
|
2067
|
-
}
|
|
2068
|
-
if (this.horizontalAlign === PopoverHorizontalAlign$1.End) {
|
|
2069
|
-
return PopoverHorizontalAlign$1.Start;
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
return this.horizontalAlign;
|
|
2073
|
-
}
|
|
2074
|
-
};
|
|
2075
|
-
__decorate$1([
|
|
2076
|
-
webcomponentsBase.s()
|
|
2077
|
-
], Popover.prototype, "headerText", void 0);
|
|
2078
|
-
__decorate$1([
|
|
2079
|
-
webcomponentsBase.s()
|
|
2080
|
-
], Popover.prototype, "placement", void 0);
|
|
2081
|
-
__decorate$1([
|
|
2082
|
-
webcomponentsBase.s()
|
|
2083
|
-
], Popover.prototype, "horizontalAlign", void 0);
|
|
2084
|
-
__decorate$1([
|
|
2085
|
-
webcomponentsBase.s()
|
|
2086
|
-
], Popover.prototype, "verticalAlign", void 0);
|
|
2087
|
-
__decorate$1([
|
|
2088
|
-
webcomponentsBase.s({ type: Boolean })
|
|
2089
|
-
], Popover.prototype, "modal", void 0);
|
|
2090
|
-
__decorate$1([
|
|
2091
|
-
webcomponentsBase.s({ type: Boolean })
|
|
2092
|
-
], Popover.prototype, "hideArrow", void 0);
|
|
2093
|
-
__decorate$1([
|
|
2094
|
-
webcomponentsBase.s({ type: Boolean })
|
|
2095
|
-
], Popover.prototype, "allowTargetOverlap", void 0);
|
|
2096
|
-
__decorate$1([
|
|
2097
|
-
webcomponentsBase.s({ type: Number, noAttribute: true })
|
|
2098
|
-
], Popover.prototype, "arrowTranslateX", void 0);
|
|
2099
|
-
__decorate$1([
|
|
2100
|
-
webcomponentsBase.s({ type: Number, noAttribute: true })
|
|
2101
|
-
], Popover.prototype, "arrowTranslateY", void 0);
|
|
2102
|
-
__decorate$1([
|
|
2103
|
-
webcomponentsBase.s()
|
|
2104
|
-
], Popover.prototype, "actualPlacement", void 0);
|
|
2105
|
-
__decorate$1([
|
|
2106
|
-
webcomponentsBase.s({ type: Number, noAttribute: true })
|
|
2107
|
-
], Popover.prototype, "_maxHeight", void 0);
|
|
2108
|
-
__decorate$1([
|
|
2109
|
-
webcomponentsBase.s({ type: Number, noAttribute: true })
|
|
2110
|
-
], Popover.prototype, "_maxWidth", void 0);
|
|
2111
|
-
__decorate$1([
|
|
2112
|
-
webcomponentsBase.d({ type: HTMLElement })
|
|
2113
|
-
], Popover.prototype, "header", void 0);
|
|
2114
|
-
__decorate$1([
|
|
2115
|
-
webcomponentsBase.d({ type: HTMLElement })
|
|
2116
|
-
], Popover.prototype, "footer", void 0);
|
|
2117
|
-
__decorate$1([
|
|
2118
|
-
webcomponentsBase.s({ converter: e$1 })
|
|
2119
|
-
], Popover.prototype, "opener", null);
|
|
2120
|
-
Popover = Popover_1 = __decorate$1([
|
|
2121
|
-
webcomponentsBase.m({
|
|
2122
|
-
tag: "ui5-popover",
|
|
2123
|
-
styles: [
|
|
2124
|
-
Popup$1.styles,
|
|
2125
|
-
PopupsCommonCss,
|
|
2126
|
-
PopoverCss,
|
|
2127
|
-
],
|
|
2128
|
-
template: PopoverTemplate,
|
|
2129
|
-
})
|
|
2130
|
-
], Popover);
|
|
2131
|
-
const instanceOfPopover = (object) => {
|
|
2132
|
-
return "opener" in object;
|
|
2133
|
-
};
|
|
2134
|
-
Popover.define();
|
|
2135
|
-
var Popover$1 = Popover;
|
|
2136
|
-
|
|
2137
|
-
Icons.p("@" + "ui5" + "/" + "sap/ushell/thirdparty/webcomponents-theming", "sap_horizon", async () => parametersBundle_css.defaultThemeBase);
|
|
2138
|
-
Icons.p("@" + "u" + "i" + "5" + "/" + "w" + "e" + "b" + "c" + "o" + "m" + "p" + "o" + "n" + "e" + "n" + "t" + "s", "sap_horizon", async () => parametersBundle_css$1.defaultTheme);
|
|
2139
|
-
var ResponsivePopoverCss = `:host{--_ui5-v2-15-0_input_width: 100%;min-width:6.25rem;min-height:2rem}:host([on-phone]){display:contents}.ui5-responsive-popover-header{height:var(--_ui5-v2-15-0-responsive_popover_header_height);display:flex;justify-content:var(--_ui5-v2-15-0_popup_header_prop_header_text_alignment);align-items:center;width:100%}.ui5-responsive-popover-header-text{width:calc(100% - var(--_ui5-v2-15-0_button_base_min_width))}.ui5-responsive-popover-header-no-title{justify-content:flex-end}
|
|
2140
|
-
`;
|
|
2141
|
-
|
|
2142
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2143
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2144
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2145
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2146
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2147
|
-
};
|
|
2148
|
-
var ResponsivePopover_1;
|
|
2149
|
-
/**
|
|
2150
|
-
* @class
|
|
2151
|
-
*
|
|
2152
|
-
* ### Overview
|
|
2153
|
-
* The `ui5-responsive-popover` acts as a Popover on desktop and tablet, while on phone it acts as a Dialog.
|
|
2154
|
-
* The component improves tremendously the user experience on mobile.
|
|
2155
|
-
*
|
|
2156
|
-
* ### Usage
|
|
2157
|
-
* Use it when you want to make sure that all the content is visible on any device.
|
|
2158
|
-
*
|
|
2159
|
-
* ### ES6 Module Import
|
|
2160
|
-
*
|
|
2161
|
-
* `import "sap/ushell/gen/ui5/webcomponents/dist/ResponsivePopover.js";`
|
|
2162
|
-
* @constructor
|
|
2163
|
-
* @extends Popover
|
|
2164
|
-
* @since 1.0.0-rc.6
|
|
2165
|
-
* @public
|
|
2166
|
-
* @csspart header - Used to style the header of the component
|
|
2167
|
-
* @csspart content - Used to style the content of the component
|
|
2168
|
-
* @csspart footer - Used to style the footer of the component
|
|
2169
|
-
*/
|
|
2170
|
-
let ResponsivePopover = ResponsivePopover_1 = class ResponsivePopover extends Popover$1 {
|
|
2171
|
-
constructor() {
|
|
2172
|
-
super();
|
|
2173
|
-
/**
|
|
2174
|
-
* Defines if only the content would be displayed (without header and footer) in the popover on Desktop.
|
|
2175
|
-
* By default both the header and footer would be displayed.
|
|
2176
|
-
* @private
|
|
2177
|
-
*/
|
|
2178
|
-
this.contentOnlyOnDesktop = false;
|
|
2179
|
-
/**
|
|
2180
|
-
* Used internaly for controls which must not have header.
|
|
2181
|
-
* @private
|
|
2182
|
-
*/
|
|
2183
|
-
this._hideHeader = false;
|
|
2184
|
-
/**
|
|
2185
|
-
* Defines whether a close button will be rendered in the header of the component
|
|
2186
|
-
* **Note:** If you are using the `header` slot, this property will have no effect
|
|
2187
|
-
* @private
|
|
2188
|
-
* @default false
|
|
2189
|
-
* @since 1.0.0-rc.16
|
|
2190
|
-
*/
|
|
2191
|
-
this._hideCloseButton = false;
|
|
2192
|
-
}
|
|
2193
|
-
async openPopup() {
|
|
2194
|
-
if (!Icons.d()) {
|
|
2195
|
-
await super.openPopup();
|
|
2196
|
-
}
|
|
2197
|
-
else if (this._dialog) {
|
|
2198
|
-
this._dialog.open = true;
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
async _show() {
|
|
2202
|
-
if (!Icons.d()) {
|
|
2203
|
-
return super._show();
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
handleOpenOnEnterDOM() {
|
|
2207
|
-
if (this.open && !Icons.d()) {
|
|
2208
|
-
this.showPopover();
|
|
2209
|
-
this.openPopup();
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
_dialogCloseButtonClick() {
|
|
2213
|
-
this.closePopup();
|
|
2214
|
-
}
|
|
2215
|
-
/**
|
|
2216
|
-
* Closes the popover/dialog.
|
|
2217
|
-
* @override
|
|
2218
|
-
*/
|
|
2219
|
-
closePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false) {
|
|
2220
|
-
if (!Icons.d()) {
|
|
2221
|
-
super.closePopup(escPressed, preventRegistryUpdate, preventFocusRestore);
|
|
2222
|
-
}
|
|
2223
|
-
else {
|
|
2224
|
-
this._dialog?.closePopup(escPressed, preventRegistryUpdate, preventFocusRestore);
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
toggle(opener) {
|
|
2228
|
-
if (this.open) {
|
|
2229
|
-
this.closePopup();
|
|
2230
|
-
return;
|
|
2231
|
-
}
|
|
2232
|
-
this.opener = opener;
|
|
2233
|
-
this.open = true;
|
|
2234
|
-
}
|
|
2235
|
-
get classes() {
|
|
2236
|
-
const allClasses = super.classes;
|
|
2237
|
-
allClasses.header = {
|
|
2238
|
-
"ui5-responsive-popover-header": true,
|
|
2239
|
-
"ui5-responsive-popover-header-no-title": !this.headerText,
|
|
2240
|
-
};
|
|
2241
|
-
return allClasses;
|
|
2242
|
-
}
|
|
2243
|
-
get _dialog() {
|
|
2244
|
-
return this.shadowRoot.querySelector("[ui5-dialog]");
|
|
2245
|
-
}
|
|
2246
|
-
get contentDOM() {
|
|
2247
|
-
return Icons.d() ? this._dialog.contentDOM : super.contentDOM;
|
|
2248
|
-
}
|
|
2249
|
-
get _isPhone() {
|
|
2250
|
-
return Icons.d();
|
|
2251
|
-
}
|
|
2252
|
-
get _displayHeader() {
|
|
2253
|
-
return (Icons.d() || !this.contentOnlyOnDesktop) && super._displayHeader;
|
|
2254
|
-
}
|
|
2255
|
-
get _displayFooter() {
|
|
2256
|
-
return Icons.d() || !this.contentOnlyOnDesktop;
|
|
2257
|
-
}
|
|
2258
|
-
get _closeDialogAriaLabel() {
|
|
2259
|
-
return ResponsivePopover_1.i18nBundle.getText(i18nDefaults.RESPONSIVE_POPOVER_CLOSE_DIALOG_BUTTON);
|
|
2260
|
-
}
|
|
2261
|
-
_beforeDialogOpen() {
|
|
2262
|
-
this._opened = true;
|
|
2263
|
-
this.open = true;
|
|
2264
|
-
this.fireDecoratorEvent("before-open");
|
|
2265
|
-
}
|
|
2266
|
-
_afterDialogOpen() {
|
|
2267
|
-
this.fireDecoratorEvent("open");
|
|
2268
|
-
}
|
|
2269
|
-
_beforeDialogClose(e) {
|
|
2270
|
-
this.fireDecoratorEvent("before-close", e.detail);
|
|
2271
|
-
}
|
|
2272
|
-
_afterDialogClose() {
|
|
2273
|
-
this._opened = false;
|
|
2274
|
-
this.open = false;
|
|
2275
|
-
this.fireDecoratorEvent("close");
|
|
2276
|
-
}
|
|
2277
|
-
get isModal() {
|
|
2278
|
-
if (!Icons.d()) {
|
|
2279
|
-
return super.isModal;
|
|
2280
|
-
}
|
|
2281
|
-
return this._dialog.isModal;
|
|
2282
|
-
}
|
|
2283
|
-
};
|
|
2284
|
-
__decorate([
|
|
2285
|
-
webcomponentsBase.s({ type: Boolean })
|
|
2286
|
-
], ResponsivePopover.prototype, "contentOnlyOnDesktop", void 0);
|
|
2287
|
-
__decorate([
|
|
2288
|
-
webcomponentsBase.s({ type: Boolean })
|
|
2289
|
-
], ResponsivePopover.prototype, "_hideHeader", void 0);
|
|
2290
|
-
__decorate([
|
|
2291
|
-
webcomponentsBase.s({ type: Boolean })
|
|
2292
|
-
], ResponsivePopover.prototype, "_hideCloseButton", void 0);
|
|
2293
|
-
__decorate([
|
|
2294
|
-
parametersBundle_css$1.i("sap/ushell/gen/ui5/webcomponents")
|
|
2295
|
-
], ResponsivePopover, "i18nBundle", void 0);
|
|
2296
|
-
ResponsivePopover = ResponsivePopover_1 = __decorate([
|
|
2297
|
-
webcomponentsBase.m({
|
|
2298
|
-
tag: "ui5-responsive-popover",
|
|
2299
|
-
styles: [Popover$1.styles, ResponsivePopoverCss],
|
|
2300
|
-
template: ResponsivePopoverTemplate,
|
|
2301
|
-
})
|
|
2302
|
-
], ResponsivePopover);
|
|
2303
|
-
ResponsivePopover.define();
|
|
2304
|
-
var ResponsivePopover$1 = ResponsivePopover;
|
|
2305
|
-
|
|
2306
|
-
exports.Popover = Popover$1;
|
|
2307
|
-
exports.PopoverHorizontalAlign = PopoverHorizontalAlign$1;
|
|
2308
|
-
exports.PopoverPlacement = PopoverPlacement$1;
|
|
2309
|
-
exports.ResponsivePopover = ResponsivePopover$1;
|
|
2310
|
-
exports.e = e$1;
|
|
2311
|
-
|
|
2312
|
-
}));
|