@sapui5/sap.ushell_abap 1.151.1 → 1.153.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 (46) 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 +30 -31
  4. package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +53 -63
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +13 -18
  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 +1 -1
  8. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +31 -41
  9. package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +439 -555
  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 +4 -4
  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/abap/UserInfoAdapter.js +127 -133
  21. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +27 -33
  22. package/src/main/js/sap/ushell_abap/bootstrap/DirectAppStart.js +3 -2
  23. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer.js +4 -2
  24. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages.js +2 -6
  25. package/src/main/js/sap/ushell_abap/bootstrap/PageSetsRequestHandler.js +25 -50
  26. package/src/main/js/sap/ushell_abap/bootstrap/SAPCompanionConditionSetter.js +1 -3
  27. package/src/main/js/sap/ushell_abap/bootstrap/XhrLogonEventHandler.js +6 -7
  28. package/src/main/js/sap/ushell_abap/bootstrap/abapConstants.js +19 -0
  29. package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/Component.js +90 -0
  30. package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.controller.js +109 -0
  31. package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.view.xml +16 -0
  32. package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n.properties +17 -0
  33. package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/manifest.json +96 -0
  34. package/src/main/js/sap/ushell_abap/integration/fileshares/NavTargetResolutionFileShareSupport.js +3 -1
  35. package/src/main/js/sap/ushell_abap/library.js +1 -1
  36. package/src/main/js/sap/ushell_abap/messagebundle.properties +2 -0
  37. package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +69 -43
  38. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +53 -64
  39. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +65 -82
  40. package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +12 -15
  41. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +48 -2
  42. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +10 -2
  43. package/src/main/js/sap/ushell_abap/services/NavigationDataProvider.js +7 -7
  44. package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +19 -18
  45. package/src/main/js/sap/ushell_abap/utils/UserPersonalization.js +80 -0
  46. package/ui5.yaml +2 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ushell_abap",
3
- "version": "1.151.1",
3
+ "version": "1.153.0",
4
4
  "description": "SAPUI5 Library sap.ushell_abap",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -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.151.1</version>
5
+ <version>1.153.0</version>
6
6
  <copyright>Copyright (c) 2009-2026 SAP SE, All Rights Reserved</copyright>
7
7
  <documentation>SAP library: sap.ushell_abap</documentation>
8
8
 
