@openui5/sap.ui.table 1.120.6 → 1.121.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/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +1 -42
- package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
- package/src/sap/ui/table/AnalyticalTable.js +16 -6
- package/src/sap/ui/table/Column.js +41 -57
- package/src/sap/ui/table/ColumnMenu.js +5 -4
- package/src/sap/ui/table/CreationRow.js +1 -7
- package/src/sap/ui/table/Row.js +3 -7
- 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 -10
- package/src/sap/ui/table/Table.js +54 -181
- package/src/sap/ui/table/TablePersoController.js +7 -6
- package/src/sap/ui/table/TableRenderer.js +4 -6
- package/src/sap/ui/table/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +31 -116
- package/src/sap/ui/table/extensions/AccessibilityRender.js +6 -8
- 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 +7 -7
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +27 -28
- package/src/sap/ui/table/extensions/Pointer.js +2 -6
- package/src/sap/ui/table/extensions/Scrolling.js +12 -4
- package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
- package/src/sap/ui/table/extensions/Synchronization.js +8 -4
- package/src/sap/ui/table/library.js +44 -21
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +5 -5
- package/src/sap/ui/table/messagebundle.properties +0 -7
- package/src/sap/ui/table/messagebundle_ar.properties +0 -4
- package/src/sap/ui/table/messagebundle_bg.properties +0 -4
- package/src/sap/ui/table/messagebundle_ca.properties +0 -4
- package/src/sap/ui/table/messagebundle_cnr.properties +0 -4
- package/src/sap/ui/table/messagebundle_cs.properties +0 -4
- package/src/sap/ui/table/messagebundle_cy.properties +0 -4
- package/src/sap/ui/table/messagebundle_da.properties +0 -4
- package/src/sap/ui/table/messagebundle_de.properties +0 -4
- package/src/sap/ui/table/messagebundle_el.properties +0 -4
- package/src/sap/ui/table/messagebundle_en.properties +0 -4
- package/src/sap/ui/table/messagebundle_en_GB.properties +0 -4
- package/src/sap/ui/table/messagebundle_en_US_saprigi.properties +0 -4
- package/src/sap/ui/table/messagebundle_es.properties +0 -4
- package/src/sap/ui/table/messagebundle_es_MX.properties +0 -4
- package/src/sap/ui/table/messagebundle_et.properties +0 -4
- package/src/sap/ui/table/messagebundle_fi.properties +0 -4
- package/src/sap/ui/table/messagebundle_fr.properties +0 -4
- package/src/sap/ui/table/messagebundle_fr_CA.properties +0 -4
- package/src/sap/ui/table/messagebundle_hi.properties +0 -4
- package/src/sap/ui/table/messagebundle_hr.properties +0 -4
- package/src/sap/ui/table/messagebundle_hu.properties +0 -4
- package/src/sap/ui/table/messagebundle_id.properties +0 -4
- package/src/sap/ui/table/messagebundle_it.properties +0 -4
- package/src/sap/ui/table/messagebundle_iw.properties +0 -4
- package/src/sap/ui/table/messagebundle_ja.properties +0 -4
- package/src/sap/ui/table/messagebundle_kk.properties +0 -4
- package/src/sap/ui/table/messagebundle_ko.properties +0 -4
- package/src/sap/ui/table/messagebundle_lt.properties +0 -4
- package/src/sap/ui/table/messagebundle_lv.properties +0 -4
- package/src/sap/ui/table/messagebundle_mk.properties +0 -4
- package/src/sap/ui/table/messagebundle_ms.properties +0 -4
- package/src/sap/ui/table/messagebundle_nl.properties +0 -4
- package/src/sap/ui/table/messagebundle_no.properties +0 -4
- package/src/sap/ui/table/messagebundle_pl.properties +0 -4
- package/src/sap/ui/table/messagebundle_pt.properties +0 -4
- package/src/sap/ui/table/messagebundle_pt_PT.properties +0 -4
- package/src/sap/ui/table/messagebundle_ro.properties +0 -4
- package/src/sap/ui/table/messagebundle_ru.properties +0 -4
- package/src/sap/ui/table/messagebundle_sh.properties +0 -4
- package/src/sap/ui/table/messagebundle_sk.properties +0 -4
- package/src/sap/ui/table/messagebundle_sl.properties +0 -4
- package/src/sap/ui/table/messagebundle_sr.properties +0 -4
- package/src/sap/ui/table/messagebundle_sv.properties +0 -4
- package/src/sap/ui/table/messagebundle_th.properties +0 -4
- package/src/sap/ui/table/messagebundle_tr.properties +0 -4
- package/src/sap/ui/table/messagebundle_uk.properties +0 -4
- package/src/sap/ui/table/messagebundle_vi.properties +0 -4
- package/src/sap/ui/table/messagebundle_zh_CN.properties +0 -4
- package/src/sap/ui/table/messagebundle_zh_TW.properties +0 -4
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4Selection.js +5 -9
- package/src/sap/ui/table/plugins/PluginBase.js +3 -3
- 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 +12 -18
- package/src/sap/ui/table/rowmodes/Auto.js +2 -2
- package/src/sap/ui/table/rowmodes/Fixed.js +1 -1
- package/src/sap/ui/table/rowmodes/Interactive.js +1 -1
- package/src/sap/ui/table/rowmodes/RowMode.js +4 -2
- package/src/sap/ui/table/rowmodes/Type.js +4 -2
- package/src/sap/ui/table/rowmodes/Variable.js +1 -1
- package/src/sap/ui/table/rules/Rows.support.js +3 -1
- package/src/sap/ui/table/themes/base/RowHighlight.less +0 -6
- package/src/sap/ui/table/utils/TableUtils.js +26 -5
- 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 +6 -6
- package/src/sap/ui/table/utils/_HookUtils.js +1 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +64 -123
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/src/sap/ui/table/AnalyticalColumnMenuRenderer.js +0 -12
- package/src/sap/ui/table/AnalyticalTableRenderer.js +0 -12
- package/src/sap/ui/table/ColumnMenuRenderer.js +0 -12
- package/src/sap/ui/table/TreeTableRenderer.js +0 -12
|
@@ -13,9 +13,11 @@ sap.ui.define([
|
|
|
13
13
|
"./_HookUtils",
|
|
14
14
|
"../library",
|
|
15
15
|
"sap/ui/base/Object",
|
|
16
|
+
"sap/ui/core/Element",
|
|
16
17
|
"sap/ui/core/ResizeHandler",
|
|
17
18
|
"sap/ui/core/library",
|
|
18
19
|
"sap/ui/core/theming/Parameters",
|
|
20
|
+
"sap/ui/core/Theming",
|
|
19
21
|
"sap/ui/core/Icon",
|
|
20
22
|
"sap/ui/core/Lib",
|
|
21
23
|
"sap/ui/model/ChangeReason",
|
|
@@ -30,9 +32,11 @@ sap.ui.define([
|
|
|
30
32
|
HookUtils,
|
|
31
33
|
library,
|
|
32
34
|
BaseObject,
|
|
35
|
+
Element,
|
|
33
36
|
ResizeHandler,
|
|
34
37
|
coreLibrary,
|
|
35
38
|
ThemeParameters,
|
|
39
|
+
Theming,
|
|
36
40
|
Icon,
|
|
37
41
|
Lib,
|
|
38
42
|
ChangeReason,
|
|
@@ -209,7 +213,7 @@ sap.ui.define([
|
|
|
209
213
|
* Static collection of utility functions related to the sap.ui.table.Table, ...
|
|
210
214
|
*
|
|
211
215
|
* @author SAP SE
|
|
212
|
-
* @version 1.
|
|
216
|
+
* @version 1.121.0
|
|
213
217
|
* @namespace
|
|
214
218
|
* @alias sap.ui.table.utils.TableUtils
|
|
215
219
|
* @private
|
|
@@ -611,7 +615,7 @@ sap.ui.define([
|
|
|
611
615
|
|
|
612
616
|
return new Promise(function(resolve) {
|
|
613
617
|
if (bExpectRowsUpdatedEvent) {
|
|
614
|
-
oTable.attachEventOnce("
|
|
618
|
+
oTable.attachEventOnce("_rowsUpdated", resolve);
|
|
615
619
|
} else {
|
|
616
620
|
resolve();
|
|
617
621
|
}
|
|
@@ -764,7 +768,7 @@ sap.ui.define([
|
|
|
764
768
|
|
|
765
769
|
if ($Cell.hasClass("sapUiTableDataCell")) {
|
|
766
770
|
sColumnId = $Cell.attr("data-sap-ui-colid");
|
|
767
|
-
oColumn =
|
|
771
|
+
oColumn = Element.getElementById(sColumnId);
|
|
768
772
|
|
|
769
773
|
oCellInfo.type = TableUtils.CELLTYPE.DATACELL;
|
|
770
774
|
oCellInfo.rowIndex = parseInt($Cell.parent().attr("data-sap-ui-rowindex"));
|
|
@@ -801,7 +805,7 @@ sap.ui.define([
|
|
|
801
805
|
|
|
802
806
|
} else if ($Cell.hasClass("sapUiTablePseudoCell")) {
|
|
803
807
|
sColumnId = $Cell.attr("data-sap-ui-colid");
|
|
804
|
-
oColumn =
|
|
808
|
+
oColumn = Element.getElementById(sColumnId);
|
|
805
809
|
|
|
806
810
|
oCellInfo.type = TableUtils.CELLTYPE.PSEUDO;
|
|
807
811
|
oCellInfo.rowIndex = -1;
|
|
@@ -811,7 +815,7 @@ sap.ui.define([
|
|
|
811
815
|
|
|
812
816
|
// Set the cell object for easier access to the cell for the caller.
|
|
813
817
|
if (oCellInfo.type !== 0) {
|
|
814
|
-
oCellInfo.cell = $Cell;
|
|
818
|
+
oCellInfo.cell = $Cell[0];
|
|
815
819
|
}
|
|
816
820
|
|
|
817
821
|
/**
|
|
@@ -1498,6 +1502,23 @@ sap.ui.define([
|
|
|
1498
1502
|
mThemeParameters.navIndicatorWidth = getPixelValue("_sap_ui_table_NavIndicatorWidth");
|
|
1499
1503
|
},
|
|
1500
1504
|
|
|
1505
|
+
/**
|
|
1506
|
+
* Informs whether the current theme is fully applied already.
|
|
1507
|
+
* Replacement for Core#isThemeApplied.
|
|
1508
|
+
* see also sap/m/table/Util#isThemeApplied
|
|
1509
|
+
*
|
|
1510
|
+
* @since 1.121
|
|
1511
|
+
*/
|
|
1512
|
+
isThemeApplied: function() {
|
|
1513
|
+
var bIsApplied = false;
|
|
1514
|
+
var fnOnThemeApplied = function() {
|
|
1515
|
+
bIsApplied = true;
|
|
1516
|
+
};
|
|
1517
|
+
Theming.attachApplied(fnOnThemeApplied); // Will be called immediately when theme is applied
|
|
1518
|
+
Theming.detachApplied(fnOnThemeApplied);
|
|
1519
|
+
return bIsApplied;
|
|
1520
|
+
},
|
|
1521
|
+
|
|
1501
1522
|
/**
|
|
1502
1523
|
* Adds a delegate that listens to the events of an element.
|
|
1503
1524
|
*
|
|
@@ -14,7 +14,7 @@ sap.ui.define([], function() {
|
|
|
14
14
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Binding...</code>
|
|
15
15
|
*
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @version 1.
|
|
17
|
+
* @version 1.121.0
|
|
18
18
|
* @namespace
|
|
19
19
|
* @alias sap.ui.table.utils._BindingUtils
|
|
20
20
|
* @private
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Column...</code>
|
|
19
19
|
*
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.121.0
|
|
22
22
|
* @namespace
|
|
23
23
|
* @alias sap.ui.table.utils._ColumnUtils
|
|
24
24
|
* @private
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides helper sap.ui.table.utils._GroupingUtils.
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"sap/ui/core/Element",
|
|
9
10
|
"sap/ui/model/Sorter",
|
|
10
11
|
"sap/ui/Device",
|
|
11
12
|
"sap/ui/thirdparty/jquery"
|
|
12
|
-
], function(Sorter, Device, jQuery) {
|
|
13
|
+
], function(Element, Sorter, Device, jQuery) {
|
|
13
14
|
"use strict";
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -23,7 +24,7 @@ sap.ui.define([
|
|
|
23
24
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Grouping...</code>
|
|
24
25
|
*
|
|
25
26
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
27
|
+
* @version 1.121.0
|
|
27
28
|
* @namespace
|
|
28
29
|
* @alias sap.ui.table.utils._GroupingUtils
|
|
29
30
|
* @private
|
|
@@ -194,7 +195,7 @@ sap.ui.define([
|
|
|
194
195
|
var oInfo = GroupingUtils.TableUtils.getCellInfo(oCellRef);
|
|
195
196
|
|
|
196
197
|
if (oInfo.isOfType(GroupingUtils.TableUtils.CELLTYPE.ANYCONTENTCELL)) {
|
|
197
|
-
return oInfo.cell.
|
|
198
|
+
return oInfo.cell.parentElement.classList.contains("sapUiTableGroupHeaderRow");
|
|
198
199
|
}
|
|
199
200
|
|
|
200
201
|
return false;
|
|
@@ -210,7 +211,7 @@ sap.ui.define([
|
|
|
210
211
|
var oInfo = GroupingUtils.TableUtils.getCellInfo(oCellRef);
|
|
211
212
|
|
|
212
213
|
if (oInfo.isOfType(GroupingUtils.TableUtils.CELLTYPE.ANYCONTENTCELL)) {
|
|
213
|
-
return oInfo.cell.
|
|
214
|
+
return oInfo.cell.parentElement.classList.contains("sapUiTableSummaryRow");
|
|
214
215
|
}
|
|
215
216
|
|
|
216
217
|
return false;
|
|
@@ -321,7 +322,6 @@ sap.ui.define([
|
|
|
321
322
|
oRow.$("groupHeader")
|
|
322
323
|
.toggleClass("sapUiTableGroupIconOpen", bIsExpandable && bIsExpanded)
|
|
323
324
|
.toggleClass("sapUiTableGroupIconClosed", bIsExpandable && !bIsExpanded)
|
|
324
|
-
.attr("title", !oTable._getHideStandardTooltips() && sTitle ? sTitle : null)
|
|
325
325
|
.text(sTitle);
|
|
326
326
|
GroupingUtils.setGroupIndent(oRow, iIndent);
|
|
327
327
|
$Row.toggleClass("sapUiTableRowIndented", iIndent > 0)
|
|
@@ -435,7 +435,7 @@ sap.ui.define([
|
|
|
435
435
|
var oBinding = oTable.getBinding();
|
|
436
436
|
|
|
437
437
|
// check for grouping being supported or not (only for client ListBindings!!)
|
|
438
|
-
var oGroupBy =
|
|
438
|
+
var oGroupBy = Element.getElementById(oTable.getGroupBy());
|
|
439
439
|
var bIsSupported = oGroupBy && oGroupBy.getGrouped() && GroupingUtils.TableUtils.isA(oBinding, "sap.ui.model.ClientListBinding");
|
|
440
440
|
|
|
441
441
|
// only enhance the binding if it has not been done yet and supported!
|
|
@@ -22,7 +22,7 @@ sap.ui.define(["sap/ui/base/DataType", "sap/ui/model/ChangeReason"], function(Da
|
|
|
22
22
|
* - There is no concept for public or protected hooks. Never expose a hook directly, only indirectly as can be seen in the examples.
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.121.0
|
|
26
26
|
* @namespace
|
|
27
27
|
* @alias sap.ui.table.utils._HookUtils
|
|
28
28
|
*
|
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides helper sap.ui.table.utils._MenuUtils.
|
|
8
8
|
sap.ui.define([
|
|
9
|
-
"sap/ui/
|
|
9
|
+
"sap/ui/core/Element",
|
|
10
10
|
"sap/ui/unified/Menu",
|
|
11
|
-
"sap/ui/unified/MenuItem"
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
"sap/ui/unified/MenuItem"
|
|
12
|
+
], function(
|
|
13
|
+
Element,
|
|
14
|
+
Menu,
|
|
15
|
+
MenuItem
|
|
16
|
+
) {
|
|
14
17
|
"use strict";
|
|
15
18
|
|
|
16
19
|
function onCellFilterSelect(oColumn, oRow) {
|
|
@@ -39,7 +42,7 @@ sap.ui.define([
|
|
|
39
42
|
* Note: Do not access the functions of this helper directly, but via <code>sap.ui.table.utils.TableUtils.Menu...</code>
|
|
40
43
|
*
|
|
41
44
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
45
|
+
* @version 1.121.0
|
|
43
46
|
* @namespace
|
|
44
47
|
* @alias sap.ui.table.utils._MenuUtils
|
|
45
48
|
* @private
|
|
@@ -51,93 +54,45 @@ sap.ui.define([
|
|
|
51
54
|
/**
|
|
52
55
|
* Opens the context menu of a column header or a content cell.
|
|
53
56
|
*
|
|
54
|
-
* If a column header cell or an element inside a column header cell is
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* The context menu will not be opened if the configuration of the table does not allow it, or one of the event handlers attached to the
|
|
58
|
-
* events <code>ColumnSelect</code> or <code>CellContextmenu</code> calls <code>preventDefault()</code>.
|
|
57
|
+
* If a column header cell or an element inside a column header cell is the event target, the context menu of this column is opened.
|
|
58
|
+
* If a content cell or an element inside a content cell is the event target, then the context menu of this content cell is opened.
|
|
59
|
+
* The context menu is not be opened if the configuration of the table does not allow it, or an event handler prevents default.
|
|
59
60
|
*
|
|
60
|
-
* Fires the <code>
|
|
61
|
-
* Fires the <code>
|
|
61
|
+
* Fires the <code>columnSelect</code> event when a column context menu should be opened.
|
|
62
|
+
* Fires the <code>beforeOpenContextMenu</code> event when a content cell context menu should be opened.
|
|
62
63
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* On mobile devices, when trying to open a column context menu, a column header cell menu is created instead with buttons to actually
|
|
67
|
-
* open the column context menu or to resize the column. If this function is called when this cell menu already exists, then it is closed
|
|
68
|
-
* and the column context menu is opened.
|
|
69
|
-
*
|
|
70
|
-
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
71
|
-
* @param {jQuery.Event} oEvent The event object.
|
|
72
|
-
* @returns {boolean} Whether a context menu was opened.
|
|
73
|
-
* @see _openColumnContextMenu
|
|
74
|
-
* @see _openContentCellContextMenu
|
|
75
|
-
* @see _applyColumnHeaderCellMenu
|
|
64
|
+
* @param {sap.ui.table.Table} oTable Instance of the table
|
|
65
|
+
* @param {jQuery.Event} oEvent The event object
|
|
76
66
|
*/
|
|
77
67
|
openContextMenu: function(oTable, oEvent) {
|
|
78
68
|
var $Cell = MenuUtils.TableUtils.getCell(oTable, oEvent.target);
|
|
79
|
-
var
|
|
80
|
-
var oCellInfo = MenuUtils.TableUtils.getCellInfo(oCell);
|
|
81
|
-
var iColumnIndex = oCellInfo.columnIndex;
|
|
82
|
-
var iRowIndex = oCellInfo.rowIndex;
|
|
83
|
-
var bExecuteDefault = true;
|
|
69
|
+
var oCellInfo = MenuUtils.TableUtils.getCellInfo($Cell);
|
|
84
70
|
|
|
85
71
|
if (oCellInfo.isOfType(MenuUtils.TableUtils.CELLTYPE.COLUMNHEADER)) {
|
|
86
|
-
oTable.getColumns()[
|
|
87
|
-
|
|
88
|
-
|
|
72
|
+
oTable.getColumns()[oCellInfo.columnIndex]._openHeaderMenu(oCellInfo.cell);
|
|
73
|
+
oEvent.preventDefault();
|
|
89
74
|
} else if (oCellInfo.isOfType(MenuUtils.TableUtils.CELLTYPE.ANYCONTENTCELL)) {
|
|
90
|
-
var oRowColCell = MenuUtils.TableUtils.getRowColCell(oTable, iRowIndex, iColumnIndex, iColumnIndex >= 0);
|
|
91
|
-
var oRow = oRowColCell.row;
|
|
92
|
-
var oRowBindingContext;
|
|
93
|
-
var oRowBindingInfo = oTable.getBindingInfo("rows");
|
|
94
|
-
|
|
95
|
-
if (oRowBindingInfo) {
|
|
96
|
-
oRowBindingContext = oRow.getBindingContext(oRowBindingInfo.model);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
75
|
/**
|
|
100
|
-
* @deprecated As of version 1.
|
|
76
|
+
* @deprecated As of version 1.54
|
|
101
77
|
*/
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
78
|
+
if (oCellInfo.columnIndex >= 0) {
|
|
79
|
+
var oRowColCell = MenuUtils.TableUtils.getRowColCell(oTable, oCellInfo.rowIndex, oCellInfo.columnIndex, true);
|
|
80
|
+
var bExecuteDefault = oTable.fireCellContextmenu({
|
|
81
|
+
rowIndex: oRowColCell.row.getIndex(),
|
|
82
|
+
columnIndex: oCellInfo.columnIndex,
|
|
106
83
|
columnId: oRowColCell.column.getId(),
|
|
107
84
|
cellControl: oRowColCell.cell,
|
|
108
|
-
rowBindingContext:
|
|
109
|
-
cellDomRef:
|
|
85
|
+
rowBindingContext: oRowColCell.row.getRowBindingContext(),
|
|
86
|
+
cellDomRef: oCellInfo.cell
|
|
110
87
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @deprecated As of version 1.21.0
|
|
115
|
-
*/
|
|
116
|
-
if (!bExecuteDefault) {
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// fire beforeOpenContextMenu event
|
|
121
|
-
var oRowContextMenu = oTable.getContextMenu();
|
|
122
88
|
|
|
123
|
-
|
|
124
|
-
|
|
89
|
+
if (!bExecuteDefault) {
|
|
90
|
+
oEvent.preventDefault(); // We do not know whether the event handler opens a context menu, so we just assume it is done.
|
|
91
|
+
}
|
|
125
92
|
}
|
|
126
93
|
|
|
127
|
-
|
|
128
|
-
rowIndex: oRow.getIndex(),
|
|
129
|
-
columnIndex: oRowColCell.column ? iColumnIndex : null,
|
|
130
|
-
contextMenu: oRowContextMenu
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
if (bExecuteDefault) {
|
|
134
|
-
return MenuUtils._openContentCellContextMenu(oTable, oCell, oEvent);
|
|
135
|
-
} else {
|
|
136
|
-
return true; // We do not know whether the event handler opens a context menu or not, so we just assume it is done.
|
|
137
|
-
}
|
|
94
|
+
MenuUtils._openContentCellContextMenu(oTable, oCellInfo, oEvent);
|
|
138
95
|
}
|
|
139
|
-
|
|
140
|
-
return false;
|
|
141
96
|
},
|
|
142
97
|
|
|
143
98
|
/**
|
|
@@ -147,24 +102,21 @@ sap.ui.define([
|
|
|
147
102
|
* docked to <code>oElement</code> (see {@link sap.ui.unified.Menu#openAsContextMenu}).
|
|
148
103
|
*
|
|
149
104
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
150
|
-
* @param {
|
|
105
|
+
* @param {sap.ui.table.utils.TableUtils.CellInfo} oCellInfo Cell info.
|
|
151
106
|
* @param {jQuery.Event} oEvent The event object.
|
|
152
|
-
* @returns {boolean} Whether a context menu was opened.
|
|
153
107
|
* @private
|
|
154
|
-
* @see _openCustomContentCellContextMenu
|
|
155
|
-
* @see _openDefaultContentCellContextMenu
|
|
156
108
|
*/
|
|
157
|
-
_openContentCellContextMenu: function(oTable,
|
|
158
|
-
var
|
|
109
|
+
_openContentCellContextMenu: function(oTable, oCellInfo, oEvent) {
|
|
110
|
+
var oRow = oTable.getRows()[oCellInfo.rowIndex];
|
|
159
111
|
|
|
160
|
-
if (
|
|
161
|
-
return
|
|
112
|
+
if (oRow.isEmpty()) {
|
|
113
|
+
return;
|
|
162
114
|
}
|
|
163
115
|
|
|
164
|
-
if (
|
|
165
|
-
|
|
116
|
+
if (oTable.getContextMenu()) {
|
|
117
|
+
MenuUtils._openCustomContentCellContextMenu(oTable, oCellInfo, oEvent);
|
|
166
118
|
} else {
|
|
167
|
-
|
|
119
|
+
MenuUtils._openDefaultContentCellContextMenu(oTable, oCellInfo, oEvent);
|
|
168
120
|
}
|
|
169
121
|
},
|
|
170
122
|
|
|
@@ -175,22 +127,30 @@ sap.ui.define([
|
|
|
175
127
|
* docked to <code>oElement</code> (see {@link sap.ui.unified.Menu#openAsContextMenu}).
|
|
176
128
|
*
|
|
177
129
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
178
|
-
* @param {
|
|
130
|
+
* @param {sap.ui.table.utils.TableUtils.CellInfo} oCellInfo Cell info.
|
|
179
131
|
* @param {jQuery.Event} oEvent The event object.
|
|
180
|
-
* @returns {boolean} Whether a context menu was opened.
|
|
181
132
|
* @private
|
|
182
133
|
*/
|
|
183
|
-
_openCustomContentCellContextMenu: function(oTable,
|
|
184
|
-
var oCellInfo = MenuUtils.TableUtils.getCellInfo(oCell);
|
|
134
|
+
_openCustomContentCellContextMenu: function(oTable, oCellInfo, oEvent) {
|
|
185
135
|
var oRow = oTable.getRows()[oCellInfo.rowIndex];
|
|
136
|
+
var oContextMenu = oTable.getContextMenu();
|
|
186
137
|
|
|
187
138
|
if (oRow.isGroupHeader() || oRow.isSummary()) {
|
|
188
|
-
return
|
|
139
|
+
return;
|
|
189
140
|
}
|
|
190
141
|
|
|
191
|
-
|
|
142
|
+
oContextMenu.setBindingContext(oRow.getRowBindingContext(), oTable.getBindingInfo("rows").model);
|
|
143
|
+
|
|
144
|
+
var bExecuteDefault = oTable.fireBeforeOpenContextMenu({
|
|
145
|
+
rowIndex: oRow.getIndex(),
|
|
146
|
+
columnIndex: oCellInfo.columnIndex >= 0 ? oCellInfo.columnIndex : null,
|
|
147
|
+
contextMenu: oContextMenu
|
|
148
|
+
});
|
|
192
149
|
|
|
193
|
-
|
|
150
|
+
if (bExecuteDefault) {
|
|
151
|
+
oTable.getContextMenu()?.openAsContextMenu(oEvent, oCellInfo.cell);
|
|
152
|
+
oEvent.preventDefault();
|
|
153
|
+
}
|
|
194
154
|
},
|
|
195
155
|
|
|
196
156
|
/**
|
|
@@ -200,25 +160,21 @@ sap.ui.define([
|
|
|
200
160
|
* docked to <code>oElement</code> (see {@link sap.ui.unified.Menu#openAsContextMenu}).
|
|
201
161
|
*
|
|
202
162
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
203
|
-
* @param {
|
|
163
|
+
* @param {sap.ui.table.utils.TableUtils.CellInfo} oCellInfo Cell info.
|
|
204
164
|
* @param {jQuery.Event} oEvent The event object.
|
|
205
|
-
* @returns {boolean} Whether a context menu was opened.
|
|
206
165
|
* @private
|
|
207
166
|
*/
|
|
208
|
-
_openDefaultContentCellContextMenu: function(oTable,
|
|
209
|
-
var oCellInfo = MenuUtils.TableUtils.getCellInfo(oCell);
|
|
167
|
+
_openDefaultContentCellContextMenu: function(oTable, oCellInfo, oEvent) {
|
|
210
168
|
var iRowIndex = oCellInfo.rowIndex;
|
|
211
169
|
var oRow = oTable.getRows()[iRowIndex];
|
|
212
|
-
var
|
|
213
|
-
var aColumns = oTable.getColumns();
|
|
214
|
-
var oColumn = aColumns[iColumnIndex];
|
|
170
|
+
var oColumn = oTable.getColumns()[oCellInfo.columnIndex];
|
|
215
171
|
|
|
216
172
|
if (!oTable._oCellContextMenu) {
|
|
217
173
|
oTable._oCellContextMenu = new Menu(oTable.getId() + "-cellcontextmenu");
|
|
218
174
|
}
|
|
219
175
|
|
|
220
176
|
var sCellFilterMenuItemId = oTable._oCellContextMenu.getId() + "-cellfilter";
|
|
221
|
-
var oCellFilterMenuItem =
|
|
177
|
+
var oCellFilterMenuItem = Element.getElementById(sCellFilterMenuItemId);
|
|
222
178
|
|
|
223
179
|
if (oTable.getEnableCellFilter() && oColumn && oColumn.isFilterableByMenu() && !oRow.isGroupHeader()) {
|
|
224
180
|
if (!oCellFilterMenuItem) {
|
|
@@ -244,12 +200,11 @@ sap.ui.define([
|
|
|
244
200
|
MenuUtils.TableUtils.Hook.call(oTable, MenuUtils.TableUtils.Hook.Keys.Table.OpenMenu, oCellInfo, oTable._oCellContextMenu);
|
|
245
201
|
|
|
246
202
|
if (oTable._oCellContextMenu.getItems().length === 0) {
|
|
247
|
-
return
|
|
203
|
+
return;
|
|
248
204
|
}
|
|
249
205
|
|
|
250
|
-
oTable._oCellContextMenu.openAsContextMenu(oEvent,
|
|
251
|
-
|
|
252
|
-
return true;
|
|
206
|
+
oTable._oCellContextMenu.openAsContextMenu(oEvent, oCellInfo.cell);
|
|
207
|
+
oEvent.preventDefault();
|
|
253
208
|
},
|
|
254
209
|
|
|
255
210
|
/**
|
|
@@ -291,32 +246,18 @@ sap.ui.define([
|
|
|
291
246
|
* @param {sap.ui.table.Table} oTable Instance of the table.
|
|
292
247
|
*/
|
|
293
248
|
cleanupDefaultContentCellContextMenu: function(oTable) {
|
|
294
|
-
if (!oTable
|
|
249
|
+
if (!oTable._oCellContextMenu) {
|
|
295
250
|
return;
|
|
296
251
|
}
|
|
297
252
|
|
|
253
|
+
// Destroy the items of the table.
|
|
298
254
|
var sCellFilterMenuItemId = oTable._oCellContextMenu.getId() + "-cellfilter";
|
|
299
|
-
|
|
255
|
+
Element.getElementById(sCellFilterMenuItemId)?.destroy();
|
|
300
256
|
|
|
301
257
|
// We don't want to destroy items which were added, for example, by hooks. The owners of the items are responsible for them.
|
|
302
258
|
oTable._oCellContextMenu.removeAllItems();
|
|
303
259
|
oTable._oCellContextMenu.destroy();
|
|
304
|
-
oTable._oCellContextMenu
|
|
305
|
-
|
|
306
|
-
// Destroy the items of the table.
|
|
307
|
-
if (oCellFilterMenuItem) {
|
|
308
|
-
oCellFilterMenuItem.destroy();
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Checks whether a custom context menu (contextMenu aggregation) is applied to the table.
|
|
314
|
-
*
|
|
315
|
-
* @param {sap.ui.table.Table} oTable Table instance.
|
|
316
|
-
* @returns {boolean} Whether a custom context menu is applied to the table.
|
|
317
|
-
*/
|
|
318
|
-
hasCustomContextMenu: function(oTable) {
|
|
319
|
-
return oTable != null && oTable.getContextMenu() != null;
|
|
260
|
+
delete oTable._oCellContextMenu;
|
|
320
261
|
}
|
|
321
262
|
};
|
|
322
263
|
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright (c) <year> <owner>. All rights reserved.
|
|
2
|
-
|
|
3
|
-
Redistribution and use in source and binary forms, with or without modification,
|
|
4
|
-
are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
1. Redistributions of source code must retain the above copyright notice,
|
|
7
|
-
this list of conditions and the following disclaimer.
|
|
8
|
-
|
|
9
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
10
|
-
this list of conditions and the following disclaimer in the documentation
|
|
11
|
-
and/or other materials provided with the distribution.
|
|
12
|
-
|
|
13
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
14
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
15
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
16
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
17
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
18
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
19
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
20
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
21
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
22
|
-
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Provides default renderer for control sap.ui.table.AnalyticalColumnMenu
|
|
8
|
-
sap.ui.define(['sap/ui/table/AnalyticalColumnMenu'], function(Menu) {
|
|
9
|
-
"use strict";
|
|
10
|
-
// Renderer defined already in AnalyticalColumnMenu.js -> Keep this file for legacy purposes (e.g. AMD module dependencies)
|
|
11
|
-
return Menu.getMetadata().getRenderer();
|
|
12
|
-
}, /* bExport= */ true);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Provides default renderer for control sap.ui.table.AnalyticalTable
|
|
8
|
-
sap.ui.define(['sap/ui/table/AnalyticalTable'], function(Table) {
|
|
9
|
-
"use strict";
|
|
10
|
-
// Renderer defined already in AnalyticalTable.js -> Keep this file for legacy purposes (e.g. AMD module dependencies)
|
|
11
|
-
return Table.getMetadata().getRenderer();
|
|
12
|
-
}, /* bExport= */ true);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Provides default renderer for control sap.ui.table.ColumnMenu
|
|
8
|
-
sap.ui.define(['sap/ui/table/ColumnMenu'], function(Menu) {
|
|
9
|
-
"use strict";
|
|
10
|
-
// Renderer defined already in ColumnMenu.js -> Keep this file for legacy purposes (e.g. AMD module dependencies)
|
|
11
|
-
return Menu.getMetadata().getRenderer();
|
|
12
|
-
}, /* bExport= */ true);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Provides default renderer for control sap.ui.table.TreeTable
|
|
8
|
-
sap.ui.define(['sap/ui/table/TreeTable'], function(Table) {
|
|
9
|
-
"use strict";
|
|
10
|
-
// Renderer defined already in TreeTable.js -> Keep this file for legacy purposes (e.g. AMD module dependencies)
|
|
11
|
-
return Table.getMetadata().getRenderer();
|
|
12
|
-
}, /* bExport= */ true);
|