@sapui5/sap.ushell 1.125.0 → 1.126.1

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 (317) hide show
  1. package/package.json +1 -1
  2. package/src/main/js/sap/ushell/.library +1 -1
  3. package/src/main/js/sap/ushell/Container.js +137 -62
  4. package/src/main/js/sap/ushell/Fiori20Adapter.js +1 -1
  5. package/src/main/js/sap/ushell/Fiori20AdapterTest.js +1 -1
  6. package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
  7. package/src/main/js/sap/ushell/SessionHandler.js +35 -31
  8. package/src/main/js/sap/ushell/TechnicalParameters.js +1 -1
  9. package/src/main/js/sap/ushell/URLTemplateProcessor.js +1 -1
  10. package/src/main/js/sap/ushell/Ui5NativeServiceFactory.js +1 -1
  11. package/src/main/js/sap/ushell/Ui5ServiceFactory.js +1 -1
  12. package/src/main/js/sap/ushell/_URLTemplateProcessor/DefinitionParameterSetBuilder.js +1 -1
  13. package/src/main/js/sap/ushell/_URLTemplateProcessor/DependencyGraph.js +1 -1
  14. package/src/main/js/sap/ushell/_URLTemplateProcessor/Functions.js +1 -1
  15. package/src/main/js/sap/ushell/_URLTemplateProcessor/Resolvers.js +1 -1
  16. package/src/main/js/sap/ushell/_URLTemplateProcessor/TemplateParameterParser.js +1 -1
  17. package/src/main/js/sap/ushell/_URLTemplateProcessor/utils.js +1 -1
  18. package/src/main/js/sap/ushell/adapters/cdm/ClientSideTargetResolutionAdapter.js +1 -1
  19. package/src/main/js/sap/ushell/adapters/cdm/CommonDataModelAdapter.js +1 -1
  20. package/src/main/js/sap/ushell/adapters/cdm/ConfigurationDefaultsAdapter.js +1 -1
  21. package/src/main/js/sap/ushell/adapters/cdm/ContainerAdapter.js +1 -1
  22. package/src/main/js/sap/ushell/adapters/cdm/LaunchPageAdapter.js +1 -1
  23. package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +1 -1
  24. package/src/main/js/sap/ushell/adapters/cdm/PersonalizationAdapter.js +1 -1
  25. package/src/main/js/sap/ushell/adapters/cdm/PersonalizationV2Adapter.js +1 -1
  26. package/src/main/js/sap/ushell/adapters/cdm/Ui5ComponentLoaderAdapter.js +1 -1
  27. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/modifyHome.js +1 -1
  28. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readCatalogs.js +1 -1
  29. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readHome.js +1 -1
  30. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/uri.transform.js +1 -1
  31. package/src/main/js/sap/ushell/adapters/cdm/util/AppForInbound.js +1 -1
  32. package/src/main/js/sap/ushell/adapters/cdm/util/cdmSiteUtils.js +1 -1
  33. package/src/main/js/sap/ushell/adapters/cdm/v3/AdapterBase.js +1 -1
  34. package/src/main/js/sap/ushell/adapters/cdm/v3/FlpLaunchPageAdapter.js +1 -1
  35. package/src/main/js/sap/ushell/adapters/cdm/v3/LaunchPageAdapter.js +1 -1
  36. package/src/main/js/sap/ushell/adapters/cdm/v3/StaticGroupsAdapter.js +1 -1
  37. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readApplications.js +1 -1
  38. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readCatalogs.js +1 -1
  39. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readHome.js +1 -1
  40. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readPages.js +1 -1
  41. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readUtils.js +1 -1
  42. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readVisualizations.js +1 -1
  43. package/src/main/js/sap/ushell/adapters/cdm/v3/utilsCdm.js +34 -0
  44. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +1 -1
  45. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionInternalAdapter.js +1 -1
  46. package/src/main/js/sap/ushell/adapters/cep/SearchCEPAdapter.js +1 -1
  47. package/src/main/js/sap/ushell/adapters/cflp/UserDefaultParameterPersistenceAdapter.js +1 -1
  48. package/src/main/js/sap/ushell/adapters/local/AdapterContainer.js +1 -1
  49. package/src/main/js/sap/ushell/adapters/local/AppStateAdapter.js +1 -1
  50. package/src/main/js/sap/ushell/adapters/local/ClientSideTargetResolutionAdapter.js +4 -4
  51. package/src/main/js/sap/ushell/adapters/local/ContainerAdapter.js +1 -1
  52. package/src/main/js/sap/ushell/adapters/local/FlpLaunchPageAdapter.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 +1 -1
  55. package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionInternalAdapter.js +1 -1
  56. package/src/main/js/sap/ushell/adapters/local/PageBuildingAdapter.js +1 -1
  57. package/src/main/js/sap/ushell/adapters/local/PagePersistenceAdapter.js +1 -1
  58. package/src/main/js/sap/ushell/adapters/local/PersonalizationAdapter.js +1 -1
  59. package/src/main/js/sap/ushell/adapters/local/PersonalizationV2Adapter.js +1 -1
  60. package/src/main/js/sap/ushell/adapters/local/SearchAdapter.js +1 -1
  61. package/src/main/js/sap/ushell/adapters/local/SearchCEPAdapter.js +1 -1
  62. package/src/main/js/sap/ushell/adapters/local/SupportTicketAdapter.js +1 -1
  63. package/src/main/js/sap/ushell/adapters/local/Ui5ComponentLoaderAdapter.js +1 -1
  64. package/src/main/js/sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js +1 -1
  65. package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +1 -1
  66. package/src/main/js/sap/ushell/api/RTA.js +14 -2
  67. package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntime.js +5 -5
  68. package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/RendererExtensions.js +1 -1
  69. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppConfiguration.js +1 -1
  70. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppState.js +1 -1
  71. package/src/main/js/sap/ushell/appRuntime/ui5/services/Bookmark.js +1 -1
  72. package/src/main/js/sap/ushell/appRuntime/ui5/services/BookmarkV2.js +1 -1
  73. package/src/main/js/sap/ushell/appRuntime/ui5/services/CommonDataModel.js +1 -1
  74. package/src/main/js/sap/ushell/appRuntime/ui5/services/Container.js +1 -1
  75. package/src/main/js/sap/ushell/appRuntime/ui5/services/CrossApplicationNavigation.js +1 -1
  76. package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension/Item.js +1 -1
  77. package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension.js +1 -1
  78. package/src/main/js/sap/ushell/appRuntime/ui5/services/FrameBoundExtension.js +1 -1
  79. package/src/main/js/sap/ushell/appRuntime/ui5/services/LaunchPage.js +1 -1
  80. package/src/main/js/sap/ushell/appRuntime/ui5/services/MessageBroker.js +1 -1
  81. package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolution.js +1 -1
  82. package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolutionInternal.js +1 -1
  83. package/src/main/js/sap/ushell/appRuntime/ui5/services/Navigation.js +1 -1
  84. package/src/main/js/sap/ushell/appRuntime/ui5/services/ReferenceResolver.js +1 -1
  85. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigation.js +1 -1
  86. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigationInternal.js +1 -1
  87. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellUIService.js +1 -1
  88. package/src/main/js/sap/ushell/appRuntime/ui5/services/UserInfo.js +1 -1
  89. package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
  90. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/logger.js +1 -1
  91. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/state.js +1 -1
  92. package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +1 -1
  93. package/src/main/js/sap/ushell/bootstrap/common/common.create.configcontract.core.js +2 -1
  94. package/src/main/js/sap/ushell/bootstrap/sandbox2.js +3 -3
  95. package/src/main/js/sap/ushell/components/CatalogsManager.js +4 -1
  96. package/src/main/js/sap/ushell/components/HomepageManager.js +1 -0
  97. package/src/main/js/sap/ushell/components/_HeaderManager/ShellHeader.controller.js +1 -0
  98. package/src/main/js/sap/ushell/components/appfinder/manifest.json +1 -1
  99. package/src/main/js/sap/ushell/components/applicationIntegration/AppLifeCycle.js +1 -1
  100. package/src/main/js/sap/ushell/components/applicationIntegration/application/Application.js +1 -1
  101. package/src/main/js/sap/ushell/components/applicationIntegration/application/BlueBoxHandler.js +2 -2
  102. package/src/main/js/sap/ushell/components/applicationIntegration/application/BlueBoxesCache.js +37 -7
  103. package/src/main/js/sap/ushell/components/applicationIntegration/application/PostMessageAPI.js +1 -1
  104. package/src/main/js/sap/ushell/components/applicationIntegration/configuration/AppMeta.js +1 -1
  105. package/src/main/js/sap/ushell/components/applicationIntegration/elements/model.js +1 -1
  106. package/src/main/js/sap/ushell/components/applicationIntegration/relatedServices/RelatedServices.js +1 -1
  107. package/src/main/js/sap/ushell/components/applicationIntegration/relatedShellElements/RelatedShellElements.js +1 -1
  108. package/src/main/js/sap/ushell/components/container/ApplicationContainer.js +1 -1
  109. package/src/main/js/sap/ushell/components/contentFinder/Component.js +1 -1
  110. package/src/main/js/sap/ushell/components/contentFinder/controller/AppSearch.controller.js +1 -1
  111. package/src/main/js/sap/ushell/components/contentFinder/controller/ContentFinderDialog.controller.js +1 -1
  112. package/src/main/js/sap/ushell/components/contentFinder/controller/WidgetGallery.controller.js +1 -1
  113. package/src/main/js/sap/ushell/components/contentFinder/manifest.json +1 -1
  114. package/src/main/js/sap/ushell/components/contentFinderStandalone/Component.js +1 -1
  115. package/src/main/js/sap/ushell/components/contentFinderStandalone/controller/ContentFinderStandalone.controller.js +1 -1
  116. package/src/main/js/sap/ushell/components/contentFinderStandalone/manifest.json +1 -1
  117. package/src/main/js/sap/ushell/components/contentFinderStandalone/manifestAppSearch.json +1 -1
  118. package/src/main/js/sap/ushell/components/factsheet/Component.js +1 -1
  119. package/src/main/js/sap/ushell/components/homepage/ActionMode.js +1 -1
  120. package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +1 -1
  121. package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +1 -1
  122. package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +1 -1
  123. package/src/main/js/sap/ushell/components/homepage/manifest.json +1 -1
  124. package/src/main/js/sap/ushell/components/pages/ActionMode.js +1 -1
  125. package/src/main/js/sap/ushell/components/pages/Component.js +1 -1
  126. package/src/main/js/sap/ushell/components/pages/MyHomeImport.js +1 -1
  127. package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +2 -1
  128. package/src/main/js/sap/ushell/components/pages/manifest.json +1 -1
  129. package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +11 -3
  130. package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -1
  131. package/src/main/js/sap/ushell/components/shell/MenuBar/manifest.json +1 -1
  132. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +1 -1
  133. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +1 -1
  134. package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +1 -1
  135. package/src/main/js/sap/ushell/components/shell/Notifications/Notifications.controller.js +1 -2
  136. package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +1 -1
  137. package/src/main/js/sap/ushell/components/shell/Search/manifest.json +1 -1
  138. package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +1 -1
  139. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/FrequentActivityProvider.js +1 -1
  140. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/RecentSearchProvider.js +1 -1
  141. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchProvider.js +1 -1
  142. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchServiceProvider.js +1 -1
  143. package/src/main/js/sap/ushell/components/shell/Settings/Component.js +1 -1
  144. package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.controller.js +10 -0
  145. package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/LanguageRegionSelector.controller.js +1 -0
  146. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/Component.js +1 -1
  147. package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +1 -1
  148. package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/Component.js +3 -0
  149. package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +1 -1
  150. package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +1 -1
  151. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.accessibility.js +1 -1
  152. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.controller.js +1 -1
  153. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +1 -1
  154. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +1 -1
  155. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +1 -1
  156. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +1 -1
  157. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +1 -1
  158. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +1 -1
  159. package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +1 -1
  160. package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +1 -1
  161. package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +1 -1
  162. package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +1 -1
  163. package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
  164. package/src/main/js/sap/ushell/library.js +1 -1
  165. package/src/main/js/sap/ushell/navigationMode.js +1 -1
  166. package/src/main/js/sap/ushell/performance/ShellAnalytics.js +1 -1
  167. package/src/main/js/sap/ushell/performance/StatisticalRecord.js +1 -1
  168. package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
  169. package/src/main/js/sap/ushell/renderer/History.js +1 -2
  170. package/src/main/js/sap/ushell/renderer/Renderer.js +2 -2
  171. package/src/main/js/sap/ushell/renderer/Shell.controller.js +1 -1
  172. package/src/main/js/sap/ushell/renderer/resources/resources_ar.properties +4 -4
  173. package/src/main/js/sap/ushell/renderer/resources/resources_bg.properties +4 -4
  174. package/src/main/js/sap/ushell/renderer/resources/resources_ca.properties +4 -4
  175. package/src/main/js/sap/ushell/renderer/resources/resources_cnr.properties +4 -4
  176. package/src/main/js/sap/ushell/renderer/resources/resources_cs.properties +3 -3
  177. package/src/main/js/sap/ushell/renderer/resources/resources_cy.properties +4 -4
  178. package/src/main/js/sap/ushell/renderer/resources/resources_da.properties +4 -4
  179. package/src/main/js/sap/ushell/renderer/resources/resources_de.properties +4 -4
  180. package/src/main/js/sap/ushell/renderer/resources/resources_el.properties +4 -4
  181. package/src/main/js/sap/ushell/renderer/resources/resources_en.properties +4 -4
  182. package/src/main/js/sap/ushell/renderer/resources/resources_en_GB.properties +4 -4
  183. package/src/main/js/sap/ushell/renderer/resources/resources_en_US_saprigi.properties +4 -4
  184. package/src/main/js/sap/ushell/renderer/resources/resources_es.properties +4 -4
  185. package/src/main/js/sap/ushell/renderer/resources/resources_es_MX.properties +4 -4
  186. package/src/main/js/sap/ushell/renderer/resources/resources_et.properties +4 -4
  187. package/src/main/js/sap/ushell/renderer/resources/resources_fi.properties +4 -4
  188. package/src/main/js/sap/ushell/renderer/resources/resources_fr.properties +4 -4
  189. package/src/main/js/sap/ushell/renderer/resources/resources_fr_CA.properties +37 -37
  190. package/src/main/js/sap/ushell/renderer/resources/resources_hi.properties +4 -4
  191. package/src/main/js/sap/ushell/renderer/resources/resources_hr.properties +4 -4
  192. package/src/main/js/sap/ushell/renderer/resources/resources_hu.properties +4 -4
  193. package/src/main/js/sap/ushell/renderer/resources/resources_id.properties +4 -4
  194. package/src/main/js/sap/ushell/renderer/resources/resources_it.properties +4 -4
  195. package/src/main/js/sap/ushell/renderer/resources/resources_iw.properties +4 -4
  196. package/src/main/js/sap/ushell/renderer/resources/resources_ja.properties +4 -4
  197. package/src/main/js/sap/ushell/renderer/resources/resources_kk.properties +4 -4
  198. package/src/main/js/sap/ushell/renderer/resources/resources_ko.properties +4 -4
  199. package/src/main/js/sap/ushell/renderer/resources/resources_lt.properties +4 -4
  200. package/src/main/js/sap/ushell/renderer/resources/resources_lv.properties +4 -4
  201. package/src/main/js/sap/ushell/renderer/resources/resources_mk.properties +4 -4
  202. package/src/main/js/sap/ushell/renderer/resources/resources_ms.properties +4 -4
  203. package/src/main/js/sap/ushell/renderer/resources/resources_nl.properties +4 -4
  204. package/src/main/js/sap/ushell/renderer/resources/resources_no.properties +4 -4
  205. package/src/main/js/sap/ushell/renderer/resources/resources_pl.properties +4 -4
  206. package/src/main/js/sap/ushell/renderer/resources/resources_pt.properties +4 -4
  207. package/src/main/js/sap/ushell/renderer/resources/resources_pt_PT.properties +4 -4
  208. package/src/main/js/sap/ushell/renderer/resources/resources_ro.properties +4 -4
  209. package/src/main/js/sap/ushell/renderer/resources/resources_ru.properties +4 -4
  210. package/src/main/js/sap/ushell/renderer/resources/resources_sh.properties +4 -4
  211. package/src/main/js/sap/ushell/renderer/resources/resources_sk.properties +4 -4
  212. package/src/main/js/sap/ushell/renderer/resources/resources_sl.properties +4 -4
  213. package/src/main/js/sap/ushell/renderer/resources/resources_sr.properties +4 -4
  214. package/src/main/js/sap/ushell/renderer/resources/resources_sv.properties +4 -4
  215. package/src/main/js/sap/ushell/renderer/resources/resources_th.properties +4 -4
  216. package/src/main/js/sap/ushell/renderer/resources/resources_tr.properties +4 -4
  217. package/src/main/js/sap/ushell/renderer/resources/resources_uk.properties +4 -4
  218. package/src/main/js/sap/ushell/renderer/resources/resources_vi.properties +4 -4
  219. package/src/main/js/sap/ushell/renderer/resources/resources_zh_CN.properties +4 -4
  220. package/src/main/js/sap/ushell/renderer/resources/resources_zh_TW.properties +4 -4
  221. package/src/main/js/sap/ushell/renderer/search/searchComponent/manifest.json +1 -1
  222. package/src/main/js/sap/ushell/services/AppConfiguration.js +13 -11
  223. package/src/main/js/sap/ushell/services/AppLifeCycle.js +1 -1
  224. package/src/main/js/sap/ushell/services/AppState.js +1 -1
  225. package/src/main/js/sap/ushell/services/Bookmark.js +1 -1
  226. package/src/main/js/sap/ushell/services/BookmarkV2.js +1 -1
  227. package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +625 -750
  228. package/src/main/js/sap/ushell/services/CommonDataModel.js +21 -14
  229. package/src/main/js/sap/ushell/services/Configuration.js +1 -1
  230. package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +1 -1
  231. package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +1 -1
  232. package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +14 -3
  233. package/src/main/js/sap/ushell/services/DarkModeSupport.js +1 -1
  234. package/src/main/js/sap/ushell/services/Extension/Item.js +1 -1
  235. package/src/main/js/sap/ushell/services/Extension.js +1 -1
  236. package/src/main/js/sap/ushell/services/FlpLaunchPage.js +1 -1
  237. package/src/main/js/sap/ushell/services/FrameBoundExtension/FloatingContainer.js +1 -1
  238. package/src/main/js/sap/ushell/services/FrameBoundExtension/Footer.js +1 -1
  239. package/src/main/js/sap/ushell/services/FrameBoundExtension/Item.js +1 -1
  240. package/src/main/js/sap/ushell/services/FrameBoundExtension/SidePane.js +1 -1
  241. package/src/main/js/sap/ushell/services/FrameBoundExtension/ToolArea.js +1 -1
  242. package/src/main/js/sap/ushell/services/FrameBoundExtension.js +1 -1
  243. package/src/main/js/sap/ushell/services/LaunchPage.js +1 -1
  244. package/src/main/js/sap/ushell/services/Menu.js +1 -1
  245. package/src/main/js/sap/ushell/services/Message.js +1 -1
  246. package/src/main/js/sap/ushell/services/MessageBroker.js +1 -1
  247. package/src/main/js/sap/ushell/services/MessageInternal.js +1 -1
  248. package/src/main/js/sap/ushell/services/Navigation/compatibility.js +1 -1
  249. package/src/main/js/sap/ushell/services/Navigation/utils.js +1 -1
  250. package/src/main/js/sap/ushell/services/Navigation.js +3 -3
  251. package/src/main/js/sap/ushell/services/NavigationDataProvider.js +1 -1
  252. package/src/main/js/sap/ushell/services/PageBuilding.js +1 -1
  253. package/src/main/js/sap/ushell/services/PagePersistence.js +1 -1
  254. package/src/main/js/sap/ushell/services/PageReferencing.js +1 -1
  255. package/src/main/js/sap/ushell/services/Pages.js +1 -1
  256. package/src/main/js/sap/ushell/services/Personalization.js +1 -1
  257. package/src/main/js/sap/ushell/services/PersonalizationV2.js +1 -1
  258. package/src/main/js/sap/ushell/services/PluginManager.js +1 -1
  259. package/src/main/js/sap/ushell/services/ReferenceResolver.js +223 -229
  260. package/src/main/js/sap/ushell/services/Search.js +1 -1
  261. package/src/main/js/sap/ushell/services/SearchCEP.js +1 -1
  262. package/src/main/js/sap/ushell/services/SearchableContent.js +1 -1
  263. package/src/main/js/sap/ushell/services/ShellNavigation.js +1 -1
  264. package/src/main/js/sap/ushell/services/SmartNavigation.js +1 -1
  265. package/src/main/js/sap/ushell/services/SpaceContent.js +1 -1
  266. package/src/main/js/sap/ushell/services/UITracer.js +1 -1
  267. package/src/main/js/sap/ushell/services/URLShortening.js +1 -1
  268. package/src/main/js/sap/ushell/services/URLTemplate.js +1 -1
  269. package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +1 -1
  270. package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +87 -78
  271. package/src/main/js/sap/ushell/services/UserDefaultParameters.js +225 -271
  272. package/src/main/js/sap/ushell/services/UserInfo.js +1 -1
  273. package/src/main/js/sap/ushell/services/UserRecents.js +1 -1
  274. package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +1 -1
  275. package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +1 -1
  276. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Formatter.js +10 -10
  277. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundIndex.js +9 -6
  278. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundProvider.js +16 -25
  279. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/ParameterMapping.js +3 -1
  280. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/PrelaunchOperations.js +15 -21
  281. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Search.js +52 -45
  282. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/StagedLogger.js +3 -5
  283. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/SystemContext.js +5 -2
  284. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Utils.js +1 -1
  285. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/VirtualInbounds.js +1 -1
  286. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/XAppStateProcessing.js +63 -80
  287. package/src/main/js/sap/ushell/services/_CommonDataModel/SiteConverter.js +1 -1
  288. package/src/main/js/sap/ushell/services/_CommonDataModel/vizTypeDefaults/VizTypeDefaults.js +1 -1
  289. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/ContentExtensionAdapterConfig.js +1 -1
  290. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/FeaturedGroupConfig.js +1 -1
  291. package/src/main/js/sap/ushell/services/_CrossApplicationNavigation/utils.js +1 -1
  292. package/src/main/js/sap/ushell/services/_MessageBroker/MessageBrokerEngine.js +1 -1
  293. package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
  294. package/src/main/js/sap/ushell/services/_PluginManager/Extensions.js +1 -1
  295. package/src/main/js/sap/ushell/services/_PluginManager/HeaderExtensions.js +1 -1
  296. package/src/main/js/sap/ushell/services/_PluginManager/MenuExtensions.js +1 -1
  297. package/src/main/js/sap/ushell/services/_Ui5ComponentLoader/utils.js +1 -1
  298. package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +1 -1
  299. package/src/main/js/sap/ushell/themes/sap_horizon/Tile.less +2 -6
  300. package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +1 -1
  301. package/src/main/js/sap/ushell/ui/footerbar/SendAsEmailButton.js +2 -2
  302. package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
  303. package/src/main/js/sap/ushell/ui/launchpad/Section.js +3 -6
  304. package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +1 -1
  305. package/src/main/js/sap/ushell/ui/shell/ShellHeadItem.js +3 -8
  306. package/src/main/js/sap/ushell/ui/shell/ToolAreaItem.js +1 -2
  307. package/src/main/js/sap/ushell/ui/utils.js +1 -1
  308. package/src/main/js/sap/ushell/ui5service/ShellUIService.js +1 -1
  309. package/src/main/js/sap/ushell/ui5service/UserStatus.js +1 -1
  310. package/src/main/js/sap/ushell/utils/UrlShortening.js +1 -1
  311. package/src/main/js/sap/ushell/utils/WindowUtils.js +17 -0
  312. package/src/main/js/sap/ushell/utils/tilecard/TileCard.js +305 -305
  313. package/src/main/js/sap/ushell/utils/workpage/WorkPageHost.js +1 -1
  314. package/src/main/js/sap/ushell/utils/workpage/WorkPageService.js +22 -5
  315. package/src/main/js/sap/ushell/utils/workpage/WorkPageVizInstantiation.js +7 -6
  316. package/src/test/js/sap/ushell/bootstrap/sandbox.js +1 -1
  317. package/ui5.yaml +1 -1
