@openui5/sap.ui.table 1.115.1 → 1.117.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 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +3 -2
- package/src/sap/ui/table/AnalyticalColumnMenu.js +3 -2
- package/src/sap/ui/table/AnalyticalTable.js +14 -2
- package/src/sap/ui/table/Column.js +33 -183
- package/src/sap/ui/table/ColumnMenu.js +30 -34
- 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 +23 -38
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +22 -21
- package/src/sap/ui/table/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +25 -3
- package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -1
- package/src/sap/ui/table/extensions/DragAndDrop.js +31 -6
- 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 +3 -3
- package/src/sap/ui/table/extensions/Scrolling.js +1 -1
- package/src/sap/ui/table/extensions/ScrollingIOS.js +2 -2
- package/src/sap/ui/table/extensions/Synchronization.js +1 -1
- package/src/sap/ui/table/library.js +11 -11
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +14 -3
- package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +272 -0
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/messagebundle_fr.properties +1 -1
- package/src/sap/ui/table/messagebundle_ro.properties +3 -3
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4Selection.js +9 -0
- 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 +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 +17 -3
- package/src/sap/ui/table/rowmodes/VariableRowMode.js +1 -1
- package/src/sap/ui/table/rules/TableHelper.support.js +5 -0
- package/src/sap/ui/table/themes/base/Grouping.less +1 -1
- package/src/sap/ui/table/utils/TableUtils.js +1 -1
- 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 +1 -1
- package/src/sap/ui/table/utils/_HookUtils.js +18 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +3 -151
- package/ui5.yaml +1 -1
package/.reuse/dep5
CHANGED
|
@@ -457,11 +457,6 @@ Comment: these files belong to: UI5 Web Components
|
|
|
457
457
|
|
|
458
458
|
# Outside of Libraries:
|
|
459
459
|
|
|
460
|
-
Files: src/testsuite-utils/src/main/resources/META-INF/less/less.js
|
|
461
|
-
Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
|
|
462
|
-
License: Apache-2.0
|
|
463
|
-
Comment: these files belong to: LESS
|
|
464
|
-
|
|
465
460
|
Files: lib/jsdoc/ui5/plugin.js
|
|
466
461
|
Copyright:
|
|
467
462
|
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
package/THIRDPARTY.txt
CHANGED
|
@@ -460,19 +460,13 @@ Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
|
|
|
460
460
|
|
|
461
461
|
Outside of Libraries:
|
|
462
462
|
|
|
463
|
-
Component: LESS, version: 1.6.3
|
|
464
|
-
Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
|
|
465
|
-
License: Apache-2.0
|
|
466
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
467
|
-
Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
|
|
468
|
-
|
|
469
463
|
Component: JSDoc 3, version: 3.6.7
|
|
470
464
|
Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
|
|
471
465
|
License: Apache-2.0
|
|
472
466
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
473
467
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
474
468
|
|
|
475
|
-
Component: SAP Theming Base Content, version: 11.
|
|
469
|
+
Component: SAP Theming Base Content, version: 11.4.2
|
|
476
470
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
477
471
|
License: Apache-2.0
|
|
478
472
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.table",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.117.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.table",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.
|
|
18
|
-
"@openui5/sap.ui.unified": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.117.0",
|
|
18
|
+
"@openui5/sap.ui.unified": "1.117.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.117.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Table-like controls, mainly for desktop scenarios.</documentation>
|
|
12
12
|
|
|
@@ -48,7 +48,7 @@ sap.ui.define([
|
|
|
48
48
|
* @extends sap.ui.table.Column
|
|
49
49
|
*
|
|
50
50
|
* @author SAP SE
|
|
51
|
-
* @version 1.
|
|
51
|
+
* @version 1.117.0
|
|
52
52
|
*
|
|
53
53
|
* @constructor
|
|
54
54
|
* @public
|
|
@@ -311,8 +311,9 @@ sap.ui.define([
|
|
|
311
311
|
};
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
|
-
* Checks whether
|
|
314
|
+
* Checks whether the menu has items
|
|
315
315
|
* @returns {boolean} True if the menu has or could have items.
|
|
316
|
+
* @deprecated As of Version 1.117
|
|
316
317
|
*/
|
|
317
318
|
AnalyticalColumn.prototype._menuHasItems = function() {
|
|
318
319
|
var fnMenuHasItems = function() {
|
|
@@ -20,13 +20,14 @@ sap.ui.define(['./ColumnMenu', "sap/ui/unified/MenuRenderer", './utils/TableUtil
|
|
|
20
20
|
* @extends sap.ui.table.ColumnMenu
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.117.0
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @public
|
|
27
27
|
* @experimental Since version 1.21.
|
|
28
|
-
* The AnalyticalColumnMenu will be productized soon.
|
|
29
28
|
* @alias sap.ui.table.AnalyticalColumnMenu
|
|
29
|
+
*
|
|
30
|
+
* @deprecated As of version 1.117
|
|
30
31
|
*/
|
|
31
32
|
var AnalyticalColumnMenu = ColumnMenu.extend("sap.ui.table.AnalyticalColumnMenu", /** @lends sap.ui.table.AnalyticalColumnMenu.prototype */ {
|
|
32
33
|
metadata: {
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @see https://github.com/SAP/odata-vocabularies/blob/main/docs/v2-annotations.md
|
|
58
58
|
*
|
|
59
59
|
* @extends sap.ui.table.Table
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.117.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @public
|
|
@@ -134,6 +134,7 @@ sap.ui.define([
|
|
|
134
134
|
/**
|
|
135
135
|
* Functions which is used to sort the column visibility menu entries e.g.: function(ColumnA, ColumnB) { return 0 = equals, <0 lower, >0
|
|
136
136
|
* greater }; Other values than functions will be ignored.
|
|
137
|
+
* @deprecated As of Version 1.117
|
|
137
138
|
*/
|
|
138
139
|
columnVisibilityMenuSorter: {type: "any", group: "Appearance", defaultValue: null},
|
|
139
140
|
|
|
@@ -196,6 +197,9 @@ sap.ui.define([
|
|
|
196
197
|
this.addStyleClass("sapUiAnalyticalTable");
|
|
197
198
|
|
|
198
199
|
// defaulting properties
|
|
200
|
+
/**
|
|
201
|
+
* @deprecated As of Version 1.117
|
|
202
|
+
*/
|
|
199
203
|
this.setShowColumnVisibilityMenu(true);
|
|
200
204
|
this.setEnableColumnFreeze(true);
|
|
201
205
|
this.setEnableCellFilter(true);
|
|
@@ -301,11 +305,15 @@ sap.ui.define([
|
|
|
301
305
|
return oModel;
|
|
302
306
|
};
|
|
303
307
|
|
|
308
|
+
/**
|
|
309
|
+
* @deprecated As of Version 1.117
|
|
310
|
+
* sap.ui.table.ColumnMenu is deprecated.
|
|
311
|
+
*/
|
|
304
312
|
AnalyticalTable.prototype.updateRows = function(sReason) {
|
|
305
313
|
Table.prototype.updateRows.apply(this, arguments);
|
|
306
314
|
|
|
307
315
|
if (sReason !== "sort") {
|
|
308
|
-
this._invalidateColumnMenus();
|
|
316
|
+
this._invalidateColumnMenus();
|
|
309
317
|
}
|
|
310
318
|
};
|
|
311
319
|
|
|
@@ -325,6 +333,10 @@ sap.ui.define([
|
|
|
325
333
|
*/
|
|
326
334
|
AnalyticalTable.prototype._bindAggregation = function(sName, oBindingInfo) {
|
|
327
335
|
if (sName === "rows") {
|
|
336
|
+
/**
|
|
337
|
+
* @deprecated As of Version 1.117
|
|
338
|
+
* sap.ui.table.ColumnMenu is deprecated.
|
|
339
|
+
*/
|
|
328
340
|
this._invalidateColumnMenus(); // Metadata might change.
|
|
329
341
|
this._applyODataModelAnalyticalAdapter(oBindingInfo.model);
|
|
330
342
|
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides control sap.ui.table.Column.
|
|
8
8
|
sap.ui.define([
|
|
9
|
-
"./ColumnMenu",
|
|
10
9
|
"./utils/TableUtils",
|
|
11
10
|
"./menus/ColumnHeaderMenuAdapter",
|
|
12
11
|
"./library",
|
|
@@ -24,7 +23,6 @@ sap.ui.define([
|
|
|
24
23
|
"sap/base/util/JSTokenizer",
|
|
25
24
|
"sap/base/Log"
|
|
26
25
|
], function(
|
|
27
|
-
ColumnMenu,
|
|
28
26
|
TableUtils,
|
|
29
27
|
ColumnHeaderMenuAdapter,
|
|
30
28
|
library,
|
|
@@ -72,7 +70,7 @@ sap.ui.define([
|
|
|
72
70
|
* @class
|
|
73
71
|
* The column allows you to define column specific properties that will be applied when rendering the table.
|
|
74
72
|
* @extends sap.ui.core.Element
|
|
75
|
-
* @version 1.
|
|
73
|
+
* @version 1.117.0
|
|
76
74
|
*
|
|
77
75
|
* @constructor
|
|
78
76
|
* @public
|
|
@@ -321,6 +319,8 @@ sap.ui.define([
|
|
|
321
319
|
* a column in any way or create own instances of <code>sap.ui.table.ColumnMenu</code>.
|
|
322
320
|
* To add a custom menu to a column, use the aggregation <code>menu</code> with a new instance of
|
|
323
321
|
* <code>sap.ui.unified.Menu</code>.
|
|
322
|
+
*
|
|
323
|
+
* @deprecated As of version 1.117, use the <code>headerMenu</code> association instead.
|
|
324
324
|
*/
|
|
325
325
|
menu: {type: "sap.ui.unified.Menu", multiple: false}
|
|
326
326
|
},
|
|
@@ -336,6 +336,8 @@ sap.ui.define([
|
|
|
336
336
|
/**
|
|
337
337
|
* Fires before the column menu is opened.
|
|
338
338
|
* @since 1.33.0
|
|
339
|
+
*
|
|
340
|
+
* @deprecated As of version 1.117.
|
|
339
341
|
*/
|
|
340
342
|
columnMenuOpen: {
|
|
341
343
|
allowPreventDefault: true,
|
|
@@ -391,19 +393,6 @@ sap.ui.define([
|
|
|
391
393
|
ColumnHeaderMenuAdapter.unlink(this);
|
|
392
394
|
};
|
|
393
395
|
|
|
394
|
-
/**
|
|
395
|
-
* called when the column's parent is set
|
|
396
|
-
*/
|
|
397
|
-
Column.prototype.setParent = function() {
|
|
398
|
-
var vReturn = Element.prototype.setParent.apply(this, arguments);
|
|
399
|
-
var oMenu = this.getAggregation("menu");
|
|
400
|
-
if (oMenu && typeof oMenu._updateReferences === "function") {
|
|
401
|
-
//if menu is set update menus internal references
|
|
402
|
-
oMenu._updateReferences(this);
|
|
403
|
-
}
|
|
404
|
-
return vReturn;
|
|
405
|
-
};
|
|
406
|
-
|
|
407
396
|
/*
|
|
408
397
|
* @see JSDoc generated by SAPUI5 control API generator
|
|
409
398
|
*/
|
|
@@ -586,47 +575,20 @@ sap.ui.define([
|
|
|
586
575
|
return this;
|
|
587
576
|
};
|
|
588
577
|
|
|
589
|
-
/*
|
|
590
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
591
|
-
*/
|
|
592
|
-
Column.prototype.getMenu = function() {
|
|
593
|
-
var oMenu = this.getAggregation("menu");
|
|
594
|
-
if (!oMenu) {
|
|
595
|
-
oMenu = this._createMenu();
|
|
596
|
-
this.setMenu(oMenu);
|
|
597
|
-
}
|
|
598
|
-
return oMenu;
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* This function invalidates the column's menu. All items will be re-created the next time the menu opens. This only
|
|
603
|
-
* happens for generated menus.
|
|
604
|
-
* @private
|
|
605
|
-
*/
|
|
606
|
-
Column.prototype._invalidateMenu = function() {
|
|
607
|
-
var oMenu = this.getAggregation("menu");
|
|
608
|
-
|
|
609
|
-
if (oMenu && this._bMenuIsColumnMenu) {
|
|
610
|
-
oMenu._invalidate();
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
|
|
614
578
|
/**
|
|
615
|
-
* Checks whether
|
|
616
|
-
* properties to determine whether the column menu would have items.
|
|
617
|
-
* it will just check whether there are items in the item aggregation.
|
|
579
|
+
* Checks whether the menu has items. This function considers table and column
|
|
580
|
+
* properties to determine whether the column menu would have items.
|
|
618
581
|
* @returns {boolean} True if the menu has or could have items.
|
|
619
582
|
* @private
|
|
583
|
+
* @deprecated As of Version 1.117
|
|
620
584
|
*/
|
|
621
585
|
Column.prototype._menuHasItems = function() {
|
|
622
|
-
var oMenu = this.getAggregation("menu");
|
|
623
586
|
var oTable = this._getTable();
|
|
624
|
-
var bHasOwnItems = (
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|| this.isGroupableByMenu();
|
|
587
|
+
var bHasOwnItems = (oTable ? oTable.getEnableColumnFreeze() : false)
|
|
588
|
+
|| (oTable ? oTable.getShowColumnVisibilityMenu() : false)
|
|
589
|
+
|| this.isSortableByMenu()
|
|
590
|
+
|| this.isFilterableByMenu()
|
|
591
|
+
|| this.isGroupableByMenu();
|
|
630
592
|
|
|
631
593
|
if (bHasOwnItems) {
|
|
632
594
|
return true;
|
|
@@ -681,46 +643,6 @@ sap.ui.define([
|
|
|
681
643
|
return !!(oTable && oTable.getEnableGrouping && oTable.getEnableGrouping() && this.getSortProperty());
|
|
682
644
|
};
|
|
683
645
|
|
|
684
|
-
/*
|
|
685
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
686
|
-
*/
|
|
687
|
-
Column.prototype.setMenu = function(oMenu) {
|
|
688
|
-
this.setAggregation("menu", oMenu, true);
|
|
689
|
-
this._bMenuIsColumnMenu = TableUtils.isA(oMenu, "sap.ui.table.ColumnMenu");
|
|
690
|
-
return this;
|
|
691
|
-
};
|
|
692
|
-
|
|
693
|
-
/*
|
|
694
|
-
* Factory method. Creates the column menu.
|
|
695
|
-
*
|
|
696
|
-
* @returns {sap.ui.table.ColumnMenu} The created column menu.
|
|
697
|
-
*/
|
|
698
|
-
Column.prototype._createMenu = function() {
|
|
699
|
-
if (!this._defaultMenu) {
|
|
700
|
-
this._defaultMenu = new ColumnMenu(this.getId() + "-menu", {ariaLabelledBy: this});
|
|
701
|
-
}
|
|
702
|
-
return this._defaultMenu;
|
|
703
|
-
};
|
|
704
|
-
|
|
705
|
-
/*
|
|
706
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
707
|
-
*/
|
|
708
|
-
Column.prototype.setSortProperty = function(sValue) {
|
|
709
|
-
this.setProperty("sortProperty", sValue);
|
|
710
|
-
this._invalidateMenu();
|
|
711
|
-
return this;
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
/*
|
|
715
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
716
|
-
*/
|
|
717
|
-
Column.prototype.setShowSortMenuEntry = function(sValue) {
|
|
718
|
-
if (this.getShowSortMenuEntry() != sValue) {
|
|
719
|
-
this._invalidateMenu();
|
|
720
|
-
}
|
|
721
|
-
return this.setProperty("showSortMenuEntry", sValue);
|
|
722
|
-
};
|
|
723
|
-
|
|
724
646
|
/*
|
|
725
647
|
* @see JSDoc generated by SAPUI5 control API generator
|
|
726
648
|
*/
|
|
@@ -739,24 +661,6 @@ sap.ui.define([
|
|
|
739
661
|
return this;
|
|
740
662
|
};
|
|
741
663
|
|
|
742
|
-
/*
|
|
743
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
744
|
-
*/
|
|
745
|
-
Column.prototype.setFilterProperty = function(sValue) {
|
|
746
|
-
this._invalidateMenu();
|
|
747
|
-
return this.setProperty("filterProperty", sValue);
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
/*
|
|
751
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
752
|
-
*/
|
|
753
|
-
Column.prototype.setShowFilterMenuEntry = function(sValue) {
|
|
754
|
-
if (this.getShowFilterMenuEntry() != sValue) {
|
|
755
|
-
this._invalidateMenu();
|
|
756
|
-
}
|
|
757
|
-
return this.setProperty("showFilterMenuEntry", sValue);
|
|
758
|
-
};
|
|
759
|
-
|
|
760
664
|
/*
|
|
761
665
|
* @see JSDoc generated by SAPUI5 control API generator
|
|
762
666
|
*/
|
|
@@ -766,20 +670,6 @@ sap.ui.define([
|
|
|
766
670
|
return this;
|
|
767
671
|
};
|
|
768
672
|
|
|
769
|
-
/*
|
|
770
|
-
* @see JSDoc generated by SAPUI5 control API generator
|
|
771
|
-
*/
|
|
772
|
-
Column.prototype.setFilterValue = function(sValue) {
|
|
773
|
-
this.setProperty("filterValue", sValue, true);
|
|
774
|
-
|
|
775
|
-
var oMenu = this.getMenu();
|
|
776
|
-
if (this._bMenuIsColumnMenu) {
|
|
777
|
-
oMenu._setFilterValue(sValue);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
return this;
|
|
781
|
-
};
|
|
782
|
-
|
|
783
673
|
/*
|
|
784
674
|
* @see JSDoc generated by SAPUI5 control API generator
|
|
785
675
|
*/
|
|
@@ -787,44 +677,20 @@ sap.ui.define([
|
|
|
787
677
|
return this.setProperty("filterOperator", sValue, true);
|
|
788
678
|
};
|
|
789
679
|
|
|
790
|
-
/**
|
|
791
|
-
* Open the column menu.
|
|
792
|
-
* @param {Object} [oDomRef] DOM reference of the element to which the menu should be visually attached. Fallback is the focused DOM reference.
|
|
793
|
-
* @returns {boolean} Whether the menu was opened.
|
|
794
|
-
* @private
|
|
795
|
-
*/
|
|
796
|
-
Column.prototype._openMenu = function(oDomRef) {
|
|
797
|
-
var oMenu = this.getMenu();
|
|
798
|
-
|
|
799
|
-
if (!this._menuHasItems()) {
|
|
800
|
-
return false;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
var bExecuteDefault = this.fireColumnMenuOpen({
|
|
804
|
-
menu: oMenu
|
|
805
|
-
});
|
|
806
|
-
|
|
807
|
-
if (bExecuteDefault) {
|
|
808
|
-
var eDock = Popup.Dock;
|
|
809
|
-
var oFocusDomRef = oDomRef;
|
|
810
|
-
if (!oDomRef) {
|
|
811
|
-
oDomRef = this.getDomRef();
|
|
812
|
-
oFocusDomRef = this.getFocusDomRef();
|
|
813
|
-
}
|
|
814
|
-
oMenu.open(null, oFocusDomRef, eDock.BeginTop, eDock.BeginBottom, oDomRef);
|
|
815
|
-
return true;
|
|
816
|
-
} else {
|
|
817
|
-
return true; // We do not know whether the event handler opens a context menu or not, so we just assume it is done.
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
|
|
821
680
|
Column.prototype._openHeaderMenu = function(oDomRef) {
|
|
681
|
+
if (!oDomRef) {
|
|
682
|
+
oDomRef = this.getDomRef();
|
|
683
|
+
}
|
|
822
684
|
var oHeaderMenu = this.getHeaderMenuInstance();
|
|
823
|
-
|
|
824
|
-
|
|
685
|
+
/**
|
|
686
|
+
* @deprecated As of Version 1.117
|
|
687
|
+
*/
|
|
688
|
+
this._cellPressed = oDomRef;
|
|
689
|
+
ColumnHeaderMenuAdapter.activateFor(this).then(function() {
|
|
690
|
+
if (oHeaderMenu) {
|
|
825
691
|
oHeaderMenu.openBy(oDomRef);
|
|
826
|
-
}
|
|
827
|
-
}
|
|
692
|
+
}
|
|
693
|
+
});
|
|
828
694
|
};
|
|
829
695
|
|
|
830
696
|
Column.prototype._isHeaderMenuOpen = function() {
|
|
@@ -832,9 +698,6 @@ sap.ui.define([
|
|
|
832
698
|
if (oHeaderMenu) {
|
|
833
699
|
return oHeaderMenu.isOpen();
|
|
834
700
|
}
|
|
835
|
-
|
|
836
|
-
var oMenu = this.getAggregation("menu");
|
|
837
|
-
return oMenu ? oMenu.bOpen : false;
|
|
838
701
|
};
|
|
839
702
|
|
|
840
703
|
Column.prototype._setGrouped = function(bGrouped) {
|
|
@@ -1089,33 +952,27 @@ sap.ui.define([
|
|
|
1089
952
|
this.setProperty("filtered", !!sValue, true);
|
|
1090
953
|
this.setProperty("filterValue", sValue, true);
|
|
1091
954
|
|
|
1092
|
-
var oMenu = this.getMenu();
|
|
1093
|
-
if (this._bMenuIsColumnMenu) {
|
|
1094
|
-
// update column menu input field
|
|
1095
|
-
oMenu._setFilterValue(sValue);
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
955
|
var aFilters = [];
|
|
1099
956
|
var aCols = oTable.getColumns();
|
|
1100
957
|
for (var i = 0, l = aCols.length; i < l; i++) {
|
|
1101
958
|
var oCol = aCols[i],
|
|
1102
|
-
oFilter
|
|
959
|
+
oFilter,
|
|
960
|
+
sState;
|
|
1103
961
|
|
|
1104
|
-
oMenu = oCol.getMenu();
|
|
1105
962
|
try {
|
|
1106
963
|
oFilter = oCol._getFilter();
|
|
1107
|
-
|
|
1108
|
-
oMenu._setFilterState(ValueState.None);
|
|
1109
|
-
}
|
|
964
|
+
sState = ValueState.None;
|
|
1110
965
|
} catch (e) {
|
|
1111
|
-
|
|
1112
|
-
oMenu._setFilterState(ValueState.Error);
|
|
1113
|
-
}
|
|
1114
|
-
continue;
|
|
966
|
+
sState = ValueState.Error;
|
|
1115
967
|
}
|
|
1116
968
|
if (oFilter) {
|
|
1117
969
|
aFilters.push(oFilter);
|
|
1118
970
|
}
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* @deprecated As of Version 1.117
|
|
974
|
+
*/
|
|
975
|
+
TableUtils.Hook.call(this._getTable(), TableUtils.Hook.Keys.Column.SetFilterState, oCol, sState);
|
|
1119
976
|
}
|
|
1120
977
|
oTable.getBinding().filter(aFilters, FilterType.Control);
|
|
1121
978
|
|
|
@@ -1336,13 +1193,6 @@ sap.ui.define([
|
|
|
1336
1193
|
}
|
|
1337
1194
|
};
|
|
1338
1195
|
|
|
1339
|
-
Column.prototype._closeMenu = function() {
|
|
1340
|
-
var oMenu = this.getAggregation("menu");
|
|
1341
|
-
if (oMenu) {
|
|
1342
|
-
oMenu.close();
|
|
1343
|
-
}
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
1196
|
/**
|
|
1347
1197
|
* Gets the table this column is inside.
|
|
1348
1198
|
*
|
|
@@ -39,11 +39,13 @@ sap.ui.define([
|
|
|
39
39
|
* @class
|
|
40
40
|
* The column menu provides all common actions that can be performed on a column.
|
|
41
41
|
* @extends sap.ui.unified.Menu
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.117.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @public
|
|
46
46
|
* @alias sap.ui.table.ColumnMenu
|
|
47
|
+
*
|
|
48
|
+
* @deprecated As of version 1.117, use the {@link sap.m.table.columnmenu.Menu} instead.
|
|
47
49
|
*/
|
|
48
50
|
var ColumnMenu = Menu.extend("sap.ui.table.ColumnMenu", /** @lends sap.ui.table.ColumnMenu.prototype */ {
|
|
49
51
|
metadata: {
|
|
@@ -63,8 +65,6 @@ sap.ui.define([
|
|
|
63
65
|
this.addStyleClass("sapUiTableColumnMenu");
|
|
64
66
|
this._bInvalidated = true;
|
|
65
67
|
this._iPopupClosedTimeoutId = null;
|
|
66
|
-
this._oColumn = null;
|
|
67
|
-
this._oTable = null;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -76,8 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
Menu.prototype.exit.apply(this, arguments);
|
|
77
77
|
}
|
|
78
78
|
window.clearTimeout(this._iPopupClosedTimeoutId);
|
|
79
|
-
ColumnMenu._destroyColumnVisibilityMenuItem(this.
|
|
80
|
-
this._oColumn = this._oTable = null;
|
|
79
|
+
ColumnMenu._destroyColumnVisibilityMenuItem(this._getTable());
|
|
81
80
|
};
|
|
82
81
|
|
|
83
82
|
/**
|
|
@@ -103,21 +102,17 @@ sap.ui.define([
|
|
|
103
102
|
*/
|
|
104
103
|
ColumnMenu.prototype.setParent = function(oParent) {
|
|
105
104
|
this._invalidate();
|
|
106
|
-
this._updateReferences(oParent);
|
|
107
105
|
return Menu.prototype.setParent.apply(this, arguments);
|
|
108
106
|
};
|
|
109
107
|
|
|
110
|
-
ColumnMenu.prototype.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
ColumnMenu.prototype._getColumn = function() {
|
|
109
|
+
var oParent = this.getParent();
|
|
110
|
+
return TableUtils.isA(oParent, "sap.ui.table.Column") ? oParent : null;
|
|
111
|
+
};
|
|
114
112
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"ColumnMenu.setParent: parent of parent must be subclass of sap.ui.table.Table");
|
|
119
|
-
}
|
|
120
|
-
}
|
|
113
|
+
ColumnMenu.prototype._getTable = function() {
|
|
114
|
+
var oColumn = this._getColumn();
|
|
115
|
+
return oColumn ? oColumn._getTable() : null;
|
|
121
116
|
};
|
|
122
117
|
|
|
123
118
|
ColumnMenu._destroyColumnVisibilityMenuItem = function(oTable) {
|
|
@@ -129,10 +124,11 @@ sap.ui.define([
|
|
|
129
124
|
};
|
|
130
125
|
|
|
131
126
|
ColumnMenu.prototype._removeColumnVisibilityFromAggregation = function() {
|
|
132
|
-
|
|
127
|
+
var oTable = this._getTable();
|
|
128
|
+
if (!oTable || oTable._oColumnVisibilityMenuItem) {
|
|
133
129
|
return;
|
|
134
130
|
}
|
|
135
|
-
this.removeAggregation("items",
|
|
131
|
+
this.removeAggregation("items", oTable._oColumnVisibilityMenuItem, true);
|
|
136
132
|
};
|
|
137
133
|
|
|
138
134
|
/**
|
|
@@ -151,14 +147,16 @@ sap.ui.define([
|
|
|
151
147
|
* @private
|
|
152
148
|
*/
|
|
153
149
|
ColumnMenu.prototype.open = function() {
|
|
150
|
+
if (!this._bInvalidated && this._getColumn()) {
|
|
151
|
+
this._addColumnVisibilityMenuItem();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
154
|
if (this._bInvalidated) {
|
|
155
155
|
this._bInvalidated = false;
|
|
156
156
|
this._addMenuItems();
|
|
157
|
-
} else if (this._oColumn) {
|
|
158
|
-
this._addColumnVisibilityMenuItem();
|
|
159
157
|
}
|
|
160
158
|
|
|
161
|
-
TableUtils.Hook.call(this.
|
|
159
|
+
TableUtils.Hook.call(this._getTable(), TableUtils.Hook.Keys.Table.OpenMenu, TableUtils.getCellInfo(arguments[4]), this);
|
|
162
160
|
|
|
163
161
|
if (this.getItems().length > 0) {
|
|
164
162
|
this._lastFocusedDomRef = arguments[4];
|
|
@@ -171,8 +169,7 @@ sap.ui.define([
|
|
|
171
169
|
* @private
|
|
172
170
|
*/
|
|
173
171
|
ColumnMenu.prototype._addMenuItems = function() {
|
|
174
|
-
|
|
175
|
-
if (this._oColumn) {
|
|
172
|
+
if (this._getColumn()) {
|
|
176
173
|
// items can only be created if the menus parent is a column
|
|
177
174
|
// since column properties must be evaluated in order to create the items.
|
|
178
175
|
this._addSortMenuItem(false);
|
|
@@ -190,7 +187,7 @@ sap.ui.define([
|
|
|
190
187
|
* @private
|
|
191
188
|
*/
|
|
192
189
|
ColumnMenu.prototype._addSortMenuItem = function(bDesc) {
|
|
193
|
-
var oColumn = this.
|
|
190
|
+
var oColumn = this._getColumn();
|
|
194
191
|
|
|
195
192
|
if (oColumn.isSortableByMenu()) {
|
|
196
193
|
var sDir = bDesc ? "desc" : "asc";
|
|
@@ -212,7 +209,7 @@ sap.ui.define([
|
|
|
212
209
|
* @private
|
|
213
210
|
*/
|
|
214
211
|
ColumnMenu.prototype._addFilterMenuItem = function() {
|
|
215
|
-
var oColumn = this.
|
|
212
|
+
var oColumn = this._getColumn();
|
|
216
213
|
|
|
217
214
|
if (oColumn.isFilterableByMenu()) {
|
|
218
215
|
var oTable = oColumn.getParent();
|
|
@@ -248,10 +245,10 @@ sap.ui.define([
|
|
|
248
245
|
* @private
|
|
249
246
|
*/
|
|
250
247
|
ColumnMenu.prototype._addGroupMenuItem = function() {
|
|
251
|
-
var oColumn = this.
|
|
248
|
+
var oColumn = this._getColumn();
|
|
252
249
|
|
|
253
250
|
if (oColumn.isGroupableByMenu()) {
|
|
254
|
-
var oTable = this.
|
|
251
|
+
var oTable = this._getTable();
|
|
255
252
|
|
|
256
253
|
this.addItem(this._createMenuItem(
|
|
257
254
|
"group",
|
|
@@ -280,8 +277,8 @@ sap.ui.define([
|
|
|
280
277
|
* @private
|
|
281
278
|
*/
|
|
282
279
|
ColumnMenu.prototype._addFreezeMenuItem = function() {
|
|
283
|
-
var oColumn = this.
|
|
284
|
-
var oTable = this.
|
|
280
|
+
var oColumn = this._getColumn();
|
|
281
|
+
var oTable = this._getTable();
|
|
285
282
|
var bColumnFreezeEnabled = oTable && oTable.getEnableColumnFreeze();
|
|
286
283
|
|
|
287
284
|
if (bColumnFreezeEnabled) {
|
|
@@ -316,7 +313,7 @@ sap.ui.define([
|
|
|
316
313
|
* @private
|
|
317
314
|
*/
|
|
318
315
|
ColumnMenu.prototype._addColumnVisibilityMenuItem = function() {
|
|
319
|
-
var oTable = this.
|
|
316
|
+
var oTable = this._getTable();
|
|
320
317
|
|
|
321
318
|
if (oTable && oTable.getShowColumnVisibilityMenu()) {
|
|
322
319
|
if (!oTable._oColumnVisibilityMenuItem || oTable._oColumnVisibilityMenuItem.bIsDestroyed) {
|
|
@@ -338,7 +335,7 @@ sap.ui.define([
|
|
|
338
335
|
* @private
|
|
339
336
|
*/
|
|
340
337
|
ColumnMenu.prototype._createColumnVisibilityMenuItem = function(oColumn) {
|
|
341
|
-
var oTable = this.
|
|
338
|
+
var oTable = this._getTable();
|
|
342
339
|
var sText = TableUtils.Column.getHeaderText(oColumn);
|
|
343
340
|
|
|
344
341
|
return new MenuItem({
|
|
@@ -347,8 +344,7 @@ sap.ui.define([
|
|
|
347
344
|
ariaLabelledBy: [oTable.getId() + (oColumn.getVisible() ? "-ariahidecolmenu" : "-ariashowcolmenu")],
|
|
348
345
|
select: jQuery.proxy(function(oEvent) {
|
|
349
346
|
var bVisible = !oColumn.getVisible();
|
|
350
|
-
if (bVisible || TableUtils.getVisibleColumnCount(
|
|
351
|
-
var oTable = oColumn.getParent();
|
|
347
|
+
if (bVisible || TableUtils.getVisibleColumnCount(oTable) > 1) {
|
|
352
348
|
var bExecuteDefault = true;
|
|
353
349
|
if (TableUtils.isA(oTable, "sap.ui.table.Table")) {
|
|
354
350
|
bExecuteDefault = oTable.fireColumnVisibility({
|
|
@@ -466,7 +462,7 @@ sap.ui.define([
|
|
|
466
462
|
}
|
|
467
463
|
|
|
468
464
|
ColumnMenu.prototype._updateColumnVisibilityMenuItem = function() {
|
|
469
|
-
var oTable = this.
|
|
465
|
+
var oTable = this._getTable();
|
|
470
466
|
if (!oTable || !oTable._oColumnVisibilityMenuItem) {
|
|
471
467
|
return;
|
|
472
468
|
}
|