@openui5/sap.ui.table 1.128.0 → 1.130.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 (101) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +3 -3
  3. package/src/sap/ui/table/.library +1 -1
  4. package/src/sap/ui/table/AnalyticalColumn.js +18 -10
  5. package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
  6. package/src/sap/ui/table/AnalyticalTable.js +24 -246
  7. package/src/sap/ui/table/Column.js +30 -16
  8. package/src/sap/ui/table/ColumnMenu.js +1 -1
  9. package/src/sap/ui/table/CreationRow.js +1 -1
  10. package/src/sap/ui/table/Row.js +1 -1
  11. package/src/sap/ui/table/RowAction.js +1 -1
  12. package/src/sap/ui/table/RowActionItem.js +1 -1
  13. package/src/sap/ui/table/RowSettings.js +1 -1
  14. package/src/sap/ui/table/Table.js +8 -6
  15. package/src/sap/ui/table/TablePersoController.js +1 -1
  16. package/src/sap/ui/table/TableRenderer.js +0 -7
  17. package/src/sap/ui/table/TreeTable.js +1 -1
  18. package/src/sap/ui/table/extensions/Accessibility.js +1 -1
  19. package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -1
  20. package/src/sap/ui/table/extensions/DragAndDrop.js +1 -1
  21. package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
  22. package/src/sap/ui/table/extensions/Keyboard.js +1 -1
  23. package/src/sap/ui/table/extensions/KeyboardDelegate.js +3 -3
  24. package/src/sap/ui/table/extensions/Pointer.js +5 -38
  25. package/src/sap/ui/table/extensions/Scrolling.js +1 -1
  26. package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
  27. package/src/sap/ui/table/extensions/Synchronization.js +1 -1
  28. package/src/sap/ui/table/library.js +13 -13
  29. package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +3 -3
  30. package/src/sap/ui/table/menus/GroupHeaderContextMenuAdapter.js +332 -0
  31. package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +1 -1
  32. package/src/sap/ui/table/messagebundle.properties +40 -3
  33. package/src/sap/ui/table/messagebundle_ar.properties +23 -0
  34. package/src/sap/ui/table/messagebundle_bg.properties +23 -0
  35. package/src/sap/ui/table/messagebundle_ca.properties +23 -0
  36. package/src/sap/ui/table/messagebundle_cnr.properties +23 -0
  37. package/src/sap/ui/table/messagebundle_cs.properties +23 -0
  38. package/src/sap/ui/table/messagebundle_cy.properties +23 -0
  39. package/src/sap/ui/table/messagebundle_da.properties +24 -1
  40. package/src/sap/ui/table/messagebundle_de.properties +23 -0
  41. package/src/sap/ui/table/messagebundle_el.properties +23 -0
  42. package/src/sap/ui/table/messagebundle_en.properties +23 -0
  43. package/src/sap/ui/table/messagebundle_en_GB.properties +23 -0
  44. package/src/sap/ui/table/messagebundle_en_US_saprigi.properties +23 -0
  45. package/src/sap/ui/table/messagebundle_es.properties +23 -0
  46. package/src/sap/ui/table/messagebundle_es_MX.properties +23 -0
  47. package/src/sap/ui/table/messagebundle_et.properties +23 -0
  48. package/src/sap/ui/table/messagebundle_fi.properties +23 -0
  49. package/src/sap/ui/table/messagebundle_fr.properties +25 -2
  50. package/src/sap/ui/table/messagebundle_fr_CA.properties +25 -2
  51. package/src/sap/ui/table/messagebundle_hi.properties +23 -0
  52. package/src/sap/ui/table/messagebundle_hr.properties +23 -0
  53. package/src/sap/ui/table/messagebundle_hu.properties +25 -2
  54. package/src/sap/ui/table/messagebundle_id.properties +25 -2
  55. package/src/sap/ui/table/messagebundle_it.properties +23 -0
  56. package/src/sap/ui/table/messagebundle_iw.properties +23 -0
  57. package/src/sap/ui/table/messagebundle_ja.properties +23 -0
  58. package/src/sap/ui/table/messagebundle_kk.properties +49 -26
  59. package/src/sap/ui/table/messagebundle_ko.properties +23 -0
  60. package/src/sap/ui/table/messagebundle_lt.properties +23 -0
  61. package/src/sap/ui/table/messagebundle_lv.properties +23 -0
  62. package/src/sap/ui/table/messagebundle_mk.properties +23 -0
  63. package/src/sap/ui/table/messagebundle_ms.properties +23 -0
  64. package/src/sap/ui/table/messagebundle_nl.properties +23 -0
  65. package/src/sap/ui/table/messagebundle_no.properties +23 -0
  66. package/src/sap/ui/table/messagebundle_pl.properties +23 -0
  67. package/src/sap/ui/table/messagebundle_pt.properties +25 -2
  68. package/src/sap/ui/table/messagebundle_pt_PT.properties +23 -0
  69. package/src/sap/ui/table/messagebundle_ro.properties +23 -0
  70. package/src/sap/ui/table/messagebundle_ru.properties +23 -0
  71. package/src/sap/ui/table/messagebundle_sh.properties +23 -0
  72. package/src/sap/ui/table/messagebundle_sk.properties +23 -0
  73. package/src/sap/ui/table/messagebundle_sl.properties +23 -0
  74. package/src/sap/ui/table/messagebundle_sr.properties +23 -0
  75. package/src/sap/ui/table/messagebundle_sv.properties +23 -0
  76. package/src/sap/ui/table/messagebundle_th.properties +23 -0
  77. package/src/sap/ui/table/messagebundle_tr.properties +23 -0
  78. package/src/sap/ui/table/messagebundle_uk.properties +23 -0
  79. package/src/sap/ui/table/messagebundle_vi.properties +23 -0
  80. package/src/sap/ui/table/messagebundle_zh_CN.properties +23 -0
  81. package/src/sap/ui/table/messagebundle_zh_TW.properties +25 -2
  82. package/src/sap/ui/table/plugins/BindingSelection.js +2 -2
  83. package/src/sap/ui/table/plugins/PluginBase.js +1 -1
  84. package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
  85. package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -1
  86. package/src/sap/ui/table/plugins/V4Aggregation.js +60 -60
  87. package/src/sap/ui/table/rowmodes/Auto.js +3 -1
  88. package/src/sap/ui/table/rowmodes/Fixed.js +1 -1
  89. package/src/sap/ui/table/rowmodes/Interactive.js +252 -126
  90. package/src/sap/ui/table/rowmodes/RowMode.js +1 -1
  91. package/src/sap/ui/table/rowmodes/Variable.js +1 -1
  92. package/src/sap/ui/table/themes/base/AnalyticalTable.less +0 -20
  93. package/src/sap/ui/table/themes/base/DragDrop.less +84 -23
  94. package/src/sap/ui/table/themes/base/Grouping.less +21 -11
  95. package/src/sap/ui/table/themes/sap_hcb/base_AnalyticalTable.less +0 -20
  96. package/src/sap/ui/table/utils/TableUtils.js +44 -4
  97. package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
  98. package/src/sap/ui/table/utils/_ColumnUtils.js +3 -32
  99. package/src/sap/ui/table/utils/_GroupingUtils.js +1 -21
  100. package/src/sap/ui/table/utils/_HookUtils.js +1 -1
  101. package/src/sap/ui/table/utils/_MenuUtils.js +2 -2
