@sapui5/sap.ushell 1.138.1 → 1.139.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (756) 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/ApplicationType/UrlPostProcessing.js +14 -10
  4. package/src/main/js/sap/ushell/ApplicationType/wcfResolution.js +32 -26
  5. package/src/main/js/sap/ushell/Container.js +0 -1
  6. package/src/main/js/sap/ushell/Fiori20Adapter.js +1 -1
  7. package/src/main/js/sap/ushell/Fiori20AdapterTest.js +1 -1
  8. package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
  9. package/src/main/js/sap/ushell/TechnicalParameters.js +1 -1
  10. package/src/main/js/sap/ushell/URLTemplateProcessor/DefinitionParameterSetBuilder.js +1 -1
  11. package/src/main/js/sap/ushell/URLTemplateProcessor/DependencyGraph.js +1 -1
  12. package/src/main/js/sap/ushell/URLTemplateProcessor/Functions.js +1 -1
  13. package/src/main/js/sap/ushell/URLTemplateProcessor/Resolvers.js +1 -1
  14. package/src/main/js/sap/ushell/URLTemplateProcessor/TemplateParameterParser.js +1 -1
  15. package/src/main/js/sap/ushell/URLTemplateProcessor/utils.js +1 -1
  16. package/src/main/js/sap/ushell/URLTemplateProcessor.js +1 -1
  17. package/src/main/js/sap/ushell/Ui5NativeServiceFactory.js +12 -12
  18. package/src/main/js/sap/ushell/Ui5ServiceFactory.js +1 -1
  19. package/src/main/js/sap/ushell/User.js +32 -12
  20. package/src/main/js/sap/ushell/adapters/cdm/ClientSideTargetResolutionAdapter.js +1 -1
  21. package/src/main/js/sap/ushell/adapters/cdm/CommonDataModelAdapter.js +1 -1
  22. package/src/main/js/sap/ushell/adapters/cdm/ConfigurationDefaultsAdapter.js +1 -1
  23. package/src/main/js/sap/ushell/adapters/cdm/ContainerAdapter.js +1 -1
  24. package/src/main/js/sap/ushell/adapters/cdm/LaunchPageAdapter.js +1 -1
  25. package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +1 -1
  26. package/src/main/js/sap/ushell/adapters/cdm/PersonalizationAdapter.js +1 -1
  27. package/src/main/js/sap/ushell/adapters/cdm/PersonalizationV2Adapter.js +1 -1
  28. package/src/main/js/sap/ushell/adapters/cdm/Ui5ComponentLoaderAdapter.js +1 -1
  29. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/modifyHome.js +1 -1
  30. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readCatalogs.js +1 -1
  31. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/readHome.js +1 -1
  32. package/src/main/js/sap/ushell/adapters/cdm/_LaunchPage/uri.transform.js +1 -1
  33. package/src/main/js/sap/ushell/adapters/cdm/util/AppForInbound.js +1 -1
  34. package/src/main/js/sap/ushell/adapters/cdm/util/cdmSiteUtils.js +1 -1
  35. package/src/main/js/sap/ushell/adapters/cdm/v3/AdapterBase.js +1 -1
  36. package/src/main/js/sap/ushell/adapters/cdm/v3/FlpLaunchPageAdapter.js +1 -1
  37. package/src/main/js/sap/ushell/adapters/cdm/v3/LaunchPageAdapter.js +1 -1
  38. package/src/main/js/sap/ushell/adapters/cdm/v3/StaticGroupsAdapter.js +1 -1
  39. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readApplications.js +1 -1
  40. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readCatalogs.js +1 -1
  41. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readHome.js +1 -1
  42. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readPages.js +1 -1
  43. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readUtils.js +1 -1
  44. package/src/main/js/sap/ushell/adapters/cdm/v3/_LaunchPage/readVisualizations.js +1 -1
  45. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +1 -1
  46. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionInternalAdapter.js +1 -1
  47. package/src/main/js/sap/ushell/adapters/cep/SearchCEPAdapter.js +1 -1
  48. package/src/main/js/sap/ushell/adapters/cflp/UserDefaultParameterPersistenceAdapter.js +1 -1
  49. package/src/main/js/sap/ushell/adapters/local/AdapterContainer.js +1 -1
  50. package/src/main/js/sap/ushell/adapters/local/AppStateAdapter.js +1 -1
  51. package/src/main/js/sap/ushell/adapters/local/ClientSideTargetResolutionAdapter.js +1 -1
  52. package/src/main/js/sap/ushell/adapters/local/ContainerAdapter.js +1 -1
  53. package/src/main/js/sap/ushell/adapters/local/FlpLaunchPageAdapter.js +1 -1
  54. package/src/main/js/sap/ushell/adapters/local/LaunchPageAdapter.js +1 -1
  55. package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionAdapter.js +1 -1
  56. package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionInternalAdapter.js +1 -1
  57. package/src/main/js/sap/ushell/adapters/local/PageBuildingAdapter.js +1 -1
  58. package/src/main/js/sap/ushell/adapters/local/PagePersistenceAdapter.js +1 -1
  59. package/src/main/js/sap/ushell/adapters/local/PersonalizationAdapter.js +1 -1
  60. package/src/main/js/sap/ushell/adapters/local/PersonalizationV2Adapter.js +1 -1
  61. package/src/main/js/sap/ushell/adapters/local/SearchAdapter.js +1 -1
  62. package/src/main/js/sap/ushell/adapters/local/SearchCEPAdapter.js +1 -1
  63. package/src/main/js/sap/ushell/adapters/local/SupportTicketAdapter.js +1 -1
  64. package/src/main/js/sap/ushell/adapters/local/Ui5ComponentLoaderAdapter.js +1 -1
  65. package/src/main/js/sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js +1 -1
  66. package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +1 -1
  67. package/src/main/js/sap/ushell/appIntegration/AppLifeCycle.js +3 -5
  68. package/src/main/js/sap/ushell/appIntegration/ApplicationContainer.js +14 -1
  69. package/src/main/js/sap/ushell/appIntegration/ApplicationHandle.js +8 -3
  70. package/src/main/js/sap/ushell/appIntegration/IframeApplicationContainer.js +8 -8
  71. package/src/main/js/sap/ushell/appIntegration/PostMessageManager/AppruntimeHandler.js +17 -12
  72. package/src/main/js/sap/ushell/appIntegration/PostMessageManager/ExtensionItems.js +6 -23
  73. package/src/main/js/sap/ushell/appIntegration/PostMessageManager/LifecycleHandler.js +112 -92
  74. package/src/main/js/sap/ushell/appIntegration/PostMessageManager/NWBCHandler.js +15 -7
  75. package/src/main/js/sap/ushell/appIntegration/PostMessageManager/ServiceHandler.js +257 -214
  76. package/src/main/js/sap/ushell/appIntegration/PostMessageManager.js +347 -117
  77. package/src/main/js/sap/ushell/appIntegration/UI5ApplicationContainer.js +1 -0
  78. package/src/main/js/sap/ushell/appIntegration/contracts/EmbeddedUI5Handler.js +15 -19
  79. package/src/main/js/sap/ushell/appIntegration/contracts/StatefulContainerV1Handler.js +15 -14
  80. package/src/main/js/sap/ushell/appIntegration/contracts/StatefulContainerV2Handler.js +38 -40
  81. package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/RendererExtensions.js +1 -1
  82. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppConfiguration.js +1 -1
  83. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppLifeCycle.js +1 -1
  84. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppState.js +1 -8
  85. package/src/main/js/sap/ushell/appRuntime/ui5/services/Bookmark.js +1 -1
  86. package/src/main/js/sap/ushell/appRuntime/ui5/services/BookmarkV2.js +1 -1
  87. package/src/main/js/sap/ushell/appRuntime/ui5/services/CommonDataModel.js +1 -1
  88. package/src/main/js/sap/ushell/appRuntime/ui5/services/Container.js +1 -1
  89. package/src/main/js/sap/ushell/appRuntime/ui5/services/CrossApplicationNavigation.js +1 -1
  90. package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension/Item.js +1 -1
  91. package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension.js +25 -1
  92. package/src/main/js/sap/ushell/appRuntime/ui5/services/FlpLaunchPage.js +1 -1
  93. package/src/main/js/sap/ushell/appRuntime/ui5/services/FrameBoundExtension.js +1 -1
  94. package/src/main/js/sap/ushell/appRuntime/ui5/services/LaunchPage.js +1 -1
  95. package/src/main/js/sap/ushell/appRuntime/ui5/services/MessageBroker.js +1 -1
  96. package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolution.js +1 -1
  97. package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolutionInternal.js +1 -1
  98. package/src/main/js/sap/ushell/appRuntime/ui5/services/Navigation.js +1 -1
  99. package/src/main/js/sap/ushell/appRuntime/ui5/services/ReferenceResolver.js +1 -1
  100. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigation.js +1 -1
  101. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigationInternal.js +1 -1
  102. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellUIService.js +1 -1
  103. package/src/main/js/sap/ushell/appRuntime/ui5/services/UserInfo.js +1 -1
  104. package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
  105. package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/StepConfiguration.json +0 -2
  106. package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/logger.js +1 -1
  107. package/src/main/js/sap/ushell/bootstrap/SchedulingAgent/state.js +1 -1
  108. package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +1 -1
  109. package/src/main/js/sap/ushell/bootstrap/common/common.create.configcontract.core.js +4 -0
  110. package/src/main/js/sap/ushell/bootstrap/sandbox2.js +1 -1
  111. package/src/main/js/sap/ushell/components/CatalogsManager.js +157 -157
  112. package/src/main/js/sap/ushell/components/ComponentKeysHandler.js +180 -187
  113. package/src/main/js/sap/ushell/components/DestroyHelper.js +4 -4
  114. package/src/main/js/sap/ushell/components/GroupsHelper.js +21 -21
  115. package/src/main/js/sap/ushell/components/HomepageManager.js +465 -424
  116. package/src/main/js/sap/ushell/components/MessagingHelper.js +24 -24
  117. package/src/main/js/sap/ushell/components/SharedComponentUtils.js +16 -16
  118. package/src/main/js/sap/ushell/components/_HomepageManager/DashboardLoadingManager.js +43 -43
  119. package/src/main/js/sap/ushell/components/_HomepageManager/PagingManager.js +43 -39
  120. package/src/main/js/sap/ushell/components/_HomepageManager/PersistentPageOperationAdapter.js +166 -175
  121. package/src/main/js/sap/ushell/components/_HomepageManager/TransientPageOperationAdapter.js +57 -57
  122. package/src/main/js/sap/ushell/components/appfinder/AppFinder.controller.js +96 -99
  123. package/src/main/js/sap/ushell/components/appfinder/AppFinderView.js +27 -21
  124. package/src/main/js/sap/ushell/components/appfinder/Catalog.controller.js +180 -178
  125. package/src/main/js/sap/ushell/components/appfinder/CatalogView.js +56 -56
  126. package/src/main/js/sap/ushell/components/appfinder/Component.js +12 -16
  127. package/src/main/js/sap/ushell/components/appfinder/EasyAccess.controller.js +129 -133
  128. package/src/main/js/sap/ushell/components/appfinder/EasyAccessView.js +10 -10
  129. package/src/main/js/sap/ushell/components/appfinder/GroupListPopover.controller.js +22 -22
  130. package/src/main/js/sap/ushell/components/appfinder/GroupListPopoverView.js +14 -14
  131. package/src/main/js/sap/ushell/components/appfinder/HierarchyApps.controller.js +75 -78
  132. package/src/main/js/sap/ushell/components/appfinder/HierarchyAppsView.js +24 -27
  133. package/src/main/js/sap/ushell/components/appfinder/HierarchyFolders.controller.js +44 -46
  134. package/src/main/js/sap/ushell/components/appfinder/HierarchyFoldersView.js +22 -22
  135. package/src/main/js/sap/ushell/components/appfinder/VisualizationOrganizerHelper.js +28 -28
  136. package/src/main/js/sap/ushell/components/appfinder/manifest.json +1 -1
  137. package/src/main/js/sap/ushell/components/cards/Card.controller.js +16 -20
  138. package/src/main/js/sap/ushell/components/cards/Configuration.controller.js +35 -37
  139. package/src/main/js/sap/ushell/components/cards/ManifestPropertyHelper.js +32 -34
  140. package/src/main/js/sap/ushell/components/cepsearchresult/app/Main.controller.js +7 -12
  141. package/src/main/js/sap/ushell/components/cepsearchresult/app/Main.view.xml +2 -9
  142. package/src/main/js/sap/ushell/components/cepsearchresult/app/cards/searchresultwidget/Extension.js +0 -1
  143. package/src/main/js/sap/ushell/components/cepsearchresult/app/css/style.css +58 -0
  144. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/AdvancedFormatters.js +0 -1
  145. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/Edition.js +0 -1
  146. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/EditionAdvanced.js +0 -1
  147. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/appendStyleVars.js +0 -1
  148. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/Category.js +13 -13
  149. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/Highlighter.js +2 -5
  150. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/Paginator.js +0 -2
  151. package/src/main/js/sap/ushell/components/cepsearchresult/app/util/controls/categories/Event.js +4 -3
  152. package/src/main/js/sap/ushell/components/contentFinder/CatalogService.js +8 -9
  153. package/src/main/js/sap/ushell/components/contentFinder/Component.js +2 -2
  154. package/src/main/js/sap/ushell/components/contentFinder/controller/AppSearch.controller.js +1 -3
  155. package/src/main/js/sap/ushell/components/contentFinder/controller/ContentFinderDialog.controller.js +1 -1
  156. package/src/main/js/sap/ushell/components/contentFinder/dialog/Component.js +2 -2
  157. package/src/main/js/sap/ushell/components/contentFinder/dialog/manifest.json +1 -1
  158. package/src/main/js/sap/ushell/components/contentFinder/manifest.json +1 -1
  159. package/src/main/js/sap/ushell/components/contentFinder/model/GraphQLListBinding.js +3 -5
  160. package/src/main/js/sap/ushell/components/contentFinder/model/GraphQLModel.js +2 -2
  161. package/src/main/js/sap/ushell/components/contentFinder/model/formatter.js +13 -6
  162. package/src/main/js/sap/ushell/components/contentFinder/resources/resources.properties +3 -3
  163. package/src/main/js/sap/ushell/components/contentFinder/resources/resources_en_US_saprigi.properties +1 -1
  164. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearch.view.xml +2 -14
  165. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchCategoryTreeTable.fragment.xml +14 -7
  166. package/src/main/js/sap/ushell/components/contentFinder/view/VisualizationsNoDataIllustratedMessage.fragment.xml +1 -1
  167. package/src/main/js/sap/ushell/components/contentFinderStandalone/Component.js +2 -2
  168. package/src/main/js/sap/ushell/components/contentFinderStandalone/controller/ContentFinderStandalone.controller.js +2 -4
  169. package/src/main/js/sap/ushell/components/contentFinderStandalone/manifest.json +1 -1
  170. package/src/main/js/sap/ushell/components/factsheet/Component.js +13 -8
  171. package/src/main/js/sap/ushell/components/factsheet/annotation/Mapping.js +166 -118
  172. package/src/main/js/sap/ushell/components/factsheet/controls/PictureTile.js +20 -16
  173. package/src/main/js/sap/ushell/components/factsheet/controls/PictureTileRenderer.js +3 -3
  174. package/src/main/js/sap/ushell/components/factsheet/controls/PictureViewer.js +84 -77
  175. package/src/main/js/sap/ushell/components/factsheet/controls/PictureViewerItem.js +4 -4
  176. package/src/main/js/sap/ushell/components/factsheet/controls/PictureViewerRenderer.js +2 -2
  177. package/src/main/js/sap/ushell/components/factsheet/factory/ThingInspector.js +1356 -1139
  178. package/src/main/js/sap/ushell/components/factsheet/tools/ODataUrlTemplating.js +9 -5
  179. package/src/main/js/sap/ushell/components/factsheet/views/ThingViewer.controller.js +1 -1
  180. package/src/main/js/sap/ushell/components/factsheet/views/ThingViewer.view.js +9 -6
  181. package/src/main/js/sap/ushell/components/homeApp/error/Component.js +1 -1
  182. package/src/main/js/sap/ushell/components/homeApp/error/HomeAppError.controller.js +4 -4
  183. package/src/main/js/sap/ushell/components/homepage/ActionMode.js +51 -48
  184. package/src/main/js/sap/ushell/components/homepage/Component.js +11 -11
  185. package/src/main/js/sap/ushell/components/homepage/DashboardContent.controller.js +185 -192
  186. package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +60 -50
  187. package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +199 -202
  188. package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +152 -160
  189. package/src/main/js/sap/ushell/components/homepage/manifest.json +1 -1
  190. package/src/main/js/sap/ushell/components/pages/ActionMode.js +72 -74
  191. package/src/main/js/sap/ushell/components/pages/Component.js +7 -32
  192. package/src/main/js/sap/ushell/components/pages/MyHomeImport.js +46 -46
  193. package/src/main/js/sap/ushell/components/pages/StateManager.js +9 -10
  194. package/src/main/js/sap/ushell/components/pages/controller/MyHome.controller.js +4 -4
  195. package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +243 -215
  196. package/src/main/js/sap/ushell/components/pages/controller/PagesAndSpaceId.js +23 -24
  197. package/src/main/js/sap/ushell/components/pages/manifest.json +1 -1
  198. package/src/main/js/sap/ushell/components/runtimeSwitcher/Component.js +1 -1
  199. package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +60 -70
  200. package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -1
  201. package/src/main/js/sap/ushell/components/shell/FloatingContainer/Component.js +0 -5
  202. package/src/main/js/sap/ushell/components/shell/FloatingContainer/controls/FloatingContainer.js +3 -3
  203. package/src/main/js/sap/ushell/components/shell/FloatingContainer/manifest.json +1 -1
  204. package/src/main/js/sap/ushell/components/shell/MenuBar/Component.js +18 -50
  205. package/src/main/js/sap/ushell/components/shell/MenuBar/controller/MenuBar.controller.js +73 -83
  206. package/src/main/js/sap/ushell/components/shell/MenuBar/manifest.json +1 -1
  207. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/Component.js +1 -1
  208. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +49 -50
  209. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenuButton.controller.js +5 -5
  210. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +1 -1
  211. package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +35 -33
  212. package/src/main/js/sap/ushell/components/shell/Notifications/Notifications.controller.js +8 -9
  213. package/src/main/js/sap/ushell/components/shell/Notifications/NotificationsList.controller.js +5 -11
  214. package/src/main/js/sap/ushell/components/shell/PostLoadingHeaderEnhancement/Component.js +63 -42
  215. package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +20 -22
  216. package/src/main/js/sap/ushell/components/shell/Search/Component.js +20 -12
  217. package/src/main/js/sap/ushell/components/shell/Search/ESearch.js +18 -21
  218. package/src/main/js/sap/ushell/components/shell/Search/manifest.json +1 -1
  219. package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +21 -14
  220. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchCEP.controller.js +204 -250
  221. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/FrequentActivityProvider.js +25 -24
  222. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/RecentSearchProvider.js +9 -9
  223. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchProvider.js +4 -4
  224. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchServiceProvider.js +63 -65
  225. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/Component.js +420 -0
  226. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/FrequentActivityProvider.js +84 -0
  227. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/RecentSearchProvider.js +63 -0
  228. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/SearchProvider.js +141 -0
  229. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/SearchProviders/SearchServiceProvider.js +177 -0
  230. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/manifest.json +43 -0
  231. package/src/main/js/sap/ushell/components/shell/SearchCEPNew/resources/resources.properties +17 -0
  232. package/src/main/js/sap/ushell/components/shell/Settings/Component.js +50 -35
  233. package/src/main/js/sap/ushell/components/shell/Settings/ErrorMessageHelper.js +10 -10
  234. package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.controller.js +150 -150
  235. package/src/main/js/sap/ushell/components/shell/Settings/appearance/Appearance.controller.js +66 -63
  236. package/src/main/js/sap/ushell/components/shell/Settings/appearance/AppearanceEntry.js +12 -15
  237. package/src/main/js/sap/ushell/components/shell/Settings/homepage/HomepageEntry.js +34 -37
  238. package/src/main/js/sap/ushell/components/shell/Settings/notifications/NotificationsEntry.js +6 -7
  239. package/src/main/js/sap/ushell/components/shell/Settings/notifications/NotificationsSetting.controller.js +46 -48
  240. package/src/main/js/sap/ushell/components/shell/Settings/search/Search.controller.js +4 -4
  241. package/src/main/js/sap/ushell/components/shell/Settings/search/SearchEntry.js +13 -13
  242. package/src/main/js/sap/ushell/components/shell/Settings/spaces/SpacesEntry.js +11 -13
  243. package/src/main/js/sap/ushell/components/shell/Settings/spaces/SpacesSetting.controller.js +41 -42
  244. package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountEntry.js +11 -15
  245. package/src/main/js/sap/ushell/components/shell/Settings/userAccount/UserAccountSelector.controller.js +35 -37
  246. package/src/main/js/sap/ushell/components/shell/Settings/userActivities/UserActivitiesEntry.js +6 -7
  247. package/src/main/js/sap/ushell/components/shell/Settings/userActivities/UserActivitiesSetting.controller.js +7 -8
  248. package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/Component.js +2 -2
  249. package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/UserDefaultsEntry.js +16 -16
  250. package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/UserDefaultsForm.js +17 -17
  251. package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/controller/ExtendedValueDialog.controller.js +21 -24
  252. package/src/main/js/sap/ushell/components/shell/Settings/userDefaults/controller/UserDefaultsSetting.controller.js +136 -137
  253. package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/LanguageRegionSelector.controller.js +73 -78
  254. package/src/main/js/sap/ushell/components/shell/Settings/userLanguageRegion/UserLanguageRegionEntry.js +8 -8
  255. package/src/main/js/sap/ushell/components/shell/ShellBar/Component.js +30 -23
  256. package/src/main/js/sap/ushell/components/shell/ShellBar/controller/ShellBar.controller.js +34 -22
  257. package/src/main/js/sap/ushell/components/shell/ShellBar/manifest.json +1 -1
  258. package/src/main/js/sap/ushell/components/shell/ShellBar/view/ShellBar.view.xml +21 -9
  259. package/src/main/js/sap/ushell/components/shell/SideNavigation/Component.js +7 -11
  260. package/src/main/js/sap/ushell/components/shell/SideNavigation/controller/SideNavigation.controller.js +3 -3
  261. package/src/main/js/sap/ushell/components/shell/SideNavigation/manifest.json +1 -1
  262. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/AllSpaces.js +3 -4
  263. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/AppFinder.js +2 -2
  264. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/Favorites.js +8 -3
  265. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/GenericFixedNavigationListProvider.js +2 -2
  266. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/GenericNavigationListProvider.js +2 -2
  267. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/MyHome.js +2 -2
  268. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/NavigationHelper.js +4 -4
  269. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/RecentActivity.js +4 -4
  270. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/Spaces.js +5 -6
  271. package/src/main/js/sap/ushell/components/shell/SideNavigation/modules/SpacesNavigationListProvider.js +2 -3
  272. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/Component.js +3 -4
  273. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/UserActionsMenu.controller.js +47 -48
  274. package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +27 -30
  275. package/src/main/js/sap/ushell/components/tiles/action/ActionTile.controller.js +55 -55
  276. package/src/main/js/sap/ushell/components/tiles/action/Configuration.controller.js +39 -41
  277. package/src/main/js/sap/ushell/components/tiles/applauncher/Component.js +3 -3
  278. package/src/main/js/sap/ushell/components/tiles/applauncher/Configuration.controller.js +26 -27
  279. package/src/main/js/sap/ushell/components/tiles/applauncher/StaticTile.controller.js +66 -66
  280. package/src/main/js/sap/ushell/components/tiles/applauncher/StaticTile.view.js +5 -5
  281. package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/Component.js +2 -2
  282. package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/Configuration.controller.js +27 -27
  283. package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/DynamicTile.controller.js +107 -107
  284. package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/DynamicTile.view.js +7 -7
  285. package/src/main/js/sap/ushell/components/tiles/cdm/applauncher/Component.js +7 -7
  286. package/src/main/js/sap/ushell/components/tiles/cdm/applauncher/StaticTile.controller.js +31 -31
  287. package/src/main/js/sap/ushell/components/tiles/cdm/applauncher/StaticTile.view.js +2 -2
  288. package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/Component.js +15 -15
  289. package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.controller.js +85 -86
  290. package/src/main/js/sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.view.js +4 -4
  291. package/src/main/js/sap/ushell/components/tiles/generic.js +133 -131
  292. package/src/main/js/sap/ushell/components/tiles/indicatorArea/AreaChartTile.controller.js +71 -71
  293. package/src/main/js/sap/ushell/components/tiles/indicatorArea/AreaChartTile.view.js +17 -17
  294. package/src/main/js/sap/ushell/components/tiles/indicatorDual/DualTile.controller.js +49 -49
  295. package/src/main/js/sap/ushell/components/tiles/indicatorDual/DualTile.view.js +9 -9
  296. package/src/main/js/sap/ushell/components/tiles/indicatorDualComparison/DualComparison.controller.js +80 -80
  297. package/src/main/js/sap/ushell/components/tiles/indicatorDualComparison/DualComparison.view.js +3 -3
  298. package/src/main/js/sap/ushell/components/tiles/indicatorDualContribution/DualContribution.controller.js +74 -75
  299. package/src/main/js/sap/ushell/components/tiles/indicatorDualContribution/DualContribution.view.js +3 -3
  300. package/src/main/js/sap/ushell/components/tiles/indicatorDualDeviation/DualDeviation.controller.js +55 -55
  301. package/src/main/js/sap/ushell/components/tiles/indicatorDualDeviation/DualDeviation.view.js +12 -12
  302. package/src/main/js/sap/ushell/components/tiles/indicatorDualTrend/DualTrend.controller.js +83 -84
  303. package/src/main/js/sap/ushell/components/tiles/indicatorDualTrend/DualTrend.view.js +15 -15
  304. package/src/main/js/sap/ushell/components/tiles/indicatorHarveyBall/HarveyBallTile.controller.js +71 -71
  305. package/src/main/js/sap/ushell/components/tiles/indicatorHarveyBall/HarveyBallTile.view.js +7 -7
  306. package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/cache.js +4 -4
  307. package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/indicatorTileHelper.js +4 -4
  308. package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/oData4Analytics.js +230 -232
  309. package/src/main/js/sap/ushell/components/tiles/indicatorTileUtils/smartBusinessUtil.js +271 -272
  310. package/src/main/js/sap/ushell/components/tiles/indicatorcomparison/ComparisonTile.controller.js +55 -55
  311. package/src/main/js/sap/ushell/components/tiles/indicatorcomparison/ComparisonTile.view.js +4 -4
  312. package/src/main/js/sap/ushell/components/tiles/indicatorcontribution/ContributionTile.controller.js +53 -53
  313. package/src/main/js/sap/ushell/components/tiles/indicatorcontribution/ContributionTile.view.js +5 -5
  314. package/src/main/js/sap/ushell/components/tiles/indicatordeviation/DeviationTile.controller.js +20 -20
  315. package/src/main/js/sap/ushell/components/tiles/indicatordeviation/DeviationTile.view.js +11 -11
  316. package/src/main/js/sap/ushell/components/tiles/indicatornumeric/NumericTile.controller.js +14 -15
  317. package/src/main/js/sap/ushell/components/tiles/indicatornumeric/NumericTile.view.js +10 -10
  318. package/src/main/js/sap/ushell/components/tiles/sbtilecontent.js +6 -6
  319. package/src/main/js/sap/ushell/components/tiles/utils.js +699 -664
  320. package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +217 -217
  321. package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +4 -8
  322. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.accessibility.js +40 -42
  323. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.controller.js +257 -262
  324. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.layout.js +19 -20
  325. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +6 -6
  326. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +37 -38
  327. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +97 -100
  328. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +81 -82
  329. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnRenderer.js +9 -9
  330. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +38 -39
  331. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRenderer.js +5 -5
  332. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +8 -9
  333. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRowRenderer.js +9 -9
  334. package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +1 -1
  335. package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +4 -4
  336. package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +15 -15
  337. package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +1 -1
  338. package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
  339. package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/Avatar.js +7 -1
  340. package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/ListItemGroup.js +90 -0
  341. package/src/main/js/sap/ushell/gen/ui5/webcomponents/dist/MenuItem.js +10 -0
  342. package/src/main/js/sap/ushell/gen/ui5/webcomponents-base.js +19 -11
  343. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/Search.js +144 -0
  344. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchItem.js +68 -0
  345. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchItemGroup.js +34 -0
  346. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchMessageArea.js +51 -0
  347. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/SearchScope.js +55 -0
  348. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBar.js +5 -0
  349. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBarBranding.js +76 -0
  350. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori/dist/ShellBarSearch.js +133 -0
  351. package/src/main/js/sap/ushell/gen/ui5/webcomponents-fiori.js +83 -1
  352. package/src/main/js/sap/ushell/gen/ui5/webcomponents.js +80 -2
  353. package/src/main/js/sap/ushell/library.js +1 -1
  354. package/src/main/js/sap/ushell/navigation/NavigationState.js +126 -0
  355. package/src/main/js/sap/ushell/navigationMode.js +1 -1
  356. package/src/main/js/sap/ushell/performance/ShellAnalytics.js +1 -1
  357. package/src/main/js/sap/ushell/performance/StatisticalRecord.js +1 -1
  358. package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
  359. package/src/main/js/sap/ushell/renderer/AccessKeysHandler.js +8 -4
  360. package/src/main/js/sap/ushell/renderer/Renderer.js +19 -7
  361. package/src/main/js/sap/ushell/renderer/Shell.controller.js +11 -5
  362. package/src/main/js/sap/ushell/renderer/Shell.view.js +4 -1
  363. package/src/main/js/sap/ushell/renderer/resources/resources_ar.properties +2 -0
  364. package/src/main/js/sap/ushell/renderer/resources/resources_bg.properties +2 -0
  365. package/src/main/js/sap/ushell/renderer/resources/resources_ca.properties +2 -0
  366. package/src/main/js/sap/ushell/renderer/resources/resources_cnr.properties +2 -0
  367. package/src/main/js/sap/ushell/renderer/resources/resources_cs.properties +2 -0
  368. package/src/main/js/sap/ushell/renderer/resources/resources_cy.properties +2 -0
  369. package/src/main/js/sap/ushell/renderer/resources/resources_da.properties +2 -0
  370. package/src/main/js/sap/ushell/renderer/resources/resources_de.properties +2 -0
  371. package/src/main/js/sap/ushell/renderer/resources/resources_el.properties +2 -0
  372. package/src/main/js/sap/ushell/renderer/resources/resources_en.properties +2 -0
  373. package/src/main/js/sap/ushell/renderer/resources/resources_en_GB.properties +2 -0
  374. package/src/main/js/sap/ushell/renderer/resources/resources_en_US_saprigi.properties +2 -0
  375. package/src/main/js/sap/ushell/renderer/resources/resources_es.properties +2 -0
  376. package/src/main/js/sap/ushell/renderer/resources/resources_es_MX.properties +2 -0
  377. package/src/main/js/sap/ushell/renderer/resources/resources_et.properties +2 -0
  378. package/src/main/js/sap/ushell/renderer/resources/resources_fi.properties +2 -0
  379. package/src/main/js/sap/ushell/renderer/resources/resources_fr.properties +2 -0
  380. package/src/main/js/sap/ushell/renderer/resources/resources_fr_CA.properties +2 -0
  381. package/src/main/js/sap/ushell/renderer/resources/resources_hi.properties +2 -0
  382. package/src/main/js/sap/ushell/renderer/resources/resources_hr.properties +2 -0
  383. package/src/main/js/sap/ushell/renderer/resources/resources_hu.properties +3 -1
  384. package/src/main/js/sap/ushell/renderer/resources/resources_id.properties +2 -0
  385. package/src/main/js/sap/ushell/renderer/resources/resources_it.properties +2 -0
  386. package/src/main/js/sap/ushell/renderer/resources/resources_iw.properties +2 -0
  387. package/src/main/js/sap/ushell/renderer/resources/resources_ja.properties +2 -0
  388. package/src/main/js/sap/ushell/renderer/resources/resources_kk.properties +2 -0
  389. package/src/main/js/sap/ushell/renderer/resources/resources_ko.properties +2 -0
  390. package/src/main/js/sap/ushell/renderer/resources/resources_lt.properties +2 -0
  391. package/src/main/js/sap/ushell/renderer/resources/resources_lv.properties +2 -0
  392. package/src/main/js/sap/ushell/renderer/resources/resources_mk.properties +2 -0
  393. package/src/main/js/sap/ushell/renderer/resources/resources_ms.properties +2 -0
  394. package/src/main/js/sap/ushell/renderer/resources/resources_nl.properties +2 -0
  395. package/src/main/js/sap/ushell/renderer/resources/resources_no.properties +2 -0
  396. package/src/main/js/sap/ushell/renderer/resources/resources_pl.properties +2 -0
  397. package/src/main/js/sap/ushell/renderer/resources/resources_pt.properties +2 -0
  398. package/src/main/js/sap/ushell/renderer/resources/resources_pt_PT.properties +2 -0
  399. package/src/main/js/sap/ushell/renderer/resources/resources_ro.properties +2 -0
  400. package/src/main/js/sap/ushell/renderer/resources/resources_ru.properties +2 -0
  401. package/src/main/js/sap/ushell/renderer/resources/resources_sh.properties +2 -0
  402. package/src/main/js/sap/ushell/renderer/resources/resources_sk.properties +2 -0
  403. package/src/main/js/sap/ushell/renderer/resources/resources_sl.properties +3 -1
  404. package/src/main/js/sap/ushell/renderer/resources/resources_sr.properties +2 -0
  405. package/src/main/js/sap/ushell/renderer/resources/resources_sv.properties +2 -0
  406. package/src/main/js/sap/ushell/renderer/resources/resources_th.properties +2 -0
  407. package/src/main/js/sap/ushell/renderer/resources/resources_tr.properties +2 -0
  408. package/src/main/js/sap/ushell/renderer/resources/resources_uk.properties +2 -0
  409. package/src/main/js/sap/ushell/renderer/resources/resources_vi.properties +3 -1
  410. package/src/main/js/sap/ushell/renderer/resources/resources_zh_CN.properties +2 -0
  411. package/src/main/js/sap/ushell/renderer/resources/resources_zh_TW.properties +2 -0
  412. package/src/main/js/sap/ushell/renderer/search/searchComponent/manifest.json +1 -1
  413. package/src/main/js/sap/ushell/services/AllMyApps.js +5 -5
  414. package/src/main/js/sap/ushell/services/AppConfiguration.js +3 -5
  415. package/src/main/js/sap/ushell/services/AppLifeCycle.js +2 -2
  416. package/src/main/js/sap/ushell/services/AppState.js +86 -102
  417. package/src/main/js/sap/ushell/services/AppType.js +2 -2
  418. package/src/main/js/sap/ushell/services/Bookmark.js +156 -164
  419. package/src/main/js/sap/ushell/services/BookmarkV2.js +10 -13
  420. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/Formatter.js +1 -1
  421. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/InboundIndex.js +1 -1
  422. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/InboundProvider.js +1 -1
  423. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/PrelaunchOperations.js +1 -1
  424. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/Search.js +1 -1
  425. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/StagedLogger.js +1 -1
  426. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/SystemContext.js +1 -1
  427. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/Utils.js +1 -1
  428. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/VirtualInbounds.js +1 -1
  429. package/src/main/js/sap/ushell/services/ClientSideTargetResolution/XAppStateProcessing.js +1 -1
  430. package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +27 -31
  431. package/src/main/js/sap/ushell/services/CommonDataModel/SiteConverter.js +1 -1
  432. package/src/main/js/sap/ushell/services/CommonDataModel/vizTypeDefaults/VizTypeDefaults.js +1 -1
  433. package/src/main/js/sap/ushell/services/CommonDataModel.js +295 -353
  434. package/src/main/js/sap/ushell/services/Configuration.js +14 -12
  435. package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +34 -35
  436. package/src/main/js/sap/ushell/services/Container.js +2 -2
  437. package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +29 -62
  438. package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +227 -266
  439. package/src/main/js/sap/ushell/services/DarkModeSupport.js +17 -16
  440. package/src/main/js/sap/ushell/services/EndUserFeedback.js +5 -4
  441. package/src/main/js/sap/ushell/services/Extension/Item.js +7 -12
  442. package/src/main/js/sap/ushell/services/Extension.js +54 -19
  443. package/src/main/js/sap/ushell/services/FlpLaunchPage.js +209 -213
  444. package/src/main/js/sap/ushell/services/FrameBoundExtension/FloatingContainer.js +3 -3
  445. package/src/main/js/sap/ushell/services/FrameBoundExtension/Footer.js +3 -3
  446. package/src/main/js/sap/ushell/services/FrameBoundExtension/Item.js +6 -6
  447. package/src/main/js/sap/ushell/services/FrameBoundExtension/SidePane.js +1 -1
  448. package/src/main/js/sap/ushell/services/FrameBoundExtension/ToolArea.js +1 -1
  449. package/src/main/js/sap/ushell/services/FrameBoundExtension/UserSettingsEntry.js +4 -4
  450. package/src/main/js/sap/ushell/services/FrameBoundExtension.js +3 -3
  451. package/src/main/js/sap/ushell/services/LaunchPage.js +1 -2
  452. package/src/main/js/sap/ushell/services/Menu.js +264 -289
  453. package/src/main/js/sap/ushell/services/Message.js +3 -3
  454. package/src/main/js/sap/ushell/services/MessageBroker/MessageBrokerEngine.js +6 -29
  455. package/src/main/js/sap/ushell/services/MessageBroker.js +14 -10
  456. package/src/main/js/sap/ushell/services/MessageInternal.js +37 -38
  457. package/src/main/js/sap/ushell/services/NavTargetResolution.js +2 -5
  458. package/src/main/js/sap/ushell/services/NavTargetResolutionInternal.js +153 -157
  459. package/src/main/js/sap/ushell/services/Navigation/compatibility.js +4 -6
  460. package/src/main/js/sap/ushell/services/Navigation/utils.js +62 -64
  461. package/src/main/js/sap/ushell/services/Navigation.js +10 -14
  462. package/src/main/js/sap/ushell/services/NavigationDataProvider.js +2 -2
  463. package/src/main/js/sap/ushell/services/Notifications.js +29 -15
  464. package/src/main/js/sap/ushell/services/NotificationsV2.js +86 -98
  465. package/src/main/js/sap/ushell/services/PageBuilding.js +9 -6
  466. package/src/main/js/sap/ushell/services/PagePersistence.js +3 -3
  467. package/src/main/js/sap/ushell/services/PageReferencing.js +4 -2
  468. package/src/main/js/sap/ushell/services/Pages.js +635 -683
  469. package/src/main/js/sap/ushell/services/Personalization.js +103 -134
  470. package/src/main/js/sap/ushell/services/PersonalizationV2/ContextContainer.js +29 -32
  471. package/src/main/js/sap/ushell/services/PersonalizationV2/Personalizer.js +21 -6
  472. package/src/main/js/sap/ushell/services/PersonalizationV2/TransientPersonalizer.js +1 -2
  473. package/src/main/js/sap/ushell/services/PersonalizationV2/Variant.js +5 -1
  474. package/src/main/js/sap/ushell/services/PersonalizationV2/VariantSet.js +5 -8
  475. package/src/main/js/sap/ushell/services/PersonalizationV2/VariantSetAdapter.js +2 -2
  476. package/src/main/js/sap/ushell/services/PersonalizationV2/WindowAdapter.js +10 -11
  477. package/src/main/js/sap/ushell/services/PersonalizationV2/WindowAdapterContainer.js +27 -27
  478. package/src/main/js/sap/ushell/services/PersonalizationV2/constants.js +1 -2
  479. package/src/main/js/sap/ushell/services/PersonalizationV2/constants.private.js +1 -1
  480. package/src/main/js/sap/ushell/services/PersonalizationV2/utils.js +5 -5
  481. package/src/main/js/sap/ushell/services/PersonalizationV2.js +92 -105
  482. package/src/main/js/sap/ushell/services/PluginManager/Extensions.js +9 -9
  483. package/src/main/js/sap/ushell/services/PluginManager/HeaderExtensions.js +2 -2
  484. package/src/main/js/sap/ushell/services/PluginManager/MenuExtensions.js +4 -4
  485. package/src/main/js/sap/ushell/services/PluginManager/SimpleExpression.js +5 -8
  486. package/src/main/js/sap/ushell/services/PluginManager.js +12 -8
  487. package/src/main/js/sap/ushell/services/ReferenceResolver.js +21 -28
  488. package/src/main/js/sap/ushell/services/Search.js +25 -21
  489. package/src/main/js/sap/ushell/services/SearchCEP.js +38 -32
  490. package/src/main/js/sap/ushell/services/SearchableContent.js +203 -223
  491. package/src/main/js/sap/ushell/services/ShellNavigation.js +5 -3
  492. package/src/main/js/sap/ushell/services/ShellNavigationHashChanger.js +160 -164
  493. package/src/main/js/sap/ushell/services/ShellNavigationInternal.js +23 -19
  494. package/src/main/js/sap/ushell/services/SmartNavigation.js +86 -82
  495. package/src/main/js/sap/ushell/services/SpaceContent.js +73 -106
  496. package/src/main/js/sap/ushell/services/SupportTicket.js +1 -1
  497. package/src/main/js/sap/ushell/services/UITracer.js +48 -62
  498. package/src/main/js/sap/ushell/services/URLShortening.js +2 -2
  499. package/src/main/js/sap/ushell/services/URLTemplate.js +7 -8
  500. package/src/main/js/sap/ushell/services/Ui5ComponentHandle.js +5 -5
  501. package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +1 -1
  502. package/src/main/js/sap/ushell/services/UsageAnalytics.js +2 -3
  503. package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +10 -10
  504. package/src/main/js/sap/ushell/services/UserDefaultParameters.js +12 -13
  505. package/src/main/js/sap/ushell/services/UserInfo.js +27 -15
  506. package/src/main/js/sap/ushell/services/UserRecents/RecentActivity.js +6 -7
  507. package/src/main/js/sap/ushell/services/UserRecents/RecentAppsUsage.js +5 -5
  508. package/src/main/js/sap/ushell/services/UserRecents/RecentsList.js +2 -2
  509. package/src/main/js/sap/ushell/services/UserRecents/UserRecentsBase.js +2 -2
  510. package/src/main/js/sap/ushell/services/UserRecents.js +3 -3
  511. package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +63 -66
  512. package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +11 -11
  513. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/ContentExtensionAdapterConfig.js +1 -1
  514. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/FeaturedGroupConfig.js +1 -1
  515. package/src/main/js/sap/ushell/services/_CrossApplicationNavigation/utils.js +1 -1
  516. package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
  517. package/src/main/js/sap/ushell/services/personalization/VariantSetAdapter.js +10 -10
  518. package/src/main/js/sap/ushell/state/BaseState.js +2 -3
  519. package/src/main/js/sap/ushell/state/BindingHelper.js +2 -4
  520. package/src/main/js/sap/ushell/state/ControlManager.js +2 -3
  521. package/src/main/js/sap/ushell/state/CurrentState.js +2 -2
  522. package/src/main/js/sap/ushell/state/KeepAlive.js +2 -2
  523. package/src/main/js/sap/ushell/state/ShellModel.js +2 -3
  524. package/src/main/js/sap/ushell/state/StateManager/LaunchpadState.js +2 -2
  525. package/src/main/js/sap/ushell/state/StateManager/Operation.js +2 -2
  526. package/src/main/js/sap/ushell/state/StateManager/ShellMode.js +2 -2
  527. package/src/main/js/sap/ushell/state/StateManager.js +3 -3
  528. package/src/main/js/sap/ushell/state/StateRules.js +2 -3
  529. package/src/main/js/sap/ushell/state/StrategyFactory/DefaultStrategy.js +2 -3
  530. package/src/main/js/sap/ushell/state/StrategyFactory/FloatingActionsStrategy.js +2 -3
  531. package/src/main/js/sap/ushell/state/StrategyFactory/FloatingContainerStrategy.js +2 -3
  532. package/src/main/js/sap/ushell/state/StrategyFactory/HeadEndItemsStrategy.js +3 -4
  533. package/src/main/js/sap/ushell/state/StrategyFactory/HeadItemsStrategy.js +3 -4
  534. package/src/main/js/sap/ushell/state/StrategyFactory/SidePaneStrategy.js +2 -3
  535. package/src/main/js/sap/ushell/state/StrategyFactory/SubHeaderStrategy.js +2 -3
  536. package/src/main/js/sap/ushell/state/StrategyFactory/UserActionsStrategy.js +3 -4
  537. package/src/main/js/sap/ushell/state/StrategyFactory.js +2 -3
  538. package/src/main/js/sap/ushell/state/modules/BackNavigation.js +2 -5
  539. package/src/main/js/sap/ushell/state/modules/ContentDensity.js +3 -3
  540. package/src/main/js/sap/ushell/state/modules/Favicon.js +3 -3
  541. package/src/main/js/sap/ushell/state/modules/HeaderLogo.js +3 -3
  542. package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +123 -123
  543. package/src/main/js/sap/ushell/themes/base/ShellBar.less +2 -1
  544. package/src/main/js/sap/ushell/themes/base/ShellHeader.less +1 -1
  545. package/src/main/js/sap/ushell/themes/base/ToolAreaItem.less +1 -0
  546. package/src/main/js/sap/ushell/themes/sap_fiori_3/ShellBar.less +9 -0
  547. package/src/main/js/sap/ushell/themes/sap_fiori_3/ShellHeader.less +6 -0
  548. package/src/main/js/sap/ushell/themes/sap_fiori_3/library.source.less +1 -0
  549. package/src/main/js/sap/ushell/themes/sap_fiori_3_dark/ShellBar.less +9 -0
  550. package/src/main/js/sap/ushell/themes/sap_fiori_3_dark/library.source.less +1 -0
  551. package/src/main/js/sap/ushell/themes/sap_fiori_3_hcb/ShellBar.less +9 -0
  552. package/src/main/js/sap/ushell/themes/sap_fiori_3_hcb/library.source.less +1 -0
  553. package/src/main/js/sap/ushell/themes/sap_fiori_3_hcw/ShellBar.less +9 -0
  554. package/src/main/js/sap/ushell/themes/sap_fiori_3_hcw/library.source.less +1 -0
  555. package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellHeader.less +1 -1
  556. package/src/main/js/sap/ushell/thirdparty/AccessibilityTextsHelper.js +13 -0
  557. package/src/main/js/sap/ushell/thirdparty/Avatar.js +83 -16
  558. package/src/main/js/sap/ushell/thirdparty/BusyIndicator.js +16 -241
  559. package/src/main/js/sap/ushell/thirdparty/Button.js +1 -1
  560. package/src/main/js/sap/ushell/thirdparty/Button2.js +34 -14
  561. package/src/main/js/sap/ushell/thirdparty/Icon.js +11 -11
  562. package/src/main/js/sap/ushell/thirdparty/Icons.js +81 -79
  563. package/src/main/js/sap/ushell/thirdparty/Label.js +4 -4
  564. package/src/main/js/sap/ushell/thirdparty/Link.js +11 -10
  565. package/src/main/js/sap/ushell/thirdparty/List.js +34 -487
  566. package/src/main/js/sap/ushell/thirdparty/ListBoxItemGroupTemplate.js +14 -0
  567. package/src/main/js/sap/ushell/thirdparty/ListItemBase.js +239 -0
  568. package/src/main/js/sap/ushell/thirdparty/ListItemCustom.js +1669 -91
  569. package/src/main/js/sap/ushell/thirdparty/ListItemGroup.js +472 -0
  570. package/src/main/js/sap/ushell/thirdparty/Menu.js +70 -81
  571. package/src/main/js/sap/ushell/thirdparty/MenuItem.js +1 -1
  572. package/src/main/js/sap/ushell/thirdparty/MenuItem2.js +348 -40
  573. package/src/main/js/sap/ushell/thirdparty/NotificationList.js +5 -5
  574. package/src/main/js/sap/ushell/thirdparty/NotificationListGroupItem.js +15 -15
  575. package/src/main/js/sap/ushell/thirdparty/NotificationListItem.js +511 -517
  576. package/src/main/js/sap/ushell/thirdparty/NotificationListItemBase.js +3 -3
  577. package/src/main/js/sap/ushell/thirdparty/ResponsivePopover.js +2264 -0
  578. package/src/main/js/sap/ushell/thirdparty/SearchItem.js +111 -0
  579. package/src/main/js/sap/ushell/thirdparty/SearchItemGroup.js +47 -0
  580. package/src/main/js/sap/ushell/thirdparty/SearchMessageArea.js +49 -0
  581. package/src/main/js/sap/ushell/thirdparty/SearchScope.js +39 -0
  582. package/src/main/js/sap/ushell/thirdparty/ShellBar.js +177 -170
  583. package/src/main/js/sap/ushell/thirdparty/ShellBarBranding.js +119 -0
  584. package/src/main/js/sap/ushell/thirdparty/ShellBarSearch.js +7 -0
  585. package/src/main/js/sap/ushell/thirdparty/ShellBarSearch2.js +3248 -0
  586. package/src/main/js/sap/ushell/thirdparty/Tag.js +15 -14
  587. package/src/main/js/sap/ushell/thirdparty/Text.js +9 -9
  588. package/src/main/js/sap/ushell/thirdparty/Title.js +167 -0
  589. package/src/main/js/sap/ushell/thirdparty/UserMenu.js +55 -54
  590. package/src/main/js/sap/ushell/thirdparty/UserMenuItem.js +5 -5
  591. package/src/main/js/sap/ushell/thirdparty/ValueState.js +7 -0
  592. package/src/main/js/sap/ushell/thirdparty/_dynamics/InputSuggestions.js +444 -0
  593. package/src/main/js/sap/ushell/thirdparty/_dynamics/ListItemStandardExpandableTextTemplate.js +7 -7
  594. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ar2.js +39 -0
  595. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ar3.js +26 -8
  596. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_bg2.js +40 -1
  597. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_bg3.js +26 -8
  598. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ca2.js +41 -2
  599. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ca3.js +27 -9
  600. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cnr2.js +39 -0
  601. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cnr3.js +25 -7
  602. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cs2.js +39 -0
  603. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cs3.js +25 -7
  604. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cy2.js +39 -0
  605. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_cy3.js +26 -8
  606. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_da2.js +39 -0
  607. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_da3.js +25 -7
  608. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_de2.js +39 -0
  609. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_de3.js +26 -8
  610. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_el2.js +39 -0
  611. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_el3.js +25 -7
  612. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en2.js +45 -0
  613. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en3.js +26 -8
  614. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_GB2.js +39 -0
  615. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_GB3.js +26 -8
  616. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_sappsd2.js +39 -0
  617. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_sappsd3.js +26 -8
  618. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saprigi2.js +45 -0
  619. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saprigi3.js +23 -8
  620. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saptrc2.js +39 -0
  621. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_en_US_saptrc3.js +26 -8
  622. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es2.js +42 -3
  623. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es3.js +27 -9
  624. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es_MX2.js +42 -3
  625. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_es_MX3.js +28 -10
  626. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_et2.js +39 -0
  627. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_et3.js +25 -7
  628. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fi2.js +39 -0
  629. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fi3.js +25 -7
  630. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr2.js +39 -0
  631. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr3.js +26 -8
  632. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr_CA2.js +39 -0
  633. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_fr_CA3.js +25 -7
  634. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hi2.js +39 -0
  635. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hi3.js +25 -7
  636. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hr2.js +39 -0
  637. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hr3.js +25 -7
  638. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hu2.js +39 -0
  639. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_hu3.js +25 -7
  640. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_id2.js +39 -0
  641. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_id3.js +26 -8
  642. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_it2.js +43 -4
  643. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_it3.js +29 -11
  644. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_iw2.js +39 -0
  645. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_iw3.js +27 -9
  646. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ja2.js +39 -0
  647. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ja3.js +26 -8
  648. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_kk2.js +39 -0
  649. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_kk3.js +26 -8
  650. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ko2.js +39 -0
  651. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ko3.js +25 -7
  652. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lt2.js +39 -0
  653. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lt3.js +25 -7
  654. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lv2.js +39 -0
  655. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_lv3.js +27 -9
  656. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_mk2.js +40 -1
  657. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_mk3.js +25 -7
  658. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ms2.js +40 -1
  659. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ms3.js +27 -9
  660. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_nl2.js +39 -0
  661. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_nl3.js +25 -7
  662. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_no2.js +39 -0
  663. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_no3.js +26 -8
  664. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pl2.js +39 -0
  665. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pl3.js +26 -8
  666. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt2.js +39 -0
  667. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt3.js +25 -7
  668. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt_PT2.js +39 -0
  669. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_pt_PT3.js +26 -8
  670. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ro2.js +39 -0
  671. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ro3.js +25 -7
  672. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ru2.js +39 -0
  673. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_ru3.js +25 -7
  674. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sh2.js +39 -0
  675. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sh3.js +25 -7
  676. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sk2.js +39 -0
  677. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sk3.js +25 -7
  678. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sl2.js +41 -2
  679. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sl3.js +26 -8
  680. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sr2.js +39 -0
  681. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sr3.js +25 -7
  682. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sv2.js +39 -0
  683. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_sv3.js +26 -8
  684. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_th2.js +39 -0
  685. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_th3.js +25 -7
  686. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_tr2.js +39 -0
  687. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_tr3.js +25 -7
  688. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_uk2.js +40 -1
  689. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_uk3.js +25 -7
  690. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_vi2.js +39 -0
  691. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_vi3.js +26 -8
  692. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_CN2.js +39 -0
  693. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_CN3.js +26 -8
  694. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_TW2.js +41 -2
  695. package/src/main/js/sap/ushell/thirdparty/_dynamics/messagebundle_zh_TW3.js +25 -7
  696. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css10.js +1 -1
  697. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css11.js +1 -1
  698. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css12.js +1 -1
  699. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css13.js +1 -1
  700. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css14.js +1 -1
  701. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css15.js +1 -1
  702. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css16.js +1 -1
  703. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css17.js +1 -1
  704. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css18.js +1 -1
  705. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css19.js +1 -1
  706. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css20.js +1 -1
  707. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css21.js +1 -1
  708. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css22.js +1 -1
  709. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css23.js +1 -1
  710. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css24.js +1 -1
  711. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css25.js +1 -1
  712. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css26.js +7 -0
  713. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css3.js +1 -1
  714. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css4.js +1 -1
  715. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css5.js +1 -1
  716. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css6.js +1 -1
  717. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css7.js +1 -1
  718. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css8.js +1 -1
  719. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css9.js +1 -1
  720. package/src/main/js/sap/ushell/thirdparty/encodeXML.js +87 -0
  721. package/src/main/js/sap/ushell/thirdparty/generateHighlightedMarkup.js +9 -0
  722. package/src/main/js/sap/ushell/thirdparty/i18n-defaults.js +143 -149
  723. package/src/main/js/sap/ushell/thirdparty/i18n-defaults2.js +16 -0
  724. package/src/main/js/sap/ushell/thirdparty/information.js +10 -13
  725. package/src/main/js/sap/ushell/thirdparty/information2.js +13 -0
  726. package/src/main/js/sap/ushell/thirdparty/overflow.js +2 -2
  727. package/src/main/js/sap/ushell/thirdparty/parameters-bundle.css.js +1 -1
  728. package/src/main/js/sap/ushell/thirdparty/parameters-bundle.css2.js +44 -0
  729. package/src/main/js/sap/ushell/thirdparty/query.js +1 -4
  730. package/src/main/js/sap/ushell/thirdparty/slim-arrow-down.js +44 -0
  731. package/src/main/js/sap/ushell/thirdparty/sys-enter-2.js +7 -0
  732. package/src/main/js/sap/ushell/thirdparty/toLowercaseEnumValue.js +0 -8
  733. package/src/main/js/sap/ushell/thirdparty/webcomponents-base.js +35 -31
  734. package/src/main/js/sap/ushell/thirdparty/webcomponents-fiori.js +8 -8
  735. package/src/main/js/sap/ushell/thirdparty/webcomponents.js +16 -16
  736. package/src/main/js/sap/ushell/thirdparty/willShowContent.js +7 -0
  737. package/src/main/js/sap/ushell/ui/ShellHeader.js +0 -1
  738. package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +1 -1
  739. package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
  740. package/src/main/js/sap/ushell/ui/launchpad/Section.js +1 -1
  741. package/src/main/js/sap/ushell/ui/launchpad/VizInstance.js +6 -1
  742. package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +1 -1
  743. package/src/main/js/sap/ushell/ui/shell/ToolAreaItem.js +5 -2
  744. package/src/main/js/sap/ushell/ui/utils.js +1 -1
  745. package/src/main/js/sap/ushell/ui5service/ShellUIServiceFactory.js +1 -1
  746. package/src/main/js/sap/ushell/ui5service/UserStatus.js +1 -1
  747. package/src/main/js/sap/ushell/utils/UrlShortening.js +1 -1
  748. package/src/main/js/sap/ushell/utils/workpage/WorkPageHost.js +1 -1
  749. package/src/main/js/sap/ushell/utils/workpage/WorkPageService.js +1 -1
  750. package/src/main/js/sap/ushell/utils/workpage/WorkPageVizInstantiation.js +1 -1
  751. package/src/main/js/sap/ushell/utils.js +32 -1
  752. package/src/test/js/sap/ushell/bootstrap/sandbox.js +1 -1
  753. package/ui5.yaml +2 -0
  754. package/src/main/js/sap/ushell/thirdparty/ListItemTemplate.js +0 -3920
  755. package/src/main/js/sap/ushell/thirdparty/_dynamics/parameters-bundle.css2.js +0 -7
  756. /package/src/main/js/sap/ushell/components/shell/SearchCEP/{SearchFieldFragment.fragment.xml → SearchField.fragment.xml} +0 -0
