@openui5/sap.ui.mdc 1.92.0 → 1.93.3
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 +5 -0
- package/THIRDPARTY.txt +10 -1
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1 -1
- package/src/sap/ui/mdc/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/ChartNew.js +67 -9
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +15 -2
- package/src/sap/ui/mdc/FilterBar.js +11 -1
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +406 -0
- package/src/sap/ui/mdc/Table.js +73 -46
- package/src/sap/ui/mdc/TableDelegate.js +10 -18
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +9 -18
- package/src/sap/ui/mdc/chartNew/ItemNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- 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 +27 -15
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +3 -3
- package/src/sap/ui/mdc/condition/Operator.js +10 -5
- package/src/sap/ui/mdc/condition/RangeOperator.js +3 -6
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +5 -4
- package/src/sap/ui/mdc/field/ConditionType.js +51 -30
- package/src/sap/ui/mdc/field/ConditionsType.js +4 -3
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +1 -11
- package/src/sap/ui/mdc/field/FieldBase.js +29 -9
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +16 -0
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- 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/FieldValueHelp.js +49 -33
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +52 -32
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +7 -9
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +2 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +49 -0
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +70 -0
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +49 -37
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +51 -26
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +9 -3
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +55 -39
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +31 -22
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +33 -29
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +10 -5
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +18 -6
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +15 -4
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +84 -82
- 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/GroupFlex.js +70 -52
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -140
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +59 -41
- package/src/sap/ui/mdc/flexibility/SortFlex.js +72 -54
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +2 -1
- package/src/sap/ui/mdc/library.js +46 -5
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.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/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialogItem.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 +7 -3
- package/src/sap/ui/mdc/messagebundle_ar.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_bg.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_cy.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +12 -9
- package/src/sap/ui/mdc/messagebundle_el.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +3 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +3 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_fr.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_hr.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_id.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_it.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_iw.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_kk.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_lt.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_nl.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_no.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_pl.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_pt.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_ru.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_sl.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_th.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_tr.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +7 -4
- package/src/sap/ui/mdc/messagebundle_vi.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +4 -1
- 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/FilterIntegrationMixin.js +26 -14
- package/src/sap/ui/mdc/odata/json/FilterBarDelegate.js +9 -8
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +5 -5
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +9 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +82 -74
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +17 -0
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +45 -53
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +31 -17
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -16
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +133 -54
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +5 -5
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +9 -6
- package/src/sap/ui/mdc/p13n/panels/ListView.js +58 -2
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +2 -2
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +6 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +10 -11
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +11 -2
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +4 -0
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +4 -49
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FieldBase.less +4 -0
- package/src/sap/ui/mdc/ui/Container.js +3 -3
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/FilterUtil.js +56 -15
- package/src/sap/ui/mdc/util/PropertyHelper.js +6 -2
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +17 -17
|
@@ -7,8 +7,13 @@
|
|
|
7
7
|
// ------------------------------------------------------------------------------------------
|
|
8
8
|
// Utility class used by mdc v4 delegates for parameter handling
|
|
9
9
|
// ------------------------------------------------------------------------------------------
|
|
10
|
-
sap.ui.define(['sap/ui/mdc/util/FilterUtil',
|
|
11
|
-
|
|
10
|
+
sap.ui.define(['sap/ui/mdc/util/FilterUtil',
|
|
11
|
+
"sap/ui/mdc/condition/ConditionConverter",
|
|
12
|
+
'sap/base/Log',
|
|
13
|
+
'sap/base/util/merge',
|
|
14
|
+
"sap/ui/model/FilterOperator",
|
|
15
|
+
"sap/ui/model/odata/v4/ODataUtils"],
|
|
16
|
+
function(FilterUtil, ConditionConverter, Log, merge, FilterOperator, ODataUtils) {
|
|
12
17
|
"use strict";
|
|
13
18
|
|
|
14
19
|
/**
|
|
@@ -33,75 +38,62 @@ sap.ui.define(['sap/ui/mdc/util/FilterUtil', "sap/ui/mdc/condition/ConditionConv
|
|
|
33
38
|
return oParameters;
|
|
34
39
|
},
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Determines the parameter path
|
|
43
|
+
*
|
|
44
|
+
* @param {sap.ui.mdc.FilterBar} oMDCFilterBar - instance of the filter bar
|
|
45
|
+
* @returns {string | null} path information
|
|
46
|
+
* @protected
|
|
47
|
+
*/
|
|
48
|
+
getParametersInfo : function(oMDCFilterBar) {
|
|
49
|
+
var oParameters = DelegateUtil._getParameters(oMDCFilterBar);
|
|
37
50
|
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
return DelegateUtil._getParameterPath(oMDCFilterBar, oParameters);
|
|
52
|
+
},
|
|
40
53
|
|
|
41
|
-
|
|
54
|
+
_getParametersListUrl : function(oMDCFilterBar, aParameterNames) {
|
|
55
|
+
var aParams = [];
|
|
56
|
+
var mConditionsMap = FilterUtil.getConditionsMap(oMDCFilterBar, aParameterNames);
|
|
57
|
+
var aPropertyInfos = oMDCFilterBar.getPropertyInfoSet();
|
|
58
|
+
|
|
59
|
+
aParameterNames.forEach(function(sParameterName) {
|
|
60
|
+
var oProperty = FilterUtil.getPropertyByKey(aPropertyInfos, sParameterName);
|
|
61
|
+
|
|
62
|
+
if (oProperty && (oProperty.maxConditions === 1)) { // only single valued parameters are considered
|
|
63
|
+
mConditionsMap[sParameterName].forEach(function(oCondition) {
|
|
64
|
+
if (oCondition.operator === FilterOperator.EQ) { // only the EQ operators are considered
|
|
65
|
+
aParams.push(sParameterName + '=' + encodeURIComponent(ODataUtils.formatLiteral(oCondition.values[0], oProperty.typeConfig.className)));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
return aParams;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
_getParameterPath: function(oMDCFilterBar, oParameters) {
|
|
75
|
+
|
|
76
|
+
if (!oMDCFilterBar || !oMDCFilterBar.isA("sap.ui.mdc.FilterBar")) {
|
|
42
77
|
return null;
|
|
43
78
|
}
|
|
44
79
|
|
|
45
|
-
|
|
46
|
-
if (!aPropertiesMetadata) {
|
|
80
|
+
if (!oParameters || (oParameters.parameters.length <= 0)) {
|
|
47
81
|
return null;
|
|
48
82
|
}
|
|
49
83
|
|
|
50
84
|
var sEntitySetName = oMDCFilterBar.getDelegate().payload.collectionName;
|
|
51
85
|
|
|
52
|
-
|
|
53
|
-
var oProperty = FilterUtil.getPropertyByKey(aPropertiesMetadata, sFieldPath);
|
|
54
|
-
if (oProperty && (oParameters.parameters.indexOf(sFieldPath) >= 0)) {
|
|
55
|
-
|
|
56
|
-
mInternalParameterConditions[sFieldPath] = [];
|
|
57
|
-
//convert from externalized to model-specific value representation
|
|
58
|
-
for (i = 0; i < mConditions[sFieldPath].length; i++) {
|
|
59
|
-
oConditionInternal = merge({}, mConditions[sFieldPath][i]);
|
|
60
|
-
mInternalParameterConditions[sFieldPath].push(ConditionConverter.toType(oConditionInternal, oProperty.typeConfig, oMDCFilterBar.getTypeUtil()));
|
|
61
|
-
}
|
|
62
|
-
} else if (!oProperty) {
|
|
63
|
-
Log.error("no such property: " + sFieldPath);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
aParams = [];
|
|
68
|
-
for (i = 0; i < oParameters.parameters.length; i++) {
|
|
69
|
-
sFieldPath = oParameters.parameters[i];
|
|
70
|
-
if (mInternalParameterConditions[sFieldPath] && (mInternalParameterConditions[sFieldPath].length > 0)) {
|
|
71
|
-
sEdmType = oParameters.parameterTypes[sFieldPath];
|
|
72
|
-
aParams.push(sFieldPath + '=' + encodeURIComponent(ODataUtils.formatLiteral(mInternalParameterConditions[sFieldPath][0].values[0], sEdmType)));
|
|
73
|
-
} else {
|
|
74
|
-
Log.error("no value found parameter '" + sFieldPath + "'");
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
86
|
+
var aParams = DelegateUtil._getParametersListUrl(oMDCFilterBar, oParameters.parameters);
|
|
79
87
|
|
|
80
88
|
// create parameter context
|
|
81
89
|
return '/' + sEntitySetName + '(' + aParams.toString() + ")/" + oParameters.parameterNavigationName;
|
|
82
90
|
},
|
|
83
91
|
|
|
84
92
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* @param {sap.ui.mdc.FilterBar} oMDCFilterBar - instance of the filter bar
|
|
88
|
-
* @param {map} mConditions - map with externalized conditions
|
|
89
|
-
* @returns {string} path information
|
|
90
|
-
* @protected
|
|
91
|
-
*/
|
|
92
|
-
getParametersInfo : function(oMDCFilterBar, mConditions) {
|
|
93
|
-
var oParameters = DelegateUtil._getParameters(oMDCFilterBar);
|
|
94
|
-
|
|
95
|
-
return DelegateUtil._getParameterPath(oMDCFilterBar, mConditions, oParameters);
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Static function that replaces special characters with a underscore.<br>
|
|
93
|
+
* Static function that returns the parameter names..
|
|
101
94
|
*
|
|
102
95
|
* @param {sap.ui.mdc.FilterBar} oMDCFilterBar - instance of the filter bar
|
|
103
|
-
* @
|
|
104
|
-
* @returns {string} path information
|
|
96
|
+
* @returns {array | null} list of parameter names
|
|
105
97
|
* @protected
|
|
106
98
|
*/
|
|
107
99
|
getParameterNames : function(oMDCFilterBar) {
|
|
@@ -359,17 +359,26 @@ sap.ui.define([
|
|
|
359
359
|
|
|
360
360
|
//TODO: Alias might be changing after backend request
|
|
361
361
|
aVisibleMeasures.push(this._getAggregatedMeasureNameForMDCItem(oItem));
|
|
362
|
-
|
|
362
|
+
|
|
363
|
+
var oMeasureSettings = {
|
|
363
364
|
name: this._getAggregatedMeasureNameForMDCItem(oItem),//"average" + oItem.getName(),
|
|
364
365
|
label: oItem.getLabel(),
|
|
365
|
-
role: "axis1"
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
role: oItem.getRole() ? oItem.getRole() : "axis1"
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
if (aggregationMethod && propertyPath) {
|
|
370
|
+
oMeasureSettings.analyticalInfo = {
|
|
371
|
+
propertyPath: propertyPath,
|
|
368
372
|
"with": aggregationMethod
|
|
369
|
-
}
|
|
370
|
-
}
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
var oMeasure = new Measure(oMeasureSettings);
|
|
371
377
|
this._oInnerChart.addMeasure(oMeasure);
|
|
372
378
|
break;
|
|
379
|
+
|
|
380
|
+
default:
|
|
381
|
+
Log.error("MDC Chart Item " + oItem.getId() + " with label " + oItem.getLabel() + " has no known type. Supported typed are: \"groupable\" & \"aggregatable\"");
|
|
373
382
|
}
|
|
374
383
|
|
|
375
384
|
aColorPromises.push(this._prepareColoringForItem(oItem));
|
|
@@ -838,15 +847,22 @@ sap.ui.define([
|
|
|
838
847
|
var propertyPath = oPropertyInfo.propertyPath;
|
|
839
848
|
|
|
840
849
|
//TODO: Check for Criticality, Coloring and so on
|
|
841
|
-
|
|
850
|
+
|
|
851
|
+
var oMeasureSettings = {
|
|
842
852
|
name: this._getAggregatedMeasureNameForMDCItem(oMDChartItem),//"average" + oItem.getName(),
|
|
843
853
|
label: oMDChartItem.getLabel(),
|
|
844
|
-
role: "axis1"
|
|
845
|
-
|
|
854
|
+
role: oMDChartItem.getRole() ? oMDChartItem.getRole() : "axis1"
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
if (aggregationMethod && propertyPath) {
|
|
858
|
+
oMeasureSettings.analyticalInfo = {
|
|
846
859
|
propertyPath: propertyPath, //TODO: What to fill here without PropertyInfos? Consider property at MDC Item level
|
|
847
860
|
"with": aggregationMethod
|
|
848
|
-
}
|
|
849
|
-
}
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
var oMeasure = new Measure(oMeasureSettings);
|
|
850
866
|
this._oInnerChart.addMeasure(oMeasure);
|
|
851
867
|
}.bind(this));
|
|
852
868
|
|
|
@@ -929,19 +945,19 @@ sap.ui.define([
|
|
|
929
945
|
|
|
930
946
|
var aPropertiesMetadata = oFilter.getPropertyInfoSet ? oFilter.getPropertyInfoSet() : null;
|
|
931
947
|
var aParameterNames = DelegateUtil.getParameterNames(oFilter);
|
|
932
|
-
var oFilterInfo = FilterUtil.getFilterInfo(
|
|
948
|
+
var oFilterInfo = FilterUtil.getFilterInfo(ChartDelegate.getTypeUtil(), mConditions, aPropertiesMetadata, aParameterNames);
|
|
933
949
|
if (oFilterInfo) {
|
|
934
950
|
oBindingInfo.filters = oFilterInfo.filters;
|
|
935
951
|
}
|
|
936
952
|
|
|
937
|
-
var sParameterPath = DelegateUtil.getParametersInfo(oFilter
|
|
953
|
+
var sParameterPath = DelegateUtil.getParametersInfo(oFilter);
|
|
938
954
|
if (sParameterPath) {
|
|
939
955
|
oBindingInfo.path = sParameterPath;
|
|
940
956
|
}
|
|
941
957
|
}
|
|
942
958
|
|
|
943
959
|
// get the basic search
|
|
944
|
-
var sSearchText = oFilter.getSearch();
|
|
960
|
+
var sSearchText = oFilter.getSearch instanceof Function ? oFilter.getSearch() : "";
|
|
945
961
|
if (sSearchText) {
|
|
946
962
|
|
|
947
963
|
if (!oBindingInfo) {
|
|
@@ -1034,11 +1050,9 @@ sap.ui.define([
|
|
|
1034
1050
|
}
|
|
1035
1051
|
// Make this dynamic for setter calls
|
|
1036
1052
|
this._vizTooltip.connect(this._oInnerChart.getVizUid());
|
|
1037
|
-
} else {
|
|
1038
|
-
if (this._vizTooltip) {
|
|
1053
|
+
} else if (this._vizTooltip) {
|
|
1039
1054
|
this._vizTooltip.destroy();
|
|
1040
1055
|
}
|
|
1041
|
-
}
|
|
1042
1056
|
} else {
|
|
1043
1057
|
Log.error("Trying to set chart tooltip while inner chart was not yet initialized");
|
|
1044
1058
|
}
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* @extends sap.ui.base.Object
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.93.3
|
|
43
43
|
*
|
|
44
44
|
* @private
|
|
45
45
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -353,37 +353,42 @@ sap.ui.define([
|
|
|
353
353
|
* @param {object} mEnhanceConfig.controlMeta.property The affected property name (such as <code>width</code> or <code>lable</code>)
|
|
354
354
|
* @param {object} mEnhanceConfig.value The value that should be written in the xConfig
|
|
355
355
|
* @param {object} [mEnhanceConfig.propertyBag] Optional propertybag for the <code>ModificationHandler</code>
|
|
356
|
+
* @returns {Promise} Promise resolving when the XConfig is successfully enhanced
|
|
356
357
|
*/
|
|
357
358
|
Engine.prototype.enhanceXConfig = function(vControl, mEnhanceConfig) {
|
|
358
359
|
|
|
359
360
|
var oControl = Engine.getControlInstance(vControl);
|
|
360
361
|
var oRegistryEntry = this._getRegistryEntry(vControl);
|
|
361
362
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
363
|
+
return Promise.resolve()
|
|
364
|
+
.then(function() {
|
|
365
|
+
if (oRegistryEntry) {
|
|
366
|
+
var oModificationHandler = this.getModificationHandler(vControl);
|
|
367
|
+
return oModificationHandler.enhanceConfig(oControl, mEnhanceConfig)
|
|
368
|
+
.then(function(oConfig){
|
|
369
|
+
oRegistryEntry.xConfig = oConfig;
|
|
370
|
+
});
|
|
371
|
+
} else {
|
|
372
|
+
throw new Error("The control instance needs to be registered to use xConfig!");
|
|
373
|
+
}
|
|
374
|
+
}.bind(this));
|
|
371
375
|
};
|
|
372
376
|
|
|
373
377
|
/**
|
|
374
378
|
* Returns a copy of the xConfig object
|
|
375
379
|
*
|
|
376
|
-
* @param {sap.ui.core.Element}
|
|
377
|
-
* @param {object} [
|
|
378
|
-
* @param {object} [
|
|
380
|
+
* @param {sap.ui.core.Element} vControl The according element which should be checked
|
|
381
|
+
* @param {object} [mEnhanceConfig] An object providing a modification handler specific payload
|
|
382
|
+
* @param {object} [mEnhanceConfig.propertyBag] Optional propertybag for different modification handler derivations
|
|
383
|
+
* @param {boolean} [bSync] If the method should be executed synchronously; e.g. for the Table
|
|
379
384
|
*
|
|
380
|
-
* @returns {object}
|
|
385
|
+
* @returns {Promise<object>} Promise resolving with the adapted xConfig object
|
|
381
386
|
*/
|
|
382
|
-
Engine.prototype.readXConfig = function(vControl, mEnhanceConfig) {
|
|
387
|
+
Engine.prototype.readXConfig = function(vControl, mEnhanceConfig, bSync) {
|
|
383
388
|
|
|
384
389
|
var oControl = Engine.getControlInstance(vControl);
|
|
385
390
|
var oModificationHandler = this.getModificationHandler(vControl);
|
|
386
|
-
return oModificationHandler.readConfig(oControl, mEnhanceConfig) || {};
|
|
391
|
+
return oModificationHandler.readConfig(oControl, mEnhanceConfig, bSync) || Promise.resolve({});
|
|
387
392
|
|
|
388
393
|
};
|
|
389
394
|
|
|
@@ -88,67 +88,89 @@ sap.ui.define([
|
|
|
88
88
|
* @param {object} oModificationPayload.value The value that should be written in nthe xConfig
|
|
89
89
|
* @param {object} [oModificationPayload.propertyBag] Optional propertybag for different modification handler derivations
|
|
90
90
|
*
|
|
91
|
-
* @returns {object}
|
|
91
|
+
* @returns {Promise<object>} Promise resolving to the adapted xConfig object
|
|
92
92
|
*/
|
|
93
93
|
ModificationHandler.prototype.enhanceConfig = function(oControl, oModificationPayload) {
|
|
94
94
|
var mPropertyBag = oModificationPayload.propertyBag;
|
|
95
|
-
|
|
95
|
+
var oModifier = mPropertyBag ? mPropertyBag.modifier : JsControlTreeModifier;
|
|
96
96
|
var sPropertyInfoKey = oModificationPayload.name;
|
|
97
97
|
var mControlMeta = oModificationPayload.controlMeta;
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
var sAffectedAggregation = mControlMeta.aggregation;
|
|
100
|
+
var sAffectedProperty = mControlMeta.property;
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
var vValue = oModificationPayload.value;
|
|
103
|
+
var oControlMetadata;
|
|
104
|
+
var sAggregationName;
|
|
105
|
+
var oXConfig;
|
|
103
106
|
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
return Promise.resolve()
|
|
108
|
+
.then(oModifier.getControlMetadata.bind(oModifier, oControl))
|
|
109
|
+
.then(function(oRetrievedControlMetadata) {
|
|
110
|
+
oControlMetadata = oRetrievedControlMetadata;
|
|
111
|
+
sAggregationName = sAffectedAggregation ? sAffectedAggregation : oControlMetadata.getDefaultAggregation().name;
|
|
112
|
+
return oModifier.getAggregation(oControl, "customData");
|
|
113
|
+
})
|
|
114
|
+
.then(function(aCustomData) {
|
|
115
|
+
return aCustomData.find(function(oCustomData) {
|
|
116
|
+
return Promise.resolve()
|
|
117
|
+
.then(oModifier.getProperty.bind(oModifier, oCustomData, "key"))
|
|
118
|
+
.then(function(sKey) {
|
|
119
|
+
return sKey == "xConfig";
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
})
|
|
123
|
+
.then(function(oRetrievedXConfig) {
|
|
124
|
+
oXConfig = oRetrievedXConfig;
|
|
125
|
+
if (oXConfig) {
|
|
126
|
+
return oModifier.getProperty(oXConfig, "value");
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
aggregations: {}
|
|
130
|
+
};
|
|
131
|
+
})
|
|
132
|
+
.then(function(oConfig) {
|
|
133
|
+
if (!oConfig.aggregations.hasOwnProperty(sAggregationName)) {
|
|
134
|
+
if (oControlMetadata.hasAggregation(sAggregationName)) {
|
|
135
|
+
oConfig.aggregations[sAggregationName] = {};
|
|
136
|
+
} else {
|
|
137
|
+
throw new Error("The aggregation " + sAggregationName + " does not exist for" + oControl);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
106
140
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
141
|
+
if (!oConfig.aggregations.hasOwnProperty(sPropertyInfoKey)) {
|
|
142
|
+
oConfig.aggregations[sAggregationName][sPropertyInfoKey] = {};
|
|
143
|
+
}
|
|
110
144
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (!oConfig.aggregations.hasOwnProperty(sAggregationName)) {
|
|
116
|
-
if (oControlMetadata.hasAggregation(sAggregationName)) {
|
|
117
|
-
oConfig.aggregations[sAggregationName] = {};
|
|
118
|
-
} else {
|
|
119
|
-
throw new Error("The aggregation " + sAggregationName + " does not exist for" + oControl);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (!oConfig.aggregations.hasOwnProperty(sPropertyInfoKey)) {
|
|
124
|
-
oConfig.aggregations[sAggregationName][sPropertyInfoKey] = {};
|
|
125
|
-
}
|
|
145
|
+
if (vValue !== null) {
|
|
146
|
+
oConfig.aggregations[sAggregationName][sPropertyInfoKey][sAffectedProperty] = vValue;
|
|
147
|
+
} else {
|
|
148
|
+
delete oConfig.aggregations[sAggregationName][sPropertyInfoKey][sAffectedProperty];
|
|
126
149
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
delete oConfig.aggregations[sAggregationName][sPropertyInfoKey][sAffectedProperty];
|
|
150
|
+
//Delete empty property name object
|
|
151
|
+
if (Object.keys(oConfig.aggregations[sAggregationName][sPropertyInfoKey]).length === 0) {
|
|
152
|
+
delete oConfig.aggregations[sAggregationName][sPropertyInfoKey];
|
|
131
153
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
154
|
+
//Delete empty aggregation name object
|
|
155
|
+
if (Object.keys(oConfig.aggregations[sAggregationName]).length === 0) {
|
|
156
|
+
delete oConfig.aggregations[sAggregationName];
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
135
160
|
|
|
136
|
-
|
|
137
|
-
if (Object.keys(oConfig.aggregations[sAggregationName]).length === 0) {
|
|
138
|
-
delete oConfig.aggregations[sAggregationName];
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
161
|
+
var oAppComponent = mPropertyBag ? mPropertyBag.appComponent : undefined;
|
|
142
162
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
163
|
+
if (!oXConfig) {
|
|
164
|
+
return Promise.resolve()
|
|
165
|
+
.then(oModifier.createAndAddCustomData.bind(oModifier, oControl, "xConfig", oConfig, oAppComponent))
|
|
166
|
+
.then(function() {
|
|
167
|
+
return oConfig;
|
|
168
|
+
});
|
|
169
|
+
} else {
|
|
170
|
+
oModifier.setProperty(oXConfig, "value", oConfig);
|
|
171
|
+
return oConfig;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
152
174
|
};
|
|
153
175
|
|
|
154
176
|
/**
|
|
@@ -158,16 +180,73 @@ sap.ui.define([
|
|
|
158
180
|
* @param {object} [oModificationPayload] An object providing a modification handler specific payload
|
|
159
181
|
* @param {object} [oModificationPayload.propertyBag] Optional propertybag for different modification handler derivations
|
|
160
182
|
*
|
|
161
|
-
* @returns {object}
|
|
183
|
+
* @returns {Promise<object>|object} A promise resolving to the adapted xConfig object or the object directly
|
|
162
184
|
*/
|
|
163
185
|
ModificationHandler.prototype.readConfig = function(oControl, oModificationPayload) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
186
|
+
var oConfig, oAggregationConfig;
|
|
187
|
+
|
|
188
|
+
if (oModificationPayload) {
|
|
189
|
+
var oModifier = oModificationPayload.propertyBag ? oModificationPayload.propertyBag.modifier : JsControlTreeModifier;
|
|
190
|
+
return Promise.resolve()
|
|
191
|
+
.then(oModifier.getAggregation.bind(oModifier, oControl, "customData"))
|
|
192
|
+
.then(function(aCustomData) {
|
|
193
|
+
return aCustomData.find(function(oCustomData) {
|
|
194
|
+
return Promise.resolve()
|
|
195
|
+
.then(oModifier.getProperty.bind(oModifier, oCustomData, "key"))
|
|
196
|
+
.then(function(sKey) {
|
|
197
|
+
return sKey == "xConfig";
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
})
|
|
201
|
+
.then(function(oAggregationConfig) {
|
|
202
|
+
if (oAggregationConfig) {
|
|
203
|
+
return Promise.resolve()
|
|
204
|
+
.then(oModifier.getProperty.bind(oModifier, oAggregationConfig, "value"))
|
|
205
|
+
.then(function(oValue) {
|
|
206
|
+
return merge({}, oValue);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return null;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// These functions are used instead of the modifier to avoid that the
|
|
214
|
+
// entire call stack is changed to async when it's not needed
|
|
215
|
+
var fnGetAggregationSync = function(oParent, sAggregationName) {
|
|
216
|
+
var fnFindAggregation = function(oControl, sAggregationName) {
|
|
217
|
+
if (oControl) {
|
|
218
|
+
if (oControl.getMetadata) {
|
|
219
|
+
var oMetadata = oControl.getMetadata();
|
|
220
|
+
var oAggregations = oMetadata.getAllAggregations();
|
|
221
|
+
if (oAggregations) {
|
|
222
|
+
return oAggregations[sAggregationName];
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return undefined;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
var oAggregation = fnFindAggregation(oParent, sAggregationName);
|
|
230
|
+
if (oAggregation) {
|
|
231
|
+
return oParent[oAggregation._sGetter]();
|
|
232
|
+
}
|
|
233
|
+
return undefined;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
var fnGetPropertySync = function(oControl, sPropertyName) {
|
|
237
|
+
var oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName);
|
|
238
|
+
if (oMetadata) {
|
|
239
|
+
var sPropertyGetter = oMetadata._sGetter;
|
|
240
|
+
return oControl[sPropertyGetter]();
|
|
241
|
+
}
|
|
242
|
+
return undefined;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
oAggregationConfig = fnGetAggregationSync(oControl, "customData").find(function(oCustomData){
|
|
246
|
+
return fnGetPropertySync(oCustomData, "key") == "xConfig";
|
|
168
247
|
});
|
|
169
|
-
oConfig = oAggregationConfig ? merge({},
|
|
170
|
-
|
|
248
|
+
oConfig = oAggregationConfig ? merge({}, fnGetPropertySync(oAggregationConfig, "value")) : null;
|
|
249
|
+
return oConfig;
|
|
171
250
|
};
|
|
172
251
|
|
|
173
252
|
ModificationHandler.getInstance = function() {
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* Determines whether the reordering of items should be enabled
|
|
38
38
|
*/
|
|
39
39
|
enableReorder: {
|
|
40
|
-
type: "
|
|
40
|
+
type: "boolean",
|
|
41
41
|
defaultValue: true
|
|
42
42
|
},
|
|
43
43
|
/**
|
|
@@ -78,10 +78,10 @@ sap.ui.define([
|
|
|
78
78
|
*/
|
|
79
79
|
change: {
|
|
80
80
|
reason: {
|
|
81
|
-
type: "
|
|
81
|
+
type: "string"
|
|
82
82
|
},
|
|
83
83
|
item: {
|
|
84
|
-
type: "
|
|
84
|
+
type: "object"
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -109,7 +109,7 @@ sap.ui.define([
|
|
|
109
109
|
this._oListControl = this._createInnerListControl();
|
|
110
110
|
|
|
111
111
|
// disable 'select all'
|
|
112
|
-
this._oListControl.
|
|
112
|
+
this._oListControl.setMultiSelectMode("ClearAll");
|
|
113
113
|
|
|
114
114
|
this._setInnerLayout();
|
|
115
115
|
};
|
|
@@ -330,7 +330,7 @@ sap.ui.define([
|
|
|
330
330
|
BasePanel.prototype._getListControlConfig = function() {
|
|
331
331
|
return {
|
|
332
332
|
mode:"MultiSelect",
|
|
333
|
-
rememberSelections:
|
|
333
|
+
rememberSelections: true,
|
|
334
334
|
itemPress: [this._onItemPressed, this],
|
|
335
335
|
selectionChange: [this._onSelectionChange, this],
|
|
336
336
|
sticky: ["HeaderToolbar", "ColumnHeaders", "InfoToolbar"],
|
|
@@ -145,6 +145,14 @@ sap.ui.define([
|
|
|
145
145
|
GroupView.prototype._createGroupListTemplate = function() {
|
|
146
146
|
var oList = new List({
|
|
147
147
|
keyboardMode: ListKeyboardMode.Navigation,
|
|
148
|
+
updateStarted: function() {
|
|
149
|
+
this._removeFactoryControl();
|
|
150
|
+
}.bind(this),
|
|
151
|
+
updateFinished: function(oEvt) {
|
|
152
|
+
if (this.getShowFactory() && this._aInitializedLists.indexOf(oEvt.getSource().getId()) > -1) {
|
|
153
|
+
this._addFactoryControl(oEvt.getSource());
|
|
154
|
+
}
|
|
155
|
+
}.bind(this),
|
|
148
156
|
selectionChange: function(oBindingInfo) {
|
|
149
157
|
var sPath = oBindingInfo.getParameter("listItem").getBindingContext(this.P13N_MODEL).sPath;
|
|
150
158
|
var oItem = this.getP13nModel().getProperty(sPath);
|
|
@@ -338,8 +346,6 @@ sap.ui.define([
|
|
|
338
346
|
return;
|
|
339
347
|
}
|
|
340
348
|
|
|
341
|
-
var aInitializedGroups = this._removeFactoryControl();
|
|
342
|
-
|
|
343
349
|
this._oListControl.getItems().forEach(function(oOuterItem){
|
|
344
350
|
var oPanel = oOuterItem.getContent()[0];
|
|
345
351
|
var oInnerList = oPanel.getContent()[0];
|
|
@@ -349,9 +355,6 @@ sap.ui.define([
|
|
|
349
355
|
this._togglePanelVisibility(oPanel);
|
|
350
356
|
}
|
|
351
357
|
|
|
352
|
-
if (this.getShowFactory() && aInitializedGroups.indexOf(oInnerList.getId()) > -1) {
|
|
353
|
-
this._addFactoryControl(oInnerList);
|
|
354
|
-
}
|
|
355
358
|
}.bind(this));
|
|
356
359
|
|
|
357
360
|
this._aCurrentFilters = aFilter;
|
|
@@ -415,7 +418,7 @@ sap.ui.define([
|
|
|
415
418
|
){
|
|
416
419
|
this._bInitialized = true;
|
|
417
420
|
var oFirstList = this._oListControl.getItems()[0].getContent()[0].getContent()[0];
|
|
418
|
-
this._addFactoryControl(oFirstList);
|
|
421
|
+
this._addFactoryControl(oFirstList); //TODO: remove this call
|
|
419
422
|
this._addInitializedList(oFirstList);
|
|
420
423
|
}
|
|
421
424
|
};
|