@openui5/sap.ui.mdc 1.112.0 → 1.113.0

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.
Files changed (178) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +4 -4
  3. package/src/sap/ui/mdc/.library +1 -1
  4. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  5. package/src/sap/ui/mdc/Chart.js +52 -14
  6. package/src/sap/ui/mdc/ChartDelegate.js +191 -103
  7. package/src/sap/ui/mdc/Control.js +1 -1
  8. package/src/sap/ui/mdc/Element.js +1 -1
  9. package/src/sap/ui/mdc/Field.js +41 -6
  10. package/src/sap/ui/mdc/FilterBar.js +1 -1
  11. package/src/sap/ui/mdc/FilterField.js +3 -3
  12. package/src/sap/ui/mdc/Link.js +5 -1
  13. package/src/sap/ui/mdc/MultiValueField.js +39 -3
  14. package/src/sap/ui/mdc/Table.js +164 -65
  15. package/src/sap/ui/mdc/TableDelegate.js +27 -15
  16. package/src/sap/ui/mdc/ValueHelp.js +9 -10
  17. package/src/sap/ui/mdc/ValueHelpDelegate.js +11 -6
  18. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  19. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +2 -2
  20. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -2
  21. package/src/sap/ui/mdc/chart/ChartToolbar.js +1 -1
  22. package/src/sap/ui/mdc/chart/ChartTypeButton.js +39 -49
  23. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +3 -3
  24. package/src/sap/ui/mdc/chart/DrillStackHandler.js +60 -69
  25. package/src/sap/ui/mdc/chart/PropertyHelper.js +7 -7
  26. package/src/sap/ui/mdc/condition/Condition.js +20 -14
  27. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  28. package/src/sap/ui/mdc/condition/ConditionModel.js +6 -149
  29. package/src/sap/ui/mdc/condition/ConditionModelPropertyBinding.js +5 -3
  30. package/src/sap/ui/mdc/condition/FilterConverter.js +2 -22
  31. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +20 -6
  32. package/src/sap/ui/mdc/condition/Operator.js +75 -39
  33. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +3 -2
  34. package/src/sap/ui/mdc/condition/RangeOperator.js +104 -104
  35. package/src/sap/ui/mdc/enum/ConditionValidated.js +4 -1
  36. package/src/sap/ui/mdc/enum/ContentMode.js +1 -1
  37. package/src/sap/ui/mdc/enum/EditMode.js +7 -7
  38. package/src/sap/ui/mdc/enum/FieldDisplay.js +3 -3
  39. package/src/sap/ui/mdc/enum/OperatorOverwrite.js +34 -0
  40. package/src/sap/ui/mdc/field/ConditionType.js +4 -4
  41. package/src/sap/ui/mdc/field/ConditionsType.js +5 -5
  42. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  43. package/src/sap/ui/mdc/field/DefineConditionPanel.js +10 -24
  44. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +22 -10
  45. package/src/sap/ui/mdc/field/FieldBase.js +41 -16
  46. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +7 -15
  47. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  48. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  49. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  50. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  51. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +2 -2
  52. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  53. package/src/sap/ui/mdc/field/TokenDisplay.js +2 -2
  54. package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -2
  55. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +4 -9
  56. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  57. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +5 -12
  58. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +1 -1
  59. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  60. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +16 -10
  61. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +0 -21
  62. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  63. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +0 -18
  64. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +0 -15
  65. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  66. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  67. package/src/sap/ui/mdc/flexibility/GroupFlex.js +2 -22
  68. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
  69. package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -21
  70. package/src/sap/ui/mdc/flexibility/Util.js +9 -7
  71. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +1 -1
  72. package/src/sap/ui/mdc/library.js +13 -2
  73. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  74. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  75. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  76. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  77. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  78. package/src/sap/ui/mdc/link/Factory.js +1 -1
  79. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  80. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  81. package/src/sap/ui/mdc/link/Panel.js +1 -1
  82. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  83. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  84. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  85. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  86. package/src/sap/ui/mdc/messagebundle.properties +8 -2
  87. package/src/sap/ui/mdc/messagebundle_ar.properties +18 -15
  88. package/src/sap/ui/mdc/messagebundle_bg.properties +4 -1
  89. package/src/sap/ui/mdc/messagebundle_ca.properties +3 -0
  90. package/src/sap/ui/mdc/messagebundle_cs.properties +3 -0
  91. package/src/sap/ui/mdc/messagebundle_cy.properties +3 -0
  92. package/src/sap/ui/mdc/messagebundle_da.properties +4 -1
  93. package/src/sap/ui/mdc/messagebundle_de.properties +5 -2
  94. package/src/sap/ui/mdc/messagebundle_el.properties +3 -0
  95. package/src/sap/ui/mdc/messagebundle_en.properties +3 -0
  96. package/src/sap/ui/mdc/messagebundle_en_GB.properties +3 -0
  97. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +4 -1
  98. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +4 -1
  99. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +4 -1
  100. package/src/sap/ui/mdc/messagebundle_es.properties +3 -0
  101. package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -0
  102. package/src/sap/ui/mdc/messagebundle_et.properties +3 -0
  103. package/src/sap/ui/mdc/messagebundle_fi.properties +3 -0
  104. package/src/sap/ui/mdc/messagebundle_fr.properties +3 -0
  105. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +3 -0
  106. package/src/sap/ui/mdc/messagebundle_hi.properties +3 -0
  107. package/src/sap/ui/mdc/messagebundle_hr.properties +3 -0
  108. package/src/sap/ui/mdc/messagebundle_hu.properties +3 -0
  109. package/src/sap/ui/mdc/messagebundle_id.properties +3 -0
  110. package/src/sap/ui/mdc/messagebundle_it.properties +3 -0
  111. package/src/sap/ui/mdc/messagebundle_iw.properties +3 -0
  112. package/src/sap/ui/mdc/messagebundle_ja.properties +3 -0
  113. package/src/sap/ui/mdc/messagebundle_kk.properties +3 -0
  114. package/src/sap/ui/mdc/messagebundle_ko.properties +3 -0
  115. package/src/sap/ui/mdc/messagebundle_lt.properties +3 -0
  116. package/src/sap/ui/mdc/messagebundle_lv.properties +3 -0
  117. package/src/sap/ui/mdc/messagebundle_ms.properties +3 -0
  118. package/src/sap/ui/mdc/messagebundle_nl.properties +3 -0
  119. package/src/sap/ui/mdc/messagebundle_no.properties +4 -1
  120. package/src/sap/ui/mdc/messagebundle_pl.properties +3 -0
  121. package/src/sap/ui/mdc/messagebundle_pt.properties +3 -0
  122. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +3 -0
  123. package/src/sap/ui/mdc/messagebundle_ro.properties +3 -0
  124. package/src/sap/ui/mdc/messagebundle_ru.properties +3 -0
  125. package/src/sap/ui/mdc/messagebundle_sh.properties +3 -0
  126. package/src/sap/ui/mdc/messagebundle_sk.properties +3 -0
  127. package/src/sap/ui/mdc/messagebundle_sl.properties +3 -0
  128. package/src/sap/ui/mdc/messagebundle_sv.properties +3 -0
  129. package/src/sap/ui/mdc/messagebundle_th.properties +3 -0
  130. package/src/sap/ui/mdc/messagebundle_tr.properties +3 -0
  131. package/src/sap/ui/mdc/messagebundle_uk.properties +5 -2
  132. package/src/sap/ui/mdc/messagebundle_vi.properties +3 -0
  133. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +3 -0
  134. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +3 -0
  135. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  136. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  137. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  138. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  139. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  140. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +32 -0
  141. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +20 -23
  142. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  143. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  144. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +4 -0
  145. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +12 -24
  146. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +1 -1
  147. package/src/sap/ui/mdc/table/Column.js +0 -8
  148. package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
  149. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  150. package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
  151. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
  152. package/src/sap/ui/mdc/table/ResponsiveTableType.js +22 -9
  153. package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
  154. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  155. package/src/sap/ui/mdc/table/TableSettings.js +15 -113
  156. package/src/sap/ui/mdc/table/TableTypeBase.js +8 -0
  157. package/src/sap/ui/mdc/table/TreeTableType.js +1 -1
  158. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  159. package/src/sap/ui/mdc/table/menu/Item.js +1 -1
  160. package/src/sap/ui/mdc/table/menu/ItemContainer.js +4 -0
  161. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +12 -7
  162. package/src/sap/ui/mdc/table/utils/Personalization.js +236 -0
  163. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +3 -3
  164. package/src/sap/ui/mdc/util/InfoBar.js +2 -2
  165. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  166. package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
  167. package/src/sap/ui/mdc/valuehelp/Dialog.js +5 -4
  168. package/src/sap/ui/mdc/valuehelp/Popover.js +3 -2
  169. package/src/sap/ui/mdc/valuehelp/base/Container.js +20 -2
  170. package/src/sap/ui/mdc/valuehelp/base/Content.js +5 -2
  171. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  172. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +12 -36
  173. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +5 -2
  174. package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
  175. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +3 -2
  176. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +3 -2
  177. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +3 -2
  178. package/src/sap/ui/mdc/valuehelp/content/MTable.js +8 -7
