@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
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  ) {
19
19
  "use strict";
20
20
 
21
- var _private = TableUtils.createWeakMapFacade();
21
+ const _private = TableUtils.createWeakMapFacade();
22
22
 
23
23
  /**
24
24
  * Constructor for a new <code>RowMode</code>.
@@ -37,16 +37,16 @@ sap.ui.define([
37
37
  * @public
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.123.1
40
+ * @version 1.124.1
41
41
  */
42
- var RowMode = Element.extend("sap.ui.table.rowmodes.RowMode", /** @lends sap.ui.table.rowmodes.RowMode.prototype */ {
42
+ const RowMode = Element.extend("sap.ui.table.rowmodes.RowMode", /** @lends sap.ui.table.rowmodes.RowMode.prototype */ {
43
43
  metadata: {
44
44
  library: "sap.ui.table",
45
45
  "abstract": true
46
46
  }
47
47
  });
48
48
 
49
- var TableDelegate = {};
49
+ const TableDelegate = {};
50
50
 
51
51
  RowMode.prototype.init = function() {
52
52
  /*
@@ -121,7 +121,7 @@ sap.ui.define([
121
121
  * @private
122
122
  */
123
123
  RowMode.prototype.cancelAsyncOperations = function() {
124
- var oTable = this.getTable();
124
+ const oTable = this.getTable();
125
125
 
126
126
  if (oTable) {
127
127
  clearTimeout(oTable._mTimeouts.refreshRowsCreateRows);
@@ -136,8 +136,8 @@ sap.ui.define([
136
136
  * @private
137
137
  */
138
138
  RowMode.prototype.registerHooks = function() {
139
- var oTable = this.getTable();
140
- var Hook = TableUtils.Hook.Keys;
139
+ const oTable = this.getTable();
140
+ const Hook = TableUtils.Hook.Keys;
141
141
 
142
142
  TableUtils.Hook.register(oTable, Hook.Table.RowsUnbound, this._onTableRowsUnbound, this);
143
143
  TableUtils.Hook.register(oTable, Hook.Table.UpdateRows, this._onTableUpdateRows, this);
@@ -154,8 +154,8 @@ sap.ui.define([
154
154
  * @private
155
155
  */
156
156
  RowMode.prototype.deregisterHooks = function() {
157
- var oTable = this.getTable();
158
- var Hook = TableUtils.Hook.Keys;
157
+ const oTable = this.getTable();
158
+ const Hook = TableUtils.Hook.Keys;
159
159
 
160
160
  TableUtils.Hook.deregister(oTable, Hook.Table.RowsUnbound, this._onTableRowsUnbound, this);
161
161
  TableUtils.Hook.deregister(oTable, Hook.Table.UpdateRows, this._onTableUpdateRows, this);
@@ -234,7 +234,7 @@ sap.ui.define([
234
234
  * @private
235
235
  */
236
236
  RowMode.prototype.getTable = function() {
237
- var oParent = this.getParent();
237
+ const oParent = this.getParent();
238
238
  return TableUtils.isA(oParent, "sap.ui.table.Table") ? oParent : null;
239
239
  };
240
240
 
@@ -244,7 +244,7 @@ sap.ui.define([
244
244
  * @private
245
245
  */
246
246
  RowMode.prototype.updateTable = function(sReason /* private parameter */) {
247
- var oTable = this.getTable();
247
+ const oTable = this.getTable();
248
248
 
249
249
  if (!oTable) {
250
250
  return;
@@ -254,7 +254,7 @@ sap.ui.define([
254
254
 
255
255
  // Update the rows aggregation and the row's binding contexts.
256
256
  oTable._adjustFirstVisibleRowToTotalRowCount(); // TODO: Move this to Table#onBeforeRendering as soon as #renderTableRows is removed
257
- var bRowsAggregationChanged = this.updateTableRows();
257
+ const bRowsAggregationChanged = this.updateTableRows();
258
258
 
259
259
  if (oTable._bInvalid) {
260
260
  // No need to update the DOM or fire the _rowsUpdated event if the table is about to rerender.
@@ -299,7 +299,7 @@ sap.ui.define([
299
299
  * @private
300
300
  */
301
301
  RowMode.prototype.getBaseRowHeightOfTable = function() {
302
- var oTable = this.getTable();
302
+ const oTable = this.getTable();
303
303
  return oTable ? oTable._getBaseRowHeight() : 0;
304
304
  };
305
305
 
@@ -310,7 +310,7 @@ sap.ui.define([
310
310
  * @private
311
311
  */
312
312
  RowMode.prototype.getDefaultRowContentHeightOfTable = function() {
313
- var oTable = this.getTable();
313
+ const oTable = this.getTable();
314
314
  return oTable ? oTable._getDefaultRowContentHeight() : 0;
315
315
  };
316
316
 
@@ -321,7 +321,7 @@ sap.ui.define([
321
321
  * @private
322
322
  */
323
323
  RowMode.prototype.getTotalRowCountOfTable = function() {
324
- var oTable = this.getTable();
324
+ const oTable = this.getTable();
325
325
  return oTable ? oTable._getTotalRowCount() : 0;
326
326
  };
327
327
 
@@ -342,7 +342,7 @@ sap.ui.define([
342
342
  * @private
343
343
  */
344
344
  RowMode.prototype._onTableUpdateRows = function(sReason) {
345
- var oTable = this.getTable();
345
+ const oTable = this.getTable();
346
346
 
347
347
  clearTimeout(oTable._mTimeouts.refreshRowsCreateRows);
348
348
  _private(this).updateTableAsync(sReason);
@@ -356,7 +356,7 @@ sap.ui.define([
356
356
  * @private
357
357
  */
358
358
  RowMode.prototype.applyTableStyles = function(oRM) {
359
- var mTableStyles = this.getTableStyles();
359
+ const mTableStyles = this.getTableStyles();
360
360
 
361
361
  if (oRM) {
362
362
  oRM.style("height", mTableStyles.height);
@@ -365,8 +365,8 @@ sap.ui.define([
365
365
  return;
366
366
  }
367
367
 
368
- var oTable = this.getTable();
369
- var oTableDomRef = oTable ? oTable.getDomRef() : null;
368
+ const oTable = this.getTable();
369
+ const oTableDomRef = oTable ? oTable.getDomRef() : null;
370
370
 
371
371
  if (oTableDomRef) {
372
372
  oTableDomRef.style.height = mTableStyles.height;
@@ -383,15 +383,15 @@ sap.ui.define([
383
383
  * @private
384
384
  */
385
385
  RowMode.prototype.applyTableBottomPlaceholderStyles = function(oRM) {
386
- var mPlaceholderStyles = this.getTableBottomPlaceholderStyles();
386
+ const mPlaceholderStyles = this.getTableBottomPlaceholderStyles();
387
387
 
388
388
  if (oRM) {
389
389
  oRM.style("height", mPlaceholderStyles.height);
390
390
  return;
391
391
  }
392
392
 
393
- var oTable = this.getTable();
394
- var oPlaceholder = oTable ? oTable.getDomRef("placeholder-bottom") : null;
393
+ const oTable = this.getTable();
394
+ const oPlaceholder = oTable ? oTable.getDomRef("placeholder-bottom") : null;
395
395
 
396
396
  if (oPlaceholder) {
397
397
  oPlaceholder.style.height = mPlaceholderStyles.height;
@@ -406,7 +406,7 @@ sap.ui.define([
406
406
  * @private
407
407
  */
408
408
  RowMode.prototype.applyRowContainerStyles = function(oRM) {
409
- var mRowContainerStyles = this.getRowContainerStyles();
409
+ const mRowContainerStyles = this.getRowContainerStyles();
410
410
 
411
411
  if (oRM) {
412
412
  oRM.style("height", mRowContainerStyles.height);
@@ -415,8 +415,8 @@ sap.ui.define([
415
415
  return;
416
416
  }
417
417
 
418
- var oTable = this.getTable();
419
- var oRowContainer = oTable ? oTable.getDomRef("tableCCnt") : null;
418
+ const oTable = this.getTable();
419
+ const oRowContainer = oTable ? oTable.getDomRef("tableCCnt") : null;
420
420
 
421
421
  if (oRowContainer) {
422
422
  oRowContainer.style.height = mRowContainerStyles.height;
@@ -440,7 +440,7 @@ sap.ui.define([
440
440
  * @private
441
441
  */
442
442
  RowMode.prototype.computeStandardizedRowCounts = function(iCount, iFixedTop, iFixedBottom) {
443
- var mRowCountConstraints = this.getRowCountConstraints();
443
+ const mRowCountConstraints = this.getRowCountConstraints();
444
444
 
445
445
  if (mRowCountConstraints.fixedTop === true) {
446
446
  iFixedTop = 1;
@@ -503,7 +503,7 @@ sap.ui.define([
503
503
  RowMode.prototype.getRowCountConstraints = function() {
504
504
  // TODO: Add a type definition for a protected type "rowCountConstraints" in the library file to document the return value
505
505
  // RowMode#getRowCountConstraints + PluginBase#setRowCountConstraints
506
- var oTable = this.getTable();
506
+ const oTable = this.getTable();
507
507
  return oTable ? oTable.getProperty("rowCountConstraints") || {} : {};
508
508
  };
509
509
 
@@ -530,7 +530,7 @@ sap.ui.define([
530
530
  * @private
531
531
  */
532
532
  RowMode.prototype.renderInTableBottomArea = function(oRM) {
533
- var mPlaceholderHeight = this.getTableBottomPlaceholderStyles();
533
+ const mPlaceholderHeight = this.getTableBottomPlaceholderStyles();
534
534
 
535
535
  if (mPlaceholderHeight === undefined) {
536
536
  return;
@@ -552,8 +552,8 @@ sap.ui.define([
552
552
  * @private
553
553
  */
554
554
  RowMode.prototype.initTableRowsAfterDataRequested = function(iRowCount) {
555
- var oTable = this.getTable();
556
- var oBinding = oTable.getBinding();
555
+ const oTable = this.getTable();
556
+ const oBinding = oTable.getBinding();
557
557
 
558
558
  clearTimeout(oTable._mTimeouts.refreshRowsCreateRows);
559
559
 
@@ -570,9 +570,10 @@ sap.ui.define([
570
570
  return;
571
571
  }
572
572
 
573
- var aRows = createRows(oTable, iRowCount), oRow;
573
+ const aRows = createRows(oTable, iRowCount);
574
+ let oRow;
574
575
 
575
- for (var i = 0; i < aRows.length; i++) {
576
+ for (let i = 0; i < aRows.length; i++) {
576
577
  oRow = aRows[i];
577
578
  // prevent propagation of parent binding context; else incorrect data might be requested by the model.
578
579
  oRow.setRowBindingContext(null, oTable);
@@ -593,10 +594,10 @@ sap.ui.define([
593
594
  * @private
594
595
  */
595
596
  RowMode.prototype.updateTableRows = function() {
596
- var oTable = this.getTable();
597
- var aRows = oTable.getRows();
598
- var iNewNumberOfRows = this.getComputedRowCounts().count;
599
- var bRowsAggregationChanged = false;
597
+ const oTable = this.getTable();
598
+ let aRows = oTable.getRows();
599
+ let iNewNumberOfRows = this.getComputedRowCounts().count;
600
+ let bRowsAggregationChanged = false;
600
601
 
601
602
  // There is no need to have rows in the aggregation if the NoData overlay is enabled and no binding is available.
602
603
  if (TableUtils.isNoDataVisible(oTable) && !oTable.getBinding()) {
@@ -607,8 +608,8 @@ sap.ui.define([
607
608
  }
608
609
 
609
610
  // Clear the text selection if text inside rows is selected and the content is going to change, for example on scroll.
610
- var oRowContainer = oTable.getDomRef("tableCCnt");
611
- var oSelection = window.getSelection();
611
+ const oRowContainer = oTable.getDomRef("tableCCnt");
612
+ const oSelection = window.getSelection();
612
613
  if (oRowContainer && oSelection.containsNode(oRowContainer, true)) {
613
614
  oSelection.empty();
614
615
  }
@@ -643,33 +644,33 @@ sap.ui.define([
643
644
  * @private
644
645
  */
645
646
  RowMode.prototype.renderTableRows = function() {
646
- var oTable = this.getTable();
647
- var oTBody = oTable ? oTable.getDomRef("tableCCnt") : null;
647
+ const oTable = this.getTable();
648
+ const oTBody = oTable ? oTable.getDomRef("tableCCnt") : null;
648
649
 
649
650
  if (!oTBody) {
650
651
  return;
651
652
  }
652
653
 
653
654
  // make sure to call rendering event delegates even in case of DOM patching
654
- var oBeforeRenderingEvent = jQuery.Event("BeforeRendering");
655
+ const oBeforeRenderingEvent = jQuery.Event("BeforeRendering");
655
656
  oBeforeRenderingEvent.setMarked("renderRows");
656
657
  oBeforeRenderingEvent.srcControl = oTable;
657
658
  oTable._handleEvent(oBeforeRenderingEvent);
658
659
 
659
- var oRM = new RenderManager().getInterface();
660
- var oRenderer = oTable.getRenderer();
660
+ const oRM = new RenderManager().getInterface();
661
+ const oRenderer = oTable.getRenderer();
661
662
  oRenderer.renderTableCCnt(oRM, oTable);
662
663
  oRM.flush(oTBody, false, false);
663
664
  oRM.destroy();
664
665
 
665
666
  // make sure to call rendering event delegates even in case of DOM patching
666
- var oAfterRenderingEvent = jQuery.Event("AfterRendering");
667
+ const oAfterRenderingEvent = jQuery.Event("AfterRendering");
667
668
  oAfterRenderingEvent.setMarked("renderRows");
668
669
  oAfterRenderingEvent.srcControl = oTable;
669
670
  oTable._handleEvent(oAfterRenderingEvent);
670
671
 
671
- var bHasRows = oTable.getRows().length > 0;
672
- var oDomRef = oTable.getDomRef();
672
+ const bHasRows = oTable.getRows().length > 0;
673
+ const oDomRef = oTable.getDomRef();
673
674
  oDomRef.querySelector(".sapUiTableCtrlBefore").setAttribute("tabindex", bHasRows ? "0" : "-1");
674
675
  oDomRef.querySelector(".sapUiTableCtrlAfter").setAttribute("tabindex", bHasRows ? "0" : "-1");
675
676
 
@@ -679,8 +680,8 @@ sap.ui.define([
679
680
  // Therefore, the width is set of the content table is set back to be the same as the header table.
680
681
  // BCP: 2380079867
681
682
  if (Device.browser.safari) {
682
- var oHdrCol = document.getElementById(oTable.getId() + "-header");
683
- var oHdrCnt = document.getElementById(oTable.getId() + "-table");
683
+ const oHdrCol = document.getElementById(oTable.getId() + "-header");
684
+ const oHdrCnt = document.getElementById(oTable.getId() + "-table");
684
685
 
685
686
  oHdrCnt.style.width = oHdrCol.style.width;
686
687
  }
@@ -695,7 +696,7 @@ sap.ui.define([
695
696
  * @private
696
697
  */
697
698
  RowMode.prototype.getRowContexts = function(iRequestLength) {
698
- var oTable = this.getTable();
699
+ const oTable = this.getTable();
699
700
  return oTable ? oTable._getRowContexts(iRequestLength) : [];
700
701
  };
701
702
 
@@ -708,7 +709,7 @@ sap.ui.define([
708
709
  * @private
709
710
  */
710
711
  RowMode.prototype.fireRowsUpdated = function(sReason) {
711
- var oTable = this.getTable();
712
+ const oTable = this.getTable();
712
713
 
713
714
  if (!oTable || !oTable._bContextsAvailable) {
714
715
  return;
@@ -745,7 +746,7 @@ sap.ui.define([
745
746
 
746
747
  _private(this).bNoDataDisabled = true;
747
748
 
748
- var oTable = this.getTable();
749
+ const oTable = this.getTable();
749
750
  if (oTable) {
750
751
  oTable.invalidate();
751
752
  }
@@ -764,7 +765,7 @@ sap.ui.define([
764
765
 
765
766
  _private(this).bNoDataDisabled = false;
766
767
 
767
- var oTable = this.getTable();
768
+ const oTable = this.getTable();
768
769
  if (oTable) {
769
770
  oTable.invalidate();
770
771
  }
@@ -787,12 +788,12 @@ sap.ui.define([
787
788
  * @param {int} iNewNumberOfRows The number of rows that need to be in the aggregation.
788
789
  */
789
790
  function updateRowsAggregation(oMode, iNewNumberOfRows) {
790
- var oTable = oMode.getTable();
791
- var aRows = oTable.getRows();
791
+ const oTable = oMode.getTable();
792
+ let aRows = oTable.getRows();
792
793
 
793
794
  if (aRows.length < iNewNumberOfRows) {
794
795
  // Create missing rows.
795
- var aNewRows = createRows(oTable, iNewNumberOfRows - aRows.length);
796
+ const aNewRows = createRows(oTable, iNewNumberOfRows - aRows.length);
796
797
 
797
798
  aRows = aRows.concat(aNewRows);
798
799
 
@@ -804,7 +805,7 @@ sap.ui.define([
804
805
  });
805
806
  } else {
806
807
  // Remove rows that are not required.
807
- for (var i = aRows.length - 1; i >= iNewNumberOfRows; i--) {
808
+ for (let i = aRows.length - 1; i >= iNewNumberOfRows; i--) {
808
809
  oTable.removeAggregation("rows", i, true);
809
810
  }
810
811
 
@@ -821,10 +822,10 @@ sap.ui.define([
821
822
  * @returns {sap.ui.table.Row[]} The created rows.
822
823
  */
823
824
  function createRows(oTable, iRowCount) {
824
- var aRows = [];
825
- var iStartIndex = oTable.getRows().length;
825
+ const aRows = [];
826
+ const iStartIndex = oTable.getRows().length;
826
827
 
827
- for (var i = 0; i < iRowCount; i++) {
828
+ for (let i = 0; i < iRowCount; i++) {
828
829
  aRows.push(oTable._getRowClone(iStartIndex + i));
829
830
  }
830
831
 
@@ -839,15 +840,15 @@ sap.ui.define([
839
840
  * @param {Array<sap.ui.table.Row>} [aRows] The rows for which the contexts are to be updated.
840
841
  */
841
842
  function updateBindingContextsOfRows(oMode, aRows) {
842
- var oTable = oMode.getTable();
843
+ const oTable = oMode.getTable();
843
844
 
844
845
  if (!oTable || aRows.length === 0) {
845
846
  return;
846
847
  }
847
848
 
848
- var aContexts = oMode.getRowContexts(aRows.length);
849
+ const aContexts = oMode.getRowContexts(aRows.length);
849
850
 
850
- for (var i = 0; i < aRows.length; i++) {
851
+ for (let i = 0; i < aRows.length; i++) {
851
852
  aRows[i].setRowBindingContext(aContexts[i], oTable);
852
853
  }
853
854
  }
@@ -860,7 +861,7 @@ sap.ui.define([
860
861
  * @this sap.ui.table.rowmodes.RowMode
861
862
  */
862
863
  TableDelegate.onBeforeRendering = function(oEvent) {
863
- var bRenderedRows = oEvent && oEvent.isMarked("renderRows");
864
+ const bRenderedRows = oEvent && oEvent.isMarked("renderRows");
864
865
 
865
866
  if (!bRenderedRows) {
866
867
  this._bFiredRowsUpdatedAfterRendering = false;
@@ -14,7 +14,7 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
14
14
  * @since 1.119
15
15
  * @public
16
16
  */
17
- var Type = {
17
+ const Type = {
18
18
  /**
19
19
  * Equivalent to the default configuration of {@link module:sap/ui/table/rowmodes/Fixed}
20
20
  *
@@ -23,14 +23,14 @@ sap.ui.define([
23
23
  * @extends sap.ui.table.rowmodes.RowMode
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.123.1
26
+ * @version 1.124.1
27
27
  *
28
28
  * @constructor
29
29
  * @private
30
30
  * @experimental
31
31
  * @alias sap.ui.table.rowmodes.Variable
32
32
  */
33
- var VariableRowMode = RowMode.extend("sap.ui.table.rowmodes.Variable", {
33
+ const VariableRowMode = RowMode.extend("sap.ui.table.rowmodes.Variable", {
34
34
  metadata: {
35
35
  library: "sap.ui.table",
36
36
  properties: {
@@ -43,8 +43,8 @@ sap.ui.define([
43
43
  * @inheritDoc
44
44
  */
45
45
  VariableRowMode.prototype.getComputedRowCounts = function() {
46
- var iTotalRowCount = this.getTotalRowCountOfTable();
47
- var iRowCount = this.getHideEmptyRows() ? Math.min(this.getRowCount(), iTotalRowCount) : this.getRowCount();
46
+ const iTotalRowCount = this.getTotalRowCountOfTable();
47
+ const iRowCount = this.getHideEmptyRows() ? Math.min(this.getRowCount(), iTotalRowCount) : this.getRowCount();
48
48
 
49
49
  return {
50
50
  count: iRowCount,
@@ -6,18 +6,17 @@
6
6
  sap.ui.define([
7
7
  "./TableHelper.support",
8
8
  "sap/ui/support/library",
9
- "sap/ui/core/library"
10
- ], function(SupportHelper, SupportLibrary, CoreLibrary) {
9
+ "sap/ui/core/message/MessageType"
10
+ ], function(SupportHelper, SupportLibrary, MessageType) {
11
11
  "use strict";
12
12
 
13
- var Categories = SupportLibrary.Categories;
14
- var Severity = SupportLibrary.Severity;
15
- var MessageType = CoreLibrary.MessageType;
13
+ const Categories = SupportLibrary.Categories;
14
+ const Severity = SupportLibrary.Severity;
16
15
 
17
16
  /*
18
17
  * Validates whether aria-labelledby is correctly set
19
18
  */
20
- var oAccessibleLabel = SupportHelper.normalizeRule({
19
+ const oAccessibleLabel = SupportHelper.normalizeRule({
21
20
  id: "AccessibleLabel",
22
21
  minversion: "1.38",
23
22
  categories: [Categories.Accessibility],
@@ -26,9 +25,9 @@ sap.ui.define([
26
25
  resolution: "Use the 'ariaLabelledBy' association of the 'sap.ui.table.Table' control "
27
26
  + "to define a proper accessible labeling.",
28
27
  check: function(oIssueManager, oCoreFacade, oScope) {
29
- var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
30
- for (var i = 0; i < aTables.length; i++) {
31
- if (!aTables[i].getTitle() && aTables[i].getAriaLabelledBy().length == 0) {
28
+ const aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
29
+ for (let i = 0; i < aTables.length; i++) {
30
+ if (!aTables[i].getTitle() && aTables[i].getAriaLabelledBy().length === 0) {
32
31
  SupportHelper.reportIssue(oIssueManager, "The table does not have an accessible label.",
33
32
  Severity.High, aTables[i].getId());
34
33
  }
@@ -39,7 +38,7 @@ sap.ui.define([
39
38
  /*
40
39
  * Validates sap.ui.core.Icon column templates.
41
40
  */
42
- var oAccessibleRowHighlight = SupportHelper.normalizeRule({
41
+ const oAccessibleRowHighlight = SupportHelper.normalizeRule({
43
42
  id: "AccessibleRowHighlight",
44
43
  minversion: "1.62",
45
44
  categories: [Categories.Accessibility],
@@ -53,13 +52,13 @@ sap.ui.define([
53
52
  "#/api/sap.ui.table.RowSettings/methods/getHighlightText")
54
53
  ],
55
54
  check: function(oIssueManager, oCoreFacade, oScope) {
56
- var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
55
+ const aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
57
56
 
58
57
  function checkRowHighlight(oRow) {
59
- var oRowSettings = oRow.getAggregation("_settings");
60
- var sHighlight = oRowSettings ? oRowSettings.getHighlight() : null;
61
- var sHighlightText = oRowSettings ? oRowSettings.getHighlightText() : null;
62
- var sRowId = oRow.getId();
58
+ const oRowSettings = oRow.getAggregation("_settings");
59
+ const sHighlight = oRowSettings ? oRowSettings.getHighlight() : null;
60
+ const sHighlightText = oRowSettings ? oRowSettings.getHighlightText() : null;
61
+ const sRowId = oRow.getId();
63
62
 
64
63
  if (oRowSettings && !(sHighlight in MessageType) && sHighlightText === "") {
65
64
  SupportHelper.reportIssue(oIssueManager,
@@ -67,7 +66,7 @@ sap.ui.define([
67
66
  }
68
67
  }
69
68
 
70
- for (var i = 0; i < aTables.length; i++) {
69
+ for (let i = 0; i < aTables.length; i++) {
71
70
  aTables[i].getRows().forEach(checkRowHighlight);
72
71
  }
73
72
  }
@@ -10,13 +10,13 @@ sap.ui.define([
10
10
  ], function(SupportHelper, SupportLibrary, Log) {
11
11
  "use strict";
12
12
 
13
- var Categories = SupportLibrary.Categories;
14
- var Severity = SupportLibrary.Severity;
13
+ const Categories = SupportLibrary.Categories;
14
+ const Severity = SupportLibrary.Severity;
15
15
 
16
16
  /*
17
17
  * Checks for No Deviating units issue in AnalyticalBinding
18
18
  */
19
- var oAnalyticsNoDeviatingUnits = SupportHelper.normalizeRule({
19
+ const oAnalyticsNoDeviatingUnits = SupportHelper.normalizeRule({
20
20
  id: "AnalyticsNoDeviatingUnits",
21
21
  minversion: "1.38",
22
22
  categories: [Categories.Bindings],
@@ -25,24 +25,24 @@ sap.ui.define([
25
25
  + "expects to receive just one record",
26
26
  resolution: "Adjust the service implementation.",
27
27
  check: function(oIssueManager, oCoreFacade, oScope) {
28
- var aTables = SupportHelper.find(oScope, true, "sap.ui.table.AnalyticalTable");
29
- var sAnalyticalErrorId = "NO_DEVIATING_UNITS";
30
- var oIssues = {};
28
+ const aTables = SupportHelper.find(oScope, true, "sap.ui.table.AnalyticalTable");
29
+ const sAnalyticalErrorId = "NO_DEVIATING_UNITS";
30
+ const oIssues = {};
31
31
 
32
32
  SupportHelper.checkLogEntries(function(oLogEntry) {
33
33
  // Filter out totally irrelevant issues
34
- if (oLogEntry.level != Log.Level.ERROR && oLogEntry.level != Log.Level.FATAL) {
34
+ if (oLogEntry.level !== Log.Level.ERROR && oLogEntry.level !== Log.Level.FATAL) {
35
35
  return false;
36
36
  }
37
- var oInfo = oLogEntry.supportInfo;
37
+ const oInfo = oLogEntry.supportInfo;
38
38
  return oInfo && oInfo.type === "sap.ui.model.analytics.AnalyticalBinding" && oInfo.analyticalError === sAnalyticalErrorId;
39
39
 
40
40
  }, function(oLogEntry) {
41
41
  // Check the remaining Issues
42
- var sBindingId = oLogEntry.supportInfo.analyticalBindingId;
42
+ const sBindingId = oLogEntry.supportInfo.analyticalBindingId;
43
43
  if (sBindingId && !oIssues[sAnalyticalErrorId + "-" + sBindingId]) {
44
- var oBinding;
45
- for (var i = 0; i < aTables.length; i++) {
44
+ let oBinding;
45
+ for (let i = 0; i < aTables.length; i++) {
46
46
  oBinding = aTables[i].getBinding();
47
47
  if (oBinding && oBinding.__supportUID === sBindingId) {
48
48
  oIssues[sAnalyticalErrorId + "-" + sBindingId] = true; // Ensure is only reported once
@@ -9,8 +9,8 @@ sap.ui.define([
9
9
  ], function(SupportHelper, SupportLibrary) {
10
10
  "use strict";
11
11
 
12
- var Categories = SupportLibrary.Categories;
13
- var Severity = SupportLibrary.Severity;
12
+ const Categories = SupportLibrary.Categories;
13
+ const Severity = SupportLibrary.Severity;
14
14
 
15
15
  /**
16
16
  * Loops over all columns of all visible tables and calls the given callback with the following parameters:
@@ -23,13 +23,13 @@ sap.ui.define([
23
23
  * @param {string} [sType] If given an additional type check is performed.
24
24
  */
25
25
  function checkColumnTemplate(fnDoCheck, oScope, sType) {
26
- var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
27
- var aColumns, oTemplate;
26
+ const aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
27
+ let aColumns; let oTemplate;
28
28
 
29
- for (var i = 0; i < aTables.length; i++) {
29
+ for (let i = 0; i < aTables.length; i++) {
30
30
  aColumns = aTables[i].getColumns();
31
31
 
32
- for (var k = 0; k < aColumns.length; k++) {
32
+ for (let k = 0; k < aColumns.length; k++) {
33
33
  oTemplate = aColumns[k].getTemplate();
34
34
 
35
35
  if (oTemplate && oTemplate.isA(sType)) {
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  /*
43
43
  * Validates sap.m.Text column templates.
44
44
  */
45
- var oTextWrapping = SupportHelper.normalizeRule({
45
+ const oTextWrapping = SupportHelper.normalizeRule({
46
46
  id: "ColumnTemplateTextWrapping",
47
47
  minversion: "1.38",
48
48
  categories: [Categories.Usage],
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  + "control is used as a column template.",
54
54
  check: function(oIssueManager, oCoreFacade, oScope) {
55
55
  checkColumnTemplate(function(oTable, oColumn, oMTextTemplate) {
56
- var sColumnId = oColumn.getId();
56
+ const sColumnId = oColumn.getId();
57
57
 
58
58
  if (oMTextTemplate.isBound("wrapping") || (!oMTextTemplate.isBound("wrapping") && oMTextTemplate.getWrapping())) {
59
59
  SupportHelper.reportIssue(oIssueManager, "Column '" + sColumnId + "' of table '" + oTable.getId() + "' uses an "
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  }
69
69
  });
70
70
 
71
- var oLinkWrapping = SupportHelper.normalizeRule({
71
+ const oLinkWrapping = SupportHelper.normalizeRule({
72
72
  id: "ColumnTemplateLinkWrapping",
73
73
  minversion: "1.38",
74
74
  categories: [Categories.Usage],
@@ -78,7 +78,7 @@ sap.ui.define([
78
78
  check: function(oIssueManager, oCoreFacade, oScope) {
79
79
  checkColumnTemplate(function(oTable, oColumn, oMLinkTemplate) {
80
80
  if (oMLinkTemplate.isBound("wrapping") || (!oMLinkTemplate.isBound("wrapping") && oMLinkTemplate.getWrapping())) {
81
- var sColumnId = oColumn.getId();
81
+ const sColumnId = oColumn.getId();
82
82
  SupportHelper.reportIssue(oIssueManager, "Column '" + sColumnId + "' of table '" + oTable.getId() + "' uses an "
83
83
  + "'sap.m.Link' control with wrapping enabled.", Severity.High, sColumnId);
84
84
  }
@@ -10,13 +10,13 @@ sap.ui.define([
10
10
  ], function(SupportHelper, SupportLibrary, PluginBase) {
11
11
  "use strict";
12
12
 
13
- var Categories = SupportLibrary.Categories;
14
- var Severity = SupportLibrary.Severity;
13
+ const Categories = SupportLibrary.Categories;
14
+ const Severity = SupportLibrary.Severity;
15
15
 
16
16
  /**
17
17
  * Checks the number and type of plugins which are applied to the table.
18
18
  */
19
- var oSelectionPlugins = SupportHelper.normalizeRule({
19
+ const oSelectionPlugins = SupportHelper.normalizeRule({
20
20
  id: "Plugins",
21
21
  minversion: "1.64",
22
22
  categories: [Categories.Usage],
@@ -24,11 +24,11 @@ sap.ui.define([
24
24
  description: "Only one selection plugin should be applied to avoid potential conflicts.",
25
25
  resolution: "Only apply a single selection plugin.",
26
26
  check: function(oIssueManager, oCoreFacade, oScope) {
27
- var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
27
+ const aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
28
28
 
29
- for (var i = 0; i < aTables.length; i++) {
30
- var oTable = aTables[i];
31
- var aSelectionPlugins = oTable.getDependents().filter((oPlugin) => oPlugin.isA("sap.ui.table.plugins.SelectionPlugin"));
29
+ for (let i = 0; i < aTables.length; i++) {
30
+ const oTable = aTables[i];
31
+ const aSelectionPlugins = oTable.getDependents().filter((oPlugin) => oPlugin.isA("sap.ui.table.plugins.SelectionPlugin"));
32
32
 
33
33
  /**
34
34
  * @deprecated As of version 1.120