@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
@@ -27,9 +27,9 @@ sap.ui.define([
27
27
  * @public
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.123.1
30
+ * @version 1.124.0
31
31
  */
32
- var FixedRowMode = RowMode.extend("sap.ui.table.rowmodes.Fixed", /** @lends sap.ui.table.rowmodes.Fixed.prototype */ {
32
+ const FixedRowMode = RowMode.extend("sap.ui.table.rowmodes.Fixed", /** @lends sap.ui.table.rowmodes.Fixed.prototype */ {
33
33
  metadata: {
34
34
  library: "sap.ui.table",
35
35
  properties: {
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
  }
76
76
  });
77
77
 
78
- var TableDelegate = {};
78
+ const TableDelegate = {};
79
79
 
80
80
  FixedRowMode.prototype.attachEvents = function() {
81
81
  RowMode.prototype.attachEvents.apply(this, arguments);
@@ -102,7 +102,7 @@ sap.ui.define([
102
102
  * @deprecated As of version 1.119
103
103
  */
104
104
  if (this.bLegacy) {
105
- var oTable = this.getTable();
105
+ const oTable = this.getTable();
106
106
  return oTable ? oTable.getVisibleRowCount() : 0;
107
107
  }
108
108
 
@@ -114,7 +114,7 @@ sap.ui.define([
114
114
  * @deprecated As of version 1.119
115
115
  */
116
116
  if (this.bLegacy) {
117
- var oTable = this.getTable();
117
+ const oTable = this.getTable();
118
118
  return oTable ? oTable.getFixedRowCount() : 0;
119
119
  }
120
120
 
@@ -126,7 +126,7 @@ sap.ui.define([
126
126
  * @deprecated As of version 1.119
127
127
  */
128
128
  if (this.bLegacy) {
129
- var oTable = this.getTable();
129
+ const oTable = this.getTable();
130
130
  return oTable ? oTable.getFixedBottomRowCount() : 0;
131
131
  }
132
132
 
@@ -138,7 +138,7 @@ sap.ui.define([
138
138
  * @deprecated As of Version 1.119
139
139
  */
140
140
  if (this.bLegacy) {
141
- var oTable = this.getTable();
141
+ const oTable = this.getTable();
142
142
  return oTable ? oTable.getRowHeight() : 0;
143
143
  }
144
144
 
@@ -167,7 +167,7 @@ sap.ui.define([
167
167
 
168
168
  FixedRowMode.prototype.updateTable = function() {
169
169
  if (this.getHideEmptyRows() && this.getComputedRowCounts().count === 0) {
170
- var iRowCount = this.getRowCount();
170
+ const iRowCount = this.getRowCount();
171
171
 
172
172
  if (iRowCount > 0) {
173
173
  this.getRowContexts(iRowCount);
@@ -178,9 +178,9 @@ sap.ui.define([
178
178
  };
179
179
 
180
180
  FixedRowMode.prototype.getComputedRowCounts = function() {
181
- var iRowCount = this.getRowCount();
182
- var iFixedTopRowCount = this.getFixedTopRowCount();
183
- var iFixedBottomRowCount = this.getFixedBottomRowCount();
181
+ let iRowCount = this.getRowCount();
182
+ const iFixedTopRowCount = this.getFixedTopRowCount();
183
+ const iFixedBottomRowCount = this.getFixedBottomRowCount();
184
184
 
185
185
  if (this.getHideEmptyRows()) {
186
186
  iRowCount = Math.min(iRowCount, this.getTotalRowCountOfTable());
@@ -200,7 +200,7 @@ sap.ui.define([
200
200
  return undefined;
201
201
  }
202
202
 
203
- var iRowCountDelta = Math.max(0, this.getRowCount() - this.getComputedRowCounts().count);
203
+ const iRowCountDelta = Math.max(0, this.getRowCount() - this.getComputedRowCounts().count);
204
204
 
205
205
  return {
206
206
  height: iRowCountDelta * this.getBaseRowHeightOfTable() + "px"
@@ -208,7 +208,7 @@ sap.ui.define([
208
208
  };
209
209
 
210
210
  FixedRowMode.prototype.getRowContainerStyles = function() {
211
- var sHeight = this.getComputedRowCounts().count * this.getBaseRowHeightOfTable() + "px";
211
+ const sHeight = this.getComputedRowCounts().count * this.getBaseRowHeightOfTable() + "px";
212
212
 
213
213
  /**
214
214
  * @deprecated As of version 1.119
@@ -221,7 +221,7 @@ sap.ui.define([
221
221
  };
222
222
 
223
223
  FixedRowMode.prototype.renderRowStyles = function(oRM) {
224
- var iRowContentHeight = this.getRowContentHeight();
224
+ const iRowContentHeight = this.getRowContentHeight();
225
225
 
226
226
  if (iRowContentHeight > 0) {
227
227
  oRM.style("height", this.getBaseRowHeightOfTable() + "px");
@@ -229,7 +229,7 @@ sap.ui.define([
229
229
  };
230
230
 
231
231
  FixedRowMode.prototype.renderCellContentStyles = function(oRM) {
232
- var iRowContentHeight = this.getRowContentHeight();
232
+ let iRowContentHeight = this.getRowContentHeight();
233
233
 
234
234
  /**
235
235
  * @deprecated As of version 1.119
@@ -258,7 +258,7 @@ sap.ui.define([
258
258
  */
259
259
  FixedRowMode.prototype._onTableRefreshRows = function() {
260
260
  // The computed row count cannot be used here, because the table's total row count (binding length) is not known yet.
261
- var iRowCount = this.getRowCount();
261
+ let iRowCount = this.getRowCount();
262
262
 
263
263
  if (iRowCount > 0) {
264
264
  if (TableUtils.isVariableRowHeightEnabled(this.getTable())) {
@@ -274,8 +274,8 @@ sap.ui.define([
274
274
  * @this sap.ui.table.rowmodes.Fixed
275
275
  */
276
276
  TableDelegate.onAfterRendering = function(oEvent) {
277
- var oTable = this.getTable();
278
- var bRenderedRows = oEvent && oEvent.isMarked("renderRows");
277
+ const oTable = this.getTable();
278
+ const bRenderedRows = oEvent && oEvent.isMarked("renderRows");
279
279
 
280
280
  if (!bRenderedRows && oTable.getRows().length > 0) {
281
281
  this.fireRowsUpdated(TableUtils.RowsUpdateReason.Render);
@@ -39,9 +39,9 @@ sap.ui.define([
39
39
  * @public
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.123.1
42
+ * @version 1.124.0
43
43
  */
44
- var InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.Interactive", /** @lends sap.ui.table.rowmodes.Interactive.prototype */ {
44
+ const InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.Interactive", /** @lends sap.ui.table.rowmodes.Interactive.prototype */ {
45
45
  metadata: {
46
46
  library: "sap.ui.table",
47
47
  "final": true,
@@ -85,12 +85,12 @@ sap.ui.define([
85
85
  }
86
86
  });
87
87
 
88
- var TableDelegate = {};
88
+ const TableDelegate = {};
89
89
 
90
90
  /*
91
91
  * Provides drag&drop resize capabilities.
92
92
  */
93
- var ResizeHelper = {};
93
+ const ResizeHelper = {};
94
94
 
95
95
  /**
96
96
  * @inheritDoc
@@ -129,7 +129,7 @@ sap.ui.define([
129
129
  * @deprecated As of version 1.119
130
130
  */
131
131
  if (this.bLegacy) {
132
- var oTable = this.getTable();
132
+ const oTable = this.getTable();
133
133
  return oTable ? oTable.getVisibleRowCount() : 0;
134
134
  }
135
135
 
@@ -141,7 +141,7 @@ sap.ui.define([
141
141
  * @deprecated As of version 1.119
142
142
  */
143
143
  if (this.bLegacy) {
144
- var oTable = this.getTable();
144
+ const oTable = this.getTable();
145
145
  return oTable ? oTable.getFixedRowCount() : 0;
146
146
  }
147
147
 
@@ -153,7 +153,7 @@ sap.ui.define([
153
153
  * @deprecated As of version 1.119
154
154
  */
155
155
  if (this.bLegacy) {
156
- var oTable = this.getTable();
156
+ const oTable = this.getTable();
157
157
  return oTable ? oTable.getFixedBottomRowCount() : 0;
158
158
  }
159
159
 
@@ -165,7 +165,7 @@ sap.ui.define([
165
165
  * @deprecated As of version 1.119
166
166
  */
167
167
  if (this.bLegacy) {
168
- var oTable = this.getTable();
168
+ const oTable = this.getTable();
169
169
  return oTable ? oTable.getMinAutoRowCount() : 0;
170
170
  }
171
171
 
@@ -177,7 +177,7 @@ sap.ui.define([
177
177
  * @deprecated As of version 1.119
178
178
  */
179
179
  if (this.bLegacy) {
180
- var oTable = this.getTable();
180
+ const oTable = this.getTable();
181
181
  return oTable ? oTable.getRowHeight() : 0;
182
182
  }
183
183
 
@@ -195,9 +195,9 @@ sap.ui.define([
195
195
  * @inheritDoc
196
196
  */
197
197
  InteractiveRowMode.prototype.getComputedRowCounts = function() {
198
- var iRowCount = this.getConfiguredRowCount();
199
- var iFixedTopRowCount = this.getFixedTopRowCount();
200
- var iFixedBottomRowCount = this.getFixedBottomRowCount();
198
+ const iRowCount = this.getConfiguredRowCount();
199
+ const iFixedTopRowCount = this.getFixedTopRowCount();
200
+ const iFixedBottomRowCount = this.getFixedBottomRowCount();
201
201
 
202
202
  return this.computeStandardizedRowCounts(iRowCount, iFixedTopRowCount, iFixedBottomRowCount);
203
203
  };
@@ -215,7 +215,7 @@ sap.ui.define([
215
215
  * @inheritDoc
216
216
  */
217
217
  InteractiveRowMode.prototype.getRowContainerStyles = function() {
218
- var sHeight = this.getComputedRowCounts().count * this.getBaseRowHeightOfTable() + "px";
218
+ const sHeight = this.getComputedRowCounts().count * this.getBaseRowHeightOfTable() + "px";
219
219
 
220
220
  /**
221
221
  * @deprecated As of version 1.119
@@ -231,7 +231,7 @@ sap.ui.define([
231
231
  * @inheritDoc
232
232
  */
233
233
  InteractiveRowMode.prototype.renderRowStyles = function(oRM) {
234
- var iRowContentHeight = this.getRowContentHeight();
234
+ const iRowContentHeight = this.getRowContentHeight();
235
235
 
236
236
  if (iRowContentHeight > 0) {
237
237
  oRM.style("height", this.getBaseRowHeightOfTable() + "px");
@@ -242,7 +242,7 @@ sap.ui.define([
242
242
  * @inheritDoc
243
243
  */
244
244
  InteractiveRowMode.prototype.renderCellContentStyles = function(oRM) {
245
- var iRowContentHeight = this.getRowContentHeight();
245
+ let iRowContentHeight = this.getRowContentHeight();
246
246
 
247
247
  /**
248
248
  * @deprecated As of version 1.119
@@ -285,7 +285,7 @@ sap.ui.define([
285
285
  * @private
286
286
  */
287
287
  InteractiveRowMode.prototype._onTableRefreshRows = function() {
288
- var iRowCount = this.getConfiguredRowCount();
288
+ const iRowCount = this.getConfiguredRowCount();
289
289
 
290
290
  if (iRowCount > 0) {
291
291
  this.initTableRowsAfterDataRequested(iRowCount);
@@ -317,8 +317,8 @@ sap.ui.define([
317
317
  * @this sap.ui.table.rowmodes.Interactive
318
318
  */
319
319
  TableDelegate.onAfterRendering = function(oEvent) {
320
- var oTable = this.getTable();
321
- var bRenderedRows = oEvent && oEvent.isMarked("renderRows");
320
+ const oTable = this.getTable();
321
+ const bRenderedRows = oEvent && oEvent.isMarked("renderRows");
322
322
 
323
323
  if (!bRenderedRows && oTable.getRows().length > 0) {
324
324
  this.fireRowsUpdated(TableUtils.RowsUpdateReason.Render);
@@ -329,7 +329,7 @@ sap.ui.define([
329
329
  * @this sap.ui.table.rowmodes.Interactive
330
330
  */
331
331
  TableDelegate.onmousedown = function(oEvent) {
332
- var oTable = this.getTable();
332
+ const oTable = this.getTable();
333
333
 
334
334
  if (oEvent.button === 0 && oEvent.target === oTable.getDomRef("sb")) {
335
335
  ResizeHelper.initInteractiveResizing(oTable, this, oEvent);
@@ -344,15 +344,15 @@ sap.ui.define([
344
344
  * @param {jQuery.Event} oEvent The event object.
345
345
  */
346
346
  ResizeHelper.initInteractiveResizing = function(oTable, oMode, oEvent) {
347
- var $Body = jQuery(document.body);
348
- var $Splitter = oTable.$("sb");
349
- var $Document = jQuery(document);
350
- var offset = $Splitter.offset();
351
- var height = $Splitter.height();
352
- var width = $Splitter.width();
353
- var bTouch = oTable._isTouchEvent(oEvent);
354
-
355
- var oGhostDiv = document.createElement("div");
347
+ const $Body = jQuery(document.body);
348
+ const $Splitter = oTable.$("sb");
349
+ const $Document = jQuery(document);
350
+ const offset = $Splitter.offset();
351
+ const height = $Splitter.height();
352
+ const width = $Splitter.width();
353
+ const bTouch = oTable._isTouchEvent(oEvent);
354
+
355
+ const oGhostDiv = document.createElement("div");
356
356
  oGhostDiv.style.width = width + "px";
357
357
  oGhostDiv.style.height = height + "px";
358
358
  oGhostDiv.style.left = offset.left + "px";
@@ -361,7 +361,7 @@ sap.ui.define([
361
361
  oGhostDiv.id = oTable.getId() + "-ghost";
362
362
  $Body.append(oGhostDiv);
363
363
 
364
- var oOverlayDiv = document.createElement("div");
364
+ const oOverlayDiv = document.createElement("div");
365
365
  oOverlayDiv.style.top = "0px";
366
366
  oOverlayDiv.style.bottom = "0px";
367
367
  oOverlayDiv.style.left = "0px";
@@ -386,13 +386,13 @@ sap.ui.define([
386
386
  * @param {jQuery.Event} oEvent The event object.
387
387
  */
388
388
  ResizeHelper.exitInteractiveResizing = function(oMode, oEvent) {
389
- var $Document = jQuery(document);
390
- var $Table = this.$();
391
- var $Ghost = this.$("ghost");
392
- var iLocationY = ResizeHelper.getEventPosition(this, oEvent).y;
393
- var iNewHeight = iLocationY - $Table.find(".sapUiTableCCnt").offset().top - $Ghost.height() - $Table.find(".sapUiTableFtr").height();
394
- var iUserDefinedRowCount = Math.floor(iNewHeight / oMode.getBaseRowHeightOfTable());
395
- var iNewRowCount = Math.max(1, iUserDefinedRowCount, oMode.getMinRowCount());
389
+ const $Document = jQuery(document);
390
+ const $Table = this.$();
391
+ const $Ghost = this.$("ghost");
392
+ const iLocationY = ResizeHelper.getEventPosition(this, oEvent).y;
393
+ const iNewHeight = iLocationY - $Table.find(".sapUiTableCCnt").offset().top - $Ghost.height() - $Table.find(".sapUiTableFtr").height();
394
+ const iUserDefinedRowCount = Math.floor(iNewHeight / oMode.getBaseRowHeightOfTable());
395
+ let iNewRowCount = Math.max(1, iUserDefinedRowCount, oMode.getMinRowCount());
396
396
 
397
397
  /**
398
398
  * @deprecated As of version 1.119
@@ -421,8 +421,8 @@ sap.ui.define([
421
421
  * @param {jQuery.Event} oEvent The event object.
422
422
  */
423
423
  ResizeHelper.onMouseMoveWhileInteractiveResizing = function(oEvent) {
424
- var iLocationY = ResizeHelper.getEventPosition(this, oEvent).y;
425
- var iMin = this.$().offset().top;
424
+ const iLocationY = ResizeHelper.getEventPosition(this, oEvent).y;
425
+ const iMin = this.$().offset().top;
426
426
 
427
427
  if (iLocationY > iMin) {
428
428
  this.$("ghost").css("top", iLocationY + "px");
@@ -438,17 +438,17 @@ sap.ui.define([
438
438
  * @returns {{x: int, y: int}} The event position.
439
439
  */
440
440
  ResizeHelper.getEventPosition = function(oTable, oEvent) {
441
- var oPosition;
441
+ const oPosition = getTouchObject(oEvent) || oEvent;
442
442
 
443
443
  function getTouchObject(oTouchEvent) {
444
444
  if (!oTable._isTouchEvent(oTouchEvent)) {
445
445
  return null;
446
446
  }
447
447
 
448
- var aTouchEventObjectNames = ["touches", "targetTouches", "changedTouches"];
448
+ const aTouchEventObjectNames = ["touches", "targetTouches", "changedTouches"];
449
449
 
450
- for (var i = 0; i < aTouchEventObjectNames.length; i++) {
451
- var sTouchEventObjectName = aTouchEventObjectNames[i];
450
+ for (let i = 0; i < aTouchEventObjectNames.length; i++) {
451
+ const sTouchEventObjectName = aTouchEventObjectNames[i];
452
452
 
453
453
  if (oEvent[sTouchEventObjectName] && oEvent[sTouchEventObjectName][0]) {
454
454
  return oEvent[sTouchEventObjectName][0];
@@ -461,8 +461,6 @@ sap.ui.define([
461
461
  return null;
462
462
  }
463
463
 
464
- oPosition = getTouchObject(oEvent) || oEvent;
465
-
466
464
  return {x: oPosition.pageX, y: oPosition.pageY};
467
465
  };
468
466