@openui5/sap.ui.table 1.117.1 → 1.119.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 (66) 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 +27 -25
  5. package/src/sap/ui/table/AnalyticalColumnMenu.js +6 -6
  6. package/src/sap/ui/table/AnalyticalTable.js +26 -9
  7. package/src/sap/ui/table/Column.js +22 -8
  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 +133 -89
  15. package/src/sap/ui/table/TablePersoController.js +1 -1
  16. package/src/sap/ui/table/TableRenderer.js +12 -38
  17. package/src/sap/ui/table/TreeTable.js +4 -1
  18. package/src/sap/ui/table/designtime/Table.designtime.js +1 -1
  19. package/src/sap/ui/table/extensions/Accessibility.js +6 -5
  20. package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -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 +4 -4
  25. package/src/sap/ui/table/extensions/Pointer.js +6 -6
  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 +1 -1
  29. package/src/sap/ui/table/library.js +17 -14
  30. package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
  31. package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +4 -3
  32. package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +4 -1
  33. package/src/sap/ui/table/messagebundle_bg.properties +7 -7
  34. package/src/sap/ui/table/messagebundle_da.properties +1 -1
  35. package/src/sap/ui/table/messagebundle_es.properties +6 -6
  36. package/src/sap/ui/table/messagebundle_fi.properties +2 -2
  37. package/src/sap/ui/table/messagebundle_fr.properties +2 -2
  38. package/src/sap/ui/table/messagebundle_hr.properties +1 -1
  39. package/src/sap/ui/table/messagebundle_it.properties +8 -8
  40. package/src/sap/ui/table/messagebundle_kk.properties +1 -1
  41. package/src/sap/ui/table/messagebundle_no.properties +2 -2
  42. package/src/sap/ui/table/messagebundle_pl.properties +1 -1
  43. package/src/sap/ui/table/messagebundle_ru.properties +1 -1
  44. package/src/sap/ui/table/messagebundle_sv.properties +1 -1
  45. package/src/sap/ui/table/messagebundle_uk.properties +2 -2
  46. package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
  47. package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +24 -143
  48. package/src/sap/ui/table/plugins/ODataV4Selection.js +48 -173
  49. package/src/sap/ui/table/plugins/PluginBase.js +1 -1
  50. package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
  51. package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -1
  52. package/src/sap/ui/table/plugins/V4Aggregation.js +1 -1
  53. package/src/sap/ui/table/rowmodes/{AutoRowMode.js → Auto.js} +74 -13
  54. package/src/sap/ui/table/rowmodes/{FixedRowMode.js → Fixed.js} +59 -14
  55. package/src/sap/ui/table/rowmodes/{InteractiveRowMode.js → Interactive.js} +74 -41
  56. package/src/sap/ui/table/rowmodes/RowMode.js +45 -33
  57. package/src/sap/ui/table/rowmodes/Type.js +39 -0
  58. package/src/sap/ui/table/rowmodes/{VariableRowMode.js → Variable.js} +3 -28
  59. package/src/sap/ui/table/rules/Rows.support.js +5 -5
  60. package/src/sap/ui/table/themes/base/Table.less +1 -1
  61. package/src/sap/ui/table/utils/TableUtils.js +165 -4
  62. package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
  63. package/src/sap/ui/table/utils/_ColumnUtils.js +1 -1
  64. package/src/sap/ui/table/utils/_GroupingUtils.js +2 -1
  65. package/src/sap/ui/table/utils/_HookUtils.js +1 -1
  66. package/src/sap/ui/table/utils/_MenuUtils.js +32 -56
package/THIRDPARTY.txt CHANGED
@@ -401,7 +401,7 @@ License: MIT
401
401
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
402
402
  Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/adaptive-expressions.js
403
403
 
404
- Component: Markdown-it, version: 12.2.0
404
+ Component: Markdown-it, version: 12.3.2
405
405
  Copyright: 2014 Vitaly Puzrin, Alex Kocharin
406
406
  License: MIT
407
407
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
@@ -466,7 +466,7 @@ License: Apache-2.0
466
466
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
467
467
  Contained in: lib/jsdoc/ui5/plugin.js
468
468
 
469
- Component: SAP Theming Base Content, version: 11.4.2
469
+ Component: SAP Theming Base Content, version: 11.6.8
470
470
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
471
471
  License: Apache-2.0
472
472
  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.117.1",
3
+ "version": "1.119.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.117.1",
18
- "@openui5/sap.ui.unified": "1.117.1"
17
+ "@openui5/sap.ui.core": "1.119.0",
18
+ "@openui5/sap.ui.unified": "1.119.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.117.1</version>
9
+ <version>1.119.0</version>
10
10
 