@@ -29,7 +29,7 @@
29
29
  * In the future, the custom resolver mechanism should be probably moved towards modifying (or only adding to the list of Inbounds),
30
30
  * this way a single data source has to be altered to support consistently getLinks, isIntentSupported.
31
31
  *
32
- * @version 1.125.0
32
+ * @version 1.126.1
33
33
  */
34
34
  sap.ui.define([
35
35
  "sap/base/Log",
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  _VirtualInbounds,
75
75
  _XAppStateProcessing,
76
76
  TechnicalParameters,
77
- UshellUtils,
77
+ ushellUtils,
78
78
  UrlParsing,
79
79
  Container
80
80
  ) {
@@ -230,24 +230,22 @@ sap.ui.define([
230
230
  * @since 1.34.0
231
231
  */
232
232
  ClientSideTargetResolution.prototype.resolveHashFragment = function (sHashFragment) {
233
- var that = this;
234
233
  var oDeferred = new jQuery.Deferred();
235
234
  // NOTE: adapter may not implement fallback function
236
235
  var fnBoundFallback = this._oAdapter.resolveHashFragmentFallback && this._oAdapter.resolveHashFragmentFallback.bind(this._oAdapter);
237
236
  var aSegments = this._extractInboundFilter(sHashFragment);
238
237
 
239
- this._oInboundProvider.getInbounds(aSegments).then(
240
- function (oInboundIndex) {
241
- that._resolveHashFragment(sHashFragment, fnBoundFallback, oInboundIndex)
242
- .done(function (o) {
243
- return oDeferred.resolve(o);
244
- })
245
- .fail(oDeferred.reject.bind(oDeferred));
246
- },
247
- function () {
248
- oDeferred.reject.apply(oDeferred, arguments);
249
- }
250
- );
238
+ this._oInboundProvider.getInbounds(aSegments)
239
+ .then((oInboundIndex) => {
240
+ return this._resolveHashFragment(sHashFragment, fnBoundFallback, oInboundIndex);
241
+ })
242
+ .then((oResolvedHashFragment) => {
243
+ oDeferred.resolve(oResolvedHashFragment);
244
+ })
245
+ .catch((oError) => {
246
+ oDeferred.reject(oError);
247
+ });
248
+
251
249
  return oDeferred.promise();
252
250
  };
253
251
 
@@ -261,22 +259,22 @@ sap.ui.define([
261
259
  * @since 1.38.0
262
260
  */
263
261
  ClientSideTargetResolution.prototype.resolveTileIntent = function (sHashFragment) {
264
- var that = this;
265
262
  var oDeferred = new jQuery.Deferred();
266
263
 
267
264
  // NOTE: adapter may not implement fallback function
268
265
  var aSegments = this._extractInboundFilter(sHashFragment);
269
266
 
270
- this._oInboundProvider.getInbounds(aSegments).then(
271
- function (oInboundIndex) {
272
- that._resolveTileIntent(sHashFragment, undefined, oInboundIndex)
273
- .done(oDeferred.resolve.bind(oDeferred))
274
- .fail(oDeferred.reject.bind(oDeferred));
275
- },
276
- function () {
277
- oDeferred.reject.apply(oDeferred, arguments);
278
- }
279
- );
267
+ this._oInboundProvider.getInbounds(aSegments)
268
+ .then((oInboundIndex) => {
269
+ return this._resolveTileIntent(sHashFragment, undefined, oInboundIndex);
270
+ })
271
+ .then((oResolvedIntent) => {
272
+ oDeferred.resolve(oResolvedIntent);
273
+ })
274
+ .catch((oError) => {
275
+ oDeferred.reject(oError);
276
+ });
277
+
280
278
  return oDeferred.promise();
281
279
  };
282
280
 
@@ -297,15 +295,17 @@ sap.ui.define([
297
295
  );
298
296
 
299
297
  this._resolveTileIntent(sHashFragment, undefined /* fnBoundFallback */, oInboundIndex)
300
- .done(oDeferred.resolve.bind(oDeferred))
301
- .fail(oDeferred.reject.bind(oDeferred));
298
+ .then((oResolvedTileIntent) => {
299
+ oDeferred.resolve(oResolvedTileIntent);
300
+ })
301
+ .catch((oError) => {
302
+ oDeferred.reject(oError);
303
+ });
302
304
 
303
305
  return oDeferred.promise();
304
306
  };
305
307
 
306
- ClientSideTargetResolution.prototype._resolveHashFragment = function (sHashFragment, fnBoundFallback, oInboundIndex) {
307
- var that = this;
308
- var oDeferred = new jQuery.Deferred();
308
+ ClientSideTargetResolution.prototype._resolveHashFragment = async function (sHashFragment, fnBoundFallback, oInboundIndex) {
309
309
  var sFixedHashFragment = sHashFragment.indexOf("#") === 0 ? sHashFragment : "#" + sHashFragment;
310
310
  var oShellHash = UrlParsing.parseShellHash(sFixedHashFragment);
311
311
 
@@ -313,58 +313,44 @@ sap.ui.define([
313
313
  Log.error("Could not parse shell hash '" + sHashFragment + "'",
314
314
  "please specify a valid shell hash",
315
315
  "sap.ushell.services.ClientSideTargetResolution");
316
- return oDeferred.reject().promise();
316
+ throw new Error(`Could not parse shell hash '${sHashFragment}'please specify a valid shell hash`);
317
317
  }
318
318
 
319
- oShellHash.formFactor = UshellUtils.getFormFactor();
319
+ oShellHash.formFactor = ushellUtils.getFormFactor();
320
320
 
321
- this._getMatchingInbounds(oShellHash, oInboundIndex, { bExcludeTileInbounds: true })
322
- .fail(function (sError) {
323
- Log.error("Could not resolve " + sHashFragment,
324
- "_getMatchingInbounds promise rejected with: " + sError,
325
- "sap.ushell.services.ClientSideTargetResolution");
326
- oDeferred.reject(sError);
327
- })
328
- .done(function (aMatchingTargets) {
329
- var oMatchingTarget;
330
-
331
- if (aMatchingTargets.length === 0) {
332
- Log.warning(
333
- "Could not resolve " + sHashFragment,
334
- "rejecting promise",
335
- "sap.ushell.services.ClientSideTargetResolution"
336
- );
337
- oDeferred.reject("Could not resolve navigation target");
338
- return;
339
- }
321
+ let aMatchingTargets = await this._getMatchingInbounds(oShellHash, oInboundIndex, { bExcludeTileInbounds: true });
340
322
 
341
- aMatchingTargets = that._applySapNavigationScopeFilter(aMatchingTargets, oShellHash);
323
+ if (aMatchingTargets.length === 0) {
324
+ Log.warning(
325
+ "Could not resolve " + sHashFragment,
326
+ "rejecting promise",
327
+ "sap.ushell.services.ClientSideTargetResolution"
328
+ );
329
+ throw new Error(`Could not resolve ${sHashFragment}`);
330
+ }
342
331
 
343
- oMatchingTarget = aMatchingTargets[0];
332
+ aMatchingTargets = this._applySapNavigationScopeFilter(aMatchingTargets, oShellHash);
344
333
 
345
- if (Log.getLevel() >= Log.Level.DEBUG) {
346
- // replacer for JSON.stringify to show undefined values
347
- var fnUndefinedReplacer = function (sKey, vVal) {
348
- return (this[sKey] === undefined) ? "<undefined>" : vVal;
349
- };
350
- var fnReplacer = function (key, value) {
351
- return (key === "_original") ? undefined : fnUndefinedReplacer.call(this, key, value);
352
- };
353
- var sMatchedTarget = JSON.stringify(oMatchingTarget, fnReplacer, " ");
334
+ const oMatchingTarget = aMatchingTargets[0];
354
335
 
355
- Log.debug(
356
- "The following target will now be resolved",
357
- sMatchedTarget,
358
- "sap.ushell.services.ClientSideTargetResolution"
359
- );
360
- }
336
+ if (Log.getLevel() >= Log.Level.DEBUG) {
337
+ // replacer for JSON.stringify to show undefined values
338
+ var fnUndefinedReplacer = function (sKey, vVal) {
339
+ return (this[sKey] === undefined) ? "<undefined>" : vVal;
340
+ };
341
+ var fnReplacer = function (key, value) {
342
+ return (key === "_original") ? undefined : fnUndefinedReplacer.call(this, key, value);
343
+ };
344
+ var sMatchedTarget = JSON.stringify(oMatchingTarget, fnReplacer, " ");
361
345
 
362
- that._resolveSingleMatchingTarget(oMatchingTarget, fnBoundFallback, sFixedHashFragment)
363
- .done(oDeferred.resolve.bind(oDeferred))
364
- .fail(oDeferred.reject.bind(oDeferred));
365
- });
346
+ Log.debug(
347
+ "The following target will now be resolved",
348
+ sMatchedTarget,
349
+ "sap.ushell.services.ClientSideTargetResolution"
350
+ );
351
+ }
366
352
 
367
- return oDeferred.promise();
353
+ return this._resolveSingleMatchingTarget(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
368
354
  };
369
355
 
370
356
  /**
@@ -394,9 +380,7 @@ sap.ui.define([
394
380
  return aFilteredResults.length > 0 ? aFilteredResults : aMatchResults;
395
381
  };
396
382
 
397
- ClientSideTargetResolution.prototype._resolveSingleMatchingTarget = function (oMatchingTarget, fnBoundFallback, sFixedHashFragment) {
398
- var that = this;
399
- var oDeferred = new jQuery.Deferred();
383
+ ClientSideTargetResolution.prototype._resolveSingleMatchingTarget = async function (oMatchingTarget, fnBoundFallback, sFixedHashFragment) {
400
384
  var oIntent = UrlParsing.parseShellHash(sFixedHashFragment);
401
385
  var sIntent = [oIntent.semanticObject, oIntent.action].join("-");
402
386
  var sApplicationType = (oMatchingTarget.inbound.resolutionResult || {}).applicationType;
@@ -409,86 +393,77 @@ sap.ui.define([
409
393
  var bHasUrlTemplate = !!oMatchingTarget.inbound.templateContext;
410
394
  var fnEasyAccessMenuResolver = ApplicationType.getEasyAccessMenuResolver(sIntent, sApplicationType);
411
395
  if (fnEasyAccessMenuResolver && !bHasUrlTemplate) {
412
- fnEasyAccessMenuResolver(oIntent, oMatchingTarget, fnExternalSystemAliasResolver, ApplicationType.WDA.enableWdaCompatibilityMode)
413
- .then(
414
- function (oResolutionResult) {
415
- var oNavModeProperties = NavigationMode.getNavigationMode(
416
- oResolutionResult,
417
- (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-navmode"] || [])[0],
418
- (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-next-navmode"] || [])[0]
419
- );
420
- UshellUtils.shallowMergeObject(oResolutionResult, oNavModeProperties);
421
- oResolutionResult.inboundPermanentKey = oMatchingTarget.inbound.permanentKey || oMatchingTarget.inbound.id;
422
- oDeferred.resolve(oResolutionResult);
423
- },
424
- function (sError) {
425
- oDeferred.reject(sError);
426
- }
427
- );
428
- return oDeferred.promise();
396
+ const oResolutionResult = await fnEasyAccessMenuResolver(oIntent, oMatchingTarget, fnExternalSystemAliasResolver, ApplicationType.WDA.enableWdaCompatibilityMode);
397
+
398
+ const oNavModeProperties = NavigationMode.getNavigationMode(
399
+ oResolutionResult,
400
+ (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-navmode"] || [])[0],
401
+ (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-next-navmode"] || [])[0]
402
+ );
403
+ ushellUtils.shallowMergeObject(oResolutionResult, oNavModeProperties);
404
+ oResolutionResult.inboundPermanentKey = oMatchingTarget.inbound.permanentKey || oMatchingTarget.inbound.id;
405
+
406
+ return oResolutionResult;
429
407
  }
430
408
 
431
409
  var oReservedParameters = this._getReservedParameters(oMatchingTarget);
432
410
 
433
411
  // rename Parameters
434
412
  _ParameterMapping.mapParameterNamesAndRemoveObjects(oMatchingTarget);
435
- Container.getServiceAsync("AppState").then(function (AppStateService) {
436
- _XAppStateProcessing.mixAppStateIntoResolutionResultAndRename(oMatchingTarget, AppStateService)
437
- .done(function (oMatchingTarget) {
438
- var fnResultProcessor = function () {
439
- return that._constructFallbackResolutionResult(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
440
- };
441
- if (ApplicationType[sApplicationType]) {
442
- fnResultProcessor = ApplicationType[sApplicationType].generateResolutionResult;
443
- }
444
413
 
445
- // remove parameters that should not make it to the URL (in any case!)
446
- delete oMatchingTarget.intentParamsPlusAllDefaults["sap-tag"];
447
- delete oMatchingTarget.mappedIntentParamsPlusSimpleDefaults["sap-tag"];
448
- oMatchingTarget.mappedDefaultedParamNames = oMatchingTarget.mappedDefaultedParamNames.filter(function (sParameterName) {
449
- return sParameterName !== "sap-tag";
450
- });
451
-
452
- var sBaseUrl = ObjectPath.get("inbound.resolutionResult.url", oMatchingTarget);
453
-
454
- _PrelaunchOperations.executePrelaunchOperations(oMatchingTarget, oReservedParameters["sap-prelaunch-operations"])
455
- .then(function () {
456
- return fnResultProcessor(oMatchingTarget, sBaseUrl, fnExternalSystemAliasResolver);
457
- })
458
- .then(function (oResolutionResult) {
459
- var oNavModeProperties = NavigationMode.getNavigationMode(
460
- oResolutionResult,
461
- (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-navmode"] || [])[0],
462
- (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-next-navmode"] || [])[0]
463
- );
464
- UshellUtils.shallowMergeObject(oResolutionResult, oNavModeProperties);
414
+ const AppState = await Container.getServiceAsync("AppState");
415
+ oMatchingTarget = await _XAppStateProcessing.mixAppStateIntoResolutionResultAndRename(oMatchingTarget, AppState);
465
416
 
466
- oResolutionResult.reservedParameters = oReservedParameters;
467
- oResolutionResult.inboundPermanentKey = oMatchingTarget.inbound.permanentKey || oMatchingTarget.inbound.id;
468
- Log.debug(
469
- "Intent was resolved to the following target",
470
- JSON.stringify(oResolutionResult, null, 3),
471
- "sap.ushell.services.ClientSideTargetResolution"
472
- );
473
- UshellUtils.shallowMergeObject(oMatchingTarget.resolutionResult, oResolutionResult);
474
- oDeferred.resolve(oMatchingTarget.resolutionResult);
475
- }, function (vMessage) {
476
- if (typeof vMessage === "string" && vMessage.indexOf("fallback:") >= 0) {
477
- that._constructFallbackResolutionResult.call(this, oMatchingTarget, fnBoundFallback, sFixedHashFragment)
478
- .then(
479
- function (oResolutionResult) {
480
- UshellUtils.shallowMergeObject(oMatchingTarget.resolutionResult, oResolutionResult);
481
- oDeferred.resolve(oMatchingTarget.resolutionResult);
482
- },
483
- oDeferred.reject.bind(oDeferred)
484
- );
485
- } else {
486
- oDeferred.reject(vMessage);
487
- }
488
- });
489
- });
417
+ // remove parameters that should not make it to the URL (in any case!)
418
+ delete oMatchingTarget.intentParamsPlusAllDefaults["sap-tag"];
419
+ delete oMatchingTarget.mappedIntentParamsPlusSimpleDefaults["sap-tag"];
420
+ oMatchingTarget.mappedDefaultedParamNames = oMatchingTarget.mappedDefaultedParamNames.filter(function (sParameterName) {
421
+ return sParameterName !== "sap-tag";
490
422
  });
491
- return oDeferred.promise();
423
+
424
+ var sBaseUrl = ObjectPath.get("inbound.resolutionResult.url", oMatchingTarget);
425
+
426
+ await _PrelaunchOperations.executePrelaunchOperations(oMatchingTarget, oReservedParameters["sap-prelaunch-operations"]);
427
+
428
+ try {
429
+ let fnResultProcessor;
430
+ if (ApplicationType[sApplicationType]) {
431
+ fnResultProcessor = ApplicationType[sApplicationType].generateResolutionResult;
432
+ } else {
433
+ fnResultProcessor = () => {
434
+ return this._constructFallbackResolutionResult(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
435
+ };
436
+ }
437
+ const oResolutionResult = await fnResultProcessor(oMatchingTarget, sBaseUrl, fnExternalSystemAliasResolver);
438
+
439
+ const oNavModeProperties = NavigationMode.getNavigationMode(
440
+ oResolutionResult,
441
+ (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-navmode"] || [])[0],
442
+ (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-next-navmode"] || [])[0]
443
+ );
444
+ ushellUtils.shallowMergeObject(oResolutionResult, oNavModeProperties);
445
+
446
+ oResolutionResult.reservedParameters = oReservedParameters;
447
+ oResolutionResult.inboundPermanentKey = oMatchingTarget.inbound.permanentKey || oMatchingTarget.inbound.id;
448
+
449
+ Log.debug(
450
+ "Intent was resolved to the following target",
451
+ JSON.stringify(oResolutionResult, null, 3),
452
+ "sap.ushell.services.ClientSideTargetResolution"
453
+ );
454
+ ushellUtils.shallowMergeObject(oMatchingTarget.resolutionResult, oResolutionResult);
455
+
456
+ return oMatchingTarget.resolutionResult;
457
+ } catch (vMessage) {
458
+ if (typeof vMessage === "string" && vMessage.indexOf("fallback:") >= 0) {
459
+ const oResolutionResult = await this._constructFallbackResolutionResult(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
460
+ ushellUtils.shallowMergeObject(oMatchingTarget.resolutionResult, oResolutionResult);
461
+
462
+ return oMatchingTarget.resolutionResult;
463
+ }
464
+
465
+ throw vMessage;
466
+ }
492
467
  };
493
468
 
494
469
  /**‚
@@ -542,9 +517,7 @@ sap.ui.define([
542
517
  return oReservedParameters;
543
518
  };
544
519
 
545
- ClientSideTargetResolution.prototype._resolveTileIntent = function (sHashFragment, fnBoundFallback, oInboundIndex) {
546
- var that = this;
547
- var oDeferred = new jQuery.Deferred();
520
+ ClientSideTargetResolution.prototype._resolveTileIntent = async function (sHashFragment, fnBoundFallback, oInboundIndex) {
548
521
  var sFixedHashFragment = sHashFragment.indexOf("#") === 0 ? sHashFragment : "#" + sHashFragment;
549
522
  var oShellHash = UrlParsing.parseShellHash(sFixedHashFragment);
550
523
 
@@ -554,45 +527,28 @@ sap.ui.define([
554
527
  "please specify a valid shell hash",
555
528
  "sap.ushell.services.ClientSideTargetResolution"
556
529
  );
557
- return oDeferred.reject("Cannot parse shell hash").promise();
530
+ throw new Error("Cannot parse shell hash");
558
531
  }
559
532
 
560
- oShellHash.formFactor = UshellUtils.getFormFactor();
533
+ oShellHash.formFactor = ushellUtils.getFormFactor();
561
534
 
562
- this._getMatchingInbounds(oShellHash, oInboundIndex, { bExcludeTileInbounds: false })
563
- .fail(function (sError) {
564
- Log.error(
565
- "Could not resolve " + sHashFragment,
566
- "_getMatchingInbounds promise rejected with: " + sError,
567
- "sap.ushell.services.ClientSideTargetResolution"
568
- );
569
- oDeferred.reject(sError);
570
- })
571
- .done(function (aMatchingTargets) {
572
- var oMatchingTarget;
573
-
574
- if (aMatchingTargets.length === 0) {
575
- Log.warning(
576
- "Could not resolve " + sHashFragment,
577
- "no matching targets were found",
578
- "sap.ushell.services.ClientSideTargetResolution"
579
- );
580
- oDeferred.reject("No matching targets found");
581
- return;
582
- }
535
+ const aMatchingTargets = await this._getMatchingInbounds(oShellHash, oInboundIndex, { bExcludeTileInbounds: false });
583
536
 
584
- oMatchingTarget = aMatchingTargets[0];
585
- that._resolveSingleMatchingTileIntent(oMatchingTarget, fnBoundFallback, sFixedHashFragment)
586
- .done(oDeferred.resolve.bind(oDeferred))
587
- .fail(oDeferred.reject.bind(oDeferred));
588
- });
589
- return oDeferred.promise();
537
+ if (aMatchingTargets.length === 0) {
538
+ Log.warning(
539
+ "Could not resolve " + sHashFragment,
540
+ "no matching targets were found",
541
+ "sap.ushell.services.ClientSideTargetResolution"
542
+ );
543
+ throw new Error("No matching targets found");
544
+ }
545
+
546
+ const oMatchingTarget = aMatchingTargets[0];
547
+ return this._resolveSingleMatchingTileIntent(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
590
548
  };
591
549
 
592
- ClientSideTargetResolution.prototype._resolveSingleMatchingTileIntent = function (oMatchingTarget, fnBoundFallback, sFixedHashFragment) {
593
- var oDeferred = new jQuery.Deferred();
550
+ ClientSideTargetResolution.prototype._resolveSingleMatchingTileIntent = async function (oMatchingTarget, fnBoundFallback, sFixedHashFragment) {
594
551
  var sApplicationType = (oMatchingTarget.inbound.resolutionResult || {}).applicationType;
595
- var that = this;
596
552
 
597
553
  var fnExternalSystemAliasResolver;
598
554
  if (this._oAdapter.resolveSystemAlias) {
@@ -601,55 +557,51 @@ sap.ui.define([
601
557
 
602
558
  // rename Parameters
603
559
  _ParameterMapping.mapParameterNamesAndRemoveObjects(oMatchingTarget);
604
- Container.getServiceAsync("AppState").then(function (AppStateService) {
605
- _XAppStateProcessing.mixAppStateIntoResolutionResultAndRename(oMatchingTarget, AppStateService)
606
- .done(function (oMatchingTarget) {
607
- var fnResultProcessor = function () {
608
- return that._constructFallbackResolutionResult(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
609
- };
610
- if (ApplicationType[sApplicationType]) {
611
- fnResultProcessor = ApplicationType[sApplicationType].generateResolutionResult;
612
- }
613
560
 
614
- // remove parameters that should not make it to the URL (in any case!)
615
- delete oMatchingTarget.intentParamsPlusAllDefaults["sap-tag"];
616
- delete oMatchingTarget.mappedIntentParamsPlusSimpleDefaults["sap-tag"];
617
- oMatchingTarget.mappedDefaultedParamNames = oMatchingTarget.mappedDefaultedParamNames.filter(function (sParameterName) {
618
- return sParameterName !== "sap-tag";
619
- });
561
+ const AppState = await Container.getServiceAsync("AppState");
562
+ oMatchingTarget = await _XAppStateProcessing.mixAppStateIntoResolutionResultAndRename(oMatchingTarget, AppState);
620
563
 
621
- var sBaseUrl = ObjectPath.get("inbound.resolutionResult.url", oMatchingTarget);
564
+ // remove parameters that should not make it to the URL (in any case!)
565
+ delete oMatchingTarget.intentParamsPlusAllDefaults["sap-tag"];
566
+ delete oMatchingTarget.mappedIntentParamsPlusSimpleDefaults["sap-tag"];
567
+ oMatchingTarget.mappedDefaultedParamNames = oMatchingTarget.mappedDefaultedParamNames.filter(function (sParameterName) {
568
+ return sParameterName !== "sap-tag";
569
+ });
622
570
 
623
- fnResultProcessor(oMatchingTarget, sBaseUrl, fnExternalSystemAliasResolver).then(
624
- function (oResolutionResult) {
625
- UshellUtils.shallowMergeObject(oMatchingTarget.resolutionResult, oResolutionResult);
571
+ var sBaseUrl = ObjectPath.get("inbound.resolutionResult.url", oMatchingTarget);
626
572
 
627
- // beware, shallow copy of central object! only modify root properties!
628
- var oTileResolutionResult = fnExtend({}, oMatchingTarget.inbound.tileResolutionResult);
573
+ let fnResultProcessor;
629
574
 
630
- oTileResolutionResult.startupParameters = oMatchingTarget.effectiveParameters;
575
+ if (ApplicationType[sApplicationType]) {
576
+ fnResultProcessor = ApplicationType[sApplicationType].generateResolutionResult;
577
+ } else {
578
+ fnResultProcessor = () => {
579
+ return this._constructFallbackResolutionResult(oMatchingTarget, fnBoundFallback, sFixedHashFragment);
580
+ };
581
+ }
631
582
 
632
- var oNavModeProperties = NavigationMode.getNavigationMode(
633
- oResolutionResult,
634
- (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-navmode"] || [])[0],
635
- (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-next-navmode"] || [])[0]
636
- );
637
- UshellUtils.shallowMergeObject(oTileResolutionResult, oNavModeProperties);
583
+ const oResolutionResult = await fnResultProcessor(oMatchingTarget, sBaseUrl, fnExternalSystemAliasResolver);
638
584
 
639
- oDeferred.resolve(oTileResolutionResult);
640
- Log.debug(
641
- "Tile Intent was resolved to the following target",
642
- JSON.stringify(oTileResolutionResult, null, 3),
643
- "sap.ushell.services.ClientSideTargetResolution"
644
- );
645
- },
646
- function (sMessage) {
647
- oDeferred.reject(sMessage);
648
- }
649
- );
650
- });
651
- });
652
- return oDeferred.promise();
585
+ ushellUtils.shallowMergeObject(oMatchingTarget.resolutionResult, oResolutionResult);
586
+
587
+ // beware, shallow copy of central object! only modify root properties!
588
+ var oTileResolutionResult = fnExtend({}, oMatchingTarget.inbound.tileResolutionResult);
589
+
590
+ oTileResolutionResult.startupParameters = oMatchingTarget.effectiveParameters;
591
+
592
+ var oNavModeProperties = NavigationMode.getNavigationMode(
593
+ oResolutionResult,
594
+ (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-navmode"] || [])[0],
595
+ (oMatchingTarget.intentParamsPlusAllDefaults["sap-ushell-next-navmode"] || [])[0]
596
+ );
597
+ ushellUtils.shallowMergeObject(oTileResolutionResult, oNavModeProperties);
598
+
599
+ Log.debug(
600
+ "Tile Intent was resolved to the following target",
601
+ JSON.stringify(oTileResolutionResult, null, 3),
602
+ "sap.ushell.services.ClientSideTargetResolution"
603
+ );
604
+ return oTileResolutionResult;
653
605
  };
654
606
 
655
607
  /**
@@ -673,7 +625,7 @@ sap.ui.define([
673
625
  * <li>inbound that matched the hash fragment</li>
674
626
  * <li>oEffectiveParameters, the parameters to be added to the resolved url</li>
675
627
  * </ol>
676
- * This function must return a jQuery promise that is resolved with an object like:
628
+ * This function must return a promise that is resolved with an object like:
677
629
  * <pre>
678
630
  * {
679
631
  * applicationType: ...,
@@ -689,7 +641,7 @@ sap.ui.define([
689
641
  * <code>fnBoundFallback</code> parameter was undefined or failed to produce a resolution result.
690
642
  * @private
691
643
  */
692
- ClientSideTargetResolution.prototype._constructFallbackResolutionResult = function (oMatchingTarget, fnBoundFallback, sFixedHashFragment) {
644
+ ClientSideTargetResolution.prototype._constructFallbackResolutionResult = async function (oMatchingTarget, fnBoundFallback, sFixedHashFragment) {
693
645
  // The current flow is to resolve the result with all *uncompressed* default substituted parameters and alters
694
646
  // appState compress the url afterwards if needed (the fallback function takes care of this).
695
647
  var oEffectiveParameters = {};
@@ -712,7 +664,7 @@ sap.ui.define([
712
664
  "sap.ushell.services.ClientSideTargetResolution"
713
665
  );
714
666
 
715
- return Promise.reject("Cannot resolve hash fragment: no fallback provided.");
667
+ throw new Error("Cannot resolve hash fragment: no fallback provided.");
716
668
  }
717
669
 
718
670
  // fallback
@@ -723,25 +675,21 @@ sap.ui.define([
723
675
  );
724
676
 
725
677
  // NOTE: the callback function will be invoked with the effective *unmapped* parameter names! as 3rd argument
726
- return new Promise(function (fnResolve, fnReject) {
727
- fnBoundFallback(
728
- sFixedHashFragment,
729
- fnExtend({}, oMatchingTarget.inbound), // don't let adapters to change the inbound member
730
- oEffectiveParameters
731
- )
732
- .done(function (oFallbackResolutionResult) {
733
- var oResolutionResult = {};
734
- // propagate properties from the resolution result returned by the fallback function
735
- ["applicationType", "additionalInformation", "url", "applicationDependencies", "text"].forEach(function (sPropName) {
736
- if (oFallbackResolutionResult.hasOwnProperty(sPropName)) {
737
- oResolutionResult[sPropName] = oFallbackResolutionResult[sPropName];
738
- }
739
- });
740
-
741
- fnResolve(oResolutionResult);
742
- })
743
- .fail(fnReject.bind(null));
678
+ const oFallbackResolutionResult = await ushellUtils.promisify(fnBoundFallback(
679
+ sFixedHashFragment,
680
+ fnExtend({}, oMatchingTarget.inbound), // don't let adapters to change the inbound member
681
+ oEffectiveParameters
682
+ ));
683
+
684
+ var oResolutionResult = {};
685
+ // propagate properties from the resolution result returned by the fallback function
686
+ ["applicationType", "additionalInformation", "url", "applicationDependencies", "text"].forEach(function (sPropName) {
687
+ if (oFallbackResolutionResult.hasOwnProperty(sPropName)) {
688
+ oResolutionResult[sPropName] = oFallbackResolutionResult[sPropName];
689
+ }
744
690
  });
691
+
692
+ return oResolutionResult;
745
693
  };
746
694
 
747
695
  /**
@@ -758,8 +706,8 @@ sap.ui.define([
758
706
  ClientSideTargetResolution.prototype.getDistinctSemanticObjects = function () {
759
707
  var oDeferred = new jQuery.Deferred();
760
708
 
761
- this._oInboundProvider.getInbounds().then(
762
- function (oInboundIndex) {
709
+ this._oInboundProvider.getInbounds()
710
+ .then((oInboundIndex) => {
763
711
  var oSemanticObjects = {};
764
712
 
765
713
  oInboundIndex.getAllInbounds().forEach(function (oInbound) {
@@ -769,14 +717,12 @@ sap.ui.define([
769
717
  }
770
718
  });
771
719
 
772
- oDeferred.resolve(
773
- Object.keys(oSemanticObjects).sort()
774
- );
775
- },
776
- function () {
777
- oDeferred.reject.apply(oDeferred, arguments);
778
- }
779
- );
720
+ oDeferred.resolve(Object.keys(oSemanticObjects).sort());
721
+ })
722
+ .catch((oError) => {
723
+ oDeferred.reject(oError);
724
+ });
725
+
780
726
  return oDeferred.promise();
781
727
  };
782
728
 
@@ -825,8 +771,6 @@ sap.ui.define([
825
771
  * @since 1.38.0
826
772
  */
827
773
  ClientSideTargetResolution.prototype.getLinks = function (oArgs) {
828
- var that = this;
829
-
830
774
  var oDeferred = new jQuery.Deferred();
831
775
  var oCallArgs;
832
776
 
@@ -870,16 +814,17 @@ sap.ui.define([
870
814
  return oDeferred.reject("invalid arguments for getLinks").promise();
871
815
  }
872
816
 
873
- this._oInboundProvider.getInbounds().then(
874
- function (oInboundIndex) {
875
- that._getLinks(oCallArgs, oInboundIndex)
876
- .done(oDeferred.resolve.bind(oDeferred))
877
- .fail(oDeferred.reject.bind(oDeferred));
878
- },
879
- function () {
880
- oDeferred.reject.apply(oDeferred, arguments);
881
- }
882
- );
817
+ this._oInboundProvider.getInbounds()
818
+ .then((oInboundIndex) => {
819
+ return this._getLinks(oCallArgs, oInboundIndex);
820
+ })
821
+ .then((aLinks) => {
822
+ oDeferred.resolve(aLinks);
823
+ })
824
+ .catch((oError) => {
825
+ oDeferred.reject(oError);
826
+ });
827
+
883
828
  return oDeferred.promise();
884
829
  };
885
830
 
@@ -956,7 +901,7 @@ sap.ui.define([
956
901
  * }
957
902
  * </pre>
958
903
  * @param {object} oInboundIndex An inbound index to retrieve the get semantic object links from.
959
- * @returns {object[]} An array of link objects containing (at least) the following properties:
904
+ * @returns {Promise<object[]>} An array of link objects containing (at least) the following properties:
960
905
  * <pre>
961
906
  * {
962
907
  * intent: "#AnObject-Action?A=B&C=e&C=j",
@@ -968,7 +913,7 @@ sap.ui.define([
968
913
  * </pre>
969
914
  * @private
970
915
  */
971
- ClientSideTargetResolution.prototype._getLinks = function (oArgs, oInboundIndex) {
916
+ ClientSideTargetResolution.prototype._getLinks = async function (oArgs, oInboundIndex) {
972
917
  var sSemanticObject = oArgs.semanticObject;
973
918
  var sAction = oArgs.action;
974
919
  var mParameters = oArgs.params;
@@ -996,12 +941,12 @@ sap.ui.define([
996
941
  }
997
942
 
998
943
  if (sErrorMessage) {
999
- return new jQuery.Deferred().reject(sErrorMessage).promise();
944
+ throw new Error(sErrorMessage);
1000
945
  }
1001
946
 
1002
947
  if (sSemanticObject === "*") {
1003
948
  // shortcut: skip matching inbounds and return directly; it can only match "*" and we don't return it anyway
1004
- return jQuery.when([]);
949
+ return [];
1005
950
  }
1006
951
 
1007
952
  /**
@@ -1012,172 +957,164 @@ sap.ui.define([
1012
957
  return sBusinessParams ? "?" + sBusinessParams : "";
1013
958
  }
1014
959
 
1015
- var oDeferred = new jQuery.Deferred();
1016
- var sFormFactor = UshellUtils.getFormFactor();
960
+ var sFormFactor = ushellUtils.getFormFactor();
1017
961
  var oAllIntentParams = UrlParsing.parseParameters(fnConstructBusinessParamsString(mParameters));
1018
962
  var oShellHash = {
1019
963
  semanticObject: (sSemanticObject === "" ? undefined : sSemanticObject),
1020
964
  action: sAction, // undefined: match all actions
1021
- formFactor: (
1022
- bIgnoreFormFactor
1023
- ? undefined // match any form factor
1024
- : sFormFactor
1025
- ),
965
+ formFactor: (bIgnoreFormFactor ? undefined : sFormFactor), // undefined: match any form factor
1026
966
  params: oAllIntentParams
1027
967
  };
1028
968
  if (bTreatTechHintAsFilter) {
1029
969
  oShellHash.treatTechHintAsFilter = true;
1030
970
  }
1031
971
 
1032
- this._getMatchingInbounds(oShellHash, oInboundIndex, oInboundsConstraints)
1033
- .done(function (aMatchingTargets) {
1034
- var oUniqueIntents = {};
1035
- var aResults = aMatchingTargets.map(function (oMatchResult) {
1036
- var sAdjustedSemanticObject = sSemanticObject || oMatchResult.inbound.semanticObject;
1037
- var sIntent = "#" + sAdjustedSemanticObject + "-" + oMatchResult.inbound.action;
1038
- var oNeededParameters;
972
+ const aMatchingTargets = await this._getMatchingInbounds(oShellHash, oInboundIndex, oInboundsConstraints);
1039
973
 
1040
- // we never return "*" semantic objects from getLinks as they are not parsable links
1041
- if (sAdjustedSemanticObject === "*") {
1042
- return undefined;
1043
- }
974
+ var oUniqueIntents = {};
975
+ var aResults = aMatchingTargets
976
+ .map(function (oMatchResult) {
977
+ var sAdjustedSemanticObject = sSemanticObject || oMatchResult.inbound.semanticObject;
978
+ var sIntent = "#" + sAdjustedSemanticObject + "-" + oMatchResult.inbound.action;
979
+ var oNeededParameters;
1044
980
 
1045
- // we never want to return "*" actions from getLinks as they are non parsable links
1046
- if (oMatchResult.inbound.action === "*") {
1047
- return undefined;
1048
- }
981
+ // we never return "*" semantic objects from getLinks as they are not parsable links
982
+ if (sAdjustedSemanticObject === "*") {
983
+ return undefined;
984
+ }
1049
985
 
1050
- if (oMatchResult.inbound && oMatchResult.inbound.hasOwnProperty("hideIntentLink") && oMatchResult.inbound.hideIntentLink === true) {
1051
- return undefined;
1052
- }
986
+ // we never want to return "*" actions from getLinks as they are non parsable links
987
+ if (oMatchResult.inbound.action === "*") {
988
+ return undefined;
989
+ }
1053
990
 
1054
- if (!oUniqueIntents.hasOwnProperty(sIntent)) {
1055
- oUniqueIntents[sIntent] = {
1056
- matchingInbound: oMatchResult.inbound,
1057
- count: 1
1058
- };
991
+ if (oMatchResult.inbound && oMatchResult.inbound.hasOwnProperty("hideIntentLink") && oMatchResult.inbound.hideIntentLink === true) {
992
+ return undefined;
993
+ }
1059
994
 
1060
- if (oMatchResult.inbound.signature.additionalParameters === "ignored") {
1061
- // in the result do not show all intent parameters, but only those mentioned by the inbound
1062
- oNeededParameters = _Utils.filterObjectKeys(oAllIntentParams, function (sIntentParam) {
1063
- return (sIntentParam.indexOf("sap-") === 0) ||
1064
- oMatchResult.inbound.signature.parameters.hasOwnProperty(sIntentParam);
1065
- }, false);
1066
- } else {
1067
- oNeededParameters = oAllIntentParams;
1068
- }
995
+ if (!oUniqueIntents.hasOwnProperty(sIntent)) {
996
+ oUniqueIntents[sIntent] = {
997
+ matchingInbound: oMatchResult.inbound,
998
+ count: 1
999
+ };
1069
1000
 
1070
- // --- begin of post-match reject reasons
1001
+ if (oMatchResult.inbound.signature.additionalParameters === "ignored") {
1002
+ // in the result do not show all intent parameters, but only those mentioned by the inbound
1003
+ oNeededParameters = _Utils.filterObjectKeys(oAllIntentParams, function (sIntentParam) {
1004
+ return (sIntentParam.indexOf("sap-") === 0) || oMatchResult.inbound.signature.parameters.hasOwnProperty(sIntentParam);
1005
+ }, false);
1006
+ } else {
1007
+ oNeededParameters = oAllIntentParams;
1008
+ }
1071
1009
 
1072
- if (bWithAtLeastOneUsedParam) {
1073
- var bAtLeastOneNonSapParam = Object.keys(oNeededParameters).some(function (sNeededParamName) {
1074
- return sNeededParamName.indexOf("sap-") !== 0;
1075
- });
1076
- if (!bAtLeastOneNonSapParam) {
1077
- oUniqueIntents[sIntent].hideReason = "getLinks called with 'withAtLeastOneUsedParam = true', but the inbound had no business parameters defined.";
1078
- return undefined;
1079
- }
1080
- }
1010
+ // --- begin of post-match reject reasons
1081
1011
 
1082
- var bSignatureMeetsParameterOptions = _Utils.inboundSignatureMeetsParameterOptions(
1083
- oMatchResult.inbound.signature.parameters,
1084
- oArgs.paramsOptions || []
1085
- );
1086
- if (!bSignatureMeetsParameterOptions) {
1087
- oUniqueIntents[sIntent].hideReason = "inbound signature does not meet the requested parameter filter options";
1012
+ if (bWithAtLeastOneUsedParam) {
1013
+ var bAtLeastOneNonSapParam = Object.keys(oNeededParameters).some(function (sNeededParamName) {
1014
+ return sNeededParamName.indexOf("sap-") !== 0;
1015
+ });
1016
+ if (!bAtLeastOneNonSapParam) {
1017
+ oUniqueIntents[sIntent].hideReason = "getLinks called with 'withAtLeastOneUsedParam = true', but the inbound had no business parameters defined.";
1088
1018
  return undefined;
1089
1019
  }
1020
+ }
1090
1021
 
1091
- // --- end of post-match reject reasons
1092
-
1093
- var oResult = {
1094
- intent: sIntent + fnConstructBusinessParamsString(oNeededParameters),
1095
- text: oMatchResult.inbound.title
1096
- };
1022
+ var bSignatureMeetsParameterOptions = _Utils.inboundSignatureMeetsParameterOptions(
1023
+ oMatchResult.inbound.signature.parameters,
1024
+ oArgs.paramsOptions || []
1025
+ );
1026
+ if (!bSignatureMeetsParameterOptions) {
1027
+ oUniqueIntents[sIntent].hideReason = "inbound signature does not meet the requested parameter filter options";
1028
+ return undefined;
1029
+ }
1097
1030
 
1098
- if (oMatchResult.inbound.icon) {
1099
- oResult.icon = oMatchResult.inbound.icon;
1100
- }
1101
- if (oMatchResult.inbound.subTitle) {
1102
- oResult.subTitle = oMatchResult.inbound.subTitle;
1103
- }
1104
- if (oMatchResult.inbound.shortTitle) {
1105
- oResult.shortTitle = oMatchResult.inbound.shortTitle;
1106
- }
1031
+ // --- end of post-match reject reasons
1107
1032
 
1108
- var sInboundTag = ObjectPath.get("inbound.signature.parameters.sap-tag.defaultValue.value", oMatchResult);
1109
- if (sInboundTag) {
1110
- oResult.tags = [sInboundTag];
1111
- }
1033
+ var oResult = {
1034
+ intent: sIntent + fnConstructBusinessParamsString(oNeededParameters),
1035
+ text: oMatchResult.inbound.title
1036
+ };
1112
1037
 
1113
- return oResult;
1038
+ if (oMatchResult.inbound.icon) {
1039
+ oResult.icon = oMatchResult.inbound.icon;
1040
+ }
1041
+ if (oMatchResult.inbound.subTitle) {
1042
+ oResult.subTitle = oMatchResult.inbound.subTitle;
1043
+ }
1044
+ if (oMatchResult.inbound.shortTitle) {
1045
+ oResult.shortTitle = oMatchResult.inbound.shortTitle;
1114
1046
  }
1115
- // for debugging purposes
1116
- oUniqueIntents[sIntent].count++;
1117
1047
 
1118
- return undefined;
1119
- }).filter(function (oSemanticObjectLink) {
1120
- return typeof oSemanticObjectLink === "object";
1121
- });
1048
+ var sInboundTag = ObjectPath.get("inbound.signature.parameters.sap-tag.defaultValue.value", oMatchResult);
1049
+ if (sInboundTag) {
1050
+ oResult.tags = [sInboundTag];
1051
+ }
1122
1052
 
1123
- if (sSortProperty !== "priority") {
1124
- aResults.sort(function (oGetSoLinksResult1, oGetSoLinksResult2) {
1125
- return oGetSoLinksResult1[sSortProperty] < oGetSoLinksResult2[sSortProperty] ? -1 : 1;
1126
- });
1053
+ return oResult;
1127
1054
  }
1055
+ // for debugging purposes
1056
+ oUniqueIntents[sIntent].count++;
1128
1057
 
1129
- if (aResults.length === 0) {
1130
- Log.debug("_getLinks returned no results");
1131
- } else if (Log.getLevel() >= Log.Level.DEBUG) {
1132
- if (Log.getLevel() >= Log.Level.TRACE) {
1133
- var aResultLines = [];
1134
- var aHiddenResultLines = [];
1135
-
1136
- aResults.forEach(function (oResult) {
1137
- var sIntent = oResult.intent.split("?")[0];
1138
-
1139
- if (oUniqueIntents[sIntent].hideReason) {
1140
- aHiddenResultLines.push([
1141
- "-", sIntent + "(" + oUniqueIntents[sIntent].hideReason + ")\n",
1142
- " text:", oResult.text + "\n",
1143
- " full intent:", oResult.intent
1144
- ].join(" "));
1145
- } else {
1146
- aResultLines.push([
1147
- "-", sIntent,
1148
- oUniqueIntents[sIntent].count > 1
1149
- ? "(" + (oUniqueIntents[sIntent].count - 1) + " others matched)\n"
1150
- : "\n",
1151
- "text:", oResult.text + "\n",
1152
- "full intent:", oResult.intent
1153
- ].join(" "));
1154
- }
1155
- });
1058
+ return undefined;
1059
+ })
1060
+ .filter(function (oSemanticObjectLink) {
1061
+ return typeof oSemanticObjectLink === "object";
1062
+ });
1156
1063
 
1157
- Log.debug(
1158
- "_getLinks filtered to the following unique intents:",
1159
- "\n" + aResultLines.join("\n"),
1160
- "sap.ushell.services.ClientSideTargetResolution"
1161
- );
1162
-
1163
- Log.debug(
1164
- "_getLinks would have also returned the following unique intents, but something prevented this:",
1165
- aHiddenResultLines.join("\n"),
1166
- "sap.ushell.services.ClientSideTargetResolution"
1167
- );
1064
+ if (sSortProperty !== "priority") {
1065
+ aResults.sort(function (oGetSoLinksResult1, oGetSoLinksResult2) {
1066
+ return oGetSoLinksResult1[sSortProperty] < oGetSoLinksResult2[sSortProperty] ? -1 : 1;
1067
+ });
1068
+ }
1069
+
1070
+ if (aResults.length === 0) {
1071
+ Log.debug("_getLinks returned no results");
1072
+ } else if (Log.getLevel() >= Log.Level.DEBUG) {
1073
+ if (Log.getLevel() >= Log.Level.TRACE) {
1074
+ var aResultLines = [];
1075
+ var aHiddenResultLines = [];
1076
+
1077
+ aResults.forEach(function (oResult) {
1078
+ var sIntent = oResult.intent.split("?")[0];
1079
+
1080
+ if (oUniqueIntents[sIntent].hideReason) {
1081
+ aHiddenResultLines.push([
1082
+ "-", sIntent + "(" + oUniqueIntents[sIntent].hideReason + ")\n",
1083
+ " text:", oResult.text + "\n",
1084
+ " full intent:", oResult.intent
1085
+ ].join(" "));
1168
1086
  } else {
1169
- Log.debug(
1170
- "_getLinks filtered to unique intents.",
1171
- "Reporting histogram: \n - " + Object.keys(oUniqueIntents).join("\n - "),
1172
- "sap.ushell.services.ClientSideTargetResolution"
1173
- );
1087
+ aResultLines.push([
1088
+ "-", sIntent,
1089
+ oUniqueIntents[sIntent].count > 1
1090
+ ? "(" + (oUniqueIntents[sIntent].count - 1) + " others matched)\n"
1091
+ : "\n",
1092
+ "text:", oResult.text + "\n",
1093
+ "full intent:", oResult.intent
1094
+ ].join(" "));
1174
1095
  }
1175
- }
1176
- oDeferred.resolve(aResults);
1177
- })
1178
- .fail(oDeferred.reject.bind(oDeferred));
1096
+ });
1179
1097
 
1180
- return oDeferred.promise();
1098
+ Log.debug(
1099
+ "_getLinks filtered to the following unique intents:",
1100
+ "\n" + aResultLines.join("\n"),
1101
+ "sap.ushell.services.ClientSideTargetResolution"
1102
+ );
1103
+
1104
+ Log.debug(
1105
+ "_getLinks would have also returned the following unique intents, but something prevented this:",
1106
+ aHiddenResultLines.join("\n"),
1107
+ "sap.ushell.services.ClientSideTargetResolution"
1108
+ );
1109
+ } else {
1110
+ Log.debug(
1111
+ "_getLinks filtered to unique intents.",
1112
+ "Reporting histogram: \n - " + Object.keys(oUniqueIntents).join("\n - "),
1113
+ "sap.ushell.services.ClientSideTargetResolution"
1114
+ );
1115
+ }
1116
+ }
1117
+ return aResults;
1181
1118
  };
1182
1119
 
1183
1120
  /**
@@ -1208,18 +1145,17 @@ sap.ui.define([
1208
1145
  * }
1209
1146
  * </pre>
1210
1147
  * @param {string[]} [oConstraints.tags] Tags to which the queried inbounds should belong to.
1211
- * @returns {jQuery.Promise[]} A sorted array of matching targets.
1148
+ * @returns {Promise<object[]>} A sorted array of matching targets.
1212
1149
  * A target is a matching result that in addition has a specific priority with respect to other matching targets.
1213
1150
  * @private
1214
1151
  * @since 1.32.0
1215
1152
  */
1216
- ClientSideTargetResolution.prototype._getMatchingInbounds = function (oShellHash, oInboundIndex, oConstraints) {
1153
+ ClientSideTargetResolution.prototype._getMatchingInbounds = async function (oShellHash, oInboundIndex, oConstraints) {
1217
1154
  var that = this;
1218
1155
  var aTags;
1219
1156
  var iLogId;
1220
1157
  var bExcludeTileInbounds;
1221
1158
  var aPreFilteredInbounds;
1222
- var oDeferred = new jQuery.Deferred();
1223
1159
 
1224
1160
  if (oConstraints) {
1225
1161
  aTags = oConstraints.tags;
@@ -1268,6 +1204,13 @@ sap.ui.define([
1268
1204
  };
1269
1205
  });
1270
1206
 
1207
+ // output logs before returning
1208
+ function endLogger () {
1209
+ _StagedLogger.end(() => {
1210
+ return { logId: iLogId };
1211
+ });
1212
+ }
1213
+
1271
1214
  var sSemanticObject = oShellHash.semanticObject;
1272
1215
  var sAction = oShellHash.action;
1273
1216
  this._oShellHash = oShellHash;
@@ -1292,73 +1235,60 @@ sap.ui.define([
1292
1235
  }
1293
1236
 
1294
1237
  // initial match
1295
- _Search
1296
- .match(oShellHash, aPreFilteredInbounds, {} /* known default */, fnGetContentProviderLookup, Log.getLevel() >= Log.Level.DEBUG)
1297
- .then(function (oInitialMatchResult) {
1298
- // resolve References
1238
+ const oInitialMatchResult = await _Search.match(oShellHash, aPreFilteredInbounds, {} /* known default */, fnGetContentProviderLookup, Log.getLevel() >= Log.Level.DEBUG);
1299
1239
 
1300
- _StagedLogger.log(function () {
1301
- return {
1302
- logId: iLogId,
1303
- stage: 1,
1304
- prefix: "\u2718", // heavy black X
1305
- lines: Object.keys(oInitialMatchResult.noMatchReasons || {}).map(function (sInbound) {
1306
- return sInbound + " " + oInitialMatchResult.noMatchReasons[sInbound];
1307
- })
1308
- };
1309
- });
1310
-
1311
- _StagedLogger.log(function () {
1312
- var aLines = oInitialMatchResult.matchResults.map(function (oMatchResult) {
1313
- return _Formatter.formatInbound(oMatchResult.inbound);
1314
- });
1315
- return {
1316
- logId: iLogId,
1317
- stage: 1,
1318
- prefix: aLines.length > 0
1319
- ? "\u2705" // green checkmark
1320
- : "\u2718", // heavy black X
1321
- lines: aLines.length > 0
1322
- ? aLines
1323
- : ["No inbound was matched"]
1324
- };
1325
- });
1240
+ // ========================= Stage 1 ================================
1241
+ // resolve References
1242
+ _StagedLogger.log(function () {
1243
+ return {
1244
+ logId: iLogId,
1245
+ stage: 1,
1246
+ prefix: "\u2718", // heavy black X
1247
+ lines: Object.keys(oInitialMatchResult.noMatchReasons || {}).map(function (sInbound) {
1248
+ return sInbound + " " + oInitialMatchResult.noMatchReasons[sInbound];
1249
+ })
1250
+ };
1251
+ });
1326
1252
 
1327
- var oMissingReferences = {};
1328
- var bNeedToResolve = false;
1329
- var aContentProviders = Object.keys(oInitialMatchResult.missingReferences);
1330
- aContentProviders.forEach(function (sContentProviderId) {
1331
- var aReferences = Object.keys(oInitialMatchResult.missingReferences[sContentProviderId]);
1332
- bNeedToResolve = bNeedToResolve || aReferences.length > 0;
1333
- oMissingReferences[sContentProviderId] = aReferences;
1334
- });
1253
+ _StagedLogger.log(function () {
1254
+ var aLines = oInitialMatchResult.matchResults.map(function (oMatchResult) {
1255
+ return _Formatter.formatInbound(oMatchResult.inbound);
1256
+ });
1257
+ return {
1258
+ logId: iLogId,
1259
+ stage: 1,
1260
+ prefix: aLines.length > 0
1261
+ ? "\u2705" // green checkmark
1262
+ : "\u2718", // heavy black X
1263
+ lines: aLines.length > 0
1264
+ ? aLines
1265
+ : ["No inbound was matched"]
1266
+ };
1267
+ });
1335
1268
 
1336
- aContentProviders = aContentProviders.filter(function (sContentProviderId) {
1337
- if (oMissingReferences[sContentProviderId].length > 0) {
1338
- return true;
1339
- }
1340
- delete oMissingReferences[sContentProviderId];
1341
- return false;
1342
- });
1269
+ var oMissingReferences = {};
1270
+ var bNeedToResolve = false;
1271
+ var aContentProviders = Object.keys(oInitialMatchResult.missingReferences);
1272
+ aContentProviders.forEach(function (sContentProviderId) {
1273
+ var aReferences = Object.keys(oInitialMatchResult.missingReferences[sContentProviderId]);
1274
+ bNeedToResolve = bNeedToResolve || aReferences.length > 0;
1275
+ oMissingReferences[sContentProviderId] = aReferences;
1276
+ });
1343
1277
 
1344
- // no references to resolve
1345
- if (!bNeedToResolve) {
1346
- _StagedLogger.log(function () {
1347
- return {
1348
- logId: iLogId,
1349
- stage: 2,
1350
- prefix: "\u2705", // green checkmark
1351
- line: "No need to resolve references"
1352
- };
1353
- });
1278
+ aContentProviders = aContentProviders.filter(function (sContentProviderId) {
1279
+ if (oMissingReferences[sContentProviderId].length > 0) {
1280
+ return true;
1281
+ }
1282
+ delete oMissingReferences[sContentProviderId];
1283
+ return false;
1284
+ });
1354
1285
 
1355
- return new jQuery.Deferred().resolve({
1356
- matchResults: oInitialMatchResult.matchResults,
1357
- referencesToInclude: null
1358
- }).promise();
1359
- }
1360
1286
 
1361
- // must resolve references
1287
+ // ========================= Stage 2 ================================
1288
+ // resolve references
1289
+ let oInitialMatchWithReferencesResult;
1290
+ if (bNeedToResolve) {
1291
+ try {
1362
1292
  aContentProviders.forEach(function (sContentProviderId) {
1363
1293
  _StagedLogger.log(function () {
1364
1294
  return {
@@ -1371,161 +1301,152 @@ sap.ui.define([
1371
1301
  });
1372
1302
  });
1373
1303
 
1374
- var oReadyToRematchDeferred = new jQuery.Deferred();
1375
- Container.getServiceAsync("ReferenceResolver")
1376
- .then(function (oReferenceResolver) {
1377
- var aSystemContextPromises = aContentProviders.map(function (sContentProviderId) {
1378
- return this.getSystemContext(sContentProviderId);
1379
- }.bind(this));
1380
- return Promise.all(aSystemContextPromises)
1381
- .then(function (aSystemContexts) {
1382
- var aReferencePromises = aContentProviders.map(function (sContentProviderId, iIndex) {
1383
- return new Promise(function (resolve, reject) {
1384
- oReferenceResolver.resolveReferences(oMissingReferences[sContentProviderId], aSystemContexts[iIndex])
1385
- .done(resolve)
1386
- .fail(reject);
1387
- });
1388
- });
1389
- return Promise.all(aReferencePromises);
1390
- });
1391
- }.bind(this))
1392
- .then(function (aResolvedRefs) {
1393
- var oResult = {
1394
- matchResults: oInitialMatchResult.matchResults,
1395
- referencesToInclude: {}
1396
- };
1397
- aContentProviders.forEach(function (sContentProviderId, iIndex) {
1398
- var oResolvedRefs = aResolvedRefs[iIndex];
1399
- oResult.referencesToInclude[sContentProviderId] = oResolvedRefs;
1400
- if (Object.keys(oResolvedRefs).length > 0) {
1401
- _StagedLogger.log(function () {
1402
- return {
1403
- logId: iLogId,
1404
- stage: 2,
1405
- line: "\u2705 resolved references with contentProviderId = \"" + sContentProviderId + "\" to the following values:",
1406
- prefix: "\u2022", // bullet point
1407
- lines: Object.keys(oResolvedRefs).map(function (sRefName) {
1408
- return sRefName + ": '" + oResolvedRefs[sRefName] + "'";
1409
- })
1410
- };
1411
- });
1412
- }
1413
- });
1414
- oReadyToRematchDeferred.resolve(oResult);
1415
- })
1416
- .catch(function (sError) {
1304
+ const ReferenceResolver = await Container.getServiceAsync("ReferenceResolver");
1305
+
1306
+ const aSystemContexts = await Promise.all(aContentProviders.map((sContentProviderId) => {
1307
+ return this.getSystemContext(sContentProviderId);
1308
+ }));
1309
+ const aResolvedRefs = await Promise.all(aContentProviders.map(function (sContentProviderId, iIndex) {
1310
+ return ushellUtils.promisify(ReferenceResolver.resolveReferences(oMissingReferences[sContentProviderId], aSystemContexts[iIndex]));
1311
+ }));
1312
+
1313
+ var oResult = {
1314
+ matchResults: oInitialMatchResult.matchResults,
1315
+ referencesToInclude: {}
1316
+ };
1317
+ aContentProviders.forEach(function (sContentProviderId, iIndex) {
1318
+ var oResolvedRefs = aResolvedRefs[iIndex];
1319
+ oResult.referencesToInclude[sContentProviderId] = oResolvedRefs;
1320
+ if (Object.keys(oResolvedRefs).length > 0) {
1417
1321
  _StagedLogger.log(function () {
1418
1322
  return {
1419
1323
  logId: iLogId,
1420
1324
  stage: 2,
1421
- prefix: "\u274c", // red X
1422
- line: "Failed to resolve references: " + sError
1325
+ line: "\u2705 resolved references with contentProviderId = \"" + sContentProviderId + "\" to the following values:",
1326
+ prefix: "\u2022", // bullet point
1327
+ lines: Object.keys(oResolvedRefs).map(function (sRefName) {
1328
+ return sRefName + ": '" + oResolvedRefs[sRefName] + "'";
1329
+ })
1423
1330
  };
1424
1331
  });
1425
-
1426
- // don't continue processing, just exit with an empty result set
1427
- oDeferred.resolve([]);
1428
- });
1429
- return oReadyToRematchDeferred.promise();
1430
- }.bind(this))
1431
- .then(function (oInitialMatchWithReferencesResult) {
1432
- // re-match with resolved references
1433
- var oReferences = oInitialMatchWithReferencesResult.referencesToInclude;
1434
-
1435
- if (!oReferences) {
1436
- _StagedLogger.log(function () {
1437
- return {
1438
- logId: iLogId,
1439
- stage: 3,
1440
- line: "rematch was skipped (no references to resolve)",
1441
- prefix: "\u2705" // green checkmark
1442
- };
1443
- });
1444
- // no references, skip re-match
1445
- return new jQuery.Deferred().resolve(oInitialMatchWithReferencesResult).promise();
1446
- }
1447
-
1448
- // rematch using the set of the already matched inbounds
1449
- var aMatchResults = oInitialMatchWithReferencesResult.matchResults;
1450
- var aMatchingInbounds = aMatchResults.map(function (oMatchResult) {
1451
- return oMatchResult.inbound;
1332
+ }
1452
1333
  });
1453
-
1454
- return _Search.match(oShellHash, aMatchingInbounds, oReferences, fnGetContentProviderLookup, 0 /* iDebugLevel */).then(function (oFinalMatchResult) {
1455
- _StagedLogger.log(function () {
1456
- var aMatchResults = oFinalMatchResult.matchResults || [];
1457
- if (aMatchResults.length >= 1) {
1458
- return {
1459
- logId: iLogId,
1460
- stage: 3,
1461
- line: "The following inbounds re-matched:",
1462
- lines: aMatchResults.map(function (oMatchResult) {
1463
- return _Formatter.formatInbound(oMatchResult.inbound);
1464
- }),
1465
- prefix: "\u2705" // green checkmark
1466
- };
1467
- }
1468
-
1469
- return {
1470
- logId: iLogId,
1471
- stage: 3,
1472
- line: "No inbounds re-matched",
1473
- prefix: "-"
1474
- };
1475
- });
1476
-
1477
- return oFinalMatchResult;
1334
+ oInitialMatchWithReferencesResult = oResult;
1335
+ } catch (sError) {
1336
+ _StagedLogger.log(function () {
1337
+ return {
1338
+ logId: iLogId,
1339
+ stage: 2,
1340
+ prefix: "\u274c", // red X
1341
+ line: "Failed to resolve references: " + sError
1342
+ };
1478
1343
  });
1479
- })
1480
- .then(function (oFinalMatchResult) {
1481
- // sorting
1482
-
1483
- var aMatchResultsToSort = oFinalMatchResult.matchResults || [];
1484
- if (aMatchResultsToSort.length <= 1) {
1485
- _StagedLogger.log(function () {
1486
- return {
1487
- logId: iLogId,
1488
- stage: 4,
1489
- line: "Nothing to sort"
1490
- };
1491
- });
1492
1344
 
1493
- oDeferred.resolve(aMatchResultsToSort);
1494
- return;
1495
- }
1345
+ // don't continue processing, just exit with an empty result set
1346
+ endLogger();
1347
+ return [];
1348
+ }
1349
+ } else { // no references to resolve
1350
+ _StagedLogger.log(function () {
1351
+ return {
1352
+ logId: iLogId,
1353
+ stage: 2,
1354
+ prefix: "\u2705", // green checkmark
1355
+ line: "No need to resolve references"
1356
+ };
1357
+ });
1496
1358
 
1497
- var aSortedMatchResults = _Search.sortMatchingResultsDeterministic(oFinalMatchResult.matchResults || []);
1359
+ oInitialMatchWithReferencesResult = {
1360
+ matchResults: oInitialMatchResult.matchResults,
1361
+ referencesToInclude: null
1362
+ };
1363
+ }
1498
1364
 
1499
- _StagedLogger.log(function () {
1500
- var aLines = aSortedMatchResults.map(function (oMatchResult) {
1501
- return _Formatter.formatInbound(oMatchResult.inbound || {}) +
1502
- (oMatchResult.matchesVirtualInbound ? " (virtual)" : "")
1503
- + "\n[ Sort Criteria ] "
1504
- + "\n * 1 * sap-priority: '" + oMatchResult["sap-priority"] + "'"
1505
- + "\n * 2 * Sort string: '" + oMatchResult.priorityString
1506
- + "\n * 3 * Deterministic blob: '" + _Search.serializeMatchingResult(oMatchResult) + "'";
1507
- });
1365
+ // ========================= Stage 3 ================================
1366
+ // re-match with resolved references
1367
+ let oFinalMatchResult;
1368
+ if (oInitialMatchWithReferencesResult.referencesToInclude) {
1369
+ // rematch using the set of the already matched inbounds
1370
+ var aMatchResults = oInitialMatchWithReferencesResult.matchResults;
1371
+ var aMatchingInbounds = aMatchResults.map(function (oMatchResult) {
1372
+ return oMatchResult.inbound;
1373
+ });
1508
1374
 
1375
+ oFinalMatchResult = await _Search.match(oShellHash, aMatchingInbounds, oInitialMatchWithReferencesResult.referencesToInclude, fnGetContentProviderLookup, 0 /* iDebugLevel */);
1376
+ _StagedLogger.log(function () {
1377
+ var aMatchResults = oFinalMatchResult.matchResults || [];
1378
+ if (aMatchResults.length >= 1) {
1509
1379
  return {
1510
1380
  logId: iLogId,
1511
- stage: 4,
1512
- line: "Sorted inbounds as follows:",
1513
- lines: aLines,
1514
- prefix: ".",
1515
- number: true
1381
+ stage: 3,
1382
+ line: "The following inbounds re-matched:",
1383
+ lines: aMatchResults.map(function (oMatchResult) {
1384
+ return _Formatter.formatInbound(oMatchResult.inbound);
1385
+ }),
1386
+ prefix: "\u2705" // green checkmark
1516
1387
  };
1517
- });
1388
+ }
1518
1389
 
1519
- oDeferred.resolve(aSortedMatchResults);
1390
+ return {
1391
+ logId: iLogId,
1392
+ stage: 3,
1393
+ line: "No inbounds re-matched",
1394
+ prefix: "-"
1395
+ };
1396
+ });
1397
+ } else { // no references, skip re-match
1398
+ _StagedLogger.log(function () {
1399
+ return {
1400
+ logId: iLogId,
1401
+ stage: 3,
1402
+ line: "rematch was skipped (no references to resolve)",
1403
+ prefix: "\u2705" // green checkmark
1404
+ };
1520
1405
  });
1406
+ oFinalMatchResult = oInitialMatchWithReferencesResult;
1407
+ }
1521
1408
 
1522
- return oDeferred.promise().then(function (aMatchResults) {
1523
- // output logs before returning
1524
- _StagedLogger.end(function () {
1525
- return { logId: iLogId };
1409
+ // ========================= Stage 4 ================================
1410
+ // sorting
1411
+ var aMatchResultsToSort = oFinalMatchResult.matchResults || [];
1412
+ if (aMatchResultsToSort.length <= 1) {
1413
+ _StagedLogger.log(function () {
1414
+ return {
1415
+ logId: iLogId,
1416
+ stage: 4,
1417
+ line: "Nothing to sort"
1418
+ };
1526
1419
  });
1527
- return aMatchResults;
1420
+
1421
+ endLogger();
1422
+ return aMatchResultsToSort;
1423
+ }
1424
+
1425
+ var aSortedMatchResults = _Search.sortMatchingResultsDeterministic(oFinalMatchResult.matchResults || []);
1426
+
1427
+ _StagedLogger.log(function () {
1428
+ var aLines = aSortedMatchResults.map(function (oMatchResult) {
1429
+ return _Formatter.formatInbound(oMatchResult.inbound || {}) +
1430
+ (oMatchResult.matchesVirtualInbound ? " (virtual)" : "")
1431
+ + "\n[ Sort Criteria ] "
1432
+ + "\n * 1 * sap-priority: '" + oMatchResult["sap-priority"] + "'"
1433
+ + "\n * 2 * Sort string: '" + oMatchResult.priorityString
1434
+ + "\n * 3 * Deterministic blob: '" + _Search.serializeMatchingResult(oMatchResult) + "'";
1435
+ });
1436
+
1437
+ return {
1438
+ logId: iLogId,
1439
+ stage: 4,
1440
+ line: "Sorted inbounds as follows:",
1441
+ lines: aLines,
1442
+ prefix: ".",
1443
+ number: true
1444
+ };
1528
1445
  });
1446
+
1447
+
1448
+ endLogger();
1449
+ return aSortedMatchResults;
1529
1450
  };
1530
1451
 
1531
1452
  /**
@@ -1533,34 +1454,26 @@ sap.ui.define([
1533
1454
  *
1534
1455
  * @param {string} sIntent The intent to be matched.
1535
1456
  * @param {object} oInboundIndex The index of the inbounds to be matched.
1536
- * @returns {jQuery.Promise} Resolves with a boolean if the intent is supported and rejected if not.
1457
+ * @returns {Promise<boolean>} Resolves with a boolean if the intent is supported and rejected if not.
1537
1458
  * The promise resolves to true if only one target matches the intent, and false if multiple targets match the intent.
1538
1459
  * @private
1539
1460
  * @since 1.32.0
1540
1461
  */
1541
- ClientSideTargetResolution.prototype._isIntentSupportedOne = function (sIntent, oInboundIndex) {
1542
- var oDeferred = new jQuery.Deferred();
1462
+ ClientSideTargetResolution.prototype._isIntentSupportedOne = async function (sIntent, oInboundIndex) {
1543
1463
  var oShellHash = UrlParsing.parseShellHash(sIntent);
1544
1464
  // navigation to '#' is always considered possible
1545
1465
  if (sIntent === "#") {
1546
- oDeferred.resolve(true);
1547
- return oDeferred.promise();
1466
+ return true;
1548
1467
  }
1549
1468
  if (oShellHash === undefined) {
1550
- return oDeferred.reject("Could not parse shell hash '" + sIntent + "'").promise();
1469
+ throw new Error(`Could not parse shell hash '${sIntent}'`);
1551
1470
  }
1552
1471
 
1553
- oShellHash.formFactor = UshellUtils.getFormFactor();
1472
+ oShellHash.formFactor = ushellUtils.getFormFactor();
1554
1473
 
1555
- this._getMatchingInbounds(oShellHash, oInboundIndex, { bExcludeTileInbounds: true })
1556
- .done(function (aTargets) {
1557
- oDeferred.resolve(aTargets.length > 0);
1558
- })
1559
- .fail(function () {
1560
- oDeferred.reject();
1561
- });
1474
+ const aTargets = await this._getMatchingInbounds(oShellHash, oInboundIndex, { bExcludeTileInbounds: true });
1562
1475
 
1563
- return oDeferred.promise();
1476
+ return aTargets.length > 0;
1564
1477
  };
1565
1478
 
1566
1479
  /**
@@ -1581,62 +1494,37 @@ sap.ui.define([
1581
1494
  * @since 1.32.0
1582
1495
  */
1583
1496
  ClientSideTargetResolution.prototype.isIntentSupported = function (aIntents) {
1584
- var that = this;
1585
1497
  var oDeferred = new jQuery.Deferred();
1586
1498
 
1587
- this._oInboundProvider.getInbounds().then(
1588
- function (oInboundIndex) {
1589
- that._isIntentSupported(aIntents, oInboundIndex)
1590
- .done(oDeferred.resolve.bind(oDeferred))
1591
- .fail(oDeferred.reject.bind(oDeferred));
1592
- },
1593
- function () {
1594
- oDeferred.reject.apply(oDeferred, arguments);
1595
- }
1596
- );
1499
+ this._oInboundProvider.getInbounds()
1500
+ .then((oInboundIndex) => {
1501
+ return this._isIntentSupported(aIntents, oInboundIndex);
1502
+ })
1503
+ .then((oSupportedByIntent) => {
1504
+ oDeferred.resolve(oSupportedByIntent);
1505
+ })
1506
+ .catch((oError) => {
1507
+ oDeferred.reject(oError);
1508
+ });
1509
+
1597
1510
  return oDeferred.promise();
1598
1511
  };
1599
1512
 
1600
- ClientSideTargetResolution.prototype._isIntentSupported = function (aIntents, oInboundIndex) {
1601
- var that = this;
1602
- var oDeferred = new jQuery.Deferred();
1603
- var mSupportedByIntent = {};
1604
-
1605
- oDeferred.resolve();
1606
-
1607
- /**
1608
- * Sets the result for the given intent as indicated.
1609
- *
1610
- * @param {string} sIntent Intent string
1611
- * @param {boolean} bSupported Supported flag
1612
- */
1613
- function setResult (sIntent, bSupported) {
1614
- mSupportedByIntent[sIntent] = {
1615
- supported: bSupported
1616
- };
1617
- }
1618
-
1619
- var aRejectErrors = [];
1620
-
1621
- aIntents.forEach(function (sIntent) {
1622
- var oNextPromise = that._isIntentSupportedOne(sIntent, oInboundIndex);
1623
- oNextPromise.fail(function (sErrorMessage) {
1624
- aRejectErrors.push(sErrorMessage);
1625
- });
1626
- oNextPromise.done(function (bResult) {
1627
- setResult(sIntent, bResult);
1628
- });
1629
- oDeferred = jQuery.when(oDeferred, oNextPromise);
1630
- });
1631
-
1632
- var oRes = new jQuery.Deferred();
1633
- oDeferred.done(function () {
1634
- oRes.resolve(mSupportedByIntent);
1635
- }).fail(function () {
1636
- oRes.reject("One or more input intents contain errors: " + aRejectErrors.join(", "));
1637
- });
1513
+ ClientSideTargetResolution.prototype._isIntentSupported = async function (aIntents, oInboundIndex) {
1514
+ var oSupportedByIntent = {};
1515
+
1516
+ await Promise.all(aIntents.map(async (sIntent) => {
1517
+ try {
1518
+ const bSupported = await this._isIntentSupportedOne(sIntent, oInboundIndex);
1519
+ oSupportedByIntent[sIntent] = {
1520
+ supported: bSupported
1521
+ };
1522
+ } catch (oError) {
1523
+ throw new Error(`One or more input intents contain errors: ${oError}`);
1524
+ }
1525
+ }));
1638
1526
 
1639
- return oRes.promise();
1527
+ return oSupportedByIntent;
1640
1528
  };
1641
1529
 
1642
1530
  /**
@@ -1664,26 +1552,19 @@ sap.ui.define([
1664
1552
  */
1665
1553
  ClientSideTargetResolution.prototype.getUserDefaultParameterNames = function (oSystemContext) {
1666
1554
  // the empty objects may in future bear information like sap-system relevance
1667
- var that = this;
1668
1555
  var oDeferred = new jQuery.Deferred();
1669
1556
 
1670
- this._oInboundProvider.getInbounds().then(
1557
+ this._oInboundProvider.getInbounds()
1558
+ .then((oInboundIndex) => {
1559
+ return this._getUserDefaultParameterNames(oInboundIndex.getAllInbounds(), oSystemContext);
1560
+ })
1561
+ .then((oRefs) => {
1562
+ oDeferred.resolve(oRefs);
1563
+ })
1564
+ .catch((oError) => {
1565
+ oDeferred.reject(oError);
1566
+ });
1671
1567
 
1672
- function (oInboundIndex) {
1673
- that._getUserDefaultParameterNames(oInboundIndex.getAllInbounds(), oSystemContext)
1674
- .then(
1675
- function (oRef) {
1676
- oDeferred.resolve(oRef);
1677
- },
1678
- function (e) {
1679
- oDeferred.reject("Cannot get user default parameters from inbounds: " + e);
1680
- }
1681
- );
1682
- },
1683
- function () {
1684
- oDeferred.reject.apply(oDeferred, arguments);
1685
- }
1686
- );
1687
1568
  return oDeferred.promise();
1688
1569
  };
1689
1570
 
@@ -1779,8 +1660,8 @@ sap.ui.define([
1779
1660
  if (this._oHaveEasyAccessSystemsDeferreds[sMenuType]) {
1780
1661
  return this._oHaveEasyAccessSystemsDeferreds[sMenuType].promise();
1781
1662
  }
1782
- this._oHaveEasyAccessSystemsDeferreds[sMenuType] = new jQuery.Deferred();
1783
- var oDeferred = this._oHaveEasyAccessSystemsDeferreds[sMenuType]; // shorter name
1663
+ var oDeferred = new jQuery.Deferred();
1664
+ this._oHaveEasyAccessSystemsDeferreds[sMenuType] = oDeferred;
1784
1665
 
1785
1666
  function isValidEasyAccessMenuInbound (oInbound, sCurrentFormFactor, oValidMenuTypeIntents) {
1786
1667
  if (!oInbound) {
@@ -1817,62 +1698,62 @@ sap.ui.define([
1817
1698
  }, {})
1818
1699
  };
1819
1700
 
1820
- this._oInboundProvider.getInbounds().then(
1821
- function (oInboundIndex) { // all inbounds, no segments
1701
+ this._oInboundProvider.getInbounds()
1702
+ .then((oInboundIndex) => { // all inbounds, no segments
1822
1703
  var oLastPriorityPerSystem = {};
1823
1704
 
1824
- oInboundIndex.getAllInbounds().filter(function (oInbound) {
1825
- return isValidEasyAccessMenuInbound(
1826
- oInbound, UshellUtils.getFormFactor(), oValidMenuTypeIntents
1827
- );
1828
- }).forEach(function (oEasyAccessInbound) {
1829
- // extract the data for the easy access system list
1830
- var sSystemAliasName;
1831
- if (fnIsPlainObject(oEasyAccessInbound.signature.parameters["sap-system"]) &&
1832
- oEasyAccessInbound.signature.parameters["sap-system"].hasOwnProperty("filter")) {
1833
- sSystemAliasName = ObjectPath.get("signature.parameters.sap-system.filter.value", oEasyAccessInbound);
1834
- }
1835
-
1836
- if (typeof sSystemAliasName === "string") {
1837
- /*
1838
- * Code below builds the set of easy access system that should be displayed in the sapMenu/userMenu.
1839
- * In case multiple inbounds exist with a certain system,
1840
- * the app type with the highest priority is used to choose the title (see oActionDefinitions above).
1841
- * Note that other app types should still appear in the result set (see 'appType' in the example result from jsdoc).
1842
- */
1843
- var iCurrentActionPriority = oActionDefinitions[oEasyAccessInbound.action].priority;
1844
- var sCurrentActionAppType = oActionDefinitions[oEasyAccessInbound.action].appType;
1845
-
1846
- if (!oResultEasyAccessSystemSet[sSystemAliasName]) {
1847
- // provide base structure...
1848
- oLastPriorityPerSystem[sSystemAliasName] = -1;
1849
- oResultEasyAccessSystemSet[sSystemAliasName] = {
1850
- appType: {}
1851
- };
1705
+ oInboundIndex.getAllInbounds()
1706
+ .filter(function (oInbound) {
1707
+ return isValidEasyAccessMenuInbound(oInbound, ushellUtils.getFormFactor(), oValidMenuTypeIntents);
1708
+ })
1709
+ .forEach(function (oEasyAccessInbound) {
1710
+ // extract the data for the easy access system list
1711
+ var sSystemAliasName;
1712
+ if (fnIsPlainObject(oEasyAccessInbound.signature.parameters["sap-system"]) &&
1713
+ oEasyAccessInbound.signature.parameters["sap-system"].hasOwnProperty("filter")) {
1714
+ sSystemAliasName = ObjectPath.get("signature.parameters.sap-system.filter.value", oEasyAccessInbound);
1852
1715
  }
1853
1716
 
1854
- if (oLastPriorityPerSystem[sSystemAliasName] < iCurrentActionPriority) {
1855
- // ...then populate in case
1856
- oResultEasyAccessSystemSet[sSystemAliasName].text = oEasyAccessInbound.title;
1857
- oLastPriorityPerSystem[sSystemAliasName] = iCurrentActionPriority;
1858
- }
1717
+ if (typeof sSystemAliasName === "string") {
1718
+ /*
1719
+ * Code below builds the set of easy access system that should be displayed in the sapMenu/userMenu.
1720
+ * In case multiple inbounds exist with a certain system,
1721
+ * the app type with the highest priority is used to choose the title (see oActionDefinitions above).
1722
+ * Note that other app types should still appear in the result set (see 'appType' in the example result from jsdoc).
1723
+ */
1724
+ var iCurrentActionPriority = oActionDefinitions[oEasyAccessInbound.action].priority;
1725
+ var sCurrentActionAppType = oActionDefinitions[oEasyAccessInbound.action].appType;
1726
+
1727
+ if (!oResultEasyAccessSystemSet[sSystemAliasName]) {
1728
+ // provide base structure...
1729
+ oLastPriorityPerSystem[sSystemAliasName] = -1;
1730
+ oResultEasyAccessSystemSet[sSystemAliasName] = {
1731
+ appType: {}
1732
+ };
1733
+ }
1859
1734
 
1860
- // keep track of all the app types
1861
- oResultEasyAccessSystemSet[sSystemAliasName].appType[sCurrentActionAppType] = true;
1862
- } else {
1863
- Log.warning(
1864
- "Cannot extract sap-system from easy access menu inbound: " + _Formatter.formatInbound(oEasyAccessInbound),
1865
- "This parameter is supposed to be a string. Got '" + sSystemAliasName + "' instead.",
1866
- "sap.ushell.services.ClientSideTargetResolution"
1867
- );
1868
- }
1869
- });
1735
+ if (oLastPriorityPerSystem[sSystemAliasName] < iCurrentActionPriority) {
1736
+ // ...then populate in case
1737
+ oResultEasyAccessSystemSet[sSystemAliasName].text = oEasyAccessInbound.title;
1738
+ oLastPriorityPerSystem[sSystemAliasName] = iCurrentActionPriority;
1739
+ }
1740
+
1741
+ // keep track of all the app types
1742
+ oResultEasyAccessSystemSet[sSystemAliasName].appType[sCurrentActionAppType] = true;
1743
+ } else {
1744
+ Log.warning(
1745
+ "Cannot extract sap-system from easy access menu inbound: " + _Formatter.formatInbound(oEasyAccessInbound),
1746
+ "This parameter is supposed to be a string. Got '" + sSystemAliasName + "' instead.",
1747
+ "sap.ushell.services.ClientSideTargetResolution"
1748
+ );
1749
+ }
1750
+ });
1870
1751
  oDeferred.resolve(oResultEasyAccessSystemSet);
1871
- },
1872
- function () {
1873
- oDeferred.reject.apply(oDeferred, arguments);
1874
- }
1875
- );
1752
+ })
1753
+ .catch((oError) => {
1754
+ oDeferred.reject(oError);
1755
+ });
1756
+
1876
1757
  return oDeferred.promise();
1877
1758
  };
1878
1759
 
@@ -1893,20 +1774,14 @@ sap.ui.define([
1893
1774
  * @private
1894
1775
  * @since 1.78.0
1895
1776
  */
1896
- ClientSideTargetResolution.prototype.getSystemContext = function (systemId) {
1777
+ ClientSideTargetResolution.prototype.getSystemContext = async function (systemId) {
1897
1778
  var sSystemId = systemId === undefined ? "" : systemId;
1898
1779
 
1899
- return new Promise(function (resolve, reject) {
1900
- var oSystemContext;
1901
- this._oAdapter.resolveSystemAlias(sSystemId)
1902
- .done(function (oResolvedSystemAlias) {
1903
- oSystemContext = _SystemContext.createSystemContextFromSystemAlias(oResolvedSystemAlias);
1904
- resolve(oSystemContext);
1905
- })
1906
- .fail(function (oError) {
1907
- reject(oError);
1908
- });
1909
- }.bind(this));
1780
+ const oResolvedSystemAlias = await ushellUtils.promisify(this._oAdapter.resolveSystemAlias(sSystemId));
1781
+
1782
+ const oSystemContext = _SystemContext.createSystemContextFromSystemAlias(oResolvedSystemAlias);
1783
+
1784
+ return oSystemContext;
1910
1785
  };
1911
1786
 
1912
1787
  ClientSideTargetResolution.hasNoAdapter = false;