@openui5/sap.ui.mdc 1.97.1 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +15 -22
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +6 -3
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
- package/src/sap/ui/mdc/BaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1128 -1806
- package/src/sap/ui/mdc/ChartDelegate.js +454 -250
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +11 -6
- package/src/sap/ui/mdc/Element.js +10 -6
- package/src/sap/ui/mdc/Field.js +19 -4
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +50 -9
- package/src/sap/ui/mdc/Link.js +25 -6
- package/src/sap/ui/mdc/LinkDelegate.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +30 -6
- package/src/sap/ui/mdc/Table.js +151 -102
- package/src/sap/ui/mdc/TableDelegate.js +68 -13
- package/src/sap/ui/mdc/ValueHelp.js +26 -11
- package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +60 -17
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +10 -10
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +43 -254
- package/src/sap/ui/mdc/chart/Item.js +62 -92
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +388 -67
- package/src/sap/ui/mdc/condition/Operator.js +4 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
- package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
- package/src/sap/ui/mdc/designtime/Util.js +63 -0
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +83 -5
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +81 -5
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +35 -8
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +17 -6
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +88 -29
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +77 -20
- package/src/sap/ui/mdc/field/FieldBase.js +93 -16
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
- package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +5 -2
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
- package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
- package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +285 -208
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +132 -56
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +43 -19
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +27 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
- package/src/sap/ui/mdc/library.js +54 -44
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +2 -2
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +140 -177
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +57 -2
- package/src/sap/ui/mdc/messagebundle_ar.properties +39 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +54 -19
- package/src/sap/ui/mdc/messagebundle_ca.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +52 -17
- package/src/sap/ui/mdc/messagebundle_cy.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +44 -9
- package/src/sap/ui/mdc/messagebundle_de.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +61 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +51 -16
- package/src/sap/ui/mdc/messagebundle_et.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +43 -8
- package/src/sap/ui/mdc/messagebundle_fr.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +53 -18
- package/src/sap/ui/mdc/messagebundle_iw.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_lt.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_ms.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +42 -7
- package/src/sap/ui/mdc/messagebundle_no.properties +45 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_pt.properties +44 -9
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +39 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +40 -5
- package/src/sap/ui/mdc/messagebundle_tr.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_vi.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +37 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +30 -15
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -142
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +14 -17
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +106 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +117 -123
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +3 -5
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +459 -351
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +51 -30
- package/src/sap/ui/mdc/p13n/FlexUtil.js +6 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +7 -7
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +24 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +20 -19
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +19 -12
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1094 -49
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +108 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +7 -7
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +22 -11
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +174 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +12 -19
- package/src/sap/ui/mdc/table/Column.js +12 -12
- package/src/sap/ui/mdc/table/CreationRow.js +11 -11
- package/src/sap/ui/mdc/table/GridTableType.js +80 -33
- package/src/sap/ui/mdc/table/PropertyHelper.js +63 -19
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +94 -23
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +45 -4
- package/src/sap/ui/mdc/table/TableTypeBase.js +2 -2
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +16 -4
- package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +33 -8
- package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
- package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
- package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +243 -87
- package/src/sap/ui/mdc/util/TypeUtil.js +6 -5
- package/src/sap/ui/mdc/valuehelp/Dialog.js +11 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +6 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +5 -4
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -2
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +23 -14
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +46 -17
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -27
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +291 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
- package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
- package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +264 -139
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
- package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
- package/src/sap/ui/mdc/ChartNew.js +0 -1114
- package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
- package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
- package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
- package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
- package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
- package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
- package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
- package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +0 -39
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1179
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -404
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
|
@@ -46,13 +46,17 @@ function(
|
|
|
46
46
|
oMessageBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
+
// shared ListFieldHelp for month operators
|
|
50
|
+
var oMonthFieldHelp;
|
|
51
|
+
|
|
52
|
+
|
|
49
53
|
|
|
50
54
|
/**
|
|
51
55
|
* Utilities to handle {@link sap.ui.mdc.condition.Operator Operators} and {@link sap.ui.mdc.condition.ConditionObject conditions}.
|
|
52
56
|
*
|
|
53
57
|
* @namespace
|
|
54
58
|
* @author SAP SE
|
|
55
|
-
* @version 1.
|
|
59
|
+
* @version 1.100.0
|
|
56
60
|
* @since 1.73.0
|
|
57
61
|
* @alias sap.ui.mdc.condition.FilterOperatorUtil
|
|
58
62
|
*
|
|
@@ -66,7 +70,7 @@ function(
|
|
|
66
70
|
_mOperators: {
|
|
67
71
|
equal: new Operator({
|
|
68
72
|
name: "EQ",
|
|
69
|
-
alias: "DATE",
|
|
73
|
+
alias: {Date: "DATE", DateTime: "DATETIME"},
|
|
70
74
|
filterOperator: ModelOperator.EQ,
|
|
71
75
|
tokenParse: "^=([^=].*)$",
|
|
72
76
|
tokenFormat: "{1} ({0})", // all placeholder should use the {x} format - the text could be store in the resourcebundel file.
|
|
@@ -203,7 +207,7 @@ function(
|
|
|
203
207
|
}),
|
|
204
208
|
between: new Operator({
|
|
205
209
|
name: "BT",
|
|
206
|
-
alias: "DATERANGE",
|
|
210
|
+
alias: {Date: "DATERANGE", DateTime:"DATETIMERANGE"},
|
|
207
211
|
filterOperator: ModelOperator.BT,
|
|
208
212
|
tokenParse: "^([^!].*)\\.\\.\\.(.+)$", // TODO: does this work?? At least also matches crap like ".....". I guess validation of value types needs to get rid of those.
|
|
209
213
|
tokenFormat: "{0}...{1}",
|
|
@@ -272,7 +276,7 @@ function(
|
|
|
272
276
|
}),
|
|
273
277
|
lessEqual: new Operator({
|
|
274
278
|
name: "LE",
|
|
275
|
-
alias: "TO",
|
|
279
|
+
alias: {Date: "TO", DateTime: "TODATETIME"},
|
|
276
280
|
filterOperator: ModelOperator.LE,
|
|
277
281
|
tokenParse: "^<=(.+)$",
|
|
278
282
|
tokenFormat: "<={0}",
|
|
@@ -288,7 +292,7 @@ function(
|
|
|
288
292
|
}),
|
|
289
293
|
greaterEqual: new Operator({
|
|
290
294
|
name: "GE",
|
|
291
|
-
alias: "FROM",
|
|
295
|
+
alias: {Date: "FROM", DateTime: "FROMDATETIME"},
|
|
292
296
|
filterOperator: ModelOperator.GE,
|
|
293
297
|
tokenParse: "^>=(.+)$",
|
|
294
298
|
tokenFormat: ">={0}",
|
|
@@ -361,7 +365,7 @@ function(
|
|
|
361
365
|
tokenParse: "^<#tokenText#>$",
|
|
362
366
|
tokenFormat: "<#tokenText#>",
|
|
363
367
|
valueTypes: [],
|
|
364
|
-
getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive) {
|
|
368
|
+
getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
|
|
365
369
|
var isNullable = false;
|
|
366
370
|
if (oType) {
|
|
367
371
|
var vResult = oType.parseValue("", "string");
|
|
@@ -393,7 +397,7 @@ function(
|
|
|
393
397
|
tokenFormat: "!(<#tokenText#>)",
|
|
394
398
|
valueTypes: [],
|
|
395
399
|
exclude: true,
|
|
396
|
-
getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive) {
|
|
400
|
+
getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
|
|
397
401
|
var isNullable = false;
|
|
398
402
|
if (oType) {
|
|
399
403
|
var vResult = oType.parseValue("", "string");
|
|
@@ -459,8 +463,87 @@ function(
|
|
|
459
463
|
return UniversalDateUtils.ranges.lastDays(iDuration);
|
|
460
464
|
}
|
|
461
465
|
}),
|
|
466
|
+
firstDayWeek: new RangeOperator({
|
|
467
|
+
name: "FIRSTDAYWEEK",
|
|
468
|
+
valueTypes: [Operator.ValueType.Static],
|
|
469
|
+
calcRange: function() {
|
|
470
|
+
return UniversalDateUtils.ranges.firstDayOfWeek();
|
|
471
|
+
},
|
|
472
|
+
formatRange: function(aRange, oDataType) {
|
|
473
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
474
|
+
}
|
|
475
|
+
}),
|
|
476
|
+
lastDayWeek: new RangeOperator({
|
|
477
|
+
name: "LASTDAYWEEK",
|
|
478
|
+
valueTypes: [Operator.ValueType.Static],
|
|
479
|
+
calcRange: function() {
|
|
480
|
+
return UniversalDateUtils.ranges.lastDayOfWeek();
|
|
481
|
+
},
|
|
482
|
+
formatRange: function(aRange, oDataType) {
|
|
483
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
firstDayMonth: new RangeOperator({
|
|
487
|
+
name: "FIRSTDAYMONTH",
|
|
488
|
+
valueTypes: [Operator.ValueType.Static],
|
|
489
|
+
calcRange: function() {
|
|
490
|
+
return UniversalDateUtils.ranges.firstDayOfMonth();
|
|
491
|
+
},
|
|
492
|
+
formatRange: function(aRange, oDataType) {
|
|
493
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
494
|
+
}
|
|
495
|
+
}),
|
|
496
|
+
lastDayMonth: new RangeOperator({
|
|
497
|
+
name: "LASTDAYMONTH",
|
|
498
|
+
valueTypes: [Operator.ValueType.Static],
|
|
499
|
+
calcRange: function() {
|
|
500
|
+
return UniversalDateUtils.ranges.lastDayOfMonth();
|
|
501
|
+
},
|
|
502
|
+
formatRange: function(aRange, oDataType) {
|
|
503
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
504
|
+
}
|
|
505
|
+
}),
|
|
506
|
+
firstDayQuarter: new RangeOperator({
|
|
507
|
+
name: "FIRSTDAYQUARTER",
|
|
508
|
+
valueTypes: [Operator.ValueType.Static],
|
|
509
|
+
calcRange: function() {
|
|
510
|
+
return UniversalDateUtils.ranges.firstDayOfQuarter();
|
|
511
|
+
},
|
|
512
|
+
formatRange: function(aRange, oDataType) {
|
|
513
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
514
|
+
}
|
|
515
|
+
}),
|
|
516
|
+
lastDayQuarter: new RangeOperator({
|
|
517
|
+
name: "LASTDAYQUARTER",
|
|
518
|
+
valueTypes: [Operator.ValueType.Static],
|
|
519
|
+
calcRange: function() {
|
|
520
|
+
return UniversalDateUtils.ranges.lastDayOfQuarter();
|
|
521
|
+
},
|
|
522
|
+
formatRange: function(aRange, oDataType) {
|
|
523
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
524
|
+
}
|
|
525
|
+
}),
|
|
526
|
+
firstDayYear: new RangeOperator({
|
|
527
|
+
name: "FIRSTDAYYEAR",
|
|
528
|
+
valueTypes: [Operator.ValueType.Static],
|
|
529
|
+
calcRange: function() {
|
|
530
|
+
return UniversalDateUtils.ranges.firstDayOfYear();
|
|
531
|
+
},
|
|
532
|
+
formatRange: function(aRange, oDataType) {
|
|
533
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
534
|
+
}
|
|
535
|
+
}),
|
|
536
|
+
lastDayYear: new RangeOperator({
|
|
537
|
+
name: "LASTDAYYEAR",
|
|
538
|
+
valueTypes: [Operator.ValueType.Static],
|
|
539
|
+
calcRange: function() {
|
|
540
|
+
return UniversalDateUtils.ranges.lastDayOfYear();
|
|
541
|
+
},
|
|
542
|
+
formatRange: function(aRange, oDataType) {
|
|
543
|
+
return oDataType.formatValue(aRange[0], "string");
|
|
544
|
+
}
|
|
545
|
+
}),
|
|
462
546
|
todayFromTo: new RangeOperator({
|
|
463
|
-
alias: "TODAYXYDAYS",
|
|
464
547
|
name: "TODAYFROMTO",
|
|
465
548
|
valueTypes: [
|
|
466
549
|
{name: "sap.ui.model.type.Integer", formatOptions: { emptyString: null }},
|
|
@@ -497,7 +580,6 @@ function(
|
|
|
497
580
|
}
|
|
498
581
|
}),
|
|
499
582
|
thisWeek: new RangeOperator({
|
|
500
|
-
alias: "CURRENTWEEK",
|
|
501
583
|
name: "THISWEEK",
|
|
502
584
|
valueTypes: [Operator.ValueType.Static],
|
|
503
585
|
calcRange: function() {
|
|
@@ -537,7 +619,6 @@ function(
|
|
|
537
619
|
}
|
|
538
620
|
}),
|
|
539
621
|
thisMonth: new RangeOperator({
|
|
540
|
-
alias: "CURRENTMONTH",
|
|
541
622
|
name: "THISMONTH",
|
|
542
623
|
valueTypes: [Operator.ValueType.Static],
|
|
543
624
|
calcRange: function() {
|
|
@@ -577,7 +658,6 @@ function(
|
|
|
577
658
|
}
|
|
578
659
|
}),
|
|
579
660
|
thisQuarter: new RangeOperator({
|
|
580
|
-
alias: "CURRENTQUARTER",
|
|
581
661
|
name: "THISQUARTER",
|
|
582
662
|
valueTypes: [Operator.ValueType.Static],
|
|
583
663
|
calcRange: function() {
|
|
@@ -610,7 +690,6 @@ function(
|
|
|
610
690
|
}
|
|
611
691
|
}),
|
|
612
692
|
quarter1: new RangeOperator({
|
|
613
|
-
alias: "FIRSTQUARTER",
|
|
614
693
|
name: "QUARTER1",
|
|
615
694
|
valueTypes: [Operator.ValueType.Static],
|
|
616
695
|
calcRange: function() {
|
|
@@ -618,7 +697,6 @@ function(
|
|
|
618
697
|
}
|
|
619
698
|
}),
|
|
620
699
|
quarter2: new RangeOperator({
|
|
621
|
-
alias: "SECONDQUARTER",
|
|
622
700
|
name: "QUARTER2",
|
|
623
701
|
valueTypes: [Operator.ValueType.Static],
|
|
624
702
|
calcRange: function() {
|
|
@@ -626,7 +704,6 @@ function(
|
|
|
626
704
|
}
|
|
627
705
|
}),
|
|
628
706
|
quarter3: new RangeOperator({
|
|
629
|
-
alias: "THIRDQUARTER",
|
|
630
707
|
name: "QUARTER3",
|
|
631
708
|
valueTypes: [Operator.ValueType.Static],
|
|
632
709
|
calcRange: function() {
|
|
@@ -634,7 +711,6 @@ function(
|
|
|
634
711
|
}
|
|
635
712
|
}),
|
|
636
713
|
quarter4: new RangeOperator({
|
|
637
|
-
alias: "FOURTHQUARTER",
|
|
638
714
|
name: "QUARTER4",
|
|
639
715
|
valueTypes: [Operator.ValueType.Static],
|
|
640
716
|
calcRange: function() {
|
|
@@ -649,7 +725,6 @@ function(
|
|
|
649
725
|
}
|
|
650
726
|
}),
|
|
651
727
|
thisYear: new RangeOperator({
|
|
652
|
-
alias: "CURRENTYEAR",
|
|
653
728
|
name: "THISYEAR",
|
|
654
729
|
valueTypes: [Operator.ValueType.Static],
|
|
655
730
|
calcRange: function() {
|
|
@@ -686,7 +761,7 @@ function(
|
|
|
686
761
|
valueTypes: [{ name: "sap.ui.model.type.Integer", constraints: { minimum: 0, maximum: 11 }}],
|
|
687
762
|
paramTypes: ["(.+)"],
|
|
688
763
|
additionalInfo: "",
|
|
689
|
-
|
|
764
|
+
label: [oMessageBundle.getText("operators.SPECIFICMONTH_MONTH.label")],
|
|
690
765
|
defaultValues: function() {
|
|
691
766
|
var oDate = new UniversalDate();
|
|
692
767
|
return [
|
|
@@ -724,60 +799,114 @@ function(
|
|
|
724
799
|
}
|
|
725
800
|
aValues.push(sValue);
|
|
726
801
|
}
|
|
727
|
-
return [
|
|
802
|
+
return [_getIndexOfMonth.call(this, aValues[0])];
|
|
728
803
|
}
|
|
729
804
|
|
|
730
805
|
return null;
|
|
731
806
|
},
|
|
732
807
|
createControl: function(oType, sPath, iIndex, sId, aClass) {
|
|
733
|
-
var
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
808
|
+
var Field = sap.ui.require("sap/ui/mdc/Field");
|
|
809
|
+
if (Field && _getMonthFieldHelp.call(this)) {
|
|
810
|
+
|
|
811
|
+
var oField = new Field(sId, {
|
|
812
|
+
value: { path: sPath, type: oType, mode: 'TwoWay', targetType: 'raw' },
|
|
813
|
+
additionalValue: { path: sPath, formatter: function(iValue) { return oMonthFieldHelp.getTextForKey(iValue); }, mode: 'OneWay' },
|
|
814
|
+
display: 'Description',
|
|
815
|
+
width: "100%",
|
|
816
|
+
fieldHelp: "LFHForSpecificMonth"
|
|
817
|
+
});
|
|
818
|
+
|
|
819
|
+
return oField;
|
|
820
|
+
} else {
|
|
821
|
+
Log.warning("Operator.createControl", "not able to create the control for the operator " + this.name);
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}),
|
|
826
|
+
specificMonthInYear: new RangeOperator({
|
|
827
|
+
name: "SPECIFICMONTHINYEAR",
|
|
828
|
+
valueTypes: [{ name: "sap.ui.model.type.Integer", constraints: { minimum: 0, maximum: 11 }},
|
|
829
|
+
{ name: "sap.ui.model.type.Integer", constraints: { minimum: 1, maximum: 9999 }}],
|
|
830
|
+
paramTypes: ["(.+)", "(.+)"],
|
|
831
|
+
additionalInfo: "",
|
|
832
|
+
label: [oMessageBundle.getText("operators.SPECIFICMONTHINYEAR_MONTH.label"), oMessageBundle.getText("operators.SPECIFICMONTHINYEAR_YEAR.label")],
|
|
833
|
+
defaultValues: function() {
|
|
834
|
+
var oDate = new UniversalDate();
|
|
835
|
+
return [
|
|
836
|
+
oDate.getMonth(),
|
|
837
|
+
oDate.getFullYear()
|
|
838
|
+
];
|
|
839
|
+
},
|
|
840
|
+
calcRange: function(iMonth, iYear) {
|
|
841
|
+
var oDate = new UniversalDate();
|
|
842
|
+
oDate.setMonth(iMonth);
|
|
843
|
+
oDate.setYear(iYear);
|
|
844
|
+
oDate = UniversalDateUtils.getMonthStartDate(oDate);
|
|
845
|
+
return UniversalDateUtils.getRange(0, "MONTH", oDate);
|
|
846
|
+
},
|
|
847
|
+
format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
|
|
848
|
+
var iValue = oCondition.values[0];
|
|
849
|
+
var iYear = oCondition.values[1];
|
|
850
|
+
var sTokenText = this.tokenFormat;
|
|
851
|
+
var sReplace = _getMonths.apply(this)[iValue];
|
|
852
|
+
|
|
853
|
+
if (bHideOperator) {
|
|
854
|
+
return sReplace + "," + iYear;
|
|
855
|
+
} else {
|
|
856
|
+
var replaceRegExp0 = new RegExp("\\$" + 0 + "|" + 0 + "\\$" + "|" + "\\{" + 0 + "\\}", "g");
|
|
857
|
+
var replaceRegExp1 = new RegExp("\\$" + 1 + "|" + 1 + "\\$" + "|" + "\\{" + 1 + "\\}", "g");
|
|
858
|
+
sTokenText = sReplace == null ? null : sTokenText.replace(replaceRegExp0, sReplace);
|
|
859
|
+
return sTokenText.replace(replaceRegExp1, iYear);
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
getValues: function(sText, sDisplayFormat, bDefaultOperator) {
|
|
863
|
+
var aMatch = sText.match(this.tokenParseRegExp);
|
|
864
|
+
var aValues;
|
|
865
|
+
if (aMatch || (bDefaultOperator && sText)) {
|
|
866
|
+
aValues = [];
|
|
867
|
+
for (var i = 0; i < this.valueTypes.length; i++) {
|
|
868
|
+
var sValue;
|
|
869
|
+
if (aMatch) {
|
|
870
|
+
sValue = aMatch[i + 1];
|
|
871
|
+
} else if ((bDefaultOperator && sText)) { // only month provided
|
|
872
|
+
sValue = sText;
|
|
743
873
|
}
|
|
874
|
+
aValues.push(sValue);
|
|
744
875
|
}
|
|
876
|
+
return [_getIndexOfMonth.call(this, aValues[0]), aValues[1]];
|
|
877
|
+
}
|
|
745
878
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
var
|
|
750
|
-
var ListItem = sap.ui.require("sap/ui/core/ListItem");
|
|
879
|
+
return null;
|
|
880
|
+
},
|
|
881
|
+
createControl: function(oType, sPath, iIndex, sId, aClass) {
|
|
882
|
+
var oField;
|
|
751
883
|
var Field = sap.ui.require("sap/ui/mdc/Field");
|
|
752
|
-
if (!
|
|
884
|
+
if (!Field) {
|
|
753
885
|
Log.warning("Operator.createControl", "not able to create the control for the operator " + this.name);
|
|
754
886
|
return null;
|
|
755
887
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
}
|
|
771
|
-
}).setModel(new JSONModel(getMonthItems()), "$items");
|
|
888
|
+
|
|
889
|
+
if (iIndex == 0) {
|
|
890
|
+
if (_getMonthFieldHelp.call(this)) {
|
|
891
|
+
|
|
892
|
+
oField = new Field(sId, {
|
|
893
|
+
value: { path: sPath, type: oType, mode: 'TwoWay', targetType: 'raw' },
|
|
894
|
+
additionalValue: { path: sPath, formatter: function(iValue) { return oMonthFieldHelp.getTextForKey(iValue); }, mode: 'OneWay' },
|
|
895
|
+
display: 'Description',
|
|
896
|
+
width: "100%",
|
|
897
|
+
fieldHelp: "LFHForSpecificMonth"
|
|
898
|
+
});
|
|
899
|
+
} else {
|
|
900
|
+
Log.warning("Operator.createControl", "not able to create the control for the operator " + this.name);
|
|
901
|
+
}
|
|
772
902
|
}
|
|
773
903
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
});
|
|
904
|
+
if (iIndex == 1) {
|
|
905
|
+
oField = new Field(sId, {
|
|
906
|
+
value: { path: "$this>", type: oType, mode: 'TwoWay', targetType: 'raw' },
|
|
907
|
+
width: "100%"
|
|
908
|
+
});
|
|
909
|
+
}
|
|
781
910
|
|
|
782
911
|
return oField;
|
|
783
912
|
}
|
|
@@ -788,6 +917,13 @@ function(
|
|
|
788
917
|
calcRange: function() {
|
|
789
918
|
return UniversalDateUtils.ranges.yearToDate();
|
|
790
919
|
}
|
|
920
|
+
}),
|
|
921
|
+
dateToYear: new RangeOperator({
|
|
922
|
+
name: "DATETOYEAR",
|
|
923
|
+
valueTypes: [Operator.ValueType.Static],
|
|
924
|
+
calcRange: function() {
|
|
925
|
+
return UniversalDateUtils.ranges.dateToYear();
|
|
926
|
+
}
|
|
791
927
|
})
|
|
792
928
|
},
|
|
793
929
|
|
|
@@ -1078,14 +1214,7 @@ function(
|
|
|
1078
1214
|
|
|
1079
1215
|
for (var sName in FilterOperatorUtil._mOperators) {
|
|
1080
1216
|
var oOperator = FilterOperatorUtil._mOperators[sName];
|
|
1081
|
-
if (
|
|
1082
|
-
return oOperator;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
for (var sName in FilterOperatorUtil._mOperators) {
|
|
1087
|
-
var oOperator = FilterOperatorUtil._mOperators[sName];
|
|
1088
|
-
if ( oOperator.alias === sOperator) {
|
|
1217
|
+
if (oOperator.name === sOperator) {
|
|
1089
1218
|
return oOperator;
|
|
1090
1219
|
}
|
|
1091
1220
|
}
|
|
@@ -1332,6 +1461,81 @@ function(
|
|
|
1332
1461
|
oOperator.checkValidated(oCondition);
|
|
1333
1462
|
}
|
|
1334
1463
|
|
|
1464
|
+
},
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Returns the operator object for the given <code>DynamicDateOption</code> name.
|
|
1468
|
+
* @param {string} sOption Name of the operator
|
|
1469
|
+
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
1470
|
+
* @returns {sap.ui.mdc.condition.Operator} the operator object, or undefined if the operator with the requested name does not exist
|
|
1471
|
+
*
|
|
1472
|
+
* @protected
|
|
1473
|
+
* @since: 1.100.0
|
|
1474
|
+
*/
|
|
1475
|
+
getOperatorForDynamicDateOption: function(sOption, sBaseType) {
|
|
1476
|
+
|
|
1477
|
+
var oOperator;
|
|
1478
|
+
|
|
1479
|
+
// determine operator name if used as custom DynamicDateOption created in DateContent using getCustomDynamicDateOptionForOperator
|
|
1480
|
+
if (sBaseType && sOption.startsWith(sBaseType)) {
|
|
1481
|
+
oOperator = this.getOperator(sOption.slice(sBaseType.length + 1));
|
|
1482
|
+
} else {
|
|
1483
|
+
oOperator = this.getOperator(sOption);
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
if (!oOperator && sBaseType) {
|
|
1487
|
+
for (var sName in FilterOperatorUtil._mOperators) {
|
|
1488
|
+
var oCheckOperator = FilterOperatorUtil._mOperators[sName];
|
|
1489
|
+
if (oCheckOperator.alias && oCheckOperator.alias[sBaseType] === sOption) {
|
|
1490
|
+
oOperator = oCheckOperator;
|
|
1491
|
+
break;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
return oOperator;
|
|
1497
|
+
|
|
1498
|
+
},
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Determines the corresponding <code>DynamicDateOption</code> for an <code>Operator</code>
|
|
1502
|
+
* from a map of known keys
|
|
1503
|
+
*
|
|
1504
|
+
* @param {sap.ui.mdc.condition.Operator} oOperator Condition to check
|
|
1505
|
+
* @param {object} oDynamicDateRangeKeys Keys for <code>DynamicDateOption</code>
|
|
1506
|
+
* @param {sap.ui.mdc.enum.BaseType} sBaseType Basic type
|
|
1507
|
+
* @returns {string} <code>DynamicDateOption</code>
|
|
1508
|
+
* @protected
|
|
1509
|
+
* @since: 1.100.0
|
|
1510
|
+
*/
|
|
1511
|
+
getDynamicDateOptionForOperator: function(oOperator, oDynamicDateRangeKeys, sBaseType) {
|
|
1512
|
+
|
|
1513
|
+
var sOption;
|
|
1514
|
+
if (oOperator) {
|
|
1515
|
+
if (oDynamicDateRangeKeys[oOperator.name]) {
|
|
1516
|
+
sOption = oOperator.name;
|
|
1517
|
+
} else if (oOperator.alias && oDynamicDateRangeKeys[oOperator.alias[sBaseType]]) {
|
|
1518
|
+
sOption = oOperator.alias[sBaseType];
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
return sOption;
|
|
1523
|
+
|
|
1524
|
+
},
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Determines the corresponding custom <code>DynamicDateOption</code> for an <code>Operator</code>
|
|
1528
|
+
*
|
|
1529
|
+
* @param {sap.ui.mdc.condition.Operator} oOperator Condition to check
|
|
1530
|
+
* @param {sap.ui.mdc.enum.BaseType} sBaseType Basic type
|
|
1531
|
+
* @returns {string} <code>DynamicDateOption</code>
|
|
1532
|
+
* @protected
|
|
1533
|
+
* @since: 1.100.0
|
|
1534
|
+
*/
|
|
1535
|
+
getCustomDynamicDateOptionForOperator: function(oOperator, sBaseType) {
|
|
1536
|
+
|
|
1537
|
+
return sBaseType + "-" + oOperator.name;
|
|
1538
|
+
|
|
1335
1539
|
}
|
|
1336
1540
|
};
|
|
1337
1541
|
|
|
@@ -1384,6 +1588,14 @@ function(
|
|
|
1384
1588
|
FilterOperatorUtil._mOperators.today,
|
|
1385
1589
|
FilterOperatorUtil._mOperators.yesterday,
|
|
1386
1590
|
FilterOperatorUtil._mOperators.tomorrow,
|
|
1591
|
+
FilterOperatorUtil._mOperators.firstDayWeek,
|
|
1592
|
+
FilterOperatorUtil._mOperators.lastDayWeek,
|
|
1593
|
+
FilterOperatorUtil._mOperators.firstDayMonth,
|
|
1594
|
+
FilterOperatorUtil._mOperators.lastDayMonth,
|
|
1595
|
+
FilterOperatorUtil._mOperators.firstDayQuarter,
|
|
1596
|
+
FilterOperatorUtil._mOperators.lastDayQuarter,
|
|
1597
|
+
FilterOperatorUtil._mOperators.firstDayYear,
|
|
1598
|
+
FilterOperatorUtil._mOperators.lastDayYear,
|
|
1387
1599
|
FilterOperatorUtil._mOperators.todayFromTo,
|
|
1388
1600
|
FilterOperatorUtil._mOperators.lastDays,
|
|
1389
1601
|
FilterOperatorUtil._mOperators.nextDays,
|
|
@@ -1395,6 +1607,7 @@ function(
|
|
|
1395
1607
|
FilterOperatorUtil._mOperators.nextWeeks,
|
|
1396
1608
|
|
|
1397
1609
|
FilterOperatorUtil._mOperators.specificMonth,
|
|
1610
|
+
FilterOperatorUtil._mOperators.specificMonthInYear,
|
|
1398
1611
|
FilterOperatorUtil._mOperators.thisMonth,
|
|
1399
1612
|
FilterOperatorUtil._mOperators.lastMonth,
|
|
1400
1613
|
FilterOperatorUtil._mOperators.lastMonths,
|
|
@@ -1418,7 +1631,8 @@ function(
|
|
|
1418
1631
|
FilterOperatorUtil._mOperators.nextYear,
|
|
1419
1632
|
FilterOperatorUtil._mOperators.nextYears,
|
|
1420
1633
|
|
|
1421
|
-
FilterOperatorUtil._mOperators.yearToDate
|
|
1634
|
+
FilterOperatorUtil._mOperators.yearToDate,
|
|
1635
|
+
FilterOperatorUtil._mOperators.dateToYear
|
|
1422
1636
|
]
|
|
1423
1637
|
);
|
|
1424
1638
|
FilterOperatorUtil.setOperatorsForType(
|
|
@@ -1436,7 +1650,56 @@ function(
|
|
|
1436
1650
|
FilterOperatorUtil._mOperators.notLessThan,
|
|
1437
1651
|
FilterOperatorUtil._mOperators.notLessEqual,
|
|
1438
1652
|
FilterOperatorUtil._mOperators.notGreaterThan,
|
|
1439
|
-
FilterOperatorUtil._mOperators.notGreaterEqual
|
|
1653
|
+
FilterOperatorUtil._mOperators.notGreaterEqual,
|
|
1654
|
+
|
|
1655
|
+
FilterOperatorUtil._mOperators.today,
|
|
1656
|
+
FilterOperatorUtil._mOperators.yesterday,
|
|
1657
|
+
FilterOperatorUtil._mOperators.tomorrow,
|
|
1658
|
+
FilterOperatorUtil._mOperators.firstDayWeek,
|
|
1659
|
+
FilterOperatorUtil._mOperators.lastDayWeek,
|
|
1660
|
+
FilterOperatorUtil._mOperators.firstDayMonth,
|
|
1661
|
+
FilterOperatorUtil._mOperators.lastDayMonth,
|
|
1662
|
+
FilterOperatorUtil._mOperators.firstDayQuarter,
|
|
1663
|
+
FilterOperatorUtil._mOperators.lastDayQuarter,
|
|
1664
|
+
FilterOperatorUtil._mOperators.firstDayYear,
|
|
1665
|
+
FilterOperatorUtil._mOperators.lastDayYear,
|
|
1666
|
+
FilterOperatorUtil._mOperators.todayFromTo,
|
|
1667
|
+
FilterOperatorUtil._mOperators.lastDays,
|
|
1668
|
+
FilterOperatorUtil._mOperators.nextDays,
|
|
1669
|
+
|
|
1670
|
+
FilterOperatorUtil._mOperators.thisWeek,
|
|
1671
|
+
FilterOperatorUtil._mOperators.lastWeek,
|
|
1672
|
+
FilterOperatorUtil._mOperators.lastWeeks,
|
|
1673
|
+
FilterOperatorUtil._mOperators.nextWeek,
|
|
1674
|
+
FilterOperatorUtil._mOperators.nextWeeks,
|
|
1675
|
+
|
|
1676
|
+
FilterOperatorUtil._mOperators.specificMonth,
|
|
1677
|
+
FilterOperatorUtil._mOperators.specificMonthInYear,
|
|
1678
|
+
FilterOperatorUtil._mOperators.thisMonth,
|
|
1679
|
+
FilterOperatorUtil._mOperators.lastMonth,
|
|
1680
|
+
FilterOperatorUtil._mOperators.lastMonths,
|
|
1681
|
+
FilterOperatorUtil._mOperators.nextMonth,
|
|
1682
|
+
FilterOperatorUtil._mOperators.nextMonths,
|
|
1683
|
+
|
|
1684
|
+
FilterOperatorUtil._mOperators.thisQuarter,
|
|
1685
|
+
FilterOperatorUtil._mOperators.lastQuarter,
|
|
1686
|
+
FilterOperatorUtil._mOperators.lastQuarters,
|
|
1687
|
+
FilterOperatorUtil._mOperators.nextQuarter,
|
|
1688
|
+
FilterOperatorUtil._mOperators.nextQuarters,
|
|
1689
|
+
|
|
1690
|
+
FilterOperatorUtil._mOperators.quarter1,
|
|
1691
|
+
FilterOperatorUtil._mOperators.quarter2,
|
|
1692
|
+
FilterOperatorUtil._mOperators.quarter3,
|
|
1693
|
+
FilterOperatorUtil._mOperators.quarter4,
|
|
1694
|
+
|
|
1695
|
+
FilterOperatorUtil._mOperators.thisYear,
|
|
1696
|
+
FilterOperatorUtil._mOperators.lastYear,
|
|
1697
|
+
FilterOperatorUtil._mOperators.lastYears,
|
|
1698
|
+
FilterOperatorUtil._mOperators.nextYear,
|
|
1699
|
+
FilterOperatorUtil._mOperators.nextYears,
|
|
1700
|
+
|
|
1701
|
+
FilterOperatorUtil._mOperators.yearToDate,
|
|
1702
|
+
FilterOperatorUtil._mOperators.dateToYear
|
|
1440
1703
|
]
|
|
1441
1704
|
);
|
|
1442
1705
|
FilterOperatorUtil.setOperatorsForType(
|
|
@@ -1539,6 +1802,64 @@ function(
|
|
|
1539
1802
|
return this._aMonths;
|
|
1540
1803
|
}
|
|
1541
1804
|
|
|
1805
|
+
function _getIndexOfMonth(sMonth) {
|
|
1806
|
+
var sLowerCaseMonth = sMonth.toLowerCase();
|
|
1807
|
+
var aMonths = _getMonths.apply(this);
|
|
1808
|
+
var iIndex = -1;
|
|
1809
|
+
aMonths.some(function(sElement, i) {
|
|
1810
|
+
if (sElement.toLowerCase() == sLowerCaseMonth) {
|
|
1811
|
+
iIndex = i;
|
|
1812
|
+
return true;
|
|
1813
|
+
}
|
|
1814
|
+
});
|
|
1815
|
+
return iIndex;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
function _getMonthFieldHelp() {
|
|
1819
|
+
if (!oMonthFieldHelp) {
|
|
1820
|
+
var ListFieldHelp = sap.ui.require("sap/ui/mdc/field/ListFieldHelp");
|
|
1821
|
+
var ListItem = sap.ui.require("sap/ui/core/ListItem");
|
|
1822
|
+
if (!ListFieldHelp || !ListItem) {
|
|
1823
|
+
Log.warning("Operator.createControl", "not able to create the control for the operator " + this.name);
|
|
1824
|
+
return null;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
var getMonthItems = function() {
|
|
1828
|
+
if (!this._aMonthsItems) {
|
|
1829
|
+
var aMonths = _getMonths.apply(this);
|
|
1830
|
+
this._aMonthsItems = [];
|
|
1831
|
+
|
|
1832
|
+
for (var i = 0; i < 12; i++) {
|
|
1833
|
+
this._aMonthsItems.push({
|
|
1834
|
+
text: aMonths[i],
|
|
1835
|
+
key: i
|
|
1836
|
+
});
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
return this._aMonthsItems;
|
|
1841
|
+
}.bind(this);
|
|
1842
|
+
|
|
1843
|
+
oMonthFieldHelp = new ListFieldHelp({
|
|
1844
|
+
id: "LFHForSpecificMonth",
|
|
1845
|
+
items: {
|
|
1846
|
+
path: "$items>/",
|
|
1847
|
+
template: new ListItem({
|
|
1848
|
+
text: {
|
|
1849
|
+
path: "$items>text"
|
|
1850
|
+
},
|
|
1851
|
+
key: {
|
|
1852
|
+
path: "$items>key"
|
|
1853
|
+
}
|
|
1854
|
+
}),
|
|
1855
|
+
templateShareable: false
|
|
1856
|
+
}
|
|
1857
|
+
}).setModel(new JSONModel(getMonthItems()), "$items");
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
return oMonthFieldHelp;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1542
1863
|
return FilterOperatorUtil;
|
|
1543
1864
|
|
|
1544
1865
|
}, /* bExport= */ true);
|
|
@@ -46,6 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @extends sap.ui.base.Object
|
|
47
47
|
* @param {object} oConfiguration Properties of the operator
|
|
48
48
|
* @param {string} oConfiguration.name Name of the operator used in the condition
|
|
49
|
+
* @param {object} [oConfiguration.alias] Alias names based on <code>BaseType</code>, used to map to <code>DynamicDateOption</code> if <code>DynamicDateRange</code> is used
|
|
49
50
|
* @param {string} oConfiguration.filterOperator The operator's default filter operator that is created as defined in {@link sap.ui.model.FilterOperator FilterOperator}
|
|
50
51
|
* @param {string} oConfiguration.tokenParse The string representation of the regular expression that is used by the operator to parse a value
|
|
51
52
|
* to eliminate the operator and get the data string. A placeholder that refers to the translated tokenText can be used. <code>#tokenText#</code> refers to the
|
|
@@ -83,7 +84,7 @@ sap.ui.define([
|
|
|
83
84
|
* @param {string} [oConfiguration.additionalInfo] additionalInfo text for the operator. Will be shown in the operator suggest as second column. If not used (undefined) the Include or Exclude information of the operator is used.
|
|
84
85
|
* @constructor
|
|
85
86
|
* @author SAP SE
|
|
86
|
-
* @version 1.
|
|
87
|
+
* @version 1.100.0
|
|
87
88
|
* @private
|
|
88
89
|
* @ui5-restricted sap.fe
|
|
89
90
|
* @MDC_PUBLIC_CANDIDATE
|
|
@@ -287,11 +288,12 @@ sap.ui.define([
|
|
|
287
288
|
* @param {string} sFieldPath Path of filter
|
|
288
289
|
* @param {sap.ui.model.Type} oType Data type of the used filter field
|
|
289
290
|
* @param {boolean} [bCaseSensitive] creates a caseSensitive filter
|
|
291
|
+
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
290
292
|
* @returns {sap.ui.model.Filter} filter object
|
|
291
293
|
* @private
|
|
292
294
|
* @ui5-restricted sap.ui.mdc
|
|
293
295
|
*/
|
|
294
|
-
Operator.prototype.getModelFilter = function(oCondition, sFieldPath, oType, bCaseSensitive) {
|
|
296
|
+
Operator.prototype.getModelFilter = function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
|
|
295
297
|
|
|
296
298
|
var vValue = oCondition.values[0];
|
|
297
299
|
var oFilter;
|