@openui5/sap.ui.table 1.117.1 → 1.119.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 +2 -2
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +27 -25
- package/src/sap/ui/table/AnalyticalColumnMenu.js +6 -6
- package/src/sap/ui/table/AnalyticalTable.js +26 -9
- package/src/sap/ui/table/Column.js +22 -8
- 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 +133 -89
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +12 -38
- package/src/sap/ui/table/TreeTable.js +4 -1
- package/src/sap/ui/table/designtime/Table.designtime.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +6 -5
- 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 +1 -1
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +4 -4
- package/src/sap/ui/table/extensions/Pointer.js +6 -6
- 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 +17 -14
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +4 -3
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +4 -1
- package/src/sap/ui/table/messagebundle_bg.properties +7 -7
- package/src/sap/ui/table/messagebundle_da.properties +1 -1
- package/src/sap/ui/table/messagebundle_es.properties +6 -6
- package/src/sap/ui/table/messagebundle_fi.properties +2 -2
- package/src/sap/ui/table/messagebundle_fr.properties +2 -2
- package/src/sap/ui/table/messagebundle_hr.properties +1 -1
- package/src/sap/ui/table/messagebundle_it.properties +8 -8
- package/src/sap/ui/table/messagebundle_kk.properties +1 -1
- package/src/sap/ui/table/messagebundle_no.properties +2 -2
- package/src/sap/ui/table/messagebundle_pl.properties +1 -1
- package/src/sap/ui/table/messagebundle_ru.properties +1 -1
- package/src/sap/ui/table/messagebundle_sv.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 +24 -143
- package/src/sap/ui/table/plugins/ODataV4Selection.js +48 -173
- 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 → Auto.js} +74 -13
- package/src/sap/ui/table/rowmodes/{FixedRowMode.js → Fixed.js} +59 -14
- package/src/sap/ui/table/rowmodes/{InteractiveRowMode.js → Interactive.js} +74 -41
- package/src/sap/ui/table/rowmodes/RowMode.js +45 -33
- package/src/sap/ui/table/rowmodes/Type.js +39 -0
- package/src/sap/ui/table/rowmodes/{VariableRowMode.js → Variable.js} +3 -28
- package/src/sap/ui/table/rules/Rows.support.js +5 -5
- package/src/sap/ui/table/themes/base/Table.less +1 -1
- package/src/sap/ui/table/utils/TableUtils.js +165 -4
- 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 -1
- package/src/sap/ui/table/utils/_HookUtils.js +1 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +32 -56
|
@@ -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.119.0
|
|
43
43
|
* @namespace
|
|
44
44
|
* @alias sap.ui.table.utils._MenuUtils
|
|
45
45
|
* @private
|
|
@@ -68,19 +68,14 @@ sap.ui.define([
|
|
|
68
68
|
* and the column context menu is opened.
|
|
69
69
|
*
|
|
70
70
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
71
|
-
* @param {jQuery
|
|
72
|
-
* @param {jQuery.Event} [oEvent] The event object.
|
|
71
|
+
* @param {jQuery.Event} oEvent The event object.
|
|
73
72
|
* @returns {boolean} Whether a context menu was opened.
|
|
74
73
|
* @see _openColumnContextMenu
|
|
75
74
|
* @see _openContentCellContextMenu
|
|
76
75
|
* @see _applyColumnHeaderCellMenu
|
|
77
76
|
*/
|
|
78
|
-
openContextMenu: function(oTable,
|
|
79
|
-
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var $Cell = MenuUtils.TableUtils.getCell(oTable, oElement);
|
|
77
|
+
openContextMenu: function(oTable, oEvent) {
|
|
78
|
+
var $Cell = MenuUtils.TableUtils.getCell(oTable, oEvent.target);
|
|
84
79
|
var oCell = $Cell ? $Cell[0] : null;
|
|
85
80
|
var oCellInfo = MenuUtils.TableUtils.getCellInfo(oCell);
|
|
86
81
|
var iColumnIndex = oCellInfo.columnIndex;
|
|
@@ -88,9 +83,7 @@ sap.ui.define([
|
|
|
88
83
|
var bExecuteDefault = true;
|
|
89
84
|
|
|
90
85
|
if (oCellInfo.isOfType(MenuUtils.TableUtils.CELLTYPE.COLUMNHEADER)) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
oColumn._openHeaderMenu(oCell);
|
|
86
|
+
oTable.getColumns()[iColumnIndex]._openHeaderMenu(oCell);
|
|
94
87
|
return true;
|
|
95
88
|
|
|
96
89
|
} else if (oCellInfo.isOfType(MenuUtils.TableUtils.CELLTYPE.ANYCONTENTCELL)) {
|
|
@@ -103,6 +96,9 @@ sap.ui.define([
|
|
|
103
96
|
oRowBindingContext = oRow.getBindingContext(oRowBindingInfo.model);
|
|
104
97
|
}
|
|
105
98
|
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated As of version 1.21.0
|
|
101
|
+
*/
|
|
106
102
|
if (iColumnIndex >= 0) {
|
|
107
103
|
bExecuteDefault = oTable.fireCellContextmenu({
|
|
108
104
|
rowIndex: oRow.getIndex(),
|
|
@@ -114,21 +110,26 @@ sap.ui.define([
|
|
|
114
110
|
});
|
|
115
111
|
}
|
|
116
112
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated As of version 1.21.0
|
|
115
|
+
*/
|
|
116
|
+
if (!bExecuteDefault) {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
120
119
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
120
|
+
// fire beforeOpenContextMenu event
|
|
121
|
+
var oRowContextMenu = oTable.getContextMenu();
|
|
124
122
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
columnIndex: oRowColCell.column ? iColumnIndex : null,
|
|
128
|
-
contextMenu: oRowContextMenu
|
|
129
|
-
});
|
|
123
|
+
if (oRowContextMenu && oRowBindingInfo) {
|
|
124
|
+
oRowContextMenu.setBindingContext(oRowBindingContext, oRowBindingInfo.model);
|
|
130
125
|
}
|
|
131
126
|
|
|
127
|
+
bExecuteDefault = oTable.fireBeforeOpenContextMenu({
|
|
128
|
+
rowIndex: oRow.getIndex(),
|
|
129
|
+
columnIndex: oRowColCell.column ? iColumnIndex : null,
|
|
130
|
+
contextMenu: oRowContextMenu
|
|
131
|
+
});
|
|
132
|
+
|
|
132
133
|
if (bExecuteDefault) {
|
|
133
134
|
return MenuUtils._openContentCellContextMenu(oTable, oCell, oEvent);
|
|
134
135
|
} else {
|
|
@@ -147,7 +148,7 @@ sap.ui.define([
|
|
|
147
148
|
*
|
|
148
149
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
149
150
|
* @param {HTMLElement} oCell A content cell.
|
|
150
|
-
* @param {jQuery.Event}
|
|
151
|
+
* @param {jQuery.Event} oEvent The event object.
|
|
151
152
|
* @returns {boolean} Whether a context menu was opened.
|
|
152
153
|
* @private
|
|
153
154
|
* @see _openCustomContentCellContextMenu
|
|
@@ -175,7 +176,7 @@ sap.ui.define([
|
|
|
175
176
|
*
|
|
176
177
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
177
178
|
* @param {HTMLElement} oCell A content cell.
|
|
178
|
-
* @param {jQuery.Event}
|
|
179
|
+
* @param {jQuery.Event} oEvent The event object.
|
|
179
180
|
* @returns {boolean} Whether a context menu was opened.
|
|
180
181
|
* @private
|
|
181
182
|
*/
|
|
@@ -187,16 +188,7 @@ sap.ui.define([
|
|
|
187
188
|
return false;
|
|
188
189
|
}
|
|
189
190
|
|
|
190
|
-
|
|
191
|
-
MenuUtils._closeDefaultContentCellContextMenu(oTable);
|
|
192
|
-
|
|
193
|
-
if (oEvent) {
|
|
194
|
-
oContextMenu.openAsContextMenu(oEvent, oCell);
|
|
195
|
-
} else if (typeof oContextMenu.openBy === "function") {
|
|
196
|
-
oContextMenu.openBy(oCell);
|
|
197
|
-
} else {
|
|
198
|
-
oContextMenu.open(null, oCell, Popup.Dock.BeginTop, Popup.Dock.BeginBottom, oCell);
|
|
199
|
-
}
|
|
191
|
+
oTable.getContextMenu().openAsContextMenu(oEvent, oCell);
|
|
200
192
|
|
|
201
193
|
return true;
|
|
202
194
|
},
|
|
@@ -209,7 +201,7 @@ sap.ui.define([
|
|
|
209
201
|
*
|
|
210
202
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
211
203
|
* @param {HTMLElement} oCell A content cell.
|
|
212
|
-
* @param {jQuery.Event}
|
|
204
|
+
* @param {jQuery.Event} oEvent The event object.
|
|
213
205
|
* @returns {boolean} Whether a context menu was opened.
|
|
214
206
|
* @private
|
|
215
207
|
*/
|
|
@@ -255,13 +247,7 @@ sap.ui.define([
|
|
|
255
247
|
return false;
|
|
256
248
|
}
|
|
257
249
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (oEvent) {
|
|
261
|
-
oTable._oCellContextMenu.openAsContextMenu(oEvent, oCell);
|
|
262
|
-
} else {
|
|
263
|
-
oTable._oCellContextMenu.open(null, oCell, Popup.Dock.BeginTop, Popup.Dock.BeginBottom, oCell);
|
|
264
|
-
}
|
|
250
|
+
oTable._oCellContextMenu.openAsContextMenu(oEvent, oCell);
|
|
265
251
|
|
|
266
252
|
return true;
|
|
267
253
|
},
|
|
@@ -274,7 +260,7 @@ sap.ui.define([
|
|
|
274
260
|
* @see _closeCustomContentCellContextMenu
|
|
275
261
|
* @see _closeDefaultContentCellContextMenu
|
|
276
262
|
*/
|
|
277
|
-
|
|
263
|
+
closeContentCellContextMenu: function(oTable) {
|
|
278
264
|
MenuUtils._closeCustomContentCellContextMenu(oTable);
|
|
279
265
|
MenuUtils._closeDefaultContentCellContextMenu(oTable);
|
|
280
266
|
},
|
|
@@ -286,12 +272,7 @@ sap.ui.define([
|
|
|
286
272
|
* @private
|
|
287
273
|
*/
|
|
288
274
|
_closeCustomContentCellContextMenu: function(oTable) {
|
|
289
|
-
|
|
290
|
-
var bCustomContextMenuOpen = oCustomMenu ? oCustomMenu.bOpen : false;
|
|
291
|
-
|
|
292
|
-
if (bCustomContextMenuOpen) {
|
|
293
|
-
oCustomMenu.close();
|
|
294
|
-
}
|
|
275
|
+
oTable.getContextMenu()?.close?.(); // sap.ui.core.IContextMenu does not contain "close".
|
|
295
276
|
},
|
|
296
277
|
|
|
297
278
|
/**
|
|
@@ -301,12 +282,7 @@ sap.ui.define([
|
|
|
301
282
|
* @private
|
|
302
283
|
*/
|
|
303
284
|
_closeDefaultContentCellContextMenu: function(oTable) {
|
|
304
|
-
|
|
305
|
-
var bDefaultMenuOpen = oDefaultMenu ? oDefaultMenu.bOpen : false;
|
|
306
|
-
|
|
307
|
-
if (bDefaultMenuOpen) {
|
|
308
|
-
oDefaultMenu.close();
|
|
309
|
-
}
|
|
285
|
+
oTable._oCellContextMenu?.close();
|
|
310
286
|
},
|
|
311
287
|
|
|
312
288
|
/**
|