@sapui5/sap.ushell_abap 1.145.1 → 1.147.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 (62) hide show
  1. package/package.json +4 -4
  2. package/src/main/js/sap/ushell_abap/.library +8 -7
  3. package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +4 -5
  4. package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +1 -1
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +143 -69
  6. package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
  7. package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +7 -4
  8. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +19 -10
  9. package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +148 -109
  10. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  12. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
  13. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +9 -10
  15. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +1 -1
  16. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
  17. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  18. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
  19. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  20. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
  21. package/src/main/js/sap/ushell_abap/bootstrap/BootTask/PrepareDirectAppStart.js +20 -0
  22. package/src/main/js/sap/ushell_abap/bootstrap/BootTask/RequestGroups.js +51 -0
  23. package/src/main/js/sap/ushell_abap/bootstrap/BootTask/RequestTargetMappings.js +29 -0
  24. package/src/main/js/sap/ushell_abap/bootstrap/BootTask.js +47 -0
  25. package/src/main/js/sap/ushell_abap/bootstrap/ConfigurationProvider.js +87 -0
  26. package/src/main/js/sap/ushell_abap/bootstrap/DirectAppStart.js +231 -0
  27. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer.js +43 -0
  28. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/InitXhrLogon.js +148 -0
  29. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages.js +86 -0
  30. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad.js +63 -0
  31. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpadModule.js +11 -0
  32. package/src/main/js/sap/ushell_abap/bootstrap/PageSetsRequestHandler.js +247 -0
  33. package/src/main/js/sap/ushell_abap/bootstrap/PlatformConfig.js +385 -0
  34. package/src/main/js/sap/ushell_abap/bootstrap/{evo/SAPCompanionConditionSetter.js → SAPCompanionConditionSetter.js} +6 -4
  35. package/src/main/js/sap/ushell_abap/bootstrap/StartupRequestHandler.js +145 -0
  36. package/src/main/js/sap/ushell_abap/bootstrap/ThemeHandler.js +276 -0
  37. package/src/main/js/sap/ushell_abap/bootstrap/XhrFactory.js +69 -0
  38. package/src/main/js/sap/ushell_abap/bootstrap/{evo/XhrLogonEventHandler.js → XhrLogonEventHandler.js} +13 -7
  39. package/src/main/js/sap/ushell_abap/bootstrap/XhrLogonLibLoader.js +51 -0
  40. package/src/main/js/sap/ushell_abap/bootstrap/abap-def-dev.js +20 -0
  41. package/src/main/js/sap/ushell_abap/bootstrap/{evo/abap-def-loader.js → abap-def-loader.js} +2 -2
  42. package/src/main/js/sap/ushell_abap/bootstrap/abap-def.js +22 -0
  43. package/src/main/js/sap/ushell_abap/bootstrap/{evo/abap.constants.js → abapConstants.js} +8 -2
  44. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.js +1 -1
  45. package/src/main/js/sap/ushell_abap/components/TCodeNavigation/MessageCode.js +18 -1
  46. package/src/main/js/sap/ushell_abap/components/TCodeNavigation.js +27 -16
  47. package/src/main/js/sap/ushell_abap/library.js +1 -1
  48. package/src/main/js/sap/ushell_abap/pbServices/ui2/Contracts.js +33 -0
  49. package/ui5.yaml +7 -6
  50. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +0 -42
  51. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +0 -45
  52. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +0 -172
  53. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.theme.js +0 -28
  54. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +0 -176
  55. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +0 -72
  56. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +0 -219
  57. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +0 -154
  58. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +0 -75
  59. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.LibLoader.js +0 -21
  60. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.configure.js +0 -62
  61. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.handler.js +0 -82
  62. package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +0 -948
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @alias sap.ushell_abap.components.TCodeNavigation
38
38
  * @namespace
39
39
  * @description This module provides functionality to navigate to an application intent based on a transaction code.
40
- * It checks if the provided transaction code matches any inbound's appInfo parameter `abap.transaction`.
40
+ * It checks if the provided transaction code matches any inbound's appInfo parameter `transaction`.
41
41
  * If a match is found, it extracts the semantic object, action, and parameters from the inbound
42
42
  * and uses the Navigation service to perform the navigation.
43
43
  *
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @since 1.140.0
47
47
  * @private
