@openui5/sap.ui.mdc 1.96.2 → 1.98.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 +26 -31
- package/THIRDPARTY.txt +15 -21
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +2 -2
- package/src/sap/ui/mdc/ActionToolbar.js +3 -8
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
- package/src/sap/ui/mdc/BaseDelegate.js +2 -2
- package/src/sap/ui/mdc/Chart.js +1017 -1797
- package/src/sap/ui/mdc/ChartDelegate.js +430 -271
- package/src/sap/ui/mdc/ChartRenderer.js +74 -78
- package/src/sap/ui/mdc/Control.js +2 -2
- package/src/sap/ui/mdc/Delegate.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +4 -3
- package/src/sap/ui/mdc/FilterBar.js +4 -3
- package/src/sap/ui/mdc/FilterBarDelegate.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +26 -9
- package/src/sap/ui/mdc/Link.js +5 -4
- package/src/sap/ui/mdc/LinkDelegate.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +3 -2
- package/src/sap/ui/mdc/Table.js +174 -142
- package/src/sap/ui/mdc/TableDelegate.js +31 -16
- package/src/sap/ui/mdc/ValueHelp.js +52 -16
- package/src/sap/ui/mdc/ValueHelpDelegate.js +21 -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} +9 -9
- package/src/sap/ui/mdc/chart/ChartSettings.js +1 -1
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +11 -11
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +49 -53
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +4 -4
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +39 -250
- package/src/sap/ui/mdc/chart/Item.js +63 -93
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +4 -4
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +18 -22
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionConverter.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionModel.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionModelPropertyBinding.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +2 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +7 -3
- package/src/sap/ui/mdc/condition/Operator.js +10 -10
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +437 -0
- package/src/sap/ui/mdc/condition/RangeOperator.js +2 -2
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +78 -6
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +97 -0
- package/src/sap/ui/mdc/designtime/field/FieldBase.designtime.js +104 -0
- package/src/sap/ui/mdc/designtime/field/FilterField.designtime.js +22 -0
- package/src/sap/ui/mdc/designtime/field/MultiValueField.designtime.js +23 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +4 -1
- package/src/sap/ui/mdc/designtime/library.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/link/Panel.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/p13n/PersistenceProvider.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +1 -1
- package/src/sap/ui/mdc/enum/ActionToolbarActionAlignment.js +1 -1
- package/src/sap/ui/mdc/enum/BaseType.js +1 -1
- package/src/sap/ui/mdc/enum/ConditionValidated.js +1 -1
- package/src/sap/ui/mdc/enum/ContentMode.js +1 -1
- package/src/sap/ui/mdc/enum/EditMode.js +1 -1
- package/src/sap/ui/mdc/enum/FieldDisplay.js +1 -1
- package/src/sap/ui/mdc/enum/OutParameterMode.js +1 -1
- package/src/sap/ui/mdc/enum/PersistenceMode.js +1 -1
- package/src/sap/ui/mdc/enum/SelectType.js +1 -1
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +2 -2
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +2 -2
- package/src/sap/ui/mdc/field/ConditionType.js +8 -8
- package/src/sap/ui/mdc/field/ConditionsType.js +8 -8
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +2 -2
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +2 -2
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +59 -22
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +311 -0
- package/src/sap/ui/mdc/field/FieldBase.js +84 -53
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +1 -4
- package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldHelpBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInput.js +2 -2
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +2 -2
- package/src/sap/ui/mdc/field/FieldInputRenderer.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +2 -2
- package/src/sap/ui/mdc/field/FieldMultiInputRenderer.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +8 -8
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +21 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +2 -2
- package/src/sap/ui/mdc/field/InParameter.js +2 -2
- package/src/sap/ui/mdc/field/ListFieldHelp.js +11 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +2 -2
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +2 -2
- package/src/sap/ui/mdc/field/OutParameter.js +2 -2
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +3 -2
- package/src/sap/ui/mdc/field/content/BooleanContent.js +2 -2
- package/src/sap/ui/mdc/field/content/ContentFactory.js +24 -22
- package/src/sap/ui/mdc/field/content/DateContent.js +129 -3
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +10 -2
- package/src/sap/ui/mdc/field/content/DefaultContent.js +2 -2
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/field/content/SearchContent.js +1 -1
- package/src/sap/ui/mdc/field/content/TimeContent.js +9 -2
- package/src/sap/ui/mdc/field/content/UnitContent.js +24 -5
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +326 -141
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +9 -3
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +4 -2
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +8 -2
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +7 -7
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +3 -3
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +2 -2
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +5 -4
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +10 -4
- package/src/sap/ui/mdc/flexibility/PanelItem.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +3 -3
- package/src/sap/ui/mdc/flexibility/Table.flexibility.js +1 -1
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +2 -2
- package/src/sap/ui/mdc/library.js +50 -39
- package/src/sap/ui/mdc/link/ContactDetails.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +2 -2
- package/src/sap/ui/mdc/link/Factory.js +3 -3
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +2 -2
- package/src/sap/ui/mdc/link/LinkItem.js +2 -2
- package/src/sap/ui/mdc/link/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +141 -179
- package/src/sap/ui/mdc/link/PanelItem.js +2 -2
- package/src/sap/ui/mdc/link/PanelListItem.js +2 -2
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +2 -2
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +2 -2
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +2 -2
- package/src/sap/ui/mdc/messagebundle.properties +19 -4
- package/src/sap/ui/mdc/messagebundle_ar.properties +13 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_ca.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +26 -17
- package/src/sap/ui/mdc/messagebundle_cy.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +18 -9
- package/src/sap/ui/mdc/messagebundle_de.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +12 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +17 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -19
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +17 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +12 -3
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +24 -15
- package/src/sap/ui/mdc/messagebundle_et.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +17 -8
- package/src/sap/ui/mdc/messagebundle_fr.properties +15 -6
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +12 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +26 -17
- package/src/sap/ui/mdc/messagebundle_iw.properties +12 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +15 -6
- package/src/sap/ui/mdc/messagebundle_lt.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_ms.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +16 -7
- package/src/sap/ui/mdc/messagebundle_no.properties +19 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +12 -3
- package/src/sap/ui/mdc/messagebundle_pt.properties +18 -9
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +13 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_tr.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +12 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +11 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +3 -4
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +3 -3
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +17 -12
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +3 -4
- package/src/sap/ui/mdc/odata/TypeUtil.js +2 -2
- package/src/sap/ui/mdc/odata/json/FilterBarDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +30 -484
- package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +6 -6
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +158 -114
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +2 -2
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +137 -49
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +56 -19
- package/src/sap/ui/mdc/p13n/FlexUtil.js +12 -119
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +3 -3
- package/src/sap/ui/mdc/p13n/PersistenceProvider.js +22 -11
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +41 -7
- package/src/sap/ui/mdc/p13n/UIManager.js +16 -13
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +5 -2
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +10 -7
- package/src/sap/ui/mdc/p13n/{DefaultProviderRegistry.js → modules/DefaultProviderRegistry.js} +3 -3
- package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +86 -0
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +20 -4
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1093 -49
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
- package/src/sap/ui/mdc/p13n/panels/ListView.js +7 -3
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +7 -6
- package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +157 -12
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +16 -27
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +7 -6
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +7 -6
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +11 -18
- package/src/sap/ui/mdc/table/Column.js +36 -11
- package/src/sap/ui/mdc/table/CreationRow.js +15 -14
- package/src/sap/ui/mdc/table/GridTableType.js +14 -14
- package/src/sap/ui/mdc/table/PropertyHelper.js +65 -28
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +27 -30
- package/src/sap/ui/mdc/table/RowSettings.js +8 -6
- package/src/sap/ui/mdc/table/TableSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +7 -7
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +16 -72
- package/src/sap/ui/mdc/themes/base/Chart.less +3 -0
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +12 -1
- package/src/sap/ui/mdc/themes/base/library.source.less +2 -1
- package/src/sap/ui/mdc/ui/Container.js +3 -3
- package/src/sap/ui/mdc/ui/ContainerItem.js +3 -3
- package/src/sap/ui/mdc/util/Common.js +2 -2
- package/src/sap/ui/mdc/util/DateUtil.js +2 -2
- package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
- package/src/sap/ui/mdc/util/FormatUtil.js +2 -2
- package/src/sap/ui/mdc/util/IdentifierUtil.js +2 -2
- package/src/sap/ui/mdc/util/PromiseCache.js +2 -2
- package/src/sap/ui/mdc/util/PropertyHelper.js +149 -326
- package/src/sap/ui/mdc/util/TypeUtil.js +6 -5
- package/src/sap/ui/mdc/util/loadModules.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +13 -9
- package/src/sap/ui/mdc/valuehelp/Popover.js +15 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +34 -2
- package/src/sap/ui/mdc/valuehelp/base/Content.js +37 -6
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +3 -2
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +44 -16
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +3 -2
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +3 -2
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +29 -33
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +12 -6
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +44 -9
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +58 -27
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -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 +289 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +5 -5
- 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 +365 -236
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
- 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/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/p13n/panels/ChartItemPanelNew.js +0 -1171
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +0 -111
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +0 -322
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +0 -133
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +0 -203
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ! OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
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.98.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. 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,28 @@ sap.ui.define([
|
|
|
363
369
|
};
|
|
364
370
|
|
|
365
371
|
FilterBarBase.prototype.applySettings = function(mSettings, oScope) {
|
|
372
|
+
this._applySettings(mSettings, oScope);
|
|
373
|
+
this._initControlDelegate();
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
FilterBarBase.prototype._applySettings = function(mSettings, oScope) {
|
|
366
377
|
Control.prototype.applySettings.apply(this, arguments);
|
|
367
378
|
|
|
368
379
|
this._createConditionModel();
|
|
369
380
|
|
|
370
381
|
this._oConditionModel.attachPropertyChange(this._handleConditionModelPropertyChange, this);
|
|
382
|
+
};
|
|
371
383
|
|
|
372
|
-
|
|
373
|
-
this.
|
|
384
|
+
FilterBarBase.prototype._initControlDelegate = function() {
|
|
385
|
+
this.initControlDelegate().then(function() {
|
|
386
|
+
if (!this._bIsBeingDestroyed) {
|
|
387
|
+
this._applyInitialFilterConditions();
|
|
388
|
+
}
|
|
389
|
+
}.bind(this));
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
FilterBarBase.prototype._waitForMetadata = function() {
|
|
393
|
+
return this._retrieveMetadata().then(function() {
|
|
374
394
|
this._applyInitialFilterConditions();
|
|
375
395
|
}.bind(this));
|
|
376
396
|
};
|
|
@@ -431,38 +451,31 @@ sap.ui.define([
|
|
|
431
451
|
* @returns {object} object containing the current status of the FilterBarBase
|
|
432
452
|
*/
|
|
433
453
|
FilterBarBase.prototype.getCurrentState = function() {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
aIgnoreFieldNames.push(sKey);
|
|
444
|
-
}
|
|
454
|
+
var mFilters = {};
|
|
455
|
+
var oState = {};
|
|
456
|
+
|
|
457
|
+
if (this._bPersistValues) {
|
|
458
|
+
var mConditions = merge({}, this.getFilterConditions());
|
|
459
|
+
for (var sKey in mConditions) {
|
|
460
|
+
if (this._getPropertyByName(sKey)) {
|
|
461
|
+
mFilters[sKey] = mConditions[sKey];
|
|
462
|
+
//mMetadata[sKey] = mConditions[sKey].metadata;
|
|
445
463
|
}
|
|
446
|
-
|
|
447
|
-
aIgnoreFieldNames.forEach(function(sKey) {
|
|
448
|
-
delete mConditions[sKey];
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
oState.filter = mConditions;
|
|
452
464
|
}
|
|
465
|
+
oState.filter = mFilters;
|
|
466
|
+
}
|
|
453
467
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
});
|
|
468
|
+
var aFilterItems = this.getFilterItems();
|
|
469
|
+
var aItems = [];
|
|
470
|
+
aFilterItems.forEach(function(oFilterField, iIndex){
|
|
471
|
+
aItems.push({
|
|
472
|
+
name: oFilterField.getFieldPath()
|
|
460
473
|
});
|
|
474
|
+
});
|
|
461
475
|
|
|
462
|
-
|
|
476
|
+
oState.items = aItems;
|
|
463
477
|
|
|
464
|
-
|
|
465
|
-
//}.bind(this));
|
|
478
|
+
return oState;
|
|
466
479
|
};
|
|
467
480
|
|
|
468
481
|
/**
|
|
@@ -605,8 +618,121 @@ sap.ui.define([
|
|
|
605
618
|
return this.getEngine().isModificationSupported(this);
|
|
606
619
|
};
|
|
607
620
|
|
|
621
|
+
FilterBarBase.prototype._hasPropertyInfo = function(sFieldName) {
|
|
622
|
+
var aPropertyInfo = this.getPropertyInfo();
|
|
623
|
+
var nIdx = aPropertyInfo.findIndex(function(oEntry) {
|
|
624
|
+
return oEntry.name === sFieldName;
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
return (nIdx >= 0);
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
FilterBarBase.prototype._getPropertyByName = function(sName) {
|
|
631
|
+
return FilterUtil.getPropertyByKey(this.getPropertyInfoSet(), sName);
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
FilterBarBase.prototype.getPropertyInfoSet = function() {
|
|
635
|
+
var oTypeUtil, aProperties = [];
|
|
636
|
+
|
|
637
|
+
if (this._hasPropertyHelper()) {
|
|
638
|
+
return this.getPropertyHelper().getProperties();
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
var aPropertyInfo = this.getPropertyInfo();
|
|
642
|
+
if (aPropertyInfo && (aPropertyInfo.length > 0)) {
|
|
643
|
+
oTypeUtil = this.getTypeUtil();
|
|
644
|
+
|
|
645
|
+
for (var i = 0; i < aPropertyInfo.length; i++) {
|
|
646
|
+
var oPropertyInfo = aPropertyInfo[i];
|
|
647
|
+
if (oPropertyInfo) {
|
|
648
|
+
var oTypeConfig = oTypeUtil.getTypeConfig(oPropertyInfo.dataType, oPropertyInfo.formatOptions, oPropertyInfo.constraints);
|
|
649
|
+
aProperties.push({
|
|
650
|
+
name: oPropertyInfo.name,
|
|
651
|
+
typeConfig: oTypeConfig,
|
|
652
|
+
maxConditions: oPropertyInfo.maxConditions,
|
|
653
|
+
constraints: oPropertyInfo.constraints,
|
|
654
|
+
formatOptions: oPropertyInfo.formatOptions,
|
|
655
|
+
required: oPropertyInfo.required,
|
|
656
|
+
caseSensitive: oPropertyInfo.caseSensitive,
|
|
657
|
+
display: oPropertyInfo.display
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
return aProperties;
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
FilterBarBase.prototype._hasPropertyHelper = function() {
|
|
667
|
+
try {
|
|
668
|
+
this.getPropertyHelper();
|
|
669
|
+
return true;
|
|
670
|
+
} catch (ex) {
|
|
671
|
+
return false;
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
FilterBarBase.prototype._createPropertyInfoChange = function(oProperty) {
|
|
677
|
+
return {
|
|
678
|
+
changeSpecificData: {
|
|
679
|
+
changeType: "addPropertyInfo",
|
|
680
|
+
content: {
|
|
681
|
+
name: oProperty.name,
|
|
682
|
+
dataType: oProperty.typeConfig.className,
|
|
683
|
+
maxConditions: oProperty.maxConditions,
|
|
684
|
+
constraints: oProperty.constraints,
|
|
685
|
+
formatOption: oProperty.formatOptions,
|
|
686
|
+
required: oProperty.required,
|
|
687
|
+
caseSensitive: oProperty.caseSensitive,
|
|
688
|
+
display: oProperty.display
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
selectorElement: this
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
FilterBarBase.prototype.createPropertyInfoChanges = function(sFieldPath) {
|
|
696
|
+
var oProperty, oChange, aChanges = [];
|
|
697
|
+
|
|
698
|
+
if (!this._hasPropertyInfo(sFieldPath)) {
|
|
699
|
+
oProperty = this._getPropertyByName(sFieldPath);
|
|
700
|
+
if (oProperty) {
|
|
701
|
+
oChange = this._createPropertyInfoChange(oProperty);
|
|
702
|
+
aChanges.push(oChange);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
return aChanges;
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
FilterBarBase.prototype._addConditionChange = function(mOrigConditions, sFieldPath) {
|
|
711
|
+
|
|
712
|
+
var oChangePromise = this.getEngine().createChanges({
|
|
713
|
+
control: this,
|
|
714
|
+
key: "Filter",
|
|
715
|
+
//prependChanges: fCreateTypeInfoCallback,
|
|
716
|
+
state: mOrigConditions
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
if (!this._aCollectedChangePromises) {
|
|
720
|
+
this._aCollectedChangePromises = [];
|
|
721
|
+
}
|
|
722
|
+
this._aCollectedChangePromises.push(oChangePromise);
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
|
|
608
726
|
FilterBarBase.prototype._handleConditionModelPropertyChange = function(oEvent) {
|
|
609
727
|
|
|
728
|
+
var fAddConditionChange = function(sFieldPath, aConditions) {
|
|
729
|
+
var mOrigConditions = {};
|
|
730
|
+
mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, merge([], aConditions));
|
|
731
|
+
this._cleanupConditions(mOrigConditions[sFieldPath]);
|
|
732
|
+
|
|
733
|
+
this._addConditionChange(mOrigConditions, sFieldPath);
|
|
734
|
+
}.bind(this);
|
|
735
|
+
|
|
610
736
|
if (!this._bIgnoreChanges) {
|
|
611
737
|
|
|
612
738
|
var sPath = oEvent.getParameter("path");
|
|
@@ -615,21 +741,16 @@ sap.ui.define([
|
|
|
615
741
|
var sFieldPath = sPath.substring("/conditions/".length);
|
|
616
742
|
|
|
617
743
|
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
744
|
|
|
628
|
-
|
|
629
|
-
this._aCollectedChangePromises = [];
|
|
630
|
-
}
|
|
745
|
+
var aConditions = oEvent.getParameter("value");
|
|
631
746
|
|
|
632
|
-
this.
|
|
747
|
+
if (this._hasPropertyHelper() || this._getPropertyByName(sFieldPath)) {
|
|
748
|
+
fAddConditionChange(sFieldPath, aConditions);
|
|
749
|
+
} else {
|
|
750
|
+
this._retrieveMetadata().then(function() {
|
|
751
|
+
fAddConditionChange(sFieldPath, aConditions);
|
|
752
|
+
});
|
|
753
|
+
}
|
|
633
754
|
|
|
634
755
|
} else {
|
|
635
756
|
this._reportModelChange(false);
|
|
@@ -730,32 +851,26 @@ sap.ui.define([
|
|
|
730
851
|
};
|
|
731
852
|
|
|
732
853
|
FilterBarBase.prototype._handleAssignedFilterNames = function(bFiltersAggregationChanged, bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch) {
|
|
733
|
-
if (
|
|
734
|
-
return;
|
|
854
|
+
if (this._bIsBeingDestroyed) {
|
|
855
|
+
return;
|
|
735
856
|
}
|
|
736
857
|
|
|
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
|
-
}
|
|
858
|
+
if (!bFiltersAggregationChanged) {
|
|
859
|
+
if (this._btnAdapt) {
|
|
860
|
+
var aFilterNames = this.getAssignedFilterNames();
|
|
861
|
+
this.setProperty("_filterCount", this._oRb.getText(aFilterNames.length ? "filterbar.ADAPT_NONZERO" : "filterbar.ADAPT", aFilterNames.length), false);
|
|
748
862
|
}
|
|
863
|
+
}
|
|
749
864
|
|
|
750
|
-
|
|
751
|
-
|
|
865
|
+
var mTexts = this._getAssignedFiltersText();
|
|
866
|
+
var oObj = {
|
|
752
867
|
conditionsBased: (!bFiltersAggregationChanged && !bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch),
|
|
753
868
|
filtersText: mTexts.filtersText,
|
|
754
869
|
filtersTextExpanded: mTexts.filtersTextExpanded
|
|
755
|
-
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
this.fireFiltersChanged(oObj);
|
|
756
873
|
|
|
757
|
-
this.fireFiltersChanged(oObj);
|
|
758
|
-
}.bind(this));
|
|
759
874
|
};
|
|
760
875
|
|
|
761
876
|
FilterBarBase.prototype.onReset = function(oEvent) {
|
|
@@ -784,9 +899,7 @@ sap.ui.define([
|
|
|
784
899
|
this._bSearchTriggered = true;
|
|
785
900
|
return Promise.resolve();
|
|
786
901
|
}
|
|
787
|
-
return this.validate()
|
|
788
|
-
this.fireSearch();
|
|
789
|
-
}.bind(this));
|
|
902
|
+
return this.validate();
|
|
790
903
|
};
|
|
791
904
|
|
|
792
905
|
/**
|
|
@@ -799,7 +912,9 @@ sap.ui.define([
|
|
|
799
912
|
* @returns {Promise} Returns a Promise which resolves after the validation of erroneous fields has been propagated.
|
|
800
913
|
*
|
|
801
914
|
*/
|
|
802
|
-
FilterBarBase.prototype.validate = function() {
|
|
915
|
+
FilterBarBase.prototype.validate = function(bSuppressSearch) {
|
|
916
|
+
|
|
917
|
+
var bFireSearch = !bSuppressSearch;
|
|
803
918
|
|
|
804
919
|
return this.initialized().then(function() {
|
|
805
920
|
if (!this._oValidationPromise) {
|
|
@@ -810,7 +925,7 @@ sap.ui.define([
|
|
|
810
925
|
}.bind(this));
|
|
811
926
|
|
|
812
927
|
var fDelayedFunction = function() {
|
|
813
|
-
this._validate();
|
|
928
|
+
this._validate(bFireSearch);
|
|
814
929
|
this._oValidationPromise = null;
|
|
815
930
|
};
|
|
816
931
|
setTimeout(fDelayedFunction.bind(this), 0);
|
|
@@ -958,7 +1073,7 @@ sap.ui.define([
|
|
|
958
1073
|
return oFilterField;
|
|
959
1074
|
};
|
|
960
1075
|
|
|
961
|
-
FilterBarBase.prototype._handleAsyncValidation = function() {
|
|
1076
|
+
FilterBarBase.prototype._handleAsyncValidation = function(bFireSearch) {
|
|
962
1077
|
if (this._aFIChanges && (this._aFIChanges.length > 0)) {
|
|
963
1078
|
|
|
964
1079
|
var aNamePromisesArray = this._aFIChanges.slice();
|
|
@@ -977,22 +1092,22 @@ sap.ui.define([
|
|
|
977
1092
|
oFF.setValueState(ValueState.None); //valid existing value -> clear missing required error
|
|
978
1093
|
}
|
|
979
1094
|
}, this);
|
|
980
|
-
this._validate();
|
|
1095
|
+
this._validate(bFireSearch);
|
|
981
1096
|
}.bind(this), function(aConditionsArray) {
|
|
982
|
-
this._validate();
|
|
1097
|
+
this._validate(bFireSearch);
|
|
983
1098
|
}.bind(this));
|
|
984
1099
|
}
|
|
985
1100
|
};
|
|
986
1101
|
|
|
987
|
-
FilterBarBase.prototype._waitForChangeAppliance = function() {
|
|
1102
|
+
FilterBarBase.prototype._waitForChangeAppliance = function(bFireSearch) {
|
|
988
1103
|
|
|
989
1104
|
var aChangePromises = this._aCollectedChangePromises.slice();
|
|
990
1105
|
this._aCollectedChangePromises = null;
|
|
991
1106
|
|
|
992
1107
|
Promise.all(aChangePromises).then(function(aConditionsArray) {
|
|
993
|
-
this._validate();
|
|
1108
|
+
this._validate(bFireSearch);
|
|
994
1109
|
}.bind(this), function(aConditionsArray) {
|
|
995
|
-
this._validate();
|
|
1110
|
+
this._validate(bFireSearch);
|
|
996
1111
|
}.bind(this));
|
|
997
1112
|
};
|
|
998
1113
|
|
|
@@ -1000,9 +1115,15 @@ sap.ui.define([
|
|
|
1000
1115
|
* Executes the search.
|
|
1001
1116
|
* @private
|
|
1002
1117
|
*/
|
|
1003
|
-
FilterBarBase.prototype._validate = function() {
|
|
1118
|
+
FilterBarBase.prototype._validate = function(bFireSearch) {
|
|
1004
1119
|
var sErrorMessage, vRetErrorState;
|
|
1005
1120
|
|
|
1121
|
+
var fnCheckAndFireSearch = function() {
|
|
1122
|
+
if (bFireSearch) {
|
|
1123
|
+
this.fireSearch();
|
|
1124
|
+
}
|
|
1125
|
+
}.bind(this);
|
|
1126
|
+
|
|
1006
1127
|
var fnCleanup = function() {
|
|
1007
1128
|
this._fRejectedSearchPromise = null;
|
|
1008
1129
|
this._fResolvedSearchPromise = null;
|
|
@@ -1017,22 +1138,24 @@ sap.ui.define([
|
|
|
1017
1138
|
vRetErrorState = this._checkFilters();
|
|
1018
1139
|
|
|
1019
1140
|
if (vRetErrorState === ErrorState.AsyncValidation) {
|
|
1020
|
-
this._handleAsyncValidation();
|
|
1141
|
+
this._handleAsyncValidation(bFireSearch);
|
|
1021
1142
|
return;
|
|
1022
1143
|
}
|
|
1023
1144
|
|
|
1024
1145
|
if (this._aCollectedChangePromises && (this._aCollectedChangePromises.length > 0)) {
|
|
1025
|
-
this._waitForChangeAppliance();
|
|
1146
|
+
this._waitForChangeAppliance(bFireSearch);
|
|
1026
1147
|
return;
|
|
1027
1148
|
}
|
|
1028
1149
|
|
|
1029
1150
|
if (vRetErrorState === ErrorState.NoError) {
|
|
1030
1151
|
if (this._isChangeApplying()) {
|
|
1031
1152
|
this._oFlexPromise.then(function() {
|
|
1032
|
-
|
|
1033
|
-
|
|
1153
|
+
fnCheckAndFireSearch();
|
|
1154
|
+
this._fResolvedSearchPromise();
|
|
1155
|
+
fnCleanup();
|
|
1034
1156
|
}.bind(this));
|
|
1035
1157
|
} else {
|
|
1158
|
+
fnCheckAndFireSearch();
|
|
1036
1159
|
this._fResolvedSearchPromise();
|
|
1037
1160
|
fnCleanup();
|
|
1038
1161
|
}
|
|
@@ -1132,75 +1255,148 @@ sap.ui.define([
|
|
|
1132
1255
|
}.bind(this) : undefined;
|
|
1133
1256
|
};
|
|
1134
1257
|
|
|
1258
|
+
|
|
1259
|
+
FilterBarBase.prototype._isPathKnown = function(sFieldPath, oXCondition) {
|
|
1260
|
+
var sKey, sName;
|
|
1261
|
+
|
|
1262
|
+
if (!this._getPropertyByName(sFieldPath)) {
|
|
1263
|
+
return false;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
for (sKey in oXCondition["inParameters"]) {
|
|
1267
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1268
|
+
if (!this._getPropertyByName(sName)) {
|
|
1269
|
+
return false;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
for (sKey in oXCondition["outParameters"]) {
|
|
1273
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1274
|
+
if (!this._getPropertyByName(sName)) {
|
|
1275
|
+
return false;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
return true;
|
|
1280
|
+
};
|
|
1281
|
+
|
|
1282
|
+
FilterBarBase.prototype._removeCondition = function(sFieldPath, oXCondition, oCM) {
|
|
1283
|
+
var oProperty = this._getPropertyByName(sFieldPath);
|
|
1284
|
+
if (oProperty) {
|
|
1285
|
+
var oCondition = this._toInternal(oProperty, oXCondition);
|
|
1286
|
+
if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) >= 0) {
|
|
1287
|
+
oCM.removeCondition(sFieldPath, oCondition);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1135
1292
|
FilterBarBase.prototype.removeCondition = function(sFieldPath, oXCondition) {
|
|
1136
1293
|
return this.initialized().then(function() {
|
|
1137
1294
|
var oCM = this._getConditionModel();
|
|
1138
1295
|
if (oCM) {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1296
|
+
if (!this._hasPropertyHelper() && !this._isPathKnown(sFieldPath, oXCondition)) {
|
|
1297
|
+
return this._retrieveMetadata().then(function() {
|
|
1298
|
+
this._removeCondition(sFieldPath, oXCondition, oCM);
|
|
1299
|
+
}.bind(this));
|
|
1300
|
+
} else {
|
|
1301
|
+
this._removeCondition(sFieldPath, oXCondition, oCM);
|
|
1145
1302
|
}
|
|
1146
1303
|
}
|
|
1147
1304
|
}.bind(this));
|
|
1148
1305
|
};
|
|
1149
1306
|
|
|
1307
|
+
FilterBarBase.prototype._addCondition = function(sFieldPath, oXCondition, oCM) {
|
|
1308
|
+
var oProperty = this._getPropertyByName(sFieldPath);
|
|
1309
|
+
if (oProperty) {
|
|
1310
|
+
var oCondition = this._toInternal(oProperty, oXCondition);
|
|
1311
|
+
if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) < 0) {
|
|
1312
|
+
var mCondition = {};
|
|
1313
|
+
mCondition[sFieldPath] = [oCondition];
|
|
1314
|
+
FilterController.checkConditionOperatorSanity(mCondition); //check if the single condition's operator is valid
|
|
1315
|
+
var aConditions = mCondition[sFieldPath];
|
|
1316
|
+
if (aConditions && aConditions.length > 0){
|
|
1317
|
+
this._cleanUpFilterFieldInErrorStateByName(sFieldPath);
|
|
1318
|
+
oCM.addCondition(sFieldPath, oCondition);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1150
1324
|
FilterBarBase.prototype.addCondition = function(sFieldPath, oXCondition) {
|
|
1151
1325
|
return this.initialized().then(function() {
|
|
1152
1326
|
var oCM = this._getConditionModel();
|
|
1153
1327
|
if (oCM) {
|
|
1154
|
-
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
var aConditions = mCondition[sFieldPath];
|
|
1162
|
-
if (aConditions && aConditions.length > 0){
|
|
1163
|
-
this._cleanUpFilterFieldInErrorStateByName(sFieldPath);
|
|
1164
|
-
oCM.addCondition(sFieldPath, oCondition);
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1328
|
+
|
|
1329
|
+
if (!this._hasPropertyHelper() && !this._isPathKnown(sFieldPath, oXCondition)) {
|
|
1330
|
+
return this._retrieveMetadata().then(function() {
|
|
1331
|
+
this._addCondition(sFieldPath, oXCondition, oCM);
|
|
1332
|
+
}.bind(this));
|
|
1333
|
+
} else {
|
|
1334
|
+
this._addCondition(sFieldPath, oXCondition, oCM);
|
|
1167
1335
|
}
|
|
1168
1336
|
}
|
|
1169
1337
|
}.bind(this));
|
|
1170
1338
|
|
|
1171
1339
|
};
|
|
1172
1340
|
|
|
1173
|
-
FilterBarBase.prototype._setXConditions = function(
|
|
1174
|
-
var oProperty, aConditions, oConditionModel = this._getConditionModel();
|
|
1175
|
-
|
|
1176
|
-
if (bRemoveBeforeApplying) {
|
|
1177
|
-
oConditionModel.removeAllConditions();
|
|
1178
|
-
}
|
|
1341
|
+
FilterBarBase.prototype._setXConditions = function(mConditionsData, bRemoveBeforeApplying) {
|
|
1342
|
+
var sFieldPath, oProperty, aConditions, oConditionModel = this._getConditionModel();
|
|
1179
1343
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1344
|
+
var fPromiseResolve = null;
|
|
1345
|
+
var oPromise = new Promise(function(resolve, reject) {
|
|
1346
|
+
fPromiseResolve = resolve;
|
|
1347
|
+
});
|
|
1183
1348
|
|
|
1349
|
+
var fApplyConditions = function(mConditionsData) {
|
|
1350
|
+
for ( sFieldPath in mConditionsData) {
|
|
1351
|
+
aConditions = mConditionsData[sFieldPath];
|
|
1184
1352
|
oProperty = this._getPropertyByName(sFieldPath);
|
|
1185
1353
|
if (oProperty) {
|
|
1186
1354
|
|
|
1187
1355
|
if (aConditions.length === 0) {
|
|
1188
1356
|
oConditionModel.removeAllConditions(sFieldPath);
|
|
1189
1357
|
} else {
|
|
1358
|
+
if (oProperty.maxConditions !== -1) {
|
|
1359
|
+
oConditionModel.removeAllConditions(sFieldPath);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1190
1362
|
/* eslint-disable no-loop-func */
|
|
1191
1363
|
aConditions.forEach(function(oCondition) {
|
|
1192
|
-
|
|
1193
|
-
oConditionModel.removeAllConditions(sFieldPath);
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
var oNewCondition = this._toInternal(oProperty, oCondition);
|
|
1197
|
-
oConditionModel.addCondition(sFieldPath, oNewCondition);
|
|
1364
|
+
this._addCondition(sFieldPath, oCondition, oConditionModel);
|
|
1198
1365
|
}.bind(this));
|
|
1199
1366
|
/* eslint-enabled no-loop-func */
|
|
1200
1367
|
}
|
|
1201
1368
|
}
|
|
1202
1369
|
}
|
|
1370
|
+
|
|
1371
|
+
fPromiseResolve();
|
|
1372
|
+
}.bind(this);
|
|
1373
|
+
|
|
1374
|
+
if (bRemoveBeforeApplying) {
|
|
1375
|
+
oConditionModel.removeAllConditions();
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
if (mConditionsData) {
|
|
1379
|
+
|
|
1380
|
+
var bAllPropertiesKnown = true;
|
|
1381
|
+
for ( sFieldPath in mConditionsData) {
|
|
1382
|
+
aConditions = mConditionsData[sFieldPath];
|
|
1383
|
+
|
|
1384
|
+
if (!this._isPathKnown(sFieldPath, aConditions)) {
|
|
1385
|
+
bAllPropertiesKnown = false;
|
|
1386
|
+
break;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
if (!bAllPropertiesKnown && !this._hasPropertyHelper()) {
|
|
1391
|
+
this._retrieveMetadata().then(function() {
|
|
1392
|
+
fApplyConditions(mConditionsData);
|
|
1393
|
+
});
|
|
1394
|
+
} else {
|
|
1395
|
+
fApplyConditions(mConditionsData);
|
|
1396
|
+
}
|
|
1203
1397
|
}
|
|
1398
|
+
|
|
1399
|
+
return oPromise;
|
|
1204
1400
|
};
|
|
1205
1401
|
|
|
1206
1402
|
FilterBarBase.prototype._getXConditions = function () {
|
|
@@ -1444,15 +1640,6 @@ sap.ui.define([
|
|
|
1444
1640
|
};
|
|
1445
1641
|
|
|
1446
1642
|
|
|
1447
|
-
FilterBarBase.prototype.getPropertyInfoSet = function() {
|
|
1448
|
-
try {
|
|
1449
|
-
var oPropertyHelper = this.getPropertyHelper();
|
|
1450
|
-
return oPropertyHelper ? oPropertyHelper.getProperties() : [];
|
|
1451
|
-
} catch (ex) {
|
|
1452
|
-
return [];
|
|
1453
|
-
}
|
|
1454
|
-
};
|
|
1455
|
-
|
|
1456
1643
|
FilterBarBase.prototype._getNonHiddenPropertyInfoSet = function() {
|
|
1457
1644
|
var aVisibleProperties = [];
|
|
1458
1645
|
this.getPropertyInfoSet().every(function(oProperty) {
|
|
@@ -1483,9 +1670,6 @@ sap.ui.define([
|
|
|
1483
1670
|
return oProperty;
|
|
1484
1671
|
};
|
|
1485
1672
|
|
|
1486
|
-
FilterBarBase.prototype._getPropertyByName = function(sName) {
|
|
1487
|
-
return FilterUtil.getPropertyByKey(this.getPropertyInfoSet(), sName);
|
|
1488
|
-
};
|
|
1489
1673
|
|
|
1490
1674
|
FilterBarBase.prototype._cleanUpFilterFieldInErrorStateByName = function(sFieldName) {
|
|
1491
1675
|
var oFilterField = null;
|
|
@@ -1581,25 +1765,26 @@ sap.ui.define([
|
|
|
1581
1765
|
|
|
1582
1766
|
this._bIgnoreChanges = true;
|
|
1583
1767
|
|
|
1584
|
-
this._applyFilterConditionsChanges()
|
|
1768
|
+
this._applyFilterConditionsChanges().then(function() {
|
|
1585
1769
|
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
this
|
|
1770
|
+
this._changesApplied();
|
|
1771
|
+
this._bInitialFiltersApplied = true;
|
|
1772
|
+
this._fResolveInitialFiltersApplied();
|
|
1773
|
+
this._fResolveInitialFiltersApplied = null;
|
|
1774
|
+
}.bind(this));
|
|
1591
1775
|
};
|
|
1592
1776
|
|
|
1593
1777
|
FilterBarBase.prototype._applyFilterConditionsChanges = function() {
|
|
1594
1778
|
|
|
1595
|
-
var
|
|
1779
|
+
var mSettings, mConditionsData;
|
|
1596
1780
|
|
|
1597
|
-
|
|
1781
|
+
mSettings = this.getProperty("filterConditions");
|
|
1598
1782
|
if (Object.keys(mSettings).length > 0) {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
this._setXConditions(aConditionsData, true, true);
|
|
1783
|
+
mConditionsData = merge({}, mSettings);
|
|
1784
|
+
return this._setXConditions(mConditionsData, true);
|
|
1602
1785
|
}
|
|
1786
|
+
|
|
1787
|
+
return Promise.resolve();
|
|
1603
1788
|
};
|
|
1604
1789
|
|
|
1605
1790
|
FilterBarBase.prototype.setVariantBackreference = function(oVariant) {
|
|
@@ -1767,4 +1952,4 @@ sap.ui.define([
|
|
|
1767
1952
|
|
|
1768
1953
|
return FilterBarBase;
|
|
1769
1954
|
|
|
1770
|
-
});
|
|
1955
|
+
});
|