@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
@@ -23,9 +23,10 @@ sap.ui.define([
23
23
  "./extensions/Scrolling",
24
24
  "./extensions/DragAndDrop",
25
25
  "./TableRenderer",
26
- "./rowmodes/FixedRowMode",
27
- "./rowmodes/InteractiveRowMode",
28
- "./rowmodes/AutoRowMode",
26
+ "./rowmodes/Type",
27
+ "./rowmodes/Fixed",
28
+ "./rowmodes/Interactive",
29
+ "./rowmodes/Auto",
29
30
  "./plugins/SelectionModelSelection",
30
31
  "sap/ui/thirdparty/jquery",
31
32
  "sap/base/Log",
@@ -49,6 +50,7 @@ sap.ui.define([
49
50
  ScrollExtension,
50
51
  DragAndDropExtension,
51
52
  TableRenderer,
53
+ RowModeType,
52
54
  FixedRowMode,
53
55
  InteractiveRowMode,
54
56
  AutoRowMode,
@@ -92,7 +94,7 @@ sap.ui.define([
92
94
  * the data model and binding being used.
93
95
  * </p>
94
96
  * @extends sap.ui.core.Control
95
- * @version 1.117.1
97
+ * @version 1.119.0
96
98
  *
97
99
  * @constructor
98
100
  * @public
@@ -125,8 +127,10 @@ sap.ui.define([
125
127
  *
126
128
  * If no value is set (includes 0), a default height is applied based on the content density configuration. In any
127
129
  * <code>visibleRowCountMode</code>, the actual height can increase based on the content.
130
+ *
131
+ * @deprecated As of version 1.119, use the <code>rowMode</code> aggregation instead.
128
132
  */
129
- rowHeight: {type: "int", group: "Appearance", defaultValue: null},
133
+ rowHeight: {type: "int", group: "Appearance", defaultValue: null, deprecated: true},
130
134
 
131
135
  /**
132
136
  * Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the <code>rowHeight</code> property
@@ -148,8 +152,10 @@ sap.ui.define([
148
152
 
149
153
  /**
150
154
  * Number of visible rows of the table.
155
+ *
156
+ * @deprecated As of version 1.119, use the <code>rowMode</code> aggregation instead.
151
157
  */
152
- visibleRowCount: {type: "int", group: "Appearance", defaultValue: 10},
158
+ visibleRowCount: {type: "int", group: "Appearance", defaultValue: 10, deprecated: true},
153
159
 
154
160
  /**
155
161
  * First visible row.
@@ -235,7 +241,7 @@ sap.ui.define([
235
241
  * @see sap.ui.table.Table#setGroupBy
236
242
  * @deprecated As of version 1.110, this feature has a limited functionality and should not be used anymore.
237
243
  */
238
- enableGrouping: {type: "boolean", group: "Behavior", defaultValue: false},
244
+ enableGrouping: {type: "boolean", group: "Behavior", defaultValue: false, deprecated: true},
239
245
 
240
246
  /**
241
247
  * Flag to show or hide the column visibility menu. This menu will get displayed in each
@@ -270,14 +276,17 @@ sap.ui.define([
270
276
  * rendering. The user can change the <code>visibleRowCount</code> by dragging a resizer.
271
277
  *
272
278
  * @since 1.9.2
279
+ * @deprecated As of version 1.119, use the <code>rowMode</code> aggregation instead.
273
280
  */
274
- visibleRowCountMode: {type: "sap.ui.table.VisibleRowCountMode", group: "Appearance", defaultValue: VisibleRowCountMode.Fixed},
281
+ visibleRowCountMode: {type: "sap.ui.table.VisibleRowCountMode", group: "Appearance", defaultValue: VisibleRowCountMode.Fixed, deprecated: true},
275
282
 
276
283
  /**
277
284
  * This property is used to set the minimum count of visible rows when the property visibleRowCountMode is set to Auto or Interactive.
278
285
  * For any other visibleRowCountMode, it is ignored.
286
+ *
287
+ * @deprecated As of version 1.119, use the <code>rowMode</code> aggregation instead.
279
288
  */
280
- minAutoRowCount: {type: "int", group: "Appearance", defaultValue: 5},
289
+ minAutoRowCount: {type: "int", group: "Appearance", defaultValue: 5, deprecated: true},
281
290
 
282
291
  /**
283
292
  * Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally.
@@ -294,18 +303,17 @@ sap.ui.define([
294
303
  /**
295
304
  * Number of rows that are fix on the top. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.
296
305
  *
297
- * This property is only supported if the <code>rows</code> aggregation is bound to a {@link sap.ui.model.ClientModel client model}.
306
+ * @deprecated As of version 1.119, use the <code>rowMode</code> aggregation instead.
298
307
  */
299
- fixedRowCount: {type: "int", group: "Appearance", defaultValue: 0},
308
+ fixedRowCount: {type: "int", group: "Appearance", defaultValue: 0, deprecated: true},
300
309
 
301
310
  /**
302
311
  * Number of rows that are fix on the bottom. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.
303
312
  *
304
- * This property is only supported if the <code>rows</code> aggregation is bound to a {@link sap.ui.model.ClientModel client model}.
305
- *
306
313
  * @since 1.18.7
314
+ * @deprecated As of version 1.119, use the <code>rowMode</code> aggregation instead.
307
315
  */
308
- fixedBottomRowCount: {type: "int", group: "Appearance", defaultValue: 0},
316
+ fixedBottomRowCount: {type: "int", group: "Appearance", defaultValue: 0, deprecated: true},
309
317
 
310
318
  /**
311
319
  * Flag whether to show or hide the column menu item to freeze or unfreeze a column.
@@ -383,7 +391,9 @@ sap.ui.define([
383
391
  title: {type: "sap.ui.core.Control", altTypes: ["string"], multiple: false, deprecated: true},
384
392
 
385
393
  /**
386
- * Control or text of footer section of the Table (if not set it will be hidden)
394
+ * Control or text of footer section of the Table (if not set it will be hidden).
395
+ *
396
+ * <b>Note:</b> The <code>altType</code> string is deprecated as of version 1.118. Use a <code>Control</code> instead.
387
397
  */
388
398
  footer: {type: "sap.ui.core.Control", altTypes: ["string"], multiple: false},
389
399
 
@@ -429,15 +439,16 @@ sap.ui.define([
429
439
  */
430
440
  rows: {type: "sap.ui.table.Row", multiple: true, singularName: "row", bindable: "bindable", selector: "#{id}-tableCCnt", dnd: true},
431
441
 
432
- // TODO: should row modes be implemented as plugins?
433
- // TODO: The type should be sap.ui.table.rowmodes.RowMode, but then the build fails because RowMode is a private class.
434
442
  /**
435
- * Row mode
443
+ * Defines how the table handles the rows.
436
444
  *
437
- * @private
438
- * @ui5-restricted sap.ui.mdc
445
+ * @since 1.119
439
446
  */
440
- rowMode: {type: "sap.ui.core.Element", multiple: false, visibility: "hidden"},
447
+ rowMode: {
448
+ type: "sap.ui.table.rowmodes.RowMode",
449
+ multiple: false,
450
+ altTypes: ["sap.ui.table.rowmodes.Type"]
451
+ },
441
452
 
442
453
  /**
443
454
  * This row can be used for user input to create new data.
@@ -529,8 +540,9 @@ sap.ui.define([
529
540
  *
530
541
  * @experimental Since 1.28. This feature has a limited functionality.
531
542
  * @see sap.ui.table.Table#setEnableGrouping
543
+ * @deprecated As of version 1.110.
532
544
  */
533
- groupBy: {type: "sap.ui.table.Column", multiple: false},
545
+ groupBy: {type: "sap.ui.table.Column", multiple: false, deprecated: true},
534
546
 
535
547
  /**
536
548
  * Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby).
@@ -685,6 +697,7 @@ sap.ui.define([
685
697
 
686
698
  /**
687
699
  * fired when the table is grouped (experimental!).
700
+ * @deprecated As of version 1.118.
688
701
  */
689
702
  group: {
690
703
  allowPreventDefault: true,
@@ -693,7 +706,8 @@ sap.ui.define([
693
706
  * grouped column.
694
707
  */
695
708
  column: {type: "sap.ui.table.Column"}
696
- }
709
+ },
710
+ deprecated: true
697
711
  },
698
712
 
699
713
  /**
@@ -1029,12 +1043,12 @@ sap.ui.define([
1029
1043
  * @inheritDoc
1030
1044
  */
1031
1045
  Table.prototype.applySettings = function(mSettings, oScope) {
1032
- // The threshold must be set before the OData binding for the "rows" aggregation is initialized. If the metadata is already loaded, a
1033
- // getContexts call may be triggered immediately with the default threshold (100) instead of the one in the settings.
1046
+ // The threshold and firstVisibleRow must be set before the OData binding for the "rows" aggregation is initialized. If the metadata is
1047
+ // already loaded, a getContexts call may be triggered immediately with the default values instead of the one in the settings.
1034
1048
  // Some settings might rely on the existence of a row mode or plugin. If row modes and plugins are in the settings and applied before
1035
- // other settings, initialization of legacy row modes and plugins can be avoided.
1049
+ // other settings, initialization of default row modes and legacy selection plugins can be avoided.
1036
1050
  if (mSettings) {
1037
- var aEarlySettings = ["threshold", "rowMode", "plugins"];
1051
+ var aEarlySettings = ["threshold", "firstVisibleRow", "rowMode", "plugins"];
1038
1052
  var mEarlySettings = {};
1039
1053
 
1040
1054
  for (var i = 0; i < aEarlySettings.length; i++) {
@@ -1051,7 +1065,7 @@ sap.ui.define([
1051
1065
  }
1052
1066
  }
1053
1067
 
1054
- this._initLegacyRowMode();
1068
+ this._initDefaultRowMode();
1055
1069
  this._initLegacySelectionPlugin();
1056
1070
 
1057
1071
  Control.prototype.applySettings.call(this, mSettings, oScope);
@@ -1727,7 +1741,7 @@ sap.ui.define([
1727
1741
  Table.prototype.setTitle = function(vTitle) {
1728
1742
  var oTitle = vTitle;
1729
1743
  if (typeof (vTitle) === "string" || vTitle instanceof String) {
1730
- oTitle = library.TableHelper.createTextView({
1744
+ oTitle = TableUtils._getTableTemplateHelper().createTextView({
1731
1745
  text: vTitle
1732
1746
  });
1733
1747
  oTitle.addStyleClass("sapUiTableHdrTitle");
@@ -1742,7 +1756,7 @@ sap.ui.define([
1742
1756
  Table.prototype.setFooter = function(vFooter) {
1743
1757
  var oFooter = vFooter;
1744
1758
  if (typeof (vFooter) === "string" || vFooter instanceof String) {
1745
- oFooter = library.TableHelper.createTextView({
1759
+ oFooter = TableUtils._getTableTemplateHelper().createTextView({
1746
1760
  text: vFooter
1747
1761
  });
1748
1762
  }
@@ -2137,79 +2151,101 @@ sap.ui.define([
2137
2151
  */
2138
2152
  Table.prototype._onBindingChange = function(oEvent) {};
2139
2153
 
2140
- /*
2141
- * @see JSDoc generated by SAPUI5 control API generator
2142
- */
2143
- Table.prototype.setRowMode = function(oRowMode) {
2144
- this._destroyLegacyRowMode();
2145
- this.setAggregation("rowMode", oRowMode);
2146
- this._initLegacyRowMode();
2154
+ Table.prototype.setRowMode = function(vRowMode) {
2155
+ this._destroyDefaultRowMode();
2156
+ this.setAggregation("rowMode", vRowMode);
2157
+ this._initDefaultRowMode();
2158
+ return this;
2147
2159
  };
2148
2160
 
2149
- // this method can be removed when the aggregation is made public
2150
- Table.prototype.getRowMode = function() {
2151
- return this.getAggregation("rowMode");
2161
+ Table.prototype.destroyRowMode = function() {
2162
+ this.destroyAggregation("rowMode");
2163
+
2164
+ if (!this._oDefaultRowMode) {
2165
+ this._initDefaultRowMode();
2166
+ }
2167
+
2168
+ return this;
2152
2169
  };
2153
2170
 
2154
2171
  /**
2155
- * Gets the row mode of the table. If no row mode is set, a legacy row mode is returned.
2172
+ * Gets the row mode of the table. If no row mode instance is set, a default row mode is returned.
2156
2173
  *
2157
2174
  * @returns {sap.ui.table.rowmodes.RowMode} The row mode of the table.
2158
2175
  * @private
2159
2176
  */
2160
2177
  Table.prototype._getRowMode = function() {
2161
- var oRowMode = this.getRowMode() || this._oLegacyRowMode;
2178
+ var vRowMode = this.getRowMode();
2162
2179
 
2163
- if (!oRowMode) {
2164
- // To avoid null checks everywhere if the row mode is accessed after destroying the table.
2165
- this._initLegacyRowMode();
2166
- oRowMode = this._oLegacyRowMode;
2180
+ /**
2181
+ * @deprecated As of version 1.119
2182
+ */
2183
+ if (!this.isDestroyStarted() && !TableUtils.isA(vRowMode, "sap.ui.table.rowmodes.RowMode") && !this._oDefaultRowMode) {
2184
+ this._initDefaultRowMode();
2167
2185
  }
2168
2186
 
2169
- return oRowMode;
2187
+ return TableUtils.isA(vRowMode, "sap.ui.table.rowmodes.RowMode") ? vRowMode : this._oDefaultRowMode;
2170
2188
  };
2171
2189
 
2172
2190
  /**
2173
- * Initializes a legacy row mode based on the <code>visibleRowCountMode</code> property, if no row mode is set in the <code>rowMode</code>
2174
- * aggregation.
2191
+ * Initializes a row mode instance with default settings if no row mode instance exists.
2175
2192
  *
2176
2193
  * @private
2177
2194
  */
2178
- Table.prototype._initLegacyRowMode = function() {
2179
- if (this._oLegacyRowMode || this.getRowMode()) {
2180
- // No legacy row mode needs to be created if it already exists, or if a row mode is set.
2195
+ Table.prototype._initDefaultRowMode = function() {
2196
+ const vRowMode = this.getRowMode();
2197
+ const sRowMode = TableUtils.isA(vRowMode, "sap.ui.table.rowmodes.RowMode") ? undefined : vRowMode || RowModeType.Fixed;
2198
+
2199
+ // If row mode is an instance, a default is not needed.
2200
+ if (sRowMode === undefined || this._oDefaultRowMode) {
2181
2201
  return;
2182
2202
  }
2183
2203
 
2184
- this._oLegacyRowMode = createLegacyRowMode(this);
2185
- this.addAggregation("_hiddenDependents", this._oLegacyRowMode);
2186
- };
2204
+ /**
2205
+ * @deprecated As of version 1.119
2206
+ */
2207
+ if (vRowMode === null) {
2208
+ switch (this.getVisibleRowCountMode()) {
2209
+ case RowModeType.Fixed:
2210
+ this._oDefaultRowMode = new FixedRowMode(true);
2211
+ break;
2212
+ case RowModeType.Interactive:
2213
+ this._oDefaultRowMode = new InteractiveRowMode(true);
2214
+ break;
2215
+ case RowModeType.Auto:
2216
+ this._oDefaultRowMode = new AutoRowMode(true);
2217
+ break;
2218
+ default:
2219
+ throw new Error("Default row mode could not be created");
2220
+ }
2187
2221
 
2188
- Table.prototype._destroyLegacyRowMode = function() {
2189
- if (this._oLegacyRowMode) {
2190
- this._oLegacyRowMode.destroy();
2191
- delete this._oLegacyRowMode;
2222
+ this.addAggregation("_hiddenDependents", this._oDefaultRowMode);
2223
+ return;
2192
2224
  }
2193
- };
2194
-
2195
- function createLegacyRowMode(oTable) {
2196
- var oRowMode;
2197
2225
 
2198
- switch (oTable.getVisibleRowCountMode()) {
2199
- case VisibleRowCountMode.Fixed:
2200
- oRowMode = new FixedRowMode(true);
2226
+ switch (sRowMode) {
2227
+ case RowModeType.Fixed:
2228
+ this._oDefaultRowMode = new FixedRowMode();
2201
2229
  break;
2202
- case VisibleRowCountMode.Interactive:
2203
- oRowMode = new InteractiveRowMode(true);
2230
+ case RowModeType.Interactive:
2231
+ this._oDefaultRowMode = new InteractiveRowMode();
2204
2232
  break;
2205
- case VisibleRowCountMode.Auto:
2206
- oRowMode = new AutoRowMode(true);
2233
+ case RowModeType.Auto:
2234
+ this._oDefaultRowMode = new AutoRowMode();
2207
2235
  break;
2208
2236
  default:
2237
+ throw new Error("Default row mode could not be created");
2209
2238
  }
2210
2239
 
2211
- return oRowMode;
2212
- }
2240
+ this.addAggregation("_hiddenDependents", this._oDefaultRowMode);
2241
+ };
2242
+
2243
+ Table.prototype._destroyDefaultRowMode = function() {
2244
+ if (this._oDefaultRowMode) {
2245
+ this._oDefaultRowMode.destroy();
2246
+ delete this._oDefaultRowMode;
2247
+ }
2248
+ };
2213
2249
 
2214
2250
  /**
2215
2251
  * Gets the numbers of scrollable and fixed rows as they are currently computed by the row mode that is applied to the table.
@@ -2233,9 +2269,6 @@ sap.ui.define([
2233
2269
  return mRowCounts;
2234
2270
  };
2235
2271
 
2236
- /*
2237
- * @see JSDoc generated by SAPUI5 control API generator
2238
- */
2239
2272
  Table.prototype.setVisibleRowCountMode = function(sVisibleRowCountMode) {
2240
2273
  if (this.getRowMode()) {
2241
2274
  Log.warning("If the \"rowMode\" aggregation is set, setting the \"visibleRowCountMode\" has no effect");
@@ -2247,16 +2280,13 @@ sap.ui.define([
2247
2280
  var sNewVisibleRowCountMode = this.getVisibleRowCountMode();
2248
2281
 
2249
2282
  if (sNewVisibleRowCountMode !== sOldVisibleRowCountMode) {
2250
- this._destroyLegacyRowMode();
2251
- this._initLegacyRowMode();
2283
+ this._destroyDefaultRowMode();
2284
+ this._initDefaultRowMode();
2252
2285
  }
2253
2286
 
2254
2287
  return this;
2255
2288
  };
2256
2289
 
2257
- /*
2258
- * @see JSDoc generated by SAPUI5 control API generator
2259
- */
2260
2290
  Table.prototype.setVisibleRowCount = function(iVisibleRowCount) {
2261
2291
  var sVisibleRowCountMode = this.getVisibleRowCountMode();
2262
2292
  if (sVisibleRowCountMode == VisibleRowCountMode.Auto) {
@@ -3271,19 +3301,31 @@ sap.ui.define([
3271
3301
  /**
3272
3302
  * Returns the context of a row by its index. Please note that for server-based models like OData,
3273
3303
  * the supplied index might not have been loaded yet. If the context is not available at the client,
3274
- * the binding will trigger a backend request and request this single context. Although this API
3304
+ * the binding may trigger a backend request and request this single context. Although this API
3275
3305
  * looks synchronous it may not return a context but load it and fire a change event on the binding.
3276
3306
  *
3277
3307
  * For server-based models you should consider to only make this API call when the index is within
3278
3308
  * the currently visible scroll area.
3279
3309
  *
3280
3310
  * @param {int} iIndex Index of the row to return the context from.
3281
- * @returns {sap.ui.model.Context | null} The context at this index or <code>null</code>
3311
+ * @returns {sap.ui.model.Context | null} The context at this index if available
3282
3312
  * @public
3283
3313
  */
3284
3314
  Table.prototype.getContextByIndex = function(iIndex) {
3285
3315
  var oBinding = this.getBinding();
3286
- return iIndex >= 0 && oBinding ? oBinding.getContexts(iIndex, 1, 0, true)[0] : null;
3316
+ var oContext = null;
3317
+
3318
+ if (!oBinding || iIndex < 0) {
3319
+ return oContext;
3320
+ }
3321
+
3322
+ if (oBinding.getContextByIndex) {
3323
+ oContext = oBinding.getContextByIndex(iIndex);
3324
+ } else {
3325
+ oContext = oBinding.getContexts(iIndex, 1, 0, true)[0];
3326
+ }
3327
+
3328
+ return oContext || null;
3287
3329
  };
3288
3330
 
3289
3331
  // =============================================================================
@@ -3452,6 +3494,8 @@ sap.ui.define([
3452
3494
 
3453
3495
  /*
3454
3496
  * @see JSDoc generated by SAPUI5 control API generator
3497
+ *
3498
+ * @deprecated As of version 1.118.
3455
3499
  */
3456
3500
  Table.prototype.setGroupBy = function(vValue) {
3457
3501
  var oGroupByColumn = vValue;
@@ -3517,6 +3561,7 @@ sap.ui.define([
3517
3561
 
3518
3562
  /*
3519
3563
  * @see JSDoc generated by SAPUI5 control API generator
3564
+ * @deprecated As of version 1.118.
3520
3565
  */
3521
3566
  Table.prototype.setEnableGrouping = function(bEnableGrouping) {
3522
3567
  var oGroupedByColumn = sap.ui.getCore().byId(this.getGroupBy());
@@ -3610,9 +3655,6 @@ sap.ui.define([
3610
3655
  return this;
3611
3656
  };
3612
3657
 
3613
- /*
3614
- * @see JSDoc generated by SAPUI5 control API generator
3615
- */
3616
3658
  Table.prototype.setFixedRowCount = function(iFixedRowCount) {
3617
3659
  if (!(parseInt(iFixedRowCount) >= 0)) {
3618
3660
  Log.error("Number of fixed rows must be greater or equal 0", this);
@@ -3633,9 +3675,6 @@ sap.ui.define([
3633
3675
  return this.setProperty("fixedRowCount", iFixedRowCount);
3634
3676
  };
3635
3677
 
3636
- /*
3637
- * @see JSDoc generated by SAPUI5 control API generator
3638
- */
3639
3678
  Table.prototype.setFixedBottomRowCount = function(iFixedRowCount) {
3640
3679
  if (!(parseInt(iFixedRowCount) >= 0)) {
3641
3680
  Log.error("Number of fixed bottom rows must be greater or equal 0", this);
@@ -4176,6 +4215,10 @@ sap.ui.define([
4176
4215
  Table.prototype._initSelectionPlugin = function() {
4177
4216
  var oSelectionPlugin = this.getPlugin("sap.ui.table.plugins.SelectionPlugin");
4178
4217
 
4218
+ if (this.isDestroyed() || this.isDestroyStarted()) {
4219
+ return;
4220
+ }
4221
+
4179
4222
  if (oSelectionPlugin) {
4180
4223
  this._destroyLegacySelectionPlugin();
4181
4224
 
@@ -4348,6 +4391,7 @@ sap.ui.define([
4348
4391
 
4349
4392
  Table.prototype.onRowsUpdated = function(mParameters) {
4350
4393
  TableUtils.Grouping.updateGroups(this);
4394
+ TableUtils.Menu.closeContentCellContextMenu(this);
4351
4395
  this._getAccExtension()._updateAriaRowIndices();
4352
4396
  this._updateSelection();
4353
4397
  updateNoData(this);
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.base.ManagedObject
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.117.1
36
+ * @version 1.119.0
37
37
  * @since 1.21.1
38
38
  *
39
39
  * @constructor
@@ -10,11 +10,8 @@ sap.ui.define(['sap/ui/Device', './library', "./Column", './utils/TableUtils', "
10
10
  function(Device, library, Column, TableUtils, ExtensionBase, Renderer, IconPool, Log) {
11
11
  "use strict";
12
12
 
13
- // shortcuts
14
- var VisibleRowCountMode = library.VisibleRowCountMode;
15
13
  var SortOrder = library.SortOrder;
16
14
  var ColumnUtils = TableUtils.Column;
17
-
18
15
  var mFlexCellContentAlignment = {
19
16
  Begin: "flex-start",
20
17
  End: "flex-end",
@@ -73,10 +70,17 @@ sap.ui.define(['sap/ui/Device', './library', "./Column", './utils/TableUtils', "
73
70
  rm.class("sapUiTableRowHighlights"); // show row highlights
74
71
  }
75
72
 
76
- // This class flags whether the sap.m. library is loaded or not.
77
- var sSapMTableClass = library.TableHelper.addTableClass();
78
- if (sSapMTableClass) {
79
- rm.class(sSapMTableClass);
73
+ /**
74
+ * @deprecated As of version 1.118
75
+ */
76
+ try {
77
+ // This class flags whether the sap.m. library is loaded or not.
78
+ var sSapMTableClass = TableUtils._getTableTemplateHelper(true).addTableClass();
79
+ if (sSapMTableClass) {
80
+ rm.class(sSapMTableClass);
81
+ }
82
+ } catch (e) {
83
+ // ignore
80
84
  }
81
85
 
82
86
  var oScrollExtension = oTable._getScrollExtension();
@@ -191,17 +195,10 @@ sap.ui.define(['sap/ui/Device', './library', "./Column", './utils/TableUtils', "
191
195
  this.renderFooter(rm, oTable, oTable.getFooter());
192
196
  }
193
197
 
194
- // TODO: Move to "renderTableChildAtBottom" hook in row modes
195
- if (oTable.getVisibleRowCountMode() == VisibleRowCountMode.Interactive) {
196
- this.renderVariableHeight(rm, oTable);
197
- }
198
-
199
- // TODO: Move to "renderTableChildAtBottom" hook in row modes
200
- this.renderBottomPlaceholder(rm, oTable);
198
+ oTable._getRowMode().renderInTableBottomArea(rm);
201
199
 
202
200
  rm.close("div");
203
201
 
204
- //oTable._getRowMode().renderTableChildAtBottom(rm);
205
202
  this.renderTabElement(rm, "sapUiTableOuterAfter");
206
203
  rm.close("div");
207
204
  };
@@ -328,29 +325,6 @@ sap.ui.define(['sap/ui/Device', './library', "./Column", './utils/TableUtils', "
328
325
  rm.close("div");
329
326
  };
330
327
 
331
- TableRenderer.renderVariableHeight = function(rm, oTable) {
332
- rm.openStart("div", oTable.getId() + "-sb");
333
- rm.attr("tabindex", "-1");
334
- rm.class("sapUiTableHeightResizer");
335
- rm.style("height", "5px");
336
- rm.openEnd();
337
- rm.close("div");
338
- };
339
-
340
- TableRenderer.renderBottomPlaceholder = function(rm, oTable) {
341
- var mPlaceholderHeight = oTable._getRowMode().getTableBottomPlaceholderStyles();
342
-
343
- if (mPlaceholderHeight === undefined) {
344
- return;
345
- }
346
-
347
- rm.openStart("div", oTable.getId() + "-placeholder-bottom");
348
- rm.class("sapUiTablePlaceholder");
349
- oTable._getRowMode().applyTableBottomPlaceholderStyles(rm);
350
- rm.openEnd();
351
- rm.close("div");
352
- };
353
-
354
328
  // =============================================================================
355
329
  // COLUMN HEADER OF THE TABLE
356
330
  // =============================================================================
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @class
43
43
  * The TreeTable control provides a comprehensive set of features to display hierarchical data.
44
44
  * @extends sap.ui.table.Table
45
- * @version 1.117.1
45
+ * @version 1.119.0
46
46
  *
47
47
  * @constructor
48
48
  * @public
@@ -461,6 +461,9 @@ sap.ui.define([
461
461
  * @name sap.ui.table.TreeTable#selectAll
462
462
  */
463
463
 
464
+ /**
465
+ * @inheritDoc
466
+ */
464
467
  TreeTable.prototype.getContextByIndex = function(iRowIndex) {
465
468
  return this._oProxy.getContextByIndex(iRowIndex);
466
469
  };
@@ -10,7 +10,7 @@ sap.ui.define(function() {
10
10
 
11
11
  return {
12
12
  domRef: function(oTable) {
13
- if (oTable._getRowMode().isA("sap.ui.table.rowmodes.AutoRowMode")) {
13
+ if (oTable._getRowMode().isA("sap.ui.table.rowmodes.Auto")) {
14
14
  //control domRef has height:0px set, but footer & scrollbar is missing
15
15
  return oTable.$("sapUiTableCnt").get(0);
16
16
  }
@@ -954,7 +954,7 @@ sap.ui.define([
954
954
  * @class Extension for sap.ui.table.Table which handles ACC related things.
955
955
  * @extends sap.ui.table.extensions.ExtensionBase
956
956
  * @author SAP SE
957
- * @version 1.117.1
957
+ * @version 1.119.0
958
958
  * @constructor
959
959
  * @private
960
960
  * @alias sap.ui.table.extensions.Accessibility
@@ -1127,11 +1127,12 @@ sap.ui.define([
1127
1127
 
1128
1128
  var oTable = this.getTable();
1129
1129
  var aRows = oTable.getRows();
1130
- var oRow, i;
1130
+ var oRow, i, $Ref;
1131
1131
 
1132
1132
  for (i = 0; i < aRows.length; i++) {
1133
1133
  oRow = aRows[i];
1134
- oRow.getDomRefs(true).row.attr("aria-rowindex", ExtensionHelper.getRowIndex(oRow));
1134
+ $Ref = oRow.getDomRefs(true);
1135
+ $Ref.row.not($Ref.rowHeaderPart).not($Ref.rowActionPart).attr("aria-rowindex", ExtensionHelper.getRowIndex(oRow));
1135
1136
  }
1136
1137
  };
1137
1138
 
@@ -1296,7 +1297,7 @@ sap.ui.define([
1296
1297
  var bIsSelected = oTable._getSelectionPlugin().isSelected(oRow);
1297
1298
 
1298
1299
  if ($Ref.row) {
1299
- $Ref.row.add($Ref.row.children(".sapUiTableCell")).attr("aria-selected", bIsSelected ? "true" : "false");
1300
+ $Ref.row.not($Ref.rowHeaderPart).not($Ref.rowActionPart).add($Ref.row.children(".sapUiTableCell")).attr("aria-selected", bIsSelected ? "true" : "false");
1300
1301
  }
1301
1302
 
1302
1303
  if (!bIsSelected) {
@@ -1334,7 +1335,7 @@ sap.ui.define([
1334
1335
  });
1335
1336
  }
1336
1337
 
1337
- oDomRefs.row.attr({
1338
+ oDomRefs.row.not(oDomRefs.rowHeaderPart).not(oDomRefs.rowActionPart).attr({
1338
1339
  "aria-expanded": oRow.isExpandable() ? oRow.isExpanded() + "" : null,
1339
1340
  "aria-level": oRow.getLevel()
1340
1341
  });
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @class Extension for sap.ui.table.TableRenderer which handles ACC related things.
43
43
  * @extends sap.ui.table.extensions.ExtensionBase
44
44
  * @author SAP SE
45
- * @version 1.117.1
45
+ * @version 1.119.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @alias sap.ui.table.extensions.AccessibilityRender
@@ -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.117.1
277
+ * @version 1.119.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.117.1
22
+ * @version 1.119.0
23
23
  * @constructor
24
24
  * @private
25
25
  * @alias sap.ui.table.extensions.ExtensionBase
@@ -267,7 +267,7 @@ sap.ui.define([
267
267
  * @class Extension for sap.ui.table.Table which handles keyboard related things.
268
268
  * @extends sap.ui.table.extensions.ExtensionBase
269
269
  * @author SAP SE
270
- * @version 1.117.1
270
+ * @version 1.119.0
271
271
  * @constructor
272
272
  * @private
273
273
  * @alias sap.ui.table.extensions.Keyboard