@openui5/sap.ui.table 1.128.0 → 1.129.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 +18 -10
- package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
- package/src/sap/ui/table/AnalyticalTable.js +24 -246
- package/src/sap/ui/table/Column.js +30 -16
- 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 +6 -5
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +0 -7
- 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 +1 -1
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +1 -1
- package/src/sap/ui/table/extensions/Pointer.js +5 -38
- 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 +13 -13
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +3 -3
- package/src/sap/ui/table/menus/GroupHeaderContextMenuAdapter.js +332 -0
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/messagebundle.properties +40 -3
- package/src/sap/ui/table/messagebundle_ar.properties +23 -0
- package/src/sap/ui/table/messagebundle_bg.properties +23 -0
- package/src/sap/ui/table/messagebundle_ca.properties +23 -0
- package/src/sap/ui/table/messagebundle_cnr.properties +23 -0
- package/src/sap/ui/table/messagebundle_cs.properties +23 -0
- package/src/sap/ui/table/messagebundle_cy.properties +23 -0
- package/src/sap/ui/table/messagebundle_da.properties +24 -1
- package/src/sap/ui/table/messagebundle_de.properties +23 -0
- package/src/sap/ui/table/messagebundle_el.properties +23 -0
- package/src/sap/ui/table/messagebundle_en.properties +23 -0
- package/src/sap/ui/table/messagebundle_en_GB.properties +23 -0
- package/src/sap/ui/table/messagebundle_en_US_saprigi.properties +23 -0
- package/src/sap/ui/table/messagebundle_es.properties +23 -0
- package/src/sap/ui/table/messagebundle_es_MX.properties +23 -0
- package/src/sap/ui/table/messagebundle_et.properties +23 -0
- package/src/sap/ui/table/messagebundle_fi.properties +23 -0
- package/src/sap/ui/table/messagebundle_fr.properties +25 -2
- package/src/sap/ui/table/messagebundle_fr_CA.properties +25 -2
- package/src/sap/ui/table/messagebundle_hi.properties +23 -0
- package/src/sap/ui/table/messagebundle_hr.properties +23 -0
- package/src/sap/ui/table/messagebundle_hu.properties +25 -2
- package/src/sap/ui/table/messagebundle_id.properties +25 -2
- package/src/sap/ui/table/messagebundle_it.properties +23 -0
- package/src/sap/ui/table/messagebundle_iw.properties +23 -0
- package/src/sap/ui/table/messagebundle_ja.properties +23 -0
- package/src/sap/ui/table/messagebundle_kk.properties +49 -26
- package/src/sap/ui/table/messagebundle_ko.properties +23 -0
- package/src/sap/ui/table/messagebundle_lt.properties +23 -0
- package/src/sap/ui/table/messagebundle_lv.properties +23 -0
- package/src/sap/ui/table/messagebundle_mk.properties +23 -0
- package/src/sap/ui/table/messagebundle_ms.properties +23 -0
- package/src/sap/ui/table/messagebundle_nl.properties +23 -0
- package/src/sap/ui/table/messagebundle_no.properties +23 -0
- package/src/sap/ui/table/messagebundle_pl.properties +23 -0
- package/src/sap/ui/table/messagebundle_pt.properties +25 -2
- package/src/sap/ui/table/messagebundle_pt_PT.properties +23 -0
- package/src/sap/ui/table/messagebundle_ro.properties +23 -0
- package/src/sap/ui/table/messagebundle_ru.properties +23 -0
- package/src/sap/ui/table/messagebundle_sh.properties +23 -0
- package/src/sap/ui/table/messagebundle_sk.properties +23 -0
- package/src/sap/ui/table/messagebundle_sl.properties +23 -0
- package/src/sap/ui/table/messagebundle_sr.properties +23 -0
- package/src/sap/ui/table/messagebundle_sv.properties +23 -0
- package/src/sap/ui/table/messagebundle_th.properties +23 -0
- package/src/sap/ui/table/messagebundle_tr.properties +23 -0
- package/src/sap/ui/table/messagebundle_uk.properties +23 -0
- package/src/sap/ui/table/messagebundle_vi.properties +23 -0
- package/src/sap/ui/table/messagebundle_zh_CN.properties +23 -0
- package/src/sap/ui/table/messagebundle_zh_TW.properties +25 -2
- package/src/sap/ui/table/plugins/BindingSelection.js +2 -2
- 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 +3 -2
- package/src/sap/ui/table/rowmodes/Auto.js +3 -1
- package/src/sap/ui/table/rowmodes/Fixed.js +1 -1
- package/src/sap/ui/table/rowmodes/Interactive.js +249 -116
- package/src/sap/ui/table/rowmodes/RowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/Variable.js +1 -1
- package/src/sap/ui/table/themes/base/AnalyticalTable.less +0 -20
- package/src/sap/ui/table/themes/base/DragDrop.less +84 -23
- package/src/sap/ui/table/themes/base/Grouping.less +21 -11
- package/src/sap/ui/table/themes/sap_hcb/base_AnalyticalTable.less +0 -20
- package/src/sap/ui/table/utils/TableUtils.js +44 -4
- package/src/sap/ui/table/utils/_BindingUtils.js +1 -1
- package/src/sap/ui/table/utils/_ColumnUtils.js +3 -32
- package/src/sap/ui/table/utils/_GroupingUtils.js +1 -21
- package/src/sap/ui/table/utils/_HookUtils.js +1 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +2 -2
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./RowMode",
|
|
8
8
|
"../utils/TableUtils",
|
|
9
|
-
"sap/ui/
|
|
9
|
+
"sap/ui/Device",
|
|
10
|
+
"sap/m/Menu",
|
|
11
|
+
"sap/m/MenuItem"
|
|
10
12
|
], function(
|
|
11
13
|
RowMode,
|
|
12
14
|
TableUtils,
|
|
13
|
-
|
|
15
|
+
Device,
|
|
16
|
+
Menu,
|
|
17
|
+
MenuItem
|
|
14
18
|
) {
|
|
15
19
|
"use strict";
|
|
16
20
|
|
|
21
|
+
const _private = TableUtils.createWeakMapFacade();
|
|
22
|
+
|
|
17
23
|
/**
|
|
18
24
|
* Constructor for a new <code>Interactive</code> row mode.
|
|
19
25
|
*
|
|
@@ -39,7 +45,7 @@ sap.ui.define([
|
|
|
39
45
|
* @public
|
|
40
46
|
*
|
|
41
47
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
48
|
+
* @version 1.129.0
|
|
43
49
|
*/
|
|
44
50
|
const InteractiveRowMode = RowMode.extend("sap.ui.table.rowmodes.Interactive", /** @lends sap.ui.table.rowmodes.Interactive.prototype */ {
|
|
45
51
|
metadata: {
|
|
@@ -54,6 +60,10 @@ sap.ui.define([
|
|
|
54
60
|
* The minimum number of displayed rows.
|
|
55
61
|
*/
|
|
56
62
|
minRowCount: {type: "int", defaultValue: 5, group: "Appearance"},
|
|
63
|
+
/**
|
|
64
|
+
* The maximum number of displayed rows. If not set, the maximum number of rows is determined by the viewport height of the device.
|
|
65
|
+
*/
|
|
66
|
+
maxRowCount: {type: "int", defaultValue: -1, group: "Appearance"},
|
|
57
67
|
/**
|
|
58
68
|
* The number of rows in the fixed area at the top. If the number of fixed rows exceeds the number of displayed rows, the number of
|
|
59
69
|
* fixed rows is reduced.
|
|
@@ -188,14 +198,14 @@ sap.ui.define([
|
|
|
188
198
|
* @inheritDoc
|
|
189
199
|
*/
|
|
190
200
|
InteractiveRowMode.prototype.getMinRequestLength = function() {
|
|
191
|
-
return this.
|
|
201
|
+
return this.getActualRowCount();
|
|
192
202
|
};
|
|
193
203
|
|
|
194
204
|
/**
|
|
195
205
|
* @inheritDoc
|
|
196
206
|
*/
|
|
197
207
|
InteractiveRowMode.prototype.getComputedRowCounts = function() {
|
|
198
|
-
const iRowCount = this.
|
|
208
|
+
const iRowCount = this.getActualRowCount();
|
|
199
209
|
const iFixedTopRowCount = this.getFixedTopRowCount();
|
|
200
210
|
const iFixedBottomRowCount = this.getFixedBottomRowCount();
|
|
201
211
|
|
|
@@ -264,11 +274,39 @@ sap.ui.define([
|
|
|
264
274
|
* @inheritDoc
|
|
265
275
|
*/
|
|
266
276
|
InteractiveRowMode.prototype.renderInTableBottomArea = function(oRm) {
|
|
267
|
-
|
|
268
|
-
oRm.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
277
|
+
const oTable = this.getTable();
|
|
278
|
+
oRm.openStart("div", oTable.getId() + "-heightResizer")
|
|
279
|
+
.attr("role", "separator")
|
|
280
|
+
.attr("aria-orientation", "horizontal")
|
|
281
|
+
.attr("title", TableUtils.getResourceText("TBL_RSZ_BTN_TOOLTIP"))
|
|
282
|
+
.attr("tabindex", "0")
|
|
283
|
+
.attr("aria-valuemin", this.getMinRowCount())
|
|
284
|
+
.attr("aria-valuenow", this.getActualRowCount())
|
|
285
|
+
.class("sapUiTableHeightResizer");
|
|
286
|
+
|
|
287
|
+
const aLabels = oTable.getAriaLabelledBy();
|
|
288
|
+
if (aLabels.length) {
|
|
289
|
+
oRm.attr("aria-labelledby", aLabels.join(" "));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
oRm.openEnd();
|
|
293
|
+
oRm.openStart("div")
|
|
294
|
+
.class("sapUiTableHeightResizerDecorationBefore")
|
|
295
|
+
.openEnd()
|
|
296
|
+
.close("div");
|
|
297
|
+
|
|
298
|
+
oRm.openStart("div")
|
|
299
|
+
.attr("role", "presentation")
|
|
300
|
+
.class("sapUiTableHeightResizerGrip")
|
|
301
|
+
.openEnd()
|
|
302
|
+
.icon("sap-icon://horizontal-grip", ["sapUiTableHeightResizerGripIcon"])
|
|
303
|
+
.close("div");
|
|
304
|
+
|
|
305
|
+
oRm.openStart("div")
|
|
306
|
+
.class("sapUiTableHeightResizerDecorationAfter")
|
|
307
|
+
.openEnd()
|
|
308
|
+
.close("div");
|
|
309
|
+
|
|
272
310
|
oRm.close("div");
|
|
273
311
|
};
|
|
274
312
|
|
|
@@ -285,7 +323,7 @@ sap.ui.define([
|
|
|
285
323
|
* @private
|
|
286
324
|
*/
|
|
287
325
|
InteractiveRowMode.prototype._onTableRefreshRows = function() {
|
|
288
|
-
const iRowCount = this.
|
|
326
|
+
const iRowCount = this.getActualRowCount();
|
|
289
327
|
|
|
290
328
|
if (iRowCount > 0) {
|
|
291
329
|
this.initTableRowsAfterDataRequested(iRowCount);
|
|
@@ -294,13 +332,56 @@ sap.ui.define([
|
|
|
294
332
|
};
|
|
295
333
|
|
|
296
334
|
/**
|
|
297
|
-
* Gets the
|
|
335
|
+
* Gets the actual number of rows that are rendered in the table. This can differ from the <code>rowCount</code> property because resizing the
|
|
336
|
+
* table does not affect the value of the <code>rowCount</code> property.
|
|
298
337
|
*
|
|
299
|
-
* @returns {int} The
|
|
338
|
+
* @returns {int} The row count.
|
|
300
339
|
* @private
|
|
301
340
|
*/
|
|
302
|
-
InteractiveRowMode.prototype.
|
|
303
|
-
return Math.max(0, this.getMinRowCount(), this.getRowCount());
|
|
341
|
+
InteractiveRowMode.prototype.getActualRowCount = function() {
|
|
342
|
+
return Math.max(0, this.getMinRowCount(), _private(this).rowCount || this.getRowCount());
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* If the maxRowCount is set, it returns the property value. Otherwise, it calculates the maximum row count based on the viewport height of the
|
|
347
|
+
* device.
|
|
348
|
+
* @returns {int} The maximum row count.
|
|
349
|
+
* @private
|
|
350
|
+
*/
|
|
351
|
+
InteractiveRowMode.prototype._getMaxRowCount = function() {
|
|
352
|
+
const iMaxRowCount = this.getMaxRowCount();
|
|
353
|
+
const iMinRowCount = this.getMinRowCount();
|
|
354
|
+
if (iMaxRowCount >= 0) {
|
|
355
|
+
return Math.max(iMaxRowCount, iMinRowCount);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const iNewHeight = this._determineAvailableSpace();
|
|
359
|
+
return Math.max(Math.floor(iNewHeight / this.getBaseRowHeightOfTable()), iMinRowCount);
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
InteractiveRowMode.prototype._determineAvailableSpace = function() {
|
|
363
|
+
const oTable = this.getTable();
|
|
364
|
+
const oTableDomRef = oTable.getDomRef();
|
|
365
|
+
const oRowContainer = oTable.getDomRef("tableCCnt");
|
|
366
|
+
const iViewportHeight = Device.resize.height;
|
|
367
|
+
|
|
368
|
+
if (!oTableDomRef || !oRowContainer) {
|
|
369
|
+
return 0;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
return Math.max(0, Math.floor(iViewportHeight - oTableDomRef.getBoundingClientRect().height + oRowContainer.getBoundingClientRect().height));
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
InteractiveRowMode.prototype.setRowCount = function(iRowCount) {
|
|
376
|
+
this.setProperty("rowCount", iRowCount);
|
|
377
|
+
_private(this).rowCount = iRowCount;
|
|
378
|
+
return this;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
InteractiveRowMode.prototype.updateTable = function(sReason) {
|
|
382
|
+
this.getTable().getDomRef("heightResizer")?.setAttribute("aria-valuenow", this.getActualRowCount());
|
|
383
|
+
|
|
384
|
+
RowMode.prototype.updateTable.apply(this, arguments);
|
|
304
385
|
};
|
|
305
386
|
|
|
306
387
|
/**
|
|
@@ -323,6 +404,9 @@ sap.ui.define([
|
|
|
323
404
|
if (!bRenderedRows && oTable.getRows().length > 0) {
|
|
324
405
|
this.fireRowsUpdated(TableUtils.RowsUpdateReason.Render);
|
|
325
406
|
}
|
|
407
|
+
|
|
408
|
+
const oResizerDomRef = oTable.getDomRef("heightResizer");
|
|
409
|
+
oResizerDomRef.setAttribute("aria-valuemax", this._getMaxRowCount());
|
|
326
410
|
};
|
|
327
411
|
|
|
328
412
|
/**
|
|
@@ -331,68 +415,118 @@ sap.ui.define([
|
|
|
331
415
|
TableDelegate.onmousedown = function(oEvent) {
|
|
332
416
|
const oTable = this.getTable();
|
|
333
417
|
|
|
334
|
-
if (oEvent.button === 0 &&
|
|
335
|
-
ResizeHelper.
|
|
418
|
+
if (oEvent.button === 0 && oTable.getDomRef("heightResizer").contains(oEvent.target)) {
|
|
419
|
+
ResizeHelper.initResizing(oTable, this, oEvent);
|
|
336
420
|
}
|
|
337
421
|
};
|
|
338
422
|
|
|
423
|
+
TableDelegate.oncontextmenu = function(oEvent) {
|
|
424
|
+
const oTable = this.getTable();
|
|
425
|
+
const oDomRef = oTable.getDomRef("heightResizer");
|
|
426
|
+
|
|
427
|
+
if (oDomRef.contains(oEvent.target)) {
|
|
428
|
+
oEvent.preventDefault();
|
|
429
|
+
oDomRef.classList.add("sapUiTableHeightResizerActive");
|
|
430
|
+
ResizeHelper.openContextMenu(oTable, this, oEvent);
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
TableDelegate.onkeydown = function(oEvent) {
|
|
435
|
+
const oTable = this.getTable();
|
|
436
|
+
if (oEvent.target === oTable.getDomRef("heightResizer")) {
|
|
437
|
+
switch (oEvent.key) {
|
|
438
|
+
case "ArrowUp":
|
|
439
|
+
oEvent.preventDefault();
|
|
440
|
+
_private(this).rowCount = Math.max(this.getActualRowCount() - 1, this.getMinRowCount());
|
|
441
|
+
this.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
442
|
+
break;
|
|
443
|
+
case "ArrowDown":
|
|
444
|
+
oEvent.preventDefault();
|
|
445
|
+
_private(this).rowCount = Math.min(this.getActualRowCount() + 1, this._getMaxRowCount());
|
|
446
|
+
this.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
447
|
+
break;
|
|
448
|
+
case "Home":
|
|
449
|
+
oEvent.preventDefault();
|
|
450
|
+
_private(this).rowCount = this.getMinRowCount();
|
|
451
|
+
this.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
452
|
+
break;
|
|
453
|
+
case "End":
|
|
454
|
+
oEvent.preventDefault();
|
|
455
|
+
_private(this).rowCount = this._getMaxRowCount();
|
|
456
|
+
this.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
457
|
+
break;
|
|
458
|
+
default:
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
TableDelegate.ondblclick = function(oEvent) {
|
|
464
|
+
if (!this.getTable().getDomRef("heightResizer").contains(oEvent.target)) {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const iActualRowCount = this.getActualRowCount();
|
|
469
|
+
if (iActualRowCount === this._getMaxRowCount()) {
|
|
470
|
+
_private(this).rowCount = this.getMinRowCount();
|
|
471
|
+
} else if (iActualRowCount === this.getMinRowCount()) {
|
|
472
|
+
_private(this).rowCount = this.getRowCount();
|
|
473
|
+
} else {
|
|
474
|
+
_private(this).rowCount = this._getMaxRowCount();
|
|
475
|
+
}
|
|
476
|
+
this.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
477
|
+
};
|
|
478
|
+
|
|
339
479
|
/**
|
|
340
480
|
* Initializes the drag&drop for resizing.
|
|
341
481
|
*
|
|
342
|
-
* @param {sap.ui.table.Table} oTable Instance of the table
|
|
343
|
-
* @param {sap.ui.table.rowmodes.Interactive} oMode The interactive row mode
|
|
344
|
-
* @param {jQuery.Event} oEvent The event object
|
|
482
|
+
* @param {sap.ui.table.Table} oTable Instance of the table
|
|
483
|
+
* @param {sap.ui.table.rowmodes.Interactive} oMode The interactive row mode
|
|
484
|
+
* @param {jQuery.Event} oEvent The event object
|
|
485
|
+
* @private
|
|
345
486
|
*/
|
|
346
|
-
ResizeHelper.
|
|
347
|
-
const $Body = jQuery(document.body);
|
|
348
|
-
const $Splitter = oTable.$("sb");
|
|
349
|
-
const $Document = jQuery(document);
|
|
350
|
-
const offset = $Splitter.offset();
|
|
351
|
-
const height = $Splitter.height();
|
|
352
|
-
const width = $Splitter.width();
|
|
353
|
-
const bTouch = oTable._isTouchEvent(oEvent);
|
|
354
|
-
|
|
355
|
-
const oGhostDiv = document.createElement("div");
|
|
356
|
-
oGhostDiv.style.width = width + "px";
|
|
357
|
-
oGhostDiv.style.height = height + "px";
|
|
358
|
-
oGhostDiv.style.left = offset.left + "px";
|
|
359
|
-
oGhostDiv.style.top = offset.top + "px";
|
|
360
|
-
oGhostDiv.className = "sapUiTableInteractiveResizerGhost";
|
|
361
|
-
oGhostDiv.id = oTable.getId() + "-ghost";
|
|
362
|
-
$Body.append(oGhostDiv);
|
|
363
|
-
|
|
364
|
-
const oOverlayDiv = document.createElement("div");
|
|
365
|
-
oOverlayDiv.style.top = "0px";
|
|
366
|
-
oOverlayDiv.style.bottom = "0px";
|
|
367
|
-
oOverlayDiv.style.left = "0px";
|
|
368
|
-
oOverlayDiv.style.right = "0px";
|
|
369
|
-
oOverlayDiv.style.position = "absolute";
|
|
370
|
-
oOverlayDiv.id = oTable.getId() + "-rzoverlay";
|
|
371
|
-
$Splitter.append(oOverlayDiv);
|
|
372
|
-
|
|
373
|
-
$Document.on((bTouch ? "touchend" : "mouseup") + ".sapUiTableInteractiveResize",
|
|
374
|
-
ResizeHelper.exitInteractiveResizing.bind(oTable, oMode));
|
|
375
|
-
$Document.on((bTouch ? "touchmove" : "mousemove") + ".sapUiTableInteractiveResize",
|
|
376
|
-
ResizeHelper.onMouseMoveWhileInteractiveResizing.bind(oTable)
|
|
377
|
-
);
|
|
378
|
-
|
|
487
|
+
ResizeHelper.initResizing = function(oTable, oMode, oEvent) {
|
|
379
488
|
oTable._disableTextSelection();
|
|
489
|
+
ResizeHelper._oTable = oTable;
|
|
490
|
+
ResizeHelper._iResizerStartPos = oEvent.pageY;
|
|
491
|
+
|
|
492
|
+
document.addEventListener("touchend", ResizeHelper.onResizingEnd.bind(oTable, oMode), {once: true});
|
|
493
|
+
document.addEventListener("touchmove", ResizeHelper.onResizerMove);
|
|
494
|
+
document.addEventListener("mouseup", ResizeHelper.onResizingEnd.bind(oTable, oMode), {once: true});
|
|
495
|
+
document.addEventListener("mousemove", ResizeHelper.onResizerMove);
|
|
496
|
+
|
|
497
|
+
const oDomRef = oTable.getDomRef("heightResizer");
|
|
498
|
+
oDomRef.classList.add("sapUiTableHeightResizerActive");
|
|
499
|
+
oDomRef.style.top = "0";
|
|
380
500
|
};
|
|
381
501
|
|
|
382
502
|
/**
|
|
383
|
-
*
|
|
503
|
+
* Handler for the move events while dragging the horizontal resize bar.
|
|
384
504
|
*
|
|
385
|
-
* @param {
|
|
386
|
-
* @param {jQuery.Event} oEvent The event object.
|
|
505
|
+
* @param {jQuery.Event} oEvent The event object
|
|
387
506
|
*/
|
|
388
|
-
ResizeHelper.
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
507
|
+
ResizeHelper.onResizerMove = function(oEvent) {
|
|
508
|
+
const iDelta = (oEvent.pageY - ResizeHelper._iResizerStartPos);
|
|
509
|
+
ResizeHelper._oTable.getDomRef("heightResizer").style.top = iDelta + "px";
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Drops the horizontal splitter bar and recalculates the number of rows to be displayed.
|
|
514
|
+
*
|
|
515
|
+
* @param {sap.ui.table.rowmodes.Interactive} oMode The interactive row mode
|
|
516
|
+
* @param {jQuery.Event} oEvent The event object
|
|
517
|
+
*/
|
|
518
|
+
ResizeHelper.onResizingEnd = function(oMode, oEvent) {
|
|
519
|
+
const iLocationY = TableUtils.getEventPosition(oEvent, this).y;
|
|
520
|
+
const iTablePosTop = this.getDomRef("tableCCnt").getBoundingClientRect().top;
|
|
521
|
+
const oFooterDomRef = this.getDomRef().querySelector(".sapUiTableFtr");
|
|
522
|
+
const iTableFooterHeight = oFooterDomRef ? oFooterDomRef.getBoundingClientRect().height : 0;
|
|
523
|
+
const iNewHeight = iLocationY - iTablePosTop - iTableFooterHeight;
|
|
394
524
|
const iUserDefinedRowCount = Math.floor(iNewHeight / oMode.getBaseRowHeightOfTable());
|
|
395
|
-
let iNewRowCount = Math.max(
|
|
525
|
+
let iNewRowCount = Math.max(0, iUserDefinedRowCount, oMode.getMinRowCount());
|
|
526
|
+
const iMaxRowCount = oMode._getMaxRowCount();
|
|
527
|
+
if (iMaxRowCount > 0) {
|
|
528
|
+
iNewRowCount = Math.min(iNewRowCount, iMaxRowCount);
|
|
529
|
+
}
|
|
396
530
|
|
|
397
531
|
/**
|
|
398
532
|
* @deprecated As of version 1.119
|
|
@@ -402,66 +536,65 @@ sap.ui.define([
|
|
|
402
536
|
this.setVisibleRowCount(iNewRowCount);
|
|
403
537
|
}
|
|
404
538
|
|
|
405
|
-
oMode.
|
|
406
|
-
|
|
407
|
-
$Ghost.remove();
|
|
408
|
-
this.$("rzoverlay").remove();
|
|
539
|
+
_private(oMode).rowCount = iNewRowCount;
|
|
540
|
+
oMode.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
409
541
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
$Document.off("mouseup.sapUiTableInteractiveResize");
|
|
413
|
-
$Document.off("mousemove.sapUiTableInteractiveResize");
|
|
542
|
+
document.removeEventListener("touchmove", ResizeHelper.onResizerMove);
|
|
543
|
+
document.removeEventListener("mousemove", ResizeHelper.onResizerMove);
|
|
414
544
|
|
|
545
|
+
const oDomRef = this.getDomRef("heightResizer");
|
|
546
|
+
oDomRef.classList.remove("sapUiTableHeightResizerActive");
|
|
547
|
+
oDomRef.style.top = "";
|
|
415
548
|
this._enableTextSelection();
|
|
416
549
|
};
|
|
417
550
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
551
|
+
ResizeHelper.openContextMenu = function(oTable, oMode, oEvent) {
|
|
552
|
+
if (!ResizeHelper._oContextMenu) {
|
|
553
|
+
ResizeHelper._oContextMenu = new Menu({
|
|
554
|
+
items: [
|
|
555
|
+
new MenuItem({
|
|
556
|
+
text: TableUtils.getResourceText("TBL_RSZ_ROW_UP"),
|
|
557
|
+
shortcutText: TableUtils.getResourceText("TBL_RSZ_ROW_UP_SHORTCUT"),
|
|
558
|
+
press: function() {
|
|
559
|
+
const iRowCount = oMode.getActualRowCount();
|
|
560
|
+
_private(oMode).rowCount = Math.max(iRowCount - 1, oMode.getMinRowCount());
|
|
561
|
+
oMode.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
562
|
+
}
|
|
563
|
+
}),
|
|
564
|
+
new MenuItem({
|
|
565
|
+
text: TableUtils.getResourceText("TBL_RSZ_ROW_DOWN"),
|
|
566
|
+
shortcutText: TableUtils.getResourceText("TBL_RSZ_ROW_DOWN_SHORTCUT"),
|
|
567
|
+
press: function() {
|
|
568
|
+
const iRowCount = oMode.getActualRowCount();
|
|
569
|
+
_private(oMode).rowCount = Math.min(iRowCount + 1, oMode._getMaxRowCount());
|
|
570
|
+
oMode.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
571
|
+
}
|
|
572
|
+
}),
|
|
573
|
+
new MenuItem({
|
|
574
|
+
text: TableUtils.getResourceText("TBL_RSZ_MINIMIZE"),
|
|
575
|
+
shortcutText: TableUtils.getResourceText("TBL_RSZ_MINIMIZE_SHORTCUT"),
|
|
576
|
+
press: function() {
|
|
577
|
+
_private(oMode).rowCount = oMode.getMinRowCount();
|
|
578
|
+
oMode.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
579
|
+
}
|
|
580
|
+
}),
|
|
581
|
+
new MenuItem({
|
|
582
|
+
text: TableUtils.getResourceText("TBL_RSZ_MAXIMIZE"),
|
|
583
|
+
shortcutText: TableUtils.getResourceText("TBL_RSZ_MAXIMIZE_SHORTCUT"),
|
|
584
|
+
press: function() {
|
|
585
|
+
_private(oMode).rowCount = oMode._getMaxRowCount();
|
|
586
|
+
oMode.updateTable(TableUtils.RowsUpdateReason.Render);
|
|
587
|
+
}
|
|
588
|
+
})
|
|
589
|
+
],
|
|
590
|
+
closed: function() {
|
|
591
|
+
oTable.getDomRef("heightResizer").classList.remove("sapUiTableHeightResizerActive");
|
|
458
592
|
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
|
|
593
|
+
});
|
|
594
|
+
ResizeHelper._oContextMenu.openAsContextMenu(oEvent, oTable.getDomRef("heightResizer"));
|
|
595
|
+
} else {
|
|
596
|
+
ResizeHelper._oContextMenu.openAsContextMenu(oEvent, oTable.getDomRef("heightResizer"));
|
|
462
597
|
}
|
|
463
|
-
|
|
464
|
-
return {x: oPosition.pageX, y: oPosition.pageY};
|
|
465
598
|
};
|
|
466
599
|
|
|
467
600
|
return InteractiveRowMode;
|
|
@@ -10,26 +10,6 @@
|
|
|
10
10
|
visibility: hidden; /* hidden cell content*/
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.sapUiAnalyticalTable .sapUiTableGroupMenuButton {
|
|
14
|
-
display: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.sapUiAnalyticalTable .sapUiTableGroupHeaderRow > .sapUiTableRowSelectionCell .sapUiTableGroupMenuButton {
|
|
18
|
-
position: absolute;
|
|
19
|
-
width: 2.5rem;
|
|
20
|
-
text-align: center;
|
|
21
|
-
z-index: 5;
|
|
22
|
-
right: 0;
|
|
23
|
-
top: 50%;
|
|
24
|
-
-webkit-transform: translatey(-50%);
|
|
25
|
-
transform: translatey(-50%);
|
|
26
|
-
background-color: @_sap_ui_table_Grouping_GroupHeaderBackground;
|
|
27
|
-
font-family: 'SAP-icons';
|
|
28
|
-
font-size: 1.375rem;
|
|
29
|
-
color: @sapUiContentIconColor;
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
13
|
// Shift last cell content to left. On the right edge, the touch group menu button is placed.
|
|
34
14
|
html.sap-tablet:not(.sap-desktop), html.sap-phone {
|
|
35
15
|
.sapUiAnalyticalTable .sapUiTableGroupMode:not(.sapUiTableRAct):not(.sapUiTableRActS) .sapUiTableCtrlScroll .sapUiTableGroupHeaderRow .sapUiTableCellLast {
|
|
@@ -162,35 +162,96 @@ html.sap-desktop .sapUiTableColRsz.sapUiTableColRszActive:hover {
|
|
|
162
162
|
/* Table Height Resizing */
|
|
163
163
|
|
|
164
164
|
.sapUiTableHeightResizer {
|
|
165
|
-
box-sizing: border-box;
|
|
166
|
-
height: 5px;
|
|
167
|
-
width: 100%;
|
|
168
165
|
position: relative;
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
cursor: row-resize;
|
|
167
|
+
height: 1rem;
|
|
168
|
+
display: flex;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
align-items: center;
|
|
171
|
+
background-color: @sapContent_ForegroundColor;
|
|
172
|
+
border-top: solid 0.0625rem @sapGroup_ContentBorderColor;
|
|
173
|
+
border-bottom: solid 0.0625rem @sapGroup_ContentBorderColor;
|
|
174
|
+
|
|
175
|
+
.sapUiTableHeightResizerDecorationBefore {
|
|
176
|
+
width: 4rem;
|
|
177
|
+
height: 1rem;
|
|
178
|
+
background-image: linear-gradient(to left, @sapGroup_ContentBorderColor, transparent);
|
|
179
|
+
background-size: 100% 0.0625rem;
|
|
180
|
+
background-repeat: no-repeat;
|
|
181
|
+
background-position: center;
|
|
182
|
+
}
|
|
171
183
|
|
|
172
|
-
.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
184
|
+
.sapUiTableHeightResizerDecorationAfter {
|
|
185
|
+
width: 4rem;
|
|
186
|
+
height: 1rem;
|
|
187
|
+
background-image: linear-gradient(to right, @sapGroup_ContentBorderColor, transparent);
|
|
188
|
+
background-size: 100% 0.0625rem;
|
|
189
|
+
background-repeat: no-repeat;
|
|
190
|
+
background-position: center;
|
|
191
|
+
}
|
|
179
192
|
|
|
180
|
-
.
|
|
181
|
-
|
|
182
|
-
|
|
193
|
+
.sapUiTableHeightResizerGrip {
|
|
194
|
+
color: @sapButton_Lite_TextColor;
|
|
195
|
+
height: 1.5rem;
|
|
196
|
+
line-height: 1.5rem;
|
|
197
|
+
width: 2rem;
|
|
198
|
+
position: relative;
|
|
199
|
+
z-index: 1;
|
|
200
|
+
|
|
201
|
+
.sapUiTableHeightResizerGripIcon {
|
|
202
|
+
cursor: row-resize;
|
|
203
|
+
box-sizing: border-box;
|
|
204
|
+
width: 1.625rem;
|
|
205
|
+
height: 1.5rem;
|
|
206
|
+
line-height: 1.5rem - @sapUiButtonBorderWidth - @sapUiButtonBorderWidth;
|
|
207
|
+
margin-left: 3px;
|
|
208
|
+
border: @sapUiButtonBorderWidth solid @sapUiButtonLiteBorderColor;
|
|
209
|
+
border-radius: @sapUiButtonBorderCornerRadius;
|
|
210
|
+
background: @sapUiButtonLiteBackground;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&:hover {
|
|
215
|
+
.sapUiTableHeightResizerDecorationBefore,
|
|
216
|
+
.sapUiTableHeightResizerDecorationAfter {
|
|
217
|
+
flex-grow: 1;
|
|
218
|
+
transition: all 0.1s ease-in;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.sapUiTableHeightResizerGripIcon {
|
|
222
|
+
background: @sapUiButtonLiteBackground;
|
|
223
|
+
border-color: @sapUiButtonLiteBorderColor;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&:focus {
|
|
228
|
+
outline: none;
|
|
229
|
+
}
|
|
183
230
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
231
|
+
&:focus::after {
|
|
232
|
+
content: "";
|
|
233
|
+
display: block;
|
|
234
|
+
position: absolute;
|
|
235
|
+
top: 0;
|
|
236
|
+
right: 0;
|
|
237
|
+
bottom: 0;
|
|
238
|
+
left: 0;
|
|
239
|
+
border: @sapUiContentFocusWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&.sapUiTableHeightResizerActive {
|
|
243
|
+
.sapUiTableHeightResizerDecorationBefore {
|
|
244
|
+
flex-grow: 1;
|
|
245
|
+
background-image: linear-gradient(to left, @sapContent_Selected_ForegroundColor, @sapContent_Selected_ForegroundColor);
|
|
246
|
+
}
|
|
247
|
+
.sapUiTableHeightResizerDecorationAfter {
|
|
248
|
+
flex-grow: 1;
|
|
249
|
+
background-image: linear-gradient(to right, @sapContent_Selected_ForegroundColor, @sapContent_Selected_ForegroundColor);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
188
252
|
}
|
|
189
253
|
|
|
190
|
-
.
|
|
191
|
-
position: absolute;
|
|
192
|
-
background-color: @_sap_ui_table_DragDrop_ColumnDnDHighlightColor;
|
|
193
|
-
color: @sapUiContentContrastTextColor;
|
|
254
|
+
.sapUiTable:has(.sapUiTableHeightResizerActive) {
|
|
194
255
|
z-index: 10000;
|
|
195
256
|
}
|
|
196
257
|
|
|
@@ -81,10 +81,14 @@
|
|
|
81
81
|
vertical-align: middle;
|
|
82
82
|
margin-left: -2px;
|
|
83
83
|
margin-right: 2px;
|
|
84
|
-
}
|
|
85
84
|
|
|
86
|
-
.sapUiSizeCozy
|
|
87
|
-
|
|
85
|
+
.sapUiSizeCozy & {
|
|
86
|
+
width: @_sap_ui_table_RowSelectorWidthCozy;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.sapUiTableRowHighlights.sapUiTableRowSelectors & {
|
|
90
|
+
margin-left: calc(-2px ~'+' @_sap_ui_table_RowHighlightWidth);
|
|
91
|
+
}
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
.sapUiTableGroupIcon.sapUiTableGroupIconOpen::before,
|
|
@@ -124,15 +128,21 @@ html[dir=rtl] {
|
|
|
124
128
|
.sapUiTableGroupHeaderFading(@_sap_ui_table_Grouping_GroupHeaderBackground);
|
|
125
129
|
}
|
|
126
130
|
|
|
127
|
-
.sapUiTableGroupHeaderRow > .sapUiTableRowSelectionCell:focus
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
.sapUiTableGroupHeaderRow > .sapUiTableRowSelectionCell:focus {
|
|
132
|
+
& .sapUiTableGroupIcon {
|
|
133
|
+
outline-width: @_sap_ui_table_Grouping_GroupOutlineWidth;
|
|
134
|
+
outline-style: @sapUiContentFocusStyle;
|
|
135
|
+
outline-offset: 0;
|
|
136
|
+
outline-color: @sapUiContentFocusColor;
|
|
137
|
+
|
|
138
|
+
.sapUiSizeCondensed & {
|
|
139
|
+
outline-width: 0.0625rem;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
133
142
|
|
|
134
|
-
|
|
135
|
-
|
|
143
|
+
&::before {
|
|
144
|
+
outline: none !important;
|
|
145
|
+
}
|
|
136
146
|
}
|
|
137
147
|
|
|
138
148
|
.sapUiTableGroupHeaderRow > .sapUiTableCell.sapUiTableCellFirst:focus::before,
|