@openui5/sap.ui.table 1.134.0 → 1.135.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.
- package/THIRDPARTY.txt +2 -2
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +1 -1
- package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
- package/src/sap/ui/table/AnalyticalTable.js +3 -3
- package/src/sap/ui/table/Column.js +1 -1
- package/src/sap/ui/table/ColumnMenu.js +1 -1
- package/src/sap/ui/table/CreationRow.js +1 -1
- package/src/sap/ui/table/Row.js +21 -21
- package/src/sap/ui/table/RowAction.js +1 -1
- package/src/sap/ui/table/RowActionItem.js +1 -1
- package/src/sap/ui/table/RowSettings.js +1 -1
- package/src/sap/ui/table/Table.js +70 -112
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +3 -5
- package/src/sap/ui/table/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +3 -4
- package/src/sap/ui/table/extensions/AccessibilityRender.js +2 -3
- package/src/sap/ui/table/extensions/DragAndDrop.js +1 -1
- package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
- package/src/sap/ui/table/extensions/Keyboard.js +1 -1
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +2 -3
- package/src/sap/ui/table/extensions/Pointer.js +3 -5
- package/src/sap/ui/table/extensions/Scrolling.js +1 -1
- package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
- package/src/sap/ui/table/extensions/Synchronization.js +1 -1
- package/src/sap/ui/table/library.js +11 -35
- package/src/sap/ui/table/menus/AnalyticalTableContextMenu.js +1 -1
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/ContextMenu.js +1 -1
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/messagebundle_bg.properties +1 -1
- package/src/sap/ui/table/plugins/BindingSelection.js +33 -33
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +37 -31
- package/src/sap/ui/table/plugins/ODataV4Selection.js +132 -69
- package/src/sap/ui/table/plugins/PluginBase.js +52 -139
- package/src/sap/ui/table/plugins/SelectionMode.js +35 -0
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +28 -35
- package/src/sap/ui/table/plugins/SelectionPlugin.js +34 -35
- package/src/sap/ui/table/plugins/V4Aggregation.js +30 -37
- package/src/sap/ui/table/rowmodes/Auto.js +1 -1
- package/src/sap/ui/table/rowmodes/Fixed.js +1 -1
- package/src/sap/ui/table/rowmodes/Interactive.js +1 -1
- package/src/sap/ui/table/rowmodes/RowMode.js +1 -3
- package/src/sap/ui/table/rowmodes/Variable.js +1 -1
- package/src/sap/ui/table/themes/base/Cell.less +54 -42
- package/src/sap/ui/table/themes/base/CreationRow.less +10 -8
- package/src/sap/ui/table/themes/base/DragDrop.less +34 -31
- package/src/sap/ui/table/themes/base/Grouping.less +23 -14
- package/src/sap/ui/table/themes/base/Row.less +6 -6
- package/src/sap/ui/table/themes/base/RowAction.less +2 -2
- package/src/sap/ui/table/themes/base/RowHighlight.less +15 -15
- package/src/sap/ui/table/themes/base/RowSelection.less +13 -8
- package/src/sap/ui/table/themes/base/Scrolling.less +73 -25
- package/src/sap/ui/table/themes/base/Table.less +63 -46
- package/src/sap/ui/table/themes/base/library.source.less +3 -3
- package/src/sap/ui/table/utils/TableUtils.js +2 -3
- package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
- package/src/sap/ui/table/utils/_ColumnUtils.js +1 -1
- package/src/sap/ui/table/utils/_GroupingUtils.js +1 -1
- package/src/sap/ui/table/utils/_HookUtils.js +1 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +1 -1
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: 3.
|
|
9
|
+
Component: purify.js, version: 3.2.4
|
|
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
|
|
@@ -462,7 +462,7 @@ License: Apache-2.0
|
|
|
462
462
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
463
463
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
464
464
|
|
|
465
|
-
Component: SAP Theming Base Content, version: 11.
|
|
465
|
+
Component: SAP Theming Base Content, version: 11.28.2
|
|
466
466
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
467
467
|
License: Apache-2.0
|
|
468
468
|
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.
|
|
3
|
+
"version": "1.135.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.
|
|
18
|
-
"@openui5/sap.ui.unified": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.135.0",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.135.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.135.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -45,12 +45,12 @@ sap.ui.define([
|
|
|
45
45
|
* @param {object} [mSettings] initial settings for the new control
|
|
46
46
|
*
|
|
47
47
|
* @class
|
|
48
|
-
* Table
|
|
49
|
-
* correctly annotated OData services. Please check
|
|
48
|
+
* Table that handles analytical OData back-end scenarios. The <code>AnalyticalTable</code> only works with {@link sap.ui.model.analytics.AnalyticalBinding AnalyticalBinding} and
|
|
49
|
+
* correctly annotated OData services. Please check out the functionality of analytical binding and the SAP Annotations for OData Version 2.0 documentation for further details.
|
|
50
50
|
* @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
|
|
51
51
|
*
|
|
52
52
|
* @extends sap.ui.table.Table
|
|
53
|
-
* @version 1.
|
|
53
|
+
* @version 1.135.0
|
|
54
54
|
*
|
|
55
55
|
* @constructor
|
|
56
56
|
* @public
|
package/src/sap/ui/table/Row.js
CHANGED
|
@@ -135,7 +135,7 @@ sap.ui.define([
|
|
|
135
135
|
* @class
|
|
136
136
|
* The row.
|
|
137
137
|
* @extends sap.ui.core.Element
|
|
138
|
-
* @version 1.
|
|
138
|
+
* @version 1.135.0
|
|
139
139
|
*
|
|
140
140
|
* @constructor
|
|
141
141
|
* @public
|
|
@@ -347,10 +347,16 @@ sap.ui.define([
|
|
|
347
347
|
*/
|
|
348
348
|
Row.prototype._updateSelection = function() {
|
|
349
349
|
const oTable = this.getTable();
|
|
350
|
-
const
|
|
350
|
+
const bSelected = this._isSelected();
|
|
351
|
+
|
|
352
|
+
if (bSelected) {
|
|
353
|
+
this.addStyleClass("sapUiTableRowSel");
|
|
354
|
+
} else {
|
|
355
|
+
this.removeStyleClass("sapUiTableRowSel");
|
|
356
|
+
}
|
|
351
357
|
|
|
352
|
-
this._setSelected(bIsSelected);
|
|
353
358
|
oTable._getAccExtension().updateSelectionStateOfRow(this);
|
|
359
|
+
oTable._getSyncExtension?.().syncRowSelection(oTable.indexOfRow(this), bSelected);
|
|
354
360
|
};
|
|
355
361
|
|
|
356
362
|
Row.prototype.setRowBindingContext = function(oContext, oTable) {
|
|
@@ -633,25 +639,23 @@ sap.ui.define([
|
|
|
633
639
|
};
|
|
634
640
|
|
|
635
641
|
/**
|
|
636
|
-
* Sets the
|
|
642
|
+
* Sets the selected state of the row.
|
|
637
643
|
*
|
|
638
644
|
* @param {boolean} bSelected Whether the row should be selected.
|
|
639
645
|
* @private
|
|
640
646
|
*/
|
|
641
647
|
Row.prototype._setSelected = function(bSelected) {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
if (bSelected) {
|
|
645
|
-
this.addStyleClass("sapUiTableRowSel");
|
|
646
|
-
} else {
|
|
647
|
-
this.removeStyleClass("sapUiTableRowSel");
|
|
648
|
-
}
|
|
648
|
+
this.getTable()._getSelectionPlugin().setSelected(this, bSelected);
|
|
649
|
+
};
|
|
649
650
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
651
|
+
/**
|
|
652
|
+
* Checks if the row is selected.
|
|
653
|
+
*
|
|
654
|
+
* @returns {boolean} Whether the row is selected.
|
|
655
|
+
* @private
|
|
656
|
+
*/
|
|
657
|
+
Row.prototype._isSelected = function() {
|
|
658
|
+
return this.getTable()._getSelectionPlugin().isSelected(this);
|
|
655
659
|
};
|
|
656
660
|
|
|
657
661
|
/**
|
|
@@ -669,11 +673,7 @@ sap.ui.define([
|
|
|
669
673
|
this.removeStyleClass("sapUiTableRowHvr");
|
|
670
674
|
}
|
|
671
675
|
|
|
672
|
-
|
|
673
|
-
TableUtils.dynamicCall(oTable._getSyncExtension, function(oSyncExtension) {
|
|
674
|
-
oSyncExtension.syncRowHover(oTable.indexOfRow(this), bHovered);
|
|
675
|
-
}, this);
|
|
676
|
-
}
|
|
676
|
+
oTable._getSyncExtension?.().syncRowHover(oTable.indexOfRow(this), bHovered);
|
|
677
677
|
};
|
|
678
678
|
|
|
679
679
|
/**
|
|
@@ -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.
|
|
38
|
+
* @version 1.135.0
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @public
|
|
@@ -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.
|
|
30
|
+
* @version 1.135.0
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @public
|
|
@@ -30,6 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
"./rowmodes/Fixed",
|
|
31
31
|
"./rowmodes/Interactive",
|
|
32
32
|
"./rowmodes/Auto",
|
|
33
|
+
"./plugins/SelectionPlugin",
|
|
33
34
|
"./plugins/SelectionModelSelection",
|
|
34
35
|
"./menus/ContextMenu",
|
|
35
36
|
"sap/ui/thirdparty/jquery",
|
|
@@ -62,6 +63,7 @@ sap.ui.define([
|
|
|
62
63
|
FixedRowMode,
|
|
63
64
|
InteractiveRowMode,
|
|
64
65
|
AutoRowMode,
|
|
66
|
+
SelectionPlugin,
|
|
65
67
|
SelectionModelSelectionPlugin,
|
|
66
68
|
ContextMenu,
|
|
67
69
|
jQuery,
|
|
@@ -104,7 +106,7 @@ sap.ui.define([
|
|
|
104
106
|
* the data model and binding being used.
|
|
105
107
|
* </p>
|
|
106
108
|
* @extends sap.ui.core.Control
|
|
107
|
-
* @version 1.
|
|
109
|
+
* @version 1.135.0
|
|
108
110
|
*
|
|
109
111
|
* @constructor
|
|
110
112
|
* @public
|
|
@@ -1129,7 +1131,6 @@ sap.ui.define([
|
|
|
1129
1131
|
}
|
|
1130
1132
|
}
|
|
1131
1133
|
|
|
1132
|
-
this._initLegacySelectionPlugin(); // Doing it at the end can eliminate the need to create a legacy selection plugin.
|
|
1133
1134
|
initDefaultRowMode(this);
|
|
1134
1135
|
Control.prototype.applySettings.call(this, mSettings, oScope);
|
|
1135
1136
|
};
|
|
@@ -1814,11 +1815,11 @@ sap.ui.define([
|
|
|
1814
1815
|
+ " Your setting was defaulted to selection mode 'MultiToggle'", this);
|
|
1815
1816
|
}
|
|
1816
1817
|
|
|
1817
|
-
if (
|
|
1818
|
+
if (SelectionPlugin.findOn(this)) {
|
|
1818
1819
|
Log.error("If a selection plugin is applied to the table, the selection mode is controlled by the plugin.", this);
|
|
1819
1820
|
} else {
|
|
1820
1821
|
this.setProperty("selectionMode", sSelectionMode);
|
|
1821
|
-
this
|
|
1822
|
+
_private(this).oLegacySelectionPlugin?.setSelectionMode(sSelectionMode);
|
|
1822
1823
|
}
|
|
1823
1824
|
|
|
1824
1825
|
return this;
|
|
@@ -3253,19 +3254,14 @@ sap.ui.define([
|
|
|
3253
3254
|
* Notifies the selection listeners about the changed rows.
|
|
3254
3255
|
* @private
|
|
3255
3256
|
*/
|
|
3256
|
-
|
|
3257
|
-
this.
|
|
3258
|
-
|
|
3259
|
-
// If a selection plugin is applied to the table, the "rowSelectionChange" event should not be fired.
|
|
3260
|
-
if (this._hasSelectionPlugin()) {
|
|
3261
|
-
return;
|
|
3262
|
-
}
|
|
3263
|
-
|
|
3264
|
-
const oSelectionPlugin = this._getSelectionPlugin();
|
|
3257
|
+
function onLegacySelectionChanged(oEvent) {
|
|
3258
|
+
const oSelectionPlugin = _private(this).oLegacySelectionPlugin;
|
|
3265
3259
|
const aRowIndices = oEvent.getParameter("rowIndices");
|
|
3266
3260
|
const bSelectAll = oEvent.getParameter("selectAll");
|
|
3267
3261
|
const iRowIndex = this._iSourceRowIndex !== undefined ? this._iSourceRowIndex : oSelectionPlugin.getSelectedIndex();
|
|
3268
3262
|
|
|
3263
|
+
this._updateSelection();
|
|
3264
|
+
|
|
3269
3265
|
/**
|
|
3270
3266
|
* @deprecated As of Version 1.69
|
|
3271
3267
|
*/
|
|
@@ -3280,7 +3276,7 @@ sap.ui.define([
|
|
|
3280
3276
|
selectAll: bSelectAll,
|
|
3281
3277
|
userInteraction: this._iSourceRowIndex !== undefined
|
|
3282
3278
|
});
|
|
3283
|
-
}
|
|
3279
|
+
}
|
|
3284
3280
|
|
|
3285
3281
|
/**
|
|
3286
3282
|
* Returns the context of a row by its index. Please note that for server-based models like OData,
|
|
@@ -3325,7 +3321,7 @@ sap.ui.define([
|
|
|
3325
3321
|
* @deprecated As of version 1.69, replaced by {@link sap.ui.table.Table#getSelectedIndices}
|
|
3326
3322
|
*/
|
|
3327
3323
|
Table.prototype.getSelectedIndex = function() {
|
|
3328
|
-
if (
|
|
3324
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3329
3325
|
throw new Error("Unsupported operation: sap.ui.table.Table#getSelectedIndex must not be called if a selection plugin is applied.");
|
|
3330
3326
|
}
|
|
3331
3327
|
|
|
@@ -3344,11 +3340,15 @@ sap.ui.define([
|
|
|
3344
3340
|
* @public
|
|
3345
3341
|
*/
|
|
3346
3342
|
Table.prototype.setSelectedIndex = function(iIndex) {
|
|
3347
|
-
if (
|
|
3343
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3348
3344
|
throw new Error("Unsupported operation: sap.ui.table.Table#setSelectedIndex must not be called if a selection plugin is applied.");
|
|
3349
3345
|
}
|
|
3350
3346
|
|
|
3351
|
-
this
|
|
3347
|
+
_private(this).oLegacySelectionPlugin?.setSelectedIndex(iIndex);
|
|
3348
|
+
|
|
3349
|
+
/** @deprecated As of version 1.69 */
|
|
3350
|
+
this.setProperty("selectedIndex", iIndex, true);
|
|
3351
|
+
|
|
3352
3352
|
return this;
|
|
3353
3353
|
};
|
|
3354
3354
|
|
|
@@ -3363,7 +3363,7 @@ sap.ui.define([
|
|
|
3363
3363
|
* @public
|
|
3364
3364
|
*/
|
|
3365
3365
|
Table.prototype.clearSelection = function() {
|
|
3366
|
-
if (
|
|
3366
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3367
3367
|
throw new Error("Unsupported operation: sap.ui.table.Table#clearSelection must not be called if a selection plugin is applied.");
|
|
3368
3368
|
}
|
|
3369
3369
|
|
|
@@ -3385,7 +3385,7 @@ sap.ui.define([
|
|
|
3385
3385
|
* @public
|
|
3386
3386
|
*/
|
|
3387
3387
|
Table.prototype.selectAll = function() {
|
|
3388
|
-
if (
|
|
3388
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3389
3389
|
throw new Error("Unsupported operation: sap.ui.table.Table#selectAll must not be called if a selection plugin is applied.");
|
|
3390
3390
|
}
|
|
3391
3391
|
|
|
@@ -3407,7 +3407,7 @@ sap.ui.define([
|
|
|
3407
3407
|
* @public
|
|
3408
3408
|
*/
|
|
3409
3409
|
Table.prototype.getSelectedIndices = function() {
|
|
3410
|
-
if (
|
|
3410
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3411
3411
|
throw new Error("Unsupported operation: sap.ui.table.Table#getSelectedIndices must not be called if a selection plugin is applied.");
|
|
3412
3412
|
}
|
|
3413
3413
|
|
|
@@ -3427,7 +3427,7 @@ sap.ui.define([
|
|
|
3427
3427
|
* @public
|
|
3428
3428
|
*/
|
|
3429
3429
|
Table.prototype.addSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
3430
|
-
if (
|
|
3430
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3431
3431
|
throw new Error("Unsupported operation: sap.ui.table.Table#addSelectionInterval must not be called if a selection plugin is applied.");
|
|
3432
3432
|
}
|
|
3433
3433
|
|
|
@@ -3448,7 +3448,7 @@ sap.ui.define([
|
|
|
3448
3448
|
* @public
|
|
3449
3449
|
*/
|
|
3450
3450
|
Table.prototype.setSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
3451
|
-
if (
|
|
3451
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3452
3452
|
throw new Error("Unsupported operation: sap.ui.table.Table#setSelectionInterval must not be called if a selection plugin is applied.");
|
|
3453
3453
|
}
|
|
3454
3454
|
|
|
@@ -3469,7 +3469,7 @@ sap.ui.define([
|
|
|
3469
3469
|
* @public
|
|
3470
3470
|
*/
|
|
3471
3471
|
Table.prototype.removeSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
3472
|
-
if (
|
|
3472
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3473
3473
|
throw new Error("Unsupported operation: sap.ui.table.Table#removeSelectionInterval must not be called if a selection plugin is applied.");
|
|
3474
3474
|
}
|
|
3475
3475
|
|
|
@@ -3489,7 +3489,7 @@ sap.ui.define([
|
|
|
3489
3489
|
* @public
|
|
3490
3490
|
*/
|
|
3491
3491
|
Table.prototype.isIndexSelected = function(iIndex) {
|
|
3492
|
-
if (
|
|
3492
|
+
if (SelectionPlugin.findOn(this)) {
|
|
3493
3493
|
throw new Error("Unsupported operation: sap.ui.table.Table#isIndexSelected must not be called if a selection plugin is applied.");
|
|
3494
3494
|
}
|
|
3495
3495
|
|
|
@@ -4083,107 +4083,67 @@ sap.ui.define([
|
|
|
4083
4083
|
* @private
|
|
4084
4084
|
*/
|
|
4085
4085
|
Table.prototype._getSelectionPlugin = function() {
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
// Temporary fix for the Support Assistant hacks. Support Assistant should implement a selection plugin.
|
|
4089
|
-
// TODO: Before we recommend to implement a selection plugin -> Complete BLI CPOUIFTEAMB-1464
|
|
4090
|
-
if (typeof this._getSelectedIndicesCount === "function" && oSelectionPlugin.getSelectedCount !== this._getSelectedIndicesCount) {
|
|
4091
|
-
oSelectionPlugin.getSelectedCount = this._getSelectedIndicesCount;
|
|
4092
|
-
["isIndexSelected", "setSelectedIndex", "getSelectedIndex", "getSelectedIndices", "setSelectionInterval", "addSelectionInterval",
|
|
4093
|
-
"removeSelectionInterval", "selectAll", "clearSelection"].forEach(function(sMethodName) {
|
|
4094
|
-
oSelectionPlugin[sMethodName] = this[sMethodName];
|
|
4095
|
-
}.bind(this));
|
|
4096
|
-
}
|
|
4097
|
-
|
|
4098
|
-
return oSelectionPlugin;
|
|
4099
|
-
};
|
|
4100
|
-
|
|
4101
|
-
/**
|
|
4102
|
-
* Checks whether a selection plugin is applied to the table. Returns <code>false</code> if no selection plugin is applied to the table and a
|
|
4103
|
-
* legacy selection plugin is used.
|
|
4104
|
-
*
|
|
4105
|
-
* @return {boolean} Whether a selection plugin is applied.
|
|
4106
|
-
* @private
|
|
4107
|
-
*/
|
|
4108
|
-
Table.prototype._hasSelectionPlugin = function() {
|
|
4109
|
-
return this._oSelectionPlugin != null;
|
|
4110
|
-
};
|
|
4111
|
-
|
|
4112
|
-
function getMainSelectionPlugin(oTable) {
|
|
4113
|
-
const aSelectionPlugins = oTable.getDependents().filter((oPlugin) => oPlugin.isA("sap.ui.table.plugins.SelectionPlugin"));
|
|
4086
|
+
let oSelectionPlugin = SelectionPlugin.findOn(this);
|
|
4087
|
+
let oLegacySelectionPlugin = _private(this).oLegacySelectionPlugin;
|
|
4114
4088
|
|
|
4115
4089
|
/**
|
|
4116
4090
|
* @deprecated As of version 1.120
|
|
4117
4091
|
*/
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
return aSelectionPlugins[0];
|
|
4121
|
-
}
|
|
4122
|
-
|
|
4123
|
-
/**
|
|
4124
|
-
* Initializes the selection plugin used by the table. Attaches event listeners.
|
|
4125
|
-
* The first plugin of type <code>sap.ui.table.plugins.SelectionPlugin</code> in the <code>plugins</code> aggregation is used by the table. If no
|
|
4126
|
-
* selection plugin is applied, a legacy selection plugin is created.
|
|
4127
|
-
*
|
|
4128
|
-
* @private
|
|
4129
|
-
*/
|
|
4130
|
-
Table.prototype._initSelectionPlugin = function() {
|
|
4131
|
-
const oSelectionPlugin = getMainSelectionPlugin(this);
|
|
4132
|
-
|
|
4133
|
-
if (this.isDestroyed() || this.isDestroyStarted()) {
|
|
4134
|
-
return;
|
|
4135
|
-
}
|
|
4136
|
-
|
|
4137
|
-
if (oSelectionPlugin) {
|
|
4138
|
-
this._destroyLegacySelectionPlugin();
|
|
4139
|
-
detachSelectionPlugin(this, this._oSelectionPlugin);
|
|
4140
|
-
attachSelectionPlugin(this, oSelectionPlugin);
|
|
4141
|
-
this._oSelectionPlugin = oSelectionPlugin;
|
|
4142
|
-
} else {
|
|
4143
|
-
this._initLegacySelectionPlugin();
|
|
4144
|
-
detachSelectionPlugin(this, this._oSelectionPlugin);
|
|
4145
|
-
delete this._oSelectionPlugin;
|
|
4092
|
+
if (this.getPlugins().length > 0) {
|
|
4093
|
+
oSelectionPlugin = this.getPlugins()[0];
|
|
4146
4094
|
}
|
|
4147
|
-
};
|
|
4148
4095
|
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4096
|
+
if (oSelectionPlugin && oLegacySelectionPlugin) {
|
|
4097
|
+
delete _private(this).oLegacySelectionPlugin;
|
|
4098
|
+
oLegacySelectionPlugin.destroy();
|
|
4099
|
+
} else if (!oSelectionPlugin && !oLegacySelectionPlugin && !this.isDestroyed()) {
|
|
4100
|
+
oLegacySelectionPlugin = this._createLegacySelectionPlugin();
|
|
4101
|
+
_private(this).oLegacySelectionPlugin = oLegacySelectionPlugin;
|
|
4102
|
+
oLegacySelectionPlugin.setSelectionMode(this.getSelectionMode());
|
|
4103
|
+
/**
|
|
4104
|
+
* @deprecated As of version 1.69
|
|
4105
|
+
*/
|
|
4106
|
+
oLegacySelectionPlugin.setSelectedIndex(this.getProperty("selectedIndex"));
|
|
4107
|
+
oLegacySelectionPlugin.attachSelectionChange(onLegacySelectionChanged, this);
|
|
4108
|
+
this.addAggregation("_hiddenDependents", oLegacySelectionPlugin);
|
|
4109
|
+
|
|
4110
|
+
// Temporary fix for the Support Assistant hacks. Support Assistant should implement a selection plugin.
|
|
4111
|
+
// TODO: Before we recommend to implement a selection plugin -> Complete BLI CPOUIFTEAMB-1464
|
|
4112
|
+
if (typeof this._getSelectedIndicesCount === "function" && oLegacySelectionPlugin.getSelectedCount !== this._getSelectedIndicesCount) {
|
|
4113
|
+
oLegacySelectionPlugin.getSelectedCount = this._getSelectedIndicesCount;
|
|
4114
|
+
[
|
|
4115
|
+
"isIndexSelected", "setSelectedIndex", "getSelectedIndex", "getSelectedIndices", "setSelectionInterval", "addSelectionInterval",
|
|
4116
|
+
"removeSelectionInterval", "selectAll", "clearSelection"
|
|
4117
|
+
].forEach((sMethodName) => {
|
|
4118
|
+
oLegacySelectionPlugin[sMethodName] = this[sMethodName];
|
|
4119
|
+
});
|
|
4120
|
+
this._onSelectionChanged = onLegacySelectionChanged.bind(this);
|
|
4121
|
+
}
|
|
4158
4122
|
}
|
|
4159
4123
|
|
|
4160
|
-
|
|
4161
|
-
this.addAggregation("_hiddenDependents", this._oLegacySelectionPlugin);
|
|
4162
|
-
attachSelectionPlugin(this, this._oLegacySelectionPlugin);
|
|
4163
|
-
};
|
|
4164
|
-
|
|
4165
|
-
Table.prototype._destroyLegacySelectionPlugin = function() {
|
|
4166
|
-
if (this._oLegacySelectionPlugin && !this._oLegacySelectionPlugin.isDestroyStarted()) {
|
|
4167
|
-
this._oLegacySelectionPlugin.destroy();
|
|
4168
|
-
delete this._oLegacySelectionPlugin;
|
|
4169
|
-
}
|
|
4124
|
+
return oSelectionPlugin || oLegacySelectionPlugin;
|
|
4170
4125
|
};
|
|
4171
4126
|
|
|
4172
4127
|
Table.prototype._createLegacySelectionPlugin = function() {
|
|
4173
4128
|
return new SelectionModelSelectionPlugin();
|
|
4174
4129
|
};
|
|
4175
4130
|
|
|
4176
|
-
function
|
|
4177
|
-
|
|
4178
|
-
|
|
4131
|
+
Table.prototype._onSelectionPluginChange = function() {
|
|
4132
|
+
let oSelectionPlugin = SelectionPlugin.findOn(this);
|
|
4133
|
+
|
|
4134
|
+
/**
|
|
4135
|
+
* @deprecated As of version 1.120
|
|
4136
|
+
*/
|
|
4137
|
+
if (this.getPlugins().length > 0) {
|
|
4138
|
+
oSelectionPlugin = this.getPlugins()[0];
|
|
4179
4139
|
}
|
|
4180
|
-
}
|
|
4181
4140
|
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
oSelectionPlugin
|
|
4141
|
+
if (_private(this).oSelectionPlugin !== oSelectionPlugin) {
|
|
4142
|
+
_private(this).oSelectionPlugin?.detachSelectionChange(this._updateSelection, this);
|
|
4143
|
+
oSelectionPlugin?.attachSelectionChange(this._updateSelection, this);
|
|
4144
|
+
_private(this).oSelectionPlugin = oSelectionPlugin;
|
|
4185
4145
|
}
|
|
4186
|
-
}
|
|
4146
|
+
};
|
|
4187
4147
|
|
|
4188
4148
|
Table.prototype._getDefaultContextMenu = function() {
|
|
4189
4149
|
let oDefaultContextMenu = this.getAggregation("_hiddenDependents").find((oElement) => oElement.isA("sap.ui.table.menus.ContextMenu"));
|
|
@@ -4390,13 +4350,13 @@ sap.ui.define([
|
|
|
4390
4350
|
* @deprecated As of version 1.115
|
|
4391
4351
|
*/
|
|
4392
4352
|
Table.prototype._enableLegacyMultiSelection = function() {
|
|
4393
|
-
if (
|
|
4353
|
+
if (SelectionPlugin.findOn(this)) {
|
|
4394
4354
|
throw new Error("Unsupported operation: sap.ui.table.Table#_enableLegacyMultiSelection must not be called"
|
|
4395
4355
|
+ " if a selection plugin is applied.");
|
|
4396
4356
|
}
|
|
4397
4357
|
|
|
4398
4358
|
this._legacyMultiSelection = function(iIndex, oEvent) {
|
|
4399
|
-
if (
|
|
4359
|
+
if (SelectionPlugin.findOn(this)) {
|
|
4400
4360
|
throw new Error("Unsupported operation: The legacy multi selection is not supported if a selection plugin is applied");
|
|
4401
4361
|
}
|
|
4402
4362
|
|
|
@@ -4418,9 +4378,7 @@ sap.ui.define([
|
|
|
4418
4378
|
|
|
4419
4379
|
/**
|
|
4420
4380
|
* Sets constraints on the row counts of the table. May impact the result of the row count computation in the row modes.
|
|
4421
|
-
* The setter for the hidden property may only be used indirectly by plugins and may not be used otherwise.
|
|
4422
4381
|
*
|
|
4423
|
-
* @see sap.ui.table.plugins.PluginBase#setRowCountConstraints
|
|
4424
4382
|
* @param {object} mConstraints Row count constraints
|
|
4425
4383
|
* @private
|
|
4426
4384
|
*/
|
|
@@ -679,7 +679,7 @@ sap.ui.define([
|
|
|
679
679
|
};
|
|
680
680
|
|
|
681
681
|
TableRenderer.renderRowAddon = function(rm, oTable, oRow, iRowIndex, bHeader) {
|
|
682
|
-
const bRowSelected =
|
|
682
|
+
const bRowSelected = oRow._isSelected();
|
|
683
683
|
|
|
684
684
|
rm.openStart("div");
|
|
685
685
|
oTable._getAccRenderExtension().writeAriaAttributesFor(rm, oTable, "RowAddon");
|
|
@@ -1071,8 +1071,6 @@ sap.ui.define([
|
|
|
1071
1071
|
return;
|
|
1072
1072
|
}
|
|
1073
1073
|
|
|
1074
|
-
const oSelectionPlugin = oTable._getSelectionPlugin();
|
|
1075
|
-
|
|
1076
1074
|
if (bFixedTable) {
|
|
1077
1075
|
rm.openStart("tr", oRow.getId() + "-fixed");
|
|
1078
1076
|
rm.attr("data-sap-ui-related", oRow.getId());
|
|
@@ -1093,7 +1091,7 @@ sap.ui.define([
|
|
|
1093
1091
|
|
|
1094
1092
|
if (oRow.isContentHidden()) {
|
|
1095
1093
|
rm.class("sapUiTableRowHidden");
|
|
1096
|
-
} else if (
|
|
1094
|
+
} else if (oRow._isSelected()) {
|
|
1097
1095
|
rm.class("sapUiTableRowSel");
|
|
1098
1096
|
}
|
|
1099
1097
|
|
|
@@ -1116,7 +1114,7 @@ sap.ui.define([
|
|
|
1116
1114
|
|
|
1117
1115
|
rm.openEnd();
|
|
1118
1116
|
|
|
1119
|
-
const bSelected = !oRow.isEmpty() &&
|
|
1117
|
+
const bSelected = !oRow.isEmpty() && oRow._isSelected(); //see TableRenderer.renderRowAddon
|
|
1120
1118
|
const aCells = oRow.getCells();
|
|
1121
1119
|
|
|
1122
1120
|
for (let cell = 0, count = aCells.length; cell < count; cell++) {
|
|
@@ -833,7 +833,7 @@ sap.ui.define([
|
|
|
833
833
|
|
|
834
834
|
mAttributes["role"] = TableUtils.Grouping.isInGroupMode(oTable) || TableUtils.Grouping.isInTreeMode(oTable) ? "treegrid" : "grid";
|
|
835
835
|
mAttributes["aria-describedby"] = [sTableId + "-ariaselection"];
|
|
836
|
-
mAttributes["aria-labelledby"] = oTable.getAriaLabelledBy()
|
|
836
|
+
mAttributes["aria-labelledby"] = [].concat(oTable.getAriaLabelledBy());
|
|
837
837
|
if (oTable.getTitle()) {
|
|
838
838
|
mAttributes["aria-labelledby"].push(oTable.getTitle().getId());
|
|
839
839
|
}
|
|
@@ -1148,7 +1148,7 @@ sap.ui.define([
|
|
|
1148
1148
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
1149
1149
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
1150
1150
|
* @author SAP SE
|
|
1151
|
-
* @version 1.
|
|
1151
|
+
* @version 1.135.0
|
|
1152
1152
|
* @constructor
|
|
1153
1153
|
* @private
|
|
1154
1154
|
* @alias sap.ui.table.extensions.Accessibility
|
|
@@ -1393,8 +1393,7 @@ sap.ui.define([
|
|
|
1393
1393
|
|
|
1394
1394
|
if (!oRow.isEmpty() && !oRow.isGroupHeader() && !oRow.isSummary()) {
|
|
1395
1395
|
const mKeyboardTexts = this.getKeyboardTexts();
|
|
1396
|
-
const
|
|
1397
|
-
const bIsSelected = oTable._getSelectionPlugin().isSelected(oRow);
|
|
1396
|
+
const bIsSelected = oRow._isSelected();
|
|
1398
1397
|
|
|
1399
1398
|
if ($Ref.row) {
|
|
1400
1399
|
$Ref.row.not($Ref.rowHeaderPart).not($Ref.rowActionPart).add(
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @class Extension for sap.ui.table.TableRenderer which handles ACC related things.
|
|
45
45
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
46
46
|
* @author SAP SE
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.135.0
|
|
48
48
|
* @constructor
|
|
49
49
|
* @private
|
|
50
50
|
* @alias sap.ui.table.extensions.AccessibilityRender
|
|
@@ -175,9 +175,8 @@ sap.ui.define([
|
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
const bIsSelected = oTable._getSelectionPlugin().isSelected(oRow);
|
|
179
178
|
const mKeyboardTexts = oTable._getAccExtension().getKeyboardTexts();
|
|
180
|
-
const sText =
|
|
179
|
+
const sText = oRow._isSelected() ? mKeyboardTexts.rowDeselect : mKeyboardTexts.rowSelect;
|
|
181
180
|
|
|
182
181
|
_writeAccText(oRm, oRow.getId(), "rowselecttext", oRow.isEmpty() ? "" : sText, ["sapUiTableAriaRowSel"]);
|
|
183
182
|
},
|