@openui5/sap.ui.mdc 1.98.0 → 1.101.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 (267) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +4 -4
  3. package/src/sap/ui/mdc/.library +1 -1
  4. package/src/sap/ui/mdc/ActionToolbar.js +6 -3
  5. package/src/sap/ui/mdc/AggregationBaseDelegate.js +1 -1
  6. package/src/sap/ui/mdc/Chart.js +186 -102
  7. package/src/sap/ui/mdc/ChartDelegate.js +85 -30
  8. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  9. package/src/sap/ui/mdc/Control.js +11 -6
  10. package/src/sap/ui/mdc/Element.js +10 -6
  11. package/src/sap/ui/mdc/Field.js +19 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  14. package/src/sap/ui/mdc/FilterField.js +41 -3
  15. package/src/sap/ui/mdc/Link.js +22 -4
  16. package/src/sap/ui/mdc/LinkDelegate.js +9 -7
  17. package/src/sap/ui/mdc/MultiValueField.js +30 -6
  18. package/src/sap/ui/mdc/Table.js +332 -316
  19. package/src/sap/ui/mdc/TableDelegate.js +146 -31
  20. package/src/sap/ui/mdc/ValueHelp.js +136 -624
  21. package/src/sap/ui/mdc/ValueHelpDelegate.js +154 -7
  22. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  24. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  25. package/src/sap/ui/mdc/chart/ChartToolbar.js +56 -11
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +24 -10
  27. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -7
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  29. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  30. package/src/sap/ui/mdc/condition/Condition.js +14 -9
  31. package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
  32. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  33. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  34. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +393 -68
  35. package/src/sap/ui/mdc/condition/Operator.js +14 -2
  36. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
  37. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  38. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  39. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +6 -0
  41. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
  42. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  43. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +36 -9
  44. package/src/sap/ui/mdc/enum/PropagationReason.js +43 -0
  45. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  46. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  47. package/src/sap/ui/mdc/field/ConditionType.js +44 -13
  48. package/src/sap/ui/mdc/field/ConditionsType.js +3 -1
  49. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  50. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  51. package/src/sap/ui/mdc/field/DefineConditionPanel.js +31 -9
  52. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  53. package/src/sap/ui/mdc/field/FieldBase.js +69 -14
  54. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
  55. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  56. package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
  57. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  58. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldValueHelp.js +9 -4
  61. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
  64. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
  65. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
  66. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
  67. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  69. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  70. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  71. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  72. package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
  73. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  74. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  75. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  76. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  77. package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
  78. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  79. package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
  80. package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
  81. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  82. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +137 -216
  83. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  84. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
  85. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  86. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
  87. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
  88. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +144 -64
  89. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  90. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  91. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  92. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +73 -23
  93. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  94. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  95. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +7 -42
  96. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  97. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
  98. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
  99. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  100. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  101. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  102. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  103. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +5 -5
  104. package/src/sap/ui/mdc/library.js +41 -30
  105. package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
  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/ContactDetailsRenderer.js +26 -0
  111. package/src/sap/ui/mdc/link/Factory.js +1 -1
  112. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  113. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  114. package/src/sap/ui/mdc/link/Log.js +1 -1
  115. package/src/sap/ui/mdc/link/Panel.js +205 -29
  116. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  117. package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
  118. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  119. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  120. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  121. package/src/sap/ui/mdc/messagebundle.properties +59 -6
  122. package/src/sap/ui/mdc/messagebundle_ar.properties +40 -6
  123. package/src/sap/ui/mdc/messagebundle_bg.properties +58 -24
  124. package/src/sap/ui/mdc/messagebundle_ca.properties +40 -6
  125. package/src/sap/ui/mdc/messagebundle_cs.properties +40 -6
  126. package/src/sap/ui/mdc/messagebundle_cy.properties +40 -6
  127. package/src/sap/ui/mdc/messagebundle_da.properties +40 -6
  128. package/src/sap/ui/mdc/messagebundle_de.properties +40 -6
  129. package/src/sap/ui/mdc/messagebundle_el.properties +39 -5
  130. package/src/sap/ui/mdc/messagebundle_en.properties +40 -6
  131. package/src/sap/ui/mdc/messagebundle_en_GB.properties +40 -6
  132. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +40 -6
  133. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +68 -9
  134. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +41 -7
  135. package/src/sap/ui/mdc/messagebundle_es.properties +40 -6
  136. package/src/sap/ui/mdc/messagebundle_es_MX.properties +41 -7
  137. package/src/sap/ui/mdc/messagebundle_et.properties +40 -6
  138. package/src/sap/ui/mdc/messagebundle_fi.properties +40 -6
  139. package/src/sap/ui/mdc/messagebundle_fr.properties +41 -7
  140. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +40 -6
  141. package/src/sap/ui/mdc/messagebundle_hi.properties +40 -6
  142. package/src/sap/ui/mdc/messagebundle_hr.properties +40 -6
  143. package/src/sap/ui/mdc/messagebundle_hu.properties +40 -6
  144. package/src/sap/ui/mdc/messagebundle_id.properties +40 -6
  145. package/src/sap/ui/mdc/messagebundle_it.properties +41 -7
  146. package/src/sap/ui/mdc/messagebundle_iw.properties +39 -5
  147. package/src/sap/ui/mdc/messagebundle_ja.properties +41 -7
  148. package/src/sap/ui/mdc/messagebundle_kk.properties +40 -6
  149. package/src/sap/ui/mdc/messagebundle_ko.properties +39 -5
  150. package/src/sap/ui/mdc/messagebundle_lt.properties +40 -6
  151. package/src/sap/ui/mdc/messagebundle_lv.properties +44 -10
  152. package/src/sap/ui/mdc/messagebundle_ms.properties +40 -6
  153. package/src/sap/ui/mdc/messagebundle_nl.properties +40 -6
  154. package/src/sap/ui/mdc/messagebundle_no.properties +40 -6
  155. package/src/sap/ui/mdc/messagebundle_pl.properties +40 -6
  156. package/src/sap/ui/mdc/messagebundle_pt.properties +41 -7
  157. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +40 -6
  158. package/src/sap/ui/mdc/messagebundle_ro.properties +40 -6
  159. package/src/sap/ui/mdc/messagebundle_ru.properties +40 -6
  160. package/src/sap/ui/mdc/messagebundle_sh.properties +43 -9
  161. package/src/sap/ui/mdc/messagebundle_sk.properties +40 -6
  162. package/src/sap/ui/mdc/messagebundle_sl.properties +41 -7
  163. package/src/sap/ui/mdc/messagebundle_sv.properties +41 -7
  164. package/src/sap/ui/mdc/messagebundle_th.properties +43 -9
  165. package/src/sap/ui/mdc/messagebundle_tr.properties +41 -7
  166. package/src/sap/ui/mdc/messagebundle_uk.properties +43 -9
  167. package/src/sap/ui/mdc/messagebundle_vi.properties +40 -6
  168. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +40 -6
  169. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +40 -6
  170. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +24 -15
  171. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  172. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  173. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  174. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +354 -0
  175. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  176. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  177. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
  178. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  179. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  180. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +32 -69
  181. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  182. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
  183. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +412 -326
  184. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  185. package/src/sap/ui/mdc/p13n/Engine.js +169 -66
  186. package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
  187. package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -6
  188. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  189. package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
  190. package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
  191. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
  192. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +2 -2
  193. package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
  194. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  195. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  196. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +76 -16
  197. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
  198. package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
  199. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  200. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  201. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  202. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
  203. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
  204. package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
  205. package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
  206. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +40 -12
  207. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
  208. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  209. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
  210. package/src/sap/ui/mdc/table/Column.js +271 -132
  211. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  212. package/src/sap/ui/mdc/table/GridTableType.js +75 -27
  213. package/src/sap/ui/mdc/table/PropertyHelper.js +71 -95
  214. package/src/sap/ui/mdc/table/ResponsiveTableType.js +121 -40
  215. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  216. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  217. package/src/sap/ui/mdc/table/TableSettings.js +10 -22
  218. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  219. package/src/sap/ui/mdc/table/menu/Item.js +78 -0
  220. package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
  221. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
  222. package/src/sap/ui/mdc/themes/base/Chart.less +6 -0
  223. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  224. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  225. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +4 -3
  226. package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
  227. package/src/sap/ui/mdc/ui/Container.js +0 -240
  228. package/src/sap/ui/mdc/util/DateUtil.js +32 -7
  229. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  230. package/src/sap/ui/mdc/util/FormatUtil.js +2 -2
  231. package/src/sap/ui/mdc/util/IdentifierUtil.js +7 -7
  232. package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
  233. package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
  234. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  235. package/src/sap/ui/mdc/valuehelp/Dialog.js +234 -44
  236. package/src/sap/ui/mdc/valuehelp/Popover.js +7 -4
  237. package/src/sap/ui/mdc/valuehelp/base/Container.js +63 -48
  238. package/src/sap/ui/mdc/valuehelp/base/Content.js +35 -16
  239. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  240. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +161 -284
  241. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +4 -4
  242. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  243. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
  244. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
  245. package/src/sap/ui/mdc/valuehelp/content/ListCollection.js +205 -0
  246. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +67 -66
  247. package/src/sap/ui/mdc/valuehelp/content/MTable.js +94 -185
  248. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -1
  249. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
  250. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
  251. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
  252. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +8 -8
  253. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +43 -27
  254. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  255. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  256. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  257. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  258. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  259. package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
  260. package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
  261. package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
  262. package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
  263. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  264. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  265. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  266. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  267. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -22,7 +22,12 @@ sap.ui.define([
22
22
  "sap/ui/base/ManagedObjectObserver",
23
23
  "sap/ui/core/ResizeHandler",
24
24
  "sap/ui/mdc/p13n/panels/ChartItemPanel",
25
- "sap/m/MessageStrip"
25
+ "sap/m/MessageStrip",
26
+ "../TypeUtil",
27
+ "../FilterBarDelegate",
28
+ "sap/ui/model/Filter",
29
+ "sap/ui/mdc/odata/v4/ChartPropertyHelper",
30
+ "sap/ui/thirdparty/jquery"
26
31
  ], function (
27
32
  V4ChartDelegate,
28
33
  loadModules,
@@ -41,7 +46,12 @@ sap.ui.define([
41
46
  ManagedObjectObserver,
42
47
  ResizeHandler,
43
48
  ChartItemPanel,
44
- MessageStrip
49
+ MessageStrip,
50
+ V4TypeUtil,
51
+ V4FilterBarDelegate,
52
+ Filter,
53
+ PropertyHelper,
54
+ jQuery
45
55
  ) {
46
56
  "use strict";
47
57
  /**
@@ -82,6 +92,44 @@ sap.ui.define([
82
92
  mStateMap.set(oMDCChart, oState);
83
93
  };
84
94
 
95
+ ChartDelegate.getTypeUtil = function() {
96
+ return V4TypeUtil;
97
+ };
98
+
99
+ ChartDelegate.getFilterDelegate = function() {
100
+ return V4FilterBarDelegate;
101
+ };
102
+
103
+ /**
104
+ * This methods is called during the appliance of the add condition change.
105
+ * This intention is to update the propertyInfo property.
106
+ *
107
+ * @param {string} sPropertyName The name of a property.
108
+ * @param {sap.ui.mdc.Control} oControl - the instance of the mdc control
109
+ * @param {Object} mPropertyBag Instance of property bag from Flex change API
110
+ * @returns {Promise} Promise that resolves once the properyInfo property was updated
111
+ */
112
+ ChartDelegate.addCondition = function(sPropertyName, oControl, mPropertyBag) {
113
+ //return this.getFilterDelegate().addCondition(sPropertyName, oControl, mPropertyBag);
114
+ // will be activated, once mdc.Chart has the property propertyInfo.
115
+ return Promise.resolve();
116
+ };
117
+
118
+ /**
119
+ * This methods is called during the appliance of the remove condition change.
120
+ * This intention is to update the propertyInfo property.
121
+ *
122
+ * @param {string} sPropertyName The name of a property.
123
+ * @param {sap.ui.mdc.Control} oControl - the instance of the mdc control
124
+ * @param {Object} mPropertyBag Instance of property bag from Flex change API
125
+ * @returns {Promise} Promise that resolves once the properyInfo property was updated
126
+ */
127
+ ChartDelegate.removeCondition = function(sPropertyName, oControl, mPropertyBag) {
128
+ //return this.getFilterDelegate().removeCondition(sPropertyName, oControl, mPropertyBag);
129
+ // will be activated, once mdc.Chart has the property propertyInfo.
130
+ return Promise.resolve();
131
+ };
132
+
85
133
  ChartDelegate._deleteState = function(oMDCChart) {
86
134
 
87
135
  if (this._getState(oMDCChart).vizTooltip) {
@@ -176,36 +224,6 @@ sap.ui.define([
176
224
  * ...
177
225
  */
178
226
 
179
- /**
180
- * Provides the table's filter delegate that provides basic filter functionality such as adding filter fields.
181
- * <b>Note:</b> The functionality provided in this delegate should act as a subset of a FilterBarDelegate
182
- * to enable the table for inbuilt filtering.
183
- *
184
- * @example <caption>Example usage of <code>getFilterDelegate</code></caption>
185
- * oFilterDelegate = {
186
- * addItem: function() {
187
- * var oFilterFieldPromise = new Promise(...);
188
- * return oFilterFieldPromise;
189
- * }
190
- * }
191
- * @returns {Object} Object for the chart filter personalization
192
- * @public
193
- */
194
- ChartDelegate.getFilterDelegate = function () {
195
- return {
196
- /**
197
- *
198
- * @param {String} sPropertyName The property name
199
- * @param {Object} oMDCChart Instance of the chart TODO: Which one? MDC or inner?
200
- *
201
- * @returns {Promise} Promise that resolves with an instance of a <code>sap.ui.mdc.FilterField</code>.
202
- * For more information, see {@link sap.ui.mdc.AggregationBaseDelegate#addItem AggregationBaseDelegate}.
203
- */
204
- addItem: function (sPropertyName, oMDCChart) {
205
- return Promise.resolve(null);
206
- }
207
- };
208
- };
209
227
 
210
228
  ChartDelegate.exit = function(oMDCChart) {
211
229
  if (this._getInnerStructure(oMDCChart)){
@@ -229,7 +247,7 @@ sap.ui.define([
229
247
 
230
248
  /**
231
249
  * Gets the current zooming information for the inner chart
232
- * @returns {integer} Current zoom level on the inner chart
250
+ * @returns {int} Current zoom level on the inner chart
233
251
  */
234
252
  ChartDelegate.getZoomState = function (oMDCChart) {
235
253
 
@@ -312,6 +330,10 @@ sap.ui.define([
312
330
 
313
331
  ChartDelegate.getAdaptionUI = function(oMDCChart) {
314
332
 
333
+ return Promise.resolve(this._setupAdaptionUI(oMDCChart));
334
+ };
335
+
336
+ ChartDelegate._setupAdaptionUI = function(oMDCChart) {
315
337
  var oLayoutConfig = this.getChartTypeLayoutConfig().find(function(it){return it.key === oMDCChart.getChartType();});
316
338
 
317
339
  //Default case -> everything allowed
@@ -338,13 +360,14 @@ sap.ui.define([
338
360
  oPanel.setMessageStrip(new MessageStrip({text: MDCRb.getText("chart.PERSONALIZATION_DIALOG_MEASURE_WARNING"), type:"Warning"}));
339
361
  }
340
362
 
341
- return Promise.resolve(oPanel);
363
+ return oPanel;
342
364
  };
343
365
 
344
366
  /**
345
367
  * Sets the visibility of the legend
346
368
  * This is called by the MDC Chart, do not call it directly!
347
- * @param {bool} bVisible true to show legend, false to hide
369
+ * @param {sap.ui.mdc.Chart} oMDCChart Chart to the set the legend visibility on
370
+ * @param {boolean} bVisible true to show legend, false to hide
348
371
  *
349
372
  * @experimental
350
373
  * @private
@@ -386,7 +409,8 @@ sap.ui.define([
386
409
  /**
387
410
  * Inserts an MDC Chart Item (in case of sap.chart.Chart a Measure/Dimension) on the inner chart
388
411
  * This function is called by MDC Chart on a change of the <code>Items</code> aggregation
389
- * @param {sap.ui.mdc.chart-Item} oMDCChartItem the MDC CHart Item to insert into the inner chart
412
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to insert the item into
413
+ * @param {sap.ui.mdc.chart.Item} oMDCChartItem the MDC Chart Item to insert into the inner chart
390
414
  * @param {int} iIndex the index to insert into
391
415
  */
392
416
  ChartDelegate.insertItemToInnerChart = function (oMDCChart, oMDCChartItem, iIndex) {
@@ -420,14 +444,14 @@ sap.ui.define([
420
444
  this._updateColoring(oMDCChart, this._getChart(oMDCChart).getVisibleDimensions(), this._getChart(oMDCChart).getVisibleMeasures());
421
445
  }.bind(this));
422
446
 
423
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
424
- this._updateSemanticalPattern(oMDCChart, aProperties);
425
- }.bind(this));
447
+ this._updateSemanticalPattern(oMDCChart);
448
+
426
449
  };
427
450
 
428
451
  /**
429
452
  * Removes an Item (in case of sap.chart.Chart a Measure/Dimension) from the inner chart
430
453
  * This function is called by MDC Chart on a change of the <code>Items</code> aggregation
454
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to remove the item from
431
455
  * @param {sap.ui.mdc.chart.Item} oMDCChartItem The Item to remove from the inner chart
432
456
  */
433
457
  ChartDelegate.removeItemFromInnerChart = function (oMDCChart, oMDCChartItem) {
@@ -457,9 +481,8 @@ sap.ui.define([
457
481
 
458
482
  //Update coloring and semantical patterns on Item change
459
483
  this._updateColoring(oMDCChart, this._getChart(oMDCChart).getVisibleDimensions(), this._getChart(oMDCChart).getVisibleMeasures());
460
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
461
- this._updateSemanticalPattern(oMDCChart, aProperties);
462
- }.bind(this));
484
+
485
+ this._updateSemanticalPattern(oMDCChart);
463
486
  };
464
487
 
465
488
  /**
@@ -474,29 +497,64 @@ sap.ui.define([
474
497
  if (oMDCChart.getModel) {
475
498
  return Promise.resolve(this._createMDCChartItem(sPropertyName, oMDCChart, sRole));
476
499
  }
477
- return Promise.resolve(null);
478
500
  };
479
501
 
480
502
  ChartDelegate.removeItem = function (oProperty, oMDCChart) {
481
503
  return Promise.resolve(true);
482
504
  };
483
505
 
484
- ChartDelegate._createMDCChartItem = function (sPropertyName, oMDCChart, sRole) {
485
- return this.fetchProperties(oMDCChart).then(function (aProperties) {
506
+ /**
507
+ * This will iterate over all items of the MDC Chart to make sure all necessary information is available on them
508
+ * If something is missing, this method will update the item accordingly
509
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to check the items on
510
+ * @returns {Promise} resolves once check is complete
511
+ */
512
+ ChartDelegate.checkAndUpdateMDCItems = function(oMDCChart) {
513
+ return new Promise(function(resolve, reject){
514
+ var aPropPromises = [];
515
+
516
+ oMDCChart.getItems().forEach(function(oMDCItem){
517
+ var bIsComplete = oMDCItem.getName() && oMDCItem.getLabel() && oMDCItem.getType() && oMDCItem.getRole();
518
+
519
+ if (!bIsComplete) {
520
+ aPropPromises.push(this._getPropertyInfosByName(oMDCItem.getName(), oMDCChart).then(function(oPropertyInfo){
521
+ oMDCItem.setLabel(oPropertyInfo.label);
522
+
523
+ if (oPropertyInfo.groupable) {
524
+ oMDCItem.setType("groupable");
525
+ oMDCItem.setRole(oMDCItem.getRole() ? oMDCItem.getRole() : "category");
526
+ } else if (oPropertyInfo.aggregatable) {
527
+ oMDCItem.setType("aggregatable");
528
+ oMDCItem.setRole(oMDCItem.getRole() ? oMDCItem.getRole() : "axis1");
529
+ }
530
+ }));
531
+ }
532
+ }.bind(this));
486
533
 
487
- //Uses excact MDC Chart Item id
488
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
489
- return oCurrentPropertyInfo.name === sPropertyName;
534
+ Promise.all(aPropPromises).then(function(){
535
+ resolve();
490
536
  });
537
+ }.bind(this));
491
538
 
539
+ };
540
+
541
+ ChartDelegate._createMDCChartItem = function (sPropertyName, oMDCChart, sRole) {
542
+
543
+ return this._getPropertyInfosByName(sPropertyName, oMDCChart).then(function(oPropertyInfo){
492
544
  if (!oPropertyInfo) {
493
545
  return null;
494
546
  }
495
547
 
548
+ return this._createMDCItemFromProperty(oPropertyInfo, oMDCChart.getId(), sRole);
549
+
550
+ }.bind(this));
551
+
552
+ };
553
+
554
+ ChartDelegate._createMDCItemFromProperty = function(oPropertyInfo, idPrefix, sRole) {
496
555
 
497
- //TODO: Check for case: both aggegatable and groupable
498
556
  if (oPropertyInfo.groupable) {
499
- return new MDCChartItem(oMDCChart.getId() + "--GroupableItem--" + oPropertyInfo.name, {
557
+ return new MDCChartItem(idPrefix + "--GroupableItem--" + oPropertyInfo.name, {
500
558
  name: oPropertyInfo.name,
501
559
  label: oPropertyInfo.label,
502
560
  type: "groupable",
@@ -506,14 +564,15 @@ sap.ui.define([
506
564
 
507
565
  if (oPropertyInfo.aggregatable) {
508
566
 
509
- return new MDCChartItem(oMDCChart.getId() + "--AggregatableItem--" + oPropertyInfo.name, {
567
+ return new MDCChartItem(idPrefix + "--AggregatableItem--" + oPropertyInfo.name, {
510
568
  name: oPropertyInfo.name,
511
569
  label: oPropertyInfo.label,
512
570
  type: "aggregatable",
513
571
  role: sRole ? sRole : "axis1"
514
572
  });
515
573
  }
516
- });
574
+
575
+ return null;
517
576
  };
518
577
 
519
578
  /**
@@ -558,114 +617,121 @@ sap.ui.define([
558
617
  };
559
618
 
560
619
  ChartDelegate._createContentFromItems = function (oMDCChart) {
561
- //This is done so the user doesn't have to specify property path & aggregation method in the XML
562
- this.fetchProperties(oMDCChart).then(function (aProperties) {
620
+ return new Promise(function(resolve, reject){
621
+ //This is done so the user doesn't have to specify property path & aggregation method in the XML
563
622
  var aColorPromises = [];
623
+ var aPropPromises = [];
564
624
 
565
625
  var aVisibleDimensions = [];
566
626
  var aVisibleMeasures = [];
567
627
  oMDCChart.getItems().forEach(function (oItem, iIndex) {
568
628
 
569
629
  //Uses excact mdc chart item id
570
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
571
- return oCurrentPropertyInfo.name === oItem.getName();
572
- });
630
+ aPropPromises.push(this._getPropertyInfosByName( oItem.getName(), oMDCChart).then(function(oPropertyInfo){
631
+ //Skip a Item if there is no property representing the Item inside the backend
632
+ if (!oPropertyInfo){
633
+ Log.error("sap.ui.mdc.Chart: Item " + oItem.getName() + " has no property info representing it in the metadata. Make sure the name is correct and the metadata is defined correctly. Skipping the item!");
634
+ return;
635
+ }
573
636
 
574
- //Skip a Item if there is no property representing the Item inside the backend
575
- if (!oPropertyInfo){
576
- Log.error("sap.ui.mdc.Chart: Item " + oItem.getName() + " has no property info representing it in the metadata. Make sure the name is correct and the metadata is defined correctly. Skipping the item!");
577
- return;
578
- }
637
+ switch (oItem.getType()) {
638
+ case "groupable":
639
+ aVisibleDimensions.push(this.getInternalChartNameFromPropertyNameAndKind(oItem.getName(), "groupable", oMDCChart));
579
640
 
580
- switch (oItem.getType()) {
581
- case "groupable":
582
- aVisibleDimensions.push(this.getInternalChartNameFromPropertyNameAndKind(oItem.getName(), "groupable", oMDCChart));
641
+ this._addInnerDimension(oMDCChart, oItem, oPropertyInfo);
642
+ break;
643
+ case "aggregatable":
583
644
 
584
- this._addInnerDimension(oMDCChart, oItem, oPropertyInfo);
585
- break;
586
- case "aggregatable":
645
+ //TODO: Alias might be changing after backend request
646
+ aVisibleMeasures.push(this._getAggregatedMeasureNameForMDCItem(oItem));
587
647
 
588
- //TODO: Alias might be changing after backend request
589
- aVisibleMeasures.push(this._getAggregatedMeasureNameForMDCItem(oItem));
648
+ this._addInnerMeasure(oMDCChart, oItem, oPropertyInfo);
649
+ break;
590
650
 
591
- this._addInnerMeasure(oMDCChart, oItem, oPropertyInfo);
592
- break;
651
+ default:
652
+ Log.error("MDC Chart Item " + oItem.getId() + " with label " + oItem.getLabel() + " has no known type. Supported typed are: \"groupable\" & \"aggregatable\"");
653
+ }
593
654
 
594
- default:
595
- Log.error("MDC Chart Item " + oItem.getId() + " with label " + oItem.getLabel() + " has no known type. Supported typed are: \"groupable\" & \"aggregatable\"");
596
- }
655
+ aColorPromises.push(this._prepareColoringForItem(oItem));
656
+ }.bind(this)));
597
657
 
598
- aColorPromises.push(this._prepareColoringForItem(oItem));
599
658
  }.bind(this));
600
659
 
601
- this._getState(oMDCChart).aColMeasures.forEach(function(sKey) {
660
+ Promise.all(aPropPromises).then(function(){
661
+ this._getState(oMDCChart).aColMeasures.forEach(function(sKey) {
602
662
 
603
- if (this._getState(oMDCChart).aInSettings.indexOf(sKey) == -1) {
663
+ if (this._getState(oMDCChart).aInSettings.indexOf(sKey) == -1) {
604
664
 
605
- var oPropertyInfo = oMDCChart.getPropertyHelper().getProperty(sKey); //this.getPropertyFromNameAndKind not used as the key is the name of the MDC Chart Item
665
+ aColorPromises.push(new Promise(function(resolve, reject){
666
+ oMDCChart._getPropertyByNameAsync(sKey).then(function(oPropertyInfo){
667
+ var aggregationMethod = oPropertyInfo.aggregationMethod;
668
+ var propertyPath = oPropertyInfo.propertyPath;
669
+ var sName = this.getInternalChartNameFromPropertyNameAndKind(sKey, "aggregatable", oMDCChart);
606
670
 
607
- var aggregationMethod = oPropertyInfo.aggregationMethod;
608
- var propertyPath = oPropertyInfo.propertyPath;
609
- var sName = this.getInternalChartNameFromPropertyNameAndKind(sKey, "aggregatable", oMDCChart);
671
+ var oMeasureSettings = {
672
+ name: sName,
673
+ label: oPropertyInfo.label,
674
+ role: "axis1"
675
+ };
610
676
 
611
- var oMeasureSettings = {
612
- name: sName,
613
- label: oPropertyInfo.label,
614
- role: "axis1"
615
- };
677
+ if (aggregationMethod && propertyPath) {
678
+ oMeasureSettings.analyticalInfo = {
679
+ propertyPath: propertyPath,
680
+ "with": aggregationMethod
681
+ };
682
+ }
616
683
 
617
- if (aggregationMethod && propertyPath) {
618
- oMeasureSettings.analyticalInfo = {
619
- propertyPath: propertyPath,
620
- "with": aggregationMethod
621
- };
622
- }
684
+ var oMeasure = new Measure(oMeasureSettings);
623
685
 
624
- var oMeasure = new Measure(oMeasureSettings);
686
+ aVisibleMeasures.push(oMeasure);
687
+ this._getChart(oMDCChart).addMeasure(oMeasure);
688
+ resolve();
689
+ }); //this.getPropertyFromNameAndKind not used as the key is the name of the MDC Chart Item
625
690
 
626
- aVisibleMeasures.push(oMeasure);
627
- this._getChart(oMDCChart).addMeasure(oMeasure);
628
- }
691
+ }));
692
+ }
629
693
 
630
- }.bind(this));
694
+ }.bind(this));
631
695
 
632
- Promise.all(aColorPromises).then(function(){
633
- this._getChart(oMDCChart).setVisibleDimensions(aVisibleDimensions);
634
- this._getChart(oMDCChart).setVisibleMeasures(aVisibleMeasures);
696
+ Promise.all(aColorPromises).then(function(){
697
+ this._getChart(oMDCChart).setVisibleDimensions(aVisibleDimensions);
698
+ this._getChart(oMDCChart).setVisibleMeasures(aVisibleMeasures);
635
699
 
636
- var aInResultDimensions = oMDCChart.getDelegate().inResultDimensions; //TODO: Does this use internal name? If so, change _getPropertyInfosByName below; Most likely not the case
637
- if (aInResultDimensions && aInResultDimensions instanceof Array && aInResultDimensions.length != 0) {
700
+ var aInResultDimensions = oMDCChart.getDelegate().inResultDimensions; //TODO: Does this use internal name? If so, change _getPropertyInfosByName below; Most likely not the case
701
+ if (aInResultDimensions && aInResultDimensions instanceof Array && aInResultDimensions.length != 0) {
638
702
 
639
- var aInResultPromises = [];
703
+ var aInResultPromises = [];
640
704
 
641
- aInResultDimensions.forEach(function(sInResultDim){
705
+ aInResultDimensions.forEach(function(sInResultDim){
642
706
 
643
- aInResultPromises.push(this._getPropertyInfosByName(sInResultDim, oMDCChart).then(function(oPropertyInfos){
644
- var sName = this.getInternalChartNameFromPropertyNameAndKind(oPropertyInfos.name, "groupable", oMDCChart);
707
+ aInResultPromises.push(this._getPropertyInfosByName(sInResultDim, oMDCChart).then(function(oPropertyInfos){
708
+ var sName = this.getInternalChartNameFromPropertyNameAndKind(oPropertyInfos.name, "groupable", oMDCChart);
645
709
 
646
- var oDim = new Dimension({
647
- name: sName,
648
- label: oPropertyInfos.label
649
- });
710
+ var oDim = new Dimension({
711
+ name: sName,
712
+ label: oPropertyInfos.label
713
+ });
650
714
 
651
- this._getState(oMDCChart).inResultDimensions.push(sName);
652
- this._getChart(oMDCChart).addDimension(oDim);
653
- }.bind(this)));
715
+ this._getState(oMDCChart).inResultDimensions.push(sName);
716
+ this._getChart(oMDCChart).addDimension(oDim);
717
+ }.bind(this)));
654
718
 
655
- }.bind(this));
719
+ }.bind(this));
656
720
 
657
- Promise.all(aInResultPromises).then(function(){
658
- this._getChart(oMDCChart).setInResultDimensions(this._getState(oMDCChart).inResultDimensions);
659
- }.bind(this));
721
+ Promise.all(aInResultPromises).then(function(){
722
+ this._getChart(oMDCChart).setInResultDimensions(this._getState(oMDCChart).inResultDimensions);
723
+ }.bind(this));
660
724
 
661
- }
725
+ }
726
+
727
+ this._updateColoring(oMDCChart, aVisibleDimensions, aVisibleMeasures);
728
+ this._updateSemanticalPattern(oMDCChart);
662
729
 
663
- this._updateColoring(oMDCChart, aVisibleDimensions, aVisibleMeasures);
664
- this._updateSemanticalPattern(oMDCChart, aProperties);
730
+ resolve();
731
+ }.bind(this));
665
732
  }.bind(this));
666
733
 
667
734
  }.bind(this));
668
-
669
735
  };
670
736
 
671
737
  ChartDelegate.getInnerChart = function (oMDCChart) {
@@ -768,7 +834,7 @@ sap.ui.define([
768
834
 
769
835
  /**
770
836
  * Updates the coloring on the inner chart
771
- * @param {sap.chart.Chart} oChart inner chart
837
+ * @param {sap.chart.Chart} oMDCChart inner chart
772
838
  * @param {array} aVisibleDimensions visible dimensions for inner chart
773
839
  * @param {array} aVisibleMeasures visible measures for inner chart
774
840
  *
@@ -826,15 +892,14 @@ sap.ui.define([
826
892
  /**
827
893
  * Updates the semantical pattern for given measures
828
894
  *
829
- * @param {sap.chart.Chart} oChart the inner chart
830
- * @param {array} aVisibleMeasures array containing the visible measures on the inner chart
831
- * @param {*} mDataPoints data points of the inner chart
895
+ * @param {sap.chart.Chart} oMDCChart the inner chart
896
+ * @param {*} aProperties // TODO what is this parameter used for?
832
897
  *
833
898
  * @experimental
834
899
  * @private
835
900
  * @ui5-restricted Fiori Elements, sap.ui.mdc
836
901
  */
837
- ChartDelegate._updateSemanticalPattern = function (oMDCChart, aProperties) {
902
+ ChartDelegate._updateSemanticalPattern = function (oMDCChart) {
838
903
 
839
904
  var aVisibleMeasures = this._getChart(oMDCChart).getVisibleMeasures();
840
905
 
@@ -985,23 +1050,31 @@ sap.ui.define([
985
1050
  */
986
1051
  ChartDelegate.getSortedDimensions = function (oMDCChart) {
987
1052
  return new Promise(function (resolve, reject) {
988
- this.fetchProperties(oMDCChart).then(function (aProperties) {
989
1053
 
990
- var aDimensions = aProperties.filter(function (oItem) {
991
- return oItem.groupable; //Groupable means "Dimension" for sap.chart.Chart
992
- });
1054
+ if (oMDCChart.isPropertyHelperFinal()){
1055
+ resolve(this._sortPropertyDimensions(oMDCChart.getPropertyHelper().getProperties()));
1056
+ } else {
1057
+ oMDCChart.finalizePropertyHelper().then(function(){
1058
+ resolve(this._sortPropertyDimensions(oMDCChart.getPropertyHelper().getProperties()));
1059
+ }.bind(this));
1060
+ }
1061
+ }.bind(this));
1062
+ };
993
1063
 
994
- if (aDimensions) {
995
- aDimensions.sort(function (a, b) {
996
- if (a.label && b.label) {
997
- return a.label.localeCompare(b.label);
998
- }
999
- });
1000
- }
1064
+ ChartDelegate._sortPropertyDimensions = function(aProperties) {
1065
+ var aDimensions = aProperties.filter(function (oItem) {
1066
+ return oItem.groupable; //Groupable means "Dimension" for sap.chart.Chart
1067
+ });
1001
1068
 
1002
- resolve(aDimensions);
1069
+ if (aDimensions) {
1070
+ aDimensions.sort(function (a, b) {
1071
+ if (a.label && b.label) {
1072
+ return a.label.localeCompare(b.label);
1073
+ }
1003
1074
  });
1004
- }.bind(this));
1075
+ }
1076
+
1077
+ return aDimensions;
1005
1078
  };
1006
1079
 
1007
1080
  /**
@@ -1022,6 +1095,7 @@ sap.ui.define([
1022
1095
  /**
1023
1096
  * Sets the chart type of the inner chart
1024
1097
  * Is called by MDC Chart when <code>chartType</code> property is updated
1098
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to set the chart type for
1025
1099
  * @param {string} sChartType the new chart type
1026
1100
  */
1027
1101
  ChartDelegate.setChartType = function (oMDCChart, sChartType) {
@@ -1033,53 +1107,64 @@ sap.ui.define([
1033
1107
  */
1034
1108
  ChartDelegate.createInnerChartContent = function (oMDCChart, fnCallbackDataLoaded) {
1035
1109
 
1036
- this._setChart(oMDCChart, new Chart({
1037
- id: oMDCChart.getId() + "--innerChart",
1038
- chartType: "column",
1039
- width: "100%",
1040
- isAnalytical: true//,
1041
- }));
1110
+ return new Promise(function(resolve,reject){
1111
+ this._setChart(oMDCChart, new Chart({
1112
+ id: oMDCChart.getId() + "--innerChart",
1113
+ chartType: "column",
1114
+ width: "100%",
1115
+ isAnalytical: true//,
1116
+ }));
1042
1117
 
1043
- //Initialize empty; will get filled later on
1044
- this._getState(oMDCChart).inResultDimensions = [];
1118
+ this._getChart(oMDCChart).setCustomMessages({
1119
+ 'NO_DATA': oMDCChart.getNoDataText()
1120
+ });
1045
1121
 
1046
- if (oMDCChart.getHeight()){
1047
- this._getChart(oMDCChart).setHeight(this._calculateInnerChartHeight(oMDCChart));
1048
- }
1122
+ //Initialize empty; will get filled later on
1123
+ this._getState(oMDCChart).inResultDimensions = [];
1049
1124
 
1050
- //Set height correctly again if chart changes
1051
- ResizeHandler.register(oMDCChart, function(){
1052
- this.adjustChartHeight(oMDCChart);
1053
- }.bind(this));
1054
-
1055
- var oState = this._getState(oMDCChart);
1056
- oState.aColMeasures = [];
1057
- oState.aInSettings = [];
1058
- this._setState(oMDCChart, oState);
1059
-
1060
- //Create initial content during pre-processing
1061
- this._createContentFromItems(oMDCChart);
1062
-
1063
- //Since zoom information is not yet available for sap.chart.Chart after data load is complete, do it on renderComplete instead
1064
- //This is a workaround which is hopefully not needed in other chart libraries
1065
- this._getChart(oMDCChart).attachRenderComplete(function () {
1066
- if (this._getState(oMDCChart).toolbarUpdateRequested){
1067
- oMDCChart._updateToolbar();
1068
- this._getState(oMDCChart).toolbarUpdateRequested = false;
1125
+ if (oMDCChart.getHeight()){
1126
+ this._getChart(oMDCChart).setHeight(this._calculateInnerChartHeight(oMDCChart));
1069
1127
  }
1070
- }.bind(this));
1071
1128
 
1072
- this._getInnerStructure(oMDCChart).removeAllItems();
1073
- this._getInnerStructure(oMDCChart).setJustifyContent(FlexJustifyContent.Start);
1074
- this._getInnerStructure(oMDCChart).setAlignItems(FlexAlignItems.Stretch);
1075
- this._getInnerStructure(oMDCChart).addItem(this._getChart(oMDCChart));
1129
+ //Set height correctly again if chart changes
1130
+ ResizeHandler.register(oMDCChart, function(){
1131
+ this.adjustChartHeight(oMDCChart);
1132
+ }.bind(this));
1133
+
1134
+ var oState = this._getState(oMDCChart);
1135
+ oState.aColMeasures = [];
1136
+ oState.aInSettings = [];
1137
+ this._setState(oMDCChart, oState);
1138
+
1139
+ //Create initial content during pre-processing
1140
+ this._createContentFromItems(oMDCChart).then(function(){
1141
+ //Since zoom information is not yet available for sap.chart.Chart after data load is complete, do it on renderComplete instead
1142
+ //This is a workaround which is hopefully not needed in other chart libraries
1143
+ this._getChart(oMDCChart).attachRenderComplete(function () {
1144
+ if (this._getState(oMDCChart).toolbarUpdateRequested){
1145
+ oMDCChart._updateToolbar();
1146
+ this._getState(oMDCChart).toolbarUpdateRequested = false;
1147
+ }
1148
+ }.bind(this));
1149
+
1150
+ this._getInnerStructure(oMDCChart).removeAllItems();
1151
+ this._getInnerStructure(oMDCChart).setJustifyContent(FlexJustifyContent.Start);
1152
+ this._getInnerStructure(oMDCChart).setAlignItems(FlexAlignItems.Stretch);
1153
+ this._getInnerStructure(oMDCChart).addItem(this._getChart(oMDCChart));
1154
+
1155
+ oState.dataLoadedCallback = fnCallbackDataLoaded;
1156
+
1157
+ this._setState(oMDCChart, oState);
1158
+ var oBindingInfo = this._getBindingInfo(oMDCChart);
1159
+ this.updateBindingInfo(oMDCChart, oBindingInfo); //Applies filters
1160
+ this.rebind(oMDCChart, oBindingInfo);
1161
+
1162
+ resolve();
1163
+ }.bind(this));
1164
+
1076
1165
 
1077
- oState.dataLoadedCallback = fnCallbackDataLoaded;
1166
+ }.bind(this));
1078
1167
 
1079
- this._setState(oMDCChart, oState);
1080
- var oBindingInfo = this._getBindingInfo(oMDCChart);
1081
- this.updateBindingInfo(oMDCChart, oBindingInfo); //Applies filters
1082
- this.rebind(oMDCChart, oBindingInfo);
1083
1168
  };
1084
1169
 
1085
1170
  ChartDelegate._calculateInnerChartHeight = function(oMDCChart) {
@@ -1126,32 +1211,18 @@ sap.ui.define([
1126
1211
  //TODO: Check for Hierachy and Time
1127
1212
  //TODO: Check for role annotation
1128
1213
 
1129
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
1130
-
1131
- //Uses MDC Chart Item ID to identify preoperty, not internal chart id
1132
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
1133
- return oCurrentPropertyInfo.name === oMDCChartItem.getName();
1134
- });
1135
-
1136
- this._addInnerDimension(oMDCChart, oMDCChartItem, oPropertyInfo);
1137
-
1214
+ this._getPropertyInfosByName(oMDCChartItem.getName(), oMDCChart).then(function(oPropInfo){
1215
+ this._addInnerDimension(oMDCChart, oMDCChartItem, oPropInfo);
1138
1216
  }.bind(this));
1139
1217
 
1218
+
1140
1219
  };
1141
1220
 
1142
1221
  ChartDelegate.createInnerMeasure = function (oMDCChart, oMDCChartItem) {
1143
1222
 
1144
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
1145
-
1146
- //Uses MDC Chart Item ID to identify preoperty, not internal chart id
1147
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
1148
- return oCurrentPropertyInfo.name === oMDCChartItem.getName();
1149
- });
1150
-
1151
- this._addInnerMeasure(oMDCChart, oMDCChartItem, oPropertyInfo);
1152
-
1223
+ this._getPropertyInfosByName(oMDCChartItem.getName(), oMDCChart).then(function(oPropInfo){
1224
+ this._addInnerMeasure(oMDCChart, oMDCChartItem, oPropInfo);
1153
1225
  }.bind(this));
1154
-
1155
1226
  };
1156
1227
 
1157
1228
  /**
@@ -1167,7 +1238,7 @@ sap.ui.define([
1167
1238
  if (oPropertyInfo.textProperty){
1168
1239
  oDimension.setTextProperty(oPropertyInfo.textProperty);
1169
1240
  if (oPropertyInfo.textFormatter){
1170
- oDimension.setTextFormatter(oPropertyInfo.textFormatter);
1241
+ oDimension.setTextFormatter(this._formatText.bind(oPropertyInfo));
1171
1242
  }
1172
1243
  oDimension.setDisplayText(true);
1173
1244
  }
@@ -1257,7 +1328,7 @@ sap.ui.define([
1257
1328
 
1258
1329
  /**
1259
1330
  * Returns whether the inner chart is currently bound
1260
- * @returns {bool} true if inner chart is bound; false if not
1331
+ * @returns {boolean} true if inner chart is bound; false if not
1261
1332
  */
1262
1333
  ChartDelegate.getInnerChartBound = function (oMDCChart) {
1263
1334
  var oState = this._getState(oMDCChart);
@@ -1276,47 +1347,114 @@ sap.ui.define([
1276
1347
  * @param {Object} oBindingInfo The binding info of the chart
1277
1348
  */
1278
1349
  ChartDelegate.updateBindingInfo = function (oMDCChart, oBindingInfo) {
1279
- var oFilter = Core.byId(oMDCChart.getFilter());
1280
- if (oFilter) {
1281
- var mConditions = oFilter.getConditions();
1350
+ var aFilters = createInnerFilters.call(this, oMDCChart).concat(createOuterFilters.call(this, oMDCChart));
1351
+ addSearchParameter(oMDCChart, oBindingInfo);
1352
+ oBindingInfo.filters = new Filter(aFilters, true);
1353
+ oBindingInfo.sorter = this.getSorters(oMDCChart);
1282
1354
 
1283
- if (mConditions) {
1355
+ };
1284
1356
 
1285
- if (!oBindingInfo) {
1286
- oBindingInfo = {};
1287
- }
1357
+ function createInnerFilters(oChart) {
1358
+ var bFilterEnabled = oChart.getP13nMode().indexOf("Filter") > -1;
1359
+ var aFilters = [];
1288
1360
 
1289
- var aPropertiesMetadata = oFilter.getPropertyInfoSet ? oFilter.getPropertyInfoSet() : null;
1290
- var aParameterNames = DelegateUtil.getParameterNames(oFilter);
1291
- var oFilterInfo = FilterUtil.getFilterInfo(ChartDelegate.getTypeUtil(), mConditions, aPropertiesMetadata, aParameterNames);
1292
- if (oFilterInfo) {
1293
- oBindingInfo.filters = oFilterInfo.filters;
1294
- }
1361
+ if (bFilterEnabled) {
1362
+ var aChartProperties = oChart.getPropertyHelper().getProperties();
1363
+ var oInnerFilterInfo = FilterUtil.getFilterInfo(this.getTypeUtil(), oChart.getConditions(), aChartProperties);
1295
1364
 
1296
- var sParameterPath = DelegateUtil.getParametersInfo(oFilter);
1297
- if (sParameterPath) {
1298
- oBindingInfo.path = sParameterPath;
1299
- }
1300
- }
1365
+ if (oInnerFilterInfo.filters) {
1366
+ aFilters.push(oInnerFilterInfo.filters);
1367
+ }
1368
+ }
1301
1369
 
1302
- // get the basic search
1303
- var sSearchText = oFilter.getSearch instanceof Function ? oFilter.getSearch() : "";
1304
- if (sSearchText) {
1370
+ return aFilters;
1371
+ }
1305
1372
 
1306
- if (!oBindingInfo) {
1307
- oBindingInfo = {};
1308
- }
1373
+ function createOuterFilters(oChart) {
1374
+ var oFilter = Core.byId(oChart.getFilter());
1375
+ var aFilters = [];
1309
1376
 
1310
- if (!oBindingInfo.parameters) {
1311
- oBindingInfo.parameters = {};
1312
- }
1313
- // add basic search parameter as expected by v4.ODataListBinding
1314
- oBindingInfo.parameters.$search = sSearchText;
1315
- } else if (oBindingInfo.parameters && oBindingInfo.parameters.$search) {
1316
- delete oBindingInfo.parameters.$search;
1317
- }
1377
+ if (!oFilter) {
1378
+ return aFilters;
1379
+ }
1380
+
1381
+ var mConditions = oFilter.getConditions();
1382
+
1383
+ if (mConditions) {
1384
+ var aPropertiesMetadata = oFilter.getPropertyInfoSet ? oFilter.getPropertyInfoSet() : null;
1385
+ var aParameterNames = DelegateUtil.getParameterNames(oFilter);
1386
+ var oOuterFilterInfo = FilterUtil.getFilterInfo(this.getTypeUtil(), mConditions, aPropertiesMetadata, aParameterNames);
1387
+
1388
+ if (oOuterFilterInfo.filters) {
1389
+ aFilters.push(oOuterFilterInfo.filters);
1390
+ }
1391
+ }
1318
1392
 
1393
+ return aFilters;
1394
+ }
1395
+
1396
+ function addSearchParameter(oChart, oBindingInfo) {
1397
+ var oFilter = Core.byId(oChart.getFilter());
1398
+ if (!oFilter) {
1399
+ return;
1400
+ }
1401
+
1402
+ var mConditions = oFilter.getConditions();
1403
+ // get the basic search
1404
+ var sSearchText = oFilter.getSearch instanceof Function ? oFilter.getSearch() : "";
1405
+
1406
+ if (mConditions) {
1407
+ var sParameterPath = DelegateUtil.getParametersInfo(oFilter, mConditions);
1408
+ if (sParameterPath) {
1409
+ oBindingInfo.path = sParameterPath;
1410
+ }
1411
+ }
1412
+
1413
+ if (!oBindingInfo.parameters) {
1414
+ oBindingInfo.parameters = {};
1319
1415
  }
1416
+
1417
+ oBindingInfo.parameters["$search"] = sSearchText || undefined;
1418
+ }
1419
+
1420
+ /**
1421
+ * Returns sorters available for the data
1422
+ *
1423
+ * @returns {array} Array containing available sorters
1424
+ *
1425
+ * @experimental
1426
+ * @private
1427
+ * @ui5-restricted sap.ui.mdc
1428
+ */
1429
+ ChartDelegate.getSorters = function (oMDCChart) {
1430
+ var aSorters;
1431
+ var aSorterProperties = oMDCChart.getSortConditions() ? oMDCChart.getSortConditions().sorters : [];
1432
+
1433
+ aSorterProperties.forEach(function (oSortProp) {
1434
+
1435
+ var oMDCItem = oMDCChart.getItems().find(function (oProp) {
1436
+ return oProp.getName() === oSortProp.name;
1437
+ });
1438
+
1439
+ //Ignore not visible Items
1440
+ if (!oMDCItem) {
1441
+ return;
1442
+ }
1443
+
1444
+ //TODO: Check for inResultDimensions
1445
+ var oSorter = this.getSorterForItem(oMDCItem, oSortProp);
1446
+
1447
+ if (aSorters) {
1448
+ aSorters.push(oSorter);
1449
+ } else {
1450
+ aSorters = [
1451
+ oSorter
1452
+ ];//[] has special meaning in sorting
1453
+ }
1454
+ }.bind(this));
1455
+
1456
+ return aSorters;
1457
+
1320
1458
  };
1321
1459
 
1322
1460
  ChartDelegate._getAggregatedMeasureNameForMDCItem = function(oMDCItem){
@@ -1348,41 +1486,6 @@ sap.ui.define([
1348
1486
  return oMDCChart.getPropertyHelper().getProperty(sName);
1349
1487
  };
1350
1488
 
1351
- /**
1352
- * This returns the layout options for a specific type of Item (measure/dimension,groupable/aggregatable)
1353
- * It is used by p13n to determine which layout options to show in the p13n panel
1354
- * @param {string} sType the type for which the layout options are requested
1355
- */
1356
- ChartDelegate._getLayoutOptionsForType = function(sType){
1357
- var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
1358
- var oAvailableRoles = {
1359
- groupable: [
1360
- {
1361
- key: MDCLib.ChartItemRoleType.category,
1362
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_CATEGORY')
1363
- }, {
1364
- key: MDCLib.ChartItemRoleType.category2,
1365
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_CATEGORY2')
1366
- }, {
1367
- key: MDCLib.ChartItemRoleType.series,
1368
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_SERIES')
1369
- }
1370
- ],
1371
- aggregatable: [
1372
- {
1373
- key: MDCLib.ChartItemRoleType.axis1,
1374
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS1')
1375
- }, {
1376
- key: MDCLib.ChartItemRoleType.axis2,
1377
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS2')
1378
- }, {
1379
- key: MDCLib.ChartItemRoleType.axis3,
1380
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS3')
1381
- }
1382
- ]
1383
- };
1384
- return oAvailableRoles[sType];
1385
- };
1386
1489
 
1387
1490
  /**
1388
1491
  * Adds an item to the inner chart (measure/dimension)
@@ -1408,7 +1511,8 @@ sap.ui.define([
1408
1511
 
1409
1512
  /**
1410
1513
  * Sets tooltips visible/invisible on inner chart
1411
- * @param {bool} bFlag true for visible, false for invisible
1514
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart
1515
+ * @param {boolean} bFlag true for visible, false for invisible
1412
1516
  */
1413
1517
  ChartDelegate.setChartTooltipVisibility = function (oMDCChart, bFlag) {
1414
1518
 
@@ -1459,44 +1563,35 @@ sap.ui.define([
1459
1563
  };
1460
1564
 
1461
1565
  /**
1462
- * Initializes a new table property helper for V4 analytics with the property extensions merged into the property infos.
1463
- *
1464
- * @param {sap.ui.mdc.Chart} oMDCChart reference to the MDC Chart
1465
- * @returns {Promise<sap.ui.mdc.table.V4AnalyticsPropertyHelper>} A promise that resolves with the property helper.
1466
- * @private
1467
- * @ui5-restricted sap.ui.mdc
1566
+ * Returns the propertyHelper used for the chart delegate
1567
+ * @returns {Promise} Promise with the property helper reference
1468
1568
  */
1469
- ChartDelegate.initPropertyHelper = function (oMDCChart) {
1470
- // TODO: Do this in the DelegateMixin, or provide a function in the base delegate to merge properties and extensions
1471
- return Promise.all([
1472
- this.fetchProperties(oMDCChart),
1473
- loadModules("sap/ui/mdc/odata/v4/ChartPropertyHelper")
1474
- ]).then(function (aResult) {
1475
- return Promise.all(aResult.concat(this.fetchPropertyExtensions(oMDCChart, aResult[0])));
1476
- }.bind(this)).then(function (aResult) {
1477
- var aProperties = aResult[0];
1478
- var PropertyHelper = aResult[1][0];
1479
- var mExtensions = aResult[2];
1480
- var iMatchingExtensions = 0;
1481
- var aPropertiesWithExtension = [];
1482
-
1483
- for (var i = 0; i < aProperties.length; i++) {
1484
- aPropertiesWithExtension.push(Object.assign({}, aProperties[i], {
1485
- extension: mExtensions[aProperties[i].name] || {}
1486
- }));
1487
-
1488
- if (aProperties[i].name in mExtensions) {
1489
- iMatchingExtensions++;
1490
- }
1491
- }
1569
+ ChartDelegate.getPropertyHelperClass = function () {
1570
+ return PropertyHelper;
1571
+ };
1492
1572
 
1493
- if (iMatchingExtensions !== Object.keys(mExtensions).length) {
1494
- throw new Error("At least one property extension does not point to an existing property");
1495
- }
1573
+ /**
1574
+ * This allows formatting for axis labels of the inner sap.chart.Chart.
1575
+ * Note: As the inner chart has no association to the propertyInfo, "this" will be bound to the propertyInfo object when calling this method
1576
+ * @param {string} sKey the key of the dimension
1577
+ * @param {string} SDesc the description provided by the metadata
1578
+ * @returns {string} the label which should be shown on the chart axis
1579
+ */
1580
+ ChartDelegate._formatText = function(sKey, SDesc) {
1581
+ return sKey;
1582
+ };
1496
1583
 
1497
- return new PropertyHelper(aPropertiesWithExtension, oMDCChart);
1584
+ /**
1585
+ * Defines a <code>noDataText</code>text for the inner chart.
1586
+ * @param {sap.ui.mdc.Chart} oMDCChart Reference to chart
1587
+ * @param {string} sText Text to show if no data is displayed in the chart
1588
+ */
1589
+ ChartDelegate.setNoDataText = function(oMDCChart, sText) {
1590
+ this._getChart(oMDCChart).setCustomMessages({
1591
+ 'NO_DATA': sText
1498
1592
  });
1499
1593
  };
1594
+
1500
1595
  /**
1501
1596
  * Returns the relevant propery infos based on the metadata used with the MDC Chart instance.
1502
1597
  *
@@ -1504,6 +1599,7 @@ sap.ui.define([
1504
1599
  * @returns {array} Array of the property infos to be used within MDC Chart
1505
1600
  */
1506
1601
  ChartDelegate.fetchProperties = function (oMDCChart) {
1602
+
1507
1603
  var oModel = this._getModel(oMDCChart);
1508
1604
  var pCreatePropertyInfos;
1509
1605
 
@@ -1513,10 +1609,10 @@ sap.ui.define([
1513
1609
  resolver: resolve
1514
1610
  }, onModelContextChange, this);
1515
1611
  }.bind(this)).then(function (oModel) {
1516
- return this._createPropertyInfos(oMDCChart, oModel);
1612
+ return this._createPropertyInfos(oMDCChart.getDelegate().payload, oModel);
1517
1613
  }.bind(this));
1518
1614
  } else {
1519
- pCreatePropertyInfos = this._createPropertyInfos(oMDCChart, oModel);
1615
+ pCreatePropertyInfos = this._createPropertyInfos(oMDCChart.getDelegate().payload, oModel);
1520
1616
  }
1521
1617
 
1522
1618
  return pCreatePropertyInfos.then(function (aProperties) {
@@ -1537,10 +1633,10 @@ sap.ui.define([
1537
1633
  }
1538
1634
  }
1539
1635
 
1540
- ChartDelegate._createPropertyInfos = function (oMDCChart, oModel) {
1541
- var oMetadataInfo = oMDCChart.getDelegate().payload;
1636
+ ChartDelegate._createPropertyInfos = function (oDelegatePayload, oModel) {
1637
+ //var oMetadataInfo = oMDCChart.getDelegate().payload;
1542
1638
  var aProperties = [];
1543
- var sEntitySetPath = "/" + oMetadataInfo.collectionName;
1639
+ var sEntitySetPath = "/" + oDelegatePayload.collectionName;
1544
1640
  var oMetaModel = oModel.getMetaModel();
1545
1641
 
1546
1642
  return Promise.all([
@@ -1574,7 +1670,7 @@ sap.ui.define([
1574
1670
  }
1575
1671
 
1576
1672
  if (oPropertyAnnotations["@Org.OData.Aggregation.V1.Aggregatable"]){
1577
- aProperties = aProperties.concat(this._createPropertyInfosForAggregatable(sKey, oPropertyAnnotations, oFilterRestrictionsInfo, oSortRestrictionsInfo));
1673
+ aProperties = aProperties.concat(this._createPropertyInfosForAggregatable(sKey, oPropertyAnnotations, oObj, oFilterRestrictionsInfo, oSortRestrictionsInfo));
1578
1674
  }
1579
1675
 
1580
1676
  if (oPropertyAnnotations["@Org.OData.Aggregation.V1.Groupable"]) {
@@ -1589,12 +1685,13 @@ sap.ui.define([
1589
1685
  aggregatable: false,
1590
1686
  maxConditions: ODataMetaModelUtil.isMultiValueFilterExpression(oFilterRestrictionsInfo.propertyInfo[sKey]) ? -1 : 1,
1591
1687
  sortKey: sKey,
1592
- kind: "Groupable", //TODO: Rename in type; Only needed for P13n Item Panel
1593
- availableRoles: this._getLayoutOptionsForType("groupable"), //for p13n
1688
+ dataType: oObj.$Type,
1689
+ //formatOptions: null,
1690
+ //constraints: {},
1594
1691
  role: MDCLib.ChartItemRoleType.category, //standard, normally this should be interpreted from UI.Chart annotation
1595
1692
  criticality: null ,//To be implemented by FE
1596
1693
  textProperty: oPropertyAnnotations["@com.sap.vocabularies.Common.v1.Text"] ? oPropertyAnnotations["@com.sap.vocabularies.Common.v1.Text"].$Path : null //To be implemented by FE
1597
- //textFormatter: function(){} -> can be used to provide a custom formatter for the textProperty
1694
+ //textFormatter: string-> can be used to provide a custom formatter for the textProperty
1598
1695
  });
1599
1696
  }
1600
1697
  }
@@ -1603,7 +1700,7 @@ sap.ui.define([
1603
1700
  }.bind(this));
1604
1701
  };
1605
1702
 
1606
- ChartDelegate._createPropertyInfosForAggregatable = function(sKey, oPropertyAnnotations, oFilterRestrictionsInfo, oSortRestrictionsInfo) {
1703
+ ChartDelegate._createPropertyInfosForAggregatable = function(sKey, oPropertyAnnotations, oObj, oFilterRestrictionsInfo, oSortRestrictionsInfo) {
1607
1704
  var aProperties = [];
1608
1705
 
1609
1706
  if (oPropertyAnnotations["@Org.OData.Aggregation.V1.SupportedAggregationMethods"]){
@@ -1618,13 +1715,10 @@ sap.ui.define([
1618
1715
  aggregatable: oPropertyAnnotations["@Org.OData.Aggregation.V1.Aggregatable"],
1619
1716
  aggregationMethod: sAggregationMethod,
1620
1717
  maxConditions: ODataMetaModelUtil.isMultiValueFilterExpression(oFilterRestrictionsInfo.propertyInfo[sKey]) ? -1 : 1,
1621
- sortKey: oPropertyAnnotations["@Org.OData.Aggregation.V1.RecommendedAggregationMethod"] + sKey,
1622
- kind: "Aggregatable",//Only needed for P13n Item Panel
1623
- availableRoles: this._getLayoutOptionsForType("aggregatable"), //for p13n
1624
- role: MDCLib.ChartItemRoleType.axis1,
1718
+ dataType: oObj.$Type,
1625
1719
  datapoint: null //To be implemented by FE
1626
1720
  });
1627
- }.bind(this));
1721
+ });
1628
1722
  }
1629
1723
 
1630
1724
  return aProperties;
@@ -1632,15 +1726,7 @@ sap.ui.define([
1632
1726
 
1633
1727
  //Gets internal property infos by excact property name
1634
1728
  ChartDelegate._getPropertyInfosByName = function(sName, oMDCChart){
1635
- return new Promise(function(resolve){
1636
- this.fetchProperties(oMDCChart).then(function(aProperties){
1637
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
1638
- return oCurrentPropertyInfo.name === sName;
1639
- });
1640
-
1641
- resolve(oPropertyInfo);
1642
- });
1643
- }.bind(this));
1729
+ return oMDCChart._getPropertyByNameAsync(sName);
1644
1730
  };
1645
1731
 
1646
1732