@sapui5/sap.ushell 1.117.1 → 1.118.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.
Files changed (386) hide show
  1. package/package.json +4 -4
  2. package/src/main/js/sap/ushell/.library +1 -1
  3. package/src/main/js/sap/ushell/ApplicationType.js +4 -6
  4. package/src/main/js/sap/ushell/Container.js +0 -6
  5. package/src/main/js/sap/ushell/Fiori20Adapter.js +1 -1
  6. package/src/main/js/sap/ushell/Fiori20AdapterTest.js +1 -1
  7. package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
  8. package/src/main/js/sap/ushell/SessionHandler.js +4 -4
  9. package/src/main/js/sap/ushell/TechnicalParameters.js +1 -1
  10. package/src/main/js/sap/ushell/URLTemplateProcessor.js +1 -1
  11. package/src/main/js/sap/ushell/Ui5NativeServiceFactory.js +1 -1
  12. package/src/main/js/sap/ushell/Ui5ServiceFactory.js +1 -1
  13. package/src/main/js/sap/ushell/User.js +10 -0
  14. package/src/main/js/sap/ushell/_ApplicationType/urlTemplateResolution.js +64 -56
  15. package/src/main/js/sap/ushell/_ApplicationType/wdaResolution.js +5 -5
  16. package/src/main/js/sap/ushell/_URLTemplateProcessor/DefinitionParameterSetBuilder.js +1 -1
  17. package/src/main/js/sap/ushell/_URLTemplateProcessor/DependencyGraph.js +1 -1
  18. package/src/main/js/sap/ushell/_URLTemplateProcessor/Functions.js +1 -1
  19. package/src/main/js/sap/ushell/_URLTemplateProcessor/Resolvers.js +1 -1
  20. package/src/main/js/sap/ushell/_URLTemplateProcessor/TemplateParameterParser.js +1 -1
  21. package/src/main/js/sap/ushell/_URLTemplateProcessor/utils.js +1 -1
  22. package/src/main/js/sap/ushell/adapters/cdm/ClientSideTargetResolutionAdapter.js +2 -2
  23. package/src/main/js/sap/ushell/adapters/cdm/CommonDataModelAdapter.js +1 -1
  24. package/src/main/js/sap/ushell/adapters/cdm/ConfigurationDefaultsAdapter.js +1 -1
  25. package/src/main/js/sap/ushell/adapters/cdm/ContainerAdapter.js +1 -1
  26. package/src/main/js/sap/ushell/adapters/cdm/LaunchPageAdapter.js +1 -1
  27. package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +1 -1
  28. package/src/main/js/sap/ushell/adapters/cdm/PersonalizationAdapter.js +1 -1
  29. package/src/main/js/sap/ushell/adapters/cdm/Ui5ComponentLoaderAdapter.js +1 -1
  30. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/modifyHome.js +1 -1
  31. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readCatalogs.js +1 -1
  32. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readHome.js +1 -1
  33. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/uri.transform.js +1 -1
  34. package/src/main/js/sap/ushell/adapters/cdm/util/AppForInbound.js +1 -1
  35. package/src/main/js/sap/ushell/adapters/cdm/util/cdmSiteUtils.js +1 -1
  36. package/src/main/js/sap/ushell/adapters/cdm/v3/AdapterBase.js +1 -1
  37. package/src/main/js/sap/ushell/adapters/cdm/v3/LaunchPageAdapter.js +1 -1
  38. package/src/main/js/sap/ushell/adapters/cdm/v3/StaticGroupsAdapter.js +1 -1
  39. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readApplications.js +1 -1
  40. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readCatalogs.js +1 -1
  41. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readHome.js +1 -1
  42. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readPages.js +1 -1
  43. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readUtils.js +1 -1
  44. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readVisualizations.js +11 -9
  45. package/src/main/js/sap/ushell/adapters/cdm/v3/utilsCdm.js +1 -1
  46. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +1 -1
  47. package/src/main/js/sap/ushell/adapters/cep/SearchCEPAdapter.js +1 -1
  48. package/src/main/js/sap/ushell/adapters/cflp/UserDefaultParameterPersistenceAdapter.js +1 -1
  49. package/src/main/js/sap/ushell/adapters/local/AdapterContainer.js +1 -1
  50. package/src/main/js/sap/ushell/adapters/local/AppStateAdapter.js +1 -1
  51. package/src/main/js/sap/ushell/adapters/local/ClientSideTargetResolutionAdapter.js +1 -1
  52. package/src/main/js/sap/ushell/adapters/local/ContainerAdapter.js +1 -1
  53. package/src/main/js/sap/ushell/adapters/local/LaunchPageAdapter.js +1 -1
  54. package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionAdapter.js +3 -2
  55. package/src/main/js/sap/ushell/adapters/local/PageBuildingAdapter.js +1 -1
  56. package/src/main/js/sap/ushell/adapters/local/PagePersistenceAdapter.js +1 -1
  57. package/src/main/js/sap/ushell/adapters/local/PersonalizationAdapter.js +1 -1
  58. package/src/main/js/sap/ushell/adapters/local/SearchAdapter.js +1 -1
  59. package/src/main/js/sap/ushell/adapters/local/SearchCEPAdapter.js +1 -1
  60. package/src/main/js/sap/ushell/adapters/local/SupportTicketAdapter.js +1 -1
  61. package/src/main/js/sap/ushell/adapters/local/Ui5ComponentLoaderAdapter.js +1 -1
  62. package/src/main/js/sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js +1 -1
  63. package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +1 -1
  64. package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntime.js +17 -19
  65. package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntimeContext.js +3 -3
  66. package/src/main/js/sap/ushell/appRuntime/ui5/SessionHandlerAgent.js +10 -0
  67. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppLifeCycleAgent.js +2 -11
  68. package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
  69. package/src/main/js/sap/ushell/bootstrap/SchedulingAgent.js +8 -4
  70. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/EventProcessor.js +21 -2
  71. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/FLPScheduler.js +23 -7
  72. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/StepConfiguration.json +4 -3
  73. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/logger.js +1 -1
  74. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/state.js +1 -1
  75. package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5.js +1 -0
  76. package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +1 -1
  77. package/src/main/js/sap/ushell/components/HeaderManager.js +6 -6
  78. package/src/main/js/sap/ushell/components/appfinder/CatalogView.js +17 -18
  79. package/src/main/js/sap/ushell/components/appfinder/HierarchyAppsView.js +1 -1
  80. package/src/main/js/sap/ushell/components/appfinder/manifest.json +1 -1
  81. package/src/main/js/sap/ushell/components/applicationIntegration/AppLifeCycle.js +9 -11
  82. package/src/main/js/sap/ushell/components/applicationIntegration/application/Application.js +7 -1
  83. package/src/main/js/sap/ushell/components/applicationIntegration/application/BlueBoxHandler.js +9 -18
  84. package/src/main/js/sap/ushell/components/applicationIntegration/application/PostMessageAPI.js +9 -5
  85. package/src/main/js/sap/ushell/components/applicationIntegration/configuration/AppMeta.js +1 -1
  86. package/src/main/js/sap/ushell/components/applicationIntegration/elements/model.js +1 -1
  87. package/src/main/js/sap/ushell/components/applicationIntegration/relatedServices/RelatedServices.js +1 -1
  88. package/src/main/js/sap/ushell/components/applicationIntegration/relatedShellElements/RelatedShellElements.js +2 -4
  89. package/src/main/js/sap/ushell/components/container/ApplicationContainer.js +3 -8
  90. package/src/main/js/sap/ushell/components/contentFinder/Component.js +1 -1
  91. package/src/main/js/sap/ushell/components/contentFinder/controller/AppSearch.controller.js +3 -3
  92. package/src/main/js/sap/ushell/components/contentFinder/controller/ContentFinderDialog.controller.js +1 -1
  93. package/src/main/js/sap/ushell/components/contentFinder/controller/WidgetGallery.controller.js +1 -1
  94. package/src/main/js/sap/ushell/components/contentFinder/manifest.json +4 -2
  95. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearch.view.xml +37 -17
  96. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchBox.fragment.xml +111 -35
  97. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchPaginated.view.xml +37 -18
  98. package/src/main/js/sap/ushell/components/contentFinder/view/ContentFinderDialog.view.xml +24 -15
  99. package/src/main/js/sap/ushell/components/contentFinder/view/WidgetGallery.view.xml +67 -39
  100. package/src/main/js/sap/ushell/components/factsheet/Component.js +1 -1
  101. package/src/main/js/sap/ushell/components/factsheet/tools/ODataUrlTemplating.js +1 -1
  102. package/src/main/js/sap/ushell/components/homepage/ActionMode.js +1 -1
  103. package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +1 -1
  104. package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +1 -1
  105. package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +1 -1
  106. package/src/main/js/sap/ushell/components/homepage/FLPAnalytics.js +1 -1
  107. package/src/main/js/sap/ushell/components/homepage/manifest.json +1 -1
  108. package/src/main/js/sap/ushell/components/pages/ActionMode.js +1 -1
  109. package/src/main/js/sap/ushell/components/pages/Component.js +1 -1
  110. package/src/main/js/sap/ushell/components/pages/MyHomeImport.js +1 -1
  111. package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +2 -2
  112. package/src/main/js/sap/ushell/components/pages/manifest.json +1 -1
  113. package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +1 -1
  114. package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -1
  115. package/src/main/js/sap/ushell/components/shell/MenuBar/manifest.json +1 -1
  116. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +1 -1
  117. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +1 -1
  118. package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +1 -1
  119. package/src/main/js/sap/ushell/components/shell/Notifications/Notifications.controller.js +1 -1
  120. package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +1 -1
  121. package/src/main/js/sap/ushell/components/shell/Search/manifest.json +1 -1
  122. package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +1 -1
  123. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/FrequentActivityProvider.js +1 -1
  124. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/RecentSearchProvider.js +1 -1
  125. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchProvider.js +1 -1
  126. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchServiceProvider.js +1 -1
  127. package/src/main/js/sap/ushell/components/shell/Settings/Component.js +1 -1
  128. package/src/main/js/sap/ushell/components/shell/Settings/appearance/Appearance.controller.js +2 -2
  129. package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountEntry.js +2 -2
  130. package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountSelector.view.xml +27 -16
  131. package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountSetting.view.xml +12 -6
  132. package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/controller/UserDefaultsSetting.controller.js +1 -1
  133. package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/LanguageRegionSelector.controller.js +65 -17
  134. package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/LanguageRegionSelector.view.xml +18 -1
  135. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/Component.js +1 -1
  136. package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +1 -1
  137. package/src/main/js/sap/ushell/components/tiles/applauncher/Configuration.view.xml +2 -2
  138. package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/Configuration.view.xml +2 -2
  139. package/src/main/js/sap/ushell/components/tiles/utils.js +3 -2
  140. package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +1 -1
  141. package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +1 -1
  142. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.accessibility.js +1 -1
  143. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.controller.js +274 -65
  144. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageHost.js +2 -2
  145. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +9 -11
  146. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +48 -48
  147. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +12 -12
  148. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +8 -8
  149. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnRenderer.js +9 -9
  150. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +44 -44
  151. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRenderer.js +7 -4
  152. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +8 -8
  153. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRowRenderer.js +9 -8
  154. package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +8 -1
  155. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources.properties +10 -2
  156. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ar.properties +10 -6
  157. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_bg.properties +10 -6
  158. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ca.properties +10 -6
  159. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_cs.properties +10 -6
  160. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_cy.properties +10 -6
  161. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_da.properties +10 -6
  162. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_de.properties +11 -7
  163. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_el.properties +10 -6
  164. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en.properties +6 -2
  165. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_GB.properties +6 -2
  166. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_sappsd.properties +6 -2
  167. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_saprigi.properties +6 -2
  168. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_en_US_saptrc.properties +13 -6
  169. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_es.properties +10 -6
  170. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_es_MX.properties +10 -6
  171. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_et.properties +10 -6
  172. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_fi.properties +11 -7
  173. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_fr.properties +10 -6
  174. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_fr_CA.properties +10 -6
  175. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hi.properties +10 -6
  176. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hr.properties +10 -6
  177. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_hu.properties +10 -6
  178. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_id.properties +10 -6
  179. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_it.properties +11 -7
  180. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_iw.properties +10 -6
  181. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ja.properties +11 -7
  182. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_kk.properties +10 -6
  183. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ko.properties +10 -6
  184. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_lt.properties +10 -6
  185. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_lv.properties +10 -6
  186. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ms.properties +10 -6
  187. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_nl.properties +10 -6
  188. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_no.properties +11 -7
  189. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_pl.properties +10 -6
  190. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_pt.properties +10 -6
  191. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_pt_PT.properties +10 -6
  192. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ro.properties +10 -6
  193. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_ru.properties +10 -6
  194. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sh.properties +10 -6
  195. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sk.properties +10 -6
  196. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sl.properties +10 -6
  197. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_sv.properties +10 -6
  198. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_th.properties +10 -6
  199. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_tr.properties +10 -6
  200. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_uk.properties +10 -6
  201. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_vi.properties +10 -6
  202. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_zh_CN.properties +10 -6
  203. package/src/main/js/sap/ushell/components/workPageBuilder/resources/resources_zh_TW.properties +10 -6
  204. package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageBuilder.view.xml +49 -34
  205. package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageCellDeleteDialog.fragment.xml +25 -0
  206. package/src/main/js/sap/ushell/components/workPageBuilder/view/WorkPageRowDeleteDialog.fragment.xml +13 -5
  207. package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +1 -1
  208. package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +2 -2
  209. package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +5 -1
  210. package/src/main/js/sap/ushell/components/workPageRuntime/services/NavigationResolver.js +1 -1
  211. package/src/main/js/sap/ushell/components/workPageRuntime/services/WorkPage.js +1 -1
  212. package/src/main/js/sap/ushell/components/workPageRuntime/view/WorkPageRuntime.view.xml +5 -4
  213. package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
  214. package/src/main/js/sap/ushell/library.js +1 -1
  215. package/src/main/js/sap/ushell/navigationMode.js +105 -121
  216. package/src/main/js/sap/ushell/performance/FesrEnhancer.js +16 -2
  217. package/src/main/js/sap/ushell/performance/ShellAnalytics.js +1 -1
  218. package/src/main/js/sap/ushell/performance/StatisticalRecord.js +1 -1
  219. package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
  220. package/src/main/js/sap/ushell/renderers/fiori2/LogonFrameProvider.js +2 -2
  221. package/src/main/js/sap/ushell/renderers/fiori2/Renderer.js +2 -2
  222. package/src/main/js/sap/ushell/renderers/fiori2/Shell.controller.js +6 -0
  223. package/src/main/js/sap/ushell/renderers/fiori2/ShellLayout.js +1 -1
  224. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources.properties +20 -0
  225. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ar.properties +12 -1
  226. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_bg.properties +12 -1
  227. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ca.properties +12 -1
  228. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_cs.properties +12 -1
  229. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_cy.properties +12 -1
  230. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_da.properties +12 -1
  231. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_de.properties +15 -4
  232. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_el.properties +12 -1
  233. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_en.properties +11 -0
  234. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_en_GB.properties +11 -0
  235. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_en_US_sappsd.properties +11 -0
  236. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_en_US_saprigi.properties +11 -0
  237. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_en_US_saptrc.properties +12 -0
  238. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_es.properties +12 -1
  239. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_es_MX.properties +14 -3
  240. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_et.properties +12 -1
  241. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_fi.properties +12 -1
  242. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_fr.properties +12 -1
  243. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_fr_CA.properties +12 -1
  244. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_hi.properties +12 -1
  245. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_hr.properties +12 -1
  246. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_hu.properties +12 -1
  247. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_id.properties +12 -1
  248. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_it.properties +12 -1
  249. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_iw.properties +16 -5
  250. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ja.properties +12 -1
  251. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_kk.properties +12 -1
  252. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ko.properties +12 -1
  253. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_lt.properties +12 -1
  254. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_lv.properties +12 -1
  255. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ms.properties +12 -1
  256. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_nl.properties +12 -1
  257. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_no.properties +12 -1
  258. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_pl.properties +12 -1
  259. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_pt.properties +12 -1
  260. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_pt_PT.properties +12 -1
  261. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ro.properties +12 -1
  262. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_ru.properties +12 -1
  263. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_sh.properties +12 -1
  264. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_sk.properties +12 -1
  265. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_sl.properties +12 -1
  266. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_sv.properties +12 -1
  267. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_th.properties +12 -1
  268. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_tr.properties +12 -1
  269. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_uk.properties +12 -1
  270. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_vi.properties +12 -1
  271. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_zh_CN.properties +12 -1
  272. package/src/main/js/sap/ushell/renderers/fiori2/resources/resources_zh_TW.properties +12 -1
  273. package/src/main/js/sap/ushell/renderers/fiori2/search/searchComponent/controller/CEPSearchApp.controller.js +4 -4
  274. package/src/main/js/sap/ushell/renderers/fiori2/search/searchComponent/controller/SearchApp.controller.js +3 -3
  275. package/src/main/js/sap/ushell/renderers/fiori2/search/searchComponent/manifest.json +1 -1
  276. package/src/main/js/sap/ushell/renderers/fiori2/search/searchComponent/view/CEPSearchApp.view.js +4 -3
  277. package/src/main/js/sap/ushell/renderers/fiori2/search/searchComponent/view/SearchApp.view.js +4 -3
  278. package/src/main/js/sap/ushell/services/AppLifeCycle.js +1 -1
  279. package/src/main/js/sap/ushell/services/AppState.js +1 -1
  280. package/src/main/js/sap/ushell/services/Bookmark.js +1 -1
  281. package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +97 -101
  282. package/src/main/js/sap/ushell/services/CommonDataModel.js +1 -1
  283. package/src/main/js/sap/ushell/services/Configuration.js +1 -1
  284. package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +1 -1
  285. package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +1 -1
  286. package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +1 -1
  287. package/src/main/js/sap/ushell/services/DarkModeSupport.js +1 -1
  288. package/src/main/js/sap/ushell/services/LaunchPage.js +1 -1
  289. package/src/main/js/sap/ushell/services/Menu.js +1 -1
  290. package/src/main/js/sap/ushell/services/Message.js +1 -1
  291. package/src/main/js/sap/ushell/services/MessageBroker.js +1 -1
  292. package/src/main/js/sap/ushell/services/NavTargetResolution.js +12 -34
  293. package/src/main/js/sap/ushell/services/NavigationDataProvider.js +1 -1
  294. package/src/main/js/sap/ushell/services/PageBuilding.js +1 -1
  295. package/src/main/js/sap/ushell/services/PagePersistence.js +1 -1
  296. package/src/main/js/sap/ushell/services/PageReferencing.js +1 -1
  297. package/src/main/js/sap/ushell/services/Pages.js +1 -1
  298. package/src/main/js/sap/ushell/services/Personalization.js +1 -1
  299. package/src/main/js/sap/ushell/services/PluginManager.js +1 -1
  300. package/src/main/js/sap/ushell/services/ReferenceResolver.js +1 -1
  301. package/src/main/js/sap/ushell/services/Search.js +1 -1
  302. package/src/main/js/sap/ushell/services/SearchCEP.js +1 -1
  303. package/src/main/js/sap/ushell/services/SearchableContent.js +1 -1
  304. package/src/main/js/sap/ushell/services/SmartNavigation.js +1 -1
  305. package/src/main/js/sap/ushell/services/SpaceContent.js +1 -1
  306. package/src/main/js/sap/ushell/services/UITracer.js +1 -1
  307. package/src/main/js/sap/ushell/services/URLShortening.js +2 -2
  308. package/src/main/js/sap/ushell/services/URLTemplate.js +1 -1
  309. package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +1 -1
  310. package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +1 -1
  311. package/src/main/js/sap/ushell/services/UserDefaultParameters.js +9 -8
  312. package/src/main/js/sap/ushell/services/UserInfo.js +8 -1
  313. package/src/main/js/sap/ushell/services/UserRecents.js +1 -1
  314. package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +1 -1
  315. package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +1 -1
  316. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Formatter.js +1 -1
  317. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundIndex.js +1 -1
  318. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundProvider.js +1 -1
  319. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/PrelaunchOperations.js +1 -1
  320. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Search.js +1 -1
  321. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/StagedLogger.js +1 -1
  322. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/SystemContext.js +1 -1
  323. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Utils.js +1 -1
  324. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/VirtualInbounds.js +1 -1
  325. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/XAppStateProcessing.js +5 -25
  326. package/src/main/js/sap/ushell/services/_CommonDataModel/SiteConverter.js +1 -1
  327. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/ContentExtensionAdapterConfig.js +1 -1
  328. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/FeaturedGroupConfig.js +2 -2
  329. package/src/main/js/sap/ushell/services/_CrossApplicationNavigation/utils.js +1 -1
  330. package/src/main/js/sap/ushell/services/_MessageBroker/MessageBrokerEngine.js +1 -1
  331. package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
  332. package/src/main/js/sap/ushell/services/_PluginManager/Extensions.js +1 -1
  333. package/src/main/js/sap/ushell/services/_PluginManager/HeaderExtensions.js +1 -1
  334. package/src/main/js/sap/ushell/services/_PluginManager/MenuExtensions.js +1 -1
  335. package/src/main/js/sap/ushell/services/_Ui5ComponentLoader/utils.js +1 -1
  336. package/src/main/js/sap/ushell/services/_VisualizationInstantiation/VizInstanceLink.js +1 -1
  337. package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +1 -1
  338. package/src/main/js/sap/ushell/themes/base/ContentFinder.less +8 -12
  339. package/src/main/js/sap/ushell/themes/base/SearchCEP.less +3 -4
  340. package/src/main/js/sap/ushell/themes/base/ShellHeader.less +0 -4
  341. package/src/main/js/sap/ushell/themes/base/UserSettings.less +3 -46
  342. package/src/main/js/sap/ushell/themes/base/WorkPage.less +7 -8
  343. package/src/main/js/sap/ushell/themes/base/WorkPageButton.less +7 -7
  344. package/src/main/js/sap/ushell/themes/base/WorkPageCell.less +46 -45
  345. package/src/main/js/sap/ushell/themes/base/WorkPageColumn.less +49 -38
  346. package/src/main/js/sap/ushell/themes/base/WorkPageColumnResizer.less +42 -38
  347. package/src/main/js/sap/ushell/themes/base/WorkPageRow.less +59 -25
  348. package/src/main/js/sap/ushell/themes/base/fonts/horizon/BusinessSuiteInAppSymbols.eot +0 -0
  349. package/src/main/js/sap/ushell/themes/base/fonts/horizon/BusinessSuiteInAppSymbols.ttf +0 -0
  350. package/src/main/js/sap/ushell/themes/base/fonts/horizon/BusinessSuiteInAppSymbols.woff +0 -0
  351. package/src/main/js/sap/ushell/themes/base/fonts/horizon/BusinessSuiteInAppSymbols.woff2 +0 -0
  352. package/src/main/js/sap/ushell/themes/sap_horizon/SearchCEP.less +1 -1
  353. package/src/main/js/sap/ushell/themes/sap_horizon/ToolAreaItem.less +49 -20
  354. package/src/main/js/sap/ushell/themes/sap_horizon/WorkPageCell.less +2 -1
  355. package/src/main/js/sap/ushell/themes/sap_horizon_dark/SearchCEP.less +1 -1
  356. package/src/main/js/sap/ushell/themes/sap_horizon_dark/ToolAreaItem.less +48 -20
  357. package/src/main/js/sap/ushell/themes/sap_horizon_dark/WorkPageCell.less +2 -1
  358. package/src/main/js/sap/ushell/themes/sap_horizon_hcb/SearchCEP.less +0 -1
  359. package/src/main/js/sap/ushell/themes/sap_horizon_hcb/WorkPageCell.less +2 -1
  360. package/src/main/js/sap/ushell/themes/sap_horizon_hcw/SearchCEP.less +0 -1
  361. package/src/main/js/sap/ushell/themes/sap_horizon_hcw/WorkPageCell.less +2 -1
  362. package/src/main/js/sap/ushell/ui/ShellHeader.js +0 -33
  363. package/src/main/js/sap/ushell/ui/ShellHeaderRenderer.js +15 -2
  364. package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +1 -1
  365. package/src/main/js/sap/ushell/ui/footerbar/AddBookmarkButton.js +3 -3
  366. package/src/main/js/sap/ushell/ui/footerbar/ContactSupportButton.js +5 -4
  367. package/src/main/js/sap/ushell/ui/footerbar/JamDiscussButton.js +13 -11
  368. package/src/main/js/sap/ushell/ui/footerbar/JamShareButton.js +30 -22
  369. package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
  370. package/src/main/js/sap/ushell/ui/launchpad/Page.js +1 -1
  371. package/src/main/js/sap/ushell/ui/launchpad/Section.js +2 -2
  372. package/src/main/js/sap/ushell/ui/launchpad/TileContainerRenderer.js +3 -3
  373. package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +1 -1
  374. package/src/main/js/sap/ushell/ui/shell/ShellAppTitle.js +3 -2
  375. package/src/main/js/sap/ushell/ui/shell/ShellHeadItem.js +1 -1
  376. package/src/main/js/sap/ushell/ui/shell/SysInfoBar.js +5 -4
  377. package/src/main/js/sap/ushell/ui/shell/ToolAreaItem.js +1 -1
  378. package/src/main/js/sap/ushell/ui/utils.js +1 -1
  379. package/src/main/js/sap/ushell/ui5service/ShellUIService.js +1 -1
  380. package/src/main/js/sap/ushell/ui5service/UserStatus.js +1 -1
  381. package/src/main/js/sap/ushell/utils/DynamicTileRequest.js +353 -323
  382. package/src/main/js/sap/ushell/utils/UrlShortening.js +1 -1
  383. package/src/main/js/sap/ushell/utils.js +43 -20
  384. package/src/test/js/sap/ushell/bootstrap/sandbox.js +1 -1
  385. package/ui5.yaml +1 -1
  386. package/src/main/js/sap/ushell/utils/clone.js +0 -167