@@ -5,9 +5,11 @@
5
5
  * @deprecated
6
6
  */
7
7
  sap.ui.define([
8
- "jquery.sap.global",
8
+ "sap/ui/thirdparty/jquery",
9
9
  "sap/suite/ui/commons/UnifiedThingInspector",
10
10
  "sap/ui/core/format/NumberFormat",
11
+ "sap/ui/core/Configuration",
12
+ "sap/ui/core/Core",
11
13
  "sap/viz/ui5/data/FlattenedDataset",
12
14
  "sap/ui/core/Locale",
13
15
  "sap/ui/model/type/DateTime",
@@ -78,10 +80,12 @@ sap.ui.define([
78
80
  "sap/m/ActionSheet",
79
81
  "sap/ushell/ui/footerbar/JamDiscussButton",
80
82
  "sap/ushell/ui/footerbar/JamShareButton"
81
- ], function (
82
- $,
83
+ ], (
84
+ jQuery,
83
85
  UnifiedThingInspector,
84
86
  NumberFormat,
87
+ Configuration,
88
+ Core,
85
89
  FlattenedDataset,
86
90
  Locale,
87
91
  DateTime,
@@ -152,42 +156,46 @@ sap.ui.define([
152
156
  ActionSheet,
153
157
  JamDiscussButton,
154
158
  JamShareButton
155
- ) {
159
+ ) => {
156
160
  "use strict";
157
161
 
158
162
  // shortcut for sap.m.URLHelper
159
- var URLHelper = mobileLibrary.URLHelper;
163
+ const URLHelper = mobileLibrary.URLHelper;
160
164
 
161
165
  // shortcut for sap.m.PlacementType
162
- var PlacementType = mobileLibrary.PlacementType;
166
+ const PlacementType = mobileLibrary.PlacementType;
163
167
 
164
168
  // shortcut for sap.suite.ui.commons.FacetOverviewHeight
165
- var FacetOverviewHeight = commonsLibrary.FacetOverviewHeight;
169
+ const FacetOverviewHeight = commonsLibrary.FacetOverviewHeight;
166
170
 
167
171
  // shortcut for sap.m.DateTimeInputType
168
- var DateTimeInputType = mobileLibrary.DateTimeInputType;
172
+ const DateTimeInputType = mobileLibrary.DateTimeInputType;
169
173
 
170
174
  // shortcut for sap.m.ListMode
171
- var ListMode = mobileLibrary.ListMode;
175
+ const ListMode = mobileLibrary.ListMode;
172
176
 
173
177
  // shortcut for sap.m.ListSeparators
174
- var ListSeparators = mobileLibrary.ListSeparators;
178
+ const ListSeparators = mobileLibrary.ListSeparators;
175
179
 
176
180
  // shortcut for sap.m.BackgroundDesign
177
- var BackgroundDesign = mobileLibrary.BackgroundDesign;
181
+ const BackgroundDesign = mobileLibrary.BackgroundDesign;
178
182
 
179
183
  // shortcut for sap.m.ListType
180
- var ListType = mobileLibrary.ListType;
184
+ const ListType = mobileLibrary.ListType;
181
185
 
182
186
  // shortcut for sap.ui.core.TextAlign
183
- var TextAlign = coreLibrary.TextAlign;
184
-
185
- var oMapping = {}, aAllFacets = [], oLinkAuthorised = {}, newJSONModels = {},
186
- FACTSHEET = "displayFactSheet",
187
- oLocale, oTI;
188
-
189
- oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
190
- if (sap.ui.getCore().getConfiguration().getLanguage() === "ZH") {
187
+ const TextAlign = coreLibrary.TextAlign;
188
+
189
+ let oMapping = {};
190
+ let aAllFacets = [];
191
+ const oLinkAuthorised = {};
192
+ const newJSONModels = {};
193
+ const FACTSHEET = "displayFactSheet";
194
+ let oLocale;
195
+ let oTI;
196
+
197
+ oLocale = Configuration.getFormatSettings().getFormatLocale();
198
+ if (Configuration.getLanguage() === "ZH") {
191
199
  oLocale = new Locale("zh_CN");
192
200
  }
193
201
 
@@ -196,7 +204,7 @@ sap.ui.define([
196
204
  }
197
205
 
198
206
  function toPositiveNumberWithoutDecimals (value) {
199
- var result = Number(value).toFixed(0);
207
+ let result = Number(value).toFixed(0);
200
208
  if (isNegativeValue(value)) {
201
209
  result = Number(result) * -1;
202
210
  }
@@ -204,53 +212,94 @@ sap.ui.define([
204
212
  }
205
213
 
206
214
  function kpiValueFormatter (value, fractionDigits) {
207
- var result, oRegExp, sDigits, oNumberFormatter;
215
+ let oNumberFormatter;
208
216
  if (!value) {
209
217
  return "";
210
218
  }
211
- oRegExp = new RegExp(NumberFormat.oDefaultFloatFormat.groupingSeparator, "g");
219
+ const oRegExp = new RegExp(NumberFormat.oDefaultFloatFormat.groupingSeparator, "g");
212
220
  if (fractionDigits >= 0) {
213
221
  fractionDigits = parseInt(fractionDigits, 10);
214
222
  oNumberFormatter = NumberFormat.getFloatInstance({ minFractionDigits: fractionDigits, maxFractionDigits: fractionDigits }, oLocale);
215
223
  } else {
216
224
  oNumberFormatter = NumberFormat.getFloatInstance({ minFractionDigits: 0, maxFractionDigits: 99 }, oLocale);
217
225
  }
218
- result = oNumberFormatter.format(value);
219
- sDigits = result.replace(/[\D]/g, "");
226
+ const result = oNumberFormatter.format(value);
227
+ const sDigits = result.replace(/[\D]/g, "");
220
228
  if (sDigits && sDigits.length > 6) {
221
229
  value = value.replace(oRegExp, "");
222
230
  if (toPositiveNumberWithoutDecimals(value) < 1000) {
223
- //show integer part only without a fraction part
231
+ // show integer part only without a fraction part
224
232
  return NumberFormat.getIntegerInstance().format(value);
225
233
  }
226
234
  oNumberFormatter = NumberFormat.getFloatInstance({ minFractionDigits: 1, maxFractionDigits: 1, style: "short" }, oLocale);
227
235
  return oNumberFormatter.format(value);
228
236
  }
229
237
  return result;
238
+ }
230
239
 
240
+ function searchObj (obj, property) {
241
+ let key;
242
+ for (key in obj) {
243
+ if (obj.hasOwnProperty(key)) {
244
+ if (key === "__metadata") {
245
+ continue;
246
+ } else if (key === property) {
247
+ return obj[key];
248
+ } else if (typeof obj[key] === "object") {
249
+ return searchObj(obj[key], property);
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ function newModelValue (sUrl) {
256
+ let newJSONModel = {};
257
+ let returnValue;
258
+ const iLastSlash = sUrl.lastIndexOf("/");
259
+ const newUrl = sUrl.slice(0, iLastSlash);
260
+ const newProp = sUrl.slice(iLastSlash + 1);
261
+ if (!newJSONModels[sUrl]) {
262
+ newJSONModel = new JSONModel();
263
+ newJSONModel.loadData(newUrl, null, false);
264
+ newJSONModels[sUrl] = newJSONModel.getData();
265
+ } else {
266
+ newJSONModel = newJSONModels[sUrl];
267
+ }
268
+ if (newJSONModels[sUrl] && newJSONModels[sUrl].d) {
269
+ if (!newJSONModels[sUrl].d[newProp]) {
270
+ returnValue = searchObj(newJSONModels[sUrl].d, newProp);
271
+ } else {
272
+ returnValue = newJSONModels[sUrl].d[newProp];
273
+ }
274
+ }
275
+ return returnValue;
231
276
  }
232
277
 
233
278
  // End workaround
234
279
  // HANA Live
235
280
  function fnChange () {
236
- var oUrl = "",
237
- i, j, sProperty, sPropertyValue, sPath, oModel, aUrl, aParameters, sNewValue, sPropertyName, sValueFormat;
238
- sPath = this.getElementBinding().sPath.split("/")[1];
239
- oModel = this.getModel();
240
- aUrl = this.mBindingInfos.value.parameters;
241
- aParameters = this.mBindingInfos.value.parts;
242
- for (i = 0; i < aUrl.length; i += 1) {
281
+ let oUrl = "";
282
+ let sProperty;
283
+ let sPropertyValue;
284
+ let sNewValue;
285
+ let sPropertyName;
286
+ let sValueFormat;
287
+ const sPath = this.getElementBinding().sPath.split("/")[1];
288
+ const oModel = this.getModel();
289
+ const aUrl = this.mBindingInfos.value.parameters;
290
+ const aParameters = this.mBindingInfos.value.parts;
291
+ for (let i = 0; i < aUrl.length; ++i) {
243
292
  oUrl = oUrl + aUrl[i].string;
244
293
  }
245
- for (j = 0; j < aParameters.length; j += 1) {
294
+ for (let j = 0; j < aParameters.length; ++j) {
246
295
  sProperty = aParameters[j].path;
247
- sPropertyName = "{" + sProperty + "}";
296
+ sPropertyName = `{${sProperty}}`;
248
297
  sPropertyValue = oModel.oData[sPath][sProperty];
249
298
  oUrl = oUrl.replace(sPropertyName, sPropertyValue);
250
299
  }
251
300
  sNewValue = newModelValue(oUrl);
252
301
  if (typeof sNewValue === "number" && !isNaN(sNewValue)) {
253
- sValueFormat = this.mBindingInfos.value.parts.filter(function (obj) {
302
+ sValueFormat = this.mBindingInfos.value.parts.filter((obj) => {
254
303
  return (obj.path === sProperty);
255
304
  });
256
305
  sNewValue = kpiValueFormatter(sNewValue, sValueFormat[0].type.oFormatOptions.maxFractionDigits);
@@ -260,38 +309,37 @@ sap.ui.define([
260
309
  this.getElementBinding().detachChange(fnChange);
261
310
  }
262
311
 
263
- var getTIDescription = function () {
264
- var sTIDescription = "";
312
+ function getTIDescription () {
313
+ let sTIDescription = "";
265
314
  if (oTI.getName() && oTI.getDescription()) {
266
- sTIDescription = oTI.getName() + ", " + oTI.getDescription();
315
+ sTIDescription = `${oTI.getName()}, ${oTI.getDescription()}`;
267
316
  } else if (oTI.getName() && !oTI.getDescription()) {
268
317
  sTIDescription = oTI.getName();
269
318
  } else if (!oTI.getName() && oTI.getDescription()) {
270
319
  sTIDescription = oTI.getDescription();
271
320
  }
272
321
  return sTIDescription;
273
- };
322
+ }
274
323
 
275
- var getServiceFromUri = function (sUri) {
276
- var aUriParts, sService, i;
277
- aUriParts = sUri.slice(1).split("/");
278
- sService = "/";
279
- for (i = 0; i < aUriParts.length; i += 1) {
324
+ function getServiceFromUri (sUri) {
325
+ const aUriParts = sUri.slice(1).split("/");
326
+ let sService = "/";
327
+ for (let i = 0; i < aUriParts.length; ++i) {
280
328
  if ((aUriParts[i].indexOf("(") > 0) && (aUriParts[i].indexOf("sid(") < 0)) {
281
329
  break;
282
330
  } else {
283
- sService += aUriParts[i] + "/";
331
+ sService += `${aUriParts[i]}/`;
284
332
  }
285
333
  }
286
334
  return sService;
287
- };
335
+ }
288
336
 
289
- var getEntitySetFromUri = function (sUri, oModel) {
290
- var sEntitySet, sEntityUri, aServiceParts, sNavProperty;
291
- sEntityUri = sUri.slice(oModel.sServiceUrl.length + 1);
337
+ function getEntitySetFromUri (sUri, oModel) {
338
+ let sEntitySet;
339
+ const sEntityUri = sUri.slice(oModel.sServiceUrl.length + 1);
292
340
  if (sEntityUri.indexOf("/") >= 0) {
293
- aServiceParts = sEntityUri.split("/");
294
- sNavProperty = aServiceParts[aServiceParts.length];
341
+ const aServiceParts = sEntityUri.split("/");
342
+ const sNavProperty = aServiceParts[aServiceParts.length];
295
343
  sEntitySet = aServiceParts[aServiceParts.length - 1];
296
344
  if (sEntitySet.indexOf("(") >= 0) {
297
345
  sEntitySet = sEntitySet.slice(sEntitySet.indexOf("("));
@@ -305,88 +353,93 @@ sap.ui.define([
305
353
  sEntitySet = sEntityUri;
306
354
  }
307
355
  return sEntitySet;
308
- };
309
-
310
- var getEntityKeyFromUri = function (sUri, oModel) {
311
- var sEntityUri, sKey = "", oMetadata, sEntityType;
312
- sEntityUri = sUri.slice(oModel.sServiceUrl.length + 1);
313
- if (sEntityUri.indexOf("(") >= 0) {
314
- sKey = sEntityUri.slice(sEntityUri.indexOf("(") + 1, sEntityUri.indexOf(")"));
315
- if (sKey.indexOf("=") <= 0) {
316
- // There is just one key property and the shortened notation was used, get name of the key property
317
- oMetadata = oModel.getServiceMetadata();
318
- sEntityType = getEntityType(getEntitySetFromUri(sUri, oModel), oMetadata);
319
- sKey = getKeyProperty(sEntityType, oMetadata) + "=" + sKey;
320
- }
321
- }
322
- return sKey;
323
- };
356
+ }
324
357
 
325
- var getKeyProperty = function (sEntityType, oMetadata) {
326
- var i, j, metadataSchema;
327
- for (i = oMetadata.dataServices.schema.length - 1; i >= 0; i -= 1) {
358
+ function getKeyProperty (sEntityType, oMetadata) {
359
+ let metadataSchema;
360
+ for (let i = oMetadata.dataServices.schema.length - 1; i >= 0; --i) {
328
361
  metadataSchema = oMetadata.dataServices.schema[i];
329
362
  if (metadataSchema.namespace === sEntityType.slice(0, sEntityType.lastIndexOf("."))) {
330
- for (j = 0; j < metadataSchema.entityType.length; j += 1) {
363
+ for (let j = 0; j < metadataSchema.entityType.length; ++j) {
331
364
  if (metadataSchema.entityType[j].name === sEntityType.slice(sEntityType.lastIndexOf(".") + 1)) {
332
365
  return metadataSchema.entityType[j].key.propertyRef[0].name;
333
366
  }
334
367
  }
335
368
  }
336
369
  }
337
- };
370
+ }
338
371
 
339
- var getEntitySetFromType = function (sEntityType, oMetadata) {
340
- var i, j, metadataSchema, aEntitySets;
341
- for (i = oMetadata.dataServices.schema.length - 1; i >= 0; i -= 1) {
372
+ function getEntityType (sEntitySet, oMetadata, bWithoutNamespace) {
373
+ let metadataSchema;
374
+ let aEntitySets;
375
+ let sReturn;
376
+ for (let i = oMetadata.dataServices.schema.length - 1; i >= 0; --i) {
342
377
  metadataSchema = oMetadata.dataServices.schema[i];
343
378
  if (metadataSchema.entityContainer) {
344
379
  aEntitySets = metadataSchema.entityContainer[0].entitySet;
345
- for (j = aEntitySets.length - 1; j >= 0; j -= 1) {
346
- if (aEntitySets[j].entityType === sEntityType) {
347
- return aEntitySets[j].name;
380
+ for (let j = aEntitySets.length - 1; j >= 0; --j) {
381
+ if (aEntitySets[j].name === sEntitySet) {
382
+ if (bWithoutNamespace) {
383
+ sReturn = aEntitySets[j].entityType.slice(metadataSchema.namespace.length + 1);
384
+ } else {
385
+ sReturn = aEntitySets[j].entityType;
386
+ }
387
+ return sReturn;
348
388
  }
349
389
  }
350
390
  }
351
391
  }
352
- };
392
+ }
393
+
394
+ function getEntityKeyFromUri (sUri, oModel) {
395
+ let sKey = "";
396
+ const sEntityUri = sUri.slice(oModel.sServiceUrl.length + 1);
397
+ if (sEntityUri.indexOf("(") >= 0) {
398
+ sKey = sEntityUri.slice(sEntityUri.indexOf("(") + 1, sEntityUri.indexOf(")"));
399
+ if (sKey.indexOf("=") <= 0) {
400
+ // There is just one key property and the shortened notation was used, get name of the key property
401
+ const oMetadata = oModel.getServiceMetadata();
402
+ const sEntityType = getEntityType(getEntitySetFromUri(sUri, oModel), oMetadata);
403
+ sKey = `${getKeyProperty(sEntityType, oMetadata)}=${sKey}`;
404
+ }
405
+ }
406
+ return sKey;
407
+ }
353
408
 
354
- var getEntityType = function (sEntitySet, oMetadata, bWithoutNamespace) {
355
- var i, j, metadataSchema, aEntitySets, sReturn;
356
- for (i = oMetadata.dataServices.schema.length - 1; i >= 0; i -= 1) {
409
+ function getEntitySetFromType (sEntityType, oMetadata) {
410
+ let metadataSchema;
411
+ let aEntitySets;
412
+ for (let i = oMetadata.dataServices.schema.length - 1; i >= 0; --i) {
357
413
  metadataSchema = oMetadata.dataServices.schema[i];
358
414
  if (metadataSchema.entityContainer) {
359
415
  aEntitySets = metadataSchema.entityContainer[0].entitySet;
360
- for (j = aEntitySets.length - 1; j >= 0; j -= 1) {
361
- if (aEntitySets[j].name === sEntitySet) {
362
- if (bWithoutNamespace) {
363
- sReturn = aEntitySets[j].entityType.slice(metadataSchema.namespace.length + 1);
364
- } else {
365
- sReturn = aEntitySets[j].entityType;
366
- }
367
- return sReturn;
416
+ for (let j = aEntitySets.length - 1; j >= 0; --j) {
417
+ if (aEntitySets[j].entityType === sEntityType) {
418
+ return aEntitySets[j].name;
368
419
  }
369
420
  }
370
421
  }
371
422
  }
372
- };
423
+ }
373
424
 
374
- var getAssociation = function (sEntityType, sNavProperty, oMetadata) {
375
- var i, j, k, aNsEntityType, metadataSchema, sNameSpace, oNavProperty;
376
- aNsEntityType = sEntityType.split(".");
377
- for (i = oMetadata.dataServices.schema.length - 1; i >= 0; i -= 1) {
425
+ function getAssociation (sEntityType, sNavProperty, oMetadata) {
426
+ let metadataSchema;
427
+ let sNameSpace;
428
+ let oNavProperty;
429
+ const aNsEntityType = sEntityType.split(".");
430
+ for (let i = oMetadata.dataServices.schema.length - 1; i >= 0; --i) {
378
431
  metadataSchema = oMetadata.dataServices.schema[i];
379
432
  sNameSpace = aNsEntityType[0];
380
433
  if (aNsEntityType.length > 2) {
381
- for (k = 1; k < aNsEntityType.length - 1; k += 1) {
382
- sNameSpace += "." + aNsEntityType[k];
434
+ for (let k = 1; k < aNsEntityType.length - 1; ++k) {
435
+ sNameSpace += `.${aNsEntityType[k]}`;
383
436
  }
384
437
  }
385
438
  if (metadataSchema.namespace === sNameSpace) {
386
- for (j = 0; j < metadataSchema.entityType.length; j += 1) {
439
+ for (let j = 0; j < metadataSchema.entityType.length; ++j) {
387
440
  if (metadataSchema.entityType[j].name === aNsEntityType[aNsEntityType.length - 1]) {
388
441
  if (metadataSchema.entityType[j].navigationProperty) {
389
- for (k = 0; k < metadataSchema.entityType[j].navigationProperty.length; k += 1) {
442
+ for (let k = 0; k < metadataSchema.entityType[j].navigationProperty.length; ++k) {
390
443
  if (metadataSchema.entityType[j].navigationProperty[k].name === sNavProperty) {
391
444
  oNavProperty = metadataSchema.entityType[j].navigationProperty[k];
392
445
  return { name: oNavProperty.relationship, toRole: oNavProperty.toRole };
@@ -397,29 +450,30 @@ sap.ui.define([
397
450
  }
398
451
  }
399
452
  }
400
- };
453
+ }
401
454
 
402
- var getNavEntitySet = function (sEntitySet, sNavProperty, oMetadata) {
403
- var sEntityType, termTargetType, oAssociation, i, metadataSchema, j, sAssociationSet, k;
404
- sEntityType = getEntityType(sEntitySet, oMetadata);
455
+ function getNavEntitySet (sEntitySet, sNavProperty, oMetadata) {
456
+ let metadataSchema;
457
+ let sAssociationSet;
458
+ const sEntityType = getEntityType(sEntitySet, oMetadata);
405
459
  if (sNavProperty.charAt(0) === "@") {
406
460
  if (oMapping.termDefinitions && oMapping.termDefinitions[sNavProperty]) {
407
- termTargetType = oMapping.termDefinitions[sNavProperty];
461
+ let termTargetType = oMapping.termDefinitions[sNavProperty];
408
462
  if (termTargetType.indexOf("Collection") >= 0) {
409
463
  termTargetType = termTargetType.slice(termTargetType.indexOf("(") + 1, termTargetType.indexOf(")"));
410
464
  }
411
465
  return getEntitySetFromType(termTargetType, oMetadata);
412
466
  }
413
467
  } else {
414
- oAssociation = getAssociation(sEntityType, sNavProperty, oMetadata);
468
+ const oAssociation = getAssociation(sEntityType, sNavProperty, oMetadata);
415
469
  if (oAssociation) {
416
- for (i = oMetadata.dataServices.schema.length - 1; i >= 0; i -= 1) {
470
+ for (let i = oMetadata.dataServices.schema.length - 1; i >= 0; --i) {
417
471
  metadataSchema = oMetadata.dataServices.schema[i];
418
472
  if (metadataSchema.entityContainer && metadataSchema.entityContainer[0].associationSet) {
419
- for (j = metadataSchema.entityContainer[0].associationSet.length - 1; j >= 0; j -= 1) {
473
+ for (let j = metadataSchema.entityContainer[0].associationSet.length - 1; j >= 0; --j) {
420
474
  sAssociationSet = metadataSchema.entityContainer[0].associationSet[j];
421
475
  if (sAssociationSet.association === oAssociation.name) {
422
- for (k = 0; k < sAssociationSet.end.length; k += 1) {
476
+ for (let k = 0; k < sAssociationSet.end.length; ++k) {
423
477
  if (sAssociationSet.end[k].role === oAssociation.toRole) {
424
478
  return sAssociationSet.end[k].entitySet;
425
479
  }
@@ -430,19 +484,21 @@ sap.ui.define([
430
484
  }
431
485
  }
432
486
  }
433
- };
487
+ }
434
488
 
435
- var getAssociationMultiplicity = function (sEntitySet, sNavProperty, oMetadata) {
436
- var i, j, k, sEntityType, oAssociation, metadataSchema, sAssociation, sEntityTypeName, sToRoleName;
437
- sEntityType = getEntityType(sEntitySet, oMetadata);
438
- sEntityTypeName = sEntityType.split(".")[sEntityType.split(".").length - 1];
439
- oAssociation = getAssociation(sEntityType, sNavProperty, oMetadata);
489
+ function getAssociationMultiplicity (sEntitySet, sNavProperty, oMetadata) {
490
+ let metadataSchema;
491
+ let sAssociation;
492
+ let sToRoleName;
493
+ const sEntityType = getEntityType(sEntitySet, oMetadata);
494
+ const sEntityTypeName = sEntityType.split(".")[sEntityType.split(".").length - 1];
495
+ const oAssociation = getAssociation(sEntityType, sNavProperty, oMetadata);
440
496
  if (oAssociation) {
441
- for (i = oMetadata.dataServices.schema.length - 1; i >= 0; i -= 1) {
497
+ for (let i = oMetadata.dataServices.schema.length - 1; i >= 0; --i) {
442
498
  metadataSchema = oMetadata.dataServices.schema[i];
443
- for (j = 0; j < metadataSchema.entityType.length && !sToRoleName; j += 1) {
499
+ for (let j = 0; j < metadataSchema.entityType.length && !sToRoleName; ++j) {
444
500
  if (metadataSchema.entityType[j].name === sEntityTypeName) {
445
- for (k = 0; k < metadataSchema.entityType[j].navigationProperty.length; k += 1) {
501
+ for (let k = 0; k < metadataSchema.entityType[j].navigationProperty.length; ++k) {
446
502
  if (metadataSchema.entityType[j].navigationProperty[k].name === sNavProperty) {
447
503
  sToRoleName = metadataSchema.entityType[j].navigationProperty[k].toRole;
448
504
  break;
@@ -450,10 +506,10 @@ sap.ui.define([
450
506
  }
451
507
  }
452
508
  }
453
- for (j = metadataSchema.association.length - 1; j >= 0; j -= 1) {
509
+ for (let j = metadataSchema.association.length - 1; j >= 0; --j) {
454
510
  sAssociation = metadataSchema.association[j];
455
- if (metadataSchema.namespace + "." + sAssociation.name === oAssociation.name) {
456
- for (k = 0; k < sAssociation.end.length; k += 1) {
511
+ if (`${metadataSchema.namespace}.${sAssociation.name}` === oAssociation.name) {
512
+ for (let k = 0; k < sAssociation.end.length; ++k) {
457
513
  if (sAssociation.end[k].role === sToRoleName) {
458
514
  return sAssociation.end[k].multiplicity;
459
515
  }
@@ -462,18 +518,18 @@ sap.ui.define([
462
518
  }
463
519
  }
464
520
  } else {
465
- jQuery.sap.log.error("\"" + sNavProperty + "\" wasn't found in the metadata document. Check whether the corresponding search connector is active.");
521
+ jQuery.sap.log.error(`"${sNavProperty}" wasn't found in the metadata document. Check whether the corresponding search connector is active.`);
466
522
  return 0;
467
523
  }
468
- };
524
+ }
469
525
 
470
- var getExpand = function (sEntitySet, oMetadata) {
471
- var oExpand, oExpandEntities, aExpand, elem;
472
- oExpand = {};
526
+ function getExpand (sEntitySet, oMetadata) {
527
+ let elem;
528
+ const oExpand = {};
473
529
  if (oMapping.expand) {
474
530
  if (oMapping.expand[getEntityType(sEntitySet, oMetadata)]) {
475
- oExpandEntities = oMapping.expand[getEntityType(sEntitySet, oMetadata)];
476
- aExpand = [];
531
+ const oExpandEntities = oMapping.expand[getEntityType(sEntitySet, oMetadata)];
532
+ const aExpand = [];
477
533
  for (elem in oExpandEntities) {
478
534
  if (oExpandEntities.hasOwnProperty(elem)) {
479
535
  aExpand.push(oExpandEntities[elem]);
@@ -483,18 +539,18 @@ sap.ui.define([
483
539
  }
484
540
  }
485
541
  return oExpand;
486
- };
542
+ }
487
543
 
488
- var getNavTypeForNavPath = function (sNavPath, sEntityType, oMetadata) {
489
- var m, metadataSchema, j, k, l, n;
490
- for (m = oMetadata.dataServices.schema.length - 1; m >= 0; m -= 1) {
544
+ function getNavTypeForNavPath (sNavPath, sEntityType, oMetadata) {
545
+ let metadataSchema;
546
+ for (let m = oMetadata.dataServices.schema.length - 1; m >= 0; --m) {
491
547
  metadataSchema = oMetadata.dataServices.schema[m];
492
- for (j = 0; j < metadataSchema.entityType.length; j += 1) {
548
+ for (let j = 0; j < metadataSchema.entityType.length; ++j) {
493
549
  if (metadataSchema.entityType[j].name === sEntityType.split(".")[sEntityType.split(".").length - 1]) {
494
- for (k = 0; k < metadataSchema.entityType[j].navigationProperty.length; k += 1) {
550
+ for (let k = 0; k < metadataSchema.entityType[j].navigationProperty.length; ++k) {
495
551
  if (metadataSchema.entityType[j].navigationProperty[k].name === sNavPath) {
496
- for (l = 0; l < metadataSchema.association.length; l += 1) {
497
- for (n = metadataSchema.association[l].end.length - 1; n >= 0; n -= 1) {
552
+ for (let l = 0; l < metadataSchema.association.length; ++l) {
553
+ for (let n = metadataSchema.association[l].end.length - 1; n >= 0; --n) {
498
554
  if (metadataSchema.association[l].end[n].role === metadataSchema.entityType[j].navigationProperty[k].toRole) {
499
555
  return (metadataSchema.association[l].end[n].type);
500
556
  }
@@ -505,15 +561,15 @@ sap.ui.define([
505
561
  }
506
562
  }
507
563
  }
508
- };
564
+ }
509
565
 
510
566
  /* UI Renderer */
511
567
 
512
- var propertyPartsWithStrings = function (aParts, oFormatter) {
513
- var oBinding = {}, j;
568
+ function propertyPartsWithStrings (aParts, oFormatter) {
569
+ const oBinding = {};
514
570
  oBinding.parts = [];
515
571
  oBinding.parameters = [];
516
- for (j = aParts.length - 1; j >= 0; j -= 1) {
572
+ for (let j = aParts.length - 1; j >= 0; --j) {
517
573
  if (aParts[j].Type === "Path") {
518
574
  if (aParts[j].EdmType) {
519
575
  switch (aParts[j].EdmType) {
@@ -523,7 +579,7 @@ sap.ui.define([
523
579
  break;
524
580
  case "Edm.Time":
525
581
  oBinding.parts.push({
526
- path: aParts[j].Value + "/ms",
582
+ path: `${aParts[j].Value}/ms`,
527
583
  type: new Time({
528
584
  source: { pattern: "timestamp" },
529
585
  UTC: true
@@ -556,16 +612,19 @@ sap.ui.define([
556
612
  }
557
613
  }
558
614
  oBinding.formatter = function () {
559
- var sValue = "", sPathIndex, k, sLastValue, aValueLastLen, sLastSeparator = "", bEncodeUriComponent = false,
560
- aHasValueCount = 0, aBracketSeparatorCount = 0;
615
+ let sValue = "";
616
+ let sLastSeparator = "";
617
+ let bEncodeUriComponent = false;
618
+ let aHasValueCount = 0;
619
+ let aBracketSeparatorCount = 0;
561
620
  if (arguments && arguments.length >= 1) {
562
- sPathIndex = arguments.length - 1;
563
- sLastValue = "";
564
- aValueLastLen = 0;
621
+ let sPathIndex = arguments.length - 1;
622
+ let sLastValue = "";
623
+ let aValueLastLen = 0;
565
624
  if (aParts && aParts[0] && (aParts[0].Type === "String") && (aParts[0].Value.substr(0, 1) === "#")) {
566
625
  bEncodeUriComponent = true;
567
626
  }
568
- for (k = 0; k < aParts.length; k += 1) {
627
+ for (let k = 0; k < aParts.length; ++k) {
569
628
  if (aParts[k].Type === "Path") {
570
629
  sLastValue = arguments[sPathIndex];
571
630
  if (!sLastValue || (sLastValue.length === 0)) {
@@ -614,192 +673,79 @@ sap.ui.define([
614
673
  }
615
674
  };
616
675
  return oBinding;
617
- };
618
-
619
- var searchObj = function (obj, property) {
620
- var key;
621
- for (key in obj) {
622
- if (obj.hasOwnProperty(key)) {
623
- if (key === "__metadata") {
624
- continue;
625
- } else if (key === property) {
626
- return obj[key];
627
- } else if (typeof obj[key] === "object") {
628
- return searchObj(obj[key], property);
629
- }
630
- }
631
- }
632
- };
633
-
634
- var newModelValue = function (sUrl) {
635
- var iLastSlash, newUrl, newProp, newJSONModel = {}, returnValue;
636
- iLastSlash = sUrl.lastIndexOf("/");
637
- newUrl = sUrl.slice(0, iLastSlash);
638
- newProp = sUrl.slice(iLastSlash + 1);
639
- if (!newJSONModels[sUrl]) {
640
- newJSONModel = new JSONModel();
641
- newJSONModel.loadData(newUrl, null, false);
642
- newJSONModels[sUrl] = newJSONModel.getData();
643
- } else {
644
- newJSONModel = newJSONModels[sUrl];
645
- }
646
- if (newJSONModels[sUrl] && newJSONModels[sUrl].d) {
647
- if (!newJSONModels[sUrl].d[newProp]) {
648
- returnValue = searchObj(newJSONModels[sUrl].d, newProp);
649
- } else {
650
- returnValue = newJSONModels[sUrl].d[newProp];
651
- }
652
- }
653
- return returnValue;
654
- };
655
-
656
- var dataField = function (oField, sEntityType, oMetadata, oFacet) {
657
- var oControl, oBinding, sNavProperty, oUrl, oText, oVL, SemanticObject, sIntend;
658
- oControl = new Control();
659
- oBinding = fieldBinding(oField.Value, oField.EdmType, sEntityType);
660
- if (oField.Value && oField.Value["com.sap.vocabularies.UI.v1.IsImageURL"]) {
661
- oControl = new Image({ height: "50px" });
662
- if (oBinding.BindingInfo) {
663
- oControl.bindProperty("src", oBinding.BindingInfo);
664
- } else {
665
- oControl.setProperty("src", oBinding.String);
666
- }
667
- } else {
668
- if (oField.UrlRef || oField.Url || (oField.Target && oField.Target.Path)) {
669
- oControl = new Link({ wrapping: true });
670
- } else {
671
- oControl = new Text();
672
- if (oField.EdmType === "Edm.Decimal" || oField.EdmType === "Edm.Double" || oField.EdmType === "Edm.Single" ||
673
- oField.EdmType === "Edm.Int16" || oField.EdmType === "Edm.Int32" || oField.EdmType === "Edm.Int64") {
674
- oControl.setTextAlign(TextAlign.End);
675
- }
676
- }
677
- oControl.addStyleClass("sapFactsheetUtiDataField");
678
- if (oBinding.BindingInfo) {
679
- oControl.bindProperty("text", oBinding.BindingInfo);
680
- } else {
681
- oControl.setProperty("text", oBinding.String);
682
- }
683
- }
684
- if ((oField.RecordType === "com.sap.vocabularies.UI.v1.DataFieldWithNavigation") && oMetadata) {
685
- sNavProperty = oField.Target.Path;
686
- if (oMapping[sEntityType][sNavProperty.slice(1)]) {
687
- if (sNavProperty.charAt(0) === "@") {
688
- if (sNavProperty.indexOf("/") < 0) {
689
- oUrl = oMapping[sEntityType][sNavProperty.slice(1)].UrlRef;
690
- } else {
691
- oUrl = oMapping[sEntityType][sNavProperty.slice(1, sNavProperty.indexOf("/"))].UrlRef;
692
- }
693
- oControl.bindProperty("href", navigationBinding(oUrl));
694
- }
695
- }
696
- oControl.attachPress(function (oEvent) {
697
- return false;
698
- });
699
- }
700
- if (oField.RecordType === "com.sap.vocabularies.UI.v1.DataFieldWithUrl") {
701
- if (oField.Url.String) {
702
- oControl.setHref(oField.Url.String);
703
- } else {
704
- oControl.bindProperty("href", navigationBinding(oField.Url));
705
- //Workaround: no Link if no authority
706
- oText = new Text({
707
- wrapping: true
708
- });
709
- if (oBinding.BindingInfo) {
710
- oText.bindProperty("text", jQuery.extend({}, oBinding.BindingInfo));
711
- } else {
712
- oText.setProperty("text", oBinding.String);
713
- }
714
- oControl.setVisible(false);
715
- oVL = new VerticalLayout();
716
- oVL.addContent(oControl);
717
- oVL.addContent(oText);
718
- if (!aAllFacets[aAllFacets.indexOf(oFacet)].Links) {
719
- aAllFacets[aAllFacets.indexOf(oFacet)].Links = [];
720
- }
721
- if (oField.Url.Apply) {
722
- SemanticObject = oField.Url.Apply.Parameters[0].Value.slice(oField.Url.Apply.Parameters[0].Value.indexOf("#") + 1, oField.Url.Apply.Parameters[0].Value.indexOf("-"));
723
- sIntend = oField.Url.Apply.Parameters[0].Value.slice(oField.Url.Apply.Parameters[0].Value.indexOf("#") + 1, oField.Url.Apply.Parameters[0].Value.indexOf("?"));
724
- }
725
- aAllFacets[aAllFacets.indexOf(oFacet)].Links.push({
726
- sSemanticObject: SemanticObject,
727
- sIntend: sIntend,
728
- oVL: oVL
729
- });
730
- //Workaround: no Link if no authority
731
- }
732
- }
733
- //Workaround: no Link if no authority
734
- if (oVL) {
735
- return oVL;
736
- }
737
- return oControl;
738
-
739
- //Workaround: no Link if no authority
740
- };
676
+ }
741
677
 
742
- var labelBinding = function (oField, oLabelProperties, aPropExtensions, bWithColon) {
743
- var oLabel, sColon = "", sLabel = "", oPropertyExt, j, k, oParameter;
744
- oLabel = new Label(oLabelProperties);
745
- oLabel.addStyleClass("sapFactsheetUtiLabel");
746
- if (bWithColon) {
747
- sColon = ":";
748
- }
749
- if (oField.Label) {
750
- if (oField.Label.String) {
751
- oLabel.setText(oField.Label.String.trim() + sColon);
752
- oLabel.setTooltip(oField.Label.String.trim());
753
- } else if (oField.Label.Path) {
754
- oLabel.bindProperty("text", oField.Label.Path);
755
- oLabel.bindProperty("tooltip", oField.Label.Path);
756
- }
757
- } else if (oField.Value) {
758
- if (oField.Value.Path && aPropExtensions) {
759
- oPropertyExt = aPropExtensions[oField.Value.Path];
760
- for (j in oPropertyExt) {
761
- if (oPropertyExt.hasOwnProperty(j)) {
762
- if (j === "http://www.sap.com/Protocols/SAPData") {
763
- if (oPropertyExt[j].label) {
764
- sLabel = oPropertyExt[j].label;
765
- break;
766
- }
767
- }
768
- }
769
- }
770
- } else if (oField.Value.Apply && (oField.Value.Apply.Name === "odata.concat")) {
771
- for (k in oField.Value.Apply.Parameters) {
772
- if (oField.Value.Apply.Parameters.hasOwnProperty(k)) {
773
- oParameter = oField.Value.Apply.Parameters[k];
774
- if (oParameter.Type === "Path") {
775
- oPropertyExt = aPropExtensions[oParameter.Value];
776
- for (j in oPropertyExt) {
777
- if (oPropertyExt.hasOwnProperty(j)) {
778
- if (j === "http://www.sap.com/Protocols/SAPData") {
779
- if (oPropertyExt[j].label) {
780
- sLabel = oPropertyExt[j].label;
781
- break;
782
- }
678
+ function navigationBinding (oUrl) {
679
+ const aUrlParts = [];
680
+ let aParams;
681
+ let aTemplateParts;
682
+ let aTemplateValueParts;
683
+ let oUrlParts = {};
684
+ let oParaValue;
685
+ let oResolution;
686
+ let sSystem;
687
+ if (oUrl && oUrl.Apply) {
688
+ aParams = oUrl.Apply.Parameters;
689
+ switch (oUrl.Apply.Name) {
690
+ case "odata.fillUriTemplate":
691
+ aParams[0].Value = aParams[0].Value.trim();
692
+ aTemplateParts = aParams[0].Value.split("{");
693
+ for (let j = 0; j < aTemplateParts.length; ++j) {
694
+ if (aTemplateParts[j].indexOf("}") < 0) {
695
+ aUrlParts.push({ Value: aTemplateParts[j], Type: "String" });
696
+ } else {
697
+ aTemplateValueParts = aTemplateParts[j].split("}");
698
+ oUrlParts = {};
699
+ oUrlParts.Value = aTemplateValueParts[0];
700
+ oUrlParts.Type = "Path";
701
+ for (j = 1; j < aParams.length; ++j) {
702
+ if (aParams[j].Name === oUrlParts.Value) {
703
+ oParaValue = aParams[j].Value;
704
+ if (oParaValue.Path) {
705
+ oUrlParts.Value = oParaValue.Path;
706
+ } else if (oParaValue.Apply && oParaValue.Apply.Name && oParaValue.Apply.Name.toLowerCase() === "odata.uriencode") {
707
+ oUrlParts.Value = oParaValue.Apply.Parameters[0].Value;
783
708
  }
709
+ break;
784
710
  }
785
711
  }
786
- break;
712
+ aUrlParts.push(oUrlParts);
713
+ aUrlParts.push({ Value: aTemplateValueParts[1], Type: "String" });
787
714
  }
788
715
  }
789
- }
716
+ oResolution = sap.ushell.Container.getService("NavTargetResolutionInternal").getCurrentResolution();
717
+ if (oResolution && oResolution.url) {
718
+ sSystem = jQuery.sap.getUriParameters(oResolution.url).get("sap-system");
719
+ if (sSystem) {
720
+ aUrlParts.push({ Type: "String", Value: `&sap-system=${sSystem}` });
721
+ }
722
+ }
723
+ break;
724
+ default:
725
+ break;
790
726
  }
791
- oLabel.setText(sLabel + sColon);
792
- oLabel.setTooltip(sLabel);
793
727
  }
794
- return oLabel;
795
- };
728
+ return propertyPartsWithStrings(aUrlParts);
729
+ }
796
730
 
797
- var fieldBinding = function (oFieldValue, sEdmType, sEntityType) {
798
- var oBinding = {}, aPartsWithPropAnnotations = [], aParameters = [], aTextParts = [],
799
- i, j, oPropAnnotations, aParts, oUrl, sUrlProperties, aParams, aTemplProperties, aUrlPathProperties, oParaValue, oParam, fnType;
800
- var getPropAnnotations = function (sEntityType, attribute1, attribute2) {
801
- var oPropAnnotations, result = {};
802
- oPropAnnotations = oMapping.propertyAnnotations[sEntityType];
731
+ function fieldBinding (oFieldValue, sEdmType, sEntityType) {
732
+ const oBinding = {};
733
+ const aPartsWithPropAnnotations = [];
734
+ let aParameters = [];
735
+ const aTextParts = [];
736
+ let oPropAnnotations;
737
+ let aParts;
738
+ let oUrl;
739
+ let sUrlProperties;
740
+ let aParams;
741
+ let aTemplProperties;
742
+ let aUrlPathProperties;
743
+ let oParaValue;
744
+ let oParam;
745
+ let fnType;
746
+ function getPropAnnotations (sEntityType, attribute1, attribute2) {
747
+ const result = {};
748
+ const oPropAnnotations = oMapping.propertyAnnotations[sEntityType];
803
749
  if (oPropAnnotations && oPropAnnotations[attribute1] && oPropAnnotations[attribute1][attribute2]) {
804
750
  if (oPropAnnotations[attribute1][attribute2].Path) {
805
751
  result.Type = "Path";
@@ -810,24 +756,24 @@ sap.ui.define([
810
756
  }
811
757
  }
812
758
  return result;
813
- };
759
+ }
814
760
  if (!oFieldValue) {
815
761
  return false;
816
762
  }
817
- if (oFieldValue.Apply) { //apply function
763
+ if (oFieldValue.Apply) { // apply function
818
764
  if (oFieldValue.Apply.Name === "odata.concat") {
819
765
  if (sEntityType && oMapping.propertyAnnotations && oMapping.propertyAnnotations[sEntityType]) {
820
766
  aParts = oFieldValue.Apply.Parameters;
821
- for (j = 0; j < aParts.length; j += 1) {
767
+ for (let j = 0; j < aParts.length; ++j) {
822
768
  aPartsWithPropAnnotations.push(aParts[j]);
823
769
  if (aParts[j].Type === "Path") {
824
770
  oPropAnnotations = getPropAnnotations(sEntityType, aParts[j].Value, "Org.OData.Measures.V1.ISOCurrency");
825
- if (!$.isEmptyObject(oPropAnnotations)) {
771
+ if (!jQuery.isEmptyObject(oPropAnnotations)) {
826
772
  aPartsWithPropAnnotations.push({ Type: "String", Value: " " });
827
773
  aPartsWithPropAnnotations.push({ Type: oPropAnnotations.Type, Value: oPropAnnotations.Value });
828
774
  }
829
775
  oPropAnnotations = getPropAnnotations(sEntityType, aParts[j].Value, "Org.OData.Measures.V1.Unit");
830
- if (!$.isEmptyObject(oPropAnnotations)) {
776
+ if (!jQuery.isEmptyObject(oPropAnnotations)) {
831
777
  aPartsWithPropAnnotations.push({ Type: "String", Value: " " });
832
778
  aPartsWithPropAnnotations.push({ Type: oPropAnnotations.Type, Value: oPropAnnotations.Value });
833
779
  }
@@ -839,8 +785,8 @@ sap.ui.define([
839
785
  }
840
786
  }
841
787
  } else if (oFieldValue.Path) {
842
- //property path
843
- if (oFieldValue.Path.charAt(0) === "@") { //property path with navigation defined in annotation
788
+ // property path
789
+ if (oFieldValue.Path.charAt(0) === "@") { // property path with navigation defined in annotation
844
790
  oUrl = oMapping[sEntityType][oFieldValue.Path.slice(1, oFieldValue.Path.indexOf("/"))].UrlRef;
845
791
  sUrlProperties = oFieldValue.Path.slice(oFieldValue.Path.indexOf("/") + 1);
846
792
  if (oUrl && oUrl.Apply) {
@@ -848,17 +794,17 @@ sap.ui.define([
848
794
  switch (oUrl.Apply.Name) {
849
795
  case "odata.concat":
850
796
  aParameters = aParams;
851
- aParameters.push({ Type: "String", Value: "/" + sUrlProperties });
797
+ aParameters.push({ Type: "String", Value: `/${sUrlProperties}` });
852
798
  break;
853
799
  case "odata.fillUriTemplate":
854
800
  aTemplProperties = aParams[0].Value.split("{");
855
- for (i in aTemplProperties) {
801
+ for (const i in aTemplProperties) {
856
802
  if (aTemplProperties.hasOwnProperty(i)) {
857
803
  if (aTemplProperties[i].indexOf("}") < 0) {
858
804
  aParameters.push({ Type: "String", Value: aTemplProperties[i] });
859
805
  } else {
860
806
  aUrlPathProperties = aTemplProperties[i].split("}");
861
- for (j = 1; j < aParams.length; j += 1) {
807
+ for (let j = 1; j < aParams.length; ++j) {
862
808
  if (aParams[j].Name === aUrlPathProperties[0]) {
863
809
  oParaValue = aParams[j].Value;
864
810
  if (oParaValue.Path) {
@@ -867,7 +813,7 @@ sap.ui.define([
867
813
  oParam = oParaValue.Apply.Parameters[0];
868
814
  aParameters.push({ Type: oParam.Type, Value: encodeURIComponent(oParam.Value) });
869
815
  // HANA Live - put property as string to parameters (later needed for constructing URL)
870
- aParameters.push({ Type: "String", Value: "{" + encodeURIComponent(oParam.Value) + "}" });
816
+ aParameters.push({ Type: "String", Value: `{${encodeURIComponent(oParam.Value)}}` });
871
817
  }
872
818
  }
873
819
  }
@@ -875,8 +821,8 @@ sap.ui.define([
875
821
  }
876
822
  }
877
823
  }
878
- aParameters.push({ Type: "String", Value: "/" + sUrlProperties });
879
- //HANA Live
824
+ aParameters.push({ Type: "String", Value: `/${sUrlProperties}` });
825
+ // HANA Live
880
826
  oBinding.fnChange = fnChange;
881
827
  break;
882
828
  default:
@@ -884,12 +830,12 @@ sap.ui.define([
884
830
  }
885
831
  oBinding.BindingInfo = propertyPartsWithStrings(aParameters, newModelValue);
886
832
  } else if (oUrl && oUrl.Path) {
887
- aParameters.push({ Type: "Path", Value: oUrl.Path }, { Type: "String", Value: "/" + sUrlProperties });
833
+ aParameters.push({ Type: "Path", Value: oUrl.Path }, { Type: "String", Value: `/${sUrlProperties}` });
888
834
  oBinding.BindingInfo = propertyPartsWithStrings(aParameters, newModelValue);
889
835
  } else if (oUrl && oUrl.String) {
890
- oBinding.String = newModelValue(oUrl.String + "/" + sUrlProperties);
836
+ oBinding.String = newModelValue(`${oUrl.String}/${sUrlProperties}`);
891
837
  }
892
- } else { //property path defined in the model
838
+ } else { // property path defined in the model
893
839
  oBinding.BindingInfo = {};
894
840
  switch (sEdmType) {
895
841
  case "Edm.DateTimeOffset":
@@ -898,7 +844,7 @@ sap.ui.define([
898
844
  break;
899
845
  case "Edm.Time":
900
846
  oBinding.BindingInfo = {
901
- path: oFieldValue.Path + "/ms",
847
+ path: `${oFieldValue.Path}/ms`,
902
848
  type: new Time({
903
849
  source: { pattern: "timestamp" },
904
850
  UTC: true
@@ -922,11 +868,11 @@ sap.ui.define([
922
868
  if (oMapping.propertyAnnotations) {
923
869
  aTextParts.push({ Type: "Path", Value: oFieldValue.Path, EdmType: sEdmType }, { Type: "String", Value: " " });
924
870
  oPropAnnotations = getPropAnnotations(sEntityType, oFieldValue.Path, "Org.OData.Measures.V1.ISOCurrency");
925
- if (!$.isEmptyObject(oPropAnnotations)) {
871
+ if (!jQuery.isEmptyObject(oPropAnnotations)) {
926
872
  aTextParts.push({ Type: oPropAnnotations.Type, Value: oPropAnnotations.Value });
927
873
  }
928
874
  oPropAnnotations = getPropAnnotations(sEntityType, oFieldValue.Path, "Org.OData.Measures.V1.Unit");
929
- if (!$.isEmptyObject(oPropAnnotations)) {
875
+ if (!jQuery.isEmptyObject(oPropAnnotations)) {
930
876
  aTextParts.push({ Type: oPropAnnotations.Type, Value: oPropAnnotations.Value });
931
877
  }
932
878
  oBinding.BindingInfo = propertyPartsWithStrings(aTextParts);
@@ -940,82 +886,207 @@ sap.ui.define([
940
886
  }
941
887
  }
942
888
  } else if (oFieldValue.String) {
943
- //hard coded string in annotation
889
+ // hard coded string in annotation
944
890
  oBinding.String = oFieldValue.String;
945
891
  }
946
892
  return oBinding;
947
- };
893
+ }
948
894
 
949
- var navigationBinding = function (oUrl) {
950
- var aUrlParts = [], aParams, aTemplateParts, j, aTemplValueParts, oUrlParts = {}, oParaValue, oResolution, sSystem;
951
- if (oUrl && oUrl.Apply) {
952
- aParams = oUrl.Apply.Parameters;
953
- switch (oUrl.Apply.Name) {
954
- case "odata.fillUriTemplate":
955
- aParams[0].Value = aParams[0].Value.trim();
956
- aTemplateParts = aParams[0].Value.split("{");
957
- for (j = 0; j < aTemplateParts.length; j += 1) {
958
- if (aTemplateParts[j].indexOf("}") < 0) {
959
- aUrlParts.push({ Value: aTemplateParts[j], Type: "String" });
960
- } else {
961
- aTemplValueParts = aTemplateParts[j].split("}");
962
- oUrlParts = {};
963
- oUrlParts.Value = aTemplValueParts[0];
964
- oUrlParts.Type = "Path";
965
- for (j = 1; j < aParams.length; j += 1) {
966
- if (aParams[j].Name === oUrlParts.Value) {
967
- oParaValue = aParams[j].Value;
968
- if (oParaValue.Path) {
969
- oUrlParts.Value = oParaValue.Path;
970
- } else if (oParaValue.Apply && oParaValue.Apply.Name && oParaValue.Apply.Name.toLowerCase() === "odata.uriencode") {
971
- oUrlParts.Value = oParaValue.Apply.Parameters[0].Value;
972
- }
973
- break;
974
- }
895
+ function dataField (oField, sEntityType, oMetadata, oFacet) {
896
+ let oControl;
897
+ let sNavProperty;
898
+ let oUrl;
899
+ let oText;
900
+ let oVL;
901
+ let SemanticObject;
902
+ let sIntend;
903
+ oControl = new Control();
904
+ const oBinding = fieldBinding(oField.Value, oField.EdmType, sEntityType);
905
+ if (oField.Value && oField.Value["com.sap.vocabularies.UI.v1.IsImageURL"]) {
906
+ oControl = new Image({ height: "50px" });
907
+ if (oBinding.BindingInfo) {
908
+ oControl.bindProperty("src", oBinding.BindingInfo);
909
+ } else {
910
+ oControl.setProperty("src", oBinding.String);
911
+ }
912
+ } else {
913
+ if (oField.UrlRef || oField.Url || (oField.Target && oField.Target.Path)) {
914
+ oControl = new Link({ wrapping: true });
915
+ } else {
916
+ oControl = new Text();
917
+ if (oField.EdmType === "Edm.Decimal" || oField.EdmType === "Edm.Double" || oField.EdmType === "Edm.Single" ||
918
+ oField.EdmType === "Edm.Int16" || oField.EdmType === "Edm.Int32" || oField.EdmType === "Edm.Int64") {
919
+ oControl.setTextAlign(TextAlign.End);
920
+ }
921
+ }
922
+ oControl.addStyleClass("sapFactsheetUtiDataField");
923
+ if (oBinding.BindingInfo) {
924
+ oControl.bindProperty("text", oBinding.BindingInfo);
925
+ } else {
926
+ oControl.setProperty("text", oBinding.String);
927
+ }
928
+ }
929
+ if ((oField.RecordType === "com.sap.vocabularies.UI.v1.DataFieldWithNavigation") && oMetadata) {
930
+ sNavProperty = oField.Target.Path;
931
+ if (oMapping[sEntityType][sNavProperty.slice(1)]) {
932
+ if (sNavProperty.charAt(0) === "@") {
933
+ if (sNavProperty.indexOf("/") < 0) {
934
+ oUrl = oMapping[sEntityType][sNavProperty.slice(1)].UrlRef;
935
+ } else {
936
+ oUrl = oMapping[sEntityType][sNavProperty.slice(1, sNavProperty.indexOf("/"))].UrlRef;
937
+ }
938
+ oControl.bindProperty("href", navigationBinding(oUrl));
939
+ }
940
+ }
941
+ oControl.attachPress((oEvent) => {
942
+ return false;
943
+ });
944
+ }
945
+ if (oField.RecordType === "com.sap.vocabularies.UI.v1.DataFieldWithUrl") {
946
+ if (oField.Url.String) {
947
+ oControl.setHref(oField.Url.String);
948
+ } else {
949
+ oControl.bindProperty("href", navigationBinding(oField.Url));
950
+ // Workaround: no Link if no authority
951
+ oText = new Text({
952
+ wrapping: true
953
+ });
954
+ if (oBinding.BindingInfo) {
955
+ oText.bindProperty("text", jQuery.extend({}, oBinding.BindingInfo));
956
+ } else {
957
+ oText.setProperty("text", oBinding.String);
958
+ }
959
+ oControl.setVisible(false);
960
+ oVL = new VerticalLayout();
961
+ oVL.addContent(oControl);
962
+ oVL.addContent(oText);
963
+ if (!aAllFacets[aAllFacets.indexOf(oFacet)].Links) {
964
+ aAllFacets[aAllFacets.indexOf(oFacet)].Links = [];
965
+ }
966
+ if (oField.Url.Apply) {
967
+ SemanticObject = oField.Url.Apply.Parameters[0].Value.slice(oField.Url.Apply.Parameters[0].Value.indexOf("#") + 1, oField.Url.Apply.Parameters[0].Value.indexOf("-"));
968
+ sIntend = oField.Url.Apply.Parameters[0].Value.slice(oField.Url.Apply.Parameters[0].Value.indexOf("#") + 1, oField.Url.Apply.Parameters[0].Value.indexOf("?"));
969
+ }
970
+ aAllFacets[aAllFacets.indexOf(oFacet)].Links.push({
971
+ sSemanticObject: SemanticObject,
972
+ sIntend: sIntend,
973
+ oVL: oVL
974
+ });
975
+ // Workaround: no Link if no authority
976
+ }
977
+ }
978
+ // Workaround: no Link if no authority
979
+ if (oVL) {
980
+ return oVL;
981
+ }
982
+ return oControl;
983
+
984
+ // Workaround: no Link if no authority
985
+ }
986
+
987
+ function labelBinding (oField, oLabelProperties, aPropExtensions, bWithColon) {
988
+ let sColon = "";
989
+ let sLabel = "";
990
+ let oPropertyExt;
991
+ let oParameter;
992
+ const oLabel = new Label(oLabelProperties);
993
+ oLabel.addStyleClass("sapFactsheetUtiLabel");
994
+ if (bWithColon) {
995
+ sColon = ":";
996
+ }
997
+ if (oField.Label) {
998
+ if (oField.Label.String) {
999
+ oLabel.setText(oField.Label.String.trim() + sColon);
1000
+ oLabel.setTooltip(oField.Label.String.trim());
1001
+ } else if (oField.Label.Path) {
1002
+ oLabel.bindProperty("text", oField.Label.Path);
1003
+ oLabel.bindProperty("tooltip", oField.Label.Path);
1004
+ }
1005
+ } else if (oField.Value) {
1006
+ if (oField.Value.Path && aPropExtensions) {
1007
+ oPropertyExt = aPropExtensions[oField.Value.Path];
1008
+ for (const j in oPropertyExt) {
1009
+ if (oPropertyExt.hasOwnProperty(j)) {
1010
+ if (j === "http://www.sap.com/Protocols/SAPData") {
1011
+ if (oPropertyExt[j].label) {
1012
+ sLabel = oPropertyExt[j].label;
1013
+ break;
975
1014
  }
976
- aUrlParts.push(oUrlParts);
977
- aUrlParts.push({ Value: aTemplValueParts[1], Type: "String" });
978
1015
  }
979
1016
  }
980
- oResolution = sap.ushell.Container.getService("NavTargetResolutionInternal").getCurrentResolution();
981
- if (oResolution && oResolution.url) {
982
- sSystem = jQuery.sap.getUriParameters(oResolution.url).get("sap-system");
983
- if (sSystem) {
984
- aUrlParts.push({ Type: "String", Value: "&sap-system=" + sSystem });
1017
+ }
1018
+ } else if (oField.Value.Apply && (oField.Value.Apply.Name === "odata.concat")) {
1019
+ for (const k in oField.Value.Apply.Parameters) {
1020
+ if (oField.Value.Apply.Parameters.hasOwnProperty(k)) {
1021
+ oParameter = oField.Value.Apply.Parameters[k];
1022
+ if (oParameter.Type === "Path") {
1023
+ oPropertyExt = aPropExtensions[oParameter.Value];
1024
+ for (const j in oPropertyExt) {
1025
+ if (oPropertyExt.hasOwnProperty(j)) {
1026
+ if (j === "http://www.sap.com/Protocols/SAPData") {
1027
+ if (oPropertyExt[j].label) {
1028
+ sLabel = oPropertyExt[j].label;
1029
+ break;
1030
+ }
1031
+ }
1032
+ }
1033
+ }
1034
+ break;
985
1035
  }
986
1036
  }
987
- break;
988
- default:
989
- break;
1037
+ }
990
1038
  }
1039
+ oLabel.setText(sLabel + sColon);
1040
+ oLabel.setTooltip(sLabel);
991
1041
  }
992
- return propertyPartsWithStrings(aUrlParts);
993
- };
1042
+ return oLabel;
1043
+ }
994
1044
 
995
- var columnHAlign = function (oField) {
996
- var hAlign = TextAlign.Begin;
1045
+ function columnHAlign (oField) {
1046
+ let hAlign = TextAlign.Begin;
997
1047
  if (oField.EdmType === "Edm.Decimal" || oField.EdmType === "Edm.Double" || oField.EdmType === "Edm.Single" ||
998
1048
  oField.EdmType === "Edm.Int16" || oField.EdmType === "Edm.Int32" || oField.EdmType === "Edm.Int64") {
999
1049
  hAlign = TextAlign.End;
1000
1050
  }
1001
- return hAlign;
1002
- };
1051
+ return hAlign;
1052
+ }
1053
+
1054
+ /**
1055
+ * Returns the importance (High, Medium, Low) of a given record.
1056
+ * Necessary as the annotation for importance changed in OData V4 and we'd like to support both V2 and V4.
1057
+ * @param {object} oRecord as object.
1058
+ * @returns {string} Importance of the record (High, Medium, Low).
1059
+ */
1060
+ function getImportanceOfRecord (oRecord) {
1061
+ let sEnumMember = "";
1062
+ if (oRecord.Importance) {
1063
+ sEnumMember = oRecord.Importance.EnumMember;
1064
+ } else if (oRecord["com.sap.vocabularies.UI.v1.Importance"]) {
1065
+ sEnumMember = oRecord["com.sap.vocabularies.UI.v1.Importance"].EnumMember;
1066
+ }
1067
+ return sEnumMember.substr(sEnumMember.indexOf("/") + 1);
1068
+ }
1003
1069
 
1004
- var formLayoutFactory = function (oModel, sEntitySet, aFormData, oMaxItems, oMetadata, oFacet) {
1005
- var i, j = 0, iSumPrioHigh = 0, iSumPrioMedium = 0, iSumPrioLow = 0,
1006
- sEntityType, aPropertyExtensions, oImportance, oControl, oLabel, oSimpleForm;
1070
+ function formLayoutFactory (oModel, sEntitySet, aFormData, oMaxItems, oMetadata, oFacet) {
1071
+ let j = 0;
1072
+ let iSumPrioHigh = 0;
1073
+ let iSumPrioMedium = 0;
1074
+ let iSumPrioLow = 0;
1075
+ let oImportance;
1076
+ let oControl;
1077
+ let oLabel;
1007
1078
  if (!oMetadata) {
1008
1079
  oMetadata = oModel.getServiceMetadata();
1009
1080
  }
1010
1081
  if (!aFormData) {
1011
1082
  aFormData = [];
1012
1083
  }
1013
- sEntityType = getEntityType(sEntitySet, oMetadata);
1014
- oSimpleForm = new SimpleForm({
1084
+ const sEntityType = getEntityType(sEntitySet, oMetadata);
1085
+ const oSimpleForm = new SimpleForm({
1015
1086
  labelMinWidth: 150,
1016
1087
  maxContainerCols: 2
1017
1088
  });
1018
- aPropertyExtensions = (oMapping.propertyExtensions) ? oMapping.propertyExtensions[sEntityType] : [];
1089
+ const aPropertyExtensions = (oMapping.propertyExtensions) ? oMapping.propertyExtensions[sEntityType] : [];
1019
1090
  if (oMaxItems && oMaxItems.High) {
1020
1091
  iSumPrioHigh = oMaxItems.High;
1021
1092
  }
@@ -1025,7 +1096,7 @@ sap.ui.define([
1025
1096
  if (oMaxItems && oMaxItems.Low) {
1026
1097
  iSumPrioLow = oMaxItems.Low;
1027
1098
  }
1028
- for (i = 0; i < aFormData.length; i += 1) {
1099
+ for (let i = 0; i < aFormData.length; ++i) {
1029
1100
  oImportance = getImportanceOfRecord(aFormData[i]);
1030
1101
  if (oMaxItems && (oImportance === "High")) {
1031
1102
  if (iSumPrioHigh) {
@@ -1035,7 +1106,7 @@ sap.ui.define([
1035
1106
  }
1036
1107
  } else if (oMaxItems && (oImportance === "Medium")) {
1037
1108
  if (iSumPrioMedium) {
1038
- iSumPrioMedium -= 1;
1109
+ --iSumPrioMedium;
1039
1110
  } else {
1040
1111
  continue;
1041
1112
  }
@@ -1049,7 +1120,7 @@ sap.ui.define([
1049
1120
  if (oMaxItems && oMaxItems.Total && (j >= oMaxItems.Total)) {
1050
1121
  break;
1051
1122
  }
1052
- j += 1;
1123
+ ++j;
1053
1124
  oControl = new Control().setModel(oModel);
1054
1125
  oLabel = labelBinding(aFormData[i], { textAlign: TextAlign.End }, aPropertyExtensions, false);
1055
1126
  oLabel.addStyleClass("sapFactsheetUtiFormPadding");
@@ -1063,147 +1134,85 @@ sap.ui.define([
1063
1134
  }
1064
1135
  oSimpleForm.addStyleClass("sapFactsheetUtiFormLayout");
1065
1136
  return oSimpleForm;
1066
- };
1137
+ }
1067
1138
 
1068
- var facetFactory = function (oModel, sEntitySet, oSelectedFacet, sBindingPath, oFacet) {
1069
- var sAssociationMultiplicity = "", aTG = [],
1070
- i, oMetadata, oTG, sNavPath, sAnnoPath, aAnnoPath, sNavEntitySet, oList, aIdentification, oVL, aStatusInfo, oFG, sEntityType, aColumns, oPropertyExtensions;
1071
- oMetadata = oModel.getServiceMetadata();
1072
- switch (oSelectedFacet.RecordType) {
1073
- case "com.sap.vocabularies.UI.v1.ReferenceFacet":
1074
- oTG = new UnifiedThingGroup();
1075
- if (oSelectedFacet.Label && oSelectedFacet.Label.String) {
1076
- oTG.setTitle(oSelectedFacet.Label.String);
1077
- }
1078
- sNavPath = oSelectedFacet.Target.AnnotationPath;
1079
- sAnnoPath = sNavPath.substring(sNavPath.lastIndexOf("@") + 1);
1080
- sNavPath = sNavPath.substring(0, sNavPath.lastIndexOf("@") - 1);
1081
- if (sNavPath) {
1082
- sAssociationMultiplicity = getAssociationMultiplicity(sEntitySet, sNavPath, oMetadata);
1083
- }
1084
- aAnnoPath = sAnnoPath.split("#");
1085
- switch (aAnnoPath[0]) {
1086
- case "com.sap.vocabularies.UI.v1.LineItem":
1087
- case "com.sap.vocabularies.UI.v1.Chart":
1088
- case "com.sap.vocabularies.UI.v1.Badge":
1089
- case "com.sap.vocabularies.UI.v1.Identification":
1090
- if (sNavPath) {
1091
- sNavEntitySet = getNavEntitySet(sEntitySet, sNavPath, oMetadata);
1092
- sEntityType = getEntityType(sNavEntitySet, oMetadata);
1093
- } else {
1094
- sEntityType = getEntityType(sEntitySet, oMetadata);
1095
- }
1096
- // In case of a chart we need to have the definition of the line items
1097
- if (aAnnoPath[0] === "com.sap.vocabularies.UI.v1.Chart") {
1098
- sAnnoPath = "com.sap.vocabularies.UI.v1.LineItem";
1099
- }
1100
- aColumns = oMapping[sEntityType][sAnnoPath];
1101
- if (oMapping.propertyExtensions) {
1102
- oPropertyExtensions = oMapping.propertyExtensions[sEntityType];
1103
- }
1104
- if (sAssociationMultiplicity === "*" && aAnnoPath[0] !== "com.sap.vocabularies.UI.v1.Identification") {
1105
- oList = itemListFactory(oModel, aColumns, sEntityType, oMetadata, sBindingPath + "/" + sNavPath, oSelectedFacet, oPropertyExtensions, oFacet);
1106
- oTG.setContent(oList);
1107
- }
1108
- if (aAnnoPath[0] === "com.sap.vocabularies.UI.v1.Identification") {
1109
- aIdentification = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Identification"];
1110
- oVL = new VerticalLayout({ width: "100%" }).setModel(oModel);
1111
- if (sNavPath) {
1112
- oVL.addContent(formLayoutFactory(oModel, sNavEntitySet, aIdentification, null, null, oFacet)).addStyleClass("sapFactsheetUtiPanel");
1113
- oVL.bindElement(sBindingPath + "/" + sNavPath);
1114
- } else {
1115
- oVL.addContent(formLayoutFactory(oModel, sEntitySet, aIdentification, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel"));
1116
- }
1117
- oTG.setContent(oVL);
1118
- }
1119
- break;
1120
- case "com.sap.vocabularies.UI.v1.StatusInfo":
1121
- if (sNavPath) {
1122
- sNavEntitySet = getNavEntitySet(sEntitySet, sNavPath, oMetadata);
1123
- aStatusInfo = oMapping[getEntityType(sNavEntitySet, oMetadata)]["com.sap.vocabularies.UI.v1.StatusInfo"];
1124
- oTG.setContent(formLayoutFactory(oModel, sNavEntitySet, aStatusInfo, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel").bindElement(sBindingPath + "/" + sNavPath));
1125
- } else {
1126
- aStatusInfo = oMapping[getEntityType(sEntitySet, oMetadata)]["com.sap.vocabularies.UI.v1.StatusInfo"];
1127
- oTG.setContent(formLayoutFactory(oModel, sEntitySet, aStatusInfo, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel"));
1128
- }
1129
- break;
1130
- case "com.sap.vocabularies.UI.v1.FieldGroup":
1131
- oFG = oMapping[getEntityType(sEntitySet, oMetadata)][sAnnoPath];
1132
- if (oFG) {
1133
- if (!oTG.getTitle() || (oTG.getTitle() === "")) {
1134
- if (oFG.Label) {
1135
- if (oFG.Label.String) {
1136
- oTG.setTitle(oFG.Label.String);
1137
- } else if (oFG.Label.Path) {
1138
- oTG.bindProperty("title", oFG.Label.Path);
1139
+ function checkLinks (index) {
1140
+ let aItems;
1141
+ let aCells;
1142
+ let aLinks;
1143
+ if (oLinkAuthorised.InteropCompleted === true) {
1144
+ for (let i = 0; i < aAllFacets.length; ++i) {
1145
+ if (aAllFacets[i].bLoaded && !aAllFacets[i].bProcessed && aAllFacets[i].Links) {
1146
+ aLinks = aAllFacets[i].Links;
1147
+ for (let j = 0; j < aLinks.length; ++j) {
1148
+ if (oLinkAuthorised.hasOwnProperty(aLinks[j].sIntend) === true) {
1149
+ if (aAllFacets[i].bIsTable === true) {
1150
+ if (aAllFacets[i].oTableItems) {
1151
+ aItems = aAllFacets[i].oTableItems;
1152
+ for (let k = 0; k < aItems.length; ++k) {
1153
+ aCells = aItems[k].getCells();
1154
+ for (let n = 0; n < aCells.length; ++n) {
1155
+ if (aCells[n] instanceof VerticalLayout &&
1156
+ aCells[n].getContent()[0].getBindingInfo("href").parts === aLinks[j].oVL.getContent()[0].getBindingInfo("href").parts &&
1157
+ aCells[n].getContent()[1].getBindingInfo("text").parts === aLinks[j].oVL.getContent()[1].getBindingInfo("text").parts) {
1158
+ aCells[n].getContent()[0].setVisible(true);
1159
+ aCells[n].getContent()[1].setVisible(false);
1160
+ }
1161
+ }
1139
1162
  }
1140
1163
  }
1141
- }
1142
- if (sNavPath) {
1143
- sNavEntitySet = getNavEntitySet(sEntitySet, sNavPath, oMetadata);
1144
- oTG.setContent(formLayoutFactory(oModel, sNavEntitySet, oFG.Data, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel").bindElement(sBindingPath + "/" + sNavPath));
1145
1164
  } else {
1146
- oTG.setContent(formLayoutFactory(oModel, sEntitySet, oFG.Data, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel"));
1165
+ aLinks[j].oVL.getContent()[0].setVisible(true);
1166
+ aLinks[j].oVL.getContent()[1].setVisible(false);
1147
1167
  }
1168
+ } else if (aAllFacets[i].bIsTable === false) {
1169
+ aLinks[j].oVL.getContent()[1].setText(aLinks[j].oVL.getContent()[0].getText());
1148
1170
  }
1149
- break;
1150
- default:
1151
- break;
1152
- }
1153
- return oTG;
1154
- case "com.sap.vocabularies.UI.v1.ReferenceURLFacet":
1155
- oTG = new ThingGroup({ title: oSelectedFacet.Label.String });
1156
- oTG.setContent(showHTML(oSelectedFacet));
1157
- return oTG;
1158
- case "com.sap.vocabularies.UI.v1.CollectionFacet":
1159
- for (i = 0; i < oSelectedFacet.Facets.length; i += 1) {
1160
- aTG.push(facetFactory(oModel, sEntitySet, oSelectedFacet.Facets[i], sBindingPath, oFacet));
1171
+ aAllFacets[i].bProcessed = true;
1172
+ }
1161
1173
  }
1162
- return aTG;
1163
- default:
1164
- break;
1174
+ }
1165
1175
  }
1166
- };
1167
-
1168
- var showHTML = function (oHTMLData) {
1169
- var oImage, oHTMLCtrl, sIframe;
1170
- switch (oHTMLData.UrlContentType.String) {
1171
- case "image/png":
1172
- case "image/jpeg":
1173
- case "image/gif":
1174
- oImage = new Image({ width: "100%" });
1175
- if (oHTMLData.Url.String) {
1176
- oImage.setSrc(oHTMLData.Url.String);
1177
- }
1178
- return oImage;
1179
- default:
1180
- oHTMLCtrl = new HTML();
1181
- if (oHTMLData.Url.String) {
1182
- oHTMLCtrl.setContent("<iframe src = '" + oHTMLData.Url.String + "' width='100%' height='250px' frameborder='0'></iframe>");
1183
- } else if (oHTMLData.Url.Path) {
1184
- oHTMLCtrl.bindProperty("content", {
1185
- path: oHTMLData.Url.Path,
1186
- formatter: function (/*value*/) {
1187
- sIframe = "<iframe src = '" + oHTMLData.Url.Path + "' width='100%' height='250px' frameborder='0'></iframe>";
1188
- return sIframe;
1189
- }
1190
- });
1176
+ if (index >= 0) {
1177
+ if (aAllFacets[index].bLoaded && !aAllFacets[index].bProcessed && aAllFacets[index].Links) {
1178
+ aLinks = aAllFacets[index].Links;
1179
+ for (let j = 0; j < aLinks.length; ++j) {
1180
+ if (aAllFacets[index].bIsTable === false) {
1181
+ aLinks[j].oVL.getContent()[1].setText(aLinks[j].oVL.getContent()[0].getText());
1182
+ }
1191
1183
  }
1192
- return oHTMLCtrl;
1184
+ }
1193
1185
  }
1194
- };
1186
+ }
1195
1187
 
1196
- var itemListFactory = function (oModel, aColumns, sEntityType, oMetadata, sBindingPath, oSelectedFacet, oPropertyExtensions, oFacet) {
1197
- var aLabels = [], aControls = [], cells = [], columns = [], aSortItems = [], aFilterItems = [], bEnableSortFilterDialog = false,
1198
- i, k, aPropertyExtensions, iMaxColumns, iPrioHighColumnCount, iPrioMediumColumnCount, oImportance, oLabel, bVisible,
1199
- oControl, oTemplateData, sTitle, oTable, oSortItem, oVSDialog, sColumnName, oFilterItem, oCustomFilterControl,
1200
- oSuiteUiCommonsResourceBundle, bSortable, sConcatColumnName;
1201
- oSuiteUiCommonsResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.commons");
1188
+ function itemListFactory (oModel, aColumns, sEntityType, oMetadata, sBindingPath, oSelectedFacet, oPropertyExtensions, oFacet) {
1189
+ const aLabels = [];
1190
+ const aControls = [];
1191
+ const cells = [];
1192
+ const columns = [];
1193
+ const aSortItems = [];
1194
+ const aFilterItems = [];
1195
+ let bEnableSortFilterDialog = false;
1196
+ let iMaxColumns;
1197
+ let iPrioHighColumnCount;
1198
+ let iPrioMediumColumnCount;
1199
+ let oImportance;
1200
+ let oLabel;
1201
+ let bVisible;
1202
+ let oControl;
1203
+ let sTitle;
1204
+ let oSortItem;
1205
+ let sColumnName;
1206
+ let oFilterItem;
1207
+ let oCustomFilterControl;
1208
+ let bSortable;
1209
+ let sConcatColumnName;
1210
+ const oSuiteUiCommonsResourceBundle = Core.getLibraryResourceBundle("sap.suite.ui.commons");
1202
1211
  if (!oMetadata) {
1203
1212
  oMetadata = oModel.getServiceMetadata();
1204
1213
  }
1205
- aPropertyExtensions = (oMapping.propertyExtensions) ? oMapping.propertyExtensions[sEntityType] : [];
1206
- iMaxColumns = 6; //Default value for desktop
1214
+ const aPropertyExtensions = (oMapping.propertyExtensions) ? oMapping.propertyExtensions[sEntityType] : [];
1215
+ iMaxColumns = 6; // Default value for desktop
1207
1216
  if (jQuery.device.is.tablet && jQuery.device.is.landscape) {
1208
1217
  iMaxColumns = 5;
1209
1218
  } else if (jQuery.device.is.tablet && jQuery.device.is.portrait) {
@@ -1215,7 +1224,7 @@ sap.ui.define([
1215
1224
  }
1216
1225
  iPrioHighColumnCount = 0;
1217
1226
  iPrioMediumColumnCount = 0;
1218
- for (i = 0; i < aColumns.length; i += 1) {
1227
+ for (let i = 0; i < aColumns.length; ++i) {
1219
1228
  oImportance = getImportanceOfRecord(aColumns[i]);
1220
1229
  if (oImportance === "High") {
1221
1230
  iPrioHighColumnCount += 1;
@@ -1228,7 +1237,7 @@ sap.ui.define([
1228
1237
  }
1229
1238
  columns.push(new Column({ visible: false }));
1230
1239
  cells.push(new Text().bindText("__metadata/uri"));
1231
- for (i = 0; i < aColumns.length; i += 1) {
1240
+ for (let i = 0; i < aColumns.length; ++i) {
1232
1241
  sConcatColumnName = "";
1233
1242
  oControl = new Control();
1234
1243
  oImportance = getImportanceOfRecord(aColumns[i]);
@@ -1263,7 +1272,7 @@ sap.ui.define([
1263
1272
  } else {
1264
1273
  // A column consists of concatenated fields. Only if all fields are sortable, then allow a column sorting.
1265
1274
  bSortable = true;
1266
- for (k = 0; k < aColumns[i].Value.Apply.Parameters.length; k += 1) {
1275
+ for (let k = 0; k < aColumns[i].Value.Apply.Parameters.length; ++k) {
1267
1276
  if (aColumns[i].Value.Apply.Parameters[k].Type === "Path") {
1268
1277
  sColumnName = aColumns[i].Value.Apply.Parameters[k].Value;
1269
1278
  // Check if column is sortable (if nothing is specified, column is sortable).
@@ -1318,7 +1327,7 @@ sap.ui.define([
1318
1327
  columns.push(new Column({ header: oLabel, hAlign: columnHAlign(aColumns[i]), visible: bVisible }));
1319
1328
  cells.push(oControl);
1320
1329
  }
1321
- oTemplateData = new ColumnListItem({
1330
+ const oTemplateData = new ColumnListItem({
1322
1331
  type: ListType.Navigation,
1323
1332
  unread: false,
1324
1333
  cells: cells
@@ -1326,10 +1335,11 @@ sap.ui.define([
1326
1335
  if (oSelectedFacet) {
1327
1336
  sTitle = oSelectedFacet.Label.String;
1328
1337
  }
1329
- oTemplateData.attachPress({ aColumns: aColumns, aLabels: aLabels, aControls: aControls, sTitle: sTitle }, function (oEvent, oData) {
1330
- var i, sItem, oContent, oLabel, oThingGroup, oPage, oValue;
1331
- sItem = oEvent.getSource().getCells()[0].getText().substr(oEvent.getSource().getCells()[0].getText().lastIndexOf("/"));
1332
- oContent = new Table({
1338
+ oTemplateData.attachPress({ aColumns: aColumns, aLabels: aLabels, aControls: aControls, sTitle: sTitle }, (oEvent) => {
1339
+ let oLabel;
1340
+ let oValue;
1341
+ const sItem = oEvent.getSource().getCells()[0].getText().substr(oEvent.getSource().getCells()[0].getText().lastIndexOf("/"));
1342
+ const oContent = new Table({
1333
1343
  backgroundDesign: BackgroundDesign.Transparent,
1334
1344
  showSeparators: ListSeparators.None,
1335
1345
  columns: [
@@ -1341,29 +1351,28 @@ sap.ui.define([
1341
1351
  oContent.addStyleClass("sapFactsheetUtiTilePadding");
1342
1352
  oContent.addStyleClass("sapFactsheetUtiTableNoTopBorder");
1343
1353
  oContent.bindElement(sItem);
1344
- for (i = 0; i < aColumns.length; i += 1) {
1354
+ for (let i = 0; i < aColumns.length; ++i) {
1345
1355
  oLabel = aLabels[i].clone();
1346
- oLabel.setText(oLabel.getText() + ":");
1356
+ oLabel.setText(`${oLabel.getText()}:`);
1347
1357
  oValue = aControls[i].clone();
1348
1358
  oLabel.setLabelFor(oValue);
1349
1359
  oContent.addItem(new ColumnListItem({ cells: [oLabel, oValue] }));
1350
1360
  }
1351
- oThingGroup = new UnifiedThingGroup({
1361
+ const oThingGroup = new UnifiedThingGroup({
1352
1362
  content: oContent,
1353
1363
  title: sTitle,
1354
1364
  description: getTIDescription()
1355
1365
  });
1356
- oPage = new Page({
1366
+ const oPage = new Page({
1357
1367
  title: oTI.getTitle(),
1358
1368
  showNavButton: true,
1359
1369
  content: [oThingGroup]
1360
1370
  });
1361
1371
  oTI.navigateToPage(oPage, true);
1362
- //Workaround: no Link if no authority
1363
- oTI.attachAfterNavigate(oContent, function (oEvent) {
1372
+ // Workaround: no Link if no authority
1373
+ oTI.attachAfterNavigate(oContent, (oEvent) => {
1364
1374
  if (oEvent.getParameters().getParameters().toId.indexOf("__page") >= 0) {
1365
- var aItems;
1366
- aItems = oContent.getItems();
1375
+ const aItems = oContent.getItems();
1367
1376
  if (aItems.length > 0 && aAllFacets.indexOf(oFacet) >= 0) {
1368
1377
  aAllFacets[aAllFacets.indexOf(oFacet)].bLoaded = true;
1369
1378
  aAllFacets[aAllFacets.indexOf(oFacet)].bProcessed = false;
@@ -1373,24 +1382,24 @@ sap.ui.define([
1373
1382
  }
1374
1383
  }
1375
1384
  });
1376
- //Workaround: no Link if no authority
1385
+ // Workaround: no Link if no authority
1377
1386
  });
1378
- oTable = new Table({ growing: true, columns: columns });
1387
+ const oTable = new Table({ growing: true, columns: columns });
1379
1388
  oTable.setModel(oModel);
1380
1389
  oTable.bindItems({
1381
1390
  path: sBindingPath,
1382
1391
  template: oTemplateData
1383
1392
  });
1384
- var customFilterString = new VBox({
1393
+ const customFilterString = new VBox({
1385
1394
  items: [
1386
1395
  new Input({
1387
1396
  placeholder: oSuiteUiCommonsResourceBundle.getText("USHELL_FACTSHEET_ENTER_YOUR_FILTER"),
1388
1397
  change: function (oEvent) {
1389
- var sParentParentId, vsd, filters, customFilter, i;
1390
- sParentParentId = oEvent.getSource().getParent().getParent().getId();
1391
- vsd = sap.ui.getCore().byId(sParentParentId.substr(0, sParentParentId.indexOf("-")));
1392
- filters = vsd.getFilterItems();
1393
- for (i = 0; i < filters.length; i += 1) {
1398
+ let customFilter;
1399
+ const sParentParentId = oEvent.getSource().getParent().getParent().getId();
1400
+ const vsd = Core.byId(sParentParentId.substr(0, sParentParentId.indexOf("-")));
1401
+ const filters = vsd.getFilterItems();
1402
+ for (let i = 0; i < filters.length; ++i) {
1394
1403
  if (filters[i] instanceof ViewSettingsCustomItem && filters[i].getKey() === this.oParent.data("ColumnName")) {
1395
1404
  customFilter = filters[i];
1396
1405
  break;
@@ -1409,7 +1418,7 @@ sap.ui.define([
1409
1418
  }).addStyleClass("sapFactsheetUtiFilterInput")
1410
1419
  ]
1411
1420
  });
1412
- var customFilterDecimal = new VBox({
1421
+ const customFilterDecimal = new VBox({
1413
1422
  items: [
1414
1423
  new List({
1415
1424
  mode: ListMode.SingleSelectLeft,
@@ -1429,11 +1438,11 @@ sap.ui.define([
1429
1438
  new Input({
1430
1439
  placeholder: oSuiteUiCommonsResourceBundle.getText("USHELL_FACTSHEET_ENTER_YOUR_FILTER"),
1431
1440
  change: function (oEvent) {
1432
- var sParentParentId, vsd, filters, customFilter, i;
1433
- sParentParentId = oEvent.getSource().getParent().getParent().getId();
1434
- vsd = sap.ui.getCore().byId(sParentParentId.substr(0, sParentParentId.indexOf("-")));
1435
- filters = vsd.getFilterItems();
1436
- for (i = 0; i < filters.length; i += 1) {
1441
+ let customFilter;
1442
+ const sParentParentId = oEvent.getSource().getParent().getParent().getId();
1443
+ const vsd = Core.byId(sParentParentId.substr(0, sParentParentId.indexOf("-")));
1444
+ const filters = vsd.getFilterItems();
1445
+ for (let i = 0; i < filters.length; ++i) {
1437
1446
  if ((filters[i] instanceof ViewSettingsCustomItem) && (filters[i].getKey() === this.oParent.data("ColumnName"))) {
1438
1447
  customFilter = filters[i];
1439
1448
  break;
@@ -1477,11 +1486,11 @@ sap.ui.define([
1477
1486
  valueFormat: new DateTime({ pattern: "yyyy/MM/dd HH:mm:ss UTC+00:00" }).getOutputPattern(),
1478
1487
  placeholder: oSuiteUiCommonsResourceBundle.getText("USHELL_FACTSHEET_ENTER_YOUR_FILTER"),
1479
1488
  change: function (oEvent) {
1480
- var sParentParentId, vsd, filters, customFilter, i;
1481
- sParentParentId = oEvent.getSource().getParent().getParent().getId();
1482
- vsd = sap.ui.getCore().byId(sParentParentId.substr(0, sParentParentId.indexOf("-")));
1483
- filters = vsd.getFilterItems();
1484
- for (i = 0; i < filters.length; i += 1) {
1489
+ let customFilter;
1490
+ const sParentParentId = oEvent.getSource().getParent().getParent().getId();
1491
+ const vsd = Core.byId(sParentParentId.substr(0, sParentParentId.indexOf("-")));
1492
+ const filters = vsd.getFilterItems();
1493
+ for (let i = 0; i < filters.length; ++i) {
1485
1494
  if ((filters[i] instanceof ViewSettingsCustomItem) && (filters[i].getKey() === this.oParent.data("ColumnName"))) {
1486
1495
  customFilter = filters[i];
1487
1496
  break;
@@ -1499,19 +1508,22 @@ sap.ui.define([
1499
1508
  ]
1500
1509
  });
1501
1510
 
1502
- var customFilterCallback = function (oControl) {
1503
- var aFilters = [], aItems = oControl.getItems(), i, sFilterOperator, sFilterValue;
1511
+ function customFilterCallback (oControl) {
1512
+ const aFilters = [];
1513
+ const aItems = oControl.getItems();
1514
+ let sFilterOperator;
1515
+ let sFilterValue;
1504
1516
  if (aItems[0].getParent().data("EdmType") === "Edm.String" && aItems[0].getValue()) {
1505
1517
  aFilters.push(new Filter(aItems[0].getParent().data("ColumnName"), FilterOperator.Contains, aItems[0].getValue()));
1506
1518
  } else if (aItems[0].getParent().data("EdmType") === "Edm.Decimal" && aItems[1].getValue()) {
1507
- for (i = 0; i < aItems[0].getItems().length; i += 1) {
1519
+ for (let i = 0; i < aItems[0].getItems().length; ++i) {
1508
1520
  if (aItems[0].getItems()[i].getSelected() === true) {
1509
1521
  sFilterOperator = aItems[0].getItems()[i].data("FilterOperator");
1510
1522
  break;
1511
1523
  }
1512
1524
  }
1513
1525
  sFilterValue = aItems[1].getValue();
1514
- for (i = sFilterValue.length - 1; i > 0; i -= 1) {
1526
+ for (let i = sFilterValue.length - 1; i > 0; --i) {
1515
1527
  if (sFilterValue[i] === ",") {
1516
1528
  sFilterValue = sFilterValue.replace(sFilterValue[i], ".");
1517
1529
  break;
@@ -1519,7 +1531,7 @@ sap.ui.define([
1519
1531
  }
1520
1532
  aFilters.push(new Filter(aItems[1].getParent().data("ColumnName"), sFilterOperator, sFilterValue));
1521
1533
  } else if (aItems[0].getParent().data("EdmType") === "Edm.Date" && aItems[1].getValue()) {
1522
- for (i = 0; i < aItems[0].getItems().length; i += 1) {
1534
+ for (let i = 0; i < aItems[0].getItems().length; ++i) {
1523
1535
  if (aItems[0].getItems()[i].getSelected() === true) {
1524
1536
  sFilterOperator = aItems[0].getItems()[i].data("FilterOperator");
1525
1537
  break;
@@ -1530,15 +1542,17 @@ sap.ui.define([
1530
1542
  aFilters.push(new Filter(aItems[0].getParent().data("ColumnName"), FilterOperator.EQ, aItems[0].getValue()));
1531
1543
  }
1532
1544
  return aFilters;
1533
- };
1534
- var customFilterReset = function (oEvent) {
1535
- var source = oEvent.getSource(), filters = source.getFilterItems(), i, j, customControlItems;
1536
- for (i = 0; i < filters.length; i += 1) {
1545
+ }
1546
+ function customFilterReset (oEvent) {
1547
+ const source = oEvent.getSource();
1548
+ const filters = source.getFilterItems();
1549
+ let customControlItems;
1550
+ for (let i = 0; i < filters.length; ++i) {
1537
1551
  if (filters[i] && filters[i] instanceof ViewSettingsCustomItem) {
1538
1552
  filters[i].setSelected(false);
1539
1553
  filters[i].setFilterCount(0);
1540
1554
  customControlItems = filters[i].getCustomControl().getItems();
1541
- for (j = 0; j < customControlItems.length; j += 1) {
1555
+ for (let j = 0; j < customControlItems.length; ++j) {
1542
1556
  // Clear of sap.m.Input and sap.m.DateTimeInput
1543
1557
  if ((customControlItems[j] instanceof Input) || (customControlItems[j] instanceof DateTimeInput)) {
1544
1558
  customControlItems[j].setValue("");
@@ -1550,9 +1564,9 @@ sap.ui.define([
1550
1564
  }
1551
1565
  }
1552
1566
  }
1553
- };
1554
- var customFilterCancel = customFilterReset;
1555
- for (i = 0; i < columns.length; i += 1) {
1567
+ }
1568
+ const customFilterCancel = customFilterReset;
1569
+ for (let i = 0; i < columns.length; ++i) {
1556
1570
  if (columns[i + 1]) {
1557
1571
  oLabel = aLabels[i].clone();
1558
1572
  if (oLabel.getText() && (oLabel.data("IsSortable") === "true") && columns[i + 1].getVisible()) {
@@ -1590,22 +1604,27 @@ sap.ui.define([
1590
1604
  }
1591
1605
  }
1592
1606
  }
1593
- oVSDialog = new ViewSettingsDialog({
1607
+ const oVSDialog = new ViewSettingsDialog({
1594
1608
  sortItems: aSortItems,
1595
1609
  filterItems: aFilterItems,
1596
1610
  cancel: customFilterCancel,
1597
1611
  resetFilters: customFilterReset,
1598
1612
  confirm: function (evt) {
1599
- var aSorters = [], aPath = [], aFilters = [], aTableFilters = [],
1600
- i, p, mParams, oBinding, sPath, bDescending, oCallback;
1601
- mParams = evt.getParameters();
1602
- oBinding = oTable.getBinding("items");
1613
+ const aSorters = [];
1614
+ let aPath = [];
1615
+ let aFilters = [];
1616
+ let aTableFilters = [];
1617
+ let sPath;
1618
+ let bDescending;
1619
+ let oCallback;
1620
+ const mParams = evt.getParameters();
1621
+ const oBinding = oTable.getBinding("items");
1603
1622
  if (mParams.sortItem) {
1604
1623
  sPath = mParams.sortItem.getKey();
1605
1624
  bDescending = mParams.sortDescending;
1606
1625
  if (sPath.indexOf(";") > 0) {
1607
1626
  aPath = sPath.split(";");
1608
- for (i = 0; i < aPath.length; i += 1) {
1627
+ for (let i = 0; i < aPath.length; ++i) {
1609
1628
  aSorters.push(new Sorter(aPath[i], bDescending));
1610
1629
  }
1611
1630
  } else if (sPath) {
@@ -1613,8 +1632,8 @@ sap.ui.define([
1613
1632
  }
1614
1633
  oBinding.sort(aSorters);
1615
1634
  }
1616
- p = mParams;
1617
- for (i = 0; i < p.filterItems.length; i += 1) {
1635
+ const p = mParams;
1636
+ for (let i = 0; i < p.filterItems.length; ++i) {
1618
1637
  if (p.filterItems[i] instanceof ViewSettingsCustomItem) { // custom control filter
1619
1638
  oCallback = p.filterItems[i].getCustomData()[0].getValue();
1620
1639
  aFilters = oCallback.apply(this, [p.filterItems[i].getCustomControl()]);
@@ -1647,42 +1666,185 @@ sap.ui.define([
1647
1666
  new ToolbarSpacer(),
1648
1667
  new Button({
1649
1668
  icon: "sap-icon://drop-down-list",
1650
- press: function (/*evt*/) {
1669
+ press: function (/* evt */) {
1651
1670
  oVSDialog.open();
1652
1671
  },
1653
- tooltip: sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("P13NDIALOG_VIEW_SETTINGS")
1672
+ tooltip: Core.getLibraryResourceBundle("sap.m").getText("P13NDIALOG_VIEW_SETTINGS")
1654
1673
  })
1655
1674
  ]
1656
1675
  }));
1657
1676
  }
1658
1677
  // While data is loading display a loading text
1659
- oTable.setNoDataText(sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("PULL2REFRESH_LOADING_LONG"));
1678
+ oTable.setNoDataText(Core.getLibraryResourceBundle("sap.m").getText("PULL2REFRESH_LOADING_LONG"));
1660
1679
  // When data gets updated check if there are no items and set a no data text in that case
1661
- var updatedFinished = (function (oFacet) {
1680
+ const updatedFinished = (function (oFacet) {
1662
1681
  return function (oEvent) {
1663
- var aItems = this.getItems();
1682
+ const aItems = this.getItems();
1664
1683
  if (aItems.length === 0) {
1665
1684
  this.setNoDataText(oSuiteUiCommonsResourceBundle.getText("FACETOVERVIEW_NO_CONTENT_TEXT"));
1666
1685
  } else {
1667
- this.setNoDataText(sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("PULL2REFRESH_LOADING_LONG"));
1686
+ this.setNoDataText(Core.getLibraryResourceBundle("sap.m").getText("PULL2REFRESH_LOADING_LONG"));
1668
1687
  }
1669
- //Workaround: no Link if no authority
1688
+ // Workaround: no Link if no authority
1670
1689
  if (aItems.length > 0 && aAllFacets.indexOf(oFacet) >= 0) {
1671
1690
  aAllFacets[aAllFacets.indexOf(oFacet)].bLoaded = true;
1672
1691
  aAllFacets[aAllFacets.indexOf(oFacet)].bProcessed = false;
1673
1692
  aAllFacets[aAllFacets.indexOf(oFacet)].bIsTable = true;
1674
1693
  aAllFacets[aAllFacets.indexOf(oFacet)].oTableItems = aItems;
1675
1694
  }
1676
- checkLinks(aAllFacets.indexOf(oFacet));
1677
- //Workaround: no Link if no authority
1678
- };
1679
- }(oFacet));
1680
- oTable.attachUpdateFinished(updatedFinished);
1681
- return oTable;
1682
- };
1695
+ checkLinks(aAllFacets.indexOf(oFacet));
1696
+ // Workaround: no Link if no authority
1697
+ };
1698
+ }(oFacet));
1699
+ oTable.attachUpdateFinished(updatedFinished);
1700
+ return oTable;
1701
+ }
1702
+
1703
+ function showHTML (oHTMLData) {
1704
+ let oImage;
1705
+ let oHTMLCtrl;
1706
+ let sIframe;
1707
+ switch (oHTMLData.UrlContentType.String) {
1708
+ case "image/png":
1709
+ case "image/jpeg":
1710
+ case "image/gif":
1711
+ oImage = new Image({ width: "100%" });
1712
+ if (oHTMLData.Url.String) {
1713
+ oImage.setSrc(oHTMLData.Url.String);
1714
+ }
1715
+ return oImage;
1716
+ default:
1717
+ oHTMLCtrl = new HTML();
1718
+ if (oHTMLData.Url.String) {
1719
+ oHTMLCtrl.setContent(`<iframe src = '${oHTMLData.Url.String}' width='100%' height='250px' frameborder='0'></iframe>`);
1720
+ } else if (oHTMLData.Url.Path) {
1721
+ oHTMLCtrl.bindProperty("content", {
1722
+ path: oHTMLData.Url.Path,
1723
+ formatter: function (/* value */) {
1724
+ sIframe = `<iframe src = '${oHTMLData.Url.Path}' width='100%' height='250px' frameborder='0'></iframe>`;
1725
+ return sIframe;
1726
+ }
1727
+ });
1728
+ }
1729
+ return oHTMLCtrl;
1730
+ }
1731
+ }
1732
+
1733
+ function facetFactory (oModel, sEntitySet, oSelectedFacet, sBindingPath, oFacet) {
1734
+ let sAssociationMultiplicity = "";
1735
+ const aTG = [];
1736
+ let oTG;
1737
+ let sNavPath;
1738
+ let sAnnoPath;
1739
+ let aAnnoPath;
1740
+ let sNavEntitySet;
1741
+ let oList;
1742
+ let aIdentification;
1743
+ let oVL;
1744
+ let aStatusInfo;
1745
+ let oFG;
1746
+ let sEntityType;
1747
+ let aColumns;
1748
+ let oPropertyExtensions;
1749
+ const oMetadata = oModel.getServiceMetadata();
1750
+ switch (oSelectedFacet.RecordType) {
1751
+ case "com.sap.vocabularies.UI.v1.ReferenceFacet":
1752
+ oTG = new UnifiedThingGroup();
1753
+ if (oSelectedFacet.Label && oSelectedFacet.Label.String) {
1754
+ oTG.setTitle(oSelectedFacet.Label.String);
1755
+ }
1756
+ sNavPath = oSelectedFacet.Target.AnnotationPath;
1757
+ sAnnoPath = sNavPath.substring(sNavPath.lastIndexOf("@") + 1);
1758
+ sNavPath = sNavPath.substring(0, sNavPath.lastIndexOf("@") - 1);
1759
+ if (sNavPath) {
1760
+ sAssociationMultiplicity = getAssociationMultiplicity(sEntitySet, sNavPath, oMetadata);
1761
+ }
1762
+ aAnnoPath = sAnnoPath.split("#");
1763
+ switch (aAnnoPath[0]) {
1764
+ case "com.sap.vocabularies.UI.v1.LineItem":
1765
+ case "com.sap.vocabularies.UI.v1.Chart":
1766
+ case "com.sap.vocabularies.UI.v1.Badge":
1767
+ case "com.sap.vocabularies.UI.v1.Identification":
1768
+ if (sNavPath) {
1769
+ sNavEntitySet = getNavEntitySet(sEntitySet, sNavPath, oMetadata);
1770
+ sEntityType = getEntityType(sNavEntitySet, oMetadata);
1771
+ } else {
1772
+ sEntityType = getEntityType(sEntitySet, oMetadata);
1773
+ }
1774
+ // In case of a chart we need to have the definition of the line items
1775
+ if (aAnnoPath[0] === "com.sap.vocabularies.UI.v1.Chart") {
1776
+ sAnnoPath = "com.sap.vocabularies.UI.v1.LineItem";
1777
+ }
1778
+ aColumns = oMapping[sEntityType][sAnnoPath];
1779
+ if (oMapping.propertyExtensions) {
1780
+ oPropertyExtensions = oMapping.propertyExtensions[sEntityType];
1781
+ }
1782
+ if (sAssociationMultiplicity === "*" && aAnnoPath[0] !== "com.sap.vocabularies.UI.v1.Identification") {
1783
+ oList = itemListFactory(oModel, aColumns, sEntityType, oMetadata, `${sBindingPath}/${sNavPath}`, oSelectedFacet, oPropertyExtensions, oFacet);
1784
+ oTG.setContent(oList);
1785
+ }
1786
+ if (aAnnoPath[0] === "com.sap.vocabularies.UI.v1.Identification") {
1787
+ aIdentification = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Identification"];
1788
+ oVL = new VerticalLayout({ width: "100%" }).setModel(oModel);
1789
+ if (sNavPath) {
1790
+ oVL.addContent(formLayoutFactory(oModel, sNavEntitySet, aIdentification, null, null, oFacet)).addStyleClass("sapFactsheetUtiPanel");
1791
+ oVL.bindElement(`${sBindingPath}/${sNavPath}`);
1792
+ } else {
1793
+ oVL.addContent(formLayoutFactory(oModel, sEntitySet, aIdentification, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel"));
1794
+ }
1795
+ oTG.setContent(oVL);
1796
+ }
1797
+ break;
1798
+ case "com.sap.vocabularies.UI.v1.StatusInfo":
1799
+ if (sNavPath) {
1800
+ sNavEntitySet = getNavEntitySet(sEntitySet, sNavPath, oMetadata);
1801
+ aStatusInfo = oMapping[getEntityType(sNavEntitySet, oMetadata)]["com.sap.vocabularies.UI.v1.StatusInfo"];
1802
+ oTG.setContent(formLayoutFactory(oModel, sNavEntitySet, aStatusInfo, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel").bindElement(`${sBindingPath}/${sNavPath}`));
1803
+ } else {
1804
+ aStatusInfo = oMapping[getEntityType(sEntitySet, oMetadata)]["com.sap.vocabularies.UI.v1.StatusInfo"];
1805
+ oTG.setContent(formLayoutFactory(oModel, sEntitySet, aStatusInfo, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel"));
1806
+ }
1807
+ break;
1808
+ case "com.sap.vocabularies.UI.v1.FieldGroup":
1809
+ oFG = oMapping[getEntityType(sEntitySet, oMetadata)][sAnnoPath];
1810
+ if (oFG) {
1811
+ if (!oTG.getTitle() || (oTG.getTitle() === "")) {
1812
+ if (oFG.Label) {
1813
+ if (oFG.Label.String) {
1814
+ oTG.setTitle(oFG.Label.String);
1815
+ } else if (oFG.Label.Path) {
1816
+ oTG.bindProperty("title", oFG.Label.Path);
1817
+ }
1818
+ }
1819
+ }
1820
+ if (sNavPath) {
1821
+ sNavEntitySet = getNavEntitySet(sEntitySet, sNavPath, oMetadata);
1822
+ oTG.setContent(formLayoutFactory(oModel, sNavEntitySet, oFG.Data, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel").bindElement(`${sBindingPath}/${sNavPath}`));
1823
+ } else {
1824
+ oTG.setContent(formLayoutFactory(oModel, sEntitySet, oFG.Data, null, null, oFacet).addStyleClass("sapFactsheetUtiPanel"));
1825
+ }
1826
+ }
1827
+ break;
1828
+ default:
1829
+ break;
1830
+ }
1831
+ return oTG;
1832
+ case "com.sap.vocabularies.UI.v1.ReferenceURLFacet":
1833
+ oTG = new ThingGroup({ title: oSelectedFacet.Label.String });
1834
+ oTG.setContent(showHTML(oSelectedFacet));
1835
+ return oTG;
1836
+ case "com.sap.vocabularies.UI.v1.CollectionFacet":
1837
+ for (let i = 0; i < oSelectedFacet.Facets.length; ++i) {
1838
+ aTG.push(facetFactory(oModel, sEntitySet, oSelectedFacet.Facets[i], sBindingPath, oFacet));
1839
+ }
1840
+ return aTG;
1841
+ default:
1842
+ break;
1843
+ }
1844
+ }
1683
1845
 
1684
- var chartControlFactory = function (sChartType, oTitle, oDescription, oDataset) {
1685
- var oChartControl;
1846
+ function chartControlFactory (sChartType, oTitle, oDescription, oDataset) {
1847
+ let oChartControl;
1686
1848
  switch (sChartType) {
1687
1849
  case "com.sap.vocabularies.UI.v1.ChartType/Area":
1688
1850
  oChartControl = new Area({});
@@ -1750,7 +1912,7 @@ sap.ui.define([
1750
1912
  oChartControl = new Text({});
1751
1913
  }
1752
1914
  return oChartControl;
1753
- };
1915
+ }
1754
1916
 
1755
1917
  /**
1756
1918
  * Returns tile height in rem, depending on device type and number of segments the tile consists of.
@@ -1759,20 +1921,23 @@ sap.ui.define([
1759
1921
  * Default value is 1.
1760
1922
  * @returns {string} Tile height in rem.
1761
1923
  */
1762
- var getTeaserTileHeight = function (iSegments) {
1763
- var iReturn;
1924
+ function getTeaserTileHeight (iSegments) {
1925
+ let iReturn;
1764
1926
  iSegments = iSegments || 1;
1765
1927
  if (jQuery.device.is.phone) {
1766
- iReturn = (7 * iSegments) + "rem";
1928
+ iReturn = `${7 * iSegments}rem`;
1767
1929
  } else {
1768
- iReturn = (11 * iSegments - 1) + "rem";
1930
+ iReturn = `${11 * iSegments - 1}rem`;
1769
1931
  }
1770
1932
  return iReturn;
1771
- };
1933
+ }
1772
1934
 
1773
- var getFieldSumsByPriority = function (aFields) {
1774
- var iFieldsWithPrioHigh = 0, iFieldsWithPrioMedium = 0, iFieldsWithPrioLow = 0, i, oImportance;
1775
- for (i = 0; i < aFields.length; i += 1) {
1935
+ function getFieldSumsByPriority (aFields) {
1936
+ let iFieldsWithPrioHigh = 0;
1937
+ let iFieldsWithPrioMedium = 0;
1938
+ let iFieldsWithPrioLow = 0;
1939
+ let oImportance;
1940
+ for (let i = 0; i < aFields.length; ++i) {
1776
1941
  oImportance = getImportanceOfRecord(aFields[i]);
1777
1942
  if (oImportance) {
1778
1943
  switch (oImportance) {
@@ -1789,27 +1954,14 @@ sap.ui.define([
1789
1954
  }
1790
1955
  }
1791
1956
  return { High: iFieldsWithPrioHigh, Medium: iFieldsWithPrioMedium, Low: iFieldsWithPrioLow };
1792
- };
1793
-
1794
- /**
1795
- * Returns the importance (High, Medium, Low) of a given record.
1796
- * Necessary as the annotation for importance changed in OData V4 and we'd like to support both V2 and V4.
1797
- * @param {object} oRecord as object.
1798
- * @returns {string} Importance of the record (High, Medium, Low).
1799
- */
1800
- var getImportanceOfRecord = function (oRecord) {
1801
- var sEnumMember = "";
1802
- if (oRecord.Importance) {
1803
- sEnumMember = oRecord.Importance.EnumMember;
1804
- } else if (oRecord["com.sap.vocabularies.UI.v1.Importance"]) {
1805
- sEnumMember = oRecord["com.sap.vocabularies.UI.v1.Importance"].EnumMember;
1806
- }
1807
- return sEnumMember.substr(sEnumMember.indexOf("/") + 1);
1808
- };
1957
+ }
1809
1958
 
1810
- var kpiTileFactory = function (oModel, aDataPoint, sEntityType, sBindingPath) {
1811
- var bIsNumeric = false, oTile, fractionDigits, oBinding, oBindingInfo;
1812
- oTile = new KpiTile({
1959
+ function kpiTileFactory (oModel, aDataPoint, sEntityType, sBindingPath) {
1960
+ let bIsNumeric = false;
1961
+ let fractionDigits;
1962
+ let oBinding;
1963
+ let oBindingInfo;
1964
+ const oTile = new KpiTile({
1813
1965
  doubleFontSize: false
1814
1966
  });
1815
1967
  // Set ValueFormat
@@ -1871,15 +2023,33 @@ sap.ui.define([
1871
2023
  oTile.setDoubleFontSize(true);
1872
2024
  }
1873
2025
  return oTile;
1874
- };
2026
+ }
2027
+
2028
+ // Workaround: no Link if no authority
2029
+ function getSemObjectsFromAnnotation (oMetadata) {
2030
+ const aRelatedObjects = [];
2031
+ const aRelObjToProcess = [];
2032
+ let sSemanticObject;
2033
+ let key;
2034
+
2035
+ function collectSemanticObject (oObject) {
2036
+ if (oObject.RecordType && oObject.RecordType === "com.sap.vocabularies.UI.v1.DataFieldWithUrl") {
2037
+ if (oObject.Url && oObject.Url.Apply) {
2038
+ sSemanticObject = oObject.Url.Apply.Parameters[0].Value.slice(oObject.Url.Apply.Parameters[0].Value.indexOf("#") + 1, oObject.Url.Apply.Parameters[0].Value.indexOf("-"));
2039
+ if (aRelatedObjects.indexOf(sSemanticObject) < 0) {
2040
+ aRelatedObjects.push(sSemanticObject);
2041
+ }
2042
+ return true;
2043
+ }
2044
+ } else {
2045
+ return false;
2046
+ }
2047
+ }
1875
2048
 
1876
- //Workaround: no Link if no authority
1877
- var getSemObjectsFromAnnotation = function (oMetadata) {
1878
- var aRelatedObjects = [], aRelObjToProcess = [], sSemanticObject, i, key;
1879
- var getSemanticObjects = function (oObject) {
2049
+ function getSemanticObjects (oObject) {
1880
2050
  if (collectSemanticObject(oObject) === false) {
1881
2051
  if (Array.isArray(oObject)) {
1882
- for (i = 0; i < oObject.length; i += 1) {
2052
+ for (let i = 0; i < oObject.length; ++i) {
1883
2053
  collectSemanticObject(oObject[i]);
1884
2054
  }
1885
2055
  } else if (typeof oObject === "object") {
@@ -1892,20 +2062,8 @@ sap.ui.define([
1892
2062
  }
1893
2063
  }
1894
2064
  }
1895
- };
1896
- var collectSemanticObject = function (oObject) {
1897
- if (oObject.RecordType && oObject.RecordType === "com.sap.vocabularies.UI.v1.DataFieldWithUrl") {
1898
- if (oObject.Url && oObject.Url.Apply) {
1899
- sSemanticObject = oObject.Url.Apply.Parameters[0].Value.slice(oObject.Url.Apply.Parameters[0].Value.indexOf("#") + 1, oObject.Url.Apply.Parameters[0].Value.indexOf("-"));
1900
- if (aRelatedObjects.indexOf(sSemanticObject) < 0) {
1901
- aRelatedObjects.push(sSemanticObject);
1902
- }
1903
- return true;
1904
- }
1905
- } else {
1906
- return false;
1907
- }
1908
- };
2065
+ }
2066
+
1909
2067
  for (key in oMapping) {
1910
2068
  if (oMapping.hasOwnProperty(key)) {
1911
2069
  if (key.indexOf(oMetadata.dataServices.schema[0].namespace) >= 0) {
@@ -1913,37 +2071,40 @@ sap.ui.define([
1913
2071
  }
1914
2072
  }
1915
2073
  }
1916
- for (i = 0; i < aRelatedObjects.length; i += 1) {
2074
+ for (let i = 0; i < aRelatedObjects.length; ++i) {
1917
2075
  if (!oLinkAuthorised.hasOwnProperty(aRelatedObjects[i])) {
1918
2076
  aRelObjToProcess.push(aRelatedObjects[i]);
1919
2077
  }
1920
2078
  }
1921
2079
  return aRelObjToProcess;
1922
- };
2080
+ }
1923
2081
 
1924
- var callInteropService = function (aRelObjToProcess) {
1925
- var i, oJSONModel, sLink, sFilter;
2082
+ function callInteropService (aRelObjToProcess) {
2083
+ let oJSONModel;
2084
+ let sLink;
2085
+ let sFilter;
1926
2086
  if (aRelObjToProcess.length > 0) {
1927
2087
  oJSONModel = new JSONModel();
1928
2088
  sLink = "/sap/opu/odata/UI2/INTEROP/SemanticObjects?$expand=Links&$format=json";
1929
2089
  sFilter = "&$filter=id%20eq%20%27";
1930
- for (i = 0; i < aRelObjToProcess.length; i += 1) {
2090
+ for (let i = 0; i < aRelObjToProcess.length; ++i) {
1931
2091
  if (sFilter.length > 22) {
1932
- sFilter += "%20or%20id%20eq%20%27" + aRelObjToProcess[i] + "%27";
2092
+ sFilter += `%20or%20id%20eq%20%27${aRelObjToProcess[i]}%27`;
1933
2093
  } else {
1934
- sFilter += aRelObjToProcess[i] + "%27";
2094
+ sFilter += `${aRelObjToProcess[i]}%27`;
1935
2095
  }
1936
2096
  }
1937
2097
  sLink += sLink + sFilter;
1938
2098
  oJSONModel.loadData(sLink);
1939
2099
  oJSONModel.attachRequestCompleted(function () {
1940
- var aLinks = [], i, j, types;
2100
+ let aLinks = [];
2101
+ let types;
1941
2102
  if (this.getData().d && this.getData().d.results) {
1942
2103
  types = this.getData().d.results;
1943
- for (i = 0; i < types.length; i += 1) {
2104
+ for (let i = 0; i < types.length; ++i) {
1944
2105
  oLinkAuthorised[types[i].id] = "";
1945
2106
  aLinks = types[i].Links.results;
1946
- for (j = 0; j < aLinks.length; j += 1) {
2107
+ for (let j = 0; j < aLinks.length; ++j) {
1947
2108
  oLinkAuthorised[aLinks[j].id.slice(0, aLinks[j].id.indexOf("~"))] = "";
1948
2109
  }
1949
2110
  }
@@ -1954,96 +2115,82 @@ sap.ui.define([
1954
2115
  } else {
1955
2116
  oLinkAuthorised.InteropCompleted = true;
1956
2117
  }
1957
- };
1958
-
1959
- var checkLinks = function (index) {
1960
- var i, j, k, n, aItems, aCells, aLinks;
1961
- if (oLinkAuthorised.InteropCompleted === true) {
1962
- for (i = 0; i < aAllFacets.length; i += 1) {
1963
- if (aAllFacets[i].bLoaded && !aAllFacets[i].bProcessed && aAllFacets[i].Links) {
1964
- aLinks = aAllFacets[i].Links;
1965
- for (j = 0; j < aLinks.length; j += 1) {
1966
- if (oLinkAuthorised.hasOwnProperty(aLinks[j].sIntend) === true) {
1967
- if (aAllFacets[i].bIsTable === true) {
1968
- if (aAllFacets[i].oTableItems) {
1969
- aItems = aAllFacets[i].oTableItems;
1970
- for (k = 0; k < aItems.length; k += 1) {
1971
- aCells = aItems[k].getCells();
1972
- for (n = 0; n < aCells.length; n += 1) {
1973
- if (aCells[n] instanceof VerticalLayout &&
1974
- aCells[n].getContent()[0].getBindingInfo("href").parts === aLinks[j].oVL.getContent()[0].getBindingInfo("href").parts &&
1975
- aCells[n].getContent()[1].getBindingInfo("text").parts === aLinks[j].oVL.getContent()[1].getBindingInfo("text").parts) {
1976
- aCells[n].getContent()[0].setVisible(true);
1977
- aCells[n].getContent()[1].setVisible(false);
1978
- }
1979
- }
1980
- }
1981
- }
1982
- } else {
1983
- aLinks[j].oVL.getContent()[0].setVisible(true);
1984
- aLinks[j].oVL.getContent()[1].setVisible(false);
1985
- }
1986
- } else if (aAllFacets[i].bIsTable === false) {
1987
- aLinks[j].oVL.getContent()[1].setText(aLinks[j].oVL.getContent()[0].getText());
1988
- }
1989
- aAllFacets[i].bProcessed = true;
1990
- }
1991
- }
1992
- }
1993
- }
1994
- if (index >= 0) {
1995
- if (aAllFacets[index].bLoaded && !aAllFacets[index].bProcessed && aAllFacets[index].Links) {
1996
- aLinks = aAllFacets[index].Links;
1997
- for (j = 0; j < aLinks.length; j += 1) {
1998
- if (aAllFacets[index].bIsTable === false) {
1999
- aLinks[j].oVL.getContent()[1].setText(aLinks[j].oVL.getContent()[0].getText());
2000
- }
2001
- }
2002
- }
2003
- }
2004
- };
2005
- //Workaround: no Link if no authority
2006
-
2007
- var thingInspectorFactory = function (sUri, sAnnotationUri, oTI) {
2008
- var oContent = {}, aOperations = [], iFieldsWithPrioHigh = 0, iFieldsWithPrioMedium = 0, numKpiTiles = 0,
2009
- i, j, sService, oModel, sEntitySet, sBindingPath, oMetadata, sEntityType, oHeaderInfo, aFacets, sNavPath, functionParameters,
2010
- sBusinessParams, oGeneralFacet, oLinks, oTransactionSheet, oActionSheet, sAnnotationUriPath, sAnnotationUriAppAndFilename,
2011
- oSapSuiteRb, iMaxItemsInGeneral, sUseTerm, sNavEntitySet, sEntitySetForFacet, sNavEntityType, sEntityTypeForFacet, aFacetContent,
2012
- oImportance, sBatchPath, iFreeSpaceBuffer, aContent, oFieldSumsByPriority, iFieldsOnOverview, oFormLayout, sGeneralTileHeight,
2013
- oAddBookmarkButton, iRowSpan, oFacet, oGeoContent, sNavType, sCardinality, parameters, oEmailBtn, key, aDataPoint, sTerm, sHeight;
2014
- sService = getServiceFromUri(sUri);
2015
- //Because of a bug in icm the bsp application name and file name must be in lower case
2016
- sAnnotationUriPath = sAnnotationUri.substring(0, sAnnotationUri.substring(0, sAnnotationUri.lastIndexOf("/")).lastIndexOf("/"));
2017
- sAnnotationUriAppAndFilename = sAnnotationUri.substring(sAnnotationUri.substring(0, sAnnotationUri.lastIndexOf("/")).lastIndexOf("/"));
2018
- //Transformation to lowercase can be prohibited by adding the encoded url parameter "cbn_keep_anno_case" with value "true".
2118
+ }
2119
+ // Workaround: no Link if no authority
2120
+
2121
+ function thingInspectorFactory (sUri, sAnnotationUri, oTI) {
2122
+ let oContent = {};
2123
+ const aOperations = [];
2124
+ let iFieldsWithPrioHigh = 0;
2125
+ let iFieldsWithPrioMedium = 0;
2126
+ let numKpiTiles = 0;
2127
+ let i;
2128
+ let sNavPath;
2129
+ let functionParameters;
2130
+ let sBusinessParams;
2131
+ let oGeneralFacet;
2132
+ let oLinks;
2133
+ let oTransactionSheet;
2134
+ let oActionSheet;
2135
+ let iMaxItemsInGeneral;
2136
+ let sUseTerm;
2137
+ let sNavEntitySet;
2138
+ let sEntitySetForFacet;
2139
+ let sNavEntityType;
2140
+ let sEntityTypeForFacet;
2141
+ let aFacetContent;
2142
+ let oImportance;
2143
+ let sBatchPath;
2144
+ let iFreeSpaceBuffer;
2145
+ let aContent;
2146
+ let oFieldSumsByPriority;
2147
+ let iFieldsOnOverview;
2148
+ let oFormLayout;
2149
+ let sGeneralTileHeight;
2150
+ let iRowSpan;
2151
+ let oFacet;
2152
+ let oGeoContent;
2153
+ let sNavType;
2154
+ let sCardinality;
2155
+ let parameters;
2156
+ let oEmailBtn;
2157
+ let key;
2158
+ let aDataPoint;
2159
+ let sTerm;
2160
+ let sHeight;
2161
+ const sService = getServiceFromUri(sUri);
2162
+ // Because of a bug in icm the bsp application name and file name must be in lower case
2163
+ const sAnnotationUriPath = sAnnotationUri.substring(0, sAnnotationUri.substring(0, sAnnotationUri.lastIndexOf("/")).lastIndexOf("/"));
2164
+ let sAnnotationUriAppAndFilename = sAnnotationUri.substring(sAnnotationUri.substring(0, sAnnotationUri.lastIndexOf("/")).lastIndexOf("/"));
2165
+ // Transformation to lowercase can be prohibited by adding the encoded url parameter "cbn_keep_anno_case" with value "true".
2019
2166
  if (window.location.search.indexOf("cbn_keep_anno_case%3Dtrue") === -1) {
2020
2167
  sAnnotationUriAppAndFilename = sAnnotationUriAppAndFilename.toLowerCase();
2021
2168
  }
2022
- oModel = new ODataModel(
2169
+ const oModel = new ODataModel(
2023
2170
  sService,
2024
2171
  { annotationURI: sAnnotationUriPath + sAnnotationUriAppAndFilename, loadAnnotationsJoined: true, loadMetadataAsync: false, json: true }
2025
2172
  );
2026
2173
  oModel.setCountSupported(false);
2027
2174
  oTI.setModel(oModel);
2028
- sEntitySet = getEntitySetFromUri(sUri, oModel);
2029
- sBindingPath = "/" + sUri.slice(sService.length);
2030
- oMetadata = oModel.getServiceMetadata();
2175
+ const sEntitySet = getEntitySetFromUri(sUri, oModel);
2176
+ const sBindingPath = `/${sUri.slice(sService.length)}`;
2177
+ const oMetadata = oModel.getServiceMetadata();
2031
2178
  oMapping = oModel.getServiceAnnotations();
2032
- sEntityType = getEntityType(sEntitySet, oMetadata);
2033
- oHeaderInfo = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.HeaderInfo"];
2034
- aFacets = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Facets"];
2179
+ const sEntityType = getEntityType(sEntitySet, oMetadata);
2180
+ const oHeaderInfo = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.HeaderInfo"];
2181
+ const aFacets = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Facets"];
2035
2182
  oTI.bindElement(sBindingPath, getExpand(sEntitySet, oMetadata));
2036
- oSapSuiteRb = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.commons");
2183
+ const oSapSuiteRb = Core.getLibraryResourceBundle("sap.suite.ui.commons");
2037
2184
 
2038
- //Workaround: no Link if no authority
2185
+ // Workaround: no Link if no authority
2039
2186
  oLinkAuthorised.InteropCompleted = false;
2040
2187
  callInteropService(getSemObjectsFromAnnotation(oMetadata));
2041
- //Workaround: no Link if no authority
2188
+ // Workaround: no Link if no authority
2042
2189
 
2043
2190
  // Begin of rendering
2044
2191
 
2045
2192
  // Add a business object specific style class for branding
2046
- oTI.addStyleClass("sapFactsheetUtiThingType" + sEntitySet.replace(/\s/g, ""));
2193
+ oTI.addStyleClass(`sapFactsheetUtiThingType${sEntitySet.replace(/\s/g, "")}`);
2047
2194
 
2048
2195
  // Factsheet title e. g. "Article", "Sales Order", etc.
2049
2196
  if (oHeaderInfo.TypeName.String) {
@@ -2095,7 +2242,7 @@ sap.ui.define([
2095
2242
  }
2096
2243
 
2097
2244
  // General facet
2098
- for (i = 0; i < aFacets.length; i += 1) {
2245
+ for (let i = 0; i < aFacets.length; ++i) {
2099
2246
  if (aFacets[i]["com.sap.vocabularies.UI.v1.IsSummary"]) {
2100
2247
  oGeneralFacet = aFacets[i];
2101
2248
  break;
@@ -2103,7 +2250,7 @@ sap.ui.define([
2103
2250
  }
2104
2251
  if (oGeneralFacet) {
2105
2252
  iMaxItemsInGeneral = 15;
2106
- for (j = 0; j < oGeneralFacet.Facets.length; j += 1) {
2253
+ for (let j = 0; j < oGeneralFacet.Facets.length; ++j) {
2107
2254
  sUseTerm = oGeneralFacet.Facets[j].Target.AnnotationPath.substring(oGeneralFacet.Facets[j].Target.AnnotationPath.lastIndexOf("@") + 1);
2108
2255
  sNavPath = oGeneralFacet.Facets[j].Target.AnnotationPath;
2109
2256
  sNavPath = sNavPath.substring(0, sNavPath.lastIndexOf("@") - 1);
@@ -2130,7 +2277,7 @@ sap.ui.define([
2130
2277
  aFacetContent = oMapping[sEntityTypeForFacet][sUseTerm].Data;
2131
2278
  }
2132
2279
  oGeneralFacet.Facets[j].Content = aFacetContent;
2133
- for (i = 0; i < aFacetContent.length; i += 1) {
2280
+ for (let i = 0; i < aFacetContent.length; ++i) {
2134
2281
  oImportance = getImportanceOfRecord(aFacetContent[i]);
2135
2282
  if (oImportance === "High") {
2136
2283
  iFieldsWithPrioHigh += 1;
@@ -2163,7 +2310,7 @@ sap.ui.define([
2163
2310
  aAllFacets[0].bIsTable = false;
2164
2311
  aContent = [];
2165
2312
  iFieldsOnOverview = iFieldsWithPrioMedium + iFieldsWithPrioHigh;
2166
- for (j = 0; j < oGeneralFacet.Facets.length; j += 1) {
2313
+ for (let j = 0; j < oGeneralFacet.Facets.length; ++j) {
2167
2314
  oFormLayout = formLayoutFactory(oModel, oGeneralFacet.Facets[j].EntitySet, oGeneralFacet.Facets[j].Content, {
2168
2315
  High: iFieldsWithPrioHigh,
2169
2316
  Medium: iFieldsWithPrioMedium,
@@ -2173,7 +2320,7 @@ sap.ui.define([
2173
2320
  oFormLayout.addStyleClass("sapFactsheetUtiPaddingTop");
2174
2321
  }
2175
2322
  if (oGeneralFacet.Facets[j].NavPath) {
2176
- oFormLayout.bindElement(sBindingPath + "/" + oGeneralFacet.Facets[j].NavPath);
2323
+ oFormLayout.bindElement(`${sBindingPath}/${oGeneralFacet.Facets[j].NavPath}`);
2177
2324
  }
2178
2325
  oFieldSumsByPriority = getFieldSumsByPriority(oGeneralFacet.Facets[j].Content);
2179
2326
  iFieldsWithPrioHigh -= oFieldSumsByPriority.High;
@@ -2187,11 +2334,11 @@ sap.ui.define([
2187
2334
  */
2188
2335
  if (j > 0) {
2189
2336
  if (iFreeSpaceBuffer > 0) {
2190
- iFreeSpaceBuffer -= 1;
2337
+ --iFreeSpaceBuffer;
2191
2338
  } else if (iFieldsWithPrioMedium > 0) {
2192
- iFieldsWithPrioMedium -= 1;
2339
+ --iFieldsWithPrioMedium;
2193
2340
  } else if (iFieldsWithPrioHigh > 0) {
2194
- iFieldsWithPrioHigh -= 1;
2341
+ --iFieldsWithPrioHigh;
2195
2342
  }
2196
2343
  }
2197
2344
  }
@@ -2224,9 +2371,11 @@ sap.ui.define([
2224
2371
  }
2225
2372
  oFacet.addStyleClass("sapFactsheetUtiGeneralInformationOverviewFacet");
2226
2373
  oFacet.attachPress({ facets: oGeneralFacet }, function (oEvent, oData) {
2227
- var sDefaultSpan, oGrid, oTG, oVL, oContent;
2374
+ let sDefaultSpan;
2375
+ let oGrid;
2376
+ let oContent;
2228
2377
  oTI.removeAllFacetContent();
2229
- oTG = new UnifiedThingGroup();
2378
+ const oTG = new UnifiedThingGroup();
2230
2379
  oTG.setDescription(getTIDescription());
2231
2380
  oTG.setTitle(oSapSuiteRb.getText("UNIFIEDTHINGINSPECTOR_GENERAL_INFORMATION_HEADER_TEXT"));
2232
2381
  oTG.addStyleClass("sapFactsheetUtiGeneralInformationUtg");
@@ -2236,8 +2385,8 @@ sap.ui.define([
2236
2385
  sDefaultSpan = "L12 M12 S12";
2237
2386
  }
2238
2387
  aAllFacets[0].Links = [];
2239
- oVL = new VerticalLayout({ width: "100%" });
2240
- for (i = 0; i < oData.facets.Facets.length; i += 1) {
2388
+ const oVL = new VerticalLayout({ width: "100%" });
2389
+ for (let i = 0; i < oData.facets.Facets.length; ++i) {
2241
2390
  if (i % 2 === 0) {
2242
2391
  oGrid = new Grid({
2243
2392
  hSpacing: 1,
@@ -2255,12 +2404,12 @@ sap.ui.define([
2255
2404
  oVL.addContent(oGrid);
2256
2405
  }
2257
2406
  }
2258
- //Workaround: no Link if no authority
2407
+ // Workaround: no Link if no authority
2259
2408
  aAllFacets[0].bLoaded = true;
2260
2409
  aAllFacets[0].bProcessed = false;
2261
2410
  aAllFacets[0].bIsTable = false;
2262
2411
  checkLinks(0);
2263
- //Workaround: no Link if no authority
2412
+ // Workaround: no Link if no authority
2264
2413
  if (i % 2 !== 0) {
2265
2414
  oVL.addContent(oGrid);
2266
2415
  }
@@ -2272,10 +2421,295 @@ sap.ui.define([
2272
2421
  }
2273
2422
 
2274
2423
  // Callback method of the oData reads for the geofacet
2275
- var oDataReadCallbackGeo = function (functionParameters) {
2424
+ function oDataReadCallbackGeo (functionParameters) {
2276
2425
  return function (data) {
2277
- var i, oGeoModel, oGeoLocation, sPos, oNewFlags, oJsonModel, sBindingPath, oContentAddress, oHeaderInfoGeo,
2278
- oIdentificationGeo, oContentTitle, oContentDescription, oContentDetail, sCaption, iCount;
2426
+ let oGeoModel;
2427
+ let oGeoLocation;
2428
+ let sPos;
2429
+ let oNewFlags;
2430
+ let oJsonModel;
2431
+ let sBindingPath;
2432
+ let oContentAddress;
2433
+ let oHeaderInfoGeo;
2434
+ let oIdentificationGeo;
2435
+ let oContentTitle;
2436
+ let oContentDescription;
2437
+ let oContentDetail;
2438
+ let sCaption;
2439
+ let iCount;
2440
+
2441
+ function submitListener (oEvent) {
2442
+ let sSpot;
2443
+ let oPopupJSON;
2444
+ let popUpHeight;
2445
+ let popUpWidth;
2446
+ // Get the Spot on which was clicked
2447
+ const oEventJSON = JSON.parse(oEvent.getParameters().data);
2448
+ if (oEventJSON.Action.name === "DETAIL_REQUEST" && oEventJSON.Action.instance) {
2449
+ sSpot = oEventJSON.Action.instance;
2450
+ // Parse index of clicked Spot
2451
+ if (oJsonModel.oData.results) {
2452
+ sBindingPath = `/results/${sSpot.split(".")[1]}`;
2453
+ }
2454
+ sCaption = oHeaderInfoGeo.TypeName.String.substring(0, 17); // caption must not be to long!
2455
+ // Create JSON for Pop-Up
2456
+ popUpHeight = parseFloat(getTeaserTileHeight(0.7)) * 16; // popup does not support rem -> do crude conversion
2457
+ popUpWidth = parseFloat(getTeaserTileHeight(1.5)) * 16;
2458
+ oPopupJSON = {
2459
+ SAPVB: {
2460
+ version: "2.0",
2461
+ "xmlns:VB": "VB",
2462
+ Windows: {
2463
+ Remove: { name: "Detail1" },
2464
+ Set: {
2465
+ name: "Detail1",
2466
+ Window: {
2467
+ id: "Detail1",
2468
+ type: "callout",
2469
+ refParent: "Main",
2470
+ refScene: "",
2471
+ offsetX: "16",
2472
+ offsetY: "-27",
2473
+ modal: "false",
2474
+ width: popUpWidth,
2475
+ height: popUpHeight,
2476
+ caption: sCaption,
2477
+ "pos.bind": `${sSpot}.GeoPosition`
2478
+ }
2479
+ }
2480
+ },
2481
+ Scenes: {
2482
+ Set: {
2483
+ name: "Details",
2484
+ Scene: {
2485
+ id: "Details",
2486
+ navControlVisible: "false"
2487
+ }
2488
+ }
2489
+ }
2490
+ }
2491
+ };
2492
+ this.load(oPopupJSON);
2493
+ }
2494
+ }
2495
+ function openWindowListener (oEvent) {
2496
+ let key;
2497
+ let sNavEntitySet;
2498
+ let iMaxFields;
2499
+ if (!oContentTitle) {
2500
+ // Content of Pop-Up doesn't exist yet.
2501
+ // Get title and description of Pop-Up from HeaderInfo Term
2502
+ oContentTitle = dataField(oHeaderInfoGeo.Title, functionParameters.navigationType, oMetadata, functionParameters.facet);
2503
+ oContentTitle.setModel(oJsonModel);
2504
+ oContentTitle.bindElement(sBindingPath);
2505
+ oContentDescription = dataField(oHeaderInfoGeo.Description, functionParameters.navigationType, oMetadata, functionParameters.facet);
2506
+ oContentDescription.setModel(oJsonModel);
2507
+ oContentDescription.bindElement(sBindingPath);
2508
+ // Get formatted address from property "label"
2509
+ for (key in oGeoLocation.Address) {
2510
+ if (key === "label") {
2511
+ oContentAddress = dataField({ Value: oGeoLocation.Address[key] }, functionParameters.navigationType, oMetadata, functionParameters.facet);
2512
+ oContentAddress.setModel(oJsonModel);
2513
+ oContentAddress.bindElement(sBindingPath);
2514
+ break;
2515
+ }
2516
+ }
2517
+ // Calculate maximal number of displayed high fields depending on device
2518
+ iMaxFields = 7; // Default value for desktop
2519
+ if (jQuery.device.is.tablet && jQuery.device.is.landscape) {
2520
+ iMaxFields = 4;
2521
+ } else if (jQuery.device.is.tablet && jQuery.device.is.portrait) {
2522
+ iMaxFields = 5;
2523
+ } else if (jQuery.device.is.phone && jQuery.device.is.landscape) {
2524
+ iMaxFields = 2;
2525
+ } else if (jQuery.device.is.phone && jQuery.device.is.portrait) {
2526
+ iMaxFields = 3;
2527
+ }
2528
+ // Create a content for the additional fields with maximally 7 prio high field from Identification Term
2529
+ oContentDetail = new VerticalLayout({ width: "100%" }).setModel(oModel);
2530
+ if (functionParameters.navigationPath) {
2531
+ // GeoData is on subnode
2532
+ sNavEntitySet = getNavEntitySet(functionParameters.entitySet, functionParameters.navigationPath, oMetadata);
2533
+ oContentDetail.addContent(formLayoutFactory(oModel, sNavEntitySet, oIdentificationGeo, { High: iMaxFields }, null, functionParameters.facet));
2534
+ oContentDetail.setModel(oJsonModel).bindElement(sBindingPath);
2535
+ } else {
2536
+ // GeoData is on root node
2537
+ oContentDetail.addContent(formLayoutFactory(oModel, functionParameters.entitySet, oIdentificationGeo,
2538
+ { High: iMaxFields }, null, functionParameters.facet)).setModel(oJsonModel).bindElement(sBindingPath);
2539
+ }
2540
+ } else {
2541
+ // Content of Pop-Up exists, rebind elements
2542
+ oContentTitle.bindElement(sBindingPath);
2543
+ if (oContentDescription) {
2544
+ oContentDescription.bindElement(sBindingPath);
2545
+ }
2546
+ if (oContentAddress) {
2547
+ oContentAddress.bindElement(sBindingPath);
2548
+ }
2549
+ if (oContentDetail) {
2550
+ oContentDetail.bindElement(sBindingPath);
2551
+ }
2552
+ }
2553
+ const sPopUpWidth = `${parseFloat(getTeaserTileHeight(1.5)) * 16 * 0.95}px`; // Popup does not support rem -> do crude conversion
2554
+ if (oContentTitle) {
2555
+ oContentTitle.placeAt(oEvent.getParameter("contentarea").id);
2556
+ oContentTitle.addStyleClass("sapFactsheetUtiGeoPopupHead");
2557
+ if (jQuery.device.is.phone) {
2558
+ oContentTitle.addStyleClass("sapFactsheetUtiGeoPopupHeadFontPhone");
2559
+ }
2560
+ oContentTitle.setWidth(sPopUpWidth);
2561
+ }
2562
+ if (oContentDescription) {
2563
+ oContentDescription.placeAt(oEvent.getParameter("contentarea").id);
2564
+ oContentDescription.addStyleClass("sapFactsheetUtiGeoPopupDescr");
2565
+ if (jQuery.device.is.phone) {
2566
+ oContentDescription.addStyleClass("sapFactsheetUtiGeoPopupDescrFontPhone");
2567
+ }
2568
+ oContentDescription.setWidth(sPopUpWidth);
2569
+ }
2570
+ if (oContentAddress) {
2571
+ oContentAddress.placeAt(oEvent.getParameter("contentarea").id);
2572
+ oContentAddress.addStyleClass("sapFactsheetUtiGeoPopupText");
2573
+ oContentAddress.setWidth(sPopUpWidth);
2574
+ }
2575
+ // If no Content available then don't show the control with "No Data"
2576
+ if (oContentDetail && oContentDetail.getContent()[0] && oContentDetail.getContent()[0].getContent
2577
+ && oContentDetail.getContent()[0].getContent().length > 0) {
2578
+ oContentDetail.placeAt(oEvent.getParameter("contentarea").id);
2579
+ oContentDetail.addStyleClass("sapFactsheetUtiGeoPopupText");
2580
+ oContentDetail.setWidth(sPopUpWidth);
2581
+ }
2582
+ // Workaround: no Link if no authority
2583
+ if (aAllFacets.indexOf(functionParameters.facet) >= 0) {
2584
+ aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bLoaded = true;
2585
+ aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bProcessed = false;
2586
+ aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bIsTable = false;
2587
+ }
2588
+ checkLinks(aAllFacets.indexOf(functionParameters.facet));
2589
+ // Workaround: no Link if no authority
2590
+ }
2591
+ function closeWindowListener (oEvent) {
2592
+ if (oContentTitle) {
2593
+ oContentTitle.destroy();
2594
+ oContentTitle = undefined;
2595
+ }
2596
+ if (oContentDescription) {
2597
+ oContentDescription.destroy();
2598
+ oContentDescription = undefined;
2599
+ }
2600
+ if (oContentAddress) {
2601
+ oContentAddress.destroy();
2602
+ oContentAddress = undefined;
2603
+ }
2604
+ if (oContentDetail) {
2605
+ oContentDetail.destroy();
2606
+ oContentDetail = undefined;
2607
+ }
2608
+ jQuery(oEvent.getParameter("contentarea").id).empty();
2609
+ }
2610
+ function processGeoApplication (functionParameters) {
2611
+ return function (data) {
2612
+ let oGeoContentDetail;
2613
+ let oTG;
2614
+ let sJSON;
2615
+ sJSON = data.ProjectJSON;
2616
+ sJSON = sJSON.indexOf("{") ? sJSON.substr(sJSON.indexOf("{")) : sJSON; // Workaround: to get rid of a BOM character at the first position
2617
+ const oGeoJSON = JSON.parse(sJSON);
2618
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.initialStartPosition = sPos;
2619
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.initialZoom = 12;
2620
+ // Register click/touch event on map
2621
+ oGeoJSON.SAPVB.Actions.Set.Action.push({
2622
+ id: "200",
2623
+ name: "TAP_ON_MAP",
2624
+ refEvent: "Click",
2625
+ refScene: "MainScene",
2626
+ refVO: "Map"
2627
+ });
2628
+ if (oNewFlags) {
2629
+ oGeoJSON.SAPVB.Data = oNewFlags.Data;
2630
+ }
2631
+ // Workaround: for the Spots set the scale attribute to a vector (x,y,z)
2632
+ for (let i = 0; i < oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO.length; ++i) {
2633
+ if (oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].datasource === "Spots") {
2634
+ if (oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].scale && oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].scale.split(";").length !== 3) {
2635
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].scale = "1.0;1.0;1.0";
2636
+ break;
2637
+ }
2638
+ }
2639
+ }
2640
+ // listen to click/touch event on map on the overview tile
2641
+ functionParameters.facet.getContent().attachSubmit((/* oEvent */) => {
2642
+ // Workaround for mobile devices
2643
+ // fire Press event if any action is done (touch/tap/zoom) on map on overview tile
2644
+ if (jQuery.device.is.tablet || jQuery.device.is.phone) {
2645
+ functionParameters.facet.firePress();
2646
+ }
2647
+ });
2648
+ functionParameters.facet.getContent().load(oGeoJSON);
2649
+ functionParameters.facet.attachPress("", (/* oEvent, oData */) => {
2650
+ const aLong = [];
2651
+ const aLat = [];
2652
+ let newHeight;
2653
+ // Create GeoMap content
2654
+ if (!oGeoContentDetail) {
2655
+ oGeoContentDetail = new VBI({
2656
+ width: "100%",
2657
+ height: "100%",
2658
+ plugin: false,
2659
+ config: null
2660
+ });
2661
+ oGeoContentDetail.addStyleClass("sapFactsheetUtiGeoPopup");
2662
+ }
2663
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.move = "false";
2664
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.zoom = "false";
2665
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.pitch = "false";
2666
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.yaw = "false";
2667
+ oGeoJSON.SAPVB.Scenes.Set.SceneGeo.SuppressedNavControlVisibility = "false";
2668
+ oGeoContentDetail.load(oGeoJSON);
2669
+ // Collect longitude and latitude data of all locations
2670
+ if (functionParameters.cardinality === "*") {
2671
+ for (let i = 0; i < oJsonModel.oData.results.length; ++i) {
2672
+ aLong.push(oJsonModel.oData.results[i][oGeoLocation.Longitude.Path]);
2673
+ aLat.push(oJsonModel.oData.results[i][oGeoLocation.Latitude.Path]);
2674
+ }
2675
+ }
2676
+ oGeoContentDetail.attachSubmit(submitListener);
2677
+ oGeoContentDetail.attachOpenWindow(openWindowListener);
2678
+ oGeoContentDetail.attachCloseWindow(closeWindowListener);
2679
+ oTG = new UnifiedThingGroup({
2680
+ content: oGeoContentDetail,
2681
+ title: functionParameters.facetContent.Label.String,
2682
+ description: getTIDescription()
2683
+ });
2684
+ oTI.removeAllFacetContent();
2685
+ oTI.addFacetContent(oTG);
2686
+ oTI.navigateToDetail();
2687
+ // Workaround: UnifiedThingGroup doesn't propagate the height property to the childs, therefore we calculate the height manually
2688
+ oTI.attachAfterNavigate(aLong, (oEvent) => {
2689
+ if (oEvent.getParameters().getParameters().toId.indexOf("-detail-page") !== -1) {
2690
+ // Resize map to full container size on desktop and tablet and to 300px on phone
2691
+ if (jQuery.device.is.phone) {
2692
+ newHeight = "300px";
2693
+ } else {
2694
+ newHeight = `${Math.floor(jQuery(`#${oEvent.getParameters().getParameters().toId}-cont`).height() - 128)}px`;
2695
+ }
2696
+ oGeoContentDetail.setHeight(newHeight);
2697
+ // Zoom to show all locations
2698
+ if (aLong.length > 1) {
2699
+ oGeoContentDetail.zoomToGeoPosition(aLong, aLat);
2700
+ }
2701
+ }
2702
+ });
2703
+ });
2704
+ };
2705
+ }
2706
+ function geoMapCallFailed (facet) {
2707
+ return function (/* error */) {
2708
+ // OData returns an error. Don't display the map facet.
2709
+ oTI.removeFacet(facet);
2710
+ };
2711
+ }
2712
+
2279
2713
  if ((functionParameters.cardinality === "*" && data.results && data.results.length && data.results.length !== 0) ||
2280
2714
  (functionParameters.cardinality === "1" && data)) {
2281
2715
  oJsonModel = new JSONModel();
@@ -2304,19 +2738,19 @@ sap.ui.define([
2304
2738
  };
2305
2739
  if (functionParameters.cardinality === "1") {
2306
2740
  if (oGeoLocation.Longitude.Path && oGeoLocation.Latitude.Path) {
2307
- sPos = data[oGeoLocation.Longitude.Path] + ";" + data[oGeoLocation.Latitude.Path] + ";0";
2741
+ sPos = `${data[oGeoLocation.Longitude.Path]};${data[oGeoLocation.Latitude.Path]};0`;
2308
2742
  }
2309
2743
  oNewFlags.Data.Set.N[0].E.push({ A: sPos, I: "pin_blue.png" });
2310
2744
  } else {
2311
- for (i = 0; i < data.results.length; i += 1) {
2745
+ for (let i = 0; i < data.results.length; ++i) {
2312
2746
  if (oGeoLocation.Longitude.Path && oGeoLocation.Latitude.Path) {
2313
- sPos = data.results[i][oGeoLocation.Longitude.Path] + ";" + data.results[i][oGeoLocation.Latitude.Path] + ";0";
2747
+ sPos = `${data.results[i][oGeoLocation.Longitude.Path]};${data.results[i][oGeoLocation.Latitude.Path]};0`;
2314
2748
  }
2315
2749
  oNewFlags.Data.Set.N[0].E.push({ A: sPos, I: "pin_blue.png" });
2316
2750
  }
2317
2751
  // Set to first position
2318
2752
  if (data.results.length !== 0) {
2319
- sPos = data.results[0][oGeoLocation.Longitude.Path] + ";" + data.results[0][oGeoLocation.Latitude.Path] + ";0";
2753
+ sPos = `${data.results[0][oGeoLocation.Longitude.Path]};${data.results[0][oGeoLocation.Latitude.Path]};0`;
2320
2754
  }
2321
2755
  }
2322
2756
  }
@@ -2324,268 +2758,6 @@ sap.ui.define([
2324
2758
  if (Number(iCount)) {
2325
2759
  functionParameters.facet.setQuantity(iCount);
2326
2760
  }
2327
- var submitListener = function (oEvent) {
2328
- var oEventJSON, sSpot, oPopupJSON, popUpHeight, popUpWidth;
2329
- // Get the Spot on which was clicked
2330
- oEventJSON = JSON.parse(oEvent.getParameters().data);
2331
- if (oEventJSON.Action.name === "DETAIL_REQUEST" && oEventJSON.Action.instance) {
2332
- sSpot = oEventJSON.Action.instance;
2333
- // Parse index of clicked Spot
2334
- if (oJsonModel.oData.results) {
2335
- sBindingPath = "/results/" + sSpot.split(".")[1];
2336
- }
2337
- sCaption = oHeaderInfoGeo.TypeName.String.substring(0, 17); // caption must not be to long!
2338
- // Create JSON for Pop-Up
2339
- popUpHeight = parseFloat(getTeaserTileHeight(0.7)) * 16; // popup does not support rem -> do crude conversion
2340
- popUpWidth = parseFloat(getTeaserTileHeight(1.5)) * 16;
2341
- oPopupJSON = {
2342
- SAPVB: {
2343
- version: "2.0",
2344
- "xmlns:VB": "VB",
2345
- Windows: {
2346
- Remove: { name: "Detail1" },
2347
- Set: {
2348
- name: "Detail1",
2349
- Window: {
2350
- id: "Detail1",
2351
- type: "callout",
2352
- refParent: "Main",
2353
- refScene: "",
2354
- offsetX: "16",
2355
- offsetY: "-27",
2356
- modal: "false",
2357
- width: popUpWidth,
2358
- height: popUpHeight,
2359
- caption: sCaption,
2360
- "pos.bind": sSpot + ".GeoPosition"
2361
- }
2362
- }
2363
- },
2364
- Scenes: {
2365
- Set: {
2366
- name: "Details",
2367
- Scene: {
2368
- id: "Details",
2369
- navControlVisible: "false"
2370
- }
2371
- }
2372
- }
2373
- }
2374
- };
2375
- this.load(oPopupJSON);
2376
- }
2377
- };
2378
- var openWindowListener = function (oEvent) {
2379
- var key, sPopUpWidth, sNavEntitySet, iMaxFields;
2380
- if (!oContentTitle) {
2381
- // Content of Pop-Up doesn't exist yet.
2382
- // Get title and description of Pop-Up from HeaderInfo Term
2383
- oContentTitle = dataField(oHeaderInfoGeo.Title, functionParameters.navigationType, oMetadata, functionParameters.facet);
2384
- oContentTitle.setModel(oJsonModel);
2385
- oContentTitle.bindElement(sBindingPath);
2386
- oContentDescription = dataField(oHeaderInfoGeo.Description, functionParameters.navigationType, oMetadata, functionParameters.facet);
2387
- oContentDescription.setModel(oJsonModel);
2388
- oContentDescription.bindElement(sBindingPath);
2389
- // Get formatted address from property "label"
2390
- for (key in oGeoLocation.Address) {
2391
- if (key === "label") {
2392
- oContentAddress = dataField({ Value: oGeoLocation.Address[key] }, functionParameters.navigationType, oMetadata, functionParameters.facet);
2393
- oContentAddress.setModel(oJsonModel);
2394
- oContentAddress.bindElement(sBindingPath);
2395
- break;
2396
- }
2397
- }
2398
- // Calculate maximal number of displayed high fields depending on device
2399
- iMaxFields = 7; //Default value for desktop
2400
- if (jQuery.device.is.tablet && jQuery.device.is.landscape) {
2401
- iMaxFields = 4;
2402
- } else if (jQuery.device.is.tablet && jQuery.device.is.portrait) {
2403
- iMaxFields = 5;
2404
- } else if (jQuery.device.is.phone && jQuery.device.is.landscape) {
2405
- iMaxFields = 2;
2406
- } else if (jQuery.device.is.phone && jQuery.device.is.portrait) {
2407
- iMaxFields = 3;
2408
- }
2409
- // Create a content for the additional fields with maximally 7 prio high field from Identification Term
2410
- oContentDetail = new VerticalLayout({ width: "100%" }).setModel(oModel);
2411
- if (functionParameters.navigationPath) {
2412
- // GeoData is on subnode
2413
- sNavEntitySet = getNavEntitySet(functionParameters.entitySet, functionParameters.navigationPath, oMetadata);
2414
- oContentDetail.addContent(formLayoutFactory(oModel, sNavEntitySet, oIdentificationGeo, { High: iMaxFields }, null, functionParameters.facet));
2415
- oContentDetail.setModel(oJsonModel).bindElement(sBindingPath);
2416
- } else {
2417
- // GeoData is on root node
2418
- oContentDetail.addContent(formLayoutFactory(oModel, functionParameters.entitySet, oIdentificationGeo,
2419
- { High: iMaxFields }, null, functionParameters.facet)).setModel(oJsonModel).bindElement(sBindingPath);
2420
- }
2421
- } else {
2422
- // Content of Pop-Up exists, rebind elements
2423
- oContentTitle.bindElement(sBindingPath);
2424
- if (oContentDescription) {
2425
- oContentDescription.bindElement(sBindingPath);
2426
- }
2427
- if (oContentAddress) {
2428
- oContentAddress.bindElement(sBindingPath);
2429
- }
2430
- if (oContentDetail) {
2431
- oContentDetail.bindElement(sBindingPath);
2432
- }
2433
- }
2434
- sPopUpWidth = parseFloat(getTeaserTileHeight(1.5)) * 16 * 0.95 + "px"; // Popup does not support rem -> do crude conversion
2435
- if (oContentTitle) {
2436
- oContentTitle.placeAt(oEvent.getParameter("contentarea").id);
2437
- oContentTitle.addStyleClass("sapFactsheetUtiGeoPopupHead");
2438
- if (jQuery.device.is.phone) {
2439
- oContentTitle.addStyleClass("sapFactsheetUtiGeoPopupHeadFontPhone");
2440
- }
2441
- oContentTitle.setWidth(sPopUpWidth);
2442
- }
2443
- if (oContentDescription) {
2444
- oContentDescription.placeAt(oEvent.getParameter("contentarea").id);
2445
- oContentDescription.addStyleClass("sapFactsheetUtiGeoPopupDescr");
2446
- if (jQuery.device.is.phone) {
2447
- oContentDescription.addStyleClass("sapFactsheetUtiGeoPopupDescrFontPhone");
2448
- }
2449
- oContentDescription.setWidth(sPopUpWidth);
2450
- }
2451
- if (oContentAddress) {
2452
- oContentAddress.placeAt(oEvent.getParameter("contentarea").id);
2453
- oContentAddress.addStyleClass("sapFactsheetUtiGeoPopupText");
2454
- oContentAddress.setWidth(sPopUpWidth);
2455
- }
2456
- // If no Content available then don't show the control with "No Data"
2457
- if (oContentDetail && oContentDetail.getContent()[0] && oContentDetail.getContent()[0].getContent
2458
- && oContentDetail.getContent()[0].getContent().length > 0) {
2459
- oContentDetail.placeAt(oEvent.getParameter("contentarea").id);
2460
- oContentDetail.addStyleClass("sapFactsheetUtiGeoPopupText");
2461
- oContentDetail.setWidth(sPopUpWidth);
2462
- }
2463
- //Workaround: no Link if no authority
2464
- if (aAllFacets.indexOf(functionParameters.facet) >= 0) {
2465
- aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bLoaded = true;
2466
- aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bProcessed = false;
2467
- aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bIsTable = false;
2468
- }
2469
- checkLinks(aAllFacets.indexOf(functionParameters.facet));
2470
- //Workaround: no Link if no authority
2471
- };
2472
- var closeWindowListener = function (oEvent) {
2473
- if (oContentTitle) {
2474
- oContentTitle.destroy();
2475
- oContentTitle = undefined;
2476
- }
2477
- if (oContentDescription) {
2478
- oContentDescription.destroy();
2479
- oContentDescription = undefined;
2480
- }
2481
- if (oContentAddress) {
2482
- oContentAddress.destroy();
2483
- oContentAddress = undefined;
2484
- }
2485
- if (oContentDetail) {
2486
- oContentDetail.destroy();
2487
- oContentDetail = undefined;
2488
- }
2489
- $(oEvent.getParameter("contentarea").id).empty();
2490
- };
2491
- var processGeoApplication = function (functionParameters) {
2492
- return function (data) {
2493
- var oGeoJSON, oGeoContentDetail, oTG, sJSON, i;
2494
- sJSON = data.ProjectJSON;
2495
- sJSON = sJSON.indexOf("{") ? sJSON.substr(sJSON.indexOf("{")) : sJSON; // Workaround: to get rid of a BOM character at the first position
2496
- oGeoJSON = JSON.parse(sJSON);
2497
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.initialStartPosition = sPos;
2498
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.initialZoom = 12;
2499
- // Register click/touch event on map
2500
- oGeoJSON.SAPVB.Actions.Set.Action.push({
2501
- id: "200",
2502
- name: "TAP_ON_MAP",
2503
- refEvent: "Click",
2504
- refScene: "MainScene",
2505
- refVO: "Map"
2506
- });
2507
- if (oNewFlags) {
2508
- oGeoJSON.SAPVB.Data = oNewFlags.Data;
2509
- }
2510
- // Workaround: for the Spots set the scale attribute to a vector (x,y,z)
2511
- for (i = 0; i < oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO.length; i += 1) {
2512
- if (oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].datasource === "Spots") {
2513
- if (oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].scale && oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].scale.split(";").length !== 3) {
2514
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.VO[i].scale = "1.0;1.0;1.0";
2515
- break;
2516
- }
2517
- }
2518
- }
2519
- // listen to click/touch event on map on the overview tile
2520
- functionParameters.facet.getContent().attachSubmit(function (/*oEvent*/) {
2521
- // Workaround for mobile devices
2522
- // fire Press event if any action is done (touch/tap/zoom) on map on overview tile
2523
- if (jQuery.device.is.tablet || jQuery.device.is.phone) {
2524
- functionParameters.facet.firePress();
2525
- }
2526
- });
2527
- functionParameters.facet.getContent().load(oGeoJSON);
2528
- functionParameters.facet.attachPress("", function (/*oEvent, oData*/) {
2529
- var aLong = [], aLat = [], i, newHeight;
2530
- // Create GeoMap content
2531
- if (!oGeoContentDetail) {
2532
- oGeoContentDetail = new VBI({
2533
- width: "100%",
2534
- height: "100%",
2535
- plugin: false,
2536
- config: null
2537
- });
2538
- oGeoContentDetail.addStyleClass("sapFactsheetUtiGeoPopup");
2539
- }
2540
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.move = "false";
2541
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.zoom = "false";
2542
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.pitch = "false";
2543
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement.yaw = "false";
2544
- oGeoJSON.SAPVB.Scenes.Set.SceneGeo.SuppressedNavControlVisibility = "false";
2545
- oGeoContentDetail.load(oGeoJSON);
2546
- // Collect longitude and latitude data of all locations
2547
- if (functionParameters.cardinality === "*") {
2548
- for (i = 0; i < oJsonModel.oData.results.length; i += 1) {
2549
- aLong.push(oJsonModel.oData.results[i][oGeoLocation.Longitude.Path]);
2550
- aLat.push(oJsonModel.oData.results[i][oGeoLocation.Latitude.Path]);
2551
- }
2552
- }
2553
- oGeoContentDetail.attachSubmit(submitListener);
2554
- oGeoContentDetail.attachOpenWindow(openWindowListener);
2555
- oGeoContentDetail.attachCloseWindow(closeWindowListener);
2556
- oTG = new UnifiedThingGroup({
2557
- content: oGeoContentDetail,
2558
- title: functionParameters.facetContent.Label.String,
2559
- description: getTIDescription()
2560
- });
2561
- oTI.removeAllFacetContent();
2562
- oTI.addFacetContent(oTG);
2563
- oTI.navigateToDetail();
2564
- // Workaround: UnifiedThingGroup doesn't propagate the height property to the childs, therefore we calculate the height manually
2565
- oTI.attachAfterNavigate(aLong, function (oEvent) {
2566
- if (oEvent.getParameters().getParameters().toId.indexOf("-detail-page") !== -1) {
2567
- // Resize map to full container size on desktop and tablet and to 300px on phone
2568
- if (jQuery.device.is.phone) {
2569
- newHeight = "300px";
2570
- } else {
2571
- newHeight = Math.floor($("#" + oEvent.getParameters().getParameters().toId + "-cont").height() - 128) + "px";
2572
- }
2573
- oGeoContentDetail.setHeight(newHeight);
2574
- // Zoom to show all locations
2575
- if (aLong.length > 1) {
2576
- oGeoContentDetail.zoomToGeoPosition(aLong, aLat);
2577
- }
2578
- }
2579
- });
2580
- });
2581
- };
2582
- };
2583
- var geoMapCallFailed = function (facet) {
2584
- return function (/*error*/) {
2585
- // OData returns an error. Don't display the map facet.
2586
- oTI.removeFacet(facet);
2587
- };
2588
- };
2589
2761
  oGeoModel.read("VBIApplicationSet('ZFACTSHEETS')", "", "", false, processGeoApplication(functionParameters), geoMapCallFailed(functionParameters.facet));
2590
2762
  } else {
2591
2763
  functionParameters.facet.setQuantity(undefined);
@@ -2595,21 +2767,46 @@ sap.ui.define([
2595
2767
  functionParameters.facet.setTitle(undefined);
2596
2768
  }
2597
2769
  };
2598
- };
2770
+ }
2599
2771
 
2600
2772
  // Callback method of the oData reads for the further facets
2601
- var oDataReadCallback = function (functionParameters) {
2773
+ function oDataReadCallback (functionParameters) {
2602
2774
  return function (data) {
2603
- var sSeparator = "",
2604
- i, j, oJsonModel, oBadge, oTitle, oMainInfo, oHLayout, sSetTitle, oContent, iCount, oVLayoutForLabelValuePairs,
2605
- aPropertyExtensions, oHLayoutForTitle, oTitleLabel, oHLayoutForMainInfo, oMainInfoLabel, oHLayoutForSecondaryInfo,
2606
- oSecondaryInfoLabel, oSecondaryInfo, oImageUrl, oHLayoutForIconAndText, iSize, oImage, sAttribute, bResultNotEmpty,
2607
- oAnnotationPath, oChart, oLabel, aDimensions, aMeasures, oDataset;
2775
+ let sSeparator = "";
2776
+ let oJsonModel;
2777
+ let oBadge;
2778
+ let oTitle;
2779
+ let oMainInfo;
2780
+ let oHLayout;
2781
+ let sSetTitle;
2782
+ let oContent;
2783
+ let iCount;
2784
+ let oVLayoutForLabelValuePairs;
2785
+ let aPropertyExtensions;
2786
+ let oHLayoutForTitle;
2787
+ let oTitleLabel;
2788
+ let oHLayoutForMainInfo;
2789
+ let oMainInfoLabel;
2790
+ let oHLayoutForSecondaryInfo;
2791
+ let oSecondaryInfoLabel;
2792
+ let oSecondaryInfo;
2793
+ let oImageUrl;
2794
+ let oHLayoutForIconAndText;
2795
+ let iSize;
2796
+ let oImage;
2797
+ let sAttribute;
2798
+ let bResultNotEmpty;
2799
+ let oAnnotationPath;
2800
+ let oChart;
2801
+ let oLabel;
2802
+ let aDimensions;
2803
+ let aMeasures;
2804
+ let oDataset;
2608
2805
  oJsonModel = new JSONModel();
2609
2806
  if (functionParameters.facetContent.Target && functionParameters.facetContent.Target.AnnotationPath
2610
2807
  && functionParameters.facetContent.Target.AnnotationPath.split("#")[1]
2611
- && oMapping[functionParameters.navigationType]["com.sap.vocabularies.UI.v1.Badge#" + functionParameters.facetContent.Target.AnnotationPath.split("#")[1]]) {
2612
- oBadge = oMapping[functionParameters.navigationType]["com.sap.vocabularies.UI.v1.Badge#" + functionParameters.facetContent.Target.AnnotationPath.split("#")[1]];
2808
+ && oMapping[functionParameters.navigationType][`com.sap.vocabularies.UI.v1.Badge#${functionParameters.facetContent.Target.AnnotationPath.split("#")[1]}`]) {
2809
+ oBadge = oMapping[functionParameters.navigationType][`com.sap.vocabularies.UI.v1.Badge#${functionParameters.facetContent.Target.AnnotationPath.split("#")[1]}`];
2613
2810
  } else {
2614
2811
  oBadge = oMapping[functionParameters.navigationType]["com.sap.vocabularies.UI.v1.Badge"];
2615
2812
  }
@@ -2622,19 +2819,19 @@ sap.ui.define([
2622
2819
  oLabel = oMapping.propertyExtensions[functionParameters.navigationType];
2623
2820
  // Collect dimensions
2624
2821
  aDimensions = [];
2625
- for (i = 0; i < oChart.Dimensions.length; i += 1) {
2822
+ for (let i = 0; i < oChart.Dimensions.length; ++i) {
2626
2823
  aDimensions.push({
2627
2824
  axis: 1,
2628
2825
  name: oLabel[oChart.Dimensions[i].PropertyPath]["http://www.sap.com/Protocols/SAPData"].label,
2629
- value: "{" + oChart.Dimensions[i].PropertyPath + "}"
2826
+ value: `{${oChart.Dimensions[i].PropertyPath}}`
2630
2827
  });
2631
2828
  }
2632
2829
  // Collect measures
2633
2830
  aMeasures = [];
2634
- for (i = 0; i < oChart.Measures.length; i += 1) {
2831
+ for (let i = 0; i < oChart.Measures.length; ++i) {
2635
2832
  aMeasures.push({
2636
2833
  name: oLabel[oChart.Measures[i].PropertyPath]["http://www.sap.com/Protocols/SAPData"].label,
2637
- value: "{" + oChart.Measures[i].PropertyPath + "}"
2834
+ value: `{${oChart.Measures[i].PropertyPath}}`
2638
2835
  });
2639
2836
  }
2640
2837
  oDataset = new FlattenedDataset({
@@ -2648,22 +2845,22 @@ sap.ui.define([
2648
2845
  functionParameters.facet.setHeightType(jQuery.device.is.phone ? FacetOverviewHeight.Auto : FacetOverviewHeight.XL);
2649
2846
  } else {
2650
2847
  oContent = new VerticalLayout({ width: "100%" }).addStyleClass("sapFactsheetUtiVLayoutPadding");
2651
- for (i = 0; i < data.results.length; i += 1) {
2848
+ for (let i = 0; i < data.results.length; ++i) {
2652
2849
  oHLayout = new HorizontalLayout().addStyleClass("sapFactsheetUtiHLayoutPadding");
2653
2850
  oTitle = dataField(oBadge.Title, functionParameters.navigationType, oMetadata, functionParameters.facet);
2654
2851
  if (oTitle.setWrapping) {
2655
2852
  oTitle.setWrapping(false);
2656
2853
  }
2657
- sap.ui.getCore().byId(oTI.getId() + "-master-page").addDelegate({
2854
+ Core.byId(`${oTI.getId()}-master-page`).addDelegate({
2658
2855
  onAfterShow: (function (oHLayout) {
2659
2856
  return function () {
2660
- var iHorizontalLayoutWidth, iHorizontalLayoutWidthLeft;
2661
- iHorizontalLayoutWidth = oHLayout.getParent().getDomRef().clientWidth;
2857
+ let iHorizontalLayoutWidthLeft;
2858
+ const iHorizontalLayoutWidth = oHLayout.getParent().getDomRef().clientWidth;
2662
2859
  iHorizontalLayoutWidthLeft = iHorizontalLayoutWidth;
2663
2860
  if (oHLayout.getContent()[0]) {
2664
2861
  iHorizontalLayoutWidthLeft -= oHLayout.getContent()[0].getDomRef().clientWidth;
2665
2862
  if (iHorizontalLayoutWidth < oHLayout.getContent()[0].getDomRef().clientWidth) {
2666
- oHLayout.getContent()[0].getDomRef().setAttribute("style", "width:" + iHorizontalLayoutWidth + "px");
2863
+ oHLayout.getContent()[0].getDomRef().setAttribute("style", `width:${iHorizontalLayoutWidth}px`);
2667
2864
  return;
2668
2865
  }
2669
2866
  }
@@ -2674,7 +2871,7 @@ sap.ui.define([
2674
2871
  iHorizontalLayoutWidthLeft = 0;
2675
2872
  }
2676
2873
  if (oHLayout.getContent()[2]) {
2677
- oHLayout.getContent()[2].getDomRef().setAttribute("style", "width:" + iHorizontalLayoutWidthLeft + "px");
2874
+ oHLayout.getContent()[2].getDomRef().setAttribute("style", `width:${iHorizontalLayoutWidthLeft}px`);
2678
2875
  }
2679
2876
  };
2680
2877
  }(oHLayout))
@@ -2688,7 +2885,7 @@ sap.ui.define([
2688
2885
  sSetTitle = true;
2689
2886
  }
2690
2887
  if (oBadge.Title.Value.Apply) {
2691
- for (j = 0; j < oBadge.Title.Value.Apply.Parameters.length; j += 1) {
2888
+ for (let j = 0; j < oBadge.Title.Value.Apply.Parameters.length; ++j) {
2692
2889
  if (oBadge.Title.Value.Apply.Parameters[j].Type === "Path") {
2693
2890
  if (data.results[i][oBadge.Title.Value.Apply.Parameters[j].Value]) {
2694
2891
  sSetTitle = true;
@@ -2711,7 +2908,7 @@ sap.ui.define([
2711
2908
  sSeparator = "dash";
2712
2909
  } else if (oBadge.MainInfo && oBadge.MainInfo.Value.Apply) {
2713
2910
  // Non decimal concatenated fields
2714
- for (j = 0; j < oBadge.MainInfo.Value.Apply.Parameters.length; j += 1) {
2911
+ for (let j = 0; j < oBadge.MainInfo.Value.Apply.Parameters.length; ++j) {
2715
2912
  if (oBadge.MainInfo.Value.Apply.Parameters[j].Type === "Path") {
2716
2913
  if (data.results[i][oBadge.MainInfo.Value.Apply.Parameters[j].Value]) {
2717
2914
  sSeparator = "dash";
@@ -2747,20 +2944,19 @@ sap.ui.define([
2747
2944
  functionParameters.facet.setContent(oContent);
2748
2945
 
2749
2946
  functionParameters.facet.attachPress({ facet: functionParameters.facetContent }, function (oEvent, oData) {
2750
- var oContent;
2751
2947
  oTI.removeAllFacetContent();
2752
2948
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].Links = [];
2753
- oContent = facetFactory(oModel, functionParameters.entitySet, oData.facet, functionParameters.bindingPath, this);
2949
+ const oContent = facetFactory(oModel, functionParameters.entitySet, oData.facet, functionParameters.bindingPath, this);
2754
2950
  oContent.setDescription(getTIDescription());
2755
2951
  oTI.addFacetContent(oContent);
2756
- //Workaround: no Link if no authority
2952
+ // Workaround: no Link if no authority
2757
2953
  if (aAllFacets.indexOf(functionParameters.facet) >= 0) {
2758
2954
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bLoaded = false;
2759
2955
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bProcessed = false;
2760
2956
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bIsTable = true;
2761
2957
  }
2762
2958
  checkLinks(aAllFacets.indexOf(functionParameters.facet));
2763
- //Workaround: no Link if no authority
2959
+ // Workaround: no Link if no authority
2764
2960
  oTI.navigateToDetail();
2765
2961
  });
2766
2962
  } else {
@@ -2768,14 +2964,14 @@ sap.ui.define([
2768
2964
  functionParameters.facet.addStyleClass("sapFactsheetUtiEmptyTile");
2769
2965
  functionParameters.facet.setHeightType(jQuery.device.is.phone ? FacetOverviewHeight.Auto : FacetOverviewHeight.S);
2770
2966
  }
2771
- //Workaround: no Link if no authority
2967
+ // Workaround: no Link if no authority
2772
2968
  if (aAllFacets.indexOf(functionParameters.facet) >= 0) {
2773
2969
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bLoaded = true;
2774
2970
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bProcessed = false;
2775
2971
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bIsTable = false;
2776
2972
  }
2777
2973
  checkLinks(aAllFacets.indexOf(functionParameters.facet));
2778
- //Workaround: no Link if no authority
2974
+ // Workaround: no Link if no authority
2779
2975
  } else {
2780
2976
  oJsonModel.setData({ result: data });
2781
2977
  // Check if response returned data as Gateway is currently not able to send the right HTTP status code for an empty document.
@@ -2858,51 +3054,52 @@ sap.ui.define([
2858
3054
  }
2859
3055
 
2860
3056
  functionParameters.facet.attachPress({ facet: functionParameters.facetContent }, function (oEvent, oData) {
2861
- var oContent;
2862
3057
  oTI.removeAllFacetContent();
2863
3058
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].Links = [];
2864
- oContent = facetFactory(oModel, functionParameters.entitySet, oData.facet, functionParameters.bindingPath, this);
3059
+ const oContent = facetFactory(oModel, functionParameters.entitySet, oData.facet, functionParameters.bindingPath, this);
2865
3060
  oContent.setDescription(getTIDescription());
2866
3061
  oTI.addFacetContent(oContent);
2867
- //Workaround: no Link if no authority
3062
+ // Workaround: no Link if no authority
2868
3063
  if (aAllFacets.indexOf(functionParameters.facet) >= 0) {
2869
3064
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bLoaded = true;
2870
3065
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bProcessed = false;
2871
3066
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bIsTable = false;
2872
3067
  }
2873
3068
  checkLinks(aAllFacets.indexOf(functionParameters.facet));
2874
- //Workaround: no Link if no authority
3069
+ // Workaround: no Link if no authority
2875
3070
  oTI.navigateToDetail();
2876
3071
  });
2877
3072
  } else {
2878
3073
  functionParameters.facet.addStyleClass("sapFactsheetUtiEmptyTile");
2879
3074
  functionParameters.facet.setHeightType(jQuery.device.is.phone ? FacetOverviewHeight.Auto : FacetOverviewHeight.S);
2880
3075
  }
2881
- //Workaround: no Link if no authority
3076
+ // Workaround: no Link if no authority
2882
3077
  if (aAllFacets.indexOf(functionParameters.facet) >= 0) {
2883
3078
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bLoaded = true;
2884
3079
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bProcessed = false;
2885
3080
  aAllFacets[aAllFacets.indexOf(functionParameters.facet)].bIsTable = false;
2886
3081
  }
2887
3082
  checkLinks(aAllFacets.indexOf(functionParameters.facet));
2888
- //Workaround: no Link if no authority
3083
+ // Workaround: no Link if no authority
2889
3084
  }
2890
3085
  };
2891
- };
2892
- var oDataReadCallbackError = function (functionParameters) {
2893
- return function (/*error*/) {
3086
+ }
3087
+ function oDataReadCallbackError (functionParameters) {
3088
+ return function (/* error */) {
2894
3089
  // OData returns an error. Don't display the facet.
2895
3090
  oTI.removeFacet(functionParameters.facet);
2896
3091
  };
2897
- };
2898
- var oDataReadCallbackMedia = function (functionParameters) {
3092
+ }
3093
+ function oDataReadCallbackMedia (functionParameters) {
2899
3094
  return function (data) {
2900
- var oHLayout, oMediaResource, i, iCount, oTG;
2901
- oMediaResource = oMapping[functionParameters.navigationType]["com.sap.vocabularies.UI.v1.MediaResource"];
3095
+ let oHLayout;
3096
+ let iCount;
3097
+ let oTG;
3098
+ const oMediaResource = oMapping[functionParameters.navigationType]["com.sap.vocabularies.UI.v1.MediaResource"];
2902
3099
  if (functionParameters.cardinality === "*") {
2903
3100
  if (data.results && data.results.length) {
2904
3101
  oHLayout = new HorizontalLayout().addStyleClass("sapFactsheetUtiPictureViewerOverview");
2905
- for (i = 0; i < data.results.length; i += 1) {
3102
+ for (let i = 0; i < data.results.length; ++i) {
2906
3103
  oHLayout.addContent(new Image({
2907
3104
  src: data.results[i][oMediaResource.Thumbnail.Url.Path],
2908
3105
  height: "85px"
@@ -2916,8 +3113,9 @@ sap.ui.define([
2916
3113
  functionParameters.facet.setQuantity(iCount);
2917
3114
  }
2918
3115
  functionParameters.facet.setContent(oHLayout);
2919
- functionParameters.facet.attachPress({ facet: functionParameters.facetContent, data: data }, function (oEvent, oData) {
2920
- var oPictureViewer, sHeight, oImage;
3116
+ functionParameters.facet.attachPress({ facet: functionParameters.facetContent, data: data }, (oEvent, oData) => {
3117
+ let sHeight;
3118
+ let oImage;
2921
3119
  oTI.removeAllFacetContent();
2922
3120
  oTG = new UnifiedThingGroup();
2923
3121
  if (oData.facet.Label && oData.facet.Label.String) {
@@ -2929,8 +3127,8 @@ sap.ui.define([
2929
3127
  } else {
2930
3128
  sHeight = "550px";
2931
3129
  }
2932
- oPictureViewer = new Carousel({ height: sHeight });
2933
- for (i = 0; i < oData.data.results.length; i += 1) {
3130
+ const oPictureViewer = new Carousel({ height: sHeight });
3131
+ for (let i = 0; i < oData.data.results.length; ++i) {
2934
3132
  oImage = new Image({ src: oData.data.results[i][oMediaResource.Url.Path] });
2935
3133
  if (jQuery.device.is.phone) {
2936
3134
  oImage.addStyleClass("sapFactsheetUtiCarouselMaxImageHeightPhone");
@@ -2950,20 +3148,27 @@ sap.ui.define([
2950
3148
  }
2951
3149
  }
2952
3150
  };
2953
- };
3151
+ }
2954
3152
 
2955
- var extractContactsFromBatchRequest = function (oData, sOrder) {
2956
- var aContactResults = [], oContacts = {},
2957
- i, j, k, oContactMetadata, sPhone, sMobile, sFax, sTelephone, sPhoto, sMetadataEmail;
2958
- var fFieldValue = function (oMetadata, oContactResult) {
2959
- var i, sValue = "";
3153
+ function extractContactsFromBatchRequest (oData, sOrder) {
3154
+ let aContactResults = [];
3155
+ const oContacts = {};
3156
+ let oContactMetadata;
3157
+ let sPhone;
3158
+ let sMobile;
3159
+ let sFax;
3160
+ let sTelephone;
3161
+ let sPhoto;
3162
+ let sMetadataEmail;
3163
+ function fFieldValue (oMetadata, oContactResult) {
3164
+ let sValue = "";
2960
3165
  if (oMetadata) {
2961
3166
  if (oMetadata.Path) {
2962
3167
  return oContactResult[oMetadata.Path];
2963
3168
  } else if (oMetadata.String) {
2964
3169
  return oMetadata.String;
2965
3170
  } else if (oMetadata.Apply.Name === "odata.concat") {
2966
- for (i = 0; i < oMetadata.Apply.Parameters.length; i += 1) {
3171
+ for (let i = 0; i < oMetadata.Apply.Parameters.length; ++i) {
2967
3172
  if (oMetadata.Apply.Parameters[i].Type === "Path") {
2968
3173
  sValue = sValue + oContactResult[oMetadata.Apply.Parameters[i].Value];
2969
3174
  } else if (oMetadata.Apply.Parameters[i].Type === "String") {
@@ -2973,10 +3178,10 @@ sap.ui.define([
2973
3178
  return sValue;
2974
3179
  }
2975
3180
  }
2976
- };
3181
+ }
2977
3182
  oContacts.iCount = 0;
2978
3183
  oContacts.aContacts = [];
2979
- for (i = 0; i < oData.__batchResponses.length; i += 1) {
3184
+ for (let i = 0; i < oData.__batchResponses.length; ++i) {
2980
3185
  if (!oData.__batchResponses[i].data) {
2981
3186
  continue;
2982
3187
  }
@@ -2988,10 +3193,10 @@ sap.ui.define([
2988
3193
  if (aContactResults.length > 0) {
2989
3194
  oContactMetadata = oMapping[aContactResults[0].__metadata.type]["com.sap.vocabularies.Communication.v1.Contact"];
2990
3195
  if (oContactMetadata) {
2991
- for (j = 0; j < aContactResults.length; j += 1) {
3196
+ for (let j = 0; j < aContactResults.length; ++j) {
2992
3197
  sPhone = sMobile = sFax = "";
2993
3198
  if (oContactMetadata.tel) {
2994
- for (k = 0; k < oContactMetadata.tel.length; k += 1) {
3199
+ for (let k = 0; k < oContactMetadata.tel.length; ++k) {
2995
3200
  if (oContactMetadata.tel[k].type && oContactMetadata.tel[k].type.EnumMember) {
2996
3201
  sTelephone = fFieldValue(oContactMetadata.tel[k].uri, aContactResults[j]);
2997
3202
  switch (oContactMetadata.tel[k].type.EnumMember) {
@@ -3033,22 +3238,27 @@ sap.ui.define([
3033
3238
  }
3034
3239
  }
3035
3240
  if (sOrder) {
3036
- oContacts.aContacts.sort(function (a, b) {
3241
+ oContacts.aContacts.sort((a, b) => {
3037
3242
  return a[sOrder] > b[sOrder] ? 1 : -1;
3038
3243
  });
3039
3244
  }
3040
3245
  return oContacts;
3041
- };
3042
- var oDataReadCallbackContacts = function (/*functionParameters*/) {
3246
+ }
3247
+ function oDataReadCallbackContacts (/* functionParameters */) {
3043
3248
  return function (oData) {
3044
- var i, oContacts, oGrid, oHLayout, oVLayout, oImgLayout, oImage, sTileSize;
3045
- oContacts = extractContactsFromBatchRequest(oData, "sOrder");
3046
- oGrid = new Grid({
3249
+ let i;
3250
+ let oHLayout;
3251
+ let oVLayout;
3252
+ let oImgLayout;
3253
+ let oImage;
3254
+ let sTileSize;
3255
+ const oContacts = extractContactsFromBatchRequest(oData, "sOrder");
3256
+ const oGrid = new Grid({
3047
3257
  defaultSpan: "L6 M6 S12",
3048
3258
  hSpacing: 0,
3049
3259
  vSpacing: 0
3050
3260
  }).addStyleClass("sapFactsheetUtiContactsGrid");
3051
- for (i = 0; i < oContacts.aContacts.length && i < 4; i += 1) {
3261
+ for (let i = 0; i < oContacts.aContacts.length && i < 4; ++i) {
3052
3262
  oImgLayout = new VerticalLayout();
3053
3263
  if (oContacts.aContacts[i].photo) {
3054
3264
  oImage = new Image({
@@ -3069,15 +3279,14 @@ sap.ui.define([
3069
3279
  }).addStyleClass("sapFactsheetUtiTextName"),
3070
3280
  new Text({
3071
3281
  text: oContacts.aContacts[i].title
3072
- }).addStyleClass("sapFactsheetUtiTextValue")
3073
- ]
3282
+ }).addStyleClass("sapFactsheetUtiTextValue")]
3074
3283
  });
3075
3284
  oHLayout = new HorizontalLayout({
3076
3285
  content: [oImgLayout, oVLayout]
3077
3286
  }).addStyleClass("sapFactsheetUtiContactsBox");
3078
3287
  oGrid.addContent(oHLayout);
3079
3288
  }
3080
- oFacet = sap.ui.getCore().byId(oTI.data("contactFacetId"));
3289
+ oFacet = Core.byId(oTI.data("contactFacetId"));
3081
3290
  oFacet.setQuantity(oContacts.iCount);
3082
3291
  if (i > 0) {
3083
3292
  oFacet.setContent(oGrid);
@@ -3086,30 +3295,30 @@ sap.ui.define([
3086
3295
  } else {
3087
3296
  sTileSize = FacetOverviewHeight.L;
3088
3297
  }
3089
- oFacet.attachPress(function () {
3090
- var i, aOperations = [], sBatchPath;
3298
+ oFacet.attachPress(() => {
3299
+ const aOperations = [];
3300
+ let sBatchPath;
3091
3301
  oModel.clearBatch();
3092
- for (i = 0; i < oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Contacts"].length; i += 1) {
3302
+ for (let i = 0; i < oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Contacts"].length; ++i) {
3093
3303
  sNavPath = oMapping[sEntityType]["com.sap.vocabularies.UI.v1.Contacts"][i].AnnotationPath;
3094
3304
  sNavPath = sNavPath.substring(0, sNavPath.lastIndexOf("@") - 1);
3095
3305
  if (sNavPath !== "") {
3096
- sBatchPath = sBindingPath + "/" + sNavPath;
3306
+ sBatchPath = `${sBindingPath}/${sNavPath}`;
3097
3307
  } else {
3098
3308
  sBatchPath = sBindingPath;
3099
3309
  }
3100
3310
  aOperations.push(oModel.createBatchOperation(sBatchPath, "GET"));
3101
3311
  }
3102
3312
  oModel.addBatchReadOperations(aOperations);
3103
- oModel.submitBatch(function (oData) {
3104
- var oContacts, oJSONModel, oTemplate, oTable, oVSDialog, oTG, oResourceBundle;
3105
- oResourceBundle = jQuery.sap.resources({
3106
- url: jQuery.sap.getModulePath("sap.ushell.components.container.") + "/resources/resources.properties",
3107
- language: sap.ui.getCore().getConfiguration().getLanguage()
3313
+ oModel.submitBatch((oData) => {
3314
+ const oResourceBundle = jQuery.sap.resources({
3315
+ url: `${jQuery.sap.getModulePath("sap.ushell.components.container.")}/resources/resources.properties`,
3316
+ language: Configuration.getLanguage()
3108
3317
  });
3109
- oContacts = extractContactsFromBatchRequest(oData, "sEntity");
3110
- oJSONModel = new JSONModel();
3318
+ const oContacts = extractContactsFromBatchRequest(oData, "sEntity");
3319
+ const oJSONModel = new JSONModel();
3111
3320
  oJSONModel.setData(oContacts);
3112
- oTemplate = new ColumnListItem({
3321
+ const oTemplate = new ColumnListItem({
3113
3322
  type: mobileLibrary.Inactive,
3114
3323
  unread: false,
3115
3324
  cells: [
@@ -3140,7 +3349,7 @@ sap.ui.define([
3140
3349
  new Link({ text: "{email}", href: "mailto:{email}" })
3141
3350
  ]
3142
3351
  });
3143
- oTable = new Table({
3352
+ const oTable = new Table({
3144
3353
  threshold: 2,
3145
3354
  inset: false,
3146
3355
  showUnread: true,
@@ -3182,22 +3391,23 @@ sap.ui.define([
3182
3391
  header: new Text({ text: oResourceBundle.getText("USHELL_FACTSHEET_EMAIL") }),
3183
3392
  minScreenWidth: "Tablet",
3184
3393
  demandPopin: true
3185
- })],
3394
+ })
3395
+ ],
3186
3396
  items: {
3187
3397
  path: "/aContacts",
3188
3398
  template: oTemplate
3189
3399
  }
3190
3400
  });
3191
- oVSDialog = new ViewSettingsDialog({
3401
+ const oVSDialog = new ViewSettingsDialog({
3192
3402
  sortItems: [new ViewSettingsItem({ key: "fn", text: oResourceBundle.getText("USHELL_FACTSHEET_NAME") }),
3193
- new ViewSettingsItem({ key: "phone", text: oResourceBundle.getText("USHELL_FACTSHEET_PHONE") }),
3194
- new ViewSettingsItem({ key: "mobile", text: resources.i18n.getText("mobile") }),
3195
- new ViewSettingsItem({ key: "fax", text: resources.i18n.getText("fax") }),
3196
- new ViewSettingsItem({ key: "email", text: oResourceBundle.getText("USHELL_FACTSHEET_EMAIL") })],
3403
+ new ViewSettingsItem({ key: "phone", text: oResourceBundle.getText("USHELL_FACTSHEET_PHONE") }),
3404
+ new ViewSettingsItem({ key: "mobile", text: resources.i18n.getText("mobile") }),
3405
+ new ViewSettingsItem({ key: "fax", text: resources.i18n.getText("fax") }),
3406
+ new ViewSettingsItem({ key: "email", text: oResourceBundle.getText("USHELL_FACTSHEET_EMAIL") })],
3197
3407
  confirm: function (evt) {
3198
- var mParams, oBinding, aSorters = [];
3199
- mParams = evt.getParameters();
3200
- oBinding = oTable.getBinding("items");
3408
+ const aSorters = [];
3409
+ const mParams = evt.getParameters();
3410
+ const oBinding = oTable.getBinding("items");
3201
3411
  if (mParams.sortItem) {
3202
3412
  aSorters.push(new Sorter(mParams.sortItem.getKey(), mParams.sortDescending));
3203
3413
  oBinding.sort(aSorters);
@@ -3210,14 +3420,14 @@ sap.ui.define([
3210
3420
  new ToolbarSpacer(),
3211
3421
  new Button({
3212
3422
  icon: "sap-icon://drop-down-list",
3213
- press: function (/*evt*/) {
3423
+ press: function (/* evt */) {
3214
3424
  oVSDialog.open();
3215
3425
  }
3216
3426
  })
3217
3427
  ]
3218
3428
  }));
3219
3429
  oTable.setModel(oJSONModel);
3220
- oTG = new UnifiedThingGroup({
3430
+ const oTG = new UnifiedThingGroup({
3221
3431
  title: oFacet.getTitle(),
3222
3432
  description: getTIDescription(),
3223
3433
  content: oTable
@@ -3234,10 +3444,10 @@ sap.ui.define([
3234
3444
  }
3235
3445
  oFacet.setHeightType(jQuery.device.is.phone ? FacetOverviewHeight.Auto : sTileSize);
3236
3446
  };
3237
- };
3447
+ }
3238
3448
 
3239
3449
  // Loop at the further facets and make oData reads to the corresponding services
3240
- for (i = 0; i < aFacets.length; i += 1) {
3450
+ for (let i = 0; i < aFacets.length; ++i) {
3241
3451
  if (aFacets[i]["com.sap.vocabularies.UI.v1.Map"]) {
3242
3452
  sNavPath = aFacets[i].Target.AnnotationPath;
3243
3453
  sNavPath = sNavPath.substring(0, sNavPath.lastIndexOf("@") - 1);
@@ -3262,12 +3472,12 @@ sap.ui.define([
3262
3472
  heightType: jQuery.device.is.phone ? FacetOverviewHeight.Auto : FacetOverviewHeight.L,
3263
3473
  content: oGeoContent
3264
3474
  });
3265
- //Workaround: no Link if no authority
3475
+ // Workaround: no Link if no authority
3266
3476
  aAllFacets.push(oFacet);
3267
3477
  aAllFacets[aAllFacets.length - 1].bLoaded = false;
3268
3478
  aAllFacets[aAllFacets.length - 1].bProcessed = false;
3269
3479
  aAllFacets[aAllFacets.length - 1].bIsTable = false;
3270
- //Workaround: no Link if no authority
3480
+ // Workaround: no Link if no authority
3271
3481
  functionParameters = {
3272
3482
  cardinality: sCardinality,
3273
3483
  navigationPath: sNavPath,
@@ -3283,7 +3493,7 @@ sap.ui.define([
3283
3493
  } else {
3284
3494
  parameters = [];
3285
3495
  }
3286
- oModel.read(sBindingPath + "/" + sNavPath, "", parameters, true, oDataReadCallbackGeo(functionParameters));
3496
+ oModel.read(`${sBindingPath}/${sNavPath}`, "", parameters, true, oDataReadCallbackGeo(functionParameters));
3287
3497
  oTI.addFacet(oFacet);
3288
3498
  } else if (aFacets[i].Target) {
3289
3499
  sNavPath = aFacets[i].Target.AnnotationPath;
@@ -3313,20 +3523,20 @@ sap.ui.define([
3313
3523
  } else {
3314
3524
  parameters = [];
3315
3525
  }
3316
- oModel.read(sBindingPath + "/" + sNavPath, "", parameters, true, oDataReadCallbackMedia(functionParameters));
3526
+ oModel.read(`${sBindingPath}/${sNavPath}`, "", parameters, true, oDataReadCallbackMedia(functionParameters));
3317
3527
  } else {
3318
- //Workaround: no Link if no authority
3528
+ // Workaround: no Link if no authority
3319
3529
  aAllFacets.push(oFacet);
3320
3530
  aAllFacets[aAllFacets.length - 1].bLoaded = false;
3321
3531
  aAllFacets[aAllFacets.length - 1].bProcessed = false;
3322
3532
  aAllFacets[aAllFacets.length - 1].bIsTable = false;
3323
- //Workaround: no Link if no authority
3533
+ // Workaround: no Link if no authority
3324
3534
  if (sCardinality === "*") {
3325
3535
  parameters = ["$inlinecount=allpages", "$top=3"];
3326
3536
  } else {
3327
3537
  parameters = [];
3328
3538
  }
3329
- oModel.read(sBindingPath + "/" + sNavPath, "", parameters, true, oDataReadCallback(functionParameters), oDataReadCallbackError(functionParameters));
3539
+ oModel.read(`${sBindingPath}/${sNavPath}`, "", parameters, true, oDataReadCallback(functionParameters), oDataReadCallbackError(functionParameters));
3330
3540
  }
3331
3541
  oTI.addFacet(oFacet);
3332
3542
  }
@@ -3338,15 +3548,15 @@ sap.ui.define([
3338
3548
  oTI.data("contactFacetId", oFacet.sId);
3339
3549
  functionParameters = { facet: oFacet };
3340
3550
  oModel.clearBatch();
3341
- for (j = 0; j < oMapping[sEntityType][sTerm].length; j += 1) {
3551
+ for (let j = 0; j < oMapping[sEntityType][sTerm].length; ++j) {
3342
3552
  sNavPath = oMapping[sEntityType][sTerm][j].AnnotationPath;
3343
3553
  sNavPath = sNavPath.substring(0, sNavPath.lastIndexOf("@") - 1);
3344
3554
  if (sNavPath !== "") {
3345
3555
  sCardinality = getAssociationMultiplicity(sEntitySet, sNavPath, oMetadata);
3346
3556
  if (sCardinality === "*") {
3347
- sBatchPath = sBindingPath + "/" + sNavPath + "?$top=4&$inlinecount=allpages";
3557
+ sBatchPath = `${sBindingPath}/${sNavPath}?$top=4&$inlinecount=allpages`;
3348
3558
  } else {
3349
- sBatchPath = sBindingPath + "/" + sNavPath;
3559
+ sBatchPath = `${sBindingPath}/${sNavPath}`;
3350
3560
  }
3351
3561
  } else {
3352
3562
  sBatchPath = sBindingPath;
@@ -3361,23 +3571,29 @@ sap.ui.define([
3361
3571
  }
3362
3572
 
3363
3573
  // Footer area
3364
- oAddBookmarkButton = new AddBookmarkButton();
3365
- var thingInspectorBindingChanged = function () {
3366
- var oBusinessParameters = {},
3367
- i, o, key, val, aBusinessParams, sTerm, aTerm, oParaValue, sSemanticObject, sJamDiscussId, sKey, oURLParsing, sShellHash, oShellHash;
3368
- oAddBookmarkButton.setAppData({ title: oTI.getTitle(), subtitle: oTI.getName() + " - " + oTI.getDescription() });
3574
+ const oAddBookmarkButton = new AddBookmarkButton();
3575
+ function thingInspectorBindingChanged () {
3576
+ const oBusinessParameters = {};
3577
+ let key;
3578
+ let val;
3579
+ let sTerm;
3580
+ let aTerm;
3581
+ let oParaValue;
3582
+ let sJamDiscussId;
3583
+ let sKey;
3584
+ oAddBookmarkButton.setAppData({ title: oTI.getTitle(), subtitle: `${oTI.getName()} - ${oTI.getDescription()}` });
3369
3585
  oAddBookmarkButton.setEnabled(true);
3370
- oURLParsing = sap.ushell.Container.getService("URLParsing");
3371
- sShellHash = oURLParsing.getShellHash(window.location.href);
3372
- oShellHash = oURLParsing.parseShellHash(sShellHash);
3373
- sSemanticObject = oShellHash.semanticObject;
3586
+ const oURLParsing = sap.ushell.Container.getService("URLParsing");
3587
+ const sShellHash = oURLParsing.getShellHash(window.location.href);
3588
+ const oShellHash = oURLParsing.parseShellHash(sShellHash);
3589
+ const sSemanticObject = oShellHash.semanticObject;
3374
3590
  oTransactionSheet = new LinkActionSheet({
3375
3591
  showCancelButton: true,
3376
3592
  placement: PlacementType.Top
3377
3593
  });
3378
3594
  sBusinessParams = getEntityKeyFromUri(sUri, oModel);
3379
- aBusinessParams = sBusinessParams.split(",");
3380
- for (i = 0; i < aBusinessParams.length; i += 1) {
3595
+ const aBusinessParams = sBusinessParams.split(",");
3596
+ for (let i = 0; i < aBusinessParams.length; ++i) {
3381
3597
  aBusinessParams[i] = aBusinessParams[i].replace("='", "=", "g");
3382
3598
  if (aBusinessParams[i].lastIndexOf("'") === aBusinessParams[i].length - 1) {
3383
3599
  aBusinessParams[i] = aBusinessParams[i].slice(0, -1);
@@ -3387,24 +3603,25 @@ sap.ui.define([
3387
3603
  if (oMapping[sEntityType].hasOwnProperty(sTerm)) {
3388
3604
  if (sTerm.indexOf("com.sap.vocabularies.Common.v1.SecondaryKey") === 0) {
3389
3605
  aTerm = oMapping[sEntityType][sTerm];
3390
- for (i = 0; i < aTerm.length; i += 1) {
3606
+ for (let i = 0; i < aTerm.length; ++i) {
3391
3607
  oParaValue = this.getBoundContext().getProperty(aTerm[i].PropertyPath);
3392
3608
  if (oParaValue) {
3393
- aBusinessParams.push(aTerm[i].PropertyPath + "=" + oParaValue);
3609
+ aBusinessParams.push(`${aTerm[i].PropertyPath}=${oParaValue}`);
3394
3610
  }
3395
3611
  }
3396
3612
  }
3397
3613
  }
3398
3614
  }
3399
- for (i = 0; i < aBusinessParams.length; i += 1) {
3615
+ for (let i = 0; i < aBusinessParams.length; ++i) {
3400
3616
  key = aBusinessParams[i].substr(0, aBusinessParams[i].indexOf("="));
3401
3617
  val = aBusinessParams[i].substr(aBusinessParams[i].indexOf("=") + 1, aBusinessParams[i].length);
3402
3618
  oBusinessParameters[decodeURIComponent(key)] = decodeURIComponent(val);
3403
3619
  }
3404
3620
  oLinks = sap.ushell.Container.getService("CrossApplicationNavigation").getSemanticObjectLinks(sSemanticObject, oBusinessParameters);
3405
- oLinks.done(function (aLinks) {
3406
- var i, sIntent, sLink;
3407
- for (i = 0; i < aLinks.length; i += 1) {
3621
+ oLinks.done((aLinks) => {
3622
+ let sIntent;
3623
+ let sLink;
3624
+ for (let i = 0; i < aLinks.length; ++i) {
3408
3625
  sLink = aLinks[i].intent;
3409
3626
  if (sLink.indexOf(FACTSHEET) < 0 &&
3410
3627
  sLink.indexOf("-analyzeKPIDetails~") < 0 &&
@@ -3426,24 +3643,24 @@ sap.ui.define([
3426
3643
  }
3427
3644
  }
3428
3645
  });
3429
- oTI.attachTransactionsButtonPress(function (oEvent) {
3646
+ oTI.attachTransactionsButtonPress((oEvent) => {
3430
3647
  oTransactionSheet.openBy(oEvent.getParameter("caller"));
3431
3648
  });
3432
3649
  this.detachChange(thingInspectorBindingChanged);
3433
3650
  // Set the browser Tab Name as Object Type: Object Name (Object Description) e.g. "Article: Nutella (AAUFEA000100001)"
3434
- AppConfiguration.setWindowTitle(oTI.getTitle().trim() + ": " + oTI.getName().trim() + " (" + oTI.getDescription().trim() + ")");
3651
+ AppConfiguration.setWindowTitle(`${oTI.getTitle().trim()}: ${oTI.getName().trim()} (${oTI.getDescription().trim()})`);
3435
3652
 
3436
3653
  oTI.setActionsVisible(true);
3437
3654
  oEmailBtn = new Button({
3438
3655
  text: oSapSuiteRb.getText("UNIFIEDTHINGINSPECTOR_FOOTER_BUTTON_EMAIL_LINK"),
3439
3656
  icon: "sap-icon://email",
3440
- press: function (/*oE*/) {
3657
+ press: function (/* oE */) {
3441
3658
  URLHelper.triggerEmail("", oTI.getName(), window.location.href);
3442
3659
  }
3443
3660
  });
3444
3661
  oActionSheet = new ActionSheet({ placement: PlacementType.Top });
3445
3662
  sJamDiscussId = sUri.substr(0, sUri.lastIndexOf("/") + 1);
3446
- for (o in oModel.oData) {
3663
+ for (const o in oModel.oData) {
3447
3664
  if (oModel.oData.hasOwnProperty(o)) {
3448
3665
  sJamDiscussId = sJamDiscussId + o;
3449
3666
  sKey = o.substring(o.indexOf("(") + 1, o.indexOf(")"));
@@ -3480,19 +3697,19 @@ sap.ui.define([
3480
3697
  }));
3481
3698
  oActionSheet.addButton(oAddBookmarkButton);
3482
3699
  oActionSheet.addButton(oEmailBtn);
3483
- oTI.attachActionsButtonPress(function (oEvent) {
3700
+ oTI.attachActionsButtonPress((oEvent) => {
3484
3701
  oActionSheet.openBy(oEvent.getParameter("caller"));
3485
3702
  });
3486
- //Workaround: no Link if no authority
3703
+ // Workaround: no Link if no authority
3487
3704
  aAllFacets[0].bLoaded = true;
3488
3705
  aAllFacets[0].bProcessed = false;
3489
3706
  checkLinks(0);
3490
- //Workaround: no Link if no authority
3491
- };
3707
+ // Workaround: no Link if no authority
3708
+ }
3492
3709
 
3493
3710
  oTI.getElementBinding().attachChange(thingInspectorBindingChanged);
3494
3711
 
3495
- oTI.attachBackAction(function (/*oEvent*/) {
3712
+ oTI.attachBackAction((/* oEvent */) => {
3496
3713
  history.back();
3497
3714
  });
3498
3715
  oTI.addDelegate({
@@ -3501,7 +3718,7 @@ sap.ui.define([
3501
3718
  }
3502
3719
  });
3503
3720
  return oTI;
3504
- };
3721
+ }
3505
3722
 
3506
3723
  return function (sUri, sAnnotationUri) {
3507
3724
  try {