@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.120.19",
3
+ "version": "1.120.21",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.120.19</version>
10
+ <version>1.120.21</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -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.getProperty();
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
  },
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.19"
11
+ "version": "1.120.21"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.19"
11
+ "version": "1.120.21"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.120.19"
11
+ "version": "1.120.21"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.19"
9
+ "version": "1.120.21"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.19"
9
+ "version": "1.120.21"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.120.19"
9
+ "version": "1.120.21"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -2,50 +2,59 @@
2
2
  sap.ui.define([], function() {
3
3
  "use strict";
4
4
 
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 "";
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
- // 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;
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.19
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
- ], function(BaseObject, Event, MessageBox, Sorter, controlHelper, expressionHelper, testableHelper, oDataModelHelper, JSONModel, AnnotationHelper,
27
- Controller, FeLogger, MessageUtils, SideEffectUtil, extend, isEmptyObject, deepExtend, CRUDHelper, XMLView, FormatUtil, FileUploaderParameter, IconPool, ServiceContainer, ContactCardDetailHelper, mLibrary) {
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 fileName = "filename=" + oFileUploader.FUEl.files[0].name;
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
- oFileUploaderSettings.fileName = oEvent.mParameters.fileName;
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=Si sale se per.entr.
28
+ DATA_LOSS_MESSAGE=Sus entradas se perder\u00E1n al abandonar esta p\u00E1gina
29
29
 
30
- DATA_LOSS_GENERAL_MESSAGE=Si cont.se per.entr.
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.19
3086
+ * @version 1.120.21
3087
3087
  * @since 1.30.0
3088
3088
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3089
3089
  */
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  interfaces: [],
61
61
  controls: [],
62
62
  elements: [],
63
- version: "1.120.19",
63
+ version: "1.120.21",
64
64
  extensions: {
65
65
  //Configuration used for rule loading of Support Assistant
66
66
  "sap.ui.support": {