@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
|
@@ -5,19 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/Log",
|
|
8
|
-
"sap/
|
|
8
|
+
"sap/ushell/base/requireAsync",
|
|
9
9
|
"sap/ushell_abap/bootstrap/XhrFactory",
|
|
10
10
|
"sap/ushell_abap/base/Ui2Utils"
|
|
11
11
|
], (
|
|
12
12
|
Log,
|
|
13
|
-
|
|
13
|
+
requireAsync,
|
|
14
14
|
XhrFactory,
|
|
15
15
|
ui2Utils
|
|
16
16
|
) => {
|
|
17
17
|
"use strict";
|
|
18
18
|
|
|
19
|
-
/* global OData */
|
|
20
|
-
|
|
21
19
|
const S_PAGE_SETS_FALLBACK_URL_BASE = "/sap/opu/odata/UI2/PAGE_BUILDER_PERS";
|
|
22
20
|
const S_PAGE_SETS_FALLBACK_EXPAND = "Pages/PageChipInstances/Chip/ChipBags/ChipProperties,"
|
|
23
21
|
+ "Pages/PageChipInstances/RemoteCatalog,"
|
|
@@ -114,25 +112,6 @@ sap.ui.define([
|
|
|
114
112
|
return sServiceUrl;
|
|
115
113
|
}
|
|
116
114
|
|
|
117
|
-
/**
|
|
118
|
-
* Processes the OData response.
|
|
119
|
-
* @param {jQuery.Deferred} oDeferred the deferred object updating the cache in OData.read
|
|
120
|
-
* @param {int} iStatus the status code
|
|
121
|
-
* @param {string} sCsrfToken the CSRF token
|
|
122
|
-
* @param {string} sResponse the response message
|
|
123
|
-
*
|
|
124
|
-
* @private
|
|
125
|
-
*/
|
|
126
|
-
#processOData (oDeferred, iStatus, sCsrfToken, sResponse) {
|
|
127
|
-
if (iStatus === 200) {
|
|
128
|
-
oDeferred.resolve(JSON.parse(sResponse).d, sCsrfToken);
|
|
129
|
-
} else {
|
|
130
|
-
// rejecting the deferred will make the request later (in the ushell adapter) fail, so
|
|
131
|
-
// the error handling there takes effect
|
|
132
|
-
oDeferred.reject(new Error(`PageSet request failed: ${sResponse}`));
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
115
|
/**
|
|
137
116
|
* Determines the URL for the PageSets OData service from the startup service result. If the URL is not set
|
|
138
117
|
* a hard-coded fallback URL is returned and set in the startupResult.
|
|
@@ -160,35 +139,24 @@ sap.ui.define([
|
|
|
160
139
|
}
|
|
161
140
|
|
|
162
141
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* @param {
|
|
166
|
-
* @returns {
|
|
142
|
+
* Performs an OData GET request using a plain XHR.
|
|
143
|
+
* @param {string} sUrl the url to be requested
|
|
144
|
+
* @param {object} oStartupResult the startup result object, containing the base URL and the CSRF token
|
|
145
|
+
* @returns {Promise<object>} Resolves the response
|
|
167
146
|
*
|
|
168
147
|
* @private
|
|
169
148
|
*/
|
|
170
|
-
#
|
|
171
|
-
const oDeferred =
|
|
149
|
+
#sendODataRequest (sUrl, oStartupResult) {
|
|
150
|
+
const oDeferred = Promise.withResolvers();
|
|
151
|
+
|
|
172
152
|
// creating the deferred objects here should ensure that the ushell adapters later read
|
|
173
153
|
// the responses from the "cache", even if UI5 bootstrap is faster than the
|
|
174
154
|
// OData requests
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
155
|
+
requireAsync(["sap/ui/thirdparty/datajs"]).then(([datajs]) => {
|
|
156
|
+
datajs.read.$cache = datajs.read.$cache || new ui2Utils.Map();
|
|
157
|
+
datajs.read.$cache.put(sUrl, oDeferred.promise);
|
|
178
158
|
});
|
|
179
|
-
return oDeferred;
|
|
180
|
-
}
|
|
181
159
|
|
|
182
|
-
/**
|
|
183
|
-
* Performs an OData GET request using a plain XHR.
|
|
184
|
-
* @param {string} sUrl the url to be requested
|
|
185
|
-
* @param {object} oStartupResult the startup result object, containing the base URL and the CSRF token
|
|
186
|
-
* @param {function(number, object, function)} fnCallback callback function to be called when the request finished,
|
|
187
|
-
* taking the status code, the CSRF token and the response message
|
|
188
|
-
*
|
|
189
|
-
* @private
|
|
190
|
-
*/
|
|
191
|
-
#requestOData (sUrl, oStartupResult, fnCallback) {
|
|
192
160
|
const oXhr = XhrFactory.createAndOpen(sUrl, oStartupResult);
|
|
193
161
|
// set sap-statistics header, see
|
|
194
162
|
// http://help.sap.com/saphelp_nw74/helpdata/de/40/93b81292194d6a926e105c10d5048d/content.htm
|
|
@@ -199,18 +167,25 @@ sap.ui.define([
|
|
|
199
167
|
if (this.readyState !== /* DONE */4) {
|
|
200
168
|
return; // not yet DONE
|
|
201
169
|
}
|
|
202
|
-
|
|
170
|
+
|
|
171
|
+
if (oXhr.status === 200) {
|
|
172
|
+
oDeferred.resolve([JSON.parse(oXhr.responseText).d, undefined /* sCsrfToken */]);
|
|
173
|
+
} else {
|
|
174
|
+
// rejecting the deferred will make the request later (in the ushell adapter) fail, so
|
|
175
|
+
// the error handling there takes effect
|
|
176
|
+
oDeferred.reject(new Error(`PageSet request failed: ${oXhr.responseText}`));
|
|
177
|
+
}
|
|
203
178
|
};
|
|
179
|
+
|
|
204
180
|
oXhr.send();
|
|
181
|
+
|
|
182
|
+
return oDeferred.promise;
|
|
205
183
|
}
|
|
206
184
|
|
|
207
|
-
requestPageSets (oStartupResult) {
|
|
185
|
+
async requestPageSets (oStartupResult) {
|
|
208
186
|
const sPageSetServiceUrl = this.#getAndAdjustPageSetServiceURL(oStartupResult);
|
|
209
|
-
const oDeferred = this.#createODataDeferred(sPageSetServiceUrl);// TODO make as Promise.all
|
|
210
187
|
|
|
211
|
-
this.#
|
|
212
|
-
this.#processOData(oDeferred, iStatus, sCsrfToken, sResponse);
|
|
213
|
-
});
|
|
188
|
+
await this.#sendODataRequest(sPageSetServiceUrl, oStartupResult);
|
|
214
189
|
}
|
|
215
190
|
|
|
216
191
|
/**
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/base/Log",
|
|
10
|
-
"sap/base/util/Deferred",
|
|
11
10
|
"sap/ushell/bootstrap/Config"
|
|
12
11
|
], (
|
|
13
12
|
Log,
|
|
14
|
-
Deferred,
|
|
15
13
|
BootstrapConfig
|
|
16
14
|
) => {
|
|
17
15
|
"use strict";
|
|
@@ -43,7 +41,7 @@ sap.ui.define([
|
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
run () {
|
|
46
|
-
const oDeferred =
|
|
44
|
+
const oDeferred = Promise.withResolvers();
|
|
47
45
|
|
|
48
46
|
function fnKeepTrying () {
|
|
49
47
|
if (this.#counter < this.#timeoutCounter) {
|
|
@@ -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
|
+
}
|
package/src/main/js/sap/ushell_abap/integration/fileshares/NavTargetResolutionFileShareSupport.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
sap.ui.define([
|
|
4
4
|
"sap/base/Log",
|
|
5
5
|
"sap/ui/core/Manifest",
|
|
6
|
+
"sap/ushell/base/promisify",
|
|
6
7
|
"sap/ushell/Container"
|
|
7
8
|
], (
|
|
8
9
|
Log,
|
|
9
10
|
Manifest,
|
|
11
|
+
promisify,
|
|
10
12
|
Container
|
|
11
13
|
) => {
|
|
12
14
|
"use strict";
|
|
@@ -46,7 +48,7 @@ sap.ui.define([
|
|
|
46
48
|
NavTargetResolutionFileShareSupport.getDataSource = function () {
|
|
47
49
|
if (!NavTargetResolutionFileShareSupport._getDataSourcePromise) {
|
|
48
50
|
NavTargetResolutionFileShareSupport._getDataSourcePromise = Container.getServiceAsync("NavTargetResolutionInternal").then((oNavTargetResolutionService) => {
|
|
49
|
-
return oNavTargetResolutionService.resolveHashFragment(FILE_SHARE_INTENT);
|
|
51
|
+
return promisify(oNavTargetResolutionService.resolveHashFragment(FILE_SHARE_INTENT));
|
|
50
52
|
}).then((oResolvedHashFragment) => {
|
|
51
53
|
const sManifestUrl = oResolvedHashFragment && oResolvedHashFragment.applicationDependencies && oResolvedHashFragment.applicationDependencies.manifest;
|
|
52
54
|
if (sManifestUrl) {
|