@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
|
@@ -22,8 +22,6 @@ sap.ui.define([
|
|
|
22
22
|
* @alias sap.ui.mdc.filterbar.vh.GenericFilterBarDelegate
|
|
23
23
|
*/
|
|
24
24
|
var GenericFilterBarDelegate = Object.assign({}, FilterBarDelegate);
|
|
25
|
-
var _oObserver;
|
|
26
|
-
var _aProperties = [];
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
27
|
* Fetches the relevant metadata (from the FilterItems of the FiterBar) for the FilterBar and returns property info array
|
|
@@ -32,26 +30,26 @@ sap.ui.define([
|
|
|
32
30
|
* @returns {Array} array of property info
|
|
33
31
|
*/
|
|
34
32
|
GenericFilterBarDelegate.fetchProperties = function(oFilterBar) {
|
|
35
|
-
if (!
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
if (!oFilterBar.__oObserver) {
|
|
34
|
+
oFilterBar.__oObserver = new ManagedObjectObserver(_observeChanges);
|
|
35
|
+
oFilterBar.__oObserver.observe(oFilterBar, {
|
|
38
36
|
aggregations: ["filterItems"]
|
|
39
37
|
});
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
return new Promise(function(fResolve) {
|
|
43
41
|
var aFilterItems = oFilterBar.getFilterItems();
|
|
44
|
-
|
|
42
|
+
oFilterBar.__aProperties = [];
|
|
45
43
|
aFilterItems.forEach(function(oFF){
|
|
46
|
-
addFilterField(oFF);
|
|
44
|
+
addFilterField(oFF, oFilterBar.__aProperties);
|
|
47
45
|
});
|
|
48
46
|
|
|
49
|
-
fResolve(
|
|
47
|
+
fResolve(oFilterBar.__aProperties);
|
|
50
48
|
});
|
|
51
49
|
|
|
52
50
|
};
|
|
53
51
|
|
|
54
|
-
function addFilterField(oFF) {
|
|
52
|
+
function addFilterField(oFF, aProperties) {
|
|
55
53
|
var sPath = oFF.getBindingPath("conditions");
|
|
56
54
|
if (!sPath) {
|
|
57
55
|
return;
|
|
@@ -59,7 +57,7 @@ sap.ui.define([
|
|
|
59
57
|
var aPathParts = sPath.split("/");
|
|
60
58
|
var sFieldPath = aPathParts[aPathParts.length - 1];
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
aProperties.push({
|
|
63
61
|
name: sFieldPath,
|
|
64
62
|
label: oFF.getLabel() || sFieldPath,
|
|
65
63
|
type: oFF.getDataType(),
|
|
@@ -74,61 +72,79 @@ sap.ui.define([
|
|
|
74
72
|
});
|
|
75
73
|
}
|
|
76
74
|
|
|
77
|
-
function removeFilterField(oFF) {
|
|
75
|
+
function removeFilterField(oFF, aProperties) {
|
|
78
76
|
var sPath = oFF.getBindingPath("conditions");
|
|
79
77
|
if (!sPath) {
|
|
80
78
|
return;
|
|
81
79
|
}
|
|
82
|
-
var aPathParts = sPath.split("/");
|
|
83
|
-
var sFieldPath = aPathParts[aPathParts.length - 1];
|
|
84
|
-
if (_getProperty(sFieldPath)) {
|
|
85
|
-
_removeProperty(sFieldPath);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
80
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
function _getProperty(sName) {
|
|
82
|
+
var oNamedProperty = null;
|
|
83
|
+
aProperties.some(function(oProperty) {
|
|
84
|
+
if (oProperty.name === sName) {
|
|
85
|
+
oNamedProperty = oProperty;
|
|
86
|
+
}
|
|
87
|
+
return oNamedProperty !== null;
|
|
88
|
+
});
|
|
97
89
|
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
return oNamedProperty;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function _removeProperty(sName) {
|
|
94
|
+
var nIdx = -1;
|
|
95
|
+
aProperties.some(function(oProperty, index) {
|
|
96
|
+
if (oProperty.name === sName) {
|
|
97
|
+
nIdx = index;
|
|
98
|
+
}
|
|
99
|
+
return nIdx !== -1;
|
|
100
|
+
});
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
_aProperties.some(function(oProperty, index) {
|
|
104
|
-
if (oProperty.name === sName) {
|
|
105
|
-
nIdx = index;
|
|
102
|
+
if (nIdx >= 0) {
|
|
103
|
+
aProperties.splice(nIdx, 1);
|
|
106
104
|
}
|
|
107
|
-
return nIdx !== -1;
|
|
108
|
-
});
|
|
109
105
|
|
|
110
|
-
|
|
111
|
-
_aProperties.splice(nIdx, 1);
|
|
106
|
+
return nIdx;
|
|
112
107
|
}
|
|
113
108
|
|
|
114
|
-
|
|
109
|
+
var aPathParts = sPath.split("/");
|
|
110
|
+
var sFieldPath = aPathParts[aPathParts.length - 1];
|
|
111
|
+
if (_getProperty(sFieldPath)) {
|
|
112
|
+
_removeProperty(sFieldPath);
|
|
113
|
+
}
|
|
115
114
|
}
|
|
116
115
|
|
|
116
|
+
|
|
117
|
+
|
|
117
118
|
function _observeChanges(oChanges) {
|
|
119
|
+
var oFilterBar, aProperties;
|
|
118
120
|
|
|
119
121
|
if (oChanges.name === "filterItems") {
|
|
120
122
|
if (oChanges.mutation === "insert") {
|
|
121
123
|
var oNewFF = oChanges.child;
|
|
122
|
-
|
|
124
|
+
oFilterBar = oNewFF.getParent();
|
|
125
|
+
aProperties = oFilterBar.__aProperties;
|
|
126
|
+
addFilterField(oNewFF, aProperties);
|
|
123
127
|
return;
|
|
124
128
|
}
|
|
125
129
|
if (oChanges.mutation === "remove") {
|
|
126
130
|
var oRemoveFF = oChanges.child;
|
|
127
|
-
|
|
131
|
+
oFilterBar = oRemoveFF.getParent();
|
|
132
|
+
aProperties = oFilterBar.__aProperties;
|
|
133
|
+
removeFilterField(oRemoveFF, aProperties);
|
|
128
134
|
return;
|
|
129
135
|
}
|
|
130
136
|
}
|
|
131
137
|
}
|
|
132
138
|
|
|
139
|
+
GenericFilterBarDelegate.cleanup = function(oFilterBar) {
|
|
140
|
+
|
|
141
|
+
if (oFilterBar.__oObserver) {
|
|
142
|
+
oFilterBar.__oObserver.disconnect();
|
|
143
|
+
delete oFilterBar.__oObserver;
|
|
144
|
+
delete oFilterBar.__aProperties;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
};
|
|
148
|
+
|
|
133
149
|
return GenericFilterBarDelegate;
|
|
134
150
|
});
|
|
@@ -42,17 +42,21 @@ sap.ui.define(["sap/ui/fl/apply/api/FlexRuntimeInfoAPI"], function (FlexRuntimeI
|
|
|
42
42
|
return new Promise(function (resolve, reject) {
|
|
43
43
|
var oModifier = mPropertyBag.modifier;
|
|
44
44
|
var oChangeContent = bIsRevert ? oChange.getRevertData() : oChange.getContent();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
Promise.resolve()
|
|
46
|
+
.then(oModifier.getProperty.bind(oModifier, oControl, "aggregateConditions"))
|
|
47
|
+
.then(function(oAggregateConditions) {
|
|
48
|
+
var oAggregations = oAggregateConditions ? oAggregateConditions : {};
|
|
49
|
+
oAggregations[oChangeContent.name] = {};
|
|
50
|
+
var oAggregateContent = {
|
|
51
|
+
name: oChangeContent.name
|
|
52
|
+
};
|
|
53
|
+
oModifier.setProperty(oControl, "aggregateConditions", oAggregations);
|
|
54
|
+
fFinalizeAggregateChange(oChange, oControl, oAggregateContent, bIsRevert);
|
|
55
|
+
resolve();
|
|
56
|
+
})
|
|
57
|
+
.catch(function(oError) {
|
|
58
|
+
reject(oError);
|
|
59
|
+
});
|
|
56
60
|
});
|
|
57
61
|
};
|
|
58
62
|
|
|
@@ -60,19 +64,24 @@ sap.ui.define(["sap/ui/fl/apply/api/FlexRuntimeInfoAPI"], function (FlexRuntimeI
|
|
|
60
64
|
return new Promise(function (resolve, reject) {
|
|
61
65
|
var oModifier = mPropertyBag.modifier;
|
|
62
66
|
var oChangeContent = bIsRevert ? oChange.getRevertData() : oChange.getContent();
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
Promise.resolve()
|
|
68
|
+
.then(oModifier.getProperty.bind(oModifier, oControl, "aggregateConditions"))
|
|
69
|
+
.then(function(oAggregateConditions) {
|
|
70
|
+
var aValue = oAggregateConditions ? oAggregateConditions : {};
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
delete aValue[oChangeContent.name];
|
|
72
|
-
oModifier.setProperty(oControl, "aggregateConditions", aValue);
|
|
72
|
+
if (!aValue) {
|
|
73
|
+
// Nothing to remove
|
|
74
|
+
reject();
|
|
75
|
+
}
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
delete aValue[oChangeContent.name];
|
|
78
|
+
oModifier.setProperty(oControl, "aggregateConditions", aValue);
|
|
79
|
+
fFinalizeAggregateChange(oChange, oControl, oChangeContent, bIsRevert);
|
|
80
|
+
resolve();
|
|
81
|
+
})
|
|
82
|
+
.catch(function(oError) {
|
|
83
|
+
reject(oError);
|
|
84
|
+
});
|
|
76
85
|
});
|
|
77
86
|
};
|
|
78
87
|
|
|
@@ -58,42 +58,45 @@ sap.ui.define([
|
|
|
58
58
|
"changeHandler": {
|
|
59
59
|
applyChange: function (oChange, oControl, mPropertyBag) {
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
return Engine.getInstance().readXConfig(oControl, {
|
|
62
62
|
propertyBag: mPropertyBag
|
|
63
|
-
})
|
|
64
|
-
|
|
63
|
+
})
|
|
64
|
+
.then(function(oPriorAggregationConfig) {
|
|
65
|
+
var sOldValue = null;
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
if (oPriorAggregationConfig
|
|
68
|
+
&& oPriorAggregationConfig.aggregations
|
|
69
|
+
&& oPriorAggregationConfig.aggregations[sAffectedAggregation]
|
|
70
|
+
&& oPriorAggregationConfig.aggregations[sAffectedAggregation][oChange.getContent().name]
|
|
71
|
+
&& oPriorAggregationConfig.aggregations[sAffectedAggregation][oChange.getContent().name][sAffectedProperty]
|
|
72
|
+
){
|
|
73
|
+
sOldValue = oPriorAggregationConfig.aggregations[sAffectedAggregation][oChange.getContent().name][sAffectedProperty];
|
|
74
|
+
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
oChange.setRevertData({
|
|
77
|
+
name: oChange.getContent().name,
|
|
78
|
+
value: sOldValue
|
|
79
|
+
});
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
return Engine.getInstance().enhanceXConfig(oControl, {
|
|
82
|
+
controlMeta: {
|
|
83
|
+
aggregation: sAffectedAggregation,
|
|
84
|
+
property: sAffectedProperty
|
|
85
|
+
},
|
|
86
|
+
name: oChange.getContent().name,
|
|
87
|
+
value: oChange.getContent().value,
|
|
88
|
+
propertyBag: mPropertyBag
|
|
89
|
+
});
|
|
90
|
+
})
|
|
91
|
+
.then(function() {
|
|
92
|
+
fConfigModified(oControl);
|
|
88
93
|
});
|
|
89
|
-
fConfigModified(oControl);
|
|
90
|
-
|
|
91
94
|
},
|
|
92
95
|
completeChangeContent: function (oChange, mChangeSpecificInfo, mPropertyBag) {
|
|
93
96
|
// Not used, but needs to be there
|
|
94
97
|
},
|
|
95
98
|
revertChange: function (oChange, oControl, mPropertyBag) {
|
|
96
|
-
Engine.getInstance().enhanceXConfig(oControl, {
|
|
99
|
+
return Engine.getInstance().enhanceXConfig(oControl, {
|
|
97
100
|
controlMeta: {
|
|
98
101
|
aggregation: sAffectedAggregation,
|
|
99
102
|
property: sAffectedProperty
|
|
@@ -101,10 +104,11 @@ sap.ui.define([
|
|
|
101
104
|
name: oChange.getRevertData().name,
|
|
102
105
|
value: oChange.getRevertData().value,
|
|
103
106
|
propertyBag: mPropertyBag
|
|
107
|
+
})
|
|
108
|
+
.then(function() {
|
|
109
|
+
oChange.resetRevertData();
|
|
110
|
+
fConfigModified(oControl);
|
|
104
111
|
});
|
|
105
|
-
|
|
106
|
-
oChange.resetRevertData();
|
|
107
|
-
fConfigModified(oControl);
|
|
108
112
|
}
|
|
109
113
|
},
|
|
110
114
|
"layers": {
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
*
|
|
13
13
|
* @alias sap.ui.mdc.flexibility.Chart
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.93.3
|
|
16
16
|
*/
|
|
17
17
|
return {
|
|
18
18
|
addItem: ChartItemFlex.addItem,
|
|
@@ -40,10 +40,15 @@ sap.ui.define([
|
|
|
40
40
|
completeChangeContent: function(oChange, mSpecificChangeInfo) {
|
|
41
41
|
},
|
|
42
42
|
applyChange: function(oChange, oChart, mPropertyBag) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
var oModifier = mPropertyBag.modifier;
|
|
44
|
+
return Promise.resolve()
|
|
45
|
+
.then(oModifier.getProperty.bind(oModifier, oChart, "chartType"))
|
|
46
|
+
.then(function(vOldValue) {
|
|
47
|
+
// First store the old value for revert
|
|
48
|
+
oChange.setRevertData(vOldValue);
|
|
49
|
+
// Then set the new value
|
|
50
|
+
oModifier.setProperty(oChart, "chartType", oChange.getContent().chartType);
|
|
51
|
+
});
|
|
47
52
|
},
|
|
48
53
|
revertChange: function(oChange, oChart, mPropertyBag) {
|
|
49
54
|
mPropertyBag.modifier.setProperty(oChart, "chartType", oChange.getRevertData());
|
|
@@ -16,11 +16,23 @@ sap.ui.define([
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
oChartItemFlex.findItem = function(oModifier, aItems, sName) {
|
|
19
|
-
return aItems.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
return aItems.reduce(function(oPreviousPromise, oItem) {
|
|
20
|
+
return oPreviousPromise
|
|
21
|
+
.then(function(oFoundItem) {
|
|
22
|
+
if (!oFoundItem) {
|
|
23
|
+
return Promise.all([
|
|
24
|
+
oModifier.getProperty(oItem, "key"),
|
|
25
|
+
oModifier.getProperty(oItem, "name") // for chart remake
|
|
26
|
+
])
|
|
27
|
+
.then(function(aProperties) {
|
|
28
|
+
if (aProperties[0] === sName || aProperties[1] === sName) {
|
|
29
|
+
return oItem;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return oFoundItem;
|
|
34
|
+
});
|
|
35
|
+
}, Promise.resolve());
|
|
24
36
|
};
|
|
25
37
|
|
|
26
38
|
oChartItemFlex.addItem = oChartItemFlex.createAddChangeHandler();
|
|
@@ -29,4 +41,4 @@ sap.ui.define([
|
|
|
29
41
|
|
|
30
42
|
return oChartItemFlex;
|
|
31
43
|
|
|
32
|
-
});
|
|
44
|
+
});
|
|
@@ -26,10 +26,21 @@ sap.ui.define([
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
ColumnFlex.findItem = function(oModifier, aColumns, sName) {
|
|
29
|
-
return aColumns.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
return aColumns.reduce(function(oPreviousPromise, oColumn) {
|
|
30
|
+
return oPreviousPromise
|
|
31
|
+
.then(function(oFoundColumn) {
|
|
32
|
+
if (!oFoundColumn) {
|
|
33
|
+
return Promise.resolve()
|
|
34
|
+
.then(oModifier.getProperty.bind(oModifier, oColumn, "dataProperty"))
|
|
35
|
+
.then(function(sDataProperty) {
|
|
36
|
+
if (sDataProperty === sName) {
|
|
37
|
+
return oColumn;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return oFoundColumn;
|
|
42
|
+
});
|
|
43
|
+
}, Promise.resolve());
|
|
33
44
|
};
|
|
34
45
|
|
|
35
46
|
ColumnFlex.afterApply = function(sChangeType, oTable, bIsRevert) {
|
|
@@ -21,52 +21,54 @@ sap.ui.define([
|
|
|
21
21
|
oFilterControl.applyConditionsAfterChangesApplied();
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
return new Promise(function(resolve) {
|
|
24
|
+
return new Promise(function(resolve, reject) {
|
|
25
25
|
|
|
26
26
|
var mConditionsData, aConditions = null, oModifier = mPropertyBag.modifier;
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
Promise.resolve()
|
|
29
|
+
.then(oModifier.getProperty.bind(oModifier, oControl, "filterConditions"))
|
|
30
|
+
.then(function(mFilterConditions) {
|
|
31
|
+
// 'filterConditions' property needs to be updated for change selector
|
|
32
|
+
mConditionsData = merge({}, mFilterConditions);
|
|
33
|
+
if (mConditionsData) {
|
|
34
|
+
for (var sFieldPath in mConditionsData) {
|
|
35
|
+
if (sFieldPath === oChangeContent.name) {
|
|
36
|
+
aConditions = mConditionsData[sFieldPath];
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
if (!aConditions) {
|
|
43
|
+
mConditionsData[oChangeContent.name] = [];
|
|
44
|
+
aConditions = mConditionsData[oChangeContent.name];
|
|
45
|
+
}
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
47
|
+
var nConditionIdx = FilterOperatorUtil.indexOfCondition(oChangeContent.condition, aConditions);
|
|
48
|
+
if (nConditionIdx < 0) {
|
|
49
|
+
aConditions.push(oChangeContent.condition);
|
|
50
|
+
|
|
51
|
+
// 'filterConditions' property needs to be updated for change selector
|
|
52
|
+
oModifier.setProperty(oControl, "filterConditions", mConditionsData);
|
|
53
|
+
|
|
54
|
+
if (!bIsRevert) {
|
|
55
|
+
// Set revert data on the change
|
|
56
|
+
oChange.setRevertData({
|
|
57
|
+
name: oChangeContent.name,
|
|
58
|
+
condition: oChangeContent.condition
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// the control providing the filter functionality needs to be used to update the ConditionModel
|
|
63
|
+
if (oFilterControl && oFilterControl.addCondition) {
|
|
64
|
+
return oFilterControl.addCondition(oChangeContent.name, oChangeContent.condition);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
.then(resolve)
|
|
69
|
+
.catch(function(oError) {
|
|
70
|
+
reject(oError);
|
|
71
|
+
});
|
|
70
72
|
});
|
|
71
73
|
};
|
|
72
74
|
|
|
@@ -78,54 +80,54 @@ sap.ui.define([
|
|
|
78
80
|
oFilterControl.applyConditionsAfterChangesApplied();
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
return new Promise(function(resolve) {
|
|
83
|
+
return new Promise(function(resolve, reject) {
|
|
82
84
|
var mConditionsData, aConditions, nDelIndex = -1, oModifier = mPropertyBag.modifier;
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
for (var sFieldPath in mConditionsData) {
|
|
88
|
-
if (sFieldPath === oChangeContent.name) {
|
|
89
|
-
aConditions = mConditionsData[sFieldPath];
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (aConditions && (aConditions.length > 0)) {
|
|
96
|
-
|
|
97
|
-
nDelIndex = FilterOperatorUtil.indexOfCondition(oChangeContent.condition, aConditions);
|
|
98
|
-
if (nDelIndex >= 0) {
|
|
99
|
-
aConditions.splice(nDelIndex, 1);
|
|
100
|
-
// if (aConditions.length === 0) {
|
|
101
|
-
// delete mConditionsData[oChangeContent.name];
|
|
102
|
-
// }
|
|
86
|
+
Promise.resolve()
|
|
87
|
+
.then(oModifier.getProperty.bind(oModifier, oControl, "filterConditions"))
|
|
88
|
+
.then(function(mFilterConditions) {
|
|
103
89
|
// 'filterConditions' property needs to be updated for change selector
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
90
|
+
mConditionsData = merge({}, mFilterConditions);
|
|
91
|
+
|
|
92
|
+
if (mConditionsData) {
|
|
93
|
+
for (var sFieldPath in mConditionsData) {
|
|
94
|
+
if (sFieldPath === oChangeContent.name) {
|
|
95
|
+
aConditions = mConditionsData[sFieldPath];
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
112
99
|
}
|
|
113
100
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
101
|
+
if (aConditions && (aConditions.length > 0)) {
|
|
102
|
+
|
|
103
|
+
nDelIndex = FilterOperatorUtil.indexOfCondition(oChangeContent.condition, aConditions);
|
|
104
|
+
if (nDelIndex >= 0) {
|
|
105
|
+
aConditions.splice(nDelIndex, 1);
|
|
106
|
+
// if (aConditions.length === 0) {
|
|
107
|
+
// delete mConditionsData[oChangeContent.name];
|
|
108
|
+
// }
|
|
109
|
+
// 'filterConditions' property needs to be updated for change selector
|
|
110
|
+
oModifier.setProperty(oControl, "filterConditions", mConditionsData);
|
|
111
|
+
|
|
112
|
+
if (!bIsRevert) {
|
|
113
|
+
// Set revert data on the change
|
|
114
|
+
oChange.setRevertData({
|
|
115
|
+
name: oChangeContent.name,
|
|
116
|
+
condition: oChangeContent.condition
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// the control providing the filter functionality needs to be used to update the ConditionModel
|
|
121
|
+
if (oFilterControl && oFilterControl.removeCondition) {
|
|
122
|
+
return oFilterControl.removeCondition(oChangeContent.name, oChangeContent.condition);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
126
|
+
})
|
|
127
|
+
.then(resolve)
|
|
128
|
+
.catch(function(oError) {
|
|
129
|
+
reject(oError);
|
|
130
|
+
});
|
|
129
131
|
});
|
|
130
132
|
};
|
|
131
133
|
|