@sapui5/sap.suite.ui.generic.template 1.120.19 → 1.120.21
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/controller/VisualFilterDialogController.js +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 +47 -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
|
@@ -433,7 +433,7 @@ sap.ui.define([
|
|
|
433
433
|
oVisualFilterDialogModelClone.setProperty('/filterCompList/' + idx + '/searchVisible', bVisible);
|
|
434
434
|
oVisualFilterDialogModel.setData(oVisualFilterDialogModelClone.getData());
|
|
435
435
|
//update config object when VFConfig model is updated
|
|
436
|
-
this.oConfig = oVisualFilterDialogModel.
|
|
436
|
+
this.oConfig = oVisualFilterDialogModel.getData();
|
|
437
437
|
//to enable Restore button on change of chart type, sort order, measure field and show in filter bar changes
|
|
438
438
|
this.oState.oSmartFilterbar._oVariantManagement.currentVariantSetModified(true);
|
|
439
439
|
},
|
|
@@ -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
|
});
|
|
@@ -922,7 +922,7 @@ sap.ui.define([
|
|
|
922
922
|
* @extends sap.ui.core.UIComponent
|
|
923
923
|
* @abstract
|
|
924
924
|
* @author SAP SE
|
|
925
|
-
* @version 1.120.
|
|
925
|
+
* @version 1.120.21
|
|
926
926
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
927
927
|
*/
|
|
928
928
|
return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -22,9 +22,43 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
22
22
|
"sap/ui/core/IconPool",
|
|
23
23
|
"sap/suite/ui/commons/collaboration/ServiceContainer",
|
|
24
24
|
"sap/suite/ui/generic/template/lib/ContactCardDetailHelper",
|
|
25
|
-
"sap/m/library"
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
"sap/m/library",
|
|
26
|
+
"sap/m/Button",
|
|
27
|
+
'sap/ui/performance/trace/FESRHelper',
|
|
28
|
+
"sap/ui/core/CustomData",
|
|
29
|
+
"sap/m/VBox",
|
|
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) {
|
|
28
62
|
"use strict";
|
|
29
63
|
|
|
30
64
|
var oLogger = new FeLogger("lib.CommonEventHandlers").getLogger();
|
|
@@ -1848,7 +1882,11 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1848
1882
|
}
|
|
1849
1883
|
if (oFileUploader.FUEl.files[0].name){
|
|
1850
1884
|
var headerParameterContentDispositionToken = new FileUploaderParameter();
|
|
1851
|
-
var
|
|
1885
|
+
var sUploadedFileName = oFileUploader.FUEl.files[0].name;
|
|
1886
|
+
if (!genericUtils.isASCII(sUploadedFileName)) {
|
|
1887
|
+
sUploadedFileName = encodeURIComponent(sUploadedFileName);
|
|
1888
|
+
}
|
|
1889
|
+
var fileName = "filename=" + sUploadedFileName;
|
|
1852
1890
|
headerParameterContentDispositionToken.setName("Content-Disposition");
|
|
1853
1891
|
headerParameterContentDispositionToken.setValue(fileName);
|
|
1854
1892
|
oFileUploader.addHeaderParameter(headerParameterContentDispositionToken);
|
|
@@ -1907,11 +1945,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1907
1945
|
oPrivModel.setProperty("/generic/controlProperties/" + "fileUploader/" + sEntitySet, oFileUploaderSettings);
|
|
1908
1946
|
}
|
|
1909
1947
|
|
|
1910
|
-
|
|
1948
|
+
// URLEncoded filenames are decoded by Chrome, Firefox browsers but Safari doesn't do this automatically.
|
|
1949
|
+
// Therefore, FE decodes it on our side & ensure actual file name is used for further processing.
|
|
1950
|
+
oFileUploaderSettings.fileName = decodeURIComponent(oEvent.mParameters.fileName);
|
|
1911
1951
|
var fileType = oEvent.mParameters.requestHeaders.find(function(requestHeader) {
|
|
1912
1952
|
if (requestHeader.name === "Content-Type") {
|
|
1913
1953
|
return requestHeader;
|
|
1914
1954
|
}
|
|
1955
|
+
|
|
1956
|
+
return undefined;
|
|
1915
1957
|
});
|
|
1916
1958
|
oFileUploaderSettings.fileType = fileType.value;
|
|
1917
1959
|
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
|
|
|
@@ -3083,7 +3083,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3083
3083
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3084
3084
|
* @public
|
|
3085
3085
|
* @extends sap.ui.base.Object
|
|
3086
|
-
* @version 1.120.
|
|
3086
|
+
* @version 1.120.21
|
|
3087
3087
|
* @since 1.30.0
|
|
3088
3088
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3089
3089
|
*/
|