@sapui5/sap.ushell 1.119.3 → 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/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,641 @@
|
|
|
1
|
+
// Copyright (c) 2009-2023 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview The Unified Shell's personalization service, which provides generic read and write access to the currently logged on user's
|
|
5
|
+
* personalization settings for the app currently executed in the shell.
|
|
6
|
+
*
|
|
7
|
+
* @version 1.120.0
|
|
8
|
+
*/
|
|
9
|
+
sap.ui.define([
|
|
10
|
+
"sap/base/Log",
|
|
11
|
+
"sap/base/util/Deferred",
|
|
12
|
+
"sap/ui/base/ManagedObject",
|
|
13
|
+
"sap/ui/base/Object",
|
|
14
|
+
"sap/ui/core/Core",
|
|
15
|
+
"sap/ui/thirdparty/jquery",
|
|
16
|
+
"sap/ushell/utils",
|
|
17
|
+
"sap/ushell/services/PersonalizationV2/utils",
|
|
18
|
+
"sap/ushell/services/PersonalizationV2/constants",
|
|
19
|
+
"sap/ushell/services/PersonalizationV2/ContextContainer",
|
|
20
|
+
"sap/ushell/services/PersonalizationV2/WindowAdapter",
|
|
21
|
+
"sap/ushell/services/PersonalizationV2/TransientPersonalizer", // private
|
|
22
|
+
"sap/ushell/services/PersonalizationV2/Personalizer", // private
|
|
23
|
+
"sap/ushell/services/PersonalizationV2/VariantSetAdapter",
|
|
24
|
+
"sap/ushell/services/PersonalizationV2/Variant",
|
|
25
|
+
"sap/ushell/services/PersonalizationV2/VariantSet",
|
|
26
|
+
"sap/ushell/services/PersonalizationV2/WindowAdapterContainer"
|
|
27
|
+
], function (
|
|
28
|
+
Log,
|
|
29
|
+
Deferred,
|
|
30
|
+
ManagedObject,
|
|
31
|
+
BaseObject,
|
|
32
|
+
Core,
|
|
33
|
+
jQuery,
|
|
34
|
+
ushellUtils,
|
|
35
|
+
personalizationUtils,
|
|
36
|
+
publicConstants,
|
|
37
|
+
ContextContainer,
|
|
38
|
+
WindowAdapter,
|
|
39
|
+
TransientPersonalizer,
|
|
40
|
+
Personalizer,
|
|
41
|
+
VariantSetAdapter,
|
|
42
|
+
Variant,
|
|
43
|
+
VariantSet,
|
|
44
|
+
WindowAdapterContainer
|
|
45
|
+
) {
|
|
46
|
+
"use strict";
|
|
47
|
+
|
|
48
|
+
// TODO conditional loading
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @typedef {object} sap.ushell.services.PersonalizationV2.Scope
|
|
52
|
+
* currently the validity property of the scope object is relevant:
|
|
53
|
+
* @property {int} [validity=Infinity] validity of the container persistence in minutes<br>
|
|
54
|
+
* 0 ( per FLP Window), <br>
|
|
55
|
+
* Infinity, undefined (front-end server persistence per user )<br>
|
|
56
|
+
* x Minutes (front-end server persistence per user, ignored if older than x minutes)
|
|
57
|
+
* @property {sap.ushell.services.PersonalizationV2.constants.keyCategory} [keyCategory=GENERATED_KEY] Type or category of key
|
|
58
|
+
* @property {sap.ushell.services.PersonalizationV2.constants.writeFrequency} [writeFrequency=HIGH] Expected frequency how often users will use this container to store data inside
|
|
59
|
+
* @property {boolean} [clientStorageAllowed=false] Defines if storage on client side should be allowed or not
|
|
60
|
+
* @property {boolean} [shared=false] Indicates the container is intended to be shared across multiple applications
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @typedef {object} sap.ushell.services.PersonalizationV2.PersId
|
|
67
|
+
* currently the validity property of the scope object is relevant:
|
|
68
|
+
* @property {string} container Identifies the set of personalization data that is loaded/saved as one bundle from the front-end server.
|
|
69
|
+
* @property {string} item The name of the object the personalization is applied to.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* Implementation note:
|
|
76
|
+
*
|
|
77
|
+
* ITEM#<itemkey>
|
|
78
|
+
* VARIANTSET#<variantset>
|
|
79
|
+
* sap-ushell-container-scope : {}
|
|
80
|
+
* sap-ushell-container-
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @alias sap.ushell.services.PersonalizationV2
|
|
85
|
+
* @class
|
|
86
|
+
* @classdesc The Unified Shell's personalization service.
|
|
87
|
+
* Provides a personalizer object that handles all personalization operations.
|
|
88
|
+
*
|
|
89
|
+
* <b>Note:</b> To retrieve a valid instance of this service, it is necessary to call
|
|
90
|
+
* <code>sap.ushell.Container.getServiceAsync("PersonalizationV2")</code>. For details, see
|
|
91
|
+
* {@link sap.ushell.services.Container#getServiceAsync}.
|
|
92
|
+
*
|
|
93
|
+
* @param {object} oAdapter the service adapter for the personalization service, as already provided by the container
|
|
94
|
+
* @param {object} oContainerInterface Container Interface
|
|
95
|
+
* @param {string} sParameter Parameter
|
|
96
|
+
* @param {object} oConfig Config
|
|
97
|
+
*
|
|
98
|
+
* @hideconstructor
|
|
99
|
+
*
|
|
100
|
+
* @since 1.120.0
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
function PersonalizationV2 (oAdapter, oContainerInterface, sParameter, oConfig) {
|
|
104
|
+
this._oConfig = (oConfig && oConfig.config) || {};
|
|
105
|
+
|
|
106
|
+
this._oAppVariantAdapterWithBackendAdapter = this._configureAppVariantStorage(this._oConfig.appVariantStorage);
|
|
107
|
+
|
|
108
|
+
this._oAdapterWithBackendAdapter = {
|
|
109
|
+
lazy: false,
|
|
110
|
+
instance: new WindowAdapter(this, oAdapter)
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
this._oAdapterWindowOnly = {
|
|
114
|
+
lazy: false,
|
|
115
|
+
instance: new WindowAdapter(this, undefined)
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
this._oContainerMap = new ushellUtils.Map();
|
|
119
|
+
// map: sPrefixedContainerKey -> promise object of getPersonalizationContainer
|
|
120
|
+
this._oPendingOperationsMap = new ushellUtils.Map();
|
|
121
|
+
// map: sContainerKey -> pending operation (deferred object, potentially extended with _sapTimeoutId, _sapFnSave)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
PersonalizationV2.prototype.SAVE_DEFERRED_DROPPED = "Deferred save dropped (OK) - Data superseded by subsequent save";
|
|
125
|
+
//constants for scope of personalization service
|
|
126
|
+
PersonalizationV2.prototype.constants = publicConstants;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Configures the adapter to store app variants. When app variant storage is enabled,
|
|
130
|
+
* personalization on app variants is handled and stored using a separate adapter.
|
|
131
|
+
*
|
|
132
|
+
* @param {object} oAppVariantStorageConfig The service configuration for app variant storage.
|
|
133
|
+
* @returns {{lazy: boolean, create: function}} Where <code>function</code> returns a promise that resolves with the app variant adapter or rejects with an error message.
|
|
134
|
+
*
|
|
135
|
+
* @since 1.120.0
|
|
136
|
+
* @private
|
|
137
|
+
*/
|
|
138
|
+
PersonalizationV2.prototype._configureAppVariantStorage = function (oAppVariantStorageConfig) {
|
|
139
|
+
var that = this;
|
|
140
|
+
var sDefaultAppVariantAdapter = "sap.ushell.adapters.AppVariantPersonalizationAdapter";
|
|
141
|
+
|
|
142
|
+
if (!oAppVariantStorageConfig) {
|
|
143
|
+
// default
|
|
144
|
+
oAppVariantStorageConfig = { adapter: { module: sDefaultAppVariantAdapter } };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (Object.keys(oAppVariantStorageConfig).length === 0 || oAppVariantStorageConfig.enabled === false) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
var sAdapterModuleName = (oAppVariantStorageConfig.adapter && oAppVariantStorageConfig.adapter.module) || sDefaultAppVariantAdapter;
|
|
152
|
+
var sAdapterModulePath = sAdapterModuleName.split(".").join("/");
|
|
153
|
+
|
|
154
|
+
// lazy load
|
|
155
|
+
var fnCreate = function () {
|
|
156
|
+
that._oAppVariantAdapterLoadPromise = that._oAppVariantAdapterLoadPromise || (function () {
|
|
157
|
+
var oDeferred = new Deferred();
|
|
158
|
+
|
|
159
|
+
try {
|
|
160
|
+
sap.ui.require([sAdapterModulePath], fnRequireSuccess);
|
|
161
|
+
} catch (oRequireError) {
|
|
162
|
+
oDeferred.reject(oRequireError);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function fnRequireSuccess (AppVariantPersonalizationAdapter) {
|
|
166
|
+
try {
|
|
167
|
+
var oAdapter = new AppVariantPersonalizationAdapter();
|
|
168
|
+
var oWrappedAdapter = new WindowAdapter(that, oAdapter);
|
|
169
|
+
|
|
170
|
+
oDeferred.resolve(oWrappedAdapter);
|
|
171
|
+
} catch (oError) {
|
|
172
|
+
oDeferred.reject(oError);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return oDeferred.promise;
|
|
177
|
+
})();
|
|
178
|
+
|
|
179
|
+
return that._oAppVariantAdapterLoadPromise;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
lazy: true,
|
|
184
|
+
create: fnCreate
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Returns a generated key.
|
|
190
|
+
* This key is suitably random, but it is susceptible to brute force attacks.
|
|
191
|
+
* Storages based on the generated key must not be used for sensitive data.
|
|
192
|
+
*
|
|
193
|
+
* @returns {Promise<string>} 40 character string consisting of A-Z and 0-9 which can be used as a generated key for personalization container.
|
|
194
|
+
* Every invocation returns a new key. Seed of random function is OS Random Seed.
|
|
195
|
+
*
|
|
196
|
+
* @since 1.120.0
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
199
|
+
PersonalizationV2.prototype.getGeneratedKey = async function () {
|
|
200
|
+
return ushellUtils.generateRandomKey();
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Returns a personalizer object which handles personalization by asynchronous operations storing
|
|
205
|
+
* the personalization data immediately via the connected adapter.
|
|
206
|
+
* For each operation a round trip is executed.
|
|
207
|
+
*
|
|
208
|
+
* Do not mix the usage of a personalizer and a personalization container for one containerKey.
|
|
209
|
+
*
|
|
210
|
+
* Fetching multiple Personalizer for the same container, but different items is not supported.
|
|
211
|
+
* Use {@link sap.ushell.services.Personalizer#getContainer} instead for this scenario.
|
|
212
|
+
*
|
|
213
|
+
* @param {sap.ushell.services.PersonalizationV2.PersId} oPersId object for identifying the data
|
|
214
|
+
* @param {sap.ushell.services.PersonalizationV2.Scope} oScope scope object<br>
|
|
215
|
+
* E.g. <code> { validity: 30}</code> indicates a validity of the data for 30 minutes.
|
|
216
|
+
* @param {sap.ui.core.Component} [oComponent] Component which uses the personalizer. This allows to associate the stored data with the application.
|
|
217
|
+
* @returns {Promise<sap.ushell.services.PersonalizationV2.Personalizer>} which provides generic read and write access to
|
|
218
|
+
* the currently logged on user's personalization settings.
|
|
219
|
+
*
|
|
220
|
+
* @since 1.120.0
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
PersonalizationV2.prototype.getPersonalizer = async function (oPersId, oScope, oComponent) {
|
|
224
|
+
oComponent = oComponent || this._getApplicationComponent();
|
|
225
|
+
|
|
226
|
+
return new Personalizer(this, this._oAdapterWithBackendAdapter.instance, oPersId, oScope, oComponent);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Attempts to retrieve the component of the currently running application.
|
|
231
|
+
*
|
|
232
|
+
* @returns {sap.ui.core.Component} The current application component
|
|
233
|
+
*
|
|
234
|
+
* @since 1.120.0
|
|
235
|
+
* @private
|
|
236
|
+
*/
|
|
237
|
+
PersonalizationV2.prototype._getApplicationComponent = function () {
|
|
238
|
+
var sOwnerId = ManagedObject._sOwnerId;
|
|
239
|
+
if (sOwnerId) {
|
|
240
|
+
var oComponent = Core.getComponent(sOwnerId);
|
|
241
|
+
if (BaseObject.isA(oComponent, "sap.ui.core.Component")) {
|
|
242
|
+
return oComponent;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return undefined;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Returns a transient personalizer object which handles personalization by asynchronous operations storing
|
|
250
|
+
* the personalization data transiently as an object property.
|
|
251
|
+
* Primary usage of the transient personalizer is a personalization scenario with variants where
|
|
252
|
+
* the transient personalizer is used as a buffer for table personalization data.
|
|
253
|
+
*
|
|
254
|
+
* @returns {Promise<sap.ushell.services.PersonalizationV2.TransientPersonalizer>} which provides asynchronous read and write access
|
|
255
|
+
* to a transient personalization data storage.
|
|
256
|
+
*
|
|
257
|
+
* @since 1.120.0
|
|
258
|
+
* @public
|
|
259
|
+
*/
|
|
260
|
+
PersonalizationV2.prototype.getTransientPersonalizer = async function () {
|
|
261
|
+
return new TransientPersonalizer();
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Factory method to obtain a Data Context object, which is a local copy of the persistence layer data.
|
|
266
|
+
* The Container data is asynchronously read on creation if present, otherwise an initial object is created.
|
|
267
|
+
* The Container data can then be *synchronously* modified (getItemValue, setItemValue).
|
|
268
|
+
* Only on invoking the save() method the data is transferred to the persistence.
|
|
269
|
+
* This allows the application to perform multiple local modifications and delay the save operation.
|
|
270
|
+
*
|
|
271
|
+
* Every getContainer operation returns a new local copy, containing the full data at the point of creation.
|
|
272
|
+
*
|
|
273
|
+
* Executing load() on the container reloads the data from the persistence, discarding local changes.
|
|
274
|
+
*
|
|
275
|
+
* Note that the container allows the application to control the round trips to the front-end server persistence.
|
|
276
|
+
* The factory method getContainer is asynchronous and loads the container via the connected adapter from the front-end server.
|
|
277
|
+
* All operations (but for the save operation) are executed synchronously, operating on the local data.
|
|
278
|
+
* This allows the application to control the round trips to the front-end server persistence.
|
|
279
|
+
*
|
|
280
|
+
* A container can contain a set of items, identified by a key.
|
|
281
|
+
*
|
|
282
|
+
* You can wrap a container in a VariantSetAdapter to read and write a more complex structure (with multiple keys (variantSet,variant,item)).
|
|
283
|
+
*
|
|
284
|
+
* Do not mix up the usage of a personalizer and a container for one containerKey.
|
|
285
|
+
* Do not use a PersonalizationContainer and a Container for the same key except for migration scenarios.
|
|
286
|
+
*
|
|
287
|
+
* scope / validity parameter:
|
|
288
|
+
* An unspecified (undefined validity) or infinite (Infinity) validity indicates that data is persisted in the
|
|
289
|
+
* Personalization data of the front-end server. A round trip is executed on an initial get and at least every save operation.
|
|
290
|
+
* Data is stored per user and retained indefinitely at the front-end server.
|
|
291
|
+
*
|
|
292
|
+
* The validity parameter allows a designated storage validity for the created container.
|
|
293
|
+
* A 0 validity indicates the data is only persisted within the Fiori launchpad window.
|
|
294
|
+
* No round trips to the front-end server are executed. Data is lost if the Fiori launchpad window state is lost
|
|
295
|
+
* (e.g. by navigating to a different page, pressing F5 (reload page) or duplicating the window).
|
|
296
|
+
*
|
|
297
|
+
* For versions > 1.24 it may happen that for cross-app navigation a reload of the Fiori launchpad is triggered.
|
|
298
|
+
* In this case a storage of the personalization data in the Fiori launchpad window would lead to data loss.
|
|
299
|
+
* To overcome this a validity 0 is automatically changed to a validity 1440 (24h; storage on the front-end server).
|
|
300
|
+
* This is only done if a reload of the Fiori launchpad is triggered for a cross-app navigation.
|
|
301
|
+
*
|
|
302
|
+
* Security: It is the responsibility of the application to not persist information relevant to auditing or security
|
|
303
|
+
* using the PersonalizationService with inappropriate validity models.
|
|
304
|
+
* No mechanisms exist to destroy or selectively destroy application-specific data in the front-end server persistence (especially for validity Infinity).
|
|
305
|
+
*
|
|
306
|
+
* For non-zero validity scopes, data will be transmitted and persisted in the front-end server system.
|
|
307
|
+
*
|
|
308
|
+
* For limited validity, actual deletion of data on the front-end server is subject to explicit cleanup
|
|
309
|
+
* execution of front-end server jobs and not guaranteed.
|
|
310
|
+
* The data may still be persisted and retrievable.
|
|
311
|
+
* The interface only assures that expired data is no longer exposed to the application code in the Fiori launchpad.
|
|
312
|
+
*
|
|
313
|
+
* The ContainerKey uniquely defines the Container, validity is not part of the key (there are no separate namespaces per validity).
|
|
314
|
+
*
|
|
315
|
+
* In general, mixing different validity models for a given container key is not supported.
|
|
316
|
+
* Fast chaining of different methods may source arbitrary persistence layers.
|
|
317
|
+
* The validity of the resulting object in the done function of a promise is the last get validity.
|
|
318
|
+
*
|
|
319
|
+
* The validity associated with the last getContainer or createEmptyContainer determines the current
|
|
320
|
+
* validity of the container and the validity used during the next save operation.
|
|
321
|
+
*
|
|
322
|
+
* Naturally, if a delete or get with validity 0 is issued, it will *not* delete or retrieve a front-end server persistent storage.
|
|
323
|
+
* Thus a sequence delete( [validity 0])/wait for promise, getContainer(sKey,{ validity : Infinity}) may return a valid dataset.
|
|
324
|
+
*
|
|
325
|
+
* @param {string} sContainerKey Identifies the container. The string length is restricted to 40 characters
|
|
326
|
+
* @param {sap.ushell.services.PersonalizationV2.Scope} oScope Currently the validity property of the scope object is relevant:
|
|
327
|
+
* E.g. <code> { validity : 30}</code> indicates a validity of the data for 30 minutes.<br>
|
|
328
|
+
* @param {sap.ui.core.Component} oComponent Component which uses the container.
|
|
329
|
+
* This allows to associate the stored data with the application.
|
|
330
|
+
* @returns {Promise<sap.ushell.services.PersonalizationV2.ContextContainer>} Resolves a ContextContainer as parameter.
|
|
331
|
+
* The container provides setItemValue / getItemValue methods to synchronously operate on personalization data.
|
|
332
|
+
* By wrapping it in a VariantSetAdapter, an alternate interface to maintain variants can be obtained.
|
|
333
|
+
*
|
|
334
|
+
* @since 1.120.0
|
|
335
|
+
* @public
|
|
336
|
+
*/
|
|
337
|
+
PersonalizationV2.prototype.getContainer = async function (sContainerKey, oScope, oComponent) {
|
|
338
|
+
oComponent = oComponent || this._getApplicationComponent();
|
|
339
|
+
const oContainer = await this._createContainer(sContainerKey, oScope, false, oComponent);
|
|
340
|
+
return oContainer;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Factory method to obtain an empty Data Context object.
|
|
345
|
+
* When data present in a prior context is not relevant
|
|
346
|
+
* (e.g. when using a "uniquely" generated key and planning to overwrite any colliding front-end server data).
|
|
347
|
+
*
|
|
348
|
+
* The call always returns an cleared container().
|
|
349
|
+
*
|
|
350
|
+
* Note that an existing container at the front-end server is not actually deleted or overwritten unless a save operation is executed.
|
|
351
|
+
*
|
|
352
|
+
* An initial object is returned.
|
|
353
|
+
*
|
|
354
|
+
* @param {string} sContainerKey Identifies the container. The string length is restricted to 40 characters
|
|
355
|
+
* @param {sap.ushell.services.PersonalizationV2.Scope} oScope Currently the validity property of the scope object is relevant. <br>
|
|
356
|
+
* E.g. <code> { validity : 30}</code> indicates a validity of the data for 30 minutes.<br>
|
|
357
|
+
* @param {sap.ui.core.Component} oComponent Component which uses the container.
|
|
358
|
+
* This allows to associate the stored data with the application.
|
|
359
|
+
* @returns {Promise<sap.ushell.services.PersonalizationV2.ContextContainer>} Resolves a ContextContainer as parameter.
|
|
360
|
+
* object as parameter. The personalization container provides two different interfaces to synchronously operate on personalization data.
|
|
361
|
+
* In the item mode the container contains items as name value pairs for personalization data.
|
|
362
|
+
* In the variant mode the container contains variant sets which contain variants containing items.
|
|
363
|
+
*
|
|
364
|
+
* @since 1.120.0
|
|
365
|
+
* @public
|
|
366
|
+
*/
|
|
367
|
+
PersonalizationV2.prototype.createEmptyContainer = async function (sContainerKey, oScope, oComponent) {
|
|
368
|
+
oComponent = oComponent || this._getApplicationComponent();
|
|
369
|
+
const oContainer = await this._createContainer(sContainerKey, oScope, true, oComponent);
|
|
370
|
+
return oContainer;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* todo
|
|
375
|
+
* @param {string} sContainerKey
|
|
376
|
+
* @param {sap.ushell.services.PersonalizationV2.Scope} oScope
|
|
377
|
+
* @param {boolean} bCreateEmpty
|
|
378
|
+
* @param {sap.ui.core.Component} oComponent
|
|
379
|
+
*
|
|
380
|
+
* @returns {Promise}
|
|
381
|
+
*
|
|
382
|
+
* @since 1.120.0
|
|
383
|
+
* @private
|
|
384
|
+
*/
|
|
385
|
+
PersonalizationV2.prototype._createContainer = async function (sContainerKey, oScope, bCreateEmpty, oComponent) {
|
|
386
|
+
if (typeof sContainerKey !== "string") {
|
|
387
|
+
throw new ushellUtils.Error("sContainerKey is not a string: sap.ushell.services.Personalization", " " /* Empty string for missing component information */);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
var bUseAppVariantStorage = !!(personalizationUtils.isAppVariant(oComponent) && (!oScope || !oScope.shared) && this._oAppVariantAdapterWithBackendAdapter);
|
|
391
|
+
|
|
392
|
+
// -- adjust scope
|
|
393
|
+
var oAdjustedScope = personalizationUtils.adjustScope(oScope);
|
|
394
|
+
|
|
395
|
+
// -- add prefix
|
|
396
|
+
var sPrefixedContainerKey = personalizationUtils.addContainerPrefix(sContainerKey);
|
|
397
|
+
|
|
398
|
+
if (bUseAppVariantStorage) {
|
|
399
|
+
var oManifest = oComponent.getManifestObject();
|
|
400
|
+
oAdjustedScope.component = oComponent;
|
|
401
|
+
oAdjustedScope.appVarId = oManifest.getEntry("/sap.ui5/appVariantId");
|
|
402
|
+
oAdjustedScope.appVersion = oManifest.getEntry("/sap.app/applicationVersion/version");
|
|
403
|
+
|
|
404
|
+
// Check whether it is an app variant, then the prefixed container key gets changed by concatenating the app variant ID.
|
|
405
|
+
sPrefixedContainerKey += "#" + oManifest.getEntry("/sap.ui5/appVariantId");
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// -- choose adapter
|
|
409
|
+
var oPersistentAdapter = bUseAppVariantStorage ? this._oAppVariantAdapterWithBackendAdapter : this._oAdapterWithBackendAdapter;
|
|
410
|
+
var oTransientAdapter = this._oAdapterWindowOnly;
|
|
411
|
+
|
|
412
|
+
var oChosenAdapter = personalizationUtils.pickAdapter(oScope, oTransientAdapter, oPersistentAdapter);
|
|
413
|
+
|
|
414
|
+
const oLoadedAdapter = await personalizationUtils.loadAdapter(oChosenAdapter);
|
|
415
|
+
|
|
416
|
+
var oContextContainer = new ContextContainer(this, oLoadedAdapter, sPrefixedContainerKey, oAdjustedScope, oComponent);
|
|
417
|
+
|
|
418
|
+
// Historically, a sequence getContainer / load was always called.
|
|
419
|
+
|
|
420
|
+
// If an adapter supports returning an initialized container without requiring a subsequent load, it can set the flag
|
|
421
|
+
// supportsGetWithoutSubsequentLoad and the load call will be omitted in case an empty container is required.
|
|
422
|
+
var bSupportsGetWithoutSubsequentLoad = oLoadedAdapter && oLoadedAdapter.supportsGetWithoutSubsequentLoad === true;
|
|
423
|
+
|
|
424
|
+
if (!(bCreateEmpty && bSupportsGetWithoutSubsequentLoad)) {
|
|
425
|
+
await oContextContainer.load();
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (bCreateEmpty || oContextContainer.isExpired()) {
|
|
429
|
+
oContextContainer.clearData();
|
|
430
|
+
}
|
|
431
|
+
return oContextContainer;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Asynchronously starts a deletion request for the given container identified by sContainerKey.
|
|
436
|
+
* Can be called without having ever called getContainer with the corresponding key
|
|
437
|
+
*
|
|
438
|
+
* Note: After invoking this operation, the state of other containers obtained for the same key is undefined!
|
|
439
|
+
* If you want to use the container after deletion, it is strongly recommended to obtain
|
|
440
|
+
* a new instance of a container for the given key *after* the promise has returned.
|
|
441
|
+
*
|
|
442
|
+
* Note: Invoking this operation while another save or load operation is under way may result in failure.
|
|
443
|
+
*
|
|
444
|
+
* @param {string} sContainerKey identifies the container
|
|
445
|
+
* @param {sap.ushell.services.PersonalizationV2.Scope} oScope The scope
|
|
446
|
+
* @returns {Promise} promise for the deletion operation
|
|
447
|
+
*
|
|
448
|
+
* @since 1.120.0
|
|
449
|
+
* @public
|
|
450
|
+
*/
|
|
451
|
+
PersonalizationV2.prototype.deleteContainer = function (sContainerKey, oScope) {
|
|
452
|
+
// delete the bag, the adapter container & the container
|
|
453
|
+
var sPrefixedContainerKey = "";
|
|
454
|
+
var that = this;
|
|
455
|
+
oScope = that._adjustScope(oScope);
|
|
456
|
+
sPrefixedContainerKey = personalizationUtils.addContainerPrefix(sContainerKey);
|
|
457
|
+
const oDeferred = new jQuery.Deferred();
|
|
458
|
+
|
|
459
|
+
var oPrior = that._pendingContainerOperations_cancelAddNext(sContainerKey, null);
|
|
460
|
+
oPrior.always(function () {
|
|
461
|
+
that.getContainer(sContainerKey, oScope) // delays to oPrior! registers a new op!
|
|
462
|
+
.then(function (/*oContainer*/) {
|
|
463
|
+
var oAdapter;
|
|
464
|
+
// install the "latest" deferred
|
|
465
|
+
that._pendingContainerOperations_cancelAddNext(sContainerKey, oDeferred); // the getContainer above executed a load --> no flush required
|
|
466
|
+
|
|
467
|
+
oAdapter = oScope.validity === 0
|
|
468
|
+
? that._oAdapterWindowOnly
|
|
469
|
+
: that._oAdapterWithBackendAdapter;
|
|
470
|
+
|
|
471
|
+
personalizationUtils.loadAdapter(oAdapter).then(function (oLoadedAdapter) {
|
|
472
|
+
oLoadedAdapter.delAdapterContainer(sPrefixedContainerKey, oScope)
|
|
473
|
+
.fail(function (oError) {
|
|
474
|
+
Log.error("Delete failed", oError);
|
|
475
|
+
oDeferred.reject();
|
|
476
|
+
})
|
|
477
|
+
.done(function () {
|
|
478
|
+
oDeferred.resolve();
|
|
479
|
+
});
|
|
480
|
+
}, function (oError) {
|
|
481
|
+
Log.error("Delete failed", oError);
|
|
482
|
+
oDeferred.reject();
|
|
483
|
+
});
|
|
484
|
+
})
|
|
485
|
+
.catch(function (oError) {
|
|
486
|
+
Log.error("Delete failed", oError);
|
|
487
|
+
that._pendingContainerOperations_cancelAddNext(sContainerKey, oDeferred); // reinstall oPrior (!)
|
|
488
|
+
oDeferred.reject();
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
return ushellUtils.promisify(oDeferred.promise());
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* todo
|
|
496
|
+
* @param {string} sContainerKey
|
|
497
|
+
* @param {jQuery.Deferred} oDeferred
|
|
498
|
+
*
|
|
499
|
+
* @returns {jQuery.Deferred}
|
|
500
|
+
*
|
|
501
|
+
* @since 1.120.0
|
|
502
|
+
* @private
|
|
503
|
+
*/
|
|
504
|
+
PersonalizationV2.prototype._pendingContainerOperations_flushAddNext = function (sContainerKey, oDeferred) {
|
|
505
|
+
// return old promise, add oDeferred as new, if null, retain old!
|
|
506
|
+
var oPendingOpDeferred = this._oPendingOperationsMap.get(sContainerKey);
|
|
507
|
+
if (!oPendingOpDeferred) {
|
|
508
|
+
oPendingOpDeferred = new jQuery.Deferred();
|
|
509
|
+
oPendingOpDeferred.resolve();
|
|
510
|
+
}
|
|
511
|
+
if (oDeferred !== null) {
|
|
512
|
+
this._oPendingOperationsMap.put(sContainerKey, oDeferred);
|
|
513
|
+
}
|
|
514
|
+
if (!oPendingOpDeferred || oPendingOpDeferred.state() !== "pending") {
|
|
515
|
+
return oPendingOpDeferred;
|
|
516
|
+
}
|
|
517
|
+
clearTimeout(oPendingOpDeferred._sapTimeoutId); //system function!
|
|
518
|
+
oPendingOpDeferred._sapTimeoutId = undefined;
|
|
519
|
+
if (typeof oPendingOpDeferred._sapFnSave === "function") {
|
|
520
|
+
var fnSave = oPendingOpDeferred._sapFnSave;
|
|
521
|
+
oPendingOpDeferred._sapFnSave = undefined; // function can only be triggered at most one time
|
|
522
|
+
fnSave();
|
|
523
|
+
}
|
|
524
|
+
return oPendingOpDeferred;
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* todo
|
|
529
|
+
* @param {string} sContainerKey
|
|
530
|
+
* @param {jQuery.Deferred} oDeferred
|
|
531
|
+
*
|
|
532
|
+
* @returns {jQuery.Deferred}
|
|
533
|
+
*
|
|
534
|
+
* @since 1.120.0
|
|
535
|
+
* @private
|
|
536
|
+
*/
|
|
537
|
+
PersonalizationV2.prototype._pendingContainerOperations_cancelAddNext = function (sContainerKey, oDeferred) {
|
|
538
|
+
var oPendingOpDeferred;
|
|
539
|
+
oPendingOpDeferred = this._oPendingOperationsMap.get(sContainerKey);
|
|
540
|
+
if (!oPendingOpDeferred) {
|
|
541
|
+
oPendingOpDeferred = new jQuery.Deferred();
|
|
542
|
+
oPendingOpDeferred.resolve();
|
|
543
|
+
}
|
|
544
|
+
if (oDeferred !== null) {
|
|
545
|
+
this._oPendingOperationsMap.put(sContainerKey, oDeferred);
|
|
546
|
+
}
|
|
547
|
+
if (!oPendingOpDeferred || oPendingOpDeferred.state() !== "pending") {
|
|
548
|
+
return oPendingOpDeferred;
|
|
549
|
+
}
|
|
550
|
+
if (oPendingOpDeferred._sapTimeoutId) {
|
|
551
|
+
clearTimeout(oPendingOpDeferred._sapTimeoutId);
|
|
552
|
+
oPendingOpDeferred._sapTimeoutId = undefined;
|
|
553
|
+
oPendingOpDeferred.resolve(PersonalizationV2.prototype.SAVE_DEFERRED_DROPPED);
|
|
554
|
+
}
|
|
555
|
+
return oPendingOpDeferred;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Returns the current backend adapter
|
|
560
|
+
*
|
|
561
|
+
* @returns {object} the current backend adapter
|
|
562
|
+
*
|
|
563
|
+
* @since 1.120.0
|
|
564
|
+
* @private
|
|
565
|
+
*/
|
|
566
|
+
PersonalizationV2.prototype._getBackendAdapter = function () {
|
|
567
|
+
return this._oAdapterWithBackendAdapter.instance._oBackendAdapter;
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Tries to reset (delete) the entire personalization data which includes
|
|
572
|
+
* (A) all personalization containers stored with this service (also by applications) and
|
|
573
|
+
* (B) entire other personalization if applicable and supported by the underlying personalization service adapter.
|
|
574
|
+
*
|
|
575
|
+
* isResetEntirePersonalizationSupported needs to be called upfront in order to check if the current platform supports this method at all. Otherwise the method call will be rejected.
|
|
576
|
+
*
|
|
577
|
+
* @returns {Promise} promise for the deletion operation
|
|
578
|
+
*
|
|
579
|
+
* @see #isResetEntirePersonalizationSupported
|
|
580
|
+
*
|
|
581
|
+
* @since 1.120.0
|
|
582
|
+
* @private
|
|
583
|
+
*/
|
|
584
|
+
PersonalizationV2.prototype.resetEntirePersonalization = function () {
|
|
585
|
+
var oAdapter = this._getBackendAdapter();
|
|
586
|
+
|
|
587
|
+
return this.isResetEntirePersonalizationSupported()
|
|
588
|
+
.then(function (bIsSupported) {
|
|
589
|
+
if (bIsSupported) {
|
|
590
|
+
return oAdapter.resetEntirePersonalization();
|
|
591
|
+
}
|
|
592
|
+
return Promise.reject();
|
|
593
|
+
});
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Checks if the current service's adapter supports the resetEntirePersonalization method.
|
|
598
|
+
* For this to be true the function isResetEntirePersonalizationSupported of the adapter has to resolve to true
|
|
599
|
+
* and the function resetEntirePersonalization must be present on the adapter
|
|
600
|
+
*
|
|
601
|
+
* @returns {Promise<boolean>} resolves to true if the current platform supports resetEntirePersonalization, otherwise false
|
|
602
|
+
*
|
|
603
|
+
* @see #resetEntirePersonalization
|
|
604
|
+
*
|
|
605
|
+
* @since 1.120.0
|
|
606
|
+
* @private
|
|
607
|
+
*/
|
|
608
|
+
PersonalizationV2.prototype.isResetEntirePersonalizationSupported = function () {
|
|
609
|
+
var oAdapter = this._getBackendAdapter();
|
|
610
|
+
|
|
611
|
+
if (typeof oAdapter.resetEntirePersonalization !== "function") {
|
|
612
|
+
return Promise.resolve(false);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
if (typeof oAdapter.isResetEntirePersonalizationSupported === "function") {
|
|
616
|
+
return oAdapter.isResetEntirePersonalizationSupported()
|
|
617
|
+
.then(function (bIsSupported) {
|
|
618
|
+
return bIsSupported;
|
|
619
|
+
})
|
|
620
|
+
.catch(function (oError) {
|
|
621
|
+
Log.error("isResetEntirePersonalizationSupported failed with error:", oError);
|
|
622
|
+
return Promise.reject(oError);
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
return Promise.resolve(true);
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
PersonalizationV2.prototype._adjustScope = personalizationUtils.adjustScope;
|
|
630
|
+
|
|
631
|
+
PersonalizationV2.hasNoAdapter = false;
|
|
632
|
+
|
|
633
|
+
PersonalizationV2.ContextContainer = ContextContainer;
|
|
634
|
+
PersonalizationV2.Variant = Variant;
|
|
635
|
+
PersonalizationV2.VariantSet = VariantSet;
|
|
636
|
+
PersonalizationV2.VariantSetAdapter = VariantSetAdapter;
|
|
637
|
+
PersonalizationV2.WindowAdapter = WindowAdapter;
|
|
638
|
+
PersonalizationV2.WindowAdapterContainer = WindowAdapterContainer;
|
|
639
|
+
|
|
640
|
+
return PersonalizationV2;
|
|
641
|
+
});
|