@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.
Files changed (269) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/README.md +22 -9
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +4 -4
  5. package/src/sap/ui/mdc/.library +1 -1
  6. package/src/sap/ui/mdc/ActionToolbar.js +5 -7
  7. package/src/sap/ui/mdc/AggregationBaseDelegate.js +5 -5
  8. package/src/sap/ui/mdc/BaseDelegate.js +49 -14
  9. package/src/sap/ui/mdc/Chart.js +147 -179
  10. package/src/sap/ui/mdc/ChartDelegate.js +404 -514
  11. package/src/sap/ui/mdc/ChartRenderer.js +11 -11
  12. package/src/sap/ui/mdc/Control.js +4 -4
  13. package/src/sap/ui/mdc/DefaultTypeMap.js +84 -0
  14. package/src/sap/ui/mdc/Element.js +4 -4
  15. package/src/sap/ui/mdc/Field.js +98 -96
  16. package/src/sap/ui/mdc/FilterBar.js +33 -56
  17. package/src/sap/ui/mdc/FilterBarDelegate.js +36 -69
  18. package/src/sap/ui/mdc/FilterField.js +93 -47
  19. package/src/sap/ui/mdc/Link.js +83 -82
  20. package/src/sap/ui/mdc/LinkDelegate.js +29 -48
  21. package/src/sap/ui/mdc/MultiValueField.js +34 -30
  22. package/src/sap/ui/mdc/Table.js +182 -193
  23. package/src/sap/ui/mdc/TableDelegate.js +244 -33
  24. package/src/sap/ui/mdc/ValueHelp.js +67 -50
  25. package/src/sap/ui/mdc/ValueHelpDelegate.js +57 -89
  26. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +4 -12
  27. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +192 -197
  28. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +10 -20
  29. package/src/sap/ui/mdc/chart/ChartToolbar.js +50 -50
  30. package/src/sap/ui/mdc/chart/ChartTypeButton.js +23 -27
  31. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +10 -10
  32. package/src/sap/ui/mdc/chart/DrillStackHandler.js +14 -14
  33. package/src/sap/ui/mdc/chart/Item.js +30 -17
  34. package/src/sap/ui/mdc/chart/PropertyHelper.js +10 -10
  35. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +23 -15
  36. package/src/sap/ui/mdc/condition/Condition.js +11 -23
  37. package/src/sap/ui/mdc/condition/ConditionConverter.js +8 -8
  38. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  39. package/src/sap/ui/mdc/condition/FilterConverter.js +2 -2
  40. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +771 -123
  41. package/src/sap/ui/mdc/condition/Operator.js +52 -50
  42. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +14 -14
  43. package/src/sap/ui/mdc/condition/RangeOperator.js +3 -5
  44. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +2 -2
  45. package/src/sap/ui/mdc/enum/ActionToolbarActionAlignment.js +5 -9
  46. package/src/sap/ui/mdc/enum/BaseType.js +15 -20
  47. package/src/sap/ui/mdc/enum/ConditionValidated.js +5 -9
  48. package/src/sap/ui/mdc/enum/ContentMode.js +1 -0
  49. package/src/sap/ui/mdc/enum/EditMode.js +7 -19
  50. package/src/sap/ui/mdc/enum/FieldDisplay.js +12 -18
  51. package/src/sap/ui/mdc/enum/FilterBarValidationStatus.js +3 -1
  52. package/src/sap/ui/mdc/enum/LinkType.js +40 -0
  53. package/src/sap/ui/mdc/enum/OperatorOverwrite.js +4 -2
  54. package/src/sap/ui/mdc/enum/OperatorValueType.js +47 -0
  55. package/src/sap/ui/mdc/enum/PersistenceMode.js +36 -36
  56. package/src/sap/ui/mdc/enum/ProcessingStrategy.js +3 -1
  57. package/src/sap/ui/mdc/enum/PropagationReason.js +1 -1
  58. package/src/sap/ui/mdc/enum/ReasonMode.js +1 -0
  59. package/src/sap/ui/mdc/enum/SelectType.js +1 -0
  60. package/src/sap/ui/mdc/enums/ActionToolbarActionAlignment.js +31 -0
  61. package/src/sap/ui/mdc/enums/BaseType.js +72 -0
  62. package/src/sap/ui/mdc/enums/ChartItemRoleType.js +61 -0
  63. package/src/sap/ui/mdc/enums/ChartItemType.js +31 -0
  64. package/src/sap/ui/mdc/enums/ChartP13nMode.js +48 -0
  65. package/src/sap/ui/mdc/enums/ChartToolbarActionType.js +49 -0
  66. package/src/sap/ui/mdc/enums/ConditionValidated.js +43 -0
  67. package/src/sap/ui/mdc/enums/ContentMode.js +74 -0
  68. package/src/sap/ui/mdc/enums/FieldDisplay.js +49 -0
  69. package/src/sap/ui/mdc/enums/FieldEditMode.js +55 -0
  70. package/src/sap/ui/mdc/enums/FilterBarP13nMode.js +36 -0
  71. package/src/sap/ui/mdc/enums/FilterBarValidationStatus.js +56 -0
  72. package/src/sap/ui/mdc/enums/LinkType.js +38 -0
  73. package/src/sap/ui/mdc/enums/OperatorOverwrite.js +34 -0
  74. package/src/sap/ui/mdc/enums/OperatorValueType.js +44 -0
  75. package/src/sap/ui/mdc/enums/PersistenceMode.js +44 -0
  76. package/src/sap/ui/mdc/enums/ProcessingStrategy.js +39 -0
  77. package/src/sap/ui/mdc/enums/ReasonMode.js +53 -0
  78. package/src/sap/ui/mdc/enums/TableGrowingMode.js +42 -0
  79. package/src/sap/ui/mdc/enums/TableMultiSelectMode.js +35 -0
  80. package/src/sap/ui/mdc/enums/TableP13nMode.js +54 -0
  81. package/src/sap/ui/mdc/enums/TableRowAction.js +30 -0
  82. package/src/sap/ui/mdc/enums/TableRowCountMode.js +36 -0
  83. package/src/sap/ui/mdc/enums/TableSelectionMode.js +45 -0
  84. package/src/sap/ui/mdc/enums/TableType.js +43 -0
  85. package/src/sap/ui/mdc/enums/ValueHelpPropagationReason.js +41 -0
  86. package/src/sap/ui/mdc/enums/ValueHelpSelectionType.js +46 -0
  87. package/src/sap/ui/mdc/field/ConditionType.js +120 -88
  88. package/src/sap/ui/mdc/field/ConditionsType.js +149 -44
  89. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  90. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +15 -17
  91. package/src/sap/ui/mdc/field/FieldBase.js +512 -323
  92. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +31 -114
  93. package/src/sap/ui/mdc/field/FieldBaseRenderer.js +4 -4
  94. package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -21
  95. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  96. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  97. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  98. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +8 -29
  99. package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +2 -7
  100. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +2 -6
  101. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  102. package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -1
  103. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +0 -4
  104. package/src/sap/ui/mdc/field/content/BooleanContent.js +2 -2
  105. package/src/sap/ui/mdc/field/content/ContentFactory.js +47 -35
  106. package/src/sap/ui/mdc/field/content/DateContent.js +49 -43
  107. package/src/sap/ui/mdc/field/content/DateTimeContent.js +2 -2
  108. package/src/sap/ui/mdc/field/content/DefaultContent.js +8 -8
  109. package/src/sap/ui/mdc/field/content/LinkContent.js +10 -6
  110. package/src/sap/ui/mdc/field/content/SearchContent.js +4 -4
  111. package/src/sap/ui/mdc/field/content/TimeContent.js +2 -2
  112. package/src/sap/ui/mdc/field/content/UnitContent.js +19 -11
  113. package/src/sap/ui/mdc/field/splitValue.js +45 -0
  114. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +109 -218
  115. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +22 -19
  116. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +6 -7
  117. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +2 -4
  118. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +3 -7
  119. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +52 -41
  120. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -4
  121. package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +1 -3
  122. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +4 -2
  123. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +14 -21
  124. package/src/sap/ui/mdc/filterbar/vh/FilterBarDelegate.js +1 -1
  125. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  126. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +2 -38
  127. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +3 -3
  128. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +11 -6
  129. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  130. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +2 -2
  131. package/src/sap/ui/mdc/flexibility/GroupFlex.js +11 -2
  132. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +25 -9
  133. package/src/sap/ui/mdc/flexibility/SortFlex.js +11 -1
  134. package/src/sap/ui/mdc/flexibility/Util.js +2 -2
  135. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +7 -4
  136. package/src/sap/ui/mdc/library.js +178 -84
  137. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  138. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  139. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  140. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  141. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  142. package/src/sap/ui/mdc/link/Factory.js +1 -1
  143. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  144. package/src/sap/ui/mdc/link/LinkItem.js +26 -5
  145. package/src/sap/ui/mdc/link/Panel.js +1 -1
  146. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  147. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  148. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  149. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  150. package/src/sap/ui/mdc/messagebundle.properties +9 -0
  151. package/src/sap/ui/mdc/messagebundle_ar.properties +7 -1
  152. package/src/sap/ui/mdc/messagebundle_bg.properties +19 -13
  153. package/src/sap/ui/mdc/messagebundle_ca.properties +6 -0
  154. package/src/sap/ui/mdc/messagebundle_cs.properties +6 -0
  155. package/src/sap/ui/mdc/messagebundle_cy.properties +6 -0
  156. package/src/sap/ui/mdc/messagebundle_da.properties +6 -0
  157. package/src/sap/ui/mdc/messagebundle_de.properties +6 -0
  158. package/src/sap/ui/mdc/messagebundle_el.properties +13 -7
  159. package/src/sap/ui/mdc/messagebundle_en.properties +6 -0
  160. package/src/sap/ui/mdc/messagebundle_en_GB.properties +6 -0
  161. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +6 -0
  162. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +6 -0
  163. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +6 -0
  164. package/src/sap/ui/mdc/messagebundle_es.properties +6 -0
  165. package/src/sap/ui/mdc/messagebundle_es_MX.properties +6 -0
  166. package/src/sap/ui/mdc/messagebundle_et.properties +6 -0
  167. package/src/sap/ui/mdc/messagebundle_fi.properties +7 -1
  168. package/src/sap/ui/mdc/messagebundle_fr.properties +6 -0
  169. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -4
  170. package/src/sap/ui/mdc/messagebundle_hi.properties +6 -0
  171. package/src/sap/ui/mdc/messagebundle_hr.properties +15 -9
  172. package/src/sap/ui/mdc/messagebundle_hu.properties +8 -2
  173. package/src/sap/ui/mdc/messagebundle_id.properties +6 -0
  174. package/src/sap/ui/mdc/messagebundle_it.properties +10 -4
  175. package/src/sap/ui/mdc/messagebundle_iw.properties +6 -0
  176. package/src/sap/ui/mdc/messagebundle_ja.properties +14 -8
  177. package/src/sap/ui/mdc/messagebundle_kk.properties +16 -10
  178. package/src/sap/ui/mdc/messagebundle_ko.properties +9 -3
  179. package/src/sap/ui/mdc/messagebundle_lt.properties +6 -0
  180. package/src/sap/ui/mdc/messagebundle_lv.properties +6 -0
  181. package/src/sap/ui/mdc/messagebundle_ms.properties +9 -3
  182. package/src/sap/ui/mdc/messagebundle_nl.properties +7 -1
  183. package/src/sap/ui/mdc/messagebundle_no.properties +6 -0
  184. package/src/sap/ui/mdc/messagebundle_pl.properties +8 -2
  185. package/src/sap/ui/mdc/messagebundle_pt.properties +6 -0
  186. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +6 -0
  187. package/src/sap/ui/mdc/messagebundle_ro.properties +6 -0
  188. package/src/sap/ui/mdc/messagebundle_ru.properties +6 -0
  189. package/src/sap/ui/mdc/messagebundle_sh.properties +6 -0
  190. package/src/sap/ui/mdc/messagebundle_sk.properties +8 -2
  191. package/src/sap/ui/mdc/messagebundle_sl.properties +6 -0
  192. package/src/sap/ui/mdc/messagebundle_sv.properties +6 -0
  193. package/src/sap/ui/mdc/messagebundle_th.properties +19 -13
  194. package/src/sap/ui/mdc/messagebundle_tr.properties +6 -0
  195. package/src/sap/ui/mdc/messagebundle_uk.properties +7 -1
  196. package/src/sap/ui/mdc/messagebundle_vi.properties +6 -0
  197. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -1
  198. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +6 -0
  199. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  200. package/src/sap/ui/mdc/mixin/DelegateMixin.js +33 -14
  201. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -5
  202. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  203. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  204. package/src/sap/ui/mdc/odata/TypeMap.js +155 -0
  205. package/src/sap/ui/mdc/odata/TypeUtil.js +42 -1
  206. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +17 -11
  207. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +5 -50
  208. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +1 -1
  209. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +156 -44
  210. package/src/sap/ui/mdc/odata/v4/TypeMap.js +70 -0
  211. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -1
  212. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +8 -9
  213. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +380 -390
  214. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  215. package/src/sap/ui/mdc/p13n/StateUtil.js +6 -19
  216. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  217. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +43 -34
  218. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +3 -4
  219. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +1 -1
  220. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +4 -6
  221. package/src/sap/ui/mdc/table/Column.js +45 -17
  222. package/src/sap/ui/mdc/table/ColumnSettings.js +2 -5
  223. package/src/sap/ui/mdc/table/CreationRow.js +4 -6
  224. package/src/sap/ui/mdc/table/GridTableType.js +31 -115
  225. package/src/sap/ui/mdc/table/PropertyHelper.js +56 -11
  226. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +2 -5
  227. package/src/sap/ui/mdc/table/ResponsiveTableType.js +13 -84
  228. package/src/sap/ui/mdc/table/RowActionItem.js +9 -14
  229. package/src/sap/ui/mdc/table/RowSettings.js +2 -5
  230. package/src/sap/ui/mdc/table/TableSettings.js +23 -19
  231. package/src/sap/ui/mdc/table/TableTypeBase.js +43 -15
  232. package/src/sap/ui/mdc/table/TreeTableType.js +12 -32
  233. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -5
  234. package/src/sap/ui/mdc/table/menu/Item.js +1 -1
  235. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +3 -3
  236. package/src/sap/ui/mdc/table/utils/Personalization.js +4 -4
  237. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +6 -6
  238. package/src/sap/ui/mdc/util/DateUtil.js +15 -11
  239. package/src/sap/ui/mdc/util/FilterUtil.js +44 -19
  240. package/src/sap/ui/mdc/util/IdentifierUtil.js +0 -1
  241. package/src/sap/ui/mdc/util/InfoBar.js +1 -2
  242. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  243. package/src/sap/ui/mdc/util/PropertyHelper.js +15 -8
  244. package/src/sap/ui/mdc/util/TypeMap.js +377 -0
  245. package/src/sap/ui/mdc/util/TypeUtil.js +35 -2
  246. package/src/sap/ui/mdc/util/mapVersions.js +225 -0
  247. package/src/sap/ui/mdc/valuehelp/Dialog.js +52 -33
  248. package/src/sap/ui/mdc/valuehelp/Popover.js +33 -35
  249. package/src/sap/ui/mdc/valuehelp/base/Container.js +193 -62
  250. package/src/sap/ui/mdc/valuehelp/base/Content.js +134 -57
  251. package/src/sap/ui/mdc/{field → valuehelp/base}/DefineConditionPanel.js +426 -197
  252. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -2
  253. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +140 -47
  254. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +11 -9
  255. package/src/sap/ui/mdc/valuehelp/content/Bool.js +11 -20
  256. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +26 -32
  257. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +14 -17
  258. package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +60 -0
  259. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +194 -199
  260. package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -51
  261. package/test/sap/ui/mdc/testutils/opa/chart/AssertionsViz.js +4 -4
  262. package/test/sap/ui/mdc/testutils/opa/field/Actions.js +1 -1
  263. package/test/sap/ui/mdc/testutils/opa/field/Assertions.js +3 -3
  264. package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +4 -2
  265. package/test/sap/ui/mdc/testutils/opa/filterfield/Assertions.js +1 -1
  266. package/test/sap/ui/mdc/testutils/opa/table/Actions.js +41 -70
  267. package/test/sap/ui/mdc/testutils/opa/valueHelp/doWait.js +1 -1
  268. package/src/sap/ui/mdc/designtime/p13n/PersistenceProvider.designtime.js +0 -21
  269. package/src/sap/ui/mdc/util/FormatUtil.js +0 -82
