@openui5/sap.ui.mdc 1.130.6 → 1.130.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +1 -1
- package/package.json +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/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 +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/ValueHelp.js +1 -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/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 +90 -56
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +74 -33
- 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/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 +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/ListFieldHelpItem.js +1 -1
- 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/filterbar/FilterBarBase.js +1 -1
- 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/actiontoolbar/CombineAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
- package/src/sap/ui/mdc/library.js +2 -2
- 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/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.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/TypeMap.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- 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/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- 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/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
- 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/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
- 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 +1 -1
package/THIRDPARTY.txt
CHANGED
|
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
|
|
|
6
6
|
|
|
7
7
|
Library: sap.m:
|
|
8
8
|
|
|
9
|
-
Component: purify.js, version: 3.
|
|
9
|
+
Component: purify.js, version: 3.2.4
|
|
10
10
|
Copyright: Mario Heiderich
|
|
11
11
|
License: Apache-2.0
|
|
12
12
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.mdc",
|
|
3
|
-
"version": "1.130.
|
|
3
|
+
"version": "1.130.8",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.mdc",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.130.
|
|
18
|
-
"@openui5/sap.ui.core": "1.130.
|
|
19
|
-
"@openui5/sap.ui.layout": "1.130.
|
|
17
|
+
"@openui5/sap.m": "1.130.8",
|
|
18
|
+
"@openui5/sap.ui.core": "1.130.8",
|
|
19
|
+
"@openui5/sap.ui.layout": "1.130.8"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/src/sap/ui/mdc/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.130.
|
|
9
|
+
<version>1.130.8</version>
|
|
10
10
|
|
|
11
11
|
<documentation>UI5 library: sap.ui.mdc</documentation>
|
|
12
12
|
|
package/src/sap/ui/mdc/Chart.js
CHANGED
package/src/sap/ui/mdc/Field.js
CHANGED
|
@@ -54,13 +54,13 @@ sap.ui.define([
|
|
|
54
54
|
* @implements sap.ui.core.IFormContent, sap.ui.core.ISemanticFormContent, sap.m.IOverflowToolbarContent
|
|
55
55
|
*
|
|
56
56
|
* @author SAP SE
|
|
57
|
-
* @version 1.130.
|
|
57
|
+
* @version 1.130.8
|
|
58
58
|
*
|
|
59
59
|
* @constructor
|
|
60
60
|
* @alias sap.ui.mdc.Field
|
|
61
61
|
* @see {@link topic:1dd2aa91115d43409452a271d11be95b sap.ui.mdc}
|
|
62
62
|
* @see {@link topic:5260b9ca249f465ab33769b9edb442aa Field Building Block (OData V4)}
|
|
63
|
-
* @version 1.130.
|
|
63
|
+
* @version 1.130.8
|
|
64
64
|
* @since 1.54.0
|
|
65
65
|
* @public
|
|
66
66
|
*/
|
|
@@ -45,7 +45,7 @@ sap.ui.define([
|
|
|
45
45
|
* The metadata information is provided via the {@link module:sap/ui/mdc/FilterBarDelegate FilterBarDelegate} implementation. This implementation has to be provided by the application.
|
|
46
46
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
47
47
|
* @author SAP SE
|
|
48
|
-
* @version 1.130.
|
|
48
|
+
* @version 1.130.8
|
|
49
49
|
* @constructor
|
|
50
50
|
* @public
|
|
51
51
|
* @since 1.61.0
|
|
@@ -53,13 +53,13 @@ sap.ui.define([
|
|
|
53
53
|
* @implements sap.ui.core.IFormContent, sap.ui.core.ISemanticFormContent, sap.m.IOverflowToolbarContent
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.130.
|
|
56
|
+
* @version 1.130.8
|
|
57
57
|
*
|
|
58
58
|
* @constructor
|
|
59
59
|
* @alias sap.ui.mdc.FilterField
|
|
60
60
|
* @see {@link topic:1dd2aa91115d43409452a271d11be95b sap.ui.mdc}
|
|
61
61
|
* @see {@link topic:2df783760a8e4540ad19ce5ec3ed91c8 FilterField Building Block (OData V4)}
|
|
62
|
-
* @version 1.130.
|
|
62
|
+
* @version 1.130.8
|
|
63
63
|
* @since 1.48.0
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
package/src/sap/ui/mdc/Link.js
CHANGED
|
@@ -67,7 +67,7 @@ sap.ui.define([
|
|
|
67
67
|
* and {@link sap.ui.mdc.FilterField FilterField} controls using the <code>valueHelp</code> association. One <code>ValueHelp</code> element instance can be
|
|
68
68
|
* assigned to multiple fields (like in different table rows). It should be placed in the control tree on the container holding the fields.
|
|
69
69
|
* @extends sap.ui.mdc.Element
|
|
70
|
-
* @version 1.130.
|
|
70
|
+
* @version 1.130.8
|
|
71
71
|
* @constructor
|
|
72
72
|
* @abstract
|
|
73
73
|
* @public
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* The action for an {@link sap.ui.mdc.ActionToolbar ActionToolbar} control with given layout information that determines where the wrapped control is displayed on the <code>ActionToolbar</code>.
|
|
21
21
|
* @extends sap.ui.core.Control
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.130.
|
|
23
|
+
* @version 1.130.8
|
|
24
24
|
* @constructor
|
|
25
25
|
* @since 1.58
|
|
26
26
|
* @private
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @class The <code>ChartImplementationContainer</code> creates a container for the <code>content</code> (chart) and <code>noDataContent</code>. Based on the <code>showNoDataStruct</code> the <code>content</code> or <code>noDataContent</code> will be shown.
|
|
22
22
|
* @extends sap.ui.core.Control
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.130.
|
|
24
|
+
* @version 1.130.8
|
|
25
25
|
* @constructor
|
|
26
26
|
*
|
|
27
27
|
* @public
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @class The <code>ChartSelectionDetails</code> control creates a <code>sap.m.SelectionDetails</code> popover based on metadata and the configuration specified.
|
|
39
39
|
* @extends sap.m.SelectionDetails
|
|
40
40
|
* @author SAP SE
|
|
41
|
-
* @version 1.130.
|
|
41
|
+
* @version 1.130.8
|
|
42
42
|
* @constructor
|
|
43
43
|
* @public
|
|
44
44
|
* @experimental As of version 1.88
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
*
|
|
25
25
|
* @namespace
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.130.
|
|
27
|
+
* @version 1.130.8
|
|
28
28
|
* @since 1.78.0
|
|
29
29
|
* @alias sap.ui.mdc.condition.FilterConverter
|
|
30
30
|
*
|
|
@@ -84,58 +84,102 @@ sap.ui.define([
|
|
|
84
84
|
* @ui5-restricted sap.ui.mdc
|
|
85
85
|
*/
|
|
86
86
|
createFilters: function(oConditions, oConditionTypes, fConvert2FilterCallback, bCaseSensitive) {
|
|
87
|
-
let i, aLocalIncludeFilters, aLocalExcludeFilters, oOperator, oFilter, oNewFilter, oCondition
|
|
87
|
+
let i, aLocalIncludeFilters, aLocalExcludeFilters, oOperator, oFilter, oNewFilter, oCondition;
|
|
88
88
|
const aOverallFilters = [];
|
|
89
89
|
|
|
90
|
-
const convertAnyAllFilter = function(oFilter,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
let
|
|
98
|
-
oFilter.
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
const convertAnyAllFilter = function(oFilter, sFieldPath, sPropertyPath) {
|
|
91
|
+
if ([FilterOperator.Any,FilterOperator.All].includes(oFilter.getOperator())) {
|
|
92
|
+
// existing Any/All filters are not changed
|
|
93
|
+
return {filter: null, anyAllFilters: [oFilter]};
|
|
94
|
+
} else if (!oFilter.getPath() && oFilter.getFilters()) {
|
|
95
|
+
// in case of nested inner filters call the convertAnyAllFilters for all sub filters.
|
|
96
|
+
const aFilters = [];
|
|
97
|
+
let aAnyAllFilters = [];
|
|
98
|
+
oFilter.getFilters().forEach((oFilter) => {
|
|
99
|
+
// aFilters.push(convertAnyAllFilter(oFilter, sFieldPath, sPropertyPath));
|
|
100
|
+
const oConverted = convertAnyAllFilter(oFilter, sFieldPath, sPropertyPath);
|
|
101
|
+
if (oConverted.filter) {
|
|
102
|
+
aFilters.push(oConverted.filter);
|
|
103
|
+
}
|
|
104
|
+
if (oConverted.anyAllFilters.length > 0) {
|
|
105
|
+
aAnyAllFilters = aAnyAllFilters.concat(oConverted.anyAllFilters);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
101
108
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
// the Any/All filter parameter for all filters of one condition
|
|
109
|
-
return {
|
|
110
|
-
path: sNavPath,
|
|
111
|
-
operator: sOperator,
|
|
112
|
-
variable: sVariable,
|
|
113
|
-
condition: null // this will be set later with the filter statement for all ANY/ALL filters
|
|
114
|
-
};
|
|
115
|
-
} else {
|
|
116
|
-
throw new Error("FilterConverter: not supported binding " + oFilter.sPath);
|
|
109
|
+
let oNewFilter;
|
|
110
|
+
if (aFilters.length === 1) {
|
|
111
|
+
[oNewFilter] = aFilters;
|
|
112
|
+
} else if (aFilters.length > 1){
|
|
113
|
+
oNewFilter = new Filter({filters: aFilters, and: oFilter.isAnd()});
|
|
117
114
|
}
|
|
115
|
+
return {filter: oNewFilter, anyAllFilters: aAnyAllFilters};
|
|
116
|
+
} else if (oFilter.getPath() === sFieldPath) {
|
|
117
|
+
oFilter.sPath = sPropertyPath;
|
|
118
|
+
return {filter: oFilter, anyAllFilters: []};
|
|
118
119
|
}
|
|
119
|
-
return
|
|
120
|
+
return oFilter;
|
|
120
121
|
};
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
// Include-filters are combined in an OR-filter put into an All or A-filter
|
|
124
|
+
// Exclude-filters are combined in an AND-filter and put into an All-filter (As the searched entry must be in none of the targets.)
|
|
125
|
+
// Special case "empty", here the filter is created in the operator to allow custom empty-operators.
|
|
126
|
+
const convertToAnyOrAllFilter = function(aFilters, sFieldPath, bExclude) {
|
|
127
|
+
const [sNavPath, sPattern, sPropertyPath, sWrongPart] = sFieldPath.split(/([\*\+]\/)/);
|
|
128
|
+
if (sPattern && aFilters.length > 0) {
|
|
129
|
+
let oFilter;
|
|
130
|
+
|
|
131
|
+
if (aFilters.length === 1) {
|
|
132
|
+
[oFilter] = aFilters;
|
|
133
|
+
} else if (aFilters.length > 1) {
|
|
134
|
+
oFilter = new Filter({ filters: aFilters, and: bExclude });
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (oFilter) {
|
|
138
|
+
const sVariable = "L1";
|
|
139
|
+
|
|
140
|
+
if (!sWrongPart) { // only one occurence of pattern allowed
|
|
141
|
+
const oConverted = convertAnyAllFilter(oFilter, sFieldPath, sVariable + "/" + sPropertyPath);
|
|
142
|
+
let oNewFilter;
|
|
143
|
+
if (oConverted.filter) {
|
|
144
|
+
// the Any/All filter parameter for all filters of one FieldPath
|
|
145
|
+
oNewFilter = new Filter({
|
|
146
|
+
path: sNavPath,
|
|
147
|
+
operator: sPattern === "*/" && !bExclude ? FilterOperator.Any : FilterOperator.All, // exclude filters are All-filters, even in Any case
|
|
148
|
+
variable: sVariable,
|
|
149
|
+
condition: oConverted.filter
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
if (oConverted.anyAllFilters.length > 0) {
|
|
153
|
+
if (oNewFilter) {
|
|
154
|
+
oConverted.anyAllFilters.push(oNewFilter);
|
|
155
|
+
oNewFilter = new Filter({
|
|
156
|
+
filters: oConverted.anyAllFilters,
|
|
157
|
+
and: bExclude
|
|
158
|
+
});
|
|
159
|
+
} else if (oConverted.anyAllFilters.length === 1) {
|
|
160
|
+
[oNewFilter] = oConverted.anyAllFilters;
|
|
161
|
+
} else {
|
|
162
|
+
oNewFilter = new Filter({
|
|
163
|
+
filters: oConverted.anyAllFilters,
|
|
164
|
+
and: bExclude
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return [oNewFilter];
|
|
170
|
+
} else {
|
|
171
|
+
throw new Error("FilterConverter: not supported binding " + sFieldPath);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
130
174
|
}
|
|
131
|
-
};
|
|
132
175
|
|
|
176
|
+
return aFilters; // just use unchanged Filter
|
|
177
|
+
};
|
|
133
178
|
|
|
134
179
|
// OR-combine filters for each property
|
|
135
180
|
for (const sFieldPath in oConditions) {
|
|
136
181
|
aLocalIncludeFilters = [];
|
|
137
182
|
aLocalExcludeFilters = [];
|
|
138
|
-
oAnyOrAllFilterParam = null;
|
|
139
183
|
const aConditions = oConditions[sFieldPath];
|
|
140
184
|
|
|
141
185
|
if (sFieldPath === "$search") {
|
|
@@ -199,19 +243,17 @@ sap.ui.define([
|
|
|
199
243
|
continue;
|
|
200
244
|
}
|
|
201
245
|
|
|
202
|
-
// support for Any/all filters for include operations
|
|
203
|
-
// Any/All condition handling e.g. fieldPath "navPath*/propertyPath" or "navPath+/propertyPath"
|
|
204
|
-
oAnyOrAllFilterParam = convertToAnyOrAllFilter(oFilter);
|
|
205
246
|
aLocalIncludeFilters.push(oFilter);
|
|
206
247
|
} else {
|
|
207
|
-
|
|
208
|
-
// support for Any/All filters for exclude operations
|
|
209
|
-
// Any/All condition handling e.g. fieldPath "navPath*/propertyPath" or "navPath+/propertyPath"
|
|
210
|
-
oAnyOrAllFilterParam = convertToAnyOrAllFilter(oFilter);
|
|
211
248
|
aLocalExcludeFilters.push(oFilter);
|
|
212
249
|
}
|
|
213
250
|
}
|
|
214
251
|
|
|
252
|
+
// support for Any or All filters - update the Any/All Filter in the include and exclude-filters
|
|
253
|
+
// Any/All condition handling e.g. fieldPath "navPath*/propertyPath" or "navPath+/propertyPath"
|
|
254
|
+
aLocalIncludeFilters = convertToAnyOrAllFilter(aLocalIncludeFilters, sFieldPath, false);
|
|
255
|
+
aLocalExcludeFilters = convertToAnyOrAllFilter(aLocalExcludeFilters, sFieldPath, true);
|
|
256
|
+
|
|
215
257
|
// take the single Filter or combine all with OR
|
|
216
258
|
oFilter = undefined;
|
|
217
259
|
if (aLocalIncludeFilters.length === 1) {
|
|
@@ -232,15 +274,6 @@ sap.ui.define([
|
|
|
232
274
|
oNewFilter = new Filter({ filters: aLocalExcludeFilters, and: true }); // to have all filters for differents path AND grouped
|
|
233
275
|
}
|
|
234
276
|
|
|
235
|
-
// support for Any or All filters - update the Any/All Filter in the OverAllFilters array
|
|
236
|
-
if (oAnyOrAllFilterParam) {
|
|
237
|
-
// oAnyOrAllFilterParam.path = NavPath,
|
|
238
|
-
// oAnyOrAllFilterParam.operator = "Any/All",
|
|
239
|
-
// oAnyOrAllFilterParam.variable = "L1"
|
|
240
|
-
oAnyOrAllFilterParam.condition = oNewFilter;
|
|
241
|
-
oNewFilter = new Filter(oAnyOrAllFilterParam);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
277
|
if (oNewFilter) {
|
|
245
278
|
aOverallFilters.push(oNewFilter);
|
|
246
279
|
}
|
|
@@ -278,7 +311,8 @@ sap.ui.define([
|
|
|
278
311
|
return "(" + sRes + ")";
|
|
279
312
|
} else {
|
|
280
313
|
if (oFilter.sOperator === FilterOperator.Any || oFilter.sOperator === FilterOperator.All) {
|
|
281
|
-
sRes = oFilter.sVariable
|
|
314
|
+
sRes = oFilter.sVariable ? oFilter.sVariable + ":" : "";
|
|
315
|
+
sRes = sRes + oFilter.sPath + " " + oFilter.sOperator + " " + FilterConverter.prettyPrintFilters(oFilter.oCondition);
|
|
282
316
|
} else {
|
|
283
317
|
if (oFilter.bCaseSensitive === false) {
|
|
284
318
|
sRes = "tolower(" + oFilter.sPath + ") " + oFilter.sOperator + " tolower('" + oFilter.oValue1 + "')";
|
|
@@ -62,7 +62,7 @@ sap.ui.define([
|
|
|
62
62
|
*
|
|
63
63
|
* @namespace
|
|
64
64
|
* @author SAP SE
|
|
65
|
-
* @version 1.130.
|
|
65
|
+
* @version 1.130.8
|
|
66
66
|
* @since 1.73.0
|
|
67
67
|
* @alias sap.ui.mdc.condition.FilterOperatorUtil
|
|
68
68
|
*
|
|
@@ -525,23 +525,41 @@ sap.ui.define([
|
|
|
525
525
|
tokenText: _getText(OperatorName.Empty, false),
|
|
526
526
|
valueTypes: [],
|
|
527
527
|
getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
|
|
528
|
-
|
|
529
|
-
if (
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
oType.validateValue(vResult);
|
|
533
|
-
isNullable = vResult === null;
|
|
534
|
-
} catch (oError) {
|
|
535
|
-
isNullable = false;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
if (isNullable) {
|
|
528
|
+
const oAnyAllPath = _getAnyAllPath(sFieldPath);
|
|
529
|
+
if (oAnyAllPath) {
|
|
530
|
+
// Any or All Filter -> Empty needs to filter for non-existance of navigation targets
|
|
531
|
+
// once the NOT-filtering exists this can be changed into NOT-Any (at least for oData V4)
|
|
539
532
|
return new Filter({
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
533
|
+
path: oAnyAllPath.navPath,
|
|
534
|
+
operator: ModelOperator.All,
|
|
535
|
+
variable: "L1",
|
|
536
|
+
condition: new Filter({
|
|
537
|
+
filters: [ // create a Filter that cannot bring a result
|
|
538
|
+
new Filter({path: "L1/" + oAnyAllPath.propertyPath, operator: ModelOperator.EQ, value1: null}),
|
|
539
|
+
new Filter({path: "L1/" + oAnyAllPath.propertyPath, operator: ModelOperator.NE, value1: null})
|
|
540
|
+
],
|
|
541
|
+
and: true
|
|
542
|
+
})
|
|
543
|
+
});
|
|
544
|
+
} else { // depending on backend and/or Type configuration filter is "" or null
|
|
545
|
+
let isNullable = false;
|
|
546
|
+
if (oType) {
|
|
547
|
+
const vResult = oType.parseValue("", "string");
|
|
548
|
+
try {
|
|
549
|
+
oType.validateValue(vResult);
|
|
550
|
+
isNullable = vResult === null;
|
|
551
|
+
} catch (oError) {
|
|
552
|
+
isNullable = false;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
if (isNullable) {
|
|
556
|
+
return new Filter({
|
|
557
|
+
filters: [new Filter({ path: sFieldPath, operator: ModelOperator.EQ, value1: "" }), new Filter({ path: sFieldPath, operator: ModelOperator.EQ, value1: null })],
|
|
558
|
+
and: false
|
|
559
|
+
});
|
|
560
|
+
} else {
|
|
561
|
+
return new Filter({ path: sFieldPath, operator: this.filterOperator, value1: "" });
|
|
562
|
+
}
|
|
545
563
|
}
|
|
546
564
|
}
|
|
547
565
|
}),
|
|
@@ -558,23 +576,32 @@ sap.ui.define([
|
|
|
558
576
|
valueTypes: [],
|
|
559
577
|
exclude: true,
|
|
560
578
|
getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
|
|
561
|
-
|
|
562
|
-
if (
|
|
563
|
-
|
|
564
|
-
try {
|
|
565
|
-
oType.validateValue(vResult);
|
|
566
|
-
isNullable = vResult === null;
|
|
567
|
-
} catch (oError) {
|
|
568
|
-
isNullable = false;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
if (isNullable) {
|
|
579
|
+
const oAnyAllPath = _getAnyAllPath(sFieldPath);
|
|
580
|
+
if (oAnyAllPath) {
|
|
581
|
+
// Any or All Filter -> NotEmpty needs to filter for existance of navigation targets
|
|
572
582
|
return new Filter({
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
} else {
|
|
577
|
-
|
|
583
|
+
path: oAnyAllPath.navPath,
|
|
584
|
+
operator: ModelOperator.Any
|
|
585
|
+
});
|
|
586
|
+
} else { // depending on backend and/or Type configuration filter is "" or null
|
|
587
|
+
let isNullable = false;
|
|
588
|
+
if (oType) {
|
|
589
|
+
const vResult = oType.parseValue("", "string");
|
|
590
|
+
try {
|
|
591
|
+
oType.validateValue(vResult);
|
|
592
|
+
isNullable = vResult === null;
|
|
593
|
+
} catch (oError) {
|
|
594
|
+
isNullable = false;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
if (isNullable) {
|
|
598
|
+
return new Filter({
|
|
599
|
+
filters: [new Filter({ path: sFieldPath, operator: ModelOperator.NE, value1: "" }), new Filter({ path: sFieldPath, operator: ModelOperator.NE, value1: null })],
|
|
600
|
+
and: true
|
|
601
|
+
});
|
|
602
|
+
} else {
|
|
603
|
+
return new Filter({ path: sFieldPath, operator: this.filterOperator, value1: "" });
|
|
604
|
+
}
|
|
578
605
|
}
|
|
579
606
|
}
|
|
580
607
|
}),
|
|
@@ -2242,6 +2269,20 @@ sap.ui.define([
|
|
|
2242
2269
|
|
|
2243
2270
|
}
|
|
2244
2271
|
|
|
2272
|
+
function _getAnyAllPath(sFieldPath) {
|
|
2273
|
+
|
|
2274
|
+
const [sNavPath, sPattern, sPropertyPath, sWrongPart] = sFieldPath.split(/([\*\+]\/)/);
|
|
2275
|
+
if (sPattern) {
|
|
2276
|
+
// Any or All Filter -> Empty needs to filter for non-existance of navigation targets
|
|
2277
|
+
if (!sWrongPart) { // only one occurence of pattern allowed
|
|
2278
|
+
return {navPath: sNavPath, propertyPath: sPropertyPath};
|
|
2279
|
+
} else {
|
|
2280
|
+
throw new Error("FilterOperatorUtil: not supported binding " + sFieldPath);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2245
2286
|
return FilterOperatorUtil;
|
|
2246
2287
|
|
|
2247
2288
|
}, /* bExport= */
|
|
@@ -136,7 +136,7 @@ sap.ui.define([
|
|
|
136
136
|
* @param {function} [oConfiguration.getTextForCopy] Function to determine the text copied into clipboard
|
|
137
137
|
* @constructor
|
|
138
138
|
* @author SAP SE
|
|
139
|
-
* @version 1.130.
|
|
139
|
+
* @version 1.130.8
|
|
140
140
|
* @public
|
|
141
141
|
* @alias sap.ui.mdc.condition.Operator
|
|
142
142
|
* @since 1.73.0
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* @param {int[]|function} [oConfiguration.defaultValues] Array of values for the defaults of <code>RangeOperators</code> parameter. This can be a function, which returns the array of values. If not used the default for the values is 1.
|
|
40
40
|
* @constructor
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.130.
|
|
42
|
+
* @version 1.130.8
|
|
43
43
|
* @public
|
|
44
44
|
* @alias sap.ui.mdc.condition.RangeOperator
|
|
45
45
|
* @since 1.74.0
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @param {object} [mSettings] Initial settings for the new control
|
|
17
17
|
* @class A field help used in the <code>FieldInfo</code> aggregation in <code>FieldBase</code> controls that allows you to add custom content.
|
|
18
18
|
* @extends sap.ui.mdc.field.FieldInfoBase
|
|
19
|
-
* @version 1.130.
|
|
19
|
+
* @version 1.130.8
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @ui5-restricted sap.fe
|