@openui5/sap.ui.table 1.123.0 → 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
@@ -40,8 +40,8 @@ sap.ui.define([
40
40
  ) {
41
41
  "use strict";
42
42
 
43
- var GroupEventType = library.GroupEventType;
44
- var _private = TableUtils.createWeakMapFacade();
43
+ const GroupEventType = library.GroupEventType;
44
+ const _private = TableUtils.createWeakMapFacade();
45
45
 
46
46
  /**
47
47
  * Constructor for a new AnalyticalTable.
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  * @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
56
56
  *
57
57
  * @extends sap.ui.table.Table
58
- * @version 1.123.0
58
+ * @version 1.124.0
59
59
  *
60
60
  * @constructor
61
61
  * @public
@@ -63,7 +63,7 @@ sap.ui.define([
63
63
  * @see {@link topic:08197fa68e4f479cbe30f639cc1cd22c sap.ui.table}
64
64
  * @see {@link fiori:/analytical-table-alv/ Analytical Table}
65
65
  */
66
- var AnalyticalTable = Table.extend("sap.ui.table.AnalyticalTable", /** @lends sap.ui.table.AnalyticalTable.prototype */ {metadata: {
66
+ const AnalyticalTable = Table.extend("sap.ui.table.AnalyticalTable", /** @lends sap.ui.table.AnalyticalTable.prototype */ {metadata: {
67
67
 
68
68
  library: "sap.ui.table",
69
69
  properties: {
@@ -184,12 +184,12 @@ sap.ui.define([
184
184
  * @inheritDoc
185
185
  */
186
186
  AnalyticalTable.prototype._getFixedBottomRowContexts = function() {
187
- var oBinding = this.getBinding();
187
+ const oBinding = this.getBinding();
188
188
  return oBinding ? [oBinding.getGrandTotalNode()] : [];
189
189
  };
190
190
 
191
191
  AnalyticalTable.prototype._getContexts = function(iStartIndex, iLength, iThreshold) {
192
- var oBinding = this.getBinding();
192
+ const oBinding = this.getBinding();
193
193
  if (oBinding) {
194
194
  // first call getContexts to trigger data load but return nodes instead of contexts
195
195
  return oBinding.getNodes(iStartIndex, iLength, iThreshold);
@@ -310,9 +310,9 @@ sap.ui.define([
310
310
  };
311
311
 
312
312
  AnalyticalTable.prototype.getModel = function(sName) {
313
- var oModel = Table.prototype.getModel.apply(this, arguments);
314
- var oRowBindingInfo = this.getBindingInfo("rows");
315
- if (oModel && oRowBindingInfo && oRowBindingInfo.model == sName) {
313
+ const oModel = Table.prototype.getModel.apply(this, arguments);
314
+ const oRowBindingInfo = this.getBindingInfo("rows");
315
+ if (oModel && oRowBindingInfo && oRowBindingInfo.model === sName) {
316
316
  ODataModelAdapter.apply(oModel);
317
317
  }
318
318
  return oModel;
@@ -399,8 +399,8 @@ sap.ui.define([
399
399
  * @deprecated As of Version 1.44
400
400
  */
401
401
  if (!oBindingInfo.parameters.hasOwnProperty("autoExpandMode")) {
402
- var sExpandMode = this.getAutoExpandMode();
403
- if (sExpandMode != "Bundled" && sExpandMode != "Sequential") {
402
+ let sExpandMode = this.getAutoExpandMode();
403
+ if (sExpandMode !== "Bundled" && sExpandMode !== "Sequential") {
404
404
  sExpandMode = "Bundled";
405
405
  }
406
406
  oBindingInfo.parameters.autoExpandMode = sExpandMode;
@@ -414,11 +414,11 @@ sap.ui.define([
414
414
  };
415
415
 
416
416
  AnalyticalTable.prototype._getColumnInformation = function() {
417
- var aColumns = [],
418
- aTableColumns = this.getColumns();
417
+ const aColumns = [];
418
+ const aTableColumns = this.getColumns();
419
419
 
420
- for (var i = 0; i < this._aGroupedColumns.length; i++) {
421
- var oColumn = Element.getElementById(this._aGroupedColumns[i]);
420
+ for (let i = 0; i < this._aGroupedColumns.length; i++) {
421
+ const oColumn = Element.getElementById(this._aGroupedColumns[i]);
422
422
 
423
423
  if (!oColumn) {
424
424
  continue;
@@ -434,8 +434,8 @@ sap.ui.define([
434
434
  });
435
435
  }
436
436
 
437
- for (var i = 0; i < aTableColumns.length; i++) {
438
- var oColumn = aTableColumns[i];
437
+ for (let i = 0; i < aTableColumns.length; i++) {
438
+ const oColumn = aTableColumns[i];
439
439
 
440
440
  if (this._aGroupedColumns.indexOf(oColumn.getId()) > -1) {
441
441
  continue;
@@ -459,9 +459,9 @@ sap.ui.define([
459
459
  };
460
460
 
461
461
  function updateRowState(oState) {
462
- var oBinding = this.getBinding();
463
- var oBindingInfo = this.getBindingInfo("rows");
464
- var oNode = oState.context;
462
+ const oBinding = this.getBinding();
463
+ const oBindingInfo = this.getBindingInfo("rows");
464
+ const oNode = oState.context;
465
465
 
466
466
  oState.context = oNode.context; // The AnalyticalTable requests nodes from the binding.
467
467
 
@@ -492,24 +492,24 @@ sap.ui.define([
492
492
  AnalyticalTable.prototype.onRowsUpdated = function(mParameters) {
493
493
  Table.prototype.onRowsUpdated.apply(this, arguments);
494
494
 
495
- var aRows = this.getRows();
496
- var oBinding = this.getBinding();
497
- var oFirstVisibleColumn = this._getVisibleColumns()[0];
495
+ const aRows = this.getRows();
496
+ const oBinding = this.getBinding();
497
+ const oFirstVisibleColumn = this._getVisibleColumns()[0];
498
498
 
499
- for (var iRowIndex = 0; iRowIndex < aRows.length; iRowIndex++) {
499
+ for (let iRowIndex = 0; iRowIndex < aRows.length; iRowIndex++) {
500
500
  // show or hide the totals if not enabled - needs to be done by Table
501
501
  // control since the model could be reused and thus the values cannot
502
502
  // be cleared in the model - and the binding has no control over the
503
503
  // value mapping - this happens directly via the context!
504
- var oRow = aRows[iRowIndex];
505
- var aCells = oRow.getCells();
506
- var iCellCount = aCells.length;
504
+ const oRow = aRows[iRowIndex];
505
+ const aCells = oRow.getCells();
506
+ const iCellCount = aCells.length;
507
507
 
508
- for (var iCellIndex = 0; iCellIndex < iCellCount; iCellIndex++) {
509
- var oAnalyticalColumn = Column.ofCell(aCells[iCellIndex]);
510
- var bIsMeasureCell = oBinding ? oBinding.isMeasure(oAnalyticalColumn.getLeadingProperty()) : false;
511
- var $td = jQuery(aCells[iCellIndex].$().closest("td"));
512
- var bHideCellContent = false;
508
+ for (let iCellIndex = 0; iCellIndex < iCellCount; iCellIndex++) {
509
+ const oAnalyticalColumn = Column.ofCell(aCells[iCellIndex]);
510
+ const bIsMeasureCell = oBinding ? oBinding.isMeasure(oAnalyticalColumn.getLeadingProperty()) : false;
511
+ const $td = jQuery(aCells[iCellIndex].$().closest("td"));
512
+ let bHideCellContent = false;
513
513
 
514
514
  if (oRow.isSummary() && bIsMeasureCell) {
515
515
  bHideCellContent = !oAnalyticalColumn.getSummed();
@@ -523,7 +523,7 @@ sap.ui.define([
523
523
  };
524
524
 
525
525
  function onOpenTableContextMenu(oCellInfo, oMenu) {
526
- var oRow = oCellInfo.isOfType(TableUtils.CELLTYPE.ANYCONTENTCELL) ? this.getRows()[oCellInfo.rowIndex] : null;
526
+ const oRow = oCellInfo.isOfType(TableUtils.CELLTYPE.ANYCONTENTCELL) ? this.getRows()[oCellInfo.rowIndex] : null;
527
527
 
528
528
  if (!oRow || !oRow.isGroupHeader()) {
529
529
  this._removeGroupHeaderMenuItems(oMenu);
@@ -535,13 +535,13 @@ sap.ui.define([
535
535
  }
536
536
 
537
537
  AnalyticalTable.prototype._addGroupHeaderMenuItems = function(oMenu) {
538
- var that = this;
538
+ const that = this;
539
539
 
540
540
  function getGroupColumnInfo() {
541
- var iIndex = that._iGroupedLevel - 1;
541
+ const iIndex = that._iGroupedLevel - 1;
542
542
 
543
543
  if (that._aGroupedColumns[iIndex]) {
544
- var oGroupedColumn = that.getColumns().filter(function(oColumn) {
544
+ const oGroupedColumn = that.getColumns().filter(function(oColumn) {
545
545
  return that._aGroupedColumns[iIndex] === oColumn.getId();
546
546
  })[0];
547
547
 
@@ -562,11 +562,11 @@ sap.ui.define([
562
562
  this._mGroupHeaderMenuItems["visibility"] = new MenuItem({
563
563
  text: TableUtils.getResourceText("TBL_SHOW_COLUMN"),
564
564
  select: function() {
565
- var oGroupColumnInfo = getGroupColumnInfo();
565
+ const oGroupColumnInfo = getGroupColumnInfo();
566
566
 
567
567
  if (oGroupColumnInfo) {
568
- var oColumn = oGroupColumnInfo.column,
569
- bShowIfGrouped = oColumn.getShowIfGrouped();
568
+ const oColumn = oGroupColumnInfo.column;
569
+ const bShowIfGrouped = oColumn.getShowIfGrouped();
570
570
  oColumn.setShowIfGrouped(!bShowIfGrouped);
571
571
 
572
572
  that.fireGroup({column: oColumn, groupedColumns: oColumn.getParent()._aGroupedColumns, type: (!bShowIfGrouped ? GroupEventType.showGroupedColumn : GroupEventType.hideGroupedColumn)});
@@ -580,10 +580,10 @@ sap.ui.define([
580
580
  this._mGroupHeaderMenuItems["ungroup"] = new MenuItem({
581
581
  text: TableUtils.getResourceText("TBL_UNGROUP"),
582
582
  select: function() {
583
- var oGroupColumnInfo = getGroupColumnInfo();
583
+ const oGroupColumnInfo = getGroupColumnInfo();
584
584
 
585
585
  if (oGroupColumnInfo && oGroupColumnInfo.column) {
586
- var oUngroupedColumn = oGroupColumnInfo.column;
586
+ const oUngroupedColumn = oGroupColumnInfo.column;
587
587
 
588
588
  oUngroupedColumn.setGrouped(false);
589
589
  that.fireGroup({column: oUngroupedColumn, groupedColumns: that._aGroupedColumns, type: GroupEventType.ungroup});
@@ -597,11 +597,11 @@ sap.ui.define([
597
597
  this._mGroupHeaderMenuItems["ungroupall"] = new MenuItem({
598
598
  text: TableUtils.getResourceText("TBL_UNGROUP_ALL"),
599
599
  select: function() {
600
- var aColumns = that.getColumns();
600
+ const aColumns = that.getColumns();
601
601
 
602
602
  that.suspendUpdateAnalyticalInfo();
603
603
 
604
- for (var i = 0; i < aColumns.length; i++) {
604
+ for (let i = 0; i < aColumns.length; i++) {
605
605
  aColumns[i].setGrouped(false);
606
606
  }
607
607
 
@@ -616,11 +616,11 @@ sap.ui.define([
616
616
  this._mGroupHeaderMenuItems["moveup"] = new MenuItem({
617
617
  text: TableUtils.getResourceText("TBL_MOVE_UP"),
618
618
  select: function() {
619
- var oGroupColumnInfo = getGroupColumnInfo();
619
+ const oGroupColumnInfo = getGroupColumnInfo();
620
620
 
621
621
  if (oGroupColumnInfo) {
622
- var oColumn = oGroupColumnInfo.column;
623
- var iIndex = that._aGroupedColumns.indexOf(oColumn.getId());
622
+ const oColumn = oGroupColumnInfo.column;
623
+ const iIndex = that._aGroupedColumns.indexOf(oColumn.getId());
624
624
  if (iIndex > 0) {
625
625
  that._aGroupedColumns[iIndex] = that._aGroupedColumns.splice(iIndex - 1, 1, that._aGroupedColumns[iIndex])[0];
626
626
  that.updateAnalyticalInfo();
@@ -637,11 +637,11 @@ sap.ui.define([
637
637
  this._mGroupHeaderMenuItems["movedown"] = new MenuItem({
638
638
  text: TableUtils.getResourceText("TBL_MOVE_DOWN"),
639
639
  select: function() {
640
- var oGroupColumnInfo = getGroupColumnInfo();
640
+ const oGroupColumnInfo = getGroupColumnInfo();
641
641
 
642
642
  if (oGroupColumnInfo) {
643
- var oColumn = oGroupColumnInfo.column;
644
- var iIndex = that._aGroupedColumns.indexOf(oColumn.getId());
643
+ const oColumn = oGroupColumnInfo.column;
644
+ const iIndex = that._aGroupedColumns.indexOf(oColumn.getId());
645
645
  if (iIndex < that._aGroupedColumns.length) {
646
646
  that._aGroupedColumns[iIndex] = that._aGroupedColumns.splice(iIndex + 1, 1, that._aGroupedColumns[iIndex])[0];
647
647
  that.updateAnalyticalInfo();
@@ -725,9 +725,9 @@ sap.ui.define([
725
725
  }
726
726
  oMenu.addItem(this._mGroupHeaderMenuItems["expandall"]);
727
727
 
728
- var oGroupColumnInfo = getGroupColumnInfo();
728
+ const oGroupColumnInfo = getGroupColumnInfo();
729
729
  if (oGroupColumnInfo) {
730
- var oColumn = oGroupColumnInfo.column;
730
+ const oColumn = oGroupColumnInfo.column;
731
731
  if (oColumn.getShowIfGrouped()) {
732
732
  this._mGroupHeaderMenuItems["visibility"].setText(TableUtils.getResourceText("TBL_HIDE_COLUMN"));
733
733
  } else {
@@ -746,13 +746,13 @@ sap.ui.define([
746
746
  return;
747
747
  }
748
748
 
749
- for (var sItemKey in this._mGroupHeaderMenuItems) {
749
+ for (const sItemKey in this._mGroupHeaderMenuItems) {
750
750
  oMenu.removeItem(this._mGroupHeaderMenuItems[sItemKey]);
751
751
  }
752
752
  };
753
753
 
754
754
  AnalyticalTable.prototype._cleanupGroupHeaderMenuItems = function() {
755
- for (var sItemKey in this._mGroupHeaderMenuItems) {
755
+ for (const sItemKey in this._mGroupHeaderMenuItems) {
756
756
  this._mGroupHeaderMenuItems[sItemKey].destroy();
757
757
  }
758
758
  this._mGroupHeaderMenuItems = null;
@@ -800,7 +800,7 @@ sap.ui.define([
800
800
 
801
801
  AnalyticalTable.prototype.addColumn = function(vColumn, bSuppressInvalidate) {
802
802
  //@TODO: Implement addColumn(Column[] || oColumn)
803
- var oColumn = this._getColumn(vColumn);
803
+ const oColumn = this._getColumn(vColumn);
804
804
  if (oColumn.getGrouped()) {
805
805
  this._addGroupedColumn(oColumn.getId());
806
806
  }
@@ -811,7 +811,7 @@ sap.ui.define([
811
811
  };
812
812
 
813
813
  AnalyticalTable.prototype.insertColumn = function(vColumn, iIndex, bSuppressInvalidate) {
814
- var oColumn = this._getColumn(vColumn);
814
+ const oColumn = this._getColumn(vColumn);
815
815
  if (oColumn.getGrouped()) {
816
816
  this._addGroupedColumn(oColumn.getId());
817
817
  }
@@ -821,16 +821,16 @@ sap.ui.define([
821
821
  };
822
822
 
823
823
  AnalyticalTable.prototype.removeColumn = function(vColumn, bSuppressInvalidate) {
824
- var oResult = Table.prototype.removeColumn.apply(this, arguments);
824
+ const oResult = Table.prototype.removeColumn.apply(this, arguments);
825
825
 
826
826
  // only remove from grouped columns if not caused by column move.
827
827
  if (!this._bReorderInProcess) {
828
828
  this._aGroupedColumns = jQuery.grep(this._aGroupedColumns, function(sValue) {
829
829
  //check if vColum is an object with getId function
830
830
  if (vColumn.getId) {
831
- return sValue != vColumn.getId();
831
+ return sValue !== vColumn.getId();
832
832
  } else {
833
- return sValue == vColumn;
833
+ return sValue === vColumn;
834
834
  }
835
835
  });
836
836
  }
@@ -842,7 +842,7 @@ sap.ui.define([
842
842
 
843
843
  AnalyticalTable.prototype.removeAllColumns = function(bSuppressInvalidate) {
844
844
  this._aGroupedColumns = [];
845
- var aResult = Table.prototype.removeAllColumns.apply(this, arguments);
845
+ const aResult = Table.prototype.removeAllColumns.apply(this, arguments);
846
846
 
847
847
  this._updateColumns(bSuppressInvalidate);
848
848
 
@@ -851,7 +851,7 @@ sap.ui.define([
851
851
 
852
852
  AnalyticalTable.prototype._getColumn = function(vColumn) {
853
853
  if (typeof vColumn === "string") {
854
- var oColumn = new AnalyticalColumn({
854
+ const oColumn = new AnalyticalColumn({
855
855
  leadingProperty: vColumn,
856
856
  template: vColumn,
857
857
  managed: true
@@ -882,10 +882,10 @@ sap.ui.define([
882
882
  return;
883
883
  }
884
884
 
885
- var oBinding = this.getBinding();
885
+ const oBinding = this.getBinding();
886
886
  if (oBinding) {
887
- var aColumnInfo = this._getColumnInformation();
888
- var iNumberOfExpandedLevels = oBinding.getNumberOfExpandedLevels() || 0;
887
+ const aColumnInfo = this._getColumnInformation();
888
+ const iNumberOfExpandedLevels = oBinding.getNumberOfExpandedLevels() || 0;
889
889
 
890
890
  // The binding does not support the number of expanded levels to be bigger than the number of grouped columns.
891
891
  if (iNumberOfExpandedLevels > this._aGroupedColumns.length) {
@@ -910,7 +910,7 @@ sap.ui.define([
910
910
  };
911
911
 
912
912
  AnalyticalTable.prototype._updateTotalRow = function(bSuppressInvalidate) {
913
- var oBinding = this.getBinding();
913
+ const oBinding = this.getBinding();
914
914
 
915
915
  this.setProperty("rowCountConstraints", {
916
916
  fixedTop: false,
@@ -923,20 +923,20 @@ sap.ui.define([
923
923
  return;
924
924
  }
925
925
 
926
- var oBinding = this.getBinding(),
927
- oResult = oBinding && oBinding.getAnalyticalQueryResult();
926
+ const oBinding = this.getBinding();
927
+ const oResult = oBinding && oBinding.getAnalyticalQueryResult();
928
928
 
929
929
  if (oResult) {
930
- var aColumns = this.getColumns(),
931
- aGroupedDimensions = [],
932
- aUngroupedDimensions = [],
933
- aDimensions = [],
934
- oDimensionIndex = {},
935
- oColumn,
936
- oDimension;
930
+ const aColumns = this.getColumns();
931
+ const aGroupedDimensions = [];
932
+ let aUngroupedDimensions = [];
933
+ const aDimensions = [];
934
+ const oDimensionIndex = {};
935
+ let oColumn;
936
+ let oDimension;
937
937
 
938
938
  // calculate an index of all dimensions and their columns. Grouping is done per dimension.
939
- for (var i = 0; i < aColumns.length; i++) {
939
+ for (let i = 0; i < aColumns.length; i++) {
940
940
  oColumn = aColumns[i];
941
941
  oColumn._isLastGroupableLeft = false;
942
942
  oColumn._bLastGroupAndGrouped = false;
@@ -947,11 +947,11 @@ sap.ui.define([
947
947
  continue;
948
948
  }
949
949
 
950
- var sLeadingProperty = oColumn.getLeadingProperty();
950
+ const sLeadingProperty = oColumn.getLeadingProperty();
951
951
  oDimension = oResult.findDimensionByPropertyName(sLeadingProperty);
952
952
 
953
953
  if (oDimension) {
954
- var sDimensionName = oDimension.getName();
954
+ const sDimensionName = oDimension.getName();
955
955
  if (!oDimensionIndex[sDimensionName]) {
956
956
  oDimensionIndex[sDimensionName] = {dimension: oDimension, columns: [oColumn]};
957
957
  } else {
@@ -960,18 +960,18 @@ sap.ui.define([
960
960
 
961
961
  // if one column of a dimension is grouped, the dimension is considered as grouped.
962
962
  // all columns which are not explicitly grouped will be flagged as dependendGrouped in the next step
963
- if (oColumn.getGrouped() && aGroupedDimensions.indexOf(sDimensionName) == -1) {
963
+ if (oColumn.getGrouped() && aGroupedDimensions.indexOf(sDimensionName) === -1) {
964
964
  aGroupedDimensions.push(sDimensionName);
965
965
  }
966
966
 
967
- if (aDimensions.indexOf(sDimensionName) == -1) {
967
+ if (aDimensions.indexOf(sDimensionName) === -1) {
968
968
  aDimensions.push(sDimensionName);
969
969
  }
970
970
  }
971
971
  }
972
972
 
973
973
  aUngroupedDimensions = jQuery.grep(aDimensions, function(s) {
974
- return aGroupedDimensions.indexOf(aGroupedDimensions, s) == -1;
974
+ return aGroupedDimensions.indexOf(aGroupedDimensions, s) === -1;
975
975
  });
976
976
 
977
977
  // for all grouped dimensions
@@ -987,16 +987,16 @@ sap.ui.define([
987
987
 
988
988
  // if there is only one dimension left, their columns must remain visible even though they are grouped.
989
989
  // this behavior is controlled by the flag _bLastGroupAndGrouped
990
- if (aGroupedDimensions.length == aDimensions.length) {
990
+ if (aGroupedDimensions.length === aDimensions.length) {
991
991
  oDimension = oResult.findDimensionByPropertyName(Element.getElementById(this._aGroupedColumns[this._aGroupedColumns.length - 1]).getLeadingProperty());
992
- var aGroupedDimensionColumns = oDimensionIndex[oDimension.getName()].columns;
992
+ const aGroupedDimensionColumns = oDimensionIndex[oDimension.getName()].columns;
993
993
  jQuery.each(aGroupedDimensionColumns, function(i, o) {
994
994
  o._bLastGroupAndGrouped = true;
995
995
  });
996
996
  }
997
997
  }
998
998
 
999
- if (aUngroupedDimensions.length == 1) {
999
+ if (aUngroupedDimensions.length === 1) {
1000
1000
  jQuery.each(oDimensionIndex[aUngroupedDimensions[0]].columns, function(j, o) {
1001
1001
  o._isLastGroupableLeft = true;
1002
1002
  });
@@ -1005,17 +1005,17 @@ sap.ui.define([
1005
1005
  };
1006
1006
 
1007
1007
  AnalyticalTable.prototype._getFirstMeasureColumnIndex = function() {
1008
- var oBinding = this.getBinding(),
1009
- oResultSet = oBinding && oBinding.getAnalyticalQueryResult(),
1010
- aColumns = this._getVisibleColumns();
1008
+ const oBinding = this.getBinding();
1009
+ const oResultSet = oBinding && oBinding.getAnalyticalQueryResult();
1010
+ const aColumns = this._getVisibleColumns();
1011
1011
 
1012
1012
  if (!oResultSet) {
1013
1013
  return -1;
1014
1014
  }
1015
1015
 
1016
- for (var i = 0; i < aColumns.length; i++) {
1017
- var oColumn = aColumns[i],
1018
- sLeadingProperty = oColumn.getLeadingProperty();
1016
+ for (let i = 0; i < aColumns.length; i++) {
1017
+ const oColumn = aColumns[i];
1018
+ const sLeadingProperty = oColumn.getLeadingProperty();
1019
1019
 
1020
1020
  if (oResultSet.findMeasureByName(sLeadingProperty) || oResultSet.findMeasureByPropertyName(sLeadingProperty)) {
1021
1021
  return i;
@@ -1024,11 +1024,11 @@ sap.ui.define([
1024
1024
  };
1025
1025
 
1026
1026
  AnalyticalTable.prototype._getTotalRowCount = function() {
1027
- var iTotalRowCount = Table.prototype._getTotalRowCount.apply(this, arguments);
1027
+ let iTotalRowCount = Table.prototype._getTotalRowCount.apply(this, arguments);
1028
1028
 
1029
1029
  if (iTotalRowCount === 1) {
1030
- var oBinding = this.getBinding();
1031
- var bHasGrandTotal = oBinding ? oBinding.providesGrandTotal() && oBinding.hasTotaledMeasures() : false;
1030
+ const oBinding = this.getBinding();
1031
+ const bHasGrandTotal = oBinding ? oBinding.providesGrandTotal() && oBinding.hasTotaledMeasures() : false;
1032
1032
 
1033
1033
  if (bHasGrandTotal) {
1034
1034
  iTotalRowCount = 0; // If there's only the grand total, the table has to act as if it's empty.
@@ -1045,7 +1045,7 @@ sap.ui.define([
1045
1045
  * @public
1046
1046
  */
1047
1047
  AnalyticalTable.prototype.getTotalSize = function() {
1048
- var oBinding = this.getBinding();
1048
+ const oBinding = this.getBinding();
1049
1049
  if (oBinding) {
1050
1050
  return oBinding.getTotalSize();
1051
1051
  }
@@ -1059,8 +1059,8 @@ sap.ui.define([
1059
1059
  AnalyticalTable.prototype._onPersoApplied = function() {
1060
1060
  Table.prototype._onPersoApplied.apply(this, arguments);
1061
1061
  this._aGroupedColumns = [];
1062
- var aColumns = this.getColumns();
1063
- for (var i = 0, l = aColumns.length; i < l; i++) {
1062
+ const aColumns = this.getColumns();
1063
+ for (let i = 0, l = aColumns.length; i < l; i++) {
1064
1064
  if (aColumns[i].getGrouped()) {
1065
1065
  this._addGroupedColumn(aColumns[i].getId());
1066
1066
  }
@@ -1075,7 +1075,7 @@ sap.ui.define([
1075
1075
  };
1076
1076
 
1077
1077
  AnalyticalTable.prototype._removeGroupedColumn = function(sColumnId) {
1078
- var iIndex = this._aGroupedColumns.indexOf(sColumnId);
1078
+ const iIndex = this._aGroupedColumns.indexOf(sColumnId);
1079
1079
 
1080
1080
  if (iIndex >= 0) {
1081
1081
  this._aGroupedColumns.splice(iIndex, 1);
@@ -1284,16 +1284,16 @@ sap.ui.define([
1284
1284
  * @ui5-restricted sap.ui.comp
1285
1285
  */
1286
1286
  AnalyticalTable.prototype.getAnalyticalInfoOfRow = function(oRow) {
1287
- var oBinding = this.getBinding();
1288
- var oContext = oRow ? oRow.getRowBindingContext() : null;
1287
+ const oBinding = this.getBinding();
1288
+ const oContext = oRow ? oRow.getRowBindingContext() : null;
1289
1289
 
1290
1290
  if (!TableUtils.isA(oRow, "sap.ui.table.Row") || oRow.getParent() !== this || !oBinding || !oContext) {
1291
1291
  return null;
1292
1292
  }
1293
1293
 
1294
- var bIsGrandTotal = oContext === oBinding.getGrandTotalContext();
1295
- var oContextInfo = null;
1296
- var iLevel = -1;
1294
+ const bIsGrandTotal = oContext === oBinding.getGrandTotalContext();
1295
+ let oContextInfo = null;
1296
+ let iLevel = -1;
1297
1297
  if (bIsGrandTotal) {
1298
1298
  oContextInfo = oBinding.getGrandTotalContextInfo();
1299
1299
  iLevel = 0;
@@ -1304,15 +1304,15 @@ sap.ui.define([
1304
1304
  }
1305
1305
  }
1306
1306
 
1307
- var bIsGroup = oContextInfo && oBinding.nodeHasChildren && oBinding.nodeHasChildren(oContextInfo);
1308
- var bIsGroupTotal = !bIsGroup && !bIsGrandTotal && oContextInfo && oContextInfo.nodeState && oContextInfo.nodeState.sum;
1307
+ const bIsGroup = oContextInfo && oBinding.nodeHasChildren && oBinding.nodeHasChildren(oContextInfo);
1308
+ const bIsGroupTotal = !bIsGroup && !bIsGrandTotal && oContextInfo && oContextInfo.nodeState && oContextInfo.nodeState.sum;
1309
1309
 
1310
- var aGroupedColumns = [];
1310
+ const aGroupedColumns = [];
1311
1311
 
1312
1312
  if (bIsGroupTotal || bIsGroup) {
1313
- var aAllGroupedColumns = this.getGroupedColumns();
1313
+ const aAllGroupedColumns = this.getGroupedColumns();
1314
1314
  if (aAllGroupedColumns.length > 0 && iLevel > 0 && iLevel <= aAllGroupedColumns.length) {
1315
- for (var i = 0; i < iLevel; i++) {
1315
+ for (let i = 0; i < iLevel; i++) {
1316
1316
  aGroupedColumns.push(aAllGroupedColumns[i]);
1317
1317
  }
1318
1318
  }
@@ -1345,7 +1345,7 @@ sap.ui.define([
1345
1345
  return;
1346
1346
  }
1347
1347
 
1348
- var oBinding = this.getBinding();
1348
+ const oBinding = this.getBinding();
1349
1349
 
1350
1350
  if (!oBinding.bUseBatchRequests) {
1351
1351
  _private(this).bPendingRequest = true;
@@ -1359,7 +1359,7 @@ sap.ui.define([
1359
1359
  return;
1360
1360
  }
1361
1361
 
1362
- var oBinding = this.getBinding();
1362
+ const oBinding = this.getBinding();
1363
1363
 
1364
1364
  if (!oBinding.bUseBatchRequests) {
1365
1365
  _private(this).bPendingRequest = false;