@openui5/sap.ui.table 1.136.2 → 1.138.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 (100) hide show
  1. package/REUSE.toml +0 -28
  2. package/THIRDPARTY.txt +0 -24
  3. package/package.json +3 -3
  4. package/src/sap/ui/table/.library +1 -1
  5. package/src/sap/ui/table/AnalyticalColumn.js +2 -2
  6. package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
  7. package/src/sap/ui/table/AnalyticalTable.js +23 -11
  8. package/src/sap/ui/table/Column.js +44 -2
  9. package/src/sap/ui/table/ColumnMenu.js +1 -1
  10. package/src/sap/ui/table/CreationRow.js +1 -1
  11. package/src/sap/ui/table/Row.js +10 -7
  12. package/src/sap/ui/table/RowAction.js +1 -1
  13. package/src/sap/ui/table/RowActionItem.js +1 -1
  14. package/src/sap/ui/table/RowSettings.js +1 -1
  15. package/src/sap/ui/table/Table.js +3 -3
  16. package/src/sap/ui/table/TablePersoController.js +1 -1
  17. package/src/sap/ui/table/TableRenderer.js +1 -1
  18. package/src/sap/ui/table/TreeTable.js +23 -39
  19. package/src/sap/ui/table/extensions/Accessibility.js +22 -17
  20. package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -1
  21. package/src/sap/ui/table/extensions/DragAndDrop.js +3 -3
  22. package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
  23. package/src/sap/ui/table/extensions/Keyboard.js +12 -2
  24. package/src/sap/ui/table/extensions/KeyboardDelegate.js +109 -80
  25. package/src/sap/ui/table/extensions/Pointer.js +1 -1
  26. package/src/sap/ui/table/extensions/Scrolling.js +9 -2
  27. package/src/sap/ui/table/extensions/ScrollingIOS.js +2 -2
  28. package/src/sap/ui/table/extensions/Synchronization.js +1 -1
  29. package/src/sap/ui/table/i18n/interaction_ar.xml +14 -17
  30. package/src/sap/ui/table/i18n/interaction_bg.xml +2 -5
  31. package/src/sap/ui/table/i18n/interaction_ca.xml +2 -5
  32. package/src/sap/ui/table/i18n/interaction_cnr.xml +2 -5
  33. package/src/sap/ui/table/i18n/interaction_cs.xml +4 -7
  34. package/src/sap/ui/table/i18n/interaction_cy.xml +2 -5
  35. package/src/sap/ui/table/i18n/interaction_da.xml +2 -5
  36. package/src/sap/ui/table/i18n/interaction_de.xml +2 -5
  37. package/src/sap/ui/table/i18n/interaction_el.xml +2 -5
  38. package/src/sap/ui/table/i18n/interaction_en.xml +2 -5
  39. package/src/sap/ui/table/i18n/interaction_en_GB.xml +2 -5
  40. package/src/sap/ui/table/i18n/interaction_es.xml +2 -5
  41. package/src/sap/ui/table/i18n/interaction_es_MX.xml +2 -5
  42. package/src/sap/ui/table/i18n/interaction_et.xml +2 -5
  43. package/src/sap/ui/table/i18n/interaction_fi.xml +2 -5
  44. package/src/sap/ui/table/i18n/interaction_fr.xml +2 -5
  45. package/src/sap/ui/table/i18n/interaction_fr_CA.xml +2 -5
  46. package/src/sap/ui/table/i18n/interaction_hi.xml +2 -5
  47. package/src/sap/ui/table/i18n/interaction_hr.xml +8 -11
  48. package/src/sap/ui/table/i18n/interaction_hu.xml +2 -5
  49. package/src/sap/ui/table/i18n/interaction_id.xml +3 -6
  50. package/src/sap/ui/table/i18n/interaction_it.xml +3 -6
  51. package/src/sap/ui/table/i18n/interaction_iw.xml +9 -12
  52. package/src/sap/ui/table/i18n/interaction_ja.xml +3 -6
  53. package/src/sap/ui/table/i18n/interaction_kk.xml +4 -7
  54. package/src/sap/ui/table/i18n/interaction_ko.xml +2 -5
  55. package/src/sap/ui/table/i18n/interaction_lt.xml +2 -5
  56. package/src/sap/ui/table/i18n/interaction_lv.xml +2 -5
  57. package/src/sap/ui/table/i18n/interaction_mk.xml +4 -7
  58. package/src/sap/ui/table/i18n/interaction_ms.xml +2 -5
  59. package/src/sap/ui/table/i18n/interaction_nl.xml +4 -7
  60. package/src/sap/ui/table/i18n/interaction_no.xml +2 -5
  61. package/src/sap/ui/table/i18n/interaction_pl.xml +2 -5
  62. package/src/sap/ui/table/i18n/interaction_pt.xml +2 -5
  63. package/src/sap/ui/table/i18n/interaction_pt_PT.xml +2 -5
  64. package/src/sap/ui/table/i18n/interaction_ro.xml +2 -5
  65. package/src/sap/ui/table/i18n/interaction_ru.xml +2 -5
  66. package/src/sap/ui/table/i18n/interaction_sh.xml +2 -5
  67. package/src/sap/ui/table/i18n/interaction_sk.xml +2 -5
  68. package/src/sap/ui/table/i18n/interaction_sl.xml +3 -6
  69. package/src/sap/ui/table/i18n/interaction_sr.xml +2 -5
  70. package/src/sap/ui/table/i18n/interaction_sv.xml +2 -5
  71. package/src/sap/ui/table/i18n/interaction_th.xml +6 -9
  72. package/src/sap/ui/table/i18n/interaction_tr.xml +2 -5
  73. package/src/sap/ui/table/i18n/interaction_uk.xml +2 -5
  74. package/src/sap/ui/table/i18n/interaction_vi.xml +2 -5
  75. package/src/sap/ui/table/i18n/interaction_zh_CN.xml +2 -5
  76. package/src/sap/ui/table/i18n/interaction_zh_TW.xml +6 -9
  77. package/src/sap/ui/table/library.js +10 -10
  78. package/src/sap/ui/table/menus/AnalyticalTableContextMenu.js +1 -1
  79. package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
  80. package/src/sap/ui/table/menus/ContextMenu.js +2 -2
  81. package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +37 -1
  82. package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
  83. package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +1 -1
  84. package/src/sap/ui/table/plugins/ODataV4Selection.js +4 -4
  85. package/src/sap/ui/table/plugins/PluginBase.js +1 -1
  86. package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
  87. package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -1
  88. package/src/sap/ui/table/plugins/V4Aggregation.js +52 -31
  89. package/src/sap/ui/table/rowmodes/Auto.js +2 -2
  90. package/src/sap/ui/table/rowmodes/Fixed.js +2 -2
  91. package/src/sap/ui/table/rowmodes/Interactive.js +8 -8
  92. package/src/sap/ui/table/rowmodes/RowMode.js +2 -2
  93. package/src/sap/ui/table/rowmodes/Variable.js +1 -1
  94. package/src/sap/ui/table/themes/base/DragDrop.less +1 -1
  95. package/src/sap/ui/table/utils/TableUtils.js +21 -90
  96. package/src/sap/ui/table/utils/_ColumnUtils.js +33 -120
  97. package/src/sap/ui/table/utils/_GroupingUtils.js +20 -63
  98. package/src/sap/ui/table/utils/_HookUtils.js +3 -103
  99. package/src/sap/ui/table/utils/_MenuUtils.js +3 -3
  100. package/src/sap/ui/table/utils/_BindingUtils.js +0 -66
