@sapui5/sap.ushell_abap 1.139.0 → 1.140.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 +7 -4
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +3 -3
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +45 -48
- 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 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +8 -8
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +83 -79
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.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 +10 -12
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +3 -3
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +3 -3
- 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 +6 -8
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/SAPCompanionConditionSetter.js +4 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/XhrLogonEventHandler.js +5 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +53 -30
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +2 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +27 -18
- package/src/main/js/sap/ushell_abap/components/TCodeNavigation.js +150 -0
- package/src/main/js/sap/ushell_abap/library.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +4 -8
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +17 -15
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +10 -15
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +4 -5
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +4 -5
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +12 -20
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +9 -12
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +28 -28
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +3 -5
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +19 -22
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +9 -10
- package/src/main/js/sap/ushell_abap/pbServices/ui2/RemoteCatalogService.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +13 -60
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +1 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +1 -1
|
@@ -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.
|
|
5
|
+
* @version 1.140.0
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/ObjectPath",
|
|
@@ -67,22 +67,12 @@ sap.ui.define([
|
|
|
67
67
|
* @private
|
|
68
68
|
*/
|
|
69
69
|
return function (oSystem, sParameter, oProperties) {
|
|
70
|
-
let oFactory;
|
|
71
70
|
let sScope = "PERS";
|
|
72
71
|
let sPageBuilderServiceUrl = "/sap/opu/odata/UI2/PAGE_BUILDER_PERS/"; // 3rd Priority (fallback)
|
|
73
72
|
const mRemoteCatalogServices = oProperties.config.remoteCatalogServices || {};
|
|
74
73
|
const sConfigBaseUrl = ObjectPath.get("config.services.pageBuilding.baseUrl", oProperties);
|
|
75
74
|
|
|
76
75
|
// BEWARE: constructor code below!
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Returns the UI2 page building factory.
|
|
80
|
-
* @returns {sap.ushell_abap.pbServices.ui2.Factory} the page building factory
|
|
81
|
-
*/
|
|
82
|
-
this.getFactory = function () {
|
|
83
|
-
return oFactory;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
76
|
// constructor code -------------------------------------------------------
|
|
87
77
|
|
|
88
78
|
// accept lower case parameter as in FLPD this is set as query parameter the user alters manually
|
|
@@ -102,13 +92,21 @@ sap.ui.define([
|
|
|
102
92
|
// Get CacheId for PAGE_BUILDER_PERS when available
|
|
103
93
|
const sCacheId = ObjectPath.get("sap-ushell-config.services.Container.adapter.config.services.pbFioriHome.cacheId");
|
|
104
94
|
|
|
105
|
-
oFactory = Factory.createFactory(
|
|
95
|
+
const oFactory = Factory.createFactory(
|
|
106
96
|
sPageBuilderServiceUrl,
|
|
107
97
|
undefined,
|
|
108
98
|
sScope === "PERS",
|
|
109
99
|
sCacheId
|
|
110
100
|
);
|
|
111
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Returns the UI2 page building factory.
|
|
104
|
+
* @returns {sap.ushell_abap.pbServices.ui2.Factory} the page building factory
|
|
105
|
+
*/
|
|
106
|
+
this.getFactory = function () {
|
|
107
|
+
return oFactory;
|
|
108
|
+
};
|
|
109
|
+
|
|
112
110
|
/**
|
|
113
111
|
* Remote Catalogs are deprecated
|
|
114
112
|
* @deprecated since 1.120
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview PagePersistenceAdapter for the ABAP platform.
|
|
5
|
-
* @version 1.
|
|
5
|
+
* @version 1.140.0
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/i18n/Localization",
|
|
@@ -42,9 +42,9 @@ sap.ui.define([
|
|
|
42
42
|
* @experimental Since 1.67.0
|
|
43
43
|
* @private
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
function PagePersistenceAdapter () {
|
|
46
46
|
this.S_COMPONENT_NAME = "sap.ushell_abap.adapters.abap.PagePersistenceAdapter";
|
|
47
|
-
}
|
|
47
|
+
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Returns a page
|
|
@@ -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.
|
|
10
|
+
* @version 1.140.0
|
|
11
11
|
*/
|
|
12
12
|
sap.ui.define([
|
|
13
13
|
"sap/ushell_abap/adapters/abap/AdapterContainer",
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @since 1.11.0
|
|
45
45
|
* @private
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
function PersonalizationAdapter (oSystem, sParameters, oConfig) {
|
|
48
48
|
Log.debug("[000] PersonalizationAdapter: constructor", "PersonalizationAdapter");
|
|
49
49
|
this._oConfig = oConfig && oConfig.config;
|
|
50
50
|
const sPersonalizationServiceURL = `${ObjectPath.get("config.services.personalization.baseUrl", oConfig) || "/sap/opu/odata/UI2/INTEROP"}/`;
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
throw new SrvcError(oMessage, "sap.ushell_abap.adapters.abap.PersonalizationAdapter");
|
|
59
59
|
}
|
|
60
60
|
ODataService.call(this, this._oWrapper, fnDefaultFailure);
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
|
|
63
63
|
// historically, the service always called getAdapterContainer and then load
|
|
64
64
|
// thus an implementation was not required to initialize a fully implemented container on getAdapterContainer
|
|
@@ -264,30 +264,28 @@ sap.ui.define([
|
|
|
264
264
|
this.updateUserPreferences = function (oUser) {
|
|
265
265
|
Log.debug("[000] updateUserPreferences", "UserInfoAdapter");
|
|
266
266
|
const that = this;
|
|
267
|
-
let oDeferred;
|
|
268
267
|
let sRelativeUrl;
|
|
269
|
-
let aUserChangedProperties;
|
|
270
268
|
let iODataRequestsRunning;
|
|
271
269
|
let oDataObj;
|
|
272
|
-
const
|
|
270
|
+
const oDeferred = new jQuery.Deferred();
|
|
271
|
+
function fnSuccess () {
|
|
273
272
|
iODataRequestsRunning -= 1;
|
|
274
273
|
if (iODataRequestsRunning === 0) {
|
|
275
274
|
oDeferred.resolve();
|
|
276
275
|
}
|
|
277
|
-
}
|
|
278
|
-
|
|
276
|
+
}
|
|
277
|
+
function fnFailure (sErrorMessage, oParsedErrorInformation) {
|
|
279
278
|
oDeferred.reject(sErrorMessage, oParsedErrorInformation);
|
|
280
|
-
}
|
|
279
|
+
}
|
|
281
280
|
Log.debug("[000] updateUserPreferences: _createWrapper", "UserInfoAdapter");
|
|
282
281
|
oDataWrapper = this._createWrapper("/sap/opu/odata/UI2/INTEROP/");
|
|
283
|
-
oDeferred = new jQuery.Deferred();
|
|
284
282
|
|
|
285
283
|
// prepare
|
|
286
284
|
Log.debug("[000] updateUserPreferences: oDataWrapper.openBatchQueue", "UserInfoAdapter");
|
|
287
285
|
oDataWrapper.openBatchQueue();
|
|
288
286
|
|
|
289
287
|
// put the preferences to update in the OData batch queue
|
|
290
|
-
aUserChangedProperties = oUser.getChangedProperties() || [];
|
|
288
|
+
const aUserChangedProperties = oUser.getChangedProperties() || [];
|
|
291
289
|
Log.debug("[000] updateUserPreferences: getChangedProperties", "UserInfoAdapter");
|
|
292
290
|
iODataRequestsRunning = aUserChangedProperties.length;
|
|
293
291
|
aUserChangedProperties.forEach((oUserChangedProperty) => {
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
Setter._ushellConfig = window["sap-ushell-config"];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
function fnTryToSetConditions () {
|
|
31
31
|
if (window.Help4 !== undefined) {
|
|
32
32
|
const oSpacesConfig = Setter._ushellConfig.ushell.spaces;
|
|
33
33
|
const oConditions = {};
|
|
@@ -44,9 +44,9 @@ sap.ui.define([
|
|
|
44
44
|
return true;
|
|
45
45
|
}
|
|
46
46
|
return false;
|
|
47
|
-
}
|
|
47
|
+
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
function fnKeepTrying () {
|
|
50
50
|
if (counter < Setter._timeoutCounter) {
|
|
51
51
|
counter++;
|
|
52
52
|
if (!fnTryToSetConditions()) {
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
} else {
|
|
59
59
|
oDeferred.reject();
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
fnKeepTrying();
|
|
63
63
|
return oDeferred.promise;
|
|
64
64
|
};
|
|
@@ -17,6 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Helper class for handling events from XHR logon frame provider
|
|
20
|
+
* @param {Window} [oWindow=window] - the window object to use for reloading the page
|
|
21
|
+
* @param {string} [sXhrLogonMode="reload"] - the XHR logon mode, either "reload" or "logoffAndRedirect"
|
|
20
22
|
*
|
|
21
23
|
* @private
|
|
22
24
|
*/
|
|
@@ -126,9 +128,8 @@ sap.ui.define([
|
|
|
126
128
|
XhrLogonEventHandler.prototype._logoffAndRedirect = function () {
|
|
127
129
|
const sLocationHref = oAbapUtils.getLocationHref();
|
|
128
130
|
const sClientId = ObjectPath.get("sap-ushell-config.services.Container.adapter.config.client");
|
|
129
|
-
let sUrl;
|
|
130
131
|
|
|
131
|
-
sUrl = new URI("/sap/public/bc/icf/logoff")
|
|
132
|
+
const sUrl = new URI("/sap/public/bc/icf/logoff")
|
|
132
133
|
.absoluteTo(sLocationHref)
|
|
133
134
|
.search(`sap-client=${sClientId}&propagateLogoff=false&redirectURL=${encodeURIComponent(sLocationHref)}`)
|
|
134
135
|
.toString();
|
|
@@ -138,6 +139,8 @@ sap.ui.define([
|
|
|
138
139
|
/**
|
|
139
140
|
* Checks if the page is currently being reloaded by the XHR logon which triggers this by setting query-parameter sap-ushell-reloaded
|
|
140
141
|
*
|
|
142
|
+
* @returns {boolean} true if the page is reloaded, false otherwise
|
|
143
|
+
*
|
|
141
144
|
* @private
|
|
142
145
|
*/
|
|
143
146
|
XhrLogonEventHandler.prototype._isPageReloaded = function () {
|
|
@@ -153,7 +153,7 @@ sap.ui.define([
|
|
|
153
153
|
*/
|
|
154
154
|
utils.getLocationOrigin = function () {
|
|
155
155
|
// location.origin might not be supported by all browsers
|
|
156
|
-
return `${location.protocol}//${location.host}`;
|
|
156
|
+
return `${window.location.protocol}//${window.location.host}`;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
/**
|
|
@@ -165,7 +165,7 @@ sap.ui.define([
|
|
|
165
165
|
* @private
|
|
166
166
|
*/
|
|
167
167
|
utils.getLocationHref = function () {
|
|
168
|
-
return location.href;
|
|
168
|
+
return window.location.href;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
return utils;
|
|
@@ -28,36 +28,22 @@ sap.ui.define([
|
|
|
28
28
|
// Check (only once for this file) if sap-statistics is set in query parameter or local storage
|
|
29
29
|
let bSapStatistics = BootstrapUtils.isSapStatisticsSet();
|
|
30
30
|
|
|
31
|
-
function requestPageSet (oStartupResult) {
|
|
32
|
-
const sPageSetServiceUrl = getAndAdjustPageSetServiceURL(oStartupResult);
|
|
33
|
-
const oDeferred = createODataDeferred(sPageSetServiceUrl);// TODO make as Promise.all
|
|
34
|
-
|
|
35
|
-
requestOData(sPageSetServiceUrl, oStartupResult, (iStatus, sCsrfToken, sResponse) => {
|
|
36
|
-
processOData(oDeferred, iStatus, sCsrfToken, sResponse);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Determines the URL for the PageSets OData service from the startup service result. If the URL is not set
|
|
42
|
-
* a hard-coded fallback URL is returned and set in the startupResult.
|
|
43
|
-
*/
|
|
44
|
-
function getAndAdjustPageSetServiceURL (oStartupCallResult) {
|
|
45
|
-
const sUI2CacheDisable = oAbapUtils.getUrlParameterValue("sap-ui2-cache-disable");
|
|
46
|
-
if (sUI2CacheDisable && oStartupCallResult && oStartupCallResult.services && oStartupCallResult.services.pbFioriHome) {
|
|
47
|
-
oStartupCallResult.services.pbFioriHome["sap-ui2-cache-disable"] = sUI2CacheDisable;
|
|
48
|
-
}
|
|
49
|
-
return getAndAdjustServiceURL(
|
|
50
|
-
oStartupCallResult,
|
|
51
|
-
"pbFioriHome",
|
|
52
|
-
S_PAGE_SETS_FALLBACK_URL_BASE,
|
|
53
|
-
S_PAGE_SETS_FALLBACK_URL_RELATIVE,
|
|
54
|
-
S_PAGE_SETS_FALLBACK_EXPAND
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
31
|
/**
|
|
59
32
|
* Determines the URL for the PageSets OData service from the startup service result. If the URL is not set
|
|
60
33
|
* a hard-coded fallback URL is returned and set in the startupResult.
|
|
34
|
+
*
|
|
35
|
+
* @param {object} oStartupCallResult
|
|
36
|
+
* the startup service result object
|
|
37
|
+
* @param {string} sServicePropertyName
|
|
38
|
+
* the name of the service property in the startup result
|
|
39
|
+
* @param {string} sFallbackBaseUrl
|
|
40
|
+
* the fallback base URL to be used if the service URL is not set
|
|
41
|
+
* @param {string} sFallbackRelativeUrl
|
|
42
|
+
* the fallback relative URL to be used if the service URL is not set
|
|
43
|
+
* @param {string} sFallbackExpand
|
|
44
|
+
* the fallback expand parameter to be used if the service URL is not set
|
|
45
|
+
* @returns {string}
|
|
46
|
+
* the URL for the service, adjusted with the fallback values if necessary
|
|
61
47
|
*/
|
|
62
48
|
function getAndAdjustServiceURL (oStartupCallResult, sServicePropertyName, sFallbackBaseUrl, sFallbackRelativeUrl, sFallbackExpand) {
|
|
63
49
|
let sServiceUrl;
|
|
@@ -143,11 +129,36 @@ sap.ui.define([
|
|
|
143
129
|
}
|
|
144
130
|
}
|
|
145
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Determines the URL for the PageSets OData service from the startup service result. If the URL is not set
|
|
134
|
+
* a hard-coded fallback URL is returned and set in the startupResult.
|
|
135
|
+
*
|
|
136
|
+
* @param {object} oStartupCallResult
|
|
137
|
+
* the startup service result object
|
|
138
|
+
* @returns {string}
|
|
139
|
+
* the URL for the PageSets OData service
|
|
140
|
+
*/
|
|
141
|
+
function getAndAdjustPageSetServiceURL (oStartupCallResult) {
|
|
142
|
+
const sUI2CacheDisable = oAbapUtils.getUrlParameterValue("sap-ui2-cache-disable");
|
|
143
|
+
if (sUI2CacheDisable && oStartupCallResult && oStartupCallResult.services && oStartupCallResult.services.pbFioriHome) {
|
|
144
|
+
oStartupCallResult.services.pbFioriHome["sap-ui2-cache-disable"] = sUI2CacheDisable;
|
|
145
|
+
}
|
|
146
|
+
return getAndAdjustServiceURL(
|
|
147
|
+
oStartupCallResult,
|
|
148
|
+
"pbFioriHome",
|
|
149
|
+
S_PAGE_SETS_FALLBACK_URL_BASE,
|
|
150
|
+
S_PAGE_SETS_FALLBACK_URL_RELATIVE,
|
|
151
|
+
S_PAGE_SETS_FALLBACK_EXPAND
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
146
155
|
/**
|
|
147
156
|
* Creates the Deferred in the OData.read cache to keep the result of the request with the
|
|
148
157
|
* given URL.
|
|
149
158
|
* @param {string} sUrl
|
|
159
|
+
* the URL to be requested
|
|
150
160
|
* @returns {jQuery.Deferred}
|
|
161
|
+
* the deferred object which will be resolved with the response of the request
|
|
151
162
|
*
|
|
152
163
|
* @private
|
|
153
164
|
*/
|
|
@@ -165,13 +176,16 @@ sap.ui.define([
|
|
|
165
176
|
|
|
166
177
|
/**
|
|
167
178
|
* Performs an OData GET request using a plain XHR.
|
|
168
|
-
* @param {
|
|
179
|
+
* @param {string} sUrl
|
|
180
|
+
* the url to be requested
|
|
181
|
+
* @param {object} oStartupResult
|
|
182
|
+
* the startup result object, containing the base URL and the CSRF token
|
|
183
|
+
* @param {function(number, object, function)} fnCallback
|
|
169
184
|
* callback function to be called when the request finished, taking the status code, the
|
|
170
185
|
* CSRF token and the response message
|
|
171
186
|
*/
|
|
172
187
|
function requestOData (sUrl, oStartupResult, fnCallback) {
|
|
173
|
-
|
|
174
|
-
oXHR = oAbapUtils.createAndOpenXHR(sUrl, oStartupResult);
|
|
188
|
+
const oXHR = oAbapUtils.createAndOpenXHR(sUrl, oStartupResult);
|
|
175
189
|
// set sap-statistics header, see
|
|
176
190
|
// http://help.sap.com/saphelp_nw74/helpdata/de/40/93b81292194d6a926e105c10d5048d/content.htm
|
|
177
191
|
if (bSapStatistics) {
|
|
@@ -186,6 +200,15 @@ sap.ui.define([
|
|
|
186
200
|
oXHR.send();
|
|
187
201
|
}
|
|
188
202
|
|
|
203
|
+
function requestPageSet (oStartupResult) {
|
|
204
|
+
const sPageSetServiceUrl = getAndAdjustPageSetServiceURL(oStartupResult);
|
|
205
|
+
const oDeferred = createODataDeferred(sPageSetServiceUrl);// TODO make as Promise.all
|
|
206
|
+
|
|
207
|
+
requestOData(sPageSetServiceUrl, oStartupResult, (iStatus, sCsrfToken, sResponse) => {
|
|
208
|
+
processOData(oDeferred, iStatus, sCsrfToken, sResponse);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
189
212
|
oPagesetHandler.requestPageSet = requestPageSet;
|
|
190
213
|
oPagesetHandler._getAndAdjustServiceURL = getAndAdjustServiceURL; // Only for testing
|
|
191
214
|
oPagesetHandler._getAndAdjustPageSetServiceURL = getAndAdjustPageSetServiceURL; // Only for testing
|
|
@@ -16,8 +16,9 @@ sap.ui.define([
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Checks if ThemeRoot is part of the allowlist
|
|
19
|
+
* @param {string} sOrigin the origin of the theme root to be validated
|
|
19
20
|
*
|
|
20
|
-
* @
|
|
21
|
+
* @returns {boolean} if it is part of the allowlist
|
|
21
22
|
*/
|
|
22
23
|
function validateThemeOrigin (sOrigin) {
|
|
23
24
|
const aArrayOfAllowedOrigins = oMetaTagHandler.readMetaTags(
|
|
@@ -53,6 +53,10 @@ sap.ui.define([
|
|
|
53
53
|
*
|
|
54
54
|
* The root intent (e.g., #Shell-home) will
|
|
55
55
|
* not determine a direct start condition.
|
|
56
|
+
*
|
|
57
|
+
* @param {string} sHash the hash
|
|
58
|
+
*
|
|
59
|
+
* @returns {boolean} if it is a direct start
|
|
56
60
|
* @private
|
|
57
61
|
*/
|
|
58
62
|
function isDirectStart (sHash) {
|
|
@@ -60,9 +64,9 @@ sap.ui.define([
|
|
|
60
64
|
* Determine whether sHash is a standalone hash.
|
|
61
65
|
* In this case, the hash is not set as initial target for the start_up service.
|
|
62
66
|
*
|
|
63
|
-
* @param {string}
|
|
67
|
+
* @param {string} sCurrentHash
|
|
64
68
|
* URL parameter name
|
|
65
|
-
* @returns {boolean}
|
|
69
|
+
* @returns {boolean} if it is a standalone hash
|
|
66
70
|
* @private
|
|
67
71
|
*/
|
|
68
72
|
function isStandaloneHash (sCurrentHash) {
|
|
@@ -109,14 +113,13 @@ sap.ui.define([
|
|
|
109
113
|
*/
|
|
110
114
|
// TODO Refactor: Align with URLParsing.getShellHash
|
|
111
115
|
function getFullShellHash () {
|
|
112
|
-
let sHashDecoded;
|
|
113
116
|
const sHref = oAbapUtils.getLocationHref();
|
|
114
117
|
const iHashIndex = sHref.indexOf("#");
|
|
115
118
|
if (iHashIndex < 0) {
|
|
116
119
|
return "";
|
|
117
120
|
}
|
|
118
121
|
// decode hash: identical behavior to ShellNavigationInternal.hrefForExternal
|
|
119
|
-
sHashDecoded = decodeURI(sHref.slice(iHashIndex + 1));
|
|
122
|
+
const sHashDecoded = decodeURI(sHref.slice(iHashIndex + 1));
|
|
120
123
|
return sHashDecoded;
|
|
121
124
|
}
|
|
122
125
|
|
|
@@ -261,7 +264,7 @@ sap.ui.define([
|
|
|
261
264
|
|
|
262
265
|
/**
|
|
263
266
|
* Extracts the theme root from the startup service result or fall back
|
|
264
|
-
* @param {object} oStartupServiceResult
|
|
267
|
+
* @param {object} oStartupServiceResult the startup service result
|
|
265
268
|
* @returns {string} the system theme root
|
|
266
269
|
*
|
|
267
270
|
* @private
|
|
@@ -288,7 +291,7 @@ sap.ui.define([
|
|
|
288
291
|
|
|
289
292
|
/**
|
|
290
293
|
* Extracts the theme from the startup service result
|
|
291
|
-
* @param {object} startup service result
|
|
294
|
+
* @param {object} oStartupServiceResult startup service result
|
|
292
295
|
* @returns {string} the theme or undefined
|
|
293
296
|
*
|
|
294
297
|
* @private
|
|
@@ -318,8 +321,8 @@ sap.ui.define([
|
|
|
318
321
|
* theme root is set to "". The theme is then loaded by the UI5 http handler. This is necessary
|
|
319
322
|
* as the themeing infrastructure is not mandatory and therefore it cannot be ensured that the
|
|
320
323
|
* http handler of the theming infrastructure is running.
|
|
321
|
-
* @
|
|
322
|
-
* @
|
|
324
|
+
* @param {string} sTheme theme
|
|
325
|
+
* @param {string} sSystemThemeRoot system theme root
|
|
323
326
|
* @returns {string} theme root for the given theme
|
|
324
327
|
*
|
|
325
328
|
* @private
|
|
@@ -337,16 +340,14 @@ sap.ui.define([
|
|
|
337
340
|
* Assumption: The theme returned in the startup service does not have a root.
|
|
338
341
|
* It is only the theme name!
|
|
339
342
|
* The theme root is amended here in.
|
|
340
|
-
* @
|
|
341
|
-
* @
|
|
343
|
+
* @param {string} oStartupServiceResult startup theme
|
|
344
|
+
* @param {string} sSystemThemeRoot system theme root
|
|
342
345
|
* @returns {object} theme root for the startup theme
|
|
343
346
|
*
|
|
344
347
|
* @private
|
|
345
348
|
*/
|
|
346
349
|
function determineStartupTheme (oStartupServiceResult, sSystemThemeRoot) {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
sTheme = extractThemeFromStartupServiceResult(oStartupServiceResult);
|
|
350
|
+
const sTheme = extractThemeFromStartupServiceResult(oStartupServiceResult);
|
|
350
351
|
return {
|
|
351
352
|
theme: sTheme,
|
|
352
353
|
root: determineThemeRoot(sTheme, sSystemThemeRoot)
|
|
@@ -355,15 +356,18 @@ sap.ui.define([
|
|
|
355
356
|
|
|
356
357
|
/**
|
|
357
358
|
* Extracts the theme from the URL and determines the theme root
|
|
359
|
+
*
|
|
360
|
+
* @param {string} sSystemThemeRoot
|
|
361
|
+
* the system theme root, as determined by the startup service
|
|
362
|
+
*
|
|
358
363
|
* @returns {object} contains the theme and the theme root, undefined if no URL theme supplied
|
|
359
364
|
*
|
|
360
365
|
* @private
|
|
361
366
|
*/
|
|
362
367
|
function determineUrlTheme (sSystemThemeRoot) {
|
|
363
|
-
let sThemeUrlParameter;
|
|
364
368
|
let aThemeParts;
|
|
365
369
|
|
|
366
|
-
sThemeUrlParameter = oAbapUtils.getUrlParameterValue("sap-theme") || oAbapUtils.getUrlParameterValue("sap-ui-theme");
|
|
370
|
+
const sThemeUrlParameter = oAbapUtils.getUrlParameterValue("sap-theme") || oAbapUtils.getUrlParameterValue("sap-ui-theme");
|
|
367
371
|
if (sThemeUrlParameter) {
|
|
368
372
|
if (sThemeUrlParameter.indexOf("@") > 0) {
|
|
369
373
|
aThemeParts = sThemeUrlParameter.split("@", 2);
|
|
@@ -428,6 +432,12 @@ sap.ui.define([
|
|
|
428
432
|
/**
|
|
429
433
|
* Process themes
|
|
430
434
|
*
|
|
435
|
+
* @param {object} oStartupTheme
|
|
436
|
+
* the theme from the startup service
|
|
437
|
+
* @param {string} sSystemThemeRoot
|
|
438
|
+
* the system theme root, as determined by the startup service
|
|
439
|
+
*
|
|
440
|
+
* @returns {object} oBootTheme
|
|
431
441
|
* @private
|
|
432
442
|
*/
|
|
433
443
|
function processTheme (oStartupTheme, sSystemThemeRoot) {
|
|
@@ -690,13 +700,12 @@ sap.ui.define([
|
|
|
690
700
|
function createWaitForRendererCreatedPromise () {
|
|
691
701
|
const oPromise = new Promise((resolve, reject) => {
|
|
692
702
|
let oRenderer;
|
|
693
|
-
let fnOnRendererCreated;
|
|
694
703
|
|
|
695
|
-
fnOnRendererCreated
|
|
704
|
+
function fnOnRendererCreated () {
|
|
696
705
|
Log.info("Direct application start: resolving component waitFor promise after shell renderer created event fired.");
|
|
697
706
|
resolve();
|
|
698
707
|
getContainer().detachRendererCreatedEvent(fnOnRendererCreated);
|
|
699
|
-
}
|
|
708
|
+
}
|
|
700
709
|
|
|
701
710
|
EventHub.once("ShellNavigationInitialized").do(() => {
|
|
702
711
|
oRenderer = getContainer().getRendererInternal();
|