@sapui5/sap.ushell 1.126.1 → 1.127.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 (401) 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/Fiori20Adapter.js +1 -1
  4. package/src/main/js/sap/ushell/Fiori20AdapterTest.js +1 -1
  5. package/src/main/js/sap/ushell/NWBCInterface.js +1 -1
  6. package/src/main/js/sap/ushell/SessionHandler.js +2 -2
  7. package/src/main/js/sap/ushell/TechnicalParameters.js +1 -1
  8. package/src/main/js/sap/ushell/URLTemplateProcessor.js +1 -1
  9. package/src/main/js/sap/ushell/Ui5NativeServiceFactory.js +1 -1
  10. package/src/main/js/sap/ushell/Ui5ServiceFactory.js +1 -1
  11. package/src/main/js/sap/ushell/User.js +7 -7
  12. package/src/main/js/sap/ushell/UserActivityLog.js +8 -13
  13. package/src/main/js/sap/ushell/_Config/utils.js +18 -0
  14. package/src/main/js/sap/ushell/_URLTemplateProcessor/DefinitionParameterSetBuilder.js +1 -1
  15. package/src/main/js/sap/ushell/_URLTemplateProcessor/DependencyGraph.js +1 -1
  16. package/src/main/js/sap/ushell/_URLTemplateProcessor/Functions.js +1 -1
  17. package/src/main/js/sap/ushell/_URLTemplateProcessor/Resolvers.js +1 -1
  18. package/src/main/js/sap/ushell/_URLTemplateProcessor/TemplateParameterParser.js +1 -1
  19. package/src/main/js/sap/ushell/_URLTemplateProcessor/utils.js +1 -1
  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 +28 -9
  24. package/src/main/js/sap/ushell/adapters/cdm/LaunchPageAdapter.js +1 -1
  25. package/src/main/js/sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js +4 -3
  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/cdm/v3/utilsCdm.js +6 -1
  46. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionAdapter.js +1 -1
  47. package/src/main/js/sap/ushell/adapters/cep/NavTargetResolutionInternalAdapter.js +1 -1
  48. package/src/main/js/sap/ushell/adapters/cep/SearchCEPAdapter.js +1 -1
  49. package/src/main/js/sap/ushell/adapters/cflp/UserDefaultParameterPersistenceAdapter.js +1 -1
  50. package/src/main/js/sap/ushell/adapters/local/AdapterContainer.js +1 -1
  51. package/src/main/js/sap/ushell/adapters/local/AppStateAdapter.js +1 -1
  52. package/src/main/js/sap/ushell/adapters/local/ClientSideTargetResolutionAdapter.js +1 -1
  53. package/src/main/js/sap/ushell/adapters/local/ContainerAdapter.js +1 -1
  54. package/src/main/js/sap/ushell/adapters/local/FlpLaunchPageAdapter.js +1 -1
  55. package/src/main/js/sap/ushell/adapters/local/LaunchPageAdapter.js +1 -1
  56. package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionAdapter.js +1 -1
  57. package/src/main/js/sap/ushell/adapters/local/NavTargetResolutionInternalAdapter.js +1 -1
  58. package/src/main/js/sap/ushell/adapters/local/PageBuildingAdapter.js +1 -1
  59. package/src/main/js/sap/ushell/adapters/local/PagePersistenceAdapter.js +1 -1
  60. package/src/main/js/sap/ushell/adapters/local/PersonalizationAdapter.js +1 -1
  61. package/src/main/js/sap/ushell/adapters/local/PersonalizationV2Adapter.js +1 -1
  62. package/src/main/js/sap/ushell/adapters/local/SearchAdapter.js +1 -1
  63. package/src/main/js/sap/ushell/adapters/local/SearchCEPAdapter.js +1 -1
  64. package/src/main/js/sap/ushell/adapters/local/SupportTicketAdapter.js +1 -1
  65. package/src/main/js/sap/ushell/adapters/local/Ui5ComponentLoaderAdapter.js +1 -1
  66. package/src/main/js/sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js +1 -1
  67. package/src/main/js/sap/ushell/adapters/local/UserInfoAdapter.js +1 -1
  68. package/src/main/js/sap/ushell/appRuntime/neo/AppInfoService.js +1 -0
  69. package/src/main/js/sap/ushell/appRuntime/neo/AppRuntimeNeo.js +1 -0
  70. package/src/main/js/sap/ushell/appRuntime/neo/ProxyAppUtils.js +1 -0
  71. package/src/main/js/sap/ushell/appRuntime/ui5/AppRuntime.js +6 -0
  72. package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/Renderer.js +19 -0
  73. package/src/main/js/sap/ushell/appRuntime/ui5/renderers/fiori2/RendererExtensions.js +1 -1
  74. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppConfiguration.js +1 -1
  75. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppLifeCycle.js +51 -0
  76. package/src/main/js/sap/ushell/appRuntime/ui5/services/AppState.js +1 -1
  77. package/src/main/js/sap/ushell/appRuntime/ui5/services/Bookmark.js +1 -1
  78. package/src/main/js/sap/ushell/appRuntime/ui5/services/BookmarkV2.js +6 -6
  79. package/src/main/js/sap/ushell/appRuntime/ui5/services/CommonDataModel.js +1 -1
  80. package/src/main/js/sap/ushell/appRuntime/ui5/services/Container.js +1 -1
  81. package/src/main/js/sap/ushell/appRuntime/ui5/services/CrossApplicationNavigation.js +1 -1
  82. package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension/Item.js +1 -1
  83. package/src/main/js/sap/ushell/appRuntime/ui5/services/Extension.js +1 -1
  84. package/src/main/js/sap/ushell/appRuntime/ui5/services/FrameBoundExtension.js +1 -1
  85. package/src/main/js/sap/ushell/appRuntime/ui5/services/LaunchPage.js +1 -1
  86. package/src/main/js/sap/ushell/appRuntime/ui5/services/MessageBroker.js +1 -1
  87. package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolution.js +1 -1
  88. package/src/main/js/sap/ushell/appRuntime/ui5/services/NavTargetResolutionInternal.js +1 -1
  89. package/src/main/js/sap/ushell/appRuntime/ui5/services/Navigation.js +1 -1
  90. package/src/main/js/sap/ushell/appRuntime/ui5/services/ReferenceResolver.js +1 -1
  91. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigation.js +1 -1
  92. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellNavigationInternal.js +1 -1
  93. package/src/main/js/sap/ushell/appRuntime/ui5/services/ShellUIService.js +1 -1
  94. package/src/main/js/sap/ushell/appRuntime/ui5/services/UserInfo.js +1 -1
  95. package/src/main/js/sap/ushell/appRuntime/ui5/services/adapters/Ui5ComponentLoaderAdapter.js +1 -1
  96. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/FLPScheduler.js +47 -16
  97. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/StepConfiguration.json +10 -3
  98. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/logger.js +1 -1
  99. package/src/main/js/sap/ushell/bootstrap/_SchedulingAgent/state.js +1 -1
  100. package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5.js +9 -0
  101. package/src/main/js/sap/ushell/bootstrap/common/common.configure.ui5datetimeformat.js +1 -1
  102. package/src/main/js/sap/ushell/bootstrap/common/common.create.configcontract.core.js +13 -33
  103. package/src/main/js/sap/ushell/bootstrap/sandbox2.js +1 -1
  104. package/src/main/js/sap/ushell/components/_HeaderManager/ShellHeader.controller.js +135 -8
  105. package/src/main/js/sap/ushell/components/_HomepageManager/DashboardLoadingManager.js +1 -1
  106. package/src/main/js/sap/ushell/components/_HomepageManager/PagingManager.js +1 -1
  107. package/src/main/js/sap/ushell/components/_HomepageManager/PersistentPageOperationAdapter.js +1 -1
  108. package/src/main/js/sap/ushell/components/_HomepageManager/TransientPageOperationAdapter.js +1 -1
  109. package/src/main/js/sap/ushell/components/appfinder/AppFinder.controller.js +0 -6
  110. package/src/main/js/sap/ushell/components/appfinder/Component.js +1 -1
  111. package/src/main/js/sap/ushell/components/appfinder/manifest.json +1 -1
  112. package/src/main/js/sap/ushell/components/applicationIntegration/AppLifeCycle.js +74 -72
  113. package/src/main/js/sap/ushell/components/applicationIntegration/application/Application.js +1 -1
  114. package/src/main/js/sap/ushell/components/applicationIntegration/application/BlueBoxHandler.js +1 -1
  115. package/src/main/js/sap/ushell/components/applicationIntegration/application/PostMessageAPI.js +35 -18
  116. package/src/main/js/sap/ushell/components/applicationIntegration/configuration/AppMeta.js +42 -27
  117. package/src/main/js/sap/ushell/components/applicationIntegration/relatedServices/RelatedServices.js +1 -1
  118. package/src/main/js/sap/ushell/components/container/ApplicationContainer.js +1 -1
  119. package/src/main/js/sap/ushell/components/contentFinder/Component.js +19 -12
  120. package/src/main/js/sap/ushell/components/contentFinder/controller/AppSearch.controller.js +24 -5
  121. package/src/main/js/sap/ushell/components/contentFinder/controller/ContentFinderDialog.controller.js +1 -1
  122. package/src/main/js/sap/ushell/components/contentFinder/controller/WidgetGallery.controller.js +1 -1
  123. package/src/main/js/sap/ushell/components/contentFinder/manifest.json +1 -1
  124. package/src/main/js/sap/ushell/components/contentFinder/model/formatter.js +47 -7
  125. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearch.view.xml +7 -6
  126. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchBox.fragment.xml +5 -4
  127. package/src/main/js/sap/ushell/components/contentFinder/view/AppSearchCategoryTree.view.xml +34 -22
  128. package/src/main/js/sap/ushell/components/contentFinderStandalone/Component.js +7 -6
  129. package/src/main/js/sap/ushell/components/contentFinderStandalone/controller/ContentFinderStandalone.controller.js +3 -1
  130. package/src/main/js/sap/ushell/components/contentFinderStandalone/manifest.json +1 -1
  131. package/src/main/js/sap/ushell/components/contentFinderStandalone/manifestAppSearch.json +1 -1
  132. package/src/main/js/sap/ushell/components/factsheet/Component.js +1 -1
  133. package/src/main/js/sap/ushell/components/homepage/ActionMode.js +1 -1
  134. package/src/main/js/sap/ushell/components/homepage/Component.js +1 -1
  135. package/src/main/js/sap/ushell/components/homepage/DashboardContent.view.js +1 -1
  136. package/src/main/js/sap/ushell/components/homepage/DashboardGroupsBox.js +29 -24
  137. package/src/main/js/sap/ushell/components/homepage/DashboardUIActions.js +1 -1
  138. package/src/main/js/sap/ushell/components/homepage/manifest.json +1 -1
  139. package/src/main/js/sap/ushell/components/pages/ActionMode.js +1 -1
  140. package/src/main/js/sap/ushell/components/pages/Component.js +10 -3
  141. package/src/main/js/sap/ushell/components/pages/MyHomeImport.js +1 -1
  142. package/src/main/js/sap/ushell/components/pages/controller/PageRuntime.controller.js +26 -5
  143. package/src/main/js/sap/ushell/components/pages/manifest.json +1 -1
  144. package/src/main/js/sap/ushell/components/runtimeSwitcher/Component.js +3 -2
  145. package/src/main/js/sap/ushell/components/runtimeSwitcher/controller/RuntimeSwitcher.controller.js +1 -1
  146. package/src/main/js/sap/ushell/components/runtimeSwitcher/manifest.json +1 -1
  147. package/src/main/js/sap/ushell/components/shell/MenuBar/manifest.json +1 -1
  148. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/controller/NavigationBarMenu.controller.js +19 -3
  149. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/manifest.json +1 -1
  150. package/src/main/js/sap/ushell/components/shell/NavigationBarMenu/view/NavigationBarMenu.view.xml +1 -0
  151. package/src/main/js/sap/ushell/components/shell/Notifications/Component.js +24 -22
  152. package/src/main/js/sap/ushell/components/shell/Notifications/Notifications.controller.js +1 -1
  153. package/src/main/js/sap/ushell/components/shell/PostLoadingHeaderEnhancement/Component.js +80 -17
  154. package/src/main/js/sap/ushell/components/shell/ProductSwitch/Component.js +1 -1
  155. package/src/main/js/sap/ushell/components/shell/Search/manifest.json +1 -1
  156. package/src/main/js/sap/ushell/components/shell/SearchCEP/Component.js +1 -1
  157. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/FrequentActivityProvider.js +1 -1
  158. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/RecentSearchProvider.js +1 -1
  159. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchProvider.js +1 -1
  160. package/src/main/js/sap/ushell/components/shell/SearchCEP/SearchProviders/SearchServiceProvider.js +1 -1
  161. package/src/main/js/sap/ushell/components/shell/Settings/Component.js +12 -16
  162. package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.controller.js +9 -4
  163. package/src/main/js/sap/ushell/components/shell/Settings/UserSettings.view.xml +9 -9
  164. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/Component.js +3 -45
  165. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/UserActionsMenu.controller.js +31 -23
  166. package/src/main/js/sap/ushell/components/shell/UserActionsMenu/UserActionsMenuPopover.fragment.xml +7 -2
  167. package/src/main/js/sap/ushell/components/shell/UserImage/Component.js +3 -3
  168. package/src/main/js/sap/ushell/components/tiles/applauncher/StaticTile.controller.js +0 -4
  169. package/src/main/js/sap/ushell/components/tiles/applauncherdynamic/DynamicTile.controller.js +0 -1
  170. package/src/main/js/sap/ushell/components/tiles/indicatorcomparison/ComparisonTile.controller.js +1 -1
  171. package/src/main/js/sap/ushell/components/visualizationOrganizer/Component.js +1 -1
  172. package/src/main/js/sap/ushell/components/workPageBuilder/Component.js +2 -1
  173. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.accessibility.js +1 -1
  174. package/src/main/js/sap/ushell/components/workPageBuilder/controller/WorkPageBuilder.controller.js +1939 -1946
  175. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPage.js +1 -1
  176. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageButton.js +1 -1
  177. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageCell.js +1 -1
  178. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumn.js +1 -1
  179. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageColumnResizer.js +1 -1
  180. package/src/main/js/sap/ushell/components/workPageBuilder/controls/WorkPageRow.js +1 -1
  181. package/src/main/js/sap/ushell/components/workPageBuilder/manifest.json +1 -1
  182. package/src/main/js/sap/ushell/components/workPageRuntime/Component.js +3 -2
  183. package/src/main/js/sap/ushell/components/workPageRuntime/controller/WorkPageRuntime.controller.js +1 -1
  184. package/src/main/js/sap/ushell/components/workPageRuntime/manifest.json +1 -1
  185. package/src/main/js/sap/ushell/designtime/ApplicationContainer.designtime.js +1 -1
  186. package/src/main/js/sap/ushell/library.js +1 -1
  187. package/src/main/js/sap/ushell/navigationMode.js +1 -1
  188. package/src/main/js/sap/ushell/performance/ShellAnalytics.js +15 -12
  189. package/src/main/js/sap/ushell/performance/StatisticalRecord.js +1 -1
  190. package/src/main/js/sap/ushell/plugins/appwarmup/Component.js +1 -1
  191. package/src/main/js/sap/ushell/renderer/AccessKeysHandler.js +31 -9
  192. package/src/main/js/sap/ushell/renderer/Renderer.js +303 -287
  193. package/src/main/js/sap/ushell/renderer/Shell.controller.js +99 -101
  194. package/src/main/js/sap/ushell/renderer/Shell.view.js +110 -89
  195. package/src/main/js/sap/ushell/renderer/allMyApps/AllMyApps.controller.js +29 -15
  196. package/src/main/js/sap/ushell/renderer/allMyApps/AllMyApps.view.xml +2 -2
  197. package/src/main/js/sap/ushell/renderer/resources/resources.properties +2 -0
  198. package/src/main/js/sap/ushell/renderer/search/searchComponent/manifest.json +1 -1
  199. package/src/main/js/sap/ushell/renderers/fiori2/History.js +1 -0
  200. package/src/main/js/sap/ushell/renderers/fiori2/LogonFrameProvider.js +1 -0
  201. package/src/main/js/sap/ushell/renderers/fiori2/Shell.view.js +108 -87
  202. package/src/main/js/sap/ushell/renderers/fiori2/allMyApps/AllMyAppsManager.js +1 -0
  203. package/src/main/js/sap/ushell/services/AppLifeCycle.js +1 -1
  204. package/src/main/js/sap/ushell/services/AppState.js +1 -1
  205. package/src/main/js/sap/ushell/services/Bookmark.js +1 -1
  206. package/src/main/js/sap/ushell/services/BookmarkV2.js +1 -1
  207. package/src/main/js/sap/ushell/services/ClientSideTargetResolution.js +1 -1
  208. package/src/main/js/sap/ushell/services/CommonDataModel.js +2 -15
  209. package/src/main/js/sap/ushell/services/Configuration.js +1 -1
  210. package/src/main/js/sap/ushell/services/ConfigurationDefaults.js +1 -1
  211. package/src/main/js/sap/ushell/services/ContentExtensionAdapterFactory.js +1 -1
  212. package/src/main/js/sap/ushell/services/CrossApplicationNavigation.js +1 -1
  213. package/src/main/js/sap/ushell/services/DarkModeSupport.js +11 -5
  214. package/src/main/js/sap/ushell/services/Extension/Item.js +4 -4
  215. package/src/main/js/sap/ushell/services/Extension.js +36 -2
  216. package/src/main/js/sap/ushell/services/FlpLaunchPage.js +1 -1
  217. package/src/main/js/sap/ushell/services/FrameBoundExtension/FloatingContainer.js +1 -1
  218. package/src/main/js/sap/ushell/services/FrameBoundExtension/Footer.js +1 -1
  219. package/src/main/js/sap/ushell/services/FrameBoundExtension/Item.js +4 -4
  220. package/src/main/js/sap/ushell/services/FrameBoundExtension/SidePane.js +18 -2
  221. package/src/main/js/sap/ushell/services/FrameBoundExtension/ToolArea.js +20 -2
  222. package/src/main/js/sap/ushell/services/FrameBoundExtension.js +96 -2
  223. package/src/main/js/sap/ushell/services/LaunchPage.js +1 -1
  224. package/src/main/js/sap/ushell/services/Menu.js +1 -1
  225. package/src/main/js/sap/ushell/services/Message.js +1 -1
  226. package/src/main/js/sap/ushell/services/MessageBroker.js +1 -1
  227. package/src/main/js/sap/ushell/services/MessageInternal.js +13 -8
  228. package/src/main/js/sap/ushell/services/Navigation/compatibility.js +1 -1
  229. package/src/main/js/sap/ushell/services/Navigation/utils.js +1 -1
  230. package/src/main/js/sap/ushell/services/Navigation.js +1 -1
  231. package/src/main/js/sap/ushell/services/NavigationDataProvider.js +1 -1
  232. package/src/main/js/sap/ushell/services/PageBuilding.js +1 -1
  233. package/src/main/js/sap/ushell/services/PagePersistence.js +1 -1
  234. package/src/main/js/sap/ushell/services/PageReferencing.js +1 -1
  235. package/src/main/js/sap/ushell/services/Pages.js +4 -3
  236. package/src/main/js/sap/ushell/services/Personalization.js +1 -1
  237. package/src/main/js/sap/ushell/services/PersonalizationV2.js +1 -1
  238. package/src/main/js/sap/ushell/services/PluginManager.js +1 -1
  239. package/src/main/js/sap/ushell/services/ReferenceResolver.js +1 -1
  240. package/src/main/js/sap/ushell/services/Search.js +1 -1
  241. package/src/main/js/sap/ushell/services/SearchCEP.js +1 -1
  242. package/src/main/js/sap/ushell/services/SearchableContent.js +6 -5
  243. package/src/main/js/sap/ushell/services/ShellNavigation.js +1 -1
  244. package/src/main/js/sap/ushell/services/SmartNavigation.js +1 -1
  245. package/src/main/js/sap/ushell/services/SpaceContent.js +1 -1
  246. package/src/main/js/sap/ushell/services/UITracer.js +1 -1
  247. package/src/main/js/sap/ushell/services/URLShortening.js +1 -1
  248. package/src/main/js/sap/ushell/services/URLTemplate.js +1 -1
  249. package/src/main/js/sap/ushell/services/Ui5ComponentLoader.js +3 -3
  250. package/src/main/js/sap/ushell/services/UserDefaultParameterPersistence.js +1 -1
  251. package/src/main/js/sap/ushell/services/UserDefaultParameters.js +1 -1
  252. package/src/main/js/sap/ushell/services/UserInfo.js +1 -1
  253. package/src/main/js/sap/ushell/services/UserRecents.js +1 -1
  254. package/src/main/js/sap/ushell/services/VisualizationDataProvider.js +1 -1
  255. package/src/main/js/sap/ushell/services/VisualizationInstantiation.js +1 -1
  256. package/src/main/js/sap/ushell/services/_AppState/AppStatePersistencyMethod.js +1 -1
  257. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Formatter.js +1 -1
  258. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundIndex.js +1 -1
  259. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/InboundProvider.js +1 -1
  260. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/PrelaunchOperations.js +1 -1
  261. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Search.js +1 -1
  262. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/StagedLogger.js +1 -1
  263. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/SystemContext.js +1 -1
  264. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/Utils.js +1 -1
  265. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/VirtualInbounds.js +1 -1
  266. package/src/main/js/sap/ushell/services/_ClientSideTargetResolution/XAppStateProcessing.js +1 -1
  267. package/src/main/js/sap/ushell/services/_CommonDataModel/SiteConverter.js +1 -1
  268. package/src/main/js/sap/ushell/services/_CommonDataModel/vizTypeDefaults/VizTypeDefaults.js +1 -1
  269. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/ContentExtensionAdapterConfig.js +2 -2
  270. package/src/main/js/sap/ushell/services/_ContentExtensionAdapterFactory/FeaturedGroupConfig.js +1 -1
  271. package/src/main/js/sap/ushell/services/_CrossApplicationNavigation/utils.js +1 -1
  272. package/src/main/js/sap/ushell/services/_MessageBroker/MessageBrokerEngine.js +1 -1
  273. package/src/main/js/sap/ushell/services/_PageReferencing/PageReferencer.js +1 -1
  274. package/src/main/js/sap/ushell/services/_Personalization/VariantSetAdapter.js +1 -0
  275. package/src/main/js/sap/ushell/services/_Personalization/WindowAdapter.js +1 -0
  276. package/src/main/js/sap/ushell/services/_Personalization/WindowAdapterContainer.js +1 -0
  277. package/src/main/js/sap/ushell/services/_Personalization/constants.js +1 -0
  278. package/src/main/js/sap/ushell/services/_Personalization/constants.private.js +1 -0
  279. package/src/main/js/sap/ushell/services/_Personalization/utils.js +1 -0
  280. package/src/main/js/sap/ushell/services/_PluginManager/Extensions.js +1 -1
  281. package/src/main/js/sap/ushell/services/_PluginManager/HeaderExtensions.js +2 -2
  282. package/src/main/js/sap/ushell/services/_PluginManager/MenuExtensions.js +1 -1
  283. package/src/main/js/sap/ushell/services/_Ui5ComponentLoader/utils.js +1 -1
  284. package/src/main/js/sap/ushell/state/BaseState.js +79 -0
  285. package/src/main/js/sap/ushell/state/ControlManager.js +209 -0
  286. package/src/main/js/sap/ushell/state/CurrentState.js +180 -0
  287. package/src/main/js/sap/ushell/state/KeepAlive.js +75 -0
  288. package/src/main/js/sap/ushell/state/ShellModel.js +112 -0
  289. package/src/main/js/sap/ushell/state/StateManager/LaunchpadState.js +40 -0
  290. package/src/main/js/sap/ushell/state/StateManager/Operation.js +42 -0
  291. package/src/main/js/sap/ushell/state/StateManager/ShellMode.js +86 -0
  292. package/src/main/js/sap/ushell/state/StateManager.js +648 -0
  293. package/src/main/js/sap/ushell/state/StateRules.js +295 -0
  294. package/src/main/js/sap/ushell/state/StrategyFactory/DefaultStrategy.js +74 -0
  295. package/src/main/js/sap/ushell/state/StrategyFactory/FloatingActionsStrategy.js +78 -0
  296. package/src/main/js/sap/ushell/state/StrategyFactory/HeadEndItemsStrategy.js +130 -0
  297. package/src/main/js/sap/ushell/state/StrategyFactory/HeadItemsStrategy.js +104 -0
  298. package/src/main/js/sap/ushell/state/StrategyFactory/SidePaneStrategy.js +78 -0
  299. package/src/main/js/sap/ushell/state/StrategyFactory/SubHeaderStrategy.js +78 -0
  300. package/src/main/js/sap/ushell/state/StrategyFactory/UserActionsStrategy.js +60 -0
  301. package/src/main/js/sap/ushell/state/StrategyFactory.js +168 -0
  302. package/src/main/js/sap/ushell/support/plugins/flpConfig/FlpConfigurationPlugin.js +1 -1
  303. package/src/main/js/sap/ushell/themes/base/UserSettings.less +1 -5
  304. package/src/main/js/sap/ushell/themes/base/WorkPageCell.less +45 -49
  305. package/src/main/js/sap/ushell/themes/sap_belize_base/UserSettings.less +1 -5
  306. package/src/main/js/sap/ushell/themes/sap_bluecrystal_base/UserSettings.less +1 -5
  307. package/src/main/js/sap/ushell/themes/sap_hcb/base_ActionMode.less +107 -0
  308. package/src/main/js/sap/ushell/themes/sap_hcb/base_AddBookmarkButton.less +37 -0
  309. package/src/main/js/sap/ushell/themes/sap_hcb/base_AnchorItem.less +81 -0
  310. package/src/main/js/sap/ushell/themes/sap_hcb/base_AnchorNavigationBar.less +86 -0
  311. package/src/main/js/sap/ushell/themes/sap_hcb/base_AppearanceView.less +213 -0
  312. package/src/main/js/sap/ushell/themes/sap_hcb/base_ApplicationContainer.less +37 -0
  313. package/src/main/js/sap/ushell/themes/sap_hcb/base_Catalog.less +387 -0
  314. package/src/main/js/sap/ushell/themes/sap_hcb/base_ContactSupport.less +12 -0
  315. package/src/main/js/sap/ushell/themes/sap_hcb/base_ContentFinder.less +26 -0
  316. package/src/main/js/sap/ushell/themes/sap_hcb/base_CustomGroupHeaderListItem.less +10 -0
  317. package/src/main/js/sap/ushell/themes/sap_hcb/base_Dashboard.less +66 -0
  318. package/src/main/js/sap/ushell/themes/sap_hcb/base_DynamicTile.less +114 -0
  319. package/src/main/js/sap/ushell/themes/sap_hcb/base_Factsheet.less +225 -0
  320. package/src/main/js/sap/ushell/themes/sap_hcb/base_FloatingContainer.less +125 -0
  321. package/src/main/js/sap/ushell/themes/sap_hcb/base_FlpSettings.less +83 -0
  322. package/src/main/js/sap/ushell/themes/sap_hcb/base_GroupList.less +68 -0
  323. package/src/main/js/sap/ushell/themes/sap_hcb/base_GroupListItem.less +54 -0
  324. package/src/main/js/sap/ushell/themes/sap_hcb/base_IconFonts.less +21 -0
  325. package/src/main/js/sap/ushell/themes/sap_hcb/base_ImageTile.less +23 -0
  326. package/src/main/js/sap/ushell/themes/sap_hcb/base_LoadingDialog.less +47 -0
  327. package/src/main/js/sap/ushell/themes/sap_hcb/base_MenuBar.less +23 -0
  328. package/src/main/js/sap/ushell/themes/sap_hcb/base_Notifications.less +135 -0
  329. package/src/main/js/sap/ushell/themes/sap_hcb/base_Page.less +49 -0
  330. package/src/main/js/sap/ushell/themes/sap_hcb/base_PictureTile.less +119 -0
  331. package/src/main/js/sap/ushell/themes/sap_hcb/base_PictureViewer.less +25 -0
  332. package/src/main/js/sap/ushell/themes/sap_hcb/base_PlusTile.less +38 -0
  333. package/src/main/js/sap/ushell/themes/sap_hcb/base_QuickAccess.less +18 -0
  334. package/src/main/js/sap/ushell/themes/sap_hcb/base_RightFloatingContainerItem.less +82 -0
  335. package/src/main/js/sap/ushell/themes/sap_hcb/base_SearchCEP.less +121 -0
  336. package/src/main/js/sap/ushell/themes/sap_hcb/base_SearchFLP.less +10 -0
  337. package/src/main/js/sap/ushell/themes/sap_hcb/base_Section.less +60 -0
  338. package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellAppTitle.less +207 -0
  339. package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellFloatingAction.less +61 -0
  340. package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellFloatingActions.less +14 -0
  341. package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellHeader.less +389 -0
  342. package/src/main/js/sap/ushell/themes/sap_hcb/base_ShellLayout.less +168 -0
  343. package/src/main/js/sap/ushell/themes/sap_hcb/base_SidePane.less +8 -0
  344. package/src/main/js/sap/ushell/themes/sap_hcb/base_StaticTile.less +9 -0
  345. package/src/main/js/sap/ushell/themes/sap_hcb/base_SubHeader.less +3 -0
  346. package/src/main/js/sap/ushell/themes/sap_hcb/base_SysInfoBar.less +164 -0
  347. package/src/main/js/sap/ushell/themes/sap_hcb/base_TargetMappingConfiguration.less +8 -0
  348. package/src/main/js/sap/ushell/themes/sap_hcb/base_Tile.less +223 -0
  349. package/src/main/js/sap/ushell/themes/sap_hcb/base_TileBase.less +152 -0
  350. package/src/main/js/sap/ushell/themes/sap_hcb/base_TileContainer.less +495 -0
  351. package/src/main/js/sap/ushell/themes/sap_hcb/base_TilePlaceholder.less +75 -0
  352. package/src/main/js/sap/ushell/themes/sap_hcb/base_TileState.less +62 -0
  353. package/src/main/js/sap/ushell/themes/sap_hcb/base_ToolAreaItem.less +85 -0
  354. package/src/main/js/sap/ushell/themes/sap_hcb/base_UserActionsMenu.less +23 -0
  355. package/src/main/js/sap/ushell/themes/sap_hcb/base_UserConsentDialog.less +52 -0
  356. package/src/main/js/sap/ushell/themes/sap_hcb/base_UserSettings.less +109 -0
  357. package/src/main/js/sap/ushell/themes/sap_hcb/base_ViewPortContainer.less +28 -0
  358. package/src/main/js/sap/ushell/themes/sap_hcb/base_WorkPage.less +58 -0
  359. package/src/main/js/sap/ushell/themes/sap_hcb/base_WorkPageButton.less +60 -0
  360. package/src/main/js/sap/ushell/themes/sap_hcb/base_WorkPageCell.less +144 -0
  361. package/src/main/js/sap/ushell/themes/sap_hcb/base_WorkPageColumn.less +39 -0
  362. package/src/main/js/sap/ushell/themes/sap_hcb/base_WorkPageColumnResizer.less +128 -0
  363. package/src/main/js/sap/ushell/themes/sap_hcb/base_WorkPageRow.less +987 -0
  364. package/src/main/js/sap/ushell/themes/sap_hcb/base_shared.less +40 -0
  365. package/src/main/js/sap/ushell/themes/sap_hcb/library.source.less +70 -1
  366. package/src/main/js/sap/ushell/ui/ShellHeader.fragment.xml +17 -11
  367. package/src/main/js/sap/ushell/ui/ShellHeader.js +10 -3
  368. package/src/main/js/sap/ushell/ui/cards/FrequentActivitiesExtension.js +0 -4
  369. package/src/main/js/sap/ushell/ui/cards/RecentActivitiesExtension.js +1 -5
  370. package/src/main/js/sap/ushell/ui/footerbar/AddBookmarkButton.js +19 -5
  371. package/src/main/js/sap/ushell/ui/footerbar/ContactSupportDialog.controller.js +9 -3
  372. package/src/main/js/sap/ushell/ui/footerbar/SendAsEmailButton.js +5 -5
  373. package/src/main/js/sap/ushell/ui/launchpad/ExtendedChangeDetection.js +1 -1
  374. package/src/main/js/sap/ushell/ui/launchpad/Section.js +1 -1
  375. package/src/main/js/sap/ushell/ui/launchpad/TileContainer.js +17 -12
  376. package/src/main/js/sap/ushell/ui/launchpad/section/CompactArea.js +1 -1
  377. package/src/main/js/sap/ushell/ui/shell/ShellAppTitle.js +50 -35
  378. package/src/main/js/sap/ushell/ui/shell/ToolAreaItem.js +2 -2
  379. package/src/main/js/sap/ushell/ui/utils.js +1 -1
  380. package/src/main/js/sap/ushell/ui5service/ShellUIService.js +1 -1
  381. package/src/main/js/sap/ushell/ui5service/UserStatus.js +1 -1
  382. package/src/main/js/sap/ushell/utils/UrlShortening.js +1 -1
  383. package/src/main/js/sap/ushell/utils/WindowUtils.js +3 -3
  384. package/src/main/js/sap/ushell/utils/workpage/DestinationResolver.js +89 -0
  385. package/src/main/js/sap/ushell/utils/workpage/WorkPageHost.js +51 -47
  386. package/src/main/js/sap/ushell/utils/workpage/WorkPageService.js +32 -1
  387. package/src/main/js/sap/ushell/utils/workpage/WorkPageVizInstantiation.js +1 -1
  388. package/src/main/js/sap/ushell/utils.js +26 -2
  389. package/src/test/js/sap/ushell/bootstrap/sandbox.js +1 -1
  390. package/src/main/js/sap/ushell/bootstrap/common/common.load.ui5theme.js +0 -67
  391. package/src/main/js/sap/ushell/components/HeaderManager.js +0 -547
  392. package/src/main/js/sap/ushell/components/StateHelper.js +0 -70
  393. package/src/main/js/sap/ushell/components/_HeaderManager/AddHeadEndItemsStrategy.js +0 -105
  394. package/src/main/js/sap/ushell/components/_HeaderManager/AddHeadItemsStrategy.js +0 -75
  395. package/src/main/js/sap/ushell/components/_HeaderManager/ControlManager.js +0 -70
  396. package/src/main/js/sap/ushell/components/_HeaderManager/ExtendApplicationPropertyStrategy.js +0 -18
  397. package/src/main/js/sap/ushell/components/_HeaderManager/PropertyStrategiesFactory.js +0 -58
  398. package/src/main/js/sap/ushell/components/_HeaderManager/RemoveItemsStrategy.js +0 -46
  399. package/src/main/js/sap/ushell/components/_HeaderManager/SetHeadPropertyStrategy.js +0 -19
  400. package/src/main/js/sap/ushell/components/applicationIntegration/elements/model.js +0 -1309
  401. package/src/main/js/sap/ushell/components/applicationIntegration/relatedShellElements/RelatedShellElements.js +0 -363
