@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
@@ -0,0 +1,63 @@
1
+ // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
+
3
+ sap.ui.define([
4
+ "sap/base/Log",
5
+ "sap/ushell_abap/bootstrap/PlatformConfig",
6
+ "sap/ushell_abap/bootstrap/ThemeHandler",
7
+ "sap/ushell_abap/bootstrap/SAPCompanionConditionSetter",
8
+ "sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer",
9
+ "sap/ushell_abap/bootstrap/LoadLaunchpad/InitXhrLogon",
10
+ "sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages",
11
+ "sap/ushell_abap/bootstrap/DirectAppStart",
12
+ "sap/ushell/Container",
13
+ "sap/ushell/iconfonts",
14
+ "sap/ushell_abap/pbServices/ui2/Contracts"
15
+ ], (
16
+ Log,
17
+ PlatformConfig,
18
+ ThemeHandler,
19
+ SAPCompanionConditionSetter,
20
+ CreateRenderer,
21
+ InitXhrLogon,
22
+ RequestPages,
23
+ DirectAppStart,
24
+ Container,
25
+ IconFonts,
26
+ Contracts
27
+ ) => {
28
+ "use strict";
29
+
30
+ class LoadLaunchpad {
31
+ async run () {
32
+ const aParallelPromises = [];
33
+
34
+ // Call UI5 Core APIs only after the core is initialized
35
+ aParallelPromises.push(ThemeHandler.updateUnsafeBootTheme());
36
+ await PlatformConfig.setUI5Settings();
37
+
38
+ await Container.init("abap", {
39
+ abap: "sap.ushell_abap.adapters.abap",
40
+ hana: "sap.ushell_abap.adapters.hana"
41
+ });
42
+
43
+ aParallelPromises.push(Contracts.load());
44
+
45
+ aParallelPromises.push(CreateRenderer.run());
46
+
47
+ IconFonts.registerFiori2IconFont();
48
+
49
+ aParallelPromises.push(SAPCompanionConditionSetter.run().catch(() => {
50
+ Log.info("SAPCompanion conditions could not be set.");
51
+ }));
52
+
53
+ aParallelPromises.push(DirectAppStart.startApp());
54
+ aParallelPromises.push(RequestPages.run());
55
+
56
+ aParallelPromises.push(InitXhrLogon.run());
57
+
58
+ await Promise.all(aParallelPromises);
59
+ }
60
+ }
61
+
62
+ return new LoadLaunchpad();
63
+ });
@@ -0,0 +1,11 @@
1
+ // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
+
3
+ sap.ui.define([
4
+ "sap/ushell_abap/bootstrap/LoadLaunchpad"
5
+ ], (
6
+ LoadLaunchpad
7
+ ) => {
8
+ "use strict";
9
+
10
+ LoadLaunchpad.run();
11
+ });
@@ -0,0 +1,247 @@
1
+ // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
+
3
+ sap.ui.define([
4
+ "sap/ushell_abap/bootstrap/XhrFactory",
5
+ "sap/ui/thirdparty/jquery",
6
+ "sap/ushell_abap/pbServices/ui2/Utils",
7
+ "sap/base/Log"
8
+ ], (
9
+ XhrFactory,
10
+ jQuery,
11
+ ui2Utils,
12
+ Log
13
+ ) => {
14
+ "use strict";
15
+
16
+ /* global OData */
17
+
18
+ const S_PAGE_SETS_FALLBACK_URL_BASE = "/sap/opu/odata/UI2/PAGE_BUILDER_PERS";
19
+ const S_PAGE_SETS_FALLBACK_EXPAND = "Pages/PageChipInstances/Chip/ChipBags/ChipProperties,"
20
+ + "Pages/PageChipInstances/RemoteCatalog,"
21
+ + "Pages/PageChipInstances/ChipInstanceBags/ChipInstanceProperties,"
22
+ + "AssignedPages,DefaultPage";
23
+ const S_PAGE_SETS_FALLBACK_URL_RELATIVE = "PageSets('%2FUI2%2FFiori2LaunchpadHome')";
24
+
25
+ class PageSetsRequestHandler {
26
+ // Check (only once for this file) if sap-statistics is set in query parameter or local storage
27
+ #bSapStatistics = this.#isSapStatisticsSet();
28
+
29
+ /**
30
+ * Determines the URL for the PageSets OData service from the startup service result. If the URL is not set
31
+ * a hard-coded fallback URL is returned and set in the startupResult.
32
+ *
33
+ * @param {object} oStartupCallResult
34
+ * the startup service result object
35
+ * @param {string} sServicePropertyName
36
+ * the name of the service property in the startup result
37
+ * @param {string} sFallbackBaseUrl
38
+ * the fallback base URL to be used if the service URL is not set
39
+ * @param {string} sFallbackRelativeUrl
40
+ * the fallback relative URL to be used if the service URL is not set
41
+ * @param {string} sFallbackExpand
42
+ * the fallback expand parameter to be used if the service URL is not set
43
+ * @returns {string}
44
+ * the URL for the service, adjusted with the fallback values if necessary
45
+ */
46
+ #getAndAdjustServiceURL (oStartupCallResult, sServicePropertyName, sFallbackBaseUrl, sFallbackRelativeUrl, sFallbackExpand) {
47
+ let sServiceUrl;
48
+ let oServiceData; // shortcut for oStartupCallResult.services[sServicePropertyName]
49
+ let bFallbackApplied = false;
50
+
51
+ if (oStartupCallResult.services) {
52
+ if (oStartupCallResult.services[sServicePropertyName]) {
53
+ oServiceData = oStartupCallResult.services[sServicePropertyName];
54
+ } else {
55
+ oServiceData = {};
56
+ oStartupCallResult.services[sServicePropertyName] = oServiceData;
57
+ bFallbackApplied = true;
58
+ }
59
+ } else {
60
+ oServiceData = {};
61
+ oStartupCallResult.services = {};
62
+ oStartupCallResult.services[sServicePropertyName] = oServiceData;
63
+ bFallbackApplied = true;
64
+ }
65
+
66
+ if (!oServiceData.baseUrl || !oServiceData.relativeUrl) {
67
+ oServiceData.baseUrl = sFallbackBaseUrl;
68
+ oServiceData.relativeUrl = sFallbackRelativeUrl;
69
+ bFallbackApplied = true;
70
+ }
71
+
72
+ if (bFallbackApplied) {
73
+ Log.warning(
74
+ `URL for ${sServicePropertyName} service not found in startup service result; fallback to default; cache invalidation might fail`,
75
+ null,
76
+ "sap.ushell_abap.bootstrap"
77
+ );
78
+ }
79
+
80
+ // clean trailing and leading slashes
81
+ if (oServiceData.baseUrl.lastIndexOf("/") !== oServiceData.baseUrl.length - 1) {
82
+ // modify the startUpResult, to simplify the adapter code later
83
+ oServiceData.baseUrl += "/";
84
+ }
85
+ if (oServiceData.relativeUrl[0] === "/") {
86
+ // modify the startUpResult, to simplify the adapter code later
87
+ oServiceData.relativeUrl = oServiceData.relativeUrl.slice(1);
88
+ }
89
+
90
+ sServiceUrl = oServiceData.baseUrl + oServiceData.relativeUrl;
91
+
92
+ // add parameters if needed
93
+ // Note: order should always be 1. $expand, 2. sap-cache-id=, 3. additional params;
94
+ // as OData.read.$cache may otherwise not work properly
95
+ if (!/\$expand=/.test(sServiceUrl) && sFallbackExpand) {
96
+ // no expand, add fallback expand (if not "")
97
+ sServiceUrl += `${sServiceUrl.indexOf("?") < 0 ? "?" : "&"}$expand=${sFallbackExpand}`;
98
+ }
99
+ if (oServiceData.cacheId) {
100
+ sServiceUrl += `${sServiceUrl.indexOf("?") < 0 ? "?" : "&"}sap-cache-id=${oServiceData.cacheId}`;
101
+ }
102
+ if (oServiceData["sap-ui2-cache-disable"]) {
103
+ sServiceUrl += `${sServiceUrl.indexOf("?") < 0 ? "?" : "&"}sap-ui2-cache-disable=${oServiceData["sap-ui2-cache-disable"]}`;
104
+ }
105
+
106
+ return sServiceUrl;
107
+ }
108
+
109
+ /**
110
+ * Processes the OData response.
111
+ * @param {jQuery.Deferred} oDeferred
112
+ * the deferred object updating the cache in OData.read
113
+ * @param {int} iStatus
114
+ * the status code
115
+ * @param {string} sCsrfToken
116
+ * the CSRF token
117
+ * @param {string} sResponse
118
+ * the response message
119
+ */
120
+ #processOData (oDeferred, iStatus, sCsrfToken, sResponse) {
121
+ if (iStatus === 200) {
122
+ oDeferred.resolve(JSON.parse(sResponse).d, sCsrfToken);
123
+ } else {
124
+ // rejecting the deferred will make the request later (in the ushell adapter) fail, so
125
+ // the error handling there takes effect
126
+ oDeferred.reject(new Error(`PageSet request failed: ${sResponse}`));
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Determines the URL for the PageSets OData service from the startup service result. If the URL is not set
132
+ * a hard-coded fallback URL is returned and set in the startupResult.
133
+ *
134
+ * @param {object} oStartupCallResult
135
+ * the startup service result object
136
+ * @returns {string}
137
+ * the URL for the PageSets OData service
138
+ */
139
+ #getAndAdjustPageSetServiceURL (oStartupCallResult) {
140
+ const sSearch = this.getWindowLocationSearch();
141
+ const oUrlParameters = new URLSearchParams(sSearch);
142
+
143
+ const sUI2CacheDisable = oUrlParameters.get("sap-ui2-cache-disable");
144
+ if (sUI2CacheDisable && oStartupCallResult && oStartupCallResult.services && oStartupCallResult.services.pbFioriHome) {
145
+ oStartupCallResult.services.pbFioriHome["sap-ui2-cache-disable"] = sUI2CacheDisable;
146
+ }
147
+ return this.#getAndAdjustServiceURL(
148
+ oStartupCallResult,
149
+ "pbFioriHome",
150
+ S_PAGE_SETS_FALLBACK_URL_BASE,
151
+ S_PAGE_SETS_FALLBACK_URL_RELATIVE,
152
+ S_PAGE_SETS_FALLBACK_EXPAND
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Creates the Deferred in the OData.read cache to keep the result of the request with the
158
+ * given URL.
159
+ * @param {string} sUrl
160
+ * the URL to be requested
161
+ * @returns {jQuery.Deferred}
162
+ * the deferred object which will be resolved with the response of the request
163
+ *
164
+ * @private
165
+ */
166
+ #createODataDeferred (sUrl) {
167
+ const oDeferred = new jQuery.Deferred();
168
+ // creating the deferred objects here should ensure that the ushell adapters later read
169
+ // the responses from the "cache", even if UI5 bootstrap is faster than the
170
+ // OData requests
171
+ sap.ui.require(["sap/ui/thirdparty/datajs"], (datajs) => {
172
+ OData.read.$cache = OData.read.$cache || new ui2Utils.Map();
173
+ OData.read.$cache.put(sUrl, oDeferred.promise());
174
+ });
175
+ return oDeferred;
176
+ }
177
+
178
+ /**
179
+ * Performs an OData GET request using a plain XHR.
180
+ * @param {string} sUrl
181
+ * the url to be requested
182
+ * @param {object} oStartupResult
183
+ * the startup result object, containing the base URL and the CSRF token
184
+ * @param {function(number, object, function)} fnCallback
185
+ * callback function to be called when the request finished, taking the status code, the
186
+ * CSRF token and the response message
187
+ */
188
+ #requestOData (sUrl, oStartupResult, fnCallback) {
189
+ const oXhr = XhrFactory.createAndOpen(sUrl, oStartupResult);
190
+ // set sap-statistics header, see
191
+ // http://help.sap.com/saphelp_nw74/helpdata/de/40/93b81292194d6a926e105c10d5048d/content.htm
192
+ if (this.#bSapStatistics) {
193
+ oXhr.setRequestHeader("sap-statistics", "true");
194
+ }
195
+ oXhr.onreadystatechange = function () {
196
+ if (this.readyState !== /* DONE */4) {
197
+ return; // not yet DONE
198
+ }
199
+ fnCallback(oXhr.status, undefined /* csrf token */, oXhr.responseText);
200
+ };
201
+ oXhr.send();
202
+ }
203
+
204
+ requestPageSets (oStartupResult) {
205
+ const sPageSetServiceUrl = this.#getAndAdjustPageSetServiceURL(oStartupResult);
206
+ const oDeferred = this.#createODataDeferred(sPageSetServiceUrl);// TODO make as Promise.all
207
+
208
+ this.#requestOData(sPageSetServiceUrl, oStartupResult, (iStatus, sCsrfToken, sResponse) => {
209
+ this.#processOData(oDeferred, iStatus, sCsrfToken, sResponse);
210
+ });
211
+ }
212
+
213
+ /**
214
+ * Checks if the sap-statistics setting as query parameter or via local storage, as
215
+ * UI5 does it in some cases.
216
+ * @returns {boolean} true if the sap-statistics is set as query parameter or via local storage
217
+ * @private
218
+ */
219
+ #isSapStatisticsSet () {
220
+ const sWindowLocationSearch = this.getWindowLocationSearch();
221
+ let bSapStatistics = /sap-statistics=(true|x|X)/.test(sWindowLocationSearch);
222
+ if (!bSapStatistics) {
223
+ try {
224
+ // UI5's config cannot be used here, so check local storage
225
+ bSapStatistics = window.localStorage.getItem("sap-ui-statistics") === "X";
226
+ } catch (oError) {
227
+ Log.warning(
228
+ "failed to read sap-statistics setting from local storage",
229
+ oError,
230
+ "sap.ushell_abap.bootstrap.PageSetsRequestHandler"
231
+ );
232
+ }
233
+ }
234
+ return !!bSapStatistics; // needed for tests only
235
+ }
236
+
237
+ getWindowLocationSearch () {
238
+ return window.location.search;
239
+ }
240
+
241
+ reset () {
242
+ this.#bSapStatistics = this.#isSapStatisticsSet();
243
+ }
244
+ }
245
+
246
+ return new PageSetsRequestHandler();
247
+ });