@sapui5/sap.suite.ui.generic.template 1.108.28 → 1.108.30

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.108.28",
3
+ "version": "1.108.30",
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.108.28</version>
10
+ <version>1.108.30</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -146,7 +146,10 @@ sap.ui.define([
146
146
  oControlAssignedPromise.then(function() {
147
147
  // SFB expects a UIState object - not serializable, but a managed object, actually containing also information not belonging to SFBs state
148
148
  // => get current UIState object from SFB, replace only relevant information, and set it again
149
- var oUiState = oSmartFilterBar.getUiState();
149
+ var oUiState = oSmartFilterBar.getUiState(),
150
+ oSmartVariant = oSmartFilterBar.getSmartVariant(),
151
+ bIsCurrentVariantModifiedBeforeSetState = oSmartVariant.currentVariantGetModified();
152
+
150
153
  oUiState.getSelectionVariant().SelectOptions = oPreliminaryState && oPreliminaryState.selectOptions;
151
154
  oUiState.getSelectionVariant().Parameters = oPreliminaryState && oPreliminaryState.parameters;
152
155
  oUiState.setSemanticDates(oPreliminaryState && oPreliminaryState.semanticDates);
@@ -170,6 +173,9 @@ sap.ui.define([
170
173
  oFilterItem.setVisibleInFilterBar(false);
171
174
  }
172
175
  });
176
+
177
+ // Retaining the old value of "modified" flag in the smart variant
178
+ oSmartVariant.currentVariantSetModified(bIsCurrentVariantModifiedBeforeSetState);
173
179
  });
174
180
 
175
181
  // Apparently, SFB does not always correctly adapt the adapt filters count automatically. The following method has been provided espacially to trigger the same.
@@ -53,9 +53,11 @@ sap.ui.define([
53
53
  // don't create UiState (managed object) from scratch, but fetch it from control and only apply known properties from state - thus, if any other properties would be added, we don't
54
54
  // interfere with them
55
55
  var oUiState = oControl.getUiState();
56
- oUiState.setPresentationVariant(oState.oUiState.oPresentationVariant);
57
- oUiState.setSelectionVariant(oState.oUiState.oSelectionVariant);
58
- oControl.setUiState(oUiState);
56
+ if (!oUiState.getProperty("variantName")){
57
+ oUiState.setPresentationVariant(oState.oUiState.oPresentationVariant);
58
+ oUiState.setSelectionVariant(oState.oUiState.oSelectionVariant);
59
+ oControl.setUiState(oUiState);
60
+ }
59
61
  bIsApplying = false;
60
62
  } else {
61
63
  // set standard variant to overcome "implicit personalization" (esp. for OP when navigating to different object in discovery mode)
@@ -198,7 +200,7 @@ sap.ui.define([
198
200
  setState: fnSetState,
199
201
  setControl: fnSetControl,
200
202
  attachStateChanged: fnAttachStateChanged,
201
- bVMConnection: bVariantManagementActive
203
+ bVMConnection: oSmartControl && oSmartControl.getSmartVariant && !!oSmartControl.getSmartVariant()
202
204
  };
203
205
  }
204
206
 
@@ -166,6 +166,10 @@ sap.ui.define([
166
166
  // if managedControlStates is not provided (legacy or maybe broken state), applying VM state should not break
167
167
  // don't apply undefined to managedControlWrappers, but just leave them untouched
168
168
  if (oPreliminaryState.managedControlStates){
169
+ if (oSmartFilterBarWrapper) {
170
+ // SmartFilterBarWrapper.setState is invoked to apply the state changes modified by "modifyStartupExtension"
171
+ oSmartFilterBarWrapper.setState(oPreliminaryState.managedControlStates[oSmartFilterBarWrapper.getLocalId()]);
172
+ }
169
173
  if (oPreliminaryState.variantId !== oSmartVariantManagement.getCurrentVariantId()){
170
174
  // variant could not be set because it is not known, i.e. it could be private and URL was shared, or could be deleted after page was bookmarked. In this case,
171
175
  // standard variant is set (by VM). Additionally, it should be marked as modified.
@@ -856,7 +856,7 @@ sap.ui.define([
856
856
  * @extends sap.ui.core.UIComponent
857
857
  * @abstract
858
858
  * @author SAP SE
859
- * @version 1.108.28
859
+ * @version 1.108.30
860
860
  * @name sap.suite.ui.generic.template.lib.AppComponent
861
861
  */
862
862
  return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -2943,7 +2943,7 @@ sap.ui.define(["sap/ui/base/Object",
2943
2943
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
2944
2944
  * @public
2945
2945
  * @extends sap.ui.base.Object
2946
- * @version 1.108.28
2946
+ * @version 1.108.30
2947
2947
  * @since 1.30.0
2948
2948
  * @alias sap.suite.ui.generic.template.lib.NavigationController
2949
2949
  */
@@ -38,7 +38,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/core/library','sap/fe/placeholder/lib
38
38
  interfaces: [],
39
39
  controls: [],
40
40
  elements: [],
41
- version: "1.108.28",
41
+ version: "1.108.30",
42
42
  extensions: {
43
43
  //Configuration used for rule loading of Support Assistant
44
44
  "sap.ui.support": {
@@ -785,7 +785,7 @@ sap.ui.define([
785
785
  */
786
786
  _getSelParamsFromChart: function(chart) {
787
787
  var dpList = [];
788
- dpList = chart.getSelectedDataPoints().dataPoints;
788
+ dpList = this.oState.oTemplateUtils.oCommonUtils.getSelectionPoints(chart).dataPoints;
789
789
  return this._getSelParamsFromDPList(dpList);
790
790
  },
791
791
  /**
@@ -376,6 +376,11 @@ sap.ui.define(["sap/ui/base/Object",
376
376
  // Smart filter bar all the filters will be replaced by the one which are coming from oUiState build base of oSelectionVariant where the Semantic Date Default Values
377
377
  // is missing and because of that the values are replaced. Hence adding the semantic Dates to oSelectionVariant as mentioned by the Smart Control Colleague in the BCP - 2180400040
378
378
  oStartupObject.semanticDates.Dates.forEach(function(oSelectDateOption){
379
+ var oSelectionDateOption = oStartupObject.selectionVariant.getSelectOption(oSelectDateOption.PropertyName);
380
+ //If startup object contains date range with the oSelectionDateOption PropertyName no need to override
381
+ if (oSelectionDateOption && oSelectionDateOption.length != 0) {
382
+ return;
383
+ }
379
384
  oStartupObject.selectionVariant.addSelectOption(oSelectDateOption.PropertyName, "I", "EQ", "");
380
385
  });
381
386
 
@@ -284,7 +284,7 @@ sap.ui.define(["sap/ui/core/mvc/Controller",
284
284
  var oEvent = deepExtend({}, ev);
285
285
  setTimeout(function() { // due to the selection data points not being updated during the deselectData event, must check again asynchronously
286
286
  var chart = me.oChart;
287
- if (chart.getSelectedDataPoints().count == 0) {// Clear the filter if no selections remain. If a selection exists it would have come through the SelectData event
287
+ if (me.oState.oTemplateUtils.oCommonUtils.getSelectionPoints(chart).count == 0) {// Clear the filter if no selections remain. If a selection exists it would have come through the SelectData event
288
288
  me._updateTable();
289
289
  } else if (chart.getSelectionMode() == "MULTIPLE") {// Treat an unselect with remaining selection points as a select
290
290
  me._onChartSelectData(oEvent);