@openui5/sap.ui.table 1.107.1 → 1.108.1
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 +1 -1
- 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 +23 -21
- package/src/sap/ui/table/Column.js +9 -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 +3 -3
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +1 -0
- package/src/sap/ui/table/TreeTable.js +38 -162
- package/src/sap/ui/table/extensions/Accessibility.js +4 -11
- package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -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 +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 +3 -2
- package/src/sap/ui/table/library.js +10 -10
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +3 -2
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +15 -15
- package/src/sap/ui/table/messagebundle.properties +3 -3
- package/src/sap/ui/table/messagebundle_ar.properties +2 -2
- package/src/sap/ui/table/messagebundle_bg.properties +2 -2
- package/src/sap/ui/table/messagebundle_ca.properties +2 -2
- package/src/sap/ui/table/messagebundle_cs.properties +2 -2
- package/src/sap/ui/table/messagebundle_cy.properties +2 -2
- package/src/sap/ui/table/messagebundle_da.properties +2 -2
- package/src/sap/ui/table/messagebundle_de.properties +2 -2
- package/src/sap/ui/table/messagebundle_el.properties +2 -2
- package/src/sap/ui/table/messagebundle_en.properties +2 -2
- package/src/sap/ui/table/messagebundle_en_GB.properties +2 -2
- package/src/sap/ui/table/messagebundle_en_US_sappsd.properties +2 -2
- package/src/sap/ui/table/messagebundle_en_US_saprigi.properties +2 -2
- package/src/sap/ui/table/messagebundle_en_US_saptrc.properties +2 -2
- package/src/sap/ui/table/messagebundle_es.properties +2 -2
- package/src/sap/ui/table/messagebundle_es_MX.properties +2 -2
- package/src/sap/ui/table/messagebundle_et.properties +2 -2
- package/src/sap/ui/table/messagebundle_fi.properties +2 -2
- package/src/sap/ui/table/messagebundle_fr.properties +2 -2
- package/src/sap/ui/table/messagebundle_fr_CA.properties +2 -2
- package/src/sap/ui/table/messagebundle_hi.properties +2 -2
- package/src/sap/ui/table/messagebundle_hr.properties +2 -2
- package/src/sap/ui/table/messagebundle_hu.properties +2 -2
- package/src/sap/ui/table/messagebundle_id.properties +2 -2
- package/src/sap/ui/table/messagebundle_it.properties +2 -2
- package/src/sap/ui/table/messagebundle_iw.properties +2 -2
- package/src/sap/ui/table/messagebundle_ja.properties +2 -2
- package/src/sap/ui/table/messagebundle_kk.properties +2 -2
- package/src/sap/ui/table/messagebundle_ko.properties +2 -2
- package/src/sap/ui/table/messagebundle_lt.properties +2 -2
- package/src/sap/ui/table/messagebundle_lv.properties +2 -2
- package/src/sap/ui/table/messagebundle_ms.properties +2 -2
- package/src/sap/ui/table/messagebundle_nl.properties +2 -2
- package/src/sap/ui/table/messagebundle_no.properties +2 -2
- package/src/sap/ui/table/messagebundle_pl.properties +2 -2
- package/src/sap/ui/table/messagebundle_pt.properties +2 -2
- package/src/sap/ui/table/messagebundle_pt_PT.properties +2 -2
- package/src/sap/ui/table/messagebundle_ro.properties +2 -2
- package/src/sap/ui/table/messagebundle_ru.properties +2 -2
- package/src/sap/ui/table/messagebundle_sh.properties +2 -2
- package/src/sap/ui/table/messagebundle_sk.properties +2 -2
- package/src/sap/ui/table/messagebundle_sl.properties +2 -2
- package/src/sap/ui/table/messagebundle_sv.properties +2 -2
- package/src/sap/ui/table/messagebundle_th.properties +2 -2
- package/src/sap/ui/table/messagebundle_tr.properties +2 -2
- package/src/sap/ui/table/messagebundle_uk.properties +2 -2
- package/src/sap/ui/table/messagebundle_vi.properties +2 -2
- package/src/sap/ui/table/messagebundle_zh_CN.properties +2 -2
- package/src/sap/ui/table/messagebundle_zh_TW.properties +2 -2
- package/src/sap/ui/table/plugins/BindingSelection.js +13 -8
- 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 +1 -1
- 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/utils/TableUtils.js +2 -2
- 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
|
@@ -382,7 +382,7 @@ Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/D
|
|
|
382
382
|
|
|
383
383
|
Library: sap.ui.integration:
|
|
384
384
|
|
|
385
|
-
Component: UI5 Web Components, version: 1.0
|
|
385
|
+
Component: UI5 Web Components, version: 1.7.0
|
|
386
386
|
Copyright: SAP
|
|
387
387
|
License: Apache-2.0
|
|
388
388
|
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.108.1",
|
|
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.108.1",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.108.1"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2022 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.108.1</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -19,7 +19,8 @@ sap.ui.define([
|
|
|
19
19
|
"./plugins/BindingSelection",
|
|
20
20
|
"sap/base/Log",
|
|
21
21
|
"sap/base/assert",
|
|
22
|
-
"sap/ui/thirdparty/jquery"
|
|
22
|
+
"sap/ui/thirdparty/jquery",
|
|
23
|
+
"sap/ui/model/controlhelper/TreeBindingProxy"
|
|
23
24
|
],
|
|
24
25
|
function(
|
|
25
26
|
AnalyticalColumn,
|
|
@@ -35,7 +36,8 @@ sap.ui.define([
|
|
|
35
36
|
BindingSelectionPlugin,
|
|
36
37
|
Log,
|
|
37
38
|
assert,
|
|
38
|
-
jQuery
|
|
39
|
+
jQuery,
|
|
40
|
+
TreeBindingProxy
|
|
39
41
|
) {
|
|
40
42
|
"use strict";
|
|
41
43
|
|
|
@@ -56,7 +58,7 @@ sap.ui.define([
|
|
|
56
58
|
* @see http://scn.sap.com/docs/DOC-44986
|
|
57
59
|
*
|
|
58
60
|
* @extends sap.ui.table.Table
|
|
59
|
-
* @version 1.
|
|
61
|
+
* @version 1.108.1
|
|
60
62
|
*
|
|
61
63
|
* @constructor
|
|
62
64
|
* @public
|
|
@@ -173,7 +175,16 @@ sap.ui.define([
|
|
|
173
175
|
return oBinding ? [oBinding.getGrandTotalNode()] : [];
|
|
174
176
|
};
|
|
175
177
|
|
|
176
|
-
AnalyticalTable.prototype._getContexts =
|
|
178
|
+
AnalyticalTable.prototype._getContexts = function(iStartIndex, iLength, iThreshold) {
|
|
179
|
+
var oBinding = this.getBinding();
|
|
180
|
+
if (oBinding) {
|
|
181
|
+
// first call getContexts to trigger data load but return nodes instead of contexts
|
|
182
|
+
return oBinding.getNodes(iStartIndex, iLength, iThreshold);
|
|
183
|
+
} else {
|
|
184
|
+
return [];
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
177
188
|
AnalyticalTable.prototype._getRowContexts = TreeTable.prototype._getRowContexts;
|
|
178
189
|
|
|
179
190
|
/**
|
|
@@ -202,6 +213,8 @@ sap.ui.define([
|
|
|
202
213
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Table.OpenMenu, onOpenTableContextMenu, this);
|
|
203
214
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Expand, expandRow, this);
|
|
204
215
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Collapse, collapseRow, this);
|
|
216
|
+
|
|
217
|
+
this._oProxy = new TreeBindingProxy(this, "rows");
|
|
205
218
|
};
|
|
206
219
|
|
|
207
220
|
AnalyticalTable.prototype.exit = function() {
|
|
@@ -744,13 +757,11 @@ sap.ui.define([
|
|
|
744
757
|
* @public
|
|
745
758
|
*/
|
|
746
759
|
AnalyticalTable.prototype.getContextByIndex = function(iIndex) {
|
|
747
|
-
|
|
748
|
-
return iIndex >= 0 && oBinding ? oBinding.getContextByIndex(iIndex) : null;
|
|
760
|
+
return iIndex >= 0 && this._oProxy.getContextByIndex(iIndex);
|
|
749
761
|
};
|
|
750
762
|
|
|
751
763
|
AnalyticalTable.prototype.getContextInfoByIndex = function(iIndex) {
|
|
752
|
-
|
|
753
|
-
return iIndex >= 0 && oBinding ? oBinding.getNodeByIndex(iIndex) : null;
|
|
764
|
+
return iIndex >= 0 && this._oProxy.getNodeByIndex(iIndex);
|
|
754
765
|
};
|
|
755
766
|
|
|
756
767
|
/**
|
|
@@ -1050,13 +1061,7 @@ sap.ui.define([
|
|
|
1050
1061
|
* @param {boolean} bCollapseRecursive
|
|
1051
1062
|
*/
|
|
1052
1063
|
AnalyticalTable.prototype.setCollapseRecursive = function(bCollapseRecursive) {
|
|
1053
|
-
|
|
1054
|
-
if (oBinding) {
|
|
1055
|
-
assert(oBinding.setCollapseRecursive, "Collapse Recursive is not supported by the used binding");
|
|
1056
|
-
if (oBinding.setCollapseRecursive) {
|
|
1057
|
-
oBinding.setCollapseRecursive(bCollapseRecursive);
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1064
|
+
this._oProxy.setCollapseRecursive(bCollapseRecursive);
|
|
1060
1065
|
this.setProperty("collapseRecursive", !!bCollapseRecursive, true);
|
|
1061
1066
|
return this;
|
|
1062
1067
|
};
|
|
@@ -1202,12 +1207,9 @@ sap.ui.define([
|
|
|
1202
1207
|
* @since 1.70
|
|
1203
1208
|
*/
|
|
1204
1209
|
AnalyticalTable.prototype.expandAll = function() {
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
this.setFirstVisibleRow(0);
|
|
1209
|
-
this._getSelectionPlugin().clearSelection();
|
|
1210
|
-
}
|
|
1210
|
+
this._oProxy.expandToLevel(this._aGroupedColumns.length);
|
|
1211
|
+
this.setFirstVisibleRow(0);
|
|
1212
|
+
this._getSelectionPlugin().clearSelection();
|
|
1211
1213
|
return this;
|
|
1212
1214
|
};
|
|
1213
1215
|
|
|
@@ -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.108.1
|
|
76
76
|
*
|
|
77
77
|
* @constructor
|
|
78
78
|
* @public
|
|
@@ -460,6 +460,14 @@ sap.ui.define([
|
|
|
460
460
|
_private(this).bHasDefaultLabel = false;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
if (oLabel && oLabel.setIsInColumnHeaderContext) {
|
|
464
|
+
oLabel.setIsInColumnHeaderContext(true);
|
|
465
|
+
}
|
|
466
|
+
var oCurrLabel = this.getLabel();
|
|
467
|
+
if (oCurrLabel && oLabel !== oCurrLabel && oCurrLabel.setIsInColumnHeaderContext) {
|
|
468
|
+
oCurrLabel.setIsInColumnHeaderContext(false);
|
|
469
|
+
}
|
|
470
|
+
|
|
463
471
|
return this.setAggregation("label", oLabel);
|
|
464
472
|
};
|
|
465
473
|
|
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.108.1
|
|
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.108.1
|
|
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.108.1
|
|
96
96
|
*
|
|
97
97
|
* @constructor
|
|
98
98
|
* @public
|
|
@@ -501,7 +501,7 @@ sap.ui.define([
|
|
|
501
501
|
* Defines the message strip to display binding-related messages.
|
|
502
502
|
* @since 1.73
|
|
503
503
|
*/
|
|
504
|
-
_messageStrip: {type : "sap.ui.core.Control", multiple : false, visibility : "hidden"},
|
|
504
|
+
_messageStrip : {type : "sap.ui.core.Control", multiple : false, visibility : "hidden"},
|
|
505
505
|
|
|
506
506
|
/**
|
|
507
507
|
* Hidden dependents are dependents that are not cloned. But like for normal dependents, their data binding context and
|
|
@@ -4008,7 +4008,7 @@ sap.ui.define([
|
|
|
4008
4008
|
_private(oTable).hideBusyIndicatorTimeoutId = setTimeout(function() {
|
|
4009
4009
|
oTable.setBusy(false);
|
|
4010
4010
|
clearHideBusyIndicatorTimeout(oTable);
|
|
4011
|
-
},
|
|
4011
|
+
}, 10); // BCP: 2270133571 - In V4 there can be asynchronous sequential requests where a timeout of 0 is insufficient to avoid flickering.
|
|
4012
4012
|
}
|
|
4013
4013
|
}
|
|
4014
4014
|
|
|
@@ -1338,6 +1338,7 @@ sap.ui.define(['sap/ui/Device', './library', "./Column", './utils/TableUtils', "
|
|
|
1338
1338
|
if (sId) {
|
|
1339
1339
|
rm.attr("id", sId);
|
|
1340
1340
|
}
|
|
1341
|
+
rm.attr("role", "none");
|
|
1341
1342
|
rm.attr("tabindex", sTabIndex == null ? "0" : sTabIndex);
|
|
1342
1343
|
rm.openEnd().close("div");
|
|
1343
1344
|
};
|
|
@@ -14,7 +14,8 @@ sap.ui.define([
|
|
|
14
14
|
'./utils/TableUtils',
|
|
15
15
|
"./plugins/BindingSelection",
|
|
16
16
|
"sap/base/Log",
|
|
17
|
-
"sap/base/assert"
|
|
17
|
+
"sap/base/assert",
|
|
18
|
+
"sap/ui/model/controlhelper/TreeBindingProxy"
|
|
18
19
|
],
|
|
19
20
|
function(
|
|
20
21
|
Table,
|
|
@@ -25,7 +26,8 @@ sap.ui.define([
|
|
|
25
26
|
TableUtils,
|
|
26
27
|
BindingSelectionPlugin,
|
|
27
28
|
Log,
|
|
28
|
-
assert
|
|
29
|
+
assert,
|
|
30
|
+
TreeBindingProxy
|
|
29
31
|
) {
|
|
30
32
|
"use strict";
|
|
31
33
|
|
|
@@ -40,7 +42,7 @@ sap.ui.define([
|
|
|
40
42
|
* @class
|
|
41
43
|
* The TreeTable control provides a comprehensive set of features to display hierarchical data.
|
|
42
44
|
* @extends sap.ui.table.Table
|
|
43
|
-
* @version 1.
|
|
45
|
+
* @version 1.108.1
|
|
44
46
|
*
|
|
45
47
|
* @constructor
|
|
46
48
|
* @public
|
|
@@ -70,7 +72,7 @@ sap.ui.define([
|
|
|
70
72
|
* });
|
|
71
73
|
* </pre>
|
|
72
74
|
*
|
|
73
|
-
* @deprecated As of version 1.46.3, replaced by the <code>numberOfExpandedLevels</code> binding parameter
|
|
75
|
+
* @deprecated As of version 1.46.3, replaced by the <code>numberOfExpandedLevels</code> binding parameter. May not work with all bindings.
|
|
74
76
|
*/
|
|
75
77
|
expandFirstLevel : {type : "boolean", defaultValue : false, deprecated: true},
|
|
76
78
|
|
|
@@ -102,7 +104,7 @@ sap.ui.define([
|
|
|
102
104
|
* });
|
|
103
105
|
* </pre>
|
|
104
106
|
*
|
|
105
|
-
* @deprecated As of version 1.76, replaced by the <code>collapseRecursive</code> binding parameter
|
|
107
|
+
* @deprecated As of version 1.76, replaced by the <code>collapseRecursive</code> binding parameter. May not work with all bindings.
|
|
106
108
|
*/
|
|
107
109
|
collapseRecursive : {type: "boolean", defaultValue: true, deprecated: true},
|
|
108
110
|
|
|
@@ -122,7 +124,7 @@ sap.ui.define([
|
|
|
122
124
|
* });
|
|
123
125
|
* </pre>
|
|
124
126
|
*
|
|
125
|
-
* @deprecated As of version 1.76, replaced by the <code>rootLevel</code> binding parameter
|
|
127
|
+
* @deprecated As of version 1.76, replaced by the <code>rootLevel</code> binding parameter. May not work with all bindings.
|
|
126
128
|
*/
|
|
127
129
|
rootLevel : {type: "int", group: "Data", defaultValue: 0, deprecated: true}
|
|
128
130
|
},
|
|
@@ -167,49 +169,29 @@ sap.ui.define([
|
|
|
167
169
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.UpdateState, updateRowState, this);
|
|
168
170
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Expand, expandRow, this);
|
|
169
171
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Collapse, collapseRow, this);
|
|
172
|
+
|
|
173
|
+
this._oProxy = new TreeBindingProxy(this, "rows");
|
|
170
174
|
};
|
|
171
175
|
|
|
172
176
|
TreeTable.prototype._bindRows = function(oBindingInfo) {
|
|
173
177
|
_private(this).bPendingRequest = false;
|
|
174
178
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (!("collapseRecursive" in oBindingInfo.parameters)) {
|
|
184
|
-
oBindingInfo.parameters.collapseRecursive = this.getCollapseRecursive();
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (!("numberOfExpandedLevels" in oBindingInfo.parameters)) {
|
|
188
|
-
oBindingInfo.parameters.numberOfExpandedLevels = this.getExpandFirstLevel() ? 1 : 0;
|
|
189
|
-
}
|
|
179
|
+
var iExpandedLevels = this.getExpandFirstLevel() ? 1 : 0;
|
|
180
|
+
this._oProxy.applyLegacySettingsToBindingInfo(oBindingInfo, {
|
|
181
|
+
rootLevel: this.isPropertyInitial("rootLevel") ? undefined : this.getRootLevel(),
|
|
182
|
+
collapseResursive: this.isPropertyInitial("collapseRecursive") ? undefined : this.getCollapseRecursive(),
|
|
183
|
+
numberOfExpandedLevels: this.isPropertyInitial("expandFirstLevel") ? undefined : iExpandedLevels
|
|
184
|
+
});
|
|
190
185
|
|
|
191
186
|
return Table.prototype._bindRows.call(this, oBindingInfo);
|
|
192
187
|
};
|
|
193
188
|
|
|
194
189
|
function updateRowState(oState) {
|
|
195
|
-
var
|
|
196
|
-
var oNode = oState.context;
|
|
190
|
+
var mProxyInfo = oState.context["_mProxyInfo"];
|
|
197
191
|
|
|
198
|
-
oState.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
oState.level = oNode.level + 1;
|
|
205
|
-
|
|
206
|
-
if (oBinding.nodeHasChildren) {
|
|
207
|
-
oState.expandable = oBinding.nodeHasChildren(oNode);
|
|
208
|
-
} else {
|
|
209
|
-
oState.expandable = oBinding.hasChildren(oNode.context);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
oState.expanded = oNode.nodeState.expanded;
|
|
192
|
+
oState.level = mProxyInfo.level;
|
|
193
|
+
oState.expandable = !mProxyInfo.isLeaf;
|
|
194
|
+
oState.expanded = mProxyInfo.isExpanded;
|
|
213
195
|
|
|
214
196
|
if (TableUtils.Grouping.isInGroupMode(this)) {
|
|
215
197
|
var sHeaderProp = this.getGroupHeaderProperty();
|
|
@@ -227,7 +209,9 @@ sap.ui.define([
|
|
|
227
209
|
|
|
228
210
|
function expandRow(oRow) {
|
|
229
211
|
var iIndex = oRow.getIndex();
|
|
230
|
-
|
|
212
|
+
|
|
213
|
+
this._oProxy.expand(iIndex);
|
|
214
|
+
var bIsExpanded = this._oProxy.isExpanded(iIndex);
|
|
231
215
|
|
|
232
216
|
if (typeof bIsExpanded === "boolean") {
|
|
233
217
|
this._onGroupHeaderChanged(iIndex, bIsExpanded);
|
|
@@ -236,89 +220,15 @@ sap.ui.define([
|
|
|
236
220
|
|
|
237
221
|
function collapseRow(oRow) {
|
|
238
222
|
var iIndex = oRow.getIndex();
|
|
239
|
-
|
|
223
|
+
|
|
224
|
+
this._oProxy.collapse(iIndex);
|
|
225
|
+
var bIsExpanded = this._oProxy.isExpanded(iIndex);
|
|
240
226
|
|
|
241
227
|
if (typeof bIsExpanded === "boolean") {
|
|
242
228
|
this._onGroupHeaderChanged(iIndex, bIsExpanded);
|
|
243
229
|
}
|
|
244
230
|
}
|
|
245
231
|
|
|
246
|
-
/**
|
|
247
|
-
* Toggles or sets the expanded state of a single or multiple rows. Toggling only works for a single row.
|
|
248
|
-
*
|
|
249
|
-
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
250
|
-
* @param {int | int[]} vRowIndex A single index, or an array of indices of the rows to expand or collapse.
|
|
251
|
-
* @param {boolean} [bExpand] If defined, instead of toggling the desired state is set.
|
|
252
|
-
* @returns {boolean | null} The new expanded state in case an action was performed, otherwise <code>null</code>.
|
|
253
|
-
*/
|
|
254
|
-
function toggleGroupHeader(oTable, vRowIndex, bExpand) {
|
|
255
|
-
var aIndices = [];
|
|
256
|
-
var oBinding = oTable.getBinding();
|
|
257
|
-
|
|
258
|
-
if (!oBinding || vRowIndex == null) {
|
|
259
|
-
return null;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (typeof vRowIndex === "number") {
|
|
263
|
-
aIndices = [vRowIndex];
|
|
264
|
-
} else if (Array.isArray(vRowIndex)) {
|
|
265
|
-
if (bExpand == null && vRowIndex.length > 1) {
|
|
266
|
-
// Toggling the expanded state of multiple rows seems to be an absurd task. Therefore we assume this is unintentional and
|
|
267
|
-
// prevent the execution.
|
|
268
|
-
return null;
|
|
269
|
-
}
|
|
270
|
-
aIndices = vRowIndex;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
var iTotalRowCount = oTable._getTotalRowCount();
|
|
274
|
-
var aValidSortedIndices = aIndices.filter(function(iIndex) {
|
|
275
|
-
// Only indices of existing, expandable/collapsible nodes must be considered. Otherwise there might be no change event on the final
|
|
276
|
-
// expand/collapse.
|
|
277
|
-
var bIsExpanded = oBinding.isExpanded(iIndex);
|
|
278
|
-
var bIsLeaf = true; // If the node state cannot be determined, we assume it is a leaf.
|
|
279
|
-
|
|
280
|
-
if (oBinding.nodeHasChildren) {
|
|
281
|
-
if (oBinding.getNodeByIndex) {
|
|
282
|
-
bIsLeaf = !oBinding.nodeHasChildren(oBinding.getNodeByIndex(iIndex));
|
|
283
|
-
} else {
|
|
284
|
-
// The sap.ui.model.TreeBindingCompatibilityAdapter has no #getNodeByIndex function and #nodeHasChildren always returns true.
|
|
285
|
-
bIsLeaf = false;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return iIndex >= 0 && iIndex < iTotalRowCount
|
|
290
|
-
&& !bIsLeaf
|
|
291
|
-
&& bExpand !== bIsExpanded;
|
|
292
|
-
}).sort(function(a, b) { return a - b; });
|
|
293
|
-
|
|
294
|
-
if (aValidSortedIndices.length === 0) {
|
|
295
|
-
return null;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// Operations need to be performed from the highest index to the lowest. This ensures correct results with OData bindings. The indices
|
|
299
|
-
// are sorted ascending, so the array is iterated backwards.
|
|
300
|
-
|
|
301
|
-
// Expand/Collapse all nodes except the first, and suppress the change event.
|
|
302
|
-
for (var i = aValidSortedIndices.length - 1; i > 0; i--) {
|
|
303
|
-
if (bExpand) {
|
|
304
|
-
oBinding.expand(aValidSortedIndices[i], true);
|
|
305
|
-
} else {
|
|
306
|
-
oBinding.collapse(aValidSortedIndices[i], true);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Expand/Collapse the first node without suppressing the change event.
|
|
311
|
-
if (bExpand === true) {
|
|
312
|
-
oBinding.expand(aValidSortedIndices[0], false);
|
|
313
|
-
} else if (bExpand === false) {
|
|
314
|
-
oBinding.collapse(aValidSortedIndices[0], false);
|
|
315
|
-
} else {
|
|
316
|
-
oBinding.toggleIndex(aValidSortedIndices[0]);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return oBinding.isExpanded(aValidSortedIndices[0]);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
232
|
/**
|
|
323
233
|
* Setter for property <code>fixedRowCount</code>.
|
|
324
234
|
*
|
|
@@ -340,7 +250,7 @@ sap.ui.define([
|
|
|
340
250
|
TreeTable.prototype.isTreeBinding = function(sName) {
|
|
341
251
|
sName = sName || "rows";
|
|
342
252
|
if (sName === "rows") {
|
|
343
|
-
return
|
|
253
|
+
return this._oProxy.isTreeBinding();
|
|
344
254
|
}
|
|
345
255
|
return Table.prototype.isTreeBinding.apply(this, arguments);
|
|
346
256
|
};
|
|
@@ -365,14 +275,8 @@ sap.ui.define([
|
|
|
365
275
|
return oBinding;
|
|
366
276
|
};
|
|
367
277
|
|
|
368
|
-
TreeTable.prototype._getContexts = function(iStartIndex, iLength, iThreshold) {
|
|
369
|
-
|
|
370
|
-
if (oBinding) {
|
|
371
|
-
// first call getContexts to trigger data load but return nodes instead of contexts
|
|
372
|
-
return oBinding.getNodes(iStartIndex, iLength, iThreshold);
|
|
373
|
-
} else {
|
|
374
|
-
return [];
|
|
375
|
-
}
|
|
278
|
+
TreeTable.prototype._getContexts = function(iStartIndex, iLength, iThreshold, bKeepCurrent) {
|
|
279
|
+
return this._oProxy.getContexts(iStartIndex, iLength, iThreshold, bKeepCurrent);
|
|
376
280
|
};
|
|
377
281
|
|
|
378
282
|
TreeTable.prototype._getRowContexts = function(iRequestLength) {
|
|
@@ -419,7 +323,7 @@ sap.ui.define([
|
|
|
419
323
|
* @public
|
|
420
324
|
*/
|
|
421
325
|
TreeTable.prototype.expand = function(vRowIndex) {
|
|
422
|
-
|
|
326
|
+
this._oProxy.expand(vRowIndex);
|
|
423
327
|
return this;
|
|
424
328
|
};
|
|
425
329
|
|
|
@@ -431,7 +335,7 @@ sap.ui.define([
|
|
|
431
335
|
* @public
|
|
432
336
|
*/
|
|
433
337
|
TreeTable.prototype.collapse = function(vRowIndex) {
|
|
434
|
-
|
|
338
|
+
this._oProxy.collapse(vRowIndex);
|
|
435
339
|
return this;
|
|
436
340
|
};
|
|
437
341
|
|
|
@@ -442,9 +346,8 @@ sap.ui.define([
|
|
|
442
346
|
* @public
|
|
443
347
|
*/
|
|
444
348
|
TreeTable.prototype.collapseAll = function() {
|
|
445
|
-
|
|
446
|
-
if (
|
|
447
|
-
oBinding.collapseToLevel(0);
|
|
349
|
+
this._oProxy.collapseAll();
|
|
350
|
+
if (this.getBinding()) {
|
|
448
351
|
this.setFirstVisibleRow(0);
|
|
449
352
|
}
|
|
450
353
|
|
|
@@ -464,14 +367,7 @@ sap.ui.define([
|
|
|
464
367
|
* @public
|
|
465
368
|
*/
|
|
466
369
|
TreeTable.prototype.expandToLevel = function(iLevel) {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
assert(oBinding && oBinding.expandToLevel, "TreeTable.expandToLevel is not supported with your current Binding. Please check if you are running on an ODataModel V2.");
|
|
470
|
-
|
|
471
|
-
if (oBinding && oBinding.expandToLevel) {
|
|
472
|
-
oBinding.expandToLevel(iLevel);
|
|
473
|
-
}
|
|
474
|
-
|
|
370
|
+
this._oProxy.expandToLevel(iLevel);
|
|
475
371
|
return this;
|
|
476
372
|
};
|
|
477
373
|
|
|
@@ -483,11 +379,7 @@ sap.ui.define([
|
|
|
483
379
|
* @public
|
|
484
380
|
*/
|
|
485
381
|
TreeTable.prototype.isExpanded = function(iRowIndex) {
|
|
486
|
-
|
|
487
|
-
if (oBinding) {
|
|
488
|
-
return oBinding.isExpanded(iRowIndex);
|
|
489
|
-
}
|
|
490
|
-
return false;
|
|
382
|
+
return this._oProxy.isExpanded(iRowIndex);
|
|
491
383
|
};
|
|
492
384
|
|
|
493
385
|
/**
|
|
@@ -572,10 +464,7 @@ sap.ui.define([
|
|
|
572
464
|
*/
|
|
573
465
|
|
|
574
466
|
TreeTable.prototype.getContextByIndex = function(iRowIndex) {
|
|
575
|
-
|
|
576
|
-
if (oBinding) {
|
|
577
|
-
return oBinding.getContextByIndex(iRowIndex);
|
|
578
|
-
}
|
|
467
|
+
return this._oProxy.getContextByIndex(iRowIndex);
|
|
579
468
|
};
|
|
580
469
|
|
|
581
470
|
/*
|
|
@@ -587,14 +476,7 @@ sap.ui.define([
|
|
|
587
476
|
*/
|
|
588
477
|
TreeTable.prototype.setRootLevel = function(iRootLevel) {
|
|
589
478
|
this.setFirstVisibleRow(0);
|
|
590
|
-
|
|
591
|
-
var oBinding = this.getBinding();
|
|
592
|
-
if (oBinding) {
|
|
593
|
-
assert(oBinding.setRootLevel, "rootLevel is not supported by the used binding");
|
|
594
|
-
if (oBinding.setRootLevel) {
|
|
595
|
-
oBinding.setRootLevel(iRootLevel);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
479
|
+
this._oProxy.setRootLevel(iRootLevel);
|
|
598
480
|
this.setProperty("rootLevel", iRootLevel, true);
|
|
599
481
|
|
|
600
482
|
return this;
|
|
@@ -606,13 +488,7 @@ sap.ui.define([
|
|
|
606
488
|
* @param {boolean} bCollapseRecursive
|
|
607
489
|
*/
|
|
608
490
|
TreeTable.prototype.setCollapseRecursive = function(bCollapseRecursive) {
|
|
609
|
-
|
|
610
|
-
if (oBinding) {
|
|
611
|
-
assert(oBinding.setCollapseRecursive, "Collapse Recursive is not supported by the used binding");
|
|
612
|
-
if (oBinding.setCollapseRecursive) {
|
|
613
|
-
oBinding.setCollapseRecursive(bCollapseRecursive);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
491
|
+
this._oProxy.setCollapseRecursive(bCollapseRecursive);
|
|
616
492
|
this.setProperty("collapseRecursive", !!bCollapseRecursive, true);
|
|
617
493
|
return this;
|
|
618
494
|
};
|
|
@@ -118,6 +118,8 @@ sap.ui.define([
|
|
|
118
118
|
sDesc = sDesc + " " + TableUtils.getResourceText("TBL_CTRL_STATE_DISABLED");
|
|
119
119
|
} else if (oInfo.editable === false) {
|
|
120
120
|
sDesc = sDesc + " " + TableUtils.getResourceText("TBL_CTRL_STATE_READONLY");
|
|
121
|
+
} else if (oInfo.required === true) {
|
|
122
|
+
sDesc = sDesc + " " + TableUtils.getResourceText("TBL_CTRL_STATE_REQUIRED");
|
|
121
123
|
}
|
|
122
124
|
return sDesc.trim();
|
|
123
125
|
}
|
|
@@ -436,11 +438,6 @@ sap.ui.define([
|
|
|
436
438
|
if (TableUtils.getInteractiveElements($Cell) !== null) {
|
|
437
439
|
aLabels.push(sTableId + "-toggleedit");
|
|
438
440
|
}
|
|
439
|
-
|
|
440
|
-
if (TableUtils.Grouping.isInTreeMode(oTable) && $Cell.parent().attr("aria-selected") === "true") {
|
|
441
|
-
// aria-selected on the row seems not be enough for treegrids
|
|
442
|
-
aLabels.push(sTableId + "-ariarowselected");
|
|
443
|
-
}
|
|
444
441
|
}
|
|
445
442
|
|
|
446
443
|
var sText = oInfo ? oInfo.description : " ";
|
|
@@ -590,10 +587,6 @@ sap.ui.define([
|
|
|
590
587
|
aLabels.push(sTableId + "-ariagrouptotallabel");
|
|
591
588
|
}
|
|
592
589
|
|
|
593
|
-
if (!oRow.isSummary() && !oRow.isGroupHeader() && $Cell.attr("aria-selected") === "true") {
|
|
594
|
-
aLabels.push(sTableId + "-ariarowselected");
|
|
595
|
-
}
|
|
596
|
-
|
|
597
590
|
if (TableUtils.hasRowHighlights(oTable) && !oRow.isGroupHeader() && !oRow.isSummary()) {
|
|
598
591
|
aLabels.push(sRowId + "-highlighttext");
|
|
599
592
|
}
|
|
@@ -936,7 +929,7 @@ sap.ui.define([
|
|
|
936
929
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
937
930
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
938
931
|
* @author SAP SE
|
|
939
|
-
* @version 1.
|
|
932
|
+
* @version 1.108.1
|
|
940
933
|
* @constructor
|
|
941
934
|
* @private
|
|
942
935
|
* @alias sap.ui.table.extensions.Accessibility
|
|
@@ -1285,7 +1278,7 @@ sap.ui.define([
|
|
|
1285
1278
|
sTextKeyboard = mTooltipTexts.keyboard["rowSelect"];
|
|
1286
1279
|
sTextMouse = mTooltipTexts.mouse["rowSelect"];
|
|
1287
1280
|
} else {
|
|
1288
|
-
sTextKeyboard =
|
|
1281
|
+
sTextKeyboard = mTooltipTexts.keyboard["rowDeselect"];
|
|
1289
1282
|
sTextMouse = mTooltipTexts.mouse["rowDeselect"];
|
|
1290
1283
|
}
|
|
1291
1284
|
}
|