@sapui5/sap.ushell 1.120.8 → 1.121.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 +2 -2
- package/src/main/js/sap/ushell/.library +1 -1
- package/src/main/js/sap/ushell/AppInfoParameters.js +46 -49
- package/src/main/js/sap/ushell/CanvasShapesManager.js +8 -7
- package/src/main/js/sap/ushell/Container.js +333 -108
- package/src/main/js/sap/ushell/EventHub.js +6 -9
- package/src/main/js/sap/ushell/Fiori20Adapter.js +6 -7
- package/src/main/js/sap/ushell/Fiori20AdapterTest.js +5 -7
- package/src/main/js/sap/ushell/Layout.js +20 -16
- package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
- package/src/main/js/sap/ushell/SessionHandler.js +20 -12
- package/src/main/js/sap/ushell/System.js +4 -2
- package/src/main/js/sap/ushell/TechnicalParameters.js +34 -57
- package/src/main/js/sap/ushell/UIActions.js +28 -39
- package/src/main/js/sap/ushell/URLTemplateProcessor.js +1 -1
- package/src/main/js/sap/ushell/Ui5NativeServiceFactory.js +8 -7
- package/src/main/js/sap/ushell/Ui5ServiceFactory.js +10 -10
- package/src/main/js/sap/ushell/User.js +6 -4
- package/src/main/js/sap/ushell/UserActivityLog.js +13 -11
- package/src/main/js/sap/ushell/_ApplicationType/guiResolution.js +15 -19
- package/src/main/js/sap/ushell/_ApplicationType/systemAlias.js +5 -3
- package/src/main/js/sap/ushell/_ApplicationType/ui5Resolution.js +11 -10
- package/src/main/js/sap/ushell/_ApplicationType/urlTemplateResolution.js +17 -15
- package/src/main/js/sap/ushell/_ApplicationType/utils.js +7 -7
- package/src/main/js/sap/ushell/_ApplicationType/wdaResolution.js +8 -6
- package/src/main/js/sap/ushell/_Config/utils.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 +2 -2
- 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/AppVariantPersonalizationAdapter.js +5 -3
- package/src/main/js/sap/ushell/adapters/cdm/ClientSideTargetResolutionAdapter.js +6 -11
- package/src/main/js/sap/ushell/adapters/cdm/CommonDataModelAdapter.js +6 -16
- package/src/main/js/sap/ushell/adapters/cdm/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/ContainerAdapter.js +18 -14
- package/src/main/js/sap/ushell/adapters/cdm/LaunchPageAdapter.js +16 -21
- package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +7 -18
- package/src/main/js/sap/ushell/adapters/cdm/PersonalizationAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/PersonalizationV2Adapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/cdm/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/_Personalization/internals.js +9 -9
- 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 +36 -13
- package/src/main/js/sap/ushell/adapters/cdm/v3/FlpLaunchPageAdapter.js +2629 -0
- package/src/main/js/sap/ushell/adapters/cdm/v3/LaunchPageAdapter.js +4 -2525
- 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 +13 -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 +91 -25
- package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readVisualizations.js +1 -1
- package/src/main/js/sap/ushell/adapters/cep/MenuAdapter.js +6 -6
- package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +31 -6
- package/src/main/js/sap/ushell/adapters/cep/SearchCEPAdapter.js +7 -6
- package/src/main/js/sap/ushell/adapters/cflp/UserDefaultParameterPersistenceAdapter.js +10 -20
- package/src/main/js/sap/ushell/adapters/local/AdapterContainer.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/AppStateAdapter.js +14 -19
- package/src/main/js/sap/ushell/adapters/local/ClientSideTargetResolutionAdapter.js +18 -20
- package/src/main/js/sap/ushell/adapters/local/ContainerAdapter.js +25 -18
- package/src/main/js/sap/ushell/adapters/local/FlpLaunchPageAdapter.js +1558 -0
- package/src/main/js/sap/ushell/adapters/local/LaunchPageAdapter.js +4 -1551
- package/src/main/js/sap/ushell/adapters/local/MenuAdapter.js +3 -3
- package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionAdapter.js +2 -4
- 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 +11 -8
- package/src/main/js/sap/ushell/adapters/local/PersonalizationV2Adapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/SearchAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/SearchCEPAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/SupportTicketAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js +11 -23
- package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +1 -1
- package/src/main/js/sap/ushell/api/RTA.js +27 -0
- package/src/main/js/sap/ushell/api/workpage/Designtime.js +69 -0
- package/src/main/js/sap/ushell/api/workpage/Runtime.js +97 -0
- package/src/main/js/sap/ushell/appRuntime/neo/AppInfoService.js +12 -3
- package/src/main/js/sap/ushell/appRuntime/neo/AppRuntimeNeo.js +4 -0
- package/src/main/js/sap/ushell/appRuntime/neo/ProxyAppUtils.js +4 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntime.js +82 -78
- package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntimeContext.js +4 -3
- package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntimeService.js +8 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/SessionHandlerAgent.js +35 -37
- package/src/main/js/sap/ushell/appRuntime/ui5/performance/FesrEnhancer.js +4 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/baseRta/AppLifeCycleUtils.js +2 -8
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/baseRta/Trigger.js +9 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaAgent/Component.js +6 -4
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaAgent/i18n/i18n_en_US_saprigi.properties +5 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaAgent/i18n/i18n_sh.properties +3 -3
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaShell/Component.js +4 -3
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaShell/i18n/i18n_en_US_saprigi.properties +2 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaShell/i18n/i18n_sh.properties +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/AccessKeysAgent.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/Renderer.js +14 -14
- package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/RendererExtensions.js +2 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppConfiguration.js +1 -1
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppLifeCycleAgent.js +39 -39
- package/src/main/js/sap/ushell/appRuntime/ui5/services/AppState.js +15 -16
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Bookmark.js +12 -54
- package/src/main/js/sap/ushell/appRuntime/ui5/services/BookmarkV2.js +154 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/services/CommonDataModel.js +1 -3
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Container.js +221 -206
- package/src/main/js/sap/ushell/appRuntime/ui5/services/CrossApplicationNavigation.js +15 -14
- package/src/main/js/sap/ushell/appRuntime/ui5/services/MessageBroker.js +5 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolution.js +10 -14
- package/src/main/js/sap/ushell/appRuntime/ui5/services/Navigation.js +212 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigation.js +6 -5
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigationInternal.js +67 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellUIService.js +4 -4
- package/src/main/js/sap/ushell/appRuntime/ui5/services/UserInfo.js +9 -3
- package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/ContainerAdapter.js +9 -10
- package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/EmptyAdapter.js +3 -0
- package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/FLPScheduler.js +12 -6
- package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/StepConfiguration.json +1 -3
- package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/logger.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/state.js +6 -7
- package/src/main/js/sap/ushell/bootstrap/cdm/cdm-def-dev.js +2 -1
- package/src/main/js/sap/ushell/bootstrap/cdm/cdm-def-loader.js +15 -5
- package/src/main/js/sap/ushell/bootstrap/cdm/cdm-def.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/cdm/cdm.boot.task.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/cdm/cdm.constants.js +14 -0
- package/src/main/js/sap/ushell/bootstrap/cdm.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.boot.path.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.boot.script.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.boot.task.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5.extractLibs.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +6 -6
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5language.js +4 -4
- package/src/main/js/sap/ushell/bootstrap/common/common.configure.ushell.js +37 -41
- package/src/main/js/sap/ushell/bootstrap/common/common.constants.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.create.configcontract.core.js +31 -20
- package/src/main/js/sap/ushell/bootstrap/common/common.debug.mode.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.load.bootstrapExtension.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.load.core-min.js +1 -1
- package/src/main/js/sap/ushell/bootstrap/common/common.load.launchpad.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.load.model.js +3 -3
- package/src/main/js/sap/ushell/bootstrap/common/common.load.ui5theme.js +3 -3
- package/src/main/js/sap/ushell/bootstrap/common/common.read.metatags.js +2 -2
- package/src/main/js/sap/ushell/bootstrap/common/common.read.ushell.config.from.url.js +5 -4
- package/src/main/js/sap/ushell/bootstrap/common/common.util.js +48 -14
- package/src/main/js/sap/ushell/bootstrap/sandbox2.js +8 -9
- package/src/main/js/sap/ushell/bootstrap/ui5loader-config.js +2 -2
- package/src/main/js/sap/ushell/components/CatalogsManager.js +49 -47
- package/src/main/js/sap/ushell/components/ComponentKeysHandler.js +57 -45
- package/src/main/js/sap/ushell/components/DestroyHelper.js +2 -2
- package/src/main/js/sap/ushell/components/HeaderManager.js +3 -3
- package/src/main/js/sap/ushell/components/HomepageManager.js +27 -29
- package/src/main/js/sap/ushell/components/MessagingHelper.js +2 -2
- package/src/main/js/sap/ushell/components/SharedComponentUtils.js +13 -10
- package/src/main/js/sap/ushell/components/StateHelper.js +1 -1
- package/src/main/js/sap/ushell/components/_HeaderManager/AddHeadEndItemsStrategy.js +15 -15
- package/src/main/js/sap/ushell/components/_HeaderManager/AddHeadItemsStrategy.js +3 -3
- package/src/main/js/sap/ushell/components/_HeaderManager/ControlManager.js +4 -4
- package/src/main/js/sap/ushell/components/_HeaderManager/RemoveItemsStrategy.js +2 -2
- package/src/main/js/sap/ushell/components/_HeaderManager/ShellHeader.controller.js +13 -13
- package/src/main/js/sap/ushell/components/_HomepageManager/DashboardLoadingManager.js +3 -3
- package/src/main/js/sap/ushell/components/_HomepageManager/PagingManager.js +1 -1
- package/src/main/js/sap/ushell/components/_HomepageManager/PersistentPageOperationAdapter.js +4 -4
- package/src/main/js/sap/ushell/components/appfinder/AppFinder.controller.js +9 -8
- package/src/main/js/sap/ushell/components/appfinder/AppFinderView.js +6 -6
- package/src/main/js/sap/ushell/components/appfinder/Catalog.controller.js +29 -16
- package/src/main/js/sap/ushell/components/appfinder/CatalogView.js +17 -17
- package/src/main/js/sap/ushell/components/appfinder/Component.js +4 -4
- package/src/main/js/sap/ushell/components/appfinder/EasyAccess.controller.js +7 -7
- package/src/main/js/sap/ushell/components/appfinder/EasyAccessView.js +3 -9
- package/src/main/js/sap/ushell/components/appfinder/GroupListPopover.controller.js +3 -3
- package/src/main/js/sap/ushell/components/appfinder/HierarchyAppsView.js +6 -7
- package/src/main/js/sap/ushell/components/appfinder/HierarchyFolders.controller.js +2 -4
- package/src/main/js/sap/ushell/components/appfinder/HierarchyFoldersView.js +3 -3
- package/src/main/js/sap/ushell/components/appfinder/VisualizationOrganizerHelper.js +9 -5
- package/src/main/js/sap/ushell/components/appfinder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/applicationIntegration/AppLifeCycle.js +38 -55
- package/src/main/js/sap/ushell/components/applicationIntegration/application/Application.js +20 -22
- package/src/main/js/sap/ushell/components/applicationIntegration/application/BlueBoxHandler.js +22 -33
- package/src/main/js/sap/ushell/components/applicationIntegration/application/PostMessageAPI.js +563 -372
- package/src/main/js/sap/ushell/components/applicationIntegration/application/WebGUIStatefulHandler.js +8 -7
- package/src/main/js/sap/ushell/components/applicationIntegration/configuration/AppMeta.js +8 -6
- package/src/main/js/sap/ushell/components/applicationIntegration/elements/model.js +9 -7
- package/src/main/js/sap/ushell/components/applicationIntegration/relatedServices/RelatedServices.js +6 -5
- package/src/main/js/sap/ushell/components/applicationIntegration/relatedShellElements/RelatedShellElements.js +2 -2
- package/src/main/js/sap/ushell/components/cards/Configuration.controller.js +6 -5
- package/src/main/js/sap/ushell/components/cepsearchresult/app/Component.js +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/Main.controller.js +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/Component.js +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_da.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_en_US_saprigi.properties +37 -37
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_et.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_fr_CA.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_hr.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_it.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_iw.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_ko.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_lv.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_ms.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_pl.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_ro.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_sh.properties +7 -7
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_sk.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_sl.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_tr.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_uk.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_vi.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_zh_CN.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/i18n/i18n_en_US_saprigi.properties +9 -9
- package/src/main/js/sap/ushell/components/cepsearchresult/app/i18n/i18n_hi.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/i18n/i18n_sh.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/Category.css +4 -0
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/Highlighter.js +1 -3
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/Paginator.js +1 -3
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/categories/Application.js +27 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ar.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_bg.properties +8 -8
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ca.properties +3 -3
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_cs.properties +4 -4
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_cy.properties +5 -5
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_el.properties +7 -7
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_en_US_saprigi.properties +109 -109
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_es.properties +3 -3
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_es_MX.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_fi.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_fr.properties +4 -4
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_fr_CA.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_hi.properties +7 -7
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_hr.properties +8 -8
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_hu.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_it.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_iw.properties +3 -3
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ja.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ko.properties +4 -4
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_lv.properties +16 -16
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ms.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_nl.properties +16 -16
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_no.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_pt.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_pt_PT.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ro.properties +4 -4
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_ru.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_sh.properties +25 -25
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_sk.properties +8 -8
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_sl.properties +4 -4
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_sv.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_th.properties +1 -1
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_tr.properties +2 -2
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_uk.properties +5 -5
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_vi.properties +2 -2
- package/src/main/js/sap/ushell/components/container/ApplicationContainer.js +105 -96
- package/src/main/js/sap/ushell/components/container/IframePOSTUtils.js +13 -13
- package/src/main/js/sap/ushell/components/container/resources/resources_en_US_saprigi.properties +6 -6
- package/src/main/js/sap/ushell/components/container/resources/resources_ms.properties +1 -1
- package/src/main/js/sap/ushell/components/container/resources/resources_sh.properties +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/Component.js +54 -105
- package/src/main/js/sap/ushell/components/contentFinder/controller/AppSearch.controller.js +108 -142
- package/src/main/js/sap/ushell/components/contentFinder/controller/ContentFinderDialog.controller.js +16 -11
- package/src/main/js/sap/ushell/components/contentFinder/controller/WidgetGallery.controller.js +9 -7
- package/src/main/js/sap/ushell/components/contentFinder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/contentFinder/model/formatter.js +6 -6
- package/src/main/js/sap/ushell/components/contentFinder/resources/resources.properties +4 -2
- package/src/main/js/sap/ushell/components/contentFinder/resources/resources_en_US_saprigi.properties +24 -24
- package/src/main/js/sap/ushell/components/contentFinder/resources/resources_sh.properties +6 -6
- package/src/main/js/sap/ushell/components/contentFinder/view/AppSearch.view.xml +37 -17
- package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchBox.fragment.xml +5 -3
- package/src/main/js/sap/ushell/components/contentFinder/view/ContentFinderDialog.view.xml +9 -4
- package/src/main/js/sap/ushell/components/factsheet/Component.js +1 -1
- package/src/main/js/sap/ushell/components/factsheet/controls/PictureTileRenderer.js +2 -1
- package/src/main/js/sap/ushell/components/factsheet/controls/PictureViewerRenderer.js +2 -1
- package/src/main/js/sap/ushell/components/homepage/ActionMode.js +23 -19
- package/src/main/js/sap/ushell/components/homepage/Component.js +3 -3
- package/src/main/js/sap/ushell/components/homepage/DashboardContent.controller.js +3 -2
- package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +3 -4
- package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +17 -9
- package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +10 -3
- package/src/main/js/sap/ushell/components/homepage/FLPAnalytics.js +6 -4
- package/src/main/js/sap/ushell/components/homepage/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/pages/ActionMode.js +5 -5
- package/src/main/js/sap/ushell/components/pages/Component.js +2 -2
- package/src/main/js/sap/ushell/components/pages/MyHomeImport.js +7 -7
- package/src/main/js/sap/ushell/components/pages/StateManager.js +3 -3
- package/src/main/js/sap/ushell/components/pages/controller/ImportDialog.controller.js +9 -12
- package/src/main/js/sap/ushell/components/pages/controller/MyHome.controller.js +2 -2
- package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +70 -15
- package/src/main/js/sap/ushell/components/pages/controller/PagesAndSpaceId.js +2 -2
- package/src/main/js/sap/ushell/components/pages/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/pages/view/PageRuntime.view.xml +7 -5
- package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +50 -8
- package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -8
- package/src/main/js/sap/ushell/components/runtimeSwitcher/view/RuntimeSwitcher.view.xml +13 -8
- package/src/main/js/sap/ushell/components/shell/MenuBar/Component.js +6 -4
- 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 +1 -1
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +13 -11
- package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +16 -12
- package/src/main/js/sap/ushell/components/shell/Notifications/Notifications.controller.js +5 -5
- package/src/main/js/sap/ushell/components/shell/PostLoadingHeaderEnhancement/Component.js +14 -14
- package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +7 -7
- package/src/main/js/sap/ushell/components/shell/Search/Component.js +5 -4
- package/src/main/js/sap/ushell/components/shell/Search/ESearch.js +8 -6
- package/src/main/js/sap/ushell/components/shell/Search/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +25 -18
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchCEP.controller.js +89 -67
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/FrequentActivityProvider.js +5 -4
- package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/RecentSearchProvider.js +5 -4
- 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 +8 -6
- package/src/main/js/sap/ushell/components/shell/Settings/Component.js +7 -7
- package/src/main/js/sap/ushell/components/shell/Settings/ErrorMessageHelper.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.controller.js +6 -6
- package/src/main/js/sap/ushell/components/shell/Settings/appearance/Appearance.controller.js +4 -2
- package/src/main/js/sap/ushell/components/shell/Settings/homepage/HomepageEntry.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/homepage/HomepageSetting.view.xml +3 -1
- package/src/main/js/sap/ushell/components/shell/Settings/search/SearchEntry.js +95 -96
- package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountEntry.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountSelector.controller.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountSetting.fragment.xml +7 -1
- package/src/main/js/sap/ushell/components/shell/Settings/userActivities/UserActivitiesSetting.controller.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/userActivities/UserActivitiesSetting.view.xml +7 -1
- package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/UserDefaultsForm.js +1 -1
- package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/controller/UserDefaultsSetting.controller.js +3 -3
- package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/LanguageRegionSelector.controller.js +27 -31
- package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/LanguageRegionSelector.view.xml +9 -2
- package/src/main/js/sap/ushell/components/shell/UserActionsMenu/Component.js +6 -6
- package/src/main/js/sap/ushell/components/shell/UserActionsMenu/UserActionsMenu.controller.js +22 -20
- package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +8 -11
- package/src/main/js/sap/ushell/components/tiles/action/Configuration.controller.js +5 -4
- package/src/main/js/sap/ushell/components/tiles/applauncher/StaticTile.controller.js +1 -1
- package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/DynamicTile.controller.js +5 -3
- package/src/main/js/sap/ushell/components/tiles/cdm/applauncher/StaticTile.controller.js +16 -31
- package/src/main/js/sap/ushell/components/tiles/cdm/applauncher/StaticTile.view.xml +1 -1
- package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.controller.js +16 -33
- package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.view.xml +1 -1
- package/src/main/js/sap/ushell/components/tiles/generic.js +2 -1
- package/src/main/js/sap/ushell/components/tiles/indicatorDualComparison/DualComparison.controller.js +1 -1
- package/src/main/js/sap/ushell/components/tiles/indicatorDualContribution/DualContribution.controller.js +1 -1
- package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/cache.js +12 -10
- package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/oData4Analytics.js +49 -42
- package/src/main/js/sap/ushell/components/tiles/indicatorcontribution/ContributionTile.controller.js +1 -1
- package/src/main/js/sap/ushell/components/tiles/indicatorcontribution/ContributionTile.view.js +16 -18
- package/src/main/js/sap/ushell/components/tiles/utils.js +19 -15
- package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +31 -29
- package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +18 -219
- 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 +62 -137
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.layout.js +4 -2
- package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageHost.js +185 -68
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +3 -6
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +3 -6
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +3 -6
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnRenderer.js +2 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +4 -7
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRenderer.js +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +7 -5
- package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRowRenderer.js +5 -5
- package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources.properties +4 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_saprigi.properties +66 -66
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hr.properties +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sh.properties +29 -29
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_th.properties +1 -1
- package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageBuilder.view.xml +8 -0
- package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +2 -2
- package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +4 -7
- package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +1 -1
- package/src/main/js/sap/ushell/components/workPageRuntime/view/WorkPageRuntime.view.xml +15 -8
- package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
- package/src/main/js/sap/ushell/iconfonts.js +1 -1
- package/src/main/js/sap/ushell/library.js +28 -26
- package/src/main/js/sap/ushell/navigationMode.js +4 -6
- package/src/main/js/sap/ushell/performance/FesrEnhancer.js +97 -18
- package/src/main/js/sap/ushell/performance/ShellAnalytics.js +7 -7
- package/src/main/js/sap/ushell/performance/StatisticalRecord.js +78 -23
- package/src/main/js/sap/ushell/plugins/BaseRTAPlugin.js +4 -3
- package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
- package/src/main/js/sap/ushell/plugins/rta/i18n/i18n_en_US_saprigi.properties +8 -8
- package/src/main/js/sap/ushell/plugins/rta/i18n/i18n_sh.properties +2 -2
- package/src/main/js/sap/ushell/plugins/rta/i18n/i18n_th.properties +2 -2
- package/src/main/js/sap/ushell/plugins/rta-personalize/Component.js +10 -6
- package/src/main/js/sap/ushell/plugins/rta-personalize/i18n/i18n_en_US_saprigi.properties +12 -12
- package/src/main/js/sap/ushell/plugins/rta-personalize/i18n/i18n_sh.properties +4 -4
- package/src/main/js/sap/ushell/renderer/AccessKeysHandler.js +15 -13
- package/src/main/js/sap/ushell/renderer/LogonFrameProvider.js +7 -7
- package/src/main/js/sap/ushell/renderer/Renderer.js +163 -221
- package/src/main/js/sap/ushell/renderer/Shell.controller.js +133 -163
- package/src/main/js/sap/ushell/renderer/Shell.view.js +13 -14
- package/src/main/js/sap/ushell/renderer/allMyApps/AllMyApps.controller.js +65 -14
- package/src/main/js/sap/ushell/renderer/allMyApps/AllMyAppsManager.js +40 -17
- package/src/main/js/sap/ushell/renderer/resources/resources.properties +9 -3
- package/src/main/js/sap/ushell/renderer/resources/resources_ar.properties +14 -17
- package/src/main/js/sap/ushell/renderer/resources/resources_bg.properties +48 -51
- package/src/main/js/sap/ushell/renderer/resources/resources_ca.properties +13 -16
- package/src/main/js/sap/ushell/renderer/resources/resources_cs.properties +19 -22
- package/src/main/js/sap/ushell/renderer/resources/resources_cy.properties +13 -16
- package/src/main/js/sap/ushell/renderer/resources/resources_da.properties +21 -24
- package/src/main/js/sap/ushell/renderer/resources/resources_de.properties +19 -22
- package/src/main/js/sap/ushell/renderer/resources/resources_el.properties +23 -26
- package/src/main/js/sap/ushell/renderer/resources/resources_en.properties +18 -21
- package/src/main/js/sap/ushell/renderer/resources/resources_en_GB.properties +19 -22
- package/src/main/js/sap/ushell/renderer/resources/resources_en_US_saprigi.properties +991 -994
- package/src/main/js/sap/ushell/renderer/resources/resources_es.properties +16 -19
- package/src/main/js/sap/ushell/renderer/resources/resources_es_MX.properties +10 -13
- package/src/main/js/sap/ushell/renderer/resources/resources_et.properties +18 -21
- package/src/main/js/sap/ushell/renderer/resources/resources_fi.properties +21 -24
- package/src/main/js/sap/ushell/renderer/resources/resources_fr.properties +24 -27
- package/src/main/js/sap/ushell/renderer/resources/resources_fr_CA.properties +25 -28
- package/src/main/js/sap/ushell/renderer/resources/resources_hi.properties +32 -35
- package/src/main/js/sap/ushell/renderer/resources/resources_hr.properties +36 -39
- package/src/main/js/sap/ushell/renderer/resources/resources_hu.properties +15 -18
- package/src/main/js/sap/ushell/renderer/resources/resources_id.properties +15 -18
- package/src/main/js/sap/ushell/renderer/resources/resources_it.properties +14 -17
- package/src/main/js/sap/ushell/renderer/resources/resources_iw.properties +15 -18
- package/src/main/js/sap/ushell/renderer/resources/resources_ja.properties +23 -26
- package/src/main/js/sap/ushell/renderer/resources/resources_kk.properties +28 -31
- package/src/main/js/sap/ushell/renderer/resources/resources_ko.properties +21 -24
- package/src/main/js/sap/ushell/renderer/resources/resources_lt.properties +13 -16
- package/src/main/js/sap/ushell/renderer/resources/resources_lv.properties +17 -20
- package/src/main/js/sap/ushell/renderer/resources/resources_ms.properties +14 -17
- package/src/main/js/sap/ushell/renderer/resources/resources_nl.properties +14 -17
- package/src/main/js/sap/ushell/renderer/resources/resources_no.properties +32 -35
- package/src/main/js/sap/ushell/renderer/resources/resources_pl.properties +21 -24
- package/src/main/js/sap/ushell/renderer/resources/resources_pt.properties +13 -16
- package/src/main/js/sap/ushell/renderer/resources/resources_pt_PT.properties +7 -10
- package/src/main/js/sap/ushell/renderer/resources/resources_ro.properties +10 -13
- package/src/main/js/sap/ushell/renderer/resources/resources_ru.properties +22 -25
- package/src/main/js/sap/ushell/renderer/resources/resources_sh.properties +276 -279
- package/src/main/js/sap/ushell/renderer/resources/resources_sk.properties +25 -28
- package/src/main/js/sap/ushell/renderer/resources/resources_sl.properties +31 -34
- package/src/main/js/sap/ushell/renderer/resources/resources_sv.properties +15 -18
- package/src/main/js/sap/ushell/renderer/resources/resources_th.properties +22 -25
- package/src/main/js/sap/ushell/renderer/resources/resources_tr.properties +33 -36
- package/src/main/js/sap/ushell/renderer/resources/resources_uk.properties +46 -49
- package/src/main/js/sap/ushell/renderer/resources/resources_vi.properties +14 -17
- package/src/main/js/sap/ushell/renderer/resources/resources_zh_CN.properties +10 -13
- package/src/main/js/sap/ushell/renderer/resources/resources_zh_TW.properties +21 -24
- package/src/main/js/sap/ushell/renderer/search/searchComponent/Component.js +8 -2
- package/src/main/js/sap/ushell/renderer/search/searchComponent/controller/CEPSearchApp.controller.js +20 -13
- package/src/main/js/sap/ushell/renderer/search/searchComponent/controller/SearchApp.controller.js +13 -9
- package/src/main/js/sap/ushell/renderer/search/searchComponent/manifest.json +1 -1
- package/src/main/js/sap/ushell/renderer/search/searchComponent/view/CEPSearchApp.view.js +1 -1
- package/src/main/js/sap/ushell/renderer/search/searchComponent/view/SearchApp.view.js +1 -1
- package/src/main/js/sap/ushell/renderer/search/util.js +5 -7
- package/src/main/js/sap/ushell/renderer/utils.js +6 -6
- package/src/main/js/sap/ushell/renderers/fiori2/Renderer.js +14 -11
- package/src/main/js/sap/ushell/renderers/fiori2/RendererExtensions.js +50 -42
- package/src/main/js/sap/ushell/resources.js +3 -3
- package/src/main/js/sap/ushell/services/AllMyApps.js +2 -3
- package/src/main/js/sap/ushell/services/AppConfiguration.js +56 -15
- package/src/main/js/sap/ushell/services/AppLifeCycle.js +14 -29
- package/src/main/js/sap/ushell/services/AppState.js +39 -28
- package/src/main/js/sap/ushell/services/Bookmark.js +18 -45
- package/src/main/js/sap/ushell/services/BookmarkV2.js +118 -120
- package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +20 -22
- package/src/main/js/sap/ushell/services/CommonDataModel.js +31 -94
- package/src/main/js/sap/ushell/services/Configuration.js +5 -5
- package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +2 -3
- package/src/main/js/sap/ushell/services/Container.js +6 -5
- package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +7 -5
- package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +80 -98
- package/src/main/js/sap/ushell/services/DarkModeSupport.js +6 -6
- package/src/main/js/sap/ushell/services/EndUserFeedback.js +17 -15
- package/src/main/js/sap/ushell/services/Extension/FloatingContainer.js +139 -67
- package/src/main/js/sap/ushell/services/Extension/Footer.js +2 -1
- package/src/main/js/sap/ushell/services/Extension/Header.js +9 -16
- package/src/main/js/sap/ushell/services/Extension/Item.js +12 -8
- package/src/main/js/sap/ushell/services/Extension/SidePane.js +5 -5
- package/src/main/js/sap/ushell/services/Extension/ToolArea.js +5 -5
- package/src/main/js/sap/ushell/services/Extension.js +12 -13
- package/src/main/js/sap/ushell/services/FlpLaunchPage.js +1791 -0
- package/src/main/js/sap/ushell/services/LaunchPage.js +653 -1715
- package/src/main/js/sap/ushell/services/Menu.js +3 -3
- package/src/main/js/sap/ushell/services/Message.js +16 -9
- package/src/main/js/sap/ushell/services/MessageBroker.js +6 -6
- package/src/main/js/sap/ushell/services/NavTargetResolution.js +25 -28
- package/src/main/js/sap/ushell/services/Navigation/utils.js +1 -1
- package/src/main/js/sap/ushell/services/Navigation.js +17 -16
- package/src/main/js/sap/ushell/services/NavigationDataProvider.js +2 -2
- package/src/main/js/sap/ushell/services/Notifications.js +55 -38
- package/src/main/js/sap/ushell/services/NotificationsV2.js +122 -49
- package/src/main/js/sap/ushell/services/PageBuilding.js +3 -4
- package/src/main/js/sap/ushell/services/PagePersistence.js +3 -3
- package/src/main/js/sap/ushell/services/PageReferencing.js +2 -2
- package/src/main/js/sap/ushell/services/Pages.js +295 -320
- package/src/main/js/sap/ushell/services/Personalization.js +40 -37
- package/src/main/js/sap/ushell/services/PersonalizationV2/ContextContainer.js +27 -24
- package/src/main/js/sap/ushell/services/PersonalizationV2/Personalizer.js +7 -4
- package/src/main/js/sap/ushell/services/PersonalizationV2/TransientPersonalizer.js +2 -0
- package/src/main/js/sap/ushell/services/PersonalizationV2/Variant.js +7 -4
- package/src/main/js/sap/ushell/services/PersonalizationV2/VariantSet.js +10 -11
- package/src/main/js/sap/ushell/services/PersonalizationV2/VariantSetAdapter.js +10 -10
- package/src/main/js/sap/ushell/services/PersonalizationV2/WindowAdapter.js +2 -2
- package/src/main/js/sap/ushell/services/PersonalizationV2/WindowAdapterContainer.js +5 -5
- package/src/main/js/sap/ushell/services/PersonalizationV2/constants.js +1 -1
- package/src/main/js/sap/ushell/services/PersonalizationV2.js +10 -9
- package/src/main/js/sap/ushell/services/PluginManager.js +77 -75
- package/src/main/js/sap/ushell/services/ReferenceResolver.js +36 -38
- package/src/main/js/sap/ushell/services/Search.js +4 -4
- package/src/main/js/sap/ushell/services/SearchCEP.js +2 -3
- package/src/main/js/sap/ushell/services/SearchableContent.js +93 -80
- package/src/main/js/sap/ushell/services/ShellNavigation.js +160 -450
- package/src/main/js/sap/ushell/services/ShellNavigationHashChanger.js +27 -26
- package/src/main/js/sap/ushell/services/ShellNavigationInternal.js +532 -0
- package/src/main/js/sap/ushell/services/SmartNavigation.js +23 -23
- package/src/main/js/sap/ushell/services/SpaceContent.js +4 -4
- package/src/main/js/sap/ushell/services/SupportTicket.js +4 -5
- package/src/main/js/sap/ushell/services/UITracer.js +2 -2
- package/src/main/js/sap/ushell/services/URLParsing.js +15 -14
- package/src/main/js/sap/ushell/services/URLShortening.js +1 -1
- package/src/main/js/sap/ushell/services/URLTemplate.js +2 -2
- package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +47 -10
- package/src/main/js/sap/ushell/services/UsageAnalytics.js +25 -9
- package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +11 -11
- package/src/main/js/sap/ushell/services/UserDefaultParameters.js +34 -41
- package/src/main/js/sap/ushell/services/UserInfo.js +29 -53
- package/src/main/js/sap/ushell/services/UserRecents/RecentActivity.js +480 -0
- package/src/main/js/sap/ushell/services/UserRecents/RecentAppsUsage.js +207 -0
- package/src/main/js/sap/ushell/services/UserRecents/RecentsList.js +119 -0
- package/src/main/js/sap/ushell/services/{_UserRecents → UserRecents}/UserRecentsBase.js +41 -9
- package/src/main/js/sap/ushell/services/UserRecents.js +185 -188
- package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +42 -41
- package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +27 -26
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Formatter.js +1 -1
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundIndex.js +6 -6
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundProvider.js +1 -1
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/ParameterMapping.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 +7 -9
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/StagedLogger.js +1 -1
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/SystemContext.js +1 -1
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Utils.js +1 -1
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/VirtualInbounds.js +1 -1
- package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/XAppStateProcessing.js +2 -2
- package/src/main/js/sap/ushell/services/_CommonDataModel/PersonalizationProcessor.js +5 -7
- package/src/main/js/sap/ushell/services/_CommonDataModel/SiteConverter.js +2 -2
- package/src/main/js/sap/ushell/services/_CommonDataModel/vizTypeDefaults/VizTypeDefaults.js +105 -0
- package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/ContentExtensionAdapterConfig.js +1 -1
- package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/FeaturedGroupConfig.js +1 -1
- package/src/main/js/sap/ushell/services/_CrossApplicationNavigation/utils.js +1 -1
- package/src/main/js/sap/ushell/services/_MessageBroker/MessageBrokerEngine.js +8 -8
- package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
- package/src/main/js/sap/ushell/services/_Personalization/ContextContainer.js +28 -29
- package/src/main/js/sap/ushell/services/_Personalization/PersonalizationContainer.js +10 -10
- package/src/main/js/sap/ushell/services/_Personalization/PersonalizationContainerVariant.js +7 -5
- package/src/main/js/sap/ushell/services/_Personalization/PersonalizationContainerVariantSet.js +9 -6
- package/src/main/js/sap/ushell/services/_Personalization/Personalizer.js +9 -18
- package/src/main/js/sap/ushell/services/_Personalization/TransientPersonalizer.js +4 -11
- package/src/main/js/sap/ushell/services/_Personalization/Variant.js +11 -9
- package/src/main/js/sap/ushell/services/_Personalization/VariantSet.js +6 -5
- package/src/main/js/sap/ushell/services/_Personalization/utils.js +1 -2
- 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 +8 -22
- package/src/main/js/sap/ushell/services/appstate/Sequentializer.js +1 -1
- package/src/main/js/sap/ushell/services/appstate/SequentializingAdapter.js +3 -5
- package/src/main/js/sap/ushell/services/appstate/WindowAdapter.js +13 -12
- package/src/main/js/sap/ushell/services/personalization/VariantSetAdapter.js +2 -2
- package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +26 -22
- package/src/main/js/sap/ushell/themes/base/Catalog.less +12 -1
- package/src/main/js/sap/ushell/themes/base/ContentFinder.less +1 -0
- package/src/main/js/sap/ushell/themes/base/SearchCEP.less +9 -0
- package/src/main/js/sap/ushell/themes/base/img/SAPLogo.svg +1 -1
- package/src/main/js/sap/ushell/themes/base/img/launchicons/114_iPhone-Retina_Web_Clip.png +0 -0
- package/src/main/js/sap/ushell/themes/base/img/launchicons/144_iPad_Retina_Web_Clip.png +0 -0
- package/src/main/js/sap/ushell/themes/base/img/launchicons/57_iPhone_Desktop_Launch.png +0 -0
- package/src/main/js/sap/ushell/themes/base/img/launchicons/72_iPad_Desktop_Launch.png +0 -0
- package/src/main/js/sap/ushell/themes/base/img/launchpad_favicon.ico +0 -0
- package/src/main/js/sap/ushell/themes/sap_horizon/ShellHeader.less +0 -1
- package/src/main/js/sap/ushell/themes/sap_horizon_dark/ShellHeader.less +0 -1
- package/src/main/js/sap/ushell/themes/sap_horizon_hcb/ShellHeader.less +0 -1
- package/src/main/js/sap/ushell/themes/sap_horizon_hcw/ShellHeader.less +0 -1
- package/src/main/js/sap/ushell/ui/AppContainer.js +17 -22
- package/src/main/js/sap/ushell/ui/AppContainerRenderer.js +4 -6
- package/src/main/js/sap/ushell/ui/ContentNodeSelector.js +8 -9
- package/src/main/js/sap/ushell/ui/ContentNodeTreeItem.js +2 -3
- package/src/main/js/sap/ushell/ui/QuickAccess.js +90 -81
- package/src/main/js/sap/ushell/ui/ShellHeader.js +26 -25
- package/src/main/js/sap/ushell/ui/ShellHeaderRenderer.js +2 -1
- package/src/main/js/sap/ushell/ui/appfinder/AppBox.js +20 -7
- package/src/main/js/sap/ushell/ui/appfinder/AppBoxRenderer.js +9 -0
- package/src/main/js/sap/ushell/ui/appfinder/PinButton.js +7 -6
- package/src/main/js/sap/ushell/ui/appfinder/PinButtonRenderer.js +2 -1
- package/src/main/js/sap/ushell/ui/cards/FrequentActivitiesExtension.js +4 -4
- package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +5 -5
- package/src/main/js/sap/ushell/ui/footerbar/AboutButton.js +8 -13
- package/src/main/js/sap/ushell/ui/footerbar/AddBookmarkButton.js +10 -12
- package/src/main/js/sap/ushell/ui/footerbar/ContactSupportButton.js +22 -229
- package/src/main/js/sap/ushell/ui/footerbar/ContactSupportDialog.controller.js +116 -0
- package/src/main/js/sap/ushell/ui/footerbar/ContactSupportDialog.fragment.xml +85 -0
- package/src/main/js/sap/ushell/ui/footerbar/JamDiscussButton.js +8 -12
- package/src/main/js/sap/ushell/ui/footerbar/JamShareButton.js +9 -18
- package/src/main/js/sap/ushell/ui/footerbar/LogoutButton.js +8 -12
- package/src/main/js/sap/ushell/ui/footerbar/SaveAsTile.controller.js +4 -1
- package/src/main/js/sap/ushell/ui/footerbar/SaveAsTile.view.js +4 -1
- package/src/main/js/sap/ushell/ui/footerbar/SendAsEmailButton.js +6 -13
- package/src/main/js/sap/ushell/ui/launchpad/AccessibilityCustomData.js +4 -5
- package/src/main/js/sap/ushell/ui/launchpad/ActionItem.js +5 -4
- package/src/main/js/sap/ushell/ui/launchpad/AnchorItem.js +8 -11
- package/src/main/js/sap/ushell/ui/launchpad/AnchorItemRenderer.js +6 -2
- package/src/main/js/sap/ushell/ui/launchpad/AnchorNavigationBar.js +22 -19
- package/src/main/js/sap/ushell/ui/launchpad/AnchorNavigationBarRenderer.js +6 -1
- package/src/main/js/sap/ushell/ui/launchpad/CatalogEntryContainer.js +10 -6
- package/src/main/js/sap/ushell/ui/launchpad/CatalogsContainer.js +9 -5
- package/src/main/js/sap/ushell/ui/launchpad/DashboardGroupsContainer.js +9 -5
- package/src/main/js/sap/ushell/ui/launchpad/DashboardGroupsContainerRenderer.js +6 -1
- package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
- package/src/main/js/sap/ushell/ui/launchpad/GroupHeaderActions.js +7 -9
- package/src/main/js/sap/ushell/ui/launchpad/GroupListItem.js +59 -67
- package/src/main/js/sap/ushell/ui/launchpad/GroupListItemRenderer.js +15 -15
- package/src/main/js/sap/ushell/ui/launchpad/LinkTileWrapper.js +4 -4
- package/src/main/js/sap/ushell/ui/launchpad/LinkTileWrapperRenderer.js +2 -1
- package/src/main/js/sap/ushell/ui/launchpad/LoadingDialog.js +7 -11
- package/src/main/js/sap/ushell/ui/launchpad/LoadingDialogRenderer.js +2 -2
- package/src/main/js/sap/ushell/ui/launchpad/Page.js +8 -12
- package/src/main/js/sap/ushell/ui/launchpad/PageRenderer.js +2 -1
- package/src/main/js/sap/ushell/ui/launchpad/PlusTile.js +5 -11
- package/src/main/js/sap/ushell/ui/launchpad/PlusTileRenderer.js +1 -1
- package/src/main/js/sap/ushell/ui/launchpad/Section.js +14 -26
- package/src/main/js/sap/ushell/ui/launchpad/SectionRenderer.js +3 -2
- package/src/main/js/sap/ushell/ui/launchpad/Tile.js +10 -13
- package/src/main/js/sap/ushell/ui/launchpad/TileContainer.js +10 -11
- package/src/main/js/sap/ushell/ui/launchpad/TileContainerRenderer.js +3 -2
- package/src/main/js/sap/ushell/ui/launchpad/TileRenderer.js +2 -1
- package/src/main/js/sap/ushell/ui/launchpad/TileState.js +8 -81
- package/src/main/js/sap/ushell/ui/launchpad/TileStateInternal.js +119 -0
- package/src/main/js/sap/ushell/ui/launchpad/TileStateInternalRenderer.js +72 -0
- package/src/main/js/sap/ushell/ui/launchpad/TileStateRenderer.js +4 -65
- package/src/main/js/sap/ushell/ui/launchpad/ViewPortState.js +6 -7
- package/src/main/js/sap/ushell/{services/_VisualizationInstantiation → ui/launchpad}/VizInstance.js +86 -78
- package/src/main/js/sap/ushell/{services/_VisualizationInstantiation → ui/launchpad}/VizInstanceAbap.js +6 -5
- package/src/main/js/sap/ushell/ui/launchpad/VizInstanceBase.js +40 -0
- package/src/main/js/sap/ushell/{services/_VisualizationInstantiation → ui/launchpad}/VizInstanceCdm.js +13 -11
- package/src/main/js/sap/ushell/{services/_VisualizationInstantiation → ui/launchpad}/VizInstanceLaunchPage.js +10 -7
- package/src/main/js/sap/ushell/{services/_VisualizationInstantiation → ui/launchpad}/VizInstanceLink.js +9 -61
- package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +8 -6
- package/src/main/js/sap/ushell/ui/launchpad/section/CompactAreaRenderer.js +2 -1
- package/src/main/js/sap/ushell/ui/shell/ContentRenderer.js +3 -3
- package/src/main/js/sap/ushell/ui/shell/FloatingContainer.js +10 -8
- package/src/main/js/sap/ushell/ui/shell/RightFloatingContainer.js +3 -3
- package/src/main/js/sap/ushell/ui/shell/ShellAppTitle.js +32 -34
- package/src/main/js/sap/ushell/ui/shell/ShellFloatingAction.js +9 -6
- package/src/main/js/sap/ushell/ui/shell/ShellFloatingActionRenderer.js +1 -3
- package/src/main/js/sap/ushell/ui/shell/ShellHeadItem.js +4 -7
- package/src/main/js/sap/ushell/ui/shell/ShellNavigationMenu.js +8 -8
- package/src/main/js/sap/ushell/ui/shell/SysInfoBar.js +3 -8
- package/src/main/js/sap/ushell/ui/shell/ToolArea.js +2 -2
- package/src/main/js/sap/ushell/ui/shell/ToolAreaItem.js +1 -1
- package/src/main/js/sap/ushell/ui/tile/DynamicTile.js +6 -8
- package/src/main/js/sap/ushell/ui/tile/DynamicTileRenderer.js +1 -1
- package/src/main/js/sap/ushell/ui/tile/ImageTile.js +4 -5
- package/src/main/js/sap/ushell/ui/tile/ImageTileRenderer.js +5 -6
- package/src/main/js/sap/ushell/ui/tile/StaticTile.js +4 -5
- package/src/main/js/sap/ushell/ui/tile/StaticTileRenderer.js +5 -6
- package/src/main/js/sap/ushell/ui/tile/TileBase.js +5 -8
- package/src/main/js/sap/ushell/ui/tile/TileBaseRenderer.js +3 -3
- package/src/main/js/sap/ushell/ui/utils.js +2 -4
- package/src/main/js/sap/ushell/ui5service/ShellUIService.js +8 -9
- package/src/main/js/sap/ushell/ui5service/UserStatus.js +11 -12
- package/src/main/js/sap/ushell/ui5service/_ShellUIService/shelluiservice.class.factory.js +6 -8
- package/src/main/js/sap/ushell/utils/DynamicTileRequest.js +5 -3
- package/src/main/js/sap/ushell/utils/HttpClient.js +6 -7
- package/src/main/js/sap/ushell/utils/RestrictedJSONModel.js +1 -1
- package/src/main/js/sap/ushell/utils/UrlParsing.js +5 -14
- package/src/main/js/sap/ushell/utils/UrlShortening.js +4 -4
- package/src/main/js/sap/ushell/utils/chipsUtils.js +10 -10
- package/src/main/js/sap/ushell/utils/workpage/WorkPageService.js +234 -0
- package/src/main/js/sap/ushell/utils/workpage/WorkPageVizInstantiation.js +141 -0
- package/src/main/js/sap/ushell/utils.js +17 -13
- package/src/test/js/sap/ushell/bootstrap/sandbox.js +1 -1
- package/ui5.yaml +6 -2
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaAgent/i18n/i18n_cnr.properties +0 -10
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaAgent/i18n/i18n_mk.properties +0 -10
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaAgent/i18n/i18n_sr.properties +0 -10
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaShell/i18n/i18n_cnr.properties +0 -4
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaShell/i18n/i18n_mk.properties +0 -4
- package/src/main/js/sap/ushell/appRuntime/ui5/plugins/rtaShell/i18n/i18n_sr.properties +0 -4
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_cnr.properties +0 -41
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_mk.properties +0 -41
- package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/i18n/i18n_sr.properties +0 -41
- package/src/main/js/sap/ushell/components/cepsearchresult/app/i18n/i18n_cnr.properties +0 -19
- package/src/main/js/sap/ushell/components/cepsearchresult/app/i18n/i18n_mk.properties +0 -19
- package/src/main/js/sap/ushell/components/cepsearchresult/app/i18n/i18n_sr.properties +0 -19
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_cnr.properties +0 -117
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_mk.properties +0 -117
- package/src/main/js/sap/ushell/components/cepsearchresult/app/util/i18n/i18n_sr.properties +0 -117
- package/src/main/js/sap/ushell/components/container/resources/resources_cnr.properties +0 -10
- package/src/main/js/sap/ushell/components/container/resources/resources_mk.properties +0 -10
- package/src/main/js/sap/ushell/components/container/resources/resources_sr.properties +0 -10
- package/src/main/js/sap/ushell/components/contentFinder/resources/resources_cnr.properties +0 -29
- package/src/main/js/sap/ushell/components/contentFinder/resources/resources_mk.properties +0 -29
- package/src/main/js/sap/ushell/components/contentFinder/resources/resources_sr.properties +0 -29
- package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchPaginated.view.xml +0 -137
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_cnr.properties +0 -78
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_mk.properties +0 -78
- package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sr.properties +0 -78
- package/src/main/js/sap/ushell/components/workPageRuntime/services/NavigationResolver.js +0 -115
- package/src/main/js/sap/ushell/components/workPageRuntime/services/WorkPage.js +0 -130
- package/src/main/js/sap/ushell/plugins/rta/i18n/i18n_cnr.properties +0 -13
- package/src/main/js/sap/ushell/plugins/rta/i18n/i18n_mk.properties +0 -13
- package/src/main/js/sap/ushell/plugins/rta/i18n/i18n_sr.properties +0 -13
- package/src/main/js/sap/ushell/plugins/rta-personalize/i18n/i18n_cnr.properties +0 -24
- package/src/main/js/sap/ushell/plugins/rta-personalize/i18n/i18n_mk.properties +0 -24
- package/src/main/js/sap/ushell/plugins/rta-personalize/i18n/i18n_sr.properties +0 -24
- package/src/main/js/sap/ushell/renderer/allMyApps/AllMyAppsKeyboardHandler.js +0 -108
- package/src/main/js/sap/ushell/renderer/resources/resources_cnr.properties +0 -996
- package/src/main/js/sap/ushell/renderer/resources/resources_mk.properties +0 -996
- package/src/main/js/sap/ushell/renderer/resources/resources_sr.properties +0 -996
- package/src/main/js/sap/ushell/renderers/fiori2/allMyApps/AllMyAppsKeyboardHandler.js +0 -13
- package/src/main/js/sap/ushell/services/_UserRecents/RecentActivity.js +0 -481
- package/src/main/js/sap/ushell/services/_UserRecents/RecentAppsUsage.js +0 -207
- package/src/main/js/sap/ushell/services/_UserRecents/RecentsList.js +0 -92
- package/src/main/js/sap/ushell/themes/base/img/launchpadDefaultIcon.jpg +0 -0
- /package/src/main/js/sap/ushell/{services/_VisualizationInstantiation → ui/launchpad}/VizInstanceRenderer.js +0 -0
|
@@ -0,0 +1,1558 @@
|
|
|
1
|
+
// Copyright (c) 2009-2023 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview The Unified Shell's page builder adapter for the 'demo' platform.
|
|
5
|
+
*
|
|
6
|
+
* @version 1.121.0
|
|
7
|
+
*/
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/base/Log",
|
|
10
|
+
"sap/base/i18n/Localization",
|
|
11
|
+
"sap/base/util/deepExtend",
|
|
12
|
+
"sap/base/util/ObjectPath",
|
|
13
|
+
"sap/m/GenericTile",
|
|
14
|
+
"sap/m/ImageContent",
|
|
15
|
+
"sap/m/library",
|
|
16
|
+
"sap/m/NumericContent",
|
|
17
|
+
"sap/m/TileContent",
|
|
18
|
+
"sap/ui/core/ComponentContainer",
|
|
19
|
+
"sap/ui/core/Core",
|
|
20
|
+
"sap/ui/core/library",
|
|
21
|
+
"sap/ui/core/mvc/View",
|
|
22
|
+
"sap/ui/Device",
|
|
23
|
+
"sap/ui/model/resource/ResourceModel",
|
|
24
|
+
"sap/ui/thirdparty/datajs",
|
|
25
|
+
"sap/ui/thirdparty/hasher",
|
|
26
|
+
"sap/ui/thirdparty/jquery",
|
|
27
|
+
"sap/ushell/Config",
|
|
28
|
+
"sap/ushell/library",
|
|
29
|
+
"sap/ushell/resources",
|
|
30
|
+
"sap/ushell/utils",
|
|
31
|
+
"sap/ushell/utils/WindowUtils",
|
|
32
|
+
"sap/ushell/EventHub"
|
|
33
|
+
], function(
|
|
34
|
+
Log,
|
|
35
|
+
Localization,
|
|
36
|
+
deepExtend,
|
|
37
|
+
ObjectPath,
|
|
38
|
+
GenericTile,
|
|
39
|
+
ImageContent,
|
|
40
|
+
mobileLibrary,
|
|
41
|
+
NumericContent,
|
|
42
|
+
TileContent,
|
|
43
|
+
ComponentContainer,
|
|
44
|
+
Core,
|
|
45
|
+
coreLibrary,
|
|
46
|
+
View,
|
|
47
|
+
Device,
|
|
48
|
+
ResourceModel,
|
|
49
|
+
OData,
|
|
50
|
+
hasher,
|
|
51
|
+
jQuery,
|
|
52
|
+
Config,
|
|
53
|
+
ushellLibrary,
|
|
54
|
+
resources,
|
|
55
|
+
ushellUtils,
|
|
56
|
+
WindowUtils,
|
|
57
|
+
EventHub
|
|
58
|
+
) {
|
|
59
|
+
"use strict";
|
|
60
|
+
|
|
61
|
+
// shortcut for sap.ui.core.mvc.ViewType
|
|
62
|
+
var ViewType = coreLibrary.mvc.ViewType;
|
|
63
|
+
|
|
64
|
+
// shortcut for sap.m.GenericTileMode
|
|
65
|
+
var GenericTileMode = mobileLibrary.GenericTileMode;
|
|
66
|
+
|
|
67
|
+
// shortcut for sap.ushell.AppType
|
|
68
|
+
var AppType = ushellLibrary.AppType;
|
|
69
|
+
|
|
70
|
+
function _registerModulePath (oTileData) {
|
|
71
|
+
var paths = {};
|
|
72
|
+
paths[oTileData.namespace.replace(/\./g, "/")] = oTileData.path || ".";
|
|
73
|
+
sap.ui.loader.config({ paths: paths });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The Unified Shell's page builder adapter for the 'demo' platform.
|
|
78
|
+
* This method MUST be called by the Unified Shell's container only.
|
|
79
|
+
* Constructs a new instance of the page builder adapter for the 'demo' platform.
|
|
80
|
+
*
|
|
81
|
+
* @param {object} oUnused
|
|
82
|
+
* the system served by the adapter
|
|
83
|
+
* @param {string} sParameter
|
|
84
|
+
* parameter as string (legacy, was used before oAdapterConfiguration was added)
|
|
85
|
+
* @param {oject} oAdapterConfiguration
|
|
86
|
+
* configuration for the adapter.
|
|
87
|
+
*
|
|
88
|
+
* @class
|
|
89
|
+
* @private
|
|
90
|
+
* @since 1.15.0
|
|
91
|
+
*/
|
|
92
|
+
var FlpLaunchPageAdapter = function (oUnused, sParameter, oAdapterConfiguration) {
|
|
93
|
+
var aConfigGroups = deepExtend([], oAdapterConfiguration.config.groups);
|
|
94
|
+
// possibility to fail in percent
|
|
95
|
+
var iFailRate = 0;
|
|
96
|
+
// getTileView async rate
|
|
97
|
+
var iGetTileViewAsyncRate = 10;
|
|
98
|
+
// artificial minimal time needed for request in ms
|
|
99
|
+
var iMinRequestTime = 10;
|
|
100
|
+
// artificial maximum of additional time for request in ms (random)
|
|
101
|
+
var iMaxRequestTime = 10;
|
|
102
|
+
var defaultGroup;
|
|
103
|
+
|
|
104
|
+
var oMapUiToModel = {};
|
|
105
|
+
|
|
106
|
+
for (var iIndex = 0; iIndex < aConfigGroups.length; iIndex++) {
|
|
107
|
+
if (aConfigGroups[iIndex].isDefaultGroup === true) {
|
|
108
|
+
defaultGroup = aConfigGroups[iIndex];
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (!defaultGroup && aConfigGroups.length > 0) {
|
|
113
|
+
// mark first group as defaultGroup
|
|
114
|
+
defaultGroup = aConfigGroups[0];
|
|
115
|
+
defaultGroup.isDefaultGroup = true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this.translationBundle = resources.i18n;
|
|
119
|
+
this.TileType = {
|
|
120
|
+
Tile: "tile",
|
|
121
|
+
Link: "link",
|
|
122
|
+
Card: "card"
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
var i18n;
|
|
126
|
+
if (oAdapterConfiguration.config.pathToLocalizedContentResources) {
|
|
127
|
+
var i18nModel = new ResourceModel({
|
|
128
|
+
bundleUrl: oAdapterConfiguration.config.pathToLocalizedContentResources,
|
|
129
|
+
bundleLocale: Localization.getLanguage()
|
|
130
|
+
});
|
|
131
|
+
i18n = i18nModel.getResourceBundle();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function _getTextLocalized (sKey) {
|
|
135
|
+
if (i18n) {
|
|
136
|
+
return i18n.getText(sKey);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return sKey;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
var aConfigCatalogs = oAdapterConfiguration.config.catalogs || [];
|
|
143
|
+
aConfigCatalogs.forEach(function (oCatTiles) {
|
|
144
|
+
if (i18n) {
|
|
145
|
+
oCatTiles.title = _getTextLocalized(oCatTiles.title);
|
|
146
|
+
}
|
|
147
|
+
oCatTiles.tiles.forEach(function (oTile) {
|
|
148
|
+
oTile.getTitle = function () {
|
|
149
|
+
return oTile.title;
|
|
150
|
+
};
|
|
151
|
+
oTile.getChip = function () {
|
|
152
|
+
return {
|
|
153
|
+
getBaseChipId: function () {
|
|
154
|
+
return oTile.chipId;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
aConfigGroups.forEach(function (oGroup) {
|
|
162
|
+
if (i18n) {
|
|
163
|
+
oGroup.title = _getTextLocalized(oGroup.title);
|
|
164
|
+
}
|
|
165
|
+
oGroup.tiles.forEach(function (oTile) {
|
|
166
|
+
handleTileServiceCall(oTile, true);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
function getSimulateFail () {
|
|
171
|
+
return (100 * Math.random()) < iFailRate;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function getTileViewAsync () {
|
|
175
|
+
return (100 * Math.random()) < iGetTileViewAsyncRate;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function getRequestTime () {
|
|
179
|
+
return iMinRequestTime + iMaxRequestTime * Math.random();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function indexOfTile (oGroup, oTile) {
|
|
183
|
+
var index;
|
|
184
|
+
for (index = 0; index < oGroup.tiles.length; index = index + 1) {
|
|
185
|
+
if (oTile.id === oGroup.tiles[index].id) {
|
|
186
|
+
return index;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return -1;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function indexOfGroup (aGroups, oGroup) {
|
|
193
|
+
var index;
|
|
194
|
+
for (index = 0; index < aGroups.length; index = index + 1) {
|
|
195
|
+
if (oGroup.id === aGroups[index].id) {
|
|
196
|
+
return index;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return -1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Reloads an existing group in order to get its existing state in the backend
|
|
204
|
+
*
|
|
205
|
+
* @param {object} the group that should be reloaded
|
|
206
|
+
* @returns {jQuery.Promise}
|
|
207
|
+
*/
|
|
208
|
+
function reloadGroup (oGroup) {
|
|
209
|
+
var oDfd = new jQuery.Deferred();
|
|
210
|
+
|
|
211
|
+
//Simulate an async function
|
|
212
|
+
window.setTimeout(function () {
|
|
213
|
+
// Simulates a success call (the done function of the promise will be called).
|
|
214
|
+
// Return the given group
|
|
215
|
+
oDfd.resolve(oGroup);
|
|
216
|
+
|
|
217
|
+
// TODO: simulate a failure (which will trigger the fail function of the promise)
|
|
218
|
+
//oDfd.reject();
|
|
219
|
+
}, getRequestTime());
|
|
220
|
+
|
|
221
|
+
return oDfd.promise();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function handleTileServiceCall (oTile, bNewVisible) {
|
|
225
|
+
if (oTile.tileType !== "sap.ushell.ui.tile.DynamicTile"
|
|
226
|
+
|| !oTile.properties || !oTile.properties.serviceUrl) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (oTile.intervalTimer) {
|
|
231
|
+
window.clearInterval(oTile.intervalTimer);
|
|
232
|
+
oTile.intervalTimer = undefined;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (bNewVisible) {
|
|
236
|
+
var serviceRefreshInterval = oTile.serviceRefreshInterval;
|
|
237
|
+
if (serviceRefreshInterval) {
|
|
238
|
+
// interval is configured in seconds, therefore we need to convert it to milliseconds
|
|
239
|
+
serviceRefreshInterval = serviceRefreshInterval * 1000;
|
|
240
|
+
} else {
|
|
241
|
+
// default interval is 10 seconds
|
|
242
|
+
serviceRefreshInterval = 10000;
|
|
243
|
+
}
|
|
244
|
+
oTile.intervalTimer = window.setInterval(function () {
|
|
245
|
+
OData.read(
|
|
246
|
+
oTile.properties.serviceUrl + "?id=" + oTile.id + "&t=" + new Date().getTime(),
|
|
247
|
+
function () {
|
|
248
|
+
Log.debug("Dynamic tile service call succeed for tile " + oTile.id);
|
|
249
|
+
},
|
|
250
|
+
function (sMessage) {
|
|
251
|
+
Log.debug("Dynamic tile service call failed for tile " + oTile.id + ", error message:" + sMessage);
|
|
252
|
+
});
|
|
253
|
+
}, ushellUtils.sanitizeTimeoutDelay(serviceRefreshInterval));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
this.getGroups = function () {
|
|
258
|
+
var oDfd = new jQuery.Deferred();
|
|
259
|
+
|
|
260
|
+
//Simulate an async function
|
|
261
|
+
window.setTimeout(function () {
|
|
262
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
263
|
+
// do not pass a reference to the local array of groups
|
|
264
|
+
oDfd.resolve(aConfigGroups.slice(0));
|
|
265
|
+
|
|
266
|
+
// TODO: simulate a failure (which will trigger the fail function of the promise)
|
|
267
|
+
//oDfd.reject();
|
|
268
|
+
}, getRequestTime());
|
|
269
|
+
|
|
270
|
+
return oDfd.promise();
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Returns the default group.
|
|
275
|
+
*
|
|
276
|
+
* @returns {jQuery.Promise<sap.ushell_abap.pbServices.ui2.Page>} Resolves the default group.
|
|
277
|
+
* In case of error the promise's <code>fail</code> function is called.
|
|
278
|
+
* @since 1.11.0
|
|
279
|
+
* @public
|
|
280
|
+
*/
|
|
281
|
+
this.getDefaultGroup = function () {
|
|
282
|
+
var oDeferred = new jQuery.Deferred();
|
|
283
|
+
oDeferred.resolve(defaultGroup);
|
|
284
|
+
return oDeferred.promise();
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
this.addGroup = function (sTitle) {
|
|
288
|
+
var oDfd = new jQuery.Deferred();
|
|
289
|
+
var bFail = getSimulateFail();
|
|
290
|
+
|
|
291
|
+
// Simulate an async function
|
|
292
|
+
window.setTimeout(function () {
|
|
293
|
+
if (!bFail) {
|
|
294
|
+
var newGroup = {
|
|
295
|
+
id: "group_" + aConfigGroups.length,
|
|
296
|
+
title: sTitle,
|
|
297
|
+
tiles: []
|
|
298
|
+
};
|
|
299
|
+
aConfigGroups.push(newGroup);
|
|
300
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
301
|
+
oDfd.resolve(newGroup);
|
|
302
|
+
} else {
|
|
303
|
+
// In case adding a new group fails, load the existing groups from the server
|
|
304
|
+
this.getGroups()
|
|
305
|
+
.done(function (oExistingGroups) {
|
|
306
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
307
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
308
|
+
oDfd.reject(oExistingGroups);
|
|
309
|
+
})
|
|
310
|
+
.fail(function () {
|
|
311
|
+
// In case loading the existing groups also fails, call the reject function with no parameters.
|
|
312
|
+
// TODO: what should the UI do in that case? leave the groups as is or delete all groups from page?
|
|
313
|
+
oDfd.reject();
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}.bind(this), getRequestTime());
|
|
317
|
+
|
|
318
|
+
return oDfd.promise();
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
this.getGroupTitle = function (oGroup) {
|
|
322
|
+
return oGroup.title;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
this.setGroupTitle = function (oGroup, sNewTitle) {
|
|
326
|
+
var oDfd = new jQuery.Deferred();
|
|
327
|
+
var bFail = getSimulateFail();
|
|
328
|
+
|
|
329
|
+
// Simulate an async function
|
|
330
|
+
window.setTimeout(function () {
|
|
331
|
+
if (!bFail) {
|
|
332
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
333
|
+
oGroup.title = sNewTitle;
|
|
334
|
+
oDfd.resolve();
|
|
335
|
+
} else {
|
|
336
|
+
// In case setting group's title fails, reload the existing groups from the server
|
|
337
|
+
reloadGroup(oGroup)
|
|
338
|
+
.done(function (oExistingGroup) {
|
|
339
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
340
|
+
// Pass the existing group's title that we got from the server to the reject function
|
|
341
|
+
oDfd.reject(oExistingGroup.title);
|
|
342
|
+
})
|
|
343
|
+
.fail(function () {
|
|
344
|
+
// In case loading the existing group also fails, call the reject function with no parameters.
|
|
345
|
+
// TODO: what should the UI do in that case? leave the group as is or pass the title that we have from the oGroup parameter?
|
|
346
|
+
oDfd.reject();
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}, getRequestTime());
|
|
350
|
+
return oDfd.promise();
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
this.getGroupId = function (oGroup) {
|
|
354
|
+
return oGroup.id;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
this.hideGroups = function (aHiddenGroupsIDs) {
|
|
358
|
+
if (aHiddenGroupsIDs && aConfigGroups) {
|
|
359
|
+
for (var i = 0; i < aConfigGroups.length; i++) {
|
|
360
|
+
if (aHiddenGroupsIDs.indexOf(aConfigGroups[i].id) !== -1) {
|
|
361
|
+
aConfigGroups[i].isVisible = false;
|
|
362
|
+
} else {
|
|
363
|
+
aConfigGroups[i].isVisible = true;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return new jQuery.Deferred().resolve();
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
this.isGroupVisible = function (oGroup) {
|
|
371
|
+
return oGroup && (oGroup.isVisible === undefined ? true : oGroup.isVisible); //Add default value for newly created group, otherwise it will be hidden by default.
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
this.moveGroup = function (oGroup, newIndex) {
|
|
375
|
+
var oDfd = new jQuery.Deferred();
|
|
376
|
+
var bFail = getSimulateFail();
|
|
377
|
+
|
|
378
|
+
// Simulate an async function
|
|
379
|
+
window.setTimeout(function () {
|
|
380
|
+
if (!bFail) {
|
|
381
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
382
|
+
aConfigGroups.splice(newIndex, 0, aConfigGroups.splice(indexOfGroup(aConfigGroups, oGroup), 1)[0]);
|
|
383
|
+
oDfd.resolve();
|
|
384
|
+
} else {
|
|
385
|
+
// TODO: simulate a failure (which will trigger the fail function of the promise)
|
|
386
|
+
// In case moving a group fails, load the existing groups from the server
|
|
387
|
+
this.getGroups()
|
|
388
|
+
.done(function (oExistingGroups) {
|
|
389
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
390
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
391
|
+
oDfd.reject(oExistingGroups);
|
|
392
|
+
})
|
|
393
|
+
.fail(function () {
|
|
394
|
+
// In case loading the existing groups also fails, call the reject function with no parameters.
|
|
395
|
+
// TODO: what should the UI do in that case? leave the groups as is or delete all groups from page?
|
|
396
|
+
oDfd.reject();
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
}.bind(this), getRequestTime());
|
|
400
|
+
|
|
401
|
+
return oDfd.promise();
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
this.removeGroup = function (oGroup) {
|
|
405
|
+
var oDfd = new jQuery.Deferred();
|
|
406
|
+
var bFail = getSimulateFail();
|
|
407
|
+
|
|
408
|
+
// Simulate an async function
|
|
409
|
+
window.setTimeout(function () {
|
|
410
|
+
if (!bFail) {
|
|
411
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
412
|
+
aConfigGroups.splice(indexOfGroup(aConfigGroups, oGroup), 1);
|
|
413
|
+
oGroup.tiles.forEach(function (oTile) {
|
|
414
|
+
handleTileServiceCall(oTile, false);
|
|
415
|
+
});
|
|
416
|
+
oDfd.resolve();
|
|
417
|
+
} else {
|
|
418
|
+
// In case removing a group fails, load the existing groups from the server
|
|
419
|
+
this.getGroups()
|
|
420
|
+
.done(function (oExistingGroups) {
|
|
421
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
422
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
423
|
+
oDfd.reject(oExistingGroups);
|
|
424
|
+
})
|
|
425
|
+
.fail(function () {
|
|
426
|
+
// In case loading the existing groups also fails, call the reject function with no parameters.
|
|
427
|
+
// TODO: what should the UI do in that case? leave the groups as is or delete all groups from page?
|
|
428
|
+
oDfd.reject();
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}.bind(this), getRequestTime());
|
|
432
|
+
|
|
433
|
+
return oDfd.promise();
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
this.resetGroup = function (oGroup) {
|
|
437
|
+
var oDfd = new jQuery.Deferred();
|
|
438
|
+
var bFail = getSimulateFail();
|
|
439
|
+
|
|
440
|
+
// Simulate an async function
|
|
441
|
+
window.setTimeout(function () {
|
|
442
|
+
if (!bFail) {
|
|
443
|
+
oGroup.tiles.forEach(function (oTile) {
|
|
444
|
+
handleTileServiceCall(oTile, false);
|
|
445
|
+
});
|
|
446
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
447
|
+
// get the preset definition of the group
|
|
448
|
+
oGroup = deepExtend({}, oAdapterConfiguration.config.groups[indexOfGroup(oAdapterConfiguration.config.groups, oGroup)]);
|
|
449
|
+
// replace the old group => indexOfGroup compares IDs, so use of original oGroup is valid
|
|
450
|
+
aConfigGroups.splice(indexOfGroup(aConfigGroups, oGroup), 1, oGroup);
|
|
451
|
+
|
|
452
|
+
oGroup.tiles.forEach(function (oTile) {
|
|
453
|
+
handleTileServiceCall(oTile, true);
|
|
454
|
+
});
|
|
455
|
+
oDfd.resolve(oGroup);
|
|
456
|
+
} else {
|
|
457
|
+
// In case removing a group fails, load the existing groups from the server
|
|
458
|
+
this.getGroups()
|
|
459
|
+
.done(function (oExistingGroups) {
|
|
460
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
461
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
462
|
+
oDfd.reject(oExistingGroups);
|
|
463
|
+
})
|
|
464
|
+
.fail(function () {
|
|
465
|
+
// In case loading the existing groups also fails, call the reject function with no parameters.
|
|
466
|
+
// TODO: what should the UI do in that case? leave the groups as is or delete all groups from page?
|
|
467
|
+
oDfd.reject();
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}.bind(this), getRequestTime());
|
|
471
|
+
|
|
472
|
+
return oDfd.promise();
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
this.isGroupRemovable = function (oGroup) {
|
|
476
|
+
return oGroup && !oGroup.isPreset;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
this.isGroupLocked = function (oGroup) {
|
|
480
|
+
return oGroup.isGroupLocked;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
this.isGroupFeatured = function (oGroup) {
|
|
484
|
+
return oGroup.isFeatured;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
this.getGroupTiles = function (oGroup) {
|
|
488
|
+
return oGroup.tiles;
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
this.getLinkTiles = function (oGroup) {
|
|
492
|
+
return oGroup.links;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
this.getTileTitle = function (oTile) {
|
|
496
|
+
return oTile.title;
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
this.getTileType = function (oTile) {
|
|
500
|
+
if (oTile.isLink) {
|
|
501
|
+
return this.TileType.Link;
|
|
502
|
+
}
|
|
503
|
+
if (oTile.isCard) {
|
|
504
|
+
return this.TileType.Card;
|
|
505
|
+
}
|
|
506
|
+
return this.TileType.Tile;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
this.getTileId = function (oTile) {
|
|
510
|
+
return oTile.id;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
this.getTileSize = function (oTile) {
|
|
514
|
+
return oTile.size;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
this.getTileTarget = function (oTile) {
|
|
518
|
+
var sUrlFromTileProperties;
|
|
519
|
+
if (oTile.properties) {
|
|
520
|
+
sUrlFromTileProperties = oTile.properties.href || oTile.properties.targetURL;
|
|
521
|
+
}
|
|
522
|
+
return oTile.target_url || sUrlFromTileProperties || "";
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
this.isTileIntentSupported = function (oTile) {
|
|
526
|
+
if (oTile && oTile.formFactor) {
|
|
527
|
+
var currentDevice;
|
|
528
|
+
var formFactor = oTile.formFactor;
|
|
529
|
+
var oSystem = Device.system;
|
|
530
|
+
if (oSystem.desktop) {
|
|
531
|
+
currentDevice = "Desktop";
|
|
532
|
+
} else if (oSystem.tablet) {
|
|
533
|
+
currentDevice = "Tablet";
|
|
534
|
+
} else if (oSystem.phone) {
|
|
535
|
+
currentDevice = "Phone";
|
|
536
|
+
}
|
|
537
|
+
if (formFactor.indexOf(currentDevice) === -1) {
|
|
538
|
+
return false;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
return true;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
this.isTileIntentSupportedAsync = function (oTile) {
|
|
545
|
+
return Promise.resolve(this.isTileIntentSupported(oTile));
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
this.isLinkPersonalizationSupported = function (oTile) {
|
|
549
|
+
if (oTile) {
|
|
550
|
+
return oTile.isLinkPersonalizationSupported;
|
|
551
|
+
}
|
|
552
|
+
return true;
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
this.getTileView = function (oTile) {
|
|
556
|
+
var oDfd = new jQuery.Deferred();
|
|
557
|
+
var bFail = getSimulateFail();
|
|
558
|
+
|
|
559
|
+
if (getTileViewAsync()) {
|
|
560
|
+
// Simulate an async function
|
|
561
|
+
window.setTimeout(function () {
|
|
562
|
+
if (!bFail) {
|
|
563
|
+
this._getTileView(oTile).done(function (oTileView) {
|
|
564
|
+
oDfd.resolve(oTileView);
|
|
565
|
+
});
|
|
566
|
+
} else {
|
|
567
|
+
oDfd.reject();
|
|
568
|
+
}
|
|
569
|
+
}.bind(this), getRequestTime());
|
|
570
|
+
} else if (!bFail) {
|
|
571
|
+
this._getTileView(oTile).done(function (oTileView) {
|
|
572
|
+
oDfd.resolve(oTileView);
|
|
573
|
+
});
|
|
574
|
+
} else {
|
|
575
|
+
oDfd.reject();
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return oDfd.promise();
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
this._getTileView = function (oTileData) {
|
|
582
|
+
var oTileUI;
|
|
583
|
+
var sError = "unknown error";
|
|
584
|
+
var bIsLink = this.getTileType(oTileData) === "link";
|
|
585
|
+
var oDfd = new jQuery.Deferred();
|
|
586
|
+
|
|
587
|
+
this._translateTileProperties(oTileData);
|
|
588
|
+
if (oTileData.namespace && oTileData.path && oTileData.moduleType) {
|
|
589
|
+
_registerModulePath(oTileData);
|
|
590
|
+
if (oTileData.moduleType === "UIComponent") {
|
|
591
|
+
oTileUI = new ComponentContainer({
|
|
592
|
+
component: Core.createComponent({
|
|
593
|
+
componentData: { properties: oTileData.properties },
|
|
594
|
+
name: oTileData.moduleName
|
|
595
|
+
}),
|
|
596
|
+
height: "100%",
|
|
597
|
+
width: "100%"
|
|
598
|
+
});
|
|
599
|
+
oDfd.resolve(oTileUI);
|
|
600
|
+
} else {
|
|
601
|
+
//XML, JSON, JS, HTML view
|
|
602
|
+
View.create({
|
|
603
|
+
viewName: oTileData.moduleName,
|
|
604
|
+
type: ViewType[oTileData.moduleType],
|
|
605
|
+
viewData: { properties: oTileData.properties },
|
|
606
|
+
height: "100%"
|
|
607
|
+
})
|
|
608
|
+
.then(function (oView) {
|
|
609
|
+
oDfd.resolve(oView);
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
return oDfd.promise();
|
|
614
|
+
} else if (oTileData.tileType) {
|
|
615
|
+
// SAPUI5 Control for the standard Static or dynamic tiles
|
|
616
|
+
var sTileType = bIsLink ? "Link" : oTileData.tileType;
|
|
617
|
+
if (sTileType) {
|
|
618
|
+
try {
|
|
619
|
+
this._createTileInstance(oTileData, sTileType).done(function (oTile) {
|
|
620
|
+
oTileUI = oTile;
|
|
621
|
+
this._handleTilePress(oTileUI);
|
|
622
|
+
this._applyDynamicTileIfoState(oTileUI);
|
|
623
|
+
|
|
624
|
+
oDfd.resolve(oTileUI);
|
|
625
|
+
}.bind(this));
|
|
626
|
+
|
|
627
|
+
return oDfd.promise();
|
|
628
|
+
} catch (e) {
|
|
629
|
+
oDfd.resolve(new GenericTile({
|
|
630
|
+
header: e && (e.name + ": " + e.message) || this.translationBundle.getText("failedTileCreationMsg"),
|
|
631
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size)
|
|
632
|
+
}));
|
|
633
|
+
return oDfd.promise();
|
|
634
|
+
}
|
|
635
|
+
} else {
|
|
636
|
+
sError = "TileType: " + oTileData.tileType + " not found!";
|
|
637
|
+
}
|
|
638
|
+
} else {
|
|
639
|
+
sError = "No TileType defined!";
|
|
640
|
+
}
|
|
641
|
+
oDfd.resolve(new GenericTile({
|
|
642
|
+
header: sError,
|
|
643
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size)
|
|
644
|
+
}));
|
|
645
|
+
return oDfd.promise();
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
this._getCatalogTileViewAsync = function (oTileData) {
|
|
649
|
+
var oDeferred = new jQuery.Deferred();
|
|
650
|
+
var oCatalogTileInstancePromise;
|
|
651
|
+
var sError = "unknown error";
|
|
652
|
+
var bIsLink = this.getTileType(oTileData) === "link";
|
|
653
|
+
|
|
654
|
+
this._translateTileProperties(oTileData);
|
|
655
|
+
if (oTileData.namespace && oTileData.path && oTileData.moduleType) {
|
|
656
|
+
_registerModulePath(oTileData);
|
|
657
|
+
if (oTileData.moduleType === "UIComponent") {
|
|
658
|
+
var oTileUI = new ComponentContainer({
|
|
659
|
+
component: Core.createComponent({
|
|
660
|
+
componentData: { properties: oTileData.properties },
|
|
661
|
+
name: oTileData.moduleName
|
|
662
|
+
}),
|
|
663
|
+
height: "100%",
|
|
664
|
+
width: "100%"
|
|
665
|
+
});
|
|
666
|
+
oDeferred.resolve(oTileUI);
|
|
667
|
+
} else {
|
|
668
|
+
//XML, JSON, JS, HTML view
|
|
669
|
+
View.create({
|
|
670
|
+
viewName: oTileData.moduleName,
|
|
671
|
+
type: ViewType[oTileData.moduleType],
|
|
672
|
+
viewData: { properties: oTileData.properties },
|
|
673
|
+
height: "100%"
|
|
674
|
+
})
|
|
675
|
+
.then(function (oView) {
|
|
676
|
+
oDeferred.resolve(oView);
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
return oDeferred.promise();
|
|
680
|
+
} else if (oTileData.tileType) {
|
|
681
|
+
// SAPUI5 Control for the standard Static or dynamic tiles
|
|
682
|
+
var sTileType = bIsLink ? "Link" : oTileData.tileType;
|
|
683
|
+
if (sTileType) {
|
|
684
|
+
try {
|
|
685
|
+
oCatalogTileInstancePromise = this._createCatalogTileInstanceAsync(oTileData, sTileType);
|
|
686
|
+
oCatalogTileInstancePromise.done(function (oCatalogTileUI) {
|
|
687
|
+
this._handleTilePress(oCatalogTileUI);
|
|
688
|
+
this._applyDynamicTileIfoState(oCatalogTileUI);
|
|
689
|
+
oDeferred.resolve(oCatalogTileUI);
|
|
690
|
+
}.bind(this));
|
|
691
|
+
} catch (e) {
|
|
692
|
+
oDeferred.resolve(new GenericTile({
|
|
693
|
+
header: e && (e.name + ": " + e.message) || this.translationBundle.getText("failedTileCreationMsg"),
|
|
694
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size)
|
|
695
|
+
}));
|
|
696
|
+
}
|
|
697
|
+
} else {
|
|
698
|
+
sError = "TileType: " + oTileData.tileType + " not found!";
|
|
699
|
+
}
|
|
700
|
+
return oDeferred.promise();
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
sError = "No TileType defined!";
|
|
704
|
+
oDeferred.resolve(new GenericTile({
|
|
705
|
+
header: sError,
|
|
706
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size)
|
|
707
|
+
}));
|
|
708
|
+
return oDeferred.promise();
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
this._createTileInstance = function (oTileData, sTileType) {
|
|
712
|
+
var oTileUI;
|
|
713
|
+
var oDfd = new jQuery.Deferred();
|
|
714
|
+
var oTileImage = this._getImageContent({ src: oTileData.properties.icon });
|
|
715
|
+
|
|
716
|
+
oTileImage.addStyleClass("sapUshellFullWidth");
|
|
717
|
+
|
|
718
|
+
switch (sTileType) {
|
|
719
|
+
case "sap.ushell.ui.tile.DynamicTile":
|
|
720
|
+
oTileUI = new GenericTile({
|
|
721
|
+
header: oTileData.properties.title,
|
|
722
|
+
subheader: oTileData.properties.subtitle,
|
|
723
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
724
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL),
|
|
725
|
+
tileContent: new TileContent({
|
|
726
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
727
|
+
footer: oTileData.properties.info,
|
|
728
|
+
unit: oTileData.properties.numberUnit,
|
|
729
|
+
// We'll utilize NumericContent for the "Dynamic" content.
|
|
730
|
+
content: new NumericContent({
|
|
731
|
+
scale: oTileData.properties.numberFactor,
|
|
732
|
+
value: oTileData.properties.numberValue,
|
|
733
|
+
truncateValueTo: 5, // Otherwise, The default value is 4.
|
|
734
|
+
indicator: oTileData.properties.stateArrow,
|
|
735
|
+
valueColor: this._parseTileValueColor(oTileData.properties.numberState),
|
|
736
|
+
icon: oTileData.properties.icon,
|
|
737
|
+
width: "100%"
|
|
738
|
+
})
|
|
739
|
+
}),
|
|
740
|
+
press: this._genericTilePressHandler.bind(this, oTileData)
|
|
741
|
+
});
|
|
742
|
+
oMapUiToModel[oTileData.id] = oTileUI;
|
|
743
|
+
oDfd.resolve(oTileUI);
|
|
744
|
+
break;
|
|
745
|
+
|
|
746
|
+
case "sap.ushell.ui.tile.StaticTile":
|
|
747
|
+
oTileUI = new GenericTile({
|
|
748
|
+
mode: oTileData.mode || (oTileData.properties.icon ? GenericTileMode.ContentMode : GenericTileMode.HeaderMode),
|
|
749
|
+
header: oTileData.properties.title,
|
|
750
|
+
subheader: oTileData.properties.subtitle,
|
|
751
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
752
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL),
|
|
753
|
+
tileContent: new TileContent({
|
|
754
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
755
|
+
footer: oTileData.properties.info,
|
|
756
|
+
content: oTileImage
|
|
757
|
+
}),
|
|
758
|
+
press: this._genericTilePressHandler.bind(this, oTileData)
|
|
759
|
+
});
|
|
760
|
+
oMapUiToModel[oTileData.id] = oTileUI;
|
|
761
|
+
oDfd.resolve(oTileUI);
|
|
762
|
+
break;
|
|
763
|
+
|
|
764
|
+
case "Link":
|
|
765
|
+
oTileUI = new GenericTile({
|
|
766
|
+
mode: GenericTileMode.LineMode,
|
|
767
|
+
subheader: oTileData.properties.subtitle,
|
|
768
|
+
header: oTileData.properties.title,
|
|
769
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL, oTileData.properties.href),
|
|
770
|
+
// TODO: The below code is for POC only, should be removed once UI5 provide action buttons for line mode
|
|
771
|
+
press: function (oEvent) {
|
|
772
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
773
|
+
}.bind(this)
|
|
774
|
+
});
|
|
775
|
+
oMapUiToModel[oTileData.id] = oTileUI;
|
|
776
|
+
oDfd.resolve(oTileUI);
|
|
777
|
+
break;
|
|
778
|
+
|
|
779
|
+
default:
|
|
780
|
+
var sNewTileType = oTileData.tileType.replace(/\./g, "/");
|
|
781
|
+
sap.ui.require([sNewTileType], function () {
|
|
782
|
+
var TilePrototype = ObjectPath.get(oTileData.tileType);
|
|
783
|
+
oTileUI = new TilePrototype(oTileData.properties || {});
|
|
784
|
+
oMapUiToModel[oTileData.id] = oTileUI;
|
|
785
|
+
oDfd.resolve(oTileUI);
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
return oDfd.promise();
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* @param {object} oGroupCard A group card object
|
|
794
|
+
* @returns {object} The card's manifest
|
|
795
|
+
* @private
|
|
796
|
+
*/
|
|
797
|
+
this.getCardManifest = function (oGroupCard) {
|
|
798
|
+
var oManifestCopy = JSON.parse(JSON.stringify(oGroupCard.manifest));
|
|
799
|
+
|
|
800
|
+
return oManifestCopy;
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
this._createCatalogTileInstanceAsync = function (oTileData, sTileType) {
|
|
804
|
+
var oDeferred = new jQuery.Deferred();
|
|
805
|
+
var oTileUI;
|
|
806
|
+
var oTileImage = this._getImageContent({ src: oTileData.properties.icon });
|
|
807
|
+
|
|
808
|
+
oTileImage.addStyleClass("sapUshellFullWidth");
|
|
809
|
+
|
|
810
|
+
switch (sTileType) {
|
|
811
|
+
case "sap.ushell.ui.tile.DynamicTile":
|
|
812
|
+
oTileUI = new GenericTile({
|
|
813
|
+
header: oTileData.properties.title,
|
|
814
|
+
subheader: oTileData.properties.subtitle,
|
|
815
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
816
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL),
|
|
817
|
+
tileContent: new TileContent({
|
|
818
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
819
|
+
footer: oTileData.properties.info,
|
|
820
|
+
unit: oTileData.properties.numberUnit,
|
|
821
|
+
// We'll utilize NumericContent for the "Dynamic" content.
|
|
822
|
+
content: new NumericContent({
|
|
823
|
+
scale: oTileData.properties.numberFactor,
|
|
824
|
+
value: oTileData.properties.numberValue,
|
|
825
|
+
truncateValueTo: 5, // Otherwise, The default value is 4.
|
|
826
|
+
indicator: oTileData.properties.stateArrow,
|
|
827
|
+
valueColor: this._parseTileValueColor(oTileData.properties.numberState),
|
|
828
|
+
icon: oTileData.properties.icon,
|
|
829
|
+
width: "100%"
|
|
830
|
+
})
|
|
831
|
+
}),
|
|
832
|
+
press: function (oEvent) {
|
|
833
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
834
|
+
}.bind(this)
|
|
835
|
+
});
|
|
836
|
+
break;
|
|
837
|
+
|
|
838
|
+
case "sap.ushell.ui.tile.StaticTile":
|
|
839
|
+
oTileUI = new GenericTile({
|
|
840
|
+
mode: oTileData.mode || (oTileData.properties.icon ? GenericTileMode.ContentMode : GenericTileMode.HeaderMode),
|
|
841
|
+
header: oTileData.properties.title,
|
|
842
|
+
subheader: oTileData.properties.subtitle,
|
|
843
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
844
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL),
|
|
845
|
+
tileContent: new TileContent({
|
|
846
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
847
|
+
footer: oTileData.properties.info,
|
|
848
|
+
content: oTileImage
|
|
849
|
+
}),
|
|
850
|
+
press: function (oEvent) {
|
|
851
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
852
|
+
}.bind(this)
|
|
853
|
+
});
|
|
854
|
+
break;
|
|
855
|
+
|
|
856
|
+
case "Link":
|
|
857
|
+
oTileUI = new GenericTile({
|
|
858
|
+
mode: GenericTileMode.LineMode,
|
|
859
|
+
subheader: oTileData.properties.subtitle,
|
|
860
|
+
header: oTileData.properties.title,
|
|
861
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL, oTileData.properties.href),
|
|
862
|
+
// TODO: The below code is for POC only, should be removed once UI5 provide action buttons for line mode
|
|
863
|
+
press: function (oEvent) {
|
|
864
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
865
|
+
}.bind(this)
|
|
866
|
+
});
|
|
867
|
+
break;
|
|
868
|
+
|
|
869
|
+
default:
|
|
870
|
+
sTileType = oTileData.tileType && oTileData.tileType.replace(/\./g, "/");
|
|
871
|
+
|
|
872
|
+
sap.ui.require([sTileType],
|
|
873
|
+
function (oTilePrototype) {
|
|
874
|
+
oTileUI = new oTilePrototype(oTileData.properties || {});
|
|
875
|
+
oDeferred.resolve(oTileUI);
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
oDeferred.resolve(oTileUI);
|
|
879
|
+
return oDeferred.promise();
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
this._createCatalogTileInstance = function (oTileData, sTileType) {
|
|
883
|
+
var oTileUI;
|
|
884
|
+
var sTileResource;
|
|
885
|
+
var oTileObject;
|
|
886
|
+
var oTileImage = this._getImageContent({ src: oTileData.properties.icon });
|
|
887
|
+
|
|
888
|
+
oTileImage.addStyleClass("sapUshellFullWidth");
|
|
889
|
+
|
|
890
|
+
switch (sTileType) {
|
|
891
|
+
case "sap.ushell.ui.tile.DynamicTile":
|
|
892
|
+
oTileUI = new GenericTile({
|
|
893
|
+
header: oTileData.properties.title,
|
|
894
|
+
subheader: oTileData.properties.subtitle,
|
|
895
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
896
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL),
|
|
897
|
+
tileContent: new TileContent({
|
|
898
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
899
|
+
footer: oTileData.properties.info,
|
|
900
|
+
unit: oTileData.properties.numberUnit,
|
|
901
|
+
// We'll utilize NumericContent for the "Dynamic" content.
|
|
902
|
+
content: new NumericContent({
|
|
903
|
+
scale: oTileData.properties.numberFactor,
|
|
904
|
+
value: oTileData.properties.numberValue,
|
|
905
|
+
truncateValueTo: 5, // Otherwise, The default value is 4.
|
|
906
|
+
indicator: oTileData.properties.stateArrow,
|
|
907
|
+
valueColor: this._parseTileValueColor(oTileData.properties.numberState),
|
|
908
|
+
icon: oTileData.properties.icon,
|
|
909
|
+
width: "100%"
|
|
910
|
+
})
|
|
911
|
+
}),
|
|
912
|
+
press: function (oEvent) {
|
|
913
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
914
|
+
}.bind(this)
|
|
915
|
+
});
|
|
916
|
+
break;
|
|
917
|
+
|
|
918
|
+
case "sap.ushell.ui.tile.StaticTile":
|
|
919
|
+
oTileUI = new GenericTile({
|
|
920
|
+
mode: oTileData.mode || (oTileData.properties.icon ? GenericTileMode.ContentMode : GenericTileMode.HeaderMode),
|
|
921
|
+
header: oTileData.properties.title,
|
|
922
|
+
subheader: oTileData.properties.subtitle,
|
|
923
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
924
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL),
|
|
925
|
+
tileContent: new TileContent({
|
|
926
|
+
frameType: this._parseTileSizeToGenericTileFormat(oTileData.size),
|
|
927
|
+
footer: oTileData.properties.info,
|
|
928
|
+
content: oTileImage
|
|
929
|
+
}),
|
|
930
|
+
press: function (oEvent) {
|
|
931
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
932
|
+
}.bind(this)
|
|
933
|
+
});
|
|
934
|
+
break;
|
|
935
|
+
|
|
936
|
+
case "Link":
|
|
937
|
+
oTileUI = new GenericTile({
|
|
938
|
+
mode: GenericTileMode.LineMode,
|
|
939
|
+
subheader: oTileData.properties.subtitle,
|
|
940
|
+
header: oTileData.properties.title,
|
|
941
|
+
url: WindowUtils.getLeanURL(oTileData.properties.targetURL, oTileData.properties.href),
|
|
942
|
+
// TODO: The below code is for POC only, should be removed once UI5 provide action buttons for line mode
|
|
943
|
+
press: function (oEvent) {
|
|
944
|
+
this._genericTilePressHandler(oTileData, oEvent);
|
|
945
|
+
}.bind(this)
|
|
946
|
+
});
|
|
947
|
+
break;
|
|
948
|
+
|
|
949
|
+
default: // This does not occur in our internal dev but may occur in third party usage for some custom tiles.
|
|
950
|
+
sTileResource = oTileData.tileType.replace(/\./g, "/");
|
|
951
|
+
oTileObject = sap.ui.require(sTileResource);
|
|
952
|
+
if (!oTileObject) {
|
|
953
|
+
if (!ObjectPath.get(oTileData.tileType)) {
|
|
954
|
+
Log.warning("FLP: local LaunchPageAdapter. The resource is used before being loaded: " + sTileResource);
|
|
955
|
+
sap.ui.requireSync(sTileResource); // LEGACY API (deprecated)
|
|
956
|
+
}
|
|
957
|
+
oTileObject = ObjectPath.get(oTileData.tileType);
|
|
958
|
+
}
|
|
959
|
+
oTileUI = new oTileObject(oTileData.properties || {});
|
|
960
|
+
}
|
|
961
|
+
return oTileUI;
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
this._genericTilePressHandler = function (oTileData, oEvent) {
|
|
965
|
+
if (oEvent.getSource().getScope && oEvent.getSource().getScope() === "Display") {
|
|
966
|
+
if (oTileData.properties.targetURL) {
|
|
967
|
+
EventHub.emit("UITracer.trace", {
|
|
968
|
+
reason: "LaunchApp",
|
|
969
|
+
source: "Tile",
|
|
970
|
+
data: {
|
|
971
|
+
targetUrl: oTileData.properties.targetURL
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
if (oTileData.properties.targetURL[0] === "#") {
|
|
975
|
+
hasher.setHash(oTileData.properties.targetURL);
|
|
976
|
+
} else {
|
|
977
|
+
// add the URL to recent activity log
|
|
978
|
+
var bLogRecentActivity = Config.last("/core/shell/enableRecentActivity") && Config.last("/core/shell/enableRecentActivityLogging");
|
|
979
|
+
if (bLogRecentActivity) {
|
|
980
|
+
var oRecentEntry = {
|
|
981
|
+
title: oTileData.properties.title,
|
|
982
|
+
appType: AppType.URL,
|
|
983
|
+
url: oTileData.properties.targetURL,
|
|
984
|
+
appId: oTileData.properties.targetURL
|
|
985
|
+
};
|
|
986
|
+
sap.ushell.Container.getRendererInternal("fiori2").logRecentActivity(oRecentEntry);
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
WindowUtils.openURL(oTileData.properties.targetURL, "_blank");
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
// Adapts the tile size according to the format of the Generic tile (Used only to test the layout).
|
|
996
|
+
this._parseTileSizeToGenericTileFormat = function (tileSize) {
|
|
997
|
+
return tileSize === "1x2" ? "TwoByOne" : "OneByOne";
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
this._parseTileValueColor = function (tileValueColor) {
|
|
1001
|
+
var returnValue = tileValueColor;
|
|
1002
|
+
|
|
1003
|
+
switch (tileValueColor) {
|
|
1004
|
+
case "Positive":
|
|
1005
|
+
returnValue = "Good";
|
|
1006
|
+
break;
|
|
1007
|
+
case "Negative":
|
|
1008
|
+
returnValue = "Critical";
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
return returnValue;
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* We should change the color of the text in the footer ("info") to be as received in the tile data in the property (infostate).
|
|
1017
|
+
* We used to have this functionality when we used the BaseTile. (we added a class which change the text color).
|
|
1018
|
+
* Today The GenericTile doesn't support this feature, and it is impossible to change the text color.
|
|
1019
|
+
* Since this feature is documented, we should support it - See BCP:1780008386.
|
|
1020
|
+
*/
|
|
1021
|
+
this._applyDynamicTileIfoState = function (oTileControl) {
|
|
1022
|
+
var fnOrigAfterRendering = oTileControl.onAfterRendering;
|
|
1023
|
+
|
|
1024
|
+
oTileControl.onAfterRendering = function () {
|
|
1025
|
+
if (fnOrigAfterRendering) {
|
|
1026
|
+
fnOrigAfterRendering.apply(this, arguments);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
var oModel = this.getModel();
|
|
1030
|
+
if (!oModel) {
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
var sDisplayInfoState = oModel.getProperty("/data/display_info_state");
|
|
1035
|
+
var elDomRef = this.getDomRef();
|
|
1036
|
+
var elFooterInfo = elDomRef.getElementsByClassName("sapMTileCntFtrTxt")[0];
|
|
1037
|
+
|
|
1038
|
+
switch (sDisplayInfoState) {
|
|
1039
|
+
case "Negative":
|
|
1040
|
+
// add class for Negative.
|
|
1041
|
+
elFooterInfo.classList.add("sapUshellTileFooterInfoNegative");
|
|
1042
|
+
break;
|
|
1043
|
+
case "Neutral":
|
|
1044
|
+
// add class for Neutral.
|
|
1045
|
+
elFooterInfo.classList.add("sapUshellTileFooterInfoNeutral");
|
|
1046
|
+
break;
|
|
1047
|
+
case "Positive":
|
|
1048
|
+
// add class for Positive.
|
|
1049
|
+
elFooterInfo.classList.add("sapUshellTileFooterInfoPositive");
|
|
1050
|
+
break;
|
|
1051
|
+
case "Critical":
|
|
1052
|
+
// add class for Critical.
|
|
1053
|
+
elFooterInfo.classList.add("sapUshellTileFooterInfoCritical");
|
|
1054
|
+
break;
|
|
1055
|
+
default:
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
this._handleTilePress = function (oTileControl) {
|
|
1062
|
+
if (typeof oTileControl.attachPress === "function") {
|
|
1063
|
+
oTileControl.attachPress(function () {
|
|
1064
|
+
if (typeof oTileControl.getTargetURL === "function") {
|
|
1065
|
+
var sTargetURL = oTileControl.getTargetURL();
|
|
1066
|
+
EventHub.emit("UITracer.trace", {
|
|
1067
|
+
reason: "LaunchApp",
|
|
1068
|
+
source: "Tile",
|
|
1069
|
+
data: {
|
|
1070
|
+
targetUrl: sTargetURL
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
if (sTargetURL) {
|
|
1074
|
+
if (sTargetURL[0] === "#") {
|
|
1075
|
+
hasher.setHash(sTargetURL);
|
|
1076
|
+
} else {
|
|
1077
|
+
WindowUtils.openURL(sTargetURL, "_blank");
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1085
|
+
this._translateTileProperties = function (oTileData) {
|
|
1086
|
+
if (this.translationBundle && i18n && !oTileData._isTranslated) {
|
|
1087
|
+
var properties = oTileData.properties;
|
|
1088
|
+
var keywords = oTileData.keywords;
|
|
1089
|
+
properties.title = _getTextLocalized(properties.title);
|
|
1090
|
+
properties.subtitle = _getTextLocalized(properties.subtitle);
|
|
1091
|
+
properties.info = _getTextLocalized(properties.info);
|
|
1092
|
+
|
|
1093
|
+
if (keywords) {
|
|
1094
|
+
for (var keyIdex = 0; keyIdex < keywords.length; keyIdex++) {
|
|
1095
|
+
keywords[keyIdex] = _getTextLocalized(keywords[keyIdex]);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
oTileData._isTranslated = true;
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
this.refreshTile = function (/*oTile*/) {
|
|
1103
|
+
// nothing to do here for the moment as we don't have dynamic data
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
this.setTileVisible = function (oTile, bNewVisible) {
|
|
1107
|
+
handleTileServiceCall(oTile, bNewVisible);
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
this.addTile = function (oCatalogTile, oGroup) {
|
|
1111
|
+
if (!oGroup) {
|
|
1112
|
+
oGroup = defaultGroup;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
var oDfd = new jQuery.Deferred();
|
|
1116
|
+
var bFail = getSimulateFail();
|
|
1117
|
+
|
|
1118
|
+
// Simulate an async function
|
|
1119
|
+
window.setTimeout(function () {
|
|
1120
|
+
if (!bFail) {
|
|
1121
|
+
var newTile = deepExtend(
|
|
1122
|
+
{
|
|
1123
|
+
title: "A new tile was added",
|
|
1124
|
+
size: "1x1"
|
|
1125
|
+
},
|
|
1126
|
+
oCatalogTile,
|
|
1127
|
+
{ id: "tile_0" + oCatalogTile.chipId }
|
|
1128
|
+
);
|
|
1129
|
+
|
|
1130
|
+
oGroup.tiles.push(newTile);
|
|
1131
|
+
handleTileServiceCall(newTile, true);
|
|
1132
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
1133
|
+
oDfd.resolve(newTile);
|
|
1134
|
+
} else {
|
|
1135
|
+
// In case adding a tile fails, load the existing groups from the server
|
|
1136
|
+
this.getGroups()
|
|
1137
|
+
.done(function (oExistingGroups) {
|
|
1138
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
1139
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
1140
|
+
oDfd.reject(oExistingGroups);
|
|
1141
|
+
})
|
|
1142
|
+
.fail(function () {
|
|
1143
|
+
// In case loading the existing group also fails, call the reject function with no parameters.
|
|
1144
|
+
// TODO: what should the UI do in that case?
|
|
1145
|
+
oDfd.reject();
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
}.bind(this), getRequestTime());
|
|
1149
|
+
|
|
1150
|
+
return oDfd.promise();
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
this.removeTile = function (oGroup, oTile) {
|
|
1154
|
+
var oDfd = new jQuery.Deferred();
|
|
1155
|
+
var bFail = getSimulateFail();
|
|
1156
|
+
|
|
1157
|
+
// Simulate an async function
|
|
1158
|
+
window.setTimeout(function () {
|
|
1159
|
+
if (!bFail) {
|
|
1160
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
1161
|
+
oGroup.tiles.splice(indexOfTile(oGroup, oTile), 1);
|
|
1162
|
+
handleTileServiceCall(oTile, false);
|
|
1163
|
+
oDfd.resolve();
|
|
1164
|
+
} else {
|
|
1165
|
+
// In case removing a tile fails, load the existing groups from the server
|
|
1166
|
+
this.getGroups()
|
|
1167
|
+
.done(function (oExistingGroups) {
|
|
1168
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
1169
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
1170
|
+
oDfd.reject(oExistingGroups);
|
|
1171
|
+
})
|
|
1172
|
+
.fail(function () {
|
|
1173
|
+
// In case loading the existing group also fails, call the reject function with no parameters.
|
|
1174
|
+
// TODO: what should the UI do in that case?
|
|
1175
|
+
oDfd.reject();
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
}.bind(this), getRequestTime());
|
|
1179
|
+
|
|
1180
|
+
return oDfd.promise();
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
this.moveTile = function (oTile, sourceIndex, targetIndex, oSourceGroup, oTargetGroup, newTileType) {
|
|
1184
|
+
var oDfd = new jQuery.Deferred();
|
|
1185
|
+
var bFail = getSimulateFail();
|
|
1186
|
+
|
|
1187
|
+
// Simulate an async function
|
|
1188
|
+
window.setTimeout(function () {
|
|
1189
|
+
if (!bFail) {
|
|
1190
|
+
if (oTargetGroup === undefined) {
|
|
1191
|
+
// Move a tile in the same group
|
|
1192
|
+
oTargetGroup = oSourceGroup;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
oTile.isLink = newTileType ? (newTileType === this.TileType.Link) : oTile.isLink;
|
|
1196
|
+
|
|
1197
|
+
oSourceGroup.tiles.splice(sourceIndex, 1);
|
|
1198
|
+
oTargetGroup.tiles.splice(targetIndex, 0, oTile);
|
|
1199
|
+
|
|
1200
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
1201
|
+
oDfd.resolve(oTile);
|
|
1202
|
+
} else {
|
|
1203
|
+
// In case moving a tile fails, reload the groups from the server
|
|
1204
|
+
this.getGroups()
|
|
1205
|
+
.done(function (oExistingGroups) {
|
|
1206
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
1207
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
1208
|
+
oDfd.reject(oExistingGroups);
|
|
1209
|
+
})
|
|
1210
|
+
.fail(function () {
|
|
1211
|
+
// In case loading the existing group also fails, call the reject function with no parameters.
|
|
1212
|
+
// TODO: what should the UI do in that case?
|
|
1213
|
+
oDfd.reject();
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
}.bind(this), getRequestTime());
|
|
1217
|
+
|
|
1218
|
+
return oDfd.promise();
|
|
1219
|
+
};
|
|
1220
|
+
|
|
1221
|
+
this.getTile = function (/*sSemanticObject, sAction*/) {
|
|
1222
|
+
var oDfd = new jQuery.Deferred();
|
|
1223
|
+
// TODO: return a oTile async
|
|
1224
|
+
return oDfd.promise();
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
this.getCatalogs = function () {
|
|
1228
|
+
var oDfd = new jQuery.Deferred();
|
|
1229
|
+
|
|
1230
|
+
// Simulate an async function with a loading delay of up to 5 sec
|
|
1231
|
+
// Simulates a progress call (the progress function of the promise will be called)
|
|
1232
|
+
aConfigCatalogs.forEach(function (oCatalog) {
|
|
1233
|
+
window.setTimeout(function () {
|
|
1234
|
+
oDfd.notify(oCatalog);
|
|
1235
|
+
}, 300);
|
|
1236
|
+
});
|
|
1237
|
+
// TODO: simulate a failure (which will trigger the fail function of the promise)
|
|
1238
|
+
//oDfd.reject();
|
|
1239
|
+
|
|
1240
|
+
window.setTimeout(function () {
|
|
1241
|
+
oDfd.resolve(aConfigCatalogs);
|
|
1242
|
+
}, 1500);
|
|
1243
|
+
|
|
1244
|
+
return oDfd.promise();
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
this.isCatalogsValid = function () {
|
|
1248
|
+
// TODO
|
|
1249
|
+
return true;
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
this.getCatalogError = function (/*oCatalog*/) {
|
|
1253
|
+
return;
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
this.getCatalogId = function (oCatalog) {
|
|
1257
|
+
return oCatalog.id;
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
this.getCatalogTitle = function (oCatalog) {
|
|
1261
|
+
return oCatalog.title;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
this.getCatalogTiles = function (oCatalog) {
|
|
1265
|
+
var oDfd = new jQuery.Deferred();
|
|
1266
|
+
|
|
1267
|
+
// Simulate an async function with a loading delay of up to 5 sec
|
|
1268
|
+
window.setTimeout(function () {
|
|
1269
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
1270
|
+
oDfd.resolve(oCatalog.tiles);
|
|
1271
|
+
|
|
1272
|
+
// TODO: simulate a failure (which will trigger the fail function of the promise)
|
|
1273
|
+
//oDfd.reject();
|
|
1274
|
+
}, getRequestTime());
|
|
1275
|
+
|
|
1276
|
+
return oDfd.promise();
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
this.getCatalogTileId = function (oCatalogTile) {
|
|
1280
|
+
if (oCatalogTile.chipId) {
|
|
1281
|
+
return oCatalogTile.chipId;
|
|
1282
|
+
}
|
|
1283
|
+
return "UnknownCatalogTileId";
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
this.getStableCatalogTileId = function (oCatalogTile) {
|
|
1287
|
+
if (oCatalogTile.referenceChipId) {
|
|
1288
|
+
return oCatalogTile.referenceChipId;
|
|
1289
|
+
}
|
|
1290
|
+
if (oCatalogTile.chipId) {
|
|
1291
|
+
return oCatalogTile.chipId;
|
|
1292
|
+
}
|
|
1293
|
+
return "UnknownCatalogTileId";
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
this.getCatalogTileTitle = function (oCatalogTile) {
|
|
1297
|
+
return oCatalogTile.title;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
this.getCatalogTileSize = function (oCatalogTile) {
|
|
1301
|
+
return oCatalogTile.size;
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
this.getCatalogTileViewControl = function (oCatalogTile) {
|
|
1305
|
+
return this._getCatalogTileViewAsync(oCatalogTile);
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
this.getCatalogTileTargetURL = function (oCatalogTile) {
|
|
1309
|
+
return (oCatalogTile.properties && oCatalogTile.properties.targetURL) || null;
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
this.getCatalogTilePreviewTitle = function (oCatalogTile) {
|
|
1313
|
+
return (oCatalogTile.properties && oCatalogTile.properties.title) || null;
|
|
1314
|
+
};
|
|
1315
|
+
|
|
1316
|
+
this.getCatalogTilePreviewInfo = function (oCatalogTile) {
|
|
1317
|
+
return (oCatalogTile.properties && oCatalogTile.properties.info) || null;
|
|
1318
|
+
};
|
|
1319
|
+
|
|
1320
|
+
this.getCatalogTilePreviewIndicatorDataSource = function (oCatalogTile) {
|
|
1321
|
+
var oIndicatorDataSource;
|
|
1322
|
+
if (oCatalogTile.properties && oCatalogTile.properties.serviceUrl) {
|
|
1323
|
+
oIndicatorDataSource = {
|
|
1324
|
+
path: oCatalogTile.properties.serviceUrl,
|
|
1325
|
+
refresh: oCatalogTile.properties.serviceRefreshInterval
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
return oIndicatorDataSource;
|
|
1329
|
+
};
|
|
1330
|
+
|
|
1331
|
+
this.getCatalogTilePreviewSubtitle = function (oCatalogTile) {
|
|
1332
|
+
return (oCatalogTile.properties && oCatalogTile.properties.subtitle) || null;
|
|
1333
|
+
};
|
|
1334
|
+
|
|
1335
|
+
this.getCatalogTilePreviewIcon = function (oCatalogTile) {
|
|
1336
|
+
return (oCatalogTile.properties && oCatalogTile.properties.icon) || null;
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
this.getCatalogTileKeywords = function (oCatalogTile) {
|
|
1340
|
+
return [
|
|
1341
|
+
oCatalogTile.title,
|
|
1342
|
+
oCatalogTile.properties && oCatalogTile.properties.subtitle,
|
|
1343
|
+
oCatalogTile.properties && oCatalogTile.properties.info,
|
|
1344
|
+
oCatalogTile.keywords // might be an array or undefined
|
|
1345
|
+
]
|
|
1346
|
+
.flat()
|
|
1347
|
+
.filter(function (element) {
|
|
1348
|
+
// remove undefined values and empty strings from array
|
|
1349
|
+
return element;
|
|
1350
|
+
});
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
this.getCatalogTileTags = function (oCatalogTile) {
|
|
1354
|
+
return (oCatalogTile && oCatalogTile.tags) || [];
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Adds a bookmark to the user's home page.
|
|
1359
|
+
*
|
|
1360
|
+
* @param {object} oParameters bookmark parameters. In addition to title and URL,
|
|
1361
|
+
* a bookmark might allow additional settings, such as an icon or a subtitle.
|
|
1362
|
+
* Which settings are supported depends on the environment in which the application is running.
|
|
1363
|
+
* Unsupported parameters will be ignored.
|
|
1364
|
+
* @param {string} oParameters.title The title of the bookmark.
|
|
1365
|
+
* @param {string} oParameters.url The URL of the bookmark.
|
|
1366
|
+
* If the target application shall run in the Shell the URL has to be in the format <code>"#SO-Action~Context?P1=a&P2=x&/route?RPV=1"</code>
|
|
1367
|
+
* @param {string} [oParameters.icon] The optional icon URL of the bookmark (e.g. <code>"sap-icon://home"</code>).
|
|
1368
|
+
* @param {string} [oParameters.info] The optional information text of the bookmark.
|
|
1369
|
+
* @param {string} [oParameters.subtitle] The optional subtitle of the bookmark.
|
|
1370
|
+
* @param {string} [oParameters.serviceUrl] The URL to a REST or OData service that provides some dynamic information for the bookmark.
|
|
1371
|
+
* @param {string} [oParameters.serviceRefreshInterval] The refresh interval for the <code>serviceUrl</code> in seconds.
|
|
1372
|
+
* @param {string} [oParameters.numberUnit] The unit for the number retrieved from <code>serviceUrl</code>.
|
|
1373
|
+
* @returns {jQuery.Promise} Resolves once the bookmark was added.
|
|
1374
|
+
* @see sap.ushell.services.URLParsing#getShellHash
|
|
1375
|
+
* @since 1.11.0
|
|
1376
|
+
* @public
|
|
1377
|
+
*/
|
|
1378
|
+
this.addBookmark = function (oParameters, oGroupParam) {
|
|
1379
|
+
var oGroup = oGroupParam || defaultGroup;
|
|
1380
|
+
var oDfd = new jQuery.Deferred();
|
|
1381
|
+
var bFail = getSimulateFail();
|
|
1382
|
+
var title = oParameters.title;
|
|
1383
|
+
var subtitle = oParameters.subtitle;
|
|
1384
|
+
var info = oParameters.info;
|
|
1385
|
+
var url = oParameters.url;
|
|
1386
|
+
var bIsLinkPersonalizationSupported = this.isLinkPersonalizationSupported();
|
|
1387
|
+
|
|
1388
|
+
// Simulate an async function
|
|
1389
|
+
window.setTimeout(function () {
|
|
1390
|
+
if (!bFail) {
|
|
1391
|
+
var newTile = {
|
|
1392
|
+
title: title,
|
|
1393
|
+
size: "1x1",
|
|
1394
|
+
chipId: "tile_0" + oGroup.tiles.length,
|
|
1395
|
+
tileType: "sap.ushell.ui.tile.StaticTile",
|
|
1396
|
+
id: "tile_0" + oGroup.tiles.length,
|
|
1397
|
+
isLinkPersonalizationSupported: bIsLinkPersonalizationSupported,
|
|
1398
|
+
keywords: [],
|
|
1399
|
+
properties: {
|
|
1400
|
+
icon: "sap-icon://time-entry-request",
|
|
1401
|
+
info: info,
|
|
1402
|
+
subtitle: subtitle,
|
|
1403
|
+
title: title,
|
|
1404
|
+
targetURL: url
|
|
1405
|
+
}
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
oGroup.tiles.push(newTile);
|
|
1409
|
+
handleTileServiceCall(newTile, true);
|
|
1410
|
+
// Simulates a success call (the done function of the promise will be called)
|
|
1411
|
+
oDfd.resolve(newTile);
|
|
1412
|
+
} else {
|
|
1413
|
+
// In case adding a tile fails, load the existing groups from the server
|
|
1414
|
+
this.getGroups()
|
|
1415
|
+
.done(function (oExistingGroups) {
|
|
1416
|
+
// Use the reject function in order to specify that an error has occurred.
|
|
1417
|
+
// Pass the existing groups that we got from the server to the reject function
|
|
1418
|
+
oDfd.reject(oExistingGroups);
|
|
1419
|
+
})
|
|
1420
|
+
.fail(function () {
|
|
1421
|
+
// In case loading the existing group also fails, call the reject function with no parameters.
|
|
1422
|
+
// TODO: what should the UI do in that case?
|
|
1423
|
+
oDfd.reject();
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
}.bind(this), getRequestTime());
|
|
1427
|
+
return oDfd.promise();
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
this.updateBookmarks = function (sUrl, oParameters) {
|
|
1431
|
+
var oDeferred = new jQuery.Deferred();
|
|
1432
|
+
var iCount = 0;
|
|
1433
|
+
var oGetGroupsPromise = this.getGroups();
|
|
1434
|
+
|
|
1435
|
+
oGetGroupsPromise.done(function (aRetrievedGroups) {
|
|
1436
|
+
aRetrievedGroups.forEach(function (oGroup) {
|
|
1437
|
+
oGroup.tiles.forEach(function (oTileData) {
|
|
1438
|
+
if (oTileData.properties && oTileData.properties.targetURL === sUrl) {
|
|
1439
|
+
for (var property in oParameters) {
|
|
1440
|
+
if (oParameters.hasOwnProperty(property)) {
|
|
1441
|
+
oTileData.properties[property] = oParameters[property];
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
var oTileUI = oMapUiToModel[oTileData.id];
|
|
1445
|
+
if (oTileUI !== undefined) {
|
|
1446
|
+
oTileUI.setHeader(oTileData.properties.title);
|
|
1447
|
+
oTileUI.setSubheader(oTileData.properties.subtitle);
|
|
1448
|
+
}
|
|
1449
|
+
iCount++;
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
});
|
|
1453
|
+
oDeferred.resolve(iCount);
|
|
1454
|
+
});
|
|
1455
|
+
oGetGroupsPromise.fail(function () {
|
|
1456
|
+
oDeferred.reject();
|
|
1457
|
+
});
|
|
1458
|
+
|
|
1459
|
+
return oDeferred.promise();
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
this.deleteBookmarks = function (sUrl) {
|
|
1463
|
+
var oDfd = new jQuery.Deferred();
|
|
1464
|
+
var iCount = 0;
|
|
1465
|
+
var oGroup;
|
|
1466
|
+
var oTile;
|
|
1467
|
+
for (var iGroupIndex = 0; iGroupIndex < aConfigGroups.length; iGroupIndex++) {
|
|
1468
|
+
oGroup = aConfigGroups[iGroupIndex];
|
|
1469
|
+
for (var iTileIndex = oGroup.tiles.length - 1; iTileIndex >= 0; iTileIndex--) {
|
|
1470
|
+
oTile = oGroup.tiles[iTileIndex];
|
|
1471
|
+
if (oTile.properties.targetURL === sUrl) {
|
|
1472
|
+
oGroup.tiles.splice(iTileIndex, 1);
|
|
1473
|
+
iCount++;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
oDfd.resolve(iCount);
|
|
1478
|
+
return oDfd.promise();
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Counts <b>all</b> bookmarks pointing to the given URL from all of the user's pages.
|
|
1483
|
+
* You can use this method to check if a bookmark already exists.
|
|
1484
|
+
* <p>
|
|
1485
|
+
* This is a potentially asynchronous operation in case the user's pages have not yet been loaded completely!
|
|
1486
|
+
*
|
|
1487
|
+
* @param {string} sUrl The URL of the bookmarks to be counted, exactly as specified to {@link #addBookmark}.
|
|
1488
|
+
* @returns {jQuery.Promise} Resolves the count of existing bookmarks is provided (which might be zero).
|
|
1489
|
+
* In case of failure, an error message is passed.
|
|
1490
|
+
* @see #addBookmark
|
|
1491
|
+
* @private
|
|
1492
|
+
*/
|
|
1493
|
+
this.countBookmarks = function (sUrl) {
|
|
1494
|
+
var oDfd = new jQuery.Deferred();
|
|
1495
|
+
|
|
1496
|
+
var iCount = 0;
|
|
1497
|
+
var oGroup;
|
|
1498
|
+
var oTile;
|
|
1499
|
+
for (var iGroupIndex = 0; iGroupIndex < aConfigGroups.length; iGroupIndex++) {
|
|
1500
|
+
oGroup = aConfigGroups[iGroupIndex];
|
|
1501
|
+
for (var iTileIndex = 0; iTileIndex < oGroup.tiles.length; iTileIndex++) {
|
|
1502
|
+
oTile = oGroup.tiles[iTileIndex];
|
|
1503
|
+
if (oTile.properties.targetURL === sUrl) {
|
|
1504
|
+
iCount++;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
oDfd.resolve(iCount);
|
|
1509
|
+
|
|
1510
|
+
return oDfd.promise();
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
this._getImageContent = function (oData) {
|
|
1514
|
+
return new ImageContent(oData);
|
|
1515
|
+
};
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* This method is called to notify that the given tile has been added to some remote catalog which is not specified further.
|
|
1519
|
+
*
|
|
1520
|
+
* @param {string} sTileId the ID of the tile that has been added to the catalog (as returned by that OData POST operation)
|
|
1521
|
+
* @private
|
|
1522
|
+
* @since 1.16.4
|
|
1523
|
+
*/
|
|
1524
|
+
this.onCatalogTileAdded = function (/*sTileId*/) {
|
|
1525
|
+
// TODO
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
this.getTileActions = function (oTile) {
|
|
1529
|
+
return (oTile && oTile.actions) || null;
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* Returns raw catalog tile data that can be used to instantiate the tile
|
|
1534
|
+
* In the local adapter always a promise resolving to an empty object will be returned
|
|
1535
|
+
*
|
|
1536
|
+
* @returns {Promise<object>} A promise resolving to an empty object
|
|
1537
|
+
* @since 1.78.0
|
|
1538
|
+
* @private
|
|
1539
|
+
*/
|
|
1540
|
+
FlpLaunchPageAdapter.prototype._getCatalogTileIndex = function () {
|
|
1541
|
+
var oCatalogTileIndex = {};
|
|
1542
|
+
return Promise.resolve(oCatalogTileIndex);
|
|
1543
|
+
};
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* Get numberUnit for a catalog tile.
|
|
1547
|
+
*
|
|
1548
|
+
* @param {sap.ui2.ChipInstance} oCatalogTile the catalog tile
|
|
1549
|
+
* @returns {string} the numberUnit for the catalog tile provided via the tileConfiguration
|
|
1550
|
+
* @since 1.84.0
|
|
1551
|
+
*/
|
|
1552
|
+
this.getCatalogTileNumberUnit = function (oCatalogTile) {
|
|
1553
|
+
return (oCatalogTile.properties ? oCatalogTile.properties.numberUnit : undefined);
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
|
|
1557
|
+
return FlpLaunchPageAdapter;
|
|
1558
|
+
});
|