@sapui5/sap.fe.macros 1.140.0 → 1.141.1
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/package.json +1 -1
- package/src/sap/fe/macros/.library +1 -1
- package/src/sap/fe/macros/Chart.js +53 -2
- package/src/sap/fe/macros/Chart.tsx +55 -0
- package/src/sap/fe/macros/CollaborativeDraftHandler.js +230 -0
- package/src/sap/fe/macros/CollaborativeDraftHandler.tsx +218 -0
- package/src/sap/fe/macros/CommonHelper.js +59 -15
- package/src/sap/fe/macros/CommonHelper.ts +65 -14
- package/src/sap/fe/macros/ConditionalSwitch.js +174 -0
- package/src/sap/fe/macros/ConditionalSwitch.tsx +141 -0
- package/src/sap/fe/macros/ConditionalSwitchProperty.js +78 -0
- package/src/sap/fe/macros/ConditionalSwitchProperty.tsx +62 -0
- package/src/sap/fe/macros/Field.js +14 -10
- package/src/sap/fe/macros/Field.ts +15 -12
- package/src/sap/fe/macros/MacroAPI.js +9 -4
- package/src/sap/fe/macros/MacroAPI.ts +9 -4
- package/src/sap/fe/macros/MultiValueField.js +10 -5
- package/src/sap/fe/macros/MultiValueField.tsx +7 -1
- package/src/sap/fe/macros/Page.js +5 -7
- package/src/sap/fe/macros/Page.tsx +4 -6
- package/src/sap/fe/macros/Paginator.js +9 -4
- package/src/sap/fe/macros/Paginator.tsx +12 -3
- package/src/sap/fe/macros/RichTextEditor.js +3 -2
- package/src/sap/fe/macros/RichTextEditor.tsx +2 -1
- package/src/sap/fe/macros/Status.js +38 -13
- package/src/sap/fe/macros/Status.tsx +26 -6
- package/src/sap/fe/macros/ai/EasyFillDialog.js +11 -17
- package/src/sap/fe/macros/ai/EasyFillDialog.tsx +11 -16
- package/src/sap/fe/macros/ai/EasyFilterBar.js +195 -55
- package/src/sap/fe/macros/ai/EasyFilterBar.tsx +234 -57
- package/src/sap/fe/macros/ai/EasyFilterDataFetcher.js +76 -33
- package/src/sap/fe/macros/ai/EasyFilterDataFetcher.ts +89 -40
- package/src/sap/fe/macros/chart/Chart.js +2 -2
- package/src/sap/fe/macros/chart/Chart.tsx +1 -1
- package/src/sap/fe/macros/chart/MdcChartTemplate.js +4 -2
- package/src/sap/fe/macros/chart/MdcChartTemplate.tsx +4 -1
- package/src/sap/fe/macros/contentSwitcher/ContentSwitcher.js +9 -2
- package/src/sap/fe/macros/contentSwitcher/ContentSwitcher.tsx +8 -0
- package/src/sap/fe/macros/controls/BuildingBlockObjectProperty.js +5 -1
- package/src/sap/fe/macros/controls/BuildingBlockObjectProperty.ts +4 -0
- package/src/sap/fe/macros/controls/BuildingBlockWithTemplating.js +2 -2
- package/src/sap/fe/macros/controls/BuildingBlockWithTemplating.ts +1 -1
- package/src/sap/fe/macros/controls/FilterBar.js +14 -5
- package/src/sap/fe/macros/controls/FilterBar.ts +3 -0
- package/src/sap/fe/macros/controls/RadioButtons.js +61 -38
- package/src/sap/fe/macros/controls/RadioButtons.tsx +39 -18
- package/src/sap/fe/macros/controls/Section.js +4 -3
- package/src/sap/fe/macros/controls/Section.ts +3 -2
- package/src/sap/fe/macros/controls/section/SubSection.js +63 -8
- package/src/sap/fe/macros/controls/section/SubSection.ts +67 -1
- package/src/sap/fe/macros/field/Field.js +2 -2
- package/src/sap/fe/macros/field/Field.tsx +1 -1
- package/src/sap/fe/macros/field/FieldFormatOptions.js +25 -2
- package/src/sap/fe/macros/field/FieldFormatOptions.ts +13 -0
- package/src/sap/fe/macros/field/FieldHelper.js +2 -2
- package/src/sap/fe/macros/field/FieldHelper.ts +1 -4
- package/src/sap/fe/macros/field/FieldTemplating.js +3 -3
- package/src/sap/fe/macros/field/FieldTemplating.ts +4 -2
- package/src/sap/fe/macros/filter/FilterUtils.js +232 -2
- package/src/sap/fe/macros/filter/FilterUtils.ts +290 -4
- package/src/sap/fe/macros/filterBar/FilterBar.block.js +5 -3
- package/src/sap/fe/macros/filterBar/FilterBar.block.tsx +4 -2
- package/src/sap/fe/macros/filterBar/FilterBar.js +2 -2
- package/src/sap/fe/macros/filterBar/FilterBar.tsx +1 -1
- package/src/sap/fe/macros/filterBar/FilterBarAPI.js +63 -27
- package/src/sap/fe/macros/filterBar/FilterBarAPI.ts +49 -3
- package/src/sap/fe/macros/filterBar/FilterBarDelegate.js +5 -3
- package/src/sap/fe/macros/filterBar/FilterBarDelegate.ts +5 -2
- package/src/sap/fe/macros/filterBar/mixin/FilterBarAPIStateHandler.js +7 -2
- package/src/sap/fe/macros/filterBar/mixin/FilterBarAPIStateHandler.ts +6 -1
- package/src/sap/fe/macros/form/Form.block.js +7 -8
- package/src/sap/fe/macros/form/Form.block.ts +4 -6
- package/src/sap/fe/macros/form/FormContainer.block.js +555 -4
- package/src/sap/fe/macros/form/FormContainer.block.ts +665 -6
- package/src/sap/fe/macros/form/FormContainer.fragment.xml +1 -0
- package/src/sap/fe/macros/form/FormDelegate.js +6 -9
- package/src/sap/fe/macros/form/FormDelegate.ts +5 -8
- package/src/sap/fe/macros/internal/DataPoint.js +3 -2
- package/src/sap/fe/macros/internal/DataPoint.tsx +10 -1
- package/src/sap/fe/macros/internal/FilterField.block.js +16 -8
- package/src/sap/fe/macros/internal/FilterField.block.ts +11 -7
- package/src/sap/fe/macros/internal/field/DisplayStyle.js +7 -1
- package/src/sap/fe/macros/internal/field/DisplayStyle.tsx +8 -0
- package/src/sap/fe/macros/internal/field/EditStyle.js +21 -4
- package/src/sap/fe/macros/internal/field/EditStyle.tsx +18 -4
- package/src/sap/fe/macros/internal/field/FieldStructureHelper.js +3 -2
- package/src/sap/fe/macros/internal/field/FieldStructureHelper.ts +4 -1
- package/src/sap/fe/macros/internal/filterField/FilterFieldTemplate.fragment.xml +1 -0
- package/src/sap/fe/macros/internal/helpers/ActionHelper.js +36 -5
- package/src/sap/fe/macros/internal/helpers/ActionHelper.ts +34 -4
- package/src/sap/fe/macros/library.js +1 -1
- package/src/sap/fe/macros/mdc/adapter/StateFilterToSelectionVariant.js +2 -1
- package/src/sap/fe/macros/mdc/adapter/StateFilterToSelectionVariant.ts +1 -0
- package/src/sap/fe/macros/messagebundle.properties +20 -2
- package/src/sap/fe/macros/messagebundle_ar.properties +1 -1
- package/src/sap/fe/macros/messagebundle_bg.properties +1 -1
- package/src/sap/fe/macros/messagebundle_ca.properties +1 -1
- package/src/sap/fe/macros/messagebundle_cnr.properties +1 -1
- package/src/sap/fe/macros/messagebundle_cs.properties +1 -1
- package/src/sap/fe/macros/messagebundle_cy.properties +1 -1
- package/src/sap/fe/macros/messagebundle_da.properties +1 -1
- package/src/sap/fe/macros/messagebundle_de.properties +4 -4
- package/src/sap/fe/macros/messagebundle_el.properties +1 -1
- package/src/sap/fe/macros/messagebundle_en.properties +1 -1
- package/src/sap/fe/macros/messagebundle_en_GB.properties +1 -1
- package/src/sap/fe/macros/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/fe/macros/messagebundle_es.properties +2 -2
- package/src/sap/fe/macros/messagebundle_es_MX.properties +1 -1
- package/src/sap/fe/macros/messagebundle_et.properties +1 -1
- package/src/sap/fe/macros/messagebundle_fi.properties +1 -1
- package/src/sap/fe/macros/messagebundle_fr.properties +1 -1
- package/src/sap/fe/macros/messagebundle_fr_CA.properties +1 -1
- package/src/sap/fe/macros/messagebundle_hi.properties +1 -1
- package/src/sap/fe/macros/messagebundle_hr.properties +1 -1
- package/src/sap/fe/macros/messagebundle_hu.properties +1 -1
- package/src/sap/fe/macros/messagebundle_id.properties +5 -5
- package/src/sap/fe/macros/messagebundle_it.properties +1 -1
- package/src/sap/fe/macros/messagebundle_iw.properties +1 -1
- package/src/sap/fe/macros/messagebundle_ja.properties +5 -5
- package/src/sap/fe/macros/messagebundle_kk.properties +1 -1
- package/src/sap/fe/macros/messagebundle_ko.properties +2 -2
- package/src/sap/fe/macros/messagebundle_lt.properties +2 -2
- package/src/sap/fe/macros/messagebundle_lv.properties +1 -1
- package/src/sap/fe/macros/messagebundle_mk.properties +2 -2
- package/src/sap/fe/macros/messagebundle_ms.properties +1 -1
- package/src/sap/fe/macros/messagebundle_nl.properties +1 -1
- package/src/sap/fe/macros/messagebundle_no.properties +1 -1
- package/src/sap/fe/macros/messagebundle_pl.properties +1 -1
- package/src/sap/fe/macros/messagebundle_pt.properties +1 -1
- package/src/sap/fe/macros/messagebundle_pt_PT.properties +1 -1
- package/src/sap/fe/macros/messagebundle_ro.properties +1 -1
- package/src/sap/fe/macros/messagebundle_ru.properties +1 -1
- package/src/sap/fe/macros/messagebundle_sh.properties +1 -1
- package/src/sap/fe/macros/messagebundle_sk.properties +1 -1
- package/src/sap/fe/macros/messagebundle_sl.properties +1 -1
- package/src/sap/fe/macros/messagebundle_sr.properties +1 -1
- package/src/sap/fe/macros/messagebundle_sv.properties +1 -1
- package/src/sap/fe/macros/messagebundle_th.properties +1 -1
- package/src/sap/fe/macros/messagebundle_tr.properties +1 -1
- package/src/sap/fe/macros/messagebundle_uk.properties +1 -1
- package/src/sap/fe/macros/messagebundle_vi.properties +2 -2
- package/src/sap/fe/macros/messagebundle_zh_CN.properties +1 -1
- package/src/sap/fe/macros/messagebundle_zh_TW.properties +1 -1
- package/src/sap/fe/macros/messages/MessageButton.js +1 -1
- package/src/sap/fe/macros/messages/MessageButton.ts +2 -2
- package/src/sap/fe/macros/messages/MessagePopover.js +3 -1
- package/src/sap/fe/macros/messages/MessagePopover.ts +2 -0
- package/src/sap/fe/macros/microchart/MicroChart.js +2 -2
- package/src/sap/fe/macros/microchart/MicroChart.tsx +1 -1
- package/src/sap/fe/macros/microchart/MicroChartHelper.js +2 -2
- package/src/sap/fe/macros/microchart/MicroChartHelper.tsx +1 -1
- package/src/sap/fe/macros/table/ActionsTemplating.js +4 -8
- package/src/sap/fe/macros/table/ActionsTemplating.tsx +5 -8
- package/src/sap/fe/macros/table/BasicSearch.js +1 -1
- package/src/sap/fe/macros/table/BasicSearch.ts +2 -1
- package/src/sap/fe/macros/table/Column.js +14 -2
- package/src/sap/fe/macros/table/Column.ts +7 -0
- package/src/sap/fe/macros/table/ColumnExportSettings.js +83 -15
- package/src/sap/fe/macros/table/ColumnExportSettings.ts +44 -0
- package/src/sap/fe/macros/table/ColumnOverride.js +14 -2
- package/src/sap/fe/macros/table/ColumnOverride.ts +7 -0
- package/src/sap/fe/macros/table/MdcTableTemplate.js +5 -5
- package/src/sap/fe/macros/table/MdcTableTemplate.tsx +15 -9
- package/src/sap/fe/macros/table/QuickFilterSelector.js +12 -3
- package/src/sap/fe/macros/table/QuickFilterSelector.tsx +15 -2
- package/src/sap/fe/macros/table/Table.block.js +188 -147
- package/src/sap/fe/macros/table/Table.block.tsx +41 -11
- package/src/sap/fe/macros/table/Table.js +16 -10
- package/src/sap/fe/macros/table/Table.tsx +16 -10
- package/src/sap/fe/macros/table/TableAPI.js +224 -184
- package/src/sap/fe/macros/table/TableAPI.ts +63 -19
- package/src/sap/fe/macros/table/TableEventHandlerProvider.js +6 -6
- package/src/sap/fe/macros/table/TableEventHandlerProvider.ts +5 -4
- package/src/sap/fe/macros/table/TableHelper.js +2 -2
- package/src/sap/fe/macros/table/TableHelper.ts +1 -1
- package/src/sap/fe/macros/table/TreeTable.js +16 -10
- package/src/sap/fe/macros/table/TreeTable.tsx +16 -10
- package/src/sap/fe/macros/table/Utils.js +3 -2
- package/src/sap/fe/macros/table/Utils.ts +7 -2
- package/src/sap/fe/macros/table/delegates/TableDelegate.js +69 -33
- package/src/sap/fe/macros/table/delegates/TableDelegate.ts +75 -32
- package/src/sap/fe/macros/table/massEdit/MassEditDialog.js +10 -10
- package/src/sap/fe/macros/table/massEdit/MassEditDialog.tsx +11 -9
- package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.js +14 -12
- package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.tsx +11 -10
- package/src/sap/fe/macros/table/mixin/ContextMenuHandler.js +34 -4
- package/src/sap/fe/macros/table/mixin/ContextMenuHandler.ts +45 -2
- package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.js +55 -12
- package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.ts +71 -9
- package/src/sap/fe/macros/table/mixin/TableAPIStateHandler.js +53 -2
- package/src/sap/fe/macros/table/mixin/TableAPIStateHandler.ts +55 -0
- package/src/sap/fe/macros/table/mixin/TableExport.js +22 -3
- package/src/sap/fe/macros/table/mixin/TableExport.ts +25 -4
- package/src/sap/fe/macros/table/mixin/TableSharing.js +3 -2
- package/src/sap/fe/macros/table/mixin/TableSharing.ts +4 -3
- package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.js +27 -10
- package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.ts +31 -13
- package/src/sap/fe/macros/visualfilters/VisualFilter.js +5 -3
- package/src/sap/fe/macros/visualfilters/VisualFilter.tsx +3 -1
|
@@ -2,6 +2,7 @@ import type { Property } from "@sap-ux/vocabularies-types";
|
|
|
2
2
|
import type {
|
|
3
3
|
CodeListType,
|
|
4
4
|
TokenSelectedValuesDefinition,
|
|
5
|
+
ValueHelpBetweenSelectedValues,
|
|
5
6
|
ValueHelpSelectedValuesDefinition
|
|
6
7
|
} from "sap/fe/controls/easyFilter/EasyFilterBarContainer";
|
|
7
8
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
@@ -60,7 +61,13 @@ async function resolveValueUsingValueList(
|
|
|
60
61
|
const path = `/${valueList.valueListInfo.CollectionPath}`;
|
|
61
62
|
const $select = generateSelectParameter(valueList);
|
|
62
63
|
let $search = CommonUtils.normalizeSearchTerm(valueToMatch instanceof Date ? valueToMatch.toISOString() : valueToMatch.toString());
|
|
63
|
-
|
|
64
|
+
|
|
65
|
+
// Handle negation operators (NE, NotContains, NotStartsWith, NotEndsWith)
|
|
66
|
+
// Strategy: Query for positive case, then apply negation client-side
|
|
67
|
+
const isNegation = isNegationOperator(operator);
|
|
68
|
+
// "cleaned" operator for possible negation operators
|
|
69
|
+
const cleanedOperator = isNegation ? getPositiveOperator(operator) : operator;
|
|
70
|
+
const keyPropertyFilter = getKeyPropertyFilter(valueList, keyProperty, cleanedOperator, valueToMatch);
|
|
64
71
|
|
|
65
72
|
// Check if the query exceeds the maximum length of the key property
|
|
66
73
|
const characterLimitOverflow = !$search || $search.length > (keyProperty.maxLength ?? $search.length);
|
|
@@ -80,9 +87,12 @@ async function resolveValueUsingValueList(
|
|
|
80
87
|
// There is at least one match in the key column:
|
|
81
88
|
// - If the operator is EQ: This indicates an exact key match, so the returned data will be used.
|
|
82
89
|
// - For other operators: One or more keys match the value based on the operator, so the original condition is preserved.
|
|
83
|
-
return
|
|
90
|
+
return cleanedOperator === FilterOperator.EQ
|
|
84
91
|
? { operator, selectedValues: valueHelpKeyQuery.value.map(mapResult) }
|
|
85
|
-
: {
|
|
92
|
+
: {
|
|
93
|
+
operator,
|
|
94
|
+
selectedValues: [{ value: valueToMatch, description: valueToMatch }]
|
|
95
|
+
};
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
if (valueHelpSearchQuery.status === "fulfilled" && valueHelpSearchQuery.value.length > 0) {
|
|
@@ -90,7 +100,7 @@ async function resolveValueUsingValueList(
|
|
|
90
100
|
|
|
91
101
|
let results = valueHelpSearchQuery.value.map(mapResult);
|
|
92
102
|
|
|
93
|
-
if (
|
|
103
|
+
if (cleanedOperator === FilterOperator.EQ) {
|
|
94
104
|
const filteredResults = results.filter(
|
|
95
105
|
(result) => result.description.toString().toLowerCase() === valueToMatch.toString().toLowerCase()
|
|
96
106
|
);
|
|
@@ -99,14 +109,17 @@ async function resolveValueUsingValueList(
|
|
|
99
109
|
results = filteredResults;
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
selectedValues: results
|
|
105
|
-
};
|
|
112
|
+
|
|
113
|
+
return { operator, selectedValues: results };
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
// No matches were found in either query; the original value will be used as a fallback.
|
|
109
|
-
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
operator,
|
|
120
|
+
selectedValues: [{ value: valueToMatch, description: valueToMatch }],
|
|
121
|
+
noMatch: true
|
|
122
|
+
};
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
/**
|
|
@@ -138,27 +151,6 @@ export function generateSelectParameter(valueList: ValueListInfo): string {
|
|
|
138
151
|
return [valueList.keyPath, valueList.descriptionPath].filter((path) => path && !path.includes("/")).join(",");
|
|
139
152
|
}
|
|
140
153
|
|
|
141
|
-
function handleIntervals(
|
|
142
|
-
operator: FilterOperator.BT | FilterOperator.NB,
|
|
143
|
-
resolvedValues: ValueHelpSelectedValuesDefinition[]
|
|
144
|
-
): ValueHelpSelectedValuesDefinition[] {
|
|
145
|
-
const [resolvedLowerBound, resolvedUpperBound] = resolvedValues;
|
|
146
|
-
|
|
147
|
-
const result: ValueHelpSelectedValuesDefinition[] = [];
|
|
148
|
-
for (const { value: lowerBound, description: lowerBoundText } of resolvedLowerBound.selectedValues) {
|
|
149
|
-
for (const { value: upperBound, description: upperBoundText } of resolvedUpperBound.selectedValues) {
|
|
150
|
-
result.push({
|
|
151
|
-
operator,
|
|
152
|
-
selectedValues: [
|
|
153
|
-
{ value: lowerBound, description: lowerBoundText ?? lowerBound },
|
|
154
|
-
{ value: upperBound, description: upperBoundText ?? upperBound }
|
|
155
|
-
]
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return result;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
154
|
/**
|
|
163
155
|
* Resolves token-based filter values using a value list.
|
|
164
156
|
* @param valueList The value list used for resolving values.
|
|
@@ -186,16 +178,33 @@ export async function resolveTokenValue(
|
|
|
186
178
|
return unresolvedResult([value]);
|
|
187
179
|
}
|
|
188
180
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
181
|
+
// For comparison operators (GreaterThan, LessThan, Between, etc.), skip backend calls
|
|
182
|
+
// and return user input directly to EasyFilter
|
|
183
|
+
if (isComparisonOperator(operator)) {
|
|
184
|
+
if (operator === FilterOperator.BT || operator === FilterOperator.NB) {
|
|
185
|
+
// Handle Between/Not Between operators - they expect exactly 2 values
|
|
186
|
+
const [lowerBound, upperBound] = selectedValues;
|
|
187
|
+
return [
|
|
188
|
+
{
|
|
189
|
+
operator,
|
|
190
|
+
selectedValues: [
|
|
191
|
+
{ value: lowerBound, description: lowerBound },
|
|
192
|
+
{ value: upperBound, description: upperBound }
|
|
193
|
+
] as ValueHelpBetweenSelectedValues
|
|
194
|
+
}
|
|
195
|
+
];
|
|
196
|
+
} else {
|
|
197
|
+
// Handle other comparison operators (GT, GE, LT, LE)
|
|
198
|
+
return unresolvedResult([value]);
|
|
199
|
+
}
|
|
200
|
+
} else {
|
|
201
|
+
const resolvedValues = await Promise.all(
|
|
202
|
+
selectedValues.map(async (selectedValue) =>
|
|
203
|
+
resolveValueUsingValueList(valueList, keyProperty, operator as ScalarOperator, selectedValue, looseMatch)
|
|
204
|
+
)
|
|
205
|
+
);
|
|
206
|
+
return resolvedValues.flat();
|
|
207
|
+
}
|
|
199
208
|
}
|
|
200
209
|
|
|
201
210
|
/**
|
|
@@ -209,3 +218,43 @@ export function unresolvedResult(values: TokenSelectedValuesDefinition[]): Value
|
|
|
209
218
|
selectedValues: selectedValues.map((value) => ({ value, description: value }))
|
|
210
219
|
})) as ValueHelpSelectedValuesDefinition[];
|
|
211
220
|
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Checks if the operator is a negation operator (NE, NotContains, NotStartsWith, NotEndsWith).
|
|
224
|
+
* @param operator The filter operator to check.
|
|
225
|
+
* @returns True if the operator is a negation operator.
|
|
226
|
+
*/
|
|
227
|
+
function isNegationOperator(operator: FilterOperator): boolean {
|
|
228
|
+
return [FilterOperator.NE, FilterOperator.NotContains, FilterOperator.NotStartsWith, FilterOperator.NotEndsWith].includes(operator);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Checks if the operator is a comparison operator (GT, GE, LT, LE, BT, NB).
|
|
233
|
+
* @param operator The filter operator to check.
|
|
234
|
+
* @returns True if the operator is a comparison operator.
|
|
235
|
+
*/
|
|
236
|
+
function isComparisonOperator(operator: FilterOperator): boolean {
|
|
237
|
+
return [FilterOperator.GT, FilterOperator.GE, FilterOperator.LT, FilterOperator.LE, FilterOperator.BT, FilterOperator.NB].includes(
|
|
238
|
+
operator
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Converts a negation operator to its positive equivalent (NE -> EQ, NotContains -> Contains, etc.).
|
|
244
|
+
* @param negationOperator The negation operator to convert.
|
|
245
|
+
* @returns The corresponding positive operator.
|
|
246
|
+
*/
|
|
247
|
+
export function getPositiveOperator(negationOperator: FilterOperator): ScalarOperator {
|
|
248
|
+
switch (negationOperator) {
|
|
249
|
+
case FilterOperator.NE:
|
|
250
|
+
return FilterOperator.EQ;
|
|
251
|
+
case FilterOperator.NotContains:
|
|
252
|
+
return FilterOperator.Contains;
|
|
253
|
+
case FilterOperator.NotStartsWith:
|
|
254
|
+
return FilterOperator.StartsWith;
|
|
255
|
+
case FilterOperator.NotEndsWith:
|
|
256
|
+
return FilterOperator.EndsWith;
|
|
257
|
+
default:
|
|
258
|
+
return FilterOperator.EQ;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -26,7 +26,7 @@ sap.ui.define(["sap/base/Log", "sap/fe/base/ClassSupport", "../Chart"], function
|
|
|
26
26
|
* This is currently an experimental API because the structure of the generated content will change to come closer to the Chart that you get out of templates.
|
|
27
27
|
* The public method and property will not change but the internal structure will so be careful on your usage.
|
|
28
28
|
* @public
|
|
29
|
-
* @experimental
|
|
29
|
+
* @ui5-experimental-since
|
|
30
30
|
* @mixes sap.fe.macros.Chart
|
|
31
31
|
* @augments sap.ui.core.Control
|
|
32
32
|
* @deprecatedsince 1.130
|
|
@@ -44,4 +44,4 @@ sap.ui.define(["sap/base/Log", "sap/fe/base/ClassSupport", "../Chart"], function
|
|
|
44
44
|
_exports = Chart;
|
|
45
45
|
return _exports;
|
|
46
46
|
}, false);
|
|
47
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
47
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJDaGFydCIsIl9kZWMiLCJkZWZpbmVVSTVDbGFzcyIsIl9jbGFzcyIsIl9DaGFydEJsb2NrIiwicHJvcHMiLCJvdGhlcnMiLCJMb2ciLCJ3YXJuaW5nIiwiY2FsbCIsIl9leHBvcnRzIiwiX2luaGVyaXRzTG9vc2UiLCJDaGFydEJsb2NrIl0sInNvdXJjZVJvb3QiOiIuIiwic291cmNlcyI6WyJDaGFydC50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IExvZyBmcm9tIFwic2FwL2Jhc2UvTG9nXCI7XG5pbXBvcnQgeyBkZWZpbmVVSTVDbGFzcywgdHlwZSBQcm9wZXJ0aWVzT2YgfSBmcm9tIFwic2FwL2ZlL2Jhc2UvQ2xhc3NTdXBwb3J0XCI7XG5pbXBvcnQgdHlwZSB7ICRDb250cm9sU2V0dGluZ3MgfSBmcm9tIFwic2FwL3VpL21kYy9Db250cm9sXCI7XG5pbXBvcnQgQ2hhcnRCbG9jayBmcm9tIFwiLi4vQ2hhcnRcIjtcblxuLyoqXG4gKiBCdWlsZGluZyBibG9jayB1c2VkIHRvIGNyZWF0ZSBhIGNoYXJ0IGJhc2VkIG9uIHRoZSBtZXRhZGF0YSBwcm92aWRlZCBieSBPRGF0YSBWNC5cbiAqIDxicj5cbiAqIFVzdWFsbHksIGEgY29udGV4dFBhdGggYW5kIG1ldGFQYXRoIGlzIGV4cGVjdGVkLlxuICpcbiAqIFVzYWdlIGV4YW1wbGU6XG4gKiA8cHJlPlxuICogc2FwLnVpLnJlcXVpcmUoW1wic2FwL2ZlL21hY3Jvcy9jaGFydC9DaGFydFwiXSwgZnVuY3Rpb24oQ2hhcnQpIHtcbiAqIFx0IC4uLlxuICogXHQgbmV3IENoYXJ0KFwibXlDaGFydFwiLCB7bWV0YVBhdGg6XCJNeUNoYXJ0XCJ9KVxuICogfSlcbiAqIDwvcHJlPlxuICpcbiAqIFRoaXMgaXMgY3VycmVudGx5IGFuIGV4cGVyaW1lbnRhbCBBUEkgYmVjYXVzZSB0aGUgc3RydWN0dXJlIG9mIHRoZSBnZW5lcmF0ZWQgY29udGVudCB3aWxsIGNoYW5nZSB0byBjb21lIGNsb3NlciB0byB0aGUgQ2hhcnQgdGhhdCB5b3UgZ2V0IG91dCBvZiB0ZW1wbGF0ZXMuXG4gKiBUaGUgcHVibGljIG1ldGhvZCBhbmQgcHJvcGVydHkgd2lsbCBub3QgY2hhbmdlIGJ1dCB0aGUgaW50ZXJuYWwgc3RydWN0dXJlIHdpbGwgc28gYmUgY2FyZWZ1bCBvbiB5b3VyIHVzYWdlLlxuICogQHB1YmxpY1xuICogQHVpNS1leHBlcmltZW50YWwtc2luY2VcbiAqIEBtaXhlcyBzYXAuZmUubWFjcm9zLkNoYXJ0XG4gKiBAYXVnbWVudHMgc2FwLnVpLmNvcmUuQ29udHJvbFxuICogQGRlcHJlY2F0ZWRzaW5jZSAxLjEzMFxuICogQGRlcHJlY2F0ZWQgVXNlIHtAbGluayBzYXAuZmUubWFjcm9zLkNoYXJ0fSBpbnN0ZWFkXG4gKi9cbkBkZWZpbmVVSTVDbGFzcyhcInNhcC5mZS5tYWNyb3MuY2hhcnQuQ2hhcnRcIilcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIENoYXJ0IGV4dGVuZHMgQ2hhcnRCbG9jayB7XG5cdGNvbnN0cnVjdG9yKHByb3BzPzogUHJvcGVydGllc09mPENoYXJ0QmxvY2s+ICYgJENvbnRyb2xTZXR0aW5ncywgb3RoZXJzPzogJENvbnRyb2xTZXR0aW5ncykge1xuXHRcdExvZy53YXJuaW5nKFwiWW91J3ZlIGNvbnN1bWVkIGRlcHJlY2F0ZWQgQ2hhcnQgY2xhc3MuIFVzZSBzYXAuZmUubWFjcm9zLkNoYXJ0IGluc3RlYWRcIik7XG5cdFx0c3VwZXIocHJvcHMsIG90aGVycyk7XG5cdH1cbn1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0VBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7RUFyQkEsSUF1QnFCQSxLQUFLLElBQUFDLElBQUEsR0FEekJDLGNBQWMsQ0FBQywyQkFBMkIsQ0FBQyxFQUFBRCxJQUFBLENBQUFFLE1BQUEsMEJBQUFDLFdBQUE7SUFFM0MsU0FBQUosTUFBWUssS0FBbUQsRUFBRUMsTUFBeUIsRUFBRTtNQUMzRkMsR0FBRyxDQUFDQyxPQUFPLENBQUMseUVBQXlFLENBQUM7TUFBQyxPQUN2RkosV0FBQSxDQUFBSyxJQUFBLE9BQU1KLEtBQUssRUFBRUMsTUFBTSxDQUFDO0lBQ3JCO0lBQUNJLFFBQUEsR0FBQVYsS0FBQTtJQUFBVyxjQUFBLENBQUFYLEtBQUEsRUFBQUksV0FBQTtJQUFBLE9BQUFKLEtBQUE7RUFBQSxFQUppQ1ksVUFBVSxNQUFBVCxNQUFBO0VBQUFPLFFBQUEsR0FBQVYsS0FBQTtFQUFBLE9BQUFVLFFBQUE7QUFBQSIsImlnbm9yZUxpc3QiOltdfQ==
|
|
@@ -19,7 +19,7 @@ import ChartBlock from "../Chart";
|
|
|
19
19
|
* This is currently an experimental API because the structure of the generated content will change to come closer to the Chart that you get out of templates.
|
|
20
20
|
* The public method and property will not change but the internal structure will so be careful on your usage.
|
|
21
21
|
* @public
|
|
22
|
-
* @experimental
|
|
22
|
+
* @ui5-experimental-since
|
|
23
23
|
* @mixes sap.fe.macros.Chart
|
|
24
24
|
* @augments sap.ui.core.Control
|
|
25
25
|
* @deprecatedsince 1.130
|