@sapui5/sap.ushell_abap 1.146.0 → 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.
- 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
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
sap.ui.define([
|
|
4
|
+
"sap/base/Log",
|
|
5
|
+
"sap/base/util/ObjectPath",
|
|
6
|
+
"sap/ui/thirdparty/URI",
|
|
7
|
+
"sap/ushell/bootstrap/Config"
|
|
8
|
+
], (
|
|
9
|
+
Log,
|
|
10
|
+
ObjectPath,
|
|
11
|
+
URI,
|
|
12
|
+
BootstrapConfig
|
|
13
|
+
) => {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
class ThemeHandler {
|
|
17
|
+
#sIgnoredUnsafeUrlTheme = null;
|
|
18
|
+
|
|
19
|
+
getUI5ConfigTheme () {
|
|
20
|
+
const oUshellConfig = BootstrapConfig.get();
|
|
21
|
+
let oThemeRoots;
|
|
22
|
+
|
|
23
|
+
const oStartupConfig = oUshellConfig?.startupConfig || {};
|
|
24
|
+
const oThemeEntry = oStartupConfig.userProfile?.find((entry) => entry?.id === "THEME");
|
|
25
|
+
|
|
26
|
+
// 1) theme from UserProfile;
|
|
27
|
+
// 2) default theme from config;
|
|
28
|
+
// 3) sap_horizon as SAP default theme
|
|
29
|
+
const sTheme = oThemeEntry?.value || oStartupConfig.theme || "sap_horizon";
|
|
30
|
+
|
|
31
|
+
let sThemeRoot = oStartupConfig.themeRoot;
|
|
32
|
+
if (!sThemeRoot && oStartupConfig.client) {
|
|
33
|
+
sThemeRoot = `/sap/public/bc/themes/~client-${oStartupConfig.client}`;
|
|
34
|
+
}
|
|
35
|
+
if (sThemeRoot && !sTheme.startsWith("sap_")) { // set the theme root for the custom theme only
|
|
36
|
+
oThemeRoots = {};
|
|
37
|
+
oThemeRoots[sTheme] = sThemeRoot.replace(/\/?$/, "/UI5/"); // Add /UI5/, theme roots from ABAP theming service do not contain UI5 at the end.
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
theme: sTheme,
|
|
41
|
+
themeRoots: oThemeRoots
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
setBootThemeInUserConfig () {
|
|
46
|
+
const oUshellConfig = BootstrapConfig.get();
|
|
47
|
+
|
|
48
|
+
// 1) URL
|
|
49
|
+
let oBootTheme = this.#getUrlTheme();
|
|
50
|
+
if (oBootTheme) {
|
|
51
|
+
Log.debug(`theme: URL theme = "${oBootTheme.theme}" theme root = "${oBootTheme.root}"`, null, "sap.ushell_abap.bootstrap");
|
|
52
|
+
} else {
|
|
53
|
+
// 2) container adapter
|
|
54
|
+
oBootTheme = this.#getContainerAdapterTheme();
|
|
55
|
+
if (oBootTheme) {
|
|
56
|
+
Log.debug(`theme: startup service theme = "${oBootTheme.theme}" theme root = "${oBootTheme.root}"`, null, "sap.ushell_abap.bootstrap");
|
|
57
|
+
} else {
|
|
58
|
+
// 3) html file
|
|
59
|
+
oBootTheme = this.#getHtmlTheme();
|
|
60
|
+
if (oBootTheme) {
|
|
61
|
+
Log.debug(`theme: html file theme = "${oBootTheme.theme}" theme root = "${oBootTheme.root}"`, null, "sap.ushell_abap.bootstrap");
|
|
62
|
+
} else {
|
|
63
|
+
// error fallback
|
|
64
|
+
Log.error("Could not determine theme", null, "sap.ushell_abap.bootstrap");
|
|
65
|
+
oBootTheme = {
|
|
66
|
+
theme: "",
|
|
67
|
+
root: ""
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
ObjectPath.set("services.Container.adapter.config.bootTheme", oBootTheme, oUshellConfig);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
#getUrlTheme () {
|
|
77
|
+
const sSearch = this.getWindowLocationSearch();
|
|
78
|
+
const oUrlParameters = new URLSearchParams(sSearch);
|
|
79
|
+
|
|
80
|
+
const sUrlTheme = oUrlParameters.get("sap-theme") || oUrlParameters.get("sap-ui-theme");
|
|
81
|
+
if (sUrlTheme && this.#isThemeSafe(sUrlTheme)) {
|
|
82
|
+
if (sUrlTheme.indexOf("@") > 0) {
|
|
83
|
+
const [sTheme, sThemeRoot] = sUrlTheme.split("@", 2);
|
|
84
|
+
return {
|
|
85
|
+
theme: sTheme,
|
|
86
|
+
root: sThemeRoot
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// no theme root supplied
|
|
91
|
+
return {
|
|
92
|
+
theme: sUrlTheme,
|
|
93
|
+
root: this.#getThemeRoot(sUrlTheme)
|
|
94
|
+
};
|
|
95
|
+
} else if (sUrlTheme) {
|
|
96
|
+
this.#sIgnoredUnsafeUrlTheme = sUrlTheme;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
#getContainerAdapterTheme () {
|
|
101
|
+
const oUshellConfig = BootstrapConfig.get();
|
|
102
|
+
const oContainerAdapterConfig = ObjectPath.get("services.Container.adapter.config", oUshellConfig);
|
|
103
|
+
|
|
104
|
+
let sTheme;
|
|
105
|
+
if (oContainerAdapterConfig.userProfile?.length > 0) {
|
|
106
|
+
const oThemeEntry = oContainerAdapterConfig.userProfile.find((entry) => entry.id === "THEME");
|
|
107
|
+
sTheme = oThemeEntry?.value;
|
|
108
|
+
}
|
|
109
|
+
if (!sTheme) {
|
|
110
|
+
sTheme = oContainerAdapterConfig.theme || "";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (!sTheme) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
theme: sTheme,
|
|
119
|
+
root: this.#getThemeRoot(sTheme)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
#getHtmlTheme () {
|
|
124
|
+
// set via e.g. data-sap-ui-theme="sap_horizon" as part of UI5 startup in the central
|
|
125
|
+
// Fiori launchpad html file
|
|
126
|
+
const sTheme = ObjectPath.get("sap-ui-config.theme");
|
|
127
|
+
// could be the URL theme; no problem
|
|
128
|
+
// Assumption: no theme root included here
|
|
129
|
+
if (sTheme) {
|
|
130
|
+
let sThemeRoot = ObjectPath.get(`sap-ui-config.themeRoots.${sTheme}`);
|
|
131
|
+
if (!sThemeRoot) {
|
|
132
|
+
sThemeRoot = this.#getThemeRoot(sTheme);
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
theme: sTheme,
|
|
136
|
+
root: sThemeRoot
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
#getThemeRoot (sTheme) {
|
|
142
|
+
if (!sTheme) {
|
|
143
|
+
return "";
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (sTheme.startsWith("sap_")) {
|
|
147
|
+
// sap theme
|
|
148
|
+
return "";
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// for custom themes, the theme root must be provided.
|
|
152
|
+
|
|
153
|
+
const oUshellConfig = BootstrapConfig.get();
|
|
154
|
+
const oContainerAdapterConfig = ObjectPath.get("services.Container.adapter.config", oUshellConfig);
|
|
155
|
+
|
|
156
|
+
let sSystemThemeRoot = oContainerAdapterConfig.themeRoot;
|
|
157
|
+
if (!sSystemThemeRoot && oContainerAdapterConfig.client) {
|
|
158
|
+
// fallback
|
|
159
|
+
Log.warning(
|
|
160
|
+
"Theme root was not contained in startup service result. A fallback to /sap/public/bc/themes/~client-<client number> is used",
|
|
161
|
+
null,
|
|
162
|
+
"sap.ushell_abap.bootstrap"
|
|
163
|
+
);
|
|
164
|
+
sSystemThemeRoot = `/sap/public/bc/themes/~client-${oContainerAdapterConfig.client}`;
|
|
165
|
+
} else if (!sSystemThemeRoot) {
|
|
166
|
+
Log.error("extractSystemThemeRoot: Could not determine system theme root");
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return sSystemThemeRoot;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Validates the provided theme
|
|
174
|
+
*
|
|
175
|
+
* Checks if the origin of the theme root string passed on entry
|
|
176
|
+
* is regarded safe.
|
|
177
|
+
*
|
|
178
|
+
* The function returns <code>true</code>
|
|
179
|
+
* - if the theme root is server relative
|
|
180
|
+
* - if the allowlist check passed successfully
|
|
181
|
+
* - if the theme root is identical to the current host
|
|
182
|
+
*
|
|
183
|
+
* The allowlist is taken from the value of the meta tag
|
|
184
|
+
* <code><meta name="sap-allowed-theme-origins" value=...></code>.
|
|
185
|
+
*
|
|
186
|
+
* @param {string} sTheme Theme root string to be verified
|
|
187
|
+
*
|
|
188
|
+
* @returns {boolean}
|
|
189
|
+
* true/false if the allowlist check passed/failed
|
|
190
|
+
* false in case no allowlist was specified, not producible by flp-handler
|
|
191
|
+
*/
|
|
192
|
+
#isThemeSafe (sTheme) {
|
|
193
|
+
if (!sTheme.includes("@")) {
|
|
194
|
+
return true; // no theme root supplied, only theme name -> safe
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const sThemeRoot = sTheme.split("@")[1];
|
|
198
|
+
|
|
199
|
+
// Remove search query as they are not supported for themeRoots/resourceRoots
|
|
200
|
+
const oURI = new URI(sThemeRoot).search("");
|
|
201
|
+
const sOrigin = oURI.origin().toString();
|
|
202
|
+
|
|
203
|
+
// Return true if the theme root is relative or on the same host
|
|
204
|
+
if (sOrigin === "" || this.#validateThemeOrigin(sOrigin) || oURI.origin() === window.location.origin) {
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Checks if ThemeRoot is part of the allowlist
|
|
213
|
+
* @param {string} sOrigin the origin of the theme root to be validated
|
|
214
|
+
*
|
|
215
|
+
* @returns {boolean} if it is part of the allowlist
|
|
216
|
+
*/
|
|
217
|
+
#validateThemeOrigin (sOrigin) {
|
|
218
|
+
const aArrayOfAllowedOrigins = this.#getAllowedThemeOrigins();
|
|
219
|
+
let sAllowedOrigins = "";
|
|
220
|
+
// only one meta tag of this type should exist, therefore only looking for first element
|
|
221
|
+
if (aArrayOfAllowedOrigins.length > 0) {
|
|
222
|
+
sAllowedOrigins = aArrayOfAllowedOrigins[0];
|
|
223
|
+
} else {
|
|
224
|
+
Log.debug('No meta tag "sap-allowed-theme-origins" was found. No allowed origin for "theme-url" was applied.');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return !!sAllowedOrigins && sAllowedOrigins.split(",").some((sAllowedOrigin) => {
|
|
228
|
+
return sAllowedOrigin === "*" || sOrigin === sAllowedOrigin.trim();
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
#getAllowedThemeOrigins () {
|
|
233
|
+
const sSelector = "meta[name^='sap-allowed-theme-origins']:not([name=''])";
|
|
234
|
+
const aNodeList = Array.from(document.querySelectorAll(sSelector));
|
|
235
|
+
|
|
236
|
+
function parse (sNodeContent) {
|
|
237
|
+
// only one allowed origin shall be provided
|
|
238
|
+
return sNodeContent.trim();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const aItems = [];
|
|
242
|
+
aNodeList.forEach((oMetaNode) => {
|
|
243
|
+
try {
|
|
244
|
+
aItems.push(parse(oMetaNode.content));
|
|
245
|
+
} catch (oError) {
|
|
246
|
+
Log.error("Metatag Read failed for allowed-theme-origins", oError, "sap.ushell_abap.bootstrap");
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
return aItems;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* If the theme is provided in the url and the theme origin is not in "sap-allowed-theme-origins" meta tag,
|
|
255
|
+
* switch to the theme from userParameters because ui5 core does not do such a switch itself.
|
|
256
|
+
*/
|
|
257
|
+
updateUnsafeBootTheme () {
|
|
258
|
+
if (!this.#sIgnoredUnsafeUrlTheme) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// replace unsafe url theme theme only after the core is ready
|
|
263
|
+
sap.ui.require("sap/ui/core/Theming").setTheme(this.#sIgnoredUnsafeUrlTheme);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
getWindowLocationSearch () {
|
|
267
|
+
return window.location.search;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
reset () {
|
|
271
|
+
this.#sIgnoredUnsafeUrlTheme = null;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return new ThemeHandler();
|
|
276
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
sap.ui.define([
|
|
3
|
+
], (
|
|
4
|
+
) => {
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
class XhrFactory {
|
|
8
|
+
/**
|
|
9
|
+
* Creates and opens a new XMLHttpRequest object.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} sUrl
|
|
12
|
+
* The URL the XHR object should request from.
|
|
13
|
+
* @param {object} oStartupParameters
|
|
14
|
+
* The start_up parameters. This object must
|
|
15
|
+
* contain at least the following fields:
|
|
16
|
+
* <pre>
|
|
17
|
+
* {
|
|
18
|
+
* "client": "<client>",
|
|
19
|
+
* "language": "<language>"
|
|
20
|
+
* }
|
|
21
|
+
* </pre>
|
|
22
|
+
*
|
|
23
|
+
* @param {string} [sHttpMethod]
|
|
24
|
+
* The Http method name with default value "GET".
|
|
25
|
+
* @returns {object}
|
|
26
|
+
* The oXHR object.
|
|
27
|
+
*/
|
|
28
|
+
createAndOpen (sUrl, oStartupParameters, sHttpMethod) {
|
|
29
|
+
sHttpMethod = sHttpMethod || "GET";
|
|
30
|
+
const oXhr = new XMLHttpRequest();
|
|
31
|
+
oXhr.open(sHttpMethod, sUrl, /* async=*/true);
|
|
32
|
+
if (oStartupParameters) {
|
|
33
|
+
this.#addCommonHeadersToXhr(oXhr, oStartupParameters);
|
|
34
|
+
}
|
|
35
|
+
return oXhr;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Adds common headers to the given XHR object. This method is ideal to be used whenever the request should be made with certain headers.
|
|
40
|
+
*
|
|
41
|
+
* @param {object} oXhr Instance of XMLHttpRequest object
|
|
42
|
+
*
|
|
43
|
+
* @param {object} oStartupResultLikeObject
|
|
44
|
+
* An object that looks like the start_up result. This object must
|
|
45
|
+
* contain at least the following fields:
|
|
46
|
+
* <pre>
|
|
47
|
+
* {
|
|
48
|
+
* "client": "<client>",
|
|
49
|
+
* "language": "<language>"
|
|
50
|
+
* }
|
|
51
|
+
* </pre>
|
|
52
|
+
*
|
|
53
|
+
* @returns {object}
|
|
54
|
+
* The input oXHR object amended with headers.
|
|
55
|
+
*/
|
|
56
|
+
#addCommonHeadersToXhr (oXhr, oStartupResultLikeObject) {
|
|
57
|
+
oXhr.setRequestHeader("Accept", "application/json");
|
|
58
|
+
if (oStartupResultLikeObject.client) {
|
|
59
|
+
oXhr.setRequestHeader("sap-client", oStartupResultLikeObject.client);
|
|
60
|
+
}
|
|
61
|
+
if (oStartupResultLikeObject.language) {
|
|
62
|
+
oXhr.setRequestHeader("sap-language", oStartupResultLikeObject.language);
|
|
63
|
+
}
|
|
64
|
+
return oXhr;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return new XhrFactory();
|
|
69
|
+
});
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
sap.ui.define([
|
|
4
|
-
"sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils",
|
|
5
4
|
"sap/base/util/ObjectPath",
|
|
6
5
|
"sap/base/Log"
|
|
7
6
|
], (
|
|
8
|
-
abapBootstrapUtils,
|
|
9
7
|
ObjectPath,
|
|
10
8
|
Log
|
|
11
9
|
) => {
|
|
@@ -54,7 +52,7 @@ sap.ui.define([
|
|
|
54
52
|
}
|
|
55
53
|
} else {
|
|
56
54
|
Log.error(`Cannot handle event with type: ${oEvent.type}`,
|
|
57
|
-
null, "sap.ushell_abap.bootstrap.
|
|
55
|
+
null, "sap.ushell_abap.bootstrap.XhrLogonEventHandler");
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
return true;
|
|
@@ -126,14 +124,14 @@ sap.ui.define([
|
|
|
126
124
|
* @private
|
|
127
125
|
*/
|
|
128
126
|
XhrLogonEventHandler.prototype._logoffAndRedirect = function () {
|
|
129
|
-
const sLocationHref =
|
|
127
|
+
const sLocationHref = this.getLocationHref();
|
|
130
128
|
const sClientId = ObjectPath.get("sap-ushell-config.services.Container.adapter.config.client");
|
|
131
129
|
|
|
132
130
|
const sUrl = new URI("/sap/public/bc/icf/logoff")
|
|
133
131
|
.absoluteTo(sLocationHref)
|
|
134
132
|
.search(`sap-client=${sClientId}&propagateLogoff=false&redirectURL=${encodeURIComponent(sLocationHref)}`)
|
|
135
133
|
.toString();
|
|
136
|
-
|
|
134
|
+
this.setDocumentLocation(sUrl);
|
|
137
135
|
};
|
|
138
136
|
|
|
139
137
|
/**
|
|
@@ -160,7 +158,7 @@ sap.ui.define([
|
|
|
160
158
|
Log.error(
|
|
161
159
|
"Illegal state: XHR authentication (mode=reload) requested before SAPUI5 is initialized. "
|
|
162
160
|
+ "This should not happen if the FioriLaunchpad.html page is loaded from the server. Trying to reload page once.",
|
|
163
|
-
null, "sap.ushell_abap.bootstrap.
|
|
161
|
+
null, "sap.ushell_abap.bootstrap.XhrLogonEventHandler"
|
|
164
162
|
);
|
|
165
163
|
|
|
166
164
|
const sMessage = "Authentication required\n\nYour session might have expired. Press OK to reload.";
|
|
@@ -173,7 +171,7 @@ sap.ui.define([
|
|
|
173
171
|
"Illegal state: XHR authentication (mode=reload) requested before SAPUI5 is initialized and page reload has been triggered once."
|
|
174
172
|
+ " Stopping reload to avoid endless loop. This state cannot be overcome. Please ensure that the FioriLaunchpad.html"
|
|
175
173
|
+ " page is not cached, but always loaded from the server.",
|
|
176
|
-
null, "sap.ushell_abap.bootstrap.
|
|
174
|
+
null, "sap.ushell_abap.bootstrap.XhrLogonEventHandler"
|
|
177
175
|
);
|
|
178
176
|
}
|
|
179
177
|
};
|
|
@@ -252,5 +250,13 @@ sap.ui.define([
|
|
|
252
250
|
return oText.text;
|
|
253
251
|
};
|
|
254
252
|
|
|
253
|
+
XhrLogonEventHandler.prototype.getLocationHref = function () {
|
|
254
|
+
return window.location.href;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
XhrLogonEventHandler.prototype.setDocumentLocation = function (sUrl) {
|
|
258
|
+
window.document.location = sUrl;
|
|
259
|
+
};
|
|
260
|
+
|
|
255
261
|
return XhrLogonEventHandler;
|
|
256
262
|
}, true /* bExport */);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
sap.ui.define([
|
|
4
|
+
], (
|
|
5
|
+
) => {
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
const sUiDebugKey = "sap-ui-debug";
|
|
9
|
+
|
|
10
|
+
class XhrLogonLibLoader {
|
|
11
|
+
#pLib;
|
|
12
|
+
|
|
13
|
+
constructor () {
|
|
14
|
+
this.#pLib = this.#loadLib();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#isDebug () {
|
|
18
|
+
let sStoredSapUiDebugValue;
|
|
19
|
+
let bDebugSources = /[?&]sap-ui-debug=(true|x|X)(&|$)/.test(this.getWindowLocationSearch());
|
|
20
|
+
|
|
21
|
+
if (!bDebugSources) {
|
|
22
|
+
try {
|
|
23
|
+
sStoredSapUiDebugValue = window.localStorage.getItem(sUiDebugKey);
|
|
24
|
+
bDebugSources = !!sStoredSapUiDebugValue && /^(true|x|X)$/.test(sStoredSapUiDebugValue);
|
|
25
|
+
} catch { /* fail silently */ }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return bDebugSources;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
#loadLib () {
|
|
32
|
+
const sFileName = `sap/ushell_abap/thirdparty/sap-xhrlib-esm${this.#isDebug() ? "-dbg" : ""}.js`;
|
|
33
|
+
const sPath = sap.ui.require.toUrl(sFileName);
|
|
34
|
+
return import(sPath).then((oModule) => oModule.xhrlib);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
getLib () {
|
|
38
|
+
return this.#pLib;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
getWindowLocationSearch () {
|
|
42
|
+
return window.location.search;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
reset () {
|
|
46
|
+
this.#pLib = this.#loadLib();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return new XhrLogonLibLoader();
|
|
51
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview This module is the root of the ABAP bootstrap
|
|
4
|
+
* to be used ONLY in DEVELOPMENT ENVIRONMENT.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/base/config",
|
|
8
|
+
"sap/ushell_abap/bootstrap/ConfigurationProvider",
|
|
9
|
+
"sap/ushell/bootstrap/OverrideRegisterModulePath"
|
|
10
|
+
], (
|
|
11
|
+
BaseConfig,
|
|
12
|
+
ConfigurationProvider,
|
|
13
|
+
overrideRegisterModulePath
|
|
14
|
+
) => {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
BaseConfig.registerProvider(ConfigurationProvider);
|
|
18
|
+
|
|
19
|
+
overrideRegisterModulePath();
|
|
20
|
+
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const sAsyncLoader = document.getElementById("sap-ui-bootstrap").getAttribute("data-sap-ui-async");
|
|
6
6
|
|
|
7
7
|
if (sAsyncLoader && sAsyncLoader.toLowerCase() === "true") {
|
|
8
|
-
sap.ui.require(["sap/ushell_abap/bootstrap/
|
|
8
|
+
sap.ui.require(["sap/ushell_abap/bootstrap/abap-def"]);
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* Sync bootstrap is deprecated
|
|
14
14
|
* @deprecated since 1.120
|
|
15
15
|
*/
|
|
16
|
-
sap.ui.requireSync("sap/ushell_abap/bootstrap/
|
|
16
|
+
sap.ui.requireSync("sap/ushell_abap/bootstrap/abap-def"); // LEGACY API (deprecated)
|
|
17
17
|
})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview This module is the root of the ABAP bootstrap.
|
|
4
|
+
*/
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/base/config",
|
|
7
|
+
"sap/ushell_abap/bootstrap/ConfigurationProvider",
|
|
8
|
+
"sap/ushell/bootstrap/CoreMinLoader",
|
|
9
|
+
"sap/ushell/bootstrap/OverrideRegisterModulePath"
|
|
10
|
+
], (
|
|
11
|
+
BaseConfig,
|
|
12
|
+
ConfigurationProvider,
|
|
13
|
+
CoreMinLoader,
|
|
14
|
+
overrideRegisterModulePath
|
|
15
|
+
) => {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
BaseConfig.registerProvider(ConfigurationProvider);
|
|
19
|
+
|
|
20
|
+
overrideRegisterModulePath();
|
|
21
|
+
CoreMinLoader.load();
|
|
22
|
+
});
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
], () => {
|
|
51
51
|
// cascade 4: the abap-def-dev (must be loaded before the core because it needs to set the core configuration)
|
|
52
52
|
sap.ui.require([
|
|
53
|
-
"sap/ushell_abap/bootstrap/
|
|
53
|
+
"sap/ushell_abap/bootstrap/abap-def-dev"
|
|
54
54
|
], (/* abapDefDev */) => {
|
|
55
55
|
// cascade 5: load core and finally boot the core
|
|
56
56
|
sap.ui.require([
|
|
@@ -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 `
|
|
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
|
*
|
|
@@ -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
|
|
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.
|
|
@@ -205,7 +205,7 @@ sap.ui.define([
|
|
|
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
207
|
const aTransactionCodeInbounds = oNavigationData.inbounds.filter((oInbound) =>
|
|
208
|
-
oInbound.resolutionResult?.appInfo?.
|
|
208
|
+
oInbound.resolutionResult?.appInfo?.transaction === sTCode
|
|
209
209
|
);
|
|
210
210
|
if (aTransactionCodeInbounds.length === 0) {
|
|
211
211
|
throw new TCodeNavigationError(
|
|
@@ -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/
|
|
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/
|
|
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/
|
|
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/
|
|
315
|
-
- sap/ushell_abap/bootstrap/
|
|
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
|