@sapui5/sap.fe.macros 1.141.2 → 1.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/fe/macros/.library +1 -1
- package/src/sap/fe/macros/Breadcrumbs.js +4 -10
- package/src/sap/fe/macros/Breadcrumbs.tsx +2 -8
- package/src/sap/fe/macros/Chart.js +34 -23
- package/src/sap/fe/macros/Chart.tsx +25 -11
- package/src/sap/fe/macros/CollaborativeDraftHandler.js +47 -36
- package/src/sap/fe/macros/CollaborativeDraftHandler.tsx +50 -31
- package/src/sap/fe/macros/CollectionBindingInfo.js +8 -2
- package/src/sap/fe/macros/CollectionBindingInfo.ts +11 -6
- package/src/sap/fe/macros/CommonHelper.js +14 -24
- package/src/sap/fe/macros/CommonHelper.ts +18 -25
- package/src/sap/fe/macros/ConditionalSwitch.js +1 -2
- package/src/sap/fe/macros/ConditionalSwitch.tsx +0 -1
- package/src/sap/fe/macros/ConditionalSwitchProperty.js +1 -3
- package/src/sap/fe/macros/ConditionalSwitchProperty.tsx +0 -2
- package/src/sap/fe/macros/Field.js +34 -17
- package/src/sap/fe/macros/Field.ts +64 -32
- package/src/sap/fe/macros/FooterContent.js +7 -3
- package/src/sap/fe/macros/FooterContent.tsx +8 -13
- package/src/sap/fe/macros/KPITag.js +6 -6
- package/src/sap/fe/macros/KPITag.tsx +8 -6
- package/src/sap/fe/macros/MacroAPI.js +4 -3
- package/src/sap/fe/macros/MacroAPI.ts +3 -3
- package/src/sap/fe/macros/MessageButton.js +4 -3
- package/src/sap/fe/macros/MessageButton.tsx +7 -3
- package/src/sap/fe/macros/MicroChart.js +12 -7
- package/src/sap/fe/macros/MicroChart.tsx +9 -3
- package/src/sap/fe/macros/MultiValueField.js +22 -36
- package/src/sap/fe/macros/MultiValueField.tsx +34 -66
- package/src/sap/fe/macros/RichTextEditor.js +3 -4
- package/src/sap/fe/macros/RichTextEditor.tsx +2 -3
- package/src/sap/fe/macros/Share.js +7 -7
- package/src/sap/fe/macros/Share.tsx +9 -6
- package/src/sap/fe/macros/Status.js +39 -11
- package/src/sap/fe/macros/Status.tsx +25 -5
- package/src/sap/fe/macros/ValueHelp.js +5 -2
- package/src/sap/fe/macros/ValueHelp.tsx +5 -0
- package/src/sap/fe/macros/ai/EasyFillDialog.js +2 -1
- package/src/sap/fe/macros/ai/EasyFillDialog.tsx +1 -0
- package/src/sap/fe/macros/ai/EasyFilterBar.js +7 -34
- package/src/sap/fe/macros/ai/EasyFilterBar.tsx +6 -35
- package/src/sap/fe/macros/ai/EasyFilterDataFetcher.js +31 -7
- package/src/sap/fe/macros/ai/EasyFilterDataFetcher.ts +33 -6
- package/src/sap/fe/macros/ai/SummarizationButton.js +6 -4
- package/src/sap/fe/macros/ai/SummarizationButton.tsx +5 -3
- package/src/sap/fe/macros/chart/Action.js +25 -2
- package/src/sap/fe/macros/chart/Action.ts +13 -0
- package/src/sap/fe/macros/chart/ActionGroup.js +25 -2
- package/src/sap/fe/macros/chart/ActionGroup.ts +13 -0
- package/src/sap/fe/macros/chart/ChartDelegate.js +29 -8
- package/src/sap/fe/macros/chart/ChartDelegate.ts +46 -14
- package/src/sap/fe/macros/chart/MdcChartTemplate.js +58 -12
- package/src/sap/fe/macros/chart/MdcChartTemplate.tsx +75 -13
- package/src/sap/fe/macros/chart/OverflowGroup.js +62 -0
- package/src/sap/fe/macros/chart/OverflowGroup.ts +22 -0
- package/src/sap/fe/macros/controls/BuildingBlockObjectProperty.js +7 -7
- package/src/sap/fe/macros/controls/BuildingBlockObjectProperty.ts +3 -2
- package/src/sap/fe/macros/controls/FileWrapper.js +11 -5
- package/src/sap/fe/macros/controls/FileWrapper.ts +10 -4
- package/src/sap/fe/macros/controls/FilterBar.js +39 -3
- package/src/sap/fe/macros/controls/FilterBar.ts +42 -1
- package/src/sap/fe/macros/controls/NumberWithUnitOrCurrency.js +3 -1
- package/src/sap/fe/macros/controls/NumberWithUnitOrCurrency.tsx +2 -0
- package/src/sap/fe/macros/controls/RadioButtons.js +18 -5
- package/src/sap/fe/macros/controls/RadioButtons.tsx +10 -1
- package/src/sap/fe/macros/coreUI/CreateDialog.js +3 -3
- package/src/sap/fe/macros/coreUI/CreateDialog.tsx +2 -2
- package/src/sap/fe/macros/coreUI/OperationParameterDialog.js +40 -12
- package/src/sap/fe/macros/coreUI/OperationParameterDialog.tsx +48 -9
- package/src/sap/fe/macros/draftIndicator/DraftIndicator.js +4 -2
- package/src/sap/fe/macros/draftIndicator/DraftIndicator.tsx +3 -1
- package/src/sap/fe/macros/field/FieldFormatOptions.js +4 -4
- package/src/sap/fe/macros/field/FieldFormatOptions.ts +2 -2
- package/src/sap/fe/macros/field/FieldHelper.js +4 -3
- package/src/sap/fe/macros/field/FieldHelper.ts +7 -1
- package/src/sap/fe/macros/field/FieldRuntime.js +44 -9
- package/src/sap/fe/macros/field/FieldRuntime.ts +72 -8
- package/src/sap/fe/macros/field/FieldRuntimeHelper.js +3 -34
- package/src/sap/fe/macros/field/FieldRuntimeHelper.ts +28 -53
- package/src/sap/fe/macros/field/FieldTemplating.js +5 -4
- package/src/sap/fe/macros/field/FieldTemplating.ts +6 -4
- package/src/sap/fe/macros/filter/FilterFieldHelper.js +6 -4
- package/src/sap/fe/macros/filter/FilterFieldHelper.ts +7 -2
- package/src/sap/fe/macros/filter/FilterUtils.js +130 -40
- package/src/sap/fe/macros/filter/FilterUtils.ts +167 -45
- package/src/sap/fe/macros/filterBar/ExtendedSemanticDateOperators.js +2 -2
- package/src/sap/fe/macros/filterBar/ExtendedSemanticDateOperators.ts +1 -1
- package/src/sap/fe/macros/filterBar/FilterBar.block.js +4 -3
- package/src/sap/fe/macros/filterBar/FilterBar.block.tsx +19 -8
- package/src/sap/fe/macros/filterBar/FilterBarAPI.js +15 -9
- package/src/sap/fe/macros/filterBar/FilterBarAPI.ts +36 -17
- package/src/sap/fe/macros/filterBar/FilterBarDelegate.js +21 -10
- package/src/sap/fe/macros/filterBar/FilterBarDelegate.ts +81 -63
- package/src/sap/fe/macros/filterBar/UOMValidationDelegate.js +376 -0
- package/src/sap/fe/macros/filterBar/UOMValidationDelegate.ts +463 -0
- package/src/sap/fe/macros/filterBar/mixin/FilterBarAPIStateHandler.js +4 -3
- package/src/sap/fe/macros/filterBar/mixin/FilterBarAPIStateHandler.ts +3 -2
- package/src/sap/fe/macros/form/Form.block.js +27 -2
- package/src/sap/fe/macros/form/Form.block.ts +31 -11
- package/src/sap/fe/macros/form/FormActionButtons.fragment.xml +13 -3
- package/src/sap/fe/macros/form/FormContainer.block.js +110 -63
- package/src/sap/fe/macros/form/FormContainer.block.ts +121 -64
- package/src/sap/fe/macros/formatters/TableFormatter.js +13 -10
- package/src/sap/fe/macros/formatters/TableFormatter.ts +11 -9
- package/src/sap/fe/macros/formatters/VisualFilterFormatter.js +6 -4
- package/src/sap/fe/macros/formatters/VisualFilterFormatter.ts +5 -5
- package/src/sap/fe/macros/inlineEdit/InlineEdit.js +5 -5
- package/src/sap/fe/macros/inlineEdit/InlineEdit.ts +4 -4
- package/src/sap/fe/macros/insights/InsightsService.js +3 -2
- package/src/sap/fe/macros/insights/InsightsService.ts +2 -1
- package/src/sap/fe/macros/internal/DataPoint.js +7 -8
- package/src/sap/fe/macros/internal/DataPoint.tsx +6 -9
- package/src/sap/fe/macros/internal/field/DisplayStyle.js +8 -6
- package/src/sap/fe/macros/internal/field/DisplayStyle.tsx +7 -8
- package/src/sap/fe/macros/internal/field/EditStyle.js +9 -20
- package/src/sap/fe/macros/internal/field/EditStyle.tsx +17 -41
- package/src/sap/fe/macros/internal/field/FieldBlockStructure.js +2 -2
- package/src/sap/fe/macros/internal/field/FieldBlockStructure.tsx +1 -1
- package/src/sap/fe/macros/internal/field/FieldStructure.js +1 -2
- package/src/sap/fe/macros/internal/field/FieldStructure.tsx +0 -2
- package/src/sap/fe/macros/internal/field/FieldStructureHelper.js +7 -7
- package/src/sap/fe/macros/internal/field/FieldStructureHelper.ts +17 -11
- package/src/sap/fe/macros/internal/helpers/DataPointTemplating.js +6 -2
- package/src/sap/fe/macros/internal/helpers/DataPointTemplating.ts +5 -1
- package/src/sap/fe/macros/internal/valuehelp/AdditionalValueFormatter.js +9 -6
- package/src/sap/fe/macros/internal/valuehelp/AdditionalValueFormatter.ts +7 -5
- package/src/sap/fe/macros/internal/valuehelp/TableDelegate.js +4 -4
- package/src/sap/fe/macros/internal/valuehelp/TableDelegate.ts +6 -6
- package/src/sap/fe/macros/internal/valuehelp/ValueListDialogTable.fragment.xml +5 -2
- package/src/sap/fe/macros/internal/valuehelp/ValueListHelper.js +2 -2
- package/src/sap/fe/macros/internal/valuehelp/ValueListHelper.ts +2 -1
- package/src/sap/fe/macros/library.js +5 -6
- package/src/sap/fe/macros/{library.ts → library.tsx} +3 -1
- package/src/sap/fe/macros/mdc/adapter/StateHelper.js +15 -5
- package/src/sap/fe/macros/mdc/adapter/StateHelper.ts +21 -5
- package/src/sap/fe/macros/messagebundle.properties +13 -5
- package/src/sap/fe/macros/messagebundle_ar.properties +12 -3
- package/src/sap/fe/macros/messagebundle_bg.properties +13 -4
- package/src/sap/fe/macros/messagebundle_ca.properties +12 -3
- package/src/sap/fe/macros/messagebundle_cnr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_cs.properties +11 -2
- package/src/sap/fe/macros/messagebundle_cy.properties +12 -3
- package/src/sap/fe/macros/messagebundle_da.properties +12 -3
- package/src/sap/fe/macros/messagebundle_de.properties +16 -7
- package/src/sap/fe/macros/messagebundle_el.properties +13 -4
- package/src/sap/fe/macros/messagebundle_en.properties +13 -4
- package/src/sap/fe/macros/messagebundle_en_GB.properties +13 -4
- package/src/sap/fe/macros/messagebundle_en_US_saprigi.properties +13 -4
- package/src/sap/fe/macros/messagebundle_es.properties +12 -3
- package/src/sap/fe/macros/messagebundle_es_MX.properties +12 -3
- package/src/sap/fe/macros/messagebundle_et.properties +12 -3
- package/src/sap/fe/macros/messagebundle_fi.properties +12 -3
- package/src/sap/fe/macros/messagebundle_fr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_fr_CA.properties +12 -3
- package/src/sap/fe/macros/messagebundle_hi.properties +12 -3
- package/src/sap/fe/macros/messagebundle_hr.properties +13 -4
- package/src/sap/fe/macros/messagebundle_hu.properties +12 -3
- package/src/sap/fe/macros/messagebundle_id.properties +18 -9
- package/src/sap/fe/macros/messagebundle_it.properties +12 -3
- package/src/sap/fe/macros/messagebundle_iw.properties +12 -3
- package/src/sap/fe/macros/messagebundle_ja.properties +12 -3
- package/src/sap/fe/macros/messagebundle_kk.properties +11 -2
- package/src/sap/fe/macros/messagebundle_ko.properties +13 -4
- package/src/sap/fe/macros/messagebundle_lt.properties +12 -3
- package/src/sap/fe/macros/messagebundle_lv.properties +12 -3
- package/src/sap/fe/macros/messagebundle_mk.properties +12 -3
- package/src/sap/fe/macros/messagebundle_ms.properties +12 -3
- package/src/sap/fe/macros/messagebundle_nl.properties +12 -3
- package/src/sap/fe/macros/messagebundle_no.properties +12 -3
- package/src/sap/fe/macros/messagebundle_pl.properties +12 -3
- package/src/sap/fe/macros/messagebundle_pt.properties +12 -3
- package/src/sap/fe/macros/messagebundle_pt_PT.properties +12 -3
- package/src/sap/fe/macros/messagebundle_ro.properties +13 -4
- package/src/sap/fe/macros/messagebundle_ru.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sh.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sk.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sl.properties +13 -4
- package/src/sap/fe/macros/messagebundle_sr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sv.properties +12 -3
- package/src/sap/fe/macros/messagebundle_th.properties +11 -2
- package/src/sap/fe/macros/messagebundle_tr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_uk.properties +12 -3
- package/src/sap/fe/macros/messagebundle_vi.properties +13 -4
- package/src/sap/fe/macros/messagebundle_zh_CN.properties +12 -3
- package/src/sap/fe/macros/messagebundle_zh_TW.properties +12 -3
- package/src/sap/fe/macros/messages/MessageButton.js +21 -12
- package/src/sap/fe/macros/messages/MessageButton.ts +21 -11
- package/src/sap/fe/macros/multivaluefield/MultiValueFieldDelegate.js +7 -3
- package/src/sap/fe/macros/multivaluefield/MultiValueFieldDelegate.ts +8 -2
- package/src/sap/fe/macros/quickView/QuickView.js +5 -4
- package/src/sap/fe/macros/quickView/QuickView.tsx +10 -3
- package/src/sap/fe/macros/richtexteditor/ButtonGroup.js +2 -2
- package/src/sap/fe/macros/richtexteditor/ButtonGroup.ts +2 -2
- package/src/sap/fe/macros/table/Action.js +21 -5
- package/src/sap/fe/macros/table/Action.ts +14 -4
- package/src/sap/fe/macros/table/ActionGroup.js +15 -2
- package/src/sap/fe/macros/table/ActionGroup.ts +8 -0
- package/src/sap/fe/macros/table/ActionGroupOverride.js +14 -2
- package/src/sap/fe/macros/table/ActionGroupOverride.ts +7 -0
- package/src/sap/fe/macros/table/ActionOverride.js +14 -2
- package/src/sap/fe/macros/table/ActionOverride.ts +7 -0
- package/src/sap/fe/macros/table/ActionsTemplating.js +16 -2
- package/src/sap/fe/macros/table/ActionsTemplating.tsx +15 -0
- package/src/sap/fe/macros/table/Column.js +3 -2
- package/src/sap/fe/macros/table/Column.ts +1 -1
- package/src/sap/fe/macros/table/MdcTableTemplate.js +96 -18
- package/src/sap/fe/macros/table/MdcTableTemplate.tsx +136 -17
- package/src/sap/fe/macros/table/OverflowGroups.js +59 -0
- package/src/sap/fe/macros/table/OverflowGroups.ts +27 -0
- package/src/sap/fe/macros/table/Table.block.js +74 -30
- package/src/sap/fe/macros/table/Table.block.tsx +77 -14
- package/src/sap/fe/macros/table/TableAPI.js +175 -132
- package/src/sap/fe/macros/table/TableAPI.ts +67 -30
- package/src/sap/fe/macros/table/TableDefinition.js +20 -3
- package/src/sap/fe/macros/table/TableDefinition.ts +18 -2
- package/src/sap/fe/macros/table/TableEventHandlerProvider.js +6 -3
- package/src/sap/fe/macros/table/TableEventHandlerProvider.ts +12 -9
- package/src/sap/fe/macros/table/TableHelper.js +5 -2
- package/src/sap/fe/macros/table/TableHelper.ts +5 -2
- package/src/sap/fe/macros/table/TableRuntime.js +25 -13
- package/src/sap/fe/macros/table/TableRuntime.ts +31 -17
- package/src/sap/fe/macros/table/TableSizeHelper.js +4 -4
- package/src/sap/fe/macros/table/TableSizeHelper.ts +6 -11
- package/src/sap/fe/macros/table/Utils.js +9 -3
- package/src/sap/fe/macros/table/Utils.ts +14 -8
- package/src/sap/fe/macros/table/delegates/TableDelegate.js +72 -29
- package/src/sap/fe/macros/table/delegates/TableDelegate.ts +114 -123
- package/src/sap/fe/macros/table/massEdit/MassEditDialog.js +41 -15
- package/src/sap/fe/macros/table/massEdit/MassEditDialog.tsx +41 -22
- package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.js +15 -6
- package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.tsx +14 -5
- package/src/sap/fe/macros/table/massEdit/MassEditField.js +1 -1
- package/src/sap/fe/macros/table/massEdit/MassEditField.tsx +3 -6
- package/src/sap/fe/macros/table/mixin/ContextMenuHandler.js +2 -3
- package/src/sap/fe/macros/table/mixin/ContextMenuHandler.ts +3 -2
- package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.js +42 -14
- package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.ts +49 -19
- package/src/sap/fe/macros/table/mixin/TableAPIStateHandler.js +7 -9
- package/src/sap/fe/macros/table/mixin/TableAPIStateHandler.ts +7 -8
- package/src/sap/fe/macros/table/mixin/TableExport.js +1 -1
- package/src/sap/fe/macros/table/mixin/TableExport.ts +3 -3
- package/src/sap/fe/macros/table/mixin/TableHierarchy.js +3 -4
- package/src/sap/fe/macros/table/mixin/TableHierarchy.ts +2 -3
- package/src/sap/fe/macros/table/uploadTable/UploadTableRuntime.js +5 -4
- package/src/sap/fe/macros/table/uploadTable/UploadTableRuntime.ts +6 -3
- package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.js +17 -10
- package/src/sap/fe/macros/valuehelp/ValueHelpDelegate.ts +24 -9
- package/src/sap/fe/macros/visualfilters/InteractiveChartHelper.js +4 -4
- package/src/sap/fe/macros/visualfilters/InteractiveChartHelper.ts +3 -3
- package/src/sap/fe/macros/visualfilters/VisualFilter.js +20 -2
- package/src/sap/fe/macros/visualfilters/VisualFilter.tsx +28 -6
- package/src/sap/fe/macros/visualfilters/VisualFilterRuntime.js +6 -3
- package/src/sap/fe/macros/visualfilters/VisualFilterRuntime.ts +4 -3
- package/src/sap/fe/macros/visualfilters/fragments/InteractiveCharts.js +3 -3
- package/src/sap/fe/macros/visualfilters/fragments/InteractiveCharts.tsx +10 -4
- package/src/sap/fe/macros/visualfilters/fragments/InteractiveDonutChart.fragment.xml +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EntitySet, Property, PropertyPath } from "@sap-ux/vocabularies-types";
|
|
2
2
|
import Log from "sap/base/Log";
|
|
3
3
|
import merge from "sap/base/util/merge";
|
|
4
|
-
import type { PropertiesOf } from "sap/fe/base/ClassSupport";
|
|
4
|
+
import type { EventsOf, PropertiesOf } from "sap/fe/base/ClassSupport";
|
|
5
5
|
import { aggregation, defineUI5Class, event, mixin, property, xmlEventHandler } from "sap/fe/base/ClassSupport";
|
|
6
6
|
import { controllerExtensionHandler } from "sap/fe/base/HookSupport";
|
|
7
7
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
@@ -26,7 +26,7 @@ import { NavType } from "sap/fe/navigation/library";
|
|
|
26
26
|
import type { default as ListReportController } from "sap/fe/templates/ListReport/ListReportController.controller";
|
|
27
27
|
import type Input from "sap/m/Input";
|
|
28
28
|
import type { Input$ValueHelpRequestEventParameters } from "sap/m/Input";
|
|
29
|
-
import type
|
|
29
|
+
import type UI5Event from "sap/ui/base/Event";
|
|
30
30
|
import type { $ControlSettings } from "sap/ui/core/Control";
|
|
31
31
|
import UI5Element from "sap/ui/core/Element";
|
|
32
32
|
import type View from "sap/ui/core/mvc/View";
|
|
@@ -38,12 +38,17 @@ import type Control from "sap/ui/mdc/Control";
|
|
|
38
38
|
import type ValueHelp from "sap/ui/mdc/ValueHelp";
|
|
39
39
|
import type { ConditionObject } from "sap/ui/mdc/condition/Condition";
|
|
40
40
|
import FieldEditMode from "sap/ui/mdc/enums/FieldEditMode";
|
|
41
|
-
import type {
|
|
41
|
+
import type {
|
|
42
|
+
FilterBarBase$FiltersChangedEvent,
|
|
43
|
+
FilterBarBase$FiltersChangedEventParameters,
|
|
44
|
+
FilterBarBase$SearchEvent
|
|
45
|
+
} from "sap/ui/mdc/filterbar/FilterBarBase";
|
|
42
46
|
import type { Filter as StateUtilFilter } from "sap/ui/mdc/p13n/StateUtil";
|
|
43
47
|
import StateUtil from "sap/ui/mdc/p13n/StateUtil";
|
|
44
|
-
import type JSONModel from "sap/ui/model/json/JSONModel";
|
|
45
48
|
import type { default as MetaModel, default as ODataMetaModel } from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
46
49
|
import jQuery from "sap/ui/thirdparty/jquery";
|
|
50
|
+
import type { EventHandler } from "../../../../../../../types/extension_types";
|
|
51
|
+
import UOMValidationDelegate from "./UOMValidationDelegate";
|
|
47
52
|
import FilterBarAPIStateHandler from "./mixin/FilterBarAPIStateHandler";
|
|
48
53
|
|
|
49
54
|
// Track telemetry content for the filterBar
|
|
@@ -295,7 +300,7 @@ class FilterBarAPI extends MacroAPI {
|
|
|
295
300
|
if (filterVariantApplied || useFLPDefaultValues) {
|
|
296
301
|
svToSet = await this._getAdjustedSV(sv, useFLPDefaultValues);
|
|
297
302
|
}
|
|
298
|
-
return filterBarAPI.setSelectionVariant(svToSet, true);
|
|
303
|
+
return filterBarAPI.setSelectionVariant(svToSet, true, true);
|
|
299
304
|
}
|
|
300
305
|
}
|
|
301
306
|
|
|
@@ -665,10 +670,10 @@ class FilterBarAPI extends MacroAPI {
|
|
|
665
670
|
* @public
|
|
666
671
|
*/
|
|
667
672
|
@event()
|
|
668
|
-
search!:
|
|
673
|
+
search!: EventHandler<UI5Event<{}, FilterBarAPI>>;
|
|
669
674
|
|
|
670
675
|
/**
|
|
671
|
-
* This event is fired when the 'Go' button is pressed or after a condition change. This is only internally
|
|
676
|
+
* This event is fired when the 'Go' button is pressed or after a condition change. This is only used internally by sap.fe (SAP Fiori elements) and
|
|
672
677
|
* exposes parameters from internal MDC-FilterBar search event
|
|
673
678
|
* @private
|
|
674
679
|
*/
|
|
@@ -680,18 +685,18 @@ class FilterBarAPI extends MacroAPI {
|
|
|
680
685
|
* @public
|
|
681
686
|
*/
|
|
682
687
|
@event()
|
|
683
|
-
filterChanged!:
|
|
688
|
+
filterChanged!: EventHandler<UI5Event<FilterBarBase$FiltersChangedEventParameters, FilterBarAPI>>;
|
|
684
689
|
|
|
685
690
|
/**
|
|
686
691
|
* This event is fired when the 'Clear' button is pressed. This is only possible when the 'Clear' button is enabled.
|
|
687
692
|
* @public
|
|
688
693
|
*/
|
|
689
694
|
@event()
|
|
690
|
-
afterClear!:
|
|
695
|
+
afterClear!: EventHandler<UI5Event<{}, FilterBarAPI>>;
|
|
691
696
|
|
|
692
697
|
/**
|
|
693
698
|
* This event is fired after either a filter value or the visibility of a filter item has been changed. The event contains conditions that will be used as filters.
|
|
694
|
-
* This is used internally
|
|
699
|
+
* This is only used internally by sap.fe (SAP Fiori elements). This exposes parameters from the MDC-FilterBar filterChanged event that is used by sap.fe.
|
|
695
700
|
* @private
|
|
696
701
|
*/
|
|
697
702
|
@event()
|
|
@@ -699,7 +704,7 @@ class FilterBarAPI extends MacroAPI {
|
|
|
699
704
|
|
|
700
705
|
private telemetry?: FilterBarTelemetry;
|
|
701
706
|
|
|
702
|
-
constructor(props?: $ControlSettings & PropertiesOf<FilterBarAPI>, others?: $ControlSettings) {
|
|
707
|
+
constructor(props?: $ControlSettings & PropertiesOf<FilterBarAPI> & EventsOf<FilterBarAPI>, others?: $ControlSettings) {
|
|
703
708
|
super(props, others);
|
|
704
709
|
this.telemetry = new FilterBarTelemetry(this);
|
|
705
710
|
this.attachStateChangeHandler();
|
|
@@ -710,7 +715,7 @@ class FilterBarAPI extends MacroAPI {
|
|
|
710
715
|
StateUtil.attachStateChange(this.stateChangeHandler);
|
|
711
716
|
}
|
|
712
717
|
|
|
713
|
-
stateChangeHandler(oEvent:
|
|
718
|
+
stateChangeHandler(oEvent: UI5Event<{ control: Control }>): void {
|
|
714
719
|
const control = oEvent.getParameter("control");
|
|
715
720
|
if (control.isA<FilterBar>("sap.ui.mdc.FilterBar")) {
|
|
716
721
|
const filterBarAPI = control.getParent() as unknown as { handleStateChange?: Function };
|
|
@@ -722,6 +727,7 @@ class FilterBarAPI extends MacroAPI {
|
|
|
722
727
|
|
|
723
728
|
@xmlEventHandler()
|
|
724
729
|
handleSearch(oEvent: FilterBarBase$SearchEvent): void {
|
|
730
|
+
this.getPageController()?.inlineEditFlow?.inlineEditDiscard();
|
|
725
731
|
const oFilterBar = oEvent.getSource() as FilterBar | undefined;
|
|
726
732
|
const eventParameters = oEvent.getParameters();
|
|
727
733
|
if (oFilterBar) {
|
|
@@ -738,10 +744,13 @@ class FilterBarAPI extends MacroAPI {
|
|
|
738
744
|
}
|
|
739
745
|
|
|
740
746
|
@xmlEventHandler()
|
|
741
|
-
handleFilterChanged(oEvent: FilterBarBase$FiltersChangedEvent): void {
|
|
747
|
+
async handleFilterChanged(oEvent: FilterBarBase$FiltersChangedEvent): Promise<void> {
|
|
742
748
|
const filterBar = oEvent.getSource() as FilterBar | undefined;
|
|
743
749
|
const oEventParameters = oEvent.getParameters();
|
|
744
750
|
if (filterBar) {
|
|
751
|
+
if (!filterBar.getLiveMode()) {
|
|
752
|
+
await UOMValidationDelegate.validateAllUOMFields(filterBar, "filterChange");
|
|
753
|
+
}
|
|
745
754
|
const oConditions = filterBar.getFilterConditions();
|
|
746
755
|
const eventParameters: object = this._prepareEventParameters(filterBar);
|
|
747
756
|
this.telemetry?.onFiltersChanged(this._getFilterBarReason(filterBar));
|
|
@@ -971,7 +980,7 @@ class FilterBarAPI extends MacroAPI {
|
|
|
971
980
|
* @public
|
|
972
981
|
*/
|
|
973
982
|
setFilterFieldEnabled(name: string, enabled: boolean): void {
|
|
974
|
-
|
|
983
|
+
this.getInternalModel()?.setData(
|
|
975
984
|
{
|
|
976
985
|
[this.content.data("localId")]: {
|
|
977
986
|
filterFields: { [name]: { editMode: enabled ? FieldEditMode.Editable : FieldEditMode.Disabled } }
|
|
@@ -988,7 +997,7 @@ class FilterBarAPI extends MacroAPI {
|
|
|
988
997
|
* @public
|
|
989
998
|
*/
|
|
990
999
|
getFilterFieldEnabled(name: string): boolean {
|
|
991
|
-
return
|
|
1000
|
+
return this.getInternalModel()?.getProperty(`/${this.content.data("localId")}/filterFields/${name}/editMode`) ===
|
|
992
1001
|
FieldEditMode.Disabled
|
|
993
1002
|
? false
|
|
994
1003
|
: true;
|
|
@@ -1027,10 +1036,15 @@ class FilterBarAPI extends MacroAPI {
|
|
|
1027
1036
|
* Note: This method cannot set the search field text or any filter field condition that relies on a custom operator.
|
|
1028
1037
|
* @param selectionVariant The {@link sap.fe.navigation.SelectionVariant} to apply to the filter bar
|
|
1029
1038
|
* @param prefillDescriptions Optional. If true, we will use the associated text property values (if they're available in the selectionVariant) to display the filter value descriptions, instead of loading them from the backend
|
|
1039
|
+
* @param fromNavigationParameters PRIVATE
|
|
1030
1040
|
* @returns A promise for asynchronous handling
|
|
1031
1041
|
* @public
|
|
1032
1042
|
*/
|
|
1033
|
-
async setSelectionVariant(
|
|
1043
|
+
async setSelectionVariant(
|
|
1044
|
+
selectionVariant: SelectionVariant,
|
|
1045
|
+
prefillDescriptions = false,
|
|
1046
|
+
fromNavigationParameters = false
|
|
1047
|
+
): Promise<unknown> {
|
|
1034
1048
|
const content = this.getContent() as FilterBar | undefined;
|
|
1035
1049
|
const isLiveMode = content && content?.getLiveMode?.();
|
|
1036
1050
|
let result: { diffState: ExternalStateType; applyStateResult: unknown } | undefined;
|
|
@@ -1038,7 +1052,12 @@ class FilterBarAPI extends MacroAPI {
|
|
|
1038
1052
|
content.enableRequests(false);
|
|
1039
1053
|
}
|
|
1040
1054
|
try {
|
|
1041
|
-
result = await stateHelper.setSelectionVariantToMdcControl(
|
|
1055
|
+
result = await stateHelper.setSelectionVariantToMdcControl(
|
|
1056
|
+
this.getContent(),
|
|
1057
|
+
selectionVariant,
|
|
1058
|
+
prefillDescriptions,
|
|
1059
|
+
fromNavigationParameters
|
|
1060
|
+
);
|
|
1042
1061
|
return result?.applyStateResult;
|
|
1043
1062
|
} catch (err: unknown) {
|
|
1044
1063
|
const message = err instanceof Error ? err.message : String(err);
|