@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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/main/js/sap/ushell_abap/.library +1 -1
  3. package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +1 -1
  4. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +1 -1
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
  6. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +15 -1
  7. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
  8. package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.js +64 -14
  9. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  10. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1543 -22
  12. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +1 -1
  13. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
  15. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  16. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
  17. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +12 -9
  18. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.backend.config.requestor.js +198 -0
  19. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +5 -3
  20. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
  21. package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +4 -4
  22. package/src/main/js/sap/ushell_abap/library.js +2 -2
  23. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +50 -7
  24. package/src/main/js/sap/ushell_abap/pbServices/ui2/chipdefinition.xsd +0 -1
  25. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +47 -5
  26. package/ui5.yaml +5 -4
  27. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.get.server.config.Urls.js +0 -108
  28. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.server.config.js +0 -69
  29. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.validate.Url.js +0 -54
@@ -1,108 +0,0 @@
1
- // Copyright (c) 2009-2022 SAP SE, All Rights Reserved
2
-
3
- /**
4
- * @fileOverview a Getter to return an array of valid configuration URL
5
- */
6
- sap.ui.define([
7
- "./abap.validate.Url",
8
- "sap/base/util/ObjectPath",
9
- "sap/ushell_abap/pbServices/ui2/Utils",
10
- "sap/base/Log"
11
- ], function (
12
- fnValidateUrl,
13
- ObjectPath,
14
- Utils,
15
- Log
16
- ) {
17
- "use strict";
18
-
19
- return getServerConfigUrls;
20
-
21
- /**
22
- * Returns an array of valid configuration URLs. These URLs must point to a
23
- * JSON configuration file, and can be specified in three possible ways:
24
- *
25
- * 1. as an array, in window["sap-ushell-config"].launchpadConfiguration.configurationFile,
26
- * 2. as a string, in window["sap-ushell-config"].launchpadConfiguration.configurationFile,
27
- * 3. as a string via the sap-ushell-config-url URL parameter
28
- *
29
- * Precedence:
30
- *
31
- * Case 1 excludes case 2, i.e., the hardcoded url is ignored
32
- * Case 2 excludes case 3, i.e., the url parameter is ignored
33
- *
34
- * NOTE: if cases 3 and 1 occur at the same time, the url parameter is not
35
- * ignored, and will be returned as the last URL in the result array.
36
- *
37
- * Allowlist:
38
- *
39
- * For security reasons, in the cases #2 and #3 specified above, URL names
40
- * are validated (see fnValidateUrl). Validation is skipped in case #1.
41
- *
42
- * NOTE: an error is logged when duplicate URLs are found in the
43
- * configuration array, but these duplicates are returned anyway.
44
- *
45
- * NOTE: this method always returns an array (empty when no valid URLs were found).
46
- *
47
- * @returns {array} an array of valid URLs.
48
- *
49
- * @private
50
- *
51
- * @deprecated since 1.86.
52
- */
53
- function getServerConfigUrls () {
54
- var oConfig = ObjectPath.get("sap-ushell-config.launchpadConfiguration.configurationFile"),
55
-
56
- // can be string (hardcoded) OR array (coming from the server)
57
- vHardcodedUrlOrServerSideUrls = oConfig && oConfig["sap-ushell-config-url"],
58
- sHardcodedUrlOrParameterUrl,
59
- sValidationFailReason,
60
- aRequestUrls = [],
61
- mUrlCounts = {},
62
- aDuplicateUrls = [];
63
-
64
- if (Object.prototype.toString.call(vHardcodedUrlOrServerSideUrls) === "[object Array]") {
65
- // i.e., parameter comes from the server
66
- Array.prototype.push.apply(aRequestUrls, vHardcodedUrlOrServerSideUrls);
67
- } else if (typeof vHardcodedUrlOrServerSideUrls === "string") {
68
- // i.e., parameter was hardcoded
69
- sHardcodedUrlOrParameterUrl = vHardcodedUrlOrServerSideUrls;
70
- }
71
-
72
- // try url parameter if no hardcoded url
73
- sHardcodedUrlOrParameterUrl = sHardcodedUrlOrParameterUrl || (
74
- Utils.getParameterMap()["sap-ushell-config-url"] && Utils.getParameterMap()["sap-ushell-config-url"][0]
75
- );
76
-
77
- if (typeof sHardcodedUrlOrParameterUrl !== "undefined") {
78
- // inclusive language FLPCOREANDUX-4020: this configuration parameter is deprecated and will be removed
79
- // NOTE: url parameter is last in array
80
- var oAllowlist = ObjectPath.get("sap-ushell-config.launchpadConfiguration.configurationFile.configurationFileFolderWhitelist");
81
-
82
- sValidationFailReason = fnValidateUrl(sHardcodedUrlOrParameterUrl, oAllowlist);
83
- if (typeof sValidationFailReason !== "undefined") {
84
- Log.error(sValidationFailReason, null, "sap.ushell_abap.bootstrap");
85
- } else {
86
- aRequestUrls.push(sHardcodedUrlOrParameterUrl);
87
- }
88
- }
89
-
90
- // check for duplicates and log error in case
91
- aRequestUrls.forEach(function (sUrl) {
92
- if (!mUrlCounts.hasOwnProperty(sUrl)) {
93
- mUrlCounts[sUrl] = 0;
94
- }
95
- mUrlCounts[sUrl]++;
96
- if (mUrlCounts[sUrl] === 2) {
97
- aDuplicateUrls.push(sUrl);
98
- }
99
- });
100
- if (aDuplicateUrls.length > 0) {
101
- Log.error([
102
- "Duplicate Urls found in server configuration:", aDuplicateUrls.join(", ")
103
- ].join(" "), null, "sap.ushell_abap.bootstrap");
104
- }
105
-
106
- return aRequestUrls;
107
- }
108
- });
@@ -1,69 +0,0 @@
1
- // Copyright (c) 2009-2022 SAP SE, All Rights Reserved
2
-
3
- /**
4
- * @fileOverview Requests and parses the configuration associated to one or more server
5
- * configuration URLs
6
- */
7
- sap.ui.define([
8
- "./abap.get.server.config.Urls",
9
- "sap/ushell_abap/pbServices/ui2/Utils"
10
- ], function (
11
- fnGetServerConfigUrls,
12
- Utils
13
- ) {
14
- "use strict";
15
-
16
- return requestServerConfig;
17
-
18
- /**
19
- * Requests and parses the configuration associated to one or more server
20
- * configuration URLs asynchronously (see getServerConfigUrls method). Return the promise,
21
- * which is resolved successful if ALL content (urls) is retrieved and parsed
22
- * successfully. The reject is, if any of the contents
23
- * could not be retrieved or parsed.
24
- *
25
- * @param {function} getServerConfigUrls
26
- * function to get urls with server configs. If argument is not defined then abap.get.server.config.Urls is used
27
- * @returns {Promise}
28
- * Promise is resolved successful if all urls is retrieved and parsed successfully. Reject - if any of the contents
29
- * could not be retrieved or parsed. Return resolved promise with empty array, if there were no urls in configuration.
30
- *
31
- * @private
32
- *
33
- * @deprecated since 1.86.
34
- */
35
- function requestServerConfig (getServerConfigUrls) {
36
- var aConfigUrls,
37
- aRequestedPromise = [];
38
-
39
- getServerConfigUrls = getServerConfigUrls || fnGetServerConfigUrls;
40
- aConfigUrls = getServerConfigUrls();
41
-
42
- // return immediately if there are no urls
43
- if (aConfigUrls.length === 0) {
44
- return Promise.resolve([]);
45
- }
46
-
47
- aRequestedPromise = aConfigUrls.map(function (sUrl, iIdx) {
48
- return new Promise(function (resolve, reject) {
49
- Utils.get(
50
- sUrl,
51
- false, /*xml=*/
52
- function (sResponseText) {
53
- var oParsedResponse;
54
- try {
55
- oParsedResponse = JSON.parse(sResponseText);
56
- } catch (e) {
57
- reject(["parse error in server config file", "'" + sUrl + "'",
58
- "with content:", "'" + sResponseText + "'"].join(" "));
59
- }
60
- resolve(oParsedResponse);
61
- },
62
- reject
63
- );
64
- });
65
- });
66
-
67
- return Promise.all(aRequestedPromise);
68
- }
69
- });
@@ -1,54 +0,0 @@
1
- // Copyright (c) 2009-2022 SAP SE, All Rights Reserved
2
-
3
- /**
4
- * @fileOverview Validates a given Url
5
- */
6
- sap.ui.define([], function () {
7
- "use strict";
8
-
9
- return fnValidateUrl;
10
-
11
- /**
12
- * Validates the given URL.
13
- *
14
- * The validation consists of two steps.
15
- *
16
- * 1. name validation, in which it is checked that the url is
17
- * slash-separated, the filename is composed of an ASCII subset (i.e.,
18
- * letters, numbers and underscore), and ending with a .json extension.
19
- *
20
- * 2. allowing, in which the URL prefix is searched in an allowlist hardcoded in a config parameter
21
- *
22
- * NOTE: a falsy mAllowlist parameter causes this method to return an error message.
23
- *
24
- * @param {string} sUrl
25
- * The url to validate
26
- * @param {object} mAllowlist
27
- * An allowlist, mapping a url prefix to a boolean value that indicates
28
- * whether a URL starting with that prefix should be allowed.
29
- * @return {string|undefined}
30
- * The error message encountered during validation, or undefined if the url is valid.
31
- *
32
- * @deprecated since 1.86.
33
- */
34
-
35
- function fnValidateUrl (sUrl, mAllowlist) {
36
- // Check for allowed characters in the json file name
37
- var aRequestUrlComponents = /^((.*)\/)?[A-Za-z0-9_]+\.json$/.exec(sUrl),
38
- sRequestUrlPrefix;
39
-
40
- if (!aRequestUrlComponents) {
41
- return "name of configuration URL is not valid. Url is:\"" + sUrl + "\"";
42
- }
43
-
44
- sRequestUrlPrefix = typeof aRequestUrlComponents[1] === "undefined" ? "" : aRequestUrlComponents[1];
45
-
46
- if (!mAllowlist ||
47
- !mAllowlist.hasOwnProperty(sRequestUrlPrefix) ||
48
- !mAllowlist[sRequestUrlPrefix]) {
49
- return "URL for config file does not match restrictions. Url is:\"" + sUrl + "\"";
50
- }
51
-
52
- return undefined;
53
- }
54
- });