11
11
  <documentation>Table-like controls, mainly for desktop scenarios.</documentation>
12
12
 
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  'sap/ui/model/type/Integer',
16
16
  'sap/ui/model/type/Time',
17
17
  './utils/TableUtils',
18
- './AnalyticalColumnMenu'
18
+ "sap/base/Log"
19
19
  ],
20
20
  function(
21
21
  Column,
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  Integer,
28
28
  Time,
29
29
  TableUtils,
30
- AnalyticalColumnMenu
30
+ Log
31
31
  ) {
32
32
  "use strict";
33
33
 
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @extends sap.ui.table.Column
49
49
  *
50
50
  * @author SAP SE
51
- * @version 1.117.1
51
+ * @version 1.119.0
52
52
  *
53
53
  * @constructor
54
54
  * @public
@@ -82,7 +82,14 @@ sap.ui.define([
82
82
  /**
83
83
  * If the column is grouped, this formatter is used to format the value in the group header
84
84
  */
85
- groupHeaderFormatter: {type: "function", group: "Behavior", defaultValue: null}
85
+ groupHeaderFormatter: {type: "function", group: "Appearance", defaultValue: null},
86
+
87
+ /**
88
+ * Indicates if the column is grouped.
89
+ * @since 1.118
90
+ */
91
+ grouped: {type: "boolean", group: "Appearance", defaultValue: false}
92
+
86
93
  }
87
94
  }});
88
95
 
