@openui5/sap.ui.table 1.123.1 → 1.124.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 (61) hide show
  1. package/.eslintrc.json +9 -1
  2. package/package.json +3 -3
  3. package/src/sap/ui/table/.library +1 -1
  4. package/src/sap/ui/table/AnalyticalColumn.js +40 -40
  5. package/src/sap/ui/table/AnalyticalColumnMenu.js +11 -11
  6. package/src/sap/ui/table/AnalyticalTable.js +107 -107
  7. package/src/sap/ui/table/Column.js +83 -83
  8. package/src/sap/ui/table/ColumnMenu.js +54 -54
  9. package/src/sap/ui/table/CreationRow.js +29 -29
  10. package/src/sap/ui/table/CreationRowRenderer.js +21 -21
  11. package/src/sap/ui/table/Row.js +55 -56
  12. package/src/sap/ui/table/RowAction.js +27 -27
  13. package/src/sap/ui/table/RowActionItem.js +7 -7
  14. package/src/sap/ui/table/RowActionRenderer.js +3 -3
  15. package/src/sap/ui/table/RowSettings.js +28 -37
  16. package/src/sap/ui/table/Table.js +263 -266
  17. package/src/sap/ui/table/TablePersoController.js +46 -46
  18. package/src/sap/ui/table/TableRenderer.js +112 -113
  19. package/src/sap/ui/table/TreeTable.js +16 -16
  20. package/src/sap/ui/table/designtime/Table.designtime.js +2 -2
  21. package/src/sap/ui/table/extensions/Accessibility.js +185 -181
  22. package/src/sap/ui/table/extensions/AccessibilityRender.js +15 -15
  23. package/src/sap/ui/table/extensions/DragAndDrop.js +47 -47
  24. package/src/sap/ui/table/extensions/ExtensionBase.js +9 -9
  25. package/src/sap/ui/table/extensions/Keyboard.js +40 -40
  26. package/src/sap/ui/table/extensions/KeyboardDelegate.js +257 -264
  27. package/src/sap/ui/table/extensions/Pointer.js +108 -109
  28. package/src/sap/ui/table/extensions/Scrolling.js +289 -285
  29. package/src/sap/ui/table/extensions/ScrollingIOS.js +50 -50
  30. package/src/sap/ui/table/extensions/Synchronization.js +32 -32
  31. package/src/sap/ui/table/library.js +12 -12
  32. package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +9 -9
  33. package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +35 -37
  34. package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +23 -23
  35. package/src/sap/ui/table/messagebundle_sh.properties +9 -9
  36. package/src/sap/ui/table/plugins/BindingSelection.js +26 -25
  37. package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +77 -32
  38. package/src/sap/ui/table/plugins/ODataV4Selection.js +81 -35
  39. package/src/sap/ui/table/plugins/PluginBase.js +12 -12
  40. package/src/sap/ui/table/plugins/SelectionModelSelection.js +13 -12
  41. package/src/sap/ui/table/plugins/SelectionPlugin.js +3 -3
  42. package/src/sap/ui/table/plugins/V4Aggregation.js +38 -38
  43. package/src/sap/ui/table/rowmodes/Auto.js +59 -61
  44. package/src/sap/ui/table/rowmodes/Fixed.js +18 -18
  45. package/src/sap/ui/table/rowmodes/Interactive.js +42 -44
  46. package/src/sap/ui/table/rowmodes/RowMode.js +64 -63
  47. package/src/sap/ui/table/rowmodes/Type.js +1 -1
  48. package/src/sap/ui/table/rowmodes/Variable.js +4 -4
  49. package/src/sap/ui/table/rules/Accessibility.support.js +15 -16
  50. package/src/sap/ui/table/rules/Binding.support.js +11 -11
  51. package/src/sap/ui/table/rules/ColumnTemplate.support.js +10 -10
  52. package/src/sap/ui/table/rules/Plugins.support.js +7 -7
  53. package/src/sap/ui/table/rules/Rows.support.js +29 -29
  54. package/src/sap/ui/table/rules/TableHelper.support.js +10 -10
  55. package/src/sap/ui/table/themes/base/library.source.less +2 -0
  56. package/src/sap/ui/table/utils/TableUtils.js +130 -128
  57. package/src/sap/ui/table/utils/_BindingUtils.js +7 -7
  58. package/src/sap/ui/table/utils/_ColumnUtils.js +98 -97
  59. package/src/sap/ui/table/utils/_GroupingUtils.js +56 -56
  60. package/src/sap/ui/table/utils/_HookUtils.js +26 -26
  61. package/src/sap/ui/table/utils/_MenuUtils.js +19 -19