@@ -11,7 +11,8 @@ sap.ui.define([
11
11
  "sap/base/Log",
12
12
  "sap/ui/core/Configuration",
13
13
  "sap/base/util/ObjectPath",
14
- "sap/ushell/EventHub"
14
+ "sap/ushell/EventHub",
15
+ "sap/ushell/utils"
15
16
  ], function (
16
17
  HttpClient,
17
18
  URI,
@@ -20,395 +21,424 @@ sap.ui.define([
20
21
  Log,
21
22
  Configuration,
22
23
  ObjectPath,
23
- EventHub
24
+ EventHub,
25
+ ushellUtils
24
26
  ) {
25
27
  "use strict";
26
28
 
27
- var sModuleName = "sap.ushell.utils.DynamicTileRequest";
29
+ const sModuleName = "sap.ushell.utils.DynamicTileRequest";
28
30
 
29
31
  /**
30
32
  * Creates a DynamicTileRequest and starts the request
31
- *
32
- * @param {string} sUrl The request url
33
- * @param {function} fnSuccess The success handler
34
- * @param {function} fnError The error handler
35
- * @param {string|undefined} [sContentProviderId] The contentProviderId
36
- * @param {object} oOptions Further options for the dynamic tile request
37
- * @param {object} oOptions.dataSource Additional data about the request URL in the format of a data source as defined by the app descriptor.
38
- * @param {object} oOptions.datSource.settings.odataVersion The OData version of the request URL. Valid values are "2.0" and "4.0". Default is "2.0".
39
- *
40
33
  * @since 1.87.0
41
34
  * @private
42
35
  */
43
- function DynamicTileRequest (sUrl, fnSuccess, fnError, sContentProviderId, oOptions) {
44
- this.fnSuccess = fnSuccess;
45
- this.fnError = fnError;
46
- this.sUrl = sUrl;
47
- this._sODataVersion = ObjectPath.get(["dataSource", "settings", "odataVersion"], oOptions);
48
- this._bResolveSemanticDateRanges = true;
49
- this._sContentProviderId = sContentProviderId;
50
-
51
- this.oReferenceResolverPromise = sap.ushell.Container.getServiceAsync("ReferenceResolver");
52
-
53
- // Resolve UserDefaults first
54
- this.oPromise = this._resolveUserDefaults(sUrl, sContentProviderId)
55
- .then(function (sUrlResolvedUserDefaults) {
56
- if (sUrlResolvedUserDefaults) {
57
- // Save the URL for the resolved UserDefaults to re-use it everytime refresh is called.
58
- this.sUrlResolvedUserDefaults = sUrlResolvedUserDefaults;
59
- this.refresh();
36
+ class DynamicTileRequest {
37
+
38
+ #fnSuccess = () => {};
39
+ #fnError = () => {};
40
+ #sOriginalUrl = null; // for debugging
41
+ #sODataVersion = null;
42
+ #bResolveSemanticDateRanges = null;
43
+ #sContentProviderId = null;
44
+
45
+ #sUrlWithResolvedUserDefaults = null;
46
+ #oCurrentRequest = null;
47
+ #oClient = null;
48
+ #sUrlRequestHref = null;
49
+ #sUrlBasePath = null;
50
+ #oUserDefaultsPromise = Promise.resolve();
51
+
52
+ /**
53
+ * Creates a DynamicTileRequest and starts the request
54
+ *
55
+ * @param {string} sUrl The request url
56
+ * @param {function} fnSuccess The success handler
57
+ * @param {function} fnError The error handler
58
+ * @param {string|undefined} [sContentProviderId] The contentProviderId
59
+ * @param {object} oOptions Further options for the dynamic tile request
60
+ * @param {object} oOptions.dataSource Additional data about the request URL in the format of a data source as defined by the app descriptor.
61
+ * @param {object} oOptions.datSource.settings.odataVersion The OData version of the request URL. Valid values are "2.0" and "4.0". Default is "2.0".
62
+ *
63
+ * @since 1.87.0
64
+ * @private
65
+ */
66
+ constructor (sUrl, fnSuccess, fnError, sContentProviderId, oOptions) {
67
+ this.#fnSuccess = fnSuccess;
68
+ this.#fnError = fnError;
69
+ this.#sOriginalUrl = sUrl;
70
+ this.#sODataVersion = ObjectPath.get(["dataSource", "settings", "odataVersion"], oOptions);
71
+ this.#bResolveSemanticDateRanges = true;
72
+ this.#sContentProviderId = sContentProviderId;
73
+
74
+ // Resolve UserDefaults first
75
+ this.#oUserDefaultsPromise = this.#resolveUserDefaults(sUrl, sContentProviderId)
76
+ .then((sUrlResolvedUserDefaults) => {
77
+ if (sUrlResolvedUserDefaults) {
78
+ // Save the URL for the resolved UserDefaults to re-use it every time refresh is called.
79
+ this.#sUrlWithResolvedUserDefaults = sUrlResolvedUserDefaults;
80
+ }
81
+ })
82
+ .catch((vError) => {
83
+ Log.error("Was not able to create a DynamicTileRequest:", vError, sModuleName);
84
+ });
85
+
86
+ this._oInitialRefreshPromise = this.#oUserDefaultsPromise.then(() => {
87
+ if (this.#sUrlWithResolvedUserDefaults) {
88
+ return this.refresh();
60
89
  }
61
- }.bind(this))
62
- .catch(function (vError) {
63
- Log.error("Was not able to create a DynamicTileRequest:", vError, sModuleName);
64
90
  });
65
- }
91
+ }
66
92
 
67
- /**
68
- * Creates a request if no request is currently running
69
- *
70
- * Resolve semantic date ranges everytime the method is called to keep them updated.
71
- *
72
- * @since 1.87.0
73
- * @private
74
- */
75
- DynamicTileRequest.prototype.refresh = function () {
76
- if (!this.oRequest) {
77
- this.oRequest = this._resolveSemanticDateRanges()
78
- .then(function (sResolvedUrl) {
79
- if (sResolvedUrl) {
80
- return this._sendRequest(sResolvedUrl);
81
- }
82
- }.bind(this));
93
+ set originalUrl (value) {
94
+ throw new Error("originalUrl is read-only!");
83
95
  }
84
- };
85
96
 
86
- /**
87
- * Resolves the semantic date ranges
88
- *
89
- * @returns {Promise<string>} The resolved url
90
- *
91
- * @since 1.110.0
92
- * @private
93
- */
94
- DynamicTileRequest.prototype._resolveSemanticDateRanges = function () {
95
- if (!this._bResolveSemanticDateRanges) {
96
- return Promise.resolve(this.sUrlResolvedUserDefaults);
97
+ get originalUrl () {
98
+ return this.#sOriginalUrl;
99
+ }
100
+
101
+ set oDataVersion (value) {
102
+ throw new Error("oDataVersion is read-only!");
97
103
  }
98
104
 
99
- return this.oReferenceResolverPromise
100
- .then(function (oReferenceResolver) {
105
+ get oDataVersion () {
106
+ return this.#sODataVersion;
107
+ }
108
+
109
+ /**
110
+ * Creates a request if no request is currently running
111
+ *
112
+ * Resolve semantic date ranges every time the method is called to keep them updated.
113
+ * @returns {Promise} Resolves once the request was handled
114
+ *
115
+ * @since 1.87.0
116
+ * @private
117
+ */
118
+ refresh () {
119
+ if (!this.#oCurrentRequest) {
120
+ this.#oCurrentRequest = this.#oUserDefaultsPromise
121
+ .then(this.#resolveSemanticDateRanges.bind(this))
122
+ .then((sResolvedUrl) => {
123
+ if (sResolvedUrl) {
124
+ return this.#sendRequest(sResolvedUrl);
125
+ }
126
+ });
127
+ }
128
+ return this.#oCurrentRequest;
129
+ }
130
+
131
+ /**
132
+ * Resolves the semantic date ranges
133
+ *
134
+ * @returns {Promise<string>} The resolved url
135
+ *
136
+ * @since 1.110.0
137
+ * @private
138
+ */
139
+ async #resolveSemanticDateRanges () {
140
+ if (!this.#bResolveSemanticDateRanges) {
141
+ return this.#sUrlWithResolvedUserDefaults;
142
+ }
143
+
144
+ try {
145
+ const ReferenceResolverService = await sap.ushell.Container.getServiceAsync("ReferenceResolver");
146
+
101
147
  // UserDefaults are replaced before semantic dates
102
- return oReferenceResolver.resolveSemanticDateRanges(this.sUrlResolvedUserDefaults, this._sODataVersion);
103
- }.bind(this))
104
- .then(function (oResult) {
148
+ const oResult = await ReferenceResolverService.resolveSemanticDateRanges(this.#sUrlWithResolvedUserDefaults, this.#sODataVersion);
105
149
 
106
150
  // Check for ignored (unresolved) references before the request is sent.
107
151
  if ((oResult.ignoredReferences && oResult.ignoredReferences.length > 0)
108
152
  || (oResult.invalidSemanticDates && oResult.invalidSemanticDates.length > 0)
109
153
  ) {
110
- var aReferences = [].concat(oResult.invalidSemanticDates || [], oResult.ignoredReferences || []);
154
+ const aReferences = [].concat(oResult.invalidSemanticDates || [], oResult.ignoredReferences || []);
111
155
  Log.error("The service URL contains invalid Reference(s): " + aReferences.join(", "), "", sModuleName);
112
156
  return;
113
157
  }
114
158
 
115
159
  // If there are no semantic date ranges in the URL this step can be skipped on the next refresh.
116
- this._bResolveSemanticDateRanges = oResult.hasSemanticDateRanges;
160
+ this.#bResolveSemanticDateRanges = oResult.hasSemanticDateRanges;
117
161
 
118
162
  return oResult.url;
119
- }.bind(this))
120
- .catch(function (vError) {
163
+ } catch (vError) {
121
164
  Log.error("Could not resolve semantic date ranges:", vError, sModuleName);
122
165
  return Promise.reject(vError);
123
- });
124
- };
125
-
126
- /**
127
- * Sends the request
128
- *
129
- * All URL transformations are done in this method after various placeholders were replaced.
130
- *
131
- * @param {string} sResolvedUrl The resolved url
132
- * @returns {Promise<Object>} The response
133
- *
134
- * @since 1.110.0
135
- * @private
136
- */
137
- DynamicTileRequest.prototype._sendRequest = function (sResolvedUrl) {
138
- // Set escapeQuerySpace to false and use "%20" encoding instead of "+" for spaces.
139
- // The "+" encoding seems to fail for many OData services.
140
- var oUri = new URI(sResolvedUrl).escapeQuerySpace(false);
141
-
142
- // Adding a query parameter triggers the encoding of the whole query string.
143
- // Therefore, append the additional parameters as late as possible to avoid encoding the placeholders.
144
- var sSAPLogonLanguage = Configuration.getSAPLogonLanguage();
145
- if (sSAPLogonLanguage && !oUri.hasQuery("sap-language")) {
146
- oUri.addQuery("sap-language", sSAPLogonLanguage);
166
+ }
147
167
  }
148
168
 
149
- var bAddClient = false;
150
- if (oUri.is("relative")) {
151
- // Add the sap-client if the url is relative.
152
- bAddClient = true;
153
- // Make the url absolute
154
- oUri = oUri.absoluteTo(location.href);
155
- }
169
+ /**
170
+ * Sends the request
171
+ *
172
+ * All URL transformations are done in this method after constious placeholders were replaced.
173
+ *
174
+ * @param {string} sResolvedUrl The resolved url
175
+ * @returns {Promise<undefined>} Resolves once the request is done
176
+ *
177
+ * @since 1.110.0
178
+ * @private
179
+ */
180
+ #sendRequest (sResolvedUrl) {
181
+ // Set escapeQuerySpace to false and use "%20" encoding instead of "+" for spaces.
182
+ // The "+" encoding seems to fail for many OData services.
183
+ let oUri = new URI(sResolvedUrl).escapeQuerySpace(false);
184
+
185
+ // Adding a query parameter triggers the encoding of the whole query string.
186
+ // Therefore, append the additional parameters as late as possible to avoid encoding the placeholders.
187
+ const sSAPLogonLanguage = Configuration.getSAPLogonLanguage();
188
+ if (sSAPLogonLanguage && !oUri.hasQuery("sap-language")) {
189
+ oUri.addQuery("sap-language", sSAPLogonLanguage);
190
+ }
156
191
 
157
- var oHeaders = this._getHeaders(bAddClient);
158
- this.oConfig = {
159
- headers: oHeaders
160
- };
192
+ let bAddClient = false;
193
+ if (oUri.is("relative")) {
194
+ // Add the sap-client if the url is relative.
195
+ bAddClient = true;
196
+ // Make the url absolute
197
+ oUri = oUri.absoluteTo(location.href);
198
+ }
161
199
 
162
- this._sUrlBasePath = oUri.origin();
163
- this._sUrlRequest = oUri.href();
200
+ const oHeaders = this.#getHeaders(bAddClient);
201
+ const oConfig = {
202
+ headers: oHeaders
203
+ };
164
204
 
165
- this.oClient = new HttpClient(this._sUrlBasePath, this.oConfig);
166
- return this.oClient.get(oUri.relativeTo(this._sUrlBasePath).href())
167
- .then(this._onSuccess.bind(this))
168
- .catch(this._onError.bind(this));
169
- };
205
+ this.#sUrlBasePath = oUri.origin();
206
+ this.#sUrlRequestHref = oUri.href();
170
207
 
171
- /**
172
- * Aborts the running request
173
- *
174
- * @returns {boolean} Whether a request was running or not
175
- *
176
- * @since 1.87.0
177
- * @private
178
- */
179
- DynamicTileRequest.prototype.abort = function () {
180
- if (this.oRequest && this.oClient) {
181
- this.oClient.abortAll();
182
- this.oClient = null;
183
- this.oRequest = null;
184
- return true;
208
+ this.#oClient = new HttpClient(this.#sUrlBasePath, oConfig);
209
+ return this.#oClient.get(oUri.relativeTo(this.#sUrlBasePath).href())
210
+ .then(this.#onSuccess.bind(this))
211
+ .catch(this.#onError.bind(this));
185
212
  }
186
- return false;
187
- };
188
213
 
189
- /**
190
- * Converts the result of the request according to requirements of the dynamic tile
191
- * and reset the request
192
- *
193
- * @param {object} oResult Result of the request
194
- *
195
- * @since 1.87.0
196
- * @private
197
- */
198
- DynamicTileRequest.prototype._onSuccess = function (oResult) {
199
- EventHub.emit("UITracer.trace", {
200
- source: "Tile",
201
- reason: "FetchData",
202
- data: {
203
- providerId: this._sContentProviderId,
204
- targetUrl: this._sUrlRequest,
205
- status: 200
214
+ /**
215
+ * Aborts the running request
216
+ *
217
+ * @returns {boolean} Whether a request was running or not
218
+ *
219
+ * @since 1.87.0
220
+ * @private
221
+ */
222
+ abort () {
223
+ if (this.#oCurrentRequest && this.#oClient) {
224
+ this.#oClient.abortAll();
225
+ this.#oClient = null;
226
+ this.#oCurrentRequest = null;
227
+ return true;
206
228
  }
207
- });
208
- var vResult;
209
- try {
210
- vResult = JSON.parse(oResult.responseText);
211
- } catch (err) {
212
- throw new Error("Was not able to parse response of dynamic tile request");
229
+ return false;
213
230
  }
214
231
 
215
- this.oClient = null;
216
- this.oRequest = null;
217
- var oData;
218
-
219
- if (typeof vResult === "object") {
220
- // OData v2 adds this additional "d" level
221
- vResult = vResult.d ? vResult.d : vResult;
222
- var oUriParameters = UriParameters.fromURL(this._sUrlRequest);
232
+ /**
233
+ * Converts the result of the request according to requirements of the dynamic tile
234
+ * and reset the request
235
+ *
236
+ * @param {object} oResult Result of the request
237
+ *
238
+ * @since 1.87.0
239
+ * @private
240
+ */
241
+ #onSuccess (oResult) {
242
+ EventHub.emit("UITracer.trace", {
243
+ source: "Tile",
244
+ reason: "FetchData",
245
+ data: {
246
+ providerId: this.#sContentProviderId,
247
+ targetUrl: this.#sUrlRequestHref,
248
+ status: 200
249
+ }
250
+ });
251
+ let vResult;
252
+ try {
253
+ vResult = JSON.parse(oResult.responseText);
254
+ } catch (err) {
255
+ throw new Error("Was not able to parse response of dynamic tile request");
256
+ }
223
257
 
224
- if (oUriParameters.get("$inlinecount") === "allpages") {
225
- oData = { number: vResult.__count };
258
+ this.#oClient = null;
259
+ this.#oCurrentRequest = null;
260
+ let oData;
226
261
 
227
- // OData v4 $count=true
228
- } else if (oUriParameters.get("$count") === "true") {
229
- oData = { number: vResult["@odata.count"] };
262
+ if (typeof vResult === "object") {
263
+ // OData v2 adds this additional "d" level
264
+ vResult = vResult.d ? vResult.d : vResult;
265
+ const oUriParameters = UriParameters.fromURL(this.#sUrlRequestHref);
230
266
 
231
- } else {
232
- oData = this._extractData(vResult);
233
- }
234
- // plain result
235
- } else if (typeof vResult === "string" || typeof vResult === "number") {
236
- oData = { number: vResult };
237
- }
267
+ if (oUriParameters.get("$inlinecount") === "allpages") {
268
+ oData = { number: vResult.__count };
238
269
 
239
- this.fnSuccess(oData);
240
- };
270
+ // OData v4 $count=true
271
+ } else if (oUriParameters.get("$count") === "true") {
272
+ oData = { number: vResult["@odata.count"] };
241
273
 
242
- /**
243
- * Calls the error handler and reset of the request
244
- *
245
- * @param {object} oError The error
246
- *
247
- * @since 1.87.0
248
- * @private
249
- */
250
- DynamicTileRequest.prototype._onError = function (oError) {
251
- EventHub.emit("UITracer.trace", {
252
- source: "Tile",
253
- reason: "FetchData",
254
- data: {
255
- providerId: this._sContentProviderId,
256
- targetUrl: this._sUrlRequest,
257
- status: oError.status
274
+ } else {
275
+ oData = this.#extractData(vResult);
276
+ }
277
+ // plain result
278
+ } else if (typeof vResult === "string" || typeof vResult === "number") {
279
+ oData = { number: vResult };
258
280
  }
259
- });
260
- this.oClient = null;
261
- this.oRequest = null;
262
- this.fnError(oError);
263
- };
264
281
 
265
- /**
266
- * Converts and filters the data according to requirements of the dynamic tile
267
- *
268
- * @param {object} oData Result of the request
269
- * @returns {object} The converted object
270
- *
271
- * @since 1.87.0
272
- * @private
273
- */
274
- DynamicTileRequest.prototype._extractData = function (oData) {
275
- var aSupportedKeys = [
276
- "results",
277
- "icon",
278
- "title",
279
- "number",
280
- "numberUnit",
281
- "info",
282
- "infoState",
283
- "infoStatus",
284
- "targetParams",
285
- "subtitle",
286
- "stateArrow",
287
- "numberState",
288
- "numberDigits",
289
- "numberFactor"
290
- ];
291
-
292
- // Filters data
293
- var oResult = Object.keys(oData).reduce(function (oAcc, sKey) {
294
- if (aSupportedKeys.indexOf(sKey) > -1) {
295
- oAcc[sKey] = oData[sKey];
296
- }
297
- return oAcc;
298
- }, {});
282
+ this.#fnSuccess(oData);
283
+ }
299
284
 
300
- if (!isEmptyObject(oResult)) {
301
- return oResult;
285
+ /**
286
+ * Calls the error handler and reset of the request
287
+ *
288
+ * @param {object} oError The error
289
+ *
290
+ * @since 1.87.0
291
+ * @private
292
+ */
293
+ #onError (oError) {
294
+ EventHub.emit("UITracer.trace", {
295
+ source: "Tile",
296
+ reason: "FetchData",
297
+ data: {
298
+ providerId: this.#sContentProviderId,
299
+ targetUrl: this.#sUrlRequestHref,
300
+ status: oError.status
301
+ }
302
+ });
303
+ this.#oClient = null;
304
+ this.#oCurrentRequest = null;
305
+ this.#fnError(oError);
302
306
  }
303
307
 
304
- // Allow deeper nesting by one level when there is only one key in the first level,
305
- // this is needed in order to support that OData service operations (function imports) can return the dynamic tile data.
306
- var sFirstKey = Object.keys(oData)[0];
307
- if (sFirstKey !== undefined && Object.keys(oData).length === 1) {
308
- return Object.keys(oData[sFirstKey]).reduce(function (oAcc, sKey) {
308
+ /**
309
+ * Converts and filters the data according to requirements of the dynamic tile
310
+ *
311
+ * @param {object} oData Result of the request
312
+ * @returns {object} The converted object
313
+ *
314
+ * @since 1.87.0
315
+ * @private
316
+ */
317
+ #extractData (oData) {
318
+ const aSupportedKeys = [
319
+ "results",
320
+ "icon",
321
+ "title",
322
+ "number",
323
+ "numberUnit",
324
+ "info",
325
+ "infoState",
326
+ "infoStatus",
327
+ "targetParams",
328
+ "subtitle",
329
+ "stateArrow",
330
+ "numberState",
331
+ "numberDigits",
332
+ "numberFactor"
333
+ ];
334
+
335
+ // Filters data
336
+ const oResult = Object.keys(oData).reduce((oAcc, sKey) => {
309
337
  if (aSupportedKeys.indexOf(sKey) > -1) {
310
- oAcc[sKey] = oData[sFirstKey][sKey];
338
+ oAcc[sKey] = oData[sKey];
311
339
  }
312
340
  return oAcc;
313
341
  }, {});
314
- }
315
- return {};
316
- };
317
342
 
318
- /**
319
- * Creates the request headers
320
- *
321
- * @param {boolean} bAddClient True if the sap-client should be added
322
- * @returns {object} The required headers
323
- *
324
- * @since 1.87.0
325
- * @private
326
- */
327
- DynamicTileRequest.prototype._getHeaders = function (bAddClient) {
328
- var oHeaders = {
329
- "Cache-Control": "no-cache, no-store, must-revalidate",
330
- Pragma: "no-cache",
331
- Expires: "0",
332
- "Accept-Language": Configuration.getLanguage() || "",
333
- Accept: "application/json, text/plain"
334
- };
335
-
336
- var sSAPLogonLanguage = Configuration.getSAPLogonLanguage();
337
- if (sSAPLogonLanguage) {
338
- oHeaders["sap-language"] = sSAPLogonLanguage;
343
+ if (!isEmptyObject(oResult)) {
344
+ return oResult;
345
+ }
346
+
347
+ // Allow deeper nesting by one level when there is only one key in the first level,
348
+ // this is needed in order to support that OData service operations (function imports) can return the dynamic tile data.
349
+ const sFirstKey = Object.keys(oData)[0];
350
+ if (sFirstKey !== undefined && Object.keys(oData).length === 1) {
351
+ return Object.keys(oData[sFirstKey]).reduce((oAcc, sKey) => {
352
+ if (aSupportedKeys.indexOf(sKey) > -1) {
353
+ oAcc[sKey] = oData[sFirstKey][sKey];
354
+ }
355
+ return oAcc;
356
+ }, {});
357
+ }
358
+ return {};
339
359
  }
340
360
 
341
- if (bAddClient) {
342
- var oLogonSystem = sap.ushell.Container.getLogonSystem();
343
- var sSapClient = oLogonSystem && oLogonSystem.getClient();
344
- if (sSapClient) {
345
- oHeaders["sap-client"] = sSapClient;
361
+ /**
362
+ * Creates the request headers
363
+ *
364
+ * @param {boolean} bAddClient True if the sap-client should be added
365
+ * @returns {object} The required headers
366
+ *
367
+ * @since 1.87.0
368
+ * @private
369
+ */
370
+ #getHeaders (bAddClient) {
371
+ const oHeaders = {
372
+ "Cache-Control": "no-cache, no-store, must-revalidate",
373
+ Pragma: "no-cache",
374
+ Expires: "0",
375
+ "Accept-Language": Configuration.getLanguage() || "",
376
+ Accept: "application/json, text/plain"
377
+ };
378
+
379
+ const sSAPLogonLanguage = Configuration.getSAPLogonLanguage();
380
+ if (sSAPLogonLanguage) {
381
+ oHeaders["sap-language"] = sSAPLogonLanguage;
346
382
  }
383
+
384
+ if (bAddClient) {
385
+ const oLogonSystem = sap.ushell.Container.getLogonSystem();
386
+ const sSapClient = oLogonSystem && oLogonSystem.getClient();
387
+ if (sSapClient) {
388
+ oHeaders["sap-client"] = sSapClient;
389
+ }
390
+ }
391
+ return oHeaders;
347
392
  }
348
- return oHeaders;
349
- };
350
393
 
351
- /**
352
- * Resolves the UserDefaults values within the request url
353
- *
354
- * @param {string} sUrl The request url
355
- * @param {string} [sContentProviderId] The ContentProviderId
356
- * @returns {Promise<string>} The resolved url
357
- *
358
- * @since 1.87.0
359
- * @private
360
- */
361
- DynamicTileRequest.prototype._resolveUserDefaults = function (sUrl, sContentProviderId) {
362
- var oReferenceResolverService;
363
-
364
- return sap.ushell.Container.getServiceAsync("ClientSideTargetResolution")
365
- .then(function (oClientSideTargetResolutionService) {
366
- return Promise.all([
367
- oClientSideTargetResolutionService.getSystemContext(sContentProviderId),
368
- this.oReferenceResolverPromise
369
- ]);
370
- }.bind(this))
371
- .then(function (oResults) {
372
- var oSystemContext = oResults[0];
373
- oReferenceResolverService = oResults[1];
374
- return new Promise(function (resolve, reject) {
375
- oReferenceResolverService.resolveUserDefaultParameters(sUrl, oSystemContext)
376
- .done(resolve)
377
- .fail(reject);
394
+ /**
395
+ * Resolves the UserDefaults values within the request url
396
+ *
397
+ * @param {string} sUrl The request url
398
+ * @param {string} [sContentProviderId] The ContentProviderId
399
+ * @returns {Promise<string>} The resolved url
400
+ *
401
+ * @since 1.87.0
402
+ * @private
403
+ */
404
+ async #resolveUserDefaults (sUrl, sContentProviderId) {
405
+ const ClientSideTargetResolutionService = await sap.ushell.Container.getServiceAsync("ClientSideTargetResolution");
406
+ const ReferenceResolverService = await sap.ushell.Container.getServiceAsync("ReferenceResolver");
407
+
408
+ const oSystemContext = await ClientSideTargetResolutionService.getSystemContext(sContentProviderId);
409
+ const oResult = await ushellUtils.promisify(ReferenceResolverService.resolveUserDefaultParameters(sUrl, oSystemContext));
410
+
411
+ if (oResult.defaultsWithoutValue && oResult.defaultsWithoutValue.length > 0) {
412
+ Log.error("The service URL contains User Default(s) with no set value: " + oResult.defaultsWithoutValue.join(", "), "", sModuleName);
413
+ return;
414
+ }
415
+
416
+ if (oResult.ignoredReferences && oResult.ignoredReferences.length > 0) {
417
+ // Filter ignored references for DynamicDate because they will be replaced later.
418
+ const aIgnoredReferences = oResult.ignoredReferences.filter((sReference) => {
419
+ return !sReference.startsWith("DynamicDate");
378
420
  });
379
- })
380
- .then(function (oResult) {
381
- if (oResult.defaultsWithoutValue && oResult.defaultsWithoutValue.length > 0) {
382
- Log.error("The service URL contains User Default(s) with no set value: " + oResult.defaultsWithoutValue.join(", "), "", sModuleName);
421
+ if (aIgnoredReferences.length > 0) {
422
+ Log.error("The service URL contains invalid Reference(s): " + aIgnoredReferences.join(", "), "", sModuleName);
383
423
  return;
384
424
  }
425
+ }
385
426
 
386
- if (oResult.ignoredReferences && oResult.ignoredReferences.length > 0) {
387
- // Filter ignored references for DynamicDate because they will be replaced later.
388
- var aIgnoredReferences = oResult.ignoredReferences.filter(function (sReference) {
389
- return !sReference.startsWith("DynamicDate");
390
- });
391
- if (aIgnoredReferences.length > 0) {
392
- Log.error("The service URL contains invalid Reference(s): " + aIgnoredReferences.join(", "), "", sModuleName);
393
- return;
394
- }
395
- }
396
-
397
- return oResult.url;
398
- });
399
- };
427
+ return oResult.url;
428
+ }
400
429
 
401
- /**
402
- * Aborts the running requests and destroys the handler references
403
- *
404
- * @since 1.87.0
405
- * @private
406
- */
407
- DynamicTileRequest.prototype.destroy = function () {
408
- this.abort();
409
- this.fnError = null;
410
- this.fnSuccess = null;
411
- };
430
+ /**
431
+ * Aborts the running requests and destroys the handler references
432
+ *
433
+ * @since 1.87.0
434
+ * @private
435
+ */
436
+ destroy () {
437
+ this.abort();
438
+ this.#fnError = null;
439
+ this.#fnSuccess = null;
440
+ }
441
+ }
412
442
 
413
443
  return DynamicTileRequest;
414
444