@openui5/sap.ui.mdc 1.141.2 → 1.143.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/README.md +2 -2
- package/REUSE.toml +39 -1
- package/THIRDPARTY.txt +36 -3
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +89 -63
- package/src/sap/ui/mdc/Chart.js +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +31 -8
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +11 -11
- package/src/sap/ui/mdc/Geomap.js +571 -0
- package/src/sap/ui/mdc/GeomapDelegate.js +285 -0
- package/src/sap/ui/mdc/GeomapRenderer.js +76 -0
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +7 -7
- package/src/sap/ui/mdc/Table.js +141 -116
- package/src/sap/ui/mdc/TableDelegate.js +3 -2
- package/src/sap/ui/mdc/ValueHelp.js +1 -1
- package/src/sap/ui/mdc/ValueHelpDelegate.js +4 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
- package/src/sap/ui/mdc/chart/Util.js +5 -2
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/geomap/Geomap.designtime.js +23 -0
- package/src/sap/ui/mdc/enums/GeomapControlPosition.js +46 -0
- package/src/sap/ui/mdc/enums/TableActionPosition.js +123 -0
- package/src/sap/ui/mdc/enums/TablePopinDisplay.js +36 -0
- package/src/sap/ui/mdc/field/ConditionType.js +1 -1
- package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/FieldBase.js +137 -66
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldSelect.js +7 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +22 -0
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +3 -0
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +35 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +3 -0
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/SortFlex.js +12 -5
- package/src/sap/ui/mdc/flexibility/Table.flexibility.js +17 -11
- package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/helpers/getAffectedSorter.js +25 -0
- package/src/sap/ui/mdc/geomap/Item.js +48 -0
- package/src/sap/ui/mdc/geomap/PropertyHelper.js +70 -0
- package/src/sap/ui/mdc/library.js +19 -4
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +15 -1
- package/src/sap/ui/mdc/messagebundle_ar.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_bg.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_cnr.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_da.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +12 -1
- package/src/sap/ui/mdc/messagebundle_es.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_hu.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_it.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_kk.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_ko.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_mk.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_nl.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_ru.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_sh.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_sr.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_tr.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_uk.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_vi.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +8 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterBarLayoutMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
- package/src/sap/ui/mdc/odata/v4/GeomapDelegate.js +60 -0
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +53 -2
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +16 -0
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +3 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
- package/src/sap/ui/mdc/rules/Table.support.js +149 -118
- package/src/sap/ui/mdc/table/ActionLayoutData.js +47 -0
- package/src/sap/ui/mdc/table/Column.js +40 -186
- package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/DragDropConfig.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +35 -21
- package/src/sap/ui/mdc/table/ODataV4PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +97 -14
- package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +34 -7
- package/src/sap/ui/mdc/table/TableTypeBase.js +38 -7
- package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
- package/src/sap/ui/mdc/themes/base/Geomap.less +50 -0
- package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/util/InfoBar.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +2 -2
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +22 -3
- package/src/sap/ui/mdc/valuehelp/Popover.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +140 -26
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -3
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +7 -5
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +36 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +20 -3
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +33 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides control sap.ui.mdc.ActionLayoutData.
|
|
8
|
+
sap.ui.define(["sap/m/OverflowToolbarLayoutData", "sap/ui/mdc/enums/TableActionPosition"],
|
|
9
|
+
(OverflowToolbarLayoutData, TableActionPosition) => {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for a new <code>ActionLayoutData</code>.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [sId] ID for the new layout data, generated automatically if no ID is given
|
|
16
|
+
* @param {object} [mSettings] Initial settings for the new layout data
|
|
17
|
+
*
|
|
18
|
+
* @class
|
|
19
|
+
* Defines the layout data for the {@link sap.ui.mdc.Table#getActions actions} and {@link sap.ui.mdc.Table#getTableActions tableActions}
|
|
20
|
+
* of the {@link sap.ui.mdc.Table Table}.
|
|
21
|
+
*
|
|
22
|
+
* @extends sap.m.OverflowToolbarLayoutData
|
|
23
|
+
* @implements sap.ui.mdc.IActionLayoutData
|
|
24
|
+
* @version 1.143.0
|
|
25
|
+
* @constructor
|
|
26
|
+
* @public
|
|
27
|
+
* @since 1.143
|
|
28
|
+
* @alias sap.ui.mdc.table.ActionLayoutData
|
|
29
|
+
*/
|
|
30
|
+
const ActionLayoutData = OverflowToolbarLayoutData.extend("sap.ui.mdc.table.ActionLayoutData", {
|
|
31
|
+
metadata: {
|
|
32
|
+
library: "sap.ui.mdc",
|
|
33
|
+
interfaces: [
|
|
34
|
+
"sap.ui.mdc.IActionLayoutData"
|
|
35
|
+
],
|
|
36
|
+
properties: {
|
|
37
|
+
/**
|
|
38
|
+
* Defines the position of the action within the group of table actions.
|
|
39
|
+
*/
|
|
40
|
+
position: {type: "sap.ui.mdc.enums.TableActionPosition", group: "Misc", defaultValue: TableActionPosition.EndActions}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return ActionLayoutData;
|
|
46
|
+
|
|
47
|
+
});
|
|
@@ -5,31 +5,21 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"./GridTableType",
|
|
9
|
-
"./ResponsiveTableType",
|
|
10
|
-
"sap/base/Log",
|
|
11
|
-
"sap/m/library",
|
|
12
8
|
"sap/m/Label",
|
|
13
|
-
"sap/ui/core/Element",
|
|
14
|
-
"sap/ui/model/json/JSONModel",
|
|
15
9
|
"sap/ui/model/base/ManagedObjectModel",
|
|
16
10
|
"sap/ui/model/BindingMode",
|
|
11
|
+
"sap/m/plugins/PluginBase",
|
|
12
|
+
"sap/ui/core/Element",
|
|
17
13
|
"sap/ui/core/Control",
|
|
18
|
-
"sap/
|
|
19
|
-
"sap/m/plugins/PluginBase"
|
|
14
|
+
"sap/base/Log"
|
|
20
15
|
], (
|
|
21
|
-
GridTableType,
|
|
22
|
-
ResponsiveTableType,
|
|
23
|
-
Log,
|
|
24
|
-
MLibrary,
|
|
25
16
|
Label,
|
|
26
|
-
Element,
|
|
27
|
-
JSONModel,
|
|
28
17
|
ManagedObjectModel,
|
|
29
18
|
BindingMode,
|
|
19
|
+
PluginBase,
|
|
20
|
+
Element,
|
|
30
21
|
Control,
|
|
31
|
-
|
|
32
|
-
PluginBase
|
|
22
|
+
Log
|
|
33
23
|
) => {
|
|
34
24
|
"use strict";
|
|
35
25
|
|
|
@@ -205,9 +195,7 @@ sap.ui.define([
|
|
|
205
195
|
creationTemplate: true
|
|
206
196
|
};
|
|
207
197
|
|
|
208
|
-
this._oManagedObjectModel = new ManagedObjectModel(this
|
|
209
|
-
this._oSettingsModel = new JSONModel({
|
|
210
|
-
width: this.getWidth(),
|
|
198
|
+
this._oManagedObjectModel = new ManagedObjectModel(this, {
|
|
211
199
|
calculatedWidth: null,
|
|
212
200
|
p13nWidth: null
|
|
213
201
|
});
|
|
@@ -223,107 +211,16 @@ sap.ui.define([
|
|
|
223
211
|
const oTable = this.getTable();
|
|
224
212
|
|
|
225
213
|
if (oTable && (!this._oInnerColumn || this._oInnerColumn.isDestroyed())) {
|
|
226
|
-
this._oInnerColumn =
|
|
214
|
+
this._oInnerColumn = oTable._getType().createColumn(this);
|
|
215
|
+
// XConfig might not have been available on init - depends on the order settings are applied in Table#applySettings.
|
|
216
|
+
this._readP13nValues();
|
|
217
|
+
this._oInnerColumn.setModel(this._oManagedObjectModel, "$sap.ui.mdc.table.Column");
|
|
218
|
+
this._oInnerColumnReady.resolve();
|
|
227
219
|
}
|
|
228
220
|
|
|
229
221
|
return this._oInnerColumn;
|
|
230
222
|
};
|
|
231
223
|
|
|
232
|
-
Column.prototype._createInnerColumn = function() {
|
|
233
|
-
const oTable = this.getTable();
|
|
234
|
-
let oColumn;
|
|
235
|
-
|
|
236
|
-
const oWidthBindingInfo = {
|
|
237
|
-
parts: [
|
|
238
|
-
{path: "$this>/width"}, {path: "$columnSettings>/calculatedWidth"}, {path: "$columnSettings>/p13nWidth"}
|
|
239
|
-
],
|
|
240
|
-
formatter: function(sWidth, sCalculatedWidth, sP13nWidth) {
|
|
241
|
-
return sP13nWidth || sCalculatedWidth || sWidth;
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
const oTooltipBindingInfo = {
|
|
246
|
-
parts: [
|
|
247
|
-
{path: "$this>/tooltip"},
|
|
248
|
-
{path: "$this>/header"},
|
|
249
|
-
{path: "$this>/headerVisible"},
|
|
250
|
-
{path: "$sap.ui.mdc.Table>/useColumnLabelsAsTooltips"}
|
|
251
|
-
],
|
|
252
|
-
formatter: function(sTooltip, sHeader, bHeaderVisible, bUseColumnLabelsAsTooltips) {
|
|
253
|
-
if (sTooltip || !bUseColumnLabelsAsTooltips) {
|
|
254
|
-
return sTooltip;
|
|
255
|
-
}
|
|
256
|
-
return bHeaderVisible ? sHeader : "";
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
this._readP13nValues(); // XConfig might not have been available on init - depends on the order settings are applied in Table#applySettings.
|
|
261
|
-
|
|
262
|
-
if (oTable._isOfType(TableType.ResponsiveTable)) {
|
|
263
|
-
oColumn = ResponsiveTableType.createColumn(this.getId() + "-innerColumn", {
|
|
264
|
-
width: oWidthBindingInfo,
|
|
265
|
-
autoPopinWidth: "{$this>/minWidth}",
|
|
266
|
-
hAlign: "{$this>/hAlign}",
|
|
267
|
-
header: this._getColumnHeaderLabel(oTooltipBindingInfo),
|
|
268
|
-
importance: {
|
|
269
|
-
parts: [
|
|
270
|
-
{path: "$this>/importance"}, {path: "$this>/extendedSettings/importance"}, {path: "$this>/extendedSettings/@className"}
|
|
271
|
-
],
|
|
272
|
-
formatter: function(sLegacyImportance, sImportance, sClassName) {
|
|
273
|
-
if (sImportance && sClassName === "sap.ui.mdc.table.ResponsiveColumnSettings") {
|
|
274
|
-
return sImportance;
|
|
275
|
-
} else {
|
|
276
|
-
return sLegacyImportance;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
popinDisplay: "{= ${$this>/headerVisible} ? 'Inline' : 'WithoutHeader' }",
|
|
281
|
-
mergeDuplicates: {
|
|
282
|
-
parts: [
|
|
283
|
-
{path: "$this>/extendedSettings/mergeFunction"}, {path: "$this>/extendedSettings/@className"}
|
|
284
|
-
],
|
|
285
|
-
formatter: function(sMergeFunction, sClassName) {
|
|
286
|
-
return sMergeFunction && sClassName === "sap.ui.mdc.table.ResponsiveColumnSettings";
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
mergeFunctionName: {
|
|
290
|
-
parts: [
|
|
291
|
-
{path: "$this>/extendedSettings/mergeFunction"}, {path: "$this>/extendedSettings/@className"}
|
|
292
|
-
],
|
|
293
|
-
formatter: function(sMergeFunction, sClassName) {
|
|
294
|
-
if (sClassName === "sap.ui.mdc.table.ResponsiveColumnSettings") {
|
|
295
|
-
return sMergeFunction;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
} else {
|
|
301
|
-
oColumn = GridTableType.createColumn(this.getId() + "-innerColumn", {
|
|
302
|
-
width: oWidthBindingInfo,
|
|
303
|
-
minWidth: {
|
|
304
|
-
path: "$this>/minWidth",
|
|
305
|
-
formatter: function(fMinWidth) {
|
|
306
|
-
return Math.round(fMinWidth * parseFloat(MLibrary.BaseFontSize));
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
hAlign: "{$this>/hAlign}",
|
|
310
|
-
label: this._getColumnHeaderLabel(),
|
|
311
|
-
resizable: "{$sap.ui.mdc.Table>/enableColumnResize}",
|
|
312
|
-
autoResizable: "{$sap.ui.mdc.Table>/enableColumnResize}",
|
|
313
|
-
tooltip: oTooltipBindingInfo,
|
|
314
|
-
template: this.getTemplateClone()
|
|
315
|
-
});
|
|
316
|
-
oColumn.setCreationTemplate(this.getCreationTemplateClone());
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
oColumn.setModel(this._oManagedObjectModel, "$this");
|
|
320
|
-
oColumn.setModel(this._oSettingsModel, "$columnSettings");
|
|
321
|
-
oColumn.setHeaderMenu(oTable.getId() + "-columnHeaderMenu");
|
|
322
|
-
|
|
323
|
-
this._oInnerColumnReady.resolve();
|
|
324
|
-
return oColumn;
|
|
325
|
-
};
|
|
326
|
-
|
|
327
224
|
// The purpose of this control is to render the MDC column in the inner table column header, for example to support tools that allow the user to
|
|
328
225
|
// select controls on the UI for editing.
|
|
329
226
|
const ColumnHeaderLabel = Control.extend("sap.ui.mdc.table.ColumnHeaderLabel", {
|
|
@@ -347,103 +244,62 @@ sap.ui.define([
|
|
|
347
244
|
oRm.close("div");
|
|
348
245
|
}
|
|
349
246
|
},
|
|
350
|
-
setIsInColumnHeaderContext: function(bIsInColumnHeaderContext) {
|
|
351
|
-
this.getLabel()?.setIsInColumnHeaderContext(bIsInColumnHeaderContext);
|
|
352
|
-
},
|
|
353
247
|
getText: function() { // Used by inner table for the fieldHelpInfo, and by tests in MDC and FE.
|
|
354
|
-
return this.getLabel()
|
|
248
|
+
return this.getLabel()?.getText();
|
|
355
249
|
},
|
|
356
250
|
clone: function() { // For ResponsiveTable popin.
|
|
357
|
-
return this.getLabel()
|
|
251
|
+
return this.getLabel()?.clone();
|
|
358
252
|
},
|
|
359
253
|
// Used by inner table for accessibility support.
|
|
360
254
|
getRequired: function() {
|
|
361
|
-
return this.getLabel()
|
|
255
|
+
return this.getLabel()?.getRequired();
|
|
362
256
|
},
|
|
363
257
|
getAccessibilityInfo: function() {
|
|
364
|
-
return this.getLabel()
|
|
258
|
+
return this.getLabel()?.getAccessibilityInfo();
|
|
259
|
+
},
|
|
260
|
+
setIsInColumnHeaderContext: function(bIsInColumnHeaderContext) {
|
|
261
|
+
this.getLabel()?.setIsInColumnHeaderContext(bIsInColumnHeaderContext);
|
|
365
262
|
}
|
|
366
263
|
});
|
|
367
264
|
|
|
368
265
|
/**
|
|
369
|
-
* Creates and returns the column header control.
|
|
266
|
+
* Creates and returns the column header control. If the control is already created, the existing instance is returned. The settings are not
|
|
267
|
+
* updated. To create a new instance with new settings, first destroy the old instance.
|
|
370
268
|
* If <code>headerVisible=false</code> then <code>width=0px</code> is applied to the <code>sap.m.Label</code> control for accessibility purposes.
|
|
371
269
|
*
|
|
372
|
-
* @param {object}
|
|
373
|
-
*
|
|
374
|
-
* @returns {object} The column header control
|
|
270
|
+
* @param {object} [mLabelSettings] Additional settings for the inner <code>sap.m.Label</code>
|
|
271
|
+
* @returns {sap.ui.mdc.table.ColumnHeaderLabel} The column header control
|
|
375
272
|
* @private
|
|
376
273
|
*/
|
|
377
|
-
Column.prototype.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
if (oTable && (!this._oColumnHeaderLabel || this._oColumnHeaderLabel.isDestroyed())) {
|
|
381
|
-
this._oColumnHeaderLabel = new ColumnHeaderLabel({
|
|
382
|
-
column: this,
|
|
383
|
-
label: new Label({
|
|
384
|
-
width: "{= ${$this>/headerVisible} ? '100%' : '0px' }",
|
|
385
|
-
text: "{$this>/header}",
|
|
386
|
-
textAlign: "{$this>/hAlign}",
|
|
387
|
-
tooltip: oTooltipBindingInfo ? oTooltipBindingInfo : "",
|
|
388
|
-
wrapping: {
|
|
389
|
-
parts: [
|
|
390
|
-
{path: "$this>/headerVisible"}, {path: "$sap.ui.mdc.Table>/enableColumnResize"}
|
|
391
|
-
],
|
|
392
|
-
formatter: function(bHeaderVisible, bResizable) {
|
|
393
|
-
return oTable._isOfType(TableType.ResponsiveTable) && bHeaderVisible && !bResizable;
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
wrappingType: oTable._isOfType(TableType.ResponsiveTable) ? "Hyphenated" : null,
|
|
397
|
-
required: "{$this>/required}"
|
|
398
|
-
})
|
|
399
|
-
});
|
|
274
|
+
Column.prototype.getHeaderLabel = function(mLabelSettings) {
|
|
275
|
+
if (this._oColumnHeaderLabel?.isDestroyed()) {
|
|
276
|
+
delete this._oColumnHeaderLabel;
|
|
400
277
|
}
|
|
401
278
|
|
|
279
|
+
this._oColumnHeaderLabel ??= new ColumnHeaderLabel({
|
|
280
|
+
column: this,
|
|
281
|
+
label: new Label({
|
|
282
|
+
width: "{= ${$sap.ui.mdc.table.Column>/headerVisible} ? '100%' : '0px' }",
|
|
283
|
+
text: "{$sap.ui.mdc.table.Column>/header}",
|
|
284
|
+
textAlign: "{$sap.ui.mdc.table.Column>/hAlign}",
|
|
285
|
+
required: "{$sap.ui.mdc.table.Column>/required}",
|
|
286
|
+
...mLabelSettings
|
|
287
|
+
})
|
|
288
|
+
});
|
|
289
|
+
|
|
402
290
|
return this._oColumnHeaderLabel;
|
|
403
291
|
};
|
|
404
292
|
|
|
405
293
|
Column.prototype.getTemplateClone = function() {
|
|
406
|
-
const oTable = this.getTable();
|
|
407
294
|
const oTemplate = this.getTemplate();
|
|
408
295
|
|
|
409
|
-
if (
|
|
296
|
+
if (oTemplate && (!this._oTemplateClone || this._oTemplateClone.isDestroyed())) {
|
|
410
297
|
this._oTemplateClone = oTemplate.clone();
|
|
411
|
-
|
|
412
|
-
if (!oTable._isOfType(TableType.ResponsiveTable)) {
|
|
413
|
-
if (this._oTemplateClone.setWrapping) {
|
|
414
|
-
this._oTemplateClone.setWrapping(false);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (this._oTemplateClone.setRenderWhitespace) {
|
|
418
|
-
this._oTemplateClone.setRenderWhitespace(false);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
298
|
}
|
|
422
299
|
|
|
423
300
|
return this._oTemplateClone;
|
|
424
301
|
};
|
|
425
302
|
|
|
426
|
-
Column.prototype.getCreationTemplateClone = function() {
|
|
427
|
-
const oTable = this.getTable();
|
|
428
|
-
const oCreationTemplate = this.getCreationTemplate();
|
|
429
|
-
|
|
430
|
-
if (oTable && oCreationTemplate && (!this._oCreationTemplateClone || this._oCreationTemplateClone.isDestroyed())) {
|
|
431
|
-
this._oCreationTemplateClone = oCreationTemplate.clone();
|
|
432
|
-
|
|
433
|
-
if (!oTable._isOfType(TableType.ResponsiveTable)) {
|
|
434
|
-
if (this._oCreationTemplateClone.setWrapping) {
|
|
435
|
-
this._oCreationTemplateClone.setWrapping(false);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
if (this._oCreationTemplateClone.setRenderWhitespace) {
|
|
439
|
-
this._oCreationTemplateClone.setRenderWhitespace(false);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
return this._oCreationTemplateClone;
|
|
445
|
-
};
|
|
446
|
-
|
|
447
303
|
Column.prototype.setHeader = function(sHeader) {
|
|
448
304
|
this.setProperty("header", sHeader, true);
|
|
449
305
|
|
|
@@ -531,7 +387,7 @@ sap.ui.define([
|
|
|
531
387
|
|
|
532
388
|
if (oPropertyHelper) {
|
|
533
389
|
oPropertyHelper.calculateColumnWidth(this).then((sWidth) => {
|
|
534
|
-
this.
|
|
390
|
+
this._oManagedObjectModel.setProperty("/@custom/calculatedWidth", sWidth);
|
|
535
391
|
});
|
|
536
392
|
} else {
|
|
537
393
|
oTable._fullyInitialized().then(this._calculateColumnWidth.bind(this));
|
|
@@ -544,7 +400,7 @@ sap.ui.define([
|
|
|
544
400
|
const oXConfig = oTable._getXConfig();
|
|
545
401
|
const oColumnConfig = oXConfig?.aggregations?.columns?.[sPropertyKey];
|
|
546
402
|
|
|
547
|
-
this.
|
|
403
|
+
this._oManagedObjectModel.setProperty("/@custom/p13nWidth", oColumnConfig?.width);
|
|
548
404
|
};
|
|
549
405
|
|
|
550
406
|
Column.prototype.getTable = function() {
|
|
@@ -557,10 +413,8 @@ sap.ui.define([
|
|
|
557
413
|
this._oInnerColumnReady = null;
|
|
558
414
|
[
|
|
559
415
|
"_oManagedObjectModel",
|
|
560
|
-
"_oSettingsModel",
|
|
561
416
|
"_oInnerColumn",
|
|
562
417
|
"_oTemplateClone",
|
|
563
|
-
"_oCreationTemplateClone",
|
|
564
418
|
"_oColumnHeaderLabel"
|
|
565
419
|
].forEach(function(sObject) {
|
|
566
420
|
if (this[sObject]) {
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* {@link sap.ui.mdc.table.Column#getCreationTemplate creationTemplate} aggregation of the {@link sap.ui.mdc.table.Column}.
|
|
24
24
|
* @extends sap.ui.core.Element
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.143.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted sap.fe
|
|
@@ -8,16 +8,16 @@ sap.ui.define([
|
|
|
8
8
|
"./TableTypeBase",
|
|
9
9
|
"./menus/GroupHeaderRowContextMenu",
|
|
10
10
|
"../enums/TableRowCountMode",
|
|
11
|
-
"sap/m/table/Util",
|
|
12
11
|
"./utils/Personalization",
|
|
12
|
+
"sap/m/library",
|
|
13
13
|
"sap/ui/model/json/JSONModel",
|
|
14
14
|
"sap/ui/core/Lib"
|
|
15
15
|
], (
|
|
16
16
|
TableTypeBase,
|
|
17
17
|
GroupHeaderRowContextMenu,
|
|
18
18
|
TableRowCountMode,
|
|
19
|
-
MTableUtil,
|
|
20
19
|
PersonalizationUtils,
|
|
20
|
+
MLibrary,
|
|
21
21
|
JSONModel,
|
|
22
22
|
Library
|
|
23
23
|
) => {
|
|
@@ -256,14 +256,14 @@ sap.ui.define([
|
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
GridTableType.prototype.createTable = function(
|
|
259
|
+
GridTableType.prototype.createTable = function() {
|
|
260
260
|
const oTable = this.getTable();
|
|
261
261
|
|
|
262
262
|
if (!oTable || !InnerTable) {
|
|
263
263
|
return null;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
const oGridTable = new InnerTable(
|
|
266
|
+
const oGridTable = new InnerTable(this.getTableSettings());
|
|
267
267
|
|
|
268
268
|
oGridTable.setAggregation("groupHeaderRowContextMenu", new GroupHeaderRowContextMenu());
|
|
269
269
|
|
|
@@ -277,6 +277,7 @@ sap.ui.define([
|
|
|
277
277
|
};
|
|
278
278
|
const mRowSettingsConfig = this.getRowSettingsConfig();
|
|
279
279
|
const mSettings = {
|
|
280
|
+
...TableTypeBase.prototype.getTableSettings.apply(this, arguments),
|
|
280
281
|
enableBusyIndicator: true,
|
|
281
282
|
enableColumnReordering: false,
|
|
282
283
|
threshold: {
|
|
@@ -317,7 +318,7 @@ sap.ui.define([
|
|
|
317
318
|
mSettings.cellClick = [onCellClick, this];
|
|
318
319
|
}
|
|
319
320
|
|
|
320
|
-
return
|
|
321
|
+
return mSettings;
|
|
321
322
|
};
|
|
322
323
|
|
|
323
324
|
function onCellClick(oEvent) {
|
|
@@ -341,8 +342,34 @@ sap.ui.define([
|
|
|
341
342
|
});
|
|
342
343
|
}
|
|
343
344
|
|
|
344
|
-
GridTableType.createColumn = function(
|
|
345
|
-
|
|
345
|
+
GridTableType.prototype.createColumn = function(oColumn) {
|
|
346
|
+
const oGridTableColumn = new InnerColumn(this.getColumnSettings(oColumn));
|
|
347
|
+
const oCreationTemplate = oColumn.getCreationTemplate()?.clone();
|
|
348
|
+
|
|
349
|
+
oCreationTemplate?.setWrapping?.(false);
|
|
350
|
+
oGridTableColumn.setCreationTemplate(oCreationTemplate);
|
|
351
|
+
|
|
352
|
+
return oGridTableColumn;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
GridTableType.prototype.getColumnSettings = function(oColumn) {
|
|
356
|
+
const oTemplate = oColumn.getTemplateClone();
|
|
357
|
+
|
|
358
|
+
oTemplate?.setWrapping?.(false);
|
|
359
|
+
|
|
360
|
+
return {
|
|
361
|
+
...TableTypeBase.prototype.getColumnSettings.apply(this, arguments),
|
|
362
|
+
label: oColumn.getHeaderLabel({wrapping: false}),
|
|
363
|
+
template: oTemplate,
|
|
364
|
+
minWidth: {
|
|
365
|
+
path: "$sap.ui.mdc.table.Column>/minWidth",
|
|
366
|
+
formatter: function(fMinWidth) {
|
|
367
|
+
return Math.round(fMinWidth * parseFloat(MLibrary.BaseFontSize));
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
resizable: "{$sap.ui.mdc.Table>/enableColumnResize}",
|
|
371
|
+
autoResizable: "{$sap.ui.mdc.Table>/enableColumnResize}"
|
|
372
|
+
};
|
|
346
373
|
};
|
|
347
374
|
|
|
348
375
|
GridTableType.prototype.enableColumnResize = function() {
|
|
@@ -524,26 +551,13 @@ sap.ui.define([
|
|
|
524
551
|
};
|
|
525
552
|
|
|
526
553
|
GridTableType.prototype.scrollToIndex = function(iIndex) {
|
|
527
|
-
const oTable = this.getTable();
|
|
528
554
|
const oGridTable = this.getInnerTable();
|
|
529
555
|
|
|
530
556
|
if (!oGridTable) {
|
|
531
557
|
return Promise.reject();
|
|
532
558
|
}
|
|
533
559
|
|
|
534
|
-
return
|
|
535
|
-
if (iIndex === -1) {
|
|
536
|
-
iIndex = MTableUtil.isEmpty(oTable.getRowBinding()) ? 0 : oTable.getRowBinding().getLength();
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
if (oGridTable._setFirstVisibleRowIndex(iIndex)) {
|
|
540
|
-
oGridTable.attachEventOnce("rowsUpdated", () => {
|
|
541
|
-
resolve();
|
|
542
|
-
});
|
|
543
|
-
} else {
|
|
544
|
-
resolve();
|
|
545
|
-
}
|
|
546
|
-
});
|
|
560
|
+
return oGridTable._scrollToIndex(iIndex);
|
|
547
561
|
};
|
|
548
562
|
|
|
549
563
|
GridTableType.prototype.getRowBinding = function() {
|