@openui5/sap.ui.table 1.105.1 → 1.107.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 (96) hide show
  1. package/.reuse/dep5 +20 -17
  2. package/THIRDPARTY.txt +31 -21
  3. package/package.json +3 -3
  4. package/src/sap/ui/table/.library +1 -1
  5. package/src/sap/ui/table/AnalyticalColumn.js +20 -3
  6. package/src/sap/ui/table/AnalyticalColumnMenu.js +19 -15
  7. package/src/sap/ui/table/AnalyticalTable.js +1 -17
  8. package/src/sap/ui/table/Column.js +102 -50
  9. package/src/sap/ui/table/ColumnMenu.js +19 -5
  10. package/src/sap/ui/table/CreationRow.js +1 -2
  11. package/src/sap/ui/table/Row.js +1 -3
  12. package/src/sap/ui/table/RowAction.js +1 -2
  13. package/src/sap/ui/table/RowActionItem.js +1 -2
  14. package/src/sap/ui/table/RowSettings.js +1 -2
  15. package/src/sap/ui/table/Table.js +77 -44
  16. package/src/sap/ui/table/TablePersoController.js +6 -5
  17. package/src/sap/ui/table/TableRenderer.js +7 -6
  18. package/src/sap/ui/table/TreeTable.js +2 -10
  19. package/src/sap/ui/table/extensions/Accessibility.js +37 -24
  20. package/src/sap/ui/table/extensions/AccessibilityRender.js +3 -1
  21. package/src/sap/ui/table/extensions/DragAndDrop.js +1 -1
  22. package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
  23. package/src/sap/ui/table/extensions/Keyboard.js +1 -1
  24. package/src/sap/ui/table/extensions/KeyboardDelegate.js +7 -6
  25. package/src/sap/ui/table/extensions/Pointer.js +4 -2
  26. package/src/sap/ui/table/extensions/Scrolling.js +1 -1
  27. package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
  28. package/src/sap/ui/table/extensions/Synchronization.js +46 -7
  29. package/src/sap/ui/table/library.js +10 -16
  30. package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +224 -0
  31. package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +428 -0
  32. package/src/sap/ui/table/messagebundle.properties +6 -0
  33. package/src/sap/ui/table/messagebundle_ar.properties +4 -0
  34. package/src/sap/ui/table/messagebundle_bg.properties +4 -0
  35. package/src/sap/ui/table/messagebundle_ca.properties +4 -0
  36. package/src/sap/ui/table/messagebundle_cs.properties +4 -0
  37. package/src/sap/ui/table/messagebundle_cy.properties +4 -0
  38. package/src/sap/ui/table/messagebundle_da.properties +4 -0
  39. package/src/sap/ui/table/messagebundle_de.properties +4 -0
  40. package/src/sap/ui/table/messagebundle_el.properties +4 -0
  41. package/src/sap/ui/table/messagebundle_en.properties +4 -0
  42. package/src/sap/ui/table/messagebundle_en_GB.properties +4 -0
  43. package/src/sap/ui/table/messagebundle_en_US_sappsd.properties +4 -0
  44. package/src/sap/ui/table/messagebundle_en_US_saprigi.properties +4 -0
  45. package/src/sap/ui/table/messagebundle_en_US_saptrc.properties +4 -0
  46. package/src/sap/ui/table/messagebundle_es.properties +4 -0
  47. package/src/sap/ui/table/messagebundle_es_MX.properties +4 -0
  48. package/src/sap/ui/table/messagebundle_et.properties +4 -0
  49. package/src/sap/ui/table/messagebundle_fi.properties +4 -0
  50. package/src/sap/ui/table/messagebundle_fr.properties +4 -0
  51. package/src/sap/ui/table/messagebundle_fr_CA.properties +4 -0
  52. package/src/sap/ui/table/messagebundle_hi.properties +4 -0
  53. package/src/sap/ui/table/messagebundle_hr.properties +4 -0
  54. package/src/sap/ui/table/messagebundle_hu.properties +4 -0
  55. package/src/sap/ui/table/messagebundle_id.properties +4 -0
  56. package/src/sap/ui/table/messagebundle_it.properties +4 -0
  57. package/src/sap/ui/table/messagebundle_iw.properties +4 -0
  58. package/src/sap/ui/table/messagebundle_ja.properties +4 -0
  59. package/src/sap/ui/table/messagebundle_kk.properties +4 -0
  60. package/src/sap/ui/table/messagebundle_ko.properties +4 -0
  61. package/src/sap/ui/table/messagebundle_lt.properties +4 -0
  62. package/src/sap/ui/table/messagebundle_lv.properties +4 -0
  63. package/src/sap/ui/table/messagebundle_ms.properties +4 -0
  64. package/src/sap/ui/table/messagebundle_nl.properties +4 -0
  65. package/src/sap/ui/table/messagebundle_no.properties +4 -0
  66. package/src/sap/ui/table/messagebundle_pl.properties +4 -0
  67. package/src/sap/ui/table/messagebundle_pt.properties +4 -0
  68. package/src/sap/ui/table/messagebundle_pt_PT.properties +4 -0
  69. package/src/sap/ui/table/messagebundle_ro.properties +4 -0
  70. package/src/sap/ui/table/messagebundle_ru.properties +4 -0
  71. package/src/sap/ui/table/messagebundle_sh.properties +4 -0
  72. package/src/sap/ui/table/messagebundle_sk.properties +4 -0
  73. package/src/sap/ui/table/messagebundle_sl.properties +4 -0
  74. package/src/sap/ui/table/messagebundle_sv.properties +5 -1
  75. package/src/sap/ui/table/messagebundle_th.properties +4 -0
  76. package/src/sap/ui/table/messagebundle_tr.properties +4 -0
  77. package/src/sap/ui/table/messagebundle_uk.properties +4 -0
  78. package/src/sap/ui/table/messagebundle_vi.properties +4 -0
  79. package/src/sap/ui/table/messagebundle_zh_CN.properties +4 -0
  80. package/src/sap/ui/table/messagebundle_zh_TW.properties +4 -0
  81. package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
  82. package/src/sap/ui/table/plugins/PluginBase.js +1 -2
  83. package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
  84. package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -2
  85. package/src/sap/ui/table/plugins/V4Aggregation.js +13 -16
  86. package/src/sap/ui/table/rowmodes/AutoRowMode.js +1 -2
  87. package/src/sap/ui/table/rowmodes/FixedRowMode.js +1 -2
  88. package/src/sap/ui/table/rowmodes/InteractiveRowMode.js +1 -2
  89. package/src/sap/ui/table/rowmodes/RowMode.js +1 -2
  90. package/src/sap/ui/table/rowmodes/VariableRowMode.js +1 -2
  91. package/src/sap/ui/table/utils/TableUtils.js +12 -30
  92. package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
  93. package/src/sap/ui/table/utils/_ColumnUtils.js +38 -12
  94. package/src/sap/ui/table/utils/_GroupingUtils.js +1 -1
  95. package/src/sap/ui/table/utils/_HookUtils.js +1 -1
  96. package/src/sap/ui/table/utils/_MenuUtils.js +19 -21
