@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
|
@@ -18,6 +18,8 @@ import type { BaseTreeModifier, PreprocessorSettings } from "sap/fe/core/CommonU
|
|
|
18
18
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
19
19
|
import TemplateModel from "sap/fe/core/TemplateModel";
|
|
20
20
|
import { getInvolvedDataModelObjects } from "sap/fe/core/converters/MetaModelConverter";
|
|
21
|
+
import type { PageContextPathTarget } from "sap/fe/core/converters/TemplateConverter";
|
|
22
|
+
import FilterRestrictions from "sap/fe/core/converters/controls/Common/filter/FilterRestrictions";
|
|
21
23
|
import type {
|
|
22
24
|
PropertyInfo as FEPropertyInfo,
|
|
23
25
|
FilterField,
|
|
@@ -29,6 +31,7 @@ import { isPropertyFilterable } from "sap/fe/core/helpers/MetaModelFunction";
|
|
|
29
31
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
30
32
|
import { getLocalizedText, getResourceModel } from "sap/fe/core/helpers/ResourceModelHelper";
|
|
31
33
|
import { generate } from "sap/fe/core/helpers/StableIdHelper";
|
|
34
|
+
import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
|
|
32
35
|
import { hasValueHelp } from "sap/fe/core/templating/PropertyFormatters";
|
|
33
36
|
import { getModelType } from "sap/fe/core/type/EDM";
|
|
34
37
|
import CommonHelper from "sap/fe/macros/CommonHelper";
|
|
@@ -36,6 +39,7 @@ import DelegateUtil from "sap/fe/macros/DelegateUtil";
|
|
|
36
39
|
import FieldHelper from "sap/fe/macros/field/FieldHelper";
|
|
37
40
|
import type { IFilterControl } from "sap/fe/macros/filter/FilterUtils";
|
|
38
41
|
import FilterUtils from "sap/fe/macros/filter/FilterUtils";
|
|
42
|
+
import UOMValidationDelegate from "sap/fe/macros/filterBar/UOMValidationDelegate";
|
|
39
43
|
import type { PropertyInfo } from "sap/fe/macros/internal/PropertyInfo";
|
|
40
44
|
import { getValueHelpTemplate } from "sap/fe/macros/internal/valuehelp/ValueHelpTemplating";
|
|
41
45
|
import type { ControlPropertyInfo } from "sap/fe/macros/mdc/adapter/StateHelper";
|
|
@@ -57,61 +61,62 @@ import type MacroAPI from "../MacroAPI";
|
|
|
57
61
|
|
|
58
62
|
type ModifierElement = UI5Element | UI5Element[] | Element | Element[];
|
|
59
63
|
type NullableModifierElement = void | ModifierElement | null;
|
|
60
|
-
const ODataFilterBarDelegate = Object.assign({}, FilterBarDelegate) as typeof FilterBarDelegate &
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
64
|
+
const ODataFilterBarDelegate = Object.assign({}, FilterBarDelegate, UOMValidationDelegate) as typeof FilterBarDelegate &
|
|
65
|
+
typeof UOMValidationDelegate & {
|
|
66
|
+
apiVersion: number;
|
|
67
|
+
_isFilterInSelectionFields(selectionFields: SelectionFields, filterFieldInfo: FilterField): boolean;
|
|
68
|
+
_findSelectionField(aSelectionFields: FilterField[], sFlexName: string): FilterField | undefined;
|
|
69
|
+
clearFilters(oFilterControl: FilterBar): Promise<void>;
|
|
70
|
+
getTypeMap(): typeof TypeMap;
|
|
71
|
+
fetchFilterProperties(filterBar: IFilterControl): Promise<ControlPropertyInfo[] | PropertyInfoExternal[]>;
|
|
72
|
+
fetchProperties(filterBar: FilterBar): Promise<PropertyInfoExternal[]>;
|
|
73
|
+
_isFilterAdaptable(
|
|
74
|
+
filterFieldInfo: FilterField,
|
|
75
|
+
propertyAnnotations: Property,
|
|
76
|
+
selectionFields?: SelectionFields,
|
|
77
|
+
filterFacets?: FilterFacets
|
|
78
|
+
): boolean;
|
|
79
|
+
fetchPropertiesForEntity(sEntityTypePath: string, oMetaModel: ODataMetaModel, oFilterControl: IFilterControl): PropertyInfo[];
|
|
80
|
+
_templateCustomFilter(
|
|
81
|
+
oFilterBar: IFilterControl,
|
|
82
|
+
sIdPrefix: string,
|
|
83
|
+
oSelectionFieldInfo: FilterField,
|
|
84
|
+
oMetaModel: ODataMetaModel,
|
|
85
|
+
oModifier: BaseTreeModifier
|
|
86
|
+
): Promise<ModifierElement>;
|
|
87
|
+
_addP13nItem(sPropertyInfoName: string, oParentControl: FilterBar): Promise<NullableModifierElement>;
|
|
88
|
+
_addFlexItem(
|
|
89
|
+
sFlexPropertyName: string,
|
|
90
|
+
oParentControl: FilterBar,
|
|
91
|
+
oMetaModel: ODataMetaModel,
|
|
92
|
+
oModifier: BaseTreeModifier | undefined,
|
|
93
|
+
oAppComponent?: AppComponent,
|
|
94
|
+
view?: View
|
|
95
|
+
): Promise<NullableModifierElement>;
|
|
96
|
+
addItem(
|
|
97
|
+
oParentControl: FilterBar,
|
|
98
|
+
sPropertyInfoName: string,
|
|
99
|
+
mPropertyBag?: { modifier: BaseTreeModifier; appComponent: AppComponent }
|
|
100
|
+
): Promise<NullableModifierElement>;
|
|
101
|
+
addCondition(
|
|
102
|
+
oParentControl: FilterBar,
|
|
103
|
+
sPropertyInfoName: string,
|
|
104
|
+
mPropertyBag: { appComponent: AppComponent; modifier: BaseTreeModifier }
|
|
105
|
+
): Promise<void | null>;
|
|
106
|
+
removeItem(
|
|
107
|
+
oParentControl: FilterBar,
|
|
108
|
+
oFilterFieldProperty: UI5Element | Element,
|
|
109
|
+
mPropertyBag: { appComponent: AppComponent; modifier: BaseTreeModifier }
|
|
110
|
+
): Promise<boolean | null>;
|
|
111
|
+
removeCondition(
|
|
112
|
+
oParentControl: FilterBar,
|
|
113
|
+
sPropertyInfoName: string,
|
|
114
|
+
mPropertyBag: {
|
|
115
|
+
appComponent: AppComponent;
|
|
116
|
+
modifier: BaseTreeModifier;
|
|
117
|
+
}
|
|
118
|
+
): Promise<void | null>;
|
|
119
|
+
};
|
|
115
120
|
ODataFilterBarDelegate.apiVersion = 2;
|
|
116
121
|
const EDIT_STATE_PROPERTY_NAME = "$editState",
|
|
117
122
|
SEARCH_PROPERTY_NAME = "$search",
|
|
@@ -417,8 +422,9 @@ async function _addPropertyInfo(
|
|
|
417
422
|
|
|
418
423
|
const delegate = await mPropertyBag.modifier.getProperty<FilterBarDelegate>(oParentControl, "delegate");
|
|
419
424
|
const aPropertyInfo = await mPropertyBag.modifier.getProperty<FEPropertyInfo[]>(oParentControl, "propertyInfo");
|
|
425
|
+
const propertyInfoExists = await FilterUtils._checkIfPropertyInfoExists(oParentControl, mPropertyBag.modifier, sPropertyInfoName);
|
|
420
426
|
//We do not get propertyInfo in case of table filters
|
|
421
|
-
if (aPropertyInfo) {
|
|
427
|
+
if (aPropertyInfo && !propertyInfoExists) {
|
|
422
428
|
const hasPropertyInfo = aPropertyInfo.some(function (prop: FEPropertyInfo) {
|
|
423
429
|
return prop.key === sPropertyInfoKey || prop.name === sPropertyInfoKey;
|
|
424
430
|
});
|
|
@@ -476,12 +482,13 @@ async function _updatePropertyInfo(
|
|
|
476
482
|
propertyBag.modifier.setProperty(parentControl, "propertyInfo", _propertyInfo);
|
|
477
483
|
}
|
|
478
484
|
/**
|
|
479
|
-
* Method responsible for creating filter field in standalone mode
|
|
485
|
+
* Method responsible for creating the filter field in standalone mode and in the personalization settings of the filter bar.
|
|
480
486
|
* @param oParentControl Parent control instance to which the filter field is added
|
|
481
487
|
* @param sPropertyInfoName Name of the property being added as the filter field
|
|
482
488
|
* @param mPropertyBag Instance of the property bag from Flex API
|
|
483
489
|
* @param mPropertyBag.appComponent AppComponent
|
|
484
490
|
* @param mPropertyBag.modifier Modifier from Flex API
|
|
491
|
+
* @param mPropertyBag.view Instance of the view
|
|
485
492
|
* @returns Once resolved, a filter field definition is returned
|
|
486
493
|
*/
|
|
487
494
|
ODataFilterBarDelegate.addItem = async function (
|
|
@@ -500,7 +507,8 @@ ODataFilterBarDelegate.addItem = async function (
|
|
|
500
507
|
return Promise.resolve(null);
|
|
501
508
|
}
|
|
502
509
|
const isXML = modifier && modifier.targets === "xmlTree";
|
|
503
|
-
|
|
510
|
+
const propertyInfoExists = isXML ? await FilterUtils._checkIfPropertyInfoExists(oParentControl, modifier, sPropertyInfoName) : true;
|
|
511
|
+
if (isXML && !propertyInfoExists) {
|
|
504
512
|
await _addPropertyInfo(oParentControl, mPropertyBag, oMetaModel, sPropertyInfoName);
|
|
505
513
|
}
|
|
506
514
|
return ODataFilterBarDelegate._addFlexItem(
|
|
@@ -537,6 +545,7 @@ ODataFilterBarDelegate.removeItem = async function (
|
|
|
537
545
|
return Promise.resolve(null);
|
|
538
546
|
}
|
|
539
547
|
const filterFieldProperty = await mPropertyBag.modifier.getProperty(oFilterFieldProperty, "propertyKey");
|
|
548
|
+
|
|
540
549
|
await _addPropertyInfo(oParentControl, mPropertyBag, oMetaModel, filterFieldProperty as string);
|
|
541
550
|
}
|
|
542
551
|
if (
|
|
@@ -704,8 +713,8 @@ ODataFilterBarDelegate.fetchPropertiesForEntity = function (
|
|
|
704
713
|
aFetchedProperties = aFetchedProperties.filter(function (oProp: FEPropertyInfo) {
|
|
705
714
|
return processedFieldsKeys.includes(oProp.key!);
|
|
706
715
|
});
|
|
707
|
-
|
|
708
|
-
const oFR =
|
|
716
|
+
const dataModel = getInvolvedDataModelObjects(oMetaModel.getContext(sEntitySetPath));
|
|
717
|
+
const oFR = FilterRestrictions.getFilterRestrictionsByDataModel(dataModel as DataModelObjectPath<PageContextPathTarget>),
|
|
709
718
|
mAllowedExpressions = oFR.FilterAllowedExpressions;
|
|
710
719
|
//Object.keys(processedFields).forEach(function (sFilterFieldKey: string) {
|
|
711
720
|
processedFields.forEach(function (oProp, iFilterFieldIndex: number) {
|
|
@@ -861,6 +870,14 @@ ODataFilterBarDelegate._addFlexItem = async function (
|
|
|
861
870
|
oAppComponent: AppComponent | undefined,
|
|
862
871
|
view?: View | undefined
|
|
863
872
|
): Promise<NullableModifierElement> {
|
|
873
|
+
let propertyInfosFromFilterBar: PropertyInfo[] = [];
|
|
874
|
+
const bIsXML = !!oModifier && oModifier.targets === "xmlTree";
|
|
875
|
+
if (bIsXML) {
|
|
876
|
+
const customDataValue = await DelegateUtil.getCustomDataWithModifier<string>(oParentControl, "feFilterInfo", oModifier);
|
|
877
|
+
if (customDataValue) {
|
|
878
|
+
propertyInfosFromFilterBar = JSON.parse(customDataValue) as PropertyInfo[]; // retrieve pre-fetched filter info from custom data, required during templating
|
|
879
|
+
}
|
|
880
|
+
}
|
|
864
881
|
const sFilterBarId = oModifier ? oModifier.getId(oParentControl) : oParentControl.getId(),
|
|
865
882
|
sIdPrefix = oModifier ? "" : "Adaptation",
|
|
866
883
|
aSelectionFields = FilterUtils.getConvertedFilterFields(
|
|
@@ -870,11 +887,12 @@ ODataFilterBarDelegate._addFlexItem = async function (
|
|
|
870
887
|
oMetaModel,
|
|
871
888
|
oAppComponent,
|
|
872
889
|
oModifier,
|
|
873
|
-
oModifier ? undefined : getLineItemQualifierFromTable(oParentControl.getParent()!, oMetaModel)
|
|
890
|
+
oModifier ? undefined : getLineItemQualifierFromTable(oParentControl.getParent()!, oMetaModel),
|
|
891
|
+
propertyInfosFromFilterBar
|
|
874
892
|
),
|
|
875
893
|
oSelectionField = ODataFilterBarDelegate._findSelectionField(aSelectionFields, sFlexPropertyName),
|
|
876
|
-
sPropertyPath = _getPropertyPath(sFlexPropertyName)
|
|
877
|
-
|
|
894
|
+
sPropertyPath = _getPropertyPath(sFlexPropertyName);
|
|
895
|
+
|
|
878
896
|
if (sFlexPropertyName === EDIT_STATE_PROPERTY_NAME) {
|
|
879
897
|
return _templateEditState(_generateIdPrefix(sFilterBarId, `${sIdPrefix}FilterField`), oMetaModel, oModifier);
|
|
880
898
|
} else if (sFlexPropertyName === SEARCH_PROPERTY_NAME) {
|