@openui5/sap.ui.table 1.123.1 → 1.124.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/.eslintrc.json +9 -1
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +40 -40
- package/src/sap/ui/table/AnalyticalColumnMenu.js +11 -11
- package/src/sap/ui/table/AnalyticalTable.js +107 -107
- package/src/sap/ui/table/Column.js +83 -83
- package/src/sap/ui/table/ColumnMenu.js +54 -54
- package/src/sap/ui/table/CreationRow.js +29 -29
- package/src/sap/ui/table/CreationRowRenderer.js +21 -21
- package/src/sap/ui/table/Row.js +55 -56
- package/src/sap/ui/table/RowAction.js +27 -27
- package/src/sap/ui/table/RowActionItem.js +7 -7
- package/src/sap/ui/table/RowActionRenderer.js +3 -3
- package/src/sap/ui/table/RowSettings.js +28 -37
- package/src/sap/ui/table/Table.js +263 -266
- package/src/sap/ui/table/TablePersoController.js +46 -46
- package/src/sap/ui/table/TableRenderer.js +112 -113
- package/src/sap/ui/table/TreeTable.js +16 -16
- package/src/sap/ui/table/designtime/Table.designtime.js +2 -2
- package/src/sap/ui/table/extensions/Accessibility.js +185 -181
- package/src/sap/ui/table/extensions/AccessibilityRender.js +15 -15
- package/src/sap/ui/table/extensions/DragAndDrop.js +47 -47
- package/src/sap/ui/table/extensions/ExtensionBase.js +9 -9
- package/src/sap/ui/table/extensions/Keyboard.js +40 -40
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +257 -264
- package/src/sap/ui/table/extensions/Pointer.js +108 -109
- package/src/sap/ui/table/extensions/Scrolling.js +289 -285
- package/src/sap/ui/table/extensions/ScrollingIOS.js +50 -50
- package/src/sap/ui/table/extensions/Synchronization.js +32 -32
- package/src/sap/ui/table/library.js +12 -12
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +9 -9
- package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +35 -37
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +23 -23
- package/src/sap/ui/table/messagebundle_sh.properties +9 -9
- package/src/sap/ui/table/plugins/BindingSelection.js +26 -25
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +77 -32
- package/src/sap/ui/table/plugins/ODataV4Selection.js +81 -35
- package/src/sap/ui/table/plugins/PluginBase.js +12 -12
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +13 -12
- package/src/sap/ui/table/plugins/SelectionPlugin.js +3 -3
- package/src/sap/ui/table/plugins/V4Aggregation.js +38 -38
- package/src/sap/ui/table/rowmodes/Auto.js +59 -61
- package/src/sap/ui/table/rowmodes/Fixed.js +18 -18
- package/src/sap/ui/table/rowmodes/Interactive.js +42 -44
- package/src/sap/ui/table/rowmodes/RowMode.js +64 -63
- package/src/sap/ui/table/rowmodes/Type.js +1 -1
- package/src/sap/ui/table/rowmodes/Variable.js +4 -4
- package/src/sap/ui/table/rules/Accessibility.support.js +15 -16
- package/src/sap/ui/table/rules/Binding.support.js +11 -11
- package/src/sap/ui/table/rules/ColumnTemplate.support.js +10 -10
- package/src/sap/ui/table/rules/Plugins.support.js +7 -7
- package/src/sap/ui/table/rules/Rows.support.js +29 -29
- package/src/sap/ui/table/rules/TableHelper.support.js +10 -10
- package/src/sap/ui/table/themes/base/library.source.less +2 -0
- package/src/sap/ui/table/utils/TableUtils.js +130 -128
- package/src/sap/ui/table/utils/_BindingUtils.js +7 -7
- package/src/sap/ui/table/utils/_ColumnUtils.js +98 -97
- package/src/sap/ui/table/utils/_GroupingUtils.js +56 -56
- package/src/sap/ui/table/utils/_HookUtils.js +26 -26
- package/src/sap/ui/table/utils/_MenuUtils.js +19 -19
|
@@ -11,7 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
], function(ExtensionBase, TableUtils) {
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const ExtensionDelegate = {
|
|
15
15
|
onAfterRendering: function() {
|
|
16
16
|
this.attachScrollbar();
|
|
17
17
|
}
|
|
@@ -27,12 +27,12 @@ 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.124.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @alias sap.ui.table.extensions.ScrollingIOS
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
const ScrollIOSExtension = ExtensionBase.extend("sap.ui.table.extensions.ScrollingIOS", /** @lends sap.ui.table.extensions.ScrollingIOS.prototype */ {
|
|
36
36
|
/**
|
|
37
37
|
* @override
|
|
38
38
|
* @inheritDoc
|
|
@@ -49,7 +49,7 @@ sap.ui.define([
|
|
|
49
49
|
* @inheritDoc
|
|
50
50
|
*/
|
|
51
51
|
destroy: function() {
|
|
52
|
-
|
|
52
|
+
const oTable = this.getTable();
|
|
53
53
|
|
|
54
54
|
TableUtils.removeDelegate(oTable, ExtensionDelegate);
|
|
55
55
|
clearTimeout(this._iUpdateDefaultScrollbarPositionTimeoutId);
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
* @inheritDoc
|
|
62
62
|
*/
|
|
63
63
|
_attachEvents: function() {
|
|
64
|
-
|
|
64
|
+
const oTable = this.getTable();
|
|
65
65
|
|
|
66
66
|
TableUtils.Hook.register(oTable, TableUtils.Hook.Keys.Table.TotalRowCountChanged, this.onTotalRowCountChanged, this);
|
|
67
67
|
TableUtils.Hook.register(oTable, TableUtils.Hook.Keys.Table.UpdateSizes, this.onUpdateTableSizes, this);
|
|
@@ -72,21 +72,21 @@ sap.ui.define([
|
|
|
72
72
|
* @inheritDoc
|
|
73
73
|
*/
|
|
74
74
|
_detachEvents: function() {
|
|
75
|
-
|
|
75
|
+
const oTable = this.getTable();
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
const oVSb = oTable._getScrollExtension().getVerticalScrollbar();
|
|
78
78
|
if (oVSb) {
|
|
79
79
|
oVSb.removeEventListener("scroll", this._onVerticalScrollEventHandler);
|
|
80
80
|
}
|
|
81
81
|
delete this._onVerticalScrollEventHandler;
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
const oVSbIOS = this.getVerticalScrollbar();
|
|
84
84
|
if (oVSbIOS) {
|
|
85
85
|
oVSbIOS.removeEventListener("pointerdown", this._onPointerDownEventHandler);
|
|
86
86
|
}
|
|
87
87
|
delete this._onPointerDownEventHandler;
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const oVSbThumb = this.getVerticalScrollbarThumb();
|
|
90
90
|
if (oVSbThumb) {
|
|
91
91
|
oVSbThumb.removeEventListener("touchmove", this._onTouchMoveEventHandler);
|
|
92
92
|
}
|
|
@@ -110,10 +110,10 @@ sap.ui.define([
|
|
|
110
110
|
* Inserts the scrollbar into the DOM if it does not yet exist.
|
|
111
111
|
*/
|
|
112
112
|
ScrollIOSExtension.prototype.attachScrollbar = function() {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
const oTable = this.getTable();
|
|
114
|
+
const oVSb = oTable._getScrollExtension().getVerticalScrollbar();
|
|
115
|
+
let oVSbIOS = this.getVerticalScrollbar();
|
|
116
|
+
let oVSbThumb = this.getVerticalScrollbarThumb();
|
|
117
117
|
|
|
118
118
|
if (!oVSb || !oVSb.isConnected) {
|
|
119
119
|
return;
|
|
@@ -151,7 +151,7 @@ sap.ui.define([
|
|
|
151
151
|
* @returns {HTMLElement|null} Returns <code>null</code>, if the vertical scrollbar does not exist.
|
|
152
152
|
*/
|
|
153
153
|
ScrollIOSExtension.prototype.getVerticalScrollbar = function() {
|
|
154
|
-
|
|
154
|
+
const oTable = this.getTable();
|
|
155
155
|
return oTable ? oTable.getDomRef("vsb-ios") : null;
|
|
156
156
|
};
|
|
157
157
|
|
|
@@ -161,7 +161,7 @@ sap.ui.define([
|
|
|
161
161
|
* @returns {HTMLElement|null} Returns <code>null</code>, if the vertical scrollbar thumb does not exist.
|
|
162
162
|
*/
|
|
163
163
|
ScrollIOSExtension.prototype.getVerticalScrollbarThumb = function() {
|
|
164
|
-
|
|
164
|
+
const oVSb = this.getVerticalScrollbar();
|
|
165
165
|
return oVSb ? oVSb.firstElementChild : null;
|
|
166
166
|
};
|
|
167
167
|
|
|
@@ -169,8 +169,8 @@ sap.ui.define([
|
|
|
169
169
|
* Performs a full update of the vertical scrollbar.
|
|
170
170
|
*/
|
|
171
171
|
ScrollIOSExtension.prototype.updateVerticalScrollbar = function() {
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
const oTable = this.getTable();
|
|
173
|
+
const oVSbIOS = this.getVerticalScrollbar();
|
|
174
174
|
|
|
175
175
|
oVSbIOS.style.height = oTable._getScrollExtension().getVerticalScrollbarHeight() + "px";
|
|
176
176
|
oVSbIOS.style.top = Math.max(0, oTable._getRowCounts().fixedTop * oTable._getBaseRowHeight() - 1) + "px";
|
|
@@ -183,7 +183,7 @@ sap.ui.define([
|
|
|
183
183
|
* Updates the position of the vertical scroll thumb
|
|
184
184
|
*/
|
|
185
185
|
ScrollIOSExtension.prototype.updateVerticalScrollbarThumbPosition = function() {
|
|
186
|
-
|
|
186
|
+
const oVSbThumb = this.getVerticalScrollbarThumb();
|
|
187
187
|
|
|
188
188
|
if (oVSbThumb) {
|
|
189
189
|
oVSbThumb.style.top = this.getCalculateThumbOffset() + "px";
|
|
@@ -194,9 +194,9 @@ sap.ui.define([
|
|
|
194
194
|
* Updates the height of the vertical scroll thumb
|
|
195
195
|
*/
|
|
196
196
|
ScrollIOSExtension.prototype.updateVerticalScrollbarThumbHeight = function() {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
const oTable = this.getTable();
|
|
198
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
199
|
+
const oVSbThumb = this.getVerticalScrollbarThumb();
|
|
200
200
|
|
|
201
201
|
if (oVSbThumb) {
|
|
202
202
|
if (oScrollExtension.isVerticalScrollbarRequired()) {
|
|
@@ -213,10 +213,10 @@ sap.ui.define([
|
|
|
213
213
|
* @returns {int} The calculated height of the vertical scroll thumb
|
|
214
214
|
*/
|
|
215
215
|
ScrollIOSExtension.prototype.getCalculateThumbHeight = function() {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
const oTable = this.getTable();
|
|
217
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
218
|
+
const iVerticalScrollbarHeight = oScrollExtension.getVerticalScrollbarHeight();
|
|
219
|
+
const iVerticalScrollHeight = oScrollExtension.getVerticalScrollHeight();
|
|
220
220
|
|
|
221
221
|
return Math.round(Math.pow(iVerticalScrollbarHeight, 2) / iVerticalScrollHeight);
|
|
222
222
|
};
|
|
@@ -227,12 +227,12 @@ sap.ui.define([
|
|
|
227
227
|
* @returns {number} The calculated offset of the vertical scroll thumb
|
|
228
228
|
*/
|
|
229
229
|
ScrollIOSExtension.prototype.getCalculateThumbOffset = function() {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
const oTable = this.getTable();
|
|
231
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
232
|
+
const iVerticalScrollbarHeight = oScrollExtension.getVerticalScrollbarHeight();
|
|
233
|
+
const iVerticalScrollHeight = oScrollExtension.getVerticalScrollHeight();
|
|
234
|
+
const oVSb = oScrollExtension.getVerticalScrollbar();
|
|
235
|
+
const iVerticalScrollTop = oVSb ? oScrollExtension.getVerticalScrollbar().scrollTop : 0;
|
|
236
236
|
|
|
237
237
|
return Math.round(iVerticalScrollTop * iVerticalScrollbarHeight / iVerticalScrollHeight);
|
|
238
238
|
};
|
|
@@ -243,13 +243,13 @@ sap.ui.define([
|
|
|
243
243
|
* @param {jQuery.Event} oEvent The event triggered
|
|
244
244
|
*/
|
|
245
245
|
ScrollIOSExtension.prototype.onTouchMove = function(oEvent) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
246
|
+
const oTable = this.getTable();
|
|
247
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
248
|
+
const oVSbThumb = this.getVerticalScrollbarThumb();
|
|
249
|
+
const iThumbTop = oVSbThumb.getBoundingClientRect().y;
|
|
250
|
+
const iThumbHeight = this.getCalculateThumbHeight();
|
|
251
|
+
const iTop = oVSbThumb.offsetTop + oEvent.touches[0].pageY - iThumbTop - iThumbHeight / 2;
|
|
252
|
+
const iOffset = Math.min(oScrollExtension.getVerticalScrollbarHeight() - iThumbHeight, Math.max(0, iTop));
|
|
253
253
|
|
|
254
254
|
oEvent.preventDefault();
|
|
255
255
|
oEvent.stopPropagation();
|
|
@@ -268,13 +268,13 @@ sap.ui.define([
|
|
|
268
268
|
* @param {jQuery.Event} oEvent The event triggered
|
|
269
269
|
*/
|
|
270
270
|
ScrollIOSExtension.prototype.onPointerDown = function(oEvent) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
271
|
+
const oTable = this.getTable();
|
|
272
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
273
|
+
const oVSbThumb = this.getVerticalScrollbarThumb();
|
|
274
|
+
const iThumbTop = oVSbThumb.getBoundingClientRect().y;
|
|
275
|
+
const iThumbHeight = this.getCalculateThumbHeight();
|
|
276
|
+
const iTop = oVSbThumb.offsetTop + oEvent.clientY - iThumbTop - iThumbHeight / 2;
|
|
277
|
+
const iOffset = Math.min(oScrollExtension.getVerticalScrollbarHeight() - iThumbHeight, Math.max(0, iTop));
|
|
278
278
|
|
|
279
279
|
oEvent.preventDefault();
|
|
280
280
|
oEvent.stopPropagation();
|
|
@@ -290,20 +290,20 @@ sap.ui.define([
|
|
|
290
290
|
* @param {number} iThumbHeight The height of the scroll thumb
|
|
291
291
|
*/
|
|
292
292
|
ScrollIOSExtension.prototype.updateDefaultScrollbarPosition = function(iOffset, iThumbHeight) {
|
|
293
|
-
|
|
293
|
+
const oTable = this.getTable();
|
|
294
294
|
if (!oTable) {
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
299
|
+
const iScrollbarHeight = oScrollExtension.getVerticalScrollbarHeight();
|
|
300
300
|
|
|
301
301
|
if (iOffset + iThumbHeight >= iScrollbarHeight) {
|
|
302
302
|
oScrollExtension.scrollVerticallyMax(true);
|
|
303
303
|
} else {
|
|
304
|
-
|
|
304
|
+
const iScrollTop = iOffset * oScrollExtension.getVerticalScrollHeight() / iScrollbarHeight;
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
const oVSb = oScrollExtension.getVerticalScrollbar();
|
|
307
307
|
oVSb.scrollTop = iScrollTop;
|
|
308
308
|
}
|
|
309
309
|
};
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
/**
|
|
17
17
|
* Provides utility functions.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
const ExtensionHelper = {
|
|
20
20
|
/**
|
|
21
21
|
* Sets the selection state of a row.
|
|
22
22
|
*
|
|
@@ -24,8 +24,8 @@ sap.ui.define([
|
|
|
24
24
|
* @param {boolean} bSelected Whether the row should be selected.
|
|
25
25
|
*/
|
|
26
26
|
setRowSelection: function(iIndex, bSelected) {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const oTable = this.getTable();
|
|
28
|
+
const oRow = oTable.getRows()[iIndex];
|
|
29
29
|
|
|
30
30
|
if (oRow && bSelected != null) {
|
|
31
31
|
TableUtils.toggleRowSelection(oTable, oRow, bSelected);
|
|
@@ -39,8 +39,8 @@ sap.ui.define([
|
|
|
39
39
|
* @param {boolean} bHovered Whether the row should be hovered.
|
|
40
40
|
*/
|
|
41
41
|
setRowHover: function(iIndex, bHovered) {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const oTable = this.getTable();
|
|
43
|
+
const oRow = oTable.getRows()[iIndex];
|
|
44
44
|
|
|
45
45
|
if (oRow && bHovered != null) {
|
|
46
46
|
oRow._setHovered(bHovered);
|
|
@@ -48,10 +48,10 @@ sap.ui.define([
|
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
addVerticalScrollingListener: function(mConfig) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
const oTable = this.getTable();
|
|
52
|
+
const oSyncExtension = oTable._getSyncExtension();
|
|
53
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
54
|
+
const mOptions = {scrollDirection: oScrollExtension.constructor.ScrollDirection.VERTICAL};
|
|
55
55
|
|
|
56
56
|
ExtensionHelper.removeVerticalScrollingListener.call(this);
|
|
57
57
|
|
|
@@ -71,14 +71,14 @@ sap.ui.define([
|
|
|
71
71
|
},
|
|
72
72
|
|
|
73
73
|
removeVerticalScrollingListener: function() {
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
const oTable = this.getTable();
|
|
75
|
+
const oSyncExtension = oTable._getSyncExtension();
|
|
76
76
|
|
|
77
77
|
function removeEventListener(aTargets, mEventListenerMap) {
|
|
78
|
-
for (
|
|
79
|
-
|
|
78
|
+
for (const sEventName in mEventListenerMap) {
|
|
79
|
+
const fnListener = mEventListenerMap[sEventName];
|
|
80
80
|
if (fnListener) {
|
|
81
|
-
for (
|
|
81
|
+
for (let i = 0; i < aTargets.length; i++) {
|
|
82
82
|
aTargets[i].removeEventListener(sEventName, fnListener);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -97,21 +97,21 @@ sap.ui.define([
|
|
|
97
97
|
},
|
|
98
98
|
|
|
99
99
|
placeVerticalScrollbarAt: function(oHTMLElement) {
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
const oTable = this.getTable();
|
|
101
|
+
const oScrollExtension = oTable._getScrollExtension();
|
|
102
102
|
|
|
103
103
|
if (!oHTMLElement) {
|
|
104
104
|
throw new Error("The HTMLElement in which the vertical scrollbar should be placed must be specified.");
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (!oScrollExtension.isVerticalScrollbarExternal()) {
|
|
108
|
-
|
|
108
|
+
const oRenderManager = new RenderManager().getInterface();
|
|
109
109
|
oTable.getRenderer().renderVSbExternal(oRenderManager, oTable);
|
|
110
110
|
oRenderManager.flush(oHTMLElement);
|
|
111
111
|
|
|
112
112
|
// Notify ScrollExtension and table that the vertical scrollbar is now rendered outside the table.
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
const sId = oTable.getId() + "-" + library.SharedDomRef.VerticalScrollBar;
|
|
114
|
+
const oExternalVerticalScrollbar = oHTMLElement.querySelector('[id="' + sId + '"]');
|
|
115
115
|
oScrollExtension.markVerticalScrollbarAsExternal(oExternalVerticalScrollbar);
|
|
116
116
|
|
|
117
117
|
// Rendering the vertical scrollbar outside the table makes it necessary to remove the currently existing internal scrollbar from the
|
|
@@ -127,7 +127,7 @@ sap.ui.define([
|
|
|
127
127
|
},
|
|
128
128
|
|
|
129
129
|
renderHorizontalScrollbar: function(oRM, sId, iScrollWidth) {
|
|
130
|
-
|
|
130
|
+
const oTable = this.getTable();
|
|
131
131
|
|
|
132
132
|
if (sId == null) {
|
|
133
133
|
throw new Error("The id must be specified.");
|
|
@@ -137,11 +137,11 @@ sap.ui.define([
|
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
const ExtensionDelegate = {
|
|
141
141
|
onBeforeRendering: function(oEvent) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
const oSyncExtension = this._getSyncExtension();
|
|
143
|
+
const bRenderedRows = oEvent && oEvent.isMarked("renderRows");
|
|
144
|
+
const oContentDomRef = this.getDomRef("tableCCnt");
|
|
145
145
|
|
|
146
146
|
if (!bRenderedRows && oContentDomRef && oSyncExtension._onTableContainerScrollEventHandler) {
|
|
147
147
|
oContentDomRef.removeEventListener("scroll", oSyncExtension._onTableContainerScrollEventHandler);
|
|
@@ -150,9 +150,9 @@ sap.ui.define([
|
|
|
150
150
|
},
|
|
151
151
|
|
|
152
152
|
onAfterRendering: function(oEvent) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
const oScrollExtension = this._getScrollExtension();
|
|
154
|
+
const bRenderedRows = oEvent && oEvent.isMarked("renderRows");
|
|
155
|
+
const oContentDomRef = this.getDomRef("tableCCnt");
|
|
156
156
|
|
|
157
157
|
// On a full re-rendering of the table, the newly rendered scrollbar would have the correct attributes already. The external
|
|
158
158
|
// scrollbar is independent from the tables rendering and therefore needs to be updated after rendering.
|
|
@@ -162,7 +162,7 @@ sap.ui.define([
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
if (!bRenderedRows) {
|
|
165
|
-
|
|
165
|
+
const oSyncExtension = this._getSyncExtension();
|
|
166
166
|
|
|
167
167
|
oSyncExtension.syncInnerVerticalScrollPosition(oContentDomRef.scrollTop);
|
|
168
168
|
|
|
@@ -185,12 +185,12 @@ 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.124.0
|
|
189
189
|
* @constructor
|
|
190
190
|
* @private
|
|
191
191
|
* @alias sap.ui.table.extensions.Synchronization
|
|
192
192
|
*/
|
|
193
|
-
|
|
193
|
+
const SyncExtension = ExtensionBase.extend("sap.ui.table.extensions.Synchronization",
|
|
194
194
|
/** @lends sap.ui.table.extensions.Synchronization.prototype */ {
|
|
195
195
|
/**
|
|
196
196
|
* @override
|
|
@@ -218,7 +218,7 @@ sap.ui.define([
|
|
|
218
218
|
* @inheritDoc
|
|
219
219
|
*/
|
|
220
220
|
destroy: function() {
|
|
221
|
-
|
|
221
|
+
const oTable = this.getTable();
|
|
222
222
|
|
|
223
223
|
if (oTable) {
|
|
224
224
|
oTable.removeEventDelegate(this._delegate);
|
|
@@ -298,7 +298,7 @@ sap.ui.define([
|
|
|
298
298
|
* @private
|
|
299
299
|
*/
|
|
300
300
|
SyncExtension.prototype.callInterfaceHook = function(sHook, oArguments) {
|
|
301
|
-
|
|
301
|
+
const oCall = {};
|
|
302
302
|
oCall[sHook] = Array.prototype.slice.call(oArguments);
|
|
303
303
|
Log.debug("sap.ui.table.extensions.Synchronization", "Sync " + sHook + "(" + oCall[sHook] + ")", this.getTable());
|
|
304
304
|
return TableUtils.dynamicCall(this._oPublicInterface, oCall);
|
|
@@ -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.124.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.124.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.124.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.124.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.124.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.124.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.124.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.124.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.124.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.124.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.124.0
|
|
418
418
|
* @enum {string}
|
|
419
419
|
* @private
|
|
420
420
|
*/
|
|
@@ -17,8 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const oAdapterRegistry = new window.Map();
|
|
21
|
+
const mAdapterMapping = {
|
|
22
22
|
/**
|
|
23
23
|
* @deprecated As of Version 1.117
|
|
24
24
|
*/
|
|
@@ -35,11 +35,11 @@ sap.ui.define([
|
|
|
35
35
|
*
|
|
36
36
|
* @extends sap.ui.base.Object
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.124.0
|
|
39
39
|
* @private
|
|
40
40
|
* @alias sap.ui.table.menus.ColumnHeaderMenuAdapter
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
const ColumnHeaderMenuAdapter = BaseObject.extend("sap.ui.table.menus.ColumnHeaderMenuAdapter", /** @lends sap.ui.table.menus.ColumnHeaderMenuAdapter.prototype */ {
|
|
43
43
|
constructor: function() {
|
|
44
44
|
BaseObject.apply(this, arguments);
|
|
45
45
|
|
|
@@ -65,9 +65,9 @@ sap.ui.define([
|
|
|
65
65
|
* @returns {Promise} A promise that resolves once the adapter is activated and the menu items are modified
|
|
66
66
|
*/
|
|
67
67
|
ColumnHeaderMenuAdapter.activateFor = function(oColumn) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const oColumnHeaderMenu = oColumn.getHeaderMenuInstance();
|
|
69
|
+
const sAdapterName = getAdapterName(oColumnHeaderMenu);
|
|
70
|
+
let mRegistryData;
|
|
71
71
|
|
|
72
72
|
if (!sAdapterName || !oColumn._getTable()) {
|
|
73
73
|
return Promise.resolve();
|
|
@@ -188,7 +188,7 @@ sap.ui.define([
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
function getAdapterName(oColumnHeaderMenu) {
|
|
191
|
-
for (
|
|
191
|
+
for (const sMenuType in mAdapterMapping) {
|
|
192
192
|
if (TableUtils.isA(oColumnHeaderMenu, sMenuType)) {
|
|
193
193
|
return mAdapterMapping[sMenuType];
|
|
194
194
|
}
|
|
@@ -198,7 +198,7 @@ sap.ui.define([
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
function unlink(oColumn, sAdapterName) {
|
|
201
|
-
|
|
201
|
+
let mRegistryData;
|
|
202
202
|
|
|
203
203
|
if (sAdapterName) {
|
|
204
204
|
mRegistryData = oAdapterRegistry.get(sAdapterName);
|