@sapui5/sap.suite.ui.generic.template 1.105.2 → 1.105.3

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.105.2",
3
+ "version": "1.105.3",
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.105.2</version>
10
+ <version>1.105.3</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -2934,7 +2934,7 @@ sap.ui.define(["sap/ui/base/Object",
2934
2934
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
2935
2935
  * @public
2936
2936
  * @extends sap.ui.base.Object
2937
- * @version 1.105.2
2937
+ * @version 1.105.3
2938
2938
  * @since 1.30.0
2939
2939
  * @alias sap.suite.ui.generic.template.lib.NavigationController
2940
2940
  */
@@ -144,17 +144,28 @@ sap.ui.define([
144
144
  oSmartTable.rebindTable();
145
145
  }
146
146
 
147
- function fnApplyNavigationSortOrder(aNavigationSortOrder) {
148
- var oUiState = oSmartTable.getUiState();
149
- var oPresentationVariant = oUiState.getPresentationVariant();
150
- if (!oPresentationVariant.SortOrder) {
151
- oPresentationVariant.SortOrder = getTemplateSortOrder();
152
- }
153
- oPresentationVariant.SortOrder = oPresentationVariant.SortOrder.concat(aNavigationSortOrder);
154
-
155
- oUiState.setPresentationVariant(oPresentationVariant);
156
- oSmartTable.setUiState(oUiState);
157
- }
147
+ function fnApplyNavigationSortOrder(aNavigationSortOrders) {
148
+ var oOwnerComponent = oController.getOwnerComponent();
149
+ var oMetaModel = oOwnerComponent.getModel().getMetaModel();
150
+ var aNonSortableProperties = [];
151
+ var oSortRestrictions = oMetaModel.getODataEntitySet(oOwnerComponent.getEntitySet())["Org.OData.Capabilities.V1.SortRestrictions"];
152
+ if (oSortRestrictions && oSortRestrictions.NonSortableProperties) {
153
+ aNonSortableProperties = oSortRestrictions.NonSortableProperties.map(function(oProperty) {
154
+ return oProperty.PropertyPath;
155
+ });
156
+ }
157
+ var aRelevantSortOrders = aNavigationSortOrders.filter(function(oProperty) {
158
+ return !aNonSortableProperties.includes(oProperty.Property);
159
+ });
160
+ var oUiState = oSmartTable.getUiState();
161
+ var oPresentationVariant = oUiState.getPresentationVariant();
162
+ if (!oPresentationVariant.SortOrder) {
163
+ oPresentationVariant.SortOrder = getTemplateSortOrder();
164
+ }
165
+ oPresentationVariant.SortOrder = oPresentationVariant.SortOrder.concat(aRelevantSortOrders);
166
+ oUiState.setPresentationVariant(oPresentationVariant);
167
+ oSmartTable.setUiState(oUiState);
168
+ }
158
169
 
159
170
  function fnScrollToSelectedItemAsPerChildContext(sCurrentChildContext) {
160
171
  if (bIsMTable){ // currently only mTable is supported
@@ -39,7 +39,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/core/library','sap/fe/placeholder/lib
39
39
  interfaces: [],
40
40
  controls: [],
41
41
  elements: [],
42
- version: "1.105.2",
42
+ version: "1.105.3",
43
43
  extensions: {
44
44
  //Configuration used for rule loading of Support Assistant
45
45
  "sap.ui.support": {