@openui5/sap.ui.table 1.111.2 → 1.112.2
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/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 +16 -1
- 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 +14 -9
- 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 +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 +15 -8
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +1 -1
- package/src/sap/ui/table/extensions/Pointer.js +4 -11
- 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 +10 -10
- 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/messagebundle_bg.properties +1 -1
- package/src/sap/ui/table/messagebundle_uk.properties +2 -2
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +17 -15
- 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 +44 -27
- package/src/sap/ui/table/rowmodes/VariableRowMode.js +1 -1
- package/src/sap/ui/table/utils/TableUtils.js +2 -11
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.table",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.112.2",
|
|
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.112.2",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.112.2"
|
|
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.112.2</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
* @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
|
|
59
59
|
*
|
|
60
60
|
* @extends sap.ui.table.Table
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.112.2
|
|
62
62
|
*
|
|
63
63
|
* @constructor
|
|
64
64
|
* @public
|
|
@@ -1011,6 +1011,21 @@ sap.ui.define([
|
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
|
|
1014
|
+
AnalyticalTable.prototype._getTotalRowCount = function() {
|
|
1015
|
+
var iTotalRowCount = Table.prototype._getTotalRowCount.apply(this, arguments);
|
|
1016
|
+
|
|
1017
|
+
if (iTotalRowCount === 1) {
|
|
1018
|
+
var oBinding = this.getBinding();
|
|
1019
|
+
var bHasGrandTotal = oBinding ? oBinding.providesGrandTotal() && oBinding.hasTotaledMeasures() : false;
|
|
1020
|
+
|
|
1021
|
+
if (bHasGrandTotal) {
|
|
1022
|
+
iTotalRowCount = 0; // If there's only the grand total, the table has to act as if it's empty.
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
return iTotalRowCount;
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1014
1029
|
/**
|
|
1015
1030
|
* Returns the total size of the data entries.
|
|
1016
1031
|
*
|
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.112.2
|
|
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.112.2
|
|
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.112.2
|
|
96
96
|
*
|
|
97
97
|
* @constructor
|
|
98
98
|
* @public
|
|
@@ -1579,16 +1579,16 @@ sap.ui.define([
|
|
|
1579
1579
|
var oDummyColumn = this.getDomRef("dummycolhdr");
|
|
1580
1580
|
|
|
1581
1581
|
if (oDummyColumn) {
|
|
1582
|
-
var iColumnsWidth = this.getColumns().reduce(function(iColumnsWidth, oColumn) {
|
|
1583
|
-
var oDomRef = oColumn.getDomRef();
|
|
1584
|
-
if (oDomRef && oColumn.getIndex() >= this.getComputedFixedColumnCount()) {
|
|
1585
|
-
iColumnsWidth += oDomRef.offsetWidth;
|
|
1586
|
-
}
|
|
1587
|
-
return iColumnsWidth;
|
|
1588
|
-
}.bind(this), 0);
|
|
1589
1582
|
var bDummyColumnHasWidth = oDummyColumn.clientWidth > 0;
|
|
1590
1583
|
|
|
1591
1584
|
if (!bHasFlexibleRowActions && bDummyColumnHasWidth) {
|
|
1585
|
+
var iColumnsWidth = this.getColumns().reduce(function(iColumnsWidth, oColumn) {
|
|
1586
|
+
var oDomRef = oColumn.getDomRef();
|
|
1587
|
+
if (oDomRef && oColumn.getIndex() >= this.getComputedFixedColumnCount()) {
|
|
1588
|
+
iColumnsWidth += oDomRef.offsetWidth;
|
|
1589
|
+
}
|
|
1590
|
+
return iColumnsWidth;
|
|
1591
|
+
}.bind(this), 0);
|
|
1592
1592
|
var iRowActionPos = iColumnsWidth + oTableSizes.tableRowHdrScrWidth + oTableSizes.tableCtrlFixedWidth;
|
|
1593
1593
|
var oRowActionStyles = {};
|
|
1594
1594
|
if (!TableUtils.hasRowActions(this)) {
|
|
@@ -1689,8 +1689,13 @@ sap.ui.define([
|
|
|
1689
1689
|
* @see JSDoc generated by SAPUI5 control
|
|
1690
1690
|
*/
|
|
1691
1691
|
Table.prototype.applyFocusInfo = function(mFocusInfo) {
|
|
1692
|
+
delete this._bApplyFocusInfoFailed;
|
|
1692
1693
|
if (mFocusInfo && mFocusInfo.customId) {
|
|
1693
|
-
|
|
1694
|
+
if (document.getElementById(mFocusInfo.customId)) {
|
|
1695
|
+
jQuery(document.getElementById(mFocusInfo.customId)).trigger("focus");
|
|
1696
|
+
} else {
|
|
1697
|
+
this._bApplyFocusInfoFailed = true;
|
|
1698
|
+
}
|
|
1694
1699
|
} else {
|
|
1695
1700
|
Control.prototype.applyFocusInfo.apply(this, arguments);
|
|
1696
1701
|
}
|
|
@@ -929,7 +929,7 @@ sap.ui.define([
|
|
|
929
929
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
930
930
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
931
931
|
* @author SAP SE
|
|
932
|
-
* @version 1.
|
|
932
|
+
* @version 1.112.2
|
|
933
933
|
* @constructor
|
|
934
934
|
* @private
|
|
935
935
|
* @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.112.2
|
|
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.112.2
|
|
271
271
|
* @constructor
|
|
272
272
|
* @private
|
|
273
273
|
* @alias sap.ui.table.extensions.Keyboard
|
|
@@ -401,26 +401,33 @@ sap.ui.define([
|
|
|
401
401
|
*/
|
|
402
402
|
KeyboardExtension.prototype.updateNoDataAndOverlayFocus = function() {
|
|
403
403
|
var oTable = this.getTable();
|
|
404
|
-
var
|
|
404
|
+
var oActiveElement = document.activeElement;
|
|
405
405
|
|
|
406
406
|
if (!oTable || !oTable.getDomRef()) {
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
if (oTable.getShowOverlay()) {
|
|
411
|
-
if (containsOrEquals(oTable.getDomRef(),
|
|
412
|
-
this._oLastFocus = {Ref:
|
|
411
|
+
if (containsOrEquals(oTable.getDomRef(), oActiveElement) && oTable.$("overlay")[0] !== oActiveElement) {
|
|
412
|
+
this._oLastFocus = {Ref: oActiveElement, Pos: "overlay"};
|
|
413
413
|
oTable.getDomRef("overlay").focus();
|
|
414
414
|
}
|
|
415
|
-
} else if (TableUtils.isNoDataVisible(oTable)
|
|
416
|
-
if (
|
|
417
|
-
|
|
415
|
+
} else if (TableUtils.isNoDataVisible(oTable)) {
|
|
416
|
+
if (oTable.$("noDataCnt")[0] === oActiveElement) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
if (containsOrEquals(oTable.getDomRef("tableCCnt"), oActiveElement)) {
|
|
420
|
+
this._oLastFocus = {Ref: oActiveElement, Pos: "table content"};
|
|
418
421
|
if (Device.browser.safari) {
|
|
419
422
|
oTable.getDomRef("noDataCnt").getBoundingClientRect();
|
|
420
423
|
}
|
|
421
424
|
oTable.getDomRef("noDataCnt").focus();
|
|
422
|
-
} else if (oTable.$("overlay")[0] ===
|
|
425
|
+
} else if (oTable.$("overlay")[0] === oActiveElement) {
|
|
423
426
|
setFocusFallback(oTable, this);
|
|
427
|
+
} else if (oTable._bApplyFocusInfoFailed) {
|
|
428
|
+
this._oLastFocus = {Ref: oActiveElement, Pos: "table content"};
|
|
429
|
+
delete oTable._bApplyFocusInfoFailed;
|
|
430
|
+
oTable.getDomRef("noDataCnt").focus();
|
|
424
431
|
}
|
|
425
432
|
} else if (this._oLastFocus) {
|
|
426
433
|
if (this._oLastFocus.Pos === "table content") {
|
|
@@ -734,6 +734,8 @@ sap.ui.define([
|
|
|
734
734
|
TableUtils.Menu.openContextMenu(this, oEvent.target);
|
|
735
735
|
delete oPointerExtension._bShowMenu;
|
|
736
736
|
}
|
|
737
|
+
} else if (oCellInfo.isOfType(TableUtils.CELLTYPE.COLUMNROWHEADER)) {
|
|
738
|
+
this._getSelectionPlugin().onHeaderSelectorPress();
|
|
737
739
|
} else if (oRow && oRow.isSummary()) {
|
|
738
740
|
// Sum row cannot be selected
|
|
739
741
|
oEvent.preventDefault();
|
|
@@ -748,23 +750,14 @@ sap.ui.define([
|
|
|
748
750
|
return;
|
|
749
751
|
}
|
|
750
752
|
|
|
751
|
-
if (oCellInfo.isOfType(TableUtils.CELLTYPE.COLUMNROWHEADER)) {
|
|
752
|
-
window.getSelection().empty();
|
|
753
|
-
}
|
|
754
|
-
|
|
755
753
|
var sSelectedText = window.getSelection().toString();
|
|
756
754
|
if (!oEvent.shiftKey && sSelectedText.length > 0 && sSelectedText !== "\n") {
|
|
757
755
|
Log.debug("DOM Selection detected -> Click event on table skipped, Target: " + oEvent.target);
|
|
758
756
|
return;
|
|
759
757
|
}
|
|
760
758
|
|
|
761
|
-
// forward the event
|
|
762
759
|
if (!this._findAndfireCellEvent(this.fireCellClick, oEvent)) {
|
|
763
|
-
|
|
764
|
-
this._getSelectionPlugin().onHeaderSelectorPress();
|
|
765
|
-
} else {
|
|
766
|
-
ExtensionHelper._handleClickSelection(oEvent, $Cell, this);
|
|
767
|
-
}
|
|
760
|
+
ExtensionHelper._handleClickSelection(oEvent, $Cell, this);
|
|
768
761
|
} else {
|
|
769
762
|
oEvent.preventDefault();
|
|
770
763
|
}
|
|
@@ -803,7 +796,7 @@ sap.ui.define([
|
|
|
803
796
|
* @class Extension for sap.ui.table.Table which handles mouse and touch related things.
|
|
804
797
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
805
798
|
* @author SAP SE
|
|
806
|
-
* @version 1.
|
|
799
|
+
* @version 1.112.2
|
|
807
800
|
* @constructor
|
|
808
801
|
* @private
|
|
809
802
|
* @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.112.2
|
|
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.112.2
|
|
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.112.2
|
|
185
185
|
* @constructor
|
|
186
186
|
* @private
|
|
187
187
|
* @alias sap.ui.table.extensions.Synchronization
|
|
@@ -20,13 +20,13 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
20
20
|
* @namespace
|
|
21
21
|
* @alias sap.ui.table
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.112.2
|
|
24
24
|
* @since 0.8
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
27
|
var thisLib = sap.ui.getCore().initLibrary({
|
|
28
28
|
name: "sap.ui.table",
|
|
29
|
-
version: "1.
|
|
29
|
+
version: "1.112.2",
|
|
30
30
|
dependencies: ["sap.ui.core", "sap.ui.unified"],
|
|
31
31
|
designtime: "sap/ui/table/designtime/library.designtime",
|
|
32
32
|
types: [
|
|
@@ -80,7 +80,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
80
80
|
/**
|
|
81
81
|
* Navigation mode of the table
|
|
82
82
|
*
|
|
83
|
-
* @version 1.
|
|
83
|
+
* @version 1.112.2
|
|
84
84
|
* @enum {string}
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
@@ -107,7 +107,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
107
107
|
/**
|
|
108
108
|
* Row Action types.
|
|
109
109
|
*
|
|
110
|
-
* @version 1.
|
|
110
|
+
* @version 1.112.2
|
|
111
111
|
* @enum {string}
|
|
112
112
|
* @public
|
|
113
113
|
*/
|
|
@@ -136,7 +136,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
136
136
|
/**
|
|
137
137
|
* Selection behavior of the table
|
|
138
138
|
*
|
|
139
|
-
* @version 1.
|
|
139
|
+
* @version 1.112.2
|
|
140
140
|
* @enum {string}
|
|
141
141
|
* @public
|
|
142
142
|
*/
|
|
@@ -165,7 +165,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
165
165
|
/**
|
|
166
166
|
* Selection mode of the table
|
|
167
167
|
*
|
|
168
|
-
* @version 1.
|
|
168
|
+
* @version 1.112.2
|
|
169
169
|
* @enum {string}
|
|
170
170
|
* @public
|
|
171
171
|
*/
|
|
@@ -201,7 +201,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
201
201
|
/**
|
|
202
202
|
* Sort order of a column
|
|
203
203
|
*
|
|
204
|
-
* @version 1.
|
|
204
|
+
* @version 1.112.2
|
|
205
205
|
* @enum {string}
|
|
206
206
|
* @public
|
|
207
207
|
*/
|
|
@@ -224,7 +224,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
224
224
|
/**
|
|
225
225
|
* VisibleRowCountMode of the table
|
|
226
226
|
*
|
|
227
|
-
* @version 1.
|
|
227
|
+
* @version 1.112.2
|
|
228
228
|
* @enum {string}
|
|
229
229
|
* @public
|
|
230
230
|
*/
|
|
@@ -255,7 +255,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
255
255
|
*
|
|
256
256
|
* Contains IDs of shared DOM references, which should be accessible to inheriting controls via getDomRef() function.
|
|
257
257
|
*
|
|
258
|
-
* @version 1.
|
|
258
|
+
* @version 1.112.2
|
|
259
259
|
* @enum {string}
|
|
260
260
|
* @public
|
|
261
261
|
*/
|
|
@@ -353,7 +353,7 @@ sap.ui.define(['sap/ui/core/Core', 'sap/ui/model/TreeAutoExpandMode',
|
|
|
353
353
|
*
|
|
354
354
|
* This is an alias for {@link sap.ui.model.TreeAutoExpandMode} and kept for compatibility reasons.
|
|
355
355
|
*
|
|
356
|
-
* @version 1.
|
|
356
|
+
* @version 1.112.2
|
|
357
357
|
* @typedef {sap.ui.model.TreeAutoExpandMode}
|
|
358
358
|
* @public
|
|
359
359
|
*/
|
|
@@ -41,7 +41,7 @@ TBL_NO_COLUMNS=\u0412 \u043C\u043E\u043C\u0435\u043D\u0442\u0430 \u0432 \u0442\u
|
|
|
41
41
|
TBL_NO_DATA=\u041D\u044F\u043C\u0430 \u0434\u0430\u043D\u043D\u0438
|
|
42
42
|
|
|
43
43
|
TBL_SELECT_ALL=\u0418\u0437\u0431\u043E\u0440 \u043D\u0430 \u0432\u0441\u0438\u0447\u043A\u0438
|
|
44
|
-
TBL_DESELECT_ALL=\
|
|
44
|
+
TBL_DESELECT_ALL=\u0420\u0430\u0437\u043C\u0430\u0440\u043A\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0432\u0441\u0438\u0447\u043A\u0438
|
|
45
45
|
|
|
46
46
|
TBL_TOGGLE_EDIT_KEY=\u0417\u0430 \u0434\u0430 \u0432\u044A\u0432\u0435\u0434\u0435\u0442\u0435 \u043A\u043B\u0435\u0442\u043A\u0430 \u043E\u0442 \u0442\u0430\u0431\u043B\u0438\u0446\u0430, \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 F2
|
|
47
47
|
|
|
@@ -20,8 +20,8 @@ TBL_HIDE_COLUMN=\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438
|
|
|
20
20
|
TBL_COL_VISBILITY_MENUITEM_SHOW=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0447\u0438\u043A
|
|
21
21
|
TBL_COL_VISBILITY_MENUITEM_HIDE=\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0447\u0438\u043A
|
|
22
22
|
|
|
23
|
-
TBL_ROW_SELECT=\u041A\u043B\u0430\u0446\u043D\u0456\u0442\u044C \
|
|
24
|
-
TBL_ROW_DESELECT=\u041A\u043B\u0430\u0446\u043D\u0456\u0442\u044C \
|
|
23
|
+
TBL_ROW_SELECT=\u041A\u043B\u0430\u0446\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0432\u0438\u0431\u0440\u0430\u0442\u0438
|
|
24
|
+
TBL_ROW_DESELECT=\u041A\u043B\u0430\u0446\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0441\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438 \u0432\u0438\u0431\u0456\u0440
|
|
25
25
|
TBL_ROW_SELECT_MULTI_TOGGLE=\u041A\u043B\u0430\u0446\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0432\u0438\u0431\u0440\u0430\u0442\u0438, \u0430\u0431\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C SHIFT \u0456 \u043A\u043B\u0430\u0446\u043D\u0456\u0442\u044C \u0434\u043B\u044F \u0432\u0438\u0431\u043E\u0440\u0443 \u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D\u0443
|
|
26
26
|
|
|
27
27
|
TBL_TABLE_SELECTION_MULTI=\u0422\u0430\u0431\u043B\u0438\u0446\u044F \u043C\u043D\u043E\u0436\u0438\u043D\u043D\u043E\u0433\u043E \u0432\u0438\u0431\u043E\u0440\u0443
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @class Implements the selection methods for TreeTable and AnalyticalTable
|
|
24
24
|
* @extends sap.ui.table.plugins.SelectionPlugin
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.112.2
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
28
28
|
* @alias sap.ui.table.plugins.BindingSelection
|
|
@@ -26,19 +26,20 @@ sap.ui.define([
|
|
|
26
26
|
/**
|
|
27
27
|
* Constructs an instance of sap.ui.table.plugins.MultiSelectionPlugin
|
|
28
28
|
*
|
|
29
|
-
* @class
|
|
29
|
+
* @class Implements a plugin to enable a special multi-selection behavior:
|
|
30
30
|
* <ul>
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
31
|
+
* <li>No Select All checkbox, select all can only be done via range selection</li>
|
|
32
|
+
* <li>Dedicated Deselect All button to clear the selection</li>
|
|
33
|
+
* <li>The number of indices which can be selected in a range is defined by the <code>limit</code> property.
|
|
34
|
+
* If the user tries to select more indices, the selection is automatically limited, and the table scrolls to the last selected index.</li>
|
|
35
|
+
* <li>The plugin makes sure that the corresponding binding contexts up to the given limit are available, by requesting them from the
|
|
36
|
+
* binding.</li>
|
|
37
|
+
* <li>Multiple consecutive selections are possible</li>
|
|
38
38
|
* </ul>
|
|
39
39
|
*
|
|
40
|
-
* This plugin is intended for
|
|
41
|
-
*
|
|
40
|
+
* This plugin is intended for server-side models and multi-selection mode. Range selections, including Select All, only work properly if the
|
|
41
|
+
* count is known. Make sure the model/binding is configured to request the count from the service.
|
|
42
|
+
* For ease of use, client-side models and single selection are also supported.
|
|
42
43
|
*
|
|
43
44
|
* @extends sap.ui.table.plugins.SelectionPlugin
|
|
44
45
|
* @constructor
|
|
@@ -54,13 +55,14 @@ sap.ui.define([
|
|
|
54
55
|
* Number of indices which can be selected in a range.
|
|
55
56
|
* Accepts positive integer values. If set to 0, the limit is disabled, and the Select All checkbox appears instead of the Deselect All
|
|
56
57
|
* button.
|
|
57
|
-
*
|
|
58
|
-
* To avoid severe performance problems, the limit should only be set to 0 in the following cases:
|
|
58
|
+
*
|
|
59
|
+
* <b>Note:</b> To avoid severe performance problems, the limit should only be set to 0 in the following cases:
|
|
59
60
|
* <ul>
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
61
|
+
* <li>With client-side models</li>
|
|
62
|
+
* <li>With server-side models if they are used in client mode</li>
|
|
63
|
+
* <li>If the entity set is small</li>
|
|
63
64
|
* </ul>
|
|
65
|
+
*
|
|
64
66
|
* In other cases, we recommend to set the limit to at least double the value of the {@link sap.ui.table.Table#getThreshold threshold}
|
|
65
67
|
* property of the related <code>sap.ui.table.Table</code> control.
|
|
66
68
|
*/
|
|
@@ -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.112.2
|
|
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.112.2
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.76
|
|
38
38
|
* @experimental
|
|
@@ -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.112.2
|
|
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.112.2
|
|
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.112.2
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
var InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.InteractiveRowMode", /** @lends sap.ui.table.rowmodes.InteractiveRowMode.prototype */ {
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
* @ui5-restricted sap.ui.mdc
|
|
35
35
|
*
|
|
36
36
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.112.2
|
|
38
38
|
*/
|
|
39
39
|
var RowMode = Element.extend("sap.ui.table.rowmodes.RowMode", /** @lends sap.ui.table.rowmodes.RowMode.prototype */ {
|
|
40
40
|
metadata: {
|
|
@@ -570,7 +570,6 @@ sap.ui.define([
|
|
|
570
570
|
var oTable = this.getTable();
|
|
571
571
|
var aRows = oTable.getRows();
|
|
572
572
|
var iNewNumberOfRows = this.getComputedRowCounts().count;
|
|
573
|
-
var i;
|
|
574
573
|
var bRowsAggregationChanged = false;
|
|
575
574
|
|
|
576
575
|
// There is no need to have rows in the aggregation if the NoData overlay is enabled and no binding is available.
|
|
@@ -581,6 +580,13 @@ sap.ui.define([
|
|
|
581
580
|
iNewNumberOfRows++; // Create one additional row for partial row scrolling.
|
|
582
581
|
}
|
|
583
582
|
|
|
583
|
+
// Clear the text selection if text inside rows is selected and the content is going to change, for example on scroll.
|
|
584
|
+
var oRowContainer = oTable.getDomRef("tableCCnt");
|
|
585
|
+
var oSelection = window.getSelection();
|
|
586
|
+
if (oRowContainer && oSelection.containsNode(oRowContainer, true)) {
|
|
587
|
+
oSelection.empty();
|
|
588
|
+
}
|
|
589
|
+
|
|
584
590
|
// Destroy rows if they are invalid, but keep the DOM in case the table is going to render.
|
|
585
591
|
// Becomes obsolete with CPOUIFTEAMB-1379
|
|
586
592
|
if (oTable._bRowAggregationInvalid) {
|
|
@@ -598,28 +604,7 @@ sap.ui.define([
|
|
|
598
604
|
oSyncExtension.syncRowCount(iNewNumberOfRows);
|
|
599
605
|
});
|
|
600
606
|
|
|
601
|
-
|
|
602
|
-
// Create missing rows.
|
|
603
|
-
var aNewRows = createRows(oTable, iNewNumberOfRows - aRows.length);
|
|
604
|
-
|
|
605
|
-
aRows = aRows.concat(aNewRows);
|
|
606
|
-
|
|
607
|
-
// Set the binding context before adding the new rows to the aggregation to avoid double propagation.
|
|
608
|
-
updateBindingContextsOfRows(this, aRows);
|
|
609
|
-
|
|
610
|
-
for (i = 0; i < aNewRows.length; i++) {
|
|
611
|
-
oTable.addAggregation("rows", aNewRows[i], true);
|
|
612
|
-
}
|
|
613
|
-
} else {
|
|
614
|
-
// Remove rows that are not required.
|
|
615
|
-
for (i = aRows.length - 1; i >= iNewNumberOfRows; i--) {
|
|
616
|
-
oTable.removeAggregation("rows", i, true);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
aRows.splice(iNewNumberOfRows);
|
|
620
|
-
updateBindingContextsOfRows(this, aRows);
|
|
621
|
-
}
|
|
622
|
-
|
|
607
|
+
updateRowsAggregation(this, iNewNumberOfRows);
|
|
623
608
|
bRowsAggregationChanged = true;
|
|
624
609
|
oTable._bRowAggregationInvalid = false;
|
|
625
610
|
|
|
@@ -757,10 +742,43 @@ sap.ui.define([
|
|
|
757
742
|
return _private(this).bNoDataDisabled;
|
|
758
743
|
};
|
|
759
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Updates the rows aggregation of the table. Updates the binding contexts of all rows and creates new rows if required.
|
|
747
|
+
*
|
|
748
|
+
* @param {sap.ui.table.Table} oTable The table that is or will be the parent of the rows.
|
|
749
|
+
* @param {int} iNewNumberOfRows The number of rows that need to be in the aggregation.
|
|
750
|
+
*/
|
|
751
|
+
function updateRowsAggregation(oMode, iNewNumberOfRows) {
|
|
752
|
+
var oTable = oMode.getTable();
|
|
753
|
+
var aRows = oTable.getRows();
|
|
754
|
+
|
|
755
|
+
if (aRows.length < iNewNumberOfRows) {
|
|
756
|
+
// Create missing rows.
|
|
757
|
+
var aNewRows = createRows(oTable, iNewNumberOfRows - aRows.length);
|
|
758
|
+
|
|
759
|
+
aRows = aRows.concat(aNewRows);
|
|
760
|
+
|
|
761
|
+
// Set the binding context before adding the new rows to the aggregation to avoid double propagation.
|
|
762
|
+
updateBindingContextsOfRows(oMode, aRows);
|
|
763
|
+
|
|
764
|
+
aNewRows.forEach(function(oNewRow) {
|
|
765
|
+
oTable.addAggregation("rows", oNewRow, true);
|
|
766
|
+
});
|
|
767
|
+
} else {
|
|
768
|
+
// Remove rows that are not required.
|
|
769
|
+
for (var i = aRows.length - 1; i >= iNewNumberOfRows; i--) {
|
|
770
|
+
oTable.removeAggregation("rows", i, true);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
aRows.splice(iNewNumberOfRows);
|
|
774
|
+
updateBindingContextsOfRows(oMode, aRows);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
760
778
|
/**
|
|
761
779
|
* Creates and returns the specified amount of rows.
|
|
762
780
|
*
|
|
763
|
-
* @param {sap.ui.table.Table} oTable
|
|
781
|
+
* @param {sap.ui.table.Table} oTable The table that will be the parent of the rows.
|
|
764
782
|
* @param {int} iRowCount The number of rows to create.
|
|
765
783
|
* @returns {sap.ui.table.Row[]} The created rows.
|
|
766
784
|
*/
|
|
@@ -779,8 +797,7 @@ sap.ui.define([
|
|
|
779
797
|
* Updates binding contexts of the rows. The rows passed to this method must either be already in the rows aggregation of the table, or are
|
|
780
798
|
* about to be added there. Also, they must be in the order as they are, or will be, in the aggregation.
|
|
781
799
|
*
|
|
782
|
-
* @param {sap.ui.table.rowmodes.RowMode} oMode
|
|
783
|
-
* rows.
|
|
800
|
+
* @param {sap.ui.table.rowmodes.RowMode} oMode The row mode that is associated with the table that is or will be the parent of the rows.
|
|
784
801
|
* @param {Array<sap.ui.table.Row>} [aRows] The rows for which the contexts are to be updated.
|
|
785
802
|
*/
|
|
786
803
|
function updateBindingContextsOfRows(oMode, aRows) {
|
|
@@ -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.112.2
|
|
207
207
|
* @namespace
|
|
208
208
|
* @alias sap.ui.table.utils.TableUtils
|
|
209
209
|
* @private
|
|
@@ -366,16 +366,7 @@ sap.ui.define([
|
|
|
366
366
|
* @returns {boolean} Whether the table has data.
|
|
367
367
|
*/
|
|
368
368
|
hasData: function(oTable) {
|
|
369
|
-
|
|
370
|
-
var iTotalRowCount = oTable._getTotalRowCount();
|
|
371
|
-
var bHasData = iTotalRowCount > 0;
|
|
372
|
-
|
|
373
|
-
if (oBinding && oBinding.providesGrandTotal) { // Analytical Binding
|
|
374
|
-
var bHasTotal = oBinding.providesGrandTotal() && oBinding.hasTotaledMeasures();
|
|
375
|
-
bHasData = (bHasTotal && iTotalRowCount > 1) || (!bHasTotal && iTotalRowCount > 0);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
return bHasData;
|
|
369
|
+
return oTable._getTotalRowCount() > 0;
|
|
379
370
|
},
|
|
380
371
|
|
|
381
372
|
/**
|
|
@@ -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.112.2
|
|
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.112.2
|
|
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.112.2
|
|
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.112.2
|
|
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.112.2
|
|
43
43
|
* @namespace
|
|
44
44
|
* @alias sap.ui.table.utils._MenuUtils
|
|
45
45
|
* @private
|