@openui5/sap.ui.table 1.123.1 → 1.124.1

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
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @type {WeakMapConstructor}
26
26
  */
27
- var ColumnToVisibilitySubmenuItemMap = new window.WeakMap();
27
+ const ColumnToVisibilitySubmenuItemMap = new window.WeakMap();
28
28
 
29
29
  /**
30
30
  * Constructor for a new ColumnMenu.
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * The column menu provides all common actions that can be performed on a column.
42
42
  * @extends sap.ui.unified.Menu
43
- * @version 1.123.1
43
+ * @version 1.124.1
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  *
49
49
  * @deprecated As of version 1.117, use the {@link sap.m.table.columnmenu.Menu} instead.
50
50
  */
51
- var ColumnMenu = Menu.extend("sap.ui.table.ColumnMenu", /** @lends sap.ui.table.ColumnMenu.prototype */ {
51
+ const ColumnMenu = Menu.extend("sap.ui.table.ColumnMenu", /** @lends sap.ui.table.ColumnMenu.prototype */ {
52
52
  metadata: {
53
53
  library: "sap.ui.table"
54
54
  },
@@ -107,12 +107,12 @@ sap.ui.define([
107
107
  };
108
108
 
109
109
  ColumnMenu.prototype._getColumn = function() {
110
- var oParent = this.getParent();
110
+ const oParent = this.getParent();
111
111
  return TableUtils.isA(oParent, "sap.ui.table.Column") ? oParent : null;
112
112
  };
113
113
 
114
114
  ColumnMenu.prototype._getTable = function() {
115
- var oColumn = this._getColumn();
115
+ const oColumn = this._getColumn();
116
116
  return oColumn ? oColumn._getTable() : null;
117
117
  };
118
118
 
@@ -125,7 +125,7 @@ sap.ui.define([
125
125
  };
126
126
 
127
127
  ColumnMenu.prototype._removeColumnVisibilityFromAggregation = function() {
128
- var oTable = this._getTable();
128
+ const oTable = this._getTable();
129
129
  if (!oTable || oTable._oColumnVisibilityMenuItem) {
130
130
  return;
131
131
  }
@@ -186,11 +186,11 @@ sap.ui.define([
186
186
  * @private
187
187
  */
188
188
  ColumnMenu.prototype._addSortMenuItem = function(bDesc) {
189
- var oColumn = this._getColumn();
189
+ const oColumn = this._getColumn();
190
190
 
191
191
  if (oColumn.isSortableByMenu()) {
192
- var sDir = bDesc ? "desc" : "asc";
193
- var sIcon = bDesc ? "sort-descending" : "sort-ascending";
192
+ const sDir = bDesc ? "desc" : "asc";
193
+ const sIcon = bDesc ? "sort-descending" : "sort-ascending";
194
194
 
195
195
  this.addItem(this._createMenuItem(
196
196
  sDir,
@@ -208,11 +208,11 @@ sap.ui.define([
208
208
  * @private
209
209
  */
210
210
  ColumnMenu.prototype._addFilterMenuItem = function() {
211
- var oColumn = this._getColumn();
211
+ const oColumn = this._getColumn();
212
212
 
213
213
  if (oColumn.isFilterableByMenu()) {
214
- var oTable = oColumn.getParent();
215
- var bCustomFilterEnabled = oTable && oTable.getEnableCustomFilter();
214
+ const oTable = oColumn.getParent();
215
+ const bCustomFilterEnabled = oTable && oTable.getEnableCustomFilter();
216
216
 
217
217
  if (bCustomFilterEnabled) {
218
218
  this.addItem(this._createMenuItem(
@@ -244,17 +244,17 @@ sap.ui.define([
244
244
  * @private
245
245
  */
246
246
  ColumnMenu.prototype._addGroupMenuItem = function() {
247
- var oColumn = this._getColumn();
247
+ const oColumn = this._getColumn();
248
248
 
249
249
  if (oColumn.isGroupableByMenu()) {
250
- var oTable = this._getTable();
250
+ const oTable = this._getTable();
251
251
 
252
252
  this.addItem(this._createMenuItem(
253
253
  "group",
254
254
  "TBL_GROUP",
255
255
  null,
256
256
  function() {
257
- var oDomRef;
257
+ let oDomRef;
258
258
  oTable.setGroupBy(oColumn);
259
259
 
260
260
  if (TableUtils.isNoDataVisible(oTable)) {
@@ -276,13 +276,13 @@ sap.ui.define([
276
276
  * @private
277
277
  */
278
278
  ColumnMenu.prototype._addFreezeMenuItem = function() {
279
- var oColumn = this._getColumn();
280
- var oTable = this._getTable();
281
- var bColumnFreezeEnabled = oTable && oTable.getEnableColumnFreeze();
279
+ const oColumn = this._getColumn();
280
+ const oTable = this._getTable();
281
+ const bColumnFreezeEnabled = oTable && oTable.getEnableColumnFreeze();
282
282
 
283
283
  if (bColumnFreezeEnabled) {
284
- var iColumnIndex = oColumn.getIndex();
285
- var bIsFixedColumn = iColumnIndex + TableUtils.Column.getHeaderSpan(oColumn) == oTable.getComputedFixedColumnCount();
284
+ const iColumnIndex = oColumn.getIndex();
285
+ const bIsFixedColumn = iColumnIndex + TableUtils.Column.getHeaderSpan(oColumn) === oTable.getComputedFixedColumnCount();
286
286
 
287
287
  this.addItem(this._createMenuItem(
288
288
  "freeze",
@@ -290,7 +290,7 @@ sap.ui.define([
290
290
  null,
291
291
  function() {
292
292
  // forward the event
293
- var bExecuteDefault = oTable.fireColumnFreeze({
293
+ const bExecuteDefault = oTable.fireColumnFreeze({
294
294
  column: oColumn
295
295
  });
296
296
 
@@ -312,13 +312,13 @@ sap.ui.define([
312
312
  * @private
313
313
  */
314
314
  ColumnMenu.prototype._addColumnVisibilityMenuItem = function() {
315
- var oTable = this._getTable();
315
+ const oTable = this._getTable();
316
316
 
317
317
  if (oTable && oTable.getShowColumnVisibilityMenu()) {
318
318
  if (!oTable._oColumnVisibilityMenuItem || oTable._oColumnVisibilityMenuItem.bIsDestroyed) {
319
319
  oTable._oColumnVisibilityMenuItem = this._createMenuItem("column-visibilty", "TBL_COLUMNS");
320
320
 
321
- var oColumnVisibiltyMenu = new Menu(oTable._oColumnVisibilityMenuItem.getId() + "-menu");
321
+ const oColumnVisibiltyMenu = new Menu(oTable._oColumnVisibilityMenuItem.getId() + "-menu");
322
322
  oTable._oColumnVisibilityMenuItem.setSubmenu(oColumnVisibiltyMenu);
323
323
  }
324
324
 
@@ -334,17 +334,17 @@ sap.ui.define([
334
334
  * @private
335
335
  */
336
336
  ColumnMenu.prototype._createColumnVisibilityMenuItem = function(oColumn) {
337
- var oTable = this._getTable();
338
- var sText = TableUtils.Column.getHeaderText(oColumn);
337
+ const oTable = this._getTable();
338
+ const sText = TableUtils.Column.getHeaderText(oColumn);
339
339
 
340
340
  return new MenuItem({
341
341
  text: sText,
342
342
  icon: oColumn.getVisible() ? "sap-icon://accept" : null,
343
343
  ariaLabelledBy: [oTable.getId() + (oColumn.getVisible() ? "-ariahidecolmenu" : "-ariashowcolmenu")],
344
344
  select: jQuery.proxy(function(oEvent) {
345
- var bVisible = !oColumn.getVisible();
345
+ const bVisible = !oColumn.getVisible();
346
346
  if (bVisible || TableUtils.getVisibleColumnCount(oTable) > 1) {
347
- var bExecuteDefault = true;
347
+ let bExecuteDefault = true;
348
348
  if (TableUtils.isA(oTable, "sap.ui.table.Table")) {
349
349
  bExecuteDefault = oTable.fireColumnVisibility({
350
350
  column: oColumn,
@@ -353,7 +353,7 @@ sap.ui.define([
353
353
  }
354
354
  if (bExecuteDefault) {
355
355
  if (oTable.getFocusDomRef().getAttribute("id") === oColumn.getId()) {
356
- var aVisibleColumns = oTable._getVisibleColumns();
356
+ const aVisibleColumns = oTable._getVisibleColumns();
357
357
  aVisibleColumns[Math.min(aVisibleColumns.indexOf(oColumn) + 1, TableUtils.getVisibleColumnCount(oTable) - 2)].focus();
358
358
  }
359
359
  oColumn.setVisible(bVisible);
@@ -407,10 +407,10 @@ sap.ui.define([
407
407
  * @private
408
408
  */
409
409
  ColumnMenu.prototype._setFilterValue = function(sValue) {
410
- var oColumn = this.getParent();
411
- var oTable = (oColumn ? oColumn.getParent() : undefined);
410
+ const oColumn = this.getParent();
411
+ const oTable = (oColumn ? oColumn.getParent() : undefined);
412
412
 
413
- var oFilterField = Element.getElementById(this.getId() + "-filter");
413
+ const oFilterField = Element.getElementById(this.getId() + "-filter");
414
414
  if (oFilterField && oFilterField.setValue && (oTable && !oTable.getEnableCustomFilter())) {
415
415
  oFilterField.setValue(sValue);
416
416
  }
@@ -424,10 +424,10 @@ sap.ui.define([
424
424
  * @private
425
425
  */
426
426
  ColumnMenu.prototype._setFilterState = function(sFilterState) {
427
- var oColumn = this.getParent();
428
- var oTable = (oColumn ? oColumn.getParent() : undefined);
427
+ const oColumn = this.getParent();
428
+ const oTable = (oColumn ? oColumn.getParent() : undefined);
429
429
 
430
- var oFilterField = Element.getElementById(this.getId() + "-filter");
430
+ const oFilterField = Element.getElementById(this.getId() + "-filter");
431
431
  if (oFilterField && oFilterField.setValueState && (oTable && !oTable.getEnableCustomFilter())) {
432
432
  oFilterField.setValueState(sFilterState);
433
433
  }
@@ -435,10 +435,10 @@ sap.ui.define([
435
435
  };
436
436
 
437
437
  function getSortedColumns(oTable) {
438
- var aColumns = oTable.getColumns();
438
+ let aColumns = oTable.getColumns();
439
439
 
440
440
  if (oTable.getColumnVisibilityMenuSorter && typeof oTable.getColumnVisibilityMenuSorter === "function") {
441
- var oSorter = oTable.getColumnVisibilityMenuSorter();
441
+ const oSorter = oTable.getColumnVisibilityMenuSorter();
442
442
  if (typeof oSorter === "function") {
443
443
  aColumns = aColumns.sort(oSorter);
444
444
  }
@@ -449,9 +449,9 @@ sap.ui.define([
449
449
  // is column set to invisible by analytical metadata
450
450
  function isAnalyticalColumnInvisible(oBinding, oColumn) {
451
451
  if (oColumn.isA("sap.ui.table.AnalyticalColumn")) {
452
- var oQueryResult = oBinding.getAnalyticalQueryResult();
453
- var oEntityType = oQueryResult.getEntityType();
454
- var oMetadata = oBinding.getModel().getProperty("/#" + oEntityType.getTypeDescription().name + "/" + oColumn.getLeadingProperty() + "/sap:visible");
452
+ const oQueryResult = oBinding.getAnalyticalQueryResult();
453
+ const oEntityType = oQueryResult.getEntityType();
454
+ const oMetadata = oBinding.getModel().getProperty("/#" + oEntityType.getTypeDescription().name + "/" + oColumn.getLeadingProperty() + "/sap:visible");
455
455
 
456
456
  if (oMetadata && (oMetadata.value === "false" || oMetadata.value === false)) {
457
457
  return true;
@@ -461,24 +461,24 @@ sap.ui.define([
461
461
  }
462
462
 
463
463
  ColumnMenu.prototype._updateColumnVisibilityMenuItem = function() {
464
- var oTable = this._getTable();
464
+ const oTable = this._getTable();
465
465
  if (!oTable || !oTable._oColumnVisibilityMenuItem) {
466
466
  return;
467
467
  }
468
468
 
469
- var oSubmenu = oTable._oColumnVisibilityMenuItem.getSubmenu();
469
+ const oSubmenu = oTable._oColumnVisibilityMenuItem.getSubmenu();
470
470
  if (!oSubmenu) {
471
471
  return;
472
472
  }
473
473
 
474
- var aColumns = getSortedColumns(oTable);
475
- var aSubmenuItems = oSubmenu.getItems();
476
- var aVisibleColumns = oTable._getVisibleColumns();
477
- var oBinding = oTable.getBinding();
478
- var bAnalyticalBinding = TableUtils.isA(oBinding, "sap.ui.model.analytics.AnalyticalBinding");
474
+ const aColumns = getSortedColumns(oTable);
475
+ let aSubmenuItems = oSubmenu.getItems();
476
+ const aVisibleColumns = oTable._getVisibleColumns();
477
+ const oBinding = oTable.getBinding();
478
+ const bAnalyticalBinding = TableUtils.isA(oBinding, "sap.ui.model.analytics.AnalyticalBinding");
479
479
 
480
- for (var i = 0; i < aColumns.length; i++) {
481
- var oColumn = aColumns[i];
480
+ for (let i = 0; i < aColumns.length; i++) {
481
+ const oColumn = aColumns[i];
482
482
 
483
483
  if (bAnalyticalBinding) {
484
484
  if (isAnalyticalColumnInvisible(oBinding, oColumn)) {
@@ -486,22 +486,22 @@ sap.ui.define([
486
486
  }
487
487
  }
488
488
 
489
- var oItem = ColumnToVisibilitySubmenuItemMap.get(oColumn);
489
+ let oItem = ColumnToVisibilitySubmenuItemMap.get(oColumn);
490
490
 
491
491
  if (!oItem || oItem.bIsDestroyed) {
492
- var oItem = this._createColumnVisibilityMenuItem(oColumn);
492
+ oItem = this._createColumnVisibilityMenuItem(oColumn);
493
493
  oSubmenu.insertItem(oItem, i);
494
494
  ColumnToVisibilitySubmenuItemMap.set(oColumn, oItem);
495
495
  } else {
496
- var iIndex = aSubmenuItems.indexOf(oItem);
496
+ const iIndex = aSubmenuItems.indexOf(oItem);
497
497
  if (i !== iIndex) {
498
498
  oSubmenu.removeItem(oItem);
499
499
  oSubmenu.insertItem(oItem, i);
500
500
  }
501
501
  }
502
502
 
503
- var bVisible = aVisibleColumns.indexOf(oColumn) > -1;
504
- var sIcon = bVisible ? "sap-icon://accept" : "";
503
+ const bVisible = aVisibleColumns.indexOf(oColumn) > -1;
504
+ const sIcon = bVisible ? "sap-icon://accept" : "";
505
505
  aSubmenuItems = oSubmenu.getItems();
506
506
  aSubmenuItems[i].setProperty("icon", sIcon);
507
507
  aSubmenuItems[i].setEnabled(!bVisible || aVisibleColumns.length > 1);
@@ -509,7 +509,7 @@ sap.ui.define([
509
509
  aSubmenuItems[i].addAriaLabelledBy(oTable.getId() + (bVisible ? "-ariahidecolmenu" : "-ariashowcolmenu"));
510
510
  }
511
511
 
512
- for (var i = aSubmenuItems.length; i > aColumns.length; i--) {
512
+ for (let i = aSubmenuItems.length; i > aColumns.length; i--) {
513
513
  aSubmenuItems[i - 1].destroy();
514
514
  }
515
515
  };
@@ -32,14 +32,14 @@ sap.ui.define([
32
32
  * <code>sap.ui.commons</code> library.
33
33
  * @extends sap.ui.core.Control
34
34
  * @author SAP SE
35
- * @version 1.123.1
35
+ * @version 1.124.1
36
36
  *
37
37
  * @constructor
38
38
  * @private
39
39
  * @ui5-restricted sap.ui.mdc
40
40
  * @alias sap.ui.table.CreationRow
41
41
  */
42
- var CreationRow = Control.extend("sap.ui.table.CreationRow", /** @lends sap.ui.table.CreationRow.prototype */ {
42
+ const CreationRow = Control.extend("sap.ui.table.CreationRow", /** @lends sap.ui.table.CreationRow.prototype */ {
43
43
  metadata: {
44
44
  library: "sap.ui.table",
45
45
  properties: {
@@ -86,8 +86,8 @@ sap.ui.define([
86
86
  };
87
87
 
88
88
  CreationRow.prototype.setVisible = function(bVisible) {
89
- var bVisibleBefore = this.getVisible();
90
- var oTable = this.getTable();
89
+ const bVisibleBefore = this.getVisible();
90
+ const oTable = this.getTable();
91
91
 
92
92
  this.setProperty("visible", bVisible);
93
93
 
@@ -115,7 +115,7 @@ sap.ui.define([
115
115
  * @public
116
116
  */
117
117
  CreationRow.prototype.resetFocus = function() {
118
- var oInteractiveElement = TableUtils.getFirstInteractiveElement(this);
118
+ const oInteractiveElement = TableUtils.getFirstInteractiveElement(this);
119
119
 
120
120
  if (oInteractiveElement) {
121
121
  oInteractiveElement.focus();
@@ -133,7 +133,7 @@ sap.ui.define([
133
133
  * @inheritDoc
134
134
  */
135
135
  CreationRow.prototype.getFocusDomRef = function() {
136
- var oInteractiveElement = TableUtils.getFirstInteractiveElement(this);
136
+ const oInteractiveElement = TableUtils.getFirstInteractiveElement(this);
137
137
 
138
138
  if (oInteractiveElement) {
139
139
  return oInteractiveElement;
@@ -149,7 +149,7 @@ sap.ui.define([
149
149
  * @private
150
150
  */
151
151
  CreationRow.prototype._fireApply = function() {
152
- var bFocusSet = false;
152
+ let bFocusSet = false;
153
153
 
154
154
  if (this.fireApply()) {
155
155
  bFocusSet = this.resetFocus();
@@ -164,7 +164,7 @@ sap.ui.define([
164
164
  * asynchronously.
165
165
  */
166
166
  function setEventMarkedAndFireApplyAsync(oCreationRow, oEvent) {
167
- var oFocusedElement = document.activeElement;
167
+ const oFocusedElement = document.activeElement;
168
168
 
169
169
  oCreationRow.getTable().getDomRef("focusDummy").focus();
170
170
  oEvent.setMarked();
@@ -229,10 +229,10 @@ sap.ui.define([
229
229
  * @private
230
230
  */
231
231
  CreationRow.prototype._getToolbar = function() {
232
- var oToolbar = this.getToolbar();
232
+ let oToolbar = this.getToolbar();
233
233
 
234
234
  if (!oToolbar) {
235
- var oDefaultToolbar = this.getAggregation("_defaultToolbar");
235
+ let oDefaultToolbar = this.getAggregation("_defaultToolbar");
236
236
 
237
237
  if (!oDefaultToolbar) {
238
238
  oDefaultToolbar = createDefaultToolbar(this);
@@ -258,8 +258,7 @@ sap.ui.define([
258
258
  * @private
259
259
  */
260
260
  CreationRow.prototype._updateDefaultToolbar = function() {
261
- var oDefaultToolbar = this.getAggregation("_defaultToolbar");
262
- var oApplyButton;
261
+ const oDefaultToolbar = this.getAggregation("_defaultToolbar");
263
262
 
264
263
  if (this.getToolbar()) {
265
264
  // No need to update the default toolbar if a custom toolbar is used.
@@ -273,7 +272,8 @@ sap.ui.define([
273
272
  return;
274
273
  }
275
274
 
276
- oApplyButton = oDefaultToolbar.getContent()[1];
275
+ const oApplyButton = oDefaultToolbar.getContent()[1];
276
+
277
277
  oApplyButton.setEnabled(this.getApplyEnabled());
278
278
  oDefaultToolbar.data("sap-ui-table-invalid", null);
279
279
  };
@@ -286,8 +286,8 @@ sap.ui.define([
286
286
  * @private
287
287
  */
288
288
  CreationRow.prototype._getCell = function(iColumnIndex) {
289
- var aCells = this.getCells();
290
- var oCell = aCells.filter(function(oCell) {
289
+ const aCells = this.getCells();
290
+ const oCell = aCells.filter(function(oCell) {
291
291
  return Column.ofCell(oCell).getIndex() === iColumnIndex;
292
292
  })[0];
293
293
 
@@ -306,9 +306,9 @@ sap.ui.define([
306
306
  * @private
307
307
  */
308
308
  CreationRow.prototype._getCellDomRef = function(iColumnIndex) {
309
- var oCell = this._getCell(iColumnIndex);
310
- var oCellContent = oCell ? oCell.getDomRef() : null;
311
- var $Cell = TableUtils.getCell(this.getTable(), oCellContent, true);
309
+ const oCell = this._getCell(iColumnIndex);
310
+ const oCellContent = oCell ? oCell.getDomRef() : null;
311
+ const $Cell = TableUtils.getCell(this.getTable(), oCellContent, true);
312
312
 
313
313
  if (!$Cell) {
314
314
  return null;
@@ -326,8 +326,8 @@ sap.ui.define([
326
326
  * @private
327
327
  */
328
328
  CreationRow.prototype._focusCell = function(iColumnIndex) {
329
- var oCellDomRef = this._getCellDomRef(iColumnIndex);
330
- var $InteractiveElements = TableUtils.getInteractiveElements(oCellDomRef);
329
+ const oCellDomRef = this._getCellDomRef(iColumnIndex);
330
+ const $InteractiveElements = TableUtils.getInteractiveElements(oCellDomRef);
331
331
 
332
332
  if ($InteractiveElements) {
333
333
  $InteractiveElements[0].focus();
@@ -348,17 +348,17 @@ sap.ui.define([
348
348
  * @private
349
349
  */
350
350
  CreationRow.prototype._takeOverKeyboardHandling = function(oEvent) {
351
- var oTable = this.getTable();
352
- var oTableDomRef = oTable ? oTable.getDomRef() : null;
351
+ const oTable = this.getTable();
352
+ const oTableDomRef = oTable ? oTable.getDomRef() : null;
353
353
 
354
354
  if (!oTableDomRef || !oTableDomRef.contains(document.activeElement)) {
355
355
  // Keyboard handling will not be taken over if the table is not rendered or the focus is not inside the table.
356
356
  return false;
357
357
  }
358
358
 
359
- var oCell = TableUtils.getCell(this.getTable(), document.activeElement);
360
- var oCellInfo = TableUtils.getCellInfo(oCell);
361
- var bFocusSet = false;
359
+ const oCell = TableUtils.getCell(this.getTable(), document.activeElement);
360
+ const oCellInfo = TableUtils.getCellInfo(oCell);
361
+ let bFocusSet = false;
362
362
 
363
363
  if (oCellInfo.columnIndex != null && oCellInfo.columnIndex >= 0) {
364
364
  // If the currently focused element is a table cell with a column index information, the keyboard handling will only be taken over if the
@@ -381,18 +381,18 @@ sap.ui.define([
381
381
  * @private
382
382
  */
383
383
  CreationRow.prototype._update = function() {
384
- var oTable = this.getTable();
384
+ const oTable = this.getTable();
385
385
 
386
386
  if (!oTable) {
387
387
  this.removeAllCells();
388
388
  return;
389
389
  }
390
390
 
391
- var aColumns = oTable.getColumns();
391
+ const aColumns = oTable.getColumns();
392
392
 
393
393
  this.removeAllCells();
394
394
 
395
- for (var i = 0, l = aColumns.length; i < l; i++) {
395
+ for (let i = 0, l = aColumns.length; i < l; i++) {
396
396
  if (aColumns[i].getVisible()) {
397
397
  this.addCell(aColumns[i].getTemplateClone(i, "Creation"));
398
398
  }
@@ -406,7 +406,7 @@ sap.ui.define([
406
406
  * @private
407
407
  */
408
408
  CreationRow.prototype.getTable = function() {
409
- var oParent = this.getParent();
409
+ const oParent = this.getParent();
410
410
  return TableUtils.isA(oParent, "sap.ui.table.Table") ? oParent : null;
411
411
  };
412
412
 
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @namespace
19
19
  * @alias sap.ui.table.CreationRowRenderer
20
20
  */
21
- var CreationRowRenderer = {
21
+ const CreationRowRenderer = {
22
22
  apiVersion: 2
23
23
  };
24
24
 
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @param {sap.ui.table.CreationRow} oCreationRow The <code>CreationRow</code> that should be rendered
30
30
  */
31
31
  CreationRowRenderer.render = function(oRm, oCreationRow) {
32
- var oTable = oCreationRow.getTable();
32
+ const oTable = oCreationRow.getTable();
33
33
 
34
34
  if (!oTable) {
35
35
  return;
@@ -106,9 +106,9 @@ sap.ui.define([
106
106
  // This method is very similar to TableRenderer.renderTableControlCnt, but could not be reused without bloating it up heavily. A reusable
107
107
  // solution requires major refactoring.
108
108
 
109
- var iStartColumnIndex = bFixedTable ? 0 : oTable.getComputedFixedColumnCount();
110
- var iEndColumnIndex = bFixedTable ? oTable.getComputedFixedColumnCount() : oTable.getColumns().length;
111
- var oCreationRow = oTable.getCreationRow();
109
+ const iStartColumnIndex = bFixedTable ? 0 : oTable.getComputedFixedColumnCount();
110
+ const iEndColumnIndex = bFixedTable ? oTable.getComputedFixedColumnCount() : oTable.getColumns().length;
111
+ const oCreationRow = oTable.getCreationRow();
112
112
 
113
113
  oRm.openStart("table");
114
114
  oTable._getAccRenderExtension().writeAriaAttributesFor(oRm, oTable, "CREATIONROW_TABLE");
@@ -121,12 +121,12 @@ sap.ui.define([
121
121
  oRm.class("sapUiTableCtrlCol");
122
122
  oRm.openEnd();
123
123
 
124
- var aColumns = oTable.getColumns();
125
- var aColumnParams = new Array(iEndColumnIndex);
126
- var iColumnIndex;
127
- var oColumn;
128
- var bRenderDummyColumn = !bFixedTable && iEndColumnIndex > iStartColumnIndex;
129
- var oColParam;
124
+ const aColumns = oTable.getColumns();
125
+ const aColumnParams = new Array(iEndColumnIndex);
126
+ let iColumnIndex;
127
+ let oColumn;
128
+ let bRenderDummyColumn = !bFixedTable && iEndColumnIndex > iStartColumnIndex;
129
+ let oColParam;
130
130
 
131
131
  for (iColumnIndex = iStartColumnIndex; iColumnIndex < iEndColumnIndex; iColumnIndex++) {
132
132
  oColumn = aColumns[iColumnIndex];
@@ -134,7 +134,7 @@ sap.ui.define([
134
134
  shouldRender: !!(oColumn && oColumn.shouldRender())
135
135
  };
136
136
  if (oColParam.shouldRender) {
137
- var sWidth = oColumn.getWidth();
137
+ let sWidth = oColumn.getWidth();
138
138
  if (TableUtils.isVariableWidth(sWidth)) {
139
139
  // if some of the columns have variable width, they serve as the dummy column
140
140
  // and take available place. Do not render a dummy column in this case.
@@ -180,8 +180,8 @@ sap.ui.define([
180
180
  oRm.class("sapUiTableTr");
181
181
  oRm.openEnd();
182
182
 
183
- var aCells = oCreationRow.getCells();
184
- var aVisibleColumns = TableRenderer.getColumnsToRender(oTable, iStartColumnIndex, iEndColumnIndex);
183
+ const aCells = oCreationRow.getCells();
184
+ const aVisibleColumns = TableRenderer.getColumnsToRender(oTable, iStartColumnIndex, iEndColumnIndex);
185
185
 
186
186
  for (iColumnIndex = iStartColumnIndex; iColumnIndex < iEndColumnIndex; iColumnIndex++) {
187
187
  oColumn = aColumns[iColumnIndex];
@@ -191,13 +191,13 @@ sap.ui.define([
191
191
  oRm.openStart("td");
192
192
  oRm.attr("data-sap-ui-colid", oColumn.getId());
193
193
 
194
- var oCell = oCreationRow._getCell(iColumnIndex);
195
- var nColumns = aVisibleColumns.length;
196
- var bIsFirstColumn = nColumns > 0 && aVisibleColumns[0] === oColumn;
197
- var bIsLastColumn = nColumns > 0 && aVisibleColumns[nColumns - 1] === oColumn;
198
- var iLastFixedColumnIndex = TableRenderer.getLastFixedColumnIndex(oTable);
199
- var bIsLastFixedColumn = bFixedTable & iLastFixedColumnIndex === iColumnIndex;
200
- var sHAlign = Renderer.getTextAlign(oColumn.getHAlign(), oCell && oCell.getTextDirection && oCell.getTextDirection());
194
+ const oCell = oCreationRow._getCell(iColumnIndex);
195
+ const nColumns = aVisibleColumns.length;
196
+ const bIsFirstColumn = nColumns > 0 && aVisibleColumns[0] === oColumn;
197
+ const bIsLastColumn = nColumns > 0 && aVisibleColumns[nColumns - 1] === oColumn;
198
+ const iLastFixedColumnIndex = TableRenderer.getLastFixedColumnIndex(oTable);
199
+ const bIsLastFixedColumn = bFixedTable & iLastFixedColumnIndex === iColumnIndex;
200
+ const sHAlign = Renderer.getTextAlign(oColumn.getHAlign(), oCell && oCell.getTextDirection && oCell.getTextDirection());
201
201
 
202
202
  oRm.style("text-align", sHAlign);
203
203