48
48
  * @ui5-restricted sap.esh.search.ui
49
- */ // TODO add technical name of esearch component / team name
49
+ */
50
50
  class TCodeNavigation {
51
51
  // Performance extension for tracking navigation sources
52
52
  static #oExtension = new Extension("TCodeNavigation");
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  static MessageCode = MessageCode;
56
56
 
57
57
  /**
58
- * Navigates to an app intent if the given sTCode matches an inbound's appInfo parameter abap.transaction.
58
+ * Navigates to an app intent if the given sTCode matches an inbound's appInfo parameter transaction.
59
59
  * The transaction code is case-insensitive and will be converted to uppercase for matching.
60
60
  * If a matching inbound is found, it extracts the semantic object, action, and parameters
61
61
  * and uses the Navigation service to perform the navigation.
@@ -92,7 +92,7 @@ sap.ui.define([
92
92
  if (!bResult) {
93
93
  throw new TCodeNavigationError(
94
94
  `Navigation to FLP home failed: ${sFLPUrl}`,
95
- { code: MessageCode.NAVFLP_HOME_FAILED }
95
+ { code: MessageCode.NAV_FLP_HOME_FAILED }
96
96
  );
97
97
  }
98
98
  } else {
@@ -204,26 +204,37 @@ sap.ui.define([
204
204
  // Finds the first "app" that matches the given transaction code and doesn't have mandatory parameters.
205
205
  // "App" in this sense mean: combination of inbound and default tile (the default tile might bring values for defined mandatory parameters,
206
206
  // therefore, both artefacts are combined and checked together).
207
- const aTranscationCodeInbounds = oNavigationData.inbounds.filter((oInbound) =>
208
- oInbound.resolutionResult?.appInfo?.["abap.transaction"] === sTCode
207
+ const aTransactionCodeInbounds = oNavigationData.inbounds.filter((oInbound) =>
208
+ oInbound.resolutionResult?.appInfo?.transaction === sTCode
209
209
  );
210
-
211
- // filter inbounds which are default for ladi and have tiles
212
- const aLadiInbounds = aTranscationCodeInbounds.filter((oInbound) =>
213
- oInbound.isDefaultLadi && oInbound.ladiHasTiles);
214
- // currently, it is not possible to ensure that there is only one default ladi inbound for a transaction code,
215
- // therefore, we sort them by ladiid and uuid and take the first one
216
- const aSortedInbounds = aLadiInbounds.sort(this.compareInboundsAccordingToUuidAndLadiid);
217
-
218
- if (aSortedInbounds.length === 0) {
210
+ if (aTransactionCodeInbounds.length === 0) {
219
211
  throw new TCodeNavigationError(
220
212
  `No matching inbound found for transaction code: ${sTCode}`,
221
213
  { code: MessageCode.NO_INBOUND_FOUND }
222
214
  );
223
215
  }
216
+ // filter inbounds which are default for ladi and have tiles
217
+ const aDefaultLadiInbounds = aTransactionCodeInbounds.filter((oInbound) => oInbound.isDefaultLadi);
218
+ if (aDefaultLadiInbounds.length === 0) {
219
+ throw new TCodeNavigationError(
220
+ `Default LADI inbound is missing for transaction code: ${sTCode}`,
221
+ { code: MessageCode.DEFAULT_LADI_MISSING }
222
+ );
223
+ }
224
+ const aDefaultLadiHasTilesInbounds = aDefaultLadiInbounds.filter((oInbound) => oInbound.ladiHasTiles);
224
225
 
225
- // filter inbound where all mandatory parameters have values of the default tile
226
+ if (aDefaultLadiHasTilesInbounds.length === 0) {
227
+ throw new TCodeNavigationError(
228
+ `No tiles are assigned to the default LADI inbound for transaction code: ${sTCode}`,
229
+ { code: MessageCode.DEFAULT_LADI_HAS_TILES_MISSING }
230
+ );
231
+ }
226
232
 
233
+ // currently, it is not possible to ensure that there is only one default ladi inbound for a transaction code,
234
+ // therefore, we sort them by ladiid and uuid and take the first one
235
+ const aSortedInbounds = aDefaultLadiHasTilesInbounds.sort(this.compareInboundsAccordingToUuidAndLadiid);
236
+
237
+ // filter inbound where all mandatory parameters have values of the default tile
227
238
  const aValidInbounds = aSortedInbounds.filter((oInbound) => {
228
239
  const oDefaultTileParams = UrlParsing.parseParameters(`?${oInbound?.defaultTileParams}`);
229
240
  const oInboundParams = oInbound.signature?.parameters || {};
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  const ushellAbapLib = Library.init({
31
31
  name: "sap.ushell_abap",
32
32
  apiVersion: 2,
33
- version: "1.145.1",
33
+ version: "1.147.0",
34
34
  dependencies: ["sap.ui.core", "sap.m"],
35
35
  noLibraryCSS: true,
36
36
  extensions: {
@@ -0,0 +1,33 @@
1
+ // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
+
3
+ /**
4
+ * @fileOverview A Helper to load all ui2 CHIP contracts.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ushell/utils"
9
+ ], (
10
+ ushellUtils
11
+ ) => {
12
+ "use strict";
13
+
14
+ class Contracts {
15
+ async load () {
16
+ await ushellUtils.requireAsync([
17
+ "sap/ushell_abap/pbServices/ui2/contracts/bag",
18
+ "sap/ushell_abap/pbServices/ui2/contracts/configuration",
19
+ "sap/ushell_abap/pbServices/ui2/contracts/configurationUi",
20
+ "sap/ushell_abap/pbServices/ui2/contracts/fullscreen",
21
+ "sap/ushell_abap/pbServices/ui2/contracts/preview",
22
+ "sap/ushell_abap/pbServices/ui2/contracts/visible",
23
+ "sap/ushell_abap/pbServices/ui2/contracts/refresh",
24
+ "sap/ushell_abap/pbServices/ui2/contracts/search",
25
+ "sap/ushell_abap/pbServices/ui2/contracts/url",
26
+ "sap/ushell_abap/pbServices/ui2/contracts/actions",
27
+ "sap/ushell_abap/pbServices/ui2/contracts/types"
28
+ ]);
29
+ }
30
+ }
31
+
32
+ return new Contracts();
33
+ });
package/ui5.yaml CHANGED
@@ -267,7 +267,7 @@ builder:
267
267
  sort: true
268
268
  - mode: raw
269
269
  filters:
270
- - sap/ushell_abap/bootstrap/evo/abap-def-loader.js
270
+ - sap/ushell_abap/bootstrap/abap-def-loader.js
271
271
  declareRawModules: false
272
272
  resolve: false
273
273
  bundleOptions:
@@ -291,12 +291,12 @@ builder:
291
291
  - mode: preload
292
292
  name: sap/ushell/bootstrap/common
293
293
  filters:
294
- - sap/ushell_abap/bootstrap/evo/abap-def.js
294
+ - sap/ushell_abap/bootstrap/abap-def.js
295
295
  - sap/ui/thirdparty/datajs.js
296
296
  resolve: true
297
297
  - mode: raw
298
298
  filters:
299
- - sap/ushell_abap/bootstrap/evo/abap-def-loader.js
299
+ - sap/ushell_abap/bootstrap/abap-def-loader.js
300
300
  declareRawModules: false
301
301
  resolve: false
302
302
  bundleOptions:
@@ -311,8 +311,8 @@ builder:
311
311
  - ui5loader-autoconfig.js
312
312
  - sap/ui/thirdparty/datajs.js
313
313
  - sap/ushell/bootstrap/ui5loader-config.js
314
- - sap/ushell_abap/bootstrap/evo/abap-def-loader.js
315
- - sap/ushell_abap/bootstrap/evo/abap-def.js
314
+ - sap/ushell_abap/bootstrap/abap-def-loader.js
315
+ - sap/ushell_abap/bootstrap/abap-def.js
316
316
  resolve: true
317
317
  - mode: bundleInfo
318
318
  name: sap/ushell_abap/preload-bundles/flex-plugins.js
@@ -408,10 +408,10 @@ builder:
408
408
  - sap/ushell/api/NewExperience.js
409
409
  - sap/ushell/api/RTA.js
410
410
  - sap/ushell/api/common/ComponentInstantiation.js
411
- - sap/ushell/bootstrap/SchedulingAgent/*.json # json files must be explicitly defined
412
411
  - sap/ushell/components/ComponentKeysHandler.js
413
412
  - sap/ushell/components/container/ApplicationContainer.js
414
413
  - sap/ushell/components/pages/controller/PagesAndSpaceId.js
414
+ - sap/ushell/components/SchedulingAgent/*.json # json files must be explicitly defined
415
415
  - sap/ushell/components/tiles/applauncher/StaticTile.controller.js
416
416
  - sap/ushell/components/tiles/applauncherdynamic/DynamicTile.controller.js
417
417
  - sap/ushell/components/tiles/cdm/applauncher/Component.js
@@ -478,6 +478,7 @@ builder:
478
478
  - sap/ushell/ui5service/ShellUIService.js
479
479
  - sap/ushell/utils/HttpClient.js
480
480
  - sap/ushell/utils/utilsCdm.js
481
+ - sap/ushell_abap/bootstrap/LoadLaunchpadModule.js
481
482
  - sap/ushell_abap/adapters/abap/AppStateAdapter.js
482
483
  - sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js
483
484
  - sap/ushell_abap/adapters/abap/ContainerAdapter.js
@@ -1,42 +0,0 @@
1
- // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
- sap.ui.define([
3
- "./abap.configure.ushell",
4
- "./abap.configure.theme",
5
- "./abap.load.launchpad",
6
- "./boottask",
7
- "sap/ushell/bootstrap/common/common.configure.ui5",
8
- "sap/ushell/bootstrap/common/common.configure.ui5.extractLibs",
9
- "sap/ushell/bootstrap/common/common.debug.mode",
10
- "sap/ushell/bootstrap/common/common.load.bootstrapExtension"
11
- ], (
12
- fnConfigureUshell,
13
- fnConfigureTheme,
14
- fnLoadLaunchpad,
15
- oBoottask,
16
- fnConfigureUi5,
17
- fnExtractUi5LibsFromUshellConfig,
18
- oDebugMode,
19
- fnLoadBootstrapExtension
20
- ) => {
21
- "use strict";
22
-
23
- window["sap-ui-debug"] = oDebugMode.isDebug(); // use in LaunchPageAdapter
24
- const oUShellConfig = fnConfigureUshell();
25
- const {theme, themeRoots} = fnConfigureTheme(oUShellConfig);
26
-
27
- fnConfigureUi5({
28
- ushellConfig: oUShellConfig,
29
- libs: fnExtractUi5LibsFromUshellConfig(oUShellConfig),
30
- theme: theme,
31
- themeRoots: themeRoots,
32
- platform: "abap",
33
- platformAdapters: {
34
- abap: "sap.ushell_abap.adapters.abap",
35
- hana: "sap.ushell_abap.adapters.hana"
36
- },
37
- bootTask: oBoottask.start,
38
- onInitCallback: fnLoadLaunchpad
39
- });
40
-
41
- fnLoadBootstrapExtension(oUShellConfig);
42
- });
@@ -1,45 +0,0 @@
1
- // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
- sap.ui.define([
3
- "./abap.configure.ushell",
4
- "./abap.configure.theme",
5
- "./abap.load.launchpad",
6
- "./boottask",
7
- "sap/ushell/bootstrap/common/common.configure.ui5",
8
- "sap/ushell/bootstrap/common/common.configure.ui5.extractLibs",
9
- "sap/ushell/bootstrap/common/common.load.bootstrapExtension",
10
- "sap/ushell/bootstrap/common/common.debug.mode",
11
- "sap/ushell/bootstrap/common/common.load.core-min"
12
- ], (
13
- fnConfigureUshell,
14
- fnConfigureTheme,
15
- fnLoadLaunchpad,
16
- oBoottask,
17
- fnConfigureUi5,
18
- fnExtractUi5LibsFromUshellConfig,
19
- fnLoadBootstrapExtension,
20
- oDebugMode,
21
- oCoreMinLoader
22
- ) => {
23
- "use strict";
24
-
25
- window["sap-ui-debug"] = oDebugMode.isDebug(); // use in LaunchPageAdapter
26
- const oUShellConfig = fnConfigureUshell();
27
- const {theme, themeRoots} = fnConfigureTheme(oUShellConfig);
28
-
29
- fnConfigureUi5({
30
- ushellConfig: oUShellConfig,
31
- libs: fnExtractUi5LibsFromUshellConfig(oUShellConfig),
32
- theme: theme,
33
- themeRoots: themeRoots,
34
- platform: "abap",
35
- platformAdapters: {
36
- abap: "sap.ushell_abap.adapters.abap",
37
- hana: "sap.ushell_abap.adapters.hana"
38
- },
39
- bootTask: oBoottask.start,
40
- onInitCallback: fnLoadLaunchpad
41
- });
42
-
43
- oCoreMinLoader.load(oUShellConfig.ushell.customPreload);
44
- fnLoadBootstrapExtension(oUShellConfig);
45
- });
@@ -1,172 +0,0 @@
1
- // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
- // TODO should be replaced by sap/ushell/utils
3
- sap.ui.define([
4
- "sap/base/util/ObjectPath",
5
- "sap/ushell_abap/pbServices/ui2/Utils"
6
- ], (
7
- ObjectPath,
8
- Utils
9
- ) => {
10
- "use strict";
11
-
12
- const OBJECT_PROTOTYPE_KEYS = Object.getOwnPropertyNames(Object.prototype);
13
-
14
- const utils = {};
15
-
16
- /**
17
- * Returns the [first] parameter value or undefined
18
- * @param {string} sValue the value to retrieve
19
- * @param {object} mMap optional, a parameter map
20
- * @returns {string}
21
- * the first parameter value, if present
22
- *
23
- * @private
24
- */
25
- utils.getUrlParameterValue = function (sValue, mMap) {
26
- const mParameterMap = mMap || Utils.getParameterMap();
27
- return mParameterMap[sValue] && mParameterMap[sValue][0];
28
- };
29
-
30
- /**
31
- * Creates and opens a new XMLHttpRequest object.
32
- *
33
- * @param {string} sUrl
34
- * The URL the XHR object should request from.
35
- * @param {object} oStartupParameters
36
- * The start_up parameters. This object must
37
- * contain at least the following fields:
38
- * <pre>
39
- * {
40
- * "client": "<client>",
41
- * "language": "<language>"
42
- * }
43
- * </pre>
44
- *
45
- * @param {string} [sHttpMethod]
46
- * The Http method name with default value "GET".
47
- * @returns {object}
48
- * The oXHR object.
49
- */
50
- utils.createAndOpenXHR = function (sUrl, oStartupParameters, sHttpMethod) {
51
- sHttpMethod = sHttpMethod || "GET";
52
- const oXHR = new XMLHttpRequest();
53
- oXHR.open(sHttpMethod, sUrl, /* async=*/true);
54
- if (oStartupParameters) {
55
- utils.addCommonHeadersToXHR(oXHR, oStartupParameters);
56
- }
57
- return oXHR;
58
- };
59
-
60
- /**
61
- * Adds common headers to the given XHR object. This method is ideal to be used whenever the request should be made with certain headers.
62
- *
63
- * @param {object} oXHR Instance of XMLHttpRequest object
64
- *
65
- * @param {object} oStartupResultLikeObject
66
- * An object that looks like the start_up result. This object must
67
- * contain at least the following fields:
68
- * <pre>
69
- * {
70
- * "client": "<client>",
71
- * "language": "<language>"
72
- * }
73
- * </pre>
74
- *
75
- * @returns {object}
76
- * The input oXHR object amended with headers.
77
- */
78
- utils.addCommonHeadersToXHR = function (oXHR, oStartupResultLikeObject) {
79
- oXHR.setRequestHeader("Accept", "application/json");
80
- if (oStartupResultLikeObject.client) {
81
- oXHR.setRequestHeader("sap-client", oStartupResultLikeObject.client);
82
- }
83
- if (oStartupResultLikeObject.language) {
84
- oXHR.setRequestHeader("sap-language", oStartupResultLikeObject.language);
85
- }
86
- return oXHR;
87
- };
88
-
89
- /**
90
- * Get cacheId from startup config and return it as query parameter like "&sap-cache-id=xxxx"
91
- * If cacheId not found in config, return empty string
92
- * @param {object} oStartupConfig startup config
93
- * @returns {string} "&sap-cache-id=xxxx" if found, otherwise ""
94
- */
95
- utils.getCacheIdAsQueryParameter = function (oStartupConfig) {
96
- const sCacheId = ObjectPath.get("services.targetMappings.cacheId", oStartupConfig);
97
- if (typeof sCacheId === "string") {
98
- return `&sap-cache-id=${sCacheId}`;
99
- }
100
- return "";
101
- };
102
-
103
- /**
104
- * Merge the object oConfigToMerge into oMutatedConfig according to
105
- * sap-ushell-config merge rules Note that the JSON serialized content of
106
- * oConfigToMerge is used, thus JSON serialization restrictions apply (e.g.
107
- * Infinity -> null ) Note that it is thus not possible to remove a
108
- * property definition or overriding with {"propname" : undefined}, one
109
- * has to override with null or 0 etc.
110
- *
111
- * Note: Do not use this method for general merging of other objects, as
112
- * the rules may be enhanced/altered
113
- *
114
- * @param {object} oMutatedBaseConfig
115
- * the configuration to merge into, modified in place
116
- * @param {object} oConfigToMerge
117
- * the configuration to be merged with oMutatedBaseConfig
118
- * @param {boolean} bCloneConfigToMerge
119
- * whether the oConfigToMerge must be cloned prior the merge
120
- * @private
121
- */
122
- utils.mergeConfig = function (oMutatedBaseConfig, oConfigToMerge, bCloneConfigToMerge) {
123
- const oActualConfigToMerge = bCloneConfigToMerge
124
- ? JSON.parse(JSON.stringify(oConfigToMerge))
125
- : oConfigToMerge;
126
-
127
- if (typeof oConfigToMerge !== "object") {
128
- return;
129
- }
130
-
131
- Object.keys(oActualConfigToMerge).forEach((sKey) => {
132
- // Prevent overriding of object prototype properties to avoid prototype pollution attacks
133
- if (OBJECT_PROTOTYPE_KEYS.includes(sKey)) {
134
- return;
135
- }
136
-
137
- if (Object.prototype.toString.apply(oMutatedBaseConfig[sKey]) === "[object Object]" &&
138
- Object.prototype.toString.apply(oActualConfigToMerge[sKey]) === "[object Object]") {
139
- utils.mergeConfig(oMutatedBaseConfig[sKey], oActualConfigToMerge[sKey], false);
140
- return;
141
- }
142
- oMutatedBaseConfig[sKey] = oActualConfigToMerge[sKey];
143
- });
144
- };
145
-
146
- /**
147
- * Returns the location origin.
148
- *
149
- * @returns {string}
150
- * the location origin
151
- *
152
- * @private
153
- */
154
- utils.getLocationOrigin = function () {
155
- // location.origin might not be supported by all browsers
156
- return `${window.location.protocol}//${window.location.host}`;
157
- };
158
-
159
- /**
160
- * Returns the location href.
161
- *
162
- * @returns {string}
163
- * the location href
164
- *
165
- * @private
166
- */
167
- utils.getLocationHref = function () {
168
- return window.location.href;
169
- };
170
-
171
- return utils;
172
- });
@@ -1,28 +0,0 @@
1
- // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
- sap.ui.define([], () => {
3
- "use strict";
4
-
5
- // Extract theme root and user theme. Note that the user theme is in userProfile. startupConfig contains default theme.
6
- // Ignore URL themes, ui5 core takes care about them itself (including checks against "sap-allowed-theme-origins")
7
- function extractThemeParameters (oConfig) {
8
- let oThemeRoots;
9
-
10
- const oStartupConfig = oConfig?.startupConfig || {};
11
- const oThemeEntry = oStartupConfig.userProfile?.find((entry) => entry?.id === "THEME");
12
-
13
- // 1) theme from UserProfile; 2) default theme from config; 3) sap_horizon as SAP default theme
14
- const sTheme = oThemeEntry?.value || oStartupConfig.theme || "sap_horizon";
15
-
16
- let sThemeRoot = oStartupConfig.themeRoot;
17
- if (!sThemeRoot && oStartupConfig.client) {
18
- sThemeRoot = `/sap/public/bc/themes/~client-${oStartupConfig.client}`;
19
- }
20
- if (sThemeRoot && !sTheme.startsWith("sap_")) { // set the theme root for the custom theme only
21
- oThemeRoots = {};
22
- oThemeRoots[sTheme] = sThemeRoot.replace(/\/?$/, "/UI5/"); // Add /UI5/, theme roots from ABAP theming service do not contain UI5 at the end.
23
- }
24
- return {theme: sTheme, themeRoots: oThemeRoots};
25
- }
26
-
27
- return extractThemeParameters;
28
- });
@@ -1,176 +0,0 @@
1
- // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
-
3
- /**
4
- * @fileOverview
5
- * This module <code>sap.ushell_abap.bootstrap.evo.abap.configure.ushell</code>
6
- * returns a function which creates and returns a JSON object holding the
7
- * configuration of the SAP Fiori Launchpad (FLP) being served from an SAP
8
- * NetWeaver front-end server.
9
- *
10
- * The FLP configuration returned reflects the configuration on the SAP
11
- * front-end server (aka start-up configuration), the personalization of the
12
- * current user and URL parameter settings.
13
- *
14
- * It furthermore calculates if FLP pages get activated and if needed sets up
15
- * the configuration environment to run these.
16
- *
17
- * @version 1.145.1
18
- */
19
- sap.ui.define([
20
- "./abap.constants",
21
- "sap/ushell/bootstrap/common/common.configure.ushell",
22
- "sap/base/util/ObjectPath",
23
- "sap/base/Log"
24
- ], (oAbapConstants, fnConfigureUshellCommon, ObjectPath, Log) => {
25
- "use strict";
26
-
27
- function logServerSideMessages (config) {
28
- const sComponent = "sap/ushell_abap/bootstrap/evo/abap.configure.ushell";
29
- const aMessages = config.messages;
30
- if (aMessages && aMessages.length > 0) {
31
- for (let i = 0; i < aMessages.length; i += 1) {
32
- if (aMessages[i].severity === "error") {
33
- Log.error(aMessages[i].text, null, sComponent);
34
- } else if (aMessages[i].severity === "warning") {
35
- Log.warning(aMessages[i].text, null, sComponent);
36
- }
37
- }
38
- }
39
- }
40
-
41
- function addContainerStartupConfig (config) {
42
- if (config.startupConfig) {
43
- const oSystemProperties = ObjectPath.get("services.Container.adapter.config.systemProperties", config);
44
- const oContainerAdapter = ObjectPath.create("services.Container.adapter", config);
45
- oContainerAdapter.config = config.startupConfig;
46
- if (oSystemProperties) {
47
- oContainerAdapter.config.systemProperties = oSystemProperties;
48
- }
49
- }
50
- }
51
-
52
- /**
53
- * Activates FLP spaces (based on pages and sections therein)
54
- * or the classical home page mode (based on app groups)
55
- * by setting the configuration switch <code>config.ushell.spaces.enabled</code> .
56
- *
57
- * For the decision it's first checked if the user is allowed to configure spaces mode
58
- * (<code>config.ushell.spaces.configurable</code>) and if so, uses the user setting
59
- * (<code>config.startupConfig.userProfile.SPACES_ENABLEMENT</code>).
60
- * If there's no permission, the admin's configuration passed from the back end is kept.
61
- *
62
- * @param {object} config FLP Configuration passed from back end
63
- */
64
- function setSpacesOrHomepageMode (config) {
65
- // Check if user is allowed to configure FLP spaces or homepage mode, and if so consider it
66
- const bSpacesConfigurableByUser = ObjectPath.get("ushell.spaces.configurable", config);
67
- if (bSpacesConfigurableByUser) {
68
- // Check if spaces have been activated by the user
69
- const aUserProfile = ObjectPath.get("startupConfig.userProfile", config) || [];
70
- const oSpacesProfile = aUserProfile.filter((property) => {
71
- return property.id === "SPACES_ENABLEMENT";
72
- })[0];
73
- const sSpacesEnabledByUser = oSpacesProfile && oSpacesProfile.value;
74
-
75
- // If the user hasn't chosen any setting yet the personalization is undefined
76
- // and the admin setting isn't overwritten
77
- if (sSpacesEnabledByUser === "true") {
78
- ObjectPath.set("ushell.spaces.enabled", true, config);
79
- } else if (sSpacesEnabledByUser === "false") {
80
- ObjectPath.set("ushell.spaces.enabled", false, config);
81
- }
82
- }
83
- }
84
-
85
- function adaptConfigForFLPPages (config) {
86
- const oCDMAdapterConfig = ObjectPath.create("services.CommonDataModel.adapter", config);
87
- oCDMAdapterConfig.module = "sap.ushell.adapters.cdm.PagesCommonDataModelAdapter";
88
- }
89
-
90
- function adaptPluginsConfiguration (oConfig) {
91
- const oPlugins = ObjectPath.get("bootstrapPlugins", oConfig) || {};
92
- Object.keys(oPlugins).forEach((sPluginId) => {
93
- const oPluginConfig = oPlugins[sPluginId];
94
- // some plugins don't have formFactors configuration and should be loaded for any device type
95
- if (oPluginConfig.hasOwnProperty("formFactors")) {
96
- const oFormFactors = oPluginConfig.formFactors;
97
- const oDeviceTypes = {};
98
- oDeviceTypes.desktop = oFormFactors.desktop || false;
99
- oDeviceTypes.tablet = oFormFactors.tablet || false;
100
- oDeviceTypes.phone = oFormFactors.phone || false;
101
- oPluginConfig.deviceTypes = oDeviceTypes;
102
- delete oPluginConfig.formFactors;
103
- }
104
- });
105
- }
106
-
107
- /**
108
- * Set isLanguagePersonalized property based on userProfile
109
- *
110
- * @param {object} oConfig FLP Configuration passed from back end
111
- */
112
- function adaptLanguageConfig (oConfig) {
113
- const aUserProfile = ObjectPath.get("startupConfig.userProfile", oConfig) || [];
114
- const oPreferredLanguage = aUserProfile.filter((oProfile) => {
115
- return oProfile.id === "PREFERRED_LOGON_LANGUAGE";
116
- })[0];
117
- if (oPreferredLanguage && oPreferredLanguage.value !== undefined) {
118
- const bIsLanguagePersonalized = oPreferredLanguage.value !== "";
119
- oConfig.startupConfig.isLanguagePersonalized = bIsLanguagePersonalized;
120
- }
121
- }
122
-
123
- /**
124
- * Creates and returns a JSON configuration to run the SAP Fiori Launchpad (FLP)
125
- * using a SAP NetWeaver system as the front-end server.
126
- *
127
- * The configuration takes into account:
128
- * - A default configuration from <code>sap.ushell_abap.bootstrap.evo.abap.constants</code>
129
- * - The configuration stored in meta tags of the html document,
130
- * which includes the start-up configuration
131
- * and the personalization of the current user
132
- * passed by the front-end server
133
- * (see <code>sap.ushell.bootstrap.common.configure.ushell</code>)
134
- * - Configuration input handed over via URL parameters
135
- *
136
- * Furthermore, this module calculates whether FLP spaces are enabled,
137
- * and if needed then sets up the configuration environment to run these.
138
- * See configuration parameter <code>ushell.spaces.enabled</code>.
139
- *
140
- * @returns {object}
141
- * JSON object representing the configuration to run the SAP Fiori
142
- * Launchpad
143
- *
144
- * @since 1.58.0
145
- * @private
146
- */
147
- function configureUshell () {
148
- // Use default configuration
149
- const oConfig = fnConfigureUshellCommon(oAbapConstants);
150
-
151
- // Write any warnings and errors related to server-side config to console.
152
- logServerSideMessages(oConfig);
153
-
154
- // Set isLanguagePersonalized from userProfile
155
- adaptLanguageConfig(oConfig);
156
-
157
- // Add start_up configuration if provided by server (formerly retrieved by separate round trip to start_up service)
158
- addContainerStartupConfig(oConfig);
159
-
160
- // Set FLP spaces or homepage mode (ushell.spaces.enabled)
161
- // depending on global and user configuration retrieved from the back end
162
- setSpacesOrHomepageMode(oConfig);
163
-
164
- // Use CDM adapters in case the user views a sap ushell page
165
- if (ObjectPath.get("ushell.spaces.enabled", oConfig)) {
166
- adaptConfigForFLPPages(oConfig);
167
- }
168
-
169
- adaptPluginsConfiguration(oConfig);
170
-
171
- return oConfig;
172
- }
173
-
174
- // Return function to configure the SAP Fiori Launchpad
175
- return configureUshell;
176
- });