@@ -98,15 +105,6 @@ sap.ui.define([
98
105
  "Boolean": new BooleanType()
99
106
  };
100
107
 
101
- /*
102
- * Factory method. Creates the column menu.
103
- *
104
- * @returns {sap.ui.table.AnalyticalColumnMenu} The created column menu.
105
- */
106
- AnalyticalColumn.prototype._createMenu = function() {
107
- return new AnalyticalColumnMenu(this.getId() + "-menu");
108
- };
109
-
110
108
  AnalyticalColumn.prototype._setGrouped = function(bGrouped) {
111
109
  var oTable = this._getTable();
112
110
  var sGroupEventType = bGrouped ? GroupEventType.group : GroupEventType.ungroup;
@@ -160,21 +158,25 @@ sap.ui.define([
160
158
  */
161
159
  AnalyticalColumn.prototype.getLabel = function() {
162
160
  var oLabel = this.getAggregation("label");
163
- if (!oLabel) {
164
- if (!this._oBindingLabel) {
165
- var oParent = this.getParent();
166
- if (isInstanceOfAnalyticalTable(oParent)) {
167
- var oBinding = oParent.getBinding();
168
- if (oBinding) {
169
- this._oBindingLabel = library.TableHelper.createLabel();
170
- this.addDependent(this._oBindingLabel);
171
- TableUtils.Binding.metadataLoaded(oParent).then(function() {
172
- this._oBindingLabel.setText(oBinding.getPropertyLabel(this.getLeadingProperty()));
173
- }.bind(this));
161
+ try {
162
+ if (!oLabel) {
163
+ if (!this._oBindingLabel) {
164
+ var oParent = this.getParent();
165
+ if (isInstanceOfAnalyticalTable(oParent)) {
166
+ var oBinding = oParent.getBinding();
167
+ if (oBinding) {
168
+ this._oBindingLabel = TableUtils._getTableTemplateHelper().createLabel();
169
+ this.addDependent(this._oBindingLabel);
170
+ TableUtils.Binding.metadataLoaded(oParent).then(function() {
171
+ this._oBindingLabel.setText(oBinding.getPropertyLabel(this.getLeadingProperty()));
172
+ }.bind(this));
173
+ }
174
174
  }
175
175
  }
176
+ oLabel = this._oBindingLabel;
176
177
  }
177
- oLabel = this._oBindingLabel;
178
+ } catch (e) {
179
+ Log.warning(e);
178
180
  }
179
181
  return oLabel;
180
182
  };
@@ -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.117.1
23
+ * @version 1.119.0
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -43,7 +43,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
43
43
  AnalyticalColumnMenu.prototype._addMenuItems = function() {
44
44
  // when you add or remove menu items here, remember to update the hasItems function
45
45
  ColumnMenu.prototype._addMenuItems.apply(this);
46
- if (this._oColumn) {
46
+ if (this._getColumn()) {
47
47
  this._addSumMenuItem();
48
48
  }
49
49
  };
@@ -53,8 +53,8 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
53
53
  * @private
54
54
  */
55
55
  AnalyticalColumnMenu.prototype._addGroupMenuItem = function() {
56
- var oColumn = this._oColumn,
57
- oTable = this._oTable;
56
+ var oColumn = this._getColumn();
57
+ var oTable = this._getTable();
58
58
 
59
59
  if (oColumn.isGroupableByMenu()) {
60
60
  this._oGroupIcon = this._createMenuItem(
@@ -91,7 +91,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
91
91
  * @private
92
92
  */
93
93
  AnalyticalColumnMenu.prototype._addSumMenuItem = function() {
94
- var oColumn = this._oColumn;
94
+ var oColumn = this._getColumn();
95
95
 
96
96
  if (oColumn._isAggregatableByMenu()) {
97
97
  this._oSumItem = this._createMenuItem(
@@ -113,7 +113,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
113
113
  AnalyticalColumnMenu.prototype.open = function() {
114
114
  ColumnMenu.prototype.open.apply(this, arguments);
115
115
 
116
- var oColumn = this._oColumn;
116
+ var oColumn = this._getColumn();
117
117
  this._oSumItem && this._oSumItem.setIcon(oColumn.getSummed() ? "sap-icon://accept" : null);
118
118
  this._oGroupIcon && this._oGroupIcon.setIcon(oColumn.getGrouped() ? "sap-icon://accept" : null);
119
119
  };
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
58
58
  *
59
59
  * @extends sap.ui.table.Table
60
- * @version 1.117.1
60
+ * @version 1.119.0
61
61
  *
62
62
  * @constructor
63
63
  * @public
@@ -164,6 +164,21 @@ sap.ui.define([
164
164
  */
165
165
  dirty: {type: "boolean", group: "Appearance", defaultValue: null, deprecated: true}
166
166
  },
167
+ events: {
168
+ /**
169
+ * Fired when the table is grouped.
170
+ * @since 1.118
171
+ */
172
+ group: {
173
+ allowPreventDefault: true,
174
+ parameters: {
175
+ /**
176
+ * grouped column.
177
+ */
178
+ column: {type: "sap.ui.table.AnalyticalColumn"}
179
+ }
180
+ }
181
+ },
167
182
  designtime: "sap/ui/table/designtime/AnalyticalTable.designtime"
168
183
  }, renderer: TableRenderer});
169
184
 
@@ -751,19 +766,21 @@ sap.ui.define([
751
766
  };
752
767
 
753
768
  /**
754
- * Returns the context of a row by its index.
755
- *
756
- * @param {int} iIndex
757
- * Index of the row to return the context from.
758
- * @returns {sap.ui.model.Context} The context of a row by its index
759
- * @public
769
+ * @inheritDoc
760
770
  */
761
771
  AnalyticalTable.prototype.getContextByIndex = function(iIndex) {
762
- return iIndex >= 0 && this._oProxy.getContextByIndex(iIndex);
772
+ return this._oProxy.getContextByIndex(iIndex);
763
773
  };
764
774
 
775
+ /**
776
+ * Gets a node object by an index.
777
+ *
778
+ * @param {int} iIndex Index of the node
779
+ * @returns {undefined | object} Returns a node object if available.
780
+ * @private
781
+ */
765
782
  AnalyticalTable.prototype.getContextInfoByIndex = function(iIndex) {
766
- return iIndex >= 0 && this._oProxy.getNodeByIndex(iIndex);
783
+ return this._oProxy.getNodeByIndex(iIndex);
767
784
  };
768
785
 
769
786
  /**
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * @class
71
71
  * The column allows you to define column specific properties that will be applied when rendering the table.
72
72
  * @extends sap.ui.core.Element
73
- * @version 1.117.1
73
+ * @version 1.119.0
74
74
  *
75
75
  * @constructor
76
76
  * @public
@@ -216,8 +216,9 @@ sap.ui.define([
216
216
 
217
217
  /**
218
218
  * Indicates if the column is grouped.
219
+ * @deprecated As of version 1.118.
219
220
  */
220
- grouped: {type: "boolean", group: "Appearance", defaultValue: false},
221
+ grouped: {type: "boolean", group: "Appearance", defaultValue: false, deprecated: true},
221
222
 
222
223
  /**
223
224
  * Invisible controls are not rendered.
@@ -275,6 +276,8 @@ sap.ui.define([
275
276
  * Label of the column which is displayed in the column header. This aggregation is for the standard behavior,
276
277
  * where you only want to display one single row header. If a string is supplied, a default label control will be
277
278
  * created. Which control this is depends on the loaded libraries.
279
+ *
280
+ * <b>Note:</b> The <code>altType</code> string is deprecated as of version 1.118. Use a <code>Control</code> instead.
278
281
  */
279
282
  label: {type: "sap.ui.core.Control", altTypes: ["string"], multiple: false},
280
283
 
@@ -295,6 +298,8 @@ sap.ui.define([
295
298
  * The set of supported controls is limited. See section "{@link topic:148892ff9aea4a18b912829791e38f3e Tables: Which One Should I
296
299
  * Choose?}" in the documentation for more details. While it is technically possible to also use other controls, doing so might lead to
297
300
  * issues with regards to scrolling, alignment, condensed mode, screen reader support, and keyboard support.
301
+ *
302
+ * <b>Note:</b> The <code>altType</code> string is deprecated as of version 1.118. Use a <code>Control</code> instead.
298
303
  */
299
304
  template: {type: "sap.ui.core.Control", altTypes: ["string"], multiple: false},
300
305
 
@@ -441,7 +446,7 @@ sap.ui.define([
441
446
  this.getLabel().setText(vLabel);
442
447
  return this;
443
448
  }
444
- oLabel = library.TableHelper.createLabel({text: vLabel});
449
+ oLabel = TableUtils._getTableTemplateHelper().createLabel({text: vLabel});
445
450
  _private(this).bHasDefaultLabel = true;
446
451
  } else if (_private(this).bHasDefaultLabel) {
447
452
  this.destroyLabel();
@@ -473,7 +478,7 @@ sap.ui.define([
473
478
  this.getTemplate().bindProperty("text", vTemplate);
474
479
  bNewTemplate = false;
475
480
  } else {
476
- oTemplate = library.TableHelper.createTextView().bindProperty("text", vTemplate);
481
+ oTemplate = TableUtils._getTableTemplateHelper().createTextView().bindProperty("text", vTemplate);
477
482
  _private(this).bHasDefaulTemplate = true;
478
483
  }
479
484
  } else if (_private(this).bHasDefaulTemplate) {
@@ -636,6 +641,7 @@ sap.ui.define([
636
641
  * - sortProperty must be defined
637
642
  * - showFilterMenuEntry must be true (which is the default)
638
643
  *
644
+ * @deprecated As of version 1.118.
639
645
  * @returns {boolean}
640
646
  */
641
647
  Column.prototype.isGroupableByMenu = function() {
@@ -678,9 +684,6 @@ sap.ui.define([
678
684
  };
679
685
 
680
686
  Column.prototype._openHeaderMenu = function(oDomRef) {
681
- if (!oDomRef) {
682
- oDomRef = this.getDomRef();
683
- }
684
687
  var oHeaderMenu = this.getHeaderMenuInstance();
685
688
  /**
686
689
  * @deprecated As of Version 1.117
@@ -700,6 +703,10 @@ sap.ui.define([
700
703
  }
701
704
  };
702
705
 
706
+ /**
707
+ * @deprecated As of version 1.118.
708
+ * @private
709
+ */
703
710
  Column.prototype._setGrouped = function(bGrouped) {
704
711
  var oTable = this._getTable();
705
712
  oTable.setGroupBy(bGrouped ? this : null);
@@ -1003,7 +1010,14 @@ sap.ui.define([
1003
1010
  * @protected
1004
1011
  */
1005
1012
  Column.prototype.shouldRender = function() {
1006
- return this.getVisible() && !this.getGrouped() && this.getTemplate() != null;
1013
+ var bShouldRender = this.getVisible() && this.getTemplate() != null;
1014
+
1015
+ /**
1016
+ * @deprecated As of Version 1.118
1017
+ */
1018
+ bShouldRender = bShouldRender && !this.getGrouped();
1019
+
1020
+ return bShouldRender;
1007
1021
  };
1008
1022
 
1009
1023
  /*
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @class
40
40
  * The column menu provides all common actions that can be performed on a column.
41
41
  * @extends sap.ui.unified.Menu
42
- * @version 1.117.1
42
+ * @version 1.119.0
43
43
  *
44
44
  * @constructor
45
45
  * @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.117.1
35
+ * @version 1.119.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.117.1
138
+ * @version 1.119.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.117.1
38
+ * @version 1.119.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.117.1
27
+ * @version 1.119.0
28
28
  * @since 1.45
29
29
  *
30
30
  * @constructor
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * The <code>RowSettings</code> control allows you to configure a row.
25
25
  * You can only use this control in the context of the <code>sap.ui.table.Table</code> control to define row settings.
26
26
  * @extends sap.ui.core.Element
27
- * @version 1.117.1
27
+ * @version 1.119.0
28
28
  *
29
29
  * @constructor
30
30
  * @public