@openui5/sap.ui.mdc 1.96.5 → 1.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +7 -9
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
  7. package/src/sap/ui/mdc/BaseDelegate.js +1 -1
  8. package/src/sap/ui/mdc/Chart.js +1100 -1796
  9. package/src/sap/ui/mdc/ChartDelegate.js +429 -270
  10. package/src/sap/ui/mdc/ChartRenderer.js +73 -77
  11. package/src/sap/ui/mdc/Control.js +1 -1
  12. package/src/sap/ui/mdc/Element.js +1 -1
  13. package/src/sap/ui/mdc/Field.js +3 -2
  14. package/src/sap/ui/mdc/FilterBar.js +3 -2
  15. package/src/sap/ui/mdc/FilterField.js +25 -8
  16. package/src/sap/ui/mdc/Link.js +23 -4
  17. package/src/sap/ui/mdc/LinkDelegate.js +3 -3
  18. package/src/sap/ui/mdc/MultiValueField.js +21 -6
  19. package/src/sap/ui/mdc/Table.js +204 -161
  20. package/src/sap/ui/mdc/TableDelegate.js +47 -17
  21. package/src/sap/ui/mdc/ValueHelp.js +51 -15
  22. package/src/sap/ui/mdc/ValueHelpDelegate.js +20 -0
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  24. package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
  25. package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +49 -13
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
  27. package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
  29. package/src/sap/ui/mdc/chart/Item.js +62 -92
  30. package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
  31. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
  32. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  33. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  34. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  35. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  36. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +261 -44
  37. package/src/sap/ui/mdc/condition/Operator.js +9 -9
  38. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +437 -0
  39. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +80 -5
  41. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +97 -0
  42. package/src/sap/ui/mdc/designtime/field/FieldBase.designtime.js +104 -0
  43. package/src/sap/ui/mdc/designtime/field/FilterField.designtime.js +22 -0
  44. package/src/sap/ui/mdc/designtime/field/MultiValueField.designtime.js +23 -0
  45. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
  46. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +60 -20
  47. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  49. package/src/sap/ui/mdc/field/ConditionType.js +9 -9
  50. package/src/sap/ui/mdc/field/ConditionsType.js +7 -7
  51. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  52. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  53. package/src/sap/ui/mdc/field/DefineConditionPanel.js +75 -27
  54. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +311 -0
  55. package/src/sap/ui/mdc/field/FieldBase.js +85 -52
  56. package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
  57. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  58. package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -10
  59. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -7
  63. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +20 -0
  65. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  66. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
  67. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +7 -3
  68. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  69. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  70. package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
  71. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  72. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  73. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  74. package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
  75. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  76. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  77. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  78. package/src/sap/ui/mdc/field/ValueHelpPanel.js +2 -1
  79. package/src/sap/ui/mdc/field/content/BooleanContent.js +1 -1
  80. package/src/sap/ui/mdc/field/content/ContentFactory.js +28 -26
  81. package/src/sap/ui/mdc/field/content/DateContent.js +128 -2
  82. package/src/sap/ui/mdc/field/content/DateTimeContent.js +9 -1
  83. package/src/sap/ui/mdc/field/content/DefaultContent.js +36 -14
  84. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  85. package/src/sap/ui/mdc/field/content/TimeContent.js +8 -1
  86. package/src/sap/ui/mdc/field/content/UnitContent.js +23 -4
  87. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +359 -142
  88. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  89. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  90. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
  91. package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
  92. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
  93. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
  94. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
  95. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
  96. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
  97. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
  98. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  99. package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
  100. package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
  101. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
  102. package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
  103. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
  104. package/src/sap/ui/mdc/library.js +62 -43
  105. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  106. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  107. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  108. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  109. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  110. package/src/sap/ui/mdc/link/Factory.js +2 -2
  111. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  112. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  113. package/src/sap/ui/mdc/link/Log.js +1 -1
  114. package/src/sap/ui/mdc/link/Panel.js +140 -177
  115. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  116. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  117. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  118. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  119. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  120. package/src/sap/ui/mdc/messagebundle.properties +68 -5
  121. package/src/sap/ui/mdc/messagebundle_ar.properties +47 -6
  122. package/src/sap/ui/mdc/messagebundle_bg.properties +61 -20
  123. package/src/sap/ui/mdc/messagebundle_ca.properties +45 -4
  124. package/src/sap/ui/mdc/messagebundle_cs.properties +60 -19
  125. package/src/sap/ui/mdc/messagebundle_cy.properties +45 -4
  126. package/src/sap/ui/mdc/messagebundle_da.properties +52 -11
  127. package/src/sap/ui/mdc/messagebundle_de.properties +45 -4
  128. package/src/sap/ui/mdc/messagebundle_el.properties +46 -5
  129. package/src/sap/ui/mdc/messagebundle_en.properties +45 -4
  130. package/src/sap/ui/mdc/messagebundle_en_GB.properties +45 -4
  131. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +51 -2
  132. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +45 -4
  133. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +51 -2
  134. package/src/sap/ui/mdc/messagebundle_es.properties +46 -5
  135. package/src/sap/ui/mdc/messagebundle_es_MX.properties +59 -18
  136. package/src/sap/ui/mdc/messagebundle_et.properties +45 -4
  137. package/src/sap/ui/mdc/messagebundle_fi.properties +51 -10
  138. package/src/sap/ui/mdc/messagebundle_fr.properties +50 -9
  139. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +45 -4
  140. package/src/sap/ui/mdc/messagebundle_hi.properties +46 -5
  141. package/src/sap/ui/mdc/messagebundle_hr.properties +45 -4
  142. package/src/sap/ui/mdc/messagebundle_hu.properties +45 -4
  143. package/src/sap/ui/mdc/messagebundle_id.properties +45 -4
  144. package/src/sap/ui/mdc/messagebundle_it.properties +61 -20
  145. package/src/sap/ui/mdc/messagebundle_iw.properties +46 -5
  146. package/src/sap/ui/mdc/messagebundle_ja.properties +46 -5
  147. package/src/sap/ui/mdc/messagebundle_kk.properties +45 -4
  148. package/src/sap/ui/mdc/messagebundle_ko.properties +46 -5
  149. package/src/sap/ui/mdc/messagebundle_lt.properties +45 -4
  150. package/src/sap/ui/mdc/messagebundle_lv.properties +49 -8
  151. package/src/sap/ui/mdc/messagebundle_ms.properties +45 -4
  152. package/src/sap/ui/mdc/messagebundle_nl.properties +49 -8
  153. package/src/sap/ui/mdc/messagebundle_no.properties +53 -12
  154. package/src/sap/ui/mdc/messagebundle_pl.properties +46 -5
  155. package/src/sap/ui/mdc/messagebundle_pt.properties +52 -11
  156. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +45 -4
  157. package/src/sap/ui/mdc/messagebundle_ro.properties +45 -4
  158. package/src/sap/ui/mdc/messagebundle_ru.properties +45 -4
  159. package/src/sap/ui/mdc/messagebundle_sh.properties +45 -4
  160. package/src/sap/ui/mdc/messagebundle_sk.properties +45 -4
  161. package/src/sap/ui/mdc/messagebundle_sl.properties +45 -4
  162. package/src/sap/ui/mdc/messagebundle_sv.properties +47 -6
  163. package/src/sap/ui/mdc/messagebundle_th.properties +48 -7
  164. package/src/sap/ui/mdc/messagebundle_tr.properties +45 -4
  165. package/src/sap/ui/mdc/messagebundle_uk.properties +49 -8
  166. package/src/sap/ui/mdc/messagebundle_vi.properties +45 -4
  167. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +46 -5
  168. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +45 -4
  169. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +19 -5
  170. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
  171. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +16 -11
  172. package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
  173. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  174. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
  175. package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
  176. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +160 -116
  177. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
  178. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
  179. package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
  180. package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +215 -116
  181. package/src/sap/ui/mdc/p13n/Engine.js +61 -20
  182. package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
  183. package/src/sap/ui/mdc/p13n/P13nBuilder.js +8 -8
  184. package/src/sap/ui/mdc/p13n/PersistenceProvider.js +21 -10
  185. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  186. package/src/sap/ui/mdc/p13n/StateUtil.js +40 -6
  187. package/src/sap/ui/mdc/p13n/UIManager.js +15 -12
  188. package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
  189. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
  190. package/src/sap/ui/mdc/p13n/{DefaultProviderRegistry.js → modules/DefaultProviderRegistry.js} +2 -2
  191. package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +86 -0
  192. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +19 -3
  193. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
  194. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
  195. package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
  196. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
  197. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +1 -1
  198. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
  199. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
  200. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
  201. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +14 -7
  202. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
  203. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
  204. package/src/sap/ui/mdc/table/Column.js +35 -10
  205. package/src/sap/ui/mdc/table/CreationRow.js +14 -13
  206. package/src/sap/ui/mdc/table/GridTableType.js +13 -13
  207. package/src/sap/ui/mdc/table/PropertyHelper.js +64 -27
  208. package/src/sap/ui/mdc/table/ResponsiveTableType.js +26 -29
  209. package/src/sap/ui/mdc/table/RowSettings.js +7 -5
  210. package/src/sap/ui/mdc/table/TableTypeBase.js +6 -6
  211. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +15 -71
  212. package/src/sap/ui/mdc/themes/base/Chart.less +3 -0
  213. package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
  214. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  215. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  216. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +15 -4
  217. package/src/sap/ui/mdc/themes/base/library.source.less +3 -0
  218. package/src/sap/ui/mdc/ui/Container.js +2 -2
  219. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  220. package/src/sap/ui/mdc/util/Common.js +1 -1
  221. package/src/sap/ui/mdc/util/DateUtil.js +1 -1
  222. package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
  223. package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
  224. package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
  225. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  226. package/src/sap/ui/mdc/util/PropertyHelper.js +148 -325
  227. package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
  228. package/src/sap/ui/mdc/valuehelp/Dialog.js +12 -8
  229. package/src/sap/ui/mdc/valuehelp/Popover.js +14 -2
  230. package/src/sap/ui/mdc/valuehelp/base/Container.js +33 -1
  231. package/src/sap/ui/mdc/valuehelp/base/Content.js +36 -5
  232. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
  233. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +43 -15
  234. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
  235. package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
  236. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +28 -32
  237. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
  238. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +50 -10
  239. package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -26
  240. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
  241. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
  242. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
  243. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
  244. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
  245. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
  246. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
  247. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +289 -0
  248. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
  249. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +9 -9
  250. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
  251. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
  252. package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
  253. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
  254. package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
  255. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +362 -233
  256. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
  257. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  258. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  259. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  260. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  261. package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
  262. package/src/sap/ui/mdc/ChartNew.js +0 -1114
  263. package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
  264. package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
  265. package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
  266. package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
  267. package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
  268. package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
  269. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
  270. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
  271. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
  272. package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
  273. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
  274. package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
  275. package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
  276. package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
  277. package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
  278. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1171
  279. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +0 -111
  280. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +0 -322
  281. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +0 -133
  282. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +0 -203
