@openui5/sap.ui.table 1.131.0 → 1.132.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 +2 -2
- package/src/sap/ui/table/AnalyticalColumn.js +2 -2
- package/src/sap/ui/table/AnalyticalColumnMenu.js +2 -2
- package/src/sap/ui/table/AnalyticalTable.js +21 -33
- package/src/sap/ui/table/Column.js +5 -2
- package/src/sap/ui/table/ColumnMenu.js +2 -2
- package/src/sap/ui/table/CreationRow.js +2 -2
- package/src/sap/ui/table/CreationRowRenderer.js +1 -1
- package/src/sap/ui/table/Row.js +5 -3
- package/src/sap/ui/table/RowAction.js +2 -2
- package/src/sap/ui/table/RowActionItem.js +2 -2
- package/src/sap/ui/table/RowActionRenderer.js +1 -1
- package/src/sap/ui/table/RowSettings.js +2 -2
- package/src/sap/ui/table/Table.js +44 -44
- package/src/sap/ui/table/TablePersoController.js +2 -2
- package/src/sap/ui/table/TableRenderer.js +1 -4
- package/src/sap/ui/table/TreeTable.js +2 -2
- package/src/sap/ui/table/designtime/AnalyticalTable.designtime.js +1 -1
- package/src/sap/ui/table/designtime/Table.designtime.js +1 -1
- package/src/sap/ui/table/designtime/library.designtime.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +2 -2
- package/src/sap/ui/table/extensions/AccessibilityRender.js +2 -2
- package/src/sap/ui/table/extensions/DragAndDrop.js +2 -2
- package/src/sap/ui/table/extensions/ExtensionBase.js +2 -2
- package/src/sap/ui/table/extensions/Keyboard.js +2 -2
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +2 -2
- package/src/sap/ui/table/extensions/Pointer.js +2 -2
- package/src/sap/ui/table/extensions/Scrolling.js +2 -2
- package/src/sap/ui/table/extensions/ScrollingIOS.js +2 -2
- package/src/sap/ui/table/extensions/Synchronization.js +2 -2
- package/src/sap/ui/table/library.js +12 -12
- package/src/sap/ui/table/library.support.js +1 -1
- package/src/sap/ui/table/menus/AnalyticalTableContextMenu.js +299 -0
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +2 -2
- package/src/sap/ui/table/menus/ContextMenu.js +154 -0
- package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +2 -2
- 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_saptrc.properties +91 -72
- 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 +2 -2
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +2 -2
- package/src/sap/ui/table/plugins/ODataV4Selection.js +2 -1
- package/src/sap/ui/table/plugins/PluginBase.js +2 -2
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +2 -2
- package/src/sap/ui/table/plugins/SelectionPlugin.js +2 -2
- package/src/sap/ui/table/plugins/V4Aggregation.js +2 -2
- package/src/sap/ui/table/rowmodes/Auto.js +2 -2
- package/src/sap/ui/table/rowmodes/Fixed.js +2 -2
- package/src/sap/ui/table/rowmodes/Interactive.js +2 -2
- package/src/sap/ui/table/rowmodes/RowMode.js +2 -2
- package/src/sap/ui/table/rowmodes/Type.js +1 -1
- package/src/sap/ui/table/rowmodes/Variable.js +2 -2
- package/src/sap/ui/table/rules/Accessibility.support.js +1 -1
- package/src/sap/ui/table/rules/Binding.support.js +1 -1
- package/src/sap/ui/table/rules/ColumnTemplate.support.js +1 -1
- package/src/sap/ui/table/rules/Plugins.support.js +1 -1
- package/src/sap/ui/table/rules/Rows.support.js +1 -1
- package/src/sap/ui/table/rules/TableHelper.support.js +1 -1
- package/src/sap/ui/table/themes/base/library.source.less +1 -1
- package/src/sap/ui/table/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/table/utils/TableUtils.js +4 -42
- package/src/sap/ui/table/utils/_BindingUtils.js +2 -2
- package/src/sap/ui/table/utils/_ColumnUtils.js +2 -2
- package/src/sap/ui/table/utils/_GroupingUtils.js +2 -2
- package/src/sap/ui/table/utils/_HookUtils.js +2 -12
- package/src/sap/ui/table/utils/_MenuUtils.js +22 -106
- package/src/sap/ui/table/menus/GroupHeaderContextMenuAdapter.js +0 -332
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -274,7 +274,7 @@ sap.ui.define([
|
|
|
274
274
|
*
|
|
275
275
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
276
276
|
* @author SAP SE
|
|
277
|
-
* @version 1.
|
|
277
|
+
* @version 1.132.0
|
|
278
278
|
* @constructor
|
|
279
279
|
* @private
|
|
280
280
|
* @alias sap.ui.table.extensions.DragAndDrop
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* @abstract
|
|
20
20
|
* @extends sap.ui.base.Object
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.132.0
|
|
23
23
|
* @constructor
|
|
24
24
|
* @private
|
|
25
25
|
* @alias sap.ui.table.extensions.ExtensionBase
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -267,7 +267,7 @@ sap.ui.define([
|
|
|
267
267
|
* @class Extension for sap.ui.table.Table which handles keyboard related things.
|
|
268
268
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
269
269
|
* @author SAP SE
|
|
270
|
-
* @version 1.
|
|
270
|
+
* @version 1.132.0
|
|
271
271
|
* @constructor
|
|
272
272
|
* @private
|
|
273
273
|
* @alias sap.ui.table.extensions.Keyboard
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
*
|
|
66
66
|
* @extends sap.ui.base.Object
|
|
67
67
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
68
|
+
* @version 1.132.0
|
|
69
69
|
* @constructor
|
|
70
70
|
* @private
|
|
71
71
|
* @alias sap.ui.table.extensions.KeyboardDelegate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -670,7 +670,7 @@ sap.ui.define([
|
|
|
670
670
|
* @class Extension for sap.ui.table.Table which handles mouse and touch related things.
|
|
671
671
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
672
672
|
* @author SAP SE
|
|
673
|
-
* @version 1.
|
|
673
|
+
* @version 1.132.0
|
|
674
674
|
* @constructor
|
|
675
675
|
* @private
|
|
676
676
|
* @alias sap.ui.table.extensions.Pointer
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -2295,7 +2295,7 @@ sap.ui.define([
|
|
|
2295
2295
|
* @class Extension for sap.ui.table.Table which handles scrolling.
|
|
2296
2296
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
2297
2297
|
* @author SAP SE
|
|
2298
|
-
* @version 1.
|
|
2298
|
+
* @version 1.132.0
|
|
2299
2299
|
* @constructor
|
|
2300
2300
|
* @private
|
|
2301
2301
|
* @alias sap.ui.table.extensions.Scrolling
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class Extension for sap.ui.table.Table which handles the scrollbar on iOS.
|
|
28
28
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.132.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @alias sap.ui.table.extensions.ScrollingIOS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -185,7 +185,7 @@ sap.ui.define([
|
|
|
185
185
|
* @class Extension for sap.ui.table.Table that allows synchronization with a table.
|
|
186
186
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
187
187
|
* @author SAP SE
|
|
188
|
-
* @version 1.
|
|
188
|
+
* @version 1.132.0
|
|
189
189
|
* @constructor
|
|
190
190
|
* @private
|
|
191
191
|
* @alias sap.ui.table.extensions.Synchronization
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -27,14 +27,14 @@ sap.ui.define([
|
|
|
27
27
|
* @namespace
|
|
28
28
|
* @alias sap.ui.table
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.132.0
|
|
31
31
|
* @since 0.8
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
34
|
const thisLib = Library.init({
|
|
35
35
|
name: "sap.ui.table",
|
|
36
36
|
apiVersion: 2,
|
|
37
|
-
version: "1.
|
|
37
|
+
version: "1.132.0",
|
|
38
38
|
dependencies: ["sap.ui.core", "sap.ui.unified"],
|
|
39
39
|
designtime: "sap/ui/table/designtime/library.designtime",
|
|
40
40
|
types: [
|
|
@@ -96,7 +96,7 @@ sap.ui.define([
|
|
|
96
96
|
/**
|
|
97
97
|
* Navigation mode of the table
|
|
98
98
|
*
|
|
99
|
-
* @version 1.
|
|
99
|
+
* @version 1.132.0
|
|
100
100
|
* @enum {string}
|
|
101
101
|
* @deprecated As of version 1.38, the concept has been discarded.
|
|
102
102
|
* @public
|
|
@@ -127,7 +127,7 @@ sap.ui.define([
|
|
|
127
127
|
/**
|
|
128
128
|
* Row Action types.
|
|
129
129
|
*
|
|
130
|
-
* @version 1.
|
|
130
|
+
* @version 1.132.0
|
|
131
131
|
* @enum {string}
|
|
132
132
|
* @public
|
|
133
133
|
*/
|
|
@@ -158,7 +158,7 @@ sap.ui.define([
|
|
|
158
158
|
/**
|
|
159
159
|
* Selection behavior of the table
|
|
160
160
|
*
|
|
161
|
-
* @version 1.
|
|
161
|
+
* @version 1.132.0
|
|
162
162
|
* @enum {string}
|
|
163
163
|
* @public
|
|
164
164
|
*/
|
|
@@ -189,7 +189,7 @@ sap.ui.define([
|
|
|
189
189
|
/**
|
|
190
190
|
* Selection mode of the table
|
|
191
191
|
*
|
|
192
|
-
* @version 1.
|
|
192
|
+
* @version 1.132.0
|
|
193
193
|
* @enum {string}
|
|
194
194
|
* @public
|
|
195
195
|
*/
|
|
@@ -227,7 +227,7 @@ sap.ui.define([
|
|
|
227
227
|
/**
|
|
228
228
|
* Sort order of a column
|
|
229
229
|
*
|
|
230
|
-
* @version 1.
|
|
230
|
+
* @version 1.132.0
|
|
231
231
|
* @enum {string}
|
|
232
232
|
* @public
|
|
233
233
|
* @deprecated As of version 1.120, replaced with <code>sap.ui.core.SortOrder</code>
|
|
@@ -254,7 +254,7 @@ sap.ui.define([
|
|
|
254
254
|
/**
|
|
255
255
|
* VisibleRowCountMode of the table
|
|
256
256
|
*
|
|
257
|
-
* @version 1.
|
|
257
|
+
* @version 1.132.0
|
|
258
258
|
* @enum {string}
|
|
259
259
|
* @deprecated As of version 1.119, see the <code>rowMode</code> aggregation of <code>sap.ui.table.Table</code> for more details.
|
|
260
260
|
* @public
|
|
@@ -299,7 +299,7 @@ sap.ui.define([
|
|
|
299
299
|
*
|
|
300
300
|
* Contains IDs of shared DOM references, which should be accessible to inheriting controls via getDomRef() function.
|
|
301
301
|
*
|
|
302
|
-
* @version 1.
|
|
302
|
+
* @version 1.132.0
|
|
303
303
|
* @enum {string}
|
|
304
304
|
* @public
|
|
305
305
|
*/
|
|
@@ -400,7 +400,7 @@ sap.ui.define([
|
|
|
400
400
|
*
|
|
401
401
|
* This is an alias for {@link sap.ui.model.TreeAutoExpandMode} and kept for compatibility reasons.
|
|
402
402
|
*
|
|
403
|
-
* @version 1.
|
|
403
|
+
* @version 1.132.0
|
|
404
404
|
* @typedef {sap.ui.model.TreeAutoExpandMode}
|
|
405
405
|
* @public
|
|
406
406
|
* @deprecated As of version 1.120, replaced by <code>sap.ui.model.TreeAutoExpandMode</code>
|
|
@@ -414,7 +414,7 @@ sap.ui.define([
|
|
|
414
414
|
/**
|
|
415
415
|
* Mode of a selection plugin
|
|
416
416
|
*
|
|
417
|
-
* @version 1.
|
|
417
|
+
* @version 1.132.0
|
|
418
418
|
* @enum {string}
|
|
419
419
|
* @private
|
|
420
420
|
*/
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"./ContextMenu",
|
|
9
|
+
"../library",
|
|
10
|
+
"../utils/TableUtils",
|
|
11
|
+
"sap/ui/core/library",
|
|
12
|
+
"sap/ui/unified/Menu",
|
|
13
|
+
"sap/ui/unified/MenuItem"
|
|
14
|
+
], function(
|
|
15
|
+
ContextMenu,
|
|
16
|
+
Library,
|
|
17
|
+
TableUtils,
|
|
18
|
+
CoreLibrary,
|
|
19
|
+
Menu,
|
|
20
|
+
MenuItem
|
|
21
|
+
) {
|
|
22
|
+
"use strict";
|
|
23
|
+
|
|
24
|
+
const SortOrder = CoreLibrary.SortOrder;
|
|
25
|
+
const GroupEventType = Library.GroupEventType;
|
|
26
|
+
const aBasicItemKeys = [
|
|
27
|
+
"ungroup",
|
|
28
|
+
"collapse",
|
|
29
|
+
"expand"
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Constructor for a new AnalyticalTableContextMenu.
|
|
34
|
+
*
|
|
35
|
+
* @class
|
|
36
|
+
* @extends sap.ui.table.menus.ContextMenu
|
|
37
|
+
* @author SAP SE
|
|
38
|
+
* @version 1.132.0
|
|
39
|
+
* @private
|
|
40
|
+
* @alias sap.ui.table.menus.AnalyticalTableContextMenu
|
|
41
|
+
*/
|
|
42
|
+
const AnalyticalTableContextMenu = ContextMenu.extend("sap.ui.table.menus.AnalyticalTableContextMenu", {
|
|
43
|
+
metadata: {
|
|
44
|
+
library: "sap.ui.table"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
AnalyticalTableContextMenu.prototype.init = function() {
|
|
49
|
+
Menu.prototype.init.apply(this, arguments);
|
|
50
|
+
this._mItems = new Map();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
AnalyticalTableContextMenu.prototype.initContent = function(oRow, oColumn) {
|
|
54
|
+
ContextMenu.prototype.initContent.apply(this, arguments);
|
|
55
|
+
|
|
56
|
+
const oMenu = this.getMenu();
|
|
57
|
+
const oTable = this.getTable();
|
|
58
|
+
const bExtendedMenu = !!oTable.getProperty("extendedGroupHeaderMenu");
|
|
59
|
+
|
|
60
|
+
if (!oRow.isGroupHeader()) {
|
|
61
|
+
this._mItems.values().forEach((oMenuItem) => oMenuItem.setVisible(false));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
this._iGroupLevel = oRow.getLevel();
|
|
66
|
+
|
|
67
|
+
if (this._mItems.size === 0) {
|
|
68
|
+
this._createItems(oTable);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
for (const [sKey, oMenuItem] of this._mItems.entries()) {
|
|
72
|
+
oMenuItem.setVisible(aBasicItemKeys.includes(sKey) ? true : bExtendedMenu);
|
|
73
|
+
|
|
74
|
+
if (!oMenu.getItems().includes(oMenuItem)) {
|
|
75
|
+
oMenu.addItem(oMenuItem);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!bExtendedMenu) {
|
|
80
|
+
// Invisible items don't need to be updated.
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const oGroupedColumn = getGroupedColumn(oTable, this._iGroupLevel);
|
|
85
|
+
const [oMoveUpItem, oMoveDownItem] = this._mItems.get("move").getSubmenu().getItems();
|
|
86
|
+
const oVisibilityItem = this._mItems.get("visibility");
|
|
87
|
+
|
|
88
|
+
if (oGroupedColumn) {
|
|
89
|
+
if (oGroupedColumn.getShowIfGrouped()) {
|
|
90
|
+
oVisibilityItem.setText(TableUtils.getResourceText("TBL_HIDE_COLUMN"));
|
|
91
|
+
} else {
|
|
92
|
+
oVisibilityItem.setText(TableUtils.getResourceText("TBL_SHOW_COLUMN"));
|
|
93
|
+
}
|
|
94
|
+
oMoveUpItem.setEnabled(this._iGroupLevel > 1);
|
|
95
|
+
oMoveDownItem.setEnabled(this._iGroupLevel < oTable._aGroupedColumns.length);
|
|
96
|
+
} else {
|
|
97
|
+
oMoveUpItem.setEnabled(true);
|
|
98
|
+
oMoveDownItem.setEnabled(true);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
AnalyticalTableContextMenu.prototype._createItems = function(oTable) {
|
|
103
|
+
this._mItems.set("ungroup", this._createUngroupItem(oTable));
|
|
104
|
+
this._mItems.set("collapse", this._createCollapseItem(oTable));
|
|
105
|
+
this._mItems.set("expand", this._createExpandItem(oTable));
|
|
106
|
+
this._mItems.set("visibility", this._createVisibilityItem(oTable));
|
|
107
|
+
this._mItems.set("move", this._createMoveItem(oTable));
|
|
108
|
+
this._mItems.set("sort", this._createSortItem(oTable));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
AnalyticalTableContextMenu.prototype._createUngroupItem = function(oTable) {
|
|
112
|
+
return new MenuItem({
|
|
113
|
+
text: TableUtils.getResourceText("TBL_UNGROUP"),
|
|
114
|
+
submenu: new Menu({
|
|
115
|
+
items: [
|
|
116
|
+
new MenuItem({
|
|
117
|
+
text: TableUtils.getResourceText("TBL_UNGROUP_LEVEL"),
|
|
118
|
+
select: () => {
|
|
119
|
+
const oColumn = getGroupedColumn(oTable, this._iGroupLevel);
|
|
120
|
+
|
|
121
|
+
oColumn.setGrouped(false);
|
|
122
|
+
oTable.fireGroup({
|
|
123
|
+
column: oColumn,
|
|
124
|
+
groupedColumns: oTable._aGroupedColumns,
|
|
125
|
+
type: GroupEventType.ungroup
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
new MenuItem({
|
|
130
|
+
text: TableUtils.getResourceText("TBL_UNGROUP_ALL"),
|
|
131
|
+
select: () => {
|
|
132
|
+
oTable.suspendUpdateAnalyticalInfo();
|
|
133
|
+
|
|
134
|
+
for (const oColumn of oTable.getColumns()) {
|
|
135
|
+
oColumn.setGrouped(false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
oTable.resumeUpdateAnalyticalInfo();
|
|
139
|
+
oTable.fireGroup({column: undefined, groupedColumns: [], type: GroupEventType.ungroupAll});
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
AnalyticalTableContextMenu.prototype._createCollapseItem = function(oTable) {
|
|
148
|
+
return new MenuItem({
|
|
149
|
+
text: TableUtils.getResourceText("TBL_COLLAPSE"),
|
|
150
|
+
icon: "sap-icon://collapse-all",
|
|
151
|
+
submenu: new Menu({
|
|
152
|
+
items: [
|
|
153
|
+
new MenuItem({
|
|
154
|
+
text: TableUtils.getResourceText("TBL_COLLAPSE_LEVEL"),
|
|
155
|
+
select: () => {
|
|
156
|
+
// Why -1? Because the "Collapse Level" Menu Entry should collapse TO the given level - 1
|
|
157
|
+
// So collapsing level 1 means actually all nodes up TO level 0 will be collapsed.
|
|
158
|
+
// Potential negative values are handled by the binding.
|
|
159
|
+
oTable.getBinding().collapseToLevel(this._iGroupLevel - 1);
|
|
160
|
+
oTable.setFirstVisibleRow(0); //scroll to top after collapsing (so no rows vanish)
|
|
161
|
+
oTable._getSelectionPlugin().clearSelection();
|
|
162
|
+
}
|
|
163
|
+
}),
|
|
164
|
+
new MenuItem({
|
|
165
|
+
text: TableUtils.getResourceText("TBL_COLLAPSE_ALL"),
|
|
166
|
+
select: () => {
|
|
167
|
+
oTable.getBinding().collapseToLevel(0);
|
|
168
|
+
oTable.setFirstVisibleRow(0); //scroll to top after collapsing (so no rows vanish)
|
|
169
|
+
oTable._getSelectionPlugin().clearSelection();
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
})
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
AnalyticalTableContextMenu.prototype._createExpandItem = function(oTable) {
|
|
178
|
+
return new MenuItem({
|
|
179
|
+
text: TableUtils.getResourceText("TBL_EXPAND"),
|
|
180
|
+
icon: "sap-icon://expand-all",
|
|
181
|
+
submenu: new Menu({
|
|
182
|
+
items: [
|
|
183
|
+
new MenuItem({
|
|
184
|
+
text: TableUtils.getResourceText("TBL_EXPAND_LEVEL"),
|
|
185
|
+
select: () => {
|
|
186
|
+
oTable.getBinding().expandToLevel(this._iGroupLevel);
|
|
187
|
+
oTable.setFirstVisibleRow(0);
|
|
188
|
+
oTable._getSelectionPlugin().clearSelection();
|
|
189
|
+
}
|
|
190
|
+
}),
|
|
191
|
+
new MenuItem({
|
|
192
|
+
text: TableUtils.getResourceText("TBL_EXPAND_ALL"),
|
|
193
|
+
select: () => {
|
|
194
|
+
oTable.expandAll();
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
AnalyticalTableContextMenu.prototype._createVisibilityItem = function(oTable) {
|
|
203
|
+
return new MenuItem({
|
|
204
|
+
text: TableUtils.getResourceText("TBL_SHOW_COLUMN"),
|
|
205
|
+
select: () => {
|
|
206
|
+
const oColumn = getGroupedColumn(oTable, this._iGroupLevel);
|
|
207
|
+
const bShowIfGrouped = oColumn.getShowIfGrouped();
|
|
208
|
+
|
|
209
|
+
oColumn.setShowIfGrouped(!bShowIfGrouped);
|
|
210
|
+
oTable.fireGroup({
|
|
211
|
+
column: oColumn,
|
|
212
|
+
groupedColumns: oTable._aGroupedColumns,
|
|
213
|
+
type: (!bShowIfGrouped ? GroupEventType.showGroupedColumn : GroupEventType.hideGroupedColumn)
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
AnalyticalTableContextMenu.prototype._createMoveItem = function(oTable) {
|
|
220
|
+
return new MenuItem({
|
|
221
|
+
text: TableUtils.getResourceText("TBL_MOVE"),
|
|
222
|
+
submenu: new Menu({
|
|
223
|
+
items: [
|
|
224
|
+
new MenuItem({
|
|
225
|
+
text: TableUtils.getResourceText("TBL_MOVE_UP"),
|
|
226
|
+
icon: "sap-icon://arrow-top",
|
|
227
|
+
select: () => {
|
|
228
|
+
const oColumn = getGroupedColumn(oTable, this._iGroupLevel);
|
|
229
|
+
const iGroupLevelIndex = this._iGroupLevel - 1;
|
|
230
|
+
|
|
231
|
+
if (iGroupLevelIndex > 0) {
|
|
232
|
+
oTable._aGroupedColumns[iGroupLevelIndex] =
|
|
233
|
+
oTable._aGroupedColumns.splice(iGroupLevelIndex - 1, 1, oTable._aGroupedColumns[iGroupLevelIndex])[0];
|
|
234
|
+
|
|
235
|
+
oTable.updateAnalyticalInfo();
|
|
236
|
+
oTable.fireGroup({
|
|
237
|
+
column: oColumn,
|
|
238
|
+
groupedColumns: oTable._aGroupedColumns,
|
|
239
|
+
type: GroupEventType.moveUp
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}),
|
|
244
|
+
new MenuItem({
|
|
245
|
+
text: TableUtils.getResourceText("TBL_MOVE_DOWN"),
|
|
246
|
+
icon: "sap-icon://arrow-bottom",
|
|
247
|
+
select: () => {
|
|
248
|
+
const oColumn = getGroupedColumn(oTable, this._iGroupLevel);
|
|
249
|
+
const iGroupLevelIndex = this._iGroupLevel - 1;
|
|
250
|
+
|
|
251
|
+
if (iGroupLevelIndex < oTable._aGroupedColumns.length) {
|
|
252
|
+
oTable._aGroupedColumns[iGroupLevelIndex] =
|
|
253
|
+
oTable._aGroupedColumns.splice(iGroupLevelIndex + 1, 1, oTable._aGroupedColumns[iGroupLevelIndex])[0];
|
|
254
|
+
|
|
255
|
+
oTable.updateAnalyticalInfo();
|
|
256
|
+
oTable.fireGroup({
|
|
257
|
+
column: oColumn,
|
|
258
|
+
groupedColumns: oTable._aGroupedColumns,
|
|
259
|
+
type: GroupEventType.moveDown
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
})
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
AnalyticalTableContextMenu.prototype._createSortItem = function(oTable) {
|
|
270
|
+
return new MenuItem({
|
|
271
|
+
text: TableUtils.getResourceText("TBL_SORT"),
|
|
272
|
+
icon: "sap-icon://sort",
|
|
273
|
+
submenu: new Menu({
|
|
274
|
+
items: [
|
|
275
|
+
new MenuItem({
|
|
276
|
+
text: TableUtils.getResourceText("TBL_SORT_ASC"),
|
|
277
|
+
icon: "sap-icon://sort-ascending",
|
|
278
|
+
select: () => {
|
|
279
|
+
oTable.sort(getGroupedColumn(oTable, this._iGroupLevel), SortOrder.Ascending);
|
|
280
|
+
}
|
|
281
|
+
}),
|
|
282
|
+
new MenuItem({
|
|
283
|
+
text: TableUtils.getResourceText("TBL_SORT_DESC"),
|
|
284
|
+
icon: "sap-icon://sort-descending",
|
|
285
|
+
select: () => {
|
|
286
|
+
oTable.sort(getGroupedColumn(oTable, this._iGroupLevel), SortOrder.Descending);
|
|
287
|
+
}
|
|
288
|
+
})
|
|
289
|
+
]
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
function getGroupedColumn(oTable, iGroupLevel) {
|
|
295
|
+
return oTable.getColumns().find((oColumn) => oTable._aGroupedColumns[iGroupLevel - 1] === oColumn.getId());
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return AnalyticalTableContextMenu;
|
|
299
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
*
|
|
36
36
|
* @extends sap.ui.base.Object
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.132.0
|
|
39
39
|
* @private
|
|
40
40
|
* @alias sap.ui.table.menus.ColumnHeaderMenuAdapter
|
|
41
41
|
*/
|