@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.
- package/package.json +1 -1
- package/src/main/js/sap/ushell_abap/.library +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +30 -31
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +53 -63
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +13 -18
- package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +31 -41
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +439 -555
- 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 +4 -4
- 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/abap/UserInfoAdapter.js +127 -133
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +27 -33
- package/src/main/js/sap/ushell_abap/bootstrap/DirectAppStart.js +3 -2
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer.js +4 -2
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages.js +2 -6
- package/src/main/js/sap/ushell_abap/bootstrap/PageSetsRequestHandler.js +25 -50
- package/src/main/js/sap/ushell_abap/bootstrap/SAPCompanionConditionSetter.js +1 -3
- package/src/main/js/sap/ushell_abap/bootstrap/XhrLogonEventHandler.js +6 -7
- package/src/main/js/sap/ushell_abap/bootstrap/abapConstants.js +19 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/Component.js +90 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.controller.js +109 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.view.xml +16 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n.properties +17 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/manifest.json +96 -0
- package/src/main/js/sap/ushell_abap/integration/fileshares/NavTargetResolutionFileShareSupport.js +3 -1
- package/src/main/js/sap/ushell_abap/library.js +1 -1
- package/src/main/js/sap/ushell_abap/messagebundle.properties +2 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +69 -43
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +53 -64
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +65 -82
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +12 -15
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +48 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +10 -2
- package/src/main/js/sap/ushell_abap/services/NavigationDataProvider.js +7 -7
- package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +19 -18
- package/src/main/js/sap/ushell_abap/utils/UserPersonalization.js +80 -0
- package/ui5.yaml +2 -4
package/package.json
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
|
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.
|
|
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/
|
|
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
|
-
|
|
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 {
|
|
33
|
-
* @param {
|
|
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
|
-
*
|
|
53
|
+
* Saves the given data for the given key at the persistence layer.
|
|
58
54
|
*
|
|
59
|
-
* @param {string} sKey
|
|
60
|
-
* @param {string} sSessionKey
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @param {string}
|
|
64
|
-
* @
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
*
|
|
84
|
+
* Reads the application state for the given key from the persistence layer.
|
|
85
|
+
* Resolves with [sKey, sValue].
|
|
95
86
|
*
|
|
96
|
-
* @param {string} sKey
|
|
97
|
-
* @returns {
|
|
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
|
-
|
|
109
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
}
|
|
1302
|
+
if (sMatch && sMatch.length < iLengthLimit) {
|
|
1303
|
+
return sUrl;
|
|
1304
|
+
}
|
|
1304
1305
|
|
|
1305
|
-
|
|
1306
|
+
const oParams = UrlParsing.parseParameters(aMatches[0]);
|
|
1306
1307
|
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
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,10 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @fileOverview The Unified Shell's container adapter for the ABAP platform.
|
|
4
4
|
*
|
|
5
|
-
* @version 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 {
|
|
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 {
|
|
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
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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
|
/**
|