@openui5/sap.ui.table 1.94.0 → 1.97.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 (52) hide show
  1. package/.reuse/dep5 +12 -12
  2. package/THIRDPARTY.txt +21 -17
  3. package/package.json +3 -3
  4. package/src/sap/ui/table/.library +1 -1
  5. package/src/sap/ui/table/AnalyticalColumn.js +1 -1
  6. package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
  7. package/src/sap/ui/table/AnalyticalTable.js +4 -4
  8. package/src/sap/ui/table/Column.js +29 -6
  9. package/src/sap/ui/table/ColumnMenu.js +3 -1
  10. package/src/sap/ui/table/CreationRow.js +1 -1
  11. package/src/sap/ui/table/Row.js +1 -1
  12. package/src/sap/ui/table/RowAction.js +1 -1
  13. package/src/sap/ui/table/RowActionItem.js +1 -1
  14. package/src/sap/ui/table/RowSettings.js +3 -2
  15. package/src/sap/ui/table/Table.js +7 -11
  16. package/src/sap/ui/table/TablePersoController.js +1 -1
  17. package/src/sap/ui/table/TableRenderer.js +2 -2
  18. package/src/sap/ui/table/TreeTable.js +2 -2
  19. package/src/sap/ui/table/extensions/Accessibility.js +45 -26
  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 +6 -2
  24. package/src/sap/ui/table/extensions/KeyboardDelegate.js +1 -1
  25. package/src/sap/ui/table/extensions/Pointer.js +1 -1
  26. package/src/sap/ui/table/extensions/Scrolling.js +136 -129
  27. package/src/sap/ui/table/extensions/ScrollingIOS.js +2 -2
  28. package/src/sap/ui/table/extensions/Synchronization.js +1 -1
  29. package/src/sap/ui/table/library.js +10 -10
  30. package/src/sap/ui/table/messagebundle_fr.properties +1 -1
  31. package/src/sap/ui/table/messagebundle_it.properties +3 -3
  32. package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
  33. package/src/sap/ui/table/plugins/PluginBase.js +1 -1
  34. package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
  35. package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -1
  36. package/src/sap/ui/table/plugins/V4Aggregation.js +1 -1
  37. package/src/sap/ui/table/rowmodes/AutoRowMode.js +16 -1
  38. package/src/sap/ui/table/rowmodes/FixedRowMode.js +16 -1
  39. package/src/sap/ui/table/rowmodes/InteractiveRowMode.js +23 -9
  40. package/src/sap/ui/table/rowmodes/RowMode.js +5 -4
  41. package/src/sap/ui/table/rowmodes/VariableRowMode.js +1 -1
  42. package/src/sap/ui/table/themes/base/Cell.less +4 -13
  43. package/src/sap/ui/table/themes/base/Grouping.less +22 -3
  44. package/src/sap/ui/table/themes/base/Table.less +2 -2
  45. package/src/sap/ui/table/themes/base/library.source.less +2 -1
  46. package/src/sap/ui/table/utils/TableUtils.js +19 -5
  47. package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
  48. package/src/sap/ui/table/utils/_ColumnUtils.js +1 -1
  49. package/src/sap/ui/table/utils/_GroupingUtils.js +7 -1
  50. package/src/sap/ui/table/utils/_HookUtils.js +1 -1
  51. package/src/sap/ui/table/utils/_MenuUtils.js +1 -1
  52. package/ui5.yaml +4 -1
package/.reuse/dep5 CHANGED
@@ -309,7 +309,7 @@ License: MIT
309
309
  Comment: these files belong to: lodash
310
310
 
311
311
  Files: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
312
- Copyright: 2018 Mathias Nater
312
+ Copyright: 2021 Mathias Nater
313
313
  License: MIT
314
314
  Comment: these files belong to: Hyphenopoly
315
315
 
@@ -347,11 +347,6 @@ Copyright: 2013 Ariya Hidayat and other contributors
347
347
  License: BSD-2-Clause
348
348
  Comment: these files belong to: Esprima
349
349
 