package/THIRDPARTY.txt CHANGED
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
6
6
 
7
7
  Library: sap.m:
8
8
 
9
- Component: purify.js, version: 2.3.8
9
+ Component: purify.js, version: 3.1.7
10
10
  Copyright: Mario Heiderich
11
11
  License: Apache-2.0
12
12
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
@@ -468,7 +468,7 @@ License: Apache-2.0
468
468
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
469
469
  Contained in: lib/jsdoc/ui5/plugin.js
470
470
 
471
- Component: SAP Theming Base Content, version: 11.16.1
471
+ Component: SAP Theming Base Content, version: 11.18.0
472
472
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
473
473
  License: Apache-2.0
474
474
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.table",
3
- "version": "1.128.0",
3
+ "version": "1.130.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.table",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.ui.core": "1.128.0",
18
- "@openui5/sap.ui.unified": "1.128.0"
17
+ "@openui5/sap.ui.core": "1.130.0",
18
+ "@openui5/sap.ui.unified": "1.130.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.128.0</version>
9
+ <version>1.130.0</version>
10
10
 
11
11
  <documentation>Table-like controls, mainly for desktop scenarios.</documentation>
12
12
 
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @extends sap.ui.table.Column
48
48
  *
49
49
  * @author SAP SE
50
- * @version 1.128.0
50
+ * @version 1.130.0
51
51
  *
52
52
  * @constructor
53
53
  * @public
