@sapui5/sap.ushell_abap 1.99.0 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/main/js/sap/ushell_abap/.library +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +15 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.js +64 -14
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.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 +1543 -22
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.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/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +12 -9
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.backend.config.requestor.js +198 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +5 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +4 -4
- package/src/main/js/sap/ushell_abap/library.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +50 -7
- package/src/main/js/sap/ushell_abap/pbServices/ui2/chipdefinition.xsd +0 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +47 -5
- package/ui5.yaml +5 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.get.server.config.Urls.js +0 -108
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.server.config.js +0 -69
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.validate.Url.js +0 -54
|
@@ -14,14 +14,17 @@ sap.ui.define([
|
|
|
14
14
|
"sap/ushell_abap/pbServices/ui2/Chip"
|
|
15
15
|
], function (
|
|
16
16
|
fnConfigureUshell,
|
|
17
|
-
|
|
17
|
+
Ui5BootHandler,
|
|
18
18
|
fnLoadLaunchpad,
|
|
19
|
-
|
|
19
|
+
Boottask,
|
|
20
20
|
sBootPath,
|
|
21
21
|
fnConfigureUi5,
|
|
22
22
|
fnExtractUi5LibsFromUshellConfig,
|
|
23
23
|
fnLoadBootstrapExtension,
|
|
24
|
-
bDebugSources,
|
|
24
|
+
bDebugSources,
|
|
25
|
+
CoreMinLoader,
|
|
26
|
+
ModulePreloader
|
|
27
|
+
/* Chip* */
|
|
25
28
|
) {
|
|
26
29
|
"use strict";
|
|
27
30
|
|
|
@@ -29,7 +32,7 @@ sap.ui.define([
|
|
|
29
32
|
oBootScript = document.getElementById("sap-ui-bootstrap"),
|
|
30
33
|
sBootstrapMode = oBootScript.getAttribute("data-ushell-xx-bootstrapmode") || "full",
|
|
31
34
|
bPreloadMode = (sBootstrapMode === "preload"),
|
|
32
|
-
oUi5BootPromise =
|
|
35
|
+
oUi5BootPromise = Ui5BootHandler.createUi5BootPromise();
|
|
33
36
|
|
|
34
37
|
window["sap-ui-debug"] = bDebugSources; //use in LaunchPageAdapter
|
|
35
38
|
oUShellConfig = fnConfigureUshell();
|
|
@@ -37,25 +40,25 @@ sap.ui.define([
|
|
|
37
40
|
ushellConfig: oUShellConfig,
|
|
38
41
|
libs: fnExtractUi5LibsFromUshellConfig(oUShellConfig),
|
|
39
42
|
theme: "sap_belize",
|
|
40
|
-
bootTask:
|
|
43
|
+
bootTask: Ui5BootHandler.resolveBootPromise,
|
|
41
44
|
onInitCallback: fnLoadLaunchpad
|
|
42
45
|
});
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
CoreMinLoader.load("sap.ushell_abap.bootstrap.evo");
|
|
45
48
|
|
|
46
49
|
if (bPreloadMode) {
|
|
47
50
|
//load flp-controls.js and flp/Component-preload.js if home page is opened
|
|
48
51
|
if (location.href && (location.href.endsWith("#Shell-home") || location.href.indexOf("#") === -1)) {
|
|
49
|
-
|
|
52
|
+
ModulePreloader.fnPreloadHomeBundle(sBootPath);
|
|
50
53
|
}
|
|
51
54
|
window["sap-ushell-bootstrap-resume"] = function () {
|
|
52
55
|
oUShellConfig = fnConfigureUshell(); //need to call one more time in order to merge config from metatag into sap-ushell-config
|
|
53
56
|
fnLoadBootstrapExtension(oUShellConfig);
|
|
54
|
-
|
|
57
|
+
Boottask.start(oUi5BootPromise);
|
|
55
58
|
};
|
|
56
59
|
} else {
|
|
57
60
|
fnLoadBootstrapExtension(oUShellConfig);
|
|
58
|
-
|
|
61
|
+
Boottask.start(oUi5BootPromise);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
});
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// Copyright (c) 2009-2022 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview Requests and parses the configuration associated to one or more back-ends
|
|
5
|
+
* configuration URLs
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ushell_abap/pbServices/ui2/Utils",
|
|
9
|
+
"sap/base/util/ObjectPath",
|
|
10
|
+
"sap/base/Log"
|
|
11
|
+
], function (
|
|
12
|
+
Utils,
|
|
13
|
+
ObjectPath,
|
|
14
|
+
Log
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns an array of valid configuration URLs. These URLs must point to a
|
|
20
|
+
* JSON configuration file, and can be specified in three possible ways:
|
|
21
|
+
*
|
|
22
|
+
* 1. as an array, in window["sap-ushell-config"].launchpadConfiguration.configurationFile,
|
|
23
|
+
* 2. as a string, in window["sap-ushell-config"].launchpadConfiguration.configurationFile,
|
|
24
|
+
* 3. as a string via the sap-ushell-config-url URL parameter
|
|
25
|
+
*
|
|
26
|
+
* Precedence:
|
|
27
|
+
*
|
|
28
|
+
* Case 1 excludes case 2, i.e., the hardcoded url is ignored
|
|
29
|
+
* Case 2 excludes case 3, i.e., the url parameter is ignored
|
|
30
|
+
*
|
|
31
|
+
* NOTE: if cases 3 and 1 occur at the same time, the url parameter is not
|
|
32
|
+
* ignored, and will be returned as the last URL in the result array.
|
|
33
|
+
*
|
|
34
|
+
* Allowlist:
|
|
35
|
+
*
|
|
36
|
+
* For security reasons, in the cases #2 and #3 specified above, URL names
|
|
37
|
+
* are validated (see fnValidateUrl). Validation is skipped in case #1.
|
|
38
|
+
*
|
|
39
|
+
* NOTE: an error is logged when duplicate URLs are found in the
|
|
40
|
+
* configuration array, but these duplicates are returned anyway.
|
|
41
|
+
*
|
|
42
|
+
* NOTE: this method always returns an array (empty when no valid URLs were found).
|
|
43
|
+
*
|
|
44
|
+
* @returns {array} an array of valid URLs.
|
|
45
|
+
*
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
function fnGetBackendConfigUrls () {
|
|
49
|
+
var oConfig = ObjectPath.get("sap-ushell-config.launchpadConfiguration.configurationFile"),
|
|
50
|
+
// can be string (hardcoded) OR array (coming from the back-end)
|
|
51
|
+
vHardcodedUrlOrBackendUrls = oConfig && oConfig["sap-ushell-config-url"],
|
|
52
|
+
sHardcodedUrlOrParameterUrl,
|
|
53
|
+
sValidationFailReason,
|
|
54
|
+
aRequestUrls = [],
|
|
55
|
+
mUrlCounts = {},
|
|
56
|
+
aDuplicateUrls = [];
|
|
57
|
+
|
|
58
|
+
if (Object.prototype.toString.call(vHardcodedUrlOrBackendUrls) === "[object Array]") {
|
|
59
|
+
// i.e., parameter comes from the back-end
|
|
60
|
+
Array.prototype.push.apply(aRequestUrls, vHardcodedUrlOrBackendUrls);
|
|
61
|
+
} else if (typeof vHardcodedUrlOrBackendUrls === "string") {
|
|
62
|
+
// i.e., parameter was hardcoded
|
|
63
|
+
sHardcodedUrlOrParameterUrl = vHardcodedUrlOrBackendUrls;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// try url parameter if no hardcoded url
|
|
67
|
+
sHardcodedUrlOrParameterUrl = sHardcodedUrlOrParameterUrl || (
|
|
68
|
+
Utils.getParameterMap()["sap-ushell-config-url"] && Utils.getParameterMap()["sap-ushell-config-url"][0]
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
if (typeof sHardcodedUrlOrParameterUrl !== "undefined") {
|
|
72
|
+
// inclusive language FLPCOREANDUX-4020: this configuration parameter is deprecated and will be removed
|
|
73
|
+
// NOTE: url parameter is last in array
|
|
74
|
+
var oAllowlist = ObjectPath.get("sap-ushell-config.launchpadConfiguration.configurationFile.configurationFileFolderWhitelist");
|
|
75
|
+
|
|
76
|
+
sValidationFailReason = fnValidateUrl(sHardcodedUrlOrParameterUrl, oAllowlist);
|
|
77
|
+
if (typeof sValidationFailReason !== "undefined") {
|
|
78
|
+
Log.error(sValidationFailReason, null, "sap.ushell_abap.bootstrap");
|
|
79
|
+
} else {
|
|
80
|
+
aRequestUrls.push(sHardcodedUrlOrParameterUrl);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// check for duplicates and log error in case
|
|
85
|
+
aRequestUrls.forEach(function (sUrl) {
|
|
86
|
+
if (!mUrlCounts.hasOwnProperty(sUrl)) {
|
|
87
|
+
mUrlCounts[sUrl] = 0;
|
|
88
|
+
}
|
|
89
|
+
mUrlCounts[sUrl]++;
|
|
90
|
+
if (mUrlCounts[sUrl] === 2) {
|
|
91
|
+
aDuplicateUrls.push(sUrl);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
if (aDuplicateUrls.length > 0) {
|
|
95
|
+
Log.error([
|
|
96
|
+
"Duplicate Urls found in back-end configuration:", aDuplicateUrls.join(", ")
|
|
97
|
+
].join(" "), null, "sap.ushell_abap.bootstrap");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return aRequestUrls;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Validates the given URL.
|
|
105
|
+
*
|
|
106
|
+
* The validation consists of two steps.
|
|
107
|
+
*
|
|
108
|
+
* 1. name validation, in which it is checked that the url is
|
|
109
|
+
* slash-separated, the filename is composed of an ASCII subset (i.e.,
|
|
110
|
+
* letters, numbers and underscore), and ending with a .json extension.
|
|
111
|
+
*
|
|
112
|
+
* 2. allowing, in which the URL prefix is searched in an allowlist hardcoded in a config parameter
|
|
113
|
+
*
|
|
114
|
+
* NOTE: a falsy mAllowlist parameter causes this method to return an error message.
|
|
115
|
+
*
|
|
116
|
+
* @param {string} sUrl
|
|
117
|
+
* The url to validate
|
|
118
|
+
* @param {object} mAllowlist
|
|
119
|
+
* An allowlist, mapping a url prefix to a boolean value that indicates
|
|
120
|
+
* whether a URL starting with that prefix should be allowed.
|
|
121
|
+
* @return {string|undefined}
|
|
122
|
+
* The error message encountered during validation, or undefined if the url is valid.
|
|
123
|
+
*
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
function fnValidateUrl (sUrl, mAllowlist) {
|
|
127
|
+
// Check for allowed characters in the json file name
|
|
128
|
+
var aRequestUrlComponents = /^((.*)\/)?[A-Za-z0-9_]+\.json$/.exec(sUrl),
|
|
129
|
+
sRequestUrlPrefix;
|
|
130
|
+
|
|
131
|
+
if (!aRequestUrlComponents) {
|
|
132
|
+
return "name of configuration URL is not valid. Url is:\"" + sUrl + "\"";
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
sRequestUrlPrefix = typeof aRequestUrlComponents[1] === "undefined" ? "" : aRequestUrlComponents[1];
|
|
136
|
+
|
|
137
|
+
if (!mAllowlist ||
|
|
138
|
+
!mAllowlist.hasOwnProperty(sRequestUrlPrefix) ||
|
|
139
|
+
!mAllowlist[sRequestUrlPrefix]) {
|
|
140
|
+
return "URL for config file does not match restrictions. Url is:\"" + sUrl + "\"";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Requests and parses the configuration associated to one or more back-end
|
|
149
|
+
* configuration URLs asynchronously (see getBackendConfigUrls method). Return the promise,
|
|
150
|
+
* which is resolved successful if ALL content (urls) is retrieved and parsed
|
|
151
|
+
* successfully. The reject is, if any of the contents
|
|
152
|
+
* could not be retrieved or parsed.
|
|
153
|
+
*
|
|
154
|
+
* @returns {Promise}
|
|
155
|
+
* Promise is resolved successful if all urls is retrieved and parsed successfully. Reject - if any of the contents
|
|
156
|
+
* could not be retrieved or parsed. Return resolved promise with empty array, if there were no urls in configuration.
|
|
157
|
+
*
|
|
158
|
+
* @private
|
|
159
|
+
*/
|
|
160
|
+
function requestBackendConfig () {
|
|
161
|
+
var aConfigUrls,
|
|
162
|
+
aRequestedPromise = [];
|
|
163
|
+
|
|
164
|
+
aConfigUrls = fnGetBackendConfigUrls();
|
|
165
|
+
|
|
166
|
+
// return immediately if there are no urls
|
|
167
|
+
if (aConfigUrls.length === 0) {
|
|
168
|
+
return Promise.resolve([]);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
aRequestedPromise = aConfigUrls.map(function (sUrl, iIdx) {
|
|
172
|
+
return new Promise(function (resolve, reject) {
|
|
173
|
+
Utils.get(
|
|
174
|
+
sUrl,
|
|
175
|
+
false, /*xml=*/
|
|
176
|
+
function (sResponseText) {
|
|
177
|
+
var oParsedResponse;
|
|
178
|
+
try {
|
|
179
|
+
oParsedResponse = JSON.parse(sResponseText);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
reject(["parse error in back-end config file", "'" + sUrl + "'",
|
|
182
|
+
"with content:", "'" + sResponseText + "'"].join(" "));
|
|
183
|
+
}
|
|
184
|
+
resolve(oParsedResponse);
|
|
185
|
+
},
|
|
186
|
+
reject
|
|
187
|
+
);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
return Promise.all(aRequestedPromise);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return {
|
|
194
|
+
request: requestBackendConfig,
|
|
195
|
+
_validateUrl: fnValidateUrl,
|
|
196
|
+
_getBackendConfigUrls: fnGetBackendConfigUrls
|
|
197
|
+
};
|
|
198
|
+
});
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
sap.ui.define([
|
|
4
4
|
"sap/ushell/utils",
|
|
5
5
|
"sap/base/util/ObjectPath",
|
|
6
|
-
"sap/ushell_abap/pbServices/ui2/Utils"
|
|
6
|
+
"sap/ushell_abap/pbServices/ui2/Utils",
|
|
7
|
+
"sap/base/Log"
|
|
7
8
|
], function (
|
|
8
9
|
oUshellUtils,
|
|
9
10
|
ObjectPath,
|
|
10
|
-
Utils
|
|
11
|
+
Utils,
|
|
12
|
+
Log
|
|
11
13
|
) {
|
|
12
14
|
"use strict";
|
|
13
15
|
|
|
@@ -114,7 +116,7 @@ sap.ui.define([
|
|
|
114
116
|
// UI5's config cannot be used here, so check local storage
|
|
115
117
|
bSapStatistics = bSapStatistics || (oUshellUtils.getLocalStorageItem("sap-ui-statistics") === "X");
|
|
116
118
|
} catch (e) {
|
|
117
|
-
|
|
119
|
+
Log.warning(
|
|
118
120
|
"failed to read sap-statistics setting from local storage",
|
|
119
121
|
null,
|
|
120
122
|
"sap.ushell_abap.bootstrap"
|
|
@@ -4,7 +4,7 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ushell/bootstrap/common/common.load.xhrlogon",
|
|
5
5
|
"sap/ushell/utils",
|
|
6
6
|
"./abap.bootstrap.utils",
|
|
7
|
-
"./abap.
|
|
7
|
+
"./abap.backend.config.requestor",
|
|
8
8
|
"./abap.request.startup",
|
|
9
9
|
"./abap.request.pageset",
|
|
10
10
|
"./abap.xhr.handler",
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/ui/performance/trace/initTraces",
|
|
14
14
|
"sap/base/util/ObjectPath",
|
|
15
15
|
"sap/base/Log",
|
|
16
|
-
"sap/ushell/
|
|
16
|
+
"sap/ushell/Container",
|
|
17
17
|
"sap/ui/Device",
|
|
18
18
|
"sap/ushell_abap/pbServices/ui2/Utils"
|
|
19
19
|
],
|
|
@@ -21,7 +21,7 @@ function (
|
|
|
21
21
|
oXhrLogonLib,
|
|
22
22
|
oUshellUtils,
|
|
23
23
|
oAbapUtils,
|
|
24
|
-
|
|
24
|
+
BackendConfigRequestor,
|
|
25
25
|
oStartupHandler,
|
|
26
26
|
oPageSetHandler,
|
|
27
27
|
oXhrHandler,
|
|
@@ -1032,7 +1032,7 @@ function (
|
|
|
1032
1032
|
return Promise.resolve({});
|
|
1033
1033
|
});
|
|
1034
1034
|
|
|
1035
|
-
oRequestServerSideConfigPromise =
|
|
1035
|
+
oRequestServerSideConfigPromise = BackendConfigRequestor.request().then(function (aConfigs) {
|
|
1036
1036
|
return Promise.resolve(aConfigs);
|
|
1037
1037
|
}, function (sMessage) {
|
|
1038
1038
|
Log.error("Could not load server configuration: " + sMessage, null,
|
|
@@ -13,13 +13,13 @@ sap.ui.define([
|
|
|
13
13
|
* @namespace
|
|
14
14
|
* @name sap.ushell_abap
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.100.0
|
|
17
17
|
* @private
|
|
18
18
|
* @ui5-restricted
|
|
19
19
|
*/
|
|
20
20
|
sap.ui.getCore().initLibrary({
|
|
21
21
|
name: "sap.ushell_abap",
|
|
22
|
-
version: "1.
|
|
22
|
+
version: "1.100.0",
|
|
23
23
|
dependencies: ["sap.ui.core", "sap.m"],
|
|
24
24
|
noLibraryCSS: true,
|
|
25
25
|
extensions: {
|
|
@@ -10,14 +10,16 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ushell_abap/pbServices/ui2/Error",
|
|
11
11
|
"sap/ushell_abap/pbServices/ui2/ChipDefinition",
|
|
12
12
|
"sap/base/Log",
|
|
13
|
-
"sap/ui/thirdparty/jquery"
|
|
13
|
+
"sap/ui/thirdparty/jquery",
|
|
14
|
+
"sap/ui/core/Manifest"
|
|
14
15
|
], function (
|
|
15
16
|
Bag,
|
|
16
17
|
Utils,
|
|
17
18
|
SrvcError,
|
|
18
19
|
ChipDefinition,
|
|
19
20
|
Log,
|
|
20
|
-
jQuery
|
|
21
|
+
jQuery,
|
|
22
|
+
Manifest
|
|
21
23
|
) {
|
|
22
24
|
"use strict";
|
|
23
25
|
|
|
@@ -27,6 +29,11 @@ sap.ui.define([
|
|
|
27
29
|
*/
|
|
28
30
|
var mContractsByName = {};
|
|
29
31
|
|
|
32
|
+
/**
|
|
33
|
+
* A cache containing all manifests which were already loaded
|
|
34
|
+
*/
|
|
35
|
+
var _oManifestCache = {};
|
|
36
|
+
|
|
30
37
|
// "private" methods (static) without need to access properties -------------
|
|
31
38
|
|
|
32
39
|
/**
|
|
@@ -636,11 +643,23 @@ sap.ui.define([
|
|
|
636
643
|
}
|
|
637
644
|
|
|
638
645
|
if (oImplementation.componentName) {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
646
|
+
var oLoadManifestPromise;
|
|
647
|
+
|
|
648
|
+
// The standard tiles have no manifest. Since we know this and are in control of it we can save the server roundtrip for those.
|
|
649
|
+
if (sBaseChipId === "X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER" || sBaseChipId === "X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER") {
|
|
650
|
+
oLoadManifestPromise = Promise.resolve(false);
|
|
651
|
+
} else {
|
|
652
|
+
oLoadManifestPromise = this._loadManifest(oImplementation.$UrlPrefix + "/manifest.json");
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
return oLoadManifestPromise.then(function (vManifest) {
|
|
656
|
+
// SAPUI5 component
|
|
657
|
+
return Component.create({
|
|
658
|
+
name: oImplementation.componentName,
|
|
659
|
+
componentData: oData,
|
|
660
|
+
manifest: vManifest
|
|
661
|
+
});
|
|
662
|
+
})
|
|
644
663
|
.then(function (oComponent) {
|
|
645
664
|
return new ComponentContainer({
|
|
646
665
|
component: oComponent
|
|
@@ -662,6 +681,30 @@ sap.ui.define([
|
|
|
662
681
|
}.bind(this));
|
|
663
682
|
};
|
|
664
683
|
|
|
684
|
+
/**
|
|
685
|
+
* Loads and caches a manifest for the given URL.
|
|
686
|
+
* Note: The manifest object is read-only!
|
|
687
|
+
*
|
|
688
|
+
* @param {string} sUrl The URL of the manifest
|
|
689
|
+
* @returns {Promise<object>} The read-only raw manifest
|
|
690
|
+
*/
|
|
691
|
+
this._loadManifest = function (sUrl) {
|
|
692
|
+
if (!_oManifestCache[sUrl]) {
|
|
693
|
+
_oManifestCache[sUrl] = Manifest.load({
|
|
694
|
+
manifestUrl: sUrl,
|
|
695
|
+
async: true
|
|
696
|
+
})
|
|
697
|
+
.then(function (oManifest) {
|
|
698
|
+
return oManifest.getRawJson();
|
|
699
|
+
})
|
|
700
|
+
.catch(function () {
|
|
701
|
+
return null;
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
return _oManifestCache[sUrl];
|
|
706
|
+
};
|
|
707
|
+
|
|
665
708
|
/**
|
|
666
709
|
* Returns the catalog by which this remote CHIP was loaded. This catalog is
|
|
667
710
|
* <code>undefined</code> if the CHIP is from the same system as the catalog.
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
fnDirtyProvider,
|
|
30
30
|
bEnabled = false,
|
|
31
31
|
fnSaveHandler,
|
|
32
|
-
fnUiProvider
|
|
32
|
+
fnUiProvider,
|
|
33
|
+
fnAsyncUiProvider;
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Attaches the given event handler to the "cancel" event which is fired whenever the user
|
|
@@ -171,7 +172,6 @@
|
|
|
171
172
|
fnDirtyProvider = fnProvider;
|
|
172
173
|
};
|
|
173
174
|
|
|
174
|
-
/* eslint-disable valid-jsdoc*/ // < > are confusing eslint
|
|
175
175
|
/**
|
|
176
176
|
* Determines the callback function which provides the configuration UI for this CHIP. The
|
|
177
177
|
* callback has to return an SAPUI5 control (<code>sap.ui.core.Control</code>), which, for
|
|
@@ -204,7 +204,31 @@
|
|
|
204
204
|
this.setUiProvider = function (fnProvider) {
|
|
205
205
|
fnUiProvider = fnProvider;
|
|
206
206
|
};
|
|
207
|
-
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Determines the callback function which provides the configuration UI for this CHIP. The
|
|
210
|
+
* callback has to return a Promise which resolves to a SAPUI5 control (<code>sap.ui.core.Control</code>).
|
|
211
|
+
* This can, for example, be a view or a component wrapped into a <code>sap.ui.core.ComponentContainer</code>.
|
|
212
|
+
*
|
|
213
|
+
* An embedding application calls this function each time it wants to display the CHIP's
|
|
214
|
+
* configuration UI. Once the user chooses to save or cancel the configuration, the UI will be
|
|
215
|
+
* removed from the embedding application's UI, but not destroyed! Use the event handlers for
|
|
216
|
+
* the corresponding "save" and "cancel" events to clean up the UI as necessary (e.g. destroy
|
|
217
|
+
* it).
|
|
218
|
+
*
|
|
219
|
+
* @name chip.configurationUi.setAsyncUiProvider
|
|
220
|
+
* @function
|
|
221
|
+
* @since 1.100.0
|
|
222
|
+
* @param {function} fnAsyncProvider
|
|
223
|
+
* a callback which returns a <code>Promise</code> that resolves <code>sap.ui.core.Control</code>
|
|
224
|
+
* representing this CHIP's configuration UI.
|
|
225
|
+
*
|
|
226
|
+
* @see chip.configurationUi.attachCancel
|
|
227
|
+
* @see chip.configurationUi.attachSave
|
|
228
|
+
*/
|
|
229
|
+
this.setAsyncUiProvider = function (fnAsyncProvider) {
|
|
230
|
+
fnAsyncUiProvider = fnAsyncProvider;
|
|
231
|
+
};
|
|
208
232
|
|
|
209
233
|
/**
|
|
210
234
|
* @namespace The namespace for the contract interface (to be used by a page builder) for
|
|
@@ -266,7 +290,6 @@
|
|
|
266
290
|
return fnSaveHandler ? fnSaveHandler() : undefined;
|
|
267
291
|
},
|
|
268
292
|
|
|
269
|
-
/* eslint-disable valid-jsdoc*/ // < > are confusing eslint
|
|
270
293
|
/**
|
|
271
294
|
* Returns this CHIP's configuration UI, if available.
|
|
272
295
|
*
|
|
@@ -286,7 +309,26 @@
|
|
|
286
309
|
getUi: function (mParameters) {
|
|
287
310
|
return fnUiProvider ? fnUiProvider(mParameters) : undefined;
|
|
288
311
|
},
|
|
289
|
-
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Returns this CHIP's configuration UI, if available.
|
|
315
|
+
*
|
|
316
|
+
* @param {Object<string,string>} [mParameters]
|
|
317
|
+
* Since 1.21.0 an optional parameter map can be passed to the UI provider. This map can be
|
|
318
|
+
* used for example to pass default configuration values to the UI.
|
|
319
|
+
*
|
|
320
|
+
* @returns {Promise<sap.ui.core.Control>}
|
|
321
|
+
* this CHIP's configuration UI or <code>undefined</code>
|
|
322
|
+
*
|
|
323
|
+
* @name contract.configurationUi.getUi
|
|
324
|
+
* @function
|
|
325
|
+
* @since 1.11.0
|
|
326
|
+
*
|
|
327
|
+
* @see chip.configurationUi.setUiProvider
|
|
328
|
+
*/
|
|
329
|
+
getUiAsync: function (mParameters) {
|
|
330
|
+
return fnAsyncUiProvider ? fnAsyncUiProvider(mParameters) : undefined;
|
|
331
|
+
},
|
|
290
332
|
|
|
291
333
|
/**
|
|
292
334
|
* Tells whether this CHIP's configuration UI is currently in a "dirty" state (contains
|
package/ui5.yaml
CHANGED
|
@@ -71,7 +71,7 @@ builder:
|
|
|
71
71
|
- sap/ushell/services/_AppState/AppState.js
|
|
72
72
|
- sap/ushell/services/_AppState/AppStatePersistencyMethod.js
|
|
73
73
|
- sap/ushell/services/AppLifeCycle.js
|
|
74
|
-
- sap/ushell/
|
|
74
|
+
- sap/ushell/Container.js
|
|
75
75
|
- sap/ushell/services/CrossApplicationNavigation.js
|
|
76
76
|
- sap/ushell/services/_CrossApplicationNavigation/utils.js
|
|
77
77
|
- sap/ushell/services/Personalization.js
|
|
@@ -352,7 +352,7 @@ builder:
|
|
|
352
352
|
- sap/ushell/services/AppState.js
|
|
353
353
|
- sap/ushell/services/ClientSideTargetResolution.js
|
|
354
354
|
- sap/ushell/services/CommonDataModel.js
|
|
355
|
-
- sap/ushell/
|
|
355
|
+
- sap/ushell/Container.js
|
|
356
356
|
- sap/ushell/services/CrossApplicationNavigation.js
|
|
357
357
|
- sap/ushell/services/DarkModeSupport.js
|
|
358
358
|
- sap/ushell/services/LaunchPage.js
|
|
@@ -497,7 +497,6 @@ builder:
|
|
|
497
497
|
- '!sap/ushell/components/tiles/applauncherdynamic/DynamicTile.view.js'
|
|
498
498
|
- '!sap/ushell/components/tiles/cdm/'
|
|
499
499
|
- '!sap/ushell/components/tiles/utils.js'
|
|
500
|
-
- '!sap/ushell/components/tiles/utilsRT.js'
|
|
501
500
|
- '!sap/ushell/adapters/'
|
|
502
501
|
- '!sap/ushell/applications/'
|
|
503
502
|
- '!sap/ushell/appRuntime/'
|
|
@@ -578,6 +577,8 @@ builder:
|
|
|
578
577
|
- sap/m/Table.js
|
|
579
578
|
- sap/m/TileContent.js
|
|
580
579
|
- sap/m/TileContentRenderer.js
|
|
580
|
+
- sap/f/GridContainer.js
|
|
581
|
+
- sap/f/GridContainerItemLayoutData.js
|
|
581
582
|
- sap/ushell/library.js
|
|
582
583
|
- sap/ushell/CanvasShapesManager.js
|
|
583
584
|
- sap/ushell/Fiori20AdapterTest.js
|
|
@@ -606,7 +607,7 @@ builder:
|
|
|
606
607
|
- sap/ushell/services/AppState.js
|
|
607
608
|
- sap/ushell/services/ClientSideTargetResolution.js
|
|
608
609
|
- sap/ushell/services/CommonDataModel.js
|
|
609
|
-
- sap/ushell/
|
|
610
|
+
- sap/ushell/Container.js
|
|
610
611
|
- sap/ushell/services/CrossApplicationNavigation.js
|
|
611
612
|
- sap/ushell/services/DarkModeSupport.js
|
|
612
613
|
- sap/ushell/services/LaunchPage.js
|