350
- Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
351
- Copyright: 2006 Google Inc.
352
- License: Apache-2.0
353
- Comment: these files belong to: google-code-prettify
354
-
355
350
  Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/highlight.js/*
356
351
  Copyright: 2006-2020, Ivan Sagalaev
357
352
  License: BSD-3-Clause
@@ -405,6 +400,11 @@ Copyright: 2014 Vitaly Puzrin, Alex Kocharin
405
400
  License: MIT
406
401
  Comment: these files belong to: Markdown-it
407
402
 
403
+ Files: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
404
+ Copyright: 2015-2017 Evgeny Poberezkin
405
+ License: MIT
406
+ Comment: these files belong to: ajv
407
+
408
408
 
409
409
  # Library: sap.ui.mdc:
410
410
 
@@ -418,7 +418,7 @@ Comment: these files contain content from SAP and BooleanExpressionEvaluator: Bo
418
418
 
419
419
  # Library: sap.ui.webc.common:
420
420
 
421
- Files: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theme-base/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.*
421
+ Files: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theming/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.* src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-business-suite/*.*
422
422
  Copyright: SAP
423
423
  License: Apache-2.0
424
424
  Comment: these files belong to: UI5 Web Components
@@ -452,11 +452,6 @@ Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
452
452
  License: Apache-2.0
453
453
  Comment: these files belong to: LESS
454
454
 
455
- Files: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
456
- Copyright: 2015-2017 Evgeny Poberezkin
457
- License: MIT
458
- Comment: these files belong to: ajv
459
-
460
455
  Files: lib/jsdoc/ui5/plugin.js
461
456
  Copyright:
462
457
  2009-2021 SAP SE or an SAP affiliate company and OpenUI5 contributors
@@ -464,3 +459,8 @@ Copyright:
464
459
  License: Apache-2.0
465
460
  Comment: these files contain content from SAP and JSDoc 3: plugin.js is overall written by SAP, but contains code taken from JSDoc 3.6.7 (see the respective comments)
466
461
 
462
+ Files: src/sap.ui.core/src/sap/ui/core/themes/base/base.less src/themelib_sap_belize/src/sap/ui/core/themes/*/base.less src/themelib_sap_fiori_3/src/sap/ui/core/themes/*/base.less src/themelib_sap_horizon/src/sap/ui/core/themes/*/base.less
463
+ Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
464
+ License: Apache-2.0
465
+ Comment: these files belong to: SAP Theming Base Content
466
+
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.ui.codeeditor:
8
8
 
9
- Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.4
9
+ Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.13
10
10
  Copyright: 2010, Ajax.org B.V.
11
11
  License: BSD-3-Clause
12
12
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
@@ -197,7 +197,7 @@ License: BSD-3-Clause
197
197
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
198
198
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/sinon-qunit.js
199
199
 
200
- Component: URI.js, version: 1.19.6
200
+ Component: URI.js, version: 1.19.7
201
201
  Copyright: Rodney Rehm
202
202
  License: MIT
203
203
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
@@ -279,8 +279,8 @@ License: MIT
279
279
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
280
280
  Contained in: src/sap.ui.core/src/sap/ui/base/util/restricted/_/lodash.custom.js
281
281
 
282
- Component: Hyphenopoly, version: 2.4.0
283
- Copyright: 2018 Mathias Nater
282
+ Component: Hyphenopoly, version: 3.4.0
283
+ Copyright: 2021 Mathias Nater
284
284
  License: MIT
285
285
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
286
286
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
@@ -324,12 +324,6 @@ License: BSD-2-Clause
324
324
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-2-Clause.txt
325
325
  Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/esprima.js
326
326
 
327
- Component: google-code-prettify, version: 20130304
328
- Copyright: 2006 Google Inc.
329
- License: Apache-2.0
330
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
331
- Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
332
-
333
327
  Component: highlight.js, version: 10.4.1
334
328
  Copyright: 2006-2020, Ivan Sagalaev
335
329
  License: BSD-3-Clause