package/.eslintrc.json CHANGED
@@ -13,7 +13,14 @@
13
13
  "jQuery": "off"
14
14
  },
15
15
  "rules": {
16
- "space-before-function-paren": ["error", "never"],
16
+ "no-var": "error",
17
+ "one-var": ["error", {"const": "never", "let": "never"}],
18
+ "one-var-declaration-per-line": ["error", "always"],
19
+ "space-before-function-paren": ["error", {
20
+ "anonymous": "never",
21
+ "named": "never",
22
+ "asyncArrow": "always"
23
+ }],
17
24
  "space-before-blocks": "error",
18
25
  "space-in-parens": "error",
19
26
  "block-spacing": "error",
@@ -28,6 +35,7 @@
28
35
  "no-whitespace-before-property": "error",
29
36
  "object-curly-newline": ["error", {"consistent": true}],
30
37
  "object-curly-spacing": "error",
38
+ "eqeqeq": ["error", "always", {"null": "ignore"}],
31
39
  "max-depth": ["warn", 4],
32
40
  "max-len": ["warn", 150],
33
41
  "complexity": ["warn", { "max": 12 }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.table",
3
- "version": "1.123.1",
3
+ "version": "1.124.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.table",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.ui.core": "1.123.1",
18
- "@openui5/sap.ui.unified": "1.123.1"
17
+ "@openui5/sap.ui.core": "1.124.0",
18
+ "@openui5/sap.ui.unified": "1.124.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.123.1</version>
9
+ <version>1.124.0</version>
10
10
 
11
11
  <documentation>Table-like controls, mainly for desktop scenarios.</documentation>
12
12
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  ) {
31
31
  "use strict";
32
32
 
33
- var GroupEventType = library.GroupEventType;
33
+ const GroupEventType = library.GroupEventType;
34
34
 
35
35
  function isInstanceOfAnalyticalTable(oControl) {
36
36
  return TableUtils.isA(oControl, "sap.ui.table.AnalyticalTable");
@@ -47,13 +47,13 @@ sap.ui.define([
47
47
  * @extends sap.ui.table.Column
48
48
  *
49
49
  * @author SAP SE
50
- * @version 1.123.1
50
+ * @version 1.124.0
51
51
  *
52
52
  * @constructor
53
53
  * @public
54
54
  * @alias sap.ui.table.AnalyticalColumn
55
55
  */
56
- var AnalyticalColumn = Column.extend("sap.ui.table.AnalyticalColumn", /** @lends sap.ui.table.AnalyticalColumn.prototype */ {metadata: {
56
+ const AnalyticalColumn = Column.extend("sap.ui.table.AnalyticalColumn", /** @lends sap.ui.table.AnalyticalColumn.prototype */ {metadata: {
57
57
 
58
58
  library: "sap.ui.table",
59
59
  properties: {
@@ -105,23 +105,23 @@ sap.ui.define([
105
105
  };
106
106
 
107
107
  AnalyticalColumn.prototype._setGrouped = function(bGrouped) {
108
- var oTable = this._getTable();
109
- var sGroupEventType = bGrouped ? GroupEventType.group : GroupEventType.ungroup;
108
+ const oTable = this._getTable();
109
+ const sGroupEventType = bGrouped ? GroupEventType.group : GroupEventType.ungroup;
110
110
 
111
111
  this.setGrouped(bGrouped);
112
112
  oTable.fireGroup({column: this, groupedColumns: oTable._aGroupedColumns, type: sGroupEventType});
113
113
  };
114
114
 
115
115
  AnalyticalColumn.prototype._isAggregatableByMenu = function() {
116
- var oTable = this._getTable(),
117
- oBinding = oTable.getBinding(),
118
- oResultSet = oBinding && oBinding.getAnalyticalQueryResult();
116
+ const oTable = this._getTable();
117
+ const oBinding = oTable.getBinding();
118
+ const oResultSet = oBinding && oBinding.getAnalyticalQueryResult();
119
119
 
120
120
  return oTable && oResultSet && oResultSet.findMeasureByPropertyName(this.getLeadingProperty());
121
121
  };
122
122
 
123
123
  AnalyticalColumn.prototype.setGrouped = function(bGrouped) {
124
- var oParent = this.getParent();
124
+ const oParent = this.getParent();
125
125
 
126
126
  if (isInstanceOfAnalyticalTable(oParent)) {
127
127
  if (bGrouped) {
@@ -131,14 +131,14 @@ sap.ui.define([
131
131
  }
132
132
  }
133
133
 
134
- var bReturn = this.setProperty("grouped", bGrouped);
134
+ const bReturn = this.setProperty("grouped", bGrouped);
135
135
  this._updateColumns();
136
136
 
137
137
  return bReturn;
138
138
  };
139
139
 
140
140
  AnalyticalColumn.prototype.setSummed = function(bSummed) {
141
- var bReturn = this.setProperty("summed", bSummed, true);
141
+ const bReturn = this.setProperty("summed", bSummed, true);
142
142
  this._updateTableAnalyticalInfo();
143
143
  return bReturn;
144
144
  };
@@ -150,13 +150,13 @@ sap.ui.define([
150
150
  };
151
151
 
152
152
  AnalyticalColumn.prototype.getLabel = function() {
153
- var oLabel = this.getAggregation("label");
153
+ let oLabel = this.getAggregation("label");
154
154
  try {
155
155
  if (!oLabel) {
156
156
  if (!this._oBindingLabel) {
157
- var oParent = this.getParent();
157
+ const oParent = this.getParent();
158
158
  if (isInstanceOfAnalyticalTable(oParent)) {
159
- var oBinding = oParent.getBinding();
159
+ const oBinding = oParent.getBinding();
160
160
  if (oBinding) {
161
161
  this._oBindingLabel = TableUtils._getTableTemplateHelper().createLabel();
162
162
  this.addDependent(this._oBindingLabel);
@@ -175,12 +175,12 @@ sap.ui.define([
175
175
  };
176
176
 
177
177
  AnalyticalColumn.prototype.getFilterProperty = function() {
178
- var sProperty = this.getProperty("filterProperty");
178
+ let sProperty = this.getProperty("filterProperty");
179
179
  if (!sProperty) {
180
- var oParent = this.getParent();
180
+ const oParent = this.getParent();
181
181
  if (isInstanceOfAnalyticalTable(oParent)) {
182
- var oBinding = oParent.getBinding();
183
- var sLeadingProperty = this.getLeadingProperty();
182
+ const oBinding = oParent.getBinding();
183
+ const sLeadingProperty = this.getLeadingProperty();
184
184
  if (oBinding && oBinding.getFilterablePropertyNames().indexOf(sLeadingProperty) > -1) {
185
185
  sProperty = sLeadingProperty;
186
186
  }
@@ -190,12 +190,12 @@ sap.ui.define([
190
190
  };
191
191
 
192
192
  AnalyticalColumn.prototype.getSortProperty = function() {
193
- var sProperty = this.getProperty("sortProperty");
193
+ let sProperty = this.getProperty("sortProperty");
194
194
  if (!sProperty) {
195
- var oParent = this.getParent();
195
+ const oParent = this.getParent();
196
196
  if (isInstanceOfAnalyticalTable(oParent)) {
197
- var oBinding = oParent.getBinding();
198
- var sLeadingProperty = this.getLeadingProperty();
197
+ const oBinding = oParent.getBinding();
198
+ const sLeadingProperty = this.getLeadingProperty();
199
199
  if (oBinding && oBinding.getSortablePropertyNames().indexOf(sLeadingProperty) > -1) {
200
200
  sProperty = sLeadingProperty;
201
201
  }
@@ -205,13 +205,13 @@ sap.ui.define([
205
205
  };
206
206
 
207
207
  AnalyticalColumn.prototype.getFilterType = function() {
208
- var vFilterType = this.getProperty("filterType");
208
+ let vFilterType = this.getProperty("filterType");
209
209
  if (!vFilterType) {
210
- var oParent = this.getParent();
210
+ const oParent = this.getParent();
211
211
  if (isInstanceOfAnalyticalTable(oParent)) {
212
- var oBinding = oParent.getBinding();
213
- var sLeadingProperty = this.getLeadingProperty(),
214
- oProperty = oBinding && oBinding.getProperty(sLeadingProperty);
212
+ const oBinding = oParent.getBinding();
213
+ const sLeadingProperty = this.getLeadingProperty();
214
+ const oProperty = oBinding && oBinding.getProperty(sLeadingProperty);
215
215
  if (oProperty) {
216
216
  switch (oProperty.type) {
217
217
  case "Edm.Time":
@@ -243,21 +243,21 @@ sap.ui.define([
243
243
  };
244
244
 
245
245
  AnalyticalColumn.prototype._updateColumns = function(bSupressRefresh, bForceChange) {
246
- var oParent = this.getParent();
246
+ const oParent = this.getParent();
247
247
  if (isInstanceOfAnalyticalTable(oParent)) {
248
248
  oParent._updateColumns(bSupressRefresh, bForceChange);
249
249
  }
250
250
  };
251
251
 
252
252
  AnalyticalColumn.prototype._updateTableAnalyticalInfo = function(bSupressRefresh) {
253
- var oParent = this.getParent();
253
+ const oParent = this.getParent();
254
254
  if (oParent && isInstanceOfAnalyticalTable(oParent) && !oParent._bSuspendUpdateAnalyticalInfo) {
255
255
  oParent.updateAnalyticalInfo(bSupressRefresh);
256
256
  }
257
257
  };
258
258
 
259
259
  AnalyticalColumn.prototype._updateTableColumnDetails = function() {
260
- var oParent = this.getParent();
260
+ const oParent = this.getParent();
261
261
  if (oParent && isInstanceOfAnalyticalTable(oParent) && !oParent._bSuspendUpdateAnalyticalInfo) {
262
262
  oParent._updateTableColumnDetails();
263
263
  }
@@ -276,10 +276,10 @@ sap.ui.define([
276
276
  * @deprecated As of Version 1.117
277
277
  */
278
278
  AnalyticalColumn.prototype._menuHasItems = function() {
279
- var fnMenuHasItems = function() {
280
- var oTable = this.getParent();
281
- var oBinding = oTable.getBinding();
282
- var oResultSet = oBinding && oBinding.getAnalyticalQueryResult();
279
+ const fnMenuHasItems = function() {
280
+ const oTable = this.getParent();
281
+ const oBinding = oTable.getBinding();
282
+ const oResultSet = oBinding && oBinding.getAnalyticalQueryResult();
283
283
  return (oTable && oResultSet && oResultSet.findMeasureByPropertyName(this.getLeadingProperty())); // totals menu entry
284
284
  }.bind(this);
285
285
 
@@ -301,16 +301,16 @@ sap.ui.define([
301
301
  * @returns {boolean}
302
302
  */
303
303
  AnalyticalColumn.prototype.isFilterableByMenu = function() {
304
- var sFilterProperty = this.getFilterProperty();
304
+ const sFilterProperty = this.getFilterProperty();
305
305
  if (!sFilterProperty || !this.getShowFilterMenuEntry()) {
306
306
  // not required to get binding and do addtional checks if there is no filterProperty set or derived
307
307
  // or if the filter menu entry shall not be displayed at all
308
308
  return false;
309
309
  }
310
310
 
311
- var oParent = this.getParent();
311
+ const oParent = this.getParent();
312
312
  if (isInstanceOfAnalyticalTable(oParent)) {
313
- var oBinding = oParent.getBinding();
313
+ const oBinding = oParent.getBinding();
314
314
  // metadata must be evaluated which can only be done when the collection is known and the metadata is loaded
315
315
  // this is usually the case when a binding exists.
316
316
  if (oBinding) {
@@ -345,12 +345,12 @@ sap.ui.define([
345
345
  * @return {boolean} <code>true</code> if the column is groupable
346
346
  */
347
347
  AnalyticalColumn.prototype.isGroupableByMenu = function() {
348
- var oParent = this.getParent();
348
+ const oParent = this.getParent();
349
349
 
350
350
  if (isInstanceOfAnalyticalTable(oParent)) {
351
- var oBinding = oParent.getBinding();
351
+ const oBinding = oParent.getBinding();
352
352
  if (oBinding) {
353
- var oResultSet = oBinding.getAnalyticalQueryResult();
353
+ const oResultSet = oBinding.getAnalyticalQueryResult();
354
354
  if (oResultSet && oResultSet.findDimensionByPropertyName(this.getLeadingProperty())
355
355
  && oBinding.getSortablePropertyNames().indexOf(this.getLeadingProperty()) > -1
356
356
  && oBinding.getFilterablePropertyNames().indexOf(this.getLeadingProperty()) > -1) {
@@ -20,7 +20,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
20
20
  * @extends sap.ui.table.ColumnMenu
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.123.1
23
+ * @version 1.124.0
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -29,7 +29,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
29
29
  *
30
30
  * @deprecated As of version 1.117, replaced by the <code>headerMenu</code> association of <code>sap.ui.table.Column</code>.
31
31
  */
32
- var AnalyticalColumnMenu = ColumnMenu.extend("sap.ui.table.AnalyticalColumnMenu", /** @lends sap.ui.table.AnalyticalColumnMenu.prototype */ {
32
+ const AnalyticalColumnMenu = ColumnMenu.extend("sap.ui.table.AnalyticalColumnMenu", /** @lends sap.ui.table.AnalyticalColumnMenu.prototype */ {
33
33
  metadata: {
34
34
  library: "sap.ui.table"
35
35
  },
@@ -53,8 +53,8 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
53
53
  * @private
54
54
  */
55
55
  AnalyticalColumnMenu.prototype._addGroupMenuItem = function() {
56
- var oColumn = this._getColumn();
57
- var oTable = this._getTable();
56
+ const oColumn = this._getColumn();
57
+ const oTable = this._getTable();
58
58
 
59
59
  if (oColumn.isGroupableByMenu()) {
60
60
  this._oGroupIcon = this._createMenuItem(
@@ -62,11 +62,11 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
62
62
  "TBL_GROUP",
63
63
  oColumn.getGrouped() ? "accept" : null,
64
64
  function(oEvent) {
65
- var oMenuItem = oEvent.getSource();
66
- var bGrouped = !oColumn.getGrouped();
65
+ const oMenuItem = oEvent.getSource();
66
+ const bGrouped = !oColumn.getGrouped();
67
67
 
68
68
  if (bGrouped && !oColumn.getShowIfGrouped()) {
69
- var oDomRef;
69
+ let oDomRef;
70
70
 
71
71
  if (TableUtils.isNoDataVisible(oTable)) {
72
72
  oDomRef = oTable.getDomRef("noDataCnt");
@@ -92,7 +92,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
92
92
  * @private
93
93
  */
94
94
  AnalyticalColumnMenu.prototype._addSumMenuItem = function() {
95
- var oColumn = this._getColumn();
95
+ const oColumn = this._getColumn();
96
96
 
97
97
  if (oColumn._isAggregatableByMenu()) {
98
98
  this._oSumItem = this._createMenuItem(
@@ -100,8 +100,8 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
100
100
  "TBL_TOTAL",
101
101
  oColumn.getSummed() ? "accept" : null,
102
102
  jQuery.proxy(function(oEvent) {
103
- var oMenuItem = oEvent.getSource(),
104
- bSummed = oColumn.getSummed();
103
+ const oMenuItem = oEvent.getSource();
104
+ const bSummed = oColumn.getSummed();
105
105
 
106
106
  oColumn.setSummed(!bSummed);
107
107
  oMenuItem.setIcon(!bSummed ? "sap-icon://accept" : null);
@@ -114,7 +114,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
114
114
  AnalyticalColumnMenu.prototype.open = function() {
115
115
  ColumnMenu.prototype.open.apply(this, arguments);
116
116
 
117
- var oColumn = this._getColumn();
117
+ const oColumn = this._getColumn();
118
118
  this._oSumItem && this._oSumItem.setIcon(oColumn.getSummed() ? "sap-icon://accept" : null);
119
119
  this._oGroupIcon && this._oGroupIcon.setIcon(oColumn.getGrouped() ? "sap-icon://accept" : null);
120
120
  };