@openui5/sap.ui.mdc 1.99.1 → 1.102.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.
Files changed (257) hide show
  1. package/.eslintrc.json +19 -0
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  6. package/src/sap/ui/mdc/Chart.js +77 -77
  7. package/src/sap/ui/mdc/ChartDelegate.js +76 -21
  8. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  9. package/src/sap/ui/mdc/Control.js +11 -6
  10. package/src/sap/ui/mdc/Element.js +10 -6
  11. package/src/sap/ui/mdc/Field.js +26 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  14. package/src/sap/ui/mdc/FilterField.js +41 -3
  15. package/src/sap/ui/mdc/Link.js +3 -3
  16. package/src/sap/ui/mdc/LinkDelegate.js +7 -5
  17. package/src/sap/ui/mdc/MultiValueField.js +11 -1
  18. package/src/sap/ui/mdc/Table.js +340 -417
  19. package/src/sap/ui/mdc/TableDelegate.js +115 -35
  20. package/src/sap/ui/mdc/ValueHelp.js +150 -632
  21. package/src/sap/ui/mdc/ValueHelpDelegate.js +161 -8
  22. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  24. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  25. package/src/sap/ui/mdc/chart/ChartToolbar.js +18 -6
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +11 -2
  27. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -7
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  29. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  30. package/src/sap/ui/mdc/condition/Condition.js +14 -9
  31. package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
  32. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  33. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  34. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +146 -34
  35. package/src/sap/ui/mdc/condition/Operator.js +98 -16
  36. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +80 -24
  37. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  38. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  39. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +16 -1
  41. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
  42. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  43. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
  44. package/src/sap/ui/mdc/enum/PropagationReason.js +43 -0
  45. package/src/sap/ui/mdc/enum/SelectType.js +3 -0
  46. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  47. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionType.js +70 -22
  49. package/src/sap/ui/mdc/field/ConditionsType.js +8 -2
  50. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  51. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  52. package/src/sap/ui/mdc/field/DefineConditionPanel.js +30 -23
  53. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  54. package/src/sap/ui/mdc/field/FieldBase.js +84 -17
  55. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
  56. package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
  57. package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -1
  58. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelp.js +9 -4
  62. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +7 -4
  65. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +11 -3
  66. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -3
  67. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +31 -32
  68. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  69. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  70. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  71. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  72. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  73. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  74. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  75. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  76. package/src/sap/ui/mdc/field/content/ContentFactory.js +13 -1
  77. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  78. package/src/sap/ui/mdc/field/content/DateTimeContent.js +42 -7
  79. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +128 -239
  80. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
  81. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  82. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
  83. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
  84. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +164 -64
  85. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  86. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  87. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  88. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +73 -23
  89. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  90. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  91. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +4 -41
  92. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  93. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
  94. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
  95. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  96. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  97. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  98. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  99. package/src/sap/ui/mdc/library.js +30 -27
  100. package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
  101. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  102. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  103. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  104. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  105. package/src/sap/ui/mdc/link/ContactDetailsRenderer.js +26 -0
  106. package/src/sap/ui/mdc/link/Factory.js +1 -1
  107. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  108. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  109. package/src/sap/ui/mdc/link/Panel.js +197 -22
  110. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  111. package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
  112. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  113. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  114. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  115. package/src/sap/ui/mdc/messagebundle.properties +11 -6
  116. package/src/sap/ui/mdc/messagebundle_ar.properties +9 -7
  117. package/src/sap/ui/mdc/messagebundle_bg.properties +7 -5
  118. package/src/sap/ui/mdc/messagebundle_ca.properties +7 -5
  119. package/src/sap/ui/mdc/messagebundle_cs.properties +7 -5
  120. package/src/sap/ui/mdc/messagebundle_cy.properties +7 -5
  121. package/src/sap/ui/mdc/messagebundle_da.properties +7 -5
  122. package/src/sap/ui/mdc/messagebundle_de.properties +7 -5
  123. package/src/sap/ui/mdc/messagebundle_el.properties +6 -4
  124. package/src/sap/ui/mdc/messagebundle_en.properties +7 -5
  125. package/src/sap/ui/mdc/messagebundle_en_GB.properties +7 -5
  126. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -5
  127. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +7 -5
  128. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -5
  129. package/src/sap/ui/mdc/messagebundle_es.properties +7 -5
  130. package/src/sap/ui/mdc/messagebundle_es_MX.properties +7 -5
  131. package/src/sap/ui/mdc/messagebundle_et.properties +7 -5
  132. package/src/sap/ui/mdc/messagebundle_fi.properties +7 -5
  133. package/src/sap/ui/mdc/messagebundle_fr.properties +7 -5
  134. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +7 -5
  135. package/src/sap/ui/mdc/messagebundle_hi.properties +7 -5
  136. package/src/sap/ui/mdc/messagebundle_hr.properties +7 -5
  137. package/src/sap/ui/mdc/messagebundle_hu.properties +7 -5
  138. package/src/sap/ui/mdc/messagebundle_id.properties +7 -5
  139. package/src/sap/ui/mdc/messagebundle_it.properties +7 -5
  140. package/src/sap/ui/mdc/messagebundle_iw.properties +6 -4
  141. package/src/sap/ui/mdc/messagebundle_ja.properties +8 -6
  142. package/src/sap/ui/mdc/messagebundle_kk.properties +7 -5
  143. package/src/sap/ui/mdc/messagebundle_ko.properties +6 -4
  144. package/src/sap/ui/mdc/messagebundle_lt.properties +7 -5
  145. package/src/sap/ui/mdc/messagebundle_lv.properties +7 -5
  146. package/src/sap/ui/mdc/messagebundle_ms.properties +7 -5
  147. package/src/sap/ui/mdc/messagebundle_nl.properties +7 -5
  148. package/src/sap/ui/mdc/messagebundle_no.properties +7 -5
  149. package/src/sap/ui/mdc/messagebundle_pl.properties +7 -5
  150. package/src/sap/ui/mdc/messagebundle_pt.properties +13 -11
  151. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +7 -5
  152. package/src/sap/ui/mdc/messagebundle_ro.properties +7 -5
  153. package/src/sap/ui/mdc/messagebundle_ru.properties +7 -5
  154. package/src/sap/ui/mdc/messagebundle_sh.properties +10 -8
  155. package/src/sap/ui/mdc/messagebundle_sk.properties +7 -5
  156. package/src/sap/ui/mdc/messagebundle_sl.properties +8 -6
  157. package/src/sap/ui/mdc/messagebundle_sv.properties +8 -6
  158. package/src/sap/ui/mdc/messagebundle_th.properties +7 -5
  159. package/src/sap/ui/mdc/messagebundle_tr.properties +10 -8
  160. package/src/sap/ui/mdc/messagebundle_uk.properties +7 -5
  161. package/src/sap/ui/mdc/messagebundle_vi.properties +7 -5
  162. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -5
  163. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +7 -5
  164. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +23 -29
  165. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  166. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  167. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  168. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +354 -0
  169. package/src/sap/ui/mdc/odata/TypeUtil.js +2 -1
  170. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  171. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
  172. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  173. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  174. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +29 -66
  175. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  176. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
  177. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +353 -262
  178. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  179. package/src/sap/ui/mdc/p13n/Engine.js +172 -69
  180. package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
  181. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  182. package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
  183. package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
  184. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
  185. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +15 -12
  186. package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
  187. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  188. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  189. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +75 -15
  190. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +160 -0
  191. package/src/sap/ui/mdc/p13n/panels/GroupView.js +54 -28
  192. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  193. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  194. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  195. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
  196. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
  197. package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
  198. package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
  199. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +32 -10
  200. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
  201. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  202. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
  203. package/src/sap/ui/mdc/table/Column.js +271 -132
  204. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  205. package/src/sap/ui/mdc/table/GridTableType.js +70 -27
  206. package/src/sap/ui/mdc/table/PropertyHelper.js +92 -163
  207. package/src/sap/ui/mdc/table/ResponsiveTableType.js +133 -40
  208. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  209. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  210. package/src/sap/ui/mdc/table/TableSettings.js +10 -22
  211. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  212. package/src/sap/ui/mdc/table/menu/Item.js +78 -0
  213. package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
  214. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
  215. package/src/sap/ui/mdc/themes/base/Chart.less +11 -0
  216. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
  217. package/src/sap/ui/mdc/ui/Container.js +0 -240
  218. package/src/sap/ui/mdc/util/DateUtil.js +56 -6
  219. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  220. package/src/sap/ui/mdc/util/IdentifierUtil.js +3 -3
  221. package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
  222. package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
  223. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  224. package/src/sap/ui/mdc/valuehelp/Dialog.js +291 -66
  225. package/src/sap/ui/mdc/valuehelp/Popover.js +8 -5
  226. package/src/sap/ui/mdc/valuehelp/base/Container.js +71 -52
  227. package/src/sap/ui/mdc/valuehelp/base/Content.js +57 -24
  228. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  229. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +196 -283
  230. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +6 -6
  231. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  232. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
  233. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
  234. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +66 -66
  235. package/src/sap/ui/mdc/valuehelp/content/MTable.js +100 -185
  236. package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +48 -2
  237. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
  238. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
  239. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +55 -4
  240. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +2 -3
  241. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +53 -12
  242. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +6 -6
  243. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +111 -128
  244. package/test/sap/ui/mdc/testutils/opa/p13n/waitForSelectWithSelectedTextOnPanel.js +5 -2
  245. package/test/sap/ui/mdc/testutils/opa/table/Actions.js +70 -0
  246. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +9 -7
  247. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +2 -2
  248. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  249. package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
  250. package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
  251. package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
  252. package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
  253. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  254. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  255. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  256. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  257. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -56,7 +56,7 @@ function(
56
56
  *
57
57
  * @namespace
58
58
  * @author SAP SE
59
- * @version 1.99.1
59
+ * @version 1.102.0
60
60
  * @since 1.73.0
61
61
  * @alias sap.ui.mdc.condition.FilterOperatorUtil
62
62
  *
@@ -70,7 +70,7 @@ function(
70
70
  _mOperators: {
71
71
  equal: new Operator({
72
72
  name: "EQ",
73
- alias: "DATE",
73
+ alias: {Date: "DATE", DateTime: "DATETIME"},
74
74
  filterOperator: ModelOperator.EQ,
75
75
  tokenParse: "^=([^=].*)$",
76
76
  tokenFormat: "{1} ({0})", // all placeholder should use the {x} format - the text could be store in the resourcebundel file.
@@ -81,7 +81,7 @@ function(
81
81
  Description: "{1}",
82
82
  Value: "{0}"
83
83
  },
84
- format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
84
+ format: function(oCondition, oType, sDisplayFormat, bHideOperator, aCompositeTypes) {
85
85
  sDisplayFormat = sDisplayFormat || FieldDisplay.DescriptionValue;
86
86
  var iCount = this.valueTypes.length;
87
87
  var aValues = oCondition.values;
@@ -100,26 +100,30 @@ function(
100
100
  vValue = "";
101
101
  }
102
102
 
103
- if (i == 0 && oType && (typeof oType.formatValue === "function")) {
103
+ if (i == 0) {
104
104
  // only the first value can be formatted. second value is the description string
105
- sReplace = oType.formatValue(vValue, "string");
105
+ sReplace = this._formatValue(vValue, oType, aCompositeTypes);
106
106
  } else {
107
107
  sReplace = vValue;
108
108
  }
109
109
 
110
- sTokenText = sReplace == null ? null : sTokenText.replace(new RegExp("\\$" + i + "|" + i + "\\$" + "|" + "\\{" + i + "\\}", "g"), sReplace);
110
+ if (sReplace === null) {
111
+ sTokenText = null; // some types (like Unit) return null if no value is given, in this case stop formating and return null
112
+ break;
113
+ }
114
+ sTokenText = sTokenText.replace(new RegExp("\\$" + i + "|" + i + "\\$" + "|" + "\\{" + i + "\\}", "g"), sReplace);
111
115
  }
112
116
 
113
117
  return sTokenText;
114
118
  },
115
- parse: function(sText, oType, sDisplayFormat, bDefaultOperator) {
119
+ parse: function(sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes) {
116
120
  sDisplayFormat = sDisplayFormat || FieldDisplay.DescriptionValue;
117
- var aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator]);
121
+ var aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes]);
118
122
 
119
123
  if (bDefaultOperator && (!aResult || aResult[0] === null || aResult[0] === undefined) && sDisplayFormat !== FieldDisplay.Value) {
120
124
  // in default case and no key determined (simple-EQ case)-> use text as key (parse again to use type)
121
125
  sDisplayFormat = FieldDisplay.Value;
122
- aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator]);
126
+ aResult = Operator.prototype.parse.apply(this, [sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes]);
123
127
  }
124
128
  if (aResult && (aResult[1] === null || aResult[1] === undefined) && sDisplayFormat === FieldDisplay.Value) {
125
129
  aResult = [aResult[0]]; // only key
@@ -207,7 +211,7 @@ function(
207
211
  }),
208
212
  between: new Operator({
209
213
  name: "BT",
210
- alias: "DATERANGE",
214
+ alias: {Date: "DATERANGE", DateTime:"DATETIMERANGE"},
211
215
  filterOperator: ModelOperator.BT,
212
216
  tokenParse: "^([^!].*)\\.\\.\\.(.+)$", // TODO: does this work?? At least also matches crap like ".....". I guess validation of value types needs to get rid of those.
213
217
  tokenFormat: "{0}...{1}",
@@ -276,7 +280,7 @@ function(
276
280
  }),
277
281
  lessEqual: new Operator({
278
282
  name: "LE",
279
- alias: "TO",
283
+ alias: {Date: "TO", DateTime: "TODATETIME"},
280
284
  filterOperator: ModelOperator.LE,
281
285
  tokenParse: "^<=(.+)$",
282
286
  tokenFormat: "<={0}",
@@ -292,7 +296,7 @@ function(
292
296
  }),
293
297
  greaterEqual: new Operator({
294
298
  name: "GE",
295
- alias: "FROM",
299
+ alias: {Date: "FROM", DateTime: "FROMDATETIME"},
296
300
  filterOperator: ModelOperator.GE,
297
301
  tokenParse: "^>=(.+)$",
298
302
  tokenFormat: ">={0}",
@@ -365,7 +369,7 @@ function(
365
369
  tokenParse: "^<#tokenText#>$",
366
370
  tokenFormat: "<#tokenText#>",
367
371
  valueTypes: [],
368
- getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive) {
372
+ getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
369
373
  var isNullable = false;
370
374
  if (oType) {
371
375
  var vResult = oType.parseValue("", "string");
@@ -397,7 +401,7 @@ function(
397
401
  tokenFormat: "!(<#tokenText#>)",
398
402
  valueTypes: [],
399
403
  exclude: true,
400
- getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive) {
404
+ getModelFilter: function(oCondition, sFieldPath, oType, bCaseSensitive, sBaseType) {
401
405
  var isNullable = false;
402
406
  if (oType) {
403
407
  var vResult = oType.parseValue("", "string");
@@ -544,7 +548,6 @@ function(
544
548
  }
545
549
  }),
546
550
  todayFromTo: new RangeOperator({
547
- alias: "TODAYXYDAYS",
548
551
  name: "TODAYFROMTO",
549
552
  valueTypes: [
550
553
  {name: "sap.ui.model.type.Integer", formatOptions: { emptyString: null }},
@@ -581,7 +584,6 @@ function(
581
584
  }
582
585
  }),
583
586
  thisWeek: new RangeOperator({
584
- alias: "CURRENTWEEK",
585
587
  name: "THISWEEK",
586
588
  valueTypes: [Operator.ValueType.Static],
587
589
  calcRange: function() {
@@ -621,7 +623,6 @@ function(
621
623
  }
622
624
  }),
623
625
  thisMonth: new RangeOperator({
624
- alias: "CURRENTMONTH",
625
626
  name: "THISMONTH",
626
627
  valueTypes: [Operator.ValueType.Static],
627
628
  calcRange: function() {
@@ -661,7 +662,6 @@ function(
661
662
  }
662
663
  }),
663
664
  thisQuarter: new RangeOperator({
664
- alias: "CURRENTQUARTER",
665
665
  name: "THISQUARTER",
666
666
  valueTypes: [Operator.ValueType.Static],
667
667
  calcRange: function() {
@@ -694,7 +694,6 @@ function(
694
694
  }
695
695
  }),
696
696
  quarter1: new RangeOperator({
697
- alias: "FIRSTQUARTER",
698
697
  name: "QUARTER1",
699
698
  valueTypes: [Operator.ValueType.Static],
700
699
  calcRange: function() {
@@ -702,7 +701,6 @@ function(
702
701
  }
703
702
  }),
704
703
  quarter2: new RangeOperator({
705
- alias: "SECONDQUARTER",
706
704
  name: "QUARTER2",
707
705
  valueTypes: [Operator.ValueType.Static],
708
706
  calcRange: function() {
@@ -710,7 +708,6 @@ function(
710
708
  }
711
709
  }),
712
710
  quarter3: new RangeOperator({
713
- alias: "THIRDQUARTER",
714
711
  name: "QUARTER3",
715
712
  valueTypes: [Operator.ValueType.Static],
716
713
  calcRange: function() {
@@ -718,7 +715,6 @@ function(
718
715
  }
719
716
  }),
720
717
  quarter4: new RangeOperator({
721
- alias: "FOURTHQUARTER",
722
718
  name: "QUARTER4",
723
719
  valueTypes: [Operator.ValueType.Static],
724
720
  calcRange: function() {
@@ -733,7 +729,6 @@ function(
733
729
  }
734
730
  }),
735
731
  thisYear: new RangeOperator({
736
- alias: "CURRENTYEAR",
737
732
  name: "THISYEAR",
738
733
  valueTypes: [Operator.ValueType.Static],
739
734
  calcRange: function() {
@@ -783,7 +778,7 @@ function(
783
778
  oDate = UniversalDateUtils.getMonthStartDate(oDate);
784
779
  return UniversalDateUtils.getRange(0, "MONTH", oDate);
785
780
  },
786
- format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
781
+ format: function(oCondition, oType, sDisplayFormat, bHideOperator, aCompositeTypes) {
787
782
  var iValue = oCondition.values[0];
788
783
  var sTokenText = this.tokenFormat;
789
784
  var sReplace = _getMonths.apply(this)[iValue];
@@ -853,7 +848,7 @@ function(
853
848
  oDate = UniversalDateUtils.getMonthStartDate(oDate);
854
849
  return UniversalDateUtils.getRange(0, "MONTH", oDate);
855
850
  },
856
- format: function(oCondition, oType, sDisplayFormat, bHideOperator) {
851
+ format: function(oCondition, oType, sDisplayFormat, bHideOperator, aCompositeTypes) {
857
852
  var iValue = oCondition.values[0];
858
853
  var iYear = oCondition.values[1];
859
854
  var sTokenText = this.tokenFormat;
@@ -1223,14 +1218,7 @@ function(
1223
1218
 
1224
1219
  for (var sName in FilterOperatorUtil._mOperators) {
1225
1220
  var oOperator = FilterOperatorUtil._mOperators[sName];
1226
- if ( oOperator.name === sOperator) {
1227
- return oOperator;
1228
- }
1229
- }
1230
-
1231
- for (var sName in FilterOperatorUtil._mOperators) {
1232
- var oOperator = FilterOperatorUtil._mOperators[sName];
1233
- if ( oOperator.alias === sOperator) {
1221
+ if (oOperator.name === sOperator) {
1234
1222
  return oOperator;
1235
1223
  }
1236
1224
  }
@@ -1477,6 +1465,81 @@ function(
1477
1465
  oOperator.checkValidated(oCondition);
1478
1466
  }
1479
1467
 
1468
+ },
1469
+
1470
+ /**
1471
+ * Returns the operator object for the given <code>DynamicDateOption</code> name.
1472
+ * @param {string} sOption Name of the operator
1473
+ * @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
1474
+ * @returns {sap.ui.mdc.condition.Operator} the operator object, or undefined if the operator with the requested name does not exist
1475
+ *
1476
+ * @protected
1477
+ * @since: 1.100.0
1478
+ */
1479
+ getOperatorForDynamicDateOption: function(sOption, sBaseType) {
1480
+
1481
+ var oOperator;
1482
+
1483
+ // determine operator name if used as custom DynamicDateOption created in DateContent using getCustomDynamicDateOptionForOperator
1484
+ if (sBaseType && sOption.startsWith(sBaseType)) {
1485
+ oOperator = this.getOperator(sOption.slice(sBaseType.length + 1));
1486
+ } else {
1487
+ oOperator = this.getOperator(sOption);
1488
+ }
1489
+
1490
+ if (!oOperator && sBaseType) {
1491
+ for (var sName in FilterOperatorUtil._mOperators) {
1492
+ var oCheckOperator = FilterOperatorUtil._mOperators[sName];
1493
+ if (oCheckOperator.alias && oCheckOperator.alias[sBaseType] === sOption) {
1494
+ oOperator = oCheckOperator;
1495
+ break;
1496
+ }
1497
+ }
1498
+ }
1499
+
1500
+ return oOperator;
1501
+
1502
+ },
1503
+
1504
+ /**
1505
+ * Determines the corresponding <code>DynamicDateOption</code> for an <code>Operator</code>
1506
+ * from a map of known keys
1507
+ *
1508
+ * @param {sap.ui.mdc.condition.Operator} oOperator Condition to check
1509
+ * @param {object} oDynamicDateRangeKeys Keys for <code>DynamicDateOption</code>
1510
+ * @param {sap.ui.mdc.enum.BaseType} sBaseType Basic type
1511
+ * @returns {string} <code>DynamicDateOption</code>
1512
+ * @protected
1513
+ * @since: 1.100.0
1514
+ */
1515
+ getDynamicDateOptionForOperator: function(oOperator, oDynamicDateRangeKeys, sBaseType) {
1516
+
1517
+ var sOption;
1518
+ if (oOperator) {
1519
+ if (oDynamicDateRangeKeys[oOperator.name]) {
1520
+ sOption = oOperator.name;
1521
+ } else if (oOperator.alias && oDynamicDateRangeKeys[oOperator.alias[sBaseType]]) {
1522
+ sOption = oOperator.alias[sBaseType];
1523
+ }
1524
+ }
1525
+
1526
+ return sOption;
1527
+
1528
+ },
1529
+
1530
+ /**
1531
+ * Determines the corresponding custom <code>DynamicDateOption</code> for an <code>Operator</code>
1532
+ *
1533
+ * @param {sap.ui.mdc.condition.Operator} oOperator Condition to check
1534
+ * @param {sap.ui.mdc.enum.BaseType} sBaseType Basic type
1535
+ * @returns {string} <code>DynamicDateOption</code>
1536
+ * @protected
1537
+ * @since: 1.100.0
1538
+ */
1539
+ getCustomDynamicDateOptionForOperator: function(oOperator, sBaseType) {
1540
+
1541
+ return sBaseType + "-" + oOperator.name;
1542
+
1480
1543
  }
1481
1544
  };
1482
1545
 
@@ -1591,7 +1654,56 @@ function(
1591
1654
  FilterOperatorUtil._mOperators.notLessThan,
1592
1655
  FilterOperatorUtil._mOperators.notLessEqual,
1593
1656
  FilterOperatorUtil._mOperators.notGreaterThan,
1594
- FilterOperatorUtil._mOperators.notGreaterEqual
1657
+ FilterOperatorUtil._mOperators.notGreaterEqual,
1658
+
1659
+ FilterOperatorUtil._mOperators.today,
1660
+ FilterOperatorUtil._mOperators.yesterday,
1661
+ FilterOperatorUtil._mOperators.tomorrow,
1662
+ FilterOperatorUtil._mOperators.firstDayWeek,
1663
+ FilterOperatorUtil._mOperators.lastDayWeek,
1664
+ FilterOperatorUtil._mOperators.firstDayMonth,
1665
+ FilterOperatorUtil._mOperators.lastDayMonth,
1666
+ FilterOperatorUtil._mOperators.firstDayQuarter,
1667
+ FilterOperatorUtil._mOperators.lastDayQuarter,
1668
+ FilterOperatorUtil._mOperators.firstDayYear,
1669
+ FilterOperatorUtil._mOperators.lastDayYear,
1670
+ FilterOperatorUtil._mOperators.todayFromTo,
1671
+ FilterOperatorUtil._mOperators.lastDays,
1672
+ FilterOperatorUtil._mOperators.nextDays,
1673
+
1674
+ FilterOperatorUtil._mOperators.thisWeek,
1675
+ FilterOperatorUtil._mOperators.lastWeek,
1676
+ FilterOperatorUtil._mOperators.lastWeeks,
1677
+ FilterOperatorUtil._mOperators.nextWeek,
1678
+ FilterOperatorUtil._mOperators.nextWeeks,
1679
+
1680
+ FilterOperatorUtil._mOperators.specificMonth,
1681
+ FilterOperatorUtil._mOperators.specificMonthInYear,
1682
+ FilterOperatorUtil._mOperators.thisMonth,
1683
+ FilterOperatorUtil._mOperators.lastMonth,
1684
+ FilterOperatorUtil._mOperators.lastMonths,
1685
+ FilterOperatorUtil._mOperators.nextMonth,
1686
+ FilterOperatorUtil._mOperators.nextMonths,
1687
+
1688
+ FilterOperatorUtil._mOperators.thisQuarter,
1689
+ FilterOperatorUtil._mOperators.lastQuarter,
1690
+ FilterOperatorUtil._mOperators.lastQuarters,
1691
+ FilterOperatorUtil._mOperators.nextQuarter,
1692
+ FilterOperatorUtil._mOperators.nextQuarters,
1693
+
1694
+ FilterOperatorUtil._mOperators.quarter1,
1695
+ FilterOperatorUtil._mOperators.quarter2,
1696
+ FilterOperatorUtil._mOperators.quarter3,
1697
+ FilterOperatorUtil._mOperators.quarter4,
1698
+
1699
+ FilterOperatorUtil._mOperators.thisYear,
1700
+ FilterOperatorUtil._mOperators.lastYear,
1701
+ FilterOperatorUtil._mOperators.lastYears,
1702
+ FilterOperatorUtil._mOperators.nextYear,
1703
+ FilterOperatorUtil._mOperators.nextYears,
1704
+
1705
+ FilterOperatorUtil._mOperators.yearToDate,
1706
+ FilterOperatorUtil._mOperators.dateToYear
1595
1707
  ]
1596
1708
  );
1597
1709
  FilterOperatorUtil.setOperatorsForType(
@@ -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.99.1
87
+ * @version 1.102.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;
@@ -378,15 +380,16 @@ sap.ui.define([
378
380
  *
379
381
  * @param {sap.ui.mdc.condition.ConditionObject} oCondition Condition
380
382
  * @param {sap.ui.model.Type} [oType] Data type
381
- * @param {string} [sDisplay] Display mode
383
+ * @param {sap.ui.mdc.enum.FieldDisplay} [sDisplay] Display mode
382
384
  * @param {boolean} [bHideOperator=false] If set, only the value output is returned without any visible operator
385
+ * @param {sap.ui.model.Type[]} [aCompositeTypes] additional Types used for parts of a <code>CompositeType</code>
383
386
  * @returns {string} formatted text
384
387
  * @throws {sap.ui.model.FormatException} if the values cannot be formatted
385
388
  *
386
389
  * @private
387
390
  * @ui5-restricted sap.ui.mdc
388
391
  */
389
- Operator.prototype.format = function(oCondition, oType, sDisplay, bHideOperator) { // sDisplay needed in EQ formatter
392
+ Operator.prototype.format = function(oCondition, oType, sDisplay, bHideOperator, aCompositeTypes) { // sDisplay needed in EQ formatter
390
393
 
391
394
  var aValues = oCondition.values;
392
395
  var iCount = this.valueTypes.length;
@@ -400,7 +403,7 @@ sap.ui.define([
400
403
  if (vValue === undefined || vValue === null) {
401
404
  vValue = oType ? oType.parseValue("", "string") : ""; // for empty value use initial value of type
402
405
  }
403
- var sReplace = oType ? oType.formatValue(vValue, "string") : vValue;
406
+ var sReplace = this._formatValue(vValue, oType, aCompositeTypes);
404
407
  // the regexp will replace placeholder like $0, 0$ and {0}
405
408
  sTokenText = sTokenText.replace(new RegExp("\\$" + i + "|" + i + "\\$" + "|" + "\\{" + i + "\\}", "g"), sReplace);
406
409
  }
@@ -409,6 +412,45 @@ sap.ui.define([
409
412
 
410
413
  };
411
414
 
415
+ /**
416
+ * Formats a value using the data type.
417
+ *
418
+ * if a <code>CompositeType is used</code> and it needs internal values, the corresponding data types are used to provide these values.
419
+ *
420
+ * @param {any} vValue value
421
+ * @param {sap.ui.model.Type} [oType] Data type
422
+ * @param {sap.ui.model.Type[]} [aCompositeTypes] additional Types used for parts of a <code>CompositeType</code>
423
+ * @returns {string} formatted text
424
+ * @throws {sap.ui.model.FormatException} if the values cannot be formatted
425
+ *
426
+ * @private
427
+ * @ui5-restricted sap.ui.mdc
428
+ */
429
+ Operator.prototype._formatValue = function(vValue, oType, aCompositeTypes) {
430
+
431
+ var sText;
432
+
433
+ if (oType) {
434
+ if (oType.isA("sap.ui.model.CompositeType") && oType.getUseInternalValues() && Array.isArray(vValue) && aCompositeTypes) {
435
+ vValue = merge([], vValue); // use copy to not change original array
436
+ for (var i = 0; i < vValue.length; i++) {
437
+ if (aCompositeTypes[i]) {
438
+ var oFormat = aCompositeTypes[i].getModelFormat();
439
+ if (oFormat && typeof oFormat.parse === "function") {
440
+ vValue[i] = oFormat.parse(vValue[i]);
441
+ }
442
+ }
443
+ }
444
+ }
445
+ sText = oType.formatValue(vValue, "string");
446
+ } else {
447
+ sText = vValue;
448
+ }
449
+
450
+ return sText;
451
+
452
+ };
453
+
412
454
  /**
413
455
  * Parses a text.
414
456
  *
@@ -416,13 +458,14 @@ sap.ui.define([
416
458
  * @param {sap.ui.model.Type} oType Data type
417
459
  * @param {sap.ui.mdc.enum.FieldDisplay} sDisplayFormat Display format
418
460
  * @param {boolean} bDefaultOperator If true, operator is used as default. In this case parsing without operator also works
461
+ * @param {sap.ui.model.Type[]} [aCompositeTypes] additional Types used for parts of a <code>CompositeType</code>
419
462
  * @returns {any[]} array of values
420
463
  * @throws {sap.ui.model.ParseException} if the text cannot be parsed
421
464
  *
422
465
  * @private
423
466
  * @ui5-restricted sap.ui.mdc
424
467
  */
425
- Operator.prototype.parse = function(sText, oType, sDisplayFormat, bDefaultOperator) {
468
+ Operator.prototype.parse = function(sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes) {
426
469
 
427
470
  var aValues = this.getValues(sText, sDisplayFormat, bDefaultOperator);
428
471
  var aResult; // might remain undefined - if no match
@@ -436,7 +479,7 @@ sap.ui.define([
436
479
  if (this.valueTypes[i] !== Operator.ValueType.Static) {
437
480
  var vValue;
438
481
  if (this.valueTypes[i]) {
439
- vValue = this._parseValue(aValues[i], oType);
482
+ vValue = this._parseValue(aValues[i], oType, aCompositeTypes);
440
483
  } else {
441
484
  vValue = aValues[i]; // Description -> just take value
442
485
  }
@@ -459,13 +502,14 @@ sap.ui.define([
459
502
  *
460
503
  * @param {string} sValue Text
461
504
  * @param {sap.ui.model.Type} oType Data type
505
+ * @param {sap.ui.model.Type[]} [aCompositeTypes] additional Types used for parts of a <code>CompositeType</code>
462
506
  * @returns {string} single value
463
507
  * @throws {sap.ui.model.ParseException} if the text cannot be parsed
464
508
  *
465
509
  * @private
466
- * @ui5-restricted Operator subclasses
510
+ * @ui5-restricted sap.ui.mdc
467
511
  */
468
- Operator.prototype._parseValue = function(sValue, oType) { // needed in EQ operator to be accessed from outside
512
+ Operator.prototype._parseValue = function(sValue, oType, aCompositeTypes) { // needed in EQ operator to be accessed from outside
469
513
 
470
514
  if (sValue === undefined) {
471
515
  return sValue; // as some types running in errors with undefined and in this case there is nothing to parse
@@ -478,12 +522,19 @@ sap.ui.define([
478
522
 
479
523
  var vValue = oType ? oType.parseValue(sValue, "string", aCurrentValue) : sValue;
480
524
 
481
- if (oType && oType._aCurrentValue && Array.isArray(vValue)) {
525
+ if (oType && oType.isA("sap.ui.model.CompositeType") && Array.isArray(vValue) && (oType._aCurrentValue || (oType.getUseInternalValues() && aCompositeTypes))) {
482
526
  // in case the user only entered a part of the CompositeType, we add the missing parts from aCurrentValue
483
527
  // but add only the parts that have entries in array after parsing ( not set one-time parts)
484
- for (var j = 0; j < vValue.length; j++) {
485
- if (vValue[j] === undefined) {
486
- vValue[j] = oType._aCurrentValue[j] === undefined ? null : oType._aCurrentValue[j]; // undefined not valid for formatting, needs to be null
528
+ for (var i = 0; i < vValue.length; i++) {
529
+ if (vValue[i] === undefined && oType._aCurrentValue) {
530
+ vValue[i] = oType._aCurrentValue[i] === undefined ? null : oType._aCurrentValue[i]; // undefined in CompositeType means "not changed" -> if no current value it needs to be null
531
+ // value in aCurrentValues is already in model-format, so it need not to be formatted again
532
+ } else if (oType.getUseInternalValues() && aCompositeTypes && aCompositeTypes[i]) {
533
+ // convert result into model-format
534
+ var oFormat = aCompositeTypes[i].getModelFormat();
535
+ if (oFormat && typeof oFormat.format === "function") {
536
+ vValue[i] = oFormat.format(vValue[i]);
537
+ }
487
538
  }
488
539
  }
489
540
  }
@@ -497,12 +548,13 @@ sap.ui.define([
497
548
  *
498
549
  * @param {any} aValues Values
499
550
  * @param {sap.ui.model.Type} oType Data type
551
+ * @param {sap.ui.model.Type[]} [aCompositeTypes] additional Types used for parts of a <code>CompositeType</code>
500
552
  * @throws {sap.ui.model.ValidateException} if the values are invalid
501
553
  *
502
554
  * @private
503
555
  * @ui5-restricted sap.ui.mdc
504
556
  */
505
- Operator.prototype.validate = function(aValues, oType) {
557
+ Operator.prototype.validate = function(aValues, oType, aCompositeTypes) {
506
558
 
507
559
  var iCount = this.valueTypes.length;
508
560
 
@@ -519,6 +571,25 @@ sap.ui.define([
519
571
  if (vValue === undefined || vValue === null) {
520
572
  vValue = oType ? oType.parseValue("", "string") : ""; // for empty value use initial value of type
521
573
  }
574
+
575
+ if (oType.isA("sap.ui.model.CompositeType") && Array.isArray(vValue) && aCompositeTypes) {
576
+ // validate for basic types too
577
+ vValue = merge([], vValue); // use copy to not change original array
578
+ for (var j = 0; j < vValue.length; j++) {
579
+ if (aCompositeTypes[j]) {
580
+ aCompositeTypes[j].validateValue(vValue[j]);
581
+
582
+ if (oType.getUseInternalValues()) {
583
+ // use internal format for validation on CompositeType
584
+ var oFormat = aCompositeTypes[j].getModelFormat();
585
+ if (oFormat && typeof oFormat.parse === "function") {
586
+ vValue[j] = oFormat.parse(vValue[j]);
587
+ }
588
+ }
589
+ }
590
+ }
591
+ }
592
+
522
593
  oType.validateValue(vValue);
523
594
  }
524
595
  }
@@ -655,16 +726,17 @@ sap.ui.define([
655
726
  * @param {sap.ui.model.Type} oType Data type
656
727
  * @param {sap.ui.mdc.enum.FieldDisplay} sDisplayFormat Display format
657
728
  * @param {boolean} bDefaultOperator If true, operator is used as default. In this case parsing without operator also works
729
+ * @param {sap.ui.model.Type[]} [aCompositeTypes] additional Types used for parts of a <code>CompositeType</code>
658
730
  * @returns {sap.ui.mdc.condition.ConditionObject} The condition for the text
659
731
  * @throws {sap.ui.model.ParseException} if the text cannot be parsed
660
732
  *
661
733
  * @private
662
734
  * @ui5-restricted sap.ui.mdc
663
735
  */
664
- Operator.prototype.getCondition = function(sText, oType, sDisplayFormat, bDefaultOperator) {
736
+ Operator.prototype.getCondition = function(sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes) {
665
737
 
666
738
  if (this.test(sText) || (bDefaultOperator && sText && this.hasRequiredValues())) {
667
- var aValues = this.parse(sText, oType, sDisplayFormat, bDefaultOperator);
739
+ var aValues = this.parse(sText, oType, sDisplayFormat, bDefaultOperator, aCompositeTypes);
668
740
  if (aValues.length == this.valueTypes.length || this.valueTypes[0] === Operator.ValueType.Static
669
741
  || (aValues.length === 1 && this.valueTypes.length === 2 && !this.valueTypes[1])) { // EQ also valid without description
670
742
  var oCondition = Condition.createCondition( this.name, aValues );
@@ -742,6 +814,7 @@ sap.ui.define([
742
814
  *
743
815
  * @param {sap.ui.mdc.condition.ConditionObject} oCondition1 Condition to check
744
816
  * @param {sap.ui.mdc.condition.ConditionObject} oCondition2 Condition to check
817
+
745
818
  * @returns {boolean} <code>true</code> if conditions are equal
746
819
  * @private
747
820
  * @ui5-restricted sap.ui.mdc
@@ -755,6 +828,9 @@ sap.ui.define([
755
828
  var oCheckValue1 = this.getCheckValue(oCondition1);
756
829
  var oCheckValue2 = this.getCheckValue(oCondition2);
757
830
 
831
+
832
+ // In/outParameter logic still used as long as old FiledValueHelp is supported
833
+ // Also may exist in older variants
758
834
  if (oCondition1.inParameters && oCondition2.inParameters) {
759
835
  // TODO: also compare in-parameters (but only of set on both)
760
836
  oCheckValue1.inParameters = oCondition1.inParameters;
@@ -766,6 +842,12 @@ sap.ui.define([
766
842
  oCheckValue2.outParameters = oCondition2.outParameters;
767
843
  }
768
844
 
845
+ if (oCondition1.payload && oCondition2.payload) {
846
+ // TODO: check payload also if only set on one condition?
847
+ oCheckValue1.payload = oCondition1.payload;
848
+ oCheckValue2.payload = oCondition2.payload;
849
+ }
850
+
769
851
  if (oCondition1.validated && oCondition2.validated) {
770
852
  // also compare validated (but only of set on both)
771
853
  oCheckValue1.validated = oCondition1.validated;