@@ -395,6 +389,12 @@ License: MIT
395
389
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
396
390
  Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/markdown-it.js
397
391
 
392
+ Component: ajv, version: 6.12.3
393
+ Copyright: 2015-2017 Evgeny Poberezkin
394
+ License: MIT
395
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
396
+ Contained in: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
397
+
398
398
 
399
399
  Library: sap.ui.mdc:
400
400
 
@@ -412,10 +412,11 @@ Copyright: SAP
412
412
  License: Apache-2.0
413
413
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
414
414
  Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/*.*
415
- src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theme-base/*.*
415
+ src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theming/*.*
416
416
  src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/*.*
417
417
  src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/*.*
418
418
  src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/*.*
419
+ src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-business-suite/*.*
419
420
 
420
421
  Component: lit-html, version: 1.4.1
421
422
  Copyright: Google LLC
@@ -450,18 +451,21 @@ License: Apache-2.0
450
451
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
451
452
  Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
452
453
 
453
- Component: ajv, version: 6.12.3
454
- Copyright: 2015-2017 Evgeny Poberezkin
455
- License: MIT
456
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
457
- Contained in: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
458
-
459
454
  Component: JSDoc 3, version: 3.6.7
460
455
  Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
461
456
  License: Apache-2.0
462
457
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
463
458
  Contained in: lib/jsdoc/ui5/plugin.js
464
459
 
460
+ Component: SAP Theming Base Content, version: 11.1.34
461
+ Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
462
+ License: Apache-2.0
463
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
464
+ Contained in: src/sap.ui.core/src/sap/ui/core/themes/base/base.less
465
+ src/themelib_sap_belize/src/sap/ui/core/themes/*/base.less
466
+ src/themelib_sap_fiori_3/src/sap/ui/core/themes/*/base.less
467
+ src/themelib_sap_horizon/src/sap/ui/core/themes/*/base.less
468
+
465
469
 
466
470
  ALL LICENSE TEXTS:
467
471
  ==================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.table",
3
- "version": "1.94.0",
3
+ "version": "1.97.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.94.0",
18
- "@openui5/sap.ui.unified": "1.94.0"
17
+ "@openui5/sap.ui.core": "1.97.0",
18
+ "@openui5/sap.ui.unified": "1.97.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.94.0</version>
9
+ <version>1.97.0</version>
10
10
 
11
11
  <documentation>Table-like controls, mainly for desktop scenarios.</documentation>
12
12
 
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @extends sap.ui.table.Column
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.94.0
49
+ * @version 1.97.0
50
50
  *
51
51
  * @constructor
52
52
  * @public
@@ -23,7 +23,7 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './library', "sap/
23
23
  * @extends sap.ui.table.ColumnMenu
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.94.0
26
+ * @version 1.97.0
27
27
  *
28
28
  * @constructor
29
29
  * @public
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  * @see http://scn.sap.com/docs/DOC-44986
61
61
  *
62
62
  * @extends sap.ui.table.Table
63
- * @version 1.94.0
63
+ * @version 1.97.0
64
64
  *
65
65
  * @constructor
66
66
  * @public
