@sapui5/sap.fe.navigation 1.106.0 → 1.108.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.navigation",
3
- "version": "1.106.0",
3
+ "version": "1.108.0",
4
4
  "description": "SAPUI5 Library sap.fe.navigation",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -9,8 +9,10 @@
9
9
  "build": "echo 'nothing to do'",
10
10
  "prepare-npm-sources": "echo 'nothing to do'",
11
11
  "prepare-ts-class-doc": "echo 'nothing to do'",
12
- "prepare-ui5-build-sources": "echo 'nothing to do'",
13
- "test": "echo 'nothing to do'"
12
+ "prepare-ui5-build-sources": "babel target/ui5-build-tmp/src --out-dir target/ui5-build-tmp/src --extensions \".ts,.tsx,.mdx\" --config-file ../../.babelrc && babel target/ui5-build-tmp/test --out-dir target/ui5-build-tmp/test --extensions \".ts,.tsx,.mdx\" --config-file ../../.babelrc",
13
+ "test": "jest --maxWorkers=4",
14
+ "test-refs": "jest --runInBand --config jest.config-refs.js",
15
+ "test-updateSnapshots": "jest --maxWorkers=4 -u"
14
16
  },
15
17
  "keywords": [
16
18
  "sapui5",
@@ -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.106.0</version>
9
+ <version>1.108.0</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.navigation</documentation>
12
12
 
@@ -307,24 +307,26 @@ sap.ui.define(
307
307
  * (ABAP-styled pattern matching with the asterisk as wildcard)
308
308
  * @param {string} sLow The single value or the lower boundary of the interval; the <code>null</code> value is not allowed
309
309
  * @param {string} [sHigh] Set only if sOption is <b>BT</b>: the upper boundary of the interval;
310
- * @param {string} [sText] Text representing the SelectOption. This is an optional parameter, consumption of this parameter is
311
- * completely decided by the consumer. For an example in most Fiori applications fetch the Text based on the ID and doesn't
312
- * consider this text property
310
+ * @param {string} [sText] Text representing the SelectOption. This is an optional parameter. For an example in most Fiori applications if the text is not provided, it is fetched based on the ID.
313
311
  * must be <code>undefined</code> or <code>null</code> in all other cases
312
+ * @param {object} [semanticDates] Object containing semanticDates filter information
313
+ * [semanticDates.operator] Semantic Date Operator
314
+ * [semanticDates.high] the upper boundary of the interval for range operators
315
+ * [semanticDates.low] The single value or the lower boundary of the interval for range Operators
314
316
  * @returns {object} This instance to allow method chaining.
315
317
  * @public
316
318
  * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
317
319
  * <table>
318
320
  * <tr><th>NavError code</th><th>Description</th></tr>
319
- * <tr><td>SelectionVariant.INVALID_SIGN</td><td>Indicates that the sign is an invalid expression</td></tr>
321
+ * <tr><td>SelectionVariant.INVALID_SIGN</td><td>Indicates that the 'sign' is an invalid expression</td></tr>
320
322
  * <tr><td>SelectionVariant.INVALID_OPTION</td><td>Indicates that the option is an invalid expression</td></tr>
321
323
  * <tr><td>SelectionVariant.HIGH_PROVIDED_THOUGH_NOT_ALLOWED</td><td>Indicates that the upper boundary has been specified, even though the option is not 'BT'</td></tr>
322
324
  * <tr><td>SelectionVariant.INVALID_INPUT_TYPE</td><td>Indicates that an input parameter has an invalid type or the value is set to <code>null</code></td></tr>
323
- * <tr><td>SelectionVariant.INVALID_PROPERTY_NAME</td><td>Indicates that the property name is invalid, for example, it has not been specified</td></tr>
325
+ * <tr><td>SelectionVariant.INVALID_PROPERTY_NAME</td><td>Indicates that the property name is invalid, for example if it has not been specified</td></tr>
324
326
  * <tr><td>SelectionVariant.PARAMETER_SELOPT_COLLISION</td><td>Indicates that another parameter with the same name as the property name already exists</td></tr>
325
327
  * </table>
326
328
  */
327
- addSelectOption: function (sPropertyName, sSign, sOption, sLow, sHigh, sText) {
329
+ addSelectOption: function (sPropertyName, sSign, sOption, sLow, sHigh, sText, semanticDates) {
328
330
  /* {string} sLow The single value or the lower boundary of the interval; the <code>null</code> value is not allowed
329
331
  * (see specification "Selection Variants for UI Navigation in Fiori", section 2.4.2.1)
330
332
  */
@@ -392,6 +394,11 @@ sap.ui.define(
392
394
  // may not be empty, but needs to be set to "null"
393
395
  }
394
396
 
397
+ if (semanticDates) {
398
+ // Add SemanticDate property only in case it is passed, Otherwise keep the structure as is.
399
+ oEntry.SemanticDates = semanticDates;
400
+ }
401
+
395
402
  //check if it is necessary to add select option
396
403
  for (var i = 0; i < this._mSelectOptions[sPropertyName].length; i++) {
397
404
  var oExistingEntry = this._mSelectOptions[sPropertyName][i];
@@ -557,7 +564,9 @@ sap.ui.define(
557
564
  oSelectOption.Sign,
558
565
  oSelectOption.Option,
559
566
  oSelectOption.Low,
560
- oSelectOption.High
567
+ oSelectOption.High,
568
+ oSelectOption.Text,
569
+ oSelectOption.SemanticDates
561
570
  );
562
571
  }
563
572
 
@@ -565,9 +574,8 @@ sap.ui.define(
565
574
  },
566
575
 
567
576
  /**
568
- * First tries to retrieve the set of select options/ranges available for <code>sName</code> as property name. If successful,
569
- * this array of selections is being returned. If it fails, an attempt to find a parameter, whose name is <code>sName</code>, is
570
- * made. If the latter succeeds, the single value is converted to fit into an array of selections to make it
577
+ * First tries to retrieve the set of select options or ranges available for <code>sName</code> as the property name. If successful,
578
+ * this array of selections is returned. If it fails, an attempt to find a parameter with the name <code>sName</code> is used. If the latter succeeds, the single value is converted to fit into an array of selections to make it
571
579
  * type compatible with ranges. This array is then returned. <br />
572
580
  * If neither a select option nor a parameter could be found, <code>undefined</code> is returned.
573
581
  *
@@ -794,7 +802,15 @@ sap.ui.define(
794
802
  each(
795
803
  oSelectOption.Ranges,
796
804
  function (iIdx2, oRange) {
797
- this.addSelectOption(oSelectOption.PropertyName, oRange.Sign, oRange.Option, oRange.Low, oRange.High);
805
+ this.addSelectOption(
806
+ oSelectOption.PropertyName,
807
+ oRange.Sign,
808
+ oRange.Option,
809
+ oRange.Low,
810
+ oRange.High,
811
+ oRange.Text,
812
+ oRange.SemanticDates
813
+ );
798
814
  }.bind(this)
799
815
  );
800
816
  }.bind(this)
@@ -26,7 +26,7 @@ sap.ui.define(
26
26
  var thisLib = sap.ui.getCore().initLibrary({
27
27
  name: "sap.fe.navigation",
28
28
  // eslint-disable-next-line no-template-curly-in-string
29
- version: "1.106.0",
29
+ version: "1.108.0",
30
30
  dependencies: ["sap.ui.core"],
31
31
  types: ["sap.fe.navigation.NavType", "sap.fe.navigation.ParamHandlingMode", "sap.fe.navigation.SuppressionBehavior"],
32
32
  interfaces: [],