@@ -35,8 +35,7 @@ sap.ui.define([
35
35
  * @ui5-restricted sap.ui.mdc
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.105.1
39
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
38
+ * @version 1.107.0
40
39
  */
41
40
  var AutoRowMode = RowMode.extend("sap.ui.table.rowmodes.AutoRowMode", /** @lends sap.ui.table.rowmodes.AutoRowMode.prototype */ {
42
41
  metadata: {
@@ -29,9 +29,8 @@ sap.ui.define([
29
29
  * @ui5-restricted sap.ui.mdc
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.105.1
32
+ * @version 1.107.0
33
33
  *
34
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
35
34
  */
36
35
  var FixedRowMode = RowMode.extend("sap.ui.table.rowmodes.FixedRowMode", /** @lends sap.ui.table.rowmodes.FixedRowMode.prototype */ {
37
36
  metadata: {
@@ -33,9 +33,8 @@ sap.ui.define([
33
33
  * @ui5-restricted sap.ui.mdc
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.105.1
36
+ * @version 1.107.0
37
37
  *
38
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
39
38
  */
40
39
  var InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.InteractiveRowMode", /** @lends sap.ui.table.rowmodes.InteractiveRowMode.prototype */ {
41
40
  metadata: {
@@ -34,8 +34,7 @@ sap.ui.define([
34
34
  * @ui5-restricted sap.ui.mdc
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.105.1
38
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
37
+ * @version 1.107.0
39
38
  */
40
39
  var RowMode = Element.extend("sap.ui.table.rowmodes.RowMode", /** @lends sap.ui.table.rowmodes.RowMode.prototype */ {
41
40
  metadata: {
@@ -23,13 +23,12 @@ sap.ui.define([
23
23
  * @extends sap.ui.table.rowmodes.RowMode
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.105.1
26
+ * @version 1.107.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
30
30
  * @experimental
31
31
  * @alias sap.ui.table.rowmodes.VariableRowMode
32
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
33
32
  */
34
33
  var VariableRowMode = RowMode.extend("sap.ui.table.rowmodes.VariableRowMode", {
35
34
  metadata: {
@@ -203,7 +203,7 @@ sap.ui.define([
203
203
  * Static collection of utility functions related to the sap.ui.table.Table, ...
204
204
  *
205
205
  * @author SAP SE
206
- * @version 1.105.1
206
+ * @version 1.107.0
207
207
  * @namespace
208
208
  * @alias sap.ui.table.utils.TableUtils
209
209
  * @private
@@ -481,37 +481,19 @@ sap.ui.define([
481
481
  /**
482
482
  * Gets the message to be displayed if the table contains no columns or no data.
483
483
  *
484
- * @param oTable Instance of the table.
485
- * @returns {Control | string} The no data control or text message.
486
- */
487
- getNoContentMessage: function(oTable) {
488
- if (oTable._getVisibleColumns().length > 0) {
489
- return oTable.getNoData();
490
- } else {
491
- return oTable.getAggregation("_noColumnsMessage");
492
- }
493
- },
494
-
495
- /**
496
- * Gets the text to be displayed as the "no data text".
497
- * If a control is set for the <code>noData</code> aggregation, <code>null</code> is returned.
484
+ * If the table has columns, it returns the content of the <code>noData</code> aggregation. If the aggregation is empty, it returns the
485
+ * default "no data" text.
486
+ * If the table does not have columns, it returns the content of the <code>_noColumnsMessage</code> aggregation. If the aggregation is
487
+ * empty, it returns the default "no columns" text.
498
488
  *
499
489
  * @param {sap.ui.table.Table} oTable Instance of the table.
500
- * @returns {string | null} The no data text.
490
+ * @returns {sap.ui.core.Control | string} The no data control or text message.
501
491
  */
502
- getNoDataText: function(oTable) {
503
- var vNoData = oTable.getNoData();
504
-
505
- if (TableUtils.getVisibleColumnCount(oTable) === 0 && !TableUtils.isA(vNoData, "sap.m.IllustratedMessage")) {
506
- return TableUtils.getResourceText("TBL_NO_COLUMNS");
507
- }
508
-
509
- if (TableUtils.isA(vNoData, "sap.ui.core.Control")) {
510
- return null;
511
- } else if (typeof vNoData === "string") {
512
- return vNoData;
492
+ getNoContentMessage: function(oTable) {
493
+ if (TableUtils.getVisibleColumnCount(oTable) > 0) {
494
+ return oTable.getNoData() || TableUtils.getResourceText("TBL_NO_DATA");
513
495
  } else {
514
- return TableUtils.getResourceText("TBL_NO_DATA");
496
+ return oTable.getAggregation("_noColumnsMessage") || TableUtils.getResourceText("TBL_NO_COLUMNS");
515
497
  }
516
498
  },
517
499
 
@@ -1329,13 +1311,13 @@ sap.ui.define([
1329
1311
  var oTable = oRow.getTable();
1330
1312
  var aCells = oRow.getCells();
1331
1313
 
1332
- if (bRowActionCells === true && this.hasRowActions(oTable)) {
1314
+ if (bRowActionCells === true && TableUtils.hasRowActions(oTable)) {
1333
1315
  aCells.push(oRow.getRowAction());
1334
1316
  }
1335
1317
 
1336
1318
  for (var i = 0; i < aCells.length; i++) {
1337
1319
  var oCellContent = aCells[i].getDomRef();
1338
- var $Cell = this.getCell(oTable, oCellContent, true);
1320
+ var $Cell = TableUtils.getCell(oTable, oCellContent, true);
1339
1321
  var $InteractiveElements = TableUtils.getInteractiveElements($Cell);
1340
1322
 
1341
1323
  if ($InteractiveElements) {
@@ -14,7 +14,7 @@ sap.ui.define([], function() {
14
14
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Binding...</code>
15
15
  *
16
16
  * @author SAP SE
17
- * @version 1.105.1
17
+ * @version 1.107.0
18
18
  * @namespace
19
19
  * @alias sap.ui.table.utils._BindingUtils
20
20
  * @private
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Column...</code>
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.105.1
21
+ * @version 1.107.0
22
22
  * @namespace
23
23
  * @alias sap.ui.table.utils._ColumnUtils
24
24
  * @private
@@ -730,25 +730,18 @@ sap.ui.define([
730
730
  * <li>label</li>
731
731
  * </ul>
732
732
  *
733
- * @param {sap.ui.table.Table} oTable Instance of the table
734
- * @param {int} iColumnIndex The index of a column
733
+ * @param {sap.ui.table.Column} oColumn Instance of the column
735
734
  * @returns {string} Returns the column header text
736
735
  */
737
- getHeaderText: function(oTable, iColumnIndex) {
738
- if (!oTable ||
739
- iColumnIndex == null || iColumnIndex < 0) {
740
- return null;
741
- }
742
-
743
- var aColumns = oTable.getColumns();
744
- if (iColumnIndex >= aColumns.length) {
736
+ getHeaderText: function(oColumn) {
737
+ if (!oColumn) {
745
738
  return null;
746
739
  }
747
740
 
748
741
  function getLabelText(oLabel) {
749
742
  return oLabel && oLabel.getText && oLabel.getText() || "";
750
743
  }
751
- var oColumn = aColumns[iColumnIndex];
744
+
752
745
  var sText = oColumn.getName();
753
746
 
754
747
  if (!sText) {
@@ -765,7 +758,40 @@ sap.ui.define([
765
758
  if (!sText) {
766
759
  sText = getLabelText(oColumn.getLabel());
767
760
  }
761
+
768
762
  return sText;
763
+ },
764
+
765
+ /**
766
+ * Returns one of the following starting with highest priority:
767
+ * <ul>
768
+ * <li>Last label of the column with a span equal to 1, if the column has multiLabels</li>
769
+ * <li>label control</li>
770
+ * </ul>
771
+ *
772
+ * @param {sap.ui.table.Column} oColumn Instance of the column
773
+ * @returns {sap.ui.core.Control} Returns the column header label
774
+ */
775
+ getHeaderLabel: function (oColumn) {
776
+ if (!oColumn) {
777
+ return null;
778
+ }
779
+
780
+ var oLabel;
781
+ var aMultiLabels = oColumn.getMultiLabels();
782
+
783
+ for (var i = aMultiLabels.length - 1; i >= 0; i--) {
784
+ if (ColumnUtils.getHeaderSpan(oColumn, i) === 1) {
785
+ oLabel = aMultiLabels[i];
786
+ break;
787
+ }
788
+ }
789
+
790
+ if (!oLabel) {
791
+ oLabel = oColumn.getLabel();
792
+ }
793
+
794
+ return oLabel;
769
795
  }
770
796
  };
771
797
 
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Grouping...</code>
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.105.1
26
+ * @version 1.107.0
27
27
  * @namespace
28
28
  * @alias sap.ui.table.utils._GroupingUtils
29
29
  * @private
@@ -22,7 +22,7 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
22
22
  * - There is no concept for public or protected hooks. Never expose a hook directly, only indirectly as can be seen in the examples.
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.105.1
25
+ * @version 1.107.0
26
26
  * @namespace
27
27
  * @alias sap.ui.table.utils._HookUtils
28
28
  *
@@ -13,9 +13,6 @@ sap.ui.define([
13
13
  ], function(Device, Menu, MenuItem, Popup) {
14
14
  "use strict";
15
15
 
16
- // Table uses z-indices, ensure that popups starts their z-indices at least with 20.
17
- Popup.setInitialZIndex(10);
18
-
19
16
  function onCellFilterSelect(oColumn, oRow) {
20
17
  // "this" is the table instance.
21
18
  var oRowContext = oRow.getRowBindingContext();
@@ -42,7 +39,7 @@ sap.ui.define([
42
39
  * Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Menu...</code>
43
40
  *
44
41
  * @author SAP SE
45
- * @version 1.105.1
42
+ * @version 1.107.0
46
43
  * @namespace
47
44
  * @alias sap.ui.table.utils._MenuUtils
48
45
  * @private
@@ -91,28 +88,29 @@ sap.ui.define([
91
88
  var bExecuteDefault = true;
92
89
 
93
90
  if (oCellInfo.isOfType(MenuUtils.TableUtils.CELLTYPE.COLUMNHEADER)) {
94
- var bCellHasMenuButton = oCell.querySelector(".sapUiTableColDropDown") !== null;
91
+ var oColumn = oTable.getColumns()[iColumnIndex];
92
+ var oColumnHeaderMenu = oColumn.getHeaderMenuInstance();
93
+
94
+ if (oColumnHeaderMenu) {
95
+ oColumn._openHeaderMenu(oCell);
96
+ return true;
97
+ } else {
98
+ var bCellHasMenuButton = oCell.querySelector(".sapUiTableColDropDown") !== null;
99
+
100
+ if (!Device.system.desktop && !bCellHasMenuButton) {
101
+ return MenuUtils._applyColumnHeaderCellMenu(oTable, oCell);
102
+ }
95
103
 
96
- if (Device.system.desktop || bCellHasMenuButton) {
97
104
  MenuUtils._removeColumnHeaderCellMenu(oTable);
105
+ bExecuteDefault = oTable.fireColumnSelect({
106
+ column: oColumn
107
+ });
98
108
 
99
- var oColumn = oTable.getColumns()[iColumnIndex];
100
- var oPopover = oColumn.getColumnHeaderMenu();
101
- if (oPopover) {
102
- oPopover.openBy(oColumn);
109
+ if (bExecuteDefault) {
110
+ return MenuUtils._openColumnContextMenu(oTable, oCell);
103
111
  } else {
104
- bExecuteDefault = oTable.fireColumnSelect({
105
- column: oColumn
106
- });
107
-
108
- if (bExecuteDefault) {
109
- return MenuUtils._openColumnContextMenu(oTable, oCell);
110
- } else {
111
- return true; // We do not know whether the event handler opens a context menu or not, so we just assume it is done.
112
- }
112
+ return true; // We do not know whether the event handler opens a context menu or not, so we just assume it is done.
113
113
  }
114
- } else {
115
- return MenuUtils._applyColumnHeaderCellMenu(oTable, oCell);
116
114
  }
117
115
 
118
116
  } else if (oCellInfo.isOfType(MenuUtils.TableUtils.CELLTYPE.ANYCONTENTCELL)) {