@@ -10,21 +10,23 @@ sap.ui.define([
10
10
  'sap/base/util/deepEqual',
11
11
  'sap/ui/mdc/condition/Condition',
12
12
  'sap/ui/mdc/condition/FilterOperatorUtil',
13
- 'sap/ui/mdc/condition/Operator',
14
- 'sap/ui/mdc/field/ConditionType',
15
- 'sap/ui/mdc/enum/EditMode',
16
- 'sap/ui/mdc/enum/FieldDisplay',
17
- 'sap/ui/mdc/enum/BaseType',
18
- 'sap/ui/mdc/enum/ConditionValidated',
13
+ 'sap/ui/mdc/field/ConditionsType',
14
+ 'sap/ui/mdc/field/splitValue',
15
+ 'sap/ui/mdc/enums/FieldEditMode',
16
+ 'sap/ui/mdc/enums/FieldDisplay',
17
+ 'sap/ui/mdc/enums/BaseType',
18
+ 'sap/ui/mdc/enums/ConditionValidated',
19
+ 'sap/ui/mdc/enums/OperatorValueType',
19
20
  'sap/ui/mdc/Field',
20
21
  'sap/ui/mdc/ValueHelp',
21
22
  'sap/ui/mdc/valuehelp/Popover',
22
23
  'sap/ui/mdc/valuehelp/content/FixedList',
23
- 'sap/ui/mdc/field/ListFieldHelpItem',
24
+ 'sap/ui/mdc/valuehelp/content/FixedListItem',
24
25
  'sap/ui/model/base/ManagedObjectModel',
25
26
  'sap/ui/model/json/JSONModel',
26
27
  'sap/ui/model/resource/ResourceModel',
27
28
  'sap/ui/model/type/String',
29
+ 'sap/ui/model/ParseException',
28
30
  'sap/ui/core/library',
29
31
  'sap/ui/core/InvisibleText',
30
32
  'sap/ui/layout/Grid',
@@ -32,7 +34,12 @@ sap.ui.define([
32
34
  'sap/m/library',
33
35
  'sap/m/Button',
34
36
  'sap/m/Panel',
35
- 'sap/base/Log',
37
+ 'sap/m/OverflowToolbar',
38
+ 'sap/m/OverflowToolbarLayoutData',
39
+ 'sap/m/ToolbarSpacer',
40
+ 'sap/m/Text',
41
+ 'sap/m/Title',
42
+ 'sap/ui/core/IconPool',
36
43
  'sap/ui/core/InvisibleMessage',
37
44
  'sap/ui/thirdparty/jquery'
38
45
  ], function(
@@ -42,21 +49,23 @@ sap.ui.define([
42
49
  deepEqual,
43
50
  Condition,
44
51
  FilterOperatorUtil,
45
- Operator,
46
- ConditionType,
47
- EditMode,
52
+ ConditionsType,
53
+ splitValue,
54
+ FieldEditMode,
48
55
  FieldDisplay,
49
56
  BaseType,
50
57
  ConditionValidated,
58
+ OperatorValueType,
51
59
  Field,
52
60
  ValueHelp,
53
61
  Popover,
54
62
  FixedList,
55
- ListFieldHelpItem,
63
+ FixedListItem,
56
64
  ManagedObjectModel,
57
65
  JSONModel,
58
66
  ResourceModel,
59
67
  StringType,
68
+ ParseException,
60
69
  coreLibrary,
61
70
  InvisibleText,
62
71
  Grid,
@@ -64,7 +73,12 @@ sap.ui.define([
64
73
  mLibrary,
65
74
  Button,
66
75
  Panel,
67
- Log,
76
+ OverflowToolbar,
77
+ OverflowToolbarLayoutData,
78
+ ToolbarSpacer,
79
+ Text,
80
+ Title,
81
+ IconPool,
68
82
  InvisibleMessage,
69
83
  jQuery
70
84
  ) {
@@ -72,13 +86,19 @@ sap.ui.define([
72
86
 
73
87
  // translation utils
74
88
  var oMessageBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
89
+ var oMessageBundleM = sap.ui.getCore().getLibraryResourceBundle("sap.m");
75
90
  sap.ui.getCore().attachLocalizationChanged(function() {
76
91
  oMessageBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
92
+ oMessageBundleM = sap.ui.getCore().getLibraryResourceBundle("sap.m");
77
93
  });
78
94
 
79
95
  var ButtonType = mLibrary.ButtonType;
80
96
  var ValueState = coreLibrary.ValueState;
81
97
  var InvisibleMessageMode = coreLibrary.InvisibleMessageMode;
98
+ var TextAlign = coreLibrary.TextAlign;
99
+ var BackgroundDesign = mLibrary.BackgroundDesign;
100
+ var ToolbarDesign = mLibrary.ToolbarDesign;
101
+ var OverflowToolbarPriority = mLibrary.OverflowToolbarPriority;
82
102
 
83
103
  /**
84
104
  * Constructor for a new <code>DefineConditionPanel</code>.
@@ -93,17 +113,17 @@ sap.ui.define([
93
113
  * @extends sap.ui.core.Control
94
114
  *
95
115
  * @author SAP SE
96
- * @version 1.113.0
116
+ * @version 1.115.0
97
117
  *
98
118
  * @constructor
99
- * @alias sap.ui.mdc.field.DefineConditionPanel
119
+ * @alias sap.ui.mdc.valuehelp.base.DefineConditionPanel
100
120
  * @since 1.58.0
101
121
  * @abstract
102
122
  *
103
123
  * @private
104
124
  * @ui5-restricted sap.ui.mdc.valuehelp.content.Conditions
105
125
  */
106
- var DefineConditionPanel = Control.extend("sap.ui.mdc.field.DefineConditionPanel", {
126
+ var DefineConditionPanel = Control.extend("sap.ui.mdc.valuehelp.base.DefineConditionPanel", {
107
127
  metadata: {
108
128
  library: "sap.ui.mdc",
109
129
  properties: {
@@ -120,13 +140,13 @@ sap.ui.define([
120
140
  byValue: true
121
141
  },
122
142
 
123
- // TODO: better way to pass MaxConditions, Operators, ...
124
143
  /**
125
- * The <code>formatOptions</code> for the {@link sap.ui.mdc.field.ConditionType ConditionType} used to format tokens.
144
+ * Internal configuration
126
145
  *
127
- * @since 1.62.0
146
+ * <b>Note:</b> This property must not be set from outside, it used to forward the configuration of the <code>ValueHelp</code>
147
+ * @since 1.115.0
128
148
  */
129
- formatOptions: {
149
+ config: {
130
150
  type: "object",
131
151
  defaultValue: {}
132
152
  },
@@ -152,6 +172,18 @@ sap.ui.define([
152
172
  inputOK: {
153
173
  type: "boolean",
154
174
  defaultValue: true
175
+ },
176
+
177
+ /**
178
+ * Indicates if pagination is active
179
+ *
180
+ * @since 1.113.0
181
+ * @private
182
+ */
183
+ _pagination: {
184
+ type: "boolean",
185
+ defaultValue: false,
186
+ visibility: "hidden"
155
187
  }
156
188
 
157
189
  },
@@ -174,10 +206,26 @@ sap.ui.define([
174
206
  * <b>Note:</b> The fields are single-value input, and the display is always set to <code>FieldDisplay.Value</code>. Only a <code>ValueHelp</code> with a <code>TypeAhead</code> and single-selection <code>MTable</code> can be used.
175
207
 
176
208
  * <b>Note:</b> For <code>Boolean</code>, <code>Date</code>, or <code>Time</code>, no <code>FieldHelp</code> should be added, but a default <code>ValueHelp</code> used instead.
209
+ * @deprecated as of 1.114.0, replaced by {@link #setValueHelp valueHelp} association
210
+ *
177
211
  */
178
212
  fieldHelp: {
179
213
  type: "sap.ui.mdc.ValueHelp",
180
214
  multiple: false
215
+ },
216
+
217
+ /**
218
+ * Optional <code>ValueHelp</code>.
219
+ *
220
+ * This is an association that allows the usage of one <code>ValueHelp</code> instance for the value fields for the <code>DefineConditionPanel</code>.
221
+ *
222
+ * <b>Note:</b> The fields are single-value input, and the display is always set to <code>FieldDisplay.Value</code>. Only a <code>ValueHelp</code> with a <code>TypeAhead</code> and single-selection <code>MTable</code> can be used.
223
+ *
224
+ * <b>Note:</b> For <code>Boolean</code>, <code>Date</code>, or <code>Time</code>, no <code>ValueHelp</code> should be added, but a default <code>ValueHelp</code> used instead.
225
+ */
226
+ valueHelp: {
227
+ type: "sap.ui.mdc.ValueHelp",
228
+ multiple: false
181
229
  }
182
230
  },
183
231
  events: {
@@ -212,9 +260,18 @@ sap.ui.define([
212
260
  this._oObserver = new ManagedObjectObserver(_observeChanges.bind(this));
213
261
 
214
262
  this._oObserver.observe(this, {
215
- properties: ["conditions", "formatOptions"]
263
+ properties: ["conditions", "config"]
216
264
  });
217
265
 
266
+ this._iStartIndex = 0;
267
+ this._iShownConditions = 10;
268
+ this._iShownAdditionalConditions = 0; // to not switch page by addings conditions, new conditions are shown on the current page even if there are more than the limit
269
+ this._sOperatorHelpId = this.getId() + "--rowSelect-help";
270
+
271
+ this._oContentEventDelegate = {
272
+ onpaste: this.onPaste
273
+ };
274
+
218
275
  _createInnerControls.call(this);
219
276
  this.setModel(this._oManagedObjectModel, "$this");
220
277
  this.setModel(this._oManagedObjectModel, "$condition"); // TODO: better solution to have 2 bindingContexts on one control
@@ -277,17 +334,19 @@ sap.ui.define([
277
334
  // try to reset valueState and value of value Fields inside the removed row
278
335
  var oGrid = this.byId("conditions");
279
336
  var aGridContent = oGrid.getContent();
280
- var iRow = 0;
281
- for (var i = 0; i < aGridContent.length && iRow <= iIndex; i++) {
337
+ var iRow = -1;
338
+ for (var i = 0; i < aGridContent.length; i++) {
282
339
  var oField = aGridContent[i];
283
- if (iRow === iIndex && oField instanceof Field && oField.hasOwnProperty("_iValueIndex")) {
284
- if (oField._isInvalidInput()) { // TODO: better was to find out parsing error
340
+ if (oField instanceof Field && oField.getValueHelp() === this._sOperatorHelpId) {
341
+ // Operator field starts new row
342
+ iRow++;
343
+ }
344
+
345
+ if (oField instanceof Field && oField.hasOwnProperty("_iValueIndex") && oField.getBindingContext("$this").getPath().startsWith(sPath)) {
346
+ if (oField.isInvalidInput()) { // TODO: better way to find out parsing error
285
347
  oField.setValue(null); // to remove invalid value from parsing
286
348
  }
287
349
  }
288
- if (oField instanceof Button && oField.getId().endsWith("-removeBtnLarge")) {
289
- iRow++;
290
- }
291
350
  }
292
351
 
293
352
  if (aConditions.length === 1 && iIndex === 0) {
@@ -296,6 +355,11 @@ sap.ui.define([
296
355
  aConditions = this.getConditions();
297
356
  }
298
357
 
358
+ if (iRow === 0 && this._iStartIndex > 0) {
359
+ // there was only one row on page -> after removing it, go to previous page
360
+ this._iStartIndex = this._iStartIndex - this._iShownConditions;
361
+ }
362
+
299
363
  aConditions.splice(iIndex, 1);
300
364
  this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
301
365
  _checkInvalidInput.call(this, undefined); // check if invalid condition was removed
@@ -305,13 +369,35 @@ sap.ui.define([
305
369
 
306
370
  addCondition: function(oEvent) {
307
371
  var aConditions = this.getConditions();
308
- var oFormatOptions = this.getFormatOptions();
309
- var iMaxConditions = oFormatOptions.maxConditions;
372
+ var oConfig = this.getConfig();
373
+ var iMaxConditions = oConfig.maxConditions;
374
+
375
+ var oGrid = this.byId("conditions");
376
+ var aGridContent = oGrid.getContent();
377
+ var iRows = 0;
378
+ var iIndex = -1;
379
+ for (var i = 0; i < aGridContent.length; i++) {
380
+ var oField = aGridContent[i];
381
+ if (oField instanceof Field && oField.getValueHelp() === this._sOperatorHelpId) {
382
+ // Operator field starts new row
383
+ iRows++;
384
+ var oBindingContext = oField.getBindingContext("$this");
385
+ var sPath = oBindingContext.getPath();
386
+ var aMatch = sPath.match(/^.*\/(\d+)\/$/);
387
+ if (aMatch) {
388
+ iIndex = parseInt(aMatch[1]);
389
+ }
390
+ }
391
+ }
310
392
 
311
393
  if (iMaxConditions === -1 || aConditions.length < iMaxConditions) {
312
394
  // create a new dummy condition for a new condition on the UI - must be removed later if not used or filled correct
313
- this.addDummyCondition(aConditions.length + 1);
395
+ this.addDummyCondition(iIndex + 1);
314
396
  this._bFocusLastCondition = true; // as add-Button will disappear and focus should stay in DefineConditionPanel
397
+
398
+ if (iRows >= this._iShownConditions) {
399
+ this._iShownAdditionalConditions++;
400
+ }
315
401
  }
316
402
 
317
403
  this.oInvisibleMessage.announce(oMessageBundle.getText("valuehelp.DEFINECONDITIONS_ADDCONDITION_ANNOUNCE"), InvisibleMessageMode.Polite);
@@ -323,7 +409,7 @@ sap.ui.define([
323
409
  var sOperator = oOperator.name;
324
410
  var oCondition = Condition.createCondition(sOperator, oOperator.valueDefaults ? oOperator.valueDefaults : [], undefined, undefined, ConditionValidated.NotValidated);
325
411
 
326
- if (oOperator.valueTypes[0] && oOperator.valueTypes[0] !== Operator.ValueType.Static) {
412
+ if (oOperator.valueTypes[0] && oOperator.valueTypes[0] !== OperatorValueType.Static) {
327
413
  // mark the condition as initial and not modified by the user
328
414
  oCondition.isInitial = true;
329
415
  }
@@ -346,16 +432,16 @@ sap.ui.define([
346
432
  },
347
433
 
348
434
  updateDefineConditions: function() {
349
- var aConditions = this.getConditions().filter(function(oCondition) {
350
- var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
351
- return oCondition.validated !== ConditionValidated.Validated || oOperator.exclude;
352
- });
435
+ var aConditions = _getDefineConditions.call(this);
353
436
 
354
437
  _addStaticText.call(this, aConditions, true, false);
355
438
 
356
439
  if (aConditions.length === 0) {
357
440
  this.addDummyCondition();
358
441
  }
442
+ if (aConditions.length < this._iStartIndex) {
443
+ this._iStartIndex = 0;
444
+ }
359
445
  },
360
446
 
361
447
  // called when the user has change the value of the condition field
@@ -413,9 +499,11 @@ sap.ui.define([
413
499
  var sOldKey = oField._sOldKey;
414
500
  var oOperator = FilterOperatorUtil.getOperator(sKey); // operator must exist as List is created from valid operators
415
501
  var oOperatorOld = sOldKey && FilterOperatorUtil.getOperator(sOldKey);
416
- var oCondition = oField.getBindingContext("$this").getObject();
502
+ var oBindingContext = oField.getBindingContext("$this");
503
+ var oCondition = oBindingContext.getObject();
504
+ var sConditionPath = oBindingContext.getPath(); // Path to condition of the active control
505
+ var iIndex = parseInt(sConditionPath.split("/")[2]); // index of current condition
417
506
  var aConditions = this.getConditions();
418
- var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
419
507
  if (iIndex >= 0) {
420
508
  oCondition = aConditions[iIndex]; // to get right instance
421
509
  }
@@ -423,14 +511,14 @@ sap.ui.define([
423
511
  if (oOperator && oOperatorOld) {
424
512
  var bUpdate = false;
425
513
 
426
- if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== Operator.ValueType.Static ) {
514
+ if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== OperatorValueType.Static ) {
427
515
  // type changed -> remove entered value (only if changed by user in Select)
428
516
  // As Static text updated on condition change, don't delete it here.
429
517
  if (iIndex >= 0) {
430
518
  oCondition.values.forEach(function(value, index) {
431
519
  if (value !== null) {
432
- if ((oOperator.valueTypes[index] === Operator.ValueType.Self && oOperatorOld.valueTypes[index] === Operator.ValueType.SelfNoParse) ||
433
- (oOperator.valueTypes[index] === Operator.ValueType.SelfNoParse && oOperatorOld.valueTypes[index] === Operator.ValueType.Self)) {
520
+ if ((oOperator.valueTypes[index] === OperatorValueType.Self && oOperatorOld.valueTypes[index] === OperatorValueType.SelfNoParse) ||
521
+ (oOperator.valueTypes[index] === OperatorValueType.SelfNoParse && oOperatorOld.valueTypes[index] === OperatorValueType.Self)) {
434
522
  // as for Decimal values the type might change we need to format and parse again
435
523
  var oType = _getFieldType.call(this, oOperator.name, index);
436
524
  var oTypeOld = _getFieldType.call(this, oOperatorOld.name, index);
@@ -484,9 +572,11 @@ sap.ui.define([
484
572
 
485
573
  delete oField._sOldKey;
486
574
  }.bind(this)).catch(function (oException) { // if Operator in error state -> don't update values
487
- var oCondition = oField.getBindingContext("$this").getObject();
575
+ var oBindingContext = oField.getBindingContext("$this");
576
+ var oCondition = oBindingContext.getObject();
577
+ var sConditionPath = oBindingContext.getPath(); // Path to condition of the active control
578
+ var iIndex = parseInt(sConditionPath.split("/")[2]); // index of current condition
488
579
  var aConditions = this.getConditions();
489
- var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
490
580
  if (iIndex >= 0) {
491
581
  oCondition = aConditions[iIndex]; // to get right instance
492
582
  }
@@ -499,82 +589,50 @@ sap.ui.define([
499
589
  },
500
590
 
501
591
  onPaste: function(oEvent) {
502
- var sOriginalText;
503
- var oSource = oEvent.srcControl;
504
- var oFormatOptions = this.getFormatOptions();
505
- var iMaxConditions = oFormatOptions.hasOwnProperty("maxConditions") ? oFormatOptions.maxConditions : -1;
506
- var sConditionPath = oSource.getBindingContext("$condition").getPath(); // Path to condition of the active control
507
- var iIndex = parseInt(sConditionPath.split("/")[2]); // index of current condition - to remove before adding new ones
508
-
509
- // for the purpose to copy from column in excel and paste in MultiInput/MultiComboBox
510
- if (window.clipboardData) {
511
- //IE
512
- sOriginalText = window.clipboardData.getData("Text");
513
- } else {
514
- // Chrome, Firefox, Safari
515
- sOriginalText = oEvent.originalEvent.clipboardData.getData('text/plain');
516
- }
517
- var aSeparatedText = sOriginalText.split(/\r\n|\r|\n/g);
518
-
519
- if (aSeparatedText && aSeparatedText.length > 1) {
520
- setTimeout(function() {
521
- var oFormatOptions = merge({}, this.getFormatOptions());
522
- delete oFormatOptions.fieldHelpID;
523
- oFormatOptions.maxConditions = 1;
524
- oFormatOptions.display = FieldDisplay.Value;
525
- //oFormatOptions.valueType = this._getFieldType.call(this, oOperator.name, 0); //TODO using the _getFieldType for better support of types
526
- var oConditionType = new ConditionType(oFormatOptions);
527
-
528
- var iLength = aSeparatedText.length;
529
- var aConditions = this.getConditions();
530
- for (var i = 0; i < iLength; i++) {
531
- if (aSeparatedText[i]) {
532
- var sValue = aSeparatedText[i].trim();
533
-
534
- var aValues = sValue.split(/\t/g); // if two values exist, use it as Between and create a "a...z" value
535
- if (aValues.length == 2 && aValues[0] && aValues[1]) {
536
- var oOperator = FilterOperatorUtil.getOperator("BT");
537
-
538
- sValue = oOperator.tokenFormat;
539
- for (var j = 0; j < 2; j++) {
540
- sValue = sValue.replace(new RegExp("\\{" + j + "\\}", "g"), aValues[j]);
541
- }
542
-
543
- }
544
-
545
- try {
546
- var oCondition = oConditionType.parseValue(sValue, "string");
547
- oConditionType.validateValue(oCondition);
548
-
549
- if (aConditions.length > iIndex) {
550
- // overwrite existing condition
551
- aConditions.splice(iIndex, 1, oCondition);
552
- } else {
553
- // add new condition
554
- aConditions.push(oCondition);
555
- }
556
- iIndex++;
557
-
558
- } catch (error) {
559
- Log.error("Paste handling", "the pasted value '" + sValue + "' could not be handled! " + error.message);
560
- }
561
- }
562
- }
563
-
564
- if (iMaxConditions >= 0 && aConditions.length > iMaxConditions) {
565
- aConditions.splice(iMaxConditions, aConditions.length - iMaxConditions);
566
- }
592
+ // for the purpose to copy from column in Excel and paste as new conditions
593
+ var sOriginalText = oEvent.originalEvent.clipboardData.getData('text/plain');
594
+ var aSeparatedText = splitValue(sOriginalText, true); // check without BT support as if TAB is inside the Paste logic needs to be used anyhow
595
+
596
+ if (aSeparatedText.length > 1) { // if no linebreak just process normal paste-logic
597
+ var oSource = oEvent.srcControl;
598
+ var sConditionPath = oSource.getBindingContext("$condition").getPath(); // Path to condition of the active control
599
+ var iIndex = parseInt(sConditionPath.split("/")[2]); // index of current condition - to remove before adding new ones
600
+ var aConditions = this.getConditions();
601
+ var oFormatOptions = merge({}, this.getConfig());
602
+ oFormatOptions.display = FieldDisplay.Value;
603
+ oFormatOptions.getConditions = function() {return aConditions;}; // as condition where inserted will be removed
604
+ oFormatOptions.defaultOperatorName = aConditions[iIndex].operator; // use current operator as default
605
+ oFormatOptions.valueType = oFormatOptions.dataType;
606
+ delete oFormatOptions.dataType;
607
+ var oConditionsType = new ConditionsType(oFormatOptions);
567
608
 
568
- if (oSource.setDOMValue) {
569
- oSource.setDOMValue(""); // otherwise binding update will be ignored
570
- }
609
+ try {
610
+ aConditions.splice(iIndex, 1); // remove old condition that is overwitten by pasting
611
+ var aNewConditions = oConditionsType._parseValueToIndex(sOriginalText, "string", iIndex);
612
+ oConditionsType.validateValue(aConditions);
571
613
 
572
- FilterOperatorUtil.checkConditionsEmpty(aConditions);
573
- this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
614
+ FilterOperatorUtil.checkConditionsEmpty(aNewConditions);
615
+ this.setProperty("conditions", aNewConditions, true); // do not invalidate whole DefineConditionPanel
574
616
 
575
617
  this.fireConditionProcessed();
618
+ } catch (error) {
619
+ var oException = new ParseException(oMessageBundle.getText("field.PASTE_ERROR"));
620
+ var mErrorParameters = {
621
+ element: oSource,
622
+ property: "value", // TODO: right property for custom content
623
+ type: oConditionsType,
624
+ newValue: sOriginalText,
625
+ oldValue: "", // TODO
626
+ exception: oException,
627
+ message: oException.message
628
+ };
629
+ oSource.fireParseError(mErrorParameters, false, true); // mParameters, bAllowPreventDefault, bEnableEventBubbling
630
+ }
576
631
 
577
- }.bind(this), 0);
632
+ oConditionsType.destroy();
633
+
634
+ oEvent.stopImmediatePropagation(true); // to prevent controls own logic
635
+ oEvent.preventDefault(); // to prevent pasting string into INPUT
578
636
  }
579
637
  },
580
638
 
@@ -585,12 +643,17 @@ sap.ui.define([
585
643
  for (var i = 0; i < aGridContent.length; i++) {
586
644
  var oField = aGridContent[i];
587
645
  if (oField instanceof Field && oField.hasOwnProperty("_iValueIndex")) {
588
- if (oField._isInvalidInput()) { // TODO: better was to find out parsing error
646
+ if (oField.isInvalidInput()) { // TODO: better was to find out parsing error
589
647
  oField.setValue(); // to remove invalid value from parsing
590
648
  }
591
649
  }
592
650
  }
593
651
  this.setProperty("inputOK", true, true); // do not invalidate whole DefineConditionPanel
652
+ if (this._iStartIndex > 0 || this._iShownAdditionalConditions > 0) {
653
+ this._iStartIndex = 0;
654
+ this._iShownAdditionalConditions = 0;
655
+ _renderConditions.call(this); // to have right paging on reopening
656
+ }
594
657
  },
595
658
 
596
659
  /**
@@ -605,8 +668,14 @@ sap.ui.define([
605
668
  var oGrid = this.getAggregation("_content").getContent()[1];
606
669
  var oCtrl = oGrid.getContent()[0]; // 0=Operator Field, 2=first Value Field which might not exist
607
670
  return oCtrl;
608
- }
671
+ },
672
+
673
+ // TODO: remove this function and replace by getValueHelp onde FieldHelp association is completetly removed.
674
+ _getValueHelp: function() {
675
+
676
+ return this.getValueHelp() || (this.getFieldHelp && this.getFieldHelp()); // as getFieldHelp not exist in legacy-free UI5
609
677
 
678
+ }
610
679
  });
611
680
 
612
681
  function _observeChanges(oChanges) {
@@ -616,7 +685,7 @@ sap.ui.define([
616
685
  _operatorChanged.call(this, oChanges.object, oChanges.current, oChanges.old);
617
686
  }
618
687
 
619
- if (oChanges.name === "formatOptions") {
688
+ if (oChanges.name === "config") {
620
689
  // type or maxConditions might changed -> resume ListBinding
621
690
  var aConditions = this.getConditions();
622
691
  var oOperators = oChanges.current && oChanges.current.operators;
@@ -628,7 +697,7 @@ sap.ui.define([
628
697
  _updateOperatorModel.call(this);
629
698
  }
630
699
 
631
- var oType = oChanges.current && oChanges.current.valueType;
700
+ var oType = oChanges.current && oChanges.current.dataType;
632
701
  var oTypeOld = oChanges.old && oChanges.old.valueType;
633
702
  var sType = oType && oType.getMetadata().getName();
634
703
  var sTypeOld = oTypeOld && oTypeOld.getMetadata().getName();
@@ -674,8 +743,8 @@ sap.ui.define([
674
743
 
675
744
  function _operatorSupportsValueHelp(sKey) {
676
745
  return true;
677
- // var aFieldHelpSupportedOperators = ["EQ", "NE"]; // only for this operators we use the FieldHelp on the value fields
678
- // return aFieldHelpSupportedOperators.length === 0 || aFieldHelpSupportedOperators.indexOf(sKey) >= 0;
746
+ // var aValueHelpSupportedOperators = ["EQ", "NE"]; // only for this operators we use the ValueHelp on the value fields
747
+ // return aValueHelpSupportedOperators.length === 0 || aValueHelpSupportedOperators.indexOf(sKey) >= 0;
679
748
  }
680
749
 
681
750
  function _operatorChanged(oField, sKey, sOldKey) {
@@ -696,14 +765,14 @@ sap.ui.define([
696
765
  // find fields and initialize error state
697
766
  oValue0Field = oGrid.getContent()[iIndex + 2];
698
767
  if (oValue0Field && oValue0Field.hasOwnProperty("_iValueIndex") && oValue0Field._iValueIndex === 0) {
699
- if (oValue0Field instanceof Field && !oValue0Field._isInvalidInput()) { // TODO: better was to find out parsing error // TODO: handle custom controls
768
+ if (oValue0Field instanceof Field && !oValue0Field.isInvalidInput()) { // TODO: better was to find out parsing error // TODO: handle custom controls
700
769
  // if Field is in parsing error state, don't remove error
701
770
  oValue0Field.setValueState(ValueState.None);
702
771
  oValue0Field.setValueStateText();
703
772
  }
704
773
  oValue1Field = oGrid.getContent()[iIndex + 3]; // second field only exists if first field exist
705
774
  if (oValue1Field && oValue1Field.hasOwnProperty("_iValueIndex") && oValue1Field._iValueIndex === 1) {
706
- if (oValue1Field instanceof Field && !oValue1Field._isInvalidInput()) { // TODO: better was to find out parsing error // TODO: handle custom controls
775
+ if (oValue1Field instanceof Field && !oValue1Field.isInvalidInput()) { // TODO: better was to find out parsing error // TODO: handle custom controls
707
776
  // if Field is in parsing error state, don't remove error
708
777
  oValue1Field.setValueState(ValueState.None);
709
778
  oValue1Field.setValueStateText();
@@ -716,14 +785,14 @@ sap.ui.define([
716
785
  }
717
786
 
718
787
  if (_operatorSupportsValueHelp(sKey)) {
719
- // enable the fieldHelp for the used value fields
720
- var sFiedHelp = this.getFieldHelp();
721
- oValue0Field && oValue0Field.setFieldHelp && oValue0Field.setFieldHelp(sFiedHelp);
722
- oValue1Field && oValue1Field.setFieldHelp && oValue1Field.setFieldHelp(sFiedHelp);
788
+ // enable the ValueHelp for the used value fields
789
+ var sValueHelp = this._getValueHelp();
790
+ oValue0Field && oValue0Field.setValueHelp && oValue0Field.setValueHelp(sValueHelp);
791
+ oValue1Field && oValue1Field.setValueHelp && oValue1Field.setValueHelp(sValueHelp);
723
792
  } else {
724
- // remove the fieldHelp for the used value fields
725
- oValue0Field && oValue0Field.setFieldHelp && oValue0Field.setFieldHelp();
726
- oValue1Field && oValue1Field.setFieldHelp && oValue1Field.setFieldHelp();
793
+ // remove the ValueHelp for the used value fields
794
+ oValue0Field && oValue0Field.setValueHelp && oValue0Field.setValueHelp();
795
+ oValue1Field && oValue1Field.setValueHelp && oValue1Field.setValueHelp();
727
796
  }
728
797
 
729
798
  if (oOperator.createControl || oOperatorOld.createControl) {
@@ -796,7 +865,7 @@ sap.ui.define([
796
865
  editMode: {parts: [{path: "$condition>operator"}, {path: "$condition>invalid"}], formatter: _getEditModeFromOperator},
797
866
  multipleLines: false,
798
867
  width: "100%",
799
- fieldHelp: _operatorSupportsValueHelp(oCondition.operator) ? this.getFieldHelp() : null
868
+ valueHelp: _operatorSupportsValueHelp(oCondition.operator) ? this._getValueHelp() : null
800
869
  //display: should always be FieldDisplay.Value
801
870
  });
802
871
  }
@@ -813,8 +882,8 @@ sap.ui.define([
813
882
  if (oControl.attachChange) { // custom control might not have a change event
814
883
  oControl.attachChange(this.onChange.bind(this));
815
884
  }
816
- oControl.onpaste = this.onPaste.bind(this);
817
- oControl.setLayoutData(new GridData({span: {parts: [{path: "$condition>"}, {path: "$this>/formatOptions"}], formatter: _getSpanForValue.bind(this)}}));
885
+ oControl.addDelegate(this._oContentEventDelegate, true, this);
886
+ oControl.setLayoutData(new GridData({span: {parts: [{path: "$condition>"}, {path: "$this>/config"}], formatter: _getSpanForValue.bind(this)}}));
818
887
  oControl.setBindingContext(oValueBindingContext, "$this");
819
888
  oControl.setBindingContext(oBindingContext, "$condition");
820
889
  // add fieldGroup to validate Condition only after both Fields are entered.
@@ -829,13 +898,13 @@ sap.ui.define([
829
898
  var oDataType = _getType.call(this);
830
899
  var oOperator = FilterOperatorUtil.getOperator(sOperator);
831
900
 
832
- if (oOperator.valueTypes[iIndex] && [Operator.ValueType.Self, Operator.ValueType.Static].indexOf(oOperator.valueTypes[iIndex]) === -1) {
901
+ if (oOperator.valueTypes[iIndex] && [OperatorValueType.Self, OperatorValueType.Static].indexOf(oOperator.valueTypes[iIndex]) === -1) {
833
902
  oDataType = oOperator._createLocalType(oOperator.valueTypes[iIndex], oDataType);
834
903
  }
835
904
 
836
905
  var bStaticText = false;
837
906
 
838
- if (oOperator.valueTypes[iIndex] === Operator.ValueType.Static) {
907
+ if (oOperator.valueTypes[iIndex] === OperatorValueType.Static) {
839
908
  bStaticText = true;
840
909
  oDataType = _getDefaultType.call(this);
841
910
  }
@@ -897,7 +966,7 @@ sap.ui.define([
897
966
  function _getDefaultOperator() {
898
967
  var aOperators = _getOperators.call(this);
899
968
  var oOperator;
900
- var sOperatorName = this.getFormatOptions().defaultOperatorName;
969
+ var sOperatorName = this.getConfig().defaultOperatorName;
901
970
  if (sOperatorName) {
902
971
  oOperator = FilterOperatorUtil.getOperator(sOperatorName);
903
972
  } else {
@@ -927,8 +996,8 @@ sap.ui.define([
927
996
 
928
997
  function _getOperators() {
929
998
 
930
- var oFormatOptions = this.getFormatOptions();
931
- var aOperators = oFormatOptions && oFormatOptions.operators;
999
+ var oConfig = this.getConfig();
1000
+ var aOperators = oConfig && oConfig.operators;
932
1001
 
933
1002
  if (!aOperators || aOperators.length === 0) {
934
1003
  // TODO: better default
@@ -968,14 +1037,14 @@ sap.ui.define([
968
1037
 
969
1038
  var bHasMultipleGroups = _hasMultipleOperatorGroups.call(this);
970
1039
 
971
- var sFixedListId = this.getId() + "--rowSelect-help-pop-fl";
1040
+ var sFixedListId = this._sOperatorHelpId + "-pop-fl";
972
1041
  var oFixedList = sap.ui.getCore().byId(sFixedListId);
973
1042
 
974
1043
  var oTemplate;
975
1044
  if (bHasMultipleGroups) {
976
- oTemplate = new ListFieldHelpItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}", groupKey: "{om>groupId}", groupText: "{om>groupText}"});
1045
+ oTemplate = new FixedListItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}", groupKey: "{om>groupId}", groupText: "{om>groupText}"});
977
1046
  } else {
978
- oTemplate = new ListFieldHelpItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}"});
1047
+ oTemplate = new FixedListItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}"});
979
1048
  }
980
1049
  oFixedList.bindAggregation("items", { path: 'om>/', templateShareable: false, template: oTemplate});
981
1050
  oFixedList.setGroupable(bHasMultipleGroups);
@@ -1015,8 +1084,8 @@ sap.ui.define([
1015
1084
 
1016
1085
  function _getType() {
1017
1086
 
1018
- var oFormatOptions = this.getFormatOptions();
1019
- var oType = oFormatOptions && oFormatOptions.valueType;
1087
+ var oConfig = this.getConfig();
1088
+ var oType = oConfig && oConfig.dataType;
1020
1089
  if (!oType) {
1021
1090
  oType = _getDefaultType.call(this);
1022
1091
  }
@@ -1039,9 +1108,9 @@ sap.ui.define([
1039
1108
  var sType = oType.getMetadata().getName();
1040
1109
  var oFormatOptions = oType.getFormatOptions();
1041
1110
  var oConstraints = oType.getConstraints();
1042
- var oDelegate = this.getFormatOptions().delegate;
1043
- var oPayload = this.getFormatOptions().payload;
1044
- var sBaseType = oDelegate ? oDelegate.getTypeUtil(oPayload).getBaseType(sType, oFormatOptions, oConstraints) : BaseType.String; // if not configured use string
1111
+ var oDelegate = this.getConfig().delegate;
1112
+ var oField = this.getConfig().control;
1113
+ var sBaseType = oDelegate ? oDelegate.getTypeMap(oField).getBaseType(sType, oFormatOptions, oConstraints) : BaseType.String; // if not configured use string
1045
1114
 
1046
1115
  if (sBaseType === BaseType.Unit) {
1047
1116
  sBaseType = BaseType.Numeric;
@@ -1053,9 +1122,9 @@ sap.ui.define([
1053
1122
 
1054
1123
  function _getDelegate() {
1055
1124
 
1056
- var oFormatOptions = this.getFormatOptions();
1057
- var sName = oFormatOptions.delegateName || "sap/ui/mdc/field/FieldBaseDelegate";
1058
- var oPayload = oFormatOptions.payload;
1125
+ var oConfig = this.getConfig();
1126
+ var sName = oConfig.delegateName || "sap/ui/mdc/field/FieldBaseDelegate";
1127
+ var oPayload = oConfig.payload;
1059
1128
 
1060
1129
  return {name: sName, payload: oPayload};
1061
1130
 
@@ -1070,7 +1139,7 @@ sap.ui.define([
1070
1139
  for (i = 0; i < aConditions.length; i++) {
1071
1140
  var oCondition = aConditions[i];
1072
1141
  var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
1073
- if (oOperator && oOperator.valueTypes[0] === Operator.ValueType.Static && (oCondition.values.length === 0 || bTypeChange)) {
1142
+ if (oOperator && oOperator.valueTypes[0] === OperatorValueType.Static && (oCondition.values.length === 0 || bTypeChange)) {
1074
1143
  // if type changed the text needs to be new formatted (setting of type and conditions might be async.)
1075
1144
  if (oOperator.getStaticText) {
1076
1145
  var sText = oOperator.getStaticText(oDataType, _getBaseType.call(this, oDataType));
@@ -1092,17 +1161,67 @@ sap.ui.define([
1092
1161
 
1093
1162
  function _createInnerControls() {
1094
1163
  var oInvisibleOperatorText = new InvisibleText(this.getId() + "--ivtOperator", {text: "{$i18n>valuehelp.DEFINECONDITIONS_OPERATORLABEL}"});
1164
+ var oTitle = new Title(this.getId() + "-title", {text: {path: "$this>/label"}});
1165
+ var oButtonPrev = new Button(this.getId() + "--prev", {
1166
+ icon: IconPool.getIconURI("navigation-left-arrow"),
1167
+ tooltip: oMessageBundleM.getText("PAGINGBUTTON_PREVIOUS"),
1168
+ visible: {path: "$this>/_pagination"},
1169
+ layoutData: new OverflowToolbarLayoutData({
1170
+ priority: OverflowToolbarPriority.NeverOverflow
1171
+ }),
1172
+ press: _handlePrevious.bind(this)
1173
+ });
1174
+ var oButtonNext = new Button(this.getId() + "--next", {
1175
+ icon: IconPool.getIconURI("navigation-right-arrow"),
1176
+ tooltip: oMessageBundleM.getText("PAGINGBUTTON_NEXT"),
1177
+ visible: {path: "$this>/_pagination"},
1178
+ layoutData: new OverflowToolbarLayoutData({
1179
+ priority: OverflowToolbarPriority.NeverOverflow
1180
+ }),
1181
+ press: _handleNext.bind(this)
1182
+ });
1183
+ var oButtonRemoveAll = new Button(this.getId() + "--removeAll", {
1184
+ text: oMessageBundleM.getText("CONDITIONPANEL_REMOVE_ALL"),
1185
+ visible: {path: "$this>/_pagination"},
1186
+ layoutData: new OverflowToolbarLayoutData({
1187
+ priority: OverflowToolbarPriority.Low
1188
+ }),
1189
+ press: _handleRemoveAll.bind(this)
1190
+ });
1191
+ var oButtonInsert = new Button(this.getId() + "--insert", {
1192
+ icon: IconPool.getIconURI("add"),
1193
+ visible: {path: "$this>/_pagination"},
1194
+ layoutData: new OverflowToolbarLayoutData({
1195
+ priority: OverflowToolbarPriority.Low
1196
+ }),
1197
+ press: _handleInsert.bind(this)
1198
+ });
1199
+ var oPageCount = new Text(this.getId() + "--pageCount", {
1200
+ text: _getPageText.call(this),
1201
+ wrapping: false,
1202
+ textAlign: TextAlign.Center,
1203
+ visible: {path: "$this>/_pagination"},
1204
+ layoutData: new OverflowToolbarLayoutData({
1205
+ priority: OverflowToolbarPriority.NeverOverflow
1206
+ })
1207
+ });
1208
+ var oToolbar = new OverflowToolbar(this.getId() + "--toolbar", {
1209
+ width: "100%",
1210
+ design: ToolbarDesign.Transparent,
1211
+ content: [oTitle, new ToolbarSpacer(), oButtonPrev, oPageCount, oButtonNext, oButtonRemoveAll, oButtonInsert]
1212
+ });
1095
1213
 
1096
- var oPanel = new Panel({headerText: "{$this>/label}",
1214
+ var oPanel = new Panel(this.getId() + "--panel", {
1215
+ headerToolbar: oToolbar,
1097
1216
  expanded: true,
1098
1217
  height: "100%",
1099
- backgroundDesign: "Transparent"}
1218
+ backgroundDesign: BackgroundDesign.Transparent}
1100
1219
  ).addStyleClass("sapMdcDefineconditionPanel");
1101
1220
 
1102
1221
  oPanel.addDependent(
1103
- new ValueHelp(this.getId() + "--rowSelect-help", {
1104
- typeahead: new Popover(this.getId() + "--rowSelect-help-pop", {
1105
- content: [new FixedList(this.getId() + "--rowSelect-help-pop-fl", {
1222
+ new ValueHelp(this._sOperatorHelpId, {
1223
+ typeahead: new Popover(this._sOperatorHelpId + "-pop", {
1224
+ content: [new FixedList(this._sOperatorHelpId + "-pop-fl", {
1106
1225
  filterList: false,
1107
1226
  useFirstMatch: true
1108
1227
  })]
@@ -1135,10 +1254,10 @@ sap.ui.define([
1135
1254
  span: "XL2 L3 M3 S3",
1136
1255
  indent: "XL9 L8 M8 S7",
1137
1256
  linebreak: true,
1138
- visibleS: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getAddButtonVisible.bind(this)},
1139
- visibleM: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getAddButtonVisible.bind(this)},
1140
- visibleL: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getAddButtonVisible.bind(this)},
1141
- visibleXL: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getAddButtonVisible.bind(this)}}),
1257
+ visibleS: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getAddButtonVisible.bind(this)},
1258
+ visibleM: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getAddButtonVisible.bind(this)},
1259
+ visibleL: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getAddButtonVisible.bind(this)},
1260
+ visibleXL: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getAddButtonVisible.bind(this)}}),
1142
1261
  ariaDescribedBy: this._oInvisibleAddOperatorButtonText
1143
1262
  });
1144
1263
 
@@ -1150,17 +1269,17 @@ sap.ui.define([
1150
1269
 
1151
1270
  }
1152
1271
 
1153
- function _getAddButtonVisible(aConditions, oFormatOptions) {
1272
+ function _getAddButtonVisible(aConditions, oConfig) {
1154
1273
 
1155
- var iMaxConditions = oFormatOptions.hasOwnProperty("maxConditions") ? oFormatOptions.maxConditions : -1;
1274
+ var iMaxConditions = oConfig.hasOwnProperty("maxConditions") ? oConfig.maxConditions : -1;
1156
1275
 
1157
1276
  return iMaxConditions === -1 || aConditions.length < iMaxConditions;
1158
1277
 
1159
1278
  }
1160
1279
 
1161
- function _getRemoveButtonVisible(aConditions, oFormatOptions) {
1280
+ function _getRemoveButtonVisible(aConditions, oConfig) {
1162
1281
 
1163
- var iMaxConditions = oFormatOptions.hasOwnProperty("maxConditions") ? oFormatOptions.maxConditions : -1;
1282
+ var iMaxConditions = oConfig.hasOwnProperty("maxConditions") ? oConfig.maxConditions : -1;
1164
1283
 
1165
1284
  // only on case of maxCondition==1 the Remove icons should be invisible
1166
1285
  return iMaxConditions !== 1;
@@ -1171,36 +1290,46 @@ sap.ui.define([
1171
1290
 
1172
1291
  var aConditions = this.getConditions();
1173
1292
  var oGrid = this.byId("conditions");
1293
+ var oButtonPrev = this.byId("prev");
1294
+ var oButtonNext = this.byId("next");
1295
+ var oPageCount = this.byId("pageCount");
1174
1296
  var aGridContent;
1175
1297
  var iRow = -1;
1176
1298
  var iIndex = 0;
1299
+ var iDefineConditions = -1;
1300
+ var iShownConditions = this._iShownConditions + this._iShownAdditionalConditions;
1177
1301
 
1178
- for (var i = 0; i < aConditions.length; i++) {
1302
+ for (var i = 0; i < aConditions.length && iRow < iShownConditions; i++) {
1179
1303
  var oCondition = aConditions[i];
1180
1304
  var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
1181
1305
  if (oCondition.validated !== ConditionValidated.Validated || oOperator.exclude) {
1182
1306
  // show only validated conditions
1183
- var oBindingContext = this._oManagedObjectModel.getContext("/conditions/" + i + "/");
1184
- iRow++;
1185
-
1186
- if (!this.oOperatorModel) {
1187
- // init operatorModel if first row is created (needed to check operator)
1188
- this.oOperatorModel = new JSONModel();
1189
- this.setModel(this.oOperatorModel, "om");
1190
- _updateOperatorModel.call(this);
1191
- }
1307
+ iDefineConditions++;
1308
+ if (iDefineConditions >= this._iStartIndex) {
1309
+ // show only conditions on this page
1310
+ iRow++;
1311
+ if (iRow < iShownConditions) {
1312
+ var oBindingContext = this._oManagedObjectModel.getContext("/conditions/" + i + "/");
1313
+
1314
+ if (!this.oOperatorModel) {
1315
+ // init operatorModel if first row is created (needed to check operator)
1316
+ this.oOperatorModel = new JSONModel();
1317
+ this.setModel(this.oOperatorModel, "om");
1318
+ _updateOperatorModel.call(this);
1319
+ }
1192
1320
 
1193
- aGridContent = oGrid.getContent(); // to have current content
1194
- if (aGridContent[iIndex] && aGridContent[iIndex].isA("sap.ui.mdc.Field")) {
1195
- // row already exists -> update it
1196
- iIndex = _updateRow.call(this, oCondition, oGrid, iIndex, oBindingContext, iRow);
1197
- } else {
1198
- // reate new row
1199
- iIndex = _createRow.call(this, oCondition, oGrid, iIndex, oBindingContext, iRow);
1321
+ aGridContent = oGrid.getContent(); // to have current content
1322
+ if (aGridContent[iIndex] && aGridContent[iIndex].isA("sap.ui.mdc.Field")) {
1323
+ // row already exists -> update it
1324
+ iIndex = _updateRow.call(this, oCondition, oGrid, iIndex, oBindingContext, iRow);
1325
+ } else {
1326
+ // reate new row
1327
+ iIndex = _createRow.call(this, oCondition, oGrid, iIndex, oBindingContext, iRow);
1328
+ }
1329
+ }
1200
1330
  }
1201
1331
  }
1202
1332
  }
1203
-
1204
1333
  // remove unused rows
1205
1334
  aGridContent = oGrid.getContent();
1206
1335
  while (aGridContent[iIndex] && aGridContent[iIndex] !== this.byId("addBtn")) {
@@ -1222,6 +1351,10 @@ sap.ui.define([
1222
1351
  this._bFocusLastRemoveBtn = false;
1223
1352
  }
1224
1353
 
1354
+ oPageCount.setText(_getPageText.call(this));
1355
+ oButtonPrev.setEnabled(this._iStartIndex > 0);
1356
+ oButtonNext.setEnabled(iRow >= iShownConditions); // there is at least one more row than conditions are shown
1357
+ this.setProperty("_pagination", iDefineConditions >= iShownConditions);
1225
1358
  }
1226
1359
 
1227
1360
  function _getGridIndexOfLastRowWithVisibleElement(aIdEndsWith) {
@@ -1283,13 +1416,13 @@ sap.ui.define([
1283
1416
  value: {path: "$this>operator", type: this._oOperatorFieldType},
1284
1417
  width: "100%",
1285
1418
  display: FieldDisplay.Description,
1286
- editMode: EditMode.Editable,
1419
+ editMode: FieldEditMode.Editable,
1287
1420
  multipleLines: false,
1288
- fieldHelp: this.getId() + "--rowSelect-help",
1421
+ valueHelp: this._sOperatorHelpId,
1289
1422
  change: this.onSelectChange.bind(this),
1290
1423
  ariaLabelledBy: this.getId() + "--ivtOperator"
1291
1424
  })
1292
- .setLayoutData(new GridData({span: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getSpanForOperator.bind(this)}, linebreak: true}))
1425
+ .setLayoutData(new GridData({span: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getSpanForOperator.bind(this)}, linebreak: true}))
1293
1426
  .setBindingContext(oBindingContext, "$this");
1294
1427
  if (oBindingContext) {
1295
1428
  // validate only complete condition
@@ -1312,7 +1445,7 @@ sap.ui.define([
1312
1445
  })
1313
1446
  .setLayoutData(new GridData({span: "XL1 L1 M1 S2",
1314
1447
  indent: {path: "$this>operator", formatter: _getIndentForOperator},
1315
- visibleS: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getRemoveButtonVisible.bind(this)},
1448
+ visibleS: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getRemoveButtonVisible.bind(this)},
1316
1449
  visibleM: false,
1317
1450
  visibleL: false,
1318
1451
  visibleXL: false
@@ -1345,9 +1478,9 @@ sap.ui.define([
1345
1478
  .setLayoutData(new GridData({span: "XL1 L1 M1 S1",
1346
1479
  indent: {path: "$this>operator", formatter: _getIndentForOperator},
1347
1480
  visibleS: false,
1348
- visibleM: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getRemoveButtonVisible.bind(this)},
1349
- visibleL: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getRemoveButtonVisible.bind(this)},
1350
- visibleXL: {parts: [{path: "$this>/conditions"}, {path: "$this>/formatOptions"}], formatter: _getRemoveButtonVisible.bind(this)}
1481
+ visibleM: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getRemoveButtonVisible.bind(this)},
1482
+ visibleL: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getRemoveButtonVisible.bind(this)},
1483
+ visibleXL: {parts: [{path: "$this>/conditions"}, {path: "$this>/config"}], formatter: _getRemoveButtonVisible.bind(this)}
1351
1484
  }))
1352
1485
  .setBindingContext(oBindingContext, "$this"); // to find condition on remove
1353
1486
 
@@ -1363,17 +1496,17 @@ sap.ui.define([
1363
1496
  if (!sOperator) {
1364
1497
  return this.getEditMode(); // do not change edit mode to prevent update if temporary no operator
1365
1498
  } else if (bInvalid) {
1366
- return EditMode.ReadOnly;
1499
+ return FieldEditMode.ReadOnly;
1367
1500
  }
1368
1501
 
1369
1502
  var oOperator = FilterOperatorUtil.getOperator(sOperator);
1370
1503
  var bStaticText = false;
1371
1504
 
1372
- if (oOperator && oOperator.valueTypes[0] === Operator.ValueType.Static) {
1505
+ if (oOperator && oOperator.valueTypes[0] === OperatorValueType.Static) {
1373
1506
  bStaticText = true;
1374
1507
  }
1375
1508
 
1376
- return bStaticText ? EditMode.Display : EditMode.Editable;
1509
+ return bStaticText ? FieldEditMode.Display : FieldEditMode.Editable;
1377
1510
 
1378
1511
  }
1379
1512
 
@@ -1381,7 +1514,7 @@ sap.ui.define([
1381
1514
 
1382
1515
  var oOperator = sOperator && FilterOperatorUtil.getOperator(sOperator);
1383
1516
 
1384
- if (!oOperator || !oOperator.valueTypes[0] || (oOperator.valueTypes[0] === Operator.ValueType.Static && !oOperator.getStaticText)) {
1517
+ if (!oOperator || !oOperator.valueTypes[0] || (oOperator.valueTypes[0] === OperatorValueType.Static && !oOperator.getStaticText)) {
1385
1518
  return "XL8 L8 M8 S0";
1386
1519
  } else {
1387
1520
  return "";
@@ -1389,8 +1522,8 @@ sap.ui.define([
1389
1522
 
1390
1523
  }
1391
1524
 
1392
- function _getSpanForOperator(aConditions, oFormatOptions) {
1393
- var iMaxConditions = oFormatOptions.hasOwnProperty("maxConditions") ? oFormatOptions.maxConditions : -1;
1525
+ function _getSpanForOperator(aConditions, oConfig) {
1526
+ var iMaxConditions = oConfig.hasOwnProperty("maxConditions") ? oConfig.maxConditions : -1;
1394
1527
  var sSpan = "XL3 L3 M3 ";
1395
1528
 
1396
1529
  if (iMaxConditions === 1) {
@@ -1401,8 +1534,8 @@ sap.ui.define([
1401
1534
  return sSpan;
1402
1535
  }
1403
1536
 
1404
- function _getSpanForValue(oCondition, oFormatOptions) {
1405
- var iMaxConditions = oFormatOptions.hasOwnProperty("maxConditions") ? oFormatOptions.maxConditions : -1;
1537
+ function _getSpanForValue(oCondition, oConfig) {
1538
+ var iMaxConditions = oConfig.hasOwnProperty("maxConditions") ? oConfig.maxConditions : -1;
1406
1539
 
1407
1540
  var oOperator = oCondition && FilterOperatorUtil.getOperator(oCondition.operator);
1408
1541
  var sSpan = "";
@@ -1579,7 +1712,7 @@ sap.ui.define([
1579
1712
  var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
1580
1713
  var bInvalid = !!oCondition.invalid;
1581
1714
 
1582
- if (!bInvalid && oOperator.valueTypes.length > 0 && oOperator.valueTypes[0] !== Operator.ValueType.Static) {
1715
+ if (!bInvalid && oOperator.valueTypes.length > 0 && oOperator.valueTypes[0] !== OperatorValueType.Static) {
1583
1716
  // check only not static operators
1584
1717
  if (oOperator.valueTypes.length > 1 && oOperator.valueTypes[1]) {
1585
1718
  // two fields exist
@@ -1590,7 +1723,7 @@ sap.ui.define([
1590
1723
  }
1591
1724
  }
1592
1725
 
1593
- if (oField.getMetadata().getAllProperties().valueState && !oField._isInvalidInput() && (!oField2 || !oField2._isInvalidInput())) { // TODO: better was to find out parsing error
1726
+ if (oField.getMetadata().getAllProperties().valueState && !oField.isInvalidInput() && (!oField2 || !oField2.isInvalidInput())) { // TODO: better was to find out parsing error
1594
1727
  // if Field is in parsing error state, user entry is not transfered to condition, so validating makes no sense.
1595
1728
  var oType = oField.getBinding("value").getType(); // use nullable data type from Field - don't create new type for each check
1596
1729
  try {
@@ -1653,6 +1786,102 @@ sap.ui.define([
1653
1786
 
1654
1787
  }
1655
1788
 
1789
+ function _getDefineConditions() {
1790
+
1791
+ return this.getConditions().filter(function(oCondition) {
1792
+ var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
1793
+ return oCondition.validated !== ConditionValidated.Validated || oOperator.exclude;
1794
+ });
1795
+
1796
+ }
1797
+
1798
+ function _handleNext(oEvent) {
1799
+
1800
+ this._iStartIndex = this._iStartIndex + this._iShownConditions;
1801
+ this._iShownAdditionalConditions = 0;
1802
+ _renderConditions.call(this);
1803
+
1804
+ }
1805
+
1806
+ function _handlePrevious(oEvent) {
1807
+
1808
+ this._iStartIndex = this._iStartIndex - this._iShownConditions;
1809
+ if (this._iStartIndex < 0) {
1810
+ this._iStartIndex = 0;
1811
+ }
1812
+ this._iShownAdditionalConditions = 0;
1813
+ _renderConditions.call(this);
1814
+
1815
+ }
1816
+
1817
+ function _handleRemoveAll(oEvent) {
1818
+
1819
+ var aConditions = this.getConditions().filter(function(oCondition) {
1820
+ var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
1821
+ return oCondition.validated === ConditionValidated.Validated && !oOperator.exclude;
1822
+ });
1823
+ this.addDummyCondition(aConditions.length + 1);
1824
+
1825
+ this._iStartIndex = 0;
1826
+ this._iShownAdditionalConditions = 0;
1827
+ this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
1828
+ this.oInvisibleMessage.announce(oMessageBundle.getText("valuehelp.DEFINECONDITIONS_REMOVECONDITION_ANNOUNCE"), InvisibleMessageMode.Polite);
1829
+ this.fireConditionProcessed();
1830
+
1831
+ }
1832
+
1833
+ function _handleInsert(oEvent) {
1834
+
1835
+ var aConditions = this.getConditions();
1836
+ var oFormatOptions = this.getFormatOptions();
1837
+ var iMaxConditions = oFormatOptions.maxConditions;
1838
+
1839
+ // get Index of first row (as validated conditions might exist and are hidden)
1840
+ var oGrid = this.byId("conditions");
1841
+ var aGridContent = oGrid.getContent();
1842
+ var iRows = 0;
1843
+ var iIndex = -1;
1844
+ for (var i = 0; i < aGridContent.length; i++) {
1845
+ var oField = aGridContent[i];
1846
+ if (oField instanceof Field && oField.getValueHelp() === this._sOperatorHelpId) {
1847
+ // Operator field starts new row
1848
+ iRows++;
1849
+ if (iRows === 1) {
1850
+ // determine index for condition in first row
1851
+ var oBindingContext = oField.getBindingContext("$this");
1852
+ var sPath = oBindingContext.getPath();
1853
+ var aMatch = sPath.match(/^.*\/(\d+)\/$/);
1854
+ if (aMatch) {
1855
+ iIndex = parseInt(aMatch[1]);
1856
+ }
1857
+ }
1858
+ }
1859
+ }
1860
+
1861
+ if (iMaxConditions === -1 || aConditions.length < iMaxConditions) {
1862
+ // create a new dummy condition for a new condition on the UI - must be removed later if not used or filled correct
1863
+ this.addDummyCondition(iIndex);
1864
+
1865
+ if (iRows >= this._iShownConditions) {
1866
+ this._iShownAdditionalConditions++;
1867
+ }
1868
+ }
1869
+
1870
+ this.oInvisibleMessage.announce(oMessageBundle.getText("valuehelp.DEFINECONDITIONS_ADDCONDITION_ANNOUNCE"), InvisibleMessageMode.Polite);
1871
+
1872
+ }
1873
+
1874
+ function _getPageText() {
1875
+
1876
+ var aConditions = _getDefineConditions.call(this); // show only validated conditions
1877
+ var iPages = Math.ceil((aConditions.length - this._iShownAdditionalConditions) / this._iShownConditions);
1878
+ var iPage = Math.floor(this._iStartIndex / this._iShownConditions) + 1;
1879
+ var sText = oMessageBundle.getText("valuehelp.PAGE_COUNT", [iPage, iPages]);
1880
+
1881
+ return sText;
1882
+
1883
+ }
1884
+
1656
1885
  return DefineConditionPanel;
1657
1886
 
1658
1887
  });