@@ -108,126 +108,28 @@ sap.ui.define([
108
108
 
109
109
  return oMenuButton;
110
110
  },
111
- _createButton: function(sId, mSettings) {
112
- return new OverflowToolbarButton(sId, mSettings);
113
- },
114
- _loadResourceBundle: function() {
115
- oRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
116
- },
117
-
118
- showPanel: function(oControl, sP13nType) {
119
- return oControl.finalizePropertyHelper().then(function() {
120
- return TableSettings["showUI" + sP13nType](oControl);
121
- });
122
- },
123
-
124
- showUIColumns: function(oControl) {
125
- if (oControl.getInbuiltFilter()) {
126
- oControl.getInbuiltFilter().setVisibleFields(null);
127
- }
128
- return oControl.getEngine().uimanager.show(oControl, oControl.getActiveP13nModes());
129
- },
130
-
131
- showUIFilter: function(oControl) {
132
- if (oControl.getInbuiltFilter()) {
133
- oControl.getInbuiltFilter().setVisibleFields(null);
111
+ createExpandCollapseAllButton: function (sIdPrefix, aEventInfo, bIsExpand) {
112
+ if (!oRb) {
113
+ this._loadResourceBundle();
134
114
  }
135
- return oControl.getEngine().uimanager.show(oControl, "Filter");
136
- },
137
115
 
138
- /**
139
- * Adds sorting to a column by calling <code>createChanges</code> in the <code>Engine</code>.
140
- *
141
- * @param {object} oControl The control for which the sorting is used
142
- * @param {string} sProperty The property for which the sorting is used
143
- * @param {sap.ui.core.SortOrder} sSortOrder Whether to sort in descending or ascending order
144
- * @param {boolean} [bRemoveAllExisting=true] Set to remove the previous sorters
145
- */
146
- createSort: function(oControl, sProperty, sSortOrder, bRemoveAllExisting) {
147
- oControl.getEngine().createChanges({
148
- control: oControl,
149
- key: "Sort",
150
- state: [{
151
- selected: true,
152
- name: sProperty,
153
- descending: sSortOrder === CoreLibrary.SortOrder.Descending,
154
- sorted: sSortOrder !== CoreLibrary.SortOrder.None
155
- }],
156
- applyAbsolute: bRemoveAllExisting
157
- });
158
-
159
- },
160
-
161
- createGroup: function (oControl, sProperty) {
162
- var oGroupLevels = {
163
- grouped: true,
164
- name: sProperty
165
- };
166
- var aGroup = [oGroupLevels];
167
- oControl.getCurrentState().groupLevels.some(function(oProp) {
168
- if (oProp.name == sProperty) {
169
- aGroup[0].grouped = false;
170
- }
171
- });
116
+ var sId = bIsExpand ? sIdPrefix + "-expandAll" : sIdPrefix + "-collapseAll",
117
+ sText = bIsExpand ? oRb.getText("table.EXPAND_ALL") : oRb.getText("table.COLLAPSE_ALL");
172
118
 
173
- oControl.getEngine().createChanges({
174
- control: oControl,
175
- key: "Group",
176
- state: aGroup,
177
- applyAbsolute: oControl._isOfType("ResponsiveTable")
119
+ var oButton = this._createButton(sId, {
120
+ icon: bIsExpand ? "sap-icon://expand-all" : "sap-icon://collapse-all",
121
+ text: sText,
122
+ press: aEventInfo,
123
+ tooltip: sText
178
124
  });
179
- },
180
-
181
- createAggregation: function(oControl, sProperty) {
182
- var oAggregations = {
183
- name: sProperty,
184
- aggregated: true
185
- };
186
-
187
- var aAggregate = [oAggregations];
188
- if (oControl.getCurrentState().aggregations[sProperty]) {
189
- oAggregations.aggregated = false;
190
- }
191
125
 
192
- oControl.getEngine().createChanges({
193
- control: oControl,
194
- key: "Aggregate",
195
- state: aAggregate,
196
- applyAbsolute: false
197
- });
126
+ return oButton;
198
127
  },
199
-
200
- createColumnWidth: function(oControl, sProperty, sWidth) {
201
- var oColumnWidth = {
202
- name: sProperty,
203
- width: sWidth
204
- };
205
-
206
- var aColumnWidth = [oColumnWidth];
207
-
208
- oControl.getEngine().createChanges({
209
- control: oControl,
210
- key: "ColumnWidth",
211
- state: aColumnWidth,
212
- applyAbsolute: false
213
- });
128
+ _createButton: function(sId, mSettings) {
129
+ return new OverflowToolbarButton(sId, mSettings);
214
130
  },
215
-
216
- moveColumn: function(oTable, oColumn, iNewIndex) {
217
- var iCurrentIndex = oTable.indexOfColumn(oColumn);
218
-
219
- if (iCurrentIndex === iNewIndex){
220
- return;
221
- }
222
-
223
- var aVisibleFields = oTable.getCurrentState(oTable).items || [];
224
- var oMovedField = aVisibleFields[iCurrentIndex];
225
-
226
- oTable.getEngine().createChanges({
227
- control: oTable,
228
- key: "Column",
229
- state: [{name: oMovedField.name, position: iNewIndex}]
230
- });
131
+ _loadResourceBundle: function() {
132
+ oRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
231
133
  }
232
134
  };
233
135
 
@@ -146,6 +146,14 @@ sap.ui.define([
146
146
  });
147
147
  };
148
148
 
149
+ /**
150
+ * Called whenever column is going to be inserted to the table.
151
+ * @param {sap.ui.mdc.table.Column} oColumn - The mdc column instance
152
+ * @private
153
+ */
154
+ TableTypeBase.prototype._onColumnInsert = function(oColumn) {
155
+ };
156
+
149
157
  // To be implemented in the subclass
150
158
  TableTypeBase.prototype.loadModules = function() {return Promise.reject();};
151
159
  TableTypeBase.prototype.updateTableByProperty = function(sProperty, vValue) {};
@@ -73,7 +73,7 @@ sap.ui.define([
73
73
 
74
74
  TreeTableType.prototype.getTableSettings = function() {
75
75
  var oTable = this.getTable();
76
- var bSelectionSupported = oTable ? oTable.bDelegateInitialized && oTable.getControlDelegate().isSelectionSupported(oTable) : false;
76
+ var bSelectionSupported = oTable ? oTable.bDelegateInitialized && oTable.getControlDelegate().getSupportedFeatures(oTable)["selection"] : false;
77
77
  var mTableSettings = GridTableType.prototype.getTableSettings.apply(this, arguments);
78
78
 
79
79
  if (!bSelectionSupported) {
@@ -80,7 +80,7 @@ sap.ui.define([
80
80
  * @extends sap.ui.mdc.table.PropertyHelper
81
81
  *
82
82
  * @author SAP SE
83
- * @version 1.112.0
83
+ * @version 1.113.0
84
84
  *
85
85
  * @private
86
86
  * @experimental
@@ -76,7 +76,7 @@ sap.ui.define([
76
76
 
77
77
  Item.prototype.destroyContent = function() {
78
78
  // The AdaptationFilterBar must not be destroyed! A new one cannot be created.
79
- if (this.getKey() !== "Filter") {
79
+ if (this.getKey() === "Filter") {
80
80
  return this;
81
81
  }
82
82
  return this.destroyAggregation("content");
@@ -28,6 +28,10 @@ sap.ui.define([
28
28
  var oTable = this.getTable();
29
29
  this.removeAllItems();
30
30
 
31
+ if (oTable._isP13nButtonHidden()) {
32
+ return Promise.resolve();
33
+ }
34
+
31
35
  if (oTable.isSortingEnabled()) {
32
36
  this.addItem(new Item({key: "Sort", icon: "sap-icon://sort"}));
33
37
  }
@@ -4,8 +4,8 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "../TableSettings",
8
7
  "../ResponsiveTableType",
8
+ "../utils/Personalization",
9
9
  "sap/m/table/columnmenu/QuickActionContainer",
10
10
  "sap/m/table/columnmenu/QuickAction",
11
11
  "sap/m/table/columnmenu/QuickSort",
@@ -18,8 +18,8 @@ sap.ui.define([
18
18
  "sap/ui/core/Core",
19
19
  "sap/ui/core/library"
20
20
  ], function(
21
- TableSettings,
22
21
  ResponsiveTableType,
22
+ PersonalizationUtils,
23
23
  QuickActionContainerBase,
24
24
  QuickAction,
25
25
  QuickSort,
@@ -75,7 +75,10 @@ sap.ui.define([
75
75
  }),
76
76
  change: function(oEvent) {
77
77
  var oItem = oEvent.getParameter("item");
78
- TableSettings.createSort(oTable, oItem.getKey(), oItem.getSortOrder(), true);
78
+ PersonalizationUtils.createSortChange(oTable, {
79
+ property: oItem.getKey(),
80
+ sortOrder: oItem.getSortOrder()
81
+ });
79
82
  }
80
83
  }));
81
84
  }
@@ -99,8 +102,9 @@ sap.ui.define([
99
102
  });
100
103
  }),
101
104
  change: function(oEvent) {
102
- var oItem = oEvent.getParameter("item");
103
- TableSettings.createGroup(oTable, oItem.getKey());
105
+ PersonalizationUtils.createGroupChange(oTable, {
106
+ property: oEvent.getParameter("item").getKey()
107
+ });
104
108
  }
105
109
  }));
106
110
  }
@@ -122,8 +126,9 @@ sap.ui.define([
122
126
  });
123
127
  }),
124
128
  change: function(oEvent) {
125
- var oItem = oEvent.getParameter("item");
126
- TableSettings.createAggregation(oTable, oItem.getKey());
129
+ PersonalizationUtils.createAggregateChange(oTable, {
130
+ property: oEvent.getParameter("item").getKey()
131
+ });
127
132
  }
128
133
  }));
129
134
  }
@@ -0,0 +1,236 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/core/library"
9
+ ], function(
10
+ CoreLibrary
11
+ ) {
12
+ "use strict";
13
+
14
+ /**
15
+ * P13n utilities.
16
+ *
17
+ * @author SAP SE
18
+ * @version 1.113.0
19
+ * @namespace
20
+ * @alias sap.ui.mdc.table.utils.Personalization
21
+ * @private
22
+ */
23
+ var PersonalizationUtils = {};
24
+
25
+ /**
26
+ * Checks whether a p13n UI, e.g. column header menu or settings dialog, is currently shown, or changes that the user has created with this UI
27
+ * are currently being applied.
28
+ *
29
+ * @param {sap.ui.mdc.Table} oTable The table that is personalized with the dialog.
30
+ * @returns {boolean} Whether user personalization is currently active.
31
+ */
32
+ PersonalizationUtils.isUserPersonalizationActive = function(oTable) {
33
+ return oTable._bUserPersonalizationActive === true;
34
+ };
35
+
36
+ /**
37
+ * Begins observing user personalization via a column menu, including change appliance, to detect its completion.
38
+ * The state can be checked with {@link isUserPersonalizationActive}.
39
+ *
40
+ * @param {sap.ui.mdc.Table} oTable The table that is personalized with the column menu.
41
+ * @param {sap.m.table.columnmenu.Menu} oMenu The column menu to observe.
42
+ */
43
+ PersonalizationUtils.detectUserPersonalizationCompletion = function(oTable, oMenu) {
44
+ if (!oMenu.isOpen()) {
45
+ return;
46
+ }
47
+
48
+ oTable._bUserPersonalizationActive = true;
49
+ oMenu.attachEventOnce("afterClose", function() {
50
+ oTable.getEngine().waitForChanges(oTable).then(function() {
51
+ delete oTable._bUserPersonalizationActive;
52
+ });
53
+ });
54
+ };
55
+
56
+ /**
57
+ * Opens the p13n dialog that contains all panels according to the p13n options enabled in the table.
58
+ * Detects the completion of user personalization. The state can be checked with {@link isUserPersonalizationActive}.
59
+ *
60
+ * @param {sap.ui.mdc.Table} oTable The table that is personalized with the dialog.
61
+ */
62
+ PersonalizationUtils.openSettingsDialog = function(oTable) {
63
+ openP13nDialog(oTable, oTable.getActiveP13nModes());
64
+ };
65
+
66
+ /**
67
+ * Opens the p13n dialog that contains only the filter panel.
68
+ * Detects the completion of user personalization. The state can be checked with {@link isUserPersonalizationActive}.
69
+ *
70
+ * @param {sap.ui.mdc.Table} oTable The table that is personalized with the dialog.
71
+ * @param {function} [fnOnClose] This callback is called after the filter dialog is closed.
72
+ * @returns {Promise<sap.m.ResponsivePopover | sap.m.Dialog>} A promise that resolves with the p13n dialog.
73
+ */
74
+ PersonalizationUtils.openFilterDialog = function(oTable, fnOnClose) {
75
+ return openP13nDialog(oTable, ["Filter"], fnOnClose);
76
+ };
77
+
78
+ function openP13nDialog(oTable, aPanelKeys, fnOnClose) {
79
+ return oTable.finalizePropertyHelper().then(function() {
80
+ var oEngine = oTable.getEngine();
81
+
82
+ if (oTable.getInbuiltFilter()) {
83
+ oTable.getInbuiltFilter().setVisibleFields(null);
84
+ }
85
+
86
+ return oEngine.uimanager.show(oTable, aPanelKeys, {
87
+ close: function() {
88
+ if (fnOnClose) {
89
+ fnOnClose();
90
+ }
91
+ oEngine.waitForChanges(oTable).then(function() {
92
+ delete oTable._bUserPersonalizationActive;
93
+ });
94
+ }
95
+ }).then(function(oP13nControl) {
96
+ if (oP13nControl) {
97
+ // The promise resolves with a control instance only if the dialog is opened.
98
+ oTable._bUserPersonalizationActive = true;
99
+ }
100
+ return oP13nControl;
101
+ });
102
+ });
103
+ }
104
+
105
+ /**
106
+ * Creates a sort change and applies it to the table. Current sorters are replaced, so the table is sorted according to this change only.
107
+ *
108
+ * @param {sap.ui.mdc.Table} oTable The table for which to create the change.
109
+ * @param {object} mSettings The change details.
110
+ * @param {string} mSettings.property The name of the property to sort, as specified in the <code>PropertyInfo</code>.
111
+ * @param {sap.ui.core.SortOrder} mSettings.sortOrder The sort order.
112
+ */
113
+ PersonalizationUtils.createSortChange = function(oTable, mSettings) {
114
+ oTable.getEngine().createChanges({
115
+ control: oTable,
116
+ key: "Sort",
117
+ state: [{
118
+ name: mSettings.property,
119
+ descending: mSettings.sortOrder === CoreLibrary.SortOrder.Descending,
120
+ sorted: mSettings.sortOrder !== CoreLibrary.SortOrder.None
121
+ }],
122
+ applyAbsolute: true
123
+ });
124
+ };
125
+
126
+ /**
127
+ * Creates a group change and applies it to the table. If the type of the table is <code>ResponsiveTable</code>, current groups are replaced,
128
+ * otherwise the change is added to the current state.
129
+ * It works like a switch. If the table is not grouped by this property, it will be grouped, otherwise it will be ungrouped.
130
+ *
131
+ * @param {sap.ui.mdc.Table} oTable The table for which to create the change.
132
+ * @param {object} mSettings The change details.
133
+ * @param {string} mSettings.property The name of the property to group, as specified in the <code>PropertyInfo</code>.
134
+ */
135
+ PersonalizationUtils.createGroupChange = function(oTable, mSettings) {
136
+ var bIsGrouped = (oTable.getCurrentState().groupLevels || []).some(function(oProperty) {
137
+ return oProperty.name == mSettings.property;
138
+ });
139
+
140
+ oTable.getEngine().createChanges({
141
+ control: oTable,
142
+ key: "Group",
143
+ state: [{
144
+ grouped: !bIsGrouped,
145
+ name: mSettings.property
146
+ }],
147
+ applyAbsolute: oTable._isOfType("ResponsiveTable")
148
+ });
149
+ };
150
+
151
+ /**
152
+ * Creates a filter change and applies it to the table.
153
+ *
154
+ * @param {sap.ui.mdc.Table} oTable The table for which to create the change.
155
+ * @param {object} mSettings The change details.
156
+ * @param {Array} mSettings.conditions The filter conditions that should be applied to the table.
157
+ * @param {sap.ui.mdc.enum.ProcessingStrategy|boolean} mSettings.strategy The processing strategy on how to apply the change.
158
+ */
159
+ PersonalizationUtils.createFilterChange = function(oTable, mSettings) {
160
+ oTable.getEngine().createChanges({
161
+ control: oTable,
162
+ key: "Filter",
163
+ state: mSettings.conditions,
164
+ applyAbsolute: mSettings.strategy
165
+ });
166
+ };
167
+
168
+ /**
169
+ * Creates an aggregate change and applies it to the table. The change is added to the current state.
170
+ * It works like a switch. If an aggregate does not exist for this property, it will be added, otherwise it will be removed.
171
+ *
172
+ * @param {sap.ui.mdc.Table} oTable The table for which to create the change.
173
+ * @param {object} mSettings The change details.
174
+ * @param {string} mSettings.property The name of the property to aggregate, as specified in the <code>PropertyInfo</code>.
175
+ */
176
+ PersonalizationUtils.createAggregateChange = function(oTable, mSettings) {
177
+ var bHasAggregate = mSettings.property in (oTable.getCurrentState().aggregations || {});
178
+
179
+ oTable.getEngine().createChanges({
180
+ control: oTable,
181
+ key: "Aggregate",
182
+ state: [{
183
+ name: mSettings.property,
184
+ aggregated: !bHasAggregate
185
+ }],
186
+ applyAbsolute: false
187
+ });
188
+ };
189
+
190
+ /**
191
+ * Creates a column width change and applies it to the table.
192
+ *
193
+ * @param {sap.ui.mdc.Table} oTable The table for which to create the change.
194
+ * @param {object} mSettings The change details.
195
+ * @param {sap.ui.mdc.table.Column} mSettings.column The column for which to create the change.
196
+ * @param {string} mSettings.width The new width of the column.
197
+ */
198
+ PersonalizationUtils.createColumnWidthChange = function(oTable, mSettings) {
199
+ oTable.getEngine().createChanges({
200
+ control: oTable,
201
+ key: "ColumnWidth",
202
+ state: [{
203
+ name: mSettings.column.getDataProperty(),
204
+ width: mSettings.width
205
+ }],
206
+ applyAbsolute: false
207
+ });
208
+ };
209
+
210
+ /**
211
+ * Creates a column reorder change and applies it to the table. If the column is already at that position, no change is created.
212
+ *
213
+ * @param {sap.ui.mdc.Table} oTable The table for which to create the change.
214
+ * @param {object} mSettings The change details.
215
+ * @param {sap.ui.mdc.table.Column} mSettings.column The column for which to create the change.
216
+ * @param {int} mSettings.index The new index of the column.
217
+ */
218
+ PersonalizationUtils.createColumnReorderChange = function(oTable, mSettings) {
219
+ var iCurrentIndex = oTable.indexOfColumn(mSettings.column);
220
+
221
+ if (iCurrentIndex === mSettings.index) {
222
+ return;
223
+ }
224
+
225
+ oTable.getEngine().createChanges({
226
+ control: oTable,
227
+ key: "Column",
228
+ state: [{
229
+ name: mSettings.column.getDataProperty(),
230
+ position: mSettings.index
231
+ }]
232
+ });
233
+ };
234
+
235
+ return PersonalizationUtils;
236
+ });
@@ -26,9 +26,9 @@
26
26
  background-color: @sapUiBaseBG;
27
27
  }
