@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
@@ -15,11 +15,11 @@ sap.ui.define([
15
15
  "sap/ui/base/Object",
16
16
  "sap/ui/core/Element",
17
17
  "sap/ui/core/ResizeHandler",
18
- "sap/ui/core/library",
19
18
  "sap/ui/core/theming/Parameters",
20
19
  "sap/ui/core/Theming",
21
20
  "sap/ui/core/Icon",
22
21
  "sap/ui/core/Lib",
22
+ "sap/ui/core/message/MessageType",
23
23
  "sap/ui/model/ChangeReason",
24
24
  "sap/ui/thirdparty/jquery",
25
25
  "sap/base/util/restricted/_throttle",
@@ -34,11 +34,11 @@ sap.ui.define([
34
34
  BaseObject,
35
35
  Element,
36
36
  ResizeHandler,
37
- coreLibrary,
38
37
  ThemeParameters,
39
38
  Theming,
40
39
  Icon,
41
40
  Lib,
41
+ MessageType,
42
42
  ChangeReason,
43
43
  jQuery,
44
44
  throttle,
@@ -47,16 +47,15 @@ sap.ui.define([
47
47
  "use strict";
48
48
 
49
49
  // Shortcuts
50
- var SelectionBehavior = library.SelectionBehavior;
51
- var SelectionMode = library.SelectionMode;
52
- var MessageType = coreLibrary.MessageType;
50
+ const SelectionBehavior = library.SelectionBehavior;
51
+ const SelectionMode = library.SelectionMode;
53
52
 
54
53
  /**
55
54
  * The resource bundle of the sap.ui.table library.
56
55
  * @type {module:sap/base/i18n/ResourceBundle}
57
56
  */
58
- var oResourceBundle;
59
- var iBaseFontSize = null;
57
+ let oResourceBundle;
58
+ let iBaseFontSize = null;
60
59
 
61
60
  /**
62
61
  * Table cell type.
@@ -76,7 +75,7 @@ sap.ui.define([
76
75
  * @property {int} ANY - Any table cell.
77
76
  * @property {int} PSEUDO - Any element that imitates a table cell.
78
77
  */
79
- var CELLTYPE = {
78
+ const CELLTYPE = {
80
79
  DATACELL: 1 << 1,
81
80
  COLUMNHEADER: 1 << 2,
82
81
  ROWHEADER: 1 << 3,
@@ -100,7 +99,7 @@ sap.ui.define([
100
99
  * @property {int} sapUiSizeCozy - The default base siz in pixels in cozy content density.
101
100
  * @property {int} undefined - The default base siz in pixels in case no content density information is available.
102
101
  */
103
- var mBaseSize = {
102
+ const mBaseSize = {
104
103
  sapUiSizeCozy: 48,
105
104
  sapUiSizeCompact: 32,
106
105
  sapUiSizeCondensed: 24,
@@ -113,7 +112,7 @@ sap.ui.define([
113
112
  * @type {int}
114
113
  * @static
115
114
  */
116
- var iBaseBorderWidth = 1;
115
+ let iBaseBorderWidth = 1;
117
116
 
118
117
  /**
119
118
  * The horizontal frame size of a row in pixels for the current theme. The frame size includes, for example, the row border width. If no theme is
@@ -122,7 +121,7 @@ sap.ui.define([
122
121
  * @type {int}
123
122
  * @static
124
123
  */
125
- var iRowHorizontalFrameSize = 1;
124
+ let iRowHorizontalFrameSize = 1;
126
125
 
127
126
  /**
128
127
  * The default row heights in pixels for the different content densities for the current theme. If no theme is applied, default values are used.
@@ -135,7 +134,7 @@ sap.ui.define([
135
134
  * @property {int} sapUiSizeCozy - The default height of a row in pixels in cozy content density.
136
135
  * @property {int} undefined - The default height of a row in pixels in case no content density information is available.
137
136
  */
138
- var mDefaultRowHeight = {
137
+ const mDefaultRowHeight = {
139
138
  sapUiSizeCozy: mBaseSize.sapUiSizeCozy + iRowHorizontalFrameSize,
140
139
  sapUiSizeCompact: mBaseSize.sapUiSizeCompact + iRowHorizontalFrameSize,
141
140
  sapUiSizeCondensed: mBaseSize.sapUiSizeCondensed + iRowHorizontalFrameSize,
@@ -153,10 +152,12 @@ sap.ui.define([
153
152
  * @property {string} clearSelectionIcon - Name of the clearSelection icon.
154
153
  * @property {int} navIndicatorWidth - Width of the navigation indicator
155
154
  */
156
- var mThemeParameters = {
155
+ const mThemeParameters = {
157
156
  navigationIcon: "navigation-right-arrow",
158
157
  deleteIcon: "sys-cancel",
159
158
  clearSelectionIcon: "clear-all",
159
+ allSelectedIcon: "complete",
160
+ checkboxIcon: "border",
160
161
  navIndicatorWidth: 3
161
162
  };
162
163
 
@@ -186,7 +187,7 @@ sap.ui.define([
186
187
  * @property {string} Zoom - The browsers zoom level has changed.
187
188
  * @property {string} Unknown - The reason for the update is unknown.
188
189
  */
189
- var ROWS_UPDATE_REASON = {
190
+ const ROWS_UPDATE_REASON = {
190
191
  Render: "Render",
191
192
  VerticalScroll: "VerticalScroll",
192
193
  FirstVisibleRowChange: "FirstVisibleRowChange",
@@ -196,7 +197,7 @@ sap.ui.define([
196
197
  Zoom: "Zoom",
197
198
  Unknown: "Unknown"
198
199
  };
199
- for (var sProperty in ChangeReason) {
200
+ for (const sProperty in ChangeReason) {
200
201
  ROWS_UPDATE_REASON[sProperty] = ChangeReason[sProperty];
201
202
  }
202
203
 
@@ -207,18 +208,18 @@ sap.ui.define([
207
208
  * @static
208
209
  * @constant
209
210
  */
210
- var INTERACTIVE_ELEMENT_SELECTORS = ":sapTabbable, .sapUiTableTreeIcon:not(.sapUiTableTreeIconLeaf)";
211
+ const INTERACTIVE_ELEMENT_SELECTORS = ":sapTabbable, .sapUiTableTreeIcon:not(.sapUiTableTreeIconLeaf)";
211
212
 
212
213
  /**
213
214
  * Static collection of utility functions related to the sap.ui.table.Table, ...
214
215
  *
215
216
  * @author SAP SE
216
- * @version 1.123.1
217
+ * @version 1.124.1
217
218
  * @namespace
218
219
  * @alias sap.ui.table.utils.TableUtils
219
220
  * @private
220
221
  */
221
- var TableUtils = {
222
+ const TableUtils = {
222
223
  // Make other utils available.
223
224
  Grouping: GroupingUtils,
224
225
  Column: ColumnUtils,
@@ -253,7 +254,7 @@ sap.ui.define([
253
254
  * @returns {boolean} Whether the table has a SelectAll checkbox.
254
255
  */
255
256
  hasSelectAll: function(oTable) {
256
- var sSelectionMode = oTable ? oTable.getSelectionMode() : SelectionMode.None;
257
+ const sSelectionMode = oTable ? oTable.getSelectionMode() : SelectionMode.None;
257
258
  return sSelectionMode === SelectionMode.MultiToggle && oTable.getEnableSelectAll();
258
259
  },
259
260
 
@@ -268,13 +269,13 @@ sap.ui.define([
268
269
  return false;
269
270
  }
270
271
 
271
- var oRowSettingsTemplate = oTable.getRowSettingsTemplate();
272
+ const oRowSettingsTemplate = oTable.getRowSettingsTemplate();
272
273
 
273
274
  if (!oRowSettingsTemplate) {
274
275
  return false;
275
276
  }
276
277
 
277
- var sHighlight = oRowSettingsTemplate.getHighlight();
278
+ const sHighlight = oRowSettingsTemplate.getHighlight();
278
279
 
279
280
  return oRowSettingsTemplate.isBound("highlight")
280
281
  || (sHighlight != null && sHighlight !== MessageType.None);
@@ -291,13 +292,13 @@ sap.ui.define([
291
292
  return false;
292
293
  }
293
294
 
294
- var oRowSettingsTemplate = oTable.getRowSettingsTemplate();
295
+ const oRowSettingsTemplate = oTable.getRowSettingsTemplate();
295
296
 
296
297
  if (!oRowSettingsTemplate) {
297
298
  return false;
298
299
  }
299
300
 
300
- var bNavigated = oRowSettingsTemplate.getNavigated();
301
+ const bNavigated = oRowSettingsTemplate.getNavigated();
301
302
 
302
303
  return oRowSettingsTemplate.isBound("navigated") || bNavigated;
303
304
  },
@@ -309,7 +310,7 @@ sap.ui.define([
309
310
  * @returns {boolean} Whether the table has row actions.
310
311
  */
311
312
  hasRowActions: function(oTable) {
312
- var oRowActionTemplate = oTable ? oTable.getRowActionTemplate() : null;
313
+ const oRowActionTemplate = oTable ? oTable.getRowActionTemplate() : null;
313
314
 
314
315
  return oRowActionTemplate != null
315
316
  && (oRowActionTemplate.isBound("visible") || oRowActionTemplate.getVisible())
@@ -398,16 +399,16 @@ sap.ui.define([
398
399
  * @param {function(sap.ui.table.Row)} [fnDoSelect] If defined, then instead of the default selection code, this custom callback is used.
399
400
  */
400
401
  toggleRowSelection: function(oTable, vRowIndicator, bSelect, fnDoSelect) {
401
- var oRow;
402
+ let oRow;
402
403
 
403
404
  if (TableUtils.isA(vRowIndicator, "sap.ui.table.Row")) {
404
405
  oRow = vRowIndicator;
405
406
  } else if (typeof vRowIndicator === "number") {
406
407
  oRow = oTable.getRows()[vRowIndicator];
407
408
  } else { // vRowIndicator is a jQuery object or a DOM element.
408
- var $Cell = jQuery(vRowIndicator);
409
- var oCellInfo = TableUtils.getCellInfo($Cell[0]);
410
- var bIsRowSelectionAllowed = TableUtils.isRowSelectionAllowed(oTable);
409
+ const $Cell = jQuery(vRowIndicator);
410
+ const oCellInfo = TableUtils.getCellInfo($Cell[0]);
411
+ const bIsRowSelectionAllowed = TableUtils.isRowSelectionAllowed(oTable);
411
412
 
412
413
  if (!TableUtils.Grouping.isInGroupHeaderRow($Cell[0])
413
414
  && ((oCellInfo.isOfType(TableUtils.CELLTYPE.DATACELL | TableUtils.CELLTYPE.ROWACTION) && bIsRowSelectionAllowed)
@@ -426,7 +427,7 @@ sap.ui.define([
426
427
  if (fnDoSelect) {
427
428
  fnDoSelect(oRow);
428
429
  } else {
429
- var oSelectionPlugin = oTable._getSelectionPlugin();
430
+ const oSelectionPlugin = oTable._getSelectionPlugin();
430
431
  oSelectionPlugin.setSelected(oRow, typeof bSelect === "boolean" ? bSelect : !oSelectionPlugin.isSelected(oRow));
431
432
  }
432
433
 
@@ -474,9 +475,9 @@ sap.ui.define([
474
475
  if (!oTable.getColumnHeaderVisible()) {
475
476
  oTable._iHeaderRowCount = 0;
476
477
  } else {
477
- var iHeaderRows = 1;
478
- var aColumns = oTable.getColumns();
479
- for (var i = 0; i < aColumns.length; i++) {
478
+ let iHeaderRows = 1;
479
+ const aColumns = oTable.getColumns();
480
+ for (let i = 0; i < aColumns.length; i++) {
480
481
  if (aColumns[i].shouldRender()) {
481
482
  // only visible columns need to be considered. We don't invoke getVisibleColumns due to
482
483
  // performance considerations. With several dozens of columns, it's quite costy to loop them twice.
@@ -496,7 +497,7 @@ sap.ui.define([
496
497
  * @returns {boolean} Whether variable row height support is enabled.
497
498
  */
498
499
  isVariableRowHeightEnabled: function(oTable) {
499
- var mRowCounts = oTable._getRowCounts();
500
+ const mRowCounts = oTable._getRowCounts();
500
501
  return oTable && oTable._bVariableRowHeightEnabled && !mRowCounts.fixedTop && !mRowCounts.fixedBottom;
501
502
  },
502
503
 
@@ -525,7 +526,7 @@ sap.ui.define([
525
526
  * @property {HTMLElement | undefined} domRef Reference to the focused DOM element.
526
527
  */
527
528
  getFocusedItemInfo: function(oTable) {
528
- var oIN = oTable._getItemNavigation();
529
+ const oIN = oTable._getItemNavigation();
529
530
  if (!oIN) {
530
531
  return null;
531
532
  }
@@ -547,7 +548,7 @@ sap.ui.define([
547
548
  *
548
549
  */
549
550
  getRowIndexOfFocusedCell: function(oTable) {
550
- var oInfo = TableUtils.getFocusedItemInfo(oTable);
551
+ const oInfo = TableUtils.getFocusedItemInfo(oTable);
551
552
  return oInfo.row - TableUtils.getHeaderRowCount(oTable);
552
553
  },
553
554
 
@@ -581,7 +582,7 @@ sap.ui.define([
581
582
  * @param {Object} oEvent The event object.
582
583
  */
583
584
  focusItem: function(oTable, iIndex, oEvent) {
584
- var oIN = oTable._getItemNavigation();
585
+ const oIN = oTable._getItemNavigation();
585
586
  if (oIN) {
586
587
  oIN.focusItem(iIndex, oEvent);
587
588
  }
@@ -602,13 +603,13 @@ sap.ui.define([
602
603
  return Promise.resolve();
603
604
  }
604
605
 
605
- var iFirstVisibleRow = oTable.getFirstVisibleRow();
606
- var mRowCounts = oTable._getRowCounts();
607
- var iLastVisibleRow = iFirstVisibleRow + mRowCounts.scrollable - 1;
608
- var bExpectRowsUpdatedEvent = false;
606
+ const iFirstVisibleRow = oTable.getFirstVisibleRow();
607
+ const mRowCounts = oTable._getRowCounts();
608
+ const iLastVisibleRow = iFirstVisibleRow + mRowCounts.scrollable - 1;
609
+ let bExpectRowsUpdatedEvent = false;
609
610
 
610
611
  if (iIndex < iFirstVisibleRow || iIndex > iLastVisibleRow) {
611
- var iNewIndex = bReverse ? iIndex - mRowCounts.fixedTop - 1 : iIndex - mRowCounts.scrollable - mRowCounts.fixedTop + 2;
612
+ const iNewIndex = bReverse ? iIndex - mRowCounts.fixedTop - 1 : iIndex - mRowCounts.scrollable - mRowCounts.fixedTop + 2;
612
613
 
613
614
  bExpectRowsUpdatedEvent = oTable._setFirstVisibleRowIndex(Math.max(0, iNewIndex));
614
615
  }
@@ -632,10 +633,10 @@ sap.ui.define([
632
633
  * @returns {Promise} A Promise that resolves after the notification popover has been opened
633
634
  */
634
635
  showNotificationPopoverAtIndex: function(oTable, iIndex, iLimit) {
635
- var oPopover = oTable._oNotificationPopover;
636
- var oRow = oTable.getRows()[iIndex - oTable._getFirstRenderedRowIndex()];
637
- var sTitle = TableUtils.getResourceText("TBL_SELECT_LIMIT_TITLE");
638
- var sMessage = TableUtils.getResourceText("TBL_SELECT_LIMIT", [iLimit]);
636
+ let oPopover = oTable._oNotificationPopover;
637
+ const oRow = oTable.getRows()[iIndex - oTable._getFirstRenderedRowIndex()];
638
+ const sTitle = TableUtils.getResourceText("TBL_SELECT_LIMIT_TITLE");
639
+ const sMessage = TableUtils.getResourceText("TBL_SELECT_LIMIT", [iLimit]);
639
640
 
640
641
  return new Promise(function(resolve) {
641
642
  sap.ui.require([
@@ -672,7 +673,7 @@ sap.ui.define([
672
673
  oTable.detachFirstVisibleRowChanged(this.onFirstVisibleRowChange, this);
673
674
  oTable.attachFirstVisibleRowChanged(this.onFirstVisibleRowChange, this);
674
675
 
675
- var oRowSelector = oRow.getDomRefs().rowSelector;
676
+ const oRowSelector = oRow.getDomRefs().rowSelector;
676
677
 
677
678
  if (oRowSelector) {
678
679
  oPopover.attachEventOnce("afterOpen", resolve);
@@ -685,7 +686,7 @@ sap.ui.define([
685
686
  },
686
687
 
687
688
  onFirstVisibleRowChange: function(oEvent) {
688
- var oTable = oEvent.getSource();
689
+ const oTable = oEvent.getSource();
689
690
  if (!oTable._oNotificationPopover) {
690
691
  return;
691
692
  }
@@ -705,8 +706,8 @@ sap.ui.define([
705
706
  * @returns {Promise<sap.ui.model.Context[]>} Promise that resolves with the row contexts once they are loaded.
706
707
  */
707
708
  loadContexts: function(oBinding, iStartIndex, iLength) {
708
- var aContexts = oBinding.getContexts(iStartIndex, iLength, 0, true);
709
- var bContextsAvailable = aContexts.length === Math.min(iLength, oBinding.getLength()) && !aContexts.includes(undefined);
709
+ const aContexts = oBinding.getContexts(iStartIndex, iLength, 0, true);
710
+ const bContextsAvailable = aContexts.length === Math.min(iLength, oBinding.getLength()) && !aContexts.includes(undefined);
710
711
 
711
712
  if (bContextsAvailable) {
712
713
  return Promise.resolve(aContexts);
@@ -749,22 +750,19 @@ sap.ui.define([
749
750
  * @see sap.ui.table.utils.TableUtils.CellInfo
750
751
  */
751
752
  getCellInfo: function(oCellRef) {
752
- var oCellInfo;
753
- var $Cell = jQuery(oCellRef);
754
- var sColumnId;
755
- var oColumn;
756
- var rRowIndex;
757
- var aRowIndexMatch;
758
- var iRowIndex;
759
-
760
- // Initialize cell info object with default values.
761
- oCellInfo = {
753
+ const oCellInfo = {
762
754
  type: 0,
763
755
  cell: null,
764
756
  rowIndex: null,
765
757
  columnIndex: null,
766
758
  columnSpan: null
767
759
  };
760
+ const $Cell = jQuery(oCellRef);
761
+ let sColumnId;
762
+ let oColumn;
763
+ let rRowIndex;
764
+ let aRowIndexMatch;
765
+ let iRowIndex;
768
766
 
769
767
  if ($Cell.hasClass("sapUiTableDataCell")) {
770
768
  sColumnId = $Cell.attr("data-sap-ui-colid");
@@ -772,7 +770,7 @@ sap.ui.define([
772
770
 
773
771
  oCellInfo.type = TableUtils.CELLTYPE.DATACELL;
774
772
  oCellInfo.rowIndex = parseInt($Cell.parent().attr("data-sap-ui-rowindex"));
775
- oCellInfo.columnIndex = oColumn.getIndex();
773
+ oCellInfo.columnIndex = oColumn?.getIndex() ?? -1;
776
774
  oCellInfo.columnSpan = 1;
777
775
 
778
776
  } else if ($Cell.hasClass("sapUiTableHeaderDataCell")) {
@@ -809,7 +807,7 @@ sap.ui.define([
809
807
 
810
808
  oCellInfo.type = TableUtils.CELLTYPE.PSEUDO;
811
809
  oCellInfo.rowIndex = -1;
812
- oCellInfo.columnIndex = oColumn ? oColumn.getIndex() : -1;
810
+ oCellInfo.columnIndex = oColumn?.getIndex() ?? -1;
813
811
  oCellInfo.columnSpan = 1;
814
812
  }
815
813
 
@@ -854,15 +852,15 @@ sap.ui.define([
854
852
  * @property {sap.ui.core.Control | null} cell Cell control of row/column.
855
853
  */
856
854
  getRowColCell: function(oTable, iRowIdx, iColIdx, bIdxInColumnAgg) {
857
- var oRow = oTable.getRows()[iRowIdx] || null;
858
- var aColumns = bIdxInColumnAgg ? oTable.getColumns() : oTable._getVisibleColumns();
859
- var oColumn = aColumns[iColIdx] || null;
860
- var Column;
861
- var oCell = null;
855
+ const oRow = oTable.getRows()[iRowIdx] || null;
856
+ const aColumns = bIdxInColumnAgg ? oTable.getColumns() : oTable._getVisibleColumns();
857
+ const oColumn = aColumns[iColIdx] || null;
858
+ let Column;
859
+ let oCell = null;
862
860
 
863
861
  if (oRow && oColumn) {
864
862
  if (!Column) {
865
- var ColumnMetadata = oColumn.getMetadata();
863
+ let ColumnMetadata = oColumn.getMetadata();
866
864
  while (ColumnMetadata.getName() !== "sap.ui.table.Column") {
867
865
  ColumnMetadata = ColumnMetadata.getParent();
868
866
  }
@@ -892,15 +890,15 @@ sap.ui.define([
892
890
  return null;
893
891
  }
894
892
 
895
- var $Element = jQuery(oElement);
896
- var oTableElement = oTable.getDomRef();
897
- var sSelector = ".sapUiTableCell";
893
+ const $Element = jQuery(oElement);
894
+ const oTableElement = oTable.getDomRef();
895
+ let sSelector = ".sapUiTableCell";
898
896
 
899
897
  if (!bIncludePseudoCells) {
900
898
  sSelector += ":not(.sapUiTablePseudoCell)";
901
899
  }
902
900
 
903
- var $Cell = $Element.closest(sSelector, oTableElement);
901
+ const $Cell = $Element.closest(sSelector, oTableElement);
904
902
 
905
903
  if ($Cell.length > 0) {
906
904
  return $Cell;
@@ -920,8 +918,8 @@ sap.ui.define([
920
918
  getParentCell: function(oTable, oElement, bIncludePseudoCells) {
921
919
  bIncludePseudoCells = bIncludePseudoCells === true;
922
920
 
923
- var $Element = jQuery(oElement);
924
- var $Cell = TableUtils.getCell(oTable, oElement, bIncludePseudoCells);
921
+ const $Element = jQuery(oElement);
922
+ const $Cell = TableUtils.getCell(oTable, oElement, bIncludePseudoCells);
925
923
 
926
924
  if (!$Cell || $Cell[0] === $Element[0]) {
927
925
  return null; // The element is not inside a table cell.
@@ -954,7 +952,7 @@ sap.ui.define([
954
952
  return undefined;
955
953
  }
956
954
 
957
- var oDomRef = oTable.getDomRef(sDOMIdSuffix);
955
+ let oDomRef = oTable.getDomRef(sDOMIdSuffix);
958
956
 
959
957
  TableUtils.deregisterResizeHandler(oTable, sHandlerId);
960
958
 
@@ -982,7 +980,7 @@ sap.ui.define([
982
980
  * ID of the resize handler to deregister. If not specified, all resize handlers are deregistered.
983
981
  */
984
982
  deregisterResizeHandler: function(oTable, vHandlerId) {
985
- var aHandlerIds = [];
983
+ let aHandlerIds = [];
986
984
 
987
985
  if (!oTable._mResizeHandlerIds) {
988
986
  // no resize handler registered so far
@@ -993,8 +991,8 @@ sap.ui.define([
993
991
  aHandlerIds.push(vHandlerId);
994
992
  } else if (vHandlerId === undefined) {
995
993
  // deregister all resize handlers if no specific is named
996
- for (var sKey in oTable._mResizeHandlerIds) {
997
- if (typeof sKey == "string" && oTable._mResizeHandlerIds.hasOwnProperty(sKey)) {
994
+ for (const sKey in oTable._mResizeHandlerIds) {
995
+ if (typeof sKey === "string" && oTable._mResizeHandlerIds.hasOwnProperty(sKey)) {
998
996
  aHandlerIds.push(sKey);
999
997
  }
1000
998
  }
@@ -1002,8 +1000,8 @@ sap.ui.define([
1002
1000
  aHandlerIds = vHandlerId;
1003
1001
  }
1004
1002
 
1005
- for (var i = 0; i < aHandlerIds.length; i++) {
1006
- var sHandlerId = aHandlerIds[i];
1003
+ for (let i = 0; i < aHandlerIds.length; i++) {
1004
+ const sHandlerId = aHandlerIds[i];
1007
1005
 
1008
1006
  if (oTable._mResizeHandlerIds[sHandlerId]) {
1009
1007
  ResizeHandler.deregister(oTable._mResizeHandlerIds[sHandlerId]);
@@ -1021,10 +1019,10 @@ sap.ui.define([
1021
1019
  */
1022
1020
  isFirstScrollableRow: function(oTable, row) {
1023
1021
  if (isNaN(row)) {
1024
- var $Ref = jQuery(row);
1022
+ const $Ref = jQuery(row);
1025
1023
  row = parseInt($Ref.add($Ref.parent()).filter("[data-sap-ui-rowindex]").attr("data-sap-ui-rowindex"));
1026
1024
  }
1027
- return row == oTable._getRowCounts().fixedTop;
1025
+ return row === oTable._getRowCounts().fixedTop;
1028
1026
  },
1029
1027
 
1030
1028
  /**
@@ -1036,11 +1034,11 @@ sap.ui.define([
1036
1034
  */
1037
1035
  isLastScrollableRow: function(oTable, row) {
1038
1036
  if (isNaN(row)) {
1039
- var $Ref = jQuery(row);
1037
+ const $Ref = jQuery(row);
1040
1038
  row = parseInt($Ref.add($Ref.parent()).filter("[data-sap-ui-rowindex]").attr("data-sap-ui-rowindex"));
1041
1039
  }
1042
- var mRowCounts = oTable._getRowCounts();
1043
- return row == mRowCounts.count - mRowCounts.fixedBottom - 1;
1040
+ const mRowCounts = oTable._getRowCounts();
1041
+ return row === mRowCounts.count - mRowCounts.fixedBottom - 1;
1044
1042
  },
1045
1043
 
1046
1044
  /**
@@ -1056,22 +1054,22 @@ sap.ui.define([
1056
1054
  * @returns {string | undefined} name of the content density style class or undefined if none was found.
1057
1055
  */
1058
1056
  getContentDensity: function(oControl) {
1059
- var sContentDensity;
1060
- var aContentDensityStyleClasses = ["sapUiSizeCondensed", "sapUiSizeCompact", "sapUiSizeCozy"];
1057
+ let sContentDensity;
1058
+ const aContentDensityStyleClasses = ["sapUiSizeCondensed", "sapUiSizeCompact", "sapUiSizeCozy"];
1061
1059
 
1062
- var fnGetContentDensity = function(sFnName, oObject) {
1060
+ const fnGetContentDensity = function(sFnName, oObject) {
1063
1061
  if (!oObject[sFnName]) {
1064
1062
  return;
1065
1063
  }
1066
1064
 
1067
- for (var i = 0; i < aContentDensityStyleClasses.length; i++) {
1065
+ for (let i = 0; i < aContentDensityStyleClasses.length; i++) {
1068
1066
  if (oObject[sFnName](aContentDensityStyleClasses[i])) {
1069
1067
  return aContentDensityStyleClasses[i];
1070
1068
  }
1071
1069
  }
1072
1070
  };
1073
1071
 
1074
- var $DomRef = oControl.$();
1072
+ let $DomRef = oControl.$();
1075
1073
  if ($DomRef.length > 0) {
1076
1074
  // table was already rendered, check by DOM and return content density class
1077
1075
  sContentDensity = fnGetContentDensity("hasClass", $DomRef);
@@ -1086,8 +1084,8 @@ sap.ui.define([
1086
1084
  // since the table was not yet rendered, traverse its parents:
1087
1085
  // - to find a content density defined at control level
1088
1086
  // - to find the first DOM reference and then check on DOM level
1089
- var oParentDomRef = null;
1090
- var oParent = oControl.getParent();
1087
+ let oParentDomRef = null;
1088
+ let oParent = oControl.getParent();
1091
1089
  // the table might not have a parent at all.
1092
1090
  if (oParent) {
1093
1091
  // try to get the DOM Ref of the parent. It might be required to traverse the complete parent
@@ -1135,7 +1133,7 @@ sap.ui.define([
1135
1133
  * @returns {boolean} Whether the width is variable/flexible.
1136
1134
  */
1137
1135
  isVariableWidth: function(sWidth) {
1138
- return !sWidth || sWidth == "auto" || sWidth.toString().match(/%$/);
1136
+ return !sWidth || sWidth === "auto" || sWidth.toString().match(/%$/);
1139
1137
  },
1140
1138
 
1141
1139
  /**
@@ -1145,20 +1143,20 @@ sap.ui.define([
1145
1143
  * @returns {int} The index of the first fixed bottom row in the <code>rows</code> aggregation, or <code>-1</code>.
1146
1144
  */
1147
1145
  getFirstFixedBottomRowIndex: function(oTable) {
1148
- var mRowCounts = oTable._getRowCounts();
1146
+ const mRowCounts = oTable._getRowCounts();
1149
1147
 
1150
1148
  if (!oTable.getBinding() || mRowCounts.fixedBottom === 0) {
1151
1149
  return -1;
1152
1150
  }
1153
1151
 
1154
- var iFirstFixedBottomIndex = -1;
1155
- var iFirstVisibleRow = oTable.getFirstVisibleRow();
1156
- var iTotalRowCount = oTable._getTotalRowCount();
1152
+ let iFirstFixedBottomIndex = -1;
1153
+ const iFirstVisibleRow = oTable.getFirstVisibleRow();
1154
+ const iTotalRowCount = oTable._getTotalRowCount();
1157
1155
 
1158
1156
  if (iTotalRowCount >= mRowCounts.count) {
1159
1157
  iFirstFixedBottomIndex = mRowCounts.count - mRowCounts.fixedBottom;
1160
1158
  } else {
1161
- var iIdx = iTotalRowCount - mRowCounts.fixedBottom - iFirstVisibleRow;
1159
+ const iIdx = iTotalRowCount - mRowCounts.fixedBottom - iFirstVisibleRow;
1162
1160
  if (iIdx >= 0 && (iFirstVisibleRow + iIdx) < iTotalRowCount) {
1163
1161
  iFirstFixedBottomIndex = iIdx;
1164
1162
  }
@@ -1187,7 +1185,7 @@ sap.ui.define([
1187
1185
  }
1188
1186
  }
1189
1187
 
1190
- var vResult = Lib.getResourceBundleFor("sap.ui.table");
1188
+ let vResult = Lib.getResourceBundleFor("sap.ui.table");
1191
1189
 
1192
1190
  oResourceBundle = vResult;
1193
1191
 
@@ -1220,7 +1218,7 @@ sap.ui.define([
1220
1218
  * @template T, U
1221
1219
  */
1222
1220
  dynamicCall: function(vObject, vCall, oThis) {
1223
- var oObject = typeof vObject === "function" ? vObject() : vObject;
1221
+ const oObject = typeof vObject === "function" ? vObject() : vObject;
1224
1222
 
1225
1223
  if (!oObject || !vCall) {
1226
1224
  return undefined;
@@ -1232,9 +1230,9 @@ sap.ui.define([
1232
1230
  vCall.call(oThis, oObject);
1233
1231
  return undefined;
1234
1232
  } else {
1235
- var aParameters;
1236
- var aReturnValues = [];
1237
- for (var sFunctionName in vCall) {
1233
+ let aParameters;
1234
+ const aReturnValues = [];
1235
+ for (const sFunctionName in vCall) {
1238
1236
  if (typeof oObject[sFunctionName] === "function") {
1239
1237
  aParameters = vCall[sFunctionName];
1240
1238
  aReturnValues.push(oObject[sFunctionName].apply(oThis, aParameters));
@@ -1269,17 +1267,17 @@ sap.ui.define([
1269
1267
  trailing: true
1270
1268
  }, mOptions);
1271
1269
 
1272
- var oCancelablePromise;
1273
- var bIsCalling = false;
1274
- var mLastCallInfo = {};
1275
- var _fn;
1276
- var _fnThrottled;
1270
+ let oCancelablePromise;
1271
+ let bIsCalling = false;
1272
+ let mLastCallInfo = {};
1273
+ let _fn;
1274
+ let _fnThrottled;
1277
1275
 
1278
1276
  if (mOptions.leading && mOptions.asyncLeading) {
1279
1277
  _fn = function() {
1280
1278
  if (bIsCalling) {
1281
1279
 
1282
- var oPromise = Promise.resolve().then(function() {
1280
+ const oPromise = Promise.resolve().then(function() {
1283
1281
  if (!oPromise.canceled) {
1284
1282
  fn.apply(mLastCallInfo.context, mLastCallInfo.args);
1285
1283
  }
@@ -1298,13 +1296,13 @@ sap.ui.define([
1298
1296
  _fn = fn;
1299
1297
  }
1300
1298
 
1301
- var fnThrottled = throttle(_fn, iWait, {
1299
+ const fnThrottled = throttle(_fn, iWait, {
1302
1300
  leading: mOptions.leading,
1303
1301
  trailing: mOptions.trailing
1304
1302
  });
1305
1303
 
1306
1304
  if (mOptions.leading && mOptions.asyncLeading) {
1307
- var fnCancel = fnThrottled.cancel;
1305
+ const fnCancel = fnThrottled.cancel;
1308
1306
 
1309
1307
  fnThrottled.cancel = function() {
1310
1308
  if (oCancelablePromise) {
@@ -1339,8 +1337,8 @@ sap.ui.define([
1339
1337
  * @returns {Function} A wrapper function around <code>fn</code>.
1340
1338
  */
1341
1339
  throttleFrameWise: function(fn) {
1342
- var iAnimationFrameId = null;
1343
- var fnThrottled = function() {
1340
+ let iAnimationFrameId = null;
1341
+ const fnThrottled = function() {
1344
1342
  fnThrottled.cancel();
1345
1343
  iAnimationFrameId = window.requestAnimationFrame(function(args) {
1346
1344
  fn.apply(this, args);
@@ -1366,11 +1364,11 @@ sap.ui.define([
1366
1364
  return null;
1367
1365
  }
1368
1366
 
1369
- var $Cell = jQuery(oCell);
1370
- var oCellInfo = TableUtils.getCellInfo($Cell);
1367
+ const $Cell = jQuery(oCell);
1368
+ const oCellInfo = TableUtils.getCellInfo($Cell);
1371
1369
 
1372
1370
  if (oCellInfo.isOfType(CELLTYPE.ANY | CELLTYPE.PSEUDO)) {
1373
- var $InteractiveElements = $Cell.find(INTERACTIVE_ELEMENT_SELECTORS);
1371
+ const $InteractiveElements = $Cell.find(INTERACTIVE_ELEMENT_SELECTORS);
1374
1372
  if ($InteractiveElements.length > 0) {
1375
1373
  return $InteractiveElements;
1376
1374
  }
@@ -1392,17 +1390,17 @@ sap.ui.define([
1392
1390
  return null;
1393
1391
  }
1394
1392
 
1395
- var oTable = oRow.getTable();
1396
- var aCells = oRow.getCells();
1393
+ const oTable = oRow.getTable();
1394
+ const aCells = oRow.getCells();
1397
1395
 
1398
1396
  if (bRowActionCells === true && TableUtils.hasRowActions(oTable)) {
1399
1397
  aCells.push(oRow.getRowAction());
1400
1398
  }
1401
1399
 
1402
- for (var i = 0; i < aCells.length; i++) {
1403
- var oCellContent = aCells[i].getDomRef();
1404
- var $Cell = TableUtils.getCell(oTable, oCellContent, true);
1405
- var $InteractiveElements = TableUtils.getInteractiveElements($Cell);
1400
+ for (let i = 0; i < aCells.length; i++) {
1401
+ const oCellContent = aCells[i].getDomRef();
1402
+ const $Cell = TableUtils.getCell(oTable, oCellContent, true);
1403
+ const $InteractiveElements = TableUtils.getInteractiveElements($Cell);
1406
1404
 
1407
1405
  if ($InteractiveElements) {
1408
1406
  return $InteractiveElements[0];
@@ -1421,7 +1419,7 @@ sap.ui.define([
1421
1419
  * <code>null</code> if the CSS size could not be converted.
1422
1420
  */
1423
1421
  convertCSSSizeToPixel: function(sCSSSize, bWithUnit) {
1424
- var fPixelValue;
1422
+ let fPixelValue;
1425
1423
 
1426
1424
  if (typeof sCSSSize !== "string") {
1427
1425
  return null;
@@ -1450,7 +1448,7 @@ sap.ui.define([
1450
1448
  */
1451
1449
  getBaseFontSize: function() {
1452
1450
  if (iBaseFontSize == null) {
1453
- var oDocumentRootElement = document.documentElement;
1451
+ const oDocumentRootElement = document.documentElement;
1454
1452
  if (oDocumentRootElement) {
1455
1453
  iBaseFontSize = parseInt(window.getComputedStyle(oDocumentRootElement).fontSize);
1456
1454
  }
@@ -1466,7 +1464,7 @@ sap.ui.define([
1466
1464
  // Converting the row height CSS parameters (e.g. _sap_ui_table_RowHeight) is too complex (CSS calc()).
1467
1465
  // Therefore, the base sizes are used and calculation is done in JavaScript.
1468
1466
 
1469
- var mParams = ThemeParameters.get({
1467
+ const mParams = ThemeParameters.get({
1470
1468
  name: [
1471
1469
  "_sap_ui_table_BaseSize",
1472
1470
  "_sap_ui_table_BaseSizeCozy",
@@ -1476,6 +1474,8 @@ sap.ui.define([
1476
1474
  "_sap_ui_table_NavigationIcon",
1477
1475
  "_sap_ui_table_DeleteIcon",
1478
1476
  "_sap_ui_table_ClearSelectionIcon",
1477
+ "_sap_ui_table_AllSelectedIcon",
1478
+ "_sap_ui_table_CheckboxIcon",
1479
1479
  "_sap_ui_table_NavIndicatorWidth"
1480
1480
  ]
1481
1481
  });
@@ -1499,6 +1499,8 @@ sap.ui.define([
1499
1499
  mThemeParameters.navigationIcon = mParams["_sap_ui_table_NavigationIcon"];
1500
1500
  mThemeParameters.deleteIcon = mParams["_sap_ui_table_DeleteIcon"];
1501
1501
  mThemeParameters.clearSelectionIcon = mParams["_sap_ui_table_ClearSelectionIcon"];
1502
+ mThemeParameters.allSelectedIcon = mParams["_sap_ui_table_AllSelectedIcon"];
1503
+ mThemeParameters.checkboxIcon = mParams["_sap_ui_table_CheckboxIcon"];
1502
1504
  mThemeParameters.navIndicatorWidth = getPixelValue("_sap_ui_table_NavIndicatorWidth");
1503
1505
  },
1504
1506
 
@@ -1510,8 +1512,8 @@ sap.ui.define([
1510
1512
  * @since 1.121
1511
1513
  */
1512
1514
  isThemeApplied: function() {
1513
- var bIsApplied = false;
1514
- var fnOnThemeApplied = function() {
1515
+ let bIsApplied = false;
1516
+ const fnOnThemeApplied = function() {
1515
1517
  bIsApplied = true;
1516
1518
  };
1517
1519
  Theming.attachApplied(fnOnThemeApplied); // Will be called immediately when theme is applied
@@ -1563,7 +1565,7 @@ sap.ui.define([
1563
1565
  * @returns {function(object):object | null} The function to access a value by key. Returns <code>null</code> if the key is not an object.
1564
1566
  */
1565
1567
  createWeakMapFacade: function() {
1566
- var oWeakMap = new window.WeakMap();
1568
+ const oWeakMap = new window.WeakMap();
1567
1569
 
1568
1570
  return function(oKey) {
1569
1571
  if (!oKey || !(typeof oKey === "object")) {
@@ -1586,7 +1588,7 @@ sap.ui.define([
1586
1588
  * @returns {object} Table helper
1587
1589
  */
1588
1590
  _getTableTemplateHelper: function(bCallByAPI) {
1589
- var sMessage = "An automatic control and template generation for the sap.ui.table.Table is not supported " +
1591
+ const sMessage = "An automatic control and template generation for the sap.ui.table.Table is not supported " +
1590
1592
  "anymore for the aggragations footer and title and the aggregations label and template of " +
1591
1593
  "the sap.ui.table.Columns. Use concrete controls for those aggregations instead of altType string.";
1592
1594