@sapui5/sap.suite.ui.generic.template 1.124.4 → 1.124.5

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.124.4",
3
+ "version": "1.124.5",
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.124.4</version>
10
+ <version>1.124.5</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.124.4"
11
+ "version": "1.124.5"
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.124.4"
11
+ "version": "1.124.5"
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.124.4"
11
+ "version": "1.124.5"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -1817,23 +1817,25 @@ sap.ui.define([
1817
1817
 
1818
1818
  // This function is called when a sub-section is getting in view-port
1819
1819
  function fnSubSectionEntered(oSubSection) {
1820
- var oSubSectionInfoObj = oTemplateUtils.oInfoObjectHandler.setInformationWithControl(oSubSection); // Assigning the SubSection control to Info Object, in case it is assigned infoObject is returned without doing anything
1821
- // Check if initialization code is executed for the SubSection. If not initialize the same
1822
- var sSubSectionId = oSubSection.getId();
1823
- if (!mSubSectionsInitState[sSubSectionId]) {
1824
- // Execute Application specific logic which needs to be executed
1825
- oController.onSubSectionEnteredExtension(oSubSection);
1826
- mSubSectionsInitState[sSubSectionId] = true;
1827
- }
1828
-
1829
- if (oSubSectionInfoObj) { // In case of EditableHeaderFacet Sections & SubSection is created at runtime and there is info object handling
1830
- oMultipleViewsHandler.subSectionEntered(oSubSectionInfoObj); // Assigning the SubSection control MultipleViewsHandler. In case not relevant method simply returns
1831
- // The loading strategy of a sub-section might depend on the content of oWaitForState (together with the strategy) and whether or not the sub-section is currently in view-port.
1832
- // The second condition is fulfilled for sure. Only check the first one.
1833
- var oStrategy = oSubSectionInfoObj.getLoadingStrategy();
1834
- var bExecuteNow = checkGlobalWaitState(oStrategy);
1835
- if (bExecuteNow) {
1836
- oStrategy.activeHandler(oSubSection, oSubSectionInfoObj);
1820
+ if (oWaitForState && oWaitForState.bRebindCompleted){
1821
+ var oSubSectionInfoObj = oTemplateUtils.oInfoObjectHandler.setInformationWithControl(oSubSection); // Assigning the SubSection control to Info Object, in case it is assigned infoObject is returned without doing anything
1822
+ // Check if initialization code is executed for the SubSection. If not initialize the same
1823
+ var sSubSectionId = oSubSection.getId();
1824
+ if (!mSubSectionsInitState[sSubSectionId]) {
1825
+ // Execute Application specific logic which needs to be executed
1826
+ oController.onSubSectionEnteredExtension(oSubSection);
1827
+ mSubSectionsInitState[sSubSectionId] = true;
1828
+ }
1829
+
1830
+ if (oSubSectionInfoObj) { // In case of EditableHeaderFacet Sections & SubSection is created at runtime and there is info object handling
1831
+ oMultipleViewsHandler.subSectionEntered(oSubSectionInfoObj); // Assigning the SubSection control MultipleViewsHandler. In case not relevant method simply returns
1832
+ // The loading strategy of a sub-section might depend on the content of oWaitForState (together with the strategy) and whether or not the sub-section is currently in view-port.
1833
+ // The second condition is fulfilled for sure. Only check the first one.
1834
+ var oStrategy = oSubSectionInfoObj.getLoadingStrategy();
1835
+ var bExecuteNow = checkGlobalWaitState(oStrategy);
1836
+ if (bExecuteNow) {
1837
+ oStrategy.activeHandler(oSubSection, oSubSectionInfoObj);
1838
+ }
1837
1839
  }
1838
1840
  }
1839
1841
  }
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.124.4"
9
+ "version": "1.124.5"
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.124.4"
9
+ "version": "1.124.5"
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.124.4"
9
+ "version": "1.124.5"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -460,6 +460,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
460
460
  var oContextSet = oInterface.getInterface(0);
461
461
  var oModel = oInterface.getInterface(1).getModel();
462
462
  // p13nData for Semantically Connected Columns
463
+ var sLeadingPropertyForSCColumn = "";
463
464
  var aNavigationPropertiesForSCColumn = [];
464
465
  var aAdditionalPropertiesForSCColumn = [];
465
466
  var aAdditionalSortPropertiesForSCColumn = [];
@@ -509,9 +510,15 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
509
510
  if (sP13N) {
510
511
  oP13N = JSON.parse(sP13N.replace(/\\/g, ""));
511
512
  }
512
-
513
- oP13N.leadingProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
514
- oP13N.leadingProperty && (aAdditionalSortPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
513
+
514
+ // Make the first data field's "leadingProperty" as column's "leadingProperty"
515
+ // Add the remaining leading properties into "additionalProperty" and "additionalSortingProperty"
516
+ if (!sLeadingPropertyForSCColumn && oP13N.leadingProperty) {
517
+ sLeadingPropertyForSCColumn = oP13N.leadingProperty;
518
+ } else {
519
+ oP13N.leadingProperty && (aAdditionalPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
520
+ oP13N.leadingProperty && (aAdditionalSortPropertiesForSCColumn.indexOf(oP13N.leadingProperty) === -1) ? aAdditionalSortPropertiesForSCColumn.push(oP13N.leadingProperty) : Function.prototype;
521
+ }
515
522
 
516
523
  oP13N.navigationProperty && (aNavigationPropertiesForSCColumn.indexOf(oP13N.navigationProperty) === -1) ? aNavigationPropertiesForSCColumn.push(oP13N.navigationProperty) : Function.prototype;
517
524
  // Add "additionalProperty" of current data field to the "additionalProperty" of current column's p13n
@@ -532,6 +539,12 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
532
539
 
533
540
  sP13N += '", "filterProperty":"' + "";
534
541
 
542
+ // Add the leading property to "leadingProperty" and "sortProperty" of p13n
543
+ if (sLeadingPropertyForSCColumn) {
544
+ sP13N += '", "leadingProperty":"' + sLeadingPropertyForSCColumn;
545
+ sP13N += '", "sortProperty":"' + sLeadingPropertyForSCColumn;
546
+ }
547
+
535
548
  if (aNavigationPropertiesForSCColumn.length > 0) {
536
549
  sP13N += '", "navigationProperty":"' + aNavigationPropertiesForSCColumn.join();
537
550
  }
@@ -920,7 +920,7 @@ sap.ui.define([
920
920
  * @extends sap.ui.core.UIComponent
921
921
  * @abstract
922
922
  * @author SAP SE
923
- * @version 1.124.4
923
+ * @version 1.124.5
924
924
  * @name sap.suite.ui.generic.template.lib.AppComponent
925
925
  */
926
926
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -2834,13 +2834,44 @@ sap.ui.define(["sap/ui/base/Object",
2834
2834
  return true;
2835
2835
  }
2836
2836
  // Now handle the case of an internal navigation which was not controlled by FE (e.g. browser back, navigation menu, bookmark){
2837
- var oRouteInfo = oNavigationControllerProxy.oRouter.getRouteInfoByHash(oShellContext.innerAppRoute);
2837
+ var oRouteInfo = fnGetRouteInfoByHash(oNavigationControllerProxy.oRouter, oShellContext.innerAppRoute);
2838
+ if (!oRouteInfo) {
2839
+ return false;
2840
+ }
2838
2841
  var oTargetIdentity = fnRouteConfigToIdentity(oRouteInfo.name, oRouteInfo.arguments);
2839
2842
  return oTargetIdentity.treeNode !== oCurrentIdentity.treeNode || oTargetIdentity.keys.some(function(sKey, i){
2840
2843
  return sKey !== oCurrentIdentity.keys[i];
2841
2844
  });
2842
2845
  }
2843
2846
 
2847
+ /**
2848
+ * From the given app route hash, returns the route information.
2849
+ * Also takes nested app route hash as input
2850
+ * @param {sap.m.routing.Router|sap.f.routing.Router} oRouter
2851
+ * @param {string} sHash
2852
+ * @returns {sap.ui.core.routing.RouteInfo|undefined} An object containing the route <code>name</code> and the <code>arguments</code>
2853
+ * or <code>undefined</code>
2854
+ */
2855
+ function fnGetRouteInfoByHash(oRouter, sHash) {
2856
+ // If route info found by the input hash, just return it
2857
+ var oRouteInfo = oRouter.getRouteInfoByHash(sHash);
2858
+ if (oRouteInfo) {
2859
+ return oRouteInfo;
2860
+ }
2861
+ // Nested app route: Split the hash by "&/" and get the hash belongs to inner most app route (last index)
2862
+ // Then, check whether the route info found by inner most hash.
2863
+ var aNestedAppRoutes = sHash.split("&/");
2864
+ var sInnerMostHash = aNestedAppRoutes[aNestedAppRoutes.length - 1];
2865
+ oRouteInfo = oRouter.getRouteInfoByHash(sInnerMostHash);
2866
+ if (oRouteInfo) {
2867
+ return oRouteInfo;
2868
+ }
2869
+ // In case the inner most app route is prefixed with app name, just omit the app name and try to get route info from remaining hash.
2870
+ sInnerMostHash = sInnerMostHash.substring(sInnerMostHash.indexOf("/"));
2871
+ oRouteInfo = oRouter.getRouteInfoByHash(sInnerMostHash);
2872
+ return oRouteInfo;
2873
+ }
2874
+
2844
2875
  function getEditScopeHeaderNode(oTreeNode){
2845
2876
  var oMainNode = oTemplateContract.oApplicationProxy.getAncestralNode(oTreeNode, 1);
2846
2877
  return oMainNode.isDraft ? oMainNode : oTreeNode;
@@ -2958,6 +2989,7 @@ sap.ui.define(["sap/ui/base/Object",
2958
2989
  var fnCreateTemplateComponent = testableHelper.testable(fnCreateTemplateComponent, "createTemplateComponent");
2959
2990
  var getParsedShellHashFromFLP = testableHelper.testable(getParsedShellHashFromFLP, "getParsedShellHashFromFLP");
2960
2991
  var fnPreloadComponent = testableHelper.testable(fnPreloadComponent, "preloadComponent");
2992
+ var fnGetRouteInfoByHash = testableHelper.testable(fnGetRouteInfoByHash, "getRouteInfoByHash");
2961
2993
 
2962
2994
  // Note: Function createHostView will be added by routingHelper.
2963
2995
  // Allow to mock this by unit tests
@@ -3055,7 +3087,7 @@ sap.ui.define(["sap/ui/base/Object",
3055
3087
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3056
3088
  * @public
3057
3089
  * @extends sap.ui.base.Object
3058
- * @version 1.124.4
3090
+ * @version 1.124.5
3059
3091
  * @since 1.30.0
3060
3092
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3061
3093
  */
@@ -62,7 +62,7 @@ sap.ui.define([
62
62
  interfaces: [],
63
63
  controls: [],
64
64
  elements: [],
65
- version: "1.124.4",
65
+ version: "1.124.5",
66
66
  extensions: {
67
67
  //Configuration used for rule loading of Support Assistant
68
68
  "sap.ui.support": {