@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
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview PagePersistenceAdapter for the ABAP platform.
|
|
5
|
-
* @version 1.
|
|
5
|
+
* @version 1.153.0
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/i18n/Localization",
|
|
9
9
|
"sap/base/util/ObjectPath",
|
|
10
|
+
"sap/ui/core/Lib",
|
|
10
11
|
"sap/ushell/utils/HttpClient",
|
|
11
|
-
"sap/ushell/resources",
|
|
12
12
|
"sap/ushell/utils/chipsUtils",
|
|
13
13
|
"sap/ushell/Container",
|
|
14
14
|
"sap/ushell/Config",
|
|
@@ -16,8 +16,8 @@ sap.ui.define([
|
|
|
16
16
|
], (
|
|
17
17
|
Localization,
|
|
18
18
|
ObjectPath,
|
|
19
|
+
Lib,
|
|
19
20
|
HttpClient,
|
|
20
|
-
ushellResources,
|
|
21
21
|
chipsUtils,
|
|
22
22
|
Container,
|
|
23
23
|
Config,
|
|
@@ -401,7 +401,7 @@ sap.ui.define([
|
|
|
401
401
|
oError.message,
|
|
402
402
|
{
|
|
403
403
|
component: this.S_COMPONENT_NAME,
|
|
404
|
-
description:
|
|
404
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("PagePersistenceAdapter.CannotLoadPage"),
|
|
405
405
|
detail: oError
|
|
406
406
|
},
|
|
407
407
|
oError
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
sap.ui.define([
|
|
4
|
-
"sap/
|
|
4
|
+
"sap/base/i18n/date/CalendarWeekNumbering",
|
|
5
|
+
"sap/base/Log",
|
|
6
|
+
"sap/ui/core/Lib",
|
|
5
7
|
"sap/ui/thirdparty/datajs",
|
|
6
|
-
"sap/ui/thirdparty/jquery",
|
|
7
8
|
"sap/ui/VersionInfo",
|
|
8
|
-
"sap/base/Log",
|
|
9
|
-
"sap/ushell/resources",
|
|
10
|
-
"sap/base/i18n/date/CalendarWeekNumbering",
|
|
11
9
|
"sap/ushell/Config",
|
|
12
|
-
"sap/ushell/utils/LaunchpadError"
|
|
10
|
+
"sap/ushell/utils/LaunchpadError",
|
|
11
|
+
"sap/ushell_abap/pbServices/ui2/ODataWrapper"
|
|
13
12
|
], (
|
|
14
|
-
|
|
13
|
+
CalendarWeekNumbering,
|
|
14
|
+
Log,
|
|
15
|
+
Lib,
|
|
15
16
|
datajs,
|
|
16
|
-
jQuery,
|
|
17
17
|
VersionInfo,
|
|
18
|
-
Log,
|
|
19
|
-
resources,
|
|
20
|
-
CalendarWeekNumbering,
|
|
21
18
|
Config,
|
|
22
|
-
LaunchpadError
|
|
19
|
+
LaunchpadError,
|
|
20
|
+
ODataWrapper
|
|
23
21
|
) => {
|
|
24
22
|
"use strict";
|
|
25
23
|
|
|
@@ -81,45 +79,42 @@ sap.ui.define([
|
|
|
81
79
|
return {
|
|
82
80
|
themes: aThemes,
|
|
83
81
|
sets: aThemeSets,
|
|
84
|
-
themeRoot: sThemeRoot //
|
|
82
|
+
themeRoot: sThemeRoot // needed for calculate avatar urls
|
|
85
83
|
};
|
|
86
84
|
};
|
|
87
85
|
|
|
88
86
|
/**
|
|
89
87
|
* Returns the list of themes available for the user.
|
|
90
88
|
*
|
|
91
|
-
* @returns {
|
|
89
|
+
* @returns {Promise} Resolves the theme list.
|
|
92
90
|
*/
|
|
93
|
-
this.getThemeList = function () {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
Log.error(oError.message, oError, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
106
|
-
// fallback to the previous implementation via /UI2/INTEROP
|
|
91
|
+
this.getThemeList = async function () {
|
|
92
|
+
try {
|
|
93
|
+
const oThemeList = await this._getThemeList();
|
|
94
|
+
return {
|
|
95
|
+
options: oThemeList.themes, // rename for compatibility with previous implementation
|
|
96
|
+
sets: oThemeList.sets,
|
|
97
|
+
themeRoot: oThemeList.themeRoot
|
|
98
|
+
};
|
|
99
|
+
} catch (oError) {
|
|
100
|
+
Log.error(oError.message, oError, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
101
|
+
// fallback to the previous implementation via /UI2/INTEROP
|
|
102
|
+
return new Promise((resolve, reject) => {
|
|
107
103
|
datajs.read({requestUri: "/sap/opu/odata/UI2/INTEROP/Themes"},
|
|
108
104
|
(oData) => { // success
|
|
109
|
-
|
|
105
|
+
resolve({
|
|
110
106
|
options: oData?.results || []
|
|
111
107
|
});
|
|
112
108
|
},
|
|
113
109
|
(oDataJsError) => { // fail
|
|
114
110
|
Log.error(oDataJsError.message, null, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
115
|
-
const
|
|
111
|
+
const oFallbackError = new LaunchpadError(`Failed to fetch data: ${oDataJsError.message}`, {
|
|
116
112
|
dataJsError: oDataJsError
|
|
117
113
|
});
|
|
118
|
-
|
|
114
|
+
reject(oFallbackError);
|
|
119
115
|
});
|
|
120
116
|
});
|
|
121
|
-
|
|
122
|
-
return oDeferred.promise();
|
|
117
|
+
}
|
|
123
118
|
};
|
|
124
119
|
|
|
125
120
|
/**
|
|
@@ -130,62 +125,61 @@ sap.ui.define([
|
|
|
130
125
|
this.getCalendarWeekNumberingList = function () {
|
|
131
126
|
return [{
|
|
132
127
|
value: CalendarWeekNumbering.Default,
|
|
133
|
-
title:
|
|
134
|
-
description:
|
|
128
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("DefaultWeekNumberingTitle"),
|
|
129
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("DefaultWeekNumberingText")
|
|
135
130
|
}, {
|
|
136
131
|
value: CalendarWeekNumbering.ISO_8601,
|
|
137
|
-
title:
|
|
138
|
-
description:
|
|
132
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("ISO_8601WeekNumberingTitle"),
|
|
133
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("ISO_8601WeekNumberingText")
|
|
139
134
|
}, {
|
|
140
135
|
value: CalendarWeekNumbering.MiddleEastern,
|
|
141
|
-
title:
|
|
142
|
-
description:
|
|
136
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("MiddleEasternWeekNumberingTitle"),
|
|
137
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("MiddleEasternWeekNumberingText")
|
|
143
138
|
}, {
|
|
144
139
|
value: CalendarWeekNumbering.WesternTraditional,
|
|
145
|
-
title:
|
|
146
|
-
description:
|
|
140
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("WesternTraditionalWeekNumberingTitle"),
|
|
141
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("WesternTraditionalWeekNumberingText")
|
|
147
142
|
}];
|
|
148
143
|
};
|
|
149
144
|
|
|
150
145
|
/**
|
|
151
146
|
* Returns the list of available language for the user.
|
|
152
147
|
*
|
|
153
|
-
* @returns {
|
|
148
|
+
* @returns {Promise} Resolves the list of languages.
|
|
154
149
|
*/
|
|
155
150
|
this.getLanguageList = function () {
|
|
156
|
-
const oDeferred = new jQuery.Deferred();
|
|
157
151
|
const sUri = encodeURI("/sap/opu/odata/UI2/INTEROP/UserProfilePropertyValues?$filter=id eq 'PREFERRED_LOGON_LANGUAGE'");
|
|
158
152
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
153
|
+
return new Promise((resolve, reject) => {
|
|
154
|
+
// read semantic objects from interop service
|
|
155
|
+
datajs.read({ requestUri: sUri },
|
|
156
|
+
// success
|
|
157
|
+
(oData) => {
|
|
158
|
+
let aResult = [{
|
|
159
|
+
text: Lib.getResourceBundleFor("sap.ushell").getText("userSettings.browserLanguage"),
|
|
160
|
+
key: DEFAULT_LANGUAGE_KEY
|
|
161
|
+
}];
|
|
162
|
+
const aLanguageListFromServer = oData.results.map((oLanguage) => {
|
|
163
|
+
return {
|
|
164
|
+
text: oLanguage.description,
|
|
165
|
+
key: oLanguage.value
|
|
166
|
+
};
|
|
167
|
+
}).sort((oLanguage1, oLanguage2) => {
|
|
168
|
+
return oLanguage1.text.localeCompare(oLanguage2.text);
|
|
169
|
+
});
|
|
175
170
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
171
|
+
aResult = aResult.concat(aLanguageListFromServer);
|
|
172
|
+
resolve(aResult);
|
|
173
|
+
},
|
|
174
|
+
// fail
|
|
175
|
+
(oDataJsError) => {
|
|
176
|
+
Log.error(oDataJsError.message, null, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
177
|
+
const oError = new LaunchpadError(`Failed to fetch data: ${oDataJsError.message}`, {
|
|
178
|
+
dataJsError: oDataJsError
|
|
179
|
+
});
|
|
180
|
+
reject(oError);
|
|
184
181
|
});
|
|
185
|
-
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
return oDeferred.promise();
|
|
182
|
+
});
|
|
189
183
|
};
|
|
190
184
|
|
|
191
185
|
/**
|
|
@@ -197,7 +191,7 @@ sap.ui.define([
|
|
|
197
191
|
* This is also the indicator that this user profile property cannot be changed via
|
|
198
192
|
* a call to <code>updateUserPreferences</code>.
|
|
199
193
|
*
|
|
200
|
-
* @returns {
|
|
194
|
+
* @returns {Promise} Resolves an object with the received results, .e.g.:
|
|
201
195
|
* <pre>
|
|
202
196
|
* {
|
|
203
197
|
* "NUMBER_FORMAT": [
|
|
@@ -214,7 +208,6 @@ sap.ui.define([
|
|
|
214
208
|
* @private
|
|
215
209
|
*/
|
|
216
210
|
this.getUserProfilePropertyValueLists = function () {
|
|
217
|
-
const oDeferred = new jQuery.Deferred();
|
|
218
211
|
let sUri;
|
|
219
212
|
const oResult = {};
|
|
220
213
|
const aUserProfilePropertyIds = [
|
|
@@ -226,6 +219,7 @@ sap.ui.define([
|
|
|
226
219
|
];
|
|
227
220
|
|
|
228
221
|
const oODataWrapper = this._createWrapper("/sap/opu/odata/UI2/INTEROP/");
|
|
222
|
+
|
|
229
223
|
oODataWrapper.openBatchQueue();
|
|
230
224
|
let sCurrentId;
|
|
231
225
|
|
|
@@ -245,19 +239,19 @@ sap.ui.define([
|
|
|
245
239
|
);
|
|
246
240
|
}
|
|
247
241
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
242
|
+
return new Promise((resolve, reject) => {
|
|
243
|
+
oODataWrapper.submitBatchQueue(
|
|
244
|
+
// success
|
|
245
|
+
() => {
|
|
246
|
+
resolve(oResult);
|
|
247
|
+
},
|
|
248
|
+
// error
|
|
249
|
+
(sErrorMessage) => {
|
|
250
|
+
Log.error(sErrorMessage, null, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
251
|
+
reject(new Error(sErrorMessage));
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
});
|
|
261
255
|
};
|
|
262
256
|
|
|
263
257
|
this._createWrapper = function (sBaseUrl) {
|
|
@@ -269,24 +263,14 @@ sap.ui.define([
|
|
|
269
263
|
*
|
|
270
264
|
* @param {object} oUser User object
|
|
271
265
|
*
|
|
272
|
-
* @returns {
|
|
266
|
+
* @returns {Promise} Resolves once the preferences were updated.
|
|
273
267
|
*/
|
|
274
268
|
this.updateUserPreferences = function (oUser) {
|
|
275
269
|
Log.debug("[000] updateUserPreferences", "UserInfoAdapter");
|
|
276
|
-
const that = this;
|
|
277
270
|
let sRelativeUrl;
|
|
278
271
|
let iODataRequestsRunning;
|
|
279
272
|
let oDataObj;
|
|
280
|
-
|
|
281
|
-
function fnSuccess () {
|
|
282
|
-
iODataRequestsRunning -= 1;
|
|
283
|
-
if (iODataRequestsRunning === 0) {
|
|
284
|
-
oDeferred.resolve();
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
function fnFailure (sErrorMessage, oParsedErrorInformation) {
|
|
288
|
-
oDeferred.reject(new Error(sErrorMessage), oParsedErrorInformation);
|
|
289
|
-
}
|
|
273
|
+
|
|
290
274
|
Log.debug("[000] updateUserPreferences: _createWrapper", "UserInfoAdapter");
|
|
291
275
|
oDataWrapper = this._createWrapper("/sap/opu/odata/UI2/INTEROP/");
|
|
292
276
|
|
|
@@ -294,44 +278,54 @@ sap.ui.define([
|
|
|
294
278
|
Log.debug("[000] updateUserPreferences: oDataWrapper.openBatchQueue", "UserInfoAdapter");
|
|
295
279
|
oDataWrapper.openBatchQueue();
|
|
296
280
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
let newValue = oUserChangedProperty.newValue;
|
|
304
|
-
if (name.toUpperCase() === "LANGUAGE") {
|
|
305
|
-
name = "PREFERRED_LOGON_LANGUAGE";
|
|
306
|
-
newValue = newValue === DEFAULT_LANGUAGE_KEY ? undefined : newValue;
|
|
281
|
+
return new Promise((resolve, reject) => {
|
|
282
|
+
function fnSuccess () {
|
|
283
|
+
iODataRequestsRunning -= 1;
|
|
284
|
+
if (iODataRequestsRunning === 0) {
|
|
285
|
+
resolve();
|
|
286
|
+
}
|
|
307
287
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
"shellType='FLP')"
|
|
311
|
-
].join(",")}`;
|
|
312
|
-
|
|
313
|
-
// the preference to update
|
|
314
|
-
oDataObj = {
|
|
315
|
-
id: name,
|
|
316
|
-
shellType: "FLP",
|
|
317
|
-
value: newValue
|
|
318
|
-
};
|
|
319
|
-
// check for the datatype of the value & process oDataObj
|
|
320
|
-
that._updateODataObjectBasedOnDatatype(newValue, oDataObj);
|
|
321
|
-
Log.debug("[000] updateUserPreferences: oDataWrapper: put", "UserInfoAdapter");
|
|
322
|
-
oDataWrapper.put(sRelativeUrl, oDataObj, fnSuccess, fnFailure);
|
|
323
|
-
});
|
|
324
|
-
Log.debug("[000] updateUserPreferences: submitBatchQueue", "UserInfoAdapter");
|
|
325
|
-
// submit
|
|
326
|
-
oDataWrapper.submitBatchQueue(() => {
|
|
327
|
-
// request accepted but does not mean that the single requests
|
|
328
|
-
// have been successfully resolved - see above
|
|
329
|
-
if (iODataRequestsRunning === 0) {
|
|
330
|
-
oDeferred.resolve();
|
|
288
|
+
function fnFailure (sErrorMessage) {
|
|
289
|
+
reject(new Error(sErrorMessage));
|
|
331
290
|
}
|
|
332
|
-
}, fnFailure);
|
|
333
291
|
|
|
334
|
-
|
|
292
|
+
// put the preferences to update in the OData batch queue
|
|
293
|
+
const aUserChangedProperties = oUser.getChangedProperties() || [];
|
|
294
|
+
Log.debug("[000] updateUserPreferences: getChangedProperties", "UserInfoAdapter");
|
|
295
|
+
iODataRequestsRunning = aUserChangedProperties.length;
|
|
296
|
+
aUserChangedProperties.forEach((oUserChangedProperty) => {
|
|
297
|
+
let name = oUserChangedProperty.name;
|
|
298
|
+
let newValue = oUserChangedProperty.newValue;
|
|
299
|
+
if (name.toUpperCase() === "LANGUAGE") {
|
|
300
|
+
name = "PREFERRED_LOGON_LANGUAGE";
|
|
301
|
+
newValue = newValue === DEFAULT_LANGUAGE_KEY ? undefined : newValue;
|
|
302
|
+
}
|
|
303
|
+
sRelativeUrl = `UserProfileProperties(${[
|
|
304
|
+
`id='${name}'`,
|
|
305
|
+
"shellType='FLP')"
|
|
306
|
+
].join(",")}`;
|
|
307
|
+
|
|
308
|
+
// the preference to update
|
|
309
|
+
oDataObj = {
|
|
310
|
+
id: name,
|
|
311
|
+
shellType: "FLP",
|
|
312
|
+
value: newValue
|
|
313
|
+
};
|
|
314
|
+
// check for the datatype of the value & process oDataObj
|
|
315
|
+
this._updateODataObjectBasedOnDatatype(newValue, oDataObj);
|
|
316
|
+
Log.debug("[000] updateUserPreferences: oDataWrapper: put", "UserInfoAdapter");
|
|
317
|
+
oDataWrapper.put(sRelativeUrl, oDataObj, fnSuccess, fnFailure);
|
|
318
|
+
});
|
|
319
|
+
Log.debug("[000] updateUserPreferences: submitBatchQueue", "UserInfoAdapter");
|
|
320
|
+
// submit
|
|
321
|
+
oDataWrapper.submitBatchQueue(() => {
|
|
322
|
+
// request accepted but does not mean that the single requests
|
|
323
|
+
// have been successfully resolved - see above
|
|
324
|
+
if (iODataRequestsRunning === 0) {
|
|
325
|
+
resolve();
|
|
326
|
+
}
|
|
327
|
+
}, fnFailure);
|
|
328
|
+
});
|
|
335
329
|
};
|
|
336
330
|
};
|
|
337
331
|
});
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview The Unified Shell's container adapter for the HANA platform.
|
|
5
5
|
*
|
|
6
|
-
* @version 1.
|
|
6
|
+
* @version 1.153.0
|
|
7
7
|
*/
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/thirdparty/jquery",
|
|
10
|
-
"sap/base/Log"
|
|
10
|
+
"sap/base/Log",
|
|
11
|
+
"sap/ushell/base/promisify"
|
|
11
12
|
], (
|
|
12
13
|
jQuery,
|
|
13
|
-
Log
|
|
14
|
+
Log,
|
|
15
|
+
promisify
|
|
14
16
|
) => {
|
|
15
17
|
"use strict";
|
|
16
18
|
|
|
@@ -72,45 +74,37 @@ sap.ui.define([
|
|
|
72
74
|
/**
|
|
73
75
|
* Logs out the current user from this adapter's systems backend system.
|
|
74
76
|
*
|
|
75
|
-
* @returns {
|
|
77
|
+
* @returns {Promise} Resolved when logout is finished, even when it failed
|
|
76
78
|
* @since 1.11.0
|
|
77
79
|
*/
|
|
78
|
-
this.logout = function () {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
jQuery.ajax({
|
|
80
|
+
this.logout = async function () {
|
|
81
|
+
try {
|
|
82
|
+
const [, , oXhr] = await promisify(jQuery.ajax({
|
|
83
|
+
type: "HEAD",
|
|
84
|
+
url: oSystem.adjustUrl("/sap/hana/xs/formLogin/token.xsjs"),
|
|
85
|
+
headers: {
|
|
86
|
+
"X-CSRF-Token": "Fetch"
|
|
87
|
+
}
|
|
88
|
+
}), /* bWrapDeferredResult */ true);
|
|
89
|
+
try {
|
|
90
|
+
await promisify(jQuery.ajax({
|
|
89
91
|
type: "POST",
|
|
90
92
|
url: oSystem.adjustUrl("/sap/hana/xs/formLogin/logout.xscfunc"),
|
|
91
93
|
headers: {
|
|
92
94
|
"X-CSRF-Token": oXhr.getResponseHeader("X-CSRF-Token")
|
|
93
|
-
},
|
|
94
|
-
success: function () {
|
|
95
|
-
Log.info(`HANA system logged out: ${oSystem.getAlias()}`,
|
|
96
|
-
null, "sap.ushell_abap.adapters.hana.ContainerAdapter");
|
|
97
|
-
oDeferred.resolve();
|
|
98
|
-
},
|
|
99
|
-
error: function () {
|
|
100
|
-
Log.error(`Logging out HANA system failed: ${
|
|
101
|
-
oSystem.getAlias()}`, null,
|
|
102
|
-
"sap.ushell_abap.adapters.hana.ContainerAdapter");
|
|
103
|
-
oDeferred.resolve();
|
|
104
95
|
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
error: function () {
|
|
108
|
-
Log.error(`Fetching X-CSRF-Token failed: ${oSystem.getAlias()}`,
|
|
96
|
+
}));
|
|
97
|
+
Log.info(`HANA system logged out: ${oSystem.getAlias()}`,
|
|
109
98
|
null, "sap.ushell_abap.adapters.hana.ContainerAdapter");
|
|
110
|
-
|
|
99
|
+
} catch {
|
|
100
|
+
Log.error(`Logging out HANA system failed: ${
|
|
101
|
+
oSystem.getAlias()}`, null,
|
|
102
|
+
"sap.ushell_abap.adapters.hana.ContainerAdapter");
|
|
111
103
|
}
|
|
112
|
-
}
|
|
113
|
-
|
|
104
|
+
} catch {
|
|
105
|
+
Log.error(`Fetching X-CSRF-Token failed: ${oSystem.getAlias()}`,
|
|
106
|
+
null, "sap.ushell_abap.adapters.hana.ContainerAdapter");
|
|
107
|
+
}
|
|
114
108
|
};
|
|
115
109
|
};
|
|
116
110
|
}, true /* bExport */);
|
|
@@ -249,10 +249,11 @@ sap.ui.define([
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
EventHub.once("ShellNavigationInitialized").do(() => {
|
|
252
|
-
|
|
252
|
+
try {
|
|
253
|
+
Container.getRendererInternal(); // fails if not available yet
|
|
253
254
|
Log.info("Direct application start: resolving component waitFor promise immediately (shell renderer already created).");
|
|
254
255
|
oDeferred.resolve();
|
|
255
|
-
}
|
|
256
|
+
} catch {
|
|
256
257
|
// the renderer should be created when the shell navigation is initialized, just to but be robust
|
|
257
258
|
Container.attachRendererCreatedInternal(fnOnRendererCreated);
|
|
258
259
|
}
|
|
@@ -36,8 +36,10 @@ sap.ui.define([
|
|
|
36
36
|
* @private
|
|
37
37
|
*/
|
|
38
38
|
async run () {
|
|
39
|
-
const oRenderer = await Container.createRendererInternal(
|
|
40
|
-
|
|
39
|
+
const oRenderer = await Container.createRendererInternal();
|
|
40
|
+
ShellLayout.applyLayout();
|
|
41
|
+
oRenderer.placeAt(ShellLayout.ShellArea.RendererRootView, "only");
|
|
42
|
+
|
|
41
43
|
const oSystem = Container.getLogonSystem();
|
|
42
44
|
const sCurrentShellMode = StateManager.getShellMode();
|
|
43
45
|
|
|
@@ -6,14 +6,12 @@ sap.ui.define([
|
|
|
6
6
|
"sap/base/util/ObjectPath",
|
|
7
7
|
"sap/ushell/components/pages/controller/PagesAndSpaceId",
|
|
8
8
|
"sap/ushell/Config",
|
|
9
|
-
"sap/ushell/Container"
|
|
10
|
-
"sap/ushell/resources"
|
|
9
|
+
"sap/ushell/Container"
|
|
11
10
|
], (
|
|
12
11
|
ObjectPath,
|
|
13
12
|
PagesAndSpaceId,
|
|
14
13
|
Config,
|
|
15
|
-
Container
|
|
16
|
-
ushellResources
|
|
14
|
+
Container
|
|
17
15
|
) => {
|
|
18
16
|
"use strict";
|
|
19
17
|
|
|
@@ -104,8 +102,6 @@ sap.ui.define([
|
|
|
104
102
|
* @private
|
|
105
103
|
*/
|
|
106
104
|
async #requestPagesContent () {
|
|
107
|
-
await ushellResources.awaitResourceBundle();
|
|
108
|
-
|
|
109
105
|
const pId = PagesAndSpaceId.getPageAndSpaceId(this.getLocationHash());
|
|
110
106
|
const pPagePersistenceService = Container.getServiceAsync("PagePersistence");
|
|
111
107
|
|