@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.
Files changed (24) 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/AppStateAdapter.js +1 -1
  4. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +1 -1
  5. package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
  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 +31 -32
  8. package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +1 -1
  9. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
  10. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
  12. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
  13. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +1 -1
  15. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
  16. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  17. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
  18. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  19. package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +61 -20
  20. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
  21. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
  22. package/src/main/js/sap/ushell_abap/library.js +1 -1
  23. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +6 -0
  24. package/ui5.yaml +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ushell_abap",
3
- "version": "1.127.2",
3
+ "version": "1.128.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.127.2</version>
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
  /**
4
4
  * @fileOverview The Unified Shell's AppStateAdapter for the ABAP platform.
5
- * @version 1.127.2
5
+ * @version 1.128.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.127.2
12
+ * @version 1.128.0
13
13
  */
14
14
  sap.ui.define([
15
15
  "sap/ui/thirdparty/jquery",
@@ -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.127.2
5
+ * @version 1.128.0
6
6
  */
7
7
  sap.ui.define([
8
8
  ], function () {
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The ConfigurationDefaults adapter for the ABAP platform.
5
- * @version 1.127.2
5
+ * @version 1.128.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.127.2
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 Deferred when the iframe has been loaded
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 (oDeferred, sUrl) {
63
- var oFrame = document.createElement("iframe"),
64
- sSafeUrl = sUrl.replace(/"/g, "\\\"");
65
-
66
- window.addEventListener("message", function (oEvent) {
67
- if (oEvent.data === sUrl) {
68
- oDeferred.resolve();
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
- oFrame.style.visibility = "hidden";
73
- oFrame.setAttribute("src", sUrl);
75
+ oFrame.style.visibility = "hidden";
76
+ oFrame.setAttribute("src", sUrl);
74
77
 
75
- function onload () {
76
- parent.postMessage(sSafeUrl, "*");
77
- }
78
+ function onload () {
79
+ parent.postMessage(sSafeUrl, "*");
80
+ }
78
81
 
79
- oFrame.addEventListener("load", onload);
80
- oFrame.addEventListener("error", onload);
82
+ oFrame.addEventListener("load", onload);
83
+ oFrame.addEventListener("error", onload);
81
84
 
82
- document.body.appendChild(oFrame);
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
- * <code>true</code> if this system is the logon system
378
- * @returns {jQuery.Promise} Resolved when logout is
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(oDeferred, sUrl);
406
+ await this._logoutViaHiddenIFrame(sUrl);
407
407
  }
408
- return oDeferred.promise();
409
408
  };
410
409
 
411
410
  /**
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileoverview The Unified Shell's page building adapter for the ABAP platform. Private copy. Classical home page functions are deprecated.
5
5
  * @since 1.121
6
- * @version 1.127.2
6
+ * @version 1.128.0
7
7
  */
8
8
  sap.ui.define([
9
9
  "sap/ui/thirdparty/URI",
@@ -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.127.2
7
+ * @version 1.128.0
8
8
  */
9
9
  sap.ui.define([
10
10
  "sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter"
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the ABAP
9
9
  * platform.
10
10
  *
11
- * @version 1.127.2
11
+ * @version 1.128.0
12
12
  */
13
13
  sap.ui.define([], function () {
14
14
  "use strict";
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the ABAP
9
9
  * platform.
10
10
  *
11
- * @version 1.127.2
11
+ * @version 1.128.0
12
12
  * @since 1.121
13
13
  */
14
14
  sap.ui.define([], function () {
@@ -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.127.2
5
+ * @version 1.128.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.127.2
5
+ * @version 1.128.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/i18n/Localization",
@@ -7,7 +7,7 @@
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.127.2
10
+ * @version 1.128.0
11
11
  */
12
12
  sap.ui.define([
13
13
  "sap/ushell_abap/adapters/abap/AdapterContainer",
@@ -7,7 +7,7 @@
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.127.2
10
+ * @version 1.128.0
11
11
  */
12
12
  sap.ui.define([
13
13
  "./PersonalizationAdapter"
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Search adapter for the ABAP platform.
5
- * @version 1.127.2
5
+ * @version 1.128.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.127.2
5
+ * @version 1.128.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.127.2
5
+ * @version 1.128.0
6
6
  */
7
7
  sap.ui.define([
8
8
  ], function () {
@@ -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
- var oDeferred = new jQuery.Deferred(),
49
- sUri = "/sap/opu/odata/UI2/INTEROP/Themes";
88
+ const oDeferred = new jQuery.Deferred();
50
89
 
51
- // read semantic objects from interop service
52
- OData.read({ requestUri: sUri },
53
- // success
54
- function (oData, oResponse) {
55
- var i,
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
  };
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileOverview The Unified Shell's container adapter for the HANA platform.
5
5
  *
6
- * @version 1.127.2
6
+ * @version 1.128.0
7
7
  */
8
8
  sap.ui.define([
9
9
  "sap/ui/thirdparty/jquery",
@@ -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.127.2
17
+ * @version 1.128.0
18
18
  */
19
19
  sap.ui.define([
20
20
  "./abap.constants",
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  */
23
23
  var ushellAbapLib = Library.init({
24
24
  name: "sap.ushell_abap",
25
- version: "1.127.2",
25
+ version: "1.128.0",
26
26
  dependencies: ["sap.ui.core", "sap.m"],
27
27
  noLibraryCSS: true,
28
28
  extensions: {
@@ -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/_Ui5ComponentLoader/utils.js
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/_Config/utils.js
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/_ApplicationType/
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/_SchedulingAgent/*.json # json files must be explicitly defined
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