@@ -59,7 +59,9 @@ sap.ui.define([
59
59
  properties: {
60
60
 
61
61
  /**
62
- * Defines the primary model property which is used inside the Column. In case of the analytical extension this means the property which is grouped by for dimensions or the property which is summed for measures.
62
+ * Defines the primary model property which is used inside the Column. In case of the
63
+ * analytical extension this means the property which is grouped by for dimensions or
64
+ * the property which is summed for measures.
63
65
  */
64
66
  leadingProperty: {type: "string", group: "Misc", defaultValue: null},
65
67
 
@@ -69,12 +71,15 @@ sap.ui.define([
69
71
  summed: {type: "boolean", group: "Misc", defaultValue: false},
70
72
 
71
73
  /**
72
- * Specifies that the dimension referred to by the column shall be included in the granularity of the data result. It allows a finer distinction between a visible/grouped/(included)inResult column.
74
+ * Specifies that the dimension referred to by the column shall be included in the
75
+ * granularity of the data result. It allows a finer distinction between a
76
+ * visible/grouped/(included)inResult column.
73
77
  */
74
78
  inResult: {type: "boolean", group: "Misc", defaultValue: false},
75
79
 
76
80
  /**
77
- * Specifies whether the column is displayed within the table even if it is grouped or not. A grouped column has the same value for every rows within the group.
81
+ * Specifies whether the column is displayed within the table even if it is grouped or
82
+ * not. A grouped column has the same value for every rows within the group.
78
83
  */
79
84
  showIfGrouped: {type: "boolean", group: "Appearance", defaultValue: false},
80
85
 
@@ -298,7 +303,7 @@ sap.ui.define([
298
303
  * - The filter property must be a property of the bound collection however it may differ from the leading property
299
304
  * - The analytical column must be a child of an AnalyticalTable
300
305
  *
301
- * @returns {boolean}
306
+ * @returns {boolean} Whether the column can be filtered by the menu
302
307
  */
303
308
  AnalyticalColumn.prototype.isFilterableByMenu = function() {
304
309
  const sFilterProperty = this.getFilterProperty();
@@ -314,11 +319,14 @@ sap.ui.define([
314
319
  // metadata must be evaluated which can only be done when the collection is known and the metadata is loaded
315
320
  // this is usually the case when a binding exists.
316
321
  if (oBinding) {
317
- // The OData4SAP specification defines in section 3.3.3.2.2.3 how a filter condition on a measure property has to be used for data selection at runtime:
318
- // “Conditions on measure properties refer to the aggregated measure value based on the selected dimensions”
319
- // Although the generic OData providers (BW, SADL) do not support filtering measures, there may be specialized implementations that do support it.
320
- // Conclusion for a fix therefore is to make sure that the AnalyticalTable solely checks sap:filterable=”false” for providing the filter function.
321
- // Check for measure is hence removed. For more details, see BCP: 1770355530
322
+ /*
323
+ * The OData4SAP specification defines in section 3.3.3.2.2.3 how a filter condition on a measure property has to be used
324
+ * for data selection at runtime: “Conditions on measure properties refer to the aggregated measure value based on the
325
+ * selected dimensions” Although the generic OData providers (BW, SADL) do not support filtering measures, there may be
326
+ * specialized implementations that do support it. Conclusion for a fix therefore is to make sure that the AnalyticalTable
327
+ * solely checks sap:filterable=”false” for providing the filter function. Check for measure is hence removed. For more
328
+ * details, see BCP: 1770355530
329
+ */
322
330
  if (oBinding.getFilterablePropertyNames().indexOf(sFilterProperty) > -1 &&
323
331
  oBinding.getProperty(sFilterProperty)) {
324
332
  return true;
@@ -20,7 +20,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
20
20
  * @extends sap.ui.table.ColumnMenu
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.128.0
23
+ * @version 1.130.0
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -6,41 +6,36 @@
6
6
 
7
7
  // Provides control sap.ui.table.AnalyticalTable.
8
8
  sap.ui.define([
9
- './AnalyticalColumn',
10
- './Column',
11
- './Table',
12
- './TreeTable',
9
+ "./AnalyticalColumn",
10
+ "./Column",
11
+ "./Table",
12
+ "./TreeTable",
13
13
  "./TableRenderer",
14
- './library',
14
+ "./menus/GroupHeaderContextMenuAdapter",
15
15
  "sap/ui/core/Element",
16
- 'sap/ui/model/analytics/ODataModelAdapter',
17
- 'sap/ui/unified/MenuItem',
18
- './utils/TableUtils',
16
+ "sap/ui/model/analytics/ODataModelAdapter",
17
+ "./utils/TableUtils",
19
18
  "./plugins/BindingSelection",
20
19
  "sap/base/Log",
21
20
  "sap/ui/thirdparty/jquery",
22
- "sap/ui/model/controlhelper/TreeBindingProxy",
23
- "sap/ui/core/library"
21
+ "sap/ui/model/controlhelper/TreeBindingProxy"
24
22
  ], function(
25
23
  AnalyticalColumn,
26
24
  Column,
27
25
  Table,
28
26
  TreeTable,
29
27
  TableRenderer,
30
- library,
28
+ GroupHeaderContextMenuAdapter,
31
29
  Element,
32
30
  ODataModelAdapter,
33
- MenuItem,
34
31
  TableUtils,
35
32
  BindingSelectionPlugin,
36
33
  Log,
37
34
  jQuery,
38
- TreeBindingProxy,
39
- CoreLibrary
35
+ TreeBindingProxy
40
36
  ) {
41
37
  "use strict";
42
38
 
43
- const GroupEventType = library.GroupEventType;
44
39
  const _private = TableUtils.createWeakMapFacade();
45
40
 
46
41
  /**
@@ -55,7 +50,7 @@ sap.ui.define([
55
50
  * @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
56
51
  *
57
52
  * @extends sap.ui.table.Table
58
- * @version 1.128.0
53
+ * @version 1.130.0
59
54
  *
60
55
  * @constructor
61
56
  * @public
@@ -160,7 +155,13 @@ sap.ui.define([
160
155
  * If dirty the content of the Table will be overlayed.
161
156
  * @deprecated As of version 1.21.2, replaced by {@link sap.ui.table.Table#setShowOverlay}
162
157
  */
163
- dirty: {type: "boolean", group: "Appearance", defaultValue: null, deprecated: true}
158
+ dirty: {type: "boolean", group: "Appearance", defaultValue: null, deprecated: true},
159
+
160
+ /**
161
+ * If set to <code>true</code>, the full set of <code>MenuItem</code> instances is shown in the group header menu. The value
162
+ * <code>false</code> means that only a reduced set of group header menu items is shown.
163
+ */
164
+ extendedGroupHeaderMenu: {type: "boolean", group: "Behavior", defaultValue: true, visibility: "hidden"}
164
165
  },
165
166
  events: {
166
167
  /**
@@ -222,7 +223,7 @@ sap.ui.define([
222
223
  });
223
224
  this._aGroupedColumns = [];
224
225
  this._bSuspendUpdateAnalyticalInfo = false;
225
- this._mGroupHeaderMenuItems = null;
226
+ this._oGroupHeaderMenuAdapter = new GroupHeaderContextMenuAdapter(this);
226
227
 
227
228
  TableUtils.Grouping.setToDefaultGroupMode(this);
228
229
  TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.UpdateState, updateRowState, this);
@@ -235,13 +236,14 @@ sap.ui.define([
235
236
 
236
237
  AnalyticalTable.prototype.exit = function() {
237
238
  Table.prototype.exit.apply(this, arguments);
238
- this._cleanupGroupHeaderMenuItems();
239
+ this._oGroupHeaderMenuAdapter.destroy();
239
240
  };
240
241
 
241
242
  AnalyticalTable.prototype._adaptLocalization = function(bRtlChanged, bLangChanged) {
242
243
  return Table.prototype._adaptLocalization.apply(this, arguments).then(function() {
243
244
  if (bLangChanged) {
244
- this._cleanupGroupHeaderMenuItems();
245
+ this._oGroupHeaderMenuAdapter.destroy();
246
+ this._oGroupHeaderMenuAdapter = new GroupHeaderContextMenuAdapter(this);
245
247
  }
246
248
  }.bind(this));
247
249
  };
@@ -519,238 +521,14 @@ sap.ui.define([
519
521
  const oRow = oCellInfo.isOfType(TableUtils.CELLTYPE.ANYCONTENTCELL) ? this.getRows()[oCellInfo.rowIndex] : null;
520
522
 
521
523
  if (!oRow || !oRow.isGroupHeader()) {
522
- this._removeGroupHeaderMenuItems(oMenu);
524
+ this._oGroupHeaderMenuAdapter.removeItemsFrom(oMenu);
523
525
  return;
524
526
  }
525
527
 
526
528
  this._iGroupedLevel = oRow.getLevel();
527
- this._addGroupHeaderMenuItems(oMenu);
529
+ this._oGroupHeaderMenuAdapter.addItemsTo(oMenu, this.getProperty("extendedGroupHeaderMenu"));
528
530
  }
529
531
 
530
- AnalyticalTable.prototype._addGroupHeaderMenuItems = function(oMenu) {
531
- const that = this;
532
-
533
- function getGroupColumnInfo() {
534
- const iIndex = that._iGroupedLevel - 1;
535
-
536
- if (that._aGroupedColumns[iIndex]) {
537
- const oGroupedColumn = that.getColumns().filter(function(oColumn) {
538
- return that._aGroupedColumns[iIndex] === oColumn.getId();
539
- })[0];
540
-
541
- return {
542
- column: oGroupedColumn,
543
- index: iIndex
544
- };
545
- } else {
546
- return undefined;
547
- }
548
- }
549
-
550
- if (!this._mGroupHeaderMenuItems) {
551
- this._mGroupHeaderMenuItems = {};
552
- }
553
-
554
- if (!this._mGroupHeaderMenuItems["visibility"]) {
555
- this._mGroupHeaderMenuItems["visibility"] = new MenuItem({
556
- text: TableUtils.getResourceText("TBL_SHOW_COLUMN"),
557
- select: function() {
558
- const oGroupColumnInfo = getGroupColumnInfo();
559
-
560
- if (oGroupColumnInfo) {
561
- const oColumn = oGroupColumnInfo.column;
562
- const bShowIfGrouped = oColumn.getShowIfGrouped();
563
- oColumn.setShowIfGrouped(!bShowIfGrouped);
564
-
565
- that.fireGroup({column: oColumn, groupedColumns: oColumn.getParent()._aGroupedColumns, type: (!bShowIfGrouped ? GroupEventType.showGroupedColumn : GroupEventType.hideGroupedColumn)});
566
- }
567
- }
568
- });
569
- }
570
- oMenu.addItem(this._mGroupHeaderMenuItems["visibility"]);
571
-
572
- if (!this._mGroupHeaderMenuItems["ungroup"]) {
573
- this._mGroupHeaderMenuItems["ungroup"] = new MenuItem({
574
- text: TableUtils.getResourceText("TBL_UNGROUP"),
575
- select: function() {
576
- const oGroupColumnInfo = getGroupColumnInfo();
577
-
578
- if (oGroupColumnInfo && oGroupColumnInfo.column) {
579
- const oUngroupedColumn = oGroupColumnInfo.column;
580
-
581
- oUngroupedColumn.setGrouped(false);
582
- that.fireGroup({column: oUngroupedColumn, groupedColumns: that._aGroupedColumns, type: GroupEventType.ungroup});
583
- }
584
- }
585
- });
586
- }
587
- oMenu.addItem(this._mGroupHeaderMenuItems["ungroup"]);
588
-
589
- if (!this._mGroupHeaderMenuItems["ungroupall"]) {
590
- this._mGroupHeaderMenuItems["ungroupall"] = new MenuItem({
591
- text: TableUtils.getResourceText("TBL_UNGROUP_ALL"),
592
- select: function() {
593
- const aColumns = that.getColumns();
594
-
595
- that.suspendUpdateAnalyticalInfo();
596
-
597
- for (let i = 0; i < aColumns.length; i++) {
598
- aColumns[i].setGrouped(false);
599
- }
600
-
601
- that.resumeUpdateAnalyticalInfo();
602
- that.fireGroup({column: undefined, groupedColumns: [], type: GroupEventType.ungroupAll});
603
- }
604
- });
605
- }
606
- oMenu.addItem(this._mGroupHeaderMenuItems["ungroupall"]);
607
-
608
- if (!this._mGroupHeaderMenuItems["moveup"]) {
609
- this._mGroupHeaderMenuItems["moveup"] = new MenuItem({
610
- text: TableUtils.getResourceText("TBL_MOVE_UP"),
611
- select: function() {
612
- const oGroupColumnInfo = getGroupColumnInfo();
613
-
614
- if (oGroupColumnInfo) {
615
- const oColumn = oGroupColumnInfo.column;
616
- const iIndex = that._aGroupedColumns.indexOf(oColumn.getId());
617
- if (iIndex > 0) {
618
- that._aGroupedColumns[iIndex] = that._aGroupedColumns.splice(iIndex - 1, 1, that._aGroupedColumns[iIndex])[0];
619
- that.updateAnalyticalInfo();
620
- that.fireGroup({column: oColumn, groupedColumns: oColumn.getParent()._aGroupedColumns, type: GroupEventType.moveUp});
621
- }
622
- }
623
- },
624
- icon: "sap-icon://arrow-top"
625
- });
626
- }
627
- oMenu.addItem(this._mGroupHeaderMenuItems["moveup"]);
628
-
629
- if (!this._mGroupHeaderMenuItems["movedown"]) {
630
- this._mGroupHeaderMenuItems["movedown"] = new MenuItem({
631
- text: TableUtils.getResourceText("TBL_MOVE_DOWN"),
632
- select: function() {
633
- const oGroupColumnInfo = getGroupColumnInfo();
634
-
635
- if (oGroupColumnInfo) {
636
- const oColumn = oGroupColumnInfo.column;
637
- const iIndex = that._aGroupedColumns.indexOf(oColumn.getId());
638
- if (iIndex < that._aGroupedColumns.length) {
639
- that._aGroupedColumns[iIndex] = that._aGroupedColumns.splice(iIndex + 1, 1, that._aGroupedColumns[iIndex])[0];
640
- that.updateAnalyticalInfo();
641
- that.fireGroup({column: oColumn, groupedColumns: oColumn.getParent()._aGroupedColumns, type: GroupEventType.moveDown});
642
- }
643
- }
644
- },
645
- icon: "sap-icon://arrow-bottom"
646
- });
647
- }
648
- oMenu.addItem(this._mGroupHeaderMenuItems["movedown"]);
649
-
650
- if (!this._mGroupHeaderMenuItems["sortasc"]) {
651
- this._mGroupHeaderMenuItems["sortasc"] = new MenuItem({
652
- text: TableUtils.getResourceText("TBL_SORT_ASC"),
653
- select: function() {
654
- getGroupColumnInfo()?.column._sort(CoreLibrary.SortOrder.Ascending);
655
- },
656
- icon: "sap-icon://up"
657
- });
658
- }
659
- oMenu.addItem(this._mGroupHeaderMenuItems["sortasc"]);
660
-
661
- if (!this._mGroupHeaderMenuItems["sortdesc"]) {
662
- this._mGroupHeaderMenuItems["sortdesc"] = new MenuItem({
663
- text: TableUtils.getResourceText("TBL_SORT_DESC"),
664
- select: function() {
665
- getGroupColumnInfo()?.column._sort(CoreLibrary.SortOrder.Descending);
666
- },
667
- icon: "sap-icon://down"
668
- });
669
- }
670
- oMenu.addItem(this._mGroupHeaderMenuItems["sortdesc"]);
671
-
672
- if (!this._mGroupHeaderMenuItems["collapse"]) {
673
- this._mGroupHeaderMenuItems["collapse"] = new MenuItem({
674
- text: TableUtils.getResourceText("TBL_COLLAPSE_LEVEL"),
675
- select: function() {
676
- // Why -1? Because the "Collapse Level" Menu Entry should collapse TO the given level - 1
677
- // So collapsing level 1 means actually all nodes up TO level 0 will be collapsed.
678
- // Potential negative values are handled by the binding.
679
- that.getBinding().collapseToLevel(that._iGroupedLevel - 1);
680
- that.setFirstVisibleRow(0); //scroll to top after collapsing (so no rows vanish)
681
- that._getSelectionPlugin().clearSelection();
682
- }
683
- });
684
- }
685
- oMenu.addItem(this._mGroupHeaderMenuItems["collapse"]);
686
-
687
- if (!this._mGroupHeaderMenuItems["collapseall"]) {
688
- this._mGroupHeaderMenuItems["collapseall"] = new MenuItem({
689
- text: TableUtils.getResourceText("TBL_COLLAPSE_ALL"),
690
- select: function() {
691
- that.getBinding().collapseToLevel(0);
692
- that.setFirstVisibleRow(0); //scroll to top after collapsing (so no rows vanish)
693
- that._getSelectionPlugin().clearSelection();
694
- }
695
- });
696
- }
697
- oMenu.addItem(this._mGroupHeaderMenuItems["collapseall"]);
698
-
699
- if (!this._mGroupHeaderMenuItems["expand"]) {
700
- this._mGroupHeaderMenuItems["expand"] = new MenuItem({
701
- text: TableUtils.getResourceText("TBL_EXPAND_LEVEL"),
702
- select: function() {
703
- that.getBinding().expandToLevel(that._iGroupedLevel);
704
- that.setFirstVisibleRow(0);
705
- that._getSelectionPlugin().clearSelection();
706
- }
707
- });
708
- }
709
- oMenu.addItem(this._mGroupHeaderMenuItems["expand"]);
710
-
711
- if (!this._mGroupHeaderMenuItems["expandall"]) {
712
- this._mGroupHeaderMenuItems["expandall"] = new MenuItem({
713
- text: TableUtils.getResourceText("TBL_EXPAND_ALL"),
714
- select: function() {
715
- that.expandAll();
716
- }
717
- });
718
- }
719
- oMenu.addItem(this._mGroupHeaderMenuItems["expandall"]);
720
-
721
- const oGroupColumnInfo = getGroupColumnInfo();
722
- if (oGroupColumnInfo) {
723
- const oColumn = oGroupColumnInfo.column;
724
- if (oColumn.getShowIfGrouped()) {
725
- this._mGroupHeaderMenuItems["visibility"].setText(TableUtils.getResourceText("TBL_HIDE_COLUMN"));
726
- } else {
727
- this._mGroupHeaderMenuItems["visibility"].setText(TableUtils.getResourceText("TBL_SHOW_COLUMN"));
728
- }
729
- this._mGroupHeaderMenuItems["moveup"].setEnabled(oGroupColumnInfo.index > 0);
730
- this._mGroupHeaderMenuItems["movedown"].setEnabled(oGroupColumnInfo.index < this._aGroupedColumns.length - 1);
731
- } else {
732
- this._mGroupHeaderMenuItems["moveup"].setEnabled(true);
733
- this._mGroupHeaderMenuItems["movedown"].setEnabled(true);
734
- }
735
- };
736
-
737
- AnalyticalTable.prototype._removeGroupHeaderMenuItems = function(oMenu) {
738
- if (!this._mGroupHeaderMenuItems) {
739
- return;
740
- }
741
-
742
- for (const sItemKey in this._mGroupHeaderMenuItems) {
743
- oMenu.removeItem(this._mGroupHeaderMenuItems[sItemKey]);
744
- }
745
- };
746
-
747
- AnalyticalTable.prototype._cleanupGroupHeaderMenuItems = function() {
748
- for (const sItemKey in this._mGroupHeaderMenuItems) {
749
- this._mGroupHeaderMenuItems[sItemKey].destroy();
750
- }
751
- this._mGroupHeaderMenuItems = null;
752
- };
753
-
754
532
  /**
755
533
  * @inheritDoc
756
534
  */
@@ -63,7 +63,7 @@ sap.ui.define([
63
63
  * @class
64
64
  * The column allows you to define column specific properties that will be applied when rendering the table.
65
65
  * @extends sap.ui.core.Element
66
- * @version 1.128.0
66
+ * @version 1.130.0
67
67
  *
68
68
  * @constructor
69
69
  * @public
@@ -142,7 +142,7 @@ sap.ui.define([
142
142
  * For example, if the first name and last name are displayed in the same column, only one of the two can be defined as
143
143
  * <code>sortProperty</code>.
144
144
  *
145
- * A column menu entry for sorting can only be generated if the <code>sortProperty</code> is set.
145
+ * A column menu entry for sorting can only be generated if the <code>headerMenu</code> association and <code>sortProperty</code> are set.
146
146
  */
147
147
  sortProperty: {type: "string", group: "Behavior", defaultValue: null},
148
148
 
@@ -159,8 +159,8 @@ sap.ui.define([
159
159
  * For example, if the first name and last name are displayed in the same column, only one of the two can be defined as
160
160
  * <code>filterProperty</code>.
161
161
  *
162
- * A column menu entry for filtering can only be generated if the <code>filterProperty</code> is set. The
163
- * default menu entry is a text input field.
162
+ * A column menu entry for filtering can only be generated if the <code>headerMenu</code> association and <code>filterProperty</code> are
163
+ * set. The default menu entry is a text input field.
164
164
  */
165
165
  filterProperty: {type: "string", group: "Behavior", defaultValue: null},
166
166
 
@@ -235,13 +235,15 @@ sap.ui.define([
235
235
  name: {type: "string", group: "Appearance", defaultValue: null},
236
236
 
237
237
  /**
238
- * Defines if the filter menu entry is displayed
238
+ * Defines if the filter menu entry is displayed.
239
+ * <b>Note</b>: It only takes effect if the <code>headerMenu</code> association is set.
239
240
  * @since 1.13.0
240
241
  */
241
242
  showFilterMenuEntry: {type: "boolean", group: "Appearance", defaultValue: true},
242
243
 
243
244
  /**
244
- * Defines if the sort menu entries are displayed
245
+ * Defines if the sort menu entries are displayed.
246
+ * <b>Note</b>: It only takes effect if the <code>headerMenu</code> association is set.
245
247
  * @since 1.13.0
246
248
  */
247
249
  showSortMenuEntry: {type: "boolean", group: "Appearance", defaultValue: true},
@@ -300,8 +302,8 @@ sap.ui.define([
300
302
  * Choose?}" in the documentation for more details. While it is technically possible to also use other controls, doing so might lead to
301
303
  * issues with regards to scrolling, alignment, condensed mode, screen reader support, and keyboard support.
302
304
  *
303
- * If a string is defined, this string is interpreted as the binding path. Internally, a default text control will be created with its <code>text</code> property
304
- * bound to the value of the string. The default template depends on the libraries loaded.
305
+ * If a string is defined, this string is interpreted as the binding path. Internally, a default text control will be created with its
306
+ * <code>text</code> property bound to the value of the string. The default template depends on the libraries loaded.
305
307
  * <b>Note:</b> The <code>altType</code> string is deprecated as of version 1.118. Use a <code>Control</code> instead.
306
308
  */
307
309
  template: {type: "sap.ui.core.Control", altTypes: ["string"], multiple: false},
@@ -597,7 +599,7 @@ sap.ui.define([
597
599
  * - filterProperty must be defined
598
600
  * - showFilterMenuEntry must be true (which is the default)
599
601
  *
600
- * @returns {boolean}
602
+ * @returns {boolean} Whether the <code>Column</code> can be filterd via menu
601
603
  */
602
604
  Column.prototype.isFilterableByMenu = function() {
603
605
  return !!(this.getFilterProperty() && this.getShowFilterMenuEntry());
@@ -611,12 +613,13 @@ sap.ui.define([
611
613
  * - sortProperty must be defined
612
614
  * - showSortMenuEntry must be true (which is the default)
613
615
  *
614
- * @returns {boolean}
616
+ * @returns {boolean} Whether the <code>Column</code> can be sorted via menu
615
617
  */
616
618
  Column.prototype.isSortableByMenu = function() {
617
619
  return !!(this.getSortProperty() && this.getShowSortMenuEntry());
618
620
  };
619
621
 
622
+ // eslint-disable-next-line valid-jsdoc
620
623
  /**
621
624
  * This function checks whether a grouping column menu item will be created. Although it evaluates some column
622
625
  * properties, it does not check the metadata. Since a property of the table must be checked, this function will
@@ -679,11 +682,10 @@ sap.ui.define([
679
682
 
680
683
  Column.prototype._isHeaderMenuOpen = function() {
681
684
  const oHeaderMenu = this.getHeaderMenuInstance();
682
- if (oHeaderMenu) {
683
- return oHeaderMenu.isOpen();
684
- }
685
+ return oHeaderMenu?.isOpen() || false;
685
686
  };
686
687
 
688
+ // eslint-disable-next-line valid-jsdoc
687
689
  /**
688
690
  * @deprecated As of version 1.118.
689
691
  * @private
@@ -709,6 +711,7 @@ sap.ui.define([
709
711
  this.sort(this.getSorted() && this.getSortOrder() === SortOrder.Ascending);
710
712
  };
711
713
 
714
+ // eslint-disable-next-line valid-jsdoc
712
715
  /**
713
716
  * Sorts the current column ascending or descending.
714
717
  *
@@ -1003,8 +1006,8 @@ sap.ui.define([
1003
1006
  * @public
1004
1007
  *
1005
1008
  * @example <caption>Class name of a type.</caption>
1006
- * // The usage of string-based type definitions without explicitly loading these types (<code>sap.ui.require</code>) in the controller has been deprecated and might no longer work in future releases.
1007
- * // Please ensure that the types are requested correctly before setting this property.
1009
+ * // The usage of string-based type definitions without explicitly loading these types (<code>sap.ui.require</code>) in the controller has been
1010
+ * // deprecated and might no longer work in future releases. Please ensure that the types are requested correctly before setting this property.
1008
1011
  * oColumn.setFilterType("sap.ui.model.type.Date");
1009
1012
  *
1010
1013
  * @example <caption>Module path of a type.</caption>
@@ -1074,6 +1077,7 @@ sap.ui.define([
1074
1077
  /**
1075
1078
  * A hook getting called by the DragInfo to determine whether the column allows dragging.
1076
1079
  * @param {sap.ui.core.dnd.IDragInfo} oDragInfo drag information
1080
+ * @returns {boolean} Whether dragging is allowed
1077
1081
  * @private
1078
1082
  */
1079
1083
  Column.prototype.isDragAllowed = function(oDragInfo) {
@@ -1131,6 +1135,11 @@ sap.ui.define([
1131
1135
 
1132
1136
  if (oTemplate) {
1133
1137
  oClone = oTemplate.clone();
1138
+
1139
+ if (!oClone.getFieldHelpDisplay()) {
1140
+ oClone.setFieldHelpDisplay(this);
1141
+ }
1142
+
1134
1143
  this._mTemplateClones[sTemplateType].push(oClone);
1135
1144
  }
1136
1145
  }
@@ -1323,6 +1332,11 @@ sap.ui.define([
1323
1332
  TableUtils.Column.autoResizeColumn(this);
1324
1333
  };
1325
1334
 
1326
- return Column;
1335
+ Column.prototype.getFieldHelpInfo = function() {
1336
+ return {
1337
+ label: TableUtils.Column.getHeaderText(this)
1338
+ };
1339
+ };
1327
1340
 
1341
+ return Column;
1328
1342
  });
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * The column menu provides all common actions that can be performed on a column.
42
42
  * @extends sap.ui.unified.Menu
43
- * @version 1.128.0
43
+ * @version 1.130.0
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * <code>sap.ui.commons</code> library.
33
33
  * @extends sap.ui.core.Control
34
34
  * @author SAP SE
35
- * @version 1.128.0
35
+ * @version 1.130.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -135,7 +135,7 @@ sap.ui.define([
135
135
  * @class
136
136
  * The row.
137
137
  * @extends sap.ui.core.Element
138
- * @version 1.128.0
138
+ * @version 1.130.0
139
139
  *
140
140
  * @constructor
141
141
  * @public
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * If more action items are available as the available space allows to display an overflow mechanism is provided.
36
36
  * This control must only be used in the context of the <code>sap.ui.table.Table</code> control to define row actions.
37
37
  * @extends sap.ui.core.Control
38
- * @version 1.128.0
38
+ * @version 1.130.0
39
39
  *
40
40
  * @constructor
41
41
  * @public
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.128.0
27
+ * @version 1.130.0
28
28
  * @since 1.45
29
29
  *
30
30
  * @constructor
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * The <code>RowSettings</code> control allows you to configure a row.
28
28
  * You can only use this control in the context of the <code>sap.ui.table.Table</code> control to define row settings.
29
29
  * @extends sap.ui.core.Element
30
- * @version 1.128.0
30
+ * @version 1.130.0
31
31
  *
32
32
  * @constructor
33
33
  * @public