@@ -1,1309 +0,0 @@
1
- // Copyright (c) 2009-2023 SAP SE, All Rights Reserved
2
-
3
- /**
4
- * @fileOverview The models assosicated with the applciation.
5
- * @version 1.126.1
6
- */
7
- sap.ui.define([
8
- "sap/ui/core/EventBus",
9
- "sap/ushell/EventHub",
10
- "sap/ushell/Config",
11
- "sap/ushell/utils",
12
- "sap/ushell/components/HeaderManager",
13
- "sap/ushell/components/StateHelper",
14
- "sap/ui/performance/Measurement",
15
- "sap/base/Log",
16
- "sap/base/util/deepExtend",
17
- "sap/base/util/extend",
18
- "sap/ushell/utils/UrlParsing",
19
- "sap/ushell/Container"
20
- ], function (
21
- EventBus,
22
- EventHub,
23
- Config,
24
- utils,
25
- HeaderManager,
26
- StateHelper,
27
- Measurement,
28
- Log,
29
- deepExtend,
30
- extend,
31
- UrlParsing,
32
- Container
33
- ) {
34
- "use strict";
35
-
36
- var oBaseStates;
37
- var customStatesDelta;
38
-
39
- function createInitialCustomDeltas () {
40
- return {
41
- home:
42
- { actions: ["ContactSupportBtn"] },
43
- app:
44
- { actions: ["ContactSupportBtn", "aboutBtn"] },
45
- minimal:
46
- { actions: ["ContactSupportBtn", "aboutBtn"] },
47
- standalone:
48
- { actions: ["ContactSupportBtn", "aboutBtn"] },
49
- embedded:
50
- { actions: ["ContactSupportBtn", "aboutBtn"] },
51
- "embedded-home":
52
- { actions: ["ContactSupportBtn", "aboutBtn"] },
53
- lean:
54
- { actions: ["ContactSupportBtn", "aboutBtn"] }
55
- };
56
- }
57
-
58
- function createInitialBaseStates () {
59
- return {
60
- blank: {
61
- stateName: "blank",
62
- showCurtain: false,
63
- showCatalog: false,
64
- showPane: false,
65
- showRightFloatingContainer: true,
66
- showRecentActivity: true,
67
- paneContent: [],
68
- actions: [],
69
- floatingActions: [],
70
- subHeader: [],
71
- toolAreaItems: [],
72
- RightFloatingContainerItems: [],
73
- toolAreaVisible: false,
74
- floatingContainerContent: [],
75
- search: ""
76
- },
77
- "blank-home": {
78
- stateName: "blank-home",
79
- showCurtain: false,
80
- showCatalog: false,
81
- showPane: false,
82
- showRightFloatingContainer: true,
83
- showRecentActivity: true,
84
- paneContent: [],
85
- actions: [],
86
- floatingActions: [],
87
- subHeader: [],
88
- toolAreaItems: [],
89
- RightFloatingContainerItems: [],
90
- toolAreaVisible: false,
91
- floatingContainerContent: [],
92
- search: ""
93
- },
94
- home: {
95
- stateName: "home",
96
- showCurtain: false,
97
- showCatalog: false,
98
- showPane: false,
99
- showRightFloatingContainer: true,
100
- showRecentActivity: true,
101
- search: "",
102
- paneContent: [],
103
- actions: ["openCatalogBtn", "userSettingsBtn"],
104
- floatingActions: [],
105
- subHeader: [],
106
- toolAreaItems: [],
107
- RightFloatingContainerItems: [],
108
- toolAreaVisible: false,
109
- floatingContainerContent: []
110
- },
111
- app: {
112
- stateName: "app",
113
- showCurtain: false,
114
- showCatalog: false,
115
- showPane: false,
116
- showRightFloatingContainer: true,
117
- showRecentActivity: true,
118
- paneContent: [],
119
- search: "",
120
- actions: ["openCatalogBtn", "userSettingsBtn"],
121
- floatingActions: [],
122
- subHeader: [],
123
- toolAreaItems: [],
124
- RightFloatingContainerItems: [],
125
- toolAreaVisible: false,
126
- floatingContainerContent: []
127
- },
128
- minimal: {
129
- stateName: "minimal",
130
- showCurtain: false,
131
- showCatalog: false,
132
- showPane: false,
133
- showRightFloatingContainer: true,
134
- showRecentActivity: true,
135
- paneContent: [],
136
- actions: ["openCatalogBtn", "userSettingsBtn"],
137
- floatingActions: [],
138
- subHeader: [],
139
- toolAreaItems: [],
140
- RightFloatingContainerItems: [],
141
- toolAreaVisible: false,
142
- floatingContainerContent: [],
143
- search: ""
144
- },
145
- standalone: {
146
- stateName: "standalone",
147
- showCurtain: false,
148
- showCatalog: false,
149
- showPane: false,
150
- showRightFloatingContainer: true,
151
- showRecentActivity: true,
152
- paneContent: [],
153
- actions: [],
154
- floatingActions: [],
155
- subHeader: [],
156
- toolAreaItems: [],
157
- RightFloatingContainerItems: [],
158
- toolAreaVisible: false,
159
- floatingContainerContent: [],
160
- search: ""
161
- },
162
- embedded: {
163
- stateName: "embedded",
164
- showCurtain: false,
165
- showCatalog: false,
166
- showPane: false,
167
- showRightFloatingContainer: true,
168
- showRecentActivity: true,
169
- paneContent: [],
170
- actions: [],
171
- floatingActions: [],
172
- subHeader: [],
173
- toolAreaItems: [],
174
- RightFloatingContainerItems: [],
175
- toolAreaVisible: false,
176
- floatingContainerContent: [],
177
- search: ""
178
- },
179
- "embedded-home": {
180
- stateName: "embedded-home",
181
- showCurtain: false,
182
- showCatalog: false,
183
- showPane: false,
184
- showRightFloatingContainer: true,
185
- showRecentActivity: true,
186
- paneContent: [],
187
- actions: [],
188
- floatingActions: [],
189
- subHeader: [],
190
- toolAreaItems: [],
191
- RightFloatingContainerItems: [],
192
- toolAreaVisible: false,
193
- floatingContainerContent: [],
194
- search: ""
195
- },
196
- headerless: {
197
- stateName: "headerless",
198
- showCurtain: false,
199
- showCatalog: false,
200
- showPane: false,
201
- showRightFloatingContainer: true,
202
- showRecentActivity: true,
203
- paneContent: [],
204
- actions: [],
205
- floatingActions: [],
206
- subHeader: [],
207
- toolAreaItems: [],
208
- RightFloatingContainerItems: [],
209
- toolAreaVisible: false,
210
- floatingContainerContent: [],
211
- search: ""
212
- },
213
- merged: {
214
- stateName: "merged",
215
- showCurtain: false,
216
- showCatalog: false,
217
- showPane: false,
218
- showRightFloatingContainer: true,
219
- showRecentActivity: true,
220
- paneContent: [],
221
- actions: [],
222
- floatingActions: [],
223
- subHeader: [],
224
- toolAreaItems: [],
225
- RightFloatingContainerItems: [],
226
- toolAreaVisible: false,
227
- floatingContainerContent: [],
228
- search: ""
229
- },
230
- "headerless-home": {
231
- stateName: "headerless-home",
232
- showCurtain: false,
233
- showCatalog: false,
234
- showPane: false,
235
- showRightFloatingContainer: true,
236
- showRecentActivity: true,
237
- paneContent: [],
238
- actions: [],
239
- floatingActions: [],
240
- subHeader: [],
241
- toolAreaItems: [],
242
- RightFloatingContainerItems: [],
243
- toolAreaVisible: false,
244
- floatingContainerContent: [],
245
- search: ""
246
- },
247
- "merged-home": {
248
- stateName: "merged-home",
249
- showCurtain: false,
250
- showCatalog: false,
251
- showPane: false,
252
- showRightFloatingContainer: true,
253
- showRecentActivity: true,
254
- paneContent: [],
255
- actions: [],
256
- floatingActions: [],
257
- subHeader: [],
258
- toolAreaItems: [],
259
- RightFloatingContainerItems: [],
260
- toolAreaVisible: false,
261
- floatingContainerContent: [],
262
- search: ""
263
- },
264
- lean: {
265
- stateName: "lean",
266
- showCurtain: false,
267
- showCatalog: false,
268
- showPane: false,
269
- showRightFloatingContainer: true,
270
- showRecentActivity: false,
271
- paneContent: [],
272
- search: "",
273
- actions: [],
274
- floatingActions: [],
275
- subHeader: [],
276
- toolAreaItems: [],
277
- RightFloatingContainerItems: [],
278
- toolAreaVisible: false,
279
- floatingContainerContent: []
280
- },
281
- "lean-home": {
282
- stateName: "lean-home",
283
- showCurtain: false,
284
- showCatalog: false,
285
- showPane: false,
286
- showRightFloatingContainer: true,
287
- showRecentActivity: false,
288
- paneContent: [],
289
- search: "",
290
- actions: [],
291
- floatingActions: [],
292
- subHeader: [],
293
- toolAreaItems: [],
294
- RightFloatingContainerItems: [],
295
- toolAreaVisible: false,
296
- floatingContainerContent: []
297
- }
298
- };
299
- }
300
-
301
- function removeObjectKeys (oObject, oKeysToDelete) {
302
- return Object.keys(oObject).reduce(function (o, sKey) {
303
- if (!oKeysToDelete[sKey]) {
304
- o[sKey] = oObject[sKey];
305
- }
306
- return o;
307
- }, {});
308
- }
309
-
310
- function validateValueIsNotUndefined (aItems, value) {
311
- return value !== undefined;
312
- }
313
- function noValidation () {
314
- return true;
315
- }
316
-
317
- function getModelProperty (oCurrentModel, modelPropertyString) {
318
- var aPath = modelPropertyString.split("/");
319
- var oModelSoFar = oCurrentModel;
320
- aPath.shift();
321
- aPath.forEach(function (sPathPart) {
322
- if (!oModelSoFar) {
323
- return;
324
- }
325
- oModelSoFar = oModelSoFar[sPathPart];
326
- });
327
- return oModelSoFar;
328
- }
329
-
330
- function updateModelProperty (modelPropertyString, aValue, oCurrentModel) {
331
- var aPath = modelPropertyString.split("/");
332
- var oModelSoFar = oCurrentModel;
333
- aPath.shift();
334
- var sProperty = aPath.pop();
335
- aPath.forEach(function (sPathPart) {
336
- oModelSoFar = oModelSoFar[sPathPart];
337
- });
338
- oModelSoFar[sProperty] = aValue;
339
- }
340
-
341
- function ElementsModel () {
342
- var oCustomShellStates;
343
- var oStateModelToUpdate;
344
- var oCustomShellStateModel;
345
- var oApplicationShellStates;
346
- var oManagedElements;
347
- var bInRenderState;
348
- var sExtendedShellStateName;
349
- var bInCreateTemplate;
350
- var aTriggersToHandleQueue;
351
- var bEnableRegisterTriggers;
352
-
353
- this.createDefaultTriggers = function (sInitialState) {
354
- //add trigger to rerender shell state when we have we add the first action item.
355
- var fnRerenderShellOnFirstAction = function (sSubject, ev, oData) {
356
- if (oData.sProperty === "actions") {
357
- var aActions = getModelProperty(oData.oModel, oData.path);
358
- if (aActions && aActions.length === 0 && oData.aIds && oData.aIds.length > 0) {
359
- this._renderShellState();
360
- }
361
- }
362
- }.bind(this);
363
-
364
- var fnAddBackButtonOnFirstNavigation = function (oHashChangeEvent) {
365
- function hasInnerAppRouteChanged (sOldURL, sNewURL) {
366
- var sOldHash = UrlParsing.getHash(sOldURL),
367
- sNewHash = UrlParsing.getHash(sNewURL),
368
- sOldInnerAppRoute = UrlParsing.parseShellHash(sOldHash).appSpecificRoute,
369
- sNewInnerAppRoute = UrlParsing.parseShellHash(sNewHash).appSpecificRoute;
370
-
371
- return sOldInnerAppRoute !== sNewInnerAppRoute;
372
- }
373
-
374
- var bInnerAppNavigationOccurred = hasInnerAppRouteChanged(oHashChangeEvent.oldURL, oHashChangeEvent.newURL);
375
- if (bInnerAppNavigationOccurred) {
376
- this.addHeaderItem(["backBtn"], true);
377
- }
378
- }.bind(this);
379
-
380
- //trigger when user update shell state
381
- this.createTriggersOnBaseStates([{
382
- sName: "onAddFirstAction",
383
- fnRegister: function () {
384
- EventBus.getInstance().subscribe("launchpad", "updateShell", fnRerenderShellOnFirstAction, this);
385
- },
386
- fnUnRegister: function () {
387
- EventBus.getInstance().unsubscribe("launchpad", "updateShell", fnRerenderShellOnFirstAction, this);
388
- }
389
- }], ["blank", "blank-home"], sInitialState);
390
-
391
- var that = this;
392
- var oAppRenderedDoable;
393
- this.createTriggersOnBaseStates([{
394
- sName: "onAddFirstAction",
395
- fnRegister: function () {
396
- // Show back button on inner-app navigation
397
- window.addEventListener("hashchange", fnAddBackButtonOnFirstNavigation);
398
-
399
- // Show back button on cross-app navigation
400
- var iNumRenderings = 0;
401
- oAppRenderedDoable = EventHub.on("AppRendered").do(function () {
402
- iNumRenderings++;
403
- /*
404
- * NOTE
405
- *
406
- * - Use >= because when an inplace navigation is made
407
- * next, the base state (with no back button) is
408
- * applied and we must add the backBtn there again.
409
- *
410
- * - Use 2, because EventHub calls the doable the first
411
- * time even if the app was already visible, and we
412
- * want to show backBtn during the second app
413
- * rendering.
414
- */
415
- if (iNumRenderings >= 2) {
416
- that.addHeaderItem(["backBtn"], true);
417
- }
418
- });
419
- },
420
- fnUnRegister: function () {
421
- window.removeEventListener("hashchange", fnAddBackButtonOnFirstNavigation);
422
- if (oAppRenderedDoable) {
423
- oAppRenderedDoable.off();
424
- }
425
- }
426
- }], ["lean", "lean-home"], sInitialState);
427
- };
428
-
429
- this.init = function (oConfig, oInApplicationRelatedElementsModel) {
430
- oBaseStates = createInitialBaseStates();
431
- customStatesDelta = createInitialCustomDeltas();
432
- oStateModelToUpdate = Config.last("/core/shell/model");
433
- oCustomShellStates = {};
434
- oManagedElements = {};
435
- bInRenderState = false;
436
- bInCreateTemplate = false;
437
- aTriggersToHandleQueue = [];
438
- bEnableRegisterTriggers = true;
439
- oApplicationShellStates = oInApplicationRelatedElementsModel;
440
-
441
- sExtendedShellStateName = undefined;
442
- if (oConfig) {
443
- Measurement.start("FLP:ElementsModel.init", "moveShellHeaderEndItems", "FLP");
444
- if (oConfig.moveContactSupportActionToShellHeader) {
445
- this._removeCustomDataActionBtnFromUserActionsMenu("ContactSupportBtn");
446
- }
447
- if (oConfig.moveAppFinderActionToShellHeader) {
448
- this._removeActionFromUserActionsMenu("openCatalogBtn");
449
- }
450
- if (oConfig.moveUserSettingsActionToShellHeader) {
451
- this._removeActionFromUserActionsMenu("userSettingsBtn");
452
- }
453
- Measurement.end("FLP:ElementsModel.init");
454
- }
455
-
456
- var initialState = oConfig && oConfig.appState ? oConfig.appState : "home";
457
- this.createDefaultTriggers(initialState);
458
- this.switchState(initialState);
459
- };
460
-
461
- this.destroy = function () {
462
- oStateModelToUpdate = undefined;
463
- oCustomShellStates = undefined;
464
- oApplicationShellStates = undefined;
465
- oManagedElements = undefined;
466
- bInRenderState = undefined;
467
- bEnableRegisterTriggers = undefined;
468
- bInCreateTemplate = undefined;
469
- sExtendedShellStateName = undefined;
470
- oBaseStates = undefined;
471
- customStatesDelta = undefined;
472
- };
473
-
474
- this.getModel = function () {
475
- var oRenderer = Container.getRendererInternal("fiori2");
476
-
477
- /*
478
- * Guard mainly to avoid breaking FLPD, which used to cope with an
479
- * undefined value being returned here. The flow is that FLPD tries
480
- * to instantiate StaticTile.controller, which on init attempts to
481
- * obtain the shell model just to setup the sizeBehavior property
482
- * of the tile.
483
- */
484
- if (!oRenderer) {
485
- return undefined;
486
- }
487
-
488
- return oRenderer._oShellView.getModel();
489
- };
490
-
491
- //moves the given button from being an action button in me area to a shell end header item
492
- //The button is added to the shell header in HeaderManager
493
- this._removeCustomDataActionBtnFromUserActionsMenu = function (btnName) {
494
- for (var key in customStatesDelta) {
495
- var oState = customStatesDelta[key];
496
- var aActions = oState.actions;
497
- var index = aActions.indexOf(btnName);
498
- if (index !== -1) {
499
- //remove the button from FLP Me Area
500
- customStatesDelta[key].actions.splice(index, 1);
501
- }
502
- }
503
- };
504
-
505
- //The button is added to the shell header in HeaderManager
506
- this._removeActionFromUserActionsMenu = function (sButtonName) {
507
- var key;
508
- for (key in oBaseStates) {
509
- var oState = oBaseStates[key];
510
- if (key === "blank" || key === "blank-home") {
511
- continue;
512
- }
513
- var aActions = oState.actions;
514
- var index = aActions.indexOf(sButtonName);
515
- if (index !== -1) {
516
- //remove the button from FLP Me Area
517
- oBaseStates[key].actions.splice(index, 1);
518
- }
519
- }
520
- };
521
-
522
- this.destroyManageQueue = function () {
523
- this._destroyManageQueue(["home", "embedded-home", "headerless-home", "merged-home", "blank-home", "lean-home"]);
524
- };
525
-
526
- this.switchState = function (sState/*, bSaveLastState*/) {
527
- var oState = deepExtend({}, oBaseStates[sState]);
528
-
529
- var oStateWithoutTriggers = removeObjectKeys(oState, {
530
- aTriggers: true
531
- });
532
- Config.emit("/core/shell/model/currentState", oStateWithoutTriggers);
533
- HeaderManager.switchState(sState);
534
-
535
- //change current state according to the sState.
536
- oCustomShellStateModel = oApplicationShellStates.customShellState;
537
- sExtendedShellStateName = undefined;
538
- this._renderShellState();
539
- return oState;
540
- };
541
-
542
- this.setLeftPaneVisibility = function (bVisible, bCurrentState, aStates) {
543
- this.updateStateProperty("showPane", bVisible, bCurrentState, aStates);
544
- };
545
-
546
- /**
547
- * Header hiding animation
548
- * @deprecated since 1.56. The headerHiding property has been removed.
549
- */
550
- this.setHeaderHiding = function () {
551
- Log.warning("Application Life Cycle model: headerHiding property is deprecated and has no effect");
552
- };
553
-
554
- // \/ Methods duplicated in the header manager \/
555
-
556
- this._createHeaderEventPayload = function (sPropertyName, vValue, bCurrentState, aStates, bDoNotPropagate, sAction) {
557
- var oPayload = {
558
- propertyName: sPropertyName,
559
- value: vValue,
560
- aStates: aStates,
561
- bCurrentState: bCurrentState,
562
- action: sAction,
563
- bDoNotPropagate: bDoNotPropagate
564
- };
565
- return oPayload;
566
- };
567
-
568
- this.setHeaderVisibility = function (bVisible, bCurrentState, aStates) {
569
- var oPayload = this._createHeaderEventPayload("headerVisible", bVisible, bCurrentState, aStates, false);
570
- HeaderManager.updateStates(oPayload);
571
- };
572
-
573
- this.showLogo = function (bCurrentState, aStates) {
574
- this.updateShowLogo(true, bCurrentState, aStates, false);
575
- };
576
-
577
- this.updateShowLogo = function (bValue, bCurrentState, aStates, bDoNotPropagate) {
578
- var oPayload = this._createHeaderEventPayload("showLogo", bValue, bCurrentState, aStates, bDoNotPropagate);
579
- HeaderManager.updateStates(oPayload);
580
- };
581
-
582
- this.addHeaderItem = function (aIds, bCurrentState, aStates) {
583
- if (aIds.length) {
584
- var oPayload = this._createHeaderEventPayload("headItems", aIds, bCurrentState, aStates, false);
585
- HeaderManager.updateStates(oPayload);
586
- }
587
- };
588
-
589
- this.removeHeaderItem = function (aIds, bCurrentState, aStates) {
590
- var oPayload = this._createHeaderEventPayload("headItems", aIds, bCurrentState, aStates, false, "remove");
591
- HeaderManager.updateStates(oPayload);
592
- };
593
-
594
- this.addHeaderEndItem = function (aIds, bCurrentState, aStates, bDoNotPropagate) {
595
- if (aIds.length) {
596
- var oPayload = this._createHeaderEventPayload("headEndItems", aIds, bCurrentState, aStates, bDoNotPropagate);
597
- HeaderManager.updateStates(oPayload);
598
- }
599
- };
600
-
601
- this.removeHeaderEndItem = function (aIds, bCurrentState, aStates) {
602
- var oPayload = this._createHeaderEventPayload("headEndItems", aIds, bCurrentState, aStates, false, "remove");
603
- HeaderManager.updateStates(oPayload);
604
- };
605
-
606
- // /\ Methods duplicated in the header manager /\
607
-
608
- this.addSubHeader = function (aIds, bCurrentState, aStates) {
609
- if (aIds.length) {
610
- this._addShellItem("subHeader", aIds, bCurrentState, aStates);
611
- }
612
- };
613
-
614
- this.removeSubHeader = function (aIds, bCurrentState, aStates) {
615
- this._removeShellItem("subHeader", aIds, bCurrentState, aStates);
616
- };
617
-
618
- this.addActionButton = function (aIds, bCurrentState, aStates) {
619
- this._addActionButton("actions", aIds, bCurrentState, aStates);
620
- };
621
-
622
- this.removeActionButton = function (aIds, bCurrentState, aStates) {
623
- this._removeShellItem("actions", aIds, bCurrentState, aStates);
624
- };
625
-
626
- this.addToolAreaItem = function (sId, bIsVisible, bCurrentState, aStates) {
627
- if (sId.length) {
628
- this._addToolAreaItem("toolAreaItems", sId, bIsVisible, bCurrentState, aStates);
629
- }
630
- };
631
-
632
- this.removeToolAreaItem = function (aIds, bCurrentState, aStates) {
633
- this._removeShellItem("toolAreaItems", aIds, bCurrentState, aStates);
634
- };
635
-
636
- this.addLeftPaneContent = function (aIds, bCurrentState, aStates) {
637
- if (aIds.length) {
638
- this._addShellItem("paneContent", aIds, bCurrentState, aStates);
639
- }
640
- };
641
-
642
- this.removeLeftPaneContent = function (aIds, bCurrentState, aStates) {
643
- this._removeShellItem("paneContent", aIds, bCurrentState, aStates);
644
- };
645
-
646
- this.addRightFloatingContainerItem = function (sId, bCurrentState, aStates) {
647
- if (sId.length) {
648
- this._addRightFloatingContainerItem("RightFloatingContainerItems", sId, bCurrentState, aStates);
649
- }
650
- };
651
-
652
- this.removeRightFloatingContainerItem = function (aIds, bCurrentState, aStates) {
653
- this._removeShellItem("RightFloatingContainerItems", aIds, bCurrentState, aStates);
654
- };
655
-
656
- this.showSettingsButton = function (bCurrentState, aStates) {
657
- this.addActionButton(["userSettingsBtn"], bCurrentState, aStates, false);
658
- };
659
-
660
- this.showSignOutButton = function (bCurrentState, aStates) {
661
- this.addActionButton(["logoutBtn"], bCurrentState, aStates, false);
662
- };
663
-
664
- this.showRightFloatingContainer = function (bShow) {
665
- this._showRightFloatingContainer(bShow);
666
- };
667
-
668
- this.addFloatingActionButton = function (aIds, bCurrentState, aStates) {
669
- //DO IN FUTURE: Check how to fix the redundant rerendering upon back navigation (caused due to the floatingAction button).
670
- //Check for itamars commit.
671
- if (aIds.length) {
672
- this._addShellItem("floatingActions", aIds, bCurrentState, aStates);
673
- }
674
- };
675
-
676
- this.removeFloatingActionButton = function (aIds, bCurrentState, aStates) {
677
- this._removeShellItem("floatingActions", aIds, bCurrentState, aStates);
678
- };
679
-
680
- this.updateStateProperty = function (sPropertyString, aValue, bCurrentState, aStates, bDoNotPropagate) {
681
- if (sPropertyString.startsWith("application")) {
682
- var oPayload = this._createHeaderEventPayload(sPropertyString, aValue, bCurrentState, aStates, false);
683
- HeaderManager.updateStates(oPayload);
684
- return;
685
- }
686
- this._setShellItem(sPropertyString, aValue, bCurrentState, aStates, validateValueIsNotUndefined, updateModelProperty, bDoNotPropagate);
687
- };
688
-
689
- this._handleTriggers = function (oNeededTriggers) {
690
- var oTriggerToRemove,
691
- oTriggerToRegister,
692
- aNewTriggerList = [],
693
- oAlreadyRegisteredMap = {};
694
-
695
- //prevent registration that invokes fnTrigger.
696
- bEnableRegisterTriggers = false;
697
-
698
- //remove triggers that we are not going to use.
699
- while (aTriggersToHandleQueue.length > 0) {
700
- oTriggerToRemove = aTriggersToHandleQueue.pop();
701
-
702
- //check if we still need it.
703
- if (oNeededTriggers[oTriggerToRemove.sName]) {
704
- //just add it the list of triggers.
705
- aNewTriggerList.push(oTriggerToRemove);
706
- oAlreadyRegisteredMap[oTriggerToRemove.sName] = oTriggerToRemove;
707
- } else {
708
- //if not needed anymore unregister it.
709
- oTriggerToRemove.fnUnRegister(this);
710
- }
711
- }
712
-
713
- //add the triggers that are not created yet.
714
- for (var sTriggerName in oNeededTriggers) {
715
- if (oNeededTriggers.hasOwnProperty(sTriggerName)) {
716
- if (!oAlreadyRegisteredMap[sTriggerName]) {
717
- oTriggerToRegister = oNeededTriggers[sTriggerName];
718
- oTriggerToRegister.fnRegister(this);
719
- aNewTriggerList.push(oTriggerToRegister);
720
- }
721
- }
722
- }
723
-
724
- //update the current triggered list.
725
- aTriggersToHandleQueue = aNewTriggerList;
726
-
727
- bEnableRegisterTriggers = true;
728
- };
729
-
730
- this._registerTriggers = function (aTriggers) {
731
- // Prevent cyclic trigger registration.
732
- bEnableRegisterTriggers = false;
733
-
734
- aTriggers.forEach(function (oTrigger) {
735
- oTrigger.fnRegister(this);
736
- aTriggersToHandleQueue.push(oTrigger);
737
- });
738
-
739
- bEnableRegisterTriggers = true;
740
- };
741
-
742
- function addTriggersToState (aTriggers, oState) {
743
- var aAddedTriggers = [];
744
-
745
- if (!oState.aTriggers) {
746
- oState.aTriggers = [];
747
- }
748
-
749
- aTriggers.forEach(function (oTrigger) {
750
- var oFilteredTrigger = {
751
- sName: oTrigger.sName,
752
- fnRegister: oTrigger.fnRegister,
753
- fnUnRegister: oTrigger.fnUnRegister
754
- };
755
-
756
- oState.aTriggers.push(oFilteredTrigger);
757
-
758
- aAddedTriggers.push(oFilteredTrigger);
759
- });
760
-
761
- return aAddedTriggers;
762
- }
763
-
764
- this.createTriggersOnState = function (aTriggers/*, oState*/) {
765
- var aAddedTriggers = addTriggersToState(aTriggers, oBaseStates);
766
-
767
- if (!bInRenderState) {
768
- this._registerTriggers(aAddedTriggers);
769
- }
770
- };
771
-
772
- this.createTriggersOnBaseStates = function (aTriggers, aBaseStateNames, sCurrentStateName) {
773
- var aAddedTriggers = [];
774
- aBaseStateNames.forEach(function (sBaseStateName) {
775
- var oBaseState = oBaseStates[sBaseStateName];
776
-
777
- // safe to assign to aAddedTriggers, because the triggers are
778
- // the same for all states. We do not use aTriggers directly
779
- // because addTriggersToState returns another object back.
780
- aAddedTriggers = addTriggersToState(aTriggers, oBaseState);
781
- });
782
-
783
- var bBaseOfCurrentStateUpdated = aBaseStateNames.indexOf(sCurrentStateName) >= 0;
784
-
785
- if (bBaseOfCurrentStateUpdated && !bInRenderState) {
786
- this._registerTriggers(aAddedTriggers);
787
- }
788
- };
789
-
790
- this.createTriggers = function (aTriggers, bAddToCurrentState, aBaseStateNames) {
791
- var oCurrentState = oStateModelToUpdate.currentState;
792
-
793
- if (bAddToCurrentState === true) {
794
- this.createTriggersOnState(aTriggers, oCurrentState);
795
- return;
796
- }
797
-
798
- this.createTriggersOnBaseStates(aTriggers, aBaseStateNames, oCurrentState.stateName);
799
- };
800
-
801
- this.showShellItem = function (sProperty, sState, bVisible) {
802
- var aStates = StateHelper.getModelStates(sState),
803
- sModelCurrentStateProperty = "/currentState" + sProperty,
804
- sBaseStateName;
805
- for (var i = 0; i < aStates.length; i++) {
806
- sBaseStateName = oBaseStates[aStates[i]].stateName;
807
- oBaseStates[sBaseStateName][sProperty.split("/")[1]] = bVisible;
808
- }
809
- if (oStateModelToUpdate.currentState.stateName === sState) {
810
- updateModelProperty(sModelCurrentStateProperty, bVisible, oStateModelToUpdate);
811
- if (!bInRenderState) {
812
- this._renderShellState();
813
- }
814
- }
815
- };
816
-
817
- this.addCustomItems = function (sStateEntry, aIds, bCurrentState, aStates) {
818
- if (this._isValidStateEntry(sStateEntry)) {
819
- this._isValidStateEntry(sStateEntry).fnAdd(aIds, bCurrentState, aStates);
820
- } else {
821
- throw new Error("Invalid state entry:" + sStateEntry);
822
- }
823
- };
824
-
825
- this.removeCustomItems = function (sStateEntry, aIds, bCurrentState, aStates) {
826
- if (this._isValidStateEntry(sStateEntry)) {
827
- this._isValidStateEntry(sStateEntry).fnRemove(aIds, bCurrentState, aStates);
828
- } else {
829
- throw new Error("Invalid state entry:" + sStateEntry);
830
- }
831
- };
832
-
833
- this.applyExtendedShellState = function (sShellName) {
834
- sExtendedShellStateName = sShellName;
835
- this._renderShellState();
836
- };
837
-
838
- this.addEntryInShellStates = function (sEntry, entrySuffix, fnAdd, fnRemove, oStatesConfiguration) {
839
- var index,
840
- sStateName;
841
-
842
- if (!oCustomShellStates[sEntry]) {
843
- oCustomShellStates[sEntry] = {
844
- fnAdd: fnAdd,
845
- fnHide: fnRemove
846
- };
847
-
848
- //add new entry to the model
849
- var aStates = this._getStatesList();
850
-
851
- for (index = 0; index < aStates.length; index++) {
852
- sStateName = aStates[index];
853
- oBaseStates[sStateName][sEntry] = oStatesConfiguration[sStateName];
854
- }
855
-
856
- //create the hook functions
857
- this["remove" + entrySuffix] = fnRemove;
858
- this["add" + entrySuffix] = fnAdd;
859
- } else {
860
- throw new Error("State entry already exsists:" + sEntry);
861
- }
862
- };
863
-
864
- this.addElementToManagedQueue = function (oItem) {
865
- //update extenstionShell
866
- //get the current model ref
867
- var sStateName = Config.last("/core/shell/model/currentState/stateName"),
868
- oBaseExtensionShellStates,
869
- sItemId = oItem.getId();
870
-
871
- if (!oApplicationShellStates) {
872
- oApplicationShellStates = {
873
- extendedShellStates: {},
874
- aTriggers: [],
875
- customShellState: this._createCustomShellState("custom")
876
- };
877
- }
878
-
879
- oBaseExtensionShellStates = oApplicationShellStates.extendedShellStates;
880
-
881
- if (!oBaseExtensionShellStates[sStateName]) {
882
- oBaseExtensionShellStates[sStateName] = {
883
- managedObjects: [],
884
- customState: undefined
885
- };
886
- }
887
-
888
- oBaseExtensionShellStates[sStateName].managedObjects.push(sItemId);
889
- //Update oManagedElements
890
- var oManagedElement = oManagedElements[sItemId];
891
-
892
- if (oManagedElement) {
893
- oManagedElement.nRefCount++;
894
- } else {
895
- oManagedElement = {
896
- oItem: oItem,
897
- nRefCount: 1
898
- };
899
- oManagedElements[sItemId] = oManagedElement;
900
- }
901
- };
902
-
903
- this.updateNeededTriggersMap = function (oStorage, aTriggers) {
904
- var index;
905
-
906
- if (!aTriggers) {
907
- return;
908
- }
909
- for (index = 0; index < aTriggers.length; index++) {
910
- oStorage[aTriggers[index].sName] = aTriggers[index];
911
- }
912
- };
913
-
914
- this._renderShellState = function () {
915
- var sBaseStateName = Config.last("/core/shell/model/currentState/stateName"),
916
- oExtendedShell, oExtendedState,
917
- oShellBaseState = deepExtend({}, oBaseStates[sBaseStateName]),
918
- oExtendedShellStateBase = oApplicationShellStates,
919
- oCustomState,
920
- oNeededTriggers = {};
921
-
922
- //This flow can occur, flow: create renderShellState-->Renderer API-->applifeCycle (application related model update)-->renderShellState
923
- if (bInRenderState) {
924
- return;
925
- }
926
-
927
- //Can be undefined, see test "test Shell back button on RTL", validates that when creating the "fiori2" renderer and setting the base states,
928
- //invokes this "_renderShellState" function, without oExtendedShellStateBase, hence the custom is not defined and no need to merge it with the custom.
929
- if (oExtendedShellStateBase && oExtendedShellStateBase.customShellState) {
930
- oCustomState = oExtendedShellStateBase.customShellState.currentState;
931
- }
932
-
933
- // Change "currentState" property in the model to the new base state
934
- var oBaseStateClone = {
935
- currentState: deepExtend({}, oShellBaseState)
936
- };
937
-
938
- oStateModelToUpdate = oBaseStateClone;
939
- bInRenderState = true;
940
-
941
- //merge the Extended Shell, if it has one.
942
- if (sExtendedShellStateName && oExtendedShellStateBase.extendedShellStates && oExtendedShellStateBase.extendedShellStates[sExtendedShellStateName]) {
943
- oExtendedShell = oExtendedShellStateBase.extendedShellStates[sExtendedShellStateName].customState;
944
- oExtendedState = oExtendedShell.currentState;
945
- this._addCustomShellStates(oExtendedState);
946
- }
947
- //merge the custom
948
- if (oCustomState) {
949
- this._addCustomShellStates(oCustomState);
950
- }
951
-
952
- oStateModelToUpdate = Config.last("/core/shell/model");
953
-
954
- //list all triggers needed for this shell state..
955
- if (oShellBaseState && oShellBaseState.aTriggers) {
956
- this.updateNeededTriggersMap(oNeededTriggers, oShellBaseState.aTriggers);
957
- }
958
- if (oExtendedState && oExtendedState.aTriggers) {
959
- this.updateNeededTriggersMap(oNeededTriggers, oExtendedState.aTriggers);
960
- }
961
- if (oCustomState && oCustomState.aTriggers) {
962
- this.updateNeededTriggersMap(oNeededTriggers, oCustomState.aTriggers);
963
- }
964
-
965
- //clear all unused registered triggers.
966
- if (bEnableRegisterTriggers) {
967
- this._handleTriggers(oNeededTriggers);
968
- }
969
-
970
- //set to current state.
971
- delete oBaseStateClone.currentState.aTriggers;
972
- var oStateWithoutTriggers = removeObjectKeys(oBaseStateClone.currentState, {
973
- aTriggers: true
974
- });
975
-
976
- //Because _renderShellState is called directly by RelatedShellElement.js when oApplicationShellStates is changed
977
- //we need to recalculate header state every time
978
- HeaderManager.recalculateState(sExtendedShellStateName);
979
- Config.emit("/core/shell/model/currentState", oStateWithoutTriggers);
980
- bInRenderState = false;
981
- };
982
-
983
- this._addCustomShellStates = function (oTemplateStateJSON) {
984
- this.addToolAreaItem(oTemplateStateJSON.toolAreaItems, false, true);
985
- this.addSubHeader(oTemplateStateJSON.subHeader, true);
986
- this.addRightFloatingContainerItem(oTemplateStateJSON.RightFloatingContainerItems, true);
987
- this.addActionButton(oTemplateStateJSON.actions, true, undefined, false);
988
- this.addLeftPaneContent(oTemplateStateJSON.paneContent, true);
989
- this.addFloatingActionButton(oTemplateStateJSON.floatingActions, true);
990
- this.showRightFloatingContainer(oTemplateStateJSON.showRightFloatingContainer);
991
- };
992
-
993
- this._createCustomShellState = function (sShellName) {
994
- var oCustomState = {
995
- currentState: {
996
- stateName: sShellName,
997
- headEndItems: [],
998
- paneContent: [],
999
- headItems: [],
1000
- actions: [],
1001
- floatingActions: [],
1002
- subHeader: [],
1003
- toolAreaItems: [],
1004
- RightFloatingContainerItems: [],
1005
- application: {},
1006
- showRightFloatingContainer: undefined,
1007
- headerHeading: undefined
1008
- }
1009
- };
1010
- var shellCustomState = customStatesDelta[sShellName];
1011
- if (shellCustomState) {
1012
- extend(oCustomState.currentState, shellCustomState);
1013
- }
1014
-
1015
- return oCustomState;
1016
- };
1017
-
1018
- /*-----------------------------Handlers----------------------------------------------------------------*/
1019
-
1020
- this._showRightFloatingContainer = function (bShow) {
1021
- this._setShellItem("showRightFloatingContainer", bShow, true, [], validateValueIsNotUndefined, updateModelProperty);
1022
- };
1023
-
1024
- this._addActionButton = function (sPropertyString, aId, bCurrentState, aStates) {
1025
- function fnUpdate (modelPropertyString, aIds, oCurrentModel) {
1026
- var aActions = getModelProperty(oCurrentModel, modelPropertyString);
1027
-
1028
- //logoutBtn is at the end
1029
- var iLogoutButtonIndex = aActions.indexOf("logoutBtn");
1030
- if (iLogoutButtonIndex > -1) {
1031
- aActions.splice.apply(aActions, [iLogoutButtonIndex, 0].concat(aIds));
1032
- } else {
1033
- aActions = aActions.concat(aIds);
1034
- }
1035
-
1036
- // remove actions duplicates
1037
- var aFilteredActions = utils.removeDuplicatedActions(aActions);
1038
-
1039
- function sortActions (aActions) {
1040
- var aActionButtons = [],
1041
- aOrderedButtons = [
1042
- "recentActivitiesBtn",
1043
- "frequentActivitiesBtn",
1044
- "openCatalogBtn",
1045
- "userSettingsBtn",
1046
- "ActionModeBtn",
1047
- "EditModeBtn",
1048
- "ContactSupportBtn"
1049
- ];
1050
-
1051
- for (var i = 0; i < aOrderedButtons.length; i++) {
1052
- var iItemIndex = aActions.indexOf(aOrderedButtons[i]);
1053
- if (iItemIndex > -1) {
1054
- // splice return array, we need the first item from this array
1055
- aActionButtons.push(aActions.splice(iItemIndex, 1)[0]);
1056
- }
1057
- }
1058
- // add custom buttons to the end
1059
- aActionButtons = aActionButtons.concat(aActions);
1060
- return aActionButtons;
1061
- }
1062
-
1063
- var aNewActionButtons = sortActions(aFilteredActions);
1064
- updateModelProperty(modelPropertyString, aNewActionButtons, oCurrentModel);
1065
- }
1066
- this._setShellItem(sPropertyString, aId, bCurrentState, aStates, noValidation, fnUpdate);
1067
- };
1068
-
1069
- //TODO check whu we need the prop string as parameter
1070
- this.setFloatingContainerContent = function (sPropertyString, aIds, bCurrentState, aStates) {
1071
- function fnValidation (aItems, aIds, sState) {
1072
- return aIds.length === 1;//aItems.length === 1;
1073
- }
1074
- function fnUpdate (modelPropertyString, aIds, oCurrentModel) {
1075
- updateModelProperty(modelPropertyString, aIds, oCurrentModel);
1076
- }
1077
- this._setShellItem(sPropertyString, aIds, bCurrentState, aStates, fnValidation, fnUpdate);
1078
- };
1079
-
1080
- this._addShellItem = function (sPropertyString, aId, bCurrentState, aStates) {
1081
- function fnValidation (aItems, aId, sState) {
1082
- if (aItems.length > 0) {
1083
- Log.warning("You can only add one item. Replacing existing item: " + aItems[0] + " in state: " + sState + ", with the new item: " + aId[0] + ".");
1084
- }
1085
- return true;
1086
- }
1087
- function fnUpdate (modelPropertyString, aIds, oCurrentModel) {
1088
- updateModelProperty(modelPropertyString, aId.slice(0), oCurrentModel);
1089
- }
1090
- this._setShellItem(sPropertyString, aId, bCurrentState, aStates, fnValidation, fnUpdate);
1091
- };
1092
-
1093
- this._addRightFloatingContainerItem = function (sPropertyString, sId, bCurrentState, aStates) {
1094
- function fnUpdate (modelPropertyString, aId, oCurrentModel) {
1095
- var aItems = getModelProperty(oCurrentModel, modelPropertyString);
1096
- aItems = aItems.concat(aId);
1097
-
1098
- updateModelProperty(modelPropertyString, aItems, oCurrentModel);
1099
- }
1100
-
1101
- this._setShellItem(sPropertyString, sId, bCurrentState, aStates, noValidation, fnUpdate);
1102
- };
1103
-
1104
- this._addToolAreaItem = function (sPropertyString, vIds, bIsVisible, bCurrentState, aStates) {
1105
- function fnUpdate (modelPropertyString, vIds, oCurrentModel) {
1106
- var aItems = getModelProperty(oCurrentModel, modelPropertyString),
1107
- sId,
1108
- index;
1109
-
1110
- if (typeof vIds === "string") {
1111
- vIds = [vIds];
1112
- }
1113
-
1114
- for (index = 0; index < vIds.length; index++) {
1115
- sId = vIds[index];
1116
- if (aItems.indexOf(sId) < 0) {
1117
- aItems.push(sId);
1118
- }
1119
- }
1120
-
1121
- updateModelProperty(modelPropertyString, aItems, oCurrentModel);
1122
- }
1123
-
1124
- if (bIsVisible) {
1125
- var index,
1126
- aPassStates = StateHelper.getPassStates(aStates);
1127
-
1128
- for (index = 0; index < aPassStates.length; index++) {
1129
- this.showShellItem("/toolAreaVisible", aPassStates[index], true);
1130
- }
1131
- }
1132
-
1133
- this._setShellItem(sPropertyString, vIds, bCurrentState, aStates, noValidation, fnUpdate);
1134
- };
1135
-
1136
- this._removeShellItem = function (sPropertyString, sId, bCurrentState, aStates) {
1137
- function fnValidation (aItems, aIds) {
1138
- var location,
1139
- sId,
1140
- index;
1141
-
1142
- for (index = 0; index < aIds.length; index++) {
1143
- sId = aIds[index];
1144
- location = aItems.indexOf(sId);
1145
- if (location < 0) {
1146
- Log.warning("You cannot remove Item: " + sId + ", the Item does not exists.");
1147
- return false;
1148
- }
1149
- }
1150
-
1151
- return true;
1152
- }
1153
- function fnUpdate (modelPropertyString, aIds, oCurrentModel) {
1154
- var aItems = getModelProperty(oCurrentModel, modelPropertyString),
1155
- location,
1156
- sId,
1157
- index;
1158
-
1159
- for (index = 0; index < aIds.length; index++) {
1160
- sId = aIds[index];
1161
- location = aItems.indexOf(sId);
1162
- if (location > -1) {
1163
- aItems.splice(location, 1);
1164
- }
1165
- }
1166
- updateModelProperty(modelPropertyString, aItems, oCurrentModel);
1167
- }
1168
- this._setShellItem(sPropertyString, sId, bCurrentState, aStates, fnValidation, fnUpdate);
1169
- };
1170
-
1171
- this._setShellItem = function (sPropertyString, aOrgIds, bCurrentState, aStates, fnValidation, fnUpdate, bDoNotPropagate) {
1172
- var modelPropertyString,
1173
- aItems;
1174
-
1175
- //clone the ids, to protect the model.
1176
- var aIds = Array.isArray(aOrgIds) ? aOrgIds.slice(0) : aOrgIds;
1177
- if (bCurrentState === true) {
1178
- modelPropertyString = "/currentState/" + sPropertyString;
1179
- aItems = getModelProperty(oStateModelToUpdate, modelPropertyString);
1180
-
1181
- //make validations
1182
- if (fnValidation(aItems, aIds, "currentState") === false) {
1183
- return;
1184
- }
1185
-
1186
- //also update the oCustomShellStateModel
1187
- //check that we are not pointing to a shadow shell
1188
- if (!bInCreateTemplate && !bInRenderState) {
1189
- //Update the custom state only if you are called from custom api.
1190
- fnUpdate(modelPropertyString, aIds, oCustomShellStateModel);
1191
- EventBus.getInstance().publish("launchpad", "updateShell", {
1192
- oModel: oStateModelToUpdate,
1193
- path: modelPropertyString,
1194
- aIds: aIds,
1195
- sProperty: sPropertyString
1196
- });
1197
- this._renderShellState();
1198
- } else {
1199
- //update the modelToUpdate.
1200
- fnUpdate(modelPropertyString, aIds, oStateModelToUpdate);
1201
- }
1202
- } else {
1203
- var aPassStates = bDoNotPropagate ? aStates : StateHelper.getPassStates(aStates),
1204
- i,
1205
- oCurrentStateName = oStateModelToUpdate.currentState.stateName;
1206
-
1207
- for (i = 0; i < aPassStates.length; i++) {
1208
- var sState = aPassStates[i],
1209
- j;
1210
- aItems = getModelProperty(oBaseStates[sState], "/" + sPropertyString);
1211
-
1212
- //make validations
1213
- if (fnValidation(aItems, aIds, sState) === false) {
1214
- continue;
1215
- }
1216
-
1217
- var aModelStates = StateHelper.getModelStates(sState, bDoNotPropagate);
1218
- for (j = 0; j < aModelStates.length; j++) {
1219
- modelPropertyString = "/" + aModelStates[j] + "/" + sPropertyString;
1220
- fnUpdate(modelPropertyString, aIds, oBaseStates);
1221
- if (oCurrentStateName === aModelStates[j]) {
1222
- //It was added to the base shell state so after we add it to the base recalculate the shell state.
1223
- if (!bInRenderState) {
1224
- this._renderShellState();
1225
- }
1226
- }
1227
- }
1228
- }
1229
- }
1230
- };
1231
-
1232
- this._getStatesList = function () {
1233
- return Object.keys(oBaseStates);
1234
- };
1235
-
1236
- this._destroyManageQueue = function (/*aExcludeStates*/) {
1237
- var nExtendedShellStateIndex,
1238
- sElementIdToRelease,
1239
- oManagedElemet,
1240
- oBaseStateExtensionShellStates,
1241
- sBaseExtShellStateKey,
1242
- oStateExtensionShellStates;
1243
-
1244
- oBaseStateExtensionShellStates = oApplicationShellStates.extendedShellStates;
1245
- //loop over extended shell states
1246
- for (sBaseExtShellStateKey in oBaseStateExtensionShellStates) {
1247
- if (oBaseStateExtensionShellStates.hasOwnProperty(sBaseExtShellStateKey)) {
1248
- oStateExtensionShellStates = oBaseStateExtensionShellStates[sBaseExtShellStateKey].managedObjects;
1249
- //loop over the elements in that extension shell state
1250
- for (nExtendedShellStateIndex = 0; nExtendedShellStateIndex < oStateExtensionShellStates.length; nExtendedShellStateIndex++) {
1251
- sElementIdToRelease = oStateExtensionShellStates[nExtendedShellStateIndex];
1252
- oManagedElemet = oManagedElements[sElementIdToRelease];
1253
- //update the number of references to the element, because the extended shell state ni longer available
1254
- oManagedElemet.nRefCount--;
1255
-
1256
- if (oManagedElemet.nRefCount === 0) {
1257
- //delete the object
1258
- oManagedElemet.oItem.destroy();
1259
- oManagedElements[sElementIdToRelease] = null;
1260
- }
1261
- }
1262
- //remove the base extension for that shell state
1263
- delete oBaseStateExtensionShellStates[sBaseExtShellStateKey];
1264
- }
1265
- }
1266
- };
1267
-
1268
- this._isValidStateEntry = function (sName) {
1269
- return !!oCustomShellStates[sName];
1270
- };
1271
-
1272
- this.getModelToUpdate = function () {
1273
- return oStateModelToUpdate;
1274
- };
1275
-
1276
- this.setModelToUpdate = function (oModelToUpdate, bCreateTemplate) {
1277
- bInCreateTemplate = bCreateTemplate;
1278
- oStateModelToUpdate = oModelToUpdate;
1279
- };
1280
-
1281
- this._getManagedElements = function () {
1282
- return oManagedElements;
1283
- };
1284
-
1285
- this.extendStates = function (oStates) {
1286
- var stateEntryKey;
1287
- for (stateEntryKey in oStates) {
1288
- if (oStates.hasOwnProperty(stateEntryKey)) {
1289
- utils.updateProperties(oBaseStates[stateEntryKey], oStates[stateEntryKey]);
1290
- }
1291
- }
1292
- };
1293
-
1294
- this.getBaseStateMember = function (sStateName, sBaseStateMember) {
1295
- return oBaseStates[sStateName][sBaseStateMember];
1296
- };
1297
-
1298
- this.getCustomStateDeltaMember = function (sStateName, sCustomStateDeltaMember) {
1299
- return customStatesDelta[sStateName][sCustomStateDeltaMember];
1300
- };
1301
-
1302
- this.getAllStatesInDelta = function () {
1303
- return Object.keys(customStatesDelta);
1304
- };
1305
- }
1306
-
1307
- var oElementsModel = new ElementsModel();
1308
- return oElementsModel;
1309
- }, /* bExport= */ true);