@sapui5/sap.ushell_abap 1.127.2 → 1.128.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/AppStateAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +1 -1
- 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 -32
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +1 -1
- 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 +1 -1
- 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 +61 -20
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
- package/src/main/js/sap/ushell_abap/library.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +6 -0
- package/ui5.yaml +9 -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.128.0</version>
|
|
6
6
|
<copyright>Copyright (c) 2009-2023 SAP SE, All Rights Reserved</copyright>
|
|
7
7
|
<documentation>SAP library: sap.ushell_abap</documentation>
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @fileOverview The Unified Shell's container adapter for the ABAP platform.
|
|
4
4
|
*
|
|
5
|
-
* @version 1.
|
|
5
|
+
* @version 1.128.0
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/thirdparty/jquery",
|
|
@@ -53,33 +53,37 @@ sap.ui.define([
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Performs a logout to a remote system by adding a hidden IFRAME pointing to the logout URL.
|
|
56
|
-
* Resolves the
|
|
56
|
+
* Resolves the <code>Promise</code> when the iframe has been loaded
|
|
57
57
|
* (e.g. the logoutURL has been requested and the cookies processed).
|
|
58
58
|
*
|
|
59
|
-
* @param {jQuery.Deferred} oDeferred The deferred object of the logout
|
|
60
59
|
* @param {string} sUrl The logout URL
|
|
60
|
+
* @returns {Promise<undefined>} A <code>Promise</code> that resolves when the iframe has been loaded
|
|
61
|
+
*
|
|
62
|
+
* @private
|
|
61
63
|
*/
|
|
62
|
-
this._logoutViaHiddenIFrame = function (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
this._logoutViaHiddenIFrame = function (sUrl) {
|
|
65
|
+
return new Promise((resolve) => {
|
|
66
|
+
var oFrame = document.createElement("iframe"),
|
|
67
|
+
sSafeUrl = sUrl.replace(/"/g, "\\\"");
|
|
68
|
+
|
|
69
|
+
window.addEventListener("message", function (oEvent) {
|
|
70
|
+
if (oEvent.data === sUrl) {
|
|
71
|
+
resolve();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
oFrame.style.visibility = "hidden";
|
|
76
|
+
oFrame.setAttribute("src", sUrl);
|
|
74
77
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
function onload () {
|
|
79
|
+
parent.postMessage(sSafeUrl, "*");
|
|
80
|
+
}
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
oFrame.addEventListener("load", onload);
|
|
83
|
+
oFrame.addEventListener("error", onload);
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
document.body.appendChild(oFrame);
|
|
86
|
+
});
|
|
83
87
|
};
|
|
84
88
|
|
|
85
89
|
/**
|
|
@@ -373,16 +377,13 @@ sap.ui.define([
|
|
|
373
377
|
/**
|
|
374
378
|
* Logs out the current user from this adapter's systems backend system.
|
|
375
379
|
*
|
|
376
|
-
* @param {boolean} bLogonSystem
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* finished, even when it failed
|
|
380
|
+
* @param {boolean} bLogonSystem <code>true</code> if this system is the logon system
|
|
381
|
+
* @returns {Promise<undefined>} Resolved when logout is finished
|
|
382
|
+
*
|
|
380
383
|
* @since 1.11.0
|
|
384
|
+
* @private
|
|
381
385
|
*/
|
|
382
|
-
this.logout = function (bLogonSystem) {
|
|
383
|
-
var oDeferred = new jQuery.Deferred(),
|
|
384
|
-
sUrl;
|
|
385
|
-
|
|
386
|
+
this.logout = async function (bLogonSystem) {
|
|
386
387
|
if (bLogonSystem) {
|
|
387
388
|
if (utils.hasNativeLogoutCapability()) {
|
|
388
389
|
var sFullLogOffUrl = (new URI(S_LOGOFF_URL))
|
|
@@ -395,17 +396,15 @@ sap.ui.define([
|
|
|
395
396
|
}
|
|
396
397
|
Log.info("ABAP system logged out: " + oSystem.getAlias(), null,
|
|
397
398
|
"sap.ushell_abap.adapters.abap.ContainerAdapter");
|
|
398
|
-
oDeferred.resolve();
|
|
399
399
|
} else {
|
|
400
400
|
// construct fully qualified logoff URL (potentially adds scheme, authority, origin, sap-client)
|
|
401
|
-
sUrl = oSystem.adjustUrl(S_LOGOFF_URL);
|
|
401
|
+
var sUrl = oSystem.adjustUrl(S_LOGOFF_URL);
|
|
402
402
|
|
|
403
403
|
// always logout via hidden iframe; this avoids implicit XHR re-logon in case the
|
|
404
404
|
// logoff URL triggers a redirect (see BCP 0020079747 0000863255 2015)
|
|
405
405
|
Log.info("Logging out from system '" + oSystem.getAlias() + "' via hidden iframe");
|
|
406
|
-
this._logoutViaHiddenIFrame(
|
|
406
|
+
await this._logoutViaHiddenIFrame(sUrl);
|
|
407
407
|
}
|
|
408
|
-
return oDeferred.promise();
|
|
409
408
|
};
|
|
410
409
|
|
|
411
410
|
/**
|
|
@@ -4,6 +4,7 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ushell_abap/pbServices/ui2/ODataWrapper",
|
|
5
5
|
"sap/ui/thirdparty/datajs",
|
|
6
6
|
"sap/ui/thirdparty/jquery",
|
|
7
|
+
"sap/ui/VersionInfo",
|
|
7
8
|
"sap/base/Log",
|
|
8
9
|
"sap/ushell/resources",
|
|
9
10
|
"sap/base/i18n/date/CalendarWeekNumbering"
|
|
@@ -11,6 +12,7 @@ sap.ui.define([
|
|
|
11
12
|
ODataWrapper,
|
|
12
13
|
OData,
|
|
13
14
|
jQuery,
|
|
15
|
+
VersionInfo,
|
|
14
16
|
Log,
|
|
15
17
|
resources,
|
|
16
18
|
CalendarWeekNumbering
|
|
@@ -39,34 +41,73 @@ sap.ui.define([
|
|
|
39
41
|
return oDataObj;
|
|
40
42
|
};
|
|
41
43
|
|
|
44
|
+
// Get list of available themes and theme sets using REST API
|
|
45
|
+
this._getThemeList = async function () {
|
|
46
|
+
let sThemingAPI = "/sap/bc/rest/themes"; // ABAP end point
|
|
47
|
+
|
|
48
|
+
const sClient = window["sap-ushell-config"]?.startupConfig?.client;
|
|
49
|
+
if (sClient) {
|
|
50
|
+
sThemingAPI += "/~client-" + sClient;
|
|
51
|
+
}
|
|
52
|
+
sThemingAPI += "/themelist/v1";
|
|
53
|
+
|
|
54
|
+
const oVersion = await VersionInfo.load();
|
|
55
|
+
const sVersion = oVersion.version;
|
|
56
|
+
if (sVersion) {
|
|
57
|
+
sThemingAPI += "/~v=UI5:" + sVersion;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
sThemingAPI += "?filter-types=STANDARD,SET"; // get all themes and sets
|
|
61
|
+
const oList = await fetch(sThemingAPI);
|
|
62
|
+
if (!oList.ok) {
|
|
63
|
+
throw new Error(`List API failed with status: ${oList.status}`);
|
|
64
|
+
}
|
|
65
|
+
const oListData = await oList.json();
|
|
66
|
+
const aThemes = [];
|
|
67
|
+
const aThemeSets = [];
|
|
68
|
+
oListData.forEach((entry) => {
|
|
69
|
+
if (entry?.type === "STANDARD") {
|
|
70
|
+
entry.name = entry.label; // for compatibility with previous implementation
|
|
71
|
+
aThemes.push(entry);
|
|
72
|
+
} else if (entry?.type === "SET") {
|
|
73
|
+
aThemeSets.push(entry);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
themes: aThemes,
|
|
78
|
+
sets: aThemeSets
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
42
82
|
/**
|
|
43
83
|
* Returns the list of themes available for the user.
|
|
44
84
|
*
|
|
45
85
|
* @returns {jQuery.Promise} Resolves the theme list.
|
|
46
86
|
*/
|
|
47
87
|
this.getThemeList = function () {
|
|
48
|
-
|
|
49
|
-
sUri = "/sap/opu/odata/UI2/INTEROP/Themes";
|
|
88
|
+
const oDeferred = new jQuery.Deferred();
|
|
50
89
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
themes = [];
|
|
57
|
-
|
|
58
|
-
for (i = 0; i < oData.results.length; i = i + 1) {
|
|
59
|
-
themes.push(oData.results[i]);
|
|
60
|
-
}
|
|
61
|
-
oDeferred.resolve({
|
|
62
|
-
options: themes
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
// fail
|
|
66
|
-
function (oError) {
|
|
67
|
-
Log.error(oError.message, null, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
68
|
-
oDeferred.reject(oError.message);
|
|
90
|
+
this._getThemeList()
|
|
91
|
+
.then((oThemeList) => {
|
|
92
|
+
oDeferred.resolve({
|
|
93
|
+
options: oThemeList.themes, // rename for compatibility with previous implementation
|
|
94
|
+
sets: oThemeList.sets
|
|
69
95
|
});
|
|
96
|
+
})
|
|
97
|
+
.catch(function (error) {
|
|
98
|
+
Log.error(error, null, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
99
|
+
// fallback to the previous implementation via /UI2/INTEROP
|
|
100
|
+
OData.read({requestUri: "/sap/opu/odata/UI2/INTEROP/Themes"},
|
|
101
|
+
(oData) => { // success
|
|
102
|
+
oDeferred.resolve({
|
|
103
|
+
options: oData.results || []
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
(oError) => { // fail
|
|
107
|
+
Log.error(oError.message, null, "sap.ushell_abap.adapters.abap.UserInfoAdapter");
|
|
108
|
+
oDeferred.reject(oError.message);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
70
111
|
|
|
71
112
|
return oDeferred.promise();
|
|
72
113
|
};
|
|
@@ -558,6 +558,12 @@
|
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
if (oImplementation.componentName) {
|
|
561
|
+
|
|
562
|
+
// The standard tiles have no manifest. Since we know this and are in control of it we can save the server roundtrip for those.
|
|
563
|
+
if (sBaseChipId === "X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER" || sBaseChipId === "X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER") {
|
|
564
|
+
oData.manifest = false;
|
|
565
|
+
}
|
|
566
|
+
|
|
561
567
|
// SAPUI5 component
|
|
562
568
|
var ComponentContainer = sap.ui.requireSync("sap/ui/core/ComponentContainer"); // LEGACY API (deprecated)
|
|
563
569
|
var oComponentContainer = new ComponentContainer();
|
package/ui5.yaml
CHANGED
|
@@ -64,7 +64,11 @@ builder:
|
|
|
64
64
|
- sap/ushell/Container.js
|
|
65
65
|
- sap/ushell/EventHub.js
|
|
66
66
|
- sap/ushell/resources.js
|
|
67
|
+
- sap/ushell/renderer/History
|
|
68
|
+
- sap/ushell/renderer/utils
|
|
69
|
+
- sap/ushell/renderer/ShellLayout
|
|
67
70
|
- sap/ushell/renderer/search/HashChangeHandler.js
|
|
71
|
+
- sap/ushell/renderers/fiori2/History
|
|
68
72
|
- sap/ushell/System.js
|
|
69
73
|
- sap/ushell/Ui5NativeServiceFactory.js
|
|
70
74
|
- sap/ushell/User.js
|
|
@@ -91,12 +95,12 @@ builder:
|
|
|
91
95
|
- sap/ushell/services/UserInfo.js
|
|
92
96
|
- sap/ushell/services/Ui5ComponentLoader.js
|
|
93
97
|
- sap/ushell/services/Ui5ComponentHandle.js
|
|
94
|
-
- sap/ushell/services/
|
|
98
|
+
- sap/ushell/services/Ui5ComponentLoader/utils.js
|
|
95
99
|
- sap/ushell/Config.js
|
|
96
100
|
- sap/ushell/bootstrap/common/common.create.configcontract.core.js
|
|
97
101
|
- sap/ushell/bootstrap/common/common.debug.mode.js
|
|
98
102
|
- sap/ushell/bootstrap/common/common.constants.js
|
|
99
|
-
- sap/ushell/
|
|
103
|
+
- sap/ushell/Config/utils.js
|
|
100
104
|
- sap/ushell/Fiori20AdapterTest.js
|
|
101
105
|
- sap/ushell/Fiori20Adapter.js
|
|
102
106
|
- sap/ushell/library.js
|
|
@@ -348,7 +352,7 @@ builder:
|
|
|
348
352
|
- sap/ui/thirdparty/jquery-mobile-custom.js
|
|
349
353
|
- sap/ushell/CanvasShapesManager.js
|
|
350
354
|
- sap/ushell/Container.js
|
|
351
|
-
- sap/ushell/
|
|
355
|
+
- sap/ushell/ApplicationType/
|
|
352
356
|
- sap/ushell/Fiori20AdapterTest.js
|
|
353
357
|
- sap/ushell/SessionHandler.js
|
|
354
358
|
- sap/ushell/System.js
|
|
@@ -359,9 +363,10 @@ builder:
|
|
|
359
363
|
- sap/ushell/adapters/local/NavTargetResolutionInternalAdapter.js
|
|
360
364
|
- sap/ushell/adapters/local/UserDefaultParameterPersistenceAdapter.js
|
|
361
365
|
- sap/ushell/adapters/local/UserInfoAdapter.js
|
|
366
|
+
- sap/ushell/api/Inbox.js
|
|
362
367
|
- sap/ushell/api/NewExperience.js
|
|
363
368
|
- sap/ushell/api/RTA.js
|
|
364
|
-
- sap/ushell/bootstrap/
|
|
369
|
+
- sap/ushell/bootstrap/SchedulingAgent/*.json # json files must be explicitly defined
|
|
365
370
|
- sap/ushell/components/ComponentKeysHandler.js
|
|
366
371
|
- sap/ushell/components/container/ApplicationContainer.js
|
|
367
372
|
- sap/ushell/components/pages/controller/PagesAndSpaceId.js
|