@@ -423,8 +423,8 @@ sap.ui.define([
423
423
  if (this._aGroupedColumns.indexOf(oColumn.getId()) > -1) {
424
424
  continue;
425
425
  }
426
- // eslint-disable-next-line no-unsafe-negation
427
- if (!oColumn instanceof AnalyticalColumn) {
426
+
427
+ if (!(oColumn instanceof AnalyticalColumn)) {
428
428
  Log.error("You have to use AnalyticalColumns for the Analytical table");
429
429
  }
430
430
 
@@ -1146,7 +1146,7 @@ sap.ui.define([
1146
1146
  * Invisible nodes (collapsed child nodes) will not be taken into account.
1147
1147
  *
1148
1148
  * Please also take notice of the fact, that "addSelectionInterval" does not change any other selection.
1149
- * To override the current selection, please use "setSelctionInterval" or for a single entry use "setSelectedIndex".
1149
+ * To override the current selection, please use "setSelectionInterval" or for a single entry use "setSelectedIndex".
1150
1150
  *
1151
1151
  * @param {int} iFromIndex The starting index of the range which will be selected.
1152
1152
  * @param {int} iToIndex The starting index of the range which will be selected.
@@ -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.94.0
73
+ * @version 1.97.0
74
74
  *
75
75
  * @constructor
76
76
  * @public
@@ -357,6 +357,8 @@ sap.ui.define([
357
357
 
358
358
  _private(this).oSorter = null;
359
359
  _private(this).mCellContentVisibilitySettings = normalizeCellContentVisibilitySettings(this);
360
+ _private(this).bHasDefaultLabel = false;
361
+ _private(this).bHasDefaultTemplate = false;
360
362
 
361
363
  // for performance reasons, the cloned column templates shall be stored for later reuse
362
364
  this._initTemplateClonePool();
@@ -436,11 +438,20 @@ sap.ui.define([
436
438
  */
437
439
  Column.prototype.setLabel = function(vLabel) {
438
440
  var oLabel = vLabel;
439
- if (typeof (vLabel) === "string") {
441
+
442
+ if (typeof vLabel === "string") {
443
+ if (_private(this).bHasDefaultLabel) {
444
+ this.getLabel().setText(vLabel);
445
+ return this;
446
+ }
440
447
  oLabel = library.TableHelper.createLabel({text: vLabel});
448
+ _private(this).bHasDefaultLabel = true;
449
+ } else if (_private(this).bHasDefaultLabel) {
450
+ this.destroyLabel();
451
+ _private(this).bHasDefaultLabel = false;
441
452
  }
442
- this.setAggregation("label", oLabel);
443
- return this;
453
+
454
+ return this.setAggregation("label", oLabel);
444
455
  };
445
456
 
446
457
  /*
@@ -450,12 +461,24 @@ sap.ui.define([
450
461
  var oTemplate = vTemplate;
451
462
  var oTable = this._getTable();
452
463
  var oOldTemplate = this.getTemplate();
464
+ var bNewTemplate = true;
453
465
 
454
466
  if (typeof vTemplate === "string") {
455
- oTemplate = library.TableHelper.createTextView().bindProperty("text", vTemplate);
467
+ if (_private(this).bHasDefaulTemplate) {
468
+ this.getTemplate().bindProperty("text", vTemplate);
469
+ bNewTemplate = false;
470
+ } else {
471
+ oTemplate = library.TableHelper.createTextView().bindProperty("text", vTemplate);
472
+ _private(this).bHasDefaulTemplate = true;
473
+ }
474
+ } else if (_private(this).bHasDefaulTemplate) {
475
+ this.destroyTemplate();
476
+ _private(this).bHasDefaulTemplate = false;
456
477
  }
457
478
 
458
- this.setAggregation("template", oTemplate, true);
479
+ if (bNewTemplate) {
480
+ this.setAggregation("template", oTemplate, true);
481
+ }
459
482
 
460
483
  // manually invalidate the Column (because of the invalidate decoupling to
461
484
  // prevent invalidations from the databinding part)
@@ -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.94.0
43
+ * @version 1.97.0
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -510,6 +510,8 @@ sap.ui.define([
510
510
  aSubmenuItems = oSubmenu.getItems();
511
511
  aSubmenuItems[i].setProperty("icon", sIcon);
512
512
  aSubmenuItems[i].setEnabled(!bVisible || aVisibleColumns.length > 1);
513
+ aSubmenuItems[i].removeAllAriaLabelledBy();
514
+ aSubmenuItems[i].addAriaLabelledBy(oTable.getId() + (bVisible ? "-ariahidecolmenu" : "-ariashowcolmenu"));
513
515
  }
514
516
 
515
517
  for (var i = aSubmenuItems.length; i > aColumns.length; i--) {
@@ -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.94.0
35
+ * @version 1.97.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.94.0
138
+ * @version 1.97.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.94.0
38
+ * @version 1.97.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.94.0
27
+ * @version 1.97.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.94.0
27
+ * @version 1.97.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -55,7 +55,8 @@ sap.ui.define([
55
55
  highlight : {type : "string", group : "Appearance", defaultValue : "None"},
56
56
 
57
57
  /**
58
- * Defines the semantics of the {@link sap.ui.table.RowSettings#setHighlight highlight} property for accessibility purposes.
58
+ * Defines the semantics of the {@link sap.ui.table.RowSettings#setHighlight highlight} property for accessibility purposes. It is
59
+ * only used as an invisible text for screen reader support and does not add a tooltip to the highlight.
59
60
  *
60
61
  * @since 1.62
61
62
  */
@@ -94,7 +94,7 @@ sap.ui.define([
94
94
  * the data model and binding being used.
95
95
  * </p>
96
96
  * @extends sap.ui.core.Control
97
- * @version 1.94.0
97
+ * @version 1.97.0
98
98
  *
99
99
  * @constructor
100
100
  * @public
@@ -1109,7 +1109,7 @@ sap.ui.define([
1109
1109
  var bLangChanged = oChanges.hasOwnProperty("language");
1110
1110
  this._adaptLocalization(bRtlChanged, bLangChanged).then(function() {
1111
1111
  this.invalidate();
1112
- }.bind(this));
1112
+ }.bind(this)).catch(function() {});
1113
1113
  };
1114
1114
 
1115
1115
  /**
@@ -1551,11 +1551,6 @@ sap.ui.define([
1551
1551
  });
1552
1552
  }, this);
1553
1553
 
1554
- var oScrollExtension = this._getScrollExtension();
1555
- oScrollExtension.updateHorizontalScrollbar(oTableSizes);
1556
- oScrollExtension.updateVerticalScrollbarPosition();
1557
- oScrollExtension.updateVerticalScrollbarVisibility();
1558
-
1559
1554
  var $this = this.$();
1560
1555
 
1561
1556
  if (TableUtils.hasRowActions(this) || TableUtils.hasRowNavigationIndicators(this)) {
@@ -2357,8 +2352,13 @@ sap.ui.define([
2357
2352
  Table.prototype._getRowContexts = function(iRequestLength, bSuppressAdjustToBindingLength, bSecondCall) {
2358
2353
  var oBinding = this.getBinding();
2359
2354
  var iRowCount = this.getRows().length;
2355
+ var iThreshold = this.getThreshold();
2360
2356
 
2361
2357
  iRequestLength = iRequestLength == null ? iRowCount : iRequestLength;
2358
+
2359
+ // If the threshold is not explicitly disabled by setting it to 0, the default threshold should be the number of rows.
2360
+ iThreshold = iThreshold > 0 ? Math.max(iRequestLength, iThreshold) : 0;
2361
+
2362
2362
  iRequestLength = Math.max(iRequestLength, this._getRowMode().getMinRequestLength());
2363
2363
 
2364
2364
  if (!oBinding || iRequestLength <= 0) {
@@ -2380,10 +2380,6 @@ sap.ui.define([
2380
2380
  var iMergeOffsetScrollRows = 0;
2381
2381
  var iMergeOffsetBottomRow = iLength;
2382
2382
 
2383
- // If the threshold is not explicitly disabled by setting it to 0, the default threshold should be the number of rows.
2384
- var iThreshold = this.getThreshold();
2385
- iThreshold = iThreshold ? Math.max(iRowCount, iThreshold) : 0;
2386
-
2387
2383
  // data can be requested with a single getContexts call if the fixed rows and the scrollable rows overlap.
2388
2384
  var iStartIndex = iFirstRenderedRowIndex;
2389
2385
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.ui.base.ManagedObject
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.94.0
33
+ * @version 1.97.0
34
34
  * @since 1.21.1
35
35
  *
36
36
  * @constructor
@@ -5,9 +5,9 @@
5
5
  */
6
6
 
7
7
  //Provides default renderer for control sap.ui.table.Table
8
- sap.ui.define(['sap/ui/core/Control', 'sap/ui/core/theming/Parameters', 'sap/ui/Device', './library', "./Column", './utils/TableUtils', "./extensions/ExtensionBase",
8
+ sap.ui.define(['sap/ui/core/Control', 'sap/ui/Device', './library', "./Column", './utils/TableUtils', "./extensions/ExtensionBase",
9
9
  'sap/ui/core/Renderer', 'sap/ui/core/IconPool', "sap/base/Log"],
10
- function(Control, Parameters, Device, library, Column, TableUtils, ExtensionBase, Renderer, IconPool, Log) {
10
+ function(Control, Device, library, Column, TableUtils, ExtensionBase, Renderer, IconPool, Log) {
11
11
  "use strict";
12
12
 
13
13
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * The TreeTable control provides a comprehensive set of features to display hierarchical data.
42
42
  * @extends sap.ui.table.Table
43
- * @version 1.94.0
43
+ * @version 1.97.0
44
44
  *
45
45
  * @constructor
46
46
  * @public
@@ -528,7 +528,7 @@ sap.ui.define([
528
528
  * Invisible nodes (collapsed child nodes) will not be regarded.
529
529
  *
530
530
  * Please also take notice of the fact, that "addSelectionInterval" does not change any other selection.
531
- * To override the current selection, please use "setSelctionInterval" or for a single entry use "setSelectedIndex".
531
+ * To override the current selection, please use "setSelectionInterval" or for a single entry use "setSelectedIndex".
532
532
  *
533
533
  * @param {int} iIndexFrom Index from which the selection should start
534
534
  * @param {int} iIndexTo Index up to which to select
@@ -239,6 +239,33 @@ sap.ui.define([
239
239
  return null;
240
240
  },
241
241
 
242
+ /**
243
+ * Gets the aria-relevant numbers of columns and rows in the table, taking into account virtualization and internal columns like the row
244
+ * action column.
245
+ *
246
+ * @returns {{columnCount: int, rowCount: int}}
247
+ */
248
+ getGridSize: function(oTable) {
249
+ var bHasRowHeader = TableUtils.hasRowHeader(oTable);
250
+ var bHasRowActions = TableUtils.hasRowActions(oTable);
251
+ var iColumnCount = TableUtils.getVisibleColumnCount(oTable) + (bHasRowHeader ? 1 : 0) + (bHasRowActions ? 1 : 0);
252
+ var iContentRowCount = TableUtils.isNoDataVisible(oTable) ? 0 : Math.max(oTable._getTotalRowCount(), oTable._getRowCounts().count);
253
+
254
+ return {
255
+ columnCount: iColumnCount,
256
+ rowCount: TableUtils.getHeaderRowCount(oTable) + iContentRowCount
257
+ };
258
+ },
259
+
260
+ /**
261
+ * Gets the aria-relevant index of a row, taking into account virtualization and the number of header rows.
262
+ *
263
+ * @returns {int}
264
+ */
265
+ getRowIndex: function(oRow) {
266
+ return oRow.getIndex() + 1 + TableUtils.getHeaderRowCount(oRow.getTable());
267
+ },
268
+
242
269
  /*
243
270
  * Determines the current row and column and updates the hidden description texts of the table accordingly.
244
271
  */
@@ -248,25 +275,21 @@ sap.ui.define([
248
275
  bIsRowChanged = false,
249
276
  bIsColChanged = false,
250
277
  bIsInitial = false,
251
- bHasRowHeader = TableUtils.hasRowHeader(oTable),
252
- bHasRowActions = TableUtils.hasRowActions(oTable);
278
+ bHasRowHeader = TableUtils.hasRowHeader(oTable);
253
279
 
254
280
  if (oIN) {
255
281
  // +1 -> we want to announce a count and not the index, the action column is handled like a normal column
256
282
  var iColumnNumber = ExtensionHelper.getColumnIndexOfFocusedCell(oExtension) + 1 + (bHasRowHeader ? 1 : 0);
257
- // same here + take virtualization into account
258
- var iRowNumber = TableUtils.getRowIndexOfFocusedCell(oTable) + oTable._getFirstRenderedRowIndex() + 1;
259
- var iColCount = TableUtils.getVisibleColumnCount(oTable) + (bHasRowHeader ? 1 : 0) + (bHasRowActions ? 1 : 0);
260
- var iRowCount = TableUtils.isNoDataVisible(oTable) ? 0 : Math.max(oTable._getTotalRowCount(), oTable._getRowCounts().count);
283
+ var oRow = oTable.getRows()[TableUtils.getRowIndexOfFocusedCell(oTable)];
284
+ var iRowNumber = oRow ? ExtensionHelper.getRowIndex(oRow) : 0;
285
+ var mGridSize = ExtensionHelper.getGridSize(oTable);
261
286
 
262
- bIsRowChanged = oExtension._iLastRowNumber != iRowNumber || (oExtension._iLastRowNumber == iRowNumber
263
- && oExtension._iLastColumnNumber == iColumnNumber);
287
+ bIsRowChanged = oExtension._iLastRowNumber != iRowNumber || (oExtension._iLastRowNumber == iRowNumber && oExtension._iLastColumnNumber == iColumnNumber);
264
288
  bIsColChanged = oExtension._iLastColumnNumber != iColumnNumber;
265
289
  bIsInitial = oExtension._iLastRowNumber == null && oExtension._iLastColumnNumber == null;
266
-
267
- oTable.$("rownumberofrows").text(bIsRowChanged && iRowNumber > 0 ? TableUtils.getResourceText("TBL_ROW_ROWCOUNT", [iRowNumber, iRowCount]) : " ");
268
- oTable.$("colnumberofcols").text(bIsColChanged ? TableUtils.getResourceText("TBL_COL_COLCOUNT", [iColumnNumber, iColCount]) : " ");
269
- oTable.$("ariacount").text(bIsInitial ? TableUtils.getResourceText("TBL_DATA_ROWS_COLS", [iRowCount, iColCount]) : " ");
290
+ oTable.$("rownumberofrows").text(bIsRowChanged && iRowNumber > 0 ? TableUtils.getResourceText("TBL_ROW_ROWCOUNT", [iRowNumber, mGridSize.rowCount]) : " ");
291
+ oTable.$("colnumberofcols").text(bIsColChanged ? TableUtils.getResourceText("TBL_COL_COLCOUNT", [iColumnNumber, mGridSize.columnCount]) : " ");
292
+ oTable.$("ariacount").text(bIsInitial ? TableUtils.getResourceText("TBL_DATA_ROWS_COLS", [mGridSize.rowCount, mGridSize.columnCount]) : " ");
270
293
 
271
294
  oExtension._iLastRowNumber = iRowNumber;
272
295
  oExtension._iLastColumnNumber = iColumnNumber;
@@ -689,12 +712,8 @@ sap.ui.define([
689
712
  mAttributes["role"] = "gridcell";
690
713
  mAttributes["aria-colindex"] = mParams.index + 1 + (TableUtils.hasRowHeader(oTable) ? 1 : 0);
691
714
 
692
- var aLabels = [],
693
- oColumn = mParams && mParams.column ? mParams.column : null;
694
-
695
- if (oColumn) {
696
- aLabels = ExtensionHelper.getRelevantColumnHeaders(oTable, oColumn);
697
- mAttributes["headers"] = aLabels.join(" ");
715
+ if (mParams.column) {
716
+ var aLabels = ExtensionHelper.getRelevantColumnHeaders(oTable, mParams.column);
698
717
 
699
718
  for (var i = 0; i < aLabels.length; i++) {
700
719
  aLabels[i] = aLabels[i] + "-inner";
@@ -703,9 +722,9 @@ sap.ui.define([
703
722
  if (mParams && mParams.fixed) {
704
723
  aLabels.push(sTableId + "-ariafixedcolumn");
705
724
  }
706
- }
707
725
 
708
- mAttributes["aria-labelledby"] = aLabels;
726
+ mAttributes["aria-labelledby"] = aLabels;
727
+ }
709
728
  break;
710
729
 
711
730
  case AccExtension.ELEMENTTYPES.ROOT: //The tables root dom element
@@ -717,7 +736,6 @@ sap.ui.define([
717
736
  break;
718
737
 
719
738
  case AccExtension.ELEMENTTYPES.CONTAINER: //The table container
720
- mAttributes["role"] = "application";
721
739
  break;
722
740
 
723
741
  case AccExtension.ELEMENTTYPES.CONTENT: //The content area of the table which contains all the table elements, rowheaders, columnheaders, etc
@@ -738,6 +756,7 @@ sap.ui.define([
738
756
  var bHasFixedBottomRows = mRowCounts.fixedBottom > 0;
739
757
  var bHasRowHeader = TableUtils.hasRowHeader(oTable);
740
758
  var bHasRowActions = TableUtils.hasRowActions(oTable);
759
+ var mGridSize = ExtensionHelper.getGridSize(oTable);
741
760
 
742
761
  mAttributes["aria-owns"] = [sTableId + "-table"];
743
762
  if (bHasFixedColumns) {
@@ -762,8 +781,8 @@ sap.ui.define([
762
781
  mAttributes["aria-owns"].push(sTableId + "-sapUiTableRowActionScr");
763
782
  }
764
783
 
765
- mAttributes["aria-rowcount"] = oTable._getTotalRowCount();
766
- mAttributes["aria-colcount"] = oTable._getVisibleColumns().length + (bHasRowHeader ? 1 : 0) + (bHasRowActions ? 1 : 0);
784
+ mAttributes["aria-rowcount"] = mGridSize.rowCount;
785
+ mAttributes["aria-colcount"] = mGridSize.columnCount;
767
786
 
768
787
  if (oTable.isA("sap.ui.table.AnalyticalTable")) {
769
788
  mAttributes["aria-roledescription"] = TableUtils.getResourceText("TBL_ANALYTICAL_TABLE_ROLE_DESCRIPTION");
@@ -883,7 +902,7 @@ sap.ui.define([
883
902
  * @class Extension for sap.ui.table.Table which handles ACC related things.
884
903
  * @extends sap.ui.table.extensions.ExtensionBase
885
904
  * @author SAP SE
886
- * @version 1.94.0
905
+ * @version 1.97.0
887
906
  * @constructor
888
907
  * @private
889
908
  * @alias sap.ui.table.extensions.Accessibility
@@ -1060,7 +1079,7 @@ sap.ui.define([
1060
1079
 
1061
1080
  for (i = 0; i < aRows.length; i++) {
1062
1081
  oRow = aRows[i];
1063
- oRow.getDomRefs(true).row.attr("aria-rowindex", oRow.getIndex() + 1);
1082
+ oRow.getDomRefs(true).row.attr("aria-rowindex", ExtensionHelper.getRowIndex(oRow));
1064
1083
  }
1065
1084
  };
1066
1085
 
@@ -1073,7 +1092,7 @@ sap.ui.define([
1073
1092
  var $Table = oTable.$("sapUiTableGridCnt");
1074
1093
 
1075
1094
  if ($Table) {
1076
- $Table.attr("aria-rowcount", oTable._getTotalRowCount());
1095
+ $Table.attr("aria-rowcount", ExtensionHelper.getGridSize(oTable).rowCount);
1077
1096
  }
1078
1097
  };
1079
1098
 
@@ -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.94.0
45
+ * @version 1.97.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @alias sap.ui.table.extensions.AccessibilityRender
@@ -244,7 +244,7 @@ sap.ui.define([
244
244
  *
245
245
  * @extends sap.ui.table.extensions.ExtensionBase
246
246
  * @author SAP SE
247
- * @version 1.94.0
247
+ * @version 1.97.0
248
248
  * @constructor
249
249
  * @private
250
250
  * @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.94.0
22
+ * @version 1.97.0
23
23
  * @constructor
24
24
  * @private
25
25
  * @alias sap.ui.table.extensions.ExtensionBase