@openui5/sap.ui.mdc 1.97.1 → 1.100.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/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +15 -22
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +6 -3
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
- package/src/sap/ui/mdc/BaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1128 -1806
- package/src/sap/ui/mdc/ChartDelegate.js +454 -250
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +11 -6
- package/src/sap/ui/mdc/Element.js +10 -6
- package/src/sap/ui/mdc/Field.js +19 -4
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +50 -9
- package/src/sap/ui/mdc/Link.js +25 -6
- package/src/sap/ui/mdc/LinkDelegate.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +30 -6
- package/src/sap/ui/mdc/Table.js +151 -102
- package/src/sap/ui/mdc/TableDelegate.js +68 -13
- package/src/sap/ui/mdc/ValueHelp.js +26 -11
- package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +60 -17
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +10 -10
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +43 -254
- package/src/sap/ui/mdc/chart/Item.js +62 -92
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
- 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 +4 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +388 -67
- package/src/sap/ui/mdc/condition/Operator.js +4 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
- package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
- package/src/sap/ui/mdc/designtime/Util.js +63 -0
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +83 -5
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +81 -5
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +35 -8
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +17 -6
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +88 -29
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +77 -20
- package/src/sap/ui/mdc/field/FieldBase.js +93 -16
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
- package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +5 -2
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
- 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/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
- package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
- package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +285 -208
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +132 -56
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +43 -19
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +27 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
- package/src/sap/ui/mdc/library.js +54 -44
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +2 -2
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +140 -177
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +57 -2
- package/src/sap/ui/mdc/messagebundle_ar.properties +39 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +54 -19
- package/src/sap/ui/mdc/messagebundle_ca.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +52 -17
- package/src/sap/ui/mdc/messagebundle_cy.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +44 -9
- package/src/sap/ui/mdc/messagebundle_de.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +61 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +51 -16
- package/src/sap/ui/mdc/messagebundle_et.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +43 -8
- package/src/sap/ui/mdc/messagebundle_fr.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +53 -18
- package/src/sap/ui/mdc/messagebundle_iw.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_lt.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_ms.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +42 -7
- package/src/sap/ui/mdc/messagebundle_no.properties +45 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_pt.properties +44 -9
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +39 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +40 -5
- package/src/sap/ui/mdc/messagebundle_tr.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_vi.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +37 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +30 -15
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -142
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +14 -17
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +106 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +117 -123
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +3 -5
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +459 -351
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +51 -30
- package/src/sap/ui/mdc/p13n/FlexUtil.js +6 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +7 -7
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +24 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +20 -19
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +19 -12
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1094 -49
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +108 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +7 -7
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +22 -11
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +174 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +12 -19
- package/src/sap/ui/mdc/table/Column.js +12 -12
- package/src/sap/ui/mdc/table/CreationRow.js +11 -11
- package/src/sap/ui/mdc/table/GridTableType.js +80 -33
- package/src/sap/ui/mdc/table/PropertyHelper.js +63 -19
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +94 -23
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +45 -4
- package/src/sap/ui/mdc/table/TableTypeBase.js +2 -2
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +16 -4
- package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +33 -8
- package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
- package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
- package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +243 -87
- package/src/sap/ui/mdc/util/TypeUtil.js +6 -5
- package/src/sap/ui/mdc/valuehelp/Dialog.js +11 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +6 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +5 -4
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -2
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +23 -14
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +46 -17
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -27
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +291 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
- package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
- package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +264 -139
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
- package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
- package/src/sap/ui/mdc/ChartNew.js +0 -1114
- package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
- package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
- package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
- package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
- package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
- package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
- package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
- package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +0 -39
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1179
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -404
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
'sap/ui/mdc/p13n/subcontroller/FilterController',
|
|
8
8
|
'sap/ui/core/library',
|
|
9
|
-
'sap/ui/mdc/p13n/FlexUtil',
|
|
10
9
|
'sap/ui/Device',
|
|
11
10
|
'sap/ui/mdc/Control',
|
|
12
11
|
'sap/base/Log',
|
|
@@ -17,8 +16,6 @@ sap.ui.define([
|
|
|
17
16
|
'sap/ui/mdc/condition/Condition',
|
|
18
17
|
'sap/ui/mdc/util/IdentifierUtil',
|
|
19
18
|
'sap/ui/mdc/condition/ConditionConverter',
|
|
20
|
-
"sap/ui/mdc/p13n/StateUtil",
|
|
21
|
-
"sap/ui/mdc/condition/FilterConverter",
|
|
22
19
|
"sap/ui/mdc/util/FilterUtil",
|
|
23
20
|
"sap/ui/mdc/filterbar/PropertyHelper",
|
|
24
21
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
@@ -29,7 +26,6 @@ sap.ui.define([
|
|
|
29
26
|
function(
|
|
30
27
|
FilterController,
|
|
31
28
|
coreLibrary,
|
|
32
|
-
FlexUtil,
|
|
33
29
|
Device,
|
|
34
30
|
Control,
|
|
35
31
|
Log,
|
|
@@ -40,8 +36,6 @@ sap.ui.define([
|
|
|
40
36
|
Condition,
|
|
41
37
|
IdentifierUtil,
|
|
42
38
|
ConditionConverter,
|
|
43
|
-
StateUtil,
|
|
44
|
-
FilterConverter,
|
|
45
39
|
FilterUtil,
|
|
46
40
|
PropertyHelper,
|
|
47
41
|
ControlVariantApplyAPI,
|
|
@@ -60,7 +54,7 @@ sap.ui.define([
|
|
|
60
54
|
* @class The <code>FilterBarBase</code> control is used as a faceless base class for common functionality of any MDC FilterBar derivation.
|
|
61
55
|
* @extends sap.ui.mdc.Control
|
|
62
56
|
* @author SAP SE
|
|
63
|
-
* @version 1.
|
|
57
|
+
* @version 1.100.0
|
|
64
58
|
* @constructor
|
|
65
59
|
* @private
|
|
66
60
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -149,6 +143,18 @@ sap.ui.define([
|
|
|
149
143
|
defaultValue: {}
|
|
150
144
|
},
|
|
151
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Specifies the filter metadata.<br>
|
|
148
|
+
* <b>Note</b>: This property must not be bound.<br>
|
|
149
|
+
* <b>Note</b>: This property is used exclusively for SAPUI5 flexibility/ Fiori Elements. Do not use it otherwise.
|
|
150
|
+
*
|
|
151
|
+
* @since 1.97
|
|
152
|
+
*/
|
|
153
|
+
propertyInfo: {
|
|
154
|
+
type: "object",
|
|
155
|
+
defaultValue: []
|
|
156
|
+
},
|
|
157
|
+
|
|
152
158
|
/**
|
|
153
159
|
* If set to <code>true</code>, all search requests are ignored. Once it has been set to <code>false</code>,
|
|
154
160
|
* a search is triggered immediately if one or more search requests have been triggered in the meantime
|
|
@@ -363,14 +369,35 @@ sap.ui.define([
|
|
|
363
369
|
};
|
|
364
370
|
|
|
365
371
|
FilterBarBase.prototype.applySettings = function(mSettings, oScope) {
|
|
372
|
+
this._setPropertyHelperClass(PropertyHelper);
|
|
373
|
+
this._setupPropertyInfoStore("propertyInfo");
|
|
374
|
+
this._applySettings(mSettings, oScope);
|
|
375
|
+
//this._initControlDelegate();
|
|
376
|
+
Promise.all([this.awaitPropertyHelper()]).then(function() {
|
|
377
|
+
if (!this._bIsBeingDestroyed) {
|
|
378
|
+
this._applyInitialFilterConditions();
|
|
379
|
+
}
|
|
380
|
+
}.bind(this));
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
FilterBarBase.prototype._applySettings = function(mSettings, oScope) {
|
|
366
384
|
Control.prototype.applySettings.apply(this, arguments);
|
|
367
385
|
|
|
368
386
|
this._createConditionModel();
|
|
369
387
|
|
|
370
388
|
this._oConditionModel.attachPropertyChange(this._handleConditionModelPropertyChange, this);
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// FilterBarBase.prototype._initControlDelegate = function() {
|
|
392
|
+
// Promise.all([this.awaitPropertyHelper()]).then(function() {
|
|
393
|
+
// if (!this._bIsBeingDestroyed) {
|
|
394
|
+
// this._applyInitialFilterConditions();
|
|
395
|
+
// }
|
|
396
|
+
// }.bind(this));
|
|
397
|
+
// };
|
|
371
398
|
|
|
372
|
-
|
|
373
|
-
this._retrieveMetadata().then(function() {
|
|
399
|
+
FilterBarBase.prototype._waitForMetadata = function() {
|
|
400
|
+
return this._retrieveMetadata().then(function() {
|
|
374
401
|
this._applyInitialFilterConditions();
|
|
375
402
|
}.bind(this));
|
|
376
403
|
};
|
|
@@ -431,38 +458,31 @@ sap.ui.define([
|
|
|
431
458
|
* @returns {object} object containing the current status of the FilterBarBase
|
|
432
459
|
*/
|
|
433
460
|
FilterBarBase.prototype.getCurrentState = function() {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
aIgnoreFieldNames.push(sKey);
|
|
444
|
-
}
|
|
461
|
+
var mFilters = {};
|
|
462
|
+
var oState = {};
|
|
463
|
+
|
|
464
|
+
if (this._bPersistValues) {
|
|
465
|
+
var mConditions = merge({}, this.getFilterConditions());
|
|
466
|
+
for (var sKey in mConditions) {
|
|
467
|
+
if (this._getPropertyByName(sKey)) {
|
|
468
|
+
mFilters[sKey] = mConditions[sKey];
|
|
469
|
+
//mMetadata[sKey] = mConditions[sKey].metadata;
|
|
445
470
|
}
|
|
446
|
-
|
|
447
|
-
aIgnoreFieldNames.forEach(function(sKey) {
|
|
448
|
-
delete mConditions[sKey];
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
oState.filter = mConditions;
|
|
452
471
|
}
|
|
472
|
+
oState.filter = mFilters;
|
|
473
|
+
}
|
|
453
474
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
});
|
|
475
|
+
var aFilterItems = this.getFilterItems();
|
|
476
|
+
var aItems = [];
|
|
477
|
+
aFilterItems.forEach(function(oFilterField, iIndex){
|
|
478
|
+
aItems.push({
|
|
479
|
+
name: oFilterField.getFieldPath()
|
|
460
480
|
});
|
|
481
|
+
});
|
|
461
482
|
|
|
462
|
-
|
|
483
|
+
oState.items = aItems;
|
|
463
484
|
|
|
464
|
-
|
|
465
|
-
//}.bind(this));
|
|
485
|
+
return oState;
|
|
466
486
|
};
|
|
467
487
|
|
|
468
488
|
/**
|
|
@@ -605,8 +625,42 @@ sap.ui.define([
|
|
|
605
625
|
return this.getEngine().isModificationSupported(this);
|
|
606
626
|
};
|
|
607
627
|
|
|
628
|
+
FilterBarBase.prototype.getPropertyInfoSet = function() {
|
|
629
|
+
return this.getPropertyHelper() ? this.getPropertyHelper().getProperties() : [];
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
FilterBarBase.prototype._addConditionChange = function(mOrigConditions, sFieldPath) {
|
|
634
|
+
|
|
635
|
+
this.getEngine().createChanges({
|
|
636
|
+
control: this,
|
|
637
|
+
key: "Filter",
|
|
638
|
+
state: mOrigConditions
|
|
639
|
+
});
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
FilterBarBase.prototype._registerOnEngineOnModificationEnd = function() {
|
|
643
|
+
this._oConditionChangeStartedPromise = new Promise(function(resolve) {
|
|
644
|
+
this._fConditionChangeStartedPromiseResolve = resolve;
|
|
645
|
+
}.bind(this));
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
FilterBarBase.prototype._onChangeAppliance = function() {
|
|
649
|
+
if (this._fConditionChangeStartedPromiseResolve) {
|
|
650
|
+
this._fConditionChangeStartedPromiseResolve();
|
|
651
|
+
this._fConditionChangeStartedPromiseResolve = null;
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
|
|
608
655
|
FilterBarBase.prototype._handleConditionModelPropertyChange = function(oEvent) {
|
|
609
656
|
|
|
657
|
+
var fAddConditionChange = function(sFieldPath, aConditions) {
|
|
658
|
+
var mOrigConditions = {};
|
|
659
|
+
mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, merge([], aConditions));
|
|
660
|
+
this._cleanupConditions(mOrigConditions[sFieldPath]);
|
|
661
|
+
this._addConditionChange(mOrigConditions, sFieldPath);
|
|
662
|
+
}.bind(this);
|
|
663
|
+
|
|
610
664
|
if (!this._bIgnoreChanges) {
|
|
611
665
|
|
|
612
666
|
var sPath = oEvent.getParameter("path");
|
|
@@ -615,21 +669,18 @@ sap.ui.define([
|
|
|
615
669
|
var sFieldPath = sPath.substring("/conditions/".length);
|
|
616
670
|
|
|
617
671
|
if (this._bPersistValues && this._isPersistenceSupported()) {
|
|
618
|
-
var mOrigConditions = {};
|
|
619
|
-
mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, merge([], oEvent.getParameter("value")));
|
|
620
|
-
this._cleanupConditions(mOrigConditions[sFieldPath]);
|
|
621
|
-
|
|
622
|
-
var oChangePromise = this.getEngine().createChanges({
|
|
623
|
-
control: this,
|
|
624
|
-
key: "Filter",
|
|
625
|
-
state: mOrigConditions
|
|
626
|
-
});
|
|
627
672
|
|
|
628
|
-
|
|
629
|
-
this._aCollectedChangePromises = [];
|
|
630
|
-
}
|
|
673
|
+
this._registerOnEngineOnModificationEnd();
|
|
631
674
|
|
|
632
|
-
|
|
675
|
+
var aConditions = oEvent.getParameter("value");
|
|
676
|
+
|
|
677
|
+
if (this._getPropertyByName(sFieldPath)) {
|
|
678
|
+
fAddConditionChange(sFieldPath, aConditions);
|
|
679
|
+
} else {
|
|
680
|
+
this._retrieveMetadata().then(function() {
|
|
681
|
+
fAddConditionChange(sFieldPath, aConditions);
|
|
682
|
+
});
|
|
683
|
+
}
|
|
633
684
|
|
|
634
685
|
} else {
|
|
635
686
|
this._reportModelChange(false);
|
|
@@ -730,32 +781,26 @@ sap.ui.define([
|
|
|
730
781
|
};
|
|
731
782
|
|
|
732
783
|
FilterBarBase.prototype._handleAssignedFilterNames = function(bFiltersAggregationChanged, bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch) {
|
|
733
|
-
if (
|
|
734
|
-
return;
|
|
784
|
+
if (this._bIsBeingDestroyed) {
|
|
785
|
+
return;
|
|
735
786
|
}
|
|
736
787
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
if (!bFiltersAggregationChanged) {
|
|
744
|
-
if (this._btnAdapt) {
|
|
745
|
-
var aFilterNames = this.getAssignedFilterNames();
|
|
746
|
-
this.setProperty("_filterCount", this._oRb.getText(aFilterNames.length ? "filterbar.ADAPT_NONZERO" : "filterbar.ADAPT", aFilterNames.length), false);
|
|
747
|
-
}
|
|
788
|
+
if (!bFiltersAggregationChanged) {
|
|
789
|
+
if (this._btnAdapt) {
|
|
790
|
+
var aFilterNames = this.getAssignedFilterNames();
|
|
791
|
+
this.setProperty("_filterCount", this._oRb.getText(aFilterNames.length ? "filterbar.ADAPT_NONZERO" : "filterbar.ADAPT", aFilterNames.length), false);
|
|
748
792
|
}
|
|
793
|
+
}
|
|
749
794
|
|
|
750
|
-
|
|
751
|
-
|
|
795
|
+
var mTexts = this._getAssignedFiltersText();
|
|
796
|
+
var oObj = {
|
|
752
797
|
conditionsBased: (!bFiltersAggregationChanged && !bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch),
|
|
753
798
|
filtersText: mTexts.filtersText,
|
|
754
799
|
filtersTextExpanded: mTexts.filtersTextExpanded
|
|
755
|
-
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
this.fireFiltersChanged(oObj);
|
|
756
803
|
|
|
757
|
-
this.fireFiltersChanged(oObj);
|
|
758
|
-
}.bind(this));
|
|
759
804
|
};
|
|
760
805
|
|
|
761
806
|
FilterBarBase.prototype.onReset = function(oEvent) {
|
|
@@ -801,7 +846,7 @@ sap.ui.define([
|
|
|
801
846
|
|
|
802
847
|
var bFireSearch = !bSuppressSearch;
|
|
803
848
|
|
|
804
|
-
|
|
849
|
+
var fValidateFc = function() {
|
|
805
850
|
if (!this._oValidationPromise) {
|
|
806
851
|
|
|
807
852
|
this._oValidationPromise = new Promise(function(resolve, reject) {
|
|
@@ -817,7 +862,16 @@ sap.ui.define([
|
|
|
817
862
|
}
|
|
818
863
|
|
|
819
864
|
return this._oValidationPromise;
|
|
865
|
+
}.bind(this);
|
|
820
866
|
|
|
867
|
+
return this.initialized().then(function() {
|
|
868
|
+
if (!this.isPropertyHelperFinal()) {
|
|
869
|
+
return this._retrieveMetadata().then(function() {
|
|
870
|
+
return fValidateFc();
|
|
871
|
+
});
|
|
872
|
+
} else {
|
|
873
|
+
return fValidateFc();
|
|
874
|
+
}
|
|
821
875
|
}.bind(this));
|
|
822
876
|
};
|
|
823
877
|
|
|
@@ -828,7 +882,6 @@ sap.ui.define([
|
|
|
828
882
|
}
|
|
829
883
|
};
|
|
830
884
|
|
|
831
|
-
|
|
832
885
|
FilterBarBase.prototype._getRequiredFieldsWithoutValues = function() {
|
|
833
886
|
var aReqFiltersWithoutValue = [];
|
|
834
887
|
this._getRequiredPropertyNames().forEach(function(sName) {
|
|
@@ -893,14 +946,7 @@ sap.ui.define([
|
|
|
893
946
|
var oPromise = oEvent.getParameter("promise");
|
|
894
947
|
if (oPromise) {
|
|
895
948
|
oPromise.then(function() {
|
|
896
|
-
|
|
897
|
-
var aChangePromises = this._aCollectedChangePromises.slice();
|
|
898
|
-
Promise.all(aChangePromises).then(function() {
|
|
899
|
-
this.triggerSearch();
|
|
900
|
-
}.bind(this));
|
|
901
|
-
} else {
|
|
902
|
-
this.triggerSearch();
|
|
903
|
-
}
|
|
949
|
+
this.triggerSearch();
|
|
904
950
|
}.bind(this)).catch(function(oEx) {
|
|
905
951
|
Log.error(oEx);
|
|
906
952
|
});
|
|
@@ -984,18 +1030,6 @@ sap.ui.define([
|
|
|
984
1030
|
}
|
|
985
1031
|
};
|
|
986
1032
|
|
|
987
|
-
FilterBarBase.prototype._waitForChangeAppliance = function(bFireSearch) {
|
|
988
|
-
|
|
989
|
-
var aChangePromises = this._aCollectedChangePromises.slice();
|
|
990
|
-
this._aCollectedChangePromises = null;
|
|
991
|
-
|
|
992
|
-
Promise.all(aChangePromises).then(function(aConditionsArray) {
|
|
993
|
-
this._validate(bFireSearch);
|
|
994
|
-
}.bind(this), function(aConditionsArray) {
|
|
995
|
-
this._validate(bFireSearch);
|
|
996
|
-
}.bind(this));
|
|
997
|
-
};
|
|
998
|
-
|
|
999
1033
|
/**
|
|
1000
1034
|
* Executes the search.
|
|
1001
1035
|
* @private
|
|
@@ -1014,6 +1048,12 @@ sap.ui.define([
|
|
|
1014
1048
|
this._fResolvedSearchPromise = null;
|
|
1015
1049
|
}.bind(this);
|
|
1016
1050
|
|
|
1051
|
+
var fnValidationSucceeds = function() {
|
|
1052
|
+
fnCheckAndFireSearch();
|
|
1053
|
+
this._fResolvedSearchPromise();
|
|
1054
|
+
fnCleanup();
|
|
1055
|
+
}.bind(this);
|
|
1056
|
+
|
|
1017
1057
|
if (this.bIsDestroyed) {
|
|
1018
1058
|
fnCleanup();
|
|
1019
1059
|
return;
|
|
@@ -1027,22 +1067,13 @@ sap.ui.define([
|
|
|
1027
1067
|
return;
|
|
1028
1068
|
}
|
|
1029
1069
|
|
|
1030
|
-
if (this._aCollectedChangePromises && (this._aCollectedChangePromises.length > 0)) {
|
|
1031
|
-
this._waitForChangeAppliance(bFireSearch);
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
1070
|
if (vRetErrorState === ErrorState.NoError) {
|
|
1036
|
-
if (this.
|
|
1037
|
-
this.
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
fnCleanup();
|
|
1041
|
-
}.bind(this));
|
|
1071
|
+
if (this._oConditionChangeStartedPromise) {
|
|
1072
|
+
this._oConditionChangeStartedPromise.then(function() {
|
|
1073
|
+
fnValidationSucceeds();
|
|
1074
|
+
});
|
|
1042
1075
|
} else {
|
|
1043
|
-
|
|
1044
|
-
this._fResolvedSearchPromise();
|
|
1045
|
-
fnCleanup();
|
|
1076
|
+
fnValidationSucceeds();
|
|
1046
1077
|
}
|
|
1047
1078
|
} else {
|
|
1048
1079
|
if (vRetErrorState === ErrorState.RequiredHasNoValue) {
|
|
@@ -1100,7 +1131,15 @@ sap.ui.define([
|
|
|
1100
1131
|
return Promise.all([this._oInitialFiltersAppliedPromise, this._oMetadataAppliedPromise]);
|
|
1101
1132
|
};
|
|
1102
1133
|
|
|
1134
|
+
FilterBarBase.prototype._initialized = function() {
|
|
1135
|
+
return this.waitForInitialization();
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1103
1138
|
FilterBarBase.prototype.initialized = function() {
|
|
1139
|
+
|
|
1140
|
+
if (!this._oMetadataAppliedPromise) {
|
|
1141
|
+
this._retrieveMetadata();
|
|
1142
|
+
}
|
|
1104
1143
|
return this.waitForInitialization();
|
|
1105
1144
|
};
|
|
1106
1145
|
|
|
@@ -1140,75 +1179,155 @@ sap.ui.define([
|
|
|
1140
1179
|
}.bind(this) : undefined;
|
|
1141
1180
|
};
|
|
1142
1181
|
|
|
1182
|
+
FilterBarBase.prototype._isPathKnownAsync = function(sFieldPath, oXCondition) {
|
|
1183
|
+
var sName, sKey, aPromises = [];
|
|
1184
|
+
|
|
1185
|
+
aPromises.push(this._getPropertyByNameAsync(sFieldPath));
|
|
1186
|
+
for (sKey in oXCondition["inParameters"]) {
|
|
1187
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1188
|
+
aPromises.push(this._getPropertyByNameAsync(sName));
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
for (sKey in oXCondition["outParameters"]) {
|
|
1192
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1193
|
+
aPromises.push(this._getPropertyByNameAsync(sName));
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
return Promise.all(aPromises);
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
FilterBarBase.prototype._isPathKnown = function(sFieldPath, oXCondition) {
|
|
1200
|
+
var sKey, sName;
|
|
1201
|
+
|
|
1202
|
+
if (!this._getPropertyByName(sFieldPath)) {
|
|
1203
|
+
return false;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
for (sKey in oXCondition["inParameters"]) {
|
|
1207
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1208
|
+
if (!this._getPropertyByName(sName)) {
|
|
1209
|
+
return false;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
for (sKey in oXCondition["outParameters"]) {
|
|
1213
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1214
|
+
if (!this._getPropertyByName(sName)) {
|
|
1215
|
+
return false;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
return true;
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
FilterBarBase.prototype._removeCondition = function(sFieldPath, oXCondition, oCM) {
|
|
1223
|
+
var oProperty = this._getPropertyByName(sFieldPath);
|
|
1224
|
+
if (oProperty) {
|
|
1225
|
+
var oCondition = this._toInternal(oProperty, oXCondition);
|
|
1226
|
+
if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) >= 0) {
|
|
1227
|
+
oCM.removeCondition(sFieldPath, oCondition);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1143
1232
|
FilterBarBase.prototype.removeCondition = function(sFieldPath, oXCondition) {
|
|
1144
|
-
return this.
|
|
1233
|
+
return this._initialized().then(function() {
|
|
1145
1234
|
var oCM = this._getConditionModel();
|
|
1146
1235
|
if (oCM) {
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) >= 0) {
|
|
1151
|
-
oCM.removeCondition(sFieldPath, oCondition);
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1236
|
+
this._isPathKnownAsync(sFieldPath, oXCondition).then(function() {
|
|
1237
|
+
this._removeCondition(sFieldPath, oXCondition, oCM);
|
|
1238
|
+
}.bind(this));
|
|
1154
1239
|
}
|
|
1155
1240
|
}.bind(this));
|
|
1156
1241
|
};
|
|
1157
1242
|
|
|
1243
|
+
FilterBarBase.prototype._addCondition = function(sFieldPath, oXCondition, oCM) {
|
|
1244
|
+
var oProperty = this._getPropertyByName(sFieldPath);
|
|
1245
|
+
if (oProperty) {
|
|
1246
|
+
var oCondition = this._toInternal(oProperty, oXCondition);
|
|
1247
|
+
if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) < 0) {
|
|
1248
|
+
var mCondition = {};
|
|
1249
|
+
mCondition[sFieldPath] = [oCondition];
|
|
1250
|
+
FilterController.checkConditionOperatorSanity(mCondition); //check if the single condition's operator is valid
|
|
1251
|
+
var aConditions = mCondition[sFieldPath];
|
|
1252
|
+
if (aConditions && aConditions.length > 0){
|
|
1253
|
+
this._cleanUpFilterFieldInErrorStateByName(sFieldPath);
|
|
1254
|
+
oCM.addCondition(sFieldPath, oCondition);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1158
1260
|
FilterBarBase.prototype.addCondition = function(sFieldPath, oXCondition) {
|
|
1159
|
-
return this.
|
|
1261
|
+
return this._initialized().then(function() {
|
|
1160
1262
|
var oCM = this._getConditionModel();
|
|
1161
1263
|
if (oCM) {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) < 0) {
|
|
1166
|
-
var mCondition = {};
|
|
1167
|
-
mCondition[sFieldPath] = [oCondition];
|
|
1168
|
-
FilterController.checkConditionOperatorSanity(mCondition); //check if the single condition's operator is valid
|
|
1169
|
-
var aConditions = mCondition[sFieldPath];
|
|
1170
|
-
if (aConditions && aConditions.length > 0){
|
|
1171
|
-
this._cleanUpFilterFieldInErrorStateByName(sFieldPath);
|
|
1172
|
-
oCM.addCondition(sFieldPath, oCondition);
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1264
|
+
this._isPathKnownAsync(sFieldPath, oXCondition).then(function() {
|
|
1265
|
+
this._addCondition(sFieldPath, oXCondition, oCM);
|
|
1266
|
+
}.bind(this));
|
|
1176
1267
|
}
|
|
1177
1268
|
}.bind(this));
|
|
1178
1269
|
|
|
1179
1270
|
};
|
|
1180
1271
|
|
|
1181
|
-
FilterBarBase.prototype._setXConditions = function(
|
|
1182
|
-
var oProperty, aConditions, oConditionModel = this._getConditionModel();
|
|
1272
|
+
FilterBarBase.prototype._setXConditions = function(mConditionsData, bRemoveBeforeApplying) {
|
|
1273
|
+
var sFieldPath, oProperty, aConditions, oConditionModel = this._getConditionModel();
|
|
1183
1274
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
if (aConditionsData) {
|
|
1189
|
-
for ( var sFieldPath in aConditionsData) {
|
|
1190
|
-
aConditions = aConditionsData[sFieldPath];
|
|
1275
|
+
var fPromiseResolve = null;
|
|
1276
|
+
var oPromise = new Promise(function(resolve, reject) {
|
|
1277
|
+
fPromiseResolve = resolve;
|
|
1278
|
+
});
|
|
1191
1279
|
|
|
1280
|
+
var fApplyConditions = function(mConditionsData) {
|
|
1281
|
+
for ( sFieldPath in mConditionsData) {
|
|
1282
|
+
aConditions = mConditionsData[sFieldPath];
|
|
1192
1283
|
oProperty = this._getPropertyByName(sFieldPath);
|
|
1193
1284
|
if (oProperty) {
|
|
1194
1285
|
|
|
1195
1286
|
if (aConditions.length === 0) {
|
|
1196
1287
|
oConditionModel.removeAllConditions(sFieldPath);
|
|
1197
1288
|
} else {
|
|
1289
|
+
if (oProperty.maxConditions !== -1) {
|
|
1290
|
+
oConditionModel.removeAllConditions(sFieldPath);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1198
1293
|
/* eslint-disable no-loop-func */
|
|
1199
1294
|
aConditions.forEach(function(oCondition) {
|
|
1200
|
-
|
|
1201
|
-
oConditionModel.removeAllConditions(sFieldPath);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
var oNewCondition = this._toInternal(oProperty, oCondition);
|
|
1205
|
-
oConditionModel.addCondition(sFieldPath, oNewCondition);
|
|
1295
|
+
this._addCondition(sFieldPath, oCondition, oConditionModel);
|
|
1206
1296
|
}.bind(this));
|
|
1207
1297
|
/* eslint-enabled no-loop-func */
|
|
1208
1298
|
}
|
|
1209
1299
|
}
|
|
1210
1300
|
}
|
|
1301
|
+
|
|
1302
|
+
fPromiseResolve();
|
|
1303
|
+
}.bind(this);
|
|
1304
|
+
|
|
1305
|
+
if (bRemoveBeforeApplying) {
|
|
1306
|
+
oConditionModel.removeAllConditions();
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
if (mConditionsData) {
|
|
1310
|
+
|
|
1311
|
+
var bAllPropertiesKnown = true;
|
|
1312
|
+
for ( sFieldPath in mConditionsData) {
|
|
1313
|
+
aConditions = mConditionsData[sFieldPath];
|
|
1314
|
+
|
|
1315
|
+
if (!this._isPathKnown(sFieldPath, aConditions)) {
|
|
1316
|
+
bAllPropertiesKnown = false;
|
|
1317
|
+
break;
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
if (!bAllPropertiesKnown) {
|
|
1322
|
+
this._retrieveMetadata().then(function() {
|
|
1323
|
+
fApplyConditions(mConditionsData);
|
|
1324
|
+
});
|
|
1325
|
+
} else {
|
|
1326
|
+
fApplyConditions(mConditionsData);
|
|
1327
|
+
}
|
|
1211
1328
|
}
|
|
1329
|
+
|
|
1330
|
+
return oPromise;
|
|
1212
1331
|
};
|
|
1213
1332
|
|
|
1214
1333
|
FilterBarBase.prototype._getXConditions = function () {
|
|
@@ -1405,27 +1524,28 @@ sap.ui.define([
|
|
|
1405
1524
|
}
|
|
1406
1525
|
|
|
1407
1526
|
this._fResolveMetadataApplied = undefined;
|
|
1408
|
-
this._oMetadataAppliedPromise = new Promise(function(resolve) {
|
|
1527
|
+
this._oMetadataAppliedPromise = new Promise(function(resolve, reject) {
|
|
1409
1528
|
this._fResolveMetadataApplied = resolve;
|
|
1529
|
+
this._fRejectMetadataApplied = reject;
|
|
1410
1530
|
}.bind(this));
|
|
1411
1531
|
|
|
1412
1532
|
|
|
1413
1533
|
this.initControlDelegate().then(function() {
|
|
1414
1534
|
if (!this._bIsBeingDestroyed) {
|
|
1415
1535
|
|
|
1416
|
-
var fnResolveMetadata = function() {
|
|
1417
|
-
this._fResolveMetadataApplied();
|
|
1536
|
+
var fnResolveMetadata = function(bFlag) {
|
|
1537
|
+
bFlag ? this._fResolveMetadataApplied() : this._fRejectMetadataApplied();
|
|
1418
1538
|
this._fResolveMetadataApplied = null;
|
|
1539
|
+
this._fRejectMetadataApplied = null;
|
|
1419
1540
|
}.bind(this);
|
|
1420
1541
|
|
|
1421
|
-
if (this.bDelegateInitialized
|
|
1422
|
-
this.
|
|
1423
|
-
|
|
1424
|
-
fnResolveMetadata();
|
|
1542
|
+
if (this.bDelegateInitialized) {
|
|
1543
|
+
this.finalizePropertyHelper().then(function() {
|
|
1544
|
+
fnResolveMetadata(true);
|
|
1425
1545
|
});
|
|
1426
1546
|
} else {
|
|
1427
|
-
Log.error("
|
|
1428
|
-
fnResolveMetadata();
|
|
1547
|
+
Log.error("Delegate not initialized.");
|
|
1548
|
+
fnResolveMetadata(false);
|
|
1429
1549
|
}
|
|
1430
1550
|
}
|
|
1431
1551
|
}.bind(this));
|
|
@@ -1452,15 +1572,6 @@ sap.ui.define([
|
|
|
1452
1572
|
};
|
|
1453
1573
|
|
|
1454
1574
|
|
|
1455
|
-
FilterBarBase.prototype.getPropertyInfoSet = function() {
|
|
1456
|
-
try {
|
|
1457
|
-
var oPropertyHelper = this.getPropertyHelper();
|
|
1458
|
-
return oPropertyHelper ? oPropertyHelper.getProperties() : [];
|
|
1459
|
-
} catch (ex) {
|
|
1460
|
-
return [];
|
|
1461
|
-
}
|
|
1462
|
-
};
|
|
1463
|
-
|
|
1464
1575
|
FilterBarBase.prototype._getNonHiddenPropertyInfoSet = function() {
|
|
1465
1576
|
var aVisibleProperties = [];
|
|
1466
1577
|
this.getPropertyInfoSet().every(function(oProperty) {
|
|
@@ -1491,9 +1602,6 @@ sap.ui.define([
|
|
|
1491
1602
|
return oProperty;
|
|
1492
1603
|
};
|
|
1493
1604
|
|
|
1494
|
-
FilterBarBase.prototype._getPropertyByName = function(sName) {
|
|
1495
|
-
return FilterUtil.getPropertyByKey(this.getPropertyInfoSet(), sName);
|
|
1496
|
-
};
|
|
1497
1605
|
|
|
1498
1606
|
FilterBarBase.prototype._cleanUpFilterFieldInErrorStateByName = function(sFieldName) {
|
|
1499
1607
|
var oFilterField = null;
|
|
@@ -1547,40 +1655,6 @@ sap.ui.define([
|
|
|
1547
1655
|
}.bind(this));
|
|
1548
1656
|
};
|
|
1549
1657
|
|
|
1550
|
-
FilterBarBase.prototype._getWaitForChangesPromise = function() {
|
|
1551
|
-
return this.getEngine().waitForChanges(this);
|
|
1552
|
-
};
|
|
1553
|
-
|
|
1554
|
-
FilterBarBase.prototype._suspendBinding = function(oFilterField) {
|
|
1555
|
-
|
|
1556
|
-
if (oFilterField) {
|
|
1557
|
-
var oBinding = oFilterField.getBinding("conditions");
|
|
1558
|
-
if (oBinding) {
|
|
1559
|
-
if (!this._aBindings) {
|
|
1560
|
-
this._aBindings = [];
|
|
1561
|
-
}
|
|
1562
|
-
oBinding.suspend();
|
|
1563
|
-
this._aBindings.push(oFilterField);
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
};
|
|
1567
|
-
|
|
1568
|
-
FilterBarBase.prototype._resumeBindings = function() {
|
|
1569
|
-
if (this._aBindings) {
|
|
1570
|
-
this._aBindings.forEach(function(oFilterField) {
|
|
1571
|
-
if (!oFilterField.bIsDestroyed) {
|
|
1572
|
-
var oBinding = oFilterField.getBinding("conditions");
|
|
1573
|
-
if (oBinding) {
|
|
1574
|
-
oBinding.resume();
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
});
|
|
1578
|
-
|
|
1579
|
-
this._aBindings = null;
|
|
1580
|
-
}
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
1658
|
FilterBarBase.prototype._isChangeApplying = function() {
|
|
1585
1659
|
return !!this._oFlexPromise;
|
|
1586
1660
|
};
|
|
@@ -1589,25 +1663,26 @@ sap.ui.define([
|
|
|
1589
1663
|
|
|
1590
1664
|
this._bIgnoreChanges = true;
|
|
1591
1665
|
|
|
1592
|
-
this._applyFilterConditionsChanges()
|
|
1593
|
-
|
|
1594
|
-
this._changesApplied();
|
|
1666
|
+
this._applyFilterConditionsChanges().then(function() {
|
|
1595
1667
|
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1668
|
+
this._changesApplied();
|
|
1669
|
+
this._bInitialFiltersApplied = true;
|
|
1670
|
+
this._fResolveInitialFiltersApplied();
|
|
1671
|
+
this._fResolveInitialFiltersApplied = null;
|
|
1672
|
+
}.bind(this));
|
|
1599
1673
|
};
|
|
1600
1674
|
|
|
1601
1675
|
FilterBarBase.prototype._applyFilterConditionsChanges = function() {
|
|
1602
1676
|
|
|
1603
|
-
var
|
|
1677
|
+
var mSettings, mConditionsData;
|
|
1604
1678
|
|
|
1605
|
-
|
|
1679
|
+
mSettings = this.getProperty("filterConditions");
|
|
1606
1680
|
if (Object.keys(mSettings).length > 0) {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
this._setXConditions(aConditionsData, true, true);
|
|
1681
|
+
mConditionsData = merge({}, mSettings);
|
|
1682
|
+
return this._setXConditions(mConditionsData, true);
|
|
1610
1683
|
}
|
|
1684
|
+
|
|
1685
|
+
return Promise.resolve();
|
|
1611
1686
|
};
|
|
1612
1687
|
|
|
1613
1688
|
FilterBarBase.prototype.setVariantBackreference = function(oVariant) {
|
|
@@ -1770,9 +1845,11 @@ sap.ui.define([
|
|
|
1770
1845
|
this._aBindings = null;
|
|
1771
1846
|
|
|
1772
1847
|
this._aFIChanges = null;
|
|
1773
|
-
|
|
1848
|
+
|
|
1849
|
+
this._oConditionChangeStartedPromise = null;
|
|
1850
|
+
this._fConditionChangeStartedPromiseResolve = undefined;
|
|
1774
1851
|
};
|
|
1775
1852
|
|
|
1776
1853
|
return FilterBarBase;
|
|
1777
1854
|
|
|
1778
|
-
});
|
|
1855
|
+
});
|