@openui5/sap.ui.table 1.114.0 → 1.115.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/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +0 -6
- 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 -13
- package/src/sap/ui/table/Column.js +5 -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 +1 -1
- 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 +7 -4
- package/src/sap/ui/table/TablePersoController.js +4 -1
- package/src/sap/ui/table/TableRenderer.js +6 -1
- package/src/sap/ui/table/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +1 -1
- package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -1
- 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 +1 -1
- package/src/sap/ui/table/extensions/Pointer.js +1 -1
- 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 +19 -17
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +2 -2
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +1 -0
- package/src/sap/ui/table/plugins/ODataV4Selection.js +51 -35
- package/src/sap/ui/table/plugins/PluginBase.js +1 -1
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
- package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -1
- package/src/sap/ui/table/plugins/V4Aggregation.js +5 -5
- package/src/sap/ui/table/rowmodes/AutoRowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/FixedRowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/InteractiveRowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/RowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/VariableRowMode.js +1 -1
- package/src/sap/ui/table/rules/Plugins.support.js +4 -4
- package/src/sap/ui/table/utils/TableUtils.js +15 -17
- 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/.reuse/dep5
CHANGED
|
@@ -192,11 +192,6 @@ Copyright: 2012 Matteo Spinelli
|
|
|
192
192
|
License: MIT
|
|
193
193
|
Comment: these files belong to: cubiq.org - swipeview
|
|
194
194
|
|
|
195
|
-
Files: src/sap.ui.core/src/sap/ui/thirdparty/mobify-carousel.js
|
|
196
|
-
Copyright: Mobify R&D Inc.
|
|
197
|
-
License: MIT
|
|
198
|
-
Comment: these files belong to: Mobify.js
|
|
199
|
-
|
|
200
195
|
Files: src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js
|
|
201
196
|
Copyright: 2011 Zynga Inc.
|
|
202
197
|
License: MIT
|
package/THIRDPARTY.txt
CHANGED
|
@@ -143,12 +143,6 @@ License: MIT
|
|
|
143
143
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
144
144
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/swipe-view.js
|
|
145
145
|
|
|
146
|
-
Component: Mobify.js, version: 1.1
|
|
147
|
-
Copyright: Mobify R&D Inc.
|
|
148
|
-
License: MIT
|
|
149
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
150
|
-
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/mobify-carousel.js
|
|
151
|
-
|
|
152
146
|
Component: Zynga Scroller, version: 1.2.1-0-g5d43806
|
|
153
147
|
Copyright: 2011 Zynga Inc.
|
|
154
148
|
License: MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.table",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.115.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.115.0",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.115.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.115.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -42,7 +42,6 @@ sap.ui.define([
|
|
|
42
42
|
"use strict";
|
|
43
43
|
|
|
44
44
|
var GroupEventType = library.GroupEventType;
|
|
45
|
-
var SortOrder = library.SortOrder;
|
|
46
45
|
var TreeAutoExpandMode = library.TreeAutoExpandMode;
|
|
47
46
|
var _private = TableUtils.createWeakMapFacade();
|
|
48
47
|
|
|
@@ -58,7 +57,7 @@ sap.ui.define([
|
|
|
58
57
|
* @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
|
|
59
58
|
*
|
|
60
59
|
* @extends sap.ui.table.Table
|
|
61
|
-
* @version 1.
|
|
60
|
+
* @version 1.115.0
|
|
62
61
|
*
|
|
63
62
|
* @constructor
|
|
64
63
|
* @public
|
|
@@ -346,15 +345,6 @@ sap.ui.define([
|
|
|
346
345
|
};
|
|
347
346
|
|
|
348
347
|
AnalyticalTable.prototype._applyAnalyticalBindingInfo = function(oBindingInfo) {
|
|
349
|
-
// extract the sorters from the columns (TODO: reconsider this!)
|
|
350
|
-
var aColumns = this.getColumns();
|
|
351
|
-
for (var i = 0, l = aColumns.length; i < l; i++) {
|
|
352
|
-
if (aColumns[i].getSorted()) {
|
|
353
|
-
oBindingInfo.sorter = oBindingInfo.sorter || [];
|
|
354
|
-
oBindingInfo.sorter.push(new Sorter(aColumns[i].getSortProperty() || aColumns[i].getLeadingProperty(), aColumns[i].getSortOrder() === SortOrder.Descending));
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
348
|
// Make sure all necessary parameters are given.
|
|
359
349
|
// The ODataModelAdapter (via bindList) needs these properties to determine if an AnalyticalBinding should be instantiated.
|
|
360
350
|
// This is the default for the AnalyticalTable.
|
|
@@ -642,7 +632,7 @@ sap.ui.define([
|
|
|
642
632
|
|
|
643
633
|
if (oGroupColumnInfo) {
|
|
644
634
|
var oColumn = oGroupColumnInfo.column;
|
|
645
|
-
oColumn.
|
|
635
|
+
oColumn._sort(false); //update Analytical Info triggered by aftersort in column
|
|
646
636
|
}
|
|
647
637
|
},
|
|
648
638
|
icon: "sap-icon://up"
|
|
@@ -658,7 +648,7 @@ sap.ui.define([
|
|
|
658
648
|
|
|
659
649
|
if (oGroupColumnInfo) {
|
|
660
650
|
var oColumn = oGroupColumnInfo.column;
|
|
661
|
-
oColumn.
|
|
651
|
+
oColumn._sort(true); //update Analytical Info triggered by aftersort in column
|
|
662
652
|
}
|
|
663
653
|
},
|
|
664
654
|
icon: "sap-icon://down"
|
|
@@ -72,7 +72,7 @@ sap.ui.define([
|
|
|
72
72
|
* @class
|
|
73
73
|
* The column allows you to define column specific properties that will be applied when rendering the table.
|
|
74
74
|
* @extends sap.ui.core.Element
|
|
75
|
-
* @version 1.
|
|
75
|
+
* @version 1.115.0
|
|
76
76
|
*
|
|
77
77
|
* @constructor
|
|
78
78
|
* @public
|
|
@@ -867,6 +867,10 @@ sap.ui.define([
|
|
|
867
867
|
* @deprecated Since version 1.5.1. Please use the function "sap.ui.Table.prototype.sort".
|
|
868
868
|
*/
|
|
869
869
|
Column.prototype.sort = function(bDescending, bAdd) {
|
|
870
|
+
return this._sort(bDescending, bAdd);
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
Column.prototype._sort = function(bDescending, bAdd) {
|
|
870
874
|
var oTable = this.getParent();
|
|
871
875
|
if (oTable) {
|
|
872
876
|
// add current column to list of sorted columns
|
package/src/sap/ui/table/Row.js
CHANGED
|
@@ -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.115.0
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @public
|
|
@@ -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.
|
|
27
|
+
* @version 1.115.0
|
|
28
28
|
*
|
|
29
29
|
* @constructor
|
|
30
30
|
* @public
|
|
@@ -92,7 +92,7 @@ sap.ui.define([
|
|
|
92
92
|
* the data model and binding being used.
|
|
93
93
|
* </p>
|
|
94
94
|
* @extends sap.ui.core.Control
|
|
95
|
-
* @version 1.
|
|
95
|
+
* @version 1.115.0
|
|
96
96
|
*
|
|
97
97
|
* @constructor
|
|
98
98
|
* @public
|
|
@@ -189,8 +189,10 @@ sap.ui.define([
|
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* Flag whether the controls of the Table are editable or not (currently this only controls the background color in certain themes!)
|
|
192
|
+
*
|
|
193
|
+
* @deprecated As of version 1.115
|
|
192
194
|
*/
|
|
193
|
-
editable: {type: "boolean", group: "Behavior", defaultValue: true},
|
|
195
|
+
editable: {type: "boolean", group: "Behavior", defaultValue: true, deprecated: true},
|
|
194
196
|
|
|
195
197
|
/**
|
|
196
198
|
* This property has been deprecated and must not be used anymore, since <code>Scrollbar</code> is the only supported option.
|
|
@@ -3110,7 +3112,7 @@ sap.ui.define([
|
|
|
3110
3112
|
}
|
|
3111
3113
|
|
|
3112
3114
|
if (this.getColumns().indexOf(oColumn) >= 0) {
|
|
3113
|
-
oColumn.
|
|
3115
|
+
oColumn._sort(oSortOrder === SortOrder.Descending, bAdd);
|
|
3114
3116
|
}
|
|
3115
3117
|
};
|
|
3116
3118
|
|
|
@@ -4433,6 +4435,7 @@ sap.ui.define([
|
|
|
4433
4435
|
* @throws {Error} If a selection plugin is applied
|
|
4434
4436
|
* @private
|
|
4435
4437
|
* @ui5-restricted sap.watt.hanaplugins.editor.plugin.hdbcalculationview
|
|
4438
|
+
* @deprecated As of version 1.115
|
|
4436
4439
|
*/
|
|
4437
4440
|
Table.prototype._enableLegacyMultiSelection = function() {
|
|
4438
4441
|
if (this._hasSelectionPlugin()) {
|
|
@@ -4453,7 +4456,7 @@ sap.ui.define([
|
|
|
4453
4456
|
} else {
|
|
4454
4457
|
this.setSelectedIndex(iIndex);
|
|
4455
4458
|
}
|
|
4456
|
-
} else if (bAdd || this.
|
|
4459
|
+
} else if (bAdd || this.getSelectedIndices().length === 1) {
|
|
4457
4460
|
this.removeSelectionInterval(iIndex, iIndex);
|
|
4458
4461
|
} else {
|
|
4459
4462
|
this.setSelectedIndex(iIndex);
|
|
@@ -23,6 +23,8 @@ sap.ui.define([
|
|
|
23
23
|
/**
|
|
24
24
|
* Constructor for a new TablePersoController.
|
|
25
25
|
*
|
|
26
|
+
* @deprecated since 1.115. Please use the {@link sap.m.p13n.Engine Engine} for personalization instead.
|
|
27
|
+
*
|
|
26
28
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
27
29
|
* @param {object} [mSettings] initial settings for the new control
|
|
28
30
|
*
|
|
@@ -31,7 +33,7 @@ sap.ui.define([
|
|
|
31
33
|
* @extends sap.ui.base.ManagedObject
|
|
32
34
|
*
|
|
33
35
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
36
|
+
* @version 1.115.0
|
|
35
37
|
* @since 1.21.1
|
|
36
38
|
*
|
|
37
39
|
* @constructor
|
|
@@ -45,6 +47,7 @@ sap.ui.define([
|
|
|
45
47
|
},
|
|
46
48
|
|
|
47
49
|
metadata: {
|
|
50
|
+
deprecated: true,
|
|
48
51
|
properties: {
|
|
49
52
|
|
|
50
53
|
/**
|
|
@@ -83,7 +83,12 @@ sap.ui.define(['sap/ui/Device', './library', "./Column", './utils/TableUtils', "
|
|
|
83
83
|
if (oScrollExtension.isVerticalScrollbarRequired() && !oScrollExtension.isVerticalScrollbarExternal()) {
|
|
84
84
|
rm.class("sapUiTableVScr"); // show vertical scrollbar
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
/*
|
|
87
|
+
* @UI5_V2_DEPRECATION_CHECK
|
|
88
|
+
* editable is a deprecated property of sap.ui.table.Table.
|
|
89
|
+
* Once the deprecated code is removed the following 3 lines of code will become obsolete.
|
|
90
|
+
*/
|
|
91
|
+
if (oTable.getEditable && oTable.getEditable()) {
|
|
87
92
|
rm.class("sapUiTableEdt"); // editable (background color)
|
|
88
93
|
}
|
|
89
94
|
|
|
@@ -932,7 +932,7 @@ sap.ui.define([
|
|
|
932
932
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
933
933
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
934
934
|
* @author SAP SE
|
|
935
|
-
* @version 1.
|
|
935
|
+
* @version 1.115.0
|
|
936
936
|
* @constructor
|
|
937
937
|
* @private
|
|
938
938
|
* @alias sap.ui.table.extensions.Accessibility
|
|
@@ -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.
|
|
45
|
+
* @version 1.115.0
|
|
46
46
|
* @constructor
|
|
47
47
|
* @private
|
|
48
48
|
* @alias sap.ui.table.extensions.AccessibilityRender
|
|
@@ -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.
|
|
270
|
+
* @version 1.115.0
|
|
271
271
|
* @constructor
|
|
272
272
|
* @private
|
|
273
273
|
* @alias sap.ui.table.extensions.Keyboard
|
|
@@ -770,7 +770,7 @@ sap.ui.define([
|
|
|
770
770
|
* @class Extension for sap.ui.table.Table which handles mouse and touch related things.
|
|
771
771
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
772
772
|
* @author SAP SE
|
|
773
|
-
* @version 1.
|
|
773
|
+
* @version 1.115.0
|
|
774
774
|
* @constructor
|
|
775
775
|
* @private
|
|
776
776
|
* @alias sap.ui.table.extensions.Pointer
|
|
@@ -2256,7 +2256,7 @@ sap.ui.define([
|
|
|
2256
2256
|
* @class Extension for sap.ui.table.Table which handles scrolling.
|
|
2257
2257
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
2258
2258
|
* @author SAP SE
|
|
2259
|
-
* @version 1.
|
|
2259
|
+
* @version 1.115.0
|
|
2260
2260
|
* @constructor
|
|
2261
2261
|
* @private
|
|
2262
2262
|
* @alias sap.ui.table.extensions.Scrolling
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class Extension for sap.ui.table.Table which handles the scrollbar on iOS.
|
|
28
28
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.115.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @alias sap.ui.table.extensions.ScrollingIOS
|
|
@@ -181,7 +181,7 @@ sap.ui.define([
|
|
|
181
181
|
* @class Extension for sap.ui.table.Table that allows synchronization with a table.
|
|
182
182
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
183
183
|
* @author SAP SE
|
|
184
|
-
* @version 1.
|
|
184
|
+
* @version 1.115.0
|
|
185
185
|
* @constructor
|
|
186
186
|
* @private
|
|
187
187
|
* @alias sap.ui.table.extensions.Synchronization
|
|
@@ -24,13 +24,13 @@ sap.ui.define([
|
|
|
24
24
|
* @namespace
|
|
25
25
|
* @alias sap.ui.table
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.115.0
|
|
28
28
|
* @since 0.8
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
31
|
var thisLib = sap.ui.getCore().initLibrary({
|
|
32
32
|
name: "sap.ui.table",
|
|
33
|
-
version: "1.
|
|
33
|
+
version: "1.115.0",
|
|
34
34
|
dependencies: ["sap.ui.core", "sap.ui.unified"],
|
|
35
35
|
designtime: "sap/ui/table/designtime/library.designtime",
|
|
36
36
|
types: [
|
|
@@ -69,12 +69,14 @@ sap.ui.define([
|
|
|
69
69
|
],
|
|
70
70
|
extensions: {
|
|
71
71
|
flChangeHandlers: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
// Note: MoveElements change handling is deprecated
|
|
73
|
+
//
|
|
74
|
+
// "sap.ui.table.Table": {
|
|
75
|
+
// "moveElements": "default"
|
|
76
|
+
// },
|
|
77
|
+
// "sap.ui.table.AnalyticalTable": {
|
|
78
|
+
// "moveElements": "default"
|
|
79
|
+
// }
|
|
78
80
|
},
|
|
79
81
|
//Configuration used for rule loading of Support Assistant
|
|
80
82
|
"sap.ui.support": {
|
|
@@ -86,7 +88,7 @@ sap.ui.define([
|
|
|
86
88
|
/**
|
|
87
89
|
* Navigation mode of the table
|
|
88
90
|
*
|
|
89
|
-
* @version 1.
|
|
91
|
+
* @version 1.115.0
|
|
90
92
|
* @enum {string}
|
|
91
93
|
* @public
|
|
92
94
|
*/
|
|
@@ -113,7 +115,7 @@ sap.ui.define([
|
|
|
113
115
|
/**
|
|
114
116
|
* Row Action types.
|
|
115
117
|
*
|
|
116
|
-
* @version 1.
|
|
118
|
+
* @version 1.115.0
|
|
117
119
|
* @enum {string}
|
|
118
120
|
* @public
|
|
119
121
|
*/
|
|
@@ -142,7 +144,7 @@ sap.ui.define([
|
|
|
142
144
|
/**
|
|
143
145
|
* Selection behavior of the table
|
|
144
146
|
*
|
|
145
|
-
* @version 1.
|
|
147
|
+
* @version 1.115.0
|
|
146
148
|
* @enum {string}
|
|
147
149
|
* @public
|
|
148
150
|
*/
|
|
@@ -171,7 +173,7 @@ sap.ui.define([
|
|
|
171
173
|
/**
|
|
172
174
|
* Selection mode of the table
|
|
173
175
|
*
|
|
174
|
-
* @version 1.
|
|
176
|
+
* @version 1.115.0
|
|
175
177
|
* @enum {string}
|
|
176
178
|
* @public
|
|
177
179
|
*/
|
|
@@ -207,7 +209,7 @@ sap.ui.define([
|
|
|
207
209
|
/**
|
|
208
210
|
* Sort order of a column
|
|
209
211
|
*
|
|
210
|
-
* @version 1.
|
|
212
|
+
* @version 1.115.0
|
|
211
213
|
* @enum {string}
|
|
212
214
|
* @public
|
|
213
215
|
*/
|
|
@@ -230,7 +232,7 @@ sap.ui.define([
|
|
|
230
232
|
/**
|
|
231
233
|
* VisibleRowCountMode of the table
|
|
232
234
|
*
|
|
233
|
-
* @version 1.
|
|
235
|
+
* @version 1.115.0
|
|
234
236
|
* @enum {string}
|
|
235
237
|
* @public
|
|
236
238
|
*/
|
|
@@ -261,7 +263,7 @@ sap.ui.define([
|
|
|
261
263
|
*
|
|
262
264
|
* Contains IDs of shared DOM references, which should be accessible to inheriting controls via getDomRef() function.
|
|
263
265
|
*
|
|
264
|
-
* @version 1.
|
|
266
|
+
* @version 1.115.0
|
|
265
267
|
* @enum {string}
|
|
266
268
|
* @public
|
|
267
269
|
*/
|
|
@@ -359,7 +361,7 @@ sap.ui.define([
|
|
|
359
361
|
*
|
|
360
362
|
* This is an alias for {@link sap.ui.model.TreeAutoExpandMode} and kept for compatibility reasons.
|
|
361
363
|
*
|
|
362
|
-
* @version 1.
|
|
364
|
+
* @version 1.115.0
|
|
363
365
|
* @typedef {sap.ui.model.TreeAutoExpandMode}
|
|
364
366
|
* @public
|
|
365
367
|
*/
|
|
@@ -372,7 +374,7 @@ sap.ui.define([
|
|
|
372
374
|
/**
|
|
373
375
|
* Mode of a selection plugin
|
|
374
376
|
*
|
|
375
|
-
* @version 1.
|
|
377
|
+
* @version 1.115.0
|
|
376
378
|
* @enum {string}
|
|
377
379
|
* @private
|
|
378
380
|
*/
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
*
|
|
60
60
|
* @extends sap.ui.table.menus.ColumnHeaderMenuAdapter
|
|
61
61
|
* @author SAP SE
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.115.0
|
|
63
63
|
* @private
|
|
64
64
|
* @alias sap.ui.table.menus.MobileColumnHeaderMenuAdapter
|
|
65
65
|
*/
|
|
@@ -209,7 +209,7 @@ sap.ui.define([
|
|
|
209
209
|
if (sSortOrder === CoreLibrary.SortOrder.None) {
|
|
210
210
|
this._oColumn._unsort();
|
|
211
211
|
} else {
|
|
212
|
-
this._oColumn.
|
|
212
|
+
this._oColumn._sort(sSortOrder === CoreLibrary.SortOrder.Descending, false);
|
|
213
213
|
}
|
|
214
214
|
}, this]
|
|
215
215
|
});
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
*
|
|
22
22
|
* @class Implements the selection methods for TreeTable and AnalyticalTable
|
|
23
23
|
* @extends sap.ui.table.plugins.SelectionPlugin
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.115.0
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @alias sap.ui.table.plugins.BindingSelection
|
|
@@ -125,7 +125,7 @@ sap.ui.define([
|
|
|
125
125
|
ODataV4Selection.prototype.setSelected = function(oRow, bSelected, mConfig) {
|
|
126
126
|
var oContext = oRow.getRowBindingContext();
|
|
127
127
|
|
|
128
|
-
if (!oContext) {
|
|
128
|
+
if (!oContext || !isContextSelectable(oContext)) {
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -153,11 +153,14 @@ sap.ui.define([
|
|
|
153
153
|
|
|
154
154
|
var iIndexFrom = oPlugin._oRangeSelectionStartContext.getIndex();
|
|
155
155
|
var oContext = oRow.getRowBindingContext();
|
|
156
|
-
var iIndexTo = oContext ? oContext.getIndex() :
|
|
156
|
+
var iIndexTo = oContext ? oContext.getIndex() : -1;
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
// The start index is already selected in case of range selection, so the range needs to start from the next index.
|
|
159
|
+
if (iIndexFrom !== iIndexTo) {
|
|
160
|
+
iIndexFrom += iIndexTo > iIndexFrom ? 1 : -1;
|
|
160
161
|
}
|
|
162
|
+
|
|
163
|
+
select(oPlugin, iIndexFrom, iIndexTo);
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
ODataV4Selection.prototype.isSelected = function(oRow) {
|
|
@@ -180,22 +183,48 @@ sap.ui.define([
|
|
|
180
183
|
icon: this.oDeselectAllIcon,
|
|
181
184
|
visible: this.getSelectionMode() === SelectionMode.MultiToggle && !this.getHideHeaderSelector(),
|
|
182
185
|
enabled: this._isLimitDisabled() || this.getSelectedCount() > 0,
|
|
183
|
-
selected:
|
|
186
|
+
selected: areAllRowsSelected(this)
|
|
184
187
|
}
|
|
185
188
|
};
|
|
186
189
|
};
|
|
187
190
|
|
|
188
191
|
/**
|
|
189
|
-
*
|
|
192
|
+
* Selects all rows if not all are already selected, otherwise the selection is cleared.
|
|
190
193
|
*
|
|
191
|
-
* @param {sap.ui.table.plugins.ODataV4Selection} oPlugin The
|
|
194
|
+
* @param {sap.ui.table.plugins.ODataV4Selection} oPlugin The selection plugin.
|
|
192
195
|
*/
|
|
193
196
|
function toggleSelectAll(oPlugin) {
|
|
194
|
-
if (
|
|
195
|
-
selectAll(oPlugin);
|
|
196
|
-
} else {
|
|
197
|
+
if (areAllRowsSelected(oPlugin)) {
|
|
197
198
|
oPlugin.clearSelection();
|
|
199
|
+
} else if (oPlugin._isLimitDisabled()) {
|
|
200
|
+
var oBinding = oPlugin.getTableBinding();
|
|
201
|
+
select(oPlugin, 0, oBinding ? oBinding.getLength() - 1 : -1);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Checks if all rows are selected.
|
|
207
|
+
*
|
|
208
|
+
* @param {sap.ui.table.plugins.ODataV4Selection} oPlugin The selection plugin.
|
|
209
|
+
* @returns {boolean} Whether all rows are selected.
|
|
210
|
+
*/
|
|
211
|
+
function areAllRowsSelected(oPlugin) {
|
|
212
|
+
var oBinding = oPlugin.getTableBinding();
|
|
213
|
+
|
|
214
|
+
// isLengthFinal is checked in case the count is not requested. Even though it is documented that the count is required if the limit is
|
|
215
|
+
// disabled (SelectAll enabled), it could still happen.
|
|
216
|
+
if (!oBinding || !oBinding.isLengthFinal()) {
|
|
217
|
+
return false;
|
|
198
218
|
}
|
|
219
|
+
|
|
220
|
+
var iNumberOfSelectableContexts = oBinding.getAllCurrentContexts().filter(function(oContext) {
|
|
221
|
+
return isContextSelectable(oContext);
|
|
222
|
+
}).length;
|
|
223
|
+
var iNumberOfSelectedContexts = oPlugin.getSelectedContexts().filter(function(oContext) {
|
|
224
|
+
return isContextSelectable(oContext);
|
|
225
|
+
}).length;
|
|
226
|
+
|
|
227
|
+
return iNumberOfSelectableContexts > 0 && iNumberOfSelectableContexts === iNumberOfSelectedContexts;
|
|
199
228
|
}
|
|
200
229
|
|
|
201
230
|
ODataV4Selection.prototype.onHeaderSelectorPress = function() {
|
|
@@ -206,7 +235,7 @@ sap.ui.define([
|
|
|
206
235
|
}
|
|
207
236
|
|
|
208
237
|
if (mRenderConfig.headerSelector.type === "toggle") {
|
|
209
|
-
toggleSelectAll(this
|
|
238
|
+
toggleSelectAll(this);
|
|
210
239
|
} else if (mRenderConfig.headerSelector.type === "clear") {
|
|
211
240
|
this.clearSelection();
|
|
212
241
|
}
|
|
@@ -306,25 +335,16 @@ sap.ui.define([
|
|
|
306
335
|
});
|
|
307
336
|
}
|
|
308
337
|
|
|
309
|
-
function
|
|
310
|
-
if (
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
function selectRange(oPlugin, iIndexFrom, iIndexTo) {
|
|
316
|
-
// The start index is already selected in case of range selection, so the range needs to start from the next index.
|
|
317
|
-
if (iIndexFrom !== iIndexTo) {
|
|
318
|
-
iIndexFrom += iIndexTo > iIndexFrom ? 1 : -1;
|
|
338
|
+
function select(oPlugin, iIndexFrom, iIndexTo) {
|
|
339
|
+
if (iIndexFrom < 0 || iIndexTo < 0) {
|
|
340
|
+
return;
|
|
319
341
|
}
|
|
320
342
|
|
|
321
|
-
select(oPlugin, iIndexFrom, iIndexTo);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
function select(oPlugin, iIndexFrom, iIndexTo) {
|
|
325
343
|
loadLimitedContexts(oPlugin, iIndexFrom, iIndexTo).then(function(mSelectionInfo) {
|
|
326
344
|
mSelectionInfo.contexts.forEach(function(oContext) {
|
|
327
|
-
oContext
|
|
345
|
+
if (isContextSelectable(oContext)) {
|
|
346
|
+
oContext.setSelected(true);
|
|
347
|
+
}
|
|
328
348
|
});
|
|
329
349
|
return oPlugin._scrollTableToIndex(mSelectionInfo.indexTo, mSelectionInfo.indexFrom > mSelectionInfo.indexTo);
|
|
330
350
|
}).then(function() {
|
|
@@ -332,6 +352,11 @@ sap.ui.define([
|
|
|
332
352
|
});
|
|
333
353
|
}
|
|
334
354
|
|
|
355
|
+
function isContextSelectable(oContext) {
|
|
356
|
+
var bIsTree = "hierarchyQualifier" in (oContext.getBinding().getAggregation() || {});
|
|
357
|
+
return (bIsTree || oContext.getProperty("@$ui5.node.isExpanded") === undefined) && !oContext.getProperty("@$ui5.node.isTotal");
|
|
358
|
+
}
|
|
359
|
+
|
|
335
360
|
ODataV4Selection.prototype.clearSelection = function() {
|
|
336
361
|
var bContextDeselected = false;
|
|
337
362
|
|
|
@@ -355,15 +380,6 @@ sap.ui.define([
|
|
|
355
380
|
}) : [];
|
|
356
381
|
};
|
|
357
382
|
|
|
358
|
-
ODataV4Selection.prototype._getSelectableCount = function() {
|
|
359
|
-
var oBinding = this.getTableBinding();
|
|
360
|
-
return oBinding ? oBinding.getLength() : 0;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
ODataV4Selection.prototype._getHighestSelectableIndex = function() {
|
|
364
|
-
return this._getSelectableCount() - 1;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
383
|
/**
|
|
368
384
|
* If the limit is reached, the table is scrolled to the <code>iIndex</code>.
|
|
369
385
|
* If <code>bReverse</code> is true the <code>firstVisibleRow</code> property of the Table is set to <code>iIndex</code> - 1,
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
*
|
|
24
24
|
* @class Implements the selection methods for a Table
|
|
25
25
|
* @extends sap.ui.table.plugins.SelectionPlugin
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.115.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @alias sap.ui.table.plugins.SelectionModelSelection
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @class TODO (don't forget to document fixed row count restrictions because fixed rows are set by this plugin)
|
|
33
33
|
* @extends sap.ui.table.plugins.PluginBase
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.115.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.76
|
|
38
38
|
* @experimental
|
|
@@ -194,16 +194,16 @@ sap.ui.define([
|
|
|
194
194
|
};
|
|
195
195
|
|
|
196
196
|
V4Aggregation.prototype.updateRowState = function(oState) {
|
|
197
|
-
var iLevel = oState.context.
|
|
198
|
-
var bContainsTotals = oState.context.
|
|
199
|
-
var bIsLeaf = oState.context.
|
|
197
|
+
var iLevel = oState.context.getProperty("@$ui5.node.level");
|
|
198
|
+
var bContainsTotals = oState.context.getProperty("@$ui5.node.isTotal");
|
|
199
|
+
var bIsLeaf = oState.context.getProperty("@$ui5.node.isExpanded") === undefined;
|
|
200
200
|
var bIsGrandTotal = iLevel === 0 && bContainsTotals;
|
|
201
201
|
var bIsGroupHeader = iLevel > 0 && !bIsLeaf;
|
|
202
202
|
var bIsGroupTotal = !bIsGroupHeader && bContainsTotals;
|
|
203
203
|
|
|
204
204
|
oState.level = iLevel;
|
|
205
205
|
oState.expandable = bIsGroupHeader;
|
|
206
|
-
oState.expanded = oState.context.
|
|
206
|
+
oState.expanded = oState.context.getProperty("@$ui5.node.isExpanded") === true;
|
|
207
207
|
|
|
208
208
|
if (bIsGrandTotal || bIsGroupTotal) {
|
|
209
209
|
oState.type = oState.Type.Summary;
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @ui5-restricted sap.ui.mdc
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.115.0
|
|
39
39
|
*/
|
|
40
40
|
var AutoRowMode = RowMode.extend("sap.ui.table.rowmodes.AutoRowMode", /** @lends sap.ui.table.rowmodes.AutoRowMode.prototype */ {
|
|
41
41
|
metadata: {
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @ui5-restricted sap.ui.mdc
|
|
30
30
|
*
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.115.0
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
35
|
var FixedRowMode = RowMode.extend("sap.ui.table.rowmodes.FixedRowMode", /** @lends sap.ui.table.rowmodes.FixedRowMode.prototype */ {
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @ui5-restricted sap.ui.mdc
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.115.0
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
var InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.InteractiveRowMode", /** @lends sap.ui.table.rowmodes.InteractiveRowMode.prototype */ {
|
|
@@ -20,9 +20,9 @@ sap.ui.define([
|
|
|
20
20
|
minversion: "1.64",
|
|
21
21
|
categories: [Categories.Usage],
|
|
22
22
|
title: "Plugins validation",
|
|
23
|
-
description: "Checks the number and type of plugins which are applied to the table. Only one
|
|
23
|
+
description: "Checks the number and type of plugins which are applied to the table. Only one selection plugin can be applied. "
|
|
24
24
|
+ "No other plugins are allowed.",
|
|
25
|
-
resolution: "Check if multiple
|
|
25
|
+
resolution: "Check if multiple selection plugins are applied, or a plugin of another type is applied to the table.",
|
|
26
26
|
check: function(oIssueManager, oCoreFacade, oScope) {
|
|
27
27
|
var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
|
|
28
28
|
|
|
@@ -35,9 +35,9 @@ sap.ui.define([
|
|
|
35
35
|
Severity.High, oTable.getId());
|
|
36
36
|
} else if (aPlugins.length == 1) {
|
|
37
37
|
var oPlugin = aPlugins[0];
|
|
38
|
-
if (!oPlugin.isA("sap.ui.table.plugins.
|
|
38
|
+
if (!oPlugin.isA("sap.ui.table.plugins.SelectionPlugin")) {
|
|
39
39
|
SupportHelper.reportIssue(oIssueManager,
|
|
40
|
-
"Only
|
|
40
|
+
"Only a selection plugin can be applied to the table",
|
|
41
41
|
Severity.High, oTable.getId());
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -203,7 +203,7 @@ sap.ui.define([
|
|
|
203
203
|
* Static collection of utility functions related to the sap.ui.table.Table, ...
|
|
204
204
|
*
|
|
205
205
|
* @author SAP SE
|
|
206
|
-
* @version 1.
|
|
206
|
+
* @version 1.115.0
|
|
207
207
|
* @namespace
|
|
208
208
|
* @alias sap.ui.table.utils.TableUtils
|
|
209
209
|
* @private
|
|
@@ -386,24 +386,11 @@ sap.ui.define([
|
|
|
386
386
|
* @param {jQuery | HTMLElement | int | sap.ui.table.Row} vRowIndicator
|
|
387
387
|
* The data cell in the row, the index of the row in the aggregation, or the row instance on which to toggle the selection state.
|
|
388
388
|
* @param {boolean} [bSelect] If defined, then instead of toggling the desired state is set.
|
|
389
|
-
* @param {
|
|
389
|
+
* @param {function(sap.ui.table.Row)} [fnDoSelect] If defined, then instead of the default selection code, this custom callback is used.
|
|
390
390
|
*/
|
|
391
391
|
toggleRowSelection: function(oTable, vRowIndicator, bSelect, fnDoSelect) {
|
|
392
392
|
var oRow;
|
|
393
393
|
|
|
394
|
-
function setSelectionState(oRow) {
|
|
395
|
-
oTable._iSourceRowIndex = oRow.getIndex(); // To indicate that the selection was changed by user interaction. TODO: Move to plugin and legacy multi selection
|
|
396
|
-
|
|
397
|
-
if (fnDoSelect) {
|
|
398
|
-
fnDoSelect(oRow, bSelect);
|
|
399
|
-
} else {
|
|
400
|
-
var oSelectionPlugin = oTable._getSelectionPlugin();
|
|
401
|
-
oSelectionPlugin.setSelected(oRow, typeof bSelect === "boolean" ? bSelect : !oSelectionPlugin.isSelected(oRow));
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
delete oTable._iSourceRowIndex;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
394
|
if (TableUtils.isA(vRowIndicator, "sap.ui.table.Row")) {
|
|
408
395
|
oRow = vRowIndicator;
|
|
409
396
|
} else if (typeof vRowIndicator === "number") {
|
|
@@ -421,9 +408,20 @@ sap.ui.define([
|
|
|
421
408
|
}
|
|
422
409
|
}
|
|
423
410
|
|
|
424
|
-
if (oRow) {
|
|
425
|
-
|
|
411
|
+
if (!oRow || oRow.isEmpty()) {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
oTable._iSourceRowIndex = oRow.getIndex(); // To indicate that the selection was changed by user interaction. TODO: Move to plugin and legacy multi selection
|
|
416
|
+
|
|
417
|
+
if (fnDoSelect) {
|
|
418
|
+
fnDoSelect(oRow);
|
|
419
|
+
} else {
|
|
420
|
+
var oSelectionPlugin = oTable._getSelectionPlugin();
|
|
421
|
+
oSelectionPlugin.setSelected(oRow, typeof bSelect === "boolean" ? bSelect : !oSelectionPlugin.isSelected(oRow));
|
|
426
422
|
}
|
|
423
|
+
|
|
424
|
+
delete oTable._iSourceRowIndex;
|
|
427
425
|
},
|
|
428
426
|
|
|
429
427
|
/**
|
|
@@ -14,7 +14,7 @@ sap.ui.define([], function() {
|
|
|
14
14
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Binding...</code>
|
|
15
15
|
*
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @version 1.
|
|
17
|
+
* @version 1.115.0
|
|
18
18
|
* @namespace
|
|
19
19
|
* @alias sap.ui.table.utils._BindingUtils
|
|
20
20
|
* @private
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Column...</code>
|
|
19
19
|
*
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.115.0
|
|
22
22
|
* @namespace
|
|
23
23
|
* @alias sap.ui.table.utils._ColumnUtils
|
|
24
24
|
* @private
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Grouping...</code>
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.115.0
|
|
27
27
|
* @namespace
|
|
28
28
|
* @alias sap.ui.table.utils._GroupingUtils
|
|
29
29
|
* @private
|
|
@@ -22,7 +22,7 @@ sap.ui.define(["sap/ui/base/DataType"], function(DataType) {
|
|
|
22
22
|
* - There is no concept for public or protected hooks. Never expose a hook directly, only indirectly as can be seen in the examples.
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.115.0
|
|
26
26
|
* @namespace
|
|
27
27
|
* @alias sap.ui.table.utils._HookUtils
|
|
28
28
|
*
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Menu...</code>
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.115.0
|
|
43
43
|
* @namespace
|
|
44
44
|
* @alias sap.ui.table.utils._MenuUtils
|
|
45
45
|
* @private
|