@@ -95,7 +95,7 @@ sap.ui.define([
95
95
  } else {
96
96
  // To be able to identify whether a row is dropped on itself we need to compare the contexts. The row index is not reliable. The
97
97
  // indexing of the table can change, for example by expanding a node.
98
- oSessionData.draggedRowContext = oDraggedControl.getRowBindingContext();
98
+ oSessionData.draggedRowContext = TableUtils.getBindingContextOfRow(oDraggedControl);
99
99
  }
100
100
  }
101
101
 
@@ -126,7 +126,7 @@ sap.ui.define([
126
126
  * - Sum rows
127
127
  */
128
128
  const oDraggedRowContext = oSessionData.draggedRowContext;
129
- const oDropRowContext = oDropControl.getRowBindingContext();
129
+ const oDropRowContext = TableUtils.getBindingContextOfRow(oDropControl);
130
130
  const sDropPosition = oDragSession.getDropInfo().getDropPosition();
131
131
 
132
132
  if ((oDropControl.isEmpty() && sDropPosition === DropPosition.On && TableUtils.hasData(this)) // On empty row, table has data
@@ -274,7 +274,7 @@ sap.ui.define([
274
274
  *
275
275
  * @extends sap.ui.table.extensions.ExtensionBase
276
276
  * @author SAP SE
277
- * @version 1.136.2
277
+ * @version 1.138.0
278
278
  * @constructor
279
279
  * @private
280
280
  * @alias sap.ui.table.extensions.DragAndDrop
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @abstract
20
20
  * @extends sap.ui.base.Object
21
21
  * @author SAP SE
22
- * @version 1.136.2
22
+ * @version 1.138.0
23
23
  * @constructor
24
24
  * @private
25
25
  * @alias sap.ui.table.extensions.ExtensionBase
@@ -265,7 +265,7 @@ sap.ui.define([
265
265
  * @class Extension for sap.ui.table.Table which handles keyboard related things.
266
266
  * @extends sap.ui.table.extensions.ExtensionBase
267
267
  * @author SAP SE
268
- * @version 1.136.2
268
+ * @version 1.138.0
269
269
  * @constructor
270
270
  * @private
271
271
  * @alias sap.ui.table.extensions.Keyboard
@@ -462,7 +462,7 @@ sap.ui.define([
462
462
 
463
463
  function setFocusFallback(oTable, oKeyboardExtension) {
464
464
  if (oTable.getColumnHeaderVisible()) {
465
- TableUtils.focusItem(oTable, ExtensionHelper.getInitialItemNavigationIndex(oKeyboardExtension));
465
+ oKeyboardExtension.focusItem(ExtensionHelper.getInitialItemNavigationIndex(oKeyboardExtension));
466
466
  oKeyboardExtension._oLastFocus = null;
467
467
  } else if (TableUtils.isNoDataVisible(oTable)) {
468
468
  oTable.getDomRef("noDataCnt").focus();
@@ -567,6 +567,16 @@ sap.ui.define([
567
567
  }
568
568
  };
569
569
 
570
+ /**
571
+ * Focus the item with the given index in the item navigation.
572
+ *
573
+ * @param {int} iIndex Index of item in ItemNavigation which shall get the focus.
574
+ * @param {Object} oEvent The event object.
575
+ */
576
+ KeyboardExtension.prototype.focusItem = function(iIndex, oEvent) {
577
+ this.getTable()._getItemNavigation()?.focusItem(iIndex, oEvent);
578
+ };
579
+
570
580
  return KeyboardExtension;
571
581
  });
572
582
 
@@ -64,7 +64,7 @@ sap.ui.define([
64
64
  *
65
65
  * @extends sap.ui.base.Object
66
66
  * @author SAP SE
67
- * @version 1.136.2
67
+ * @version 1.138.0
68
68
  * @constructor
69
69
  * @private
70
70
  * @alias sap.ui.table.extensions.KeyboardDelegate
@@ -124,7 +124,7 @@ sap.ui.define([
124
124
  // For the SelectAll cell, multiple elements are added to the item navigation.
125
125
  preventItemNavigation(oEvent);
126
126
  // Focus the first row header.
127
- TableUtils.focusItem(oTable, iHeaderRowCount * (TableUtils.getVisibleColumnCount(oTable) + 1/*Row Headers*/), oEvent);
127
+ oTable._getKeyboardExtension().focusItem(iHeaderRowCount * (TableUtils.getVisibleColumnCount(oTable) + 1/*Row Headers*/), oEvent);
128
128
  }
129
129
  }
130
130
 
@@ -144,7 +144,7 @@ sap.ui.define([
144
144
 
145
145
  preventItemNavigation(oEvent);
146
146
 
147
- if (TableUtils.isLastScrollableRow(oTable, oCellInfo.cell)) {
147
+ if (isLastScrollableRow(oTable, oCellInfo.cell)) {
148
148
  const bScrolled = scrollDown(oTable, oEvent);
149
149
 
150
150
  if (bScrolled) {
@@ -156,7 +156,7 @@ sap.ui.define([
156
156
  if (oCellInfo.rowIndex === oTable.getRows().length - 1
157
157
  || (TableUtils.isVariableRowHeightEnabled(oTable) // ignore empty buffer row
158
158
  && oCellInfo.rowIndex === oTable.getRows().length - 2
159
- && oTable.getRows()[oCellInfo.rowIndex + 1].getRowBindingContext() === null)) {
159
+ && TableUtils.getBindingContextOfRow(oTable.getRows()[oCellInfo.rowIndex + 1]) === null)) {
160
160
  // Leave the action mode when trying to navigate down on the last row.
161
161
  if (!bActionMode && $ParentCell) {
162
162
  $ParentCell.trigger("focus"); // A non-interactive element inside a cell is focused, focus the cell this element is inside.
@@ -205,7 +205,7 @@ sap.ui.define([
205
205
 
206
206
  preventItemNavigation(oEvent);
207
207
 
208
- if (TableUtils.isFirstScrollableRow(oTable, oCellInfo.cell)) {
208
+ if (isFirstScrollableRow(oTable, oCellInfo.cell)) {
209
209
  const bScrolled = scrollUp(oTable, oEvent);
210
210
 
211
211
  if (bScrolled) {
@@ -309,8 +309,10 @@ sap.ui.define([
309
309
  */
310
310
  function restoreFocusOnLastFocusedDataCell(oTable, oEvent) {
311
311
  const oCellInfo = TableUtils.getFocusedItemInfo(oTable);
312
- const oLastInfo = oTable._getKeyboardExtension().getLastFocusedCellInfo();
313
- TableUtils.focusItem(oTable, oCellInfo.cellInRow + (oCellInfo.columnCount * oLastInfo.row), oEvent);
312
+ const oKeyboardExtension = oTable._getKeyboardExtension();
313
+ const oLastInfo = oKeyboardExtension.getLastFocusedCellInfo();
314
+
315
+ oKeyboardExtension.focusItem(oCellInfo.cellInRow + (oCellInfo.columnCount * oLastInfo.row), oEvent);
314
316
  }
315
317
 
316
318
  /**
@@ -321,7 +323,7 @@ sap.ui.define([
321
323
  */
322
324
  function setFocusOnColumnHeaderOfLastFocusedDataCell(oTable, oEvent) {
323
325
  const oCellInfo = TableUtils.getFocusedItemInfo(oTable);
324
- TableUtils.focusItem(oTable, oCellInfo.cellInRow, oEvent);
326
+ oTable._getKeyboardExtension().focusItem(oCellInfo.cellInRow, oEvent);
325
327
  }
326
328
 
327
329
  /**
@@ -720,6 +722,37 @@ sap.ui.define([
720
722
  };
721
723
  }
722
724
 
725
+ /**
726
+ * Checks whether the cell of the given DOM reference is in the first row (from DOM point of view) of the scrollable area.
727
+ *
728
+ * @param {sap.ui.table.Table} oTable Instance of the table.
729
+ * @param {jQuery | HTMLElement | int} row Cell DOM reference or row index.
730
+ * @returns {boolean} Whether the row is the first scrollable row of the table based on the data.
731
+ */
732
+ function isFirstScrollableRow(oTable, row) {
733
+ if (isNaN(row)) {
734
+ const $Ref = jQuery(row);
735
+ row = parseInt($Ref.add($Ref.parent()).filter("[data-sap-ui-rowindex]").attr("data-sap-ui-rowindex"));
736
+ }
737
+ return row === oTable._getRowCounts().fixedTop;
738
+ }
739
+
740
+ /**
741
+ * Checks whether the cell of the given DOM reference is in the last row (from DOM point of view) of the scrollable area.
742
+ *
743
+ * @param {sap.ui.table.Table} oTable Instance of the table.
744
+ * @param {jQuery | HTMLElement | int} row The row element or row index.
745
+ * @returns {boolean} Whether the row is the last scrollable row of the table based on the data.
746
+ */
747
+ function isLastScrollableRow(oTable, row) {
748
+ if (isNaN(row)) {
749
+ const $Ref = jQuery(row);
750
+ row = parseInt($Ref.add($Ref.parent()).filter("[data-sap-ui-rowindex]").attr("data-sap-ui-rowindex"));
751
+ }
752
+ const mRowCounts = oTable._getRowCounts();
753
+ return row === mRowCounts.count - mRowCounts.fixedBottom - 1;
754
+ }
755
+
723
756
  /**
724
757
  * Hook which is called by the keyboard extension when the table should enter the action mode.
725
758
  *
@@ -782,19 +815,7 @@ sap.ui.define([
782
815
  }
783
816
  };
784
817
 
785
- KeyboardDelegate.prototype.onfocusout = function(oEvent) {
786
- if (this.getRows().length || this.getColumnHeaderVisible()) {
787
- this.$().find(".sapUiTableCtrlBefore").attr("tabindex", "0");
788
- this.$().find(".sapUiTableCtrlAfter").attr("tabindex", "0");
789
- }
790
- };
791
-
792
818
  KeyboardDelegate.prototype.onfocusin = function(oEvent) {
793
- if (this.getDomRef("sapUiTableCnt").contains(oEvent.target)) {
794
- this.$().find(".sapUiTableCtrlBefore").attr("tabindex", "-1");
795
- this.$().find(".sapUiTableCtrlAfter").attr("tabindex", "-1");
796
- }
797
-
798
819
  if (oEvent.isMarked("sapUiTableIgnoreFocusIn")) {
799
820
  return;
800
821
  }
@@ -1027,7 +1048,7 @@ sap.ui.define([
1027
1048
  if (oKeyboardExtension.isInActionMode()) {
1028
1049
  onTabNextInActionMode.call(this, oEvent);
1029
1050
  } else if (oCellInfo.isOfType(CellType.ANYCOLUMNHEADER)) {
1030
- if (this.getCreationRow() && this.getCreationRow().getVisible() && !TableUtils.hasData(this)) {
1051
+ if (this.getRows().length === 0) {
1031
1052
  forwardFocusToTabDummy(this, "sapUiTableCtrlAfter");
1032
1053
  } else if (TableUtils.isNoDataVisible(this)) {
1033
1054
  this.$("noDataCnt").trigger("focus");
@@ -1104,6 +1125,9 @@ sap.ui.define([
1104
1125
  } else if (oEvent.target === this.getDomRef("overlay")) {
1105
1126
  this._getKeyboardExtension().setSilentFocus(this.$().find(".sapUiTableOuterBefore"));
1106
1127
 
1128
+ } else if (oCellInfo.isOfType(CellType.ANYCOLUMNHEADER)) {
1129
+ forwardFocusToTabDummy(this, "sapUiTableCtrlBefore");
1130
+
1107
1131
  } else if (!oCellInfo.isOfType(CellType.ANY)) {
1108
1132
  $Cell = TableUtils.getParentCell(this, oEvent.target);
1109
1133
 
@@ -1204,7 +1228,7 @@ sap.ui.define([
1204
1228
  return;
1205
1229
  }
1206
1230
 
1207
- if (TableUtils.isLastScrollableRow(this, oEvent.target)) {
1231
+ if (isLastScrollableRow(this, oEvent.target)) {
1208
1232
  if (this._oRangeSelection.pScroll) { // A previous selection is still ongoing.
1209
1233
  preventItemNavigation(oEvent);
1210
1234
  return;
@@ -1294,7 +1318,7 @@ sap.ui.define([
1294
1318
  return;
1295
1319
  }
1296
1320
 
1297
- if (TableUtils.isFirstScrollableRow(this, oEvent.target)) {
1321
+ if (isFirstScrollableRow(this, oEvent.target)) {
1298
1322
  if (this._oRangeSelection.pScroll) { // A previous selection is still ongoing.
1299
1323
  preventItemNavigation(oEvent);
1300
1324
  return;
@@ -1493,9 +1517,11 @@ sap.ui.define([
1493
1517
  };
1494
1518
 
1495
1519
  KeyboardDelegate.prototype.onsaphome = function(oEvent) {
1520
+ const oKeyboardExtension = this._getKeyboardExtension();
1521
+
1496
1522
  handleNavigationEvent(oEvent);
1497
1523
 
1498
- if (this._getKeyboardExtension().isInActionMode()) {
1524
+ if (oKeyboardExtension.isInActionMode()) {
1499
1525
  return;
1500
1526
  }
1501
1527
 
@@ -1519,21 +1545,23 @@ sap.ui.define([
1519
1545
  // If there is a fixed column area and the focus is to the right of the first cell in the non-fixed area,
1520
1546
  // then set the focus to the first cell in the non-fixed area.
1521
1547
  preventItemNavigation(oEvent);
1522
- TableUtils.focusItem(this, iFocusedIndex - iFocusedCellInRow + iFixedColumnCount + iRowHeaderOffset, null);
1548
+ oKeyboardExtension.focusItem(iFocusedIndex - iFocusedCellInRow + iFixedColumnCount + iRowHeaderOffset, null);
1523
1549
 
1524
1550
  } else if (bHasRowHeader && iFocusedCellInRow > 1) {
1525
1551
  // If there is a row header column and the focus is after the first content column,
1526
1552
  // then set the focus to the cell in the first content column.
1527
1553
  preventItemNavigation(oEvent);
1528
- TableUtils.focusItem(this, iFocusedIndex - iFocusedCellInRow + iRowHeaderOffset, null);
1554
+ oKeyboardExtension.focusItem(iFocusedIndex - iFocusedCellInRow + iRowHeaderOffset, null);
1529
1555
  }
1530
1556
  }
1531
1557
  };
1532
1558
 
1533
1559
  KeyboardDelegate.prototype.onsapend = function(oEvent) {
1560
+ const oKeyboardExtension = this._getKeyboardExtension();
1561
+
1534
1562
  handleNavigationEvent(oEvent);
1535
1563
 
1536
- if (this._getKeyboardExtension().isInActionMode()) {
1564
+ if (oKeyboardExtension.isInActionMode()) {
1537
1565
  return;
1538
1566
  }
1539
1567
 
@@ -1569,7 +1597,7 @@ sap.ui.define([
1569
1597
  // If there is a row header and it has the focus,
1570
1598
  // then set the focus to the cell in the next column.
1571
1599
  preventItemNavigation(oEvent);
1572
- TableUtils.focusItem(this, iFocusedIndex + 1, null);
1600
+ oKeyboardExtension.focusItem(iFocusedIndex + 1, null);
1573
1601
 
1574
1602
  } else if (TableUtils.hasFixedColumns(this)
1575
1603
  && iFocusedCellInRow < iFixedColumnCount - 1 + iRowHeaderOffset
@@ -1577,23 +1605,25 @@ sap.ui.define([
1577
1605
  // If there is a fixed column area and the focus is not on its last cell or column span,
1578
1606
  // then set the focus to the last cell of the fixed column area.
1579
1607
  preventItemNavigation(oEvent);
1580
- TableUtils.focusItem(this, iFocusedIndex + iFixedColumnCount - iFocusedCellInRow, null);
1608
+ oKeyboardExtension.focusItem(iFocusedIndex + iFixedColumnCount - iFocusedCellInRow, null);
1581
1609
 
1582
1610
  } else if (TableUtils.hasRowActions(this) && iFocusedCellInRow < iColumnCount - 2) {
1583
1611
  // If the focus is on a data cell in the scrollable column area (except last cell),
1584
1612
  // then set the focus to the row actions cell.
1585
1613
  // Note: The END navigation from the last cell to the row action cell is handled by the item navigation.
1586
1614
  preventItemNavigation(oEvent);
1587
- TableUtils.focusItem(this, iFocusedIndex - iFocusedCellInRow + iColumnCount - 2, null);
1615
+ oKeyboardExtension.focusItem(iFocusedIndex - iFocusedCellInRow + iColumnCount - 2, null);
1588
1616
  }
1589
1617
 
1590
1618
  }
1591
1619
  };
1592
1620
 
1593
1621
  KeyboardDelegate.prototype.onsaphomemodifiers = function(oEvent) {
1622
+ const oKeyboardExtension = this._getKeyboardExtension();
1623
+
1594
1624
  handleNavigationEvent(oEvent);
1595
1625
 
1596
- if (this._getKeyboardExtension().isInActionMode()) {
1626
+ if (oKeyboardExtension.isInActionMode()) {
1597
1627
  return;
1598
1628
  }
1599
1629
 
@@ -1616,7 +1646,7 @@ sap.ui.define([
1616
1646
  /* Column header area */
1617
1647
  /* Top fixed area */
1618
1648
  if (iFocusedRow < iHeaderRowCount + mRowCounts.fixedTop) {
1619
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * iFocusedRow, oEvent);
1649
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * iFocusedRow, oEvent);
1620
1650
  /* Scrollable area */
1621
1651
  } else if (iFocusedRow >= iHeaderRowCount + mRowCounts.fixedTop &&
1622
1652
  iFocusedRow < iHeaderRowCount + TableUtils.getNonEmptyRowCount(this) - mRowCounts.fixedBottom) {
@@ -1624,16 +1654,16 @@ sap.ui.define([
1624
1654
  // If a fixed top area exists, then set the focus to the first row (of
1625
1655
  // the top fixed area), otherwise set the focus to the first row of the column header area.
1626
1656
  if (mRowCounts.fixedTop > 0) {
1627
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount), oEvent);
1657
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount), oEvent);
1628
1658
  } else {
1629
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * iFocusedRow, oEvent);
1659
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * iFocusedRow, oEvent);
1630
1660
  }
1631
1661
 
1632
1662
  /* Bottom fixed area */
1633
1663
  } else {
1634
1664
  // Set the focus to the first row of the scrollable area and scroll to top.
1635
1665
  this._getScrollExtension().scrollVerticallyMax(false);
1636
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount - mRowCounts.fixedTop), oEvent);
1666
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount - mRowCounts.fixedTop), oEvent);
1637
1667
  }
1638
1668
  }
1639
1669
  }
@@ -1641,9 +1671,11 @@ sap.ui.define([
1641
1671
  };
1642
1672
 
1643
1673
  KeyboardDelegate.prototype.onsapendmodifiers = function(oEvent) {
1674
+ const oKeyboardExtension = this._getKeyboardExtension();
1675
+
1644
1676
  handleNavigationEvent(oEvent);
1645
1677
 
1646
- if (this._getKeyboardExtension().isInActionMode()) {
1678
+ if (oKeyboardExtension.isInActionMode()) {
1647
1679
  return;
1648
1680
  }
1649
1681
 
@@ -1671,17 +1703,16 @@ sap.ui.define([
1671
1703
  /* Column header area */
1672
1704
  if (TableUtils.isNoDataVisible(this)) {
1673
1705
  // Set the focus to the last row of the column header area.
1674
- TableUtils.focusItem(this, iFocusedIndex + iColumnCount * (iHeaderRowCount - iFocusedRow - 1), oEvent);
1706
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount - iFocusedRow - 1), oEvent);
1675
1707
  } else if (iFocusedRow < iHeaderRowCount) {
1676
1708
  // If a top fixed area exists, then set the focus to the last row of the top fixed area,
1677
1709
  // otherwise set the focus to the last row of the scrollable area and scroll to bottom.
1678
1710
  if (mRowCounts.fixedTop > 0) {
1679
- TableUtils.focusItem(
1680
- this, iFocusedIndex + iColumnCount * (iHeaderRowCount + mRowCounts.fixedTop - iFocusedRow - 1), oEvent);
1711
+ oKeyboardExtension.focusItem(
1712
+ iFocusedIndex + iColumnCount * (iHeaderRowCount + mRowCounts.fixedTop - iFocusedRow - 1), oEvent);
1681
1713
  } else {
1682
1714
  this._getScrollExtension().scrollVerticallyMax(true);
1683
- TableUtils.focusItem(
1684
- this,
1715
+ oKeyboardExtension.focusItem(
1685
1716
  iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - iFocusedRow - 1),
1686
1717
  oEvent
1687
1718
  );
@@ -1691,25 +1722,20 @@ sap.ui.define([
1691
1722
  } else if (iFocusedRow >= iHeaderRowCount && iFocusedRow < iHeaderRowCount + mRowCounts.fixedTop) {
1692
1723
  // Set the focus to the last row of the scrollable area and scroll to bottom.
1693
1724
  this._getScrollExtension().scrollVerticallyMax(true);
1694
- TableUtils.focusItem(
1695
- this,
1696
- iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - iFocusedRow - 1),
1697
- oEvent
1698
- );
1725
+ oKeyboardExtension.focusItem(
1726
+ iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - iFocusedRow - 1), oEvent);
1699
1727
 
1700
1728
  /* Scrollable area */
1701
1729
  } else if (iFocusedRow >= iHeaderRowCount + mRowCounts.fixedTop &&
1702
1730
  iFocusedRow < iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom) {
1703
1731
  // Set the focus to the last row of the scrollable area and scroll to bottom.
1704
1732
  this._getScrollExtension().scrollVerticallyMax(true);
1705
- TableUtils.focusItem(
1706
- this, iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1733
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1707
1734
 
1708
1735
  /* Bottom fixed area */
1709
1736
  } else {
1710
1737
  // Set the focus to the last row of the bottom fixed area.
1711
- TableUtils.focusItem(
1712
- this, iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1738
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1713
1739
  }
1714
1740
  }
1715
1741
  }
@@ -1717,9 +1743,11 @@ sap.ui.define([
1717
1743
  };
1718
1744
 
1719
1745
  KeyboardDelegate.prototype.onsappageup = function(oEvent) {
1746
+ const oKeyboardExtension = this._getKeyboardExtension();
1747
+
1720
1748
  handleNavigationEvent(oEvent);
1721
1749
 
1722
- if (this._getKeyboardExtension().isInActionMode()) {
1750
+ if (oKeyboardExtension.isInActionMode()) {
1723
1751
  return;
1724
1752
  }
1725
1753
 
@@ -1741,7 +1769,7 @@ sap.ui.define([
1741
1769
  /* Top fixed area - From second row downwards */
1742
1770
  if (iFocusedRow < iHeaderRowCount + mRowCounts.fixedTop) {
1743
1771
  // Set the focus to the first row of the top fixed area.
1744
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount), oEvent);
1772
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount), oEvent);
1745
1773
 
1746
1774
  /* Scrollable area - First row */
1747
1775
  } else if (iFocusedRow === iHeaderRowCount + mRowCounts.fixedTop) {
@@ -1755,9 +1783,9 @@ sap.ui.define([
1755
1783
  // If a fixed top area exists or we are in the row action column (has no header), then set the focus to the first row (of
1756
1784
  // the top fixed area), otherwise set the focus to the first row of the column header area.
1757
1785
  if (mRowCounts.fixedTop > 0 || oCellInfo.isOfType(CellType.ROWACTION)) {
1758
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount), oEvent);
1786
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount), oEvent);
1759
1787
  } else {
1760
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * iHeaderRowCount, oEvent);
1788
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * iHeaderRowCount, oEvent);
1761
1789
  }
1762
1790
  }
1763
1791
 
@@ -1766,15 +1794,13 @@ sap.ui.define([
1766
1794
  } else if (iFocusedRow > iHeaderRowCount + mRowCounts.fixedTop &&
1767
1795
  iFocusedRow < iHeaderRowCount + TableUtils.getNonEmptyRowCount(this)) {
1768
1796
  // Set the focus to the first row of the scrollable area.
1769
- TableUtils.focusItem(this, iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount - mRowCounts.fixedTop), oEvent);
1797
+ oKeyboardExtension.focusItem(iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount - mRowCounts.fixedTop), oEvent);
1770
1798
 
1771
1799
  /* Empty area */
1772
1800
  } else {
1773
1801
  // Set the focus to the last row of the scrollable area.
1774
- TableUtils.focusItem(
1775
- this, iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount - TableUtils.getNonEmptyRowCount(this) + 1),
1776
- oEvent
1777
- );
1802
+ oKeyboardExtension.focusItem(
1803
+ iFocusedIndex - iColumnCount * (iFocusedRow - iHeaderRowCount - TableUtils.getNonEmptyRowCount(this) + 1), oEvent);
1778
1804
  }
1779
1805
  }
1780
1806
 
@@ -1786,9 +1812,11 @@ sap.ui.define([
1786
1812
  };
1787
1813
 
1788
1814
  KeyboardDelegate.prototype.onsappagedown = function(oEvent) {
1815
+ const oKeyboardExtension = this._getKeyboardExtension();
1816
+
1789
1817
  handleNavigationEvent(oEvent);
1790
1818
 
1791
- if (this._getKeyboardExtension().isInActionMode()) {
1819
+ if (oKeyboardExtension.isInActionMode()) {
1792
1820
  return;
1793
1821
  }
1794
1822
 
@@ -1815,14 +1843,14 @@ sap.ui.define([
1815
1843
  /* Column header area - From second-last row upwards */
1816
1844
  if (iFocusedRow < iHeaderRowCount - 1 && !oCellInfo.isOfType(CellType.COLUMNROWHEADER)) {
1817
1845
  // Set the focus to the last row of the column header area.
1818
- TableUtils.focusItem(this, iFocusedIndex + iColumnCount * (iHeaderRowCount - iFocusedRow - 1), oEvent);
1846
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount - iFocusedRow - 1), oEvent);
1819
1847
 
1820
1848
  /* Column header area - Last row */
1821
1849
  } else if (iFocusedRow < iHeaderRowCount) {
1822
1850
  // If the NoData area is visible, then do nothing,
1823
1851
  // otherwise set the focus to the first row of the top fixed (if existing) or scrollable area.
1824
1852
  if (!TableUtils.isNoDataVisible(this)) {
1825
- TableUtils.focusItem(this, iFocusedIndex + iColumnCount * (iHeaderRowCount - iFocusedRow), oEvent);
1853
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount - iFocusedRow), oEvent);
1826
1854
  }
1827
1855
 
1828
1856
  /* Top fixed area */
@@ -1830,10 +1858,8 @@ sap.ui.define([
1830
1858
  } else if (iFocusedRow >= iHeaderRowCount &&
1831
1859
  iFocusedRow < iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - 1) {
1832
1860
  // Set the focus to the last row of the scrollable area.
1833
- TableUtils.focusItem(
1834
- this, iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - iFocusedRow - 1),
1835
- oEvent
1836
- );
1861
+ oKeyboardExtension.focusItem(
1862
+ iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - iFocusedRow - 1), oEvent);
1837
1863
 
1838
1864
  /* Scrollable area - Last row */
1839
1865
  } else if (iFocusedRow === iHeaderRowCount + iNonEmptyRowCount - mRowCounts.fixedBottom - 1) {
@@ -1845,23 +1871,24 @@ sap.ui.define([
1845
1871
  // If scrolling was not performed over a full page and there is a bottom fixed area,
1846
1872
  // then set the focus to the last row of the bottom fixed area.
1847
1873
  if (iRowsToBeScrolled < iPageSize && mRowCounts.fixedBottom > 0) {
1848
- TableUtils.focusItem(
1849
- this, iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1874
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1850
1875
  }
1851
1876
 
1852
1877
  /* Bottom fixed area */
1853
1878
  } else {
1854
1879
  // Set the focus to the last row of the bottom fixed area.
1855
- TableUtils.focusItem(this, iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1880
+ oKeyboardExtension.focusItem(iFocusedIndex + iColumnCount * (iHeaderRowCount + iNonEmptyRowCount - iFocusedRow - 1), oEvent);
1856
1881
  }
1857
1882
  }
1858
1883
  }
1859
1884
  };
1860
1885
 
1861
1886
  KeyboardDelegate.prototype.onsappageupmodifiers = function(oEvent) {
1887
+ const oKeyboardExtension = this._getKeyboardExtension();
1888
+
1862
1889
  handleNavigationEvent(oEvent);
1863
1890
 
1864
- if (this._getKeyboardExtension().isInActionMode()) {
1891
+ if (oKeyboardExtension.isInActionMode()) {
1865
1892
  return;
1866
1893
  }
1867
1894
 
@@ -1882,29 +1909,31 @@ sap.ui.define([
1882
1909
  if (bHasRowHeader && (TableUtils.Grouping.isInGroupHeaderRow(oEvent.target) || iFocusedCellInRow === 1)) {
1883
1910
  // If a row header exists and the focus is on a group header or the first cell,
1884
1911
  // then set the focus to the row header cell.
1885
- TableUtils.focusItem(this, iFocusedIndex - iFocusedCellInRow, null);
1912
+ oKeyboardExtension.focusItem(iFocusedIndex - iFocusedCellInRow, null);
1886
1913
 
1887
1914
  } else if (iFocusedCellInRow - iRowHeaderOffset < iPageSize) {
1888
1915
  // If scrolling can not be performed over a full page,
1889
1916
  // then scroll only the remaining cells (set the focus to the first cell).
1890
- TableUtils.focusItem(this, iFocusedIndex - iFocusedCellInRow + iRowHeaderOffset, null);
1917
+ oKeyboardExtension.focusItem(iFocusedIndex - iFocusedCellInRow + iRowHeaderOffset, null);
1891
1918
 
1892
1919
  } else {
1893
1920
  // Scroll one page.
1894
- TableUtils.focusItem(this, iFocusedIndex - iPageSize, null);
1921
+ oKeyboardExtension.focusItem(iFocusedIndex - iPageSize, null);
1895
1922
  }
1896
1923
 
1897
1924
  } else if (oCellInfo.isOfType(CellType.ROWACTION)) {
1898
1925
  // If the focus is on a row action cell, then set the focus to the last data cell in the same row.
1899
- TableUtils.focusItem(this, oFocusedItemInfo.cell - 1, null);
1926
+ oKeyboardExtension.focusItem(oFocusedItemInfo.cell - 1, null);
1900
1927
  }
1901
1928
  }
1902
1929
  };
1903
1930
 
1904
1931
  KeyboardDelegate.prototype.onsappagedownmodifiers = function(oEvent) {
1932
+ const oKeyboardExtension = this._getKeyboardExtension();
1933
+
1905
1934
  handleNavigationEvent(oEvent);
1906
1935
 
1907
- if (this._getKeyboardExtension().isInActionMode()) {
1936
+ if (oKeyboardExtension.isInActionMode()) {
1908
1937
  return;
1909
1938
  }
1910
1939
 
@@ -1930,21 +1959,21 @@ sap.ui.define([
1930
1959
  if (bHasRowHeader && iFocusedCellInRow === 0) {
1931
1960
  // If there is a row header and it has the focus,
1932
1961
  // then set the focus to the first cell.
1933
- TableUtils.focusItem(this, iFocusedIndex + 1, null);
1962
+ oKeyboardExtension.focusItem(iFocusedIndex + 1, null);
1934
1963
 
1935
1964
  } else if (iColSpan > iPageSize) {
1936
1965
  // If the focused cell is a column span bigger than a page size,
1937
1966
  // then set the focus the next column in the row.
1938
- TableUtils.focusItem(this, iFocusedIndex + iColSpan, null);
1967
+ oKeyboardExtension.focusItem(iFocusedIndex + iColSpan, null);
1939
1968
 
1940
1969
  } else if (iFocusedCellInRow + iColSpan - iRowHeaderOffset + iPageSize > iVisibleColumnCount) {
1941
1970
  // If scrolling can not be performed over a full page,
1942
1971
  // then scroll only the remaining cells (set the focus to the last cell).
1943
- TableUtils.focusItem(this, iFocusedIndex + iVisibleColumnCount - iFocusedCellInRow - 1 + iRowHeaderOffset, null);
1972
+ oKeyboardExtension.focusItem(iFocusedIndex + iVisibleColumnCount - iFocusedCellInRow - 1 + iRowHeaderOffset, null);
1944
1973
 
1945
1974
  } else if (!TableUtils.Grouping.isInGroupHeaderRow(oEvent.target)) {
1946
1975
  // Scroll one page.
1947
- TableUtils.focusItem(this, iFocusedIndex + iPageSize, null);
1976
+ oKeyboardExtension.focusItem(iFocusedIndex + iPageSize, null);
1948
1977
 
1949
1978
  }
1950
1979
 
@@ -1952,7 +1981,7 @@ sap.ui.define([
1952
1981
  && TableUtils.hasRowActions(this)
1953
1982
  && iFocusedCellInRow === oFocusedItemInfo.columnCount - 2) {
1954
1983
  // If focus is on the last cell, set the focus to the row action cell.
1955
- TableUtils.focusItem(this, oFocusedItemInfo.cell + 1, null);
1984
+ oKeyboardExtension.focusItem(oFocusedItemInfo.cell + 1, null);
1956
1985
  }
1957
1986
  }
1958
1987
  }
@@ -668,7 +668,7 @@ sap.ui.define([
668
668
  * @class Extension for sap.ui.table.Table which handles mouse and touch related things.
669
669
  * @extends sap.ui.table.extensions.ExtensionBase
670
670
  * @author SAP SE
671
- * @version 1.136.2
671
+ * @version 1.138.0
672
672
  * @constructor
673
673
  * @private
674
674
  * @alias sap.ui.table.extensions.Pointer
@@ -1764,6 +1764,13 @@ sap.ui.define([
1764
1764
  if (mRowCounts.fixedBottom > 0) {
1765
1765
  iOffsetBottom += mRowCounts.fixedBottom * oTable._getBaseRowHeight();
1766
1766
  }
1767
+ const oCreationRow = oTable.getCreationRow();
1768
+ if (oCreationRow) {
1769
+ const oCreationRowDomRef = oCreationRow.getDomRef();
1770
+ if (oCreationRowDomRef && oCreationRow.getVisible()) {
1771
+ iOffsetBottom += oCreationRowDomRef.offsetHeight;
1772
+ }
1773
+ }
1767
1774
  oVSb.style.bottom = iOffsetBottom + "px";
1768
1775
  },
1769
1776
 
@@ -2320,7 +2327,7 @@ sap.ui.define([
2320
2327
  * @class Extension for sap.ui.table.Table which handles scrolling.
2321
2328
  * @extends sap.ui.table.extensions.ExtensionBase
2322
2329
  * @author SAP SE
2323
- * @version 1.136.2
2330
+ * @version 1.138.0
2324
2331
  * @constructor
2325
2332
  * @private
2326
2333
  * @alias sap.ui.table.extensions.Scrolling
@@ -2396,7 +2403,7 @@ sap.ui.define([
2396
2403
  this._clearCache();
2397
2404
 
2398
2405
  if (oTable) {
2399
- TableUtils.removeDelegate(oTable, ExtensionDelegate);
2406
+ oTable.removeEventDelegate(ExtensionDelegate);
2400
2407
 
2401
2408
  if (_private(oTable).pVerticalScrollUpdateProcess) {
2402
2409
  _private(oTable).pVerticalScrollUpdateProcess.cancel();
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class Extension for sap.ui.table.Table which handles the scrollbar on iOS.
28
28
  * @extends sap.ui.table.extensions.ExtensionBase
29
29
  * @author SAP SE
30
- * @version 1.136.2
30
+ * @version 1.138.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @alias sap.ui.table.extensions.ScrollingIOS
@@ -51,7 +51,7 @@ sap.ui.define([
51
51
  destroy: function() {
52
52
  const oTable = this.getTable();
53
53
 
54
- TableUtils.removeDelegate(oTable, ExtensionDelegate);
54
+ oTable.removeEventDelegate(ExtensionDelegate);
55
55
  clearTimeout(this._iUpdateDefaultScrollbarPositionTimeoutId);
56
56
  ExtensionBase.prototype.destroy.apply(this, arguments);
57
57
  },
@@ -185,7 +185,7 @@ sap.ui.define([
185
185
  * @class Extension for sap.ui.table.Table that allows synchronization with a table.
186
186
  * @extends sap.ui.table.extensions.ExtensionBase
187
187
  * @author SAP SE
188
- * @version 1.136.2
188
+ * @version 1.138.0
189
189
  * @constructor
190
190
  * @private
191
191
  * @alias sap.ui.table.extensions.Synchronization