@openui5/sap.ui.table 1.125.0 → 1.126.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 +4 -4
- package/THIRDPARTY.txt +6 -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 +1 -8
- package/src/sap/ui/table/Column.js +1 -1
- package/src/sap/ui/table/ColumnMenu.js +1 -1
- package/src/sap/ui/table/CreationRow.js +1 -1
- package/src/sap/ui/table/Row.js +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/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +2 -2
- 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 +2 -1
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +3 -3
- package/src/sap/ui/table/extensions/Pointer.js +1 -1
- package/src/sap/ui/table/extensions/Scrolling.js +30 -3
- package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
- package/src/sap/ui/table/extensions/Synchronization.js +1 -1
- package/src/sap/ui/table/library.js +11 -11
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +30 -2
- package/src/sap/ui/table/plugins/ODataV4Selection.js +24 -0
- 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/Auto.js +2 -2
- package/src/sap/ui/table/rowmodes/Fixed.js +2 -2
- package/src/sap/ui/table/rowmodes/Interactive.js +1 -1
- package/src/sap/ui/table/rowmodes/RowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/Variable.js +1 -1
- package/src/sap/ui/table/themes/sap_hcb/base_AnalyticalTable.less +38 -0
- package/src/sap/ui/table/themes/sap_hcb/base_Cell.less +441 -0
- package/src/sap/ui/table/themes/sap_hcb/base_CreationRow.less +83 -0
- package/src/sap/ui/table/themes/sap_hcb/base_DragDrop.less +245 -0
- package/src/sap/ui/table/themes/sap_hcb/base_Grouping.less +223 -0
- package/src/sap/ui/table/themes/sap_hcb/base_Row.less +95 -0
- package/src/sap/ui/table/themes/sap_hcb/base_RowAction.less +52 -0
- package/src/sap/ui/table/themes/sap_hcb/base_RowHighlight.less +80 -0
- package/src/sap/ui/table/themes/sap_hcb/base_RowSelection.less +146 -0
- package/src/sap/ui/table/themes/sap_hcb/base_Scrolling.less +343 -0
- package/src/sap/ui/table/themes/sap_hcb/base_ScrollingIOS.less +18 -0
- package/src/sap/ui/table/themes/sap_hcb/base_Table.less +524 -0
- package/src/sap/ui/table/themes/sap_hcb/library.source.less +65 -1
- package/src/sap/ui/table/utils/TableUtils.js +1 -1
- 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
|
@@ -384,13 +384,13 @@ Copyright: 2017 Wei Song and Oliver Nightingale
|
|
|
384
384
|
License: MIT
|
|
385
385
|
Comment: these files belong to: Elasticlunr
|
|
386
386
|
|
|
387
|
-
Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-
|
|
388
|
-
Copyright:
|
|
387
|
+
Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-2.0.1/*
|
|
388
|
+
Copyright: SpryMedia Ltd
|
|
389
389
|
License: MIT
|
|
390
390
|
Comment: these files belong to: DataTables
|
|
391
391
|
|
|
392
|
-
Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-
|
|
393
|
-
Copyright:
|
|
392
|
+
Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-3.0.0/*
|
|
393
|
+
Copyright: SpryMedia Ltd
|
|
394
394
|
License: MIT
|
|
395
395
|
Comment: these files belong to: Buttons extension for DataTables
|
|
396
396
|
|
package/THIRDPARTY.txt
CHANGED
|
@@ -363,17 +363,17 @@ License: MIT
|
|
|
363
363
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
364
364
|
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/elasticlunr.js
|
|
365
365
|
|
|
366
|
-
Component: DataTables, version:
|
|
367
|
-
Copyright:
|
|
366
|
+
Component: DataTables, version: 2.0.1
|
|
367
|
+
Copyright: SpryMedia Ltd
|
|
368
368
|
License: MIT
|
|
369
369
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
370
|
-
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-
|
|
370
|
+
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-2.0.1/*
|
|
371
371
|
|
|
372
|
-
Component: Buttons extension for DataTables, version:
|
|
373
|
-
Copyright:
|
|
372
|
+
Component: Buttons extension for DataTables, version: 3.0.0
|
|
373
|
+
Copyright: SpryMedia Ltd
|
|
374
374
|
License: MIT
|
|
375
375
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
376
|
-
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-
|
|
376
|
+
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-3.0.0/*
|
|
377
377
|
|
|
378
378
|
|
|
379
379
|
Library: sap.ui.integration:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.table",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.126.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.126.0",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.126.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2024 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.126.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
|
|
56
56
|
*
|
|
57
57
|
* @extends sap.ui.table.Table
|
|
58
|
-
* @version 1.
|
|
58
|
+
* @version 1.126.0
|
|
59
59
|
*
|
|
60
60
|
* @constructor
|
|
61
61
|
* @public
|
|
@@ -351,7 +351,6 @@ sap.ui.define([
|
|
|
351
351
|
* sap.ui.table.ColumnMenu is deprecated.
|
|
352
352
|
*/
|
|
353
353
|
this._invalidateColumnMenus(); // Metadata might change.
|
|
354
|
-
this._applyODataModelAnalyticalAdapter(oBindingInfo.model);
|
|
355
354
|
|
|
356
355
|
// make sure to reset the first visible row (currently needed for the analytical binding)
|
|
357
356
|
// TODO: think about a boundary check to reset the firstvisiblerow if out of bounds
|
|
@@ -407,12 +406,6 @@ sap.ui.define([
|
|
|
407
406
|
}
|
|
408
407
|
};
|
|
409
408
|
|
|
410
|
-
AnalyticalTable.prototype._applyODataModelAnalyticalAdapter = function(oModel) {
|
|
411
|
-
if (oModel) {
|
|
412
|
-
ODataModelAdapter.apply(oModel);
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
|
|
416
409
|
AnalyticalTable.prototype._getColumnInformation = function() {
|
|
417
410
|
const aColumns = [];
|
|
418
411
|
const aTableColumns = this.getColumns();
|
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.126.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.126.0
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @public
|
|
@@ -100,7 +100,7 @@ sap.ui.define([
|
|
|
100
100
|
* the data model and binding being used.
|
|
101
101
|
* </p>
|
|
102
102
|
* @extends sap.ui.core.Control
|
|
103
|
-
* @version 1.
|
|
103
|
+
* @version 1.126.0
|
|
104
104
|
*
|
|
105
105
|
* @constructor
|
|
106
106
|
* @public
|
|
@@ -465,7 +465,7 @@ sap.ui.define([
|
|
|
465
465
|
* If the creation row is set, the busy indicator will no longer cover the horizontal scrollbar, even if the creation row is invisible.
|
|
466
466
|
*
|
|
467
467
|
* @private
|
|
468
|
-
* @ui5-
|
|
468
|
+
* @ui5-private sap.ui.mdc
|
|
469
469
|
*/
|
|
470
470
|
creationRow: {type: "sap.ui.core.Control", multiple: false, visibility: "hidden"},
|
|
471
471
|
|
|
@@ -480,7 +480,7 @@ sap.ui.define([
|
|
|
480
480
|
* The control that is shown in case the Table has no visible columns.
|
|
481
481
|
*
|
|
482
482
|
* @private
|
|
483
|
-
* @ui5-
|
|
483
|
+
* @ui5-private sap.ui.mdc, sap.ui.comp
|
|
484
484
|
*/
|
|
485
485
|
_noColumnsMessage: {type: "sap.ui.core.Control", multiple: false, visibility: "hidden"},
|
|
486
486
|
|
|
@@ -530,7 +530,7 @@ sap.ui.define([
|
|
|
530
530
|
const aLabels = [oTable.getId() + "-colnumberofcols"].concat(mAttributes["aria-labelledby"]);
|
|
531
531
|
const iSpan = oCellInfo.columnSpan;
|
|
532
532
|
|
|
533
|
-
if (
|
|
533
|
+
if (oColumnLabel?.getRequired?.()) {
|
|
534
534
|
aLabels.push(oTable.getId() + "-ariarequired");
|
|
535
535
|
}
|
|
536
536
|
|
|
@@ -969,7 +969,7 @@ sap.ui.define([
|
|
|
969
969
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
970
970
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
971
971
|
* @author SAP SE
|
|
972
|
-
* @version 1.
|
|
972
|
+
* @version 1.126.0
|
|
973
973
|
* @constructor
|
|
974
974
|
* @private
|
|
975
975
|
* @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.126.0
|
|
48
48
|
* @constructor
|
|
49
49
|
* @private
|
|
50
50
|
* @alias sap.ui.table.extensions.AccessibilityRender
|
|
@@ -130,6 +130,7 @@ sap.ui.define([
|
|
|
130
130
|
* Initialize ItemNavigations (content and header) and transfer relevant dom elements.
|
|
131
131
|
* TabIndexes are set by the ItemNavigation.
|
|
132
132
|
*/
|
|
133
|
+
// eslint-disable-next-line complexity
|
|
133
134
|
_initItemNavigation: function(oExtension, bSkipInitFocusedIndex) {
|
|
134
135
|
const oTable = oExtension.getTable();
|
|
135
136
|
|
|
@@ -267,7 +268,7 @@ sap.ui.define([
|
|
|
267
268
|
* @class Extension for sap.ui.table.Table which handles keyboard related things.
|
|
268
269
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
269
270
|
* @author SAP SE
|
|
270
|
-
* @version 1.
|
|
271
|
+
* @version 1.126.0
|
|
271
272
|
* @constructor
|
|
272
273
|
* @private
|
|
273
274
|
* @alias sap.ui.table.extensions.Keyboard
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
*
|
|
66
66
|
* @extends sap.ui.base.Object
|
|
67
67
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
68
|
+
* @version 1.126.0
|
|
69
69
|
* @constructor
|
|
70
70
|
* @private
|
|
71
71
|
* @alias sap.ui.table.extensions.KeyboardDelegate
|
|
@@ -1409,7 +1409,7 @@ sap.ui.define([
|
|
|
1409
1409
|
};
|
|
1410
1410
|
|
|
1411
1411
|
KeyboardDelegate.prototype.onsapdownmodifiers = function(oEvent) {
|
|
1412
|
-
if (oEvent.isMarked()) {
|
|
1412
|
+
if (oEvent.isMarked() || KeyboardDelegate._isKeyCombination(oEvent, null, ModKey.CTRL + ModKey.ALT)) {
|
|
1413
1413
|
preventItemNavigation(oEvent);
|
|
1414
1414
|
return;
|
|
1415
1415
|
}
|
|
@@ -1498,7 +1498,7 @@ sap.ui.define([
|
|
|
1498
1498
|
};
|
|
1499
1499
|
|
|
1500
1500
|
KeyboardDelegate.prototype.onsapupmodifiers = function(oEvent) {
|
|
1501
|
-
if (oEvent.isMarked()) {
|
|
1501
|
+
if (oEvent.isMarked() || KeyboardDelegate._isKeyCombination(oEvent, null, ModKey.CTRL + ModKey.ALT)) {
|
|
1502
1502
|
preventItemNavigation(oEvent);
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
@@ -703,7 +703,7 @@ sap.ui.define([
|
|
|
703
703
|
* @class Extension for sap.ui.table.Table which handles mouse and touch related things.
|
|
704
704
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
705
705
|
* @author SAP SE
|
|
706
|
-
* @version 1.
|
|
706
|
+
* @version 1.126.0
|
|
707
707
|
* @constructor
|
|
708
708
|
* @private
|
|
709
709
|
* @alias sap.ui.table.extensions.Pointer
|
|
@@ -48,6 +48,14 @@ sap.ui.define([
|
|
|
48
48
|
*/
|
|
49
49
|
const VERTICAL_OVERFLOW_BUFFER_LENGTH = 2; // Must be >= 1! A buffer is always required, because at least one row is always in the buffer.
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* The timeout for blocking scroll events when the table is scrolled to the beginning or the end (milliseconds).
|
|
53
|
+
*
|
|
54
|
+
* @constant
|
|
55
|
+
* @type {int}
|
|
56
|
+
*/
|
|
57
|
+
const SCROLL_BLOCK_TIMEOUT = 500;
|
|
58
|
+
|
|
51
59
|
/**
|
|
52
60
|
* Scroll directions.
|
|
53
61
|
*
|
|
@@ -1335,6 +1343,7 @@ sap.ui.define([
|
|
|
1335
1343
|
}
|
|
1336
1344
|
|
|
1337
1345
|
const oVSb = oTable._getScrollExtension().getVerticalScrollbar();
|
|
1346
|
+
const bScrollingForward = iScrollTop > oVSb.scrollTop;
|
|
1338
1347
|
|
|
1339
1348
|
if (oVSb) {
|
|
1340
1349
|
log("VerticalScrollingHelper.scrollScrollbar: Scroll from " + oVSb.scrollTop + " to " + iScrollTop, oTable);
|
|
@@ -1344,6 +1353,24 @@ sap.ui.define([
|
|
|
1344
1353
|
log("VerticalScrollingHelper.scrollScrollbar: Not scrolled - No scrollbar available", oTable);
|
|
1345
1354
|
}
|
|
1346
1355
|
|
|
1356
|
+
let bScrolledToEnd = false;
|
|
1357
|
+
if (bScrollingForward) {
|
|
1358
|
+
bScrolledToEnd = Math.round(oVSb.scrollTop) === oVSb.scrollHeight - oVSb.offsetHeight;
|
|
1359
|
+
} else {
|
|
1360
|
+
bScrolledToEnd = oVSb.scrollTop === 0;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
if (bScrolledToEnd && !oVSb._unblockScrolling) {
|
|
1364
|
+
if (!oVSb._timeoutBlock) {
|
|
1365
|
+
oVSb._timeoutBlock = setTimeout(function() {
|
|
1366
|
+
oVSb._unblockScrolling = true;
|
|
1367
|
+
oVSb._timeoutBlock = null;
|
|
1368
|
+
}, SCROLL_BLOCK_TIMEOUT);
|
|
1369
|
+
}
|
|
1370
|
+
} else {
|
|
1371
|
+
oVSb._unblockScrolling = false;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1347
1374
|
return Promise.resolve();
|
|
1348
1375
|
},
|
|
1349
1376
|
|
|
@@ -1850,12 +1877,12 @@ sap.ui.define([
|
|
|
1850
1877
|
const oVerticalScrollPosition = _private(this).oVerticalScrollPosition;
|
|
1851
1878
|
|
|
1852
1879
|
if (bScrollingForward) {
|
|
1853
|
-
bScrolledToEnd = oVSb.scrollTop === oVSb.scrollHeight - oVSb.offsetHeight;
|
|
1880
|
+
bScrolledToEnd = Math.round(oVSb.scrollTop) === oVSb.scrollHeight - oVSb.offsetHeight;
|
|
1854
1881
|
} else {
|
|
1855
1882
|
bScrolledToEnd = oVSb.scrollTop === 0;
|
|
1856
1883
|
}
|
|
1857
1884
|
|
|
1858
|
-
if (!oScrollExtension.isVerticalScrollbarVisible() || bScrolledToEnd) {
|
|
1885
|
+
if (!oScrollExtension.isVerticalScrollbarVisible() || bScrolledToEnd && oVSb._unblockScrolling) {
|
|
1859
1886
|
return;
|
|
1860
1887
|
}
|
|
1861
1888
|
oEvent.preventDefault();
|
|
@@ -2268,7 +2295,7 @@ sap.ui.define([
|
|
|
2268
2295
|
* @class Extension for sap.ui.table.Table which handles scrolling.
|
|
2269
2296
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
2270
2297
|
* @author SAP SE
|
|
2271
|
-
* @version 1.
|
|
2298
|
+
* @version 1.126.0
|
|
2272
2299
|
* @constructor
|
|
2273
2300
|
* @private
|
|
2274
2301
|
* @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.126.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @alias sap.ui.table.extensions.ScrollingIOS
|
|
@@ -185,7 +185,7 @@ sap.ui.define([
|
|
|
185
185
|
* @class Extension for sap.ui.table.Table that allows synchronization with a table.
|
|
186
186
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
187
187
|
* @author SAP SE
|
|
188
|
-
* @version 1.
|
|
188
|
+
* @version 1.126.0
|
|
189
189
|
* @constructor
|
|
190
190
|
* @private
|
|
191
191
|
* @alias sap.ui.table.extensions.Synchronization
|
|
@@ -27,14 +27,14 @@ sap.ui.define([
|
|
|
27
27
|
* @namespace
|
|
28
28
|
* @alias sap.ui.table
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.126.0
|
|
31
31
|
* @since 0.8
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
34
|
const thisLib = Library.init({
|
|
35
35
|
name: "sap.ui.table",
|
|
36
36
|
apiVersion: 2,
|
|
37
|
-
version: "1.
|
|
37
|
+
version: "1.126.0",
|
|
38
38
|
dependencies: ["sap.ui.core", "sap.ui.unified"],
|
|
39
39
|
designtime: "sap/ui/table/designtime/library.designtime",
|
|
40
40
|
types: [
|
|
@@ -96,7 +96,7 @@ sap.ui.define([
|
|
|
96
96
|
/**
|
|
97
97
|
* Navigation mode of the table
|
|
98
98
|
*
|
|
99
|
-
* @version 1.
|
|
99
|
+
* @version 1.126.0
|
|
100
100
|
* @enum {string}
|
|
101
101
|
* @deprecated As of version 1.38, the concept has been discarded.
|
|
102
102
|
* @public
|
|
@@ -127,7 +127,7 @@ sap.ui.define([
|
|
|
127
127
|
/**
|
|
128
128
|
* Row Action types.
|
|
129
129
|
*
|
|
130
|
-
* @version 1.
|
|
130
|
+
* @version 1.126.0
|
|
131
131
|
* @enum {string}
|
|
132
132
|
* @public
|
|
133
133
|
*/
|
|
@@ -158,7 +158,7 @@ sap.ui.define([
|
|
|
158
158
|
/**
|
|
159
159
|
* Selection behavior of the table
|
|
160
160
|
*
|
|
161
|
-
* @version 1.
|
|
161
|
+
* @version 1.126.0
|
|
162
162
|
* @enum {string}
|
|
163
163
|
* @public
|
|
164
164
|
*/
|
|
@@ -189,7 +189,7 @@ sap.ui.define([
|
|
|
189
189
|
/**
|
|
190
190
|
* Selection mode of the table
|
|
191
191
|
*
|
|
192
|
-
* @version 1.
|
|
192
|
+
* @version 1.126.0
|
|
193
193
|
* @enum {string}
|
|
194
194
|
* @public
|
|
195
195
|
*/
|
|
@@ -227,7 +227,7 @@ sap.ui.define([
|
|
|
227
227
|
/**
|
|
228
228
|
* Sort order of a column
|
|
229
229
|
*
|
|
230
|
-
* @version 1.
|
|
230
|
+
* @version 1.126.0
|
|
231
231
|
* @enum {string}
|
|
232
232
|
* @public
|
|
233
233
|
* @deprecated As of version 1.120, replaced with <code>sap.ui.core.SortOrder</code>
|
|
@@ -254,7 +254,7 @@ sap.ui.define([
|
|
|
254
254
|
/**
|
|
255
255
|
* VisibleRowCountMode of the table
|
|
256
256
|
*
|
|
257
|
-
* @version 1.
|
|
257
|
+
* @version 1.126.0
|
|
258
258
|
* @enum {string}
|
|
259
259
|
* @deprecated As of version 1.119, see the <code>rowMode</code> aggregation of <code>sap.ui.table.Table</code> for more details.
|
|
260
260
|
* @public
|
|
@@ -299,7 +299,7 @@ sap.ui.define([
|
|
|
299
299
|
*
|
|
300
300
|
* Contains IDs of shared DOM references, which should be accessible to inheriting controls via getDomRef() function.
|
|
301
301
|
*
|
|
302
|
-
* @version 1.
|
|
302
|
+
* @version 1.126.0
|
|
303
303
|
* @enum {string}
|
|
304
304
|
* @public
|
|
305
305
|
*/
|
|
@@ -400,7 +400,7 @@ sap.ui.define([
|
|
|
400
400
|
*
|
|
401
401
|
* This is an alias for {@link sap.ui.model.TreeAutoExpandMode} and kept for compatibility reasons.
|
|
402
402
|
*
|
|
403
|
-
* @version 1.
|
|
403
|
+
* @version 1.126.0
|
|
404
404
|
* @typedef {sap.ui.model.TreeAutoExpandMode}
|
|
405
405
|
* @public
|
|
406
406
|
* @deprecated As of version 1.120, replaced by <code>sap.ui.model.TreeAutoExpandMode</code>
|
|
@@ -414,7 +414,7 @@ sap.ui.define([
|
|
|
414
414
|
/**
|
|
415
415
|
* Mode of a selection plugin
|
|
416
416
|
*
|
|
417
|
-
* @version 1.
|
|
417
|
+
* @version 1.126.0
|
|
418
418
|
* @enum {string}
|
|
419
419
|
* @private
|
|
420
420
|
*/
|
|
@@ -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.126.0
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @alias sap.ui.table.plugins.BindingSelection
|
|
@@ -30,8 +30,10 @@ sap.ui.define([
|
|
|
30
30
|
*
|
|
31
31
|
* @class Implements a plugin to enable a special multi-selection behavior:
|
|
32
32
|
* <ul>
|
|
33
|
-
* <li>
|
|
34
|
-
*
|
|
33
|
+
* <li>Select All checkbox for selecting rows up to the set limit.<br>If the number of selected rows is smaller than the limit,
|
|
34
|
+
* all these rows can be selected at once with a single operation. If there are more rows than the limit,
|
|
35
|
+
* the first x rows are selected until the limit x has been reached.</li>
|
|
36
|
+
* <li>Dedicated Deselect All button for removing the selection</li>
|
|
35
37
|
* <li>The number of indices which can be selected in a range is defined by the <code>limit</code> property.
|
|
36
38
|
* If the user tries to select more indices, the selection is automatically limited, and the table scrolls to the last selected index.</li>
|
|
37
39
|
* <li>The plugin makes sure that the corresponding binding contexts up to the given limit are available, by requesting them from the
|
|
@@ -143,6 +145,7 @@ sap.ui.define([
|
|
|
143
145
|
MultiSelectionPlugin.prototype.onDeactivate = function(oTable) {
|
|
144
146
|
SelectionPlugin.prototype.onDeactivate.apply(this, arguments);
|
|
145
147
|
oTable.setProperty("selectionMode", SelectionMode.None);
|
|
148
|
+
detachFromBinding(this, this.getTableBinding());
|
|
146
149
|
|
|
147
150
|
if (this.oInnerSelectionPlugin) {
|
|
148
151
|
this.oInnerSelectionPlugin.destroy();
|
|
@@ -655,9 +658,34 @@ sap.ui.define([
|
|
|
655
658
|
return 0;
|
|
656
659
|
};
|
|
657
660
|
|
|
661
|
+
MultiSelectionPlugin.prototype.onTableRowsBound = function(oBinding) {
|
|
662
|
+
SelectionPlugin.prototype.onTableRowsBound.apply(this, arguments);
|
|
663
|
+
attachToBinding(this, oBinding);
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
function attachToBinding(oPlugin, oBinding) {
|
|
667
|
+
if (oBinding) {
|
|
668
|
+
oBinding.attachChange(oPlugin._onBindingChange, oPlugin);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
function detachFromBinding(oPlugin, oBinding) {
|
|
673
|
+
if (oBinding) {
|
|
674
|
+
oBinding.detachChange(oPlugin._onBindingChange, oPlugin);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
658
678
|
MultiSelectionPlugin.prototype.onThemeChanged = function() {
|
|
659
679
|
updateHeaderSelectorIcon(this);
|
|
660
680
|
};
|
|
661
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Handler for change events of the binding.
|
|
684
|
+
* @private
|
|
685
|
+
*/
|
|
686
|
+
MultiSelectionPlugin.prototype._onBindingChange = function() {
|
|
687
|
+
updateHeaderSelectorIcon(this);
|
|
688
|
+
};
|
|
689
|
+
|
|
662
690
|
return MultiSelectionPlugin;
|
|
663
691
|
});
|
|
@@ -106,6 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
ODataV4Selection.prototype.onDeactivate = function(oTable) {
|
|
107
107
|
SelectionPlugin.prototype.onDeactivate.apply(this, arguments);
|
|
108
108
|
oTable.setProperty("selectionMode", TableSelectionMode.None);
|
|
109
|
+
detachFromBinding(this, this.getTableBinding());
|
|
109
110
|
this.clearSelection();
|
|
110
111
|
};
|
|
111
112
|
|
|
@@ -316,9 +317,24 @@ sap.ui.define([
|
|
|
316
317
|
// TODO: Same as V4Aggregation plugin, check comment there!
|
|
317
318
|
if (!oBinding.getModel().isA("sap.ui.model.odata.v4.ODataModel")) {
|
|
318
319
|
this.deactivate();
|
|
320
|
+
} else {
|
|
321
|
+
SelectionPlugin.prototype.onTableRowsBound.apply(this, arguments);
|
|
322
|
+
attachToBinding(this, oBinding);
|
|
319
323
|
}
|
|
320
324
|
};
|
|
321
325
|
|
|
326
|
+
function attachToBinding(oPlugin, oBinding) {
|
|
327
|
+
if (oBinding) {
|
|
328
|
+
oBinding.attachChange(oPlugin._onBindingChange, oPlugin);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function detachFromBinding(oPlugin, oBinding) {
|
|
333
|
+
if (oBinding) {
|
|
334
|
+
oBinding.detachChange(oPlugin._onBindingChange, oPlugin);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
322
338
|
/**
|
|
323
339
|
* Checks whether the limit is disabled.
|
|
324
340
|
*
|
|
@@ -431,5 +447,13 @@ sap.ui.define([
|
|
|
431
447
|
updateHeaderSelectorIcon(this);
|
|
432
448
|
};
|
|
433
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Handler for change events of the binding.
|
|
452
|
+
* @private
|
|
453
|
+
*/
|
|
454
|
+
ODataV4Selection.prototype._onBindingChange = function() {
|
|
455
|
+
updateHeaderSelectorIcon(this);
|
|
456
|
+
};
|
|
457
|
+
|
|
434
458
|
return ODataV4Selection;
|
|
435
459
|
});
|