@sapui5/sap.fe.navigation 1.99.0 → 1.101.1

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.99.0",
3
+ "version": "1.101.1",
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)",
@@ -8,6 +8,7 @@
8
8
  "scripts": {
9
9
  "build": "echo 'nothing to do'",
10
10
  "prepare-npm-sources": "babel target/npm-sources/src --out-dir target/npm-sources/src --extensions \".ts\" --config-file ../../.babelrc",
11
+ "prepare-ts-class-doc": "echo 'nothing to do'",
11
12
  "prepare-ui5-build-sources": "mkdirp target/ui5-build-tmp/src && babel src --out-dir target/ui5-build-tmp/src --extensions \".ts\" --config-file ../../.babelrc",
12
13
  "test": "echo 'nothing to do'"
13
14
  },
@@ -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.99.0</version>
9
+ <version>1.101.1</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.navigation</documentation>
12
12
 
@@ -19,7 +19,7 @@ sap.ui.define(
19
19
  "sap/ui/thirdparty/URI",
20
20
  "sap/ui/util/openWindow"
21
21
  ],
22
- function(
22
+ function (
23
23
  NavError,
24
24
  SelectionVariant,
25
25
  NavLibrary,
@@ -97,7 +97,7 @@ sap.ui.define(
97
97
  ]
98
98
  },
99
99
 
100
- constructor: function(oController, sMode, sParamHandlingMode) {
100
+ constructor: function (oController, sMode, sParamHandlingMode) {
101
101
  if (!oController) {
102
102
  throw new NavError("NavigationHandler.INVALID_INPUT");
103
103
  }
@@ -192,7 +192,7 @@ sap.ui.define(
192
192
  * @returns {object} The Navigation service
193
193
  * @private
194
194
  */
195
- _getAppNavigationService: function() {
195
+ _getAppNavigationService: function () {
196
196
  return sap.ushell.Container.getService("CrossApplicationNavigation");
197
197
  },
198
198
 
@@ -203,10 +203,19 @@ sap.ui.define(
203
203
  * @returns {object} The Router for the given Controller
204
204
  * @private
205
205
  */
206
- _getRouter: function(oController) {
206
+ _getRouter: function (oController) {
207
207
  return UIComponent.getRouterFor(oController);
208
208
  },
209
209
 
210
+ /**
211
+ * This method is to be used only by FE V2 to get access to toExternal promise.
212
+ * @param {object} fnCallback Callback to be called by 'navigate' method in case of toExternal is used to navigate.
213
+ * @private
214
+ */
215
+ registerNavigateCallback: function (fnCallback) {
216
+ this._navigateCallback = fnCallback;
217
+ },
218
+
210
219
  /**
211
220
  * Triggers a cross-app navigation after saving the inner and the cross-app states. The navigation mode based on
212
221
  * <code>sap-ushell-next-navmode</code> is taken into account. If set to <code>explace</code> the inner app state will not be changed.
@@ -295,7 +304,7 @@ sap.ui.define(
295
304
  * });
296
305
  * </code>
297
306
  */
298
- navigate: function(sSemanticObject, sActionName, vNavigationParameters, oInnerAppData, fnOnError, oExternalAppData, sNavMode) {
307
+ navigate: function (sSemanticObject, sActionName, vNavigationParameters, oInnerAppData, fnOnError, oExternalAppData, sNavMode) {
299
308
  var sSelectionVariant,
300
309
  mParameters,
301
310
  oXAppDataObj,
@@ -340,8 +349,11 @@ sap.ui.define(
340
349
  if (typeof vNavigationParameters === "string") {
341
350
  sSelectionVariant = vNavigationParameters;
342
351
  } else if (typeof vNavigationParameters === "object") {
343
- var oEnrichedSelVar = this._splitInboundNavigationParameters(new SelectionVariant(), vNavigationParameters, [])
344
- .oNavigationSelVar;
352
+ var oEnrichedSelVar = this._splitInboundNavigationParameters(
353
+ new SelectionVariant(),
354
+ vNavigationParameters,
355
+ []
356
+ ).oNavigationSelVar;
345
357
  sSelectionVariant = oEnrichedSelVar.toJSONString();
346
358
  } else {
347
359
  throw new NavError("NavigationHandler.INVALID_INPUT");
@@ -377,7 +389,7 @@ sap.ui.define(
377
389
  }
378
390
 
379
391
  var oSupportedPromise = oNavHandler.oCrossAppNavService.isNavigationSupported([oNavArguments], oNavHandler.oComponent);
380
- oSupportedPromise.done(function(oTargets) {
392
+ oSupportedPromise.done(function (oTargets) {
381
393
  if (oTargets[0].supported) {
382
394
  var oReturn;
383
395
 
@@ -413,7 +425,11 @@ sap.ui.define(
413
425
  );
414
426
  openWindow(sNewHref);
415
427
  } else {
416
- oNavHandler.oCrossAppNavService.toExternal(oNavArguments, oNavHandler.oComponent);
428
+ var ptoExt = oNavHandler.oCrossAppNavService.toExternal(oNavArguments, oNavHandler.oComponent);
429
+ // TODO: This is just a temporary solution to allow FE V2 to use toExternal promise.
430
+ if (this._navigateCallback) {
431
+ this._navigateCallback(ptoExt);
432
+ }
417
433
  }
418
434
  } // else : error was already reported
419
435
  } else {
@@ -426,7 +442,7 @@ sap.ui.define(
426
442
  });
427
443
 
428
444
  if (fnOnError) {
429
- oSupportedPromise.fail(function() {
445
+ oSupportedPromise.fail(function () {
430
446
  // technical error: could not determine if intent is supported
431
447
  var oError = oNavHandler._createTechnicalError("NavigationHandler.isIntentSupported.failed");
432
448
  fnOnError(oError);
@@ -487,7 +503,7 @@ sap.ui.define(
487
503
  * });
488
504
  * </code>
489
505
  */
490
- parseNavigation: function() {
506
+ parseNavigation: function () {
491
507
  var sAppHash = HashChanger.getInstance().getHash();
492
508
  /*
493
509
  * use .getHash() here instead of .getAppHash() to also be able dealing with environments where only SAPUI5 is loaded and the UShell is
@@ -523,7 +539,7 @@ sap.ui.define(
523
539
 
524
540
  var oMyDeferred = jQuery.Deferred();
525
541
  var oNavHandler = this;
526
- var parseUrlParams = function(oStartupParameters, aDefaultedParameters, oMyDeferred, sNavType) {
542
+ var parseUrlParams = function (oStartupParameters, aDefaultedParameters, oMyDeferred, sNavType) {
527
543
  // standard URL navigation
528
544
  var oSelVars = oNavHandler._splitInboundNavigationParameters(
529
545
  new SelectionVariant(),
@@ -559,7 +575,7 @@ sap.ui.define(
559
575
  // inner app state was not found in the AppHash, but xapp state => try to read the xapp state
560
576
  var oStartupPromise = this.oCrossAppNavService.getStartupAppState(this.oComponent);
561
577
 
562
- oStartupPromise.done(function(oAppState) {
578
+ oStartupPromise.done(function (oAppState) {
563
579
  // get app state from sap-xapp-state,
564
580
  // create a copy, not only a reference, because we want to modify the object
565
581
  var oAppStateData = oAppState.getData();
@@ -596,7 +612,7 @@ sap.ui.define(
596
612
  }
597
613
  }
598
614
  });
599
- oStartupPromise.fail(function() {
615
+ oStartupPromise.fail(function () {
600
616
  var oError = oNavHandler._createTechnicalError("NavigationHandler.getStartupState.failed");
601
617
  oMyDeferred.reject(oError, {}, NavType.xAppState);
602
618
  });
@@ -627,7 +643,7 @@ sap.ui.define(
627
643
  * <code>undefined</code> may be used to reset the complete list.
628
644
  * @public
629
645
  */
630
- setTechnicalParameters: function(aTechnicalParameters) {
646
+ setTechnicalParameters: function (aTechnicalParameters) {
631
647
  if (!aTechnicalParameters) {
632
648
  aTechnicalParameters = [];
633
649
  }
@@ -652,7 +668,7 @@ sap.ui.define(
652
668
  * @returns {Array} Containing the technical parameters.
653
669
  * @public
654
670
  */
655
- getTechnicalParameters: function() {
671
+ getTechnicalParameters: function () {
656
672
  return this._aTechnicalParamaters.concat([]);
657
673
  },
658
674
 
@@ -662,7 +678,7 @@ sap.ui.define(
662
678
  * @returns {boolean} Indicates if the parameter is considered as technical parameter or not.
663
679
  * @private
664
680
  */
665
- _isTechnicalParameter: function(sParameterName) {
681
+ _isTechnicalParameter: function (sParameterName) {
666
682
  if (sParameterName) {
667
683
  if (
668
684
  !(
@@ -688,7 +704,7 @@ sap.ui.define(
688
704
  * @returns {object} Selection Variant without technical Parameters.
689
705
  * @private
690
706
  */
691
- _removeTechnicalParameters: function(oSelectionVariant) {
707
+ _removeTechnicalParameters: function (oSelectionVariant) {
692
708
  var sPropName, i;
693
709
  var aSelVarPropNames = oSelectionVariant.getSelectOptionsPropertyNames();
694
710
  for (i = 0; i < aSelVarPropNames.length; i++) {
@@ -728,7 +744,7 @@ sap.ui.define(
728
744
  * returned as is.
729
745
  * @private
730
746
  */
731
- _splitInboundNavigationParameters: function(oSelectionVariant, oStartupParameters, aDefaultedParameters) {
747
+ _splitInboundNavigationParameters: function (oSelectionVariant, oStartupParameters, aDefaultedParameters) {
732
748
  if (!Array.isArray(aDefaultedParameters)) {
733
749
  throw new NavError("NavigationHandler.INVALID_INPUT");
734
750
  }
@@ -842,7 +858,7 @@ sap.ui.define(
842
858
  };
843
859
  },
844
860
 
845
- _addParameterValues: function(oSelVariant, sPropName, sSign, sOption, oValues) {
861
+ _addParameterValues: function (oSelVariant, sPropName, sSign, sOption, oValues) {
846
862
  if (Array.isArray(oValues)) {
847
863
  for (var i = 0; i < oValues.length; i++) {
848
864
  oSelVariant.addSelectOption(sPropName, sSign, sOption, oValues[i]);
@@ -857,7 +873,7 @@ sap.ui.define(
857
873
  * @param {string} sAppStateKey The new app state key.
858
874
  * @public
859
875
  */
860
- replaceHash: function(sAppStateKey) {
876
+ replaceHash: function (sAppStateKey) {
861
877
  var oHashChanger = this.oRouter.oHashChanger ? this.oRouter.oHashChanger : HashChanger.getInstance();
862
878
  var sAppHashOld = oHashChanger.getHash();
863
879
  /*
@@ -906,14 +922,14 @@ sap.ui.define(
906
922
  * });
907
923
  * </code>
908
924
  */
909
- storeInnerAppState: function(mInnerAppData, bImmediateHashReplace) {
925
+ storeInnerAppState: function (mInnerAppData, bImmediateHashReplace) {
910
926
  if (typeof bImmediateHashReplace !== "boolean") {
911
927
  bImmediateHashReplace = true; // default
912
928
  }
913
929
  var oNavHandler = this;
914
930
  var oMyDeferred = jQuery.Deferred();
915
931
 
916
- var fnReplaceHash = function(sAppStateKey) {
932
+ var fnReplaceHash = function (sAppStateKey) {
917
933
  var oHashChanger = oNavHandler.oRouter.oHashChanger ? oNavHandler.oRouter.oHashChanger : HashChanger.getInstance();
918
934
  var sAppHashOld = oHashChanger.getHash();
919
935
  /*
@@ -947,7 +963,7 @@ sap.ui.define(
947
963
  // passed inner app state not found in cache
948
964
  this._oLastSavedInnerAppData.iCacheMiss++;
949
965
 
950
- var fnOnAfterSave = function(sAppStateKey) {
966
+ var fnOnAfterSave = function (sAppStateKey) {
951
967
  // replace inner app hash with new appStateKey in url
952
968
  if (!bImmediateHashReplace) {
953
969
  fnReplaceHash(sAppStateKey);
@@ -959,7 +975,7 @@ sap.ui.define(
959
975
  oMyDeferred.resolve(sAppStateKey);
960
976
  };
961
977
 
962
- var fnOnError = function(oError) {
978
+ var fnOnError = function (oError) {
963
979
  oMyDeferred.reject(oError);
964
980
  };
965
981
 
@@ -1025,7 +1041,7 @@ sap.ui.define(
1025
1041
  * </code>
1026
1042
  * @public
1027
1043
  */
1028
- storeInnerAppStateWithImmediateReturn: function(mInnerAppData, bImmediateHashReplace) {
1044
+ storeInnerAppStateWithImmediateReturn: function (mInnerAppData, bImmediateHashReplace) {
1029
1045
  if (typeof bImmediateHashReplace !== "boolean") {
1030
1046
  bImmediateHashReplace = false; // default
1031
1047
  }
@@ -1057,7 +1073,7 @@ sap.ui.define(
1057
1073
  // passed inner app state not found in cache
1058
1074
  this._oLastSavedInnerAppData.iCacheMiss++;
1059
1075
 
1060
- var fnOnAfterSave = function(sAppStateKey) {
1076
+ var fnOnAfterSave = function (sAppStateKey) {
1061
1077
  // replace inner app hash with new appStateKey in url
1062
1078
  if (!bImmediateHashReplace) {
1063
1079
  that.replaceHash(sAppStateKey);
@@ -1069,7 +1085,7 @@ sap.ui.define(
1069
1085
  oAppStatePromise.resolve(sAppStateKey);
1070
1086
  };
1071
1087
 
1072
- var fnOnError = function(oError) {
1088
+ var fnOnError = function (oError) {
1073
1089
  oAppStatePromise.reject(oError);
1074
1090
  };
1075
1091
 
@@ -1162,7 +1178,7 @@ sap.ui.define(
1162
1178
  * });
1163
1179
  * </code>
1164
1180
  */
1165
- processBeforeSmartLinkPopoverOpens: function(oTableEventParameters, sSelectionVariant, mInnerAppData, oExternalAppData) {
1181
+ processBeforeSmartLinkPopoverOpens: function (oTableEventParameters, sSelectionVariant, mInnerAppData, oExternalAppData) {
1166
1182
  var oMyDeferred = jQuery.Deferred();
1167
1183
  var mSemanticAttributes;
1168
1184
  if (oTableEventParameters != undefined) {
@@ -1178,7 +1194,7 @@ sap.ui.define(
1178
1194
  oXAppDataObj = oExternalAppData;
1179
1195
  }
1180
1196
 
1181
- var fnStoreXappAndCallOpen = function(mSemanticAttributes, sSelectionVariant) {
1197
+ var fnStoreXappAndCallOpen = function (mSemanticAttributes, sSelectionVariant) {
1182
1198
  // mix the semantic attributes (e.g. from the row line) with the selection variant (e.g. from the filter bar)
1183
1199
  sSelectionVariant = oXAppDataObj.selectionVariant || sSelectionVariant || "{}";
1184
1200
 
@@ -1209,7 +1225,7 @@ sap.ui.define(
1209
1225
  ? oNavHandler._getURLParametersFromSelectionVariant(new SelectionVariant(oTmpData.selectionVariant))
1210
1226
  : {};
1211
1227
 
1212
- var fnOnContainerSave = function(sAppStateKey) {
1228
+ var fnOnContainerSave = function (sAppStateKey) {
1213
1229
  if (oTableEventParameters === undefined) {
1214
1230
  // If oTableEventParameters is undefined, return both semanticAttributes and appStatekey
1215
1231
  oMyDeferred.resolve(mSemanticAttributes, sAppStateKey);
@@ -1223,7 +1239,7 @@ sap.ui.define(
1223
1239
  }
1224
1240
  };
1225
1241
 
1226
- var fnOnError = function(oError) {
1242
+ var fnOnError = function (oError) {
1227
1243
  oMyDeferred.reject(oError);
1228
1244
  };
1229
1245
 
@@ -1238,11 +1254,11 @@ sap.ui.define(
1238
1254
  var oStoreInnerAppStatePromise = this.storeInnerAppState(mInnerAppData, true);
1239
1255
 
1240
1256
  // if the inner app state was successfully stored, store also the xapp-state
1241
- oStoreInnerAppStatePromise.done(function() {
1257
+ oStoreInnerAppStatePromise.done(function () {
1242
1258
  fnStoreXappAndCallOpen(mSemanticAttributes, sSelectionVariant);
1243
1259
  });
1244
1260
 
1245
- oStoreInnerAppStatePromise.fail(function(oError) {
1261
+ oStoreInnerAppStatePromise.fail(function (oError) {
1246
1262
  oMyDeferred.reject(oError);
1247
1263
  });
1248
1264
  } else {
@@ -1282,11 +1298,11 @@ sap.ui.define(
1282
1298
  * @private
1283
1299
  * @ui5-restricted
1284
1300
  */
1285
- _getAppStateKeyAndUrlParameters: function(sSelectionVariant) {
1301
+ _getAppStateKeyAndUrlParameters: function (sSelectionVariant) {
1286
1302
  return this.processBeforeSmartLinkPopoverOpens(undefined, sSelectionVariant, undefined, undefined);
1287
1303
  },
1288
1304
 
1289
- _mixAttributesToSelVariant: function(mSemanticAttributes, oSelVariant, iSuppressionBehavior) {
1305
+ _mixAttributesToSelVariant: function (mSemanticAttributes, oSelVariant, iSuppressionBehavior) {
1290
1306
  // add all semantic attributes to the mixed selection variant
1291
1307
  for (var sPropertyName in mSemanticAttributes) {
1292
1308
  if (mSemanticAttributes.hasOwnProperty(sPropertyName)) {
@@ -1377,7 +1393,7 @@ sap.ui.define(
1377
1393
  * });
1378
1394
  * </code>
1379
1395
  */
1380
- mixAttributesAndSelectionVariant: function(vSemanticAttributes, sSelectionVariant, iSuppressionBehavior) {
1396
+ mixAttributesAndSelectionVariant: function (vSemanticAttributes, sSelectionVariant, iSuppressionBehavior) {
1381
1397
  var oSelectionVariant = new SelectionVariant(sSelectionVariant);
1382
1398
  var oNewSelVariant = new SelectionVariant();
1383
1399
  var that = this;
@@ -1389,7 +1405,7 @@ sap.ui.define(
1389
1405
  oNewSelVariant.setParameterContextUrl(oSelectionVariant.getParameterContextUrl());
1390
1406
  }
1391
1407
  if (Array.isArray(vSemanticAttributes)) {
1392
- vSemanticAttributes.forEach(function(mSemanticAttributes) {
1408
+ vSemanticAttributes.forEach(function (mSemanticAttributes) {
1393
1409
  that._mixAttributesToSelVariant(mSemanticAttributes, oNewSelVariant, iSuppressionBehavior);
1394
1410
  });
1395
1411
  } else {
@@ -1425,7 +1441,7 @@ sap.ui.define(
1425
1441
  return oNewSelVariant;
1426
1442
  },
1427
1443
 
1428
- _ensureSelectionVariantFormatString: function(vSelectionVariant) {
1444
+ _ensureSelectionVariantFormatString: function (vSelectionVariant) {
1429
1445
  /*
1430
1446
  * There are legacy AppStates where the SelectionVariant is being stored as a string. However, that is not compliant to the specification,
1431
1447
  * which states that a standard JS object shall be provided. Internally, however, the selectionVariant is always of type string. Situation
@@ -1446,10 +1462,10 @@ sap.ui.define(
1446
1462
  return vConvertedSelectionVariant;
1447
1463
  },
1448
1464
 
1449
- _saveAppState: function(oAppData, fnOnAfterSave, fnOnError) {
1465
+ _saveAppState: function (oAppData, fnOnAfterSave, fnOnError) {
1450
1466
  var oReturn = this._saveAppStateWithImmediateReturn(oAppData, fnOnError);
1451
1467
  if (oReturn) {
1452
- oReturn.promise.done(function() {
1468
+ oReturn.promise.done(function () {
1453
1469
  if (fnOnAfterSave) {
1454
1470
  fnOnAfterSave(oReturn.appStateKey);
1455
1471
  }
@@ -1457,7 +1473,7 @@ sap.ui.define(
1457
1473
 
1458
1474
  if (fnOnError) {
1459
1475
  var oNavHandler = this;
1460
- oReturn.promise.fail(function() {
1476
+ oReturn.promise.fail(function () {
1461
1477
  var oError = oNavHandler._createTechnicalError("NavigationHandler.AppStateSave.failed");
1462
1478
  fnOnError(oError);
1463
1479
  });
@@ -1468,7 +1484,7 @@ sap.ui.define(
1468
1484
  return undefined;
1469
1485
  },
1470
1486
 
1471
- _saveAppStateWithImmediateReturn: function(oAppData, fnOnError) {
1487
+ _saveAppStateWithImmediateReturn: function (oAppData, fnOnError) {
1472
1488
  var oAppState = this.oCrossAppNavService.createEmptyAppState(this.oComponent);
1473
1489
  var sAppStateKey = oAppState.getKey();
1474
1490
  var oAppDataForSave = {};
@@ -1534,11 +1550,11 @@ sap.ui.define(
1534
1550
  };
1535
1551
  },
1536
1552
 
1537
- _loadAppState: function(sAppStateKey, oDeferred) {
1553
+ _loadAppState: function (sAppStateKey, oDeferred) {
1538
1554
  var oAppStatePromise = this.oCrossAppNavService.getAppState(this.oComponent, sAppStateKey);
1539
1555
  var oNavHandler = this;
1540
1556
 
1541
- oAppStatePromise.done(function(oAppState) {
1557
+ oAppStatePromise.done(function (oAppState) {
1542
1558
  var oAppData = {};
1543
1559
  var oAppDataLoaded = oAppState.getData();
1544
1560
 
@@ -1601,7 +1617,7 @@ sap.ui.define(
1601
1617
  // the done method will receive the loaded appState and the navigation type as parameters
1602
1618
  oDeferred.resolve(oAppData, {}, NavType.iAppState);
1603
1619
  });
1604
- oAppStatePromise.fail(function() {
1620
+ oAppStatePromise.fail(function () {
1605
1621
  var oError = oNavHandler._createTechnicalError("NavigationHandler.getAppState.failed");
1606
1622
  oDeferred.reject(oError, {}, NavType.iAppState);
1607
1623
  });
@@ -1616,7 +1632,7 @@ sap.ui.define(
1616
1632
  * case that no sap-iapp-state was found in <code>sAppHash</code>.
1617
1633
  * @private
1618
1634
  */
1619
- _getInnerAppStateKey: function(sAppHash) {
1635
+ _getInnerAppStateKey: function (sAppHash) {
1620
1636
  // trivial case: no app hash available at all.
1621
1637
  if (!sAppHash) {
1622
1638
  return undefined;
@@ -1657,7 +1673,7 @@ sap.ui.define(
1657
1673
  * format (sap-iapp-state as part of the keys/route), the format is converted to the new format before the result is returned.
1658
1674
  * @private
1659
1675
  */
1660
- _replaceInnerAppStateKey: function(sAppHash, sAppStateKey) {
1676
+ _replaceInnerAppStateKey: function (sAppHash, sAppStateKey) {
1661
1677
  var sNewIAppState = this.IAPP_STATE + "=" + sAppStateKey;
1662
1678
 
1663
1679
  /*
@@ -1668,7 +1684,7 @@ sap.ui.define(
1668
1684
  return "?" + sNewIAppState;
1669
1685
  }
1670
1686
 
1671
- var fnAppendToQueryParameter = function(sAppHash) {
1687
+ var fnAppendToQueryParameter = function (sAppHash) {
1672
1688
  // there is an AppHash available, but it does not contain a sap-iapp-state parameter yet - we need to append one
1673
1689
 
1674
1690
  // new approach: we need to check, if a set of query parameters is already available
@@ -1687,14 +1703,14 @@ sap.ui.define(
1687
1703
 
1688
1704
  if (this._rIAppStateNew.test(sAppHash)) {
1689
1705
  // the new approach is being used
1690
- return sAppHash.replace(this._rIAppStateNew, function(sNeedle) {
1706
+ return sAppHash.replace(this._rIAppStateNew, function (sNeedle) {
1691
1707
  return sNeedle.replace(/\=.*/gi, "=" + sAppStateKey);
1692
1708
  });
1693
1709
  }
1694
1710
 
1695
1711
  // we need to remove the old AppHash entirely and replace it with a new one.
1696
1712
 
1697
- var fnReplaceOldApproach = function(rOldApproach, sAppHash) {
1713
+ var fnReplaceOldApproach = function (rOldApproach, sAppHash) {
1698
1714
  sAppHash = sAppHash.replace(rOldApproach, "");
1699
1715
  return fnAppendToQueryParameter(sAppHash);
1700
1716
  };
@@ -1711,7 +1727,7 @@ sap.ui.define(
1711
1727
  return undefined;
1712
1728
  },
1713
1729
 
1714
- _getURLParametersFromSelectionVariant: function(vSelectionVariant) {
1730
+ _getURLParametersFromSelectionVariant: function (vSelectionVariant) {
1715
1731
  var mURLParameters = {};
1716
1732
  var i = 0;
1717
1733
 
@@ -1742,7 +1758,7 @@ sap.ui.define(
1742
1758
  return mURLParameters;
1743
1759
  },
1744
1760
 
1745
- _createTechnicalError: function(sErrorCode) {
1761
+ _createTechnicalError: function (sErrorCode) {
1746
1762
  return new NavError(sErrorCode);
1747
1763
  },
1748
1764
 
@@ -1752,15 +1768,15 @@ sap.ui.define(
1752
1768
  * @public
1753
1769
  * @param {sap.ui.model.odata.v2.ODataModel} oModel For checking sensitive information
1754
1770
  */
1755
- setModel: function(oModel) {
1771
+ setModel: function (oModel) {
1756
1772
  this._oModel = oModel;
1757
1773
  },
1758
1774
 
1759
- _getModel: function() {
1775
+ _getModel: function () {
1760
1776
  return this._oModel || this.oComponent.getModel();
1761
1777
  },
1762
1778
 
1763
- _removeAllProperties: function(oData) {
1779
+ _removeAllProperties: function (oData) {
1764
1780
  if (oData) {
1765
1781
  if (oData.selectionVariant) {
1766
1782
  oData.selectionVariant = null;
@@ -1776,11 +1792,11 @@ sap.ui.define(
1776
1792
  }
1777
1793
  },
1778
1794
 
1779
- _removeProperties: function(aFilterName, aParameterName, oData) {
1795
+ _removeProperties: function (aFilterName, aParameterName, oData) {
1780
1796
  if (aFilterName.length && oData && (oData.selectionVariant || oData.valueTexts || oData.semanticDates)) {
1781
- aFilterName.forEach(function(sName) {
1797
+ aFilterName.forEach(function (sName) {
1782
1798
  if (oData.selectionVariant.SelectOptions) {
1783
- oData.selectionVariant.SelectOptions.some(function(oValue, nIdx) {
1799
+ oData.selectionVariant.SelectOptions.some(function (oValue, nIdx) {
1784
1800
  if (sName === oValue.PropertyName) {
1785
1801
  oData.selectionVariant.SelectOptions.splice(nIdx, 1);
1786
1802
  return true;
@@ -1791,9 +1807,9 @@ sap.ui.define(
1791
1807
  }
1792
1808
 
1793
1809
  if (oData.valueTexts && oData.valueTexts.Texts) {
1794
- oData.valueTexts.Texts.forEach(function(oTexts) {
1810
+ oData.valueTexts.Texts.forEach(function (oTexts) {
1795
1811
  if (oTexts.PropertyTexts) {
1796
- oTexts.PropertyTexts.some(function(oValue, nIdx) {
1812
+ oTexts.PropertyTexts.some(function (oValue, nIdx) {
1797
1813
  if (sName === oValue.PropertyName) {
1798
1814
  oTexts.PropertyTexts.splice(nIdx, 1);
1799
1815
  return true;
@@ -1806,7 +1822,7 @@ sap.ui.define(
1806
1822
  }
1807
1823
 
1808
1824
  if (oData.semanticDates && oData.semanticDates.Dates) {
1809
- oData.semanticDates.Dates.forEach(function(oDates, nIdx) {
1825
+ oData.semanticDates.Dates.forEach(function (oDates, nIdx) {
1810
1826
  if (sName === oDates.PropertyName) {
1811
1827
  oData.semanticDates.Dates.splice(nIdx, 1);
1812
1828
  }
@@ -1816,8 +1832,8 @@ sap.ui.define(
1816
1832
  }
1817
1833
 
1818
1834
  if (aParameterName.length && oData && oData.selectionVariant && oData.selectionVariant.Parameters) {
1819
- aParameterName.forEach(function(sName) {
1820
- oData.selectionVariant.Parameters.some(function(oValue, nIdx) {
1835
+ aParameterName.forEach(function (sName) {
1836
+ oData.selectionVariant.Parameters.some(function (oValue, nIdx) {
1821
1837
  if (sName === oValue.PropertyName || "$Parameter." + sName === oValue.PropertyName) {
1822
1838
  oData.selectionVariant.Parameters.splice(nIdx, 1);
1823
1839
  return true;
@@ -1829,8 +1845,8 @@ sap.ui.define(
1829
1845
  }
1830
1846
  },
1831
1847
 
1832
- _isTermTrue: function(oProperty, sTerm) {
1833
- var fIsTermDefaultTrue = function(oTerm) {
1848
+ _isTermTrue: function (oProperty, sTerm) {
1849
+ var fIsTermDefaultTrue = function (oTerm) {
1834
1850
  if (oTerm) {
1835
1851
  return oTerm.Bool ? oTerm.Bool !== "false" : true;
1836
1852
  }
@@ -1840,19 +1856,19 @@ sap.ui.define(
1840
1856
  return !!oProperty[sTerm] && fIsTermDefaultTrue(oProperty[sTerm]);
1841
1857
  },
1842
1858
 
1843
- _isExcludedFromNavigationContext: function(oProperty) {
1859
+ _isExcludedFromNavigationContext: function (oProperty) {
1844
1860
  return this._isTermTrue(oProperty, "com.sap.vocabularies.UI.v1.ExcludeFromNavigationContext");
1845
1861
  },
1846
1862
 
1847
- _isPotentiallySensitive: function(oProperty) {
1863
+ _isPotentiallySensitive: function (oProperty) {
1848
1864
  return this._isTermTrue(oProperty, "com.sap.vocabularies.PersonalData.v1.IsPotentiallySensitive");
1849
1865
  },
1850
1866
 
1851
- _isMeasureProperty: function(oProperty) {
1867
+ _isMeasureProperty: function (oProperty) {
1852
1868
  return this._isTermTrue(oProperty, "com.sap.vocabularies.Analytics.v1.Measure");
1853
1869
  },
1854
1870
 
1855
- _isToBeExcluded: function(oProperty) {
1871
+ _isToBeExcluded: function (oProperty) {
1856
1872
  return this._isPotentiallySensitive(oProperty) || this._isExcludedFromNavigationContext(oProperty);
1857
1873
  },
1858
1874
 
@@ -1867,7 +1883,7 @@ sap.ui.define(
1867
1883
  * @returns {string} The context url for the given entities
1868
1884
  * @protected
1869
1885
  */
1870
- constructContextUrl: function(sEntitySetName, oModel) {
1886
+ constructContextUrl: function (sEntitySetName, oModel) {
1871
1887
  if (!sEntitySetName) {
1872
1888
  throw new NavError("NavigationHandler.NO_ENTITY_SET_PROVIDED");
1873
1889
  }
@@ -1879,7 +1895,7 @@ sap.ui.define(
1879
1895
  return this._constructContextUrl(oModel) + "#" + sEntitySetName;
1880
1896
  },
1881
1897
 
1882
- _constructContextUrl: function(oModel) {
1898
+ _constructContextUrl: function (oModel) {
1883
1899
  // TODO: replace with public APIs, once available
1884
1900
  var sServerUrl;
1885
1901
 
@@ -1907,7 +1923,7 @@ sap.ui.define(
1907
1923
  * @returns {object} Data without properties marked as sensitive or an empty object if the OData metadata is not fully loaded yet
1908
1924
  * @private
1909
1925
  */
1910
- _checkIsPotentiallySensitive: function(oData) {
1926
+ _checkIsPotentiallySensitive: function (oData) {
1911
1927
  var oAdaptedData = oData;
1912
1928
  if (
1913
1929
  oData &&
@@ -2025,7 +2041,7 @@ sap.ui.define(
2025
2041
  return oAdaptedData;
2026
2042
  },
2027
2043
 
2028
- _removeMeasureBasedInformation: function(oAppData) {
2044
+ _removeMeasureBasedInformation: function (oAppData) {
2029
2045
  var oAppDataForSave = oAppData;
2030
2046
 
2031
2047
  if (oAppData.selectionVariant) {
@@ -2056,7 +2072,7 @@ sap.ui.define(
2056
2072
  * @returns {object} Data without properties marked as measures or an empty object if the OData metadata is not fully loaded yet
2057
2073
  * @private
2058
2074
  */
2059
- _removeMeasureBasedProperties: function(oData) {
2075
+ _removeMeasureBasedProperties: function (oData) {
2060
2076
  var oAdaptedData = oData,
2061
2077
  aMeasureFilterName = [],
2062
2078
  aMeasureParameterName = [];
@@ -2181,7 +2197,7 @@ sap.ui.define(
2181
2197
  * @param {boolean} bMeasure Should measures be removed
2182
2198
  * @returns {object} The selection variant after sensitive data has been removed
2183
2199
  **/
2184
- _removeSensitiveDataForODataV4: function(oData, bMeasure) {
2200
+ _removeSensitiveDataForODataV4: function (oData, bMeasure) {
2185
2201
  var that = this,
2186
2202
  aFilterContextPart,
2187
2203
  oSV = new SelectionVariant(oData.selectionVariant),
@@ -2210,7 +2226,7 @@ sap.ui.define(
2210
2226
  var sEntitySet = aFilterContextPart[1],
2211
2227
  oMetaModel = oModel.getMetaModel(),
2212
2228
  aPropertyNames = oSV.getPropertyNames() || [],
2213
- fnIsSensitiveData = function(sProp, esName, mData) {
2229
+ fnIsSensitiveData = function (sProp, esName, mData) {
2214
2230
  var aPropertyAnnotations;
2215
2231
  esName = esName || sEntitySet;
2216
2232
  aPropertyAnnotations = oMetaModel.getObject("/" + esName + "/" + sProp + "@");
@@ -2242,7 +2258,7 @@ sap.ui.define(
2242
2258
  return oData;
2243
2259
  },
2244
2260
 
2245
- _checkPropertyAnnotationsForSensitiveData: function(aPropertyAnnotations) {
2261
+ _checkPropertyAnnotationsForSensitiveData: function (aPropertyAnnotations) {
2246
2262
  return (
2247
2263
  aPropertyAnnotations["@com.sap.vocabularies.PersonalData.v1.IsPotentiallySensitive"] ||
2248
2264
  aPropertyAnnotations["@com.sap.vocabularies.UI.v1.ExcludeFromNavigationContext"]
@@ -4,30 +4,28 @@
4
4
 
5
5
  */
6
6
 
7
- /**
8
- * Common library for all cross-application navigation functions.
9
- *
10
- * @namespace
11
- * @name sap.fe.navigation
12
- * @public
13
- * @since 1.83.0
14
- */
15
-
16
- /**
17
- * Initialization Code and shared classes of library sap.fe.navigation
18
- */
19
7
  sap.ui.define(
20
8
  [
21
- "sap/ui/core/Core", // implicit dependency, provides sap.ui.getCore()
9
+ "sap/ui/core/Core", // implicit dependency, provides sap.ui.getCore(),
22
10
  "sap/ui/core/library" // library dependency
23
11
  ],
24
- function() {
12
+ function () {
25
13
  "use strict";
26
14
 
15
+ /**
16
+ * Common library for all cross-application navigation functions.
17
+ *
18
+ * @namespace
19
+ * @name sap.fe.navigation
20
+ * @public
21
+ * @since 1.83.0
22
+ */
23
+
27
24
  // library dependencies
28
- sap.ui.getCore().initLibrary({
25
+ // delegate further initialization of this library to the Core
26
+ var thisLib = sap.ui.getCore().initLibrary({
29
27
  name: "sap.fe.navigation",
30
- version: "1.99.0",
28
+ version: "1.101.1",
31
29
  dependencies: ["sap.ui.core"],
32
30
  types: ["sap.fe.navigation.NavType", "sap.fe.navigation.ParamHandlingMode", "sap.fe.navigation.SuppressionBehavior"],
33
31
  interfaces: [],
@@ -46,7 +44,7 @@ sap.ui.define(
46
44
  * @public
47
45
  * @since 1.83.0
48
46
  */
49
- sap.fe.navigation.ParamHandlingMode = {
47
+ thisLib.ParamHandlingMode = {
50
48
  /**
51
49
  * The conflict resolution favors the SelectionVariant over URL parameters
52
50
  * @public
@@ -77,7 +75,7 @@ sap.ui.define(
77
75
  * @public
78
76
  * @since 1.83.0
79
77
  */
80
- sap.fe.navigation.NavType = {
78
+ thisLib.NavType = {
81
79
  /**
82
80
  * Initial startup without any navigation or default parameters
83
81
  * @public
@@ -115,7 +113,7 @@ sap.ui.define(
115
113
  * @public
116
114
  * @since 1.83.0
117
115
  */
118
- sap.fe.navigation.SuppressionBehavior = {
116
+ thisLib.SuppressionBehavior = {
119
117
  /**
120
118
  * Standard suppression behavior: semantic attributes with a <code>null</code> or an <code>undefined</code> value are ignored,
121
119
  * the remaining attributes are mixed in to the selection variant
@@ -151,7 +149,7 @@ sap.ui.define(
151
149
  * @public
152
150
  * @since 1.83.0
153
151
  */
154
- sap.fe.navigation.Mode = {
152
+ thisLib.Mode = {
155
153
  /**
156
154
  * This is used for ODataV2 services to do some internal tasks like creation of appstate, removal of sensitive data etc.,
157
155
  * @public
@@ -165,6 +163,6 @@ sap.ui.define(
165
163
  ODataV4: "ODataV4"
166
164
  };
167
165
 
168
- return sap.fe.navigation;
166
+ return thisLib;
169
167
  }
170
168
  );