@sapui5/sap.ushell_abap 1.109.2 → 1.111.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 (33) hide show
  1. package/package.json +1 -1
  2. package/src/main/js/sap/ushell_abap/.library +1 -1
  3. package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +29 -7
  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 +5 -4
  6. package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
  7. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +1 -1
  8. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +6 -6
  9. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  10. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1 -1
  12. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +6 -27
  13. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
  15. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  16. package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +6 -2
  17. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
  18. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +2 -2
  19. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +4 -4
  20. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
  21. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.constants.js +15 -22
  22. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +1 -35
  23. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.configure.js +84 -0
  24. package/src/main/js/sap/ushell_abap/bootstrap/evo/{abap.xhr.handler.js → abap.xhrlogon.handler.js} +3 -3
  25. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.load.js +3260 -0
  26. package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +35 -33
  27. package/src/main/js/sap/ushell_abap/library.js +2 -2
  28. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +1 -1
  29. package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +1 -1
  30. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +6 -0
  31. package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +9 -11
  32. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/preview.js +7 -10
  33. package/ui5.yaml +112 -321
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ushell_abap",
3
- "version": "1.109.2",
3
+ "version": "1.111.0",
4
4
  "description": "SAPUI5 Library sap.ushell_abap",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "keywords": [
@@ -2,7 +2,7 @@
2
2
  <library xmlns="http://www.sap.com/sap.ui.library.xsd">
3
3
  <name>sap.ushell_abap</name>
4
4
  <vendor>SAP SE</vendor>
5
- <version>1.109.2</version>
5
+ <version>1.111.0</version>
6
6
  <copyright>Copyright (c) 2009-2022 SAP SE, All Rights Reserved</copyright>
7
7
  <documentation>SAP library: sap.ushell_abap</documentation>
8
8
 
@@ -5,13 +5,15 @@ sap.ui.define([
5
5
  "sap/base/Log",
6
6
  "sap/ui/thirdparty/jquery",
7
7
  "sap/ui/core/format/DateFormat",
8
- "sap/ushell_abap/pbServices/ui2/ODataService"
8
+ "sap/ushell_abap/pbServices/ui2/ODataService",
9
+ "sap/ushell/services/_Personalization/constants"
9
10
  ], function (
10
11
  ObjectPath,
11
12
  Log,
12
13
  jQuery,
13
14
  DateFormat,
14
- ODataService
15
+ ODataService,
16
+ constants
15
17
  ) {
16
18
  "use strict";
17
19
 
@@ -40,11 +42,8 @@ sap.ui.define([
40
42
  this._sContainerKey = rectifyKey(sContainerKey);
41
43
  this._sAppName = sAppName || "";
42
44
 
43
- var PersonalizationAdapter = sap.ui.require("sap/ushell_abap/adapters/abap/PersonalizationAdapter");
44
- if (PersonalizationAdapter) {
45
- // Determine category resulting out of possible scope flag combinations
46
- this._category = PersonalizationAdapter.prototype._determineCategory(oScope);
47
- }
45
+ // Determine category resulting out of possible scope flag combinations
46
+ this._category = this._determineCategory(oScope);
48
47
 
49
48
  this._oJSONContainer = {
50
49
  "category": this._category,
@@ -103,6 +102,7 @@ sap.ui.define([
103
102
  };
104
103
 
105
104
  AdapterContainer.prototype.save = function () {
105
+ Log.debug("[000] save", "AdapterContainer");
106
106
  var oDeferred = new jQuery.Deferred(),
107
107
  that = this,
108
108
  oDataWrapper = this._obtainODataWrapper(),
@@ -349,5 +349,27 @@ sap.ui.define([
349
349
  // TODO throw?
350
350
  };
351
351
 
352
+ /**
353
+ * Determine the correct category resulting out of possible scope flag combinations
354
+ *
355
+ * @param {object} oScope Scope object
356
+ *
357
+ * @returns {string} category information
358
+ *
359
+ * @private
360
+ */
361
+ AdapterContainer.prototype._determineCategory = function (oScope) {
362
+ if (!oScope) {
363
+ return "U";
364
+ }
365
+ var oConstants = constants;
366
+ if (oScope.keyCategory && oScope.keyCategory === oConstants.keyCategory.FIXED_KEY &&
367
+ oScope.writeFrequency && oScope.writeFrequency === oConstants.writeFrequency.LOW &&
368
+ oScope.clientStorageAllowed && oScope.clientStorageAllowed === true) {
369
+ return "P";
370
+ }
371
+ return "U";
372
+ };
373
+
352
374
  return AdapterContainer;
353
375
  }, true /* bExport */);
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's AppStateAdapter for the ABAP platform.
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -9,7 +9,7 @@
9
9
  * <li>provide the resolveHashFragmentFallback function, a fallback method called by ClientSideTargetResolution service.</li>
10
10
  * </ul>
11
11
  *
12
- * @version 1.109.2
12
+ * @version 1.111.0
13
13
  */
14
14
  sap.ui.define([
15
15
  "sap/ui/thirdparty/jquery",
@@ -20,7 +20,8 @@ sap.ui.define([
20
20
  "sap/ushell/utils/UrlParsing",
21
21
  "sap/base/Log",
22
22
  "sap/ushell_abap/pbServices/ui2/ODataWrapper",
23
- "sap/ushell_abap/pbServices/ui2/Utils"
23
+ "sap/ushell_abap/pbServices/ui2/Utils",
24
+ "sap/ui/thirdparty/URI"
24
25
  ], function (
25
26
  jQuery,
26
27
  ObjectPath,
@@ -30,7 +31,8 @@ sap.ui.define([
30
31
  urlParsing,
31
32
  Log,
32
33
  ODataWrapper,
33
- Utils
34
+ Utils,
35
+ URI
34
36
  ) {
35
37
  "use strict";
36
38
 
@@ -306,7 +308,6 @@ sap.ui.define([
306
308
  oAdjustedResult.additionalInformation = "SAPUI5.Component=" + oAdjustedResult.ui5ComponentName;
307
309
  }
308
310
  if (oSelf && oSelf.url && typeof oSelf.url === "string") {
309
- var URI = sap.ui.require("sap/ui/thirdparty/URI");
310
311
  oUri = sUrl && new URI(sUrl);
311
312
 
312
313
  if (oUri) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The ConfigurationDefaults adapter for the ABAP platform.
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ushell_abap/bootstrap/evo/abap.constants",
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's container adapter for the ABAP platform.
4
4
  *
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ui/thirdparty/jquery",
@@ -4,7 +4,7 @@
4
4
  * @fileOverview The Unified Shell's page building adapter for the ABAP platform.
5
5
  *
6
6
  * @deprecated since 1.100
7
- * @version 1.109.2
7
+ * @version 1.111.0
8
8
  */
9
9
  sap.ui.define([
10
10
  "sap/ui/thirdparty/URI",
@@ -22,7 +22,8 @@ sap.ui.define([
22
22
  "sap/base/Log",
23
23
  "sap/m/library",
24
24
  "sap/ushell/ui/tile/StaticTile",
25
- "sap/ushell/utils"
25
+ "sap/ushell/utils",
26
+ "sap/ushell_abap/pbServices/ui2/contracts/preview"
26
27
  ], function (
27
28
  URI,
28
29
  ManifestPropertyHelper,
@@ -39,7 +40,8 @@ sap.ui.define([
39
40
  Log,
40
41
  mobileLibrary,
41
42
  StaticTile,
42
- ushellUtils
43
+ ushellUtils,
44
+ Preview
43
45
  ) {
44
46
  "use strict";
45
47
 
@@ -95,9 +97,7 @@ sap.ui.define([
95
97
  this._bPageSetFullyLoaded = false;
96
98
  this._aOtherChipsPromises = [];
97
99
 
98
- if (sap.ui2.srvc.contracts.preview.setEnvironmentType) {
99
- sap.ui2.srvc.contracts.preview.setEnvironmentType("runtime");
100
- }
100
+ Preview.setEnvironmentType("runtime");
101
101
 
102
102
  /**
103
103
  * Robust call to <code>sap.ushell_abap.pbServices.ui2.ChipInstance#getImplementationAsSapui5()</code>.
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the abap
9
9
  * platform.
10
10
  *
11
- * @version 1.109.2
11
+ * @version 1.111.0
12
12
  */
13
13
  sap.ui.define([], function () {
14
14
  "use strict";
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's page building adapter for the ABAP platform.
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview PagePersistenceAdapter for the ABAP platform.
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -7,22 +7,22 @@
7
7
  * Container header properties transported via pseudo-items are mapped to the
8
8
  * respective header properties in setItem/getItem/delItem
9
9
  *
10
- * @version 1.109.2
10
+ * @version 1.111.0
11
11
  */
12
12
  sap.ui.define([
13
13
  "sap/ushell_abap/adapters/abap/AdapterContainer",
14
- "sap/ushell/services/_Personalization/constants",
15
14
  "sap/ushell_abap/pbServices/ui2/ODataWrapper",
16
15
  "sap/ushell_abap/pbServices/ui2/ODataService",
17
16
  "sap/ushell_abap/pbServices/ui2/Error",
18
- "sap/base/util/ObjectPath"
17
+ "sap/base/util/ObjectPath",
18
+ "sap/base/Log"
19
19
  ], function (
20
20
  AdapterContainer,
21
- constants,
22
21
  ODataWrapper,
23
22
  ODataService,
24
23
  SrvcError,
25
- ObjectPath
24
+ ObjectPath,
25
+ Log
26
26
  ) {
27
27
  "use strict";
28
28
 
@@ -43,6 +43,7 @@ sap.ui.define([
43
43
  * @private
44
44
  */
45
45
  var PersonalizationAdapter = function (oSystem, sParameters, oConfig) {
46
+ Log.debug("[000] PersonalizationAdapter: constructor", "PersonalizationAdapter");
46
47
  this._oConfig = oConfig && oConfig.config;
47
48
  var sPersonalizationServiceURL = (ObjectPath.get("config.services.personalization.baseUrl", oConfig) || "/sap/opu/odata/UI2/INTEROP") + "/";
48
49
  var oODataWrapperSettings = {
@@ -71,28 +72,6 @@ sap.ui.define([
71
72
  return this.getAdapterContainer(sContainerKey, oScope).del();
72
73
  };
73
74
 
74
- /**
75
- * Determine the correct category resulting out of possible scope flag combinations
76
- *
77
- * @param {object} oScope Scope object
78
- *
79
- * @returns {string} category information
80
- *
81
- * @private
82
- */
83
- PersonalizationAdapter.prototype._determineCategory = function (oScope) {
84
- if (!oScope) {
85
- return "U";
86
- }
87
- var oConstants = constants;
88
- if (oScope.keyCategory && oScope.keyCategory === oConstants.keyCategory.FIXED_KEY &&
89
- oScope.writeFrequency && oScope.writeFrequency === oConstants.writeFrequency.LOW &&
90
- oScope.clientStorageAllowed && oScope.clientStorageAllowed === true) {
91
- return "P";
92
- }
93
- return "U";
94
- };
95
-
96
75
  return PersonalizationAdapter;
97
76
 
98
77
  }, true /* bExport */);
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Search adapter for the ABAP platform.
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([], function () {
8
8
  "use strict";
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The SupportTicket adapter for the ABAP platform.
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/isEmptyObject",
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's Ui5ComponentLoaderAdapter for the ABAP platform
4
4
  *
5
- * @version 1.109.2
5
+ * @version 1.111.0
6
6
  */
7
7
  sap.ui.define([
8
8
  ], function () {
@@ -201,6 +201,7 @@ sap.ui.define([
201
201
  * jQuery.promise object
202
202
  */
203
203
  this.updateUserPreferences = function (oUser) {
204
+ Log.debug("[000] updateUserPreferences", "UserInfoAdapter");
204
205
  var that = this,
205
206
  oDeferred,
206
207
  sRelativeUrl,
@@ -216,15 +217,17 @@ sap.ui.define([
216
217
  fnFailure = function (sErrorMessage, oParsedErrorInformation) {
217
218
  oDeferred.reject(sErrorMessage, oParsedErrorInformation);
218
219
  };
219
-
220
+ Log.debug("[000] updateUserPreferences: _createWrapper", "UserInfoAdapter");
220
221
  oDataWrapper = this._createWrapper("/sap/opu/odata/UI2/INTEROP/");
221
222
  oDeferred = new jQuery.Deferred();
222
223
 
223
224
  // prepare
225
+ Log.debug("[000] updateUserPreferences: oDataWrapper.openBatchQueue", "UserInfoAdapter");
224
226
  oDataWrapper.openBatchQueue();
225
227
 
226
228
  // put the preferences to update in the OData batch queue
227
229
  aUserChangedProperties = oUser.getChangedProperties() || [];
230
+ Log.debug("[000] updateUserPreferences: getChangedProperties", "UserInfoAdapter");
228
231
  iODataRequestsRunning = aUserChangedProperties.length;
229
232
  aUserChangedProperties.forEach(function (oUserChangedProperty) {
230
233
  var name = oUserChangedProperty.name,
@@ -246,9 +249,10 @@ sap.ui.define([
246
249
  };
247
250
  //check for the datatype of the value & process oDataObj
248
251
  that._updateODataObjectBasedOnDatatype(newValue, oDataObj);
252
+ Log.debug("[000] updateUserPreferences: oDataWrapper: put", "UserInfoAdapter");
249
253
  oDataWrapper.put(sRelativeUrl, oDataObj, fnSuccess, fnFailure);
250
254
  });
251
-
255
+ Log.debug("[000] updateUserPreferences: submitBatchQueue", "UserInfoAdapter");
252
256
  // submit
253
257
  oDataWrapper.submitBatchQueue(function () {
254
258
  // request accepted but does not mean that the single requests
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileOverview The Unified Shell's container adapter for the HANA platform.
5
5
  *
6
- * @version 1.109.2
6
+ * @version 1.111.0
7
7
  */
8
8
  /**
9
9
  * @namespace Default namespace for Unified Shell adapters for the HANA platform. They can usually
@@ -13,14 +13,14 @@ sap.ui.define([
13
13
  oBoottask,
14
14
  fnConfigureUi5,
15
15
  fnExtractUi5LibsFromUshellConfig,
16
- bDebugSources,
16
+ oDebugMode,
17
17
  fnLoadBootstrapExtension
18
18
  ) {
19
19
  "use strict";
20
20
 
21
21
  var oUShellConfig;
22
22
 
23
- window["sap-ui-debug"] = bDebugSources; //use in LaunchPageAdapter
23
+ window["sap-ui-debug"] = oDebugMode.isDebug(); //use in LaunchPageAdapter
24
24
  oUShellConfig = fnConfigureUshell();
25
25
  fnConfigureUi5({
26
26
  ushellConfig: oUShellConfig,
@@ -15,14 +15,14 @@ sap.ui.define([
15
15
  fnConfigureUi5,
16
16
  fnExtractUi5LibsFromUshellConfig,
17
17
  fnLoadBootstrapExtension,
18
- bDebugSources,
19
- fnLoadCoreMin
18
+ oDebugMode,
19
+ oCoreMinLoader
20
20
  ) {
21
21
  "use strict";
22
22
 
23
23
  var oUShellConfig;
24
24
 
25
- window["sap-ui-debug"] = bDebugSources; //use in LaunchPageAdapter
25
+ window["sap-ui-debug"] = oDebugMode.isDebug(); //use in LaunchPageAdapter
26
26
  oUShellConfig = fnConfigureUshell();
27
27
  fnConfigureUi5({
28
28
  ushellConfig: oUShellConfig,
@@ -37,6 +37,6 @@ sap.ui.define([
37
37
  onInitCallback: fnLoadLaunchpad
38
38
  });
39
39
 
40
- fnLoadCoreMin.load("sap.ushell_abap.bootstrap.evo");
40
+ oCoreMinLoader.load(oUShellConfig.ushell.customPreload);
41
41
  fnLoadBootstrapExtension(oUShellConfig);
42
42
  });
@@ -14,7 +14,7 @@
14
14
  * It furthermore calculates if FLP pages get activated and if needed sets up
15
15
  * the configuration environment to run these.
16
16
  *
17
- * @version 1.109.2
17
+ * @version 1.111.0
18
18
  */
19
19
  sap.ui.define([
20
20
  "./abap.constants",
@@ -18,6 +18,21 @@ sap.ui.define([
18
18
  myHome: {
19
19
  enabled: true
20
20
  }
21
+ },
22
+ customPreload: {
23
+ enabled: true,
24
+ coreResources: [
25
+ "sap/ushell_abap/bootstrap/evo/core-min-0.js",
26
+ "sap/ushell_abap/bootstrap/evo/core-min-1.js",
27
+ "sap/ushell_abap/bootstrap/evo/core-min-2.js",
28
+ "sap/ushell_abap/bootstrap/evo/core-min-3.js"
29
+ ],
30
+ coreResourcesComplement: [
31
+ "sap/ushell_abap/bootstrap/evo/core-ext-light-0.js",
32
+ "sap/ushell_abap/bootstrap/evo/core-ext-light-1.js",
33
+ "sap/ushell_abap/bootstrap/evo/core-ext-light-2.js",
34
+ "sap/ushell_abap/bootstrap/evo/core-ext-light-3.js"
35
+ ]
21
36
  }
22
37
  },
23
38
  renderers: {
@@ -76,11 +91,6 @@ sap.ui.define([
76
91
  enableClientSideTargetResolution: true
77
92
  }
78
93
  },
79
- Ui5ComponentLoader: {
80
- config: {
81
- amendedLoading: true
82
- }
83
- },
84
94
  ShellNavigation: {
85
95
  config: {
86
96
  reload: false
@@ -127,23 +137,6 @@ sap.ui.define([
127
137
  }
128
138
  }
129
139
  },
130
- // platform specific (ABAP) launchpad configuration
131
- launchpadConfiguration: {
132
- configurationFile: {
133
- configurationFileFolderWhitelist: { // inclusive language FLPCOREANDUX-4020: this configuration parameter is deprecated and will be removed
134
- "": true,
135
- "cfg/": true,
136
- "cfg/sap/": true,
137
- "/sap/bc/ui5_ui5/ui2/ushell/shells/abap/": true,
138
- "/sap/bc/ui5_ui5/ui2/ushell/shells/abap/cfg/": true,
139
- "/sap/bc/ui5_ui5/ui2/ushell/shells/abap/cfg/sap/": true,
140
- "/sap/ushell_config/": true,
141
- "/sap/bc/ui5_demokit/test-resources/sap/ushell/demoapps/LaunchpadConfigFileExamples/": true,
142
- "/resources/sap/dfa/help/sap/cfg/": true,
143
- "/sap/bc/ui5_ui5/ui2/ushell_me/sap/ushell/me/": true
144
- }
145
- }
146
- },
147
140
  xhrLogon: {
148
141
  // Configuration for XHR-Logon mode. See SAP Note 2193513 for details.
149
142
  mode: "frame"
@@ -1,9 +1,6 @@
1
1
  // Copyright (c) 2009-2022 SAP SE, All Rights Reserved
2
2
  sap.ui.define([
3
- "sap/base/util/UriParameters",
4
- "sap/base/Log",
5
3
  "./boottask",
6
- "sap/ui/core/Configuration",
7
4
  "sap/ushell_abap/pbServices/ui2/contracts/bag",
8
5
  "sap/ushell_abap/pbServices/ui2/contracts/configuration",
9
6
  "sap/ushell_abap/pbServices/ui2/contracts/configurationUi",
@@ -16,10 +13,7 @@ sap.ui.define([
16
13
  "sap/ushell_abap/pbServices/ui2/contracts/actions",
17
14
  "sap/ushell_abap/pbServices/ui2/contracts/types"
18
15
  ], function (
19
- UriParameters,
20
- Log,
21
- Boottask,
22
- Configuration
16
+ Boottask
23
17
  /*
24
18
  ui2ContractsBag,
25
19
  ui2Configuration,
@@ -36,34 +30,6 @@ sap.ui.define([
36
30
  ) {
37
31
  "use strict";
38
32
  return function () {
39
- // check if framing control of ui5 should be active (meta tag set)
40
- var oFramingControl = window["sap-ushell-framing-control"];
41
- var oUriParameters = UriParameters.fromQuery(window.location.search);
42
- var terminationKey = oUriParameters.get("SAPSessionCmd") || oUriParameters.get("sap-sessioncmd");
43
-
44
- if (oFramingControl && oFramingControl.verifyUi5ProtectionActive) {
45
- var sUi5FrameOptions = (typeof Configuration.getFrameOptions === "function") && Configuration.getFrameOptions();
46
- if (sUi5FrameOptions === "trusted" || sUi5FrameOptions === "deny") {
47
- // ui5 protection active, so we can unlock
48
- oFramingControl.unlock();
49
- Log.debug("UI5 framing protection active, unlocking FLP protection");
50
- } else {
51
- // ui5 protection not active although meta tag set; this is an illegal state that can only
52
- // happen if UI2 version is newer than UI5, but UI5 ABAP code is already active
53
- throw new Error("UI5 framing protection is NOT active, although sap.allowlistService meta tag set."
54
- + " Ensure consistent deployment of UI5 and UI2 resources.");
55
- }
56
- }
57
-
58
- // check if this is a DSM terminate session (which comes from EP)
59
- if (terminationKey === "USR_LOGOFF") {
60
- // DSM notification for user log off - call the Container logoff API
61
- sap.ushell.Container.logout();
62
- return;
63
- } else if (terminationKey === "USR_ABORT") {
64
- // DSM notification for user aborted
65
- return;
66
- }
67
33
  sap.ui.require(["sap/ushell/iconfonts"], function (IconFonts) {
68
34
  window.sap.ushell.Container.createRenderer("fiori2", true).then(
69
35
  function (oContent) {
@@ -0,0 +1,84 @@
1
+ // Copyright (c) 2009-2022 SAP SE, All Rights Reserved
2
+ sap.ui.define([
3
+ "sap/ushell/bootstrap/common/common.util",
4
+ "sap/base/Log"
5
+ ], function (oUtils, Log) {
6
+ "use strict";
7
+
8
+ var oModule = {
9
+ start: start,
10
+ initXhrLogonIgnoreList: initXhrLogonIgnoreList,
11
+ createUi5ConnectedXhrLogger: createUi5ConnectedXhrLogger
12
+ };
13
+ return oModule;
14
+
15
+ /**
16
+ * Creates a logger for XMLHttpRequest(s) that logs errors, warnings, info
17
+ * and debug messages via Log.
18
+ *
19
+ * @return {object}
20
+ * A logger that can be assigned to XMLHttpRequest.
21
+ *
22
+ * @private
23
+ */
24
+ function createUi5ConnectedXhrLogger () {
25
+ return ["error", "warning", "info", "debug"].reduce(function (oXhrLogger, sLevel) {
26
+ oXhrLogger[sLevel] = function (sMsg) {
27
+ return Log[sLevel](sMsg);
28
+ };
29
+ return oXhrLogger;
30
+ }, {});
31
+ }
32
+
33
+ /**
34
+ * Initializes the ignore list of the XHR logon manager.
35
+ * <p>
36
+ * If the UI5 resources (including the own bootstrap script) are loaded from an absolute URL
37
+ * (in case CDN is activated),
38
+ * this URL is added to the ignore list to prevent CORS preflight requests due to the X headers.
39
+ * We expect that all resources can be loaded without authentication in this case.
40
+ *
41
+ * @param {object} oXHRLogonManager
42
+ * the logon frame manager instance to use
43
+ *
44
+ * @private
45
+ */
46
+ function initXhrLogonIgnoreList (oXHRLogonManager) {
47
+ var sOrigin = oUtils.getLocationOrigin(),
48
+ sUi5ResourceRootUrl = sap.ui.require.toUrl("");
49
+
50
+ // add "/" to origin, as otherwise the following use case will match:
51
+ // sUi5ResourceRootUrl: http://sap.com:123
52
+ // sOrigin: http://sap.com
53
+ if (sUi5ResourceRootUrl && sUi5ResourceRootUrl.indexOf(sOrigin + "/") === -1) {
54
+ // In case UI5 is loaded from a different domain (CDN / AKAMAI), that URL
55
+ // needs to be ignored for the XHR logon, as we expect that the resources
56
+ // are not protected.
57
+ oXHRLogonManager.ignore.add(sUi5ResourceRootUrl);
58
+ }
59
+ }
60
+
61
+ /**
62
+ * Enables the handling of the XHR Logon in the FLP.
63
+ * Note: using sap.ui.require.toUrl for initXhrLogonIgnoreList as it
64
+ * will be loaded in CDM (compare to ABAP, where this is not the case)
65
+ *
66
+ * @param {object} oSapUshellContainer
67
+ * The active <code>sap.ushell.Container</code> instance to configure
68
+ * the logon manager into.
69
+ *
70
+ * @param {object} oXhrLogonLib XHR logon lib.
71
+ *
72
+ * @private
73
+ */
74
+ function start (oSapUshellContainer, oXhrLogonLib) {
75
+ oXhrLogonLib.start();
76
+
77
+ oModule.initXhrLogonIgnoreList(oXhrLogonLib.XHRLogonManager.getInstance());
78
+
79
+ // configure logger
80
+ XMLHttpRequest.logger = createUi5ConnectedXhrLogger();
81
+
82
+ oSapUshellContainer.oFrameLogonManager = oXhrLogonLib.FrameLogonManager.getInstance();
83
+ }
84
+ });
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) 2009-2022 SAP SE, All Rights Reserved
2
2
  sap.ui.define([
3
- "sap/ushell/bootstrap/common/common.load.xhrlogon",
4
- "sap/ushell/bootstrap/common/common.configure.xhrlogon",
3
+ "./abap.xhrlogon.load",
4
+ "./abap.xhrlogon.configure",
5
5
  "./abap.bootstrap.utils",
6
6
  "./XhrLogonEventHandler",
7
7
  "sap/base/Log"
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  });
54
54
  } else if (sLogonMode !== "frame") {
55
55
  Log.warning("Unknown setting for xhrLogonMode: '" + sLogonMode + "'. Using default mode 'frame'.",
56
- null, "sap.ushell_abap.bootstrap.evo.abap.xhr.handler");
56
+ null, "sap.ushell_abap.bootstrap.evo.abap.xhrlogon.handler");
57
57
  }
58
58
 
59
59
  XMLHttpRequest.logger = oConfigureXhrLogon.createUi5ConnectedXhrLogger();