@sapui5/sap.ushell 1.119.2 → 1.120.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 +3 -3
- package/src/main/js/sap/ushell/Container.js +272 -41
- package/src/main/js/sap/ushell/Fiori20Adapter.js +1 -1
- package/src/main/js/sap/ushell/Fiori20AdapterTest.js +3 -2
- package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
- package/src/main/js/sap/ushell/SessionHandler.js +11 -6
- package/src/main/js/sap/ushell/TechnicalParameters.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/User.js +26 -35
- package/src/main/js/sap/ushell/_ApplicationType/urlTemplateResolution.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/adapters/cdm/ClientSideTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/CommonDataModelAdapter.js +15 -11
- 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 -1
- package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +16 -11
- package/src/main/js/sap/ushell/adapters/cdm/PersonalizationAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/PersonalizationV2Adapter.js +18 -0
- 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 -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 +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readVisualizations.js +1 -1
- package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +1 -1
- 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 +24 -18
- 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/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/MenuAdapter.js +4 -7
- package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionAdapter.js +17 -22
- 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 +19 -0
- 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 +11 -7
- package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +8 -8
- package/src/main/js/sap/ushell/api/RTA.js +47 -0
- package/src/main/js/sap/ushell/appRuntime/neo/AppInfoService.js +154 -0
- package/src/main/js/sap/ushell/appRuntime/neo/AppRuntimeNeo.js +20 -0
- package/src/main/js/sap/ushell/appRuntime/neo/ProxyAppUtils.js +71 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntime.js +12 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntimeContext.js +2 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/SchedulingAgent.js +2 -2
- 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-def-dev.js +6 -3
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ushell.js +3 -0
- package/src/main/js/sap/ushell/bootstrap/common/common.load.launchpad.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/common/common.util.js +34 -2
- package/src/main/js/sap/ushell/bootstrap/sandbox2.js +7 -2
- package/src/main/js/sap/ushell/components/ComponentKeysHandler.js +1 -1
- package/src/main/js/sap/ushell/components/HomepageManager.js +5 -5
- package/src/main/js/sap/ushell/components/SharedComponentUtils.js +7 -10
- package/src/main/js/sap/ushell/components/_HeaderManager/ShellHeader.controller.js +3 -3
- package/src/main/js/sap/ushell/components/_HomepageManager/DashboardLoadingManager.js +5 -0
- package/src/main/js/sap/ushell/components/_HomepageManager/PagingManager.js +5 -0
- package/src/main/js/sap/ushell/components/_HomepageManager/PersistentPageOperationAdapter.js +5 -0
- package/src/main/js/sap/ushell/components/_HomepageManager/TransientPageOperationAdapter.js +5 -0
- package/src/main/js/sap/ushell/components/appfinder/AppFinderView.js +1 -1
- package/src/main/js/sap/ushell/components/appfinder/CatalogView.js +1 -1
- package/src/main/js/sap/ushell/components/appfinder/EasyAccess.controller.js +3 -3
- package/src/main/js/sap/ushell/components/appfinder/EasyAccessView.js +0 -8
- package/src/main/js/sap/ushell/components/appfinder/HierarchyApps.controller.js +4 -4
- package/src/main/js/sap/ushell/components/appfinder/HierarchyFolders.controller.js +18 -16
- package/src/main/js/sap/ushell/components/appfinder/manifest.json +2 -2
- package/src/main/js/sap/ushell/components/applicationIntegration/AppLifeCycle.js +2 -2
- package/src/main/js/sap/ushell/components/applicationIntegration/application/Application.js +1 -1
- package/src/main/js/sap/ushell/components/applicationIntegration/application/BlueBoxHandler.js +1 -1
- package/src/main/js/sap/ushell/components/applicationIntegration/application/PostMessageAPI.js +2 -2
- package/src/main/js/sap/ushell/components/applicationIntegration/configuration/AppMeta.js +1 -1
- package/src/main/js/sap/ushell/components/applicationIntegration/elements/model.js +1 -1
- package/src/main/js/sap/ushell/components/applicationIntegration/relatedServices/RelatedServices.js +1 -1
- package/src/main/js/sap/ushell/components/applicationIntegration/relatedShellElements/RelatedShellElements.js +1 -1
- package/src/main/js/sap/ushell/components/cards/Card.controller.js +2 -2
- package/src/main/js/sap/ushell/components/container/ApplicationContainer.js +92 -71
- package/src/main/js/sap/ushell/components/contentFinder/Component.js +1 -1
- 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/controller/WidgetGallery.controller.js +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/model/formatter.js +4 -4
- package/src/main/js/sap/ushell/components/factsheet/Component.js +1 -1
- package/src/main/js/sap/ushell/components/homeApp/error/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/homepage/ActionMode.js +1 -1
- package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +1 -1
- package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +1 -1
- package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +1 -1
- package/src/main/js/sap/ushell/components/homepage/manifest.json +2 -2
- package/src/main/js/sap/ushell/components/pages/ActionMode.js +5 -5
- 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/StateManager.js +37 -24
- package/src/main/js/sap/ushell/components/pages/controller/ImportDialog.controller.js +1 -1
- package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +1 -1
- package/src/main/js/sap/ushell/components/pages/manifest.json +2 -2
- package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +7 -4
- package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/MenuBar/controller/MenuBar.controller.js +6 -7
- package/src/main/js/sap/ushell/components/shell/MenuBar/manifest.json +2 -2
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +39 -13
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +3 -3
- package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +5 -5
- package/src/main/js/sap/ushell/components/shell/Notifications/Notifications.controller.js +25 -45
- package/src/main/js/sap/ushell/components/shell/PostLoadingHeaderEnhancement/Component.js +2 -2
- package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Search/ESearch.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Search/manifest.json +2 -2
- package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +2 -2
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchCEP.controller.js +3 -3
- 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/Settings/Component.js +4 -4
- package/src/main/js/sap/ushell/components/shell/Settings/ProfilingLoader.js +4 -0
- package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.controller.js +4 -0
- package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.view.xml +4 -3
- package/src/main/js/sap/ushell/components/shell/Settings/homepage/HomepageEntry.js +10 -13
- package/src/main/js/sap/ushell/components/shell/Settings/notifications/NotificationsSetting.controller.js +13 -22
- package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountSelector.controller.js +2 -2
- package/src/main/js/sap/ushell/components/shell/Settings/userActivities/UserActivitiesSetting.controller.js +11 -14
- package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/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 +2 -2
- package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +2 -2
- package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/smartBusinessUtil.js +4 -6
- package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +14 -18
- package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.accessibility.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.controller.js +16 -12
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageHost.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageBuilder.view.xml +3 -3
- package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +1 -1
- package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +1 -2
- package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/workPageRuntime/services/NavigationResolver.js +1 -1
- package/src/main/js/sap/ushell/components/workPageRuntime/services/WorkPage.js +1 -1
- package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
- package/src/main/js/sap/ushell/library.js +1 -1
- package/src/main/js/sap/ushell/navigationMode.js +1 -1
- package/src/main/js/sap/ushell/performance/ShellAnalytics.js +1 -1
- package/src/main/js/sap/ushell/performance/StatisticalRecord.js +1 -1
- package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/AccessKeysHandler.js +1 -1
- package/src/main/js/sap/ushell/renderer/History.js +84 -0
- package/src/main/js/sap/ushell/renderer/LogonFrameProvider.js +96 -0
- package/src/main/js/sap/ushell/renderer/Renderer.js +2851 -0
- package/src/main/js/sap/ushell/renderer/Shell.controller.js +3155 -0
- package/src/main/js/sap/ushell/{renderers/fiori2/ShellAsync.view.js → renderer/Shell.view.js} +29 -18
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/ShellLayout.js +3 -3
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/allMyApps/AllMyApps.controller.js +4 -4
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/allMyApps/AllMyApps.view.xml +1 -1
- package/src/main/js/sap/ushell/renderer/allMyApps/AllMyAppsKeyboardHandler.js +108 -0
- package/src/main/js/sap/ushell/renderer/allMyApps/AllMyAppsManager.js +453 -0
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources.properties +4 -0
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/Component.js +3 -3
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/controller/CEPSearchApp.controller.js +1 -1
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/controller/SearchApp.controller.js +1 -1
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/manifest.json +2 -2
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/view/CEPSearchApp.view.js +2 -2
- package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/view/SearchApp.view.js +2 -2
- package/src/main/js/sap/ushell/renderers/fiori2/History.js +7 -68
- package/src/main/js/sap/ushell/renderers/fiori2/LogonFrameProvider.js +9 -79
- package/src/main/js/sap/ushell/renderers/fiori2/Renderer.js +101 -1882
- package/src/main/js/sap/ushell/renderers/fiori2/RendererExtensions.js +2 -3
- package/src/main/js/sap/ushell/renderers/fiori2/Shell.controller.js +8 -3130
- package/src/main/js/sap/ushell/renderers/fiori2/Shell.view.js +7 -7
- package/src/main/js/sap/ushell/renderers/fiori2/allMyApps/AllMyAppsKeyboardHandler.js +7 -92
- package/src/main/js/sap/ushell/renderers/fiori2/allMyApps/AllMyAppsManager.js +8 -438
- package/src/main/js/sap/ushell/resources.js +1 -1
- package/src/main/js/sap/ushell/services/AllMyApps.js +16 -7
- package/src/main/js/sap/ushell/services/AppConfiguration.js +12 -0
- package/src/main/js/sap/ushell/services/AppLifeCycle.js +11 -14
- package/src/main/js/sap/ushell/services/AppState.js +12 -8
- package/src/main/js/sap/ushell/services/Bookmark.js +15 -13
- package/src/main/js/sap/ushell/services/BookmarkV2.js +919 -0
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +229 -241
- package/src/main/js/sap/ushell/services/CommonDataModel.js +14 -4
- package/src/main/js/sap/ushell/services/Configuration.js +12 -11
- package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +13 -10
- package/src/main/js/sap/ushell/services/Container.js +1 -1
- package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +1 -1
- package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +8 -6
- package/src/main/js/sap/ushell/services/DarkModeSupport.js +16 -10
- package/src/main/js/sap/ushell/services/EndUserFeedback.js +1 -1
- package/src/main/js/sap/ushell/services/Extension/FloatingContainer.js +103 -0
- package/src/main/js/sap/ushell/services/Extension/Footer.js +61 -0
- package/src/main/js/sap/ushell/services/Extension/Header.js +193 -0
- package/src/main/js/sap/ushell/services/Extension/Item.js +195 -0
- package/src/main/js/sap/ushell/services/Extension/SidePane.js +155 -0
- package/src/main/js/sap/ushell/services/Extension/ToolArea.js +152 -0
- package/src/main/js/sap/ushell/services/Extension.js +381 -0
- package/src/main/js/sap/ushell/services/LaunchPage.js +1 -1
- package/src/main/js/sap/ushell/services/Menu.js +48 -59
- package/src/main/js/sap/ushell/services/Message.js +15 -14
- package/src/main/js/sap/ushell/services/MessageBroker.js +12 -12
- package/src/main/js/sap/ushell/services/NavTargetResolution.js +48 -70
- package/src/main/js/sap/ushell/services/Navigation/utils.js +565 -0
- package/src/main/js/sap/ushell/services/Navigation.js +152 -139
- package/src/main/js/sap/ushell/services/NavigationDataProvider.js +11 -8
- package/src/main/js/sap/ushell/services/Notifications.js +118 -1523
- package/src/main/js/sap/ushell/services/NotificationsV2.js +1872 -0
- package/src/main/js/sap/ushell/services/PageBuilding.js +11 -8
- package/src/main/js/sap/ushell/services/PagePersistence.js +11 -8
- package/src/main/js/sap/ushell/services/PageReferencing.js +11 -8
- package/src/main/js/sap/ushell/services/Pages.js +11 -15
- package/src/main/js/sap/ushell/services/Personalization.js +5 -3
- package/src/main/js/sap/ushell/services/PersonalizationV2/ContextContainer.js +410 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/Personalizer.js +109 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/TransientPersonalizer.js +57 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/Variant.js +180 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/VariantSet.js +296 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/VariantSetAdapter.js +125 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/WindowAdapter.js +71 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/WindowAdapterContainer.js +172 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/constants.js +23 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/constants.private.js +18 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/utils.js +233 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2.js +641 -0
- package/src/main/js/sap/ushell/services/PluginManager.js +47 -55
- package/src/main/js/sap/ushell/services/ReferenceResolver.js +61 -54
- package/src/main/js/sap/ushell/services/Search.js +15 -2
- package/src/main/js/sap/ushell/services/SearchCEP.js +40 -44
- package/src/main/js/sap/ushell/services/SearchableContent.js +9 -9
- package/src/main/js/sap/ushell/services/ShellNavigation.js +14 -13
- package/src/main/js/sap/ushell/services/SmartNavigation.js +1 -1
- package/src/main/js/sap/ushell/services/SpaceContent.js +9 -10
- package/src/main/js/sap/ushell/services/SupportTicket.js +14 -14
- package/src/main/js/sap/ushell/services/UITracer.js +31 -35
- package/src/main/js/sap/ushell/services/URLParsing.js +9 -11
- package/src/main/js/sap/ushell/services/URLShortening.js +1 -1
- package/src/main/js/sap/ushell/services/URLTemplate.js +14 -13
- package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +29 -26
- package/src/main/js/sap/ushell/services/UsageAnalytics.js +6 -0
- package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +11 -7
- package/src/main/js/sap/ushell/services/UserDefaultParameters.js +20 -26
- package/src/main/js/sap/ushell/services/UserInfo.js +44 -23
- package/src/main/js/sap/ushell/services/UserRecents.js +13 -5
- package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +12 -9
- package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +10 -8
- 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 +3 -4
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/VirtualInbounds.js +4 -4
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/XAppStateProcessing.js +1 -1
- package/src/main/js/sap/ushell/services/_CommonDataModel/SiteConverter.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 +2 -1
- package/src/main/js/sap/ushell/services/_MessageBroker/MessageBrokerEngine.js +1 -1
- package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
- package/src/main/js/sap/ushell/services/_Personalization/ContextContainer.js +6 -0
- package/src/main/js/sap/ushell/services/_Personalization/PersonalizationContainer.js +5 -1
- package/src/main/js/sap/ushell/services/_Personalization/PersonalizationContainerVariant.js +13 -9
- package/src/main/js/sap/ushell/services/_Personalization/PersonalizationContainerVariantSet.js +17 -13
- package/src/main/js/sap/ushell/services/_Personalization/Personalizer.js +5 -0
- package/src/main/js/sap/ushell/services/_Personalization/TransientPersonalizer.js +5 -1
- package/src/main/js/sap/ushell/services/_Personalization/Variant.js +4 -0
- package/src/main/js/sap/ushell/services/_Personalization/VariantSet.js +17 -9
- package/src/main/js/sap/ushell/services/_Personalization/VariantSetAdapter.js +4 -6
- package/src/main/js/sap/ushell/services/_Personalization/WindowAdapter.js +5 -44
- package/src/main/js/sap/ushell/services/_Personalization/WindowAdapterContainer.js +5 -101
- package/src/main/js/sap/ushell/services/_Personalization/constants.js +3 -0
- package/src/main/js/sap/ushell/services/_Personalization/constants.private.js +3 -0
- package/src/main/js/sap/ushell/services/_Personalization/utils.js +3 -0
- package/src/main/js/sap/ushell/services/_PluginManager/Extensions.js +1 -1
- package/src/main/js/sap/ushell/services/_PluginManager/HeaderExtensions.js +1 -1
- package/src/main/js/sap/ushell/services/_PluginManager/MenuExtensions.js +1 -1
- package/src/main/js/sap/ushell/services/_Ui5ComponentLoader/utils.js +29 -5
- package/src/main/js/sap/ushell/services/_UserRecents/UserRecentsBase.js +19 -27
- package/src/main/js/sap/ushell/services/_VisualizationInstantiation/VizInstance.js +4 -0
- package/src/main/js/sap/ushell/services/_VisualizationInstantiation/VizInstanceAbap.js +3 -0
- package/src/main/js/sap/ushell/services/_VisualizationInstantiation/VizInstanceLink.js +1 -1
- package/src/main/js/sap/ushell/services/personalization/VariantSetAdapter.js +13 -15
- package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +1 -1
- package/src/main/js/sap/ushell/themes/sap_horizon/ShellAppTitle.less +4 -4
- package/src/main/js/sap/ushell/themes/sap_horizon_dark/ShellAppTitle.less +4 -4
- package/src/main/js/sap/ushell/themes/sap_horizon_hcb/ShellAppTitle.less +2 -2
- package/src/main/js/sap/ushell/themes/sap_horizon_hcw/ShellAppTitle.less +2 -2
- package/src/main/js/sap/ushell/ui/AppContainer.js +2 -2
- package/src/main/js/sap/ushell/ui/ContentNodeSelector.js +2 -2
- package/src/main/js/sap/ushell/ui/ShellHeader.js +2 -2
- package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +1 -1
- package/src/main/js/sap/ushell/ui/footerbar/AddBookmarkButton.js +8 -12
- package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
- package/src/main/js/sap/ushell/ui/launchpad/Page.js +1 -1
- package/src/main/js/sap/ushell/ui/launchpad/Section.js +21 -8
- package/src/main/js/sap/ushell/ui/launchpad/TileState.js +0 -1
- package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +1 -1
- package/src/main/js/sap/ushell/ui/shell/ShellAppTitle.js +1 -1
- package/src/main/js/sap/ushell/ui/shell/ShellHeadItem.js +1 -1
- package/src/main/js/sap/ushell/ui/shell/SysInfoBar.js +1 -1
- 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/ShellUIService.js +1 -1
- package/src/main/js/sap/ushell/ui5service/UserStatus.js +1 -1
- package/src/main/js/sap/ushell/ui5service/_ShellUIService/shelluiservice.class.factory.js +14 -26
- package/src/main/js/sap/ushell/utils/Deferred.js +88 -0
- package/src/main/js/sap/ushell/utils/UrlShortening.js +1 -1
- package/src/main/js/sap/ushell/utils/WindowUtils.js +8 -8
- package/src/main/js/sap/ushell/utils.js +31 -67
- package/src/test/js/sap/ushell/bootstrap/sandbox.js +7 -2
- package/ui5.yaml +8 -2
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/HeadEndItemsOverflowPopover.fragment.xml +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ar.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_bg.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ca.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_cs.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_cy.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_da.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_de.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_el.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_en.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_en_GB.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_en_US_sappsd.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_en_US_saprigi.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_en_US_saptrc.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_es.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_es_MX.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_et.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_fi.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_fr.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_fr_CA.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_hi.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_hr.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_hu.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_id.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_it.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_iw.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ja.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_kk.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ko.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_lt.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_lv.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ms.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_nl.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_no.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_pl.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_pt.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_pt_PT.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ro.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_ru.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_sh.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_sk.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_sl.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_sv.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_th.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_tr.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_uk.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_vi.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_zh_CN.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/resources/resources_zh_TW.properties +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/util.js +0 -0
- /package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/utils.js +0 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
// Copyright (c) 2009-2023 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
sap.ui.define([
|
|
4
|
+
"sap/ui/thirdparty/jquery",
|
|
5
|
+
"sap/ushell/resources",
|
|
6
|
+
"sap/ushell/library"
|
|
7
|
+
], function (
|
|
8
|
+
jQuery,
|
|
9
|
+
resources,
|
|
10
|
+
ushellLibrary
|
|
11
|
+
) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
var AllMyAppsProviderType = ushellLibrary.AllMyAppsProviderType;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Reading apps data from all the data_sources/providers and updating AllMyApps model.
|
|
18
|
+
*
|
|
19
|
+
* loadAppsData is the main function that is responsible for reading apps data from all data_sources/providers,
|
|
20
|
+
* using the following functionality:
|
|
21
|
+
* - _handleGroupsData - Reading groups data
|
|
22
|
+
* - _handleExternalProvidersData - Reading external_providers data
|
|
23
|
+
* - _addCatalogToModel - Reading catalogs data
|
|
24
|
+
*/
|
|
25
|
+
var AllMyAppsManager = function () { };
|
|
26
|
+
|
|
27
|
+
AllMyAppsManager.prototype.loadAppsData = function (oModel, oPopoverObject, loadCatalogs) {
|
|
28
|
+
return sap.ushell.Container.getServiceAsync("AllMyApps")
|
|
29
|
+
.then(function (AllMyApps) {
|
|
30
|
+
this.oPopover = oPopoverObject;
|
|
31
|
+
|
|
32
|
+
if (!AllMyApps.isEnabled()) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
this.iNumberOfProviders = 0;
|
|
37
|
+
this.oModel = oModel;
|
|
38
|
+
|
|
39
|
+
if (AllMyApps.isHomePageAppsEnabled()) {
|
|
40
|
+
this._handleGroupsData();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (AllMyApps.isExternalProviderAppsEnabled()) {
|
|
44
|
+
this._handleExternalProvidersData(oModel);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (AllMyApps.isCatalogAppsEnabled()) {
|
|
48
|
+
this._handleCatalogs(loadCatalogs);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!AllMyApps.isCatalogAppsEnabled() || (AllMyApps.isCatalogAppsEnabled() && loadCatalogs)) {
|
|
52
|
+
// Publish event all my apps finished loading.
|
|
53
|
+
var oEventBus = sap.ui.getCore().getEventBus();
|
|
54
|
+
oEventBus.publish("launchpad", "allMyAppsMasterLoaded");
|
|
55
|
+
}
|
|
56
|
+
}.bind(this));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
AllMyAppsManager.prototype._handleGroupsData = function () {
|
|
60
|
+
var oGroupsDataPromise = this._getGroupsData();
|
|
61
|
+
var oHomeModelEntry = { title: resources.i18n.getText("allMyApps_homeEntryTitle") };
|
|
62
|
+
var aProvidersArray;
|
|
63
|
+
|
|
64
|
+
// Get groups apps
|
|
65
|
+
return new Promise(function (resolve, reject) {
|
|
66
|
+
oGroupsDataPromise.done(resolve).fail(reject);
|
|
67
|
+
})
|
|
68
|
+
.then(function (oGroupsArray) {
|
|
69
|
+
oHomeModelEntry.groups = oGroupsArray;
|
|
70
|
+
oHomeModelEntry.type = AllMyAppsProviderType.HOME;
|
|
71
|
+
|
|
72
|
+
if (oGroupsArray.length === 0) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Home (groups) provider should be at the 1st place in the providers list,
|
|
77
|
+
// hence we use array unshift in order to put it at index 0
|
|
78
|
+
aProvidersArray = this.oModel.getProperty("/AppsData");
|
|
79
|
+
if (aProvidersArray) {
|
|
80
|
+
var index = this._getIndexByType(aProvidersArray, oHomeModelEntry.type);
|
|
81
|
+
if (index !== undefined) {
|
|
82
|
+
aProvidersArray[index] = oHomeModelEntry;
|
|
83
|
+
} else {
|
|
84
|
+
aProvidersArray.unshift(oHomeModelEntry);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
this.oModel.setProperty("/AppsData", aProvidersArray);
|
|
89
|
+
this.iNumberOfProviders += 1;
|
|
90
|
+
}.bind(this));
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
AllMyAppsManager.prototype._getIndexByType = function (providersArray, providerType) {
|
|
94
|
+
if (providersArray.length <= 0) {
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
for (var i = 0; i < providersArray.length; i++) {
|
|
99
|
+
if (providersArray[i].type === providerType) {
|
|
100
|
+
return i;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
AllMyAppsManager.prototype._getGroupsData = function () {
|
|
106
|
+
var oDeferred = new jQuery.Deferred();
|
|
107
|
+
sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
108
|
+
.then(function (LaunchPage) {
|
|
109
|
+
return Promise.all([
|
|
110
|
+
LaunchPage.getDefaultGroup(),
|
|
111
|
+
LaunchPage.getGroups()
|
|
112
|
+
]);
|
|
113
|
+
})
|
|
114
|
+
.then(function (aResults) {
|
|
115
|
+
this.oDefaultGroup = aResults[0];
|
|
116
|
+
var aGroups = aResults[1];
|
|
117
|
+
var aPromises = [];
|
|
118
|
+
aGroups.forEach(function (oGroup) {
|
|
119
|
+
aPromises.push(this._getFormattedGroup(oGroup));
|
|
120
|
+
}.bind(this));
|
|
121
|
+
return Promise.all(aPromises);
|
|
122
|
+
}.bind(this))
|
|
123
|
+
.then(function (aFormattedGroups) {
|
|
124
|
+
var aFilteredGroups = aFormattedGroups.filter(function (oFormattedGroup) {
|
|
125
|
+
return oFormattedGroup && (oFormattedGroup.apps.length > 0 || oFormattedGroup.numberCustomTiles > 0);
|
|
126
|
+
});
|
|
127
|
+
oDeferred.resolve(aFilteredGroups);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
return oDeferred.promise();
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
AllMyAppsManager.prototype._getFormattedGroup = function (oGroup) {
|
|
134
|
+
var oFormattedGroup;
|
|
135
|
+
var sGroupTitle;
|
|
136
|
+
var aTiles;
|
|
137
|
+
|
|
138
|
+
return sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
139
|
+
.then(function (LaunchPage) {
|
|
140
|
+
// @TODO What about hidden groups? => isGroupVisible(group) === true
|
|
141
|
+
if (LaunchPage.isGroupVisible(oGroup) === false) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
// The default group gets "My Home" title
|
|
145
|
+
if (LaunchPage.getGroupId(oGroup) === LaunchPage.getGroupId(this.oDefaultGroup)) {
|
|
146
|
+
sGroupTitle = resources.i18n.getText("my_group");
|
|
147
|
+
} else {
|
|
148
|
+
sGroupTitle = LaunchPage.getGroupTitle(oGroup);
|
|
149
|
+
}
|
|
150
|
+
oFormattedGroup = {};
|
|
151
|
+
oFormattedGroup.title = sGroupTitle;
|
|
152
|
+
oFormattedGroup.apps = [];
|
|
153
|
+
|
|
154
|
+
aTiles = LaunchPage.getGroupTiles(oGroup);
|
|
155
|
+
return this._getFormattedGroupApps(aTiles);
|
|
156
|
+
}.bind(this))
|
|
157
|
+
.then(function (oResult) {
|
|
158
|
+
if (!oResult) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
oFormattedGroup.apps = oResult.aFormattedApps;
|
|
162
|
+
oFormattedGroup.numberCustomTiles = oResult.iNumberOfCustomTiles;
|
|
163
|
+
if (oResult.iNumberOfCustomTiles === 1) {
|
|
164
|
+
oFormattedGroup.sCustomLabel = resources.i18n.getText("allMyApps_customStringSingle");
|
|
165
|
+
oFormattedGroup.sCustomLink = resources.i18n.getText("allMyApps_customLinkHomePageSingle");
|
|
166
|
+
} else {
|
|
167
|
+
oFormattedGroup.sCustomLabel = resources.i18n.getText("allMyApps_customString", [oResult.iNumberOfCustomTiles]);
|
|
168
|
+
oFormattedGroup.sCustomLink = resources.i18n.getText("allMyApps_customLinkHomePage");
|
|
169
|
+
}
|
|
170
|
+
oFormattedGroup.handlePress = this._onHandleGroupPress;
|
|
171
|
+
return oFormattedGroup;
|
|
172
|
+
}.bind(this));
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
AllMyAppsManager.prototype._getFormattedGroupApps = function (oApps) {
|
|
176
|
+
var aFormattedApps = [];
|
|
177
|
+
var iNumberOfCustomTiles = 0;
|
|
178
|
+
return sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
179
|
+
.then(function (LaunchPage) {
|
|
180
|
+
var aPromises = [];
|
|
181
|
+
oApps.forEach(function (oTile) {
|
|
182
|
+
if (LaunchPage.isTileIntentSupported(oTile)) {
|
|
183
|
+
var oGetAppEntityFromTilePromise = this._getAppEntityFromTile(oTile)
|
|
184
|
+
.then(function (oApp) {
|
|
185
|
+
if (oApp) {
|
|
186
|
+
aFormattedApps.push(oApp);
|
|
187
|
+
} else {
|
|
188
|
+
// if this is not an app this is a custom tile.
|
|
189
|
+
iNumberOfCustomTiles++;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
aPromises.push(oGetAppEntityFromTilePromise);
|
|
193
|
+
}
|
|
194
|
+
}.bind(this));
|
|
195
|
+
return Promise.all(aPromises);
|
|
196
|
+
}.bind(this))
|
|
197
|
+
.then(function () {
|
|
198
|
+
return {
|
|
199
|
+
iNumberOfCustomTiles: iNumberOfCustomTiles,
|
|
200
|
+
aFormattedApps: aFormattedApps
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
AllMyAppsManager.prototype._onHandleGroupPress = function (ev, oData) {
|
|
206
|
+
window.hasher.setHash("#Shell-home");
|
|
207
|
+
// Close the popover on navigation (it should be explicitly closed when navigating with the same hash)
|
|
208
|
+
this.oPopover.close();
|
|
209
|
+
var oBus = sap.ui.getCore().getEventBus();
|
|
210
|
+
|
|
211
|
+
// This is in the case of cold start
|
|
212
|
+
oBus.subscribe("launchpad", "dashboardModelContentLoaded", function () {
|
|
213
|
+
oBus.publish("launchpad", "scrollToGroupByName", {
|
|
214
|
+
groupName: oData.title,
|
|
215
|
+
isInEditTitle: false
|
|
216
|
+
});
|
|
217
|
+
}, this);
|
|
218
|
+
|
|
219
|
+
// Try to open in case we are not in cold start
|
|
220
|
+
oBus.publish("launchpad", "scrollToGroupByName", {
|
|
221
|
+
groupName: oData.title,
|
|
222
|
+
isInEditTitle: false
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
AllMyAppsManager.prototype._handleExternalProvidersData = function () {
|
|
227
|
+
var that = this;
|
|
228
|
+
return sap.ushell.Container.getServiceAsync("AllMyApps")
|
|
229
|
+
.then(function (AllMyApps) {
|
|
230
|
+
var oExternalProviders = AllMyApps.getDataProviders();
|
|
231
|
+
var aExternalProvidersIDs = Object.keys(oExternalProviders);
|
|
232
|
+
var sExternalProviderId;
|
|
233
|
+
var oExternalProvider;
|
|
234
|
+
var sExternalProviderTitle;
|
|
235
|
+
var oExternalProviderModelEntry;
|
|
236
|
+
var index;
|
|
237
|
+
var oExternalProviderPromise;
|
|
238
|
+
|
|
239
|
+
// Get external providers apps
|
|
240
|
+
if (aExternalProvidersIDs.length > 0) {
|
|
241
|
+
for (index = 0; index < aExternalProvidersIDs.length; index++) {
|
|
242
|
+
sExternalProviderId = aExternalProvidersIDs[index];
|
|
243
|
+
oExternalProvider = oExternalProviders[sExternalProviderId];
|
|
244
|
+
sExternalProviderTitle = oExternalProvider.getTitle();
|
|
245
|
+
oExternalProviderModelEntry = {};
|
|
246
|
+
oExternalProviderModelEntry.title = sExternalProviderTitle;
|
|
247
|
+
oExternalProviderPromise = oExternalProvider.getData();
|
|
248
|
+
oExternalProviderPromise.done(function (aProviderDataArray) {
|
|
249
|
+
// If the promise for data is resolved valid array of at least one group
|
|
250
|
+
if (aProviderDataArray && (aProviderDataArray.length > 0)) {
|
|
251
|
+
this.groups = aProviderDataArray;
|
|
252
|
+
this.type = AllMyAppsProviderType.EXTERNAL;
|
|
253
|
+
that.oModel.setProperty("/AppsData/" + that.iNumberOfProviders, this);
|
|
254
|
+
that.iNumberOfProviders += 1;
|
|
255
|
+
// Publish event all my apps finished loading.
|
|
256
|
+
var oEventBus = sap.ui.getCore().getEventBus();
|
|
257
|
+
oEventBus.publish("launchpad", "allMyAppsMasterLoaded");
|
|
258
|
+
}
|
|
259
|
+
}.bind(oExternalProviderModelEntry));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
AllMyAppsManager.prototype._handleNotFirstCatalogsLoad = function () {
|
|
266
|
+
var oModel = this.oModel.getProperty("/AppsData");
|
|
267
|
+
var sCatalogProvider = AllMyAppsProviderType.CATALOG;
|
|
268
|
+
if (oModel.length && oModel[oModel.length - 1].type === sCatalogProvider) {
|
|
269
|
+
this.bFirstCatalogLoaded = true;
|
|
270
|
+
sap.ui.getCore().getEventBus().publish("launchpad", "allMyAppsFirstCatalogLoaded", { bFirstCatalogLoadedEvent: true });
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
AllMyAppsManager.prototype._handleCatalogs = function (loadCatalogs) {
|
|
275
|
+
if (!loadCatalogs) {
|
|
276
|
+
this._handleNotFirstCatalogsLoad();
|
|
277
|
+
return Promise.resolve();
|
|
278
|
+
}
|
|
279
|
+
this.bFirstCatalogLoaded = false;
|
|
280
|
+
// Array of promise objects that are generated inside addCatalogToModel (the "progress" function of getCatalogs)
|
|
281
|
+
this.aPromises = [];
|
|
282
|
+
// Get catalog apps
|
|
283
|
+
return sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
284
|
+
.then(function (LaunchPage) {
|
|
285
|
+
LaunchPage.getCatalogs()
|
|
286
|
+
// There's a need to make sure that onDoneLoadingCatalogs is called only after all catalogs are loaded
|
|
287
|
+
// (i.e. all calls to addCatalogToModel are finished).
|
|
288
|
+
// For this, all the promise objects that are generated inside addCatalogToModel are generated into this.aPromises,
|
|
289
|
+
// and jQuery.when calls onDoneLoadingCatalogs only after all the promises are resolved
|
|
290
|
+
.done(function (/*catalogs*/) {
|
|
291
|
+
jQuery.when.apply(jQuery, this.aPromises).then(this._onDoneLoadingCatalogs.bind(this));
|
|
292
|
+
}.bind(this))
|
|
293
|
+
// in case of a severe error, show an error message
|
|
294
|
+
.fail(function (/*args*/) {
|
|
295
|
+
this._onGetCatalogsFail(resources.i18n.getText("fail_to_load_catalog_msg"));
|
|
296
|
+
}.bind(this))
|
|
297
|
+
// for each loaded catalog, add it to the model
|
|
298
|
+
.progress(this._addCatalogToModel.bind(this));
|
|
299
|
+
}.bind(this));
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
AllMyAppsManager.prototype._addCatalogToModel = function (oCatalog) {
|
|
303
|
+
var LaunchPage;
|
|
304
|
+
var oProviderModelEntry = {
|
|
305
|
+
apps: [],
|
|
306
|
+
numberCustomTiles: 0,
|
|
307
|
+
type: null
|
|
308
|
+
};
|
|
309
|
+
var iProvidersIndex;
|
|
310
|
+
var aPromises = [
|
|
311
|
+
sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
312
|
+
];
|
|
313
|
+
|
|
314
|
+
// Even though the code is asynchronous now there might be severe race conditions if this method gets called multiple times in a short timeframe.
|
|
315
|
+
// Therefore we ensure the calls are handled synchronously
|
|
316
|
+
if (this._oAddCatalogToModelPromise) {
|
|
317
|
+
aPromises.push(this._oAddCatalogToModelPromise);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
this._oAddCatalogToModelPromise = Promise.all(aPromises)
|
|
321
|
+
.then(function (aValues) {
|
|
322
|
+
LaunchPage = aValues[0];
|
|
323
|
+
oProviderModelEntry.type = AllMyAppsProviderType.CATALOG;
|
|
324
|
+
|
|
325
|
+
var oCatalogTilesPromise = LaunchPage.getCatalogTiles(oCatalog);
|
|
326
|
+
this.aPromises.push(oCatalogTilesPromise);
|
|
327
|
+
return oCatalogTilesPromise;
|
|
328
|
+
}.bind(this))
|
|
329
|
+
.then(function (aCatalogTiles) {
|
|
330
|
+
var aProviders;
|
|
331
|
+
if (aCatalogTiles.length === 0) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
// find if catalog with the same name already exists.
|
|
335
|
+
var sCatalogName = LaunchPage.getCatalogTitle(oCatalog);
|
|
336
|
+
|
|
337
|
+
aProviders = this.oModel.getProperty("/AppsData");
|
|
338
|
+
for (iProvidersIndex = 0; iProvidersIndex < aProviders.length; iProvidersIndex++) {
|
|
339
|
+
if ((aProviders[iProvidersIndex].type === AllMyAppsProviderType.CATALOG) && (aProviders[iProvidersIndex].title === sCatalogName)) {
|
|
340
|
+
// if not create a new catalog entry.
|
|
341
|
+
oProviderModelEntry = aProviders[iProvidersIndex];
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// add the attributes and tile for the catalog.
|
|
347
|
+
oProviderModelEntry.title = LaunchPage.getCatalogTitle(oCatalog);
|
|
348
|
+
return this._getFormattedGroupApps(aCatalogTiles);
|
|
349
|
+
}.bind(this))
|
|
350
|
+
.then(function (oResult) {
|
|
351
|
+
if (!oResult) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
// Extend the array since we might have found an existing ProviderModelEntry with included apps
|
|
355
|
+
Array.prototype.push.apply(oProviderModelEntry.apps, oResult.aFormattedApps);
|
|
356
|
+
oProviderModelEntry.numberCustomTiles = oResult.iNumberOfCustomTiles;
|
|
357
|
+
if (oProviderModelEntry.numberCustomTiles === 1) {
|
|
358
|
+
oProviderModelEntry.sCustomLabel = resources.i18n.getText("allMyApps_customStringSingle");
|
|
359
|
+
oProviderModelEntry.sCustomLink = resources.i18n.getText("allMyApps_customLinkAppFinderSingle");
|
|
360
|
+
} else {
|
|
361
|
+
oProviderModelEntry.sCustomLabel = resources.i18n.getText("allMyApps_customString", [oProviderModelEntry.numberCustomTiles]);
|
|
362
|
+
oProviderModelEntry.sCustomLink = resources.i18n.getText("allMyApps_customLinkAppFinder");
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
oProviderModelEntry.handlePress = function (ev, oData) {
|
|
366
|
+
// Close the popover on navigation (it should be explicitly closed when navigating with the same hash)
|
|
367
|
+
this.oPopover.close();
|
|
368
|
+
window.hasher.setHash("#Shell-home&/appFinder/catalog/" + JSON.stringify({
|
|
369
|
+
catalogSelector: oData.title,
|
|
370
|
+
tileFilter: "",
|
|
371
|
+
tagFilter: "[]",
|
|
372
|
+
targetGroup: ""
|
|
373
|
+
}));
|
|
374
|
+
}.bind(this);
|
|
375
|
+
|
|
376
|
+
// Add the catalog to the model as a data-source/provider only if it includes at least one app
|
|
377
|
+
if (oProviderModelEntry.apps.length > 0 || oProviderModelEntry.numberCustomTiles > 0) {
|
|
378
|
+
this.oModel.setProperty("/AppsData/" + iProvidersIndex, oProviderModelEntry);
|
|
379
|
+
if (this.bFirstCatalogLoaded === false) {
|
|
380
|
+
sap.ui.getCore().getEventBus().publish("launchpad", "allMyAppsFirstCatalogLoaded", { bFirstCatalogLoadedEvent: true });
|
|
381
|
+
this.bFirstCatalogLoaded = true;
|
|
382
|
+
}
|
|
383
|
+
this.iNumberOfProviders += 1;
|
|
384
|
+
}
|
|
385
|
+
}.bind(this));
|
|
386
|
+
return this._oAddCatalogToModelPromise;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
AllMyAppsManager.prototype._onGetCatalogsFail = function (sMessage) {
|
|
390
|
+
return sap.ushell.Container.getServiceAsync("Message")
|
|
391
|
+
.then(function (Message) {
|
|
392
|
+
Message.info(sMessage);
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
AllMyAppsManager.prototype._onDoneLoadingCatalogs = function () {
|
|
397
|
+
// Sort the catalogs alphabetically for continuity reasons
|
|
398
|
+
var oModel = this.oModel.getProperty("/AppsData");
|
|
399
|
+
oModel.sort(function (a, b) {
|
|
400
|
+
var nameA = a.title.toUpperCase();
|
|
401
|
+
var nameB = b.title.toUpperCase();
|
|
402
|
+
if (nameA < nameB) {
|
|
403
|
+
return -1;
|
|
404
|
+
}
|
|
405
|
+
if (nameA > nameB) {
|
|
406
|
+
return 1;
|
|
407
|
+
}
|
|
408
|
+
return 0;
|
|
409
|
+
});
|
|
410
|
+
this.oModel.setProperty("/AppsData", oModel);
|
|
411
|
+
|
|
412
|
+
var oEventBus = sap.ui.getCore().getEventBus();
|
|
413
|
+
|
|
414
|
+
if (!this.bFirstCatalogLoaded) {
|
|
415
|
+
oEventBus.publish("launchpad", "allMyAppsNoCatalogsLoaded");
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
AllMyAppsManager.prototype._getAppEntityFromTile = function (oCatalogTile) {
|
|
420
|
+
return sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
421
|
+
.then(function (LaunchPage) {
|
|
422
|
+
var oApp;
|
|
423
|
+
var sTileTitle = LaunchPage.getCatalogTilePreviewTitle(oCatalogTile);
|
|
424
|
+
var sTileSubTitle = LaunchPage.getCatalogTilePreviewSubtitle(oCatalogTile);
|
|
425
|
+
var sTileUrl = LaunchPage.getCatalogTileTargetURL(oCatalogTile);
|
|
426
|
+
|
|
427
|
+
// If the tile has a valid url and either title or subtitle
|
|
428
|
+
if (sTileUrl && (sTileTitle || sTileSubTitle)) {
|
|
429
|
+
oApp = {};
|
|
430
|
+
oApp.url = sTileUrl;
|
|
431
|
+
if (sTileTitle) {
|
|
432
|
+
oApp.title = sTileTitle;
|
|
433
|
+
oApp.subTitle = sTileSubTitle;
|
|
434
|
+
} else {
|
|
435
|
+
oApp.title = sTileSubTitle;
|
|
436
|
+
}
|
|
437
|
+
return oApp;
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* restore deprecated globals
|
|
444
|
+
* @deprecated since 1.120.0
|
|
445
|
+
*/
|
|
446
|
+
(function () {
|
|
447
|
+
setTimeout(() => { // defer by a tick to avoid circular dependencies
|
|
448
|
+
sap.ui.require(["sap/ushell/renderers/fiori2/allMyApps/AllMyAppsManager"], function () {});
|
|
449
|
+
}, 0);
|
|
450
|
+
})();
|
|
451
|
+
|
|
452
|
+
return new AllMyAppsManager();
|
|
453
|
+
});
|
|
@@ -1920,3 +1920,7 @@ ISO_8601WeekNumberingText=Monday is the first day of the week; the week containi
|
|
|
1920
1920
|
MiddleEasternWeekNumberingText=Saturday is the first day of the week; the week containing January 1st is the first week of the year.
|
|
1921
1921
|
#XTXT
|
|
1922
1922
|
WesternTraditionalWeekNumberingText=Sunday is the first day of the week; the week containing January 1st is the first week of the year.
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
#XFLD Announced to screen readers to mark tiles as interactive elements (link)
|
|
1926
|
+
VizInstance.AriaDescription.Link=Link
|
package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/Component.js
RENAMED
|
@@ -8,7 +8,7 @@ sap.ui.define([
|
|
|
8
8
|
], function (UIComponent, View, i18n, ObjectPath) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
|
-
return UIComponent.extend("sap/ushell/
|
|
11
|
+
return UIComponent.extend("sap/ushell/renderer/search/searchComponent", {
|
|
12
12
|
metadata: {
|
|
13
13
|
manifest: "json",
|
|
14
14
|
library: "sap.ushell",
|
|
@@ -29,9 +29,9 @@ sap.ui.define([
|
|
|
29
29
|
bIsCEPStandard = bIsSearchCEPEnabled === true && sPlatform === "cFLP";
|
|
30
30
|
|
|
31
31
|
if (bIsCEPStandard === true) {
|
|
32
|
-
sViewName = "module:sap/ushell/
|
|
32
|
+
sViewName = "module:sap/ushell/renderer/search/searchComponent/view/CEPSearchApp.view";
|
|
33
33
|
} else {
|
|
34
|
-
sViewName = "module:sap/ushell/
|
|
34
|
+
sViewName = "module:sap/ushell/renderer/search/searchComponent/view/SearchApp.view";
|
|
35
35
|
}
|
|
36
36
|
return View.create({
|
|
37
37
|
id: "searchContainerApp",
|
|
@@ -6,7 +6,7 @@ sap.ui.define([
|
|
|
6
6
|
Controller, SearchModel, util
|
|
7
7
|
) {
|
|
8
8
|
"use strict";
|
|
9
|
-
return Controller.extend("sap/ushell/
|
|
9
|
+
return Controller.extend("sap/ushell/renderer/search/searchComponent/SearchApp", {
|
|
10
10
|
|
|
11
11
|
onInit: function () {
|
|
12
12
|
|
|
@@ -9,7 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
|
|
10
10
|
var isOutdatedElisa = !SearchShellHelper.collapseSearch;
|
|
11
11
|
|
|
12
|
-
return Controller.extend("sap/ushell/
|
|
12
|
+
return Controller.extend("sap/ushell/renderer/search/searchComponent/SearchApp", {
|
|
13
13
|
|
|
14
14
|
onInit: function () {
|
|
15
15
|
// this.oShellNavigation = sap.ushell.Container.getService("ShellNavigation");
|
package/src/main/js/sap/ushell/{renderers/fiori2 → renderer}/search/searchComponent/manifest.json
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_version": "1.21.0",
|
|
3
3
|
"sap.app": {
|
|
4
|
-
"id": "sap.ushell.
|
|
4
|
+
"id": "sap.ushell.renderer.search.searchComponent",
|
|
5
5
|
"applicationVersion": {
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.120.0"
|
|
7
7
|
},
|
|
8
8
|
"type": "component"
|
|
9
9
|
},
|
|
@@ -7,10 +7,10 @@ sap.ui.define([
|
|
|
7
7
|
"sap/esh/search/ui/SearchModel"
|
|
8
8
|
], function (View, Label, SearchCompositeControl, SearchModel) {
|
|
9
9
|
"use strict";
|
|
10
|
-
return View.extend("sap.ushell.
|
|
10
|
+
return View.extend("sap.ushell.renderer.search.searchComponent.view.CEPSearchApp", {
|
|
11
11
|
|
|
12
12
|
getControllerName: function () {
|
|
13
|
-
return "sap.ushell.
|
|
13
|
+
return "sap.ushell.renderer.search.searchComponent.controller.CEPSearchApp";
|
|
14
14
|
},
|
|
15
15
|
|
|
16
16
|
createContent: function () {
|
|
@@ -7,10 +7,10 @@ sap.ui.define([
|
|
|
7
7
|
"sap/esh/search/ui/SearchModel"
|
|
8
8
|
], function (View, Label, SearchCompositeControl, SearchModel) {
|
|
9
9
|
"use strict";
|
|
10
|
-
return View.extend("sap.ushell.
|
|
10
|
+
return View.extend("sap.ushell.renderer.search.searchComponent.view.SearchApp", {
|
|
11
11
|
|
|
12
12
|
getControllerName: function () {
|
|
13
|
-
return "sap.ushell.
|
|
13
|
+
return "sap.ushell.renderer.search.searchComponent.controller.SearchApp";
|
|
14
14
|
},
|
|
15
15
|
|
|
16
16
|
createContent: function () {
|
|
@@ -1,74 +1,13 @@
|
|
|
1
1
|
// Copyright (c) 2009-2023 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* File was moved to sap/ushell/renderer/History
|
|
5
|
+
* @deprecated since 1.120.0
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ushell/renderer/History"
|
|
9
|
+
], function (History) {
|
|
4
10
|
"use strict";
|
|
5
11
|
|
|
6
|
-
var History = function () {
|
|
7
|
-
this._history = [];
|
|
8
|
-
this.backwards = false;
|
|
9
|
-
this._historyPosition = -1;
|
|
10
|
-
this._virtual = {};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
History.prototype.hashChange = function (newHash/*, oldHash*/) {
|
|
14
|
-
var historyIndex = this._history.indexOf(newHash);
|
|
15
|
-
|
|
16
|
-
// new history entry
|
|
17
|
-
if (historyIndex === -1) {
|
|
18
|
-
// new item and there where x back navigations before - remove all the forward items from the history
|
|
19
|
-
if (this._historyPosition + 1 < this._history.length) {
|
|
20
|
-
this._history = this._history.slice(0, this._historyPosition + 1);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
this._history.push(newHash);
|
|
24
|
-
|
|
25
|
-
this._historyPosition += 1;
|
|
26
|
-
this.backwards = false;
|
|
27
|
-
this.forwards = false;
|
|
28
|
-
} else {
|
|
29
|
-
// internalNavigation
|
|
30
|
-
this.backwards = this._historyPosition > historyIndex;
|
|
31
|
-
this.forwards = this._historyPosition < historyIndex;
|
|
32
|
-
|
|
33
|
-
this._historyPosition = historyIndex;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
History.prototype.pop = function () {
|
|
38
|
-
var sLastHistory;
|
|
39
|
-
if (this._history.length > 0) {
|
|
40
|
-
sLastHistory = this._history.pop();
|
|
41
|
-
this._historyPosition--;
|
|
42
|
-
}
|
|
43
|
-
return sLastHistory;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
History.prototype.isVirtualHashchange = function (newHash, oldHash) {
|
|
47
|
-
// the old hash was flagged as virtual
|
|
48
|
-
return this._virtual.hasOwnProperty(oldHash) &&
|
|
49
|
-
// the new Hash is the current One
|
|
50
|
-
this.getCurrentHash() === newHash &&
|
|
51
|
-
// the history has forward entries
|
|
52
|
-
this._history.length - 1 > this._historyPosition &&
|
|
53
|
-
// the old hash was the hash in the forward history direction
|
|
54
|
-
this._history[this._historyPosition + 1] === oldHash;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
History.prototype.setVirtualNavigation = function (hash) {
|
|
58
|
-
this._virtual[hash] = true;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
History.prototype.getCurrentHash = function () {
|
|
62
|
-
return this._history[this._historyPosition] || null;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
History.prototype.getHashIndex = function (hash) {
|
|
66
|
-
return this._history.indexOf(hash);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
History.prototype.getHistoryLength = function () {
|
|
70
|
-
return this._history.length;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
12
|
return History;
|
|
74
13
|
}, /* bExport= */ true);
|