@openui5/sap.ui.table 1.136.2 → 1.138.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.toml +0 -28
- package/THIRDPARTY.txt +0 -24
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +2 -2
- package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
- package/src/sap/ui/table/AnalyticalTable.js +23 -11
- package/src/sap/ui/table/Column.js +44 -2
- 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 +10 -7
- 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 -1
- package/src/sap/ui/table/TreeTable.js +23 -39
- package/src/sap/ui/table/extensions/Accessibility.js +22 -17
- package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -1
- package/src/sap/ui/table/extensions/DragAndDrop.js +3 -3
- package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
- package/src/sap/ui/table/extensions/Keyboard.js +12 -2
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +109 -80
- package/src/sap/ui/table/extensions/Pointer.js +1 -1
- package/src/sap/ui/table/extensions/Scrolling.js +9 -2
- package/src/sap/ui/table/extensions/ScrollingIOS.js +2 -2
- package/src/sap/ui/table/extensions/Synchronization.js +1 -1
- package/src/sap/ui/table/i18n/interaction_ar.xml +14 -17
- package/src/sap/ui/table/i18n/interaction_bg.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_ca.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_cnr.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_cs.xml +4 -7
- package/src/sap/ui/table/i18n/interaction_cy.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_da.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_de.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_el.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_en.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_en_GB.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_es.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_es_MX.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_et.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_fi.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_fr.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_fr_CA.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_hi.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_hr.xml +8 -11
- package/src/sap/ui/table/i18n/interaction_hu.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_id.xml +3 -6
- package/src/sap/ui/table/i18n/interaction_it.xml +3 -6
- package/src/sap/ui/table/i18n/interaction_iw.xml +9 -12
- package/src/sap/ui/table/i18n/interaction_ja.xml +3 -6
- package/src/sap/ui/table/i18n/interaction_kk.xml +4 -7
- package/src/sap/ui/table/i18n/interaction_ko.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_lt.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_lv.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_mk.xml +4 -7
- package/src/sap/ui/table/i18n/interaction_ms.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_nl.xml +4 -7
- package/src/sap/ui/table/i18n/interaction_no.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_pl.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_pt.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_pt_PT.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_ro.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_ru.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_sh.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_sk.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_sl.xml +3 -6
- package/src/sap/ui/table/i18n/interaction_sr.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_sv.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_th.xml +6 -9
- package/src/sap/ui/table/i18n/interaction_tr.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_uk.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_vi.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_zh_CN.xml +2 -5
- package/src/sap/ui/table/i18n/interaction_zh_TW.xml +6 -9
- package/src/sap/ui/table/library.js +10 -10
- 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 +2 -2
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +37 -1
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4Selection.js +4 -4
- 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 +52 -31
- package/src/sap/ui/table/rowmodes/Auto.js +2 -2
- package/src/sap/ui/table/rowmodes/Fixed.js +2 -2
- package/src/sap/ui/table/rowmodes/Interactive.js +8 -8
- package/src/sap/ui/table/rowmodes/RowMode.js +2 -2
- package/src/sap/ui/table/rowmodes/Variable.js +1 -1
- package/src/sap/ui/table/themes/base/DragDrop.less +1 -1
- package/src/sap/ui/table/utils/TableUtils.js +21 -90
- package/src/sap/ui/table/utils/_ColumnUtils.js +33 -120
- package/src/sap/ui/table/utils/_GroupingUtils.js +20 -63
- package/src/sap/ui/table/utils/_HookUtils.js +3 -103
- package/src/sap/ui/table/utils/_MenuUtils.js +3 -3
- package/src/sap/ui/table/utils/_BindingUtils.js +0 -66
package/REUSE.toml
CHANGED
|
@@ -238,27 +238,6 @@ SPDX-FileCopyrightText = [
|
|
|
238
238
|
SPDX-License-Identifier = "Apache-2.0 and MIT"
|
|
239
239
|
SPDX-FileComment = "these files contain content from SAP and JUnit Reporter for QUnit: qunit-junit.js is overall written by SAP, but contains a modified copy of JUnit Reporter for QUnit (qunit-reporter-junit)"
|
|
240
240
|
|
|
241
|
-
[[annotations]]
|
|
242
|
-
path = "src/sap.ui.core/src/sap/ui/thirdparty/iscroll.js"
|
|
243
|
-
precedence = "aggregate"
|
|
244
|
-
SPDX-FileCopyrightText = "2012 Matteo Spinelli"
|
|
245
|
-
SPDX-License-Identifier = "MIT"
|
|
246
|
-
SPDX-FileComment = "these files belong to: cubiq.org - iScroll"
|
|
247
|
-
|
|
248
|
-
[[annotations]]
|
|
249
|
-
path = "src/sap.ui.core/src/sap/ui/thirdparty/iscroll-lite.js"
|
|
250
|
-
precedence = "aggregate"
|
|
251
|
-
SPDX-FileCopyrightText = "2011 Matteo Spinelli"
|
|
252
|
-
SPDX-License-Identifier = "MIT"
|
|
253
|
-
SPDX-FileComment = "these files belong to: cubiq.org - iScroll Lite"
|
|
254
|
-
|
|
255
|
-
[[annotations]]
|
|
256
|
-
path = "src/sap.ui.core/src/sap/ui/thirdparty/swipe-view.js"
|
|
257
|
-
precedence = "aggregate"
|
|
258
|
-
SPDX-FileCopyrightText = "2012 Matteo Spinelli"
|
|
259
|
-
SPDX-License-Identifier = "MIT"
|
|
260
|
-
SPDX-FileComment = "these files belong to: cubiq.org - swipeview"
|
|
261
|
-
|
|
262
241
|
[[annotations]]
|
|
263
242
|
path = "src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js"
|
|
264
243
|
precedence = "aggregate"
|
|
@@ -308,13 +287,6 @@ SPDX-FileCopyrightText = "1991-2024 Unicode, Inc."
|
|
|
308
287
|
SPDX-License-Identifier = "LicenseRef-Unicode-3.0"
|
|
309
288
|
SPDX-FileComment = "these files belong to: Unicode Common Locale Data Repository"
|
|
310
289
|
|
|
311
|
-
[[annotations]]
|
|
312
|
-
path = "src/sap.ui.core/src/sap/ui/thirdparty/mobiscroll/**"
|
|
313
|
-
precedence = "aggregate"
|
|
314
|
-
SPDX-FileCopyrightText = "2010-2013, Acid Media"
|
|
315
|
-
SPDX-License-Identifier = "MIT"
|
|
316
|
-
SPDX-FileComment = "these files belong to: MobiScroll"
|
|
317
|
-
|
|
318
290
|
[[annotations]]
|
|
319
291
|
path = [
|
|
320
292
|
"src/sap.ui.core/src/sap/ui/thirdparty/sinon.js",
|
package/THIRDPARTY.txt
CHANGED
|
@@ -133,24 +133,6 @@ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
|
133
133
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/qunit-reporter-junit.js
|
|
134
134
|
src/sap.ui.core/src/sap/ui/qunit/qunit-junit.js
|
|
135
135
|
|
|
136
|
-
Component: cubiq.org - iScroll, version: 4.2.5
|
|
137
|
-
Copyright: 2012 Matteo Spinelli
|
|
138
|
-
License: MIT
|
|
139
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
140
|
-
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/iscroll.js
|
|
141
|
-
|
|
142
|
-
Component: cubiq.org - iScroll Lite, version: 4.1.6
|
|
143
|
-
Copyright: 2011 Matteo Spinelli
|
|
144
|
-
License: MIT
|
|
145
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
146
|
-
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/iscroll-lite.js
|
|
147
|
-
|
|
148
|
-
Component: cubiq.org - swipeview, version: 1.0
|
|
149
|
-
Copyright: 2012 Matteo Spinelli
|
|
150
|
-
License: MIT
|
|
151
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
152
|
-
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/swipe-view.js
|
|
153
|
-
|
|
154
136
|
Component: Zynga Scroller, version: 1.2.1-0-g5d43806
|
|
155
137
|
Copyright: 2011 Zynga Inc.
|
|
156
138
|
License: MIT
|
|
@@ -193,12 +175,6 @@ License: LicenseRef-Unicode-3.0
|
|
|
193
175
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/LicenseRef-Unicode-3.0.txt
|
|
194
176
|
Contained in: src/sap.ui.core/src/sap/ui/core/cldr/**
|
|
195
177
|
|
|
196
|
-
Component: MobiScroll, version: 2.9.0
|
|
197
|
-
Copyright: 2010-2013, Acid Media
|
|
198
|
-
License: MIT
|
|
199
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
200
|
-
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/mobiscroll/**
|
|
201
|
-
|
|
202
178
|
Component: SinonJS, version: 1.14.1
|
|
203
179
|
Copyright: 2010-2014, Christian Johansen, christian@cjohansen.no
|
|
204
180
|
License: BSD-3-Clause
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.table",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.138.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.138.0",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.138.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 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.138.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* @extends sap.ui.table.Column
|
|
48
48
|
*
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.
|
|
50
|
+
* @version 1.138.0
|
|
51
51
|
*
|
|
52
52
|
* @constructor
|
|
53
53
|
* @public
|
|
@@ -165,7 +165,7 @@ sap.ui.define([
|
|
|
165
165
|
if (oBinding) {
|
|
166
166
|
this._oBindingLabel = TableUtils._getTableTemplateHelper().createLabel();
|
|
167
167
|
this.addDependent(this._oBindingLabel);
|
|
168
|
-
|
|
168
|
+
oParent._metadataLoaded().then(function() {
|
|
169
169
|
this._oBindingLabel.setText(oBinding.getPropertyLabel(this.getLeadingProperty()));
|
|
170
170
|
}.bind(this));
|
|
171
171
|
}
|
|
@@ -50,7 +50,7 @@ sap.ui.define([
|
|
|
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.138.0
|
|
54
54
|
*
|
|
55
55
|
* @constructor
|
|
56
56
|
* @public
|
|
@@ -231,7 +231,7 @@ sap.ui.define([
|
|
|
231
231
|
this._aGroupedColumns = [];
|
|
232
232
|
this._bSuspendUpdateAnalyticalInfo = false;
|
|
233
233
|
|
|
234
|
-
TableUtils.Grouping.
|
|
234
|
+
TableUtils.Grouping.setHierarchyMode(this, TableUtils.Grouping.HierarchyMode.Group);
|
|
235
235
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.UpdateState, updateRowState, this);
|
|
236
236
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Expand, expandRow, this);
|
|
237
237
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Collapse, collapseRow, this);
|
|
@@ -355,12 +355,31 @@ sap.ui.define([
|
|
|
355
355
|
|
|
356
356
|
if (sName === "rows") {
|
|
357
357
|
this._updateTotalRow(true);
|
|
358
|
-
|
|
358
|
+
this._metadataLoaded().then(function() {
|
|
359
359
|
this._updateColumns(true);
|
|
360
360
|
}.bind(this));
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
363
|
|
|
364
|
+
AnalyticalTable.prototype._metadataLoaded = function() {
|
|
365
|
+
const oModel = this.getBinding()?.getModel() ?? null;
|
|
366
|
+
const oMetadataLoaded = Promise.withResolvers();
|
|
367
|
+
|
|
368
|
+
if (!oModel) {
|
|
369
|
+
oMetadataLoaded.reject();
|
|
370
|
+
} else if (oModel.metadataLoaded) { // v2
|
|
371
|
+
oModel.metadataLoaded().then(() => oMetadataLoaded.resolve());
|
|
372
|
+
} else if (oModel.attachMetadataLoaded) { // v1
|
|
373
|
+
if (oModel.oMetadata?.isLoaded()) {
|
|
374
|
+
oMetadataLoaded.resolve();
|
|
375
|
+
} else {
|
|
376
|
+
oModel.attachMetadataLoaded(() => oMetadataLoaded.resolve());
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return oMetadataLoaded.promise;
|
|
381
|
+
};
|
|
382
|
+
|
|
364
383
|
AnalyticalTable.prototype._applyAnalyticalBindingInfo = function(oBindingInfo) {
|
|
365
384
|
// Make sure all necessary parameters are given.
|
|
366
385
|
// The ODataModelAdapter (via bindList) needs these properties to determine if an AnalyticalBinding should be instantiated.
|
|
@@ -508,13 +527,6 @@ sap.ui.define([
|
|
|
508
527
|
}
|
|
509
528
|
};
|
|
510
529
|
|
|
511
|
-
/**
|
|
512
|
-
* @inheritDoc
|
|
513
|
-
*/
|
|
514
|
-
AnalyticalTable.prototype.getContextByIndex = function(iIndex) {
|
|
515
|
-
return this._oProxy.getContextByIndex(iIndex);
|
|
516
|
-
};
|
|
517
|
-
|
|
518
530
|
/**
|
|
519
531
|
* Gets a node object by an index.
|
|
520
532
|
*
|
|
@@ -1035,7 +1047,7 @@ sap.ui.define([
|
|
|
1035
1047
|
*/
|
|
1036
1048
|
AnalyticalTable.prototype.getAnalyticalInfoOfRow = function(oRow) {
|
|
1037
1049
|
const oBinding = this.getBinding();
|
|
1038
|
-
const oContext = oRow ?
|
|
1050
|
+
const oContext = oRow ? TableUtils.getBindingContextOfRow(oRow) : null;
|
|
1039
1051
|
|
|
1040
1052
|
if (!TableUtils.isA(oRow, "sap.ui.table.Row") || oRow.getParent() !== this || !oBinding || !oContext) {
|
|
1041
1053
|
return null;
|
|
@@ -63,7 +63,7 @@ sap.ui.define([
|
|
|
63
63
|
* @class
|
|
64
64
|
* The column allows you to define column specific properties that will be applied when rendering the table.
|
|
65
65
|
* @extends sap.ui.core.Element
|
|
66
|
-
* @version 1.
|
|
66
|
+
* @version 1.138.0
|
|
67
67
|
*
|
|
68
68
|
* @constructor
|
|
69
69
|
* @public
|
|
@@ -1337,9 +1337,51 @@ sap.ui.define([
|
|
|
1337
1337
|
throw new Error("Column is not rendered");
|
|
1338
1338
|
}
|
|
1339
1339
|
|
|
1340
|
-
|
|
1340
|
+
const oTable = this._getTable();
|
|
1341
|
+
const sCurrentWidth = this.getWidth();
|
|
1342
|
+
const iNewWidth = calculateColumnWidth(this);
|
|
1343
|
+
|
|
1344
|
+
if (iNewWidth + "px" !== sCurrentWidth) {
|
|
1345
|
+
TableUtils.Column.resizeColumn(oTable, this, iNewWidth);
|
|
1346
|
+
}
|
|
1341
1347
|
};
|
|
1342
1348
|
|
|
1349
|
+
/**
|
|
1350
|
+
* Calculates the widest content width of the currently visible column cells including headers.
|
|
1351
|
+
* Headers with column span are not taken into account.
|
|
1352
|
+
*
|
|
1353
|
+
* @param {sap.ui.table.Column} oColumn The column control
|
|
1354
|
+
* @returns {int} iWidth Calculated column width
|
|
1355
|
+
* @private
|
|
1356
|
+
*/
|
|
1357
|
+
function calculateColumnWidth(oColumn) {
|
|
1358
|
+
const oTableElement = oColumn._getTable().getDomRef();
|
|
1359
|
+
const oHiddenArea = document.createElement("div");
|
|
1360
|
+
|
|
1361
|
+
oHiddenArea.classList.add("sapUiTableHiddenSizeDetector", "sapUiTableHeaderDataCell", "sapUiTableDataCell");
|
|
1362
|
+
oTableElement.appendChild(oHiddenArea);
|
|
1363
|
+
|
|
1364
|
+
// Create a copy of all visible cells in the column, including the header cells without colspan
|
|
1365
|
+
const aCells = Array.from(oTableElement.querySelectorAll(`td[data-sap-ui-colid="${oColumn.getId()}"]:not([colspan])`))
|
|
1366
|
+
.filter((element) => !element.classList.contains("sapUiTableHidden"))
|
|
1367
|
+
.map((element) => element.firstElementChild.cloneNode(true));
|
|
1368
|
+
|
|
1369
|
+
aCells.forEach((cell) => {
|
|
1370
|
+
cell.removeAttribute('id');
|
|
1371
|
+
oHiddenArea.appendChild(cell);
|
|
1372
|
+
});
|
|
1373
|
+
|
|
1374
|
+
// Determine the column width
|
|
1375
|
+
let iWidth = oHiddenArea.getBoundingClientRect().width + 4; // widest cell + 4px for borders and rounding
|
|
1376
|
+
const iTableWidth = oTableElement.querySelector('.sapUiTableCnt').getBoundingClientRect().width;
|
|
1377
|
+
iWidth = Math.min(iWidth, iTableWidth); // no wider as the table
|
|
1378
|
+
iWidth = Math.max(iWidth, TableUtils.Column.getMinColumnWidth()); // not too small
|
|
1379
|
+
|
|
1380
|
+
oTableElement.removeChild(oHiddenArea);
|
|
1381
|
+
|
|
1382
|
+
return Math.round(iWidth);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1343
1385
|
Column.prototype.getFieldHelpInfo = function() {
|
|
1344
1386
|
return {
|
|
1345
1387
|
label: TableUtils.Column.getHeaderText(this)
|
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.138.0
|
|
139
139
|
*
|
|
140
140
|
* @constructor
|
|
141
141
|
* @public
|
|
@@ -368,10 +368,6 @@ sap.ui.define([
|
|
|
368
368
|
this._updateTableCells(oTable);
|
|
369
369
|
};
|
|
370
370
|
|
|
371
|
-
Row.prototype.getRowBindingContext = function() {
|
|
372
|
-
return state(this).context;
|
|
373
|
-
};
|
|
374
|
-
|
|
375
371
|
Row.prototype.setBindingContext = function(oContext, sModelName) {
|
|
376
372
|
return Element.prototype.setBindingContext.call(this, oContext || null, sModelName);
|
|
377
373
|
};
|
|
@@ -382,7 +378,7 @@ sap.ui.define([
|
|
|
382
378
|
const iAbsoluteRowIndex = this.getIndex();
|
|
383
379
|
const bHasTableCellUpdate = !!oTable._updateTableCell;
|
|
384
380
|
let oCell; let $Td; let bHasCellUpdate;
|
|
385
|
-
const oBindingContext =
|
|
381
|
+
const oBindingContext = TableUtils.getBindingContextOfRow(this);
|
|
386
382
|
|
|
387
383
|
for (let i = 0; i < aCells.length; i++) {
|
|
388
384
|
oCell = aCells[i];
|
|
@@ -405,7 +401,14 @@ sap.ui.define([
|
|
|
405
401
|
* @private
|
|
406
402
|
*/
|
|
407
403
|
Row.prototype.getType = function() {
|
|
408
|
-
|
|
404
|
+
const sType = state(this).type;
|
|
405
|
+
|
|
406
|
+
if (sType === RowType.GroupHeader && TableUtils.Grouping.isInTreeMode(this.getTable())) {
|
|
407
|
+
// In tree mode, the row type GroupHeader is ignored and treated like row type Standard.
|
|
408
|
+
return RowType.Standard;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return sType;
|
|
409
412
|
};
|
|
410
413
|
|
|
411
414
|
/**
|
|
@@ -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.138.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.138.0
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @public
|
|
@@ -106,7 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
* the data model and binding being used.
|
|
107
107
|
* </p>
|
|
108
108
|
* @extends sap.ui.core.Control
|
|
109
|
-
* @version 1.
|
|
109
|
+
* @version 1.138.0
|
|
110
110
|
*
|
|
111
111
|
* @constructor
|
|
112
112
|
* @public
|
|
@@ -3060,7 +3060,7 @@ sap.ui.define([
|
|
|
3060
3060
|
const oCell = oRow && oRow.getCells()[iCol];
|
|
3061
3061
|
const iRealRowIndex = oRow && oRow.getIndex();
|
|
3062
3062
|
const sColId = Column.ofCell(oCell).getId();
|
|
3063
|
-
const oRowBindingContext =
|
|
3063
|
+
const oRowBindingContext = TableUtils.getBindingContextOfRow(oRow);
|
|
3064
3064
|
const mParams = {
|
|
3065
3065
|
rowIndex: iRealRowIndex,
|
|
3066
3066
|
columnIndex: iCol,
|
|
@@ -4146,7 +4146,7 @@ sap.ui.define([
|
|
|
4146
4146
|
};
|
|
4147
4147
|
|
|
4148
4148
|
Table.prototype._getDefaultContextMenu = function() {
|
|
4149
|
-
let oDefaultContextMenu = this.getAggregation("_hiddenDependents")
|
|
4149
|
+
let oDefaultContextMenu = this.getAggregation("_hiddenDependents")?.find((oElement) => oElement.isA("sap.ui.table.menus.ContextMenu"));
|
|
4150
4150
|
|
|
4151
4151
|
if (!oDefaultContextMenu) {
|
|
4152
4152
|
oDefaultContextMenu = new ContextMenu();
|
|
@@ -934,7 +934,7 @@ sap.ui.define([
|
|
|
934
934
|
// check whether the row can be clicked to change the selection
|
|
935
935
|
const bSelectOnCellsAllowed = TableUtils.isRowSelectionAllowed(oTable);
|
|
936
936
|
const bRowsDraggable = oTable.getDragDropConfig().some(function(oDragDropInfo) {
|
|
937
|
-
return oDragDropInfo.
|
|
937
|
+
return oDragDropInfo.isDraggable(oTable, "rows");
|
|
938
938
|
});
|
|
939
939
|
|
|
940
940
|
const iLastFixedColumnIndex = this.getLastFixedColumnIndex(oTable);
|
|
@@ -4,31 +4,25 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// Provides control sap.ui.table.TreeTable.
|
|
8
7
|
sap.ui.define([
|
|
9
|
-
|
|
8
|
+
"./Table",
|
|
10
9
|
"./TableRenderer",
|
|
11
|
-
|
|
12
|
-
'sap/ui/model/TreeBindingCompatibilityAdapter',
|
|
13
|
-
'./library',
|
|
14
|
-
'./utils/TableUtils',
|
|
10
|
+
"./utils/TableUtils",
|
|
15
11
|
"./plugins/BindingSelection",
|
|
16
12
|
"sap/base/Log",
|
|
17
|
-
"sap/
|
|
13
|
+
"sap/ui/model/ClientTreeBindingAdapter",
|
|
14
|
+
"sap/ui/model/TreeBindingCompatibilityAdapter",
|
|
18
15
|
"sap/ui/model/controlhelper/TreeBindingProxy"
|
|
19
|
-
],
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
assert,
|
|
30
|
-
TreeBindingProxy
|
|
31
|
-
) {
|
|
16
|
+
], function(
|
|
17
|
+
Table,
|
|
18
|
+
TableRenderer,
|
|
19
|
+
TableUtils,
|
|
20
|
+
BindingSelectionPlugin,
|
|
21
|
+
Log,
|
|
22
|
+
ClientTreeBindingAdapter,
|
|
23
|
+
TreeBindingCompatibilityAdapter,
|
|
24
|
+
TreeBindingProxy
|
|
25
|
+
) {
|
|
32
26
|
"use strict";
|
|
33
27
|
|
|
34
28
|
const _private = TableUtils.createWeakMapFacade();
|
|
@@ -42,7 +36,7 @@ sap.ui.define([
|
|
|
42
36
|
* @class
|
|
43
37
|
* The TreeTable control provides a comprehensive set of features to display hierarchical data.
|
|
44
38
|
* @extends sap.ui.table.Table
|
|
45
|
-
* @version 1.
|
|
39
|
+
* @version 1.138.0
|
|
46
40
|
*
|
|
47
41
|
* @constructor
|
|
48
42
|
* @public
|
|
@@ -52,10 +46,8 @@ sap.ui.define([
|
|
|
52
46
|
* @see {@link fiori:/tree-table/ Tree Table}
|
|
53
47
|
*/
|
|
54
48
|
const TreeTable = Table.extend("sap.ui.table.TreeTable", /** @lends sap.ui.table.TreeTable.prototype */ {metadata: {
|
|
55
|
-
|
|
56
49
|
library: "sap.ui.table",
|
|
57
50
|
properties: {
|
|
58
|
-
|
|
59
51
|
/**
|
|
60
52
|
* Specifies whether the first level is expanded.
|
|
61
53
|
*
|
|
@@ -129,7 +121,6 @@ sap.ui.define([
|
|
|
129
121
|
rootLevel: {type: "int", group: "Data", defaultValue: 0, deprecated: true}
|
|
130
122
|
},
|
|
131
123
|
events: {
|
|
132
|
-
|
|
133
124
|
/**
|
|
134
125
|
* Fired when a row has been expanded or collapsed by user interaction. Only available in hierarchical mode.
|
|
135
126
|
*/
|
|
@@ -164,7 +155,7 @@ sap.ui.define([
|
|
|
164
155
|
|
|
165
156
|
_private(this).bPendingRequest = false;
|
|
166
157
|
|
|
167
|
-
TableUtils.Grouping.
|
|
158
|
+
TableUtils.Grouping.setHierarchyMode(this, TableUtils.Grouping.HierarchyMode.Tree);
|
|
168
159
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.UpdateState, updateRowState, this);
|
|
169
160
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Expand, expandRow, this);
|
|
170
161
|
TableUtils.Hook.register(this, TableUtils.Hook.Keys.Row.Collapse, collapseRow, this);
|
|
@@ -213,7 +204,7 @@ sap.ui.define([
|
|
|
213
204
|
const bIsExpanded = this._oProxy.isExpanded(iIndex);
|
|
214
205
|
|
|
215
206
|
if (typeof bIsExpanded === "boolean") {
|
|
216
|
-
this._onGroupHeaderChanged(
|
|
207
|
+
this._onGroupHeaderChanged(oRow, bIsExpanded);
|
|
217
208
|
}
|
|
218
209
|
}
|
|
219
210
|
|
|
@@ -224,7 +215,7 @@ sap.ui.define([
|
|
|
224
215
|
const bIsExpanded = this._oProxy.isExpanded(iIndex);
|
|
225
216
|
|
|
226
217
|
if (typeof bIsExpanded === "boolean") {
|
|
227
|
-
this._onGroupHeaderChanged(
|
|
218
|
+
this._onGroupHeaderChanged(oRow, bIsExpanded);
|
|
228
219
|
}
|
|
229
220
|
}
|
|
230
221
|
|
|
@@ -309,10 +300,10 @@ sap.ui.define([
|
|
|
309
300
|
return aRowContexts;
|
|
310
301
|
}
|
|
311
302
|
|
|
312
|
-
TreeTable.prototype._onGroupHeaderChanged = function(
|
|
303
|
+
TreeTable.prototype._onGroupHeaderChanged = function(oRow, bExpanded) {
|
|
313
304
|
this.fireToggleOpenState({
|
|
314
|
-
rowIndex:
|
|
315
|
-
rowContext:
|
|
305
|
+
rowIndex: oRow.getIndex(),
|
|
306
|
+
rowContext: TableUtils.getBindingContextOfRow(oRow),
|
|
316
307
|
expanded: bExpanded
|
|
317
308
|
});
|
|
318
309
|
};
|
|
@@ -465,13 +456,6 @@ sap.ui.define([
|
|
|
465
456
|
* @name sap.ui.table.TreeTable#selectAll
|
|
466
457
|
*/
|
|
467
458
|
|
|
468
|
-
/**
|
|
469
|
-
* @inheritDoc
|
|
470
|
-
*/
|
|
471
|
-
TreeTable.prototype.getContextByIndex = function(iRowIndex) {
|
|
472
|
-
return this._oProxy.getContextByIndex(iRowIndex);
|
|
473
|
-
};
|
|
474
|
-
|
|
475
459
|
/*
|
|
476
460
|
* Set the rootLevel for the hierarchy
|
|
477
461
|
* The root level is the level of the topmost tree nodes, which will be used as an entry point for OData services.
|
|
@@ -576,9 +560,9 @@ sap.ui.define([
|
|
|
576
560
|
if (oTable.getUseGroupMode()) {
|
|
577
561
|
TableUtils.Grouping.setHierarchyMode(oTable, TableUtils.Grouping.HierarchyMode.GroupedTree);
|
|
578
562
|
} else if (oTable._bFlatMode) {
|
|
579
|
-
TableUtils.Grouping.
|
|
563
|
+
TableUtils.Grouping.setHierarchyMode(oTable, TableUtils.Grouping.HierarchyMode.Flat);
|
|
580
564
|
} else if (!oTable._bFlatMode) {
|
|
581
|
-
TableUtils.Grouping.
|
|
565
|
+
TableUtils.Grouping.setHierarchyMode(oTable, TableUtils.Grouping.HierarchyMode.Tree);
|
|
582
566
|
}
|
|
583
567
|
}
|
|
584
568
|
|
|
@@ -220,20 +220,20 @@ sap.ui.define([
|
|
|
220
220
|
return aLabels;
|
|
221
221
|
},
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
*
|
|
223
|
+
/**
|
|
224
|
+
* Checks whether the given cell is hidden.
|
|
225
|
+
*
|
|
226
|
+
* @param {jQuery} $Cell The cell DOM element
|
|
227
|
+
* @param {sap.ui.table.Column} oCell The control in the cell
|
|
228
|
+
* @param {sap.ui.table.Row} oRow The row the cell is inside
|
|
229
|
+
* @returns {boolean} Whether the cell is hidden
|
|
225
230
|
*/
|
|
226
|
-
isHiddenCell: function($Cell, oCell) {
|
|
227
|
-
const bGroup = TableUtils.Grouping.isInGroupHeaderRow($Cell);
|
|
228
|
-
const bSum = TableUtils.Grouping.isInSummaryRow($Cell);
|
|
229
|
-
const bSupportStyleClass = !!oCell && !!oCell.hasStyleClass;
|
|
230
|
-
|
|
231
|
-
const bIsRowHidden = $Cell.parent().hasClass("sapUiTableRowHidden");
|
|
231
|
+
isHiddenCell: function($Cell, oCell, oRow) {
|
|
232
232
|
const bIsCellHidden = $Cell.hasClass("sapUiTableCellHidden");
|
|
233
|
-
const bGroupCellHiddenByApp =
|
|
234
|
-
const bSumCellHiddenByApp =
|
|
233
|
+
const bGroupCellHiddenByApp = oRow.isGroupHeader() && (oCell?.hasStyleClass?.("sapUiAnalyticalTableGroupCellHidden") ?? false);
|
|
234
|
+
const bSumCellHiddenByApp = oRow.isSummary() && (oCell?.hasStyleClass?.("sapUiAnalyticalTableSumCellHidden") ?? false);
|
|
235
235
|
|
|
236
|
-
return
|
|
236
|
+
return oRow.isContentHidden() || bIsCellHidden || bGroupCellHiddenByApp || bSumCellHiddenByApp;
|
|
237
237
|
},
|
|
238
238
|
|
|
239
239
|
/*
|
|
@@ -422,7 +422,7 @@ sap.ui.define([
|
|
|
422
422
|
let oInfo = null;
|
|
423
423
|
const oRow = oTableInstances.row;
|
|
424
424
|
const sRowId = oRow.getId();
|
|
425
|
-
const bHidden = ExtensionHelper.isHiddenCell($Cell, oTableInstances.cell);
|
|
425
|
+
const bHidden = ExtensionHelper.isHiddenCell($Cell, oTableInstances.cell, oRow);
|
|
426
426
|
const bIsTreeColumnCell = ExtensionHelper.isTreeColumnCell(this, $Cell);
|
|
427
427
|
const aDefaultLabels = ExtensionHelper.getAriaAttributesForDataCell(this, {
|
|
428
428
|
index: iCol,
|
|
@@ -448,7 +448,7 @@ sap.ui.define([
|
|
|
448
448
|
|
|
449
449
|
aLabels = aLabels.concat(aDefaultLabels);
|
|
450
450
|
|
|
451
|
-
if (!bHidden) {
|
|
451
|
+
if (!bHidden && oTableInstances.cell) {
|
|
452
452
|
oInfo = ACCInfoHelper.getAccInfoOfControl(oTableInstances.cell);
|
|
453
453
|
aLabels.push(oInfo ? (sTableId + "-cellacc") : oTableInstances.cell.getId());
|
|
454
454
|
}
|
|
@@ -594,7 +594,7 @@ sap.ui.define([
|
|
|
594
594
|
const $Cell = jQuery(oCellInfo.cell);
|
|
595
595
|
const oRow = oTable.getRows()[oCellInfo.rowIndex];
|
|
596
596
|
const sRowId = oRow.getId();
|
|
597
|
-
const bHidden = ExtensionHelper.isHiddenCell($Cell);
|
|
597
|
+
const bHidden = ExtensionHelper.isHiddenCell($Cell, null, oRow);
|
|
598
598
|
const aDefaultLabels = ExtensionHelper.getAriaAttributesForRowAction(this)["aria-labelledby"] || [];
|
|
599
599
|
const aLabels = [].concat(aDefaultLabels);
|
|
600
600
|
const aDescriptions = [];
|
|
@@ -1126,10 +1126,15 @@ sap.ui.define([
|
|
|
1126
1126
|
/**
|
|
1127
1127
|
* Returns the aria attributes for the header of the row actions column.
|
|
1128
1128
|
*
|
|
1129
|
+
* @param {sap.ui.table.extensions.Accessibility} oExtension The accessibility extension
|
|
1129
1130
|
* @returns {object} An object containing the aria attributes
|
|
1130
1131
|
*/
|
|
1131
|
-
getAriaAttributesForRowActionHeader: function() {
|
|
1132
|
-
|
|
1132
|
+
getAriaAttributesForRowActionHeader: function(oExtension) {
|
|
1133
|
+
const oTable = oExtension.getTable();
|
|
1134
|
+
return {
|
|
1135
|
+
"role": "columnheader",
|
|
1136
|
+
"aria-colindex": TableUtils.getVisibleColumnCount(oTable) + 1 + (TableUtils.hasRowHeader(oTable) ? 1 : 0)
|
|
1137
|
+
};
|
|
1133
1138
|
},
|
|
1134
1139
|
|
|
1135
1140
|
/**
|
|
@@ -1150,7 +1155,7 @@ sap.ui.define([
|
|
|
1150
1155
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
1151
1156
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
1152
1157
|
* @author SAP SE
|
|
1153
|
-
* @version 1.
|
|
1158
|
+
* @version 1.138.0
|
|
1154
1159
|
* @constructor
|
|
1155
1160
|
* @private
|
|
1156
1161
|
* @alias sap.ui.table.extensions.Accessibility
|
|
@@ -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.138.0
|
|
48
48
|
* @constructor
|
|
49
49
|
* @private
|
|
50
50
|
* @alias sap.ui.table.extensions.AccessibilityRender
|