@@ -6,7 +6,6 @@
6
6
  sap.ui.define([
7
7
  'sap/ui/mdc/p13n/subcontroller/FilterController',
8
8
  'sap/ui/core/library',
9
- 'sap/ui/mdc/p13n/FlexUtil',
10
9
  'sap/ui/Device',
11
10
  'sap/ui/mdc/Control',
12
11
  'sap/base/Log',
@@ -17,8 +16,6 @@ sap.ui.define([
17
16
  'sap/ui/mdc/condition/Condition',
18
17
  'sap/ui/mdc/util/IdentifierUtil',
19
18
  'sap/ui/mdc/condition/ConditionConverter',
20
- "sap/ui/mdc/p13n/StateUtil",
21
- "sap/ui/mdc/condition/FilterConverter",
22
19
  "sap/ui/mdc/util/FilterUtil",
23
20
  "sap/ui/mdc/filterbar/PropertyHelper",
24
21
  "sap/ui/fl/apply/api/ControlVariantApplyAPI",
@@ -29,7 +26,6 @@ sap.ui.define([
29
26
  function(
30
27
  FilterController,
31
28
  coreLibrary,
32
- FlexUtil,
33
29
  Device,
34
30
  Control,
35
31
  Log,
@@ -40,8 +36,6 @@ sap.ui.define([
40
36
  Condition,
41
37
  IdentifierUtil,
42
38
  ConditionConverter,
43
- StateUtil,
44
- FilterConverter,
45
39
  FilterUtil,
46
40
  PropertyHelper,
47
41
  ControlVariantApplyAPI,
@@ -60,7 +54,7 @@ sap.ui.define([
60
54
  * @class The <code>FilterBarBase</code> control is used as a faceless base class for common functionality of any MDC FilterBar derivation.
61
55
  * @extends sap.ui.mdc.Control
62
56
  * @author SAP SE
63
- * @version 1.96.5
57
+ * @version 1.99.0
64
58
  * @constructor
65
59
  * @private
66
60
  * @ui5-restricted sap.ui.mdc
@@ -149,6 +143,18 @@ sap.ui.define([
149
143
  defaultValue: {}
150
144
  },
151
145
 
146
+ /**
147
+ * Specifies the filter metadata.<br>
148
+ * <b>Note</b>: This property must not be bound.<br>
149
+ * <b>Note</b>: This property is used exclusively for SAPUI5 flexibility. Do not use it otherwise.
150
+ *
151
+ * @since 1.97
152
+ */
153
+ propertyInfo: {
154
+ type: "object",
155
+ defaultValue: []
156
+ },
157
+
152
158
  /**
153
159
  * If set to <code>true</code>, all search requests are ignored. Once it has been set to <code>false</code>,
154
160
  * a search is triggered immediately if one or more search requests have been triggered in the meantime
@@ -363,14 +369,28 @@ sap.ui.define([
363
369
  };
364
370
 
365
371
  FilterBarBase.prototype.applySettings = function(mSettings, oScope) {
372
+ this._applySettings(mSettings, oScope);
373
+ this._initControlDelegate();
374
+ };
375
+
376
+ FilterBarBase.prototype._applySettings = function(mSettings, oScope) {
366
377
  Control.prototype.applySettings.apply(this, arguments);
367
378
 
368
379
  this._createConditionModel();
369
380
 
370
381
  this._oConditionModel.attachPropertyChange(this._handleConditionModelPropertyChange, this);
382
+ };
371
383
 
372
- //this._retrieveMetadata();
373
- this._retrieveMetadata().then(function() {
384
+ FilterBarBase.prototype._initControlDelegate = function() {
385
+ this.initControlDelegate().then(function() {
386
+ if (!this._bIsBeingDestroyed) {
387
+ this._applyInitialFilterConditions();
388
+ }
389
+ }.bind(this));
390
+ };
391
+
392
+ FilterBarBase.prototype._waitForMetadata = function() {
393
+ return this._retrieveMetadata().then(function() {
374
394
  this._applyInitialFilterConditions();
375
395
  }.bind(this));
376
396
  };
@@ -431,38 +451,31 @@ sap.ui.define([
431
451
  * @returns {object} object containing the current status of the FilterBarBase
432
452
  */
433
453
  FilterBarBase.prototype.getCurrentState = function() {
434
- //return this.initialized().then(function() {
435
-
436
- var oState = {};
437
-
438
- if (this._bPersistValues) {
439
- var aIgnoreFieldNames = [];
440
- var mConditions = merge({}, this.getFilterConditions());
441
- for (var sKey in mConditions) {
442
- if (!this._getPropertyByName(sKey)) {
443
- aIgnoreFieldNames.push(sKey);
444
- }
454
+ var mFilters = {};
455
+ var oState = {};
456
+
457
+ if (this._bPersistValues) {
458
+ var mConditions = merge({}, this.getFilterConditions());
459
+ for (var sKey in mConditions) {
460
+ if (this._getPropertyByName(sKey)) {
461
+ mFilters[sKey] = mConditions[sKey];
462
+ //mMetadata[sKey] = mConditions[sKey].metadata;
445
463
  }
446
-
447
- aIgnoreFieldNames.forEach(function(sKey) {
448
- delete mConditions[sKey];
449
- });
450
-
451
- oState.filter = mConditions;
452
464
  }
465
+ oState.filter = mFilters;
466
+ }
453
467
 
454
- var aFilterItems = this.getFilterItems();
455
- var aItems = [];
456
- aFilterItems.forEach(function(oFilterField, iIndex){
457
- aItems.push({
458
- name: oFilterField.getFieldPath()
459
- });
468
+ var aFilterItems = this.getFilterItems();
469
+ var aItems = [];
470
+ aFilterItems.forEach(function(oFilterField, iIndex){
471
+ aItems.push({
472
+ name: oFilterField.getFieldPath()
460
473
  });
474
+ });
461
475
 
462
- oState.items = aItems;
476
+ oState.items = aItems;
463
477
 
464
- return oState;
465
- //}.bind(this));
478
+ return oState;
466
479
  };
467
480
 
468
481
  /**
@@ -605,8 +618,132 @@ sap.ui.define([
605
618
  return this.getEngine().isModificationSupported(this);
606
619
  };
607
620
 
621
+ FilterBarBase.prototype._hasPropertyInfo = function(sFieldName) {
622
+ var aPropertyInfo = this.getPropertyInfo();
623
+ var nIdx = aPropertyInfo.findIndex(function(oEntry) {
624
+ return oEntry.name === sFieldName;
625
+ });
626
+
627
+ return (nIdx >= 0);
628
+ };
629
+
630
+ FilterBarBase.prototype._getPropertyByName = function(sName) {
631
+ return FilterUtil.getPropertyByKey(this.getPropertyInfoSet(), sName);
632
+ };
633
+
634
+ FilterBarBase.prototype.getPropertyInfoSet = function() {
635
+ var oTypeUtil, aProperties = [];
636
+
637
+ if (this._hasPropertyHelper()) {
638
+ return this.getPropertyHelper().getProperties();
639
+ }
640
+
641
+ var aPropertyInfo = this.getPropertyInfo();
642
+ if (aPropertyInfo && (aPropertyInfo.length > 0)) {
643
+ oTypeUtil = this.getTypeUtil();
644
+
645
+ for (var i = 0; i < aPropertyInfo.length; i++) {
646
+ var oPropertyInfo = aPropertyInfo[i];
647
+ if (oPropertyInfo) {
648
+ var oTypeConfig = oTypeUtil.getTypeConfig(oPropertyInfo.dataType, oPropertyInfo.formatOptions, oPropertyInfo.constraints);
649
+ aProperties.push({
650
+ name: oPropertyInfo.name,
651
+ typeConfig: oTypeConfig,
652
+ maxConditions: oPropertyInfo.maxConditions,
653
+ constraints: oPropertyInfo.constraints,
654
+ formatOptions: oPropertyInfo.formatOptions,
655
+ required: oPropertyInfo.required,
656
+ caseSensitive: oPropertyInfo.caseSensitive,
657
+ display: oPropertyInfo.display
658
+ });
659
+ }
660
+ }
661
+ }
662
+
663
+ return aProperties;
664
+ };
665
+
666
+ FilterBarBase.prototype._hasPropertyHelper = function() {
667
+ try {
668
+ this.getPropertyHelper();
669
+ return true;
670
+ } catch (ex) {
671
+ return false;
672
+ }
673
+ };
674
+
675
+
676
+ FilterBarBase.prototype._createPropertyInfoChange = function(oProperty) {
677
+ return {
678
+ changeSpecificData: {
679
+ changeType: "addPropertyInfo",
680
+ content: {
681
+ name: oProperty.name,
682
+ dataType: oProperty.typeConfig.className,
683
+ maxConditions: oProperty.maxConditions,
684
+ constraints: oProperty.constraints,
685
+ formatOption: oProperty.formatOptions,
686
+ required: oProperty.required,
687
+ caseSensitive: oProperty.caseSensitive,
688
+ display: oProperty.display
689
+ }
690
+ },
691
+ selectorElement: this
692
+ };
693
+ };
694
+
695
+ FilterBarBase.prototype.createPropertyInfoChanges = function(sFieldPath) {
696
+ var oProperty, oChange, aChanges = [];
697
+
698
+ if (!this._hasPropertyInfo(sFieldPath)) {
699
+ oProperty = this._getPropertyByName(sFieldPath);
700
+ if (oProperty) {
701
+ oChange = this._createPropertyInfoChange(oProperty);
702
+ aChanges.push(oChange);
703
+ }
704
+ }
705
+
706
+ return aChanges;
707
+ };
708
+
709
+
710
+ FilterBarBase.prototype._addConditionChange = function(mOrigConditions, sFieldPath) {
711
+
712
+ var oChangePromise = this.getEngine().createChanges({
713
+ control: this,
714
+ key: "Filter",
715
+ //prependChanges: fCreateTypeInfoCallback,
716
+ state: mOrigConditions
717
+ });
718
+
719
+ if (!this._aCollectedChangePromises) {
720
+ this._aCollectedChangePromises = [];
721
+ }
722
+ this._aCollectedChangePromises.push(oChangePromise);
723
+ };
724
+
725
+ FilterBarBase.prototype._registerOnEngineOnModificationEnd = function() {
726
+ this._oConditionChangeStartedPromise = new Promise(function(resolve) {
727
+ this._fConditionChangeStartedPromiseResolve = resolve;
728
+ }.bind(this));
729
+ };
730
+
731
+ FilterBarBase.prototype._onChangeAppliance = function() {
732
+ if (this._fConditionChangeStartedPromiseResolve) {
733
+ this._fConditionChangeStartedPromiseResolve();
734
+ this._fConditionChangeStartedPromiseResolve = null;
735
+ }
736
+ };
737
+
608
738
  FilterBarBase.prototype._handleConditionModelPropertyChange = function(oEvent) {
609
739
 
740
+ var fAddConditionChange = function(sFieldPath, aConditions) {
741
+ var mOrigConditions = {};
742
+ mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, merge([], aConditions));
743
+ this._cleanupConditions(mOrigConditions[sFieldPath]);
744
+ this._addConditionChange(mOrigConditions, sFieldPath);
745
+ }.bind(this);
746
+
610
747
  if (!this._bIgnoreChanges) {
611
748
 
612
749
  var sPath = oEvent.getParameter("path");
@@ -615,21 +752,17 @@ sap.ui.define([
615
752
  var sFieldPath = sPath.substring("/conditions/".length);
616
753
 
617
754
  if (this._bPersistValues && this._isPersistenceSupported()) {
618
- var mOrigConditions = {};
619
- mOrigConditions[sFieldPath] = this._stringifyConditions(sFieldPath, merge([], oEvent.getParameter("value")));
620
- this._cleanupConditions(mOrigConditions[sFieldPath]);
621
-
622
- var oChangePromise = this.getEngine().createChanges({
623
- control: this,
624
- key: "Filter",
625
- state: mOrigConditions
626
- });
627
755
 
628
- if (!this._aCollectedChangePromises) {
629
- this._aCollectedChangePromises = [];
630
- }
756
+ var aConditions = oEvent.getParameter("value");
631
757
 
632
- this._aCollectedChangePromises.push(oChangePromise);
758
+ if (this._hasPropertyHelper() || this._getPropertyByName(sFieldPath)) {
759
+ fAddConditionChange(sFieldPath, aConditions);
760
+ } else {
761
+ this._registerOnEngineOnModificationEnd();
762
+ this._retrieveMetadata().then(function() {
763
+ fAddConditionChange(sFieldPath, aConditions);
764
+ });
765
+ }
633
766
 
634
767
  } else {
635
768
  this._reportModelChange(false);
@@ -730,32 +863,26 @@ sap.ui.define([
730
863
  };
731
864
 
732
865
  FilterBarBase.prototype._handleAssignedFilterNames = function(bFiltersAggregationChanged, bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch) {
733
- if (!this._oMetadataAppliedPromise) {
734
- return; // may occure when filterItems are added during pre processing.
866
+ if (this._bIsBeingDestroyed) {
867
+ return;
735
868
  }
736
869
 
737
- this._oMetadataAppliedPromise.then(function() {
738
-
739
- if (this._bIsBeingDestroyed) {
740
- return;
741
- }
742
-
743
- if (!bFiltersAggregationChanged) {
744
- if (this._btnAdapt) {
745
- var aFilterNames = this.getAssignedFilterNames();
746
- this.setProperty("_filterCount", this._oRb.getText(aFilterNames.length ? "filterbar.ADAPT_NONZERO" : "filterbar.ADAPT", aFilterNames.length), false);
747
- }
870
+ if (!bFiltersAggregationChanged) {
871
+ if (this._btnAdapt) {
872
+ var aFilterNames = this.getAssignedFilterNames();
873
+ this.setProperty("_filterCount", this._oRb.getText(aFilterNames.length ? "filterbar.ADAPT_NONZERO" : "filterbar.ADAPT", aFilterNames.length), false);
748
874
  }
875
+ }
749
876
 
750
- var mTexts = this._getAssignedFiltersText();
751
- var oObj = {
877
+ var mTexts = this._getAssignedFiltersText();
878
+ var oObj = {
752
879
  conditionsBased: (!bFiltersAggregationChanged && !bDoNotTriggerFiltersChangeEventBasedOnVariantSwitch),
753
880
  filtersText: mTexts.filtersText,
754
881
  filtersTextExpanded: mTexts.filtersTextExpanded
755
- };
882
+ };
883
+
884
+ this.fireFiltersChanged(oObj);
756
885
 
757
- this.fireFiltersChanged(oObj);
758
- }.bind(this));
759
886
  };
760
887
 
761
888
  FilterBarBase.prototype.onReset = function(oEvent) {
@@ -784,9 +911,7 @@ sap.ui.define([
784
911
  this._bSearchTriggered = true;
785
912
  return Promise.resolve();
786
913
  }
787
- return this.validate().then(function(){
788
- this.fireSearch();
789
- }.bind(this));
914
+ return this.validate();
790
915
  };
791
916
 
792
917
  /**
@@ -799,9 +924,11 @@ sap.ui.define([
799
924
  * @returns {Promise} Returns a Promise which resolves after the validation of erroneous fields has been propagated.
800
925
  *
801
926
  */
802
- FilterBarBase.prototype.validate = function() {
927
+ FilterBarBase.prototype.validate = function(bSuppressSearch) {
803
928
 
804
- return this.initialized().then(function() {
929
+ var bFireSearch = !bSuppressSearch;
930
+
931
+ var fValidateFc = function() {
805
932
  if (!this._oValidationPromise) {
806
933
 
807
934
  this._oValidationPromise = new Promise(function(resolve, reject) {
@@ -810,14 +937,23 @@ sap.ui.define([
810
937
  }.bind(this));
811
938
 
812
939
  var fDelayedFunction = function() {
813
- this._validate();
940
+ this._validate(bFireSearch);
814
941
  this._oValidationPromise = null;
815
942
  };
816
943
  setTimeout(fDelayedFunction.bind(this), 0);
817
944
  }
818
945
 
819
946
  return this._oValidationPromise;
947
+ }.bind(this);
820
948
 
949
+ return this.initialized().then(function() {
950
+ if (!this._hasMetadata()) {
951
+ return this._retrieveMetadata().then(function() {
952
+ return fValidateFc();
953
+ });
954
+ } else {
955
+ return fValidateFc();
956
+ }
821
957
  }.bind(this));
822
958
  };
823
959
 
@@ -828,6 +964,9 @@ sap.ui.define([
828
964
  }
829
965
  };
830
966
 
967
+ FilterBarBase.prototype._hasMetadata = function() {
968
+ return (this._hasPropertyHelper() || (this.getPropertyInfo().length > 0));
969
+ };
831
970
 
832
971
  FilterBarBase.prototype._getRequiredFieldsWithoutValues = function() {
833
972
  var aReqFiltersWithoutValue = [];
@@ -893,7 +1032,12 @@ sap.ui.define([
893
1032
  var oPromise = oEvent.getParameter("promise");
894
1033
  if (oPromise) {
895
1034
  oPromise.then(function() {
896
- if (this._aCollectedChangePromises && this._aCollectedChangePromises.length > 0) {
1035
+
1036
+ if (this._oConditionChangeStartedPromise) {
1037
+ this._oConditionChangeStartedPromise.then(function() {
1038
+ this.triggerSearch();
1039
+ }.bind(this));
1040
+ } else if (this._aCollectedChangePromises && this._aCollectedChangePromises.length > 0) {
897
1041
  var aChangePromises = this._aCollectedChangePromises.slice();
898
1042
  Promise.all(aChangePromises).then(function() {
899
1043
  this.triggerSearch();
@@ -958,7 +1102,7 @@ sap.ui.define([
958
1102
  return oFilterField;
959
1103
  };
960
1104
 
961
- FilterBarBase.prototype._handleAsyncValidation = function() {
1105
+ FilterBarBase.prototype._handleAsyncValidation = function(bFireSearch) {
962
1106
  if (this._aFIChanges && (this._aFIChanges.length > 0)) {
963
1107
 
964
1108
  var aNamePromisesArray = this._aFIChanges.slice();
@@ -977,22 +1121,22 @@ sap.ui.define([
977
1121
  oFF.setValueState(ValueState.None); //valid existing value -> clear missing required error
978
1122
  }
979
1123
  }, this);
980
- this._validate();
1124
+ this._validate(bFireSearch);
981
1125
  }.bind(this), function(aConditionsArray) {
982
- this._validate();
1126
+ this._validate(bFireSearch);
983
1127
  }.bind(this));
984
1128
  }
985
1129
  };
986
1130
 
987
- FilterBarBase.prototype._waitForChangeAppliance = function() {
1131
+ FilterBarBase.prototype._waitForChangeAppliance = function(bFireSearch) {
988
1132
 
989
1133
  var aChangePromises = this._aCollectedChangePromises.slice();
990
1134
  this._aCollectedChangePromises = null;
991
1135
 
992
1136
  Promise.all(aChangePromises).then(function(aConditionsArray) {
993
- this._validate();
1137
+ this._validate(bFireSearch);
994
1138
  }.bind(this), function(aConditionsArray) {
995
- this._validate();
1139
+ this._validate(bFireSearch);
996
1140
  }.bind(this));
997
1141
  };
998
1142
 
@@ -1000,9 +1144,15 @@ sap.ui.define([
1000
1144
  * Executes the search.
1001
1145
  * @private
1002
1146
  */
1003
- FilterBarBase.prototype._validate = function() {
1147
+ FilterBarBase.prototype._validate = function(bFireSearch) {
1004
1148
  var sErrorMessage, vRetErrorState;
1005
1149
 
1150
+ var fnCheckAndFireSearch = function() {
1151
+ if (bFireSearch) {
1152
+ this.fireSearch();
1153
+ }
1154
+ }.bind(this);
1155
+
1006
1156
  var fnCleanup = function() {
1007
1157
  this._fRejectedSearchPromise = null;
1008
1158
  this._fResolvedSearchPromise = null;
@@ -1017,22 +1167,24 @@ sap.ui.define([
1017
1167
  vRetErrorState = this._checkFilters();
1018
1168
 
1019
1169
  if (vRetErrorState === ErrorState.AsyncValidation) {
1020
- this._handleAsyncValidation();
1170
+ this._handleAsyncValidation(bFireSearch);
1021
1171
  return;
1022
1172
  }
1023
1173
 
1024
1174
  if (this._aCollectedChangePromises && (this._aCollectedChangePromises.length > 0)) {
1025
- this._waitForChangeAppliance();
1175
+ this._waitForChangeAppliance(bFireSearch);
1026
1176
  return;
1027
1177
  }
1028
1178
 
1029
1179
  if (vRetErrorState === ErrorState.NoError) {
1030
1180
  if (this._isChangeApplying()) {
1031
1181
  this._oFlexPromise.then(function() {
1032
- this._fResolvedSearchPromise();
1033
- fnCleanup();
1182
+ fnCheckAndFireSearch();
1183
+ this._fResolvedSearchPromise();
1184
+ fnCleanup();
1034
1185
  }.bind(this));
1035
1186
  } else {
1187
+ fnCheckAndFireSearch();
1036
1188
  this._fResolvedSearchPromise();
1037
1189
  fnCleanup();
1038
1190
  }
@@ -1132,75 +1284,148 @@ sap.ui.define([
1132
1284
  }.bind(this) : undefined;
1133
1285
  };
1134
1286
 
1287
+
1288
+ FilterBarBase.prototype._isPathKnown = function(sFieldPath, oXCondition) {
1289
+ var sKey, sName;
1290
+
1291
+ if (!this._getPropertyByName(sFieldPath)) {
1292
+ return false;
1293
+ }
1294
+
1295
+ for (sKey in oXCondition["inParameters"]) {
1296
+ sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
1297
+ if (!this._getPropertyByName(sName)) {
1298
+ return false;
1299
+ }
1300
+ }
1301
+ for (sKey in oXCondition["outParameters"]) {
1302
+ sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
1303
+ if (!this._getPropertyByName(sName)) {
1304
+ return false;
1305
+ }
1306
+ }
1307
+
1308
+ return true;
1309
+ };
1310
+
1311
+ FilterBarBase.prototype._removeCondition = function(sFieldPath, oXCondition, oCM) {
1312
+ var oProperty = this._getPropertyByName(sFieldPath);
1313
+ if (oProperty) {
1314
+ var oCondition = this._toInternal(oProperty, oXCondition);
1315
+ if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) >= 0) {
1316
+ oCM.removeCondition(sFieldPath, oCondition);
1317
+ }
1318
+ }
1319
+ };
1320
+
1135
1321
  FilterBarBase.prototype.removeCondition = function(sFieldPath, oXCondition) {
1136
1322
  return this.initialized().then(function() {
1137
1323
  var oCM = this._getConditionModel();
1138
1324
  if (oCM) {
1139
- var oProperty = this._getPropertyByName(sFieldPath);
1140
- if (oProperty) {
1141
- var oCondition = this._toInternal(oProperty, oXCondition);
1142
- if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) >= 0) {
1143
- oCM.removeCondition(sFieldPath, oCondition);
1144
- }
1325
+ if (!this._hasPropertyHelper() && !this._isPathKnown(sFieldPath, oXCondition)) {
1326
+ return this._retrieveMetadata().then(function() {
1327
+ this._removeCondition(sFieldPath, oXCondition, oCM);
1328
+ }.bind(this));
1329
+ } else {
1330
+ this._removeCondition(sFieldPath, oXCondition, oCM);
1145
1331
  }
1146
1332
  }
1147
1333
  }.bind(this));
1148
1334
  };
1149
1335
 
1336
+ FilterBarBase.prototype._addCondition = function(sFieldPath, oXCondition, oCM) {
1337
+ var oProperty = this._getPropertyByName(sFieldPath);
1338
+ if (oProperty) {
1339
+ var oCondition = this._toInternal(oProperty, oXCondition);
1340
+ if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) < 0) {
1341
+ var mCondition = {};
1342
+ mCondition[sFieldPath] = [oCondition];
1343
+ FilterController.checkConditionOperatorSanity(mCondition); //check if the single condition's operator is valid
1344
+ var aConditions = mCondition[sFieldPath];
1345
+ if (aConditions && aConditions.length > 0){
1346
+ this._cleanUpFilterFieldInErrorStateByName(sFieldPath);
1347
+ oCM.addCondition(sFieldPath, oCondition);
1348
+ }
1349
+ }
1350
+ }
1351
+ };
1352
+
1150
1353
  FilterBarBase.prototype.addCondition = function(sFieldPath, oXCondition) {
1151
1354
  return this.initialized().then(function() {
1152
1355
  var oCM = this._getConditionModel();
1153
1356
  if (oCM) {
1154
- var oProperty = this._getPropertyByName(sFieldPath);
1155
- if (oProperty) {
1156
- var oCondition = this._toInternal(oProperty, oXCondition);
1157
- if (oCM.indexOf(sFieldPath, oCondition, _fnNormalizeCondition.call(this, oProperty)) < 0) {
1158
- var mCondition = {};
1159
- mCondition[sFieldPath] = [oCondition];
1160
- FilterController.checkConditionOperatorSanity(mCondition); //check if the single condition's operator is valid
1161
- var aConditions = mCondition[sFieldPath];
1162
- if (aConditions && aConditions.length > 0){
1163
- this._cleanUpFilterFieldInErrorStateByName(sFieldPath);
1164
- oCM.addCondition(sFieldPath, oCondition);
1165
- }
1166
- }
1357
+
1358
+ if (!this._hasPropertyHelper() && !this._isPathKnown(sFieldPath, oXCondition)) {
1359
+ return this._retrieveMetadata().then(function() {
1360
+ this._addCondition(sFieldPath, oXCondition, oCM);
1361
+ }.bind(this));
1362
+ } else {
1363
+ this._addCondition(sFieldPath, oXCondition, oCM);
1167
1364
  }
1168
1365
  }
1169
1366
  }.bind(this));
1170
1367
 
1171
1368
  };
1172
1369
 
1173
- FilterBarBase.prototype._setXConditions = function(aConditionsData, bRemoveBeforeApplying) {
1174
- var oProperty, aConditions, oConditionModel = this._getConditionModel();
1370
+ FilterBarBase.prototype._setXConditions = function(mConditionsData, bRemoveBeforeApplying) {
1371
+ var sFieldPath, oProperty, aConditions, oConditionModel = this._getConditionModel();
1175
1372
 
1176
- if (bRemoveBeforeApplying) {
1177
- oConditionModel.removeAllConditions();
1178
- }
1179
-
1180
- if (aConditionsData) {
1181
- for ( var sFieldPath in aConditionsData) {
1182
- aConditions = aConditionsData[sFieldPath];
1373
+ var fPromiseResolve = null;
1374
+ var oPromise = new Promise(function(resolve, reject) {
1375
+ fPromiseResolve = resolve;
1376
+ });
1183
1377
 
1378
+ var fApplyConditions = function(mConditionsData) {
1379
+ for ( sFieldPath in mConditionsData) {
1380
+ aConditions = mConditionsData[sFieldPath];
1184
1381
  oProperty = this._getPropertyByName(sFieldPath);
1185
1382
  if (oProperty) {
1186
1383
 
1187
1384
  if (aConditions.length === 0) {
1188
1385
  oConditionModel.removeAllConditions(sFieldPath);
1189
1386
  } else {
1387
+ if (oProperty.maxConditions !== -1) {
1388
+ oConditionModel.removeAllConditions(sFieldPath);
1389
+ }
1390
+
1190
1391
  /* eslint-disable no-loop-func */
1191
1392
  aConditions.forEach(function(oCondition) {
1192
- if (oProperty.maxConditions !== -1) {
1193
- oConditionModel.removeAllConditions(sFieldPath);
1194
- }
1195
-
1196
- var oNewCondition = this._toInternal(oProperty, oCondition);
1197
- oConditionModel.addCondition(sFieldPath, oNewCondition);
1393
+ this._addCondition(sFieldPath, oCondition, oConditionModel);
1198
1394
  }.bind(this));
1199
1395
  /* eslint-enabled no-loop-func */
1200
1396
  }
1201
1397
  }
1202
1398
  }
1399
+
1400
+ fPromiseResolve();
1401
+ }.bind(this);
1402
+
1403
+ if (bRemoveBeforeApplying) {
1404
+ oConditionModel.removeAllConditions();
1405
+ }
1406
+
1407
+ if (mConditionsData) {
1408
+
1409
+ var bAllPropertiesKnown = true;
1410
+ for ( sFieldPath in mConditionsData) {
1411
+ aConditions = mConditionsData[sFieldPath];
1412
+
1413
+ if (!this._isPathKnown(sFieldPath, aConditions)) {
1414
+ bAllPropertiesKnown = false;
1415
+ break;
1416
+ }
1417
+ }
1418
+
1419
+ if (!bAllPropertiesKnown && !this._hasPropertyHelper()) {
1420
+ this._retrieveMetadata().then(function() {
1421
+ fApplyConditions(mConditionsData);
1422
+ });
1423
+ } else {
1424
+ fApplyConditions(mConditionsData);
1425
+ }
1203
1426
  }
1427
+
1428
+ return oPromise;
1204
1429
  };
1205
1430
 
1206
1431
  FilterBarBase.prototype._getXConditions = function () {
@@ -1444,15 +1669,6 @@ sap.ui.define([
1444
1669
  };
1445
1670
 
1446
1671
 
1447
- FilterBarBase.prototype.getPropertyInfoSet = function() {
1448
- try {
1449
- var oPropertyHelper = this.getPropertyHelper();
1450
- return oPropertyHelper ? oPropertyHelper.getProperties() : [];
1451
- } catch (ex) {
1452
- return [];
1453
- }
1454
- };
1455
-
1456
1672
  FilterBarBase.prototype._getNonHiddenPropertyInfoSet = function() {
1457
1673
  var aVisibleProperties = [];
1458
1674
  this.getPropertyInfoSet().every(function(oProperty) {
@@ -1483,9 +1699,6 @@ sap.ui.define([
1483
1699
  return oProperty;
1484
1700
  };
1485
1701
 
1486
- FilterBarBase.prototype._getPropertyByName = function(sName) {
1487
- return FilterUtil.getPropertyByKey(this.getPropertyInfoSet(), sName);
1488
- };
1489
1702
 
1490
1703
  FilterBarBase.prototype._cleanUpFilterFieldInErrorStateByName = function(sFieldName) {
1491
1704
  var oFilterField = null;
@@ -1581,25 +1794,26 @@ sap.ui.define([
1581
1794
 
1582
1795
  this._bIgnoreChanges = true;
1583
1796
 
1584
- this._applyFilterConditionsChanges();
1585
-
1586
- this._changesApplied();
1797
+ this._applyFilterConditionsChanges().then(function() {
1587
1798
 
1588
- this._bInitialFiltersApplied = true;
1589
- this._fResolveInitialFiltersApplied();
1590
- this._fResolveInitialFiltersApplied = null;
1799
+ this._changesApplied();
1800
+ this._bInitialFiltersApplied = true;
1801
+ this._fResolveInitialFiltersApplied();
1802
+ this._fResolveInitialFiltersApplied = null;
1803
+ }.bind(this));
1591
1804
  };
1592
1805
 
1593
1806
  FilterBarBase.prototype._applyFilterConditionsChanges = function() {
1594
1807
 
1595
- var aConditionsData;
1808
+ var mSettings, mConditionsData;
1596
1809
 
1597
- var mSettings = this.getProperty("filterConditions");
1810
+ mSettings = this.getProperty("filterConditions");
1598
1811
  if (Object.keys(mSettings).length > 0) {
1599
-
1600
- aConditionsData = merge([], mSettings);
1601
- this._setXConditions(aConditionsData, true, true);
1812
+ mConditionsData = merge({}, mSettings);
1813
+ return this._setXConditions(mConditionsData, true);
1602
1814
  }
1815
+
1816
+ return Promise.resolve();
1603
1817
  };
1604
1818
 
1605
1819
  FilterBarBase.prototype.setVariantBackreference = function(oVariant) {
@@ -1763,8 +1977,11 @@ sap.ui.define([
1763
1977
 
1764
1978
  this._aFIChanges = null;
1765
1979
  this._aCollectedChangePromises = null;
1980
+
1981
+ this._oConditionChangeStartedPromise = null;
1982
+ this._fConditionChangeStartedPromiseResolve = undefined;
1766
1983
  };
1767
1984
 
1768
1985
  return FilterBarBase;
1769
1986
 
1770
- });
1987
+ });