@sapui5/sap.suite.ui.generic.template 1.127.4 → 1.127.6
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/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/utils.js +48 -39
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +42 -5
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +2 -2
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json
CHANGED
|
@@ -2,50 +2,59 @@
|
|
|
2
2
|
sap.ui.define([], function() {
|
|
3
3
|
"use strict";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
var bIsIcon = sImageUrl.startsWith("sap-icon://");
|
|
14
|
-
if (bSuppressIcons && bIsIcon) {
|
|
15
|
-
return "";
|
|
16
|
-
}
|
|
17
|
-
if (bIsIcon || sImageUrl.startsWith("/") || sImageUrl.startsWith("http://") || sImageUrl.startsWith("https://")) {
|
|
18
|
-
return sImageUrl; // Absolute URL, nothing has to be changed
|
|
19
|
-
}
|
|
20
|
-
// Relative URL, has to be adjusted
|
|
21
|
-
return sap.ui.require.toUrl(sAppComponentName.replace(/\./g, "/")) + "/" + sImageUrl; //replacing dots by slashes before calling sap.ui.require.toUrl method. com.xyz.abc to com/xyz/abc
|
|
5
|
+
// If images are included in the UI app they need to specify the path relatively (e.g. images/image.jpg) to support
|
|
6
|
+
// different platforms like ABAP and HCP. The relative path has to be used because the absolute paths differ from platform
|
|
7
|
+
// to platform. The rule is if the image url doesn't start with a / or sap-icon:// or http(s):// then it's a relative url and the absolute
|
|
8
|
+
// path has to be added by the framework. This path can be retrieved with sap.ui.require.toUrl and the component name.
|
|
9
|
+
function fnAdjustImageUrlPath(sImageUrl, sAppComponentName, bSuppressIcons) {
|
|
10
|
+
if (!sImageUrl) {
|
|
11
|
+
return "";
|
|
22
12
|
}
|
|
13
|
+
var bIsIcon = sImageUrl.startsWith("sap-icon://");
|
|
14
|
+
if (bSuppressIcons && bIsIcon) {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
if (bIsIcon || sImageUrl.startsWith("/") || sImageUrl.startsWith("http://") || sImageUrl.startsWith("https://")) {
|
|
18
|
+
return sImageUrl; // Absolute URL, nothing has to be changed
|
|
19
|
+
}
|
|
20
|
+
// Relative URL, has to be adjusted
|
|
21
|
+
return sap.ui.require.toUrl(sAppComponentName.replace(/\./g, "/")) + "/" + sImageUrl; //replacing dots by slashes before calling sap.ui.require.toUrl method. com.xyz.abc to com/xyz/abc
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
if (a.length > b.length) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
return a.every(function(entry) {
|
|
43
|
-
return b.includes(entry);
|
|
44
|
-
});
|
|
24
|
+
// Function check is B array values is a subset of A array values.
|
|
25
|
+
// A = [], B = ["1", "2", "3"] -> true
|
|
26
|
+
// A = ["4"], B = ["1", "2", "3"] -> false
|
|
27
|
+
// A = ["1"], B = ["1", "2", "3"] -> true
|
|
28
|
+
// A = ["1", "3"], B = ["1", "2", "3"] -> true
|
|
29
|
+
// A = ["3", "2", "1"], B = ["1", "2", "3"] -> true
|
|
30
|
+
// A = ["1", "4"], B = ["1", "2", "3"] -> false
|
|
31
|
+
// A = ["1", "2", "3", "4"], B = ["1", "2", "3"] -> false
|
|
32
|
+
function fnIsASubsetOfB(a, b) {
|
|
33
|
+
if (a === b) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
if (!a || !b) {
|
|
37
|
+
return false;
|
|
45
38
|
}
|
|
39
|
+
if (a.length > b.length) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return a.every(function(entry) {
|
|
43
|
+
return b.includes(entry);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Function to check if a string contains only ASCII characters only. Regular expression
|
|
48
|
+
// used consider [SPACE] to ~ (ASCII 32 to 126) printable ASCII characters. Control characters
|
|
49
|
+
// (ASCII 0 to 31) and DEL character (ASCII 127) are not considered as they could not be part
|
|
50
|
+
// of the string. Method returns true if the string contains only ASCII characters else false.
|
|
51
|
+
function fnIsASCII(sString) {
|
|
52
|
+
return /^[\x20-\x7E]*$/.test(sString);
|
|
53
|
+
}
|
|
46
54
|
|
|
47
55
|
return {
|
|
48
56
|
adjustImageUrlPath: fnAdjustImageUrlPath,
|
|
49
|
-
isASubsetOfB: fnIsASubsetOfB
|
|
57
|
+
isASubsetOfB: fnIsASubsetOfB,
|
|
58
|
+
isASCII: fnIsASCII
|
|
50
59
|
};
|
|
51
60
|
});
|
|
@@ -943,7 +943,7 @@ sap.ui.define([
|
|
|
943
943
|
* @public
|
|
944
944
|
* @extends sap.ui.core.UIComponent
|
|
945
945
|
* @author SAP SE
|
|
946
|
-
* @version 1.127.
|
|
946
|
+
* @version 1.127.6
|
|
947
947
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
948
948
|
*/
|
|
949
949
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -27,9 +27,38 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
27
27
|
'sap/ui/performance/trace/FESRHelper',
|
|
28
28
|
"sap/ui/core/CustomData",
|
|
29
29
|
"sap/m/VBox",
|
|
30
|
-
"sap/
|
|
31
|
-
], function(
|
|
32
|
-
|
|
30
|
+
"sap/suite/ui/generic/template/genericUtilities/utils"
|
|
31
|
+
], function(
|
|
32
|
+
BaseObject,
|
|
33
|
+
Event,
|
|
34
|
+
MessageBox,
|
|
35
|
+
Sorter,
|
|
36
|
+
controlHelper,
|
|
37
|
+
expressionHelper,
|
|
38
|
+
testableHelper,
|
|
39
|
+
oDataModelHelper,
|
|
40
|
+
JSONModel,
|
|
41
|
+
AnnotationHelper,
|
|
42
|
+
Controller,
|
|
43
|
+
FeLogger,
|
|
44
|
+
MessageUtils,
|
|
45
|
+
SideEffectUtil,
|
|
46
|
+
extend,
|
|
47
|
+
isEmptyObject,
|
|
48
|
+
deepExtend,
|
|
49
|
+
CRUDHelper,
|
|
50
|
+
XMLView,
|
|
51
|
+
FormatUtil,
|
|
52
|
+
FileUploaderParameter,
|
|
53
|
+
IconPool,
|
|
54
|
+
ServiceContainer,
|
|
55
|
+
ContactCardDetailHelper,
|
|
56
|
+
mLibrary,
|
|
57
|
+
Button,
|
|
58
|
+
FESRHelper,
|
|
59
|
+
CustomData,
|
|
60
|
+
VBox,
|
|
61
|
+
genericUtils) {
|
|
33
62
|
"use strict";
|
|
34
63
|
|
|
35
64
|
var oLogger = new FeLogger("lib.CommonEventHandlers").getLogger();
|
|
@@ -1927,7 +1956,11 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1927
1956
|
}
|
|
1928
1957
|
if (oFileUploader.FUEl.files[0].name){
|
|
1929
1958
|
var headerParameterContentDispositionToken = new FileUploaderParameter();
|
|
1930
|
-
var
|
|
1959
|
+
var sUploadedFileName = oFileUploader.FUEl.files[0].name;
|
|
1960
|
+
if (!genericUtils.isASCII(sUploadedFileName)) {
|
|
1961
|
+
sUploadedFileName = encodeURIComponent(sUploadedFileName);
|
|
1962
|
+
}
|
|
1963
|
+
var fileName = "filename=" + sUploadedFileName;
|
|
1931
1964
|
headerParameterContentDispositionToken.setName("Content-Disposition");
|
|
1932
1965
|
headerParameterContentDispositionToken.setValue(fileName);
|
|
1933
1966
|
oFileUploader.addHeaderParameter(headerParameterContentDispositionToken);
|
|
@@ -1987,11 +2020,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1987
2020
|
oPrivModel.setProperty("/generic/controlProperties/" + "fileUploader/" + sEntitySet, oFileUploaderSettings);
|
|
1988
2021
|
}
|
|
1989
2022
|
|
|
1990
|
-
|
|
2023
|
+
// URLEncoded filenames are decoded by Chrome, Firefox browsers but Safari doesn't do this automatically.
|
|
2024
|
+
// Therefore, FE decodes it on our side & ensure actual file name is used for further processing.
|
|
2025
|
+
oFileUploaderSettings.fileName = decodeURIComponent(oEvent.mParameters.fileName);
|
|
1991
2026
|
var fileType = oEvent.mParameters.requestHeaders.find(function(requestHeader) {
|
|
1992
2027
|
if (requestHeader.name === "Content-Type") {
|
|
1993
2028
|
return requestHeader;
|
|
1994
2029
|
}
|
|
2030
|
+
|
|
2031
|
+
return undefined;
|
|
1995
2032
|
});
|
|
1996
2033
|
oFileUploaderSettings.fileType = fileType.value;
|
|
1997
2034
|
var bIcon = IconPool.getIconForMimeType(fileType.value);
|
|
@@ -25,9 +25,9 @@ ST_SUCCESS=Con \u00E9xito
|
|
|
25
25
|
|
|
26
26
|
ST_CHANGES_APPLIED=Se han aplicado las modificaciones
|
|
27
27
|
|
|
28
|
-
DATA_LOSS_MESSAGE=
|
|
28
|
+
DATA_LOSS_MESSAGE=Sus entradas se perder\u00E1n al abandonar esta p\u00E1gina.
|
|
29
29
|
|
|
30
|
-
DATA_LOSS_GENERAL_MESSAGE=Si
|
|
30
|
+
DATA_LOSS_GENERAL_MESSAGE=Si contin\u00FAa se perder\u00E1n sus entradas.
|
|
31
31
|
|
|
32
32
|
PROCEED=Continuar
|
|
33
33
|
|
|
@@ -3149,7 +3149,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3149
3149
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3150
3150
|
* @public
|
|
3151
3151
|
* @extends sap.ui.base.Object
|
|
3152
|
-
* @version 1.127.
|
|
3152
|
+
* @version 1.127.6
|
|
3153
3153
|
* @since 1.30.0
|
|
3154
3154
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3155
3155
|
*/
|