@@ -3,7 +3,6 @@
3
3
  sap.ui.define([
4
4
  "sap/base/util/ObjectPath",
5
5
  "sap/base/Log",
6
- "sap/ui/thirdparty/jquery",
7
6
  "sap/ui/core/format/DateFormat",
8
7
  "sap/ushell_abap/pbServices/ui2/ODataService",
9
8
  "sap/ushell/services/PersonalizationV2/constants",
@@ -11,7 +10,6 @@ sap.ui.define([
11
10
  ], (
12
11
  ObjectPath,
13
12
  Log,
14
- jQuery,
15
13
  DateFormat,
16
14
  ODataService,
17
15
  PersonalizationV2Constants,
@@ -72,7 +70,6 @@ sap.ui.define([
72
70
 
73
71
  // loads data from backend, when done, oPropertyBag contains the items
74
72
  AdapterContainer.prototype.load = function () {
75
- const oDeferred = new jQuery.Deferred();
76
73
  const that = this;
77
74
  const oDataWrapper = this._obtainODataWrapper();
78
75
  // load container data with _sContainerKey data into _oPoprertyBag
@@ -84,29 +81,29 @@ sap.ui.define([
84
81
  return false;
85
82
  });
86
83
 
87
- oDataWrapper.read(sRelativeUrl, (oData) => {
88
- // TODO : align container id?
89
- that._oJSONContainer = oData;
90
- // overwrite key and category, do not trust server response
91
- that._oJSONContainer.category = that._category;
92
- that._oJSONContainer.id = that._sContainerKey;
93
- that._oJSONContainer.appName = that._sAppName;
94
- // response contains items.results (!)
95
- that._oJSONContainer.PersContainerItems = (that._oJSONContainer.PersContainerItems && that._oJSONContainer.PersContainerItems.results) || [];
96
- oDeferred.resolve(that);
97
- }, (sErrorMessage, oParsedError) => {
98
- // this error handler used to resolve with an empty personalization container
99
- // but was changed to reject the promise so that the caller can react to the error
100
- Log.error(sErrorMessage);
84
+ return new Promise((resolve, reject) => {
85
+ oDataWrapper.read(sRelativeUrl, (oData) => {
86
+ // TODO : align container id?
87
+ that._oJSONContainer = oData;
88
+ // overwrite key and category, do not trust server response
89
+ that._oJSONContainer.category = that._category;
90
+ that._oJSONContainer.id = that._sContainerKey;
91
+ that._oJSONContainer.appName = that._sAppName;
92
+ // response contains items.results (!)
93
+ that._oJSONContainer.PersContainerItems = (that._oJSONContainer.PersContainerItems && that._oJSONContainer.PersContainerItems.results) || [];
94
+ resolve(that);
95
+ }, (sErrorMessage, oParsedError) => {
96
+ // this error handler used to resolve with an empty personalization container
97
+ // but was changed to reject the promise so that the caller can react to the error
98
+ Log.error(sErrorMessage);
101
99
 
102
- oDeferred.reject(new LaunchpadError(sErrorMessage, oParsedError));
100
+ reject(new LaunchpadError(sErrorMessage, oParsedError));
101
+ });
103
102
  });
104
- return oDeferred.promise();
105
103
  };
106
104
 
107
105
  AdapterContainer.prototype.save = function () {
108
106
  Log.debug("[000] save", "AdapterContainer");
109
- const oDeferred = new jQuery.Deferred();
110
107
  const that = this;
111
108
  const oDataWrapper = this._obtainODataWrapper();
112
109
  const sRelativeURL = sCONTAINERCOLLECTIONNAME;
@@ -115,16 +112,16 @@ sap.ui.define([
115
112
  return false;
116
113
  });
117
114
 
118
- oDataWrapper.create(sRelativeURL, this._oJSONContainer, (/* response */) => {
119
- oDeferred.resolve(that);
120
- }, (sErrorMessage, oParsedError) => {
121
- oDeferred.reject(new LaunchpadError(sErrorMessage, oParsedError));
115
+ return new Promise((resolve, reject) => {
116
+ oDataWrapper.create(sRelativeURL, this._oJSONContainer, (/* response */) => {
117
+ resolve(that);
118
+ }, (sErrorMessage, oParsedError) => {
119
+ reject(new LaunchpadError(sErrorMessage, oParsedError));
120
+ });
122
121
  });
123
- return oDeferred.promise();
124
122
  };
125
123
 
126
124
  AdapterContainer.prototype.del = function () {
127
- const oDeferred = new jQuery.Deferred();
128
125
  const that = this;
129
126
  const oDataWrapper = this._obtainODataWrapper();
130
127
  const sRelativeURL = `${sCONTAINERCOLLECTIONNAME}(category='${this._category}',id='${encodeURIComponent(this._sContainerKey)}')`;
@@ -133,13 +130,15 @@ sap.ui.define([
133
130
  return false;
134
131
  });
135
132
 
136
- oDataWrapper.del(sRelativeURL, (response) => {
137
- oDeferred.resolve(that);
138
- }, (sErrorMessage, oParsedError) => {
139
- oDeferred.reject(new LaunchpadError(sErrorMessage, oParsedError));
133
+ const pResult = new Promise((resolve, reject) => {
134
+ oDataWrapper.del(sRelativeURL, (response) => {
135
+ resolve(that);
136
+ }, (sErrorMessage, oParsedError) => {
137
+ reject(new LaunchpadError(sErrorMessage, oParsedError));
138
+ });
140
139
  });
141
140
  this._reset();
142
- return oDeferred.promise();
141
+ return pResult;
143
142
  };
144
143
 
145
144
  AdapterContainer.prototype.getItemKeys = function () {
@@ -2,40 +2,36 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's AppStateAdapter for the ABAP platform.
5
- * @version 1.151.1
5
+ * @version 1.153.0
6
6
  */
7
7
  sap.ui.define([
8
- "sap/base/util/ObjectPath",
9
- "sap/ui/thirdparty/jquery",
10
8
  "sap/base/Log",
9
+ "sap/base/util/ObjectPath",
10
+ "sap/ushell/Container",
11
11
  "sap/ushell/utils/LogError",
12
- "sap/ushell_abap/pbServices/ui2/ODataWrapper",
13
12
  "sap/ushell_abap/base/Ui2Error",
14
13
  "sap/ushell_abap/pbServices/ui2/ODataService",
15
- "sap/ushell/Container"
14
+ "sap/ushell_abap/pbServices/ui2/ODataWrapper"
16
15
  ], (
17
- ObjectPath,
18
- jQuery,
19
16
  Log,
17
+ ObjectPath,
18
+ Container,
20
19
  LogError,
21
- ODataWrapper,
22
20
  SrvcError,
23
21
  ODataService,
24
- Container
22
+ ODataWrapper
25
23
  ) => {
26
24
  "use strict";
27
25
 
28
26
  /**
29
27
  * Constructs a new instance of the AppStateAdapter for the ABAP platform.
30
28
  *
31
- *
32
- * @param {object} oSystem The system served by the adapter
33
- * @param {string} sParameters Parameter string, not in use
34
- * @param {object} oConfig A potential adapter configuration
29
+ * @param {object} oSystem the system served by the adapter
30
+ * @param {string} sParameters parameter string, not in use
31
+ * @param {object} oConfig a potential adapter configuration
35
32
  *
36
33
  * @class
37
34
  * @since 1.28.0
38
- *
39
35
  * @private
40
36
  */
41
37
  function AppStateAdapter (oSystem, sParameters, oConfig) {
@@ -54,72 +50,66 @@ sap.ui.define([
54
50
  }
55
51
 
56
52
  /**
57
- * Save the given data sValue for the given key at the persistence layer
53
+ * Saves the given data for the given key at the persistence layer.
58
54
  *
59
- * @param {string} sKey The generated key value of the application state to save
60
- * @param {string} sSessionKey A generated session key
61
- * overwriting/modifying an existing record is only permitted if the session key matches the key of the initial creation.
62
- * It shall be part of the save request, but shall not be returned on reading (it is not detectable from outside).
63
- * @param {string} sValue The value to persist under the given key
64
- * @param {string} sAppName The application name (the ui5 component name)
65
- * should be stored with the data to allow to identify the data association
66
- * @param {string} sComponent A 24 character string representing the application component,
67
- * (A sap support component) may be undefined if not available on the client
68
- * @returns {jQuery.Promise} Resolves once the app state was saved.
55
+ * @param {string} sKey the generated key value of the application state to save
56
+ * @param {string} sSessionKey a generated session key
57
+ * @param {string} sValue the value to persist
58
+ * @param {string} sAppName the application name (ui5 component name)
59
+ * @param {string} sComponent a 24-character support component string
60
+ * @returns {Promise} resolves once saved
69
61
  * @private
70
62
  */
71
- AppStateAdapter.prototype.saveAppState = function (sKey, sSessionKey,
72
- sValue, sAppName, sComponent) {
73
- const oDeferred = new jQuery.Deferred();
74
- const sRelativeUrl = "GlobalContainers";
75
- const oPayload = {
76
- id: sKey,
77
- sessionKey: sSessionKey,
78
- component: sComponent,
79
- appName: sAppName,
80
- value: sValue
81
- };
63
+ AppStateAdapter.prototype.saveAppState = function (sKey, sSessionKey, sValue, sAppName, sComponent) {
64
+ return new Promise((resolve, reject) => {
65
+ const sRelativeUrl = "GlobalContainers";
66
+ const oPayload = {
67
+ id: sKey,
68
+ sessionKey: sSessionKey,
69
+ component: sComponent,
70
+ appName: sAppName,
71
+ value: sValue
72
+ };
82
73
 
83
- this._oWrapper.create(sRelativeUrl, oPayload, (/* response */) => {
84
- oDeferred.resolve();
85
- }, (sErrorMessage) => {
86
- Log.error(`AppState save failed: ${sErrorMessage}`);
87
- oDeferred.reject(new Error(sErrorMessage));
74
+ this._oWrapper.create(sRelativeUrl, oPayload, () => {
75
+ resolve();
76
+ }, (sErrorMessage) => {
77
+ Log.error(`AppState save failed: ${sErrorMessage}`);
78
+ reject(new Error(sErrorMessage));
79
+ });
88
80
  });
89
-
90
- return oDeferred.promise();
91
81
  };
92
82
 
93
83
  /**
94
- * Read the application state sValue for the given key sKey from the persistence layer
84
+ * Reads the application state for the given key from the persistence layer.
85
+ * Resolves with [sKey, sValue].
95
86
  *
96
- * @param {string} sKey Key of the application state (less than 40 characters)
97
- * @returns {jQuery.Promise} Resolves the key and value.
87
+ * @param {string} sKey key of the application state (less than 40 characters)
88
+ * @returns {Promise<Array>} resolves with [sKey, sValue]
98
89
  * @private
99
90
  */
100
91
  AppStateAdapter.prototype.loadAppState = function (sKey) {
101
- const oDeferredRead = new jQuery.Deferred();
102
- const sRelativeUrl = `GlobalContainers(id='${encodeURIComponent(sKey)}')`;
103
-
104
92
  if (!sKey) {
105
93
  throw new LogError("The sKey is mandatory to read the data from the persistence layer");
106
94
  }
107
95
 
108
- // wrap the read operation into a batch request
109
- // reason: Hiding of the application state key as part of the URL
110
- this._oWrapper.openBatchQueue();
111
- this._oWrapper.read(sRelativeUrl, (response) => {
112
- oDeferredRead.resolve(response.id, response.value);
113
- }, (sErrorMessage) => {
114
- Log.error(`AppState load failed: ${sErrorMessage}`);
115
- oDeferredRead.reject(new Error(sErrorMessage));
116
- }, false);
117
- this._oWrapper.submitBatchQueue(() => { }, (sErrorMessage) => {
118
- Log.error(`AppState load failed: ${sErrorMessage}`);
119
- oDeferredRead.reject(new Error(sErrorMessage));
120
- });
96
+ return new Promise((resolve, reject) => {
97
+ const sRelativeUrl = `GlobalContainers(id='${encodeURIComponent(sKey)}')`;
121
98
 
122
- return oDeferredRead.promise();
99
+ // wrap the read operation into a batch request
100
+ // reason: Hiding of the application state key as part of the URL
101
+ this._oWrapper.openBatchQueue();
102
+ this._oWrapper.read(sRelativeUrl, (response) => {
103
+ resolve([response.id, response.value]);
104
+ }, (sErrorMessage) => {
105
+ Log.error(`AppState load failed: ${sErrorMessage}`);
106
+ reject(new Error(sErrorMessage));
107
+ }, false);
108
+ this._oWrapper.submitBatchQueue(() => { }, (sErrorMessage) => {
109
+ Log.error(`AppState load failed: ${sErrorMessage}`);
110
+ reject(new Error(sErrorMessage));
111
+ });
112
+ });
123
113
  };
124
114
 
125
115
  return AppStateAdapter;
@@ -9,12 +9,13 @@
9
9
  * <li>provide the resolveHashFragmentFallback function, a fallback method called by ClientSideTargetResolution service.</li>
10
10
  * </ul>
11
11
  *
12
- * @version 1.151.1
12
+ * @version 1.153.0
13
13
  */
14
14
  sap.ui.define([
15
15
  "sap/base/util/ObjectPath",
16
16
  "sap/base/util/isPlainObject",
17
17
  "sap/base/util/deepExtend",
18
+ "sap/ushell/base/promisify",
18
19
  "sap/ushell/base/SAPBusinessClientEnablement",
19
20
  "sap/ushell/base/UrlParsing",
20
21
  "sap/ushell/utils",
@@ -28,6 +29,7 @@ sap.ui.define([
28
29
  ObjectPath,
29
30
  isPlainObject,
30
31
  deepExtend,
32
+ promisify,
31
33
  SAPBusinessClientEnablement,
32
34
  UrlParsing,
33
35
  ushellUtils,
@@ -1292,29 +1294,22 @@ sap.ui.define([
1292
1294
  });
1293
1295
  };
1294
1296
 
1295
- ClientSideTargetResolutionAdapter.prototype._compactUrl = function (sUrl) {
1297
+ ClientSideTargetResolutionAdapter.prototype._compactUrl = async function (sUrl) {
1296
1298
  const aMatches = sUrl.match(/\?.*/);
1297
1299
  const sMatch = aMatches && aMatches[0];
1298
1300
  const iLengthLimit = this._getWDAUrlShorteningLengthLimit() - 200;
1299
1301
 
1300
- return new Promise((fnResolve, fnReject) => {
1301
- if (sMatch && sMatch.length < iLengthLimit) {
1302
- return fnResolve(sUrl);
1303
- }
1302
+ if (sMatch && sMatch.length < iLengthLimit) {
1303
+ return sUrl;
1304
+ }
1304
1305
 
1305
- const oParams = UrlParsing.parseParameters(aMatches[0]);
1306
+ const oParams = UrlParsing.parseParameters(aMatches[0]);
1306
1307
 
1307
- Container.getServiceAsync("ShellNavigationInternal")
1308
- .then((oShellNavigationInternal) => {
1309
- oShellNavigationInternal.compactParams(oParams, aNotCompactedWDAParameters, undefined /* no Component */)
1310
- .done((oCompactedParams) => {
1311
- const sReconstructedUrl = `${sUrl.match(/^[^?]*/)[0]}?${UrlParsing.paramsToString(oCompactedParams)}`;
1312
- fnResolve(sReconstructedUrl);
1313
- })
1314
- .fail(fnReject);
1315
- })
1316
- .catch(fnReject);
1317
- });
1308
+ const oShellNavigationInternal = await Container.getServiceAsync("ShellNavigationInternal");
1309
+ const oCompactedParams = await promisify(oShellNavigationInternal.compactParams(oParams, aNotCompactedWDAParameters, undefined /* no Component */));
1310
+
1311
+ const sReconstructedUrl = `${sUrl.match(/^[^?]*/)[0]}?${UrlParsing.paramsToString(oCompactedParams)}`;
1312
+ return sReconstructedUrl;
1318
1313
  };
1319
1314
 
1320
1315
  ClientSideTargetResolutionAdapter.prototype._getWDAUrlShorteningLengthLimit = function () {
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's CommonDataModelAdapter for the ABAP platform, it is used to avoid 404 when no adapter is found
4
4
  *
5
- * @version 1.151.1
5
+ * @version 1.153.0
6
6
  */
7
7
  sap.ui.define([
8
8
  ], () => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The ConfigurationDefaults adapter for the ABAP platform.
5
- * @version 1.151.1
5
+ * @version 1.153.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ushell_abap/bootstrap/abapConstants",
@@ -2,10 +2,9 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's container adapter for the ABAP platform.
4
4
  *
5
- * @version 1.151.1
5
+ * @version 1.153.0
6
6
  */
7
7
  sap.ui.define([
8
- "sap/ui/thirdparty/jquery",
9
8
  "sap/ushell/base/SAPBusinessClientEnablement",
10
9
  "sap/ushell/System",
11
10
  "sap/ushell/User",
@@ -20,7 +19,6 @@ sap.ui.define([
20
19
  "sap/ushell/Config",
21
20
  "sap/ushell/Container"
22
21
  ], (
23
- jQuery,
24
22
  SAPBusinessClientEnablement,
25
23
  System,
26
24
  User,
@@ -318,12 +316,11 @@ sap.ui.define([
318
316
  /**
319
317
  * Does the bootstrap for the ABAP platform (and loads the container's configuration).
320
318
  *
321
- * @returns {jQuery.Promise} Resolves once the bootstrap is done.
319
+ * @returns {Promise} Resolves once the bootstrap is done.
322
320
  *
323
321
  * @since 1.11.0
324
322
  */
325
- this.load = function () {
326
- const oDeferred = new jQuery.Deferred();
323
+ this.load = async function () {
327
324
  const oStartupResult = oProperties.config;
328
325
  const oSystemProperties = oStartupResult.systemProperties;
329
326
 
@@ -372,48 +369,41 @@ sap.ui.define([
372
369
 
373
370
  // TODO: remove this from startup sequence
374
371
  this._setUserImage(oUser);
375
-
376
- return oDeferred.resolve().promise();
377
372
  };
378
373
 
379
374
  /**
380
375
  * Add further remote systems to be logged out
381
376
  *
382
- * @returns {jQuery.Promise} Resolved after further remote systems are added in to local storage
377
+ * @returns {Promise} Resolved after further remote systems are added in to local storage
383
378
  * @since 1.19.0
384
379
  */
385
- this.addFurtherRemoteSystems = function () {
386
- const oDeferred = new jQuery.Deferred();
387
-
388
- Container.getServiceAsync("PageBuilding")
389
- .then((PageBuildingService) => {
390
- PageBuildingService
391
- .getFactory()
392
- .getPageBuildingService()
393
- .readAllCatalogsForUser("type eq 'H' or type eq 'REMOTE'", (oData) => { // success handler
394
- const sSocialMediaUrl = "/sap/opu/odata/sap/SM_CATALOG_SRV/";
395
- if (oData.results) {
396
- oData.results.forEach((oCatalog) => {
397
- const bIsHANAUrl = /^\/sap\/hba\//.test(oCatalog.baseUrl);
398
- if (oCatalog.type === "H" || oCatalog.baseUrl === sSocialMediaUrl || bIsHANAUrl) {
399
- Container.addRemoteSystem(new System({
400
- alias: oCatalog.systemAlias,
401
- platform: (bIsHANAUrl || oCatalog.type === "H")
402
- ? "hana" : "abap",
403
- baseUrl: oCatalog.type === "H" ? "" : ";o="
404
- }));
405
- }
406
- });
407
- }
408
- oDeferred.resolve();
409
- }, (sErrorMessage) => { // error handler
410
- Log.error("Reading REMOTE catalogs failed:", sErrorMessage, "sap.ushell_abap.adapters.abap.ContainerAdapter");
411
- oDeferred.reject(new Error(sErrorMessage));
412
- });
413
- })
414
- .catch(oDeferred.reject);
415
-
416
- return oDeferred.promise();
380
+ this.addFurtherRemoteSystems = async function () {
381
+ const PageBuildingService = await Container.getServiceAsync("PageBuilding");
382
+ await new Promise((resolve, reject) => {
383
+ PageBuildingService
384
+ .getFactory()
385
+ .getPageBuildingService()
386
+ .readAllCatalogsForUser("type eq 'H' or type eq 'REMOTE'", (oData) => { // success handler
387
+ const sSocialMediaUrl = "/sap/opu/odata/sap/SM_CATALOG_SRV/";
388
+ if (oData.results) {
389
+ oData.results.forEach((oCatalog) => {
390
+ const bIsHANAUrl = /^\/sap\/hba\//.test(oCatalog.baseUrl);
391
+ if (oCatalog.type === "H" || oCatalog.baseUrl === sSocialMediaUrl || bIsHANAUrl) {
392
+ Container.addRemoteSystem(new System({
393
+ alias: oCatalog.systemAlias,
394
+ platform: (bIsHANAUrl || oCatalog.type === "H")
395
+ ? "hana" : "abap",
396
+ baseUrl: oCatalog.type === "H" ? "" : ";o="
397
+ }));
398
+ }
399
+ });
400
+ }
401
+ resolve();
402
+ }, (sErrorMessage) => { // error handler
403
+ Log.error("Reading REMOTE catalogs failed:", sErrorMessage, "sap.ushell_abap.adapters.abap.ContainerAdapter");
404
+ reject(new Error(sErrorMessage));
405
+ });
406
+ });
417
407
  };
418
408
 
419
409
  /**