@openui5/sap.ui.mdc 1.96.5 → 1.99.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 +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +7 -9
- 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 +1100 -1796
- package/src/sap/ui/mdc/ChartDelegate.js +429 -270
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +3 -2
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterField.js +25 -8
- package/src/sap/ui/mdc/Link.js +23 -4
- package/src/sap/ui/mdc/LinkDelegate.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +21 -6
- package/src/sap/ui/mdc/Table.js +204 -161
- package/src/sap/ui/mdc/TableDelegate.js +47 -17
- package/src/sap/ui/mdc/ValueHelp.js +51 -15
- package/src/sap/ui/mdc/ValueHelpDelegate.js +20 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +49 -13
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
- 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 +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +261 -44
- package/src/sap/ui/mdc/condition/Operator.js +9 -9
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +437 -0
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +80 -5
- 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/FilterBarBase.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +60 -20
- 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 +9 -9
- package/src/sap/ui/mdc/field/ConditionsType.js +7 -7
- 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 +75 -27
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +311 -0
- package/src/sap/ui/mdc/field/FieldBase.js +85 -52
- 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 +23 -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 +7 -7
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +20 -0
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +7 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- 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 +2 -1
- package/src/sap/ui/mdc/field/content/BooleanContent.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +28 -26
- package/src/sap/ui/mdc/field/content/DateContent.js +128 -2
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +9 -1
- package/src/sap/ui/mdc/field/content/DefaultContent.js +36 -14
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/field/content/TimeContent.js +8 -1
- package/src/sap/ui/mdc/field/content/UnitContent.js +23 -4
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +359 -142
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- 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/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -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 +62 -43
- 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 +68 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +47 -6
- package/src/sap/ui/mdc/messagebundle_bg.properties +61 -20
- package/src/sap/ui/mdc/messagebundle_ca.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_cs.properties +60 -19
- package/src/sap/ui/mdc/messagebundle_cy.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_da.properties +52 -11
- package/src/sap/ui/mdc/messagebundle_de.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_el.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_en.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +51 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +51 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +59 -18
- package/src/sap/ui/mdc/messagebundle_et.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_fi.properties +51 -10
- package/src/sap/ui/mdc/messagebundle_fr.properties +50 -9
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_hi.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_hr.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_hu.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +61 -20
- package/src/sap/ui/mdc/messagebundle_iw.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_ja.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_kk.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_ko.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_lt.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_lv.properties +49 -8
- package/src/sap/ui/mdc/messagebundle_ms.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_nl.properties +49 -8
- package/src/sap/ui/mdc/messagebundle_no.properties +53 -12
- package/src/sap/ui/mdc/messagebundle_pl.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_pt.properties +52 -11
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_ro.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_ru.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sh.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sk.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sv.properties +47 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +48 -7
- package/src/sap/ui/mdc/messagebundle_tr.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_uk.properties +49 -8
- package/src/sap/ui/mdc/messagebundle_vi.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +45 -4
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +19 -5
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +16 -11
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +160 -116
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
- 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} +215 -116
- package/src/sap/ui/mdc/p13n/Engine.js +61 -20
- package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +8 -8
- package/src/sap/ui/mdc/p13n/PersistenceProvider.js +21 -10
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +40 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +15 -12
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
- package/src/sap/ui/mdc/p13n/{DefaultProviderRegistry.js → modules/DefaultProviderRegistry.js} +2 -2
- package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +86 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +19 -3
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
- package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +1 -1
- 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 +14 -7
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
- package/src/sap/ui/mdc/table/Column.js +35 -10
- package/src/sap/ui/mdc/table/CreationRow.js +14 -13
- package/src/sap/ui/mdc/table/GridTableType.js +13 -13
- package/src/sap/ui/mdc/table/PropertyHelper.js +64 -27
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +26 -29
- package/src/sap/ui/mdc/table/RowSettings.js +7 -5
- package/src/sap/ui/mdc/table/TableTypeBase.js +6 -6
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +15 -71
- 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/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +15 -4
- package/src/sap/ui/mdc/themes/base/library.source.less +3 -0
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +1 -1
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- 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 +148 -325
- package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
- package/src/sap/ui/mdc/valuehelp/Dialog.js +12 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +14 -2
- package/src/sap/ui/mdc/valuehelp/base/Container.js +33 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +36 -5
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +43 -15
- 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 +28 -32
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +50 -10
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -26
- 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 +289 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +9 -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 +362 -233
- 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/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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
], function () {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
properties: {
|
|
12
|
+
dataType: {
|
|
13
|
+
ignore: true
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
dataTypeConstraints: {
|
|
17
|
+
ignore: true
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
dataTypeFormatOptions: {
|
|
21
|
+
ignore: true
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
editMode: {
|
|
25
|
+
ignore: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
required: {
|
|
29
|
+
ignore: true
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
display: {
|
|
33
|
+
ignore: true
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
textAlign: {
|
|
37
|
+
ignore: true
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
textDirection: {
|
|
41
|
+
ignore: true
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
placeholder: {
|
|
45
|
+
ignore: true
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
valueState: {
|
|
49
|
+
ignore: true
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
valueStateText: {
|
|
53
|
+
ignore: true
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
width: {
|
|
57
|
+
ignore: true
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
multipleLines: {
|
|
61
|
+
ignore: true
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
maxConditions: {
|
|
65
|
+
ignore: true
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
conditions: {
|
|
69
|
+
ignore: true
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
label: {
|
|
73
|
+
ignore: true
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
delegate: {
|
|
77
|
+
ignore: true
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
showEmptyIndicator: {
|
|
81
|
+
ignore: true
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
},
|
|
85
|
+
aggregations: {
|
|
86
|
+
content: {
|
|
87
|
+
ignore: true
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
contentEdit: {
|
|
91
|
+
ignore: true
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
contentDisplay: {
|
|
95
|
+
ignore: true
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
fieldInfo: {
|
|
99
|
+
ignore: true
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
};
|
|
104
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
], function () {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
properties: {
|
|
12
|
+
operators: {
|
|
13
|
+
ignore: true
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
defaultOperator: {
|
|
17
|
+
ignore: true
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
};
|
|
22
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
], function () {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
properties: {
|
|
12
|
+
delegate: {
|
|
13
|
+
ignore: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
aggregations: {
|
|
17
|
+
items: {
|
|
18
|
+
ignore: true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
});
|
|
@@ -4,28 +4,68 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/mdc/p13n/Engine"
|
|
8
|
-
|
|
7
|
+
"sap/ui/mdc/p13n/Engine",
|
|
8
|
+
"sap/ui/mdc/Table"
|
|
9
|
+
], function (Engine, Table) {
|
|
9
10
|
"use strict";
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
actions: {
|
|
20
|
-
settings: function () {
|
|
21
|
-
//RTA expects the settings to be returned as function
|
|
22
|
-
return {
|
|
23
|
-
handler: function (oControl, mPropertyBag) {
|
|
24
|
-
return Engine.getInstance().getRTASettingsActionHandler(oControl, mPropertyBag, oControl.getP13nMode());
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
12
|
+
// Returns the designTime metadata for the control. By default all the properties/aggregations which are not part of the allowed list array will be ignored from RTA/DTA
|
|
13
|
+
function enhanceDesignTimeMetadata(aAllowed, sKey, oDesignTime) {
|
|
14
|
+
var bAllowed = aAllowed.includes(sKey);
|
|
15
|
+
var oObject = bAllowed && oDesignTime[sKey] || {};
|
|
16
|
+
if (!Object.keys(oObject).length) {
|
|
17
|
+
oObject[sKey] = {
|
|
18
|
+
ignore: !bAllowed
|
|
19
|
+
};
|
|
28
20
|
}
|
|
29
|
-
|
|
21
|
+
Object.assign(oDesignTime, oObject);
|
|
22
|
+
}
|
|
30
23
|
|
|
24
|
+
// Returns the designTime object for RTA/DTA
|
|
25
|
+
function getDesignTime() {
|
|
26
|
+
// initial structure of designTime object
|
|
27
|
+
var oDesignTime = {
|
|
28
|
+
name: "{name}",
|
|
29
|
+
description: "{description}",
|
|
30
|
+
actions: {
|
|
31
|
+
settings: function () {
|
|
32
|
+
//RTA expects the settings to be returned as function
|
|
33
|
+
return {
|
|
34
|
+
handler: function (oControl, mPropertyBag) {
|
|
35
|
+
return Engine.getInstance().getRTASettingsActionHandler(oControl, mPropertyBag, oControl.getP13nMode());
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
properties: {},
|
|
41
|
+
aggregations: {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var oTableMetadata = Table.getMetadata(),
|
|
45
|
+
// array containing all allowed control properties. Update the aAllowedProperties to enable a property for DTA
|
|
46
|
+
aAllowedProperties = ["width", "height", "headerLevel",
|
|
47
|
+
"header", "headerVisible", "showRowCount", "threshold",
|
|
48
|
+
"noDataText", "enableExport", "busyIndicatorDelay","enableColumnResize",
|
|
49
|
+
"showPasteButton", "multiSelectMode"],
|
|
50
|
+
// array containing all allowed control aggregations. Update the aAllowedAggregations to enable an aggregation for DTA
|
|
51
|
+
aAllowedAggregations = [],
|
|
52
|
+
// array containing all control properties
|
|
53
|
+
aAllProperties = Object.keys(oTableMetadata.getAllProperties()).concat(Object.keys(oTableMetadata.getAllPrivateProperties())),
|
|
54
|
+
// array containing all control aggregations
|
|
55
|
+
aAllAggregations = Object.keys(oTableMetadata.getAllAggregations()).concat(Object.keys(oTableMetadata.getAllPrivateAggregations()));
|
|
56
|
+
|
|
57
|
+
// populate the oDesignTime.properties with the control properties (allowed/disallowed). By default all properties are ignored.
|
|
58
|
+
aAllProperties.forEach(function(sPropertyName) {
|
|
59
|
+
enhanceDesignTimeMetadata(aAllowedProperties, sPropertyName, oDesignTime.properties);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// populate the oDesignTime.aggregations with the control aggregations (allowed/disallowed). By default all aggregations are ignored.
|
|
63
|
+
aAllAggregations.forEach(function(sAggregationName) {
|
|
64
|
+
enhanceDesignTimeMetadata(aAllowedAggregations, sAggregationName, oDesignTime.aggregations);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return oDesignTime;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return getDesignTime();
|
|
31
71
|
});
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @param {object} [mSettings] Initial settings for the new control
|
|
36
36
|
* @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls that shows a list for Boolean values.
|
|
37
37
|
* @extends sap.ui.mdc.field.FieldHelpBase
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.99.0
|
|
39
39
|
* @constructor
|
|
40
40
|
* @private
|
|
41
41
|
* @ui5-restricted sap.ui.mdc.field.FieldBase
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @param {object} [mSettings] Initial settings for the new control
|
|
36
36
|
* @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls to show a popover of conditions.
|
|
37
37
|
* @extends sap.ui.mdc.field.FieldHelpBase
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.99.0
|
|
39
39
|
* @constructor
|
|
40
40
|
* @private
|
|
41
41
|
* @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @extends sap.ui.model.SimpleType
|
|
47
47
|
*
|
|
48
48
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.99.0
|
|
50
50
|
*
|
|
51
51
|
* @since 1.62.0
|
|
52
52
|
* @private
|
|
@@ -56,19 +56,19 @@ sap.ui.define([
|
|
|
56
56
|
* @param {object} [oFormatOptions] Formatting options
|
|
57
57
|
* @param {sap.ui.model.Type} [oFormatOptions.valueType] Type of the value of the condition (used for formatting and parsing)
|
|
58
58
|
* @param {string[]} [oFormatOptions.operators] Possible operators to be used in the condition
|
|
59
|
-
* @param {sap.ui.mdc.enum.FieldDisplay} [oFormatOptions.display] DisplayFormat used to visualize value
|
|
60
|
-
* @param {string} [oFormatOptions.fieldHelpID] ID of the field help
|
|
59
|
+
* @param {sap.ui.mdc.enum.FieldDisplay} [oFormatOptions.display] DisplayFormat used to visualize a value
|
|
60
|
+
* @param {string} [oFormatOptions.fieldHelpID] ID of the field help to determine the key and description // TODO: async request????
|
|
61
61
|
* @param {boolean} [oFormatOptions.hideOperator] If set, only the value of the condition is shown, but no operator //TODO
|
|
62
62
|
* @param {int} [oFormatOptions.maxConditions] Maximum number of allowed conditions
|
|
63
|
-
* @param {sap.ui.model.Context} [oFormatOptions.bindingContext] BindingContext of field. Used to get key or description from the value help using in/out parameters. (In table, the value help might be connected to different row)
|
|
64
|
-
* @param {sap.ui.model.Type} [oFormatOptions.originalDateType] Type used on field
|
|
63
|
+
* @param {sap.ui.model.Context} [oFormatOptions.bindingContext] <code>BindingContext</code> of field. Used to get a key or description from the value help using in/out parameters. (In a table, the value help might be connected to a different row)
|
|
64
|
+
* @param {sap.ui.model.Type} [oFormatOptions.originalDateType] Type used on field, for example, for date types; a different type is used internally to have different <code>formatOptions</code>
|
|
65
65
|
* @param {sap.ui.model.Type} [oFormatOptions.additionalType] additional Type used on other part of a field. (This is the case for unit fields.)
|
|
66
66
|
* @param {function} [oFormatOptions.getConditions] Function to get the existing conditions of the field. Only used if <code>isUnit</code> is set. // TODO: better solution
|
|
67
67
|
* @param {function} [oFormatOptions.asyncParsing] Callback function to tell the <code>Field</code> the parsing is asynchronous.
|
|
68
|
-
* @param {object} [oFormatOptions.navigateCondition] Condition of keyboard navigation. If this is filled, no real parsing is needed as the condition has already been determined
|
|
68
|
+
* @param {object} [oFormatOptions.navigateCondition] Condition of keyboard navigation. If this is filled, no real parsing is needed as the condition has already been determined and is just returned
|
|
69
69
|
* @param {object} [oFormatOptions.delegate] Field delegate to handle model-specific logic
|
|
70
70
|
* @param {object} [oFormatOptions.payload] Payload of the delegate
|
|
71
|
-
* @param {boolean} [oFormatOptions.preventGetDescription] If set, description is not read by <code>formatValue</code> as it is known that no description
|
|
71
|
+
* @param {boolean} [oFormatOptions.preventGetDescription] If set, description is not read by <code>formatValue</code> as it is known that no description exists or might be set later
|
|
72
72
|
* @param {sap.ui.mdc.condition.ConditionModel} [oFormatOptions.conditionModel] <code>ConditionModel</code>, if bound to one
|
|
73
73
|
* @param {string} [oFormatOptions.conditionModelName] Name of the <code>ConditionModel</code>, if bound to one
|
|
74
74
|
* @param {string} [oFormatOptions.defaultOperatorName] Name of the default <code>Operator</code>
|
|
@@ -527,8 +527,8 @@ sap.ui.define([
|
|
|
527
527
|
oType.validateValue(vCheckParsedValue);
|
|
528
528
|
}
|
|
529
529
|
} catch (oException) {
|
|
530
|
-
if (oException && !(oException instanceof ParseException
|
|
531
|
-
// unknown error -> just raise it
|
|
530
|
+
if (oException && !(bCheckDescription && (oException instanceof ParseException || oException instanceof ValidateException))) {
|
|
531
|
+
// unknown error or no search for description -> just raise it
|
|
532
532
|
throw oException;
|
|
533
533
|
}
|
|
534
534
|
bCheckKey = false; // cannot be a valid key
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
* @extends sap.ui.model.SimpleType
|
|
37
37
|
*
|
|
38
38
|
* @author SAP SE
|
|
39
|
-
* @version 1.
|
|
39
|
+
* @version 1.99.0
|
|
40
40
|
*
|
|
41
41
|
* @since 1.62.0
|
|
42
42
|
* @private
|
|
@@ -46,19 +46,19 @@ sap.ui.define([
|
|
|
46
46
|
* @param {object} [oFormatOptions] Formatting options
|
|
47
47
|
* @param {sap.ui.model.Type} [oFormatOptions.valueType] Type of the value of the condition (used for formatting and parsing)
|
|
48
48
|
* @param {string[]} [oFormatOptions.operators] Possible operators to be used in the condition
|
|
49
|
-
* @param {sap.ui.mdc.enum.FieldDisplay} [oFormatOptions.display] DisplayFormat used to visualize value
|
|
50
|
-
* @param {string} [oFormatOptions.fieldHelpID] ID of the field help
|
|
49
|
+
* @param {sap.ui.mdc.enum.FieldDisplay} [oFormatOptions.display] DisplayFormat used to visualize a value
|
|
50
|
+
* @param {string} [oFormatOptions.fieldHelpID] ID of the field help to determine the key and description // TODO: async request????
|
|
51
51
|
* @param {boolean} [oFormatOptions.hideOperator] If set, only the value of the condition is shown, but no operator //TODO
|
|
52
52
|
* @param {int} [oFormatOptions.maxConditions] Maximum number of allowed conditions
|
|
53
|
-
* @param {sap.ui.model.Context} [oFormatOptions.bindingContext] BindingContext of field. Used to get key or description from the value help using in/out parameters. (In table, the value help might be connected to different row)
|
|
54
|
-
* @param {sap.ui.model.Type} [oFormatOptions.originalDateType] Type used on field
|
|
53
|
+
* @param {sap.ui.model.Context} [oFormatOptions.bindingContext] <code>BindingContext</code> of field. Used to get a key or description from the value help using in/out parameters. (In a table, the value help might be connected to a different row)
|
|
54
|
+
* @param {sap.ui.model.Type} [oFormatOptions.originalDateType] Type used on field, for example, for date types; a different type is used internally to have different <code>formatOptions</code>
|
|
55
55
|
* @param {sap.ui.model.Type} [oFormatOptions.additionalType] additional Type used on other part of a field. (This is the case for unit fields.)
|
|
56
56
|
* @param {function} [oFormatOptions.getConditions] Function to get the existing conditions of the field. Only used if <code>isUnit</code> is set. TODO: better solution
|
|
57
57
|
* @param {function} [oFormatOptions.asyncParsing] Callback function to tell the <code>Field</code> the parsing is asynchronous.
|
|
58
|
-
* @param {object} [oFormatOptions.navigateCondition] Condition of keyboard navigation. If this is filled, no real parsing is needed as the condition has already been determined
|
|
58
|
+
* @param {object} [oFormatOptions.navigateCondition] Condition of keyboard navigation. If this is filled, no real parsing is needed as the condition has already been determined and is just returned
|
|
59
59
|
* @param {object} [oFormatOptions.delegate] Field delegate to handle model-specific logic
|
|
60
60
|
* @param {object} [oFormatOptions.payload] Payload of the delegate
|
|
61
|
-
* @param {boolean} [oFormatOptions.preventGetDescription] If set, description is not read by <code>formatValue</code> as it is known that no description
|
|
61
|
+
* @param {boolean} [oFormatOptions.preventGetDescription] If set, description is not read by <code>formatValue</code> as it is known that no description exists or might be set later
|
|
62
62
|
* @param {sap.ui.mdc.condition.ConditionModel} [oFormatOptions.conditionModel] <code>ConditionModel</code>, if bound to one
|
|
63
63
|
* @param {string} [oFormatOptions.conditionModelName] Name of the <code>ConditionModel</code>, if bound to one
|
|
64
64
|
* @param {string} [oFormatOptions.defaultOperatorName] Name of the default <code>Operator</code>
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @param {object} [mSettings] Initial settings for the new control
|
|
17
17
|
* @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls that allows you to add custom content.
|
|
18
18
|
* @extends sap.ui.mdc.field.FieldHelpBase
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.99.0
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @ui5-restricted sap.fe
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @param {object} [mSettings] Initial settings for the new control
|
|
17
17
|
* @class A field help used in the <code>FieldInfo</code> aggregation in <code>FieldBase</code> controls that allows you to add custom content.
|
|
18
18
|
* @extends sap.ui.mdc.field.FieldInfoBase
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.99.0
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @ui5-restricted sap.fe
|
|
@@ -29,10 +29,10 @@ sap.ui.define([
|
|
|
29
29
|
'sap/ui/layout/Grid',
|
|
30
30
|
'sap/ui/layout/GridData',
|
|
31
31
|
'sap/m/library',
|
|
32
|
-
'sap/m/ScrollContainer',
|
|
33
32
|
'sap/m/Button',
|
|
34
33
|
'sap/m/Panel',
|
|
35
|
-
'sap/base/Log'
|
|
34
|
+
'sap/base/Log',
|
|
35
|
+
'sap/ui/core/InvisibleMessage'
|
|
36
36
|
], function(
|
|
37
37
|
Control,
|
|
38
38
|
ManagedObjectObserver,
|
|
@@ -59,10 +59,10 @@ sap.ui.define([
|
|
|
59
59
|
Grid,
|
|
60
60
|
GridData,
|
|
61
61
|
mLibrary,
|
|
62
|
-
ScrollContainer,
|
|
63
62
|
Button,
|
|
64
63
|
Panel,
|
|
65
|
-
Log
|
|
64
|
+
Log,
|
|
65
|
+
InvisibleMessage
|
|
66
66
|
) {
|
|
67
67
|
"use strict";
|
|
68
68
|
|
|
@@ -74,6 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
|
|
75
75
|
var ButtonType = mLibrary.ButtonType;
|
|
76
76
|
var ValueState = coreLibrary.ValueState;
|
|
77
|
+
var InvisibleMessageMode = coreLibrary.InvisibleMessageMode;
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
80
|
* Constructor for a new <code>DefineConditionPanel</code>.
|
|
@@ -88,7 +89,7 @@ sap.ui.define([
|
|
|
88
89
|
* @extends sap.ui.core.Control
|
|
89
90
|
*
|
|
90
91
|
* @author SAP SE
|
|
91
|
-
* @version 1.
|
|
92
|
+
* @version 1.99.0
|
|
92
93
|
*
|
|
93
94
|
* @constructor
|
|
94
95
|
* @alias sap.ui.mdc.field.DefineConditionPanel
|
|
@@ -194,6 +195,8 @@ sap.ui.define([
|
|
|
194
195
|
|
|
195
196
|
Control.prototype.init.apply(this, arguments);
|
|
196
197
|
|
|
198
|
+
this.oInvisibleMessage = InvisibleMessage.getInstance();
|
|
199
|
+
|
|
197
200
|
this._oManagedObjectModel = new ManagedObjectModel(this);
|
|
198
201
|
|
|
199
202
|
this._oObserver = new ManagedObjectObserver(_observeChanges.bind(this));
|
|
@@ -259,6 +262,8 @@ sap.ui.define([
|
|
|
259
262
|
this._bFocusLastRemoveBtn = true; // as remove-Button will disappear and focus should set on the last row remove button
|
|
260
263
|
}
|
|
261
264
|
|
|
265
|
+
this.oInvisibleMessage.announce(oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ANNOUNCE"), InvisibleMessageMode.Polite);
|
|
266
|
+
|
|
262
267
|
// try to reset valueState and value of value Fields inside the removed row
|
|
263
268
|
var oGrid = this.byId("conditions");
|
|
264
269
|
var aGridContent = oGrid.getContent();
|
|
@@ -277,6 +282,7 @@ sap.ui.define([
|
|
|
277
282
|
|
|
278
283
|
aConditions.splice(iIndex, 1);
|
|
279
284
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
285
|
+
_checkInvalidInput.call(this, undefined); // check if invalid condition was removed
|
|
280
286
|
|
|
281
287
|
this.fireConditionProcessed();
|
|
282
288
|
},
|
|
@@ -301,8 +307,10 @@ sap.ui.define([
|
|
|
301
307
|
var sOperator = oOperator.name;
|
|
302
308
|
var oCondition = Condition.createCondition(sOperator, oOperator.valueDefaults ? oOperator.valueDefaults : [], undefined, undefined, ConditionValidated.NotValidated);
|
|
303
309
|
|
|
304
|
-
|
|
305
|
-
|
|
310
|
+
if (oOperator.valueTypes[0] && oOperator.valueTypes[0] !== Operator.ValueType.Static) {
|
|
311
|
+
// mark the condition as initial and not modified by the user
|
|
312
|
+
oCondition.isInitial = true;
|
|
313
|
+
}
|
|
306
314
|
|
|
307
315
|
FilterOperatorUtil.updateConditionValues(oCondition);
|
|
308
316
|
FilterOperatorUtil.checkConditionsEmpty(oCondition, aOperators);
|
|
@@ -313,6 +321,11 @@ sap.ui.define([
|
|
|
313
321
|
aConditions.push(oCondition);
|
|
314
322
|
}
|
|
315
323
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
324
|
+
|
|
325
|
+
if (!oCondition.isInitial) {
|
|
326
|
+
// static condition added, it is ready to use -> fire event
|
|
327
|
+
this.fireConditionProcessed();
|
|
328
|
+
}
|
|
316
329
|
},
|
|
317
330
|
|
|
318
331
|
updateDefineConditions: function() {
|
|
@@ -350,6 +363,21 @@ sap.ui.define([
|
|
|
350
363
|
|
|
351
364
|
onSelectChange: function(oEvent) {
|
|
352
365
|
var oField = oEvent.getSource();
|
|
366
|
+
var oCondition = oField.getBindingContext("$this").getObject();
|
|
367
|
+
var aConditions = this.getConditions();
|
|
368
|
+
var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
|
|
369
|
+
if (iIndex >= 0) {
|
|
370
|
+
oCondition = aConditions[iIndex]; // to get right instance
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (!oEvent.getParameter("valid")) { // if Operator in error state -> don't update values
|
|
374
|
+
oCondition.invalid = true;
|
|
375
|
+
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
376
|
+
oField._sOldKey = oField.getValue();
|
|
377
|
+
_checkInvalidInput.call(this, true); // set imediately, not only if row left
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
|
|
353
381
|
var sKey = oField.getValue();
|
|
354
382
|
var sOldKey = oField._sOldKey;
|
|
355
383
|
var oOperator = FilterOperatorUtil.getOperator(sKey); // operator must exist as List is created from valid operators
|
|
@@ -357,16 +385,11 @@ sap.ui.define([
|
|
|
357
385
|
|
|
358
386
|
if (oOperator && oOperatorOld) {
|
|
359
387
|
var bUpdate = false;
|
|
360
|
-
var oCondition = oField.getBindingContext("$this").getObject();
|
|
361
|
-
var aConditions = this.getConditions();
|
|
362
|
-
var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
|
|
363
388
|
|
|
364
389
|
if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== Operator.ValueType.Static ) {
|
|
365
390
|
// type changed -> remove entered value (only if changed by user in Select)
|
|
366
391
|
// As Static text updated on condition change, don't delete it here.
|
|
367
392
|
if (iIndex >= 0) {
|
|
368
|
-
oCondition = aConditions[iIndex]; // to get right instance
|
|
369
|
-
|
|
370
393
|
oCondition.values.forEach(function(value, index) {
|
|
371
394
|
if (value !== null) {
|
|
372
395
|
if ((oOperator.valueTypes[index] === Operator.ValueType.Self && oOperatorOld.valueTypes[index] === Operator.ValueType.SelfNoParse) ||
|
|
@@ -391,8 +414,6 @@ sap.ui.define([
|
|
|
391
414
|
|
|
392
415
|
if (iIndex >= 0 && oOperator.valueDefaults) {
|
|
393
416
|
// sets the default values for the operator back to default, if the condition is inital or the value is null
|
|
394
|
-
oCondition = aConditions[iIndex];
|
|
395
|
-
|
|
396
417
|
oCondition.values.forEach(function(value, index) {
|
|
397
418
|
if ((oCondition.isInitial && value !== oOperator.valueDefaults[index]) || (value === null)) {
|
|
398
419
|
// set the default value and mark the condition as initial
|
|
@@ -407,7 +428,6 @@ sap.ui.define([
|
|
|
407
428
|
if (!oOperator.valueTypes[1] && oOperatorOld.valueTypes[1]) {
|
|
408
429
|
// switch from BT to EQ -> remove second value even if filled
|
|
409
430
|
if (iIndex >= 0) {
|
|
410
|
-
oCondition = aConditions[iIndex]; // to get right instance
|
|
411
431
|
if (oCondition.values.length > 1 && oCondition.values[1]) {
|
|
412
432
|
oCondition.values = oCondition.values.slice(0, 1);
|
|
413
433
|
bUpdate = true;
|
|
@@ -415,9 +435,14 @@ sap.ui.define([
|
|
|
415
435
|
}
|
|
416
436
|
}
|
|
417
437
|
|
|
438
|
+
if (oCondition.invalid) {
|
|
439
|
+
delete oCondition.invalid;
|
|
440
|
+
bUpdate = true;
|
|
441
|
+
}
|
|
418
442
|
if (bUpdate) {
|
|
419
443
|
FilterOperatorUtil.checkConditionsEmpty(oCondition, _getOperators.call(this));
|
|
420
444
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
445
|
+
_checkInvalidInput.call(this, false); // set imediately, not only if row left
|
|
421
446
|
}
|
|
422
447
|
}
|
|
423
448
|
|
|
@@ -674,7 +699,7 @@ sap.ui.define([
|
|
|
674
699
|
oControl = new Field(sId, {
|
|
675
700
|
delegate: _getDelegate.call(this),
|
|
676
701
|
value: { path: "$this>", type: oNullableType, mode: 'TwoWay', targetType: 'raw' },
|
|
677
|
-
editMode: {path: "$condition>operator", formatter: _getEditModeFromOperator},
|
|
702
|
+
editMode: {parts: [{path: "$condition>operator"}, {path: "$condition>invalid"}], formatter: _getEditModeFromOperator},
|
|
678
703
|
width: "100%"
|
|
679
704
|
});
|
|
680
705
|
}
|
|
@@ -788,7 +813,7 @@ sap.ui.define([
|
|
|
788
813
|
// default operator not valid -> cannot use -> use first include-operator which requires some values
|
|
789
814
|
for (var i = 0; i < aOperators.length; i++) {
|
|
790
815
|
oOperator = FilterOperatorUtil.getOperator(aOperators[i]);
|
|
791
|
-
if (oOperator.exclude || !oOperator.hasRequiredValues()) {
|
|
816
|
+
if (!oOperator || oOperator.exclude || !oOperator.hasRequiredValues()) {
|
|
792
817
|
oOperator = undefined;
|
|
793
818
|
} else {
|
|
794
819
|
break;
|
|
@@ -1000,6 +1025,11 @@ sap.ui.define([
|
|
|
1000
1025
|
oPanel.addContent(oInvisibleOperatorText);
|
|
1001
1026
|
oPanel.addContent(oGrid);
|
|
1002
1027
|
|
|
1028
|
+
this._oInvisibleAddOperatorButtonText = new InvisibleText({
|
|
1029
|
+
text: oMessageBundle.getText("valuehelp.DEFINECONDITIONS_ADDCONDITION_DESCRIPTION")
|
|
1030
|
+
});
|
|
1031
|
+
oPanel.addContent(this._oInvisibleAddOperatorButtonText);
|
|
1032
|
+
|
|
1003
1033
|
var oAddBtn = new Button(this.getId() + "--addBtn", {
|
|
1004
1034
|
press: this.addCondition.bind(this),
|
|
1005
1035
|
type: ButtonType.Default,
|
|
@@ -1011,8 +1041,9 @@ sap.ui.define([
|
|
|
1011
1041
|
visibleS: {path: "$this>/conditions", formatter: _getAddButtonVisible.bind(this)},
|
|
1012
1042
|
visibleM: {path: "$this>/conditions", formatter: _getAddButtonVisible.bind(this)},
|
|
1013
1043
|
visibleL: {path: "$this>/conditions", formatter: _getAddButtonVisible.bind(this)},
|
|
1014
|
-
visibleXL: {path: "$this>/conditions", formatter: _getAddButtonVisible.bind(this)}})
|
|
1015
|
-
|
|
1044
|
+
visibleXL: {path: "$this>/conditions", formatter: _getAddButtonVisible.bind(this)}}),
|
|
1045
|
+
ariaDescribedBy: this._oInvisibleAddOperatorButtonText
|
|
1046
|
+
});
|
|
1016
1047
|
|
|
1017
1048
|
oGrid.addContent(oAddBtn);
|
|
1018
1049
|
|
|
@@ -1210,10 +1241,12 @@ sap.ui.define([
|
|
|
1210
1241
|
|
|
1211
1242
|
}
|
|
1212
1243
|
|
|
1213
|
-
function _getEditModeFromOperator(sOperator) {
|
|
1244
|
+
function _getEditModeFromOperator(sOperator, bInvalid) {
|
|
1214
1245
|
|
|
1215
1246
|
if (!sOperator) {
|
|
1216
1247
|
return EditMode.Display;
|
|
1248
|
+
} else if (bInvalid) {
|
|
1249
|
+
return EditMode.ReadOnly;
|
|
1217
1250
|
}
|
|
1218
1251
|
|
|
1219
1252
|
var oOperator = FilterOperatorUtil.getOperator(sOperator);
|
|
@@ -1231,7 +1264,7 @@ sap.ui.define([
|
|
|
1231
1264
|
|
|
1232
1265
|
var oOperator = sOperator && FilterOperatorUtil.getOperator(sOperator);
|
|
1233
1266
|
|
|
1234
|
-
if (!oOperator || !oOperator.valueTypes[0]) {
|
|
1267
|
+
if (!oOperator || !oOperator.valueTypes[0] || (oOperator.valueTypes[0] === Operator.ValueType.Static && !oOperator.getStaticText)) {
|
|
1235
1268
|
return "XL8 L8 M8 S0";
|
|
1236
1269
|
} else {
|
|
1237
1270
|
return "";
|
|
@@ -1309,6 +1342,10 @@ sap.ui.define([
|
|
|
1309
1342
|
if (oBindingContext) {
|
|
1310
1343
|
oOperatorField.setFieldGroupIds([oBindingContext.getPath()]); // use path to have a ID for every condition
|
|
1311
1344
|
}
|
|
1345
|
+
if (oOperatorField.getValueState() === ValueState.Error && !oCondition.invalid) {
|
|
1346
|
+
// remove error and show right value
|
|
1347
|
+
oOperatorField.setValue(oOperatorField.getValue());
|
|
1348
|
+
}
|
|
1312
1349
|
iIndex++;
|
|
1313
1350
|
|
|
1314
1351
|
var oRemoveButton = aGridContent[iIndex];
|
|
@@ -1323,8 +1360,7 @@ sap.ui.define([
|
|
|
1323
1360
|
var oValue0Field = aGridContent[iIndex];
|
|
1324
1361
|
var oValue1Field;
|
|
1325
1362
|
if (oValue0Field.hasOwnProperty("_iValueIndex") && oValue0Field._iValueIndex === 0) {
|
|
1326
|
-
|
|
1327
|
-
if (oCondition.values.length > 0 || sEditMode === EditMode.Display) { // as static text for display controls is created after update
|
|
1363
|
+
if (oCondition.values.length > 0) {
|
|
1328
1364
|
oValueBindingContext = this._oManagedObjectModel.getContext(oBindingContext.getPath() + "values/0/");
|
|
1329
1365
|
oValue0Field.setBindingContext(oValueBindingContext, "$this");
|
|
1330
1366
|
oValue0Field.setBindingContext(oBindingContext, "$condition");
|
|
@@ -1421,9 +1457,9 @@ sap.ui.define([
|
|
|
1421
1457
|
var oField2; // also update second Field if exist
|
|
1422
1458
|
var oCondition = oBindingContext.getObject();
|
|
1423
1459
|
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
|
|
1424
|
-
var bInvalid =
|
|
1460
|
+
var bInvalid = !!oCondition.invalid;
|
|
1425
1461
|
|
|
1426
|
-
if (oOperator.valueTypes.length > 0 && oOperator.valueTypes[0] !== Operator.ValueType.Static) {
|
|
1462
|
+
if (!bInvalid && oOperator.valueTypes.length > 0 && oOperator.valueTypes[0] !== Operator.ValueType.Static) {
|
|
1427
1463
|
// check only not static operators
|
|
1428
1464
|
if (oOperator.valueTypes.length > 1 && oOperator.valueTypes[1]) {
|
|
1429
1465
|
// two fields exist
|
|
@@ -1467,14 +1503,26 @@ sap.ui.define([
|
|
|
1467
1503
|
|
|
1468
1504
|
function _checkInvalidInput(bInvalid) {
|
|
1469
1505
|
|
|
1506
|
+
var i = 0;
|
|
1507
|
+
|
|
1470
1508
|
if (bInvalid !== true) {
|
|
1471
1509
|
// if already known that invalid input exist -> no additional check needed
|
|
1510
|
+
var aConditions = this.getConditions();
|
|
1511
|
+
for (i = 0; i < aConditions.length; i++) {
|
|
1512
|
+
if (aConditions[i].invalid) {
|
|
1513
|
+
bInvalid = true;
|
|
1514
|
+
break;
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
if (bInvalid !== true) {
|
|
1472
1520
|
var oGrid = this.byId("conditions");
|
|
1473
1521
|
var aContent = oGrid.getContent();
|
|
1474
1522
|
bInvalid = false;
|
|
1475
|
-
for (
|
|
1523
|
+
for (i = 0; i < aContent.length; i++) {
|
|
1476
1524
|
var oControl = aContent[i];
|
|
1477
|
-
if (oControl
|
|
1525
|
+
if (oControl.hasOwnProperty("_iValueIndex") && oControl.getValueState && oControl.getValueState() === ValueState.Error) {
|
|
1478
1526
|
bInvalid = true;
|
|
1479
1527
|
break;
|
|
1480
1528
|
}
|