@openui5/sap.ui.mdc 1.113.0 → 1.115.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 +0 -5
- package/README.md +22 -9
- package/THIRDPARTY.txt +1 -7
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +5 -7
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +5 -5
- package/src/sap/ui/mdc/BaseDelegate.js +49 -14
- package/src/sap/ui/mdc/Chart.js +147 -179
- package/src/sap/ui/mdc/ChartDelegate.js +404 -514
- package/src/sap/ui/mdc/ChartRenderer.js +11 -11
- package/src/sap/ui/mdc/Control.js +4 -4
- package/src/sap/ui/mdc/DefaultTypeMap.js +84 -0
- package/src/sap/ui/mdc/Element.js +4 -4
- package/src/sap/ui/mdc/Field.js +98 -96
- package/src/sap/ui/mdc/FilterBar.js +33 -56
- package/src/sap/ui/mdc/FilterBarDelegate.js +36 -69
- package/src/sap/ui/mdc/FilterField.js +93 -47
- package/src/sap/ui/mdc/Link.js +83 -82
- package/src/sap/ui/mdc/LinkDelegate.js +29 -48
- package/src/sap/ui/mdc/MultiValueField.js +34 -30
- package/src/sap/ui/mdc/Table.js +182 -193
- package/src/sap/ui/mdc/TableDelegate.js +244 -33
- package/src/sap/ui/mdc/ValueHelp.js +67 -50
- package/src/sap/ui/mdc/ValueHelpDelegate.js +57 -89
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +4 -12
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +192 -197
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +10 -20
- package/src/sap/ui/mdc/chart/ChartToolbar.js +50 -50
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +23 -27
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +10 -10
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +14 -14
- package/src/sap/ui/mdc/chart/Item.js +30 -17
- package/src/sap/ui/mdc/chart/PropertyHelper.js +10 -10
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +23 -15
- package/src/sap/ui/mdc/condition/Condition.js +11 -23
- package/src/sap/ui/mdc/condition/ConditionConverter.js +8 -8
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +2 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +771 -123
- package/src/sap/ui/mdc/condition/Operator.js +52 -50
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +14 -14
- package/src/sap/ui/mdc/condition/RangeOperator.js +3 -5
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +2 -2
- package/src/sap/ui/mdc/enum/ActionToolbarActionAlignment.js +5 -9
- package/src/sap/ui/mdc/enum/BaseType.js +15 -20
- package/src/sap/ui/mdc/enum/ConditionValidated.js +5 -9
- package/src/sap/ui/mdc/enum/ContentMode.js +1 -0
- package/src/sap/ui/mdc/enum/EditMode.js +7 -19
- package/src/sap/ui/mdc/enum/FieldDisplay.js +12 -18
- package/src/sap/ui/mdc/enum/FilterBarValidationStatus.js +3 -1
- package/src/sap/ui/mdc/enum/LinkType.js +40 -0
- package/src/sap/ui/mdc/enum/OperatorOverwrite.js +4 -2
- package/src/sap/ui/mdc/enum/OperatorValueType.js +47 -0
- package/src/sap/ui/mdc/enum/PersistenceMode.js +36 -36
- package/src/sap/ui/mdc/enum/ProcessingStrategy.js +3 -1
- package/src/sap/ui/mdc/enum/PropagationReason.js +1 -1
- package/src/sap/ui/mdc/enum/ReasonMode.js +1 -0
- package/src/sap/ui/mdc/enum/SelectType.js +1 -0
- package/src/sap/ui/mdc/enums/ActionToolbarActionAlignment.js +31 -0
- package/src/sap/ui/mdc/enums/BaseType.js +72 -0
- package/src/sap/ui/mdc/enums/ChartItemRoleType.js +61 -0
- package/src/sap/ui/mdc/enums/ChartItemType.js +31 -0
- package/src/sap/ui/mdc/enums/ChartP13nMode.js +48 -0
- package/src/sap/ui/mdc/enums/ChartToolbarActionType.js +49 -0
- package/src/sap/ui/mdc/enums/ConditionValidated.js +43 -0
- package/src/sap/ui/mdc/enums/ContentMode.js +74 -0
- package/src/sap/ui/mdc/enums/FieldDisplay.js +49 -0
- package/src/sap/ui/mdc/enums/FieldEditMode.js +55 -0
- package/src/sap/ui/mdc/enums/FilterBarP13nMode.js +36 -0
- package/src/sap/ui/mdc/enums/FilterBarValidationStatus.js +56 -0
- package/src/sap/ui/mdc/enums/LinkType.js +38 -0
- package/src/sap/ui/mdc/enums/OperatorOverwrite.js +34 -0
- package/src/sap/ui/mdc/enums/OperatorValueType.js +44 -0
- package/src/sap/ui/mdc/enums/PersistenceMode.js +44 -0
- package/src/sap/ui/mdc/enums/ProcessingStrategy.js +39 -0
- package/src/sap/ui/mdc/enums/ReasonMode.js +53 -0
- package/src/sap/ui/mdc/enums/TableGrowingMode.js +42 -0
- package/src/sap/ui/mdc/enums/TableMultiSelectMode.js +35 -0
- package/src/sap/ui/mdc/enums/TableP13nMode.js +54 -0
- package/src/sap/ui/mdc/enums/TableRowAction.js +30 -0
- package/src/sap/ui/mdc/enums/TableRowCountMode.js +36 -0
- package/src/sap/ui/mdc/enums/TableSelectionMode.js +45 -0
- package/src/sap/ui/mdc/enums/TableType.js +43 -0
- package/src/sap/ui/mdc/enums/ValueHelpPropagationReason.js +41 -0
- package/src/sap/ui/mdc/enums/ValueHelpSelectionType.js +46 -0
- package/src/sap/ui/mdc/field/ConditionType.js +120 -88
- package/src/sap/ui/mdc/field/ConditionsType.js +149 -44
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +15 -17
- package/src/sap/ui/mdc/field/FieldBase.js +512 -323
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +31 -114
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +4 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -21
- 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/ListFieldHelpItem.js +8 -29
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +2 -7
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +2 -6
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -1
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +0 -4
- package/src/sap/ui/mdc/field/content/BooleanContent.js +2 -2
- package/src/sap/ui/mdc/field/content/ContentFactory.js +47 -35
- package/src/sap/ui/mdc/field/content/DateContent.js +49 -43
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +2 -2
- package/src/sap/ui/mdc/field/content/DefaultContent.js +8 -8
- package/src/sap/ui/mdc/field/content/LinkContent.js +10 -6
- package/src/sap/ui/mdc/field/content/SearchContent.js +4 -4
- package/src/sap/ui/mdc/field/content/TimeContent.js +2 -2
- package/src/sap/ui/mdc/field/content/UnitContent.js +19 -11
- package/src/sap/ui/mdc/field/splitValue.js +45 -0
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +109 -218
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +22 -19
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +6 -7
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +2 -4
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +3 -7
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +52 -41
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -4
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +1 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +4 -2
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +14 -21
- package/src/sap/ui/mdc/filterbar/vh/FilterBarDelegate.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +2 -38
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +3 -3
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +11 -6
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +11 -2
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +25 -9
- package/src/sap/ui/mdc/flexibility/SortFlex.js +11 -1
- package/src/sap/ui/mdc/flexibility/Util.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +7 -4
- package/src/sap/ui/mdc/library.js +178 -84
- 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 +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +26 -5
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.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 +9 -0
- package/src/sap/ui/mdc/messagebundle_ar.properties +7 -1
- package/src/sap/ui/mdc/messagebundle_bg.properties +19 -13
- package/src/sap/ui/mdc/messagebundle_ca.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_el.properties +13 -7
- package/src/sap/ui/mdc/messagebundle_en.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +7 -1
- package/src/sap/ui/mdc/messagebundle_fr.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -4
- package/src/sap/ui/mdc/messagebundle_hi.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +15 -9
- package/src/sap/ui/mdc/messagebundle_hu.properties +8 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +10 -4
- package/src/sap/ui/mdc/messagebundle_iw.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +14 -8
- package/src/sap/ui/mdc/messagebundle_kk.properties +16 -10
- package/src/sap/ui/mdc/messagebundle_ko.properties +9 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +9 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +7 -1
- package/src/sap/ui/mdc/messagebundle_no.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +8 -2
- package/src/sap/ui/mdc/messagebundle_pt.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +8 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +19 -13
- package/src/sap/ui/mdc/messagebundle_tr.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +7 -1
- package/src/sap/ui/mdc/messagebundle_vi.properties +6 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -1
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +6 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +33 -14
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -5
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/TypeMap.js +155 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +42 -1
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +17 -11
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +5 -50
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +156 -44
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +70 -0
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -1
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +8 -9
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +380 -390
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +6 -19
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +43 -34
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +3 -4
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +4 -6
- package/src/sap/ui/mdc/table/Column.js +45 -17
- package/src/sap/ui/mdc/table/ColumnSettings.js +2 -5
- package/src/sap/ui/mdc/table/CreationRow.js +4 -6
- package/src/sap/ui/mdc/table/GridTableType.js +31 -115
- package/src/sap/ui/mdc/table/PropertyHelper.js +56 -11
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +2 -5
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +13 -84
- package/src/sap/ui/mdc/table/RowActionItem.js +9 -14
- package/src/sap/ui/mdc/table/RowSettings.js +2 -5
- package/src/sap/ui/mdc/table/TableSettings.js +23 -19
- package/src/sap/ui/mdc/table/TableTypeBase.js +43 -15
- package/src/sap/ui/mdc/table/TreeTableType.js +12 -32
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -5
- package/src/sap/ui/mdc/table/menu/Item.js +1 -1
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +3 -3
- package/src/sap/ui/mdc/table/utils/Personalization.js +4 -4
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +6 -6
- package/src/sap/ui/mdc/util/DateUtil.js +15 -11
- package/src/sap/ui/mdc/util/FilterUtil.js +44 -19
- package/src/sap/ui/mdc/util/IdentifierUtil.js +0 -1
- package/src/sap/ui/mdc/util/InfoBar.js +1 -2
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +15 -8
- package/src/sap/ui/mdc/util/TypeMap.js +377 -0
- package/src/sap/ui/mdc/util/TypeUtil.js +35 -2
- package/src/sap/ui/mdc/util/mapVersions.js +225 -0
- package/src/sap/ui/mdc/valuehelp/Dialog.js +52 -33
- package/src/sap/ui/mdc/valuehelp/Popover.js +33 -35
- package/src/sap/ui/mdc/valuehelp/base/Container.js +193 -62
- package/src/sap/ui/mdc/valuehelp/base/Content.js +134 -57
- package/src/sap/ui/mdc/{field → valuehelp/base}/DefineConditionPanel.js +426 -197
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -2
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +140 -47
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +11 -9
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +11 -20
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +26 -32
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +14 -17
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +60 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +194 -199
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -51
- package/test/sap/ui/mdc/testutils/opa/chart/AssertionsViz.js +4 -4
- package/test/sap/ui/mdc/testutils/opa/field/Actions.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/field/Assertions.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +4 -2
- package/test/sap/ui/mdc/testutils/opa/filterfield/Assertions.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/table/Actions.js +41 -70
- package/test/sap/ui/mdc/testutils/opa/valueHelp/doWait.js +1 -1
- package/src/sap/ui/mdc/designtime/p13n/PersistenceProvider.designtime.js +0 -21
- package/src/sap/ui/mdc/util/FormatUtil.js +0 -82
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Defines the row count mode of the GridTable.
|
|
13
|
+
*
|
|
14
|
+
* @enum {string}
|
|
15
|
+
* @alias sap.ui.mdc.enums.TableRowCountMode
|
|
16
|
+
* @since 1.115
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
var TableRowCountMode = {
|
|
20
|
+
/**
|
|
21
|
+
* The table automatically fills the height of the surrounding container.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
Auto: "Auto",
|
|
26
|
+
/**
|
|
27
|
+
* The table always has as many rows as defined in the <code>rowCount</code> property of <code>GridTableType</code>.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
Fixed: "Fixed"
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return TableRowCountMode;
|
|
35
|
+
|
|
36
|
+
}, /* bExport= */ true);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Defines the mode of the table.
|
|
13
|
+
*
|
|
14
|
+
* @enum {string}
|
|
15
|
+
* @alias sap.ui.mdc.enums.TableSelectionMode
|
|
16
|
+
* @since 1.115
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
var TableSelectionMode = {
|
|
20
|
+
/**
|
|
21
|
+
* No rows/items can be selected (default).
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
None: "None",
|
|
25
|
+
/**
|
|
26
|
+
* Only one row/item can be selected at a time.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
Single: "Single",
|
|
30
|
+
/**
|
|
31
|
+
* Only one row/item can be selected at a time. Should be used for navigation scenarios to indicate the navigated row/item. If this selection
|
|
32
|
+
* mode is used, no <code>rowPress</code> event is fired.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
SingleMaster: "SingleMaster",
|
|
36
|
+
/**
|
|
37
|
+
* Multiple rows/items can be selected at a time.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
Multi: "Multi"
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return TableSelectionMode;
|
|
44
|
+
|
|
45
|
+
}, /* bExport= */ true);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(function() {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Defines the type of table used in the MDC table.
|
|
13
|
+
*
|
|
14
|
+
* @enum {string}
|
|
15
|
+
* @alias sap.ui.mdc.enums.TableType
|
|
16
|
+
* @since 1.115
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
var TableType = {
|
|
20
|
+
/**
|
|
21
|
+
* Grid table ({@link sap.ui.table.Table} control) is used (default)
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
Table: "Table",
|
|
26
|
+
/**
|
|
27
|
+
* Tree table ({@link sap.ui.table.TreeTable} control) is used.
|
|
28
|
+
*
|
|
29
|
+
* @private
|
|
30
|
+
* @experimental
|
|
31
|
+
*/
|
|
32
|
+
TreeTable: "TreeTable",
|
|
33
|
+
/**
|
|
34
|
+
* Responsive table ({@link sap.m.Table} control) is used.
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
ResponsiveTable: "ResponsiveTable"
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return TableType;
|
|
42
|
+
|
|
43
|
+
}, /* bExport= */ true);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define(function () {
|
|
7
|
+
"use strict";
|
|
8
|
+
/**
|
|
9
|
+
* Enumeration of the propagation reason in the condition propagation callback of the {@link sap.ui.mdc.ValueHelp ValueHelp}
|
|
10
|
+
*
|
|
11
|
+
* @enum {string}
|
|
12
|
+
* @public
|
|
13
|
+
* @since 1.115
|
|
14
|
+
* @alias sap.ui.mdc.enums.ValueHelpPropagationReason
|
|
15
|
+
*/
|
|
16
|
+
var ValueHelpPropagationReason = {
|
|
17
|
+
/**
|
|
18
|
+
* Triggered by connected control after processing valuehelp output
|
|
19
|
+
*
|
|
20
|
+
* @private
|
|
21
|
+
* @ui5-restricted sap.fe
|
|
22
|
+
*/
|
|
23
|
+
ControlChange: "ControlChange",
|
|
24
|
+
/**
|
|
25
|
+
* Triggered by <code>ValueHelp</code> itself on selection
|
|
26
|
+
*
|
|
27
|
+
* @private
|
|
28
|
+
* @ui5-restricted sap.fe
|
|
29
|
+
*/
|
|
30
|
+
Select: "Select",
|
|
31
|
+
/**
|
|
32
|
+
* Triggered by <code>ValueHelp</code> itself on <code>getItemForValue</code>
|
|
33
|
+
*
|
|
34
|
+
* @private
|
|
35
|
+
* @ui5-restricted sap.fe
|
|
36
|
+
*/
|
|
37
|
+
Info: "Info"
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return ValueHelpPropagationReason;
|
|
41
|
+
}, /* bExport= */ true);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides enumeration sap.ui.mdc.enums.ValueHelpSelectionType
|
|
8
|
+
sap.ui.define(function() {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Enumeration of the possible selection types
|
|
14
|
+
*
|
|
15
|
+
* @enum {string}
|
|
16
|
+
* @private
|
|
17
|
+
* @ui5-restricted sap.ui.mdc
|
|
18
|
+
* @since 1.115
|
|
19
|
+
* @alias sap.ui.mdc.enums.ValueHelpSelectionType
|
|
20
|
+
*/
|
|
21
|
+
var ValueHelpSelectionType = {
|
|
22
|
+
/**
|
|
23
|
+
* The given conditions are set and replace the existing ones.
|
|
24
|
+
* @private
|
|
25
|
+
* @ui5-restricted sap.ui.mdc
|
|
26
|
+
*/
|
|
27
|
+
Set: "Set",
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The given conditions are just added to the existing ones, if they don't already exist.
|
|
31
|
+
* @private
|
|
32
|
+
* @ui5-restricted sap.ui.mdc
|
|
33
|
+
*/
|
|
34
|
+
Add: "Add",
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The given conditions are removed.
|
|
38
|
+
* @private
|
|
39
|
+
* @ui5-restricted sap.ui.mdc
|
|
40
|
+
*/
|
|
41
|
+
Remove: "Remove"
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return ValueHelpSelectionType;
|
|
45
|
+
|
|
46
|
+
}, /* bExport= */ true);
|
|
@@ -11,13 +11,13 @@ sap.ui.define([
|
|
|
11
11
|
'sap/ui/model/ParseException',
|
|
12
12
|
'sap/ui/model/ValidateException',
|
|
13
13
|
'sap/ui/model/type/String',
|
|
14
|
-
'sap/ui/mdc/
|
|
14
|
+
'sap/ui/mdc/enums/FieldDisplay',
|
|
15
|
+
'sap/ui/mdc/enums/OperatorValueType',
|
|
15
16
|
'sap/ui/mdc/condition/FilterOperatorUtil',
|
|
16
|
-
'sap/ui/mdc/condition/Operator',
|
|
17
17
|
'sap/ui/mdc/condition/Condition',
|
|
18
18
|
'sap/ui/mdc/condition/ConditionValidateException',
|
|
19
|
-
'sap/ui/mdc/
|
|
20
|
-
'sap/ui/mdc/
|
|
19
|
+
'sap/ui/mdc/enums/BaseType',
|
|
20
|
+
'sap/ui/mdc/enums/ConditionValidated',
|
|
21
21
|
'sap/base/util/merge',
|
|
22
22
|
'sap/base/strings/whitespaceReplacer',
|
|
23
23
|
'sap/ui/base/SyncPromise'
|
|
@@ -29,8 +29,8 @@ sap.ui.define([
|
|
|
29
29
|
ValidateException,
|
|
30
30
|
StringType,
|
|
31
31
|
FieldDisplay,
|
|
32
|
+
OperatorValueType,
|
|
32
33
|
FilterOperatorUtil,
|
|
33
|
-
Operator,
|
|
34
34
|
Condition,
|
|
35
35
|
ConditionValidateException,
|
|
36
36
|
BaseType,
|
|
@@ -48,30 +48,28 @@ sap.ui.define([
|
|
|
48
48
|
* Constructor for a Condition type.
|
|
49
49
|
*
|
|
50
50
|
* @class
|
|
51
|
-
* This class represents a type that is used to map a single condition to a single-value control
|
|
51
|
+
* This class represents a type that is used to map a single condition to a single-value control.
|
|
52
52
|
*
|
|
53
53
|
* @extends sap.ui.model.SimpleType
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.115.0
|
|
57
57
|
*
|
|
58
58
|
* @since 1.62.0
|
|
59
|
-
* @
|
|
60
|
-
* @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
|
|
61
|
-
* @MDC_PUBLIC_CANDIDATE
|
|
59
|
+
* @public
|
|
62
60
|
*
|
|
63
61
|
* @param {object} [oFormatOptions] Formatting options
|
|
64
62
|
* @param {sap.ui.model.Type} [oFormatOptions.valueType] Type of the value of the condition (used for formatting, parsing and validating)
|
|
65
63
|
* @param {string[]} [oFormatOptions.operators] Possible operators to be used in the condition
|
|
66
|
-
* @param {sap.ui.mdc.
|
|
67
|
-
* @param {string} [oFormatOptions.
|
|
64
|
+
* @param {sap.ui.mdc.enums.FieldDisplay} [oFormatOptions.display] DisplayFormat used to visualize a value
|
|
65
|
+
* @param {string} [oFormatOptions.valueHelpID] ID of the value help to determine the key and description
|
|
68
66
|
* @param {boolean} [oFormatOptions.hideOperator] If set, only the value of the condition is shown, but no operator. (Use it only if just one operator is supported.)
|
|
69
67
|
* @param {int} [oFormatOptions.maxConditions] Maximum number of allowed conditions
|
|
70
68
|
* @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)
|
|
71
69
|
* @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>
|
|
72
|
-
* @param {sap.ui.model.Type} [oFormatOptions.additionalType] additional
|
|
73
|
-
* @param {sap.ui.model.Type[]} [oFormatOptions.compositeTypes] additional
|
|
74
|
-
* @param {function} [oFormatOptions.getConditions] Function to get the existing conditions of the field.
|
|
70
|
+
* @param {sap.ui.model.Type} [oFormatOptions.additionalType] additional type used on other part of a field. (For example, for unit fields.)
|
|
71
|
+
* @param {sap.ui.model.Type[]} [oFormatOptions.compositeTypes] additional types used for parts of a <code>CompositeType</code>
|
|
72
|
+
* @param {function} [oFormatOptions.getConditions] Function to get the existing conditions of the field.
|
|
75
73
|
* @param {function} [oFormatOptions.asyncParsing] Callback function to tell the <code>Field</code> the parsing is asynchronous.
|
|
76
74
|
* @param {sap.ui.mdc.condition.ConditionObject} [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
|
|
77
75
|
* @param {object} [oFormatOptions.delegate] Field delegate to handle model-specific logic
|
|
@@ -79,7 +77,7 @@ sap.ui.define([
|
|
|
79
77
|
* @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
|
|
80
78
|
* @param {string} [oFormatOptions.defaultOperatorName] Name of the default <code>Operator</code>
|
|
81
79
|
* @param {boolean} [oFormatOptions.convertWhitespaces] If set, whitespaces will be replaced by special characters to display whitespaces in HTML
|
|
82
|
-
* @param {sap.ui.core.Control} [oFormatOptions.control] Instance
|
|
80
|
+
* @param {sap.ui.core.Control} [oFormatOptions.control] Instance of the calling control
|
|
83
81
|
* @param {object} [oConstraints] Value constraints
|
|
84
82
|
* @alias sap.ui.mdc.field.ConditionType
|
|
85
83
|
*/
|
|
@@ -109,24 +107,22 @@ sap.ui.define([
|
|
|
109
107
|
|
|
110
108
|
/**
|
|
111
109
|
* Formats the given condition to an output value of the given target type.
|
|
112
|
-
*
|
|
113
|
-
* and the configuration (set in <code>FormatOptions</code>) a description will be determined
|
|
110
|
+
* These values are formatted using the given data type. Depending on the operator
|
|
111
|
+
* and the configuration (set in <code>FormatOptions</code>), a description will be determined by a given value help or delegate.
|
|
114
112
|
*
|
|
115
113
|
* @param {sap.ui.mdc.condition.ConditionObject} oCondition
|
|
116
114
|
* The condition to be formatted
|
|
117
115
|
* @param {string} sTargetType
|
|
118
|
-
* The target type; see {@link topic:ac56d92162ed47ff858fdf1ce26c18c4 Allowed Property Types}
|
|
119
|
-
* In addition to the standard target types <code>sap.ui.mdc.raw</code> can be used. In this case the value is not formatted and just
|
|
120
|
-
* forwarded to the target. If the value is an array representing data for a <code>CompositeType</code
|
|
121
|
-
* name (For example if a unit should be forwarded as raw value <code>sap.ui.mdc.raw:1</code> can be used).
|
|
116
|
+
* The target type; see {@link topic:ac56d92162ed47ff858fdf1ce26c18c4 Allowed Property Types}.
|
|
117
|
+
* In addition to the standard target types, <code>sap.ui.mdc.raw</code> can be used. In this case the value is not formatted and just
|
|
118
|
+
* forwarded to the target. If the value is an array representing data for a <code>CompositeType</code>, the index of the needed raw value can be added to the
|
|
119
|
+
* name (For example, if a unit should be forwarded as raw value, <code>sap.ui.mdc.raw:1</code> can be used).
|
|
122
120
|
* @return {any|Promise}
|
|
123
121
|
* The formatted output value or a <code>Promise</code> resolving with the formatted value
|
|
124
122
|
* @throws {sap.ui.model.FormatException}
|
|
125
123
|
* If formatting to the target type is not possible
|
|
126
124
|
*
|
|
127
|
-
* @
|
|
128
|
-
* @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
|
|
129
|
-
* @MDC_PUBLIC_CANDIDATE
|
|
125
|
+
* @public
|
|
130
126
|
*/
|
|
131
127
|
ConditionType.prototype.formatValue = function(oCondition, sTargetType) {
|
|
132
128
|
|
|
@@ -289,40 +285,70 @@ sap.ui.define([
|
|
|
289
285
|
/**
|
|
290
286
|
* Parses an external value of the given source type to a condition that holds the value in model
|
|
291
287
|
* representation.
|
|
292
|
-
* These values are parsed using the given data type. Depending
|
|
293
|
-
* and the configuration (set in <code>FormatOptions</code>) a value will be determined
|
|
288
|
+
* These values are parsed using the given data type. Depending on the operator
|
|
289
|
+
* and the configuration (set in <code>FormatOptions</code>), a value will be determined by a given value help or delegate.
|
|
294
290
|
*
|
|
295
291
|
* @param {any} vValue
|
|
296
|
-
* The value
|
|
292
|
+
* The value that is parsed
|
|
297
293
|
* @param {string} sSourceType
|
|
298
294
|
* The type of the given value; see
|
|
299
295
|
* {@link topic:ac56d92162ed47ff858fdf1ce26c18c4 Allowed Property Types}
|
|
300
|
-
* In addition to the standard source types <code>sap.ui.mdc.raw</code> can be used. In this case the value is not parsed and just
|
|
301
|
-
* used in the condition. If the value of the condition is an array representing data for a <code>CompositeType</code
|
|
302
|
-
* name (For example if a unit should be forwarded as raw value <code>sap.ui.mdc.raw:1</code> can be used).
|
|
296
|
+
* In addition to the standard source types, <code>sap.ui.mdc.raw</code> can be used. In this case the value is not parsed and just
|
|
297
|
+
* used in the condition. If the value of the condition is an array representing data for a <code>CompositeType</code>, the index of the needed raw value can be added to the
|
|
298
|
+
* name (For example, if a unit should be forwarded as raw value <code>sap.ui.mdc.raw:1</code> can be used).
|
|
303
299
|
* @return {null|sap.ui.mdc.condition.ConditionObject|Promise<null|sap.ui.mdc.condition.ConditionObject>}
|
|
304
300
|
* The condition or a <code>Promise</code> resolving with the condition.
|
|
305
|
-
* If there is no value <code>null</code> is returned.
|
|
301
|
+
* If there is no value, <code>null</code> is returned.
|
|
306
302
|
* @throws {sap.ui.model.ParseException}
|
|
307
|
-
* If parsing to the model type is not possible; the message of the exception is language
|
|
308
|
-
* dependent as it may be displayed on the UI
|
|
303
|
+
* If parsing to the model type is not possible; the message of the exception is language-dependent as it may be displayed on the UI
|
|
309
304
|
*
|
|
310
|
-
* @
|
|
311
|
-
* @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
|
|
312
|
-
* @MDC_PUBLIC_CANDIDATE
|
|
305
|
+
* @public
|
|
313
306
|
*/
|
|
314
307
|
ConditionType.prototype.parseValue = function(vValue, sSourceType) {
|
|
315
308
|
|
|
316
|
-
|
|
317
|
-
return null;
|
|
318
|
-
}
|
|
319
|
-
|
|
309
|
+
var bInputValidationEnabled = _isInputValidationEnabled.call(this);
|
|
320
310
|
if (!sSourceType) {
|
|
321
311
|
sSourceType = "string";
|
|
322
312
|
} else if (sSourceType === "any" && typeof vValue === "string") {
|
|
323
313
|
sSourceType = "string";
|
|
324
314
|
}
|
|
325
315
|
|
|
316
|
+
return this._parseValue(vValue, sSourceType, bInputValidationEnabled);
|
|
317
|
+
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// own function as API for parseValue cannot be extended by inherited class
|
|
321
|
+
/**
|
|
322
|
+
* Parses an external value of the given source type to a condition that holds the value in model
|
|
323
|
+
* representation.
|
|
324
|
+
* These values are parsed using the given data type. Depending on the operator
|
|
325
|
+
* and the configuration (set in <code>FormatOptions</code>) a value will be determined by a given value help or delegate.
|
|
326
|
+
*
|
|
327
|
+
* @param {any} vValue
|
|
328
|
+
* The value that is parsed
|
|
329
|
+
* @param {string} sSourceType
|
|
330
|
+
* The type of the given value; see
|
|
331
|
+
* {@link topic:ac56d92162ed47ff858fdf1ce26c18c4 Allowed Property Types}
|
|
332
|
+
* In addition to the standard source types, <code>sap.ui.mdc.raw</code> can be used. In this case the value is not parsed and just
|
|
333
|
+
* used in the condition. If the value of the condition is an array representing data for a <code>CompositeType</code> ,the index of the needed raw value can be added to the
|
|
334
|
+
* name (For example, if a unit should be forwarded as raw value <code>sap.ui.mdc.raw:1</code> can be used).
|
|
335
|
+
* @param {boolean} bInputValidationEnabled
|
|
336
|
+
* If set, input validation is enabled, otherwise disabled, even if delegate or ValueHelp allows it. (Pasting multiple values)
|
|
337
|
+
* @return {null|sap.ui.mdc.condition.ConditionObject|Promise<null|sap.ui.mdc.condition.ConditionObject>}
|
|
338
|
+
* The condition or a <code>Promise</code> resolving with the condition.
|
|
339
|
+
* If there is no value, <code>null</code> is returned.
|
|
340
|
+
* @throws {sap.ui.model.ParseException}
|
|
341
|
+
* If parsing to the model type is not possible; the message of the exception is language-dependent as it may be displayed on the UI
|
|
342
|
+
*
|
|
343
|
+
* @private
|
|
344
|
+
* @ui5-restricted sap.ui.mdc.field.ConditionsType
|
|
345
|
+
*/
|
|
346
|
+
ConditionType.prototype._parseValue = function(vValue, sSourceType, bInputValidationEnabled) {
|
|
347
|
+
|
|
348
|
+
if (this._bDestroyed) { // if destroyed do nothing
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
|
|
326
352
|
var oNavigateCondition = this.oFormatOptions.navigateCondition;
|
|
327
353
|
if (oNavigateCondition) {
|
|
328
354
|
// condition already known from navigation. Just check if it is really the same as the input.
|
|
@@ -333,14 +359,13 @@ sap.ui.define([
|
|
|
333
359
|
}
|
|
334
360
|
|
|
335
361
|
var sDisplay = _getDisplay.call(this);
|
|
336
|
-
var bInputValidationEnabled = _isInputValidationEnabled.call(this);
|
|
337
362
|
var oType = _getValueType.call(this);
|
|
338
363
|
var oOriginalType = _getOriginalType.call(this);
|
|
339
364
|
var aOperators = _getOperators.call(this);
|
|
340
365
|
var bIsUnit = _isUnit(oType);
|
|
341
366
|
var sDefaultOperator;
|
|
342
367
|
|
|
343
|
-
if (vValue === null || vValue === undefined || (vValue === "" && !bInputValidationEnabled)) { // check if "" is a key in
|
|
368
|
+
if (vValue === null || vValue === undefined || (vValue === "" && !bInputValidationEnabled)) { // check if "" is a key in ValueHelp
|
|
344
369
|
if (!_isCompositeType.call(this, oType)) {
|
|
345
370
|
return null; // TODO: for all types???
|
|
346
371
|
}
|
|
@@ -366,7 +391,7 @@ sap.ui.define([
|
|
|
366
391
|
oOperator = _getDefaultOperator.call(this, aOperators, oType);
|
|
367
392
|
|
|
368
393
|
if (bInputValidationEnabled && !_isCompositeType.call(this, oType)) {
|
|
369
|
-
// try first to use EQ and find it in
|
|
394
|
+
// try first to use EQ and find it in ValueHelp. If not found try later with default operator
|
|
370
395
|
var oEQOperator = FilterOperatorUtil.getEQOperator(aOperators);
|
|
371
396
|
if (aOperators.indexOf(oEQOperator.name) >= 0) { // as EQ is returned if not in List
|
|
372
397
|
bCheckForDefault = !!oOperator && oOperator.name !== oEQOperator.name; // only if default operator exists and is different
|
|
@@ -398,7 +423,7 @@ sap.ui.define([
|
|
|
398
423
|
var iCallCount = this._oCalls.last;
|
|
399
424
|
|
|
400
425
|
if ((!bCompositeType || bIsUnit) && oOperator.validateInput && bInputValidationEnabled) {
|
|
401
|
-
// use
|
|
426
|
+
// use ValueHelp to determine condition (for unit part also if composite type used)
|
|
402
427
|
oCondition = _parseDetermineKeyAndDescription.call(this, oOperator, vValue, oType, bUseDefaultOperator, bCheckForDefault, aOperators, sDisplay, true);
|
|
403
428
|
if (oCondition instanceof Promise) {
|
|
404
429
|
return _fnReturnPromise.call(this, oCondition);
|
|
@@ -483,12 +508,12 @@ sap.ui.define([
|
|
|
483
508
|
var oFormatOptions = oOriginalType.getFormatOptions();
|
|
484
509
|
var oConstraints = oOriginalType.getConstraints();
|
|
485
510
|
var oDelegate = this.oFormatOptions.delegate;
|
|
486
|
-
var
|
|
487
|
-
var sBaseType = oDelegate && oDelegate.
|
|
511
|
+
var oField = this.oFormatOptions.control;
|
|
512
|
+
var sBaseType = oDelegate && oDelegate.getTypeMap(oField).getBaseType(sName, oFormatOptions, oConstraints); // don't use _getBaseType to get "real" unit type
|
|
488
513
|
if ((sBaseType === BaseType.Unit || sBaseType === BaseType.DateTime) &&
|
|
489
514
|
!oCondition.values[0][1] && oType._aCurrentValue) {
|
|
490
515
|
// TODO: if no unit provided use last one
|
|
491
|
-
var sUnit = oType._aCurrentValue[1] ? oType._aCurrentValue[1]
|
|
516
|
+
var sUnit = oType._aCurrentValue[1] === undefined ? null : oType._aCurrentValue[1]; // undefined in CompositeType means "not changed" -> if no current unit it needs to be null
|
|
492
517
|
oCondition.values[0][1] = sUnit;
|
|
493
518
|
if (oCondition.operator === "BT") {
|
|
494
519
|
oCondition.values[1][1] = sUnit;
|
|
@@ -560,7 +585,7 @@ sap.ui.define([
|
|
|
560
585
|
var fnSuccess = function(oResult) {
|
|
561
586
|
if (oResult) {
|
|
562
587
|
var aValues = [oResult.key];
|
|
563
|
-
if (oOperator.valueTypes.length > 1 && oOperator.valueTypes[1] !==
|
|
588
|
+
if (oOperator.valueTypes.length > 1 && oOperator.valueTypes[1] !== OperatorValueType.Static) {
|
|
564
589
|
// description is supported
|
|
565
590
|
aValues.push(oResult.description);
|
|
566
591
|
}
|
|
@@ -569,7 +594,7 @@ sap.ui.define([
|
|
|
569
594
|
// no empty key -> no condition
|
|
570
595
|
return null;
|
|
571
596
|
} else {
|
|
572
|
-
//
|
|
597
|
+
// ValueHelp might not fire an exception if nothing found -> but handle this as error
|
|
573
598
|
return fnError.call(this, new ParseException(this._oResourceBundle.getText("valuehelp.VALUE_NOT_EXIST", [vValue])));// use original value in message
|
|
574
599
|
}
|
|
575
600
|
};
|
|
@@ -635,7 +660,7 @@ sap.ui.define([
|
|
|
635
660
|
var oCondition;
|
|
636
661
|
|
|
637
662
|
if (oOperator && aOperators.indexOf(oOperator.name) >= 0) {
|
|
638
|
-
oCondition = oOperator.getCondition(vValue, oType, FieldDisplay.Value, true); // use Value as displayFormat if nothing found in
|
|
663
|
+
oCondition = oOperator.getCondition(vValue, oType, FieldDisplay.Value, true); // use Value as displayFormat if nothing found in ValueHelp
|
|
639
664
|
oCondition.validated = ConditionValidated.NotValidated;
|
|
640
665
|
}
|
|
641
666
|
|
|
@@ -684,16 +709,14 @@ sap.ui.define([
|
|
|
684
709
|
* Validates a given condition. The values of the condition are validated using the given data type.
|
|
685
710
|
*
|
|
686
711
|
* @param {sap.ui.mdc.condition.ConditionObject} oCondition
|
|
687
|
-
* The condition
|
|
712
|
+
* The condition that is validated
|
|
688
713
|
* @returns {void|Promise}
|
|
689
714
|
* <code>undefined</code> or a <code>Promise</code> resolving with an undefined value
|
|
690
715
|
* @throws {sap.ui.mdc.condition.ConditionValidateException}
|
|
691
716
|
* If at least one of the values of the condition is not valid for the given data type; the message of the exception is
|
|
692
|
-
* language
|
|
717
|
+
* language-dependent as it may be displayed on the UI
|
|
693
718
|
*
|
|
694
|
-
* @
|
|
695
|
-
* @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
|
|
696
|
-
* @MDC_PUBLIC_CANDIDATE
|
|
719
|
+
* @public
|
|
697
720
|
*/
|
|
698
721
|
ConditionType.prototype.validateValue = function(oCondition) {
|
|
699
722
|
|
|
@@ -711,16 +734,31 @@ sap.ui.define([
|
|
|
711
734
|
// check if type allows to be null
|
|
712
735
|
if (FilterOperatorUtil.onlyEQ(aOperators)) {
|
|
713
736
|
// TODO: also for FilterField case?
|
|
737
|
+
var vCheckValue = null;
|
|
714
738
|
try {
|
|
715
739
|
if (oType.hasOwnProperty("_sParsedEmptyString") && oType._sParsedEmptyString !== null) { //TODO: find solution for all types
|
|
716
740
|
// empty string is parsed as empty string or "0", so validate for this
|
|
717
|
-
oType.
|
|
718
|
-
} else {
|
|
719
|
-
oType.validateValue(null);
|
|
741
|
+
vCheckValue = oType._sParsedEmptyString;
|
|
720
742
|
}
|
|
743
|
+
oType.validateValue(vCheckValue);
|
|
721
744
|
} catch (oException) {
|
|
722
745
|
if (oException instanceof ValidateException) {
|
|
723
|
-
|
|
746
|
+
try {
|
|
747
|
+
if (oOriginalType && !bCompositeType) {
|
|
748
|
+
// As internal yyyy-MM-dd is used as pattern for dates (times similar) the
|
|
749
|
+
// ValidateException might contain this as pattern. The user should see the pattern thats shown
|
|
750
|
+
// So try to validate date with the original type to get ValidateException with right pattern.
|
|
751
|
+
// Not for CompositeTypes as here the parts might have different configuartion what leads to different messages.
|
|
752
|
+
oOriginalType.validateValue(vCheckValue);
|
|
753
|
+
}
|
|
754
|
+
throw oException;
|
|
755
|
+
} catch (oException) {
|
|
756
|
+
if (oException instanceof ValidateException) {
|
|
757
|
+
// add condition to exception to improve mapping in FieldBase handleValidationError
|
|
758
|
+
throw new ConditionValidateException(oException.message, oException.violatedConstraints, null);
|
|
759
|
+
}
|
|
760
|
+
throw oException;
|
|
761
|
+
}
|
|
724
762
|
} else {
|
|
725
763
|
//validation breaks with runtime error -> just ignore
|
|
726
764
|
//TODO: is this the right way?
|
|
@@ -826,13 +864,13 @@ sap.ui.define([
|
|
|
826
864
|
|
|
827
865
|
}
|
|
828
866
|
|
|
829
|
-
function
|
|
867
|
+
function _getValueHelp() {
|
|
830
868
|
|
|
831
|
-
var sID = this.oFormatOptions.
|
|
869
|
+
var sID = this.oFormatOptions.valueHelpID;
|
|
832
870
|
if (sID) {
|
|
833
|
-
var
|
|
834
|
-
if (
|
|
835
|
-
return
|
|
871
|
+
var oValueHelp = sap.ui.getCore().byId(sID);
|
|
872
|
+
if (oValueHelp && oValueHelp.isValidationSupported()) {
|
|
873
|
+
return oValueHelp;
|
|
836
874
|
}
|
|
837
875
|
}
|
|
838
876
|
|
|
@@ -937,8 +975,8 @@ sap.ui.define([
|
|
|
937
975
|
var oFormatOptions = oType.getFormatOptions();
|
|
938
976
|
var oConstraints = oType.getConstraints();
|
|
939
977
|
var oDelegate = this.oFormatOptions.delegate;
|
|
940
|
-
var
|
|
941
|
-
var sBaseType = oDelegate ? oDelegate.
|
|
978
|
+
var oField = this.oFormatOptions.control;
|
|
979
|
+
var sBaseType = oDelegate ? oDelegate.getTypeMap(oField).getBaseType(sType, oFormatOptions, oConstraints) : BaseType.String;
|
|
942
980
|
|
|
943
981
|
if (sBaseType === BaseType.Unit) {
|
|
944
982
|
sBaseType = BaseType.Numeric;
|
|
@@ -950,28 +988,26 @@ sap.ui.define([
|
|
|
950
988
|
|
|
951
989
|
function _isInputValidationEnabled() {
|
|
952
990
|
|
|
953
|
-
var
|
|
991
|
+
var oValueHelp = _getValueHelp.call(this);
|
|
954
992
|
var oDelegate = this.oFormatOptions.delegate;
|
|
955
|
-
var oPayload = this.oFormatOptions.payload;
|
|
956
993
|
|
|
957
994
|
if (oDelegate) {
|
|
958
|
-
return oDelegate.isInputValidationEnabled(
|
|
995
|
+
return oDelegate.isInputValidationEnabled(this.oFormatOptions.control, oValueHelp);
|
|
959
996
|
} else {
|
|
960
|
-
return !!
|
|
997
|
+
return !!oValueHelp;
|
|
961
998
|
}
|
|
962
999
|
|
|
963
1000
|
}
|
|
964
1001
|
|
|
965
1002
|
function _isInvalidInputAllowed() {
|
|
966
1003
|
|
|
967
|
-
var
|
|
1004
|
+
var oValueHelp = _getValueHelp.call(this);
|
|
968
1005
|
var oDelegate = this.oFormatOptions.delegate;
|
|
969
|
-
var oPayload = this.oFormatOptions.payload;
|
|
970
1006
|
|
|
971
1007
|
if (oDelegate) {
|
|
972
|
-
return oDelegate.isInvalidInputAllowed(
|
|
973
|
-
} else if (
|
|
974
|
-
return !
|
|
1008
|
+
return oDelegate.isInvalidInputAllowed(this, oValueHelp);
|
|
1009
|
+
} else if (oValueHelp) {
|
|
1010
|
+
return !oValueHelp.getValidateInput();
|
|
975
1011
|
} else {
|
|
976
1012
|
return true;
|
|
977
1013
|
}
|
|
@@ -980,16 +1016,13 @@ sap.ui.define([
|
|
|
980
1016
|
|
|
981
1017
|
function _getItemForValue(vValue, vParsedValue, oType, oBindingContext, bCheckKey, bCheckDescription) {
|
|
982
1018
|
|
|
983
|
-
var
|
|
1019
|
+
var oValueHelp = _getValueHelp.call(this);
|
|
984
1020
|
var oDelegate = this.oFormatOptions.delegate;
|
|
985
|
-
var oPayload = this.oFormatOptions.payload;
|
|
986
1021
|
var oControl = this.oFormatOptions.control;
|
|
987
1022
|
var oConfig = {
|
|
988
1023
|
value: vValue,
|
|
989
1024
|
parsedValue: vParsedValue,
|
|
990
1025
|
dataType: oType,
|
|
991
|
-
inParameters: undefined, // TODO: needed?
|
|
992
|
-
outParameters: undefined, // TODO: needed?
|
|
993
1026
|
bindingContext: oBindingContext,
|
|
994
1027
|
checkKey: bCheckKey,
|
|
995
1028
|
checkDescription: bCheckDescription,
|
|
@@ -998,22 +1031,21 @@ sap.ui.define([
|
|
|
998
1031
|
};
|
|
999
1032
|
|
|
1000
1033
|
if (oDelegate) {
|
|
1001
|
-
return oDelegate.getItemForValue(
|
|
1002
|
-
} else if (
|
|
1003
|
-
return
|
|
1034
|
+
return oDelegate.getItemForValue(oControl, oValueHelp, oConfig);
|
|
1035
|
+
} else if (oValueHelp) {
|
|
1036
|
+
return oValueHelp.getItemForValue(oConfig);
|
|
1004
1037
|
}
|
|
1005
1038
|
|
|
1006
1039
|
}
|
|
1007
1040
|
|
|
1008
1041
|
function _getDescription(vKey, oCondition, oType, oBindingContext) {
|
|
1009
1042
|
|
|
1010
|
-
var
|
|
1043
|
+
var oValueHelp = _getValueHelp.call(this);
|
|
1011
1044
|
var oDelegate = this.oFormatOptions.delegate;
|
|
1012
|
-
var oPayload = this.oFormatOptions.payload;
|
|
1013
1045
|
var oControl = this.oFormatOptions.control;
|
|
1014
1046
|
if (oDelegate) {
|
|
1015
|
-
return oDelegate.getDescription(
|
|
1016
|
-
} else if (
|
|
1047
|
+
return oDelegate.getDescription(oControl, oValueHelp, vKey, oCondition.inParameters, oCondition.outParameters, oBindingContext, undefined, undefined, oCondition.payload, oControl, oType);
|
|
1048
|
+
} else if (oValueHelp) {
|
|
1017
1049
|
var oConfig = {
|
|
1018
1050
|
value: vKey,
|
|
1019
1051
|
parsedValue: vKey,
|
|
@@ -1026,7 +1058,7 @@ sap.ui.define([
|
|
|
1026
1058
|
exception: FormatException,
|
|
1027
1059
|
control: oControl
|
|
1028
1060
|
};
|
|
1029
|
-
return
|
|
1061
|
+
return oValueHelp.getItemForValue(oConfig);
|
|
1030
1062
|
}
|
|
1031
1063
|
|
|
1032
1064
|
}
|