@openui5/sap.ui.table 1.112.2 → 1.114.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/THIRDPARTY.txt +1 -1
- 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 +1 -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 +2 -2
- 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 +60 -54
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +8 -8
- package/src/sap/ui/table/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +22 -19
- package/src/sap/ui/table/extensions/AccessibilityRender.js +3 -14
- package/src/sap/ui/table/extensions/DragAndDrop.js +1 -1
- package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
- package/src/sap/ui/table/extensions/Keyboard.js +1 -1
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +83 -50
- package/src/sap/ui/table/extensions/Pointer.js +7 -33
- 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 +2 -2
- package/src/sap/ui/table/library.js +48 -17
- 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 +6 -6
- package/src/sap/ui/table/messagebundle_da.properties +1 -1
- package/src/sap/ui/table/plugins/BindingSelection.js +61 -19
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +33 -21
- package/src/sap/ui/table/plugins/ODataV4Selection.js +490 -0
- package/src/sap/ui/table/plugins/PluginBase.js +1 -1
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +71 -24
- package/src/sap/ui/table/plugins/SelectionPlugin.js +47 -160
- package/src/sap/ui/table/plugins/V4Aggregation.js +8 -6
- package/src/sap/ui/table/rowmodes/AutoRowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/FixedRowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/InteractiveRowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/RowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/VariableRowMode.js +1 -1
- package/src/sap/ui/table/rules/Accessibility.support.js +2 -2
- package/src/sap/ui/table/utils/TableUtils.js +21 -64
- 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 +2 -2
- package/src/sap/ui/table/utils/_HookUtils.js +1 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +1 -1
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
"sap/ui/model/SelectionModel",
|
|
8
|
+
"./SelectionPlugin",
|
|
9
9
|
"../utils/TableUtils",
|
|
10
|
-
|
|
10
|
+
"../library"
|
|
11
11
|
], function(
|
|
12
12
|
SelectionModel,
|
|
13
13
|
SelectionPlugin,
|
|
@@ -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.114.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @alias sap.ui.table.plugins.SelectionModelSelection
|
|
@@ -31,6 +31,9 @@ sap.ui.define([
|
|
|
31
31
|
var SelectionModelSelection = SelectionPlugin.extend("sap.ui.table.plugins.SelectionModelSelection", {
|
|
32
32
|
metadata: {
|
|
33
33
|
library: "sap.ui.table",
|
|
34
|
+
properties: {
|
|
35
|
+
selectionMode: {type: "sap.ui.table.SelectionMode", group: "Behavior", defaultValue: SelectionMode.MultiToggle}
|
|
36
|
+
},
|
|
34
37
|
events: {
|
|
35
38
|
/**
|
|
36
39
|
* This event is fired when the selection is changed.
|
|
@@ -57,7 +60,7 @@ sap.ui.define([
|
|
|
57
60
|
*/
|
|
58
61
|
SelectionModelSelection.prototype.init = function() {
|
|
59
62
|
SelectionPlugin.prototype.init.apply(this, arguments);
|
|
60
|
-
this.oSelectionModel = new SelectionModel(this.
|
|
63
|
+
this.oSelectionModel = new SelectionModel(getSelectionModelSelectionMode(this.getSelectionMode()));
|
|
61
64
|
};
|
|
62
65
|
|
|
63
66
|
/**
|
|
@@ -93,6 +96,28 @@ sap.ui.define([
|
|
|
93
96
|
TableUtils.Hook.deregister(oTable, TableUtils.Hook.Keys.Table.TotalRowCountChanged, onTotalRowCountChanged, this);
|
|
94
97
|
};
|
|
95
98
|
|
|
99
|
+
SelectionModelSelection.prototype.setSelected = function(oRow, bSelected, mConfig) {
|
|
100
|
+
if (!this.isIndexSelectable(oRow.getIndex())) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (mConfig && mConfig.range) {
|
|
105
|
+
var iLastSelectedIndex = this.getSelectedIndex();
|
|
106
|
+
|
|
107
|
+
if (iLastSelectedIndex >= 0) {
|
|
108
|
+
this.addSelectionInterval(iLastSelectedIndex, oRow.getIndex());
|
|
109
|
+
}
|
|
110
|
+
} else if (bSelected) {
|
|
111
|
+
this.addSelectionInterval(oRow.getIndex(), oRow.getIndex());
|
|
112
|
+
} else {
|
|
113
|
+
this.removeSelectionInterval(oRow.getIndex(), oRow.getIndex());
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
SelectionModelSelection.prototype.isSelected = function(oRow) {
|
|
118
|
+
return this.isIndexSelected(oRow.getIndex());
|
|
119
|
+
};
|
|
120
|
+
|
|
96
121
|
/**
|
|
97
122
|
* @inheritDoc
|
|
98
123
|
*/
|
|
@@ -100,11 +125,28 @@ sap.ui.define([
|
|
|
100
125
|
return {
|
|
101
126
|
headerSelector: {
|
|
102
127
|
type: "toggle",
|
|
103
|
-
visible: TableUtils.hasSelectAll(this.getTable())
|
|
128
|
+
visible: TableUtils.hasSelectAll(this.getTable()),
|
|
129
|
+
selected: this.getSelectableCount() > 0 && this.getSelectableCount() === this.getSelectedCount()
|
|
104
130
|
}
|
|
105
131
|
};
|
|
106
132
|
};
|
|
107
133
|
|
|
134
|
+
function toggleSelectAll(oPlugin) {
|
|
135
|
+
var oTable = oPlugin.getTable();
|
|
136
|
+
|
|
137
|
+
// in order to fire the rowSelectionChanged event, the SourceRowIndex mus be set to -1
|
|
138
|
+
// to indicate that the selection was changed by user interaction
|
|
139
|
+
if (oPlugin.getSelectableCount() > oPlugin.getSelectedCount()) {
|
|
140
|
+
oTable._iSourceRowIndex = 0;
|
|
141
|
+
oPlugin.selectAll();
|
|
142
|
+
} else {
|
|
143
|
+
oTable._iSourceRowIndex = -1;
|
|
144
|
+
oPlugin.clearSelection();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
oTable._iSourceRowIndex = undefined;
|
|
148
|
+
}
|
|
149
|
+
|
|
108
150
|
/**
|
|
109
151
|
* This hook is called by the table when the header selector is pressed.
|
|
110
152
|
*
|
|
@@ -112,7 +154,7 @@ sap.ui.define([
|
|
|
112
154
|
*/
|
|
113
155
|
SelectionModelSelection.prototype.onHeaderSelectorPress = function() {
|
|
114
156
|
if (this.getRenderConfig().headerSelector.visible) {
|
|
115
|
-
this
|
|
157
|
+
toggleSelectAll(this);
|
|
116
158
|
}
|
|
117
159
|
};
|
|
118
160
|
|
|
@@ -124,7 +166,7 @@ sap.ui.define([
|
|
|
124
166
|
*/
|
|
125
167
|
SelectionModelSelection.prototype.onKeyboardShortcut = function(sType) {
|
|
126
168
|
if (sType === "toggle") {
|
|
127
|
-
this
|
|
169
|
+
toggleSelectAll(this);
|
|
128
170
|
} else if (sType === "clear") {
|
|
129
171
|
this.clearSelection();
|
|
130
172
|
}
|
|
@@ -135,7 +177,7 @@ sap.ui.define([
|
|
|
135
177
|
* @inheritDoc
|
|
136
178
|
*/
|
|
137
179
|
SelectionModelSelection.prototype.addSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
138
|
-
if (!this.oSelectionModel || this.
|
|
180
|
+
if (!this.oSelectionModel || this.getSelectionMode() === SelectionMode.None) {
|
|
139
181
|
return;
|
|
140
182
|
}
|
|
141
183
|
this.oSelectionModel.addSelectionInterval(iIndexFrom, iIndexTo);
|
|
@@ -221,7 +263,7 @@ sap.ui.define([
|
|
|
221
263
|
* @inheritDoc
|
|
222
264
|
*/
|
|
223
265
|
SelectionModelSelection.prototype.selectAll = function() {
|
|
224
|
-
if (!this.oSelectionModel || this.
|
|
266
|
+
if (!this.oSelectionModel || this.getSelectionMode() !== SelectionMode.MultiToggle) {
|
|
225
267
|
return;
|
|
226
268
|
}
|
|
227
269
|
this.oSelectionModel.selectAll(this._getHighestSelectableIndex());
|
|
@@ -232,7 +274,7 @@ sap.ui.define([
|
|
|
232
274
|
* @inheritDoc
|
|
233
275
|
*/
|
|
234
276
|
SelectionModelSelection.prototype.setSelectedIndex = function(iIndex) {
|
|
235
|
-
if (this.
|
|
277
|
+
if (this.getSelectionMode() === SelectionMode.None) {
|
|
236
278
|
return;
|
|
237
279
|
}
|
|
238
280
|
if (iIndex === -1) {
|
|
@@ -248,7 +290,7 @@ sap.ui.define([
|
|
|
248
290
|
* @inheritDoc
|
|
249
291
|
*/
|
|
250
292
|
SelectionModelSelection.prototype.setSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
251
|
-
if (!this.oSelectionModel || this.
|
|
293
|
+
if (!this.oSelectionModel || this.getSelectionMode() === SelectionMode.None) {
|
|
252
294
|
return;
|
|
253
295
|
}
|
|
254
296
|
this.oSelectionModel.setSelectionInterval(iIndexFrom, iIndexTo);
|
|
@@ -262,22 +304,25 @@ sap.ui.define([
|
|
|
262
304
|
* @public
|
|
263
305
|
*/
|
|
264
306
|
SelectionModelSelection.prototype.setSelectionMode = function(sSelectionMode) {
|
|
265
|
-
var sOldSelectionMode = this.
|
|
307
|
+
var sOldSelectionMode = this.getSelectionMode();
|
|
266
308
|
|
|
267
|
-
|
|
309
|
+
this.setProperty("selectionMode", sSelectionMode);
|
|
268
310
|
|
|
269
|
-
if (this.
|
|
311
|
+
if (this.getSelectionMode() !== sOldSelectionMode) {
|
|
270
312
|
this.clearSelection();
|
|
271
313
|
}
|
|
272
314
|
|
|
273
315
|
if (this.oSelectionModel) {
|
|
274
|
-
|
|
275
|
-
this.oSelectionModel.setSelectionMode(iSelectionMode);
|
|
316
|
+
this.oSelectionModel.setSelectionMode(getSelectionModelSelectionMode(this.getSelectionMode()));
|
|
276
317
|
}
|
|
277
318
|
|
|
278
319
|
return this;
|
|
279
320
|
};
|
|
280
321
|
|
|
322
|
+
function getSelectionModelSelectionMode(sSelectionMode) {
|
|
323
|
+
return sSelectionMode === SelectionMode.MultiToggle ? SelectionModel.MULTI_SELECTION : SelectionModel.SINGLE_SELECTION;
|
|
324
|
+
}
|
|
325
|
+
|
|
281
326
|
/**
|
|
282
327
|
* Returns the highest index that can be selected. Returns -1 if there is nothing to select.
|
|
283
328
|
*
|
|
@@ -302,20 +347,22 @@ sap.ui.define([
|
|
|
302
347
|
*/
|
|
303
348
|
SelectionModelSelection.prototype.onTableUnbindRows = function() {
|
|
304
349
|
SelectionPlugin.prototype.onTableUnbindRows.apply(this, arguments);
|
|
305
|
-
this.
|
|
350
|
+
this._bSuppressSelectionChangeEvent = true;
|
|
306
351
|
this.clearSelection();
|
|
307
|
-
this.
|
|
352
|
+
delete this._bSuppressSelectionChangeEvent;
|
|
308
353
|
};
|
|
309
354
|
|
|
310
355
|
function onSelectionChange(oEvent) {
|
|
311
356
|
var aRowIndices = oEvent.getParameter("rowIndices");
|
|
312
357
|
var bSelectAll = oEvent.getParameter("selectAll");
|
|
313
358
|
|
|
314
|
-
this.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
359
|
+
if (!this._bSuppressSelectionChangeEvent) {
|
|
360
|
+
this.fireSelectionChange({
|
|
361
|
+
rowIndices: aRowIndices,
|
|
362
|
+
selectAll: bSelectAll,
|
|
363
|
+
_internalTrigger: this._bInternalTrigger
|
|
364
|
+
});
|
|
365
|
+
}
|
|
319
366
|
}
|
|
320
367
|
|
|
321
368
|
function attachToBinding(oPlugin, oBinding) {
|
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/core/Element",
|
|
8
|
-
"./PluginBase"
|
|
9
|
-
"../library"
|
|
8
|
+
"./PluginBase"
|
|
10
9
|
], function(
|
|
11
10
|
Element,
|
|
12
|
-
PluginBase
|
|
13
|
-
library
|
|
11
|
+
PluginBase
|
|
14
12
|
) {
|
|
15
13
|
|
|
16
14
|
"use strict";
|
|
17
15
|
|
|
18
|
-
var SelectionMode = library.SelectionMode;
|
|
19
|
-
|
|
20
16
|
/**
|
|
21
17
|
* Constructs an instance of sap.ui.table.plugins.SelectionPlugin
|
|
22
18
|
*
|
|
@@ -29,7 +25,7 @@ sap.ui.define([
|
|
|
29
25
|
* @class Implements the selection methods for a table.
|
|
30
26
|
* @extends sap.ui.core.Element
|
|
31
27
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
28
|
+
* @version 1.114.0
|
|
33
29
|
* @public
|
|
34
30
|
* @since 1.64
|
|
35
31
|
* @experimental As of version 1.64
|
|
@@ -40,10 +36,9 @@ sap.ui.define([
|
|
|
40
36
|
library: "sap.ui.table",
|
|
41
37
|
properties: {
|
|
42
38
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @private
|
|
39
|
+
* Indicates whether this plugin is enabled.
|
|
45
40
|
*/
|
|
46
|
-
|
|
41
|
+
enabled: {type: "boolean", defaultValue: true} // TODO: Should be in PluginBase, which is still private for the time being
|
|
47
42
|
},
|
|
48
43
|
events: {
|
|
49
44
|
/**
|
|
@@ -63,195 +58,87 @@ sap.ui.define([
|
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
SelectionPlugin.prototype.init = function() {
|
|
70
|
-
PluginBase.prototype.init.apply(this, arguments);
|
|
71
|
-
this._bSuspended = false;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
SelectionPlugin.prototype.getRenderConfig = function() {
|
|
75
|
-
return {
|
|
76
|
-
headerSelector: {
|
|
77
|
-
type: "none"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
};
|
|
61
|
+
SelectionPlugin.prototype.setEnabled = function(bEnabled) {
|
|
62
|
+
this.setProperty("enabled", bEnabled, true);
|
|
81
63
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
* @private
|
|
88
|
-
* @abstract
|
|
89
|
-
*/
|
|
90
|
-
SelectionPlugin.prototype.addSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Removes the complete selection.
|
|
95
|
-
*
|
|
96
|
-
* @private
|
|
97
|
-
* @abstract
|
|
98
|
-
*/
|
|
99
|
-
SelectionPlugin.prototype.clearSelection = function() {
|
|
100
|
-
};
|
|
64
|
+
if (this.getEnabled()) {
|
|
65
|
+
this.activate();
|
|
66
|
+
} else {
|
|
67
|
+
this.deactivate();
|
|
68
|
+
}
|
|
101
69
|
|
|
102
|
-
|
|
103
|
-
* Retrieves the lead selection index.
|
|
104
|
-
*
|
|
105
|
-
* @returns {int}
|
|
106
|
-
* @private
|
|
107
|
-
* @abstract
|
|
108
|
-
*/
|
|
109
|
-
SelectionPlugin.prototype.getSelectedIndex = function() {
|
|
110
|
-
return -1;
|
|
70
|
+
return this;
|
|
111
71
|
};
|
|
112
72
|
|
|
113
73
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* @returns {int[]} An array containing all selected indices
|
|
117
|
-
* @private
|
|
118
|
-
* @abstract
|
|
119
|
-
*/
|
|
120
|
-
SelectionPlugin.prototype.getSelectedIndices = function() {
|
|
121
|
-
return [];
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Returns the number of items that can be selected.
|
|
74
|
+
* TODO: Historically grown and hard to understand possible combinations of settings. Refactor!
|
|
126
75
|
*
|
|
127
|
-
* @returns {
|
|
76
|
+
* @returns {{headerSelector: {type: string, bla: blub}}}
|
|
128
77
|
* @private
|
|
129
|
-
* @abstract
|
|
130
78
|
*/
|
|
131
|
-
SelectionPlugin.prototype.
|
|
132
|
-
return
|
|
79
|
+
SelectionPlugin.prototype.getRenderConfig = function() {
|
|
80
|
+
return {
|
|
81
|
+
headerSelector: {
|
|
82
|
+
type: "none"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
133
85
|
};
|
|
134
86
|
|
|
135
87
|
/**
|
|
136
|
-
*
|
|
88
|
+
* This hook is called when the header selector is pressed.
|
|
89
|
+
* TODO: Also provide the event object?
|
|
137
90
|
*
|
|
138
|
-
* @returns {int} Number of selected items
|
|
139
91
|
* @private
|
|
140
|
-
* @abstract
|
|
141
92
|
*/
|
|
142
|
-
SelectionPlugin.prototype.
|
|
143
|
-
return 0;
|
|
144
|
-
};
|
|
93
|
+
SelectionPlugin.prototype.onHeaderSelectorPress = function() {};
|
|
145
94
|
|
|
146
95
|
/**
|
|
147
|
-
*
|
|
96
|
+
* This hook is called when a keyboard shortcut relevant for selection is pressed.
|
|
97
|
+
* TODO: Document parameter to that possible values are clear
|
|
98
|
+
* TODO: Also provide the event object?
|
|
148
99
|
*
|
|
149
|
-
* @param {
|
|
150
|
-
* @returns {boolean} <code>true</code> if the index is selectable, <code>false</code> otherwise
|
|
100
|
+
* @param {string} sType Type of the keyboard shortcut.
|
|
151
101
|
* @private
|
|
152
|
-
* @abstract
|
|
153
102
|
*/
|
|
154
|
-
SelectionPlugin.prototype.
|
|
155
|
-
return false;
|
|
156
|
-
};
|
|
103
|
+
SelectionPlugin.prototype.onKeyboardShortcut = function(sType) {};
|
|
157
104
|
|
|
158
105
|
/**
|
|
159
|
-
*
|
|
106
|
+
* Changes the selection state of a row.
|
|
160
107
|
*
|
|
161
|
-
* @param {
|
|
162
|
-
* @
|
|
163
|
-
* @
|
|
108
|
+
* @param {sap.ui.table.Row} oRow Instance of the row
|
|
109
|
+
* @param {boolean} bSelected The new selection state
|
|
110
|
+
* @param {object} [mConfig]
|
|
111
|
+
* @param {boolean} [mConfig.range=false]
|
|
112
|
+
* Whether to change the selection of the range from the last changed row to this one. The table's preferred selection status of the range is
|
|
113
|
+
* indicated with the <code>bSelected</code> parameter, but the plugin may decide otherwise.
|
|
164
114
|
* @abstract
|
|
165
|
-
*/
|
|
166
|
-
SelectionPlugin.prototype.isIndexSelected = function(iIndex) {
|
|
167
|
-
return false;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Removes the given selection interval from the selection. In case of a single selection, only <code>iIndexTo</code> is removed from the selection.
|
|
172
|
-
*
|
|
173
|
-
* @param {int} iIndexFrom Index from which the deselection starts
|
|
174
|
-
* @param {int} iIndexTo Index up to which to deselect
|
|
175
115
|
* @private
|
|
176
|
-
* @abstract
|
|
177
116
|
*/
|
|
178
|
-
SelectionPlugin.prototype.
|
|
117
|
+
SelectionPlugin.prototype.setSelected = function(oRow, bSelected, mConfig) {
|
|
118
|
+
throw new Error(this + " does not implement #setSelected");
|
|
179
119
|
};
|
|
180
120
|
|
|
181
121
|
/**
|
|
182
|
-
*
|
|
122
|
+
* Checks whether a row is selected.
|
|
183
123
|
*
|
|
184
|
-
* @
|
|
124
|
+
* @param {sap.ui.table.Row} oRow Instance of the row
|
|
125
|
+
* @returns {boolean} Whether the row is selected
|
|
185
126
|
* @abstract
|
|
186
|
-
*/
|
|
187
|
-
SelectionPlugin.prototype.selectAll = function() {
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Sets the selected index.
|
|
192
|
-
*
|
|
193
|
-
* @param {int} iIndex The index which is selected (if existing)
|
|
194
127
|
* @private
|
|
195
|
-
* @abstract
|
|
196
128
|
*/
|
|
197
|
-
SelectionPlugin.prototype.
|
|
129
|
+
SelectionPlugin.prototype.isSelected = function(oRow) {
|
|
130
|
+
throw new Error(this + " does not implement #isSelected");
|
|
198
131
|
};
|
|
199
132
|
|
|
200
133
|
/**
|
|
201
|
-
*
|
|
134
|
+
* Returns the number of selected rows.
|
|
202
135
|
*
|
|
203
|
-
* @
|
|
204
|
-
* @param {int} iIndexTo Index up to which to select
|
|
205
|
-
* @private
|
|
136
|
+
* @returns {int} The number of selected rows
|
|
206
137
|
* @abstract
|
|
207
|
-
*/
|
|
208
|
-
SelectionPlugin.prototype.setSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
SelectionPlugin.prototype.fireSelectionChange = function(mArguments) {
|
|
212
|
-
if (!this._isSuspended()) {
|
|
213
|
-
this.fireEvent("selectionChange", mArguments);
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
SelectionPlugin.prototype._setSelectionMode = function(sSelectionMode) {
|
|
218
|
-
this.setProperty("selectionMode", sSelectionMode);
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
SelectionPlugin.prototype._getSelectionMode = function() {
|
|
222
|
-
return this.getProperty("selectionMode");
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Suspends the selectionChange event
|
|
227
|
-
*
|
|
228
|
-
* When _bSuspended is true, the selectionChange event is not being fired.
|
|
229
|
-
*
|
|
230
|
-
* @private
|
|
231
|
-
*/
|
|
232
|
-
SelectionPlugin.prototype._suspend = function() {
|
|
233
|
-
this._bSuspended = true;
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Resumes the selectionChange event
|
|
238
|
-
*
|
|
239
|
-
* When _bSuspended is false, the selectionChange event is being fired
|
|
240
|
-
*
|
|
241
138
|
* @private
|
|
242
139
|
*/
|
|
243
|
-
SelectionPlugin.prototype.
|
|
244
|
-
this
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Checks if the selectionChange event is suspended.
|
|
249
|
-
*
|
|
250
|
-
* @return {boolean}
|
|
251
|
-
* @private
|
|
252
|
-
*/
|
|
253
|
-
SelectionPlugin.prototype._isSuspended = function() {
|
|
254
|
-
return this._bSuspended;
|
|
140
|
+
SelectionPlugin.prototype.getSelectedCount = function() {
|
|
141
|
+
throw new Error(this + " does not implement #getSelectedCount");
|
|
255
142
|
};
|
|
256
143
|
|
|
257
144
|
return SelectionPlugin;
|
|
@@ -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.114.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.76
|
|
38
38
|
* @experimental
|
|
@@ -360,11 +360,13 @@ sap.ui.define([
|
|
|
360
360
|
this._aGroupLevels = [];
|
|
361
361
|
if (oAggregateInfo.groupLevels) {
|
|
362
362
|
oAggregateInfo.groupLevels.forEach(function(sGroupLevelName) {
|
|
363
|
-
var
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
363
|
+
var oGroupedPropertyInfo = this.findPropertyInfo(sGroupLevelName);
|
|
364
|
+
if (oGroupedPropertyInfo) {
|
|
365
|
+
this._aGroupLevels.push({
|
|
366
|
+
property: oGroupedPropertyInfo,
|
|
367
|
+
textProperty: this.findPropertyInfo(oGroupedPropertyInfo.text)
|
|
368
|
+
});
|
|
369
|
+
}
|
|
368
370
|
}.bind(this));
|
|
369
371
|
}
|
|
370
372
|
|
|
@@ -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.114.0
|
|
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.114.0
|
|
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.114.0
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
var InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.InteractiveRowMode", /** @lends sap.ui.table.rowmodes.InteractiveRowMode.prototype */ {
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
var MessageType = CoreLibrary.MessageType;
|
|
16
16
|
|
|
17
17
|
/*
|
|
18
|
-
* Validates whether
|
|
18
|
+
* Validates whether aria-labelledby is correctly set
|
|
19
19
|
*/
|
|
20
20
|
var oAccessibleLabel = SupportHelper.normalizeRule({
|
|
21
21
|
id: "AccessibleLabel",
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
categories: [Categories.Accessibility],
|
|
24
24
|
title: "Accessible Label",
|
|
25
25
|
description: "Checks whether 'sap.ui.table.Table' controls have an accessible label.",
|
|
26
|
-
resolution: "Use the '
|
|
26
|
+
resolution: "Use the 'ariaLabelledBy' association of the 'sap.ui.table.Table' control "
|
|
27
27
|
+ "to define a proper accessible labeling.",
|
|
28
28
|
check: function(oIssueManager, oCoreFacade, oScope) {
|
|
29
29
|
var aTables = SupportHelper.find(oScope, true, "sap.ui.table.Table");
|