@sapui5/sap.suite.ui.generic.template 1.148.4 → 1.148.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.148.4",
3
+ "version": "1.148.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.148.4</version>
10
+ <version>1.148.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.148.4"
11
+ "version": "1.148.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.148.4"
11
+ "version": "1.148.5"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -919,12 +919,6 @@ sap.ui.define([
919
919
  onEasyFilterTokensChangedByUser: function(oEvent) {
920
920
  oState.oEasyFilterBarHandler.onTokensChangedByUser(oEvent);
921
921
  },
922
- onEasyFilterSortersChanged: function(oEvent) {
923
- oState.oEasyFilterBarHandler.onSortersChanged(oEvent);
924
- },
925
- onEasyFilterGroupLevelsChanged: function(oEvent) {
926
- oState.oEasyFilterBarHandler.onGroupLevelsChanged(oEvent);
927
- },
928
922
  onEasyFilterQueryChanged: function(oEvent) {
929
923
  oState.oEasyFilterBarHandler.onQueryChanged(oEvent);
930
924
  },
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.148.4"
11
+ "version": "1.148.5"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.148.4"
9
+ "version": "1.148.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.148.4"
9
+ "version": "1.148.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.148.4"
9
+ "version": "1.148.5"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -6,8 +6,6 @@
6
6
  queryChanged="._templateEventHandlers.onEasyFilterQueryChanged"
7
7
  tokensChanged="._templateEventHandlers.onEasyFilterTokensChanged"
8
8
  tokensChangedByUser="._templateEventHandlers.onEasyFilterTokensChangedByUser"
9
- sortersChanged="._templateEventHandlers.onEasyFilterSortersChanged"
10
- groupLevelsChanged="._templateEventHandlers.onEasyFilterGroupLevelsChanged"
11
9
  beforeQueryProcessing="._templateEventHandlers.onEasyFilterBeforeQueryProcessing"
12
10
  afterQueryProcessing="._templateEventHandlers.onEasyFilterAfterQueryProcessing"
13
11
  clearFilters="._templateEventHandlers.onEasyFilterClearFilters"
@@ -959,7 +959,7 @@ sap.ui.define([
959
959
  * @public
960
960
  * @extends sap.ui.core.UIComponent
961
961
  * @author SAP SE
962
- * @version 1.148.4
962
+ * @version 1.148.5
963
963
  * @name sap.suite.ui.generic.template.lib.AppComponent
964
964
  */
965
965
  var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
@@ -541,13 +541,7 @@ sap.ui.define(["sap/ui/base/Object",
541
541
  var aMessagesBeforeSave = CRUDHelper.fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, true);
542
542
  var mMessagesBeforeSave = Object.create(null);
543
543
  aMessagesBeforeSave.forEach(function(oMessage){
544
- // Exclude transition messages (persistent === false) left over from a prior 412 response.
545
- // Including them causes false-positive deduplication on retry: the new 412 produces
546
- // the same message IDs, they are filtered out of aNewMessages, and fnHandleWarning
547
- // is never called.
548
- if (oMessage.persistent !== false) {
549
- mMessagesBeforeSave[oMessage.getId()] = oMessage;
550
- }
544
+ mMessagesBeforeSave[oMessage.getId()] = oMessage;
551
545
  });
552
546
 
553
547
  // Handles the 412 Warning case.
@@ -695,6 +695,18 @@ sap.ui.define([
695
695
  // currentVariantSetModified intentionally omitted — pressing Go with the same
696
696
  // query must not mark the variant as dirty.
697
697
  // oSmartFilterbar.getSmartVariant() && oSmartFilterbar.getSmartVariant().currentVariantSetModified(true);
698
+
699
+ // Apply sorters/groupLevels bundled with tokens after SFB state is set but
700
+ // before triggering search, to prevent a premature rebind with incomplete filters.
701
+ var aBundledSorters = oEvent.getParameter("sorters");
702
+ var aBundledGroupLevels = oEvent.getParameter("groupLevels");
703
+ if (aBundledSorters !== undefined) {
704
+ fnApplySortersToTable(aBundledSorters);
705
+ }
706
+ if (aBundledGroupLevels !== undefined) {
707
+ fnApplyGroupLevelsToTable(aBundledGroupLevels);
708
+ }
709
+
698
710
  oSmartFilterbar.search();
699
711
  }
700
712
 
@@ -708,42 +720,30 @@ sap.ui.define([
708
720
  fnSetCreationAllowed(false);
709
721
  }
710
722
 
711
- /**
712
- /**
713
- * Event handler for the EasyFilter control's sortersChanged event.
714
- * Applies the AI-determined sort order to the SmartTable via setUiState,
715
- * which updates the data binding, column sort indicators, and P13n state
716
- * through the PersonalizationController.
717
- * @param {sap.ui.base.Event} oEvent The sortersChanged event containing sort definitions
718
- */
719
- function fnSortersChanged(oEvent) {
723
+ function fnApplySortersToTable(aSorters) {
720
724
  try {
721
- var aSorters = oEvent.getParameter("sorters");
722
-
723
725
  var oPresentationControlHandler = oState.oPresentationControlHandler;
724
726
  if (!oPresentationControlHandler) {
725
- oLogger.error("EasyFilterBarHandler.onSortersChanged: PresentationControlHandler not found.");
727
+ oLogger.error("EasyFilterBarHandler: PresentationControlHandler not found.");
726
728
  return;
727
729
  }
728
-
730
+
729
731
  var oControl = oPresentationControlHandler.getControl();
730
732
  if (!oControl) {
731
- oLogger.error("EasyFilterBarHandler.onSortersChanged: Presentation control not found.");
733
+ oLogger.error("EasyFilterBarHandler: Presentation control not found.");
732
734
  return;
733
735
  }
734
736
 
735
737
  if (!controlHelper.isSmartTable(oControl)) {
736
- oLogger.warning("EasyFilterBarHandler.onSortersChanged: Sorting is only supported for SmartTable.");
738
+ oLogger.warning("EasyFilterBarHandler: Sorting is only supported for SmartTable.");
737
739
  return;
738
740
  }
739
-
741
+
740
742
  var oUiState = oControl.getUiState();
741
743
  var oPresentationVariant = oUiState.getPresentationVariant();
742
-
743
- oPresentationVariant.SortOrder = undefined; // Clear existing sort order before applying new one
744
744
 
745
- // Set new sort order (empty array clears sorting)
746
- const aSortersMapped = (aSorters && aSorters.length ) ? aSorters.map(function (oSorter) {
745
+ oPresentationVariant.SortOrder = undefined;
746
+ var aSortersMapped = (aSorters && aSorters.length) ? aSorters.map(function(oSorter) {
747
747
  return {
748
748
  Property: oSorter.key,
749
749
  Descending: !!oSorter.descending
@@ -757,51 +757,38 @@ sap.ui.define([
757
757
  } finally {
758
758
  bApplyingSorting = false;
759
759
  }
760
-
761
760
  } catch (error) {
762
761
  bApplyingSorting = false;
763
762
  oLogger.warning("EasyFilterBar: unexpected error while handling sortersChanged", String(error));
764
763
  }
765
- }
764
+ }
766
765
 
767
- /**
768
- * Event handler for the EasyFilter control's groupLevelsChanged event.
769
- * Applies the AI-determined group levels to the SmartTable via setUiState,
770
- * which updates the data binding and table grouping state
771
- * through the PersonalizationController.
772
- * @param {sap.ui.base.Event} oEvent The groupLevelsChanged event containing group level definitions
773
- */
774
- function fnGroupLevelsChanged(oEvent) {
766
+ function fnApplyGroupLevelsToTable(aGroupLevels) {
775
767
  try {
776
- var aGroupLevels = oEvent.getParameter("groupLevels");
777
-
778
768
  var oPresentationControlHandler = oState.oPresentationControlHandler;
779
769
  if (!oPresentationControlHandler) {
780
- oLogger.error("EasyFilterBarHandler.onGroupLevelsChanged: PresentationControlHandler not found.");
770
+ oLogger.error("EasyFilterBarHandler: PresentationControlHandler not found.");
781
771
  return;
782
772
  }
783
-
773
+
784
774
  var oControl = oPresentationControlHandler.getControl();
785
775
  if (!oControl) {
786
- oLogger.error("EasyFilterBarHandler.onGroupLevelsChanged: Presentation control not found.");
776
+ oLogger.error("EasyFilterBarHandler: Presentation control not found.");
787
777
  return;
788
778
  }
789
779
 
790
780
  if (!controlHelper.isSmartTable(oControl)) {
791
- oLogger.warning("EasyFilterBarHandler.onGroupLevelsChanged: Grouping is only supported for SmartTable.");
781
+ oLogger.warning("EasyFilterBarHandler: Grouping is only supported for SmartTable.");
792
782
  return;
793
783
  }
794
-
784
+
795
785
  var oUiState = oControl.getUiState();
796
786
  var oPresentationVariant = oUiState.getPresentationVariant();
797
-
798
- oPresentationVariant.GroupBy = undefined; // Clear existing group levels before applying new ones
799
-
800
- // SmartTable supports grouping by only one column at a time,
801
- // so we take only the first group level even if multiple are provided.
802
- oPresentationVariant.GroupBy = (aGroupLevels && aGroupLevels.length) ?
803
- aGroupLevels?.flatMap(aGroup => Object.values(aGroup)) : undefined;
804
-
787
+
788
+ oPresentationVariant.GroupBy = undefined;
789
+ oPresentationVariant.GroupBy = (aGroupLevels && aGroupLevels.length) ?
790
+ aGroupLevels.flatMap(function(aGroup) { return Object.values(aGroup); }) : undefined;
791
+
805
792
  bApplyingGrouplevels = true;
806
793
  try {
807
794
  oControl.setUiState(oUiState);
@@ -812,7 +799,7 @@ sap.ui.define([
812
799
  bApplyingGrouplevels = false;
813
800
  oLogger.warning("EasyFilterBar: unexpected error while handling groupLevelsChanged", String(error));
814
801
  }
815
- }
802
+ }
816
803
 
817
804
  /**
818
805
  * Event handler for the EasyFilter control's showValueHelp event.
@@ -1030,8 +1017,6 @@ sap.ui.define([
1030
1017
  onQueryChanged : fnQueryChanged,
1031
1018
  onTokensChanged: fnTokensChanged,
1032
1019
  onTokensChangedByUser: fnTokensChangedByUser,
1033
- onSortersChanged: fnSortersChanged,
1034
- onGroupLevelsChanged: fnGroupLevelsChanged,
1035
1020
  onShowValueHelp: fnShowValueHelp,
1036
1021
  onFilterChange : fnOnFilterChange,
1037
1022
  handleVariantLoad : fnHandleVariantLoad,
@@ -3222,7 +3222,7 @@ sap.ui.define(["sap/ui/base/Object",
3222
3222
  * @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
3223
3223
  * @public
3224
3224
  * @extends sap.ui.base.Object
3225
- * @version 1.148.4
3225
+ * @version 1.148.5
3226
3226
  * @since 1.30.0
3227
3227
  * @alias sap.suite.ui.generic.template.lib.NavigationController
3228
3228
  */
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  interfaces: [],
69
69
  controls: [],
70
70
  elements: [],
71
- version: "1.148.4",
71
+ version: "1.148.5",
72
72
  extensions: {
73
73
  //Configuration used for rule loading of Support Assistant
74
74
  "sap.ui.support": {