28
28
 
29
- .sapMdcTablePanel > .sapMPanelHdr,
30
- .sapMdcTokenizerPanel > .sapMPanelHdr,
31
- .sapMdcDefineconditionPanel > .sapMPanelHdr{
29
+ .sapMdcTablePanel > .sapMPanelHeadingDiv > .sapMPanelHdr,
30
+ .sapMdcTokenizerPanel > .sapMPanelHeadingDiv > .sapMPanelHdr,
31
+ .sapMdcDefineconditionPanel > .sapMPanelHeadingDiv > .sapMPanelHdr{
32
32
  border: none;
33
33
  }
34
34
 
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class The <code>InfoBar</code> control provides an easy way of displaying filter information inside an <code>sap.ui.mdc.Chart</code> and an <code>sap.ui.mdc.Table</code>.
24
24
  * @extends sap.ui.core.Control
25
25
  * @author SAP SE
26
- * @version 1.112.0
26
+ * @version 1.113.0
27
27
  * @constructor
28
28
  * @experimental As of version 1.111
29
29
  * @private
@@ -71,7 +71,6 @@ sap.ui.define([
71
71
  renderer: InfoBarRenderer
72
72
  });
73
73
 
74
-
75
74
  InfoBar.prototype.applySettings = function () {
76
75
  Control.prototype.applySettings.apply(this, arguments);
77
76
 
@@ -85,6 +84,7 @@ sap.ui.define([
85
84
  this.oInvisibleText = new InvisibleText().toStatic();
86
85
 
87
86
  this.oRemoveAllFiltersBtn = new Button(this.getId() + "-RemoveAllFilters", {
87
+ type: mLibrary.ButtonType.Transparent,
88
88
  press: function (oEvent) {
89
89
  this.fireRemoveAllFilters();
90
90
  // TODO this.oInvisibleMessage.announce(oMessageBundle.getText("valuehelp.REMOVEALLTOKEN_ANNOUNCE"), InvisibleMessageMode.Polite);
@@ -45,7 +45,7 @@ sap.ui.define(
45
45
  * Destroying the cache will cancel all registered promises and delete references. Convenience methods for promise creation, wrapping and replacement are offered.
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.112.0
48
+ * @version 1.113.0
49
49
  * @alias sap.ui.mdc.util.PromiseCache
50
50
  * @since 1.85.0
51
51
  * @private
@@ -531,7 +531,7 @@ sap.ui.define([
531
531
  * @extends sap.ui.base.Object
532
532
  *
533
533
  * @author SAP SE
534
- * @version 1.112.0
534
+ * @version 1.113.0
535
535
  *
536
536
  * @private
537
537
  * @experimental
@@ -50,11 +50,12 @@ sap.ui.define([
50
50
  * @param {object} [mSettings] Initial settings for the new control
51
51
  * @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a dialog.
52
52
  * @extends sap.ui.mdc.valuehelp.base.Container
53
- * @version 1.112.0
53
+ * @version 1.113.0
54
54
  * @constructor
55
55
  * @abstract
56
56
  * @private
57
- * @ui5-restricted sap.ui.mdc
57
+ * @ui5-restricted sap.fe
58
+ * @MDC_PUBLIC_CANDIDATE
58
59
  * @since 1.95.0
59
60
  * @experimental As of version 1.95
60
61
  * @alias sap.ui.mdc.valuehelp.Dialog
@@ -85,7 +86,7 @@ sap.ui.define([
85
86
  /**
86
87
  * Configuration for groups (collective search).
87
88
  */
88
- groupConfig: {
89
+ groupConfig: { // TODO: explain in JS-Doc
89
90
  type: "object",
90
91
  defaultValue: {}
91
92
  }
@@ -300,7 +301,7 @@ sap.ui.define([
300
301
  aContentPromises.push(this._getIconTabBar(oDialog));
301
302
  } else {
302
303
  if (!this._oStandaloneTab) {
303
- this._oStandaloneTab = new DialogTab(this.getId() + "-Standalone-DT", {content: {path: "/_selectableContents/0/displayContent", model: "$help"}, layoutData: new sap.m.FlexItemData({growFactor: 1, minHeight: "0"})});
304
+ this._oStandaloneTab = new DialogTab(this.getId() + "-Standalone-DT", {content: {path: "/_selectableContents/0/displayContent", model: "$help"}, layoutData: new FlexItemData({growFactor: 1, minHeight: "0"})});
304
305
  }
305
306
  aContentPromises.push(this._oStandaloneTab);
306
307
  }
@@ -31,11 +31,12 @@ sap.ui.define([
31
31
  * @param {object} [mSettings] Initial settings for the new control
32
32
  * @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a popover.
33
33
  * @extends sap.ui.mdc.valuehelp.base.Container
34
- * @version 1.112.0
34
+ * @version 1.113.0
35
35
  * @constructor
36
36
  * @abstract
37
37
  * @private
38
- * @ui5-restricted sap.ui.mdc
38
+ * @ui5-restricted sap.fe
39
+ * @MDC_PUBLIC_CANDIDATE
39
40
  * @since 1.95.0
40
41
  * @experimental As of version 1.95
41
42
  * @alias sap.ui.mdc.valuehelp.Popover
@@ -20,15 +20,18 @@ sap.ui.define([
20
20
  /**
21
21
  * Constructor for a new <code>Container</code>.
22
22
  *
23
+ * This is the basis for different value help containers. It cannot be used directly.
24
+ *
23
25
  * @param {string} [sId] ID for the new element, generated automatically if no ID is given
24
26
  * @param {object} [mSettings] Initial settings for the new element
25
27
  * @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element.
26
28
  * @extends sap.ui.core.Element
27
- * @version 1.112.0
29
+ * @version 1.113.0
28
30
  * @constructor
29
31
  * @abstract
30
32
  * @private
31
- * @ui5-restricted sap.ui.mdc
33
+ * @ui5-restricted sap.fe
34
+ * @MDC_PUBLIC_CANDIDATE
32
35
  * @since 1.95.0
33
36
  * @experimental As of version 1.95
34
37
  * @alias sap.ui.mdc.valuehelp.base.Container
@@ -492,6 +495,21 @@ sap.ui.define([
492
495
  return oValueHelp && (oValueHelp.getDialog() === this || (this.isTypeahead() && !oValueHelp.getDialog() && this.getUseAsValueHelp()));
493
496
  };
494
497
 
498
+ /**
499
+ * Determines if the container parent has a dialog inside the value help
500
+ *
501
+ * <b>Note:</b> This function is used by the container and content and must not be used from outside
502
+ *
503
+ * @returns {boolean} True if parent has a dialog
504
+ *
505
+ * @private
506
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Content
507
+ */
508
+ Container.prototype.hasDialog = function () {
509
+ var oValueHelp = this.getParent();
510
+ return !!(oValueHelp && (oValueHelp.getDialog()));
511
+ };
512
+
495
513
  /**
496
514
  * Determines if the container provides a own scroll functionality.
497
515
  * If not, the <code>Content</code> needs to provide a scrolling solution like a {@link sap.m.ScrollContainer ScrollContainer}.
@@ -28,15 +28,18 @@ sap.ui.define([
28
28
  /**
29
29
  * Constructor for a new <code>Content</code>.
30
30
  *
31
+ * This is the basis for different value help contents. It cannot be used directly.
32
+ *
31
33
  * @param {string} [sId] ID for the new element, generated automatically if no ID is given
32
34
  * @param {object} [mSettings] Initial settings for the new element
33
35
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
34
36
  * @extends sap.ui.core.Element
35
- * @version 1.112.0
37
+ * @version 1.113.0
36
38
  * @constructor
37
39
  * @abstract
38
40
  * @private
39
- * @ui5-restricted sap.ui.mdc
41
+ * @ui5-restricted sap.fe
42
+ * @MDC_PUBLIC_CANDIDATE
40
43
  * @since 1.95.0
41
44
  * @experimental As of version 1.95
42
45
  * @alias sap.ui.mdc.valuehelp.base.Content
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @param {object} [mSettings] Initial settings for the new control
21
21
  * @class Content for the <code>sap.ui.mdc.valuehelp.content.Dialog</code> element.
22
22
  * @extends sap.ui.core.Control
23
- * @version 1.112.0
23
+ * @version 1.113.0
24
24
  * @constructor
25
25
  * @abstract
26
26
  * @private