@sapui5/sap.fe.macros 1.96.16 → 1.96.19

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.fe.macros",
3
- "version": "1.96.16",
3
+ "version": "1.96.19",
4
4
  "description": "SAPUI5 Library sap.fe.macros",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.96.16</version>
9
+ <version>1.96.19</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.macros</documentation>
12
12
 
@@ -2,10 +2,11 @@
2
2
  * SAPUI5
3
3
  * (c) Copyright 2009-2023 SAP SE. All rights reserved.
4
4
  */
5
- sap.ui.define(["sap/fe/macros/CommonHelper", "sap/fe/core/CommonUtils", "sap/ui/model/odata/v4/AnnotationHelper"], function(
5
+ sap.ui.define(["sap/fe/macros/CommonHelper", "sap/fe/core/CommonUtils", "sap/ui/model/odata/v4/AnnotationHelper", "sap/base/util/JSTokenizer"], function(
6
6
  CommonHelper,
7
7
  CommonUtils,
8
- AnnotationHelper
8
+ AnnotationHelper,
9
+ JSTokenizer
9
10
  ) {
10
11
  "use strict";
11
12
 
@@ -115,21 +116,21 @@ sap.ui.define(["sap/fe/macros/CommonHelper", "sap/fe/core/CommonUtils", "sap/ui/
115
116
  constraints: function(oProperty, oInterface) {
116
117
  var sValue = AnnotationHelper.format(oProperty, oInterface),
117
118
  aMatches = sValue && sValue.match(/constraints:.*?({.*?})/),
118
- sConstraints = aMatches && aMatches[1];
119
+ oConstraints = aMatches ? JSTokenizer.parseJS(aMatches[1]) : {};
119
120
  // Workaround. Add "V4: true" to DateTimeOffset constraints. AnnotationHelper is not aware of this flag.
120
- if (sValue.indexOf("sap.ui.model.odata.type.DateTimeOffset") > -1) {
121
- if (sConstraints) {
122
- sConstraints = sConstraints.substr(0, aMatches[1].indexOf("}")) + ", V4: true}";
123
- } else {
124
- sConstraints = "{V4: true}";
125
- }
121
+ if (sValue.includes("sap.ui.model.odata.type.DateTimeOffset")) {
122
+ // Ensure that V4:true is there. With the openUI5 BLI: CPOUI5ODATAV4-2131 the constraints are already include 'V4':true
123
+ oConstraints.V4 = true;
126
124
  }
127
- // Remove {nullable:false} from the constraints as it prevents from having an empty filter field
125
+ // Remove {nullable:false} from the constraints as it prevents from having an empty filter field
128
126
  // in the case of a single-value filter
129
- if (sConstraints && sConstraints.indexOf("'nullable':false") >= 0) {
130
- sConstraints = sConstraints.replace(/,[ ]*'nullable':false/, "").replace(/'nullable':false[, ]*/, "");
127
+ if (oConstraints.nullable === false) {
128
+ delete oConstraints.nullable;
131
129
  }
132
- return sConstraints || undefined;
130
+ // Unfortunately, JSTokenizer does not provide a method to stringify (reversing parseJS).
131
+ // Using JSON.stringify and replacing double quotes with single quotes works at least in the known simple cases (flat objects not containing quotes in property names or values).
132
+ // If special cases should occur in future, this might need some adoption (depending on the required string format in that case).
133
+ return Object.keys(oConstraints).length === 0 ? undefined : JSON.stringify(oConstraints).replaceAll('"', "'");
133
134
  },
134
135
  formatOptions: function(oProperty, oInterface) {
135
136
  // as the Annotation helper always returns "parseKeepsEmptyString: true" we need to prevent this in case a property (of type string) is nullable
@@ -59,7 +59,7 @@ sap.ui.define(
59
59
  interfaces: [],
60
60
  controls: [],
61
61
  elements: [],
62
- version: "1.96.16",
62
+ version: "1.96.19",
63
63
  noLibraryCSS: true
64
64
  });
65
65
 
@@ -27,7 +27,7 @@ C_DRAFT_EDIT_STATE_DRAFT_OWN_DRAFT_FILTER=Eget utkast
27
27
 
28
28
  C_DRAFT_EDIT_STATE_DRAFT_LOCKED_FILTER=Sperret av annen bruker
29
29
 
30
- C_DRAFT_EDIT_STATE_DRAFT_UNSAVED_CHANGES_FILTER=Endringer som ikke er lagret av annen bruker
30
+ C_DRAFT_EDIT_STATE_DRAFT_UNSAVED_CHANGES_FILTER=Ulagrede endringer gjort av annen bruker
31
31
 
32
32
  M_DATAFIELD_FRAGMENT_FIELD_PREVIEW=Vis dokument
33
33
 
@@ -27,7 +27,7 @@ C_DRAFT_EDIT_STATE_DRAFT_OWN_DRAFT_FILTER=W\u0142asna wersja robocza
27
27
 
28
28
  C_DRAFT_EDIT_STATE_DRAFT_LOCKED_FILTER=Zablokowane przez innego u\u017Cytkownika
29
29
 
30
- C_DRAFT_EDIT_STATE_DRAFT_UNSAVED_CHANGES_FILTER=Niezapami\u0119tane zmiany innego u\u017Cytkownika
30
+ C_DRAFT_EDIT_STATE_DRAFT_UNSAVED_CHANGES_FILTER=Niezapisane zmiany innego u\u017Cytkownika
31
31
 
32
32
  M_DATAFIELD_FRAGMENT_FIELD_PREVIEW=Wy\u015Bwietl dok.
33
33
 
@@ -132,7 +132,7 @@ C_MASS_EDIT_APPLY_BUTTON_TEXT=Uporaba
132
132
 
133
133
  C_MASS_EDIT_CANCEL_BUTTON_TEXT=Preklic
134
134
 
135
- M_COMMON_SAPFE_ACTION_SHARE=Deli
135
+ M_COMMON_SAPFE_ACTION_SHARE=Skupna raba
136
136
 
137
137
  M_FIELD_FILEUPLOADER_NOFILENAME_TEXT=Odpri datoteko
138
138