@sapui5/sap.ushell_abap 1.152.0 → 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/AppStateAdapter.js +53 -63
- 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 +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +10 -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 +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 +11 -11
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
- 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/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/library.js +1 -1
- package/src/main/js/sap/ushell_abap/messagebundle.properties +2 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +2 -4
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +48 -2
- package/src/main/js/sap/ushell_abap/services/NavigationDataProvider.js +4 -4
- package/src/main/js/sap/ushell_abap/utils/UserPersonalization.js +80 -0
- package/ui5.yaml +1 -1
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
|
|
|
@@ -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;
|
|
@@ -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.
|
|
6
|
+
* @version 1.153.0
|
|
7
7
|
*/
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/thirdparty/URI",
|
|
@@ -2846,6 +2846,15 @@ sap.ui.define([
|
|
|
2846
2846
|
*/
|
|
2847
2847
|
this.getCatalogTilePreviewInfo = chipsUtils.getCatalogTilePreviewInfo;
|
|
2848
2848
|
|
|
2849
|
+
/**
|
|
2850
|
+
* Returns the transaction code (app shortcut) for the catalog tile.
|
|
2851
|
+
*
|
|
2852
|
+
* @param {object} oCatalogTile The catalog tile
|
|
2853
|
+
* @returns {Promise<string>} The transaction code or ""
|
|
2854
|
+
* @since 1.153.0
|
|
2855
|
+
*/
|
|
2856
|
+
this.getCatalogTileAppShortcut = chipsUtils.getCatalogTileTransactionCode;
|
|
2857
|
+
|
|
2849
2858
|
/**
|
|
2850
2859
|
* Returns the indicator data source url
|
|
2851
2860
|
*
|
|
@@ -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
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
sap.ui.define([
|
|
4
4
|
"sap/base/i18n/date/CalendarWeekNumbering",
|
|
5
5
|
"sap/base/Log",
|
|
6
|
+
"sap/ui/core/Lib",
|
|
6
7
|
"sap/ui/thirdparty/datajs",
|
|
7
8
|
"sap/ui/VersionInfo",
|
|
8
9
|
"sap/ushell/Config",
|
|
9
|
-
"sap/ushell/resources",
|
|
10
10
|
"sap/ushell/utils/LaunchpadError",
|
|
11
11
|
"sap/ushell_abap/pbServices/ui2/ODataWrapper"
|
|
12
12
|
], (
|
|
13
13
|
CalendarWeekNumbering,
|
|
14
14
|
Log,
|
|
15
|
+
Lib,
|
|
15
16
|
datajs,
|
|
16
17
|
VersionInfo,
|
|
17
18
|
Config,
|
|
18
|
-
resources,
|
|
19
19
|
LaunchpadError,
|
|
20
20
|
ODataWrapper
|
|
21
21
|
) => {
|
|
@@ -125,20 +125,20 @@ sap.ui.define([
|
|
|
125
125
|
this.getCalendarWeekNumberingList = function () {
|
|
126
126
|
return [{
|
|
127
127
|
value: CalendarWeekNumbering.Default,
|
|
128
|
-
title:
|
|
129
|
-
description:
|
|
128
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("DefaultWeekNumberingTitle"),
|
|
129
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("DefaultWeekNumberingText")
|
|
130
130
|
}, {
|
|
131
131
|
value: CalendarWeekNumbering.ISO_8601,
|
|
132
|
-
title:
|
|
133
|
-
description:
|
|
132
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("ISO_8601WeekNumberingTitle"),
|
|
133
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("ISO_8601WeekNumberingText")
|
|
134
134
|
}, {
|
|
135
135
|
value: CalendarWeekNumbering.MiddleEastern,
|
|
136
|
-
title:
|
|
137
|
-
description:
|
|
136
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("MiddleEasternWeekNumberingTitle"),
|
|
137
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("MiddleEasternWeekNumberingText")
|
|
138
138
|
}, {
|
|
139
139
|
value: CalendarWeekNumbering.WesternTraditional,
|
|
140
|
-
title:
|
|
141
|
-
description:
|
|
140
|
+
title: Lib.getResourceBundleFor("sap.ushell").getText("WesternTraditionalWeekNumberingTitle"),
|
|
141
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("WesternTraditionalWeekNumberingText")
|
|
142
142
|
}];
|
|
143
143
|
};
|
|
144
144
|
|
|
@@ -156,7 +156,7 @@ sap.ui.define([
|
|
|
156
156
|
// success
|
|
157
157
|
(oData) => {
|
|
158
158
|
let aResult = [{
|
|
159
|
-
text:
|
|
159
|
+
text: Lib.getResourceBundleFor("sap.ushell").getText("userSettings.browserLanguage"),
|
|
160
160
|
key: DEFAULT_LANGUAGE_KEY
|
|
161
161
|
}];
|
|
162
162
|
const aLanguageListFromServer = oData.results.map((oLanguage) => {
|
|
@@ -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
|
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
sap.ui.define([
|
|
6
6
|
"sap/base/Log",
|
|
7
7
|
"sap/base/util/ObjectPath",
|
|
8
|
+
"sap/ui/core/Lib",
|
|
8
9
|
"sap/ushell/Config"
|
|
9
10
|
], (
|
|
10
11
|
Log,
|
|
11
12
|
ObjectPath,
|
|
13
|
+
Lib,
|
|
12
14
|
Config
|
|
13
15
|
) => {
|
|
14
16
|
"use strict";
|
|
@@ -220,11 +222,8 @@ sap.ui.define([
|
|
|
220
222
|
const Action = MessageBox.Action;
|
|
221
223
|
const Icon = MessageBox.Icon;
|
|
222
224
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
sTitle = this._getText(oTitleText, ushellResources);
|
|
226
|
-
sMessage = this._getText(oMessageText, ushellResources);
|
|
227
|
-
}
|
|
225
|
+
sTitle = this._getText(oTitleText);
|
|
226
|
+
sMessage = this._getText(oMessageText);
|
|
228
227
|
|
|
229
228
|
// Overwrite sap.ui.core.BusyIndicator.show to not open a busy indicator.
|
|
230
229
|
// In case the MessageBox (to show the error message and to offer the end user to reload the FLP) gets shown, we want
|
|
@@ -262,8 +261,8 @@ sap.ui.define([
|
|
|
262
261
|
*
|
|
263
262
|
* @private
|
|
264
263
|
*/
|
|
265
|
-
XhrLogonEventHandler.prototype._getText = function (oText
|
|
266
|
-
const sText =
|
|
264
|
+
XhrLogonEventHandler.prototype._getText = function (oText) {
|
|
265
|
+
const sText = Lib.getResourceBundleFor("sap.ushell").getText(oText.key);
|
|
267
266
|
|
|
268
267
|
// ui5 resource bundle returns the text key if no text defined we need the fallback,
|
|
269
268
|
// because translations might be missing in lower releases
|
|
@@ -56,6 +56,13 @@ sap.ui.define([
|
|
|
56
56
|
enabled: true
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
settings: {
|
|
60
|
+
customEntries: [{
|
|
61
|
+
name: "sap.ushell_abap.components.settings.TransactionCode",
|
|
62
|
+
url: sap.ui.require.toUrl("sap/ushell_abap/components/settings/TransactionCode"),
|
|
63
|
+
manifest: sap.ui.require.toUrl("sap/ushell_abap/components/settings/TransactionCode/manifest.json")
|
|
64
|
+
}]
|
|
65
|
+
},
|
|
59
66
|
customPreload: getCustomPreloadConfig()
|
|
60
67
|
},
|
|
61
68
|
renderers: {
|
|
@@ -189,6 +196,18 @@ sap.ui.define([
|
|
|
189
196
|
enabled: false
|
|
190
197
|
}
|
|
191
198
|
}
|
|
199
|
+
},
|
|
200
|
+
MessageBroker: {
|
|
201
|
+
config: {
|
|
202
|
+
ClientLoader: {
|
|
203
|
+
enabled: true,
|
|
204
|
+
mappings: {
|
|
205
|
+
"sap.ushell.api.RTA": {
|
|
206
|
+
module: "module:sap/ushell/api/RTA"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
192
211
|
}
|
|
193
212
|
},
|
|
194
213
|
xhrLogon: {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
/**
|
|
3
|
+
* @fileOverview The ABAP platform's transaction code settings entry component.
|
|
4
|
+
*
|
|
5
|
+
* @version 1.153.0
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/UIComponent",
|
|
9
|
+
"sap/ushell_abap/utils/UserPersonalization",
|
|
10
|
+
"sap/ushell/Config"
|
|
11
|
+
], (
|
|
12
|
+
UIComponent,
|
|
13
|
+
UserPersonalization,
|
|
14
|
+
Config
|
|
15
|
+
) => {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @alias sap.ushell_abap.components.settings.TransactionCode.Component
|
|
20
|
+
* @class
|
|
21
|
+
* @classdesc Provides the transaction code entry for the user settings dialog.
|
|
22
|
+
*
|
|
23
|
+
* @extends sap.ui.core.Component
|
|
24
|
+
*
|
|
25
|
+
* @since 1.153.0
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
return UIComponent.extend("sap.ushell_abap.components.settings.TransactionCode.Component", {
|
|
29
|
+
metadata: {
|
|
30
|
+
manifest: "json",
|
|
31
|
+
library: "sap.ushell_abap",
|
|
32
|
+
interfaces: ["sap.ui.core.IAsyncContentCreation"]
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns the transaction code settings entry, or <code>undefined</code> when the
|
|
37
|
+
* administrator has not activated the feature.
|
|
38
|
+
*
|
|
39
|
+
* @returns {Promise<object|undefined>} The settings entry, or undefined when not applicable.
|
|
40
|
+
*
|
|
41
|
+
* @since 1.153.0
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
getEntry: async function () {
|
|
45
|
+
if (!Config.last("/abap/ui/displayTransaction")) {
|
|
46
|
+
await this.destroy();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const oResourceBundle = await this.getModel("i18n").getResourceBundle();
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
id: "transactionCodeSettingsEntry",
|
|
54
|
+
entryHelpID: "transactionCodeSettingsEntry",
|
|
55
|
+
title: oResourceBundle.getText("FlpSettings_transactionCode_sectionTitle"),
|
|
56
|
+
valueResult: null,
|
|
57
|
+
contentResult: null,
|
|
58
|
+
icon: "sap-icon://syntax",
|
|
59
|
+
groupingEnablement: true,
|
|
60
|
+
groupingId: "appearance",
|
|
61
|
+
groupingTabHelpId: "transactionCodeSettingsEntry",
|
|
62
|
+
groupingTabTitle: oResourceBundle.getText("FlpSettings_transactionCode_sectionTitle"),
|
|
63
|
+
valueArgument: async () => {
|
|
64
|
+
const bEnabled = await UserPersonalization.getDisplayTransactionCode();
|
|
65
|
+
return oResourceBundle.getText(bEnabled
|
|
66
|
+
? "FlpSettings_transactionCode_shown"
|
|
67
|
+
: "FlpSettings_transactionCode_hidden");
|
|
68
|
+
},
|
|
69
|
+
contentFunc: async () => {
|
|
70
|
+
return new sap.ui.core.ComponentContainer({
|
|
71
|
+
component: this,
|
|
72
|
+
height: "100%",
|
|
73
|
+
width: "100%",
|
|
74
|
+
async: true
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
onSave: async (fnUpdateUserPreferences) => {
|
|
78
|
+
await this.rootControlLoaded();
|
|
79
|
+
const oView = this.getRootControl();
|
|
80
|
+
return oView.getController().onSave(fnUpdateUserPreferences);
|
|
81
|
+
},
|
|
82
|
+
onCancel: async () => {
|
|
83
|
+
await this.rootControlLoaded();
|
|
84
|
+
const oView = this.getRootControl();
|
|
85
|
+
oView.getController().onCancel();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
/**
|
|
3
|
+
* @fileOverview Controller of the ABAP transaction code user settings entry.
|
|
4
|
+
*
|
|
5
|
+
* @version 1.153.0
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/base/Log",
|
|
9
|
+
"sap/ui/core/message/Message",
|
|
10
|
+
"sap/ui/core/message/MessageType",
|
|
11
|
+
"sap/ui/core/mvc/Controller",
|
|
12
|
+
"sap/ui/model/json/JSONModel",
|
|
13
|
+
"sap/ushell/utils/LaunchpadError",
|
|
14
|
+
"sap/ushell_abap/utils/UserPersonalization"
|
|
15
|
+
], (
|
|
16
|
+
Log,
|
|
17
|
+
Message,
|
|
18
|
+
MessageType,
|
|
19
|
+
Controller,
|
|
20
|
+
JSONModel,
|
|
21
|
+
LaunchpadError,
|
|
22
|
+
UserPersonalization
|
|
23
|
+
) => {
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Controller of the ABAP transaction code user settings entry.
|
|
28
|
+
*
|
|
29
|
+
* @since 1.153.0
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
return Controller.extend("sap.ushell_abap.components.settings.TransactionCode.TransactionCode", {
|
|
33
|
+
onInit: function () {
|
|
34
|
+
const oView = this.getView();
|
|
35
|
+
|
|
36
|
+
const oConfigModel = new JSONModel({
|
|
37
|
+
transactionCodeSelected: false
|
|
38
|
+
});
|
|
39
|
+
oView.setModel(oConfigModel, "config");
|
|
40
|
+
|
|
41
|
+
// The effective setting may read user personalization, so it is resolved asynchronously.
|
|
42
|
+
UserPersonalization.getDisplayTransactionCode().then((bEnabled) => {
|
|
43
|
+
oConfigModel.setProperty("/transactionCodeSelected", bEnabled);
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Resets the toggle to the persisted value.
|
|
49
|
+
*
|
|
50
|
+
* @returns {Promise<undefined>} Resolves once the persisted value was applied.
|
|
51
|
+
*
|
|
52
|
+
* @since 1.153.0
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
onCancel: async function () {
|
|
56
|
+
const oConfigModel = this.getView().getModel("config");
|
|
57
|
+
const bEnabled = await UserPersonalization.getDisplayTransactionCode();
|
|
58
|
+
|
|
59
|
+
oConfigModel.setProperty("/transactionCodeSelected", bEnabled);
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Persists the toggle value.
|
|
64
|
+
*
|
|
65
|
+
* @returns {Promise<object|undefined>} Resolves with <code>{ refresh: true }</code> when the
|
|
66
|
+
* value changed, otherwise with undefined. Rejects with a message on failure.
|
|
67
|
+
*
|
|
68
|
+
* @since 1.153.0
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
onSave: async function () {
|
|
72
|
+
const bOldValue = await UserPersonalization.getDisplayTransactionCode();
|
|
73
|
+
const bCurrentValue = this.getView().getModel("config").getProperty("/transactionCodeSelected");
|
|
74
|
+
if (bCurrentValue === bOldValue) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
await UserPersonalization.setDisplayTransactionCode(bCurrentValue);
|
|
80
|
+
/**
|
|
81
|
+
* force browser refresh for now
|
|
82
|
+
* replace by dynamic update in follow up
|
|
83
|
+
*/
|
|
84
|
+
return { refresh: true };
|
|
85
|
+
} catch (oError) {
|
|
86
|
+
Log.error("Cannot save transaction code on tiles configuration", oError);
|
|
87
|
+
|
|
88
|
+
let oMessage;
|
|
89
|
+
if (oError instanceof LaunchpadError) {
|
|
90
|
+
oMessage = new Message({
|
|
91
|
+
type: MessageType.Error,
|
|
92
|
+
description: oError.message,
|
|
93
|
+
message: oError.details?.message.value,
|
|
94
|
+
date: oError.details?.innererror.timestamp,
|
|
95
|
+
httpStatus: oError.details?.httpStatus
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
oMessage = new Message({
|
|
99
|
+
type: MessageType.Error,
|
|
100
|
+
description: oError.message,
|
|
101
|
+
message: oError.message
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
throw oMessage;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.view.xml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<mvc:View
|
|
2
|
+
xmlns="sap.m"
|
|
3
|
+
xmlns:mvc="sap.ui.core.mvc"
|
|
4
|
+
controllerName="sap.ushell_abap.components.settings.TransactionCode.TransactionCode">
|
|
5
|
+
<Panel>
|
|
6
|
+
<CheckBox
|
|
7
|
+
id="transactionCodeCheckBox"
|
|
8
|
+
text="{i18n>FlpSettings_transactionCode_label}"
|
|
9
|
+
selected="{config>/transactionCodeSelected}" />
|
|
10
|
+
<VBox class="sapUshellFlpSettingsDescriptionBorder">
|
|
11
|
+
<Text
|
|
12
|
+
class="sapUshellFlpSettingsDescription sapUshellFlpSettingsWide"
|
|
13
|
+
text="{i18n>FlpSettings_transactionCode_description}" />
|
|
14
|
+
</VBox>
|
|
15
|
+
</Panel>
|
|
16
|
+
</mvc:View>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#This is the resource bundle for TransactionCode UserSetting
|
|
2
|
+
#__ldi.translation.uuid=2b979b60-ab52-11f1-ab3b-0800200c9a66
|
|
3
|
+
|
|
4
|
+
#XTIT: Section title in the user settings dialog for the transaction code toggle
|
|
5
|
+
FlpSettings_transactionCode_sectionTitle=Additional App Information
|
|
6
|
+
|
|
7
|
+
#XFLD: Summary label shown in user settings when the transaction code display is active
|
|
8
|
+
FlpSettings_transactionCode_shown=State: On
|
|
9
|
+
|
|
10
|
+
#XFLD: Summary label shown in user settings when the transaction code display is inactive
|
|
11
|
+
FlpSettings_transactionCode_hidden=Default: Off
|
|
12
|
+
|
|
13
|
+
#XFLD: Checkbox label for the "Show Transaction Code on Tiles" toggle in user settings
|
|
14
|
+
FlpSettings_transactionCode_label=Display Transaction Code on Apps
|
|
15
|
+
|
|
16
|
+
#XMSG: Description paragraph below the checkbox in user settings
|
|
17
|
+
FlpSettings_transactionCode_description=Enable to display the app's transaction directly on tile, in the navigation menu, in the app finder.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_version": "1.21.0",
|
|
3
|
+
"sap.app": {
|
|
4
|
+
"id": "sap.ushell_abap.components.settings.TransactionCode",
|
|
5
|
+
"applicationVersion": {
|
|
6
|
+
"version": "1.153.0"
|
|
7
|
+
},
|
|
8
|
+
"ach": "CA-FLP-ABA",
|
|
9
|
+
"type": "component",
|
|
10
|
+
"title": "Transaction Code Settings Entry"
|
|
11
|
+
},
|
|
12
|
+
"sap.ui": {
|
|
13
|
+
"technology": "UI5"
|
|
14
|
+
},
|
|
15
|
+
"sap.ui5": {
|
|
16
|
+
"componentName": "sap.ushell_abap.components.settings.TransactionCode",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"minUI5Version": "1.72",
|
|
19
|
+
"libs": {
|
|
20
|
+
"sap.ui.core": {},
|
|
21
|
+
"sap.m": {},
|
|
22
|
+
"sap.ushell": {}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"rootView": {
|
|
26
|
+
"viewName": "sap.ushell_abap.components.settings.TransactionCode.TransactionCode",
|
|
27
|
+
"id": "userSettingsTransactionCodeView",
|
|
28
|
+
"type": "XML",
|
|
29
|
+
"async": true
|
|
30
|
+
},
|
|
31
|
+
"models": {
|
|
32
|
+
"i18n": {
|
|
33
|
+
"type": "sap.ui.model.resource.ResourceModel",
|
|
34
|
+
"settings": {
|
|
35
|
+
"bundleName": "sap.ushell_abap.components.settings.TransactionCode.i18n.i18n",
|
|
36
|
+
"async": true,
|
|
37
|
+
"supportedLocales": [
|
|
38
|
+
"",
|
|
39
|
+
"ar",
|
|
40
|
+
"bg",
|
|
41
|
+
"ca",
|
|
42
|
+
"cnr",
|
|
43
|
+
"cs",
|
|
44
|
+
"cy",
|
|
45
|
+
"da",
|
|
46
|
+
"de",
|
|
47
|
+
"el",
|
|
48
|
+
"en",
|
|
49
|
+
"en-GB",
|
|
50
|
+
"en-US-sappsd",
|
|
51
|
+
"en-US-saprigi",
|
|
52
|
+
"en-US-saptrc",
|
|
53
|
+
"es",
|
|
54
|
+
"es-MX",
|
|
55
|
+
"et",
|
|
56
|
+
"fi",
|
|
57
|
+
"fr",
|
|
58
|
+
"fr-CA",
|
|
59
|
+
"hi",
|
|
60
|
+
"hr",
|
|
61
|
+
"hu",
|
|
62
|
+
"id",
|
|
63
|
+
"it",
|
|
64
|
+
"iw",
|
|
65
|
+
"ja",
|
|
66
|
+
"kk",
|
|
67
|
+
"ko",
|
|
68
|
+
"lt",
|
|
69
|
+
"lv",
|
|
70
|
+
"mk",
|
|
71
|
+
"ms",
|
|
72
|
+
"nl",
|
|
73
|
+
"no",
|
|
74
|
+
"pl",
|
|
75
|
+
"pt",
|
|
76
|
+
"pt-PT",
|
|
77
|
+
"ro",
|
|
78
|
+
"ru",
|
|
79
|
+
"sh",
|
|
80
|
+
"sk",
|
|
81
|
+
"sl",
|
|
82
|
+
"sr",
|
|
83
|
+
"sv",
|
|
84
|
+
"th",
|
|
85
|
+
"tr",
|
|
86
|
+
"uk",
|
|
87
|
+
"vi",
|
|
88
|
+
"zh-CN",
|
|
89
|
+
"zh-TW"
|
|
90
|
+
],
|
|
91
|
+
"fallbackLocale": "en"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
const S_STICKY_SESSION_HEADER = "saplb"; // header to check during sticky session
|
|
118
118
|
let aBatchQueue; // corresponds to data.__batchRequests
|
|
119
119
|
let bChangeSetOpen; // whether a change set is currently open at the end of our batch queue
|
|
120
|
-
let aDeferredQueue; //
|
|
120
|
+
let aDeferredQueue; // Deferreds objects corresponding to each request
|
|
121
121
|
const that = this;
|
|
122
122
|
// eslint-disable-next-line prefer-const
|
|
123
123
|
let sBaseUrl;
|
|
@@ -859,9 +859,7 @@ sap.ui.define([
|
|
|
859
859
|
* Defaults to the OData service facade's default error handler
|
|
860
860
|
* ({@link sap.ushell_abap.pbServices.ui2.ODataService#getDefaultErrorHandler})
|
|
861
861
|
* @param {boolean} [bCache=false]
|
|
862
|
-
* whether the response is cached for further calls (since 1.11.0)
|
|
863
|
-
* <code>OData.read.$cache</code>, a <code>Utils.Map</code> from
|
|
864
|
-
* <code>sRequestUrl</code> to a <code>jQuery.Deferred</code> object created on demand;
|
|
862
|
+
* whether the response is cached for further calls (since 1.11.0).
|
|
865
863
|
* without this flag, the cache is neither written nor read!
|
|
866
864
|
*
|
|
867
865
|
* @public
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
* @fileOverview The <code>configuration</code> contract.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
+
"sap/base/Log",
|
|
7
8
|
"sap/ushell_abap/pbServices/ui2/Chip",
|
|
8
9
|
"sap/ushell_abap/base/Ui2Error",
|
|
9
|
-
"sap/ushell_abap/
|
|
10
|
+
"sap/ushell_abap/utils/UserPersonalization"
|
|
10
11
|
], (
|
|
12
|
+
Log,
|
|
11
13
|
Chip,
|
|
12
14
|
SrvcError,
|
|
13
|
-
|
|
15
|
+
UserPersonalization
|
|
14
16
|
) => {
|
|
15
17
|
"use strict";
|
|
16
18
|
|
|
@@ -43,6 +45,28 @@ sap.ui.define([
|
|
|
43
45
|
return oChipInstance.getConfigurationParameter(sParameterName);
|
|
44
46
|
};
|
|
45
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Returns the transaction code of the configuration parameter for the CHIP instance.
|
|
50
|
+
* This is a convenience method for the special configuration parameter "display_transaction_code".
|
|
51
|
+
*
|
|
52
|
+
* @name chip.configuration.getTransactionCode
|
|
53
|
+
* @function
|
|
54
|
+
* @since 1.153.0
|
|
55
|
+
* @returns {Promise<string>}
|
|
56
|
+
* the parameter transaction code value
|
|
57
|
+
*/
|
|
58
|
+
this.getTransactionCode = async function () {
|
|
59
|
+
const sTileConfiguration = oChipInstance.getConfigurationParameter("tileConfiguration");
|
|
60
|
+
let sTCode;
|
|
61
|
+
try {
|
|
62
|
+
sTCode = JSON.parse(sTileConfiguration || "{}").display_transaction_code || "";
|
|
63
|
+
} catch (oError) {
|
|
64
|
+
Log.error("Failed to parse tile configuration for transaction code:", oError, "sap.ushell_abap.pbServices.ui2.contracts.configuration");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return UserPersonalization.formatTransactionCode(sTCode);
|
|
68
|
+
};
|
|
69
|
+
|
|
46
70
|
/**
|
|
47
71
|
* Usually the Page Builder does not know about the internals of a CHIP, but there are special
|
|
48
72
|
* CHIPs (e.g. SAP Fiori Launchpad app launcher tiles, also serving as bookmark tiles) the
|
|
@@ -101,6 +125,28 @@ sap.ui.define([
|
|
|
101
125
|
if (fnUpdatedHandler) {
|
|
102
126
|
fnUpdatedHandler(aUpdatedConfigKeys);
|
|
103
127
|
}
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns the transaction code of the configuration parameter for the CHIP instance.
|
|
132
|
+
* This is a convenience method for the special configuration parameter "display_transaction_code".
|
|
133
|
+
*
|
|
134
|
+
* @name contract.configuration.getTransactionCode
|
|
135
|
+
* @function
|
|
136
|
+
* @since 1.153.0
|
|
137
|
+
* @returns {Promise<string>}
|
|
138
|
+
* the parameter transaction code value
|
|
139
|
+
*/
|
|
140
|
+
getTransactionCode: async function () {
|
|
141
|
+
const sTileConfiguration = oChipInstance.getConfigurationParameter("tileConfiguration");
|
|
142
|
+
let sTCode;
|
|
143
|
+
try {
|
|
144
|
+
sTCode = JSON.parse(sTileConfiguration || "{}").display_transaction_code || "";
|
|
145
|
+
} catch (oError) {
|
|
146
|
+
Log.error("Failed to parse tile configuration for transaction code:", oError, "sap.ushell_abap.pbServices.ui2.contracts.configuration");
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return UserPersonalization.formatTransactionCode(sTCode);
|
|
104
150
|
}
|
|
105
151
|
};
|
|
106
152
|
});
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Configured with the ClientSideTargetResolutionAdapter.
|
|
11
11
|
*
|
|
12
|
-
* @version 1.
|
|
12
|
+
* @version 1.153.0
|
|
13
13
|
*/
|
|
14
14
|
sap.ui.define([
|
|
15
|
+
"sap/ui/core/Lib",
|
|
15
16
|
"sap/ushell/base/promisify",
|
|
16
|
-
"sap/ushell/resources",
|
|
17
17
|
"sap/ushell/utils/LaunchpadError"
|
|
18
18
|
], (
|
|
19
|
+
Lib,
|
|
19
20
|
promisify,
|
|
20
|
-
ushellResources,
|
|
21
21
|
LaunchpadError
|
|
22
22
|
) => {
|
|
23
23
|
"use strict";
|
|
@@ -111,7 +111,7 @@ sap.ui.define([
|
|
|
111
111
|
oError.message,
|
|
112
112
|
{
|
|
113
113
|
component: this.S_COMPONENT_NAME,
|
|
114
|
-
description:
|
|
114
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("NavigationDataProvider.CannotLoadData"),
|
|
115
115
|
detail: oError
|
|
116
116
|
},
|
|
117
117
|
oError
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
/**
|
|
3
|
+
* @fileOverview The ABAP platform's helper module to handle personalized settings values
|
|
4
|
+
*
|
|
5
|
+
* @version 1.153.0
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/Lib",
|
|
9
|
+
"sap/ushell/Config",
|
|
10
|
+
"sap/ushell/User/UserPersonalization"
|
|
11
|
+
], (
|
|
12
|
+
Lib,
|
|
13
|
+
Config,
|
|
14
|
+
UshellUserPersonalization
|
|
15
|
+
) => {
|
|
16
|
+
"use strict";
|
|
17
|
+
class UserPersonalization {
|
|
18
|
+
/**
|
|
19
|
+
* Resolves the formatted transaction code to display on a tile.
|
|
20
|
+
*
|
|
21
|
+
* Returns the raw tcode when admin and user settings both permit display, a placeholder
|
|
22
|
+
* text when the feature is active but no tcode is configured, or an empty string when
|
|
23
|
+
* the feature is disabled (admin flag or user toggle).
|
|
24
|
+
*
|
|
25
|
+
* @param {string} sTransactionCode The raw transaction code from the tile configuration.
|
|
26
|
+
* @returns {Promise<string>} Resolves to the formatted display value.
|
|
27
|
+
*
|
|
28
|
+
* @since 1.153.0
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
async formatTransactionCode (sTransactionCode) {
|
|
32
|
+
const bShowTCode = await this.getDisplayTransactionCode();
|
|
33
|
+
if (!bShowTCode) {
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
if (sTransactionCode) {
|
|
37
|
+
return sTransactionCode;
|
|
38
|
+
}
|
|
39
|
+
return Lib.getResourceBundleFor("sap.ushell_abap").getText("tileTransactionCodeNotMaintained");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Handles the different setting options
|
|
44
|
+
*
|
|
45
|
+
* 1) Admin enablement ("/abap/ui/displayTransaction")
|
|
46
|
+
* 2) User enablement (personalization setting "showTransactionCode")
|
|
47
|
+
*
|
|
48
|
+
* @returns {Promise<boolean>} Resolves to whether the transaction code should be shown.
|
|
49
|
+
*
|
|
50
|
+
* @since 1.153.0
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
async getDisplayTransactionCode () {
|
|
54
|
+
if (!Config.last("/abap/ui/displayTransaction")) {
|
|
55
|
+
// feature off -> hidden; the user toggle is irrelevant
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const bValue = await UshellUserPersonalization.getItemValue("showTransactionCode");
|
|
60
|
+
return typeof bValue === "undefined" ? true : !!bValue;
|
|
61
|
+
} catch (oError) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Persists display transaction code user setting in the personalization
|
|
68
|
+
*
|
|
69
|
+
* @param {boolean} bValue Whether the transaction code should be shown.
|
|
70
|
+
* @returns {Promise<undefined>} Resolves once the value was persisted.
|
|
71
|
+
*
|
|
72
|
+
* @since 1.153.0
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
async setDisplayTransactionCode (bValue) {
|
|
76
|
+
await UshellUserPersonalization.setItemValue("showTransactionCode", bValue);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return new UserPersonalization();
|
|
80
|
+
});
|
package/ui5.yaml
CHANGED
|
@@ -297,7 +297,7 @@ builder:
|
|
|
297
297
|
- sap/ushell/library.js
|
|
298
298
|
- sap/ushell/modules
|
|
299
299
|
- sap/ushell/override.js
|
|
300
|
-
- sap/ushell/renderer/
|
|
300
|
+
- sap/ushell/renderer/Component.js
|
|
301
301
|
- sap/ushell/renderer/RendererRootView.fragment.xml
|
|
302
302
|
- sap/ushell/renderer/Shell.controller.js
|
|
303
303
|
- sap/ushell/renderer/Shell.view.js
|