@sapui5/sap.ushell_abap 1.146.0 → 1.147.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/main/js/sap/ushell_abap/.library +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +4 -5
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +10 -8
- package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +7 -4
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +8 -10
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +148 -109
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask/PrepareDirectAppStart.js +20 -0
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask/RequestGroups.js +51 -0
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask/RequestTargetMappings.js +29 -0
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask.js +47 -0
- package/src/main/js/sap/ushell_abap/bootstrap/ConfigurationProvider.js +87 -0
- package/src/main/js/sap/ushell_abap/bootstrap/DirectAppStart.js +231 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer.js +43 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/InitXhrLogon.js +148 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages.js +86 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad.js +63 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpadModule.js +11 -0
- package/src/main/js/sap/ushell_abap/bootstrap/PageSetsRequestHandler.js +247 -0
- package/src/main/js/sap/ushell_abap/bootstrap/PlatformConfig.js +385 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/SAPCompanionConditionSetter.js → SAPCompanionConditionSetter.js} +6 -4
- package/src/main/js/sap/ushell_abap/bootstrap/StartupRequestHandler.js +145 -0
- package/src/main/js/sap/ushell_abap/bootstrap/ThemeHandler.js +276 -0
- package/src/main/js/sap/ushell_abap/bootstrap/XhrFactory.js +69 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/XhrLogonEventHandler.js → XhrLogonEventHandler.js} +13 -7
- package/src/main/js/sap/ushell_abap/bootstrap/XhrLogonLibLoader.js +51 -0
- package/src/main/js/sap/ushell_abap/bootstrap/abap-def-dev.js +20 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/abap-def-loader.js → abap-def-loader.js} +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/abap-def.js +22 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.js +1 -1
- package/src/main/js/sap/ushell_abap/components/TCodeNavigation.js +3 -3
- package/src/main/js/sap/ushell_abap/library.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Contracts.js +33 -0
- package/ui5.yaml +7 -6
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +0 -42
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +0 -45
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +0 -172
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.theme.js +0 -28
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +0 -181
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +0 -72
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +0 -219
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +0 -154
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +0 -79
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.LibLoader.js +0 -21
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.configure.js +0 -62
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.handler.js +0 -82
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +0 -944
- /package/src/main/js/sap/ushell_abap/bootstrap/{evo/abap.constants.js → abapConstants.js} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
-
sap.ui.define([
|
|
3
|
-
"sap/ushell_abap/bootstrap/evo/abap.configure.ushell",
|
|
4
|
-
"sap/ushell_abap/bootstrap/evo/abap.configure.theme",
|
|
5
|
-
"sap/ushell_abap/bootstrap/evo/abap.load.launchpad",
|
|
6
|
-
"sap/ushell_abap/bootstrap/evo/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
|
-
abapConfigureUshell,
|
|
13
|
-
abapConfigureTheme,
|
|
14
|
-
abapLoadLaunchpad,
|
|
15
|
-
boottask,
|
|
16
|
-
commonConfigureUi5,
|
|
17
|
-
commonConfigureUi5ExtractLibs,
|
|
18
|
-
commonDebugMode,
|
|
19
|
-
commonLoadBootstrapExtension
|
|
20
|
-
) => {
|
|
21
|
-
"use strict";
|
|
22
|
-
|
|
23
|
-
window["sap-ui-debug"] = commonDebugMode.isDebug(); // use in LaunchPageAdapter
|
|
24
|
-
const oUShellConfig = abapConfigureUshell();
|
|
25
|
-
const {theme, themeRoots} = abapConfigureTheme(oUShellConfig);
|
|
26
|
-
|
|
27
|
-
commonConfigureUi5({
|
|
28
|
-
ushellConfig: oUShellConfig,
|
|
29
|
-
libs: commonConfigureUi5ExtractLibs(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: boottask.start,
|
|
38
|
-
onInitCallback: abapLoadLaunchpad
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
commonLoadBootstrapExtension(oUShellConfig);
|
|
42
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
-
sap.ui.define([
|
|
3
|
-
"sap/ushell_abap/bootstrap/evo/abap.configure.ushell",
|
|
4
|
-
"sap/ushell_abap/bootstrap/evo/abap.configure.theme",
|
|
5
|
-
"sap/ushell_abap/bootstrap/evo/abap.load.launchpad",
|
|
6
|
-
"sap/ushell_abap/bootstrap/evo/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
|
-
abapConfigureUshell,
|
|
14
|
-
abapConfigureTheme,
|
|
15
|
-
abapLoadLaunchpad,
|
|
16
|
-
boottask,
|
|
17
|
-
commonConfigureUi5,
|
|
18
|
-
commonConfigureUi5ExtractLibs,
|
|
19
|
-
commonLoadBootstrapExtension,
|
|
20
|
-
commonDebugMode,
|
|
21
|
-
commonLoadCoreMin
|
|
22
|
-
) => {
|
|
23
|
-
"use strict";
|
|
24
|
-
|
|
25
|
-
window["sap-ui-debug"] = commonDebugMode.isDebug(); // use in LaunchPageAdapter
|
|
26
|
-
const oUShellConfig = abapConfigureUshell();
|
|
27
|
-
const {theme, themeRoots} = abapConfigureTheme(oUShellConfig);
|
|
28
|
-
|
|
29
|
-
commonConfigureUi5({
|
|
30
|
-
ushellConfig: oUShellConfig,
|
|
31
|
-
libs: commonConfigureUi5ExtractLibs(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: boottask.start,
|
|
40
|
-
onInitCallback: abapLoadLaunchpad
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
commonLoadCoreMin.load(oUShellConfig.ushell.customPreload);
|
|
44
|
-
commonLoadBootstrapExtension(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
|
-
ui2Utils
|
|
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 || ui2Utils.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,181 +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.146.0
|
|
18
|
-
*/
|
|
19
|
-
sap.ui.define([
|
|
20
|
-
"sap/ushell_abap/bootstrap/evo/abap.constants",
|
|
21
|
-
"sap/ushell/bootstrap/common/common.configure.ushell",
|
|
22
|
-
"sap/base/util/ObjectPath",
|
|
23
|
-
"sap/base/Log"
|
|
24
|
-
], (
|
|
25
|
-
abapConstants,
|
|
26
|
-
commonConfigureUshell,
|
|
27
|
-
ObjectPath,
|
|
28
|
-
Log
|
|
29
|
-
) => {
|
|
30
|
-
"use strict";
|
|
31
|
-
|
|
32
|
-
function logServerSideMessages (config) {
|
|
33
|
-
const sComponent = "sap/ushell_abap/bootstrap/evo/abap.configure.ushell";
|
|
34
|
-
const aMessages = config.messages;
|
|
35
|
-
if (aMessages && aMessages.length > 0) {
|
|
36
|
-
for (let i = 0; i < aMessages.length; i += 1) {
|
|
37
|
-
if (aMessages[i].severity === "error") {
|
|
38
|
-
Log.error(aMessages[i].text, null, sComponent);
|
|
39
|
-
} else if (aMessages[i].severity === "warning") {
|
|
40
|
-
Log.warning(aMessages[i].text, null, sComponent);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function addContainerStartupConfig (config) {
|
|
47
|
-
if (config.startupConfig) {
|
|
48
|
-
const oSystemProperties = ObjectPath.get("services.Container.adapter.config.systemProperties", config);
|
|
49
|
-
const oContainerAdapter = ObjectPath.create("services.Container.adapter", config);
|
|
50
|
-
oContainerAdapter.config = config.startupConfig;
|
|
51
|
-
if (oSystemProperties) {
|
|
52
|
-
oContainerAdapter.config.systemProperties = oSystemProperties;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Activates FLP spaces (based on pages and sections therein)
|
|
59
|
-
* or the classical home page mode (based on app groups)
|
|
60
|
-
* by setting the configuration switch <code>config.ushell.spaces.enabled</code> .
|
|
61
|
-
*
|
|
62
|
-
* For the decision it's first checked if the user is allowed to configure spaces mode
|
|
63
|
-
* (<code>config.ushell.spaces.configurable</code>) and if so, uses the user setting
|
|
64
|
-
* (<code>config.startupConfig.userProfile.SPACES_ENABLEMENT</code>).
|
|
65
|
-
* If there's no permission, the admin's configuration passed from the back end is kept.
|
|
66
|
-
*
|
|
67
|
-
* @param {object} config FLP Configuration passed from back end
|
|
68
|
-
*/
|
|
69
|
-
function setSpacesOrHomepageMode (config) {
|
|
70
|
-
// Check if user is allowed to configure FLP spaces or homepage mode, and if so consider it
|
|
71
|
-
const bSpacesConfigurableByUser = ObjectPath.get("ushell.spaces.configurable", config);
|
|
72
|
-
if (bSpacesConfigurableByUser) {
|
|
73
|
-
// Check if spaces have been activated by the user
|
|
74
|
-
const aUserProfile = ObjectPath.get("startupConfig.userProfile", config) || [];
|
|
75
|
-
const oSpacesProfile = aUserProfile.filter((property) => {
|
|
76
|
-
return property.id === "SPACES_ENABLEMENT";
|
|
77
|
-
})[0];
|
|
78
|
-
const sSpacesEnabledByUser = oSpacesProfile && oSpacesProfile.value;
|
|
79
|
-
|
|
80
|
-
// If the user hasn't chosen any setting yet the personalization is undefined
|
|
81
|
-
// and the admin setting isn't overwritten
|
|
82
|
-
if (sSpacesEnabledByUser === "true") {
|
|
83
|
-
ObjectPath.set("ushell.spaces.enabled", true, config);
|
|
84
|
-
} else if (sSpacesEnabledByUser === "false") {
|
|
85
|
-
ObjectPath.set("ushell.spaces.enabled", false, config);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function adaptConfigForFLPPages (config) {
|
|
91
|
-
const oCDMAdapterConfig = ObjectPath.create("services.CommonDataModel.adapter", config);
|
|
92
|
-
oCDMAdapterConfig.module = "sap.ushell.adapters.cdm.PagesCommonDataModelAdapter";
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function adaptPluginsConfiguration (oConfig) {
|
|
96
|
-
const oPlugins = ObjectPath.get("bootstrapPlugins", oConfig) || {};
|
|
97
|
-
Object.keys(oPlugins).forEach((sPluginId) => {
|
|
98
|
-
const oPluginConfig = oPlugins[sPluginId];
|
|
99
|
-
// some plugins don't have formFactors configuration and should be loaded for any device type
|
|
100
|
-
if (oPluginConfig.hasOwnProperty("formFactors")) {
|
|
101
|
-
const oFormFactors = oPluginConfig.formFactors;
|
|
102
|
-
const oDeviceTypes = {};
|
|
103
|
-
oDeviceTypes.desktop = oFormFactors.desktop || false;
|
|
104
|
-
oDeviceTypes.tablet = oFormFactors.tablet || false;
|
|
105
|
-
oDeviceTypes.phone = oFormFactors.phone || false;
|
|
106
|
-
oPluginConfig.deviceTypes = oDeviceTypes;
|
|
107
|
-
delete oPluginConfig.formFactors;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Set isLanguagePersonalized property based on userProfile
|
|
114
|
-
*
|
|
115
|
-
* @param {object} oConfig FLP Configuration passed from back end
|
|
116
|
-
*/
|
|
117
|
-
function adaptLanguageConfig (oConfig) {
|
|
118
|
-
const aUserProfile = ObjectPath.get("startupConfig.userProfile", oConfig) || [];
|
|
119
|
-
const oPreferredLanguage = aUserProfile.filter((oProfile) => {
|
|
120
|
-
return oProfile.id === "PREFERRED_LOGON_LANGUAGE";
|
|
121
|
-
})[0];
|
|
122
|
-
if (oPreferredLanguage && oPreferredLanguage.value !== undefined) {
|
|
123
|
-
const bIsLanguagePersonalized = oPreferredLanguage.value !== "";
|
|
124
|
-
oConfig.startupConfig.isLanguagePersonalized = bIsLanguagePersonalized;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Creates and returns a JSON configuration to run the SAP Fiori Launchpad (FLP)
|
|
130
|
-
* using a SAP NetWeaver system as the front-end server.
|
|
131
|
-
*
|
|
132
|
-
* The configuration takes into account:
|
|
133
|
-
* - A default configuration from <code>sap.ushell_abap.bootstrap.evo.abap.constants</code>
|
|
134
|
-
* - The configuration stored in meta tags of the html document,
|
|
135
|
-
* which includes the start-up configuration
|
|
136
|
-
* and the personalization of the current user
|
|
137
|
-
* passed by the front-end server
|
|
138
|
-
* (see <code>sap.ushell.bootstrap.common.configure.ushell</code>)
|
|
139
|
-
* - Configuration input handed over via URL parameters
|
|
140
|
-
*
|
|
141
|
-
* Furthermore, this module calculates whether FLP spaces are enabled,
|
|
142
|
-
* and if needed then sets up the configuration environment to run these.
|
|
143
|
-
* See configuration parameter <code>ushell.spaces.enabled</code>.
|
|
144
|
-
*
|
|
145
|
-
* @returns {object}
|
|
146
|
-
* JSON object representing the configuration to run the SAP Fiori
|
|
147
|
-
* Launchpad
|
|
148
|
-
*
|
|
149
|
-
* @since 1.58.0
|
|
150
|
-
* @private
|
|
151
|
-
*/
|
|
152
|
-
function configureUshell () {
|
|
153
|
-
// Use default configuration
|
|
154
|
-
const oConfig = commonConfigureUshell(abapConstants);
|
|
155
|
-
|
|
156
|
-
// Write any warnings and errors related to server-side config to console.
|
|
157
|
-
logServerSideMessages(oConfig);
|
|
158
|
-
|
|
159
|
-
// Set isLanguagePersonalized from userProfile
|
|
160
|
-
adaptLanguageConfig(oConfig);
|
|
161
|
-
|
|
162
|
-
// Add start_up configuration if provided by server (formerly retrieved by separate round trip to start_up service)
|
|
163
|
-
addContainerStartupConfig(oConfig);
|
|
164
|
-
|
|
165
|
-
// Set FLP spaces or homepage mode (ushell.spaces.enabled)
|
|
166
|
-
// depending on global and user configuration retrieved from the back end
|
|
167
|
-
setSpacesOrHomepageMode(oConfig);
|
|
168
|
-
|
|
169
|
-
// Use CDM adapters in case the user views a sap ushell page
|
|
170
|
-
if (ObjectPath.get("ushell.spaces.enabled", oConfig)) {
|
|
171
|
-
adaptConfigForFLPPages(oConfig);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
adaptPluginsConfiguration(oConfig);
|
|
175
|
-
|
|
176
|
-
return oConfig;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Return function to configure the SAP Fiori Launchpad
|
|
180
|
-
return configureUshell;
|
|
181
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
-
sap.ui.define([
|
|
3
|
-
"sap/ushell_abap/bootstrap/evo/boottask",
|
|
4
|
-
"sap/ushell_abap/pbServices/ui2/contracts/bag",
|
|
5
|
-
"sap/ushell_abap/pbServices/ui2/contracts/configuration",
|
|
6
|
-
"sap/ushell_abap/pbServices/ui2/contracts/configurationUi",
|
|
7
|
-
"sap/ushell_abap/pbServices/ui2/contracts/fullscreen",
|
|
8
|
-
"sap/ushell_abap/pbServices/ui2/contracts/preview",
|
|
9
|
-
"sap/ushell_abap/pbServices/ui2/contracts/visible",
|
|
10
|
-
"sap/ushell_abap/pbServices/ui2/contracts/refresh",
|
|
11
|
-
"sap/ushell_abap/pbServices/ui2/contracts/search",
|
|
12
|
-
"sap/ushell_abap/pbServices/ui2/contracts/url",
|
|
13
|
-
"sap/ushell_abap/pbServices/ui2/contracts/actions",
|
|
14
|
-
"sap/ushell_abap/pbServices/ui2/contracts/types"
|
|
15
|
-
], (
|
|
16
|
-
boottask
|
|
17
|
-
// ui2ContractsBag,
|
|
18
|
-
// ui2Configuration,
|
|
19
|
-
// ui2ConfigurationUi,
|
|
20
|
-
// ui2Fullscreen,
|
|
21
|
-
// ui2Preview,
|
|
22
|
-
// ui2Visible,
|
|
23
|
-
// ui2Refresh,
|
|
24
|
-
// ui2Search,
|
|
25
|
-
// ui2Url,
|
|
26
|
-
// ui2Actions,
|
|
27
|
-
// ui2Types
|
|
28
|
-
) => {
|
|
29
|
-
"use strict";
|
|
30
|
-
return function () {
|
|
31
|
-
sap.ui.require([
|
|
32
|
-
"sap/ushell/Container",
|
|
33
|
-
"sap/ushell/iconfonts",
|
|
34
|
-
"sap/ushell/state/StateManager"
|
|
35
|
-
], (
|
|
36
|
-
Container,
|
|
37
|
-
IconFonts,
|
|
38
|
-
StateManager
|
|
39
|
-
) => {
|
|
40
|
-
// shortcut for sap.ushell.state.StateManager.ShellMode
|
|
41
|
-
const ShellMode = StateManager.ShellMode;
|
|
42
|
-
|
|
43
|
-
Container.createRendererInternal("fiori2").then((oContent) => {
|
|
44
|
-
oContent.placeAt("canvas", "only");
|
|
45
|
-
const oSystem = Container.getLogonSystem();
|
|
46
|
-
const sCurrentShellMode = StateManager.getShellMode();
|
|
47
|
-
|
|
48
|
-
if (!oSystem.getSysInfoBar() || sCurrentShellMode === ShellMode.Headerless) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
sap.ui.require([
|
|
53
|
-
"sap/ushell/renderer/ShellLayout",
|
|
54
|
-
"sap/ushell/ui/shell/SysInfoBar"
|
|
55
|
-
], (ShellLayout, SysInfoBar) => {
|
|
56
|
-
const sSystemInfoHtml = "<div id='systemInfo-shellArea'></div>";
|
|
57
|
-
const oShellHeaderShellArea = document.getElementById(ShellLayout.ShellArea.ShellHeader);
|
|
58
|
-
oShellHeaderShellArea.insertAdjacentHTML("beforebegin", sSystemInfoHtml);
|
|
59
|
-
|
|
60
|
-
new SysInfoBar({
|
|
61
|
-
icon: oSystem.getSysInfoBarIcon(),
|
|
62
|
-
text: oSystem.getSysInfoBarMainText(),
|
|
63
|
-
subText: oSystem.getSysInfoBarSecondaryText(),
|
|
64
|
-
color: oSystem.getSysInfoBarColor()
|
|
65
|
-
}).placeAt("systemInfo-shellArea");
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
IconFonts.registerFiori2IconFont();
|
|
69
|
-
});
|
|
70
|
-
boottask.afterBootstrap();
|
|
71
|
-
};
|
|
72
|
-
});
|