@openui5/sap.ui.mdc 1.97.1 → 1.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/.reuse/dep5 +25 -30
  2. package/THIRDPARTY.txt +15 -22
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +6 -3
  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 +1128 -1806
  9. package/src/sap/ui/mdc/ChartDelegate.js +454 -250
  10. package/src/sap/ui/mdc/ChartRenderer.js +73 -77
  11. package/src/sap/ui/mdc/Control.js +11 -6
  12. package/src/sap/ui/mdc/Element.js +10 -6
  13. package/src/sap/ui/mdc/Field.js +19 -4
  14. package/src/sap/ui/mdc/FilterBar.js +3 -2
  15. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  16. package/src/sap/ui/mdc/FilterField.js +50 -9
  17. package/src/sap/ui/mdc/Link.js +25 -6
  18. package/src/sap/ui/mdc/LinkDelegate.js +3 -3
  19. package/src/sap/ui/mdc/MultiValueField.js +30 -6
  20. package/src/sap/ui/mdc/Table.js +151 -102
  21. package/src/sap/ui/mdc/TableDelegate.js +68 -13
  22. package/src/sap/ui/mdc/ValueHelp.js +26 -11
  23. package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
  24. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  25. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  26. package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
  27. package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +60 -17
  28. package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
  29. package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +10 -10
  30. package/src/sap/ui/mdc/chart/DrillStackHandler.js +43 -254
  31. package/src/sap/ui/mdc/chart/Item.js +62 -92
  32. package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
  33. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
  34. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  35. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  36. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  37. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  38. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +388 -67
  39. package/src/sap/ui/mdc/condition/Operator.js +4 -2
  40. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
  41. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  42. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  43. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  44. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +83 -5
  45. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +81 -5
  46. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
  47. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  48. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +35 -8
  49. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  50. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  51. package/src/sap/ui/mdc/field/ConditionType.js +17 -6
  52. package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
  53. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  54. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  55. package/src/sap/ui/mdc/field/DefineConditionPanel.js +88 -29
  56. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +77 -20
  57. package/src/sap/ui/mdc/field/FieldBase.js +93 -16
  58. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
  60. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  61. package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
  62. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  65. package/src/sap/ui/mdc/field/FieldValueHelp.js +5 -2
  66. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  67. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  68. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
  69. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
  70. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
  71. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
  72. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  73. package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
  74. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  75. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  76. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  77. package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
  78. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  79. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  80. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  81. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  82. package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
  83. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  84. package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
  85. package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
  86. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  87. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +285 -208
  88. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  89. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  90. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +132 -56
  91. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  92. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  93. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  94. package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
  95. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +43 -19
  96. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  97. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
  98. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  99. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
  100. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  101. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
  102. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
  103. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
  104. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  105. package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
  106. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  107. package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
  108. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +27 -0
  109. package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
  110. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
  111. package/src/sap/ui/mdc/library.js +54 -44
  112. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  113. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  114. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  115. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  116. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  117. package/src/sap/ui/mdc/link/Factory.js +2 -2
  118. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  119. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  120. package/src/sap/ui/mdc/link/Log.js +1 -1
  121. package/src/sap/ui/mdc/link/Panel.js +140 -177
  122. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  123. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  124. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  125. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  126. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  127. package/src/sap/ui/mdc/messagebundle.properties +57 -2
  128. package/src/sap/ui/mdc/messagebundle_ar.properties +39 -4
  129. package/src/sap/ui/mdc/messagebundle_bg.properties +54 -19
  130. package/src/sap/ui/mdc/messagebundle_ca.properties +37 -2
  131. package/src/sap/ui/mdc/messagebundle_cs.properties +52 -17
  132. package/src/sap/ui/mdc/messagebundle_cy.properties +37 -2
  133. package/src/sap/ui/mdc/messagebundle_da.properties +44 -9
  134. package/src/sap/ui/mdc/messagebundle_de.properties +37 -2
  135. package/src/sap/ui/mdc/messagebundle_el.properties +38 -3
  136. package/src/sap/ui/mdc/messagebundle_en.properties +37 -2
  137. package/src/sap/ui/mdc/messagebundle_en_GB.properties +37 -2
  138. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +37 -2
  139. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +61 -4
  140. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +37 -2
  141. package/src/sap/ui/mdc/messagebundle_es.properties +37 -2
  142. package/src/sap/ui/mdc/messagebundle_es_MX.properties +51 -16
  143. package/src/sap/ui/mdc/messagebundle_et.properties +37 -2
  144. package/src/sap/ui/mdc/messagebundle_fi.properties +43 -8
  145. package/src/sap/ui/mdc/messagebundle_fr.properties +38 -3
  146. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +37 -2
  147. package/src/sap/ui/mdc/messagebundle_hi.properties +38 -3
  148. package/src/sap/ui/mdc/messagebundle_hr.properties +37 -2
  149. package/src/sap/ui/mdc/messagebundle_hu.properties +37 -2
  150. package/src/sap/ui/mdc/messagebundle_id.properties +37 -2
  151. package/src/sap/ui/mdc/messagebundle_it.properties +53 -18
  152. package/src/sap/ui/mdc/messagebundle_iw.properties +38 -3
  153. package/src/sap/ui/mdc/messagebundle_ja.properties +37 -2
  154. package/src/sap/ui/mdc/messagebundle_kk.properties +37 -2
  155. package/src/sap/ui/mdc/messagebundle_ko.properties +41 -6
  156. package/src/sap/ui/mdc/messagebundle_lt.properties +37 -2
  157. package/src/sap/ui/mdc/messagebundle_lv.properties +41 -6
  158. package/src/sap/ui/mdc/messagebundle_ms.properties +37 -2
  159. package/src/sap/ui/mdc/messagebundle_nl.properties +42 -7
  160. package/src/sap/ui/mdc/messagebundle_no.properties +45 -10
  161. package/src/sap/ui/mdc/messagebundle_pl.properties +38 -3
  162. package/src/sap/ui/mdc/messagebundle_pt.properties +44 -9
  163. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +37 -2
  164. package/src/sap/ui/mdc/messagebundle_ro.properties +37 -2
  165. package/src/sap/ui/mdc/messagebundle_ru.properties +37 -2
  166. package/src/sap/ui/mdc/messagebundle_sh.properties +37 -2
  167. package/src/sap/ui/mdc/messagebundle_sk.properties +37 -2
  168. package/src/sap/ui/mdc/messagebundle_sl.properties +37 -2
  169. package/src/sap/ui/mdc/messagebundle_sv.properties +39 -4
  170. package/src/sap/ui/mdc/messagebundle_th.properties +40 -5
  171. package/src/sap/ui/mdc/messagebundle_tr.properties +37 -2
  172. package/src/sap/ui/mdc/messagebundle_uk.properties +41 -6
  173. package/src/sap/ui/mdc/messagebundle_vi.properties +37 -2
  174. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +37 -2
  175. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +37 -2
  176. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +30 -15
  177. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -142
  178. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +14 -17
  179. package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
  180. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
  181. package/src/sap/ui/mdc/odata/TypeUtil.js +2 -2
  182. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
  183. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +106 -0
  184. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  185. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  186. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +117 -123
  187. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +3 -5
  188. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
  189. package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
  190. package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +459 -351
  191. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  192. package/src/sap/ui/mdc/p13n/Engine.js +51 -30
  193. package/src/sap/ui/mdc/p13n/FlexUtil.js +6 -118
  194. package/src/sap/ui/mdc/p13n/P13nBuilder.js +7 -7
  195. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  196. package/src/sap/ui/mdc/p13n/StateUtil.js +24 -6
  197. package/src/sap/ui/mdc/p13n/UIManager.js +20 -19
  198. package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
  199. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +19 -12
  200. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
  201. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  202. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  203. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1094 -49
  204. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
  205. package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
  206. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +108 -0
  207. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  208. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +7 -7
  209. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
  210. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
  211. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
  212. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +22 -11
  213. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +174 -0
  214. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +12 -19
  215. package/src/sap/ui/mdc/table/Column.js +12 -12
  216. package/src/sap/ui/mdc/table/CreationRow.js +11 -11
  217. package/src/sap/ui/mdc/table/GridTableType.js +80 -33
  218. package/src/sap/ui/mdc/table/PropertyHelper.js +63 -19
  219. package/src/sap/ui/mdc/table/ResponsiveTableType.js +94 -23
  220. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  221. package/src/sap/ui/mdc/table/RowSettings.js +45 -4
  222. package/src/sap/ui/mdc/table/TableTypeBase.js +2 -2
  223. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  224. package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
  225. package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
  226. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  227. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  228. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +16 -4
  229. package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
  230. package/src/sap/ui/mdc/util/Common.js +1 -1
  231. package/src/sap/ui/mdc/util/DateUtil.js +33 -8
  232. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  233. package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
  234. package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
  235. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  236. package/src/sap/ui/mdc/util/PropertyHelper.js +243 -87
  237. package/src/sap/ui/mdc/util/TypeUtil.js +6 -5
  238. package/src/sap/ui/mdc/valuehelp/Dialog.js +11 -8
  239. package/src/sap/ui/mdc/valuehelp/Popover.js +6 -3
  240. package/src/sap/ui/mdc/valuehelp/base/Container.js +2 -1
  241. package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -1
  242. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
  243. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +5 -4
  244. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
  245. package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
  246. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -2
  247. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +23 -14
  248. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +46 -17
  249. package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -27
  250. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
  251. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
  252. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
  253. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
  254. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
  255. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
  256. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
  257. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +291 -0
  258. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
  259. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
  260. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
  261. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
  262. package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
  263. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
  264. package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
  265. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +264 -139
  266. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
  267. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  268. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  269. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  270. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  271. package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
  272. package/src/sap/ui/mdc/ChartNew.js +0 -1114
  273. package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
  274. package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
  275. package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
  276. package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
  277. package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
  278. package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
  279. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
  280. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
  281. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
  282. package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
  283. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
  284. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  285. package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
  286. package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
  287. package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
  288. package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
  289. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +0 -39
  290. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  291. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1179
  292. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -404
  293. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  294. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  295. package/src/sap/ui/mdc/ui/Container.js +0 -240
  296. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -5,27 +5,34 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "../ChartDelegateNew",
8
+ "../ChartDelegate",
9
9
  "../../../util/loadModules",
10
10
  "sap/ui/core/Core",
11
+ "sap/m/library",
11
12
  "sap/m/Text",
12
13
  "sap/ui/mdc/library",
13
14
  "sap/ui/mdc/odata/v4/ODataMetaModelUtil",
14
15
  "sap/base/Log",
15
16
  'sap/ui/mdc/util/FilterUtil',
16
17
  'sap/ui/mdc/odata/v4/util/DelegateUtil',
17
- "sap/ui/mdc/chartNew/ChartTypeButtonNew",
18
- "sap/ui/mdc/chartNew/ItemNew",
18
+ "sap/ui/mdc/chart/ChartTypeButton",
19
+ "sap/ui/mdc/chart/Item",
19
20
  "sap/ui/model/Sorter",
20
21
  "sap/m/VBox",
21
22
  "sap/ui/base/ManagedObjectObserver",
22
23
  "sap/ui/core/ResizeHandler",
23
- "sap/ui/mdc/p13n/panels/ChartItemPanelNew",
24
- "sap/m/MessageStrip"
24
+ "sap/ui/mdc/p13n/panels/ChartItemPanel",
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"
25
31
  ], function (
26
32
  V4ChartDelegate,
27
33
  loadModules,
28
34
  Core,
35
+ mobileLibrary,
29
36
  Text,
30
37
  MDCLib,
31
38
  ODataMetaModelUtil,
@@ -39,21 +46,28 @@ sap.ui.define([
39
46
  ManagedObjectObserver,
40
47
  ResizeHandler,
41
48
  ChartItemPanel,
42
- MessageStrip
49
+ MessageStrip,
50
+ V4TypeUtil,
51
+ V4FilterBarDelegate,
52
+ Filter,
53
+ PropertyHelper,
54
+ jQuery
43
55
  ) {
44
56
  "use strict";
45
57
  /**
46
- * Delegate class for sap.ui.mdc.ChartNew and ODataV4.
58
+ * Delegate class for sap.ui.mdc.Chart and ODataV4.
47
59
  * Enables additional analytical capabilities.
48
60
  * <b>Note:</b> The class is experimental and the API/behavior is not finalized.
49
61
  *
50
62
  * @author SAP SE
51
63
  * @private
52
64
  * @since 1.88
53
- * @alias sap.ui.mdc.odata.v4.vizChart.ChartDelegateNew
65
+ * @alias sap.ui.mdc.odata.v4.vizChart.ChartDelegate
54
66
  */
55
67
  var ChartDelegate = Object.assign({}, V4ChartDelegate);
56
68
 
69
+ var FlexJustifyContent = mobileLibrary.FlexJustifyContent;
70
+ var FlexAlignItems = mobileLibrary.FlexAlignItems;
57
71
 
58
72
  var mStateMap = new window.WeakMap();
59
73
  //var ChartLibrary;
@@ -78,6 +92,44 @@ sap.ui.define([
78
92
  mStateMap.set(oMDCChart, oState);
79
93
  };
80
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
+
81
133
  ChartDelegate._deleteState = function(oMDCChart) {
82
134
 
83
135
  if (this._getState(oMDCChart).vizTooltip) {
@@ -172,36 +224,6 @@ sap.ui.define([
172
224
  * ...
173
225
  */
174
226
 
175
- /**
176
- * Provides the table's filter delegate that provides basic filter functionality such as adding filter fields.
177
- * <b>Note:</b> The functionality provided in this delegate should act as a subset of a FilterBarDelegate
178
- * to enable the table for inbuilt filtering.
179
- *
180
- * @example <caption>Example usage of <code>getFilterDelegate</code></caption>
181
- * oFilterDelegate = {
182
- * addItem: function() {
183
- * var oFilterFieldPromise = new Promise(...);
184
- * return oFilterFieldPromise;
185
- * }
186
- * }
187
- * @returns {Object} Object for the chart filter personalization
188
- * @public
189
- */
190
- ChartDelegate.getFilterDelegate = function () {
191
- return {
192
- /**
193
- *
194
- * @param {String} sPropertyName The property name
195
- * @param {Object} oMDCChart Instance of the chart TODO: Which one? MDC or inner?
196
- *
197
- * @returns {Promise} Promise that resolves with an instance of a <code>sap.ui.mdc.FilterField</code>.
198
- * For more information, see {@link sap.ui.mdc.AggregationBaseDelegate#addItem AggregationBaseDelegate}.
199
- */
200
- addItem: function (sPropertyName, oMDCChart) {
201
- return Promise.resolve(null);
202
- }
203
- };
204
- };
205
227
 
206
228
  ChartDelegate.exit = function(oMDCChart) {
207
229
  if (this._getInnerStructure(oMDCChart)){
@@ -225,7 +247,7 @@ sap.ui.define([
225
247
 
226
248
  /**
227
249
  * Gets the current zooming information for the inner chart
228
- * @returns {integer} Current zoom level on the inner chart
250
+ * @returns {int} Current zoom level on the inner chart
229
251
  */
230
252
  ChartDelegate.getZoomState = function (oMDCChart) {
231
253
 
@@ -308,6 +330,10 @@ sap.ui.define([
308
330
 
309
331
  ChartDelegate.getAdaptionUI = function(oMDCChart) {
310
332
 
333
+ return Promise.resolve(this._setupAdaptionUI(oMDCChart));
334
+ };
335
+
336
+ ChartDelegate._setupAdaptionUI = function(oMDCChart) {
311
337
  var oLayoutConfig = this.getChartTypeLayoutConfig().find(function(it){return it.key === oMDCChart.getChartType();});
312
338
 
313
339
  //Default case -> everything allowed
@@ -334,13 +360,14 @@ sap.ui.define([
334
360
  oPanel.setMessageStrip(new MessageStrip({text: MDCRb.getText("chart.PERSONALIZATION_DIALOG_MEASURE_WARNING"), type:"Warning"}));
335
361
  }
336
362
 
337
- return Promise.resolve(oPanel);
363
+ return oPanel;
338
364
  };
339
365
 
340
366
  /**
341
367
  * Sets the visibility of the legend
342
368
  * This is called by the MDC Chart, do not call it directly!
343
- * @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
344
371
  *
345
372
  * @experimental
346
373
  * @private
@@ -363,7 +390,7 @@ sap.ui.define([
363
390
 
364
391
  /**
365
392
  * Creates a Sorter for given Property
366
- * @param {sap.ui.mdc.ChartNew.ItemNew} oMDCItem the MDC Item to create a Sorter for
393
+ * @param {sap.ui.mdc.Chart.Item} oMDCItem the MDC Item to create a Sorter for
367
394
  * @param {object} oSortProperty the sorting information
368
395
  */
369
396
  ChartDelegate.getSorterForItem = function (oMDCItem, oSortProperty) {
@@ -374,7 +401,7 @@ sap.ui.define([
374
401
  if (oMDCItem.getType() === "aggregatable") {
375
402
  return new Sorter(this._getAggregatedMeasureNameForMDCItem(oMDCItem), oSortProperty.descending);
376
403
  } else if (oMDCItem.getType() === "groupable") {
377
- return new Sorter(oSortProperty.name, oSortProperty.descending);
404
+ return new Sorter(this.getInternalChartNameFromPropertyNameAndKind(oSortProperty.name, "groupable", oMDCItem.getParent()), oSortProperty.descending);
378
405
  }
379
406
 
380
407
  };
@@ -382,14 +409,16 @@ sap.ui.define([
382
409
  /**
383
410
  * Inserts an MDC Chart Item (in case of sap.chart.Chart a Measure/Dimension) on the inner chart
384
411
  * This function is called by MDC Chart on a change of the <code>Items</code> aggregation
385
- * @param {sap.ui.mdc.chartNew-ItemNew} 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
386
414
  * @param {int} iIndex the index to insert into
387
415
  */
388
416
  ChartDelegate.insertItemToInnerChart = function (oMDCChart, oMDCChartItem, iIndex) {
389
417
  //TODO: Create Measures/Dimension only when required?
390
418
  if (oMDCChartItem.getType() === "groupable") {
391
419
 
392
- var oDim = this._getChart(oMDCChart).getDimensionByName(oMDCChartItem.getName());
420
+ var sInnerDimName = this.getInternalChartNameFromPropertyNameAndKind(oMDCChartItem.getName(), "groupable", oMDCChart);
421
+ var oDim = this._getChart(oMDCChart).getDimensionByName(sInnerDimName);
393
422
 
394
423
  if (!oDim) {
395
424
  this.createInnerDimension(oMDCChart, oMDCChartItem);
@@ -400,7 +429,7 @@ sap.ui.define([
400
429
  }
401
430
 
402
431
  var aVisibleDimension = this._getChart(oMDCChart).getVisibleDimensions();
403
- aVisibleDimension.splice(iIndex, 0, oMDCChartItem.getName()); //Insert Item without deleting existing dimension
432
+ aVisibleDimension.splice(iIndex, 0, sInnerDimName); //Insert Item without deleting existing dimension
404
433
  this._getChart(oMDCChart).setVisibleDimensions(aVisibleDimension);
405
434
 
406
435
  } else if (oMDCChartItem.getType() === "aggregatable") {
@@ -415,24 +444,26 @@ sap.ui.define([
415
444
  this._updateColoring(oMDCChart, this._getChart(oMDCChart).getVisibleDimensions(), this._getChart(oMDCChart).getVisibleMeasures());
416
445
  }.bind(this));
417
446
 
418
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
419
- this._updateSemanticalPattern(oMDCChart, aProperties);
420
- }.bind(this));
447
+ this._updateSemanticalPattern(oMDCChart);
448
+
421
449
  };
422
450
 
423
451
  /**
424
452
  * Removes an Item (in case of sap.chart.Chart a Measure/Dimension) from the inner chart
425
453
  * This function is called by MDC Chart on a change of the <code>Items</code> aggregation
426
- * @param {sap.ui.mdc.chartNew.ItemNew} oMDCChartItem The Item to remove from the inner chart
454
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to remove the item from
455
+ * @param {sap.ui.mdc.chart.Item} oMDCChartItem The Item to remove from the inner chart
427
456
  */
428
457
  ChartDelegate.removeItemFromInnerChart = function (oMDCChart, oMDCChartItem) {
429
- if (oMDCChartItem.getType() === "groupable" && this._getChart(oMDCChart).getVisibleDimensions().includes(oMDCChartItem.getName())) {
458
+ if (oMDCChartItem.getType() === "groupable" && this._getChart(oMDCChart).getVisibleDimensions().includes(this.getInternalChartNameFromPropertyNameAndKind(oMDCChartItem.getName(), "groupable", oMDCChart))) {
459
+ var sInnerDimName = this.getInternalChartNameFromPropertyNameAndKind(oMDCChartItem.getName(), "groupable", oMDCChart);
460
+
430
461
  var aNewVisibleDimensions = this._getChart(oMDCChart).getVisibleDimensions().filter(function (e) {
431
- return e !== oMDCChartItem.getName();
462
+ return e !== sInnerDimName;
432
463
  });
433
464
 
434
- if (oMDCChart.getDelegate().inResultDimensions && oMDCChart.getDelegate().inResultDimensions instanceof Array) {
435
- this._getChart(oMDCChart).setInResultDimensions(oMDCChart.getDelegate().inResultDimensions);
465
+ if (this._getState(oMDCChart).inResultDimensions.length > 0) {
466
+ this._getChart(oMDCChart).setInResultDimensions(this._getState(oMDCChart).inResultDimensions);
436
467
  }
437
468
 
438
469
  this._getChart(oMDCChart).setVisibleDimensions(aNewVisibleDimensions);
@@ -450,9 +481,8 @@ sap.ui.define([
450
481
 
451
482
  //Update coloring and semantical patterns on Item change
452
483
  this._updateColoring(oMDCChart, this._getChart(oMDCChart).getVisibleDimensions(), this._getChart(oMDCChart).getVisibleMeasures());
453
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
454
- this._updateSemanticalPattern(oMDCChart, aProperties);
455
- }.bind(this));
484
+
485
+ this._updateSemanticalPattern(oMDCChart);
456
486
  };
457
487
 
458
488
  /**
@@ -460,34 +490,71 @@ sap.ui.define([
460
490
  * (Does NOT add the MDC CHart Item to the Item aggregation of the MDC Chart)
461
491
  * Called by p13n
462
492
  * @param {string} sPropertyName the name of the property added
463
- * @param {sap.ui.mdc.ChartNew} oMDCChart reference to the MDC Chart to add the property to
493
+ * @param {sap.ui.mdc.Chart} oMDCChart reference to the MDC Chart to add the property to
464
494
  * @returns {Promise} Promise that resolves with new MDC Chart Item as parameter
465
495
  */
466
496
  ChartDelegate.addItem = function (sPropertyName, oMDCChart, mPropertyBag, sRole) {
467
497
  if (oMDCChart.getModel) {
468
498
  return Promise.resolve(this._createMDCChartItem(sPropertyName, oMDCChart, sRole));
469
499
  }
470
- return Promise.resolve(null);
471
500
  };
472
501
 
473
502
  ChartDelegate.removeItem = function (oProperty, oMDCChart) {
474
503
  return Promise.resolve(true);
475
504
  };
476
505
 
477
- ChartDelegate._createMDCChartItem = function (sPropertyName, oMDCChart, sRole) {
478
- return this.fetchProperties(oMDCChart).then(function (aProperties) {
479
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
480
- return oCurrentPropertyInfo.name === sPropertyName;
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));
533
+
534
+ Promise.all(aPropPromises).then(function(){
535
+ resolve();
481
536
  });
537
+ }.bind(this));
482
538
 
539
+ };
540
+
541
+ ChartDelegate._createMDCChartItem = function (sPropertyName, oMDCChart, sRole) {
542
+
543
+ return this._getPropertyInfosByName(sPropertyName, oMDCChart).then(function(oPropertyInfo){
483
544
  if (!oPropertyInfo) {
484
545
  return null;
485
546
  }
486
547
 
548
+ return this._createMDCItemFromProperty(oPropertyInfo, oMDCChart.getId(), sRole);
549
+
550
+ }.bind(this));
551
+
552
+ };
553
+
554
+ ChartDelegate._createMDCItemFromProperty = function(oPropertyInfo, idPrefix, sRole) {
487
555
 
488
- //TODO: Check for case: both aggegatable and groupable
489
556
  if (oPropertyInfo.groupable) {
490
- return new MDCChartItem(oMDCChart.getId() + "--GroupableItem--" + oPropertyInfo.name, {
557
+ return new MDCChartItem(idPrefix + "--GroupableItem--" + oPropertyInfo.name, {
491
558
  name: oPropertyInfo.name,
492
559
  label: oPropertyInfo.label,
493
560
  type: "groupable",
@@ -497,14 +564,15 @@ sap.ui.define([
497
564
 
498
565
  if (oPropertyInfo.aggregatable) {
499
566
 
500
- return new MDCChartItem(oMDCChart.getId() + "--AggregatableItem--" + oPropertyInfo.name, {
567
+ return new MDCChartItem(idPrefix + "--AggregatableItem--" + oPropertyInfo.name, {
501
568
  name: oPropertyInfo.name,
502
569
  label: oPropertyInfo.label,
503
570
  type: "aggregatable",
504
571
  role: sRole ? sRole : "axis1"
505
572
  });
506
573
  }
507
- });
574
+
575
+ return null;
508
576
  };
509
577
 
510
578
  /**
@@ -520,10 +588,12 @@ sap.ui.define([
520
588
 
521
589
  this._loadChart().then(function (aModules) {
522
590
 
591
+ var sVBoxHeight = this._calculateInnerChartHeight(oMDCChart);
592
+
523
593
  this._setInnerStructure(oMDCChart, new VBox({
524
594
  justifyContent: "Center",
525
595
  alignItems: "Center",
526
- height: "100%",
596
+ height: sVBoxHeight,
527
597
  width: "100%"
528
598
  }));
529
599
  var oText = new Text();
@@ -540,117 +610,128 @@ sap.ui.define([
540
610
 
541
611
  /**
542
612
  * Creates initial content for the chart, while metadata has not been retrieved yet
543
- * @param {sap.ui.mdc.chartNew} oMDCChart the MDC Chart
613
+ * @param {sap.ui.mdc.chart} oMDCChart the MDC Chart
544
614
  */
545
615
  ChartDelegate.createInitialChartContent = function(oMDCChart) {
546
616
  //Not relevant for sap.chart.Chart
547
617
  };
548
618
 
549
619
  ChartDelegate._createContentFromItems = function (oMDCChart) {
550
- //This is done so the user doesn't have to specify property path & aggregation method in the XML
551
- 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
552
622
  var aColorPromises = [];
623
+ var aPropPromises = [];
553
624
 
554
625
  var aVisibleDimensions = [];
555
626
  var aVisibleMeasures = [];
556
627
  oMDCChart.getItems().forEach(function (oItem, iIndex) {
557
628
 
558
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
559
- return oCurrentPropertyInfo.name === oItem.getName();
560
- });
629
+ //Uses excact mdc chart item id
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
+ }
561
636
 
562
- //Skip a Item if there is no property representing the Item inside the backend
563
- if (!oPropertyInfo){
564
- 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!");
565
- return;
566
- }
637
+ switch (oItem.getType()) {
638
+ case "groupable":
639
+ aVisibleDimensions.push(this.getInternalChartNameFromPropertyNameAndKind(oItem.getName(), "groupable", oMDCChart));
567
640
 
568
- switch (oItem.getType()) {
569
- case "groupable":
570
- aVisibleDimensions.push(oItem.getName());
571
- this._addInnerDimension(oMDCChart, oItem, oPropertyInfo);
572
- break;
573
- case "aggregatable":
641
+ this._addInnerDimension(oMDCChart, oItem, oPropertyInfo);
642
+ break;
643
+ case "aggregatable":
574
644
 
575
- //TODO: Alias might be changing after backend request
576
- aVisibleMeasures.push(this._getAggregatedMeasureNameForMDCItem(oItem));
645
+ //TODO: Alias might be changing after backend request
646
+ aVisibleMeasures.push(this._getAggregatedMeasureNameForMDCItem(oItem));
577
647
 
578
- this._addInnerMeasure(oMDCChart, oItem, oPropertyInfo);
579
- break;
648
+ this._addInnerMeasure(oMDCChart, oItem, oPropertyInfo);
649
+ break;
580
650
 
581
- default:
582
- Log.error("MDC Chart Item " + oItem.getId() + " with label " + oItem.getLabel() + " has no known type. Supported typed are: \"groupable\" & \"aggregatable\"");
583
- }
651
+ default:
652
+ Log.error("MDC Chart Item " + oItem.getId() + " with label " + oItem.getLabel() + " has no known type. Supported typed are: \"groupable\" & \"aggregatable\"");
653
+ }
654
+
655
+ aColorPromises.push(this._prepareColoringForItem(oItem));
656
+ }.bind(this)));
584
657
 
585
- aColorPromises.push(this._prepareColoringForItem(oItem));
586
658
  }.bind(this));
587
659
 
588
- this._getState(oMDCChart).aColMeasures.forEach(function(sKey) {
660
+ Promise.all(aPropPromises).then(function(){
661
+ this._getState(oMDCChart).aColMeasures.forEach(function(sKey) {
589
662
 
590
- if (this._getState(oMDCChart).aInSettings.indexOf(sKey) == -1) {
663
+ if (this._getState(oMDCChart).aInSettings.indexOf(sKey) == -1) {
591
664
 
592
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
593
- return oCurrentPropertyInfo.name === sKey;
594
- });
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);
595
670
 
596
- var aggregationMethod = oPropertyInfo.aggregationMethod;
597
- var propertyPath = oPropertyInfo.propertyPath;
671
+ var oMeasureSettings = {
672
+ name: sName,
673
+ label: oPropertyInfo.label,
674
+ role: "axis1"
675
+ };
598
676
 
599
- var oMeasureSettings = {
600
- name: sKey,
601
- label: oPropertyInfo.label,
602
- role: "axis1"
603
- };
677
+ if (aggregationMethod && propertyPath) {
678
+ oMeasureSettings.analyticalInfo = {
679
+ propertyPath: propertyPath,
680
+ "with": aggregationMethod
681
+ };
682
+ }
604
683
 
605
- if (aggregationMethod && propertyPath) {
606
- oMeasureSettings.analyticalInfo = {
607
- propertyPath: propertyPath,
608
- "with": aggregationMethod
609
- };
684
+ var oMeasure = new Measure(oMeasureSettings);
685
+
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
690
+
691
+ }));
610
692
  }
611
693
 
612
- var oMeasure = new Measure(oMeasureSettings);
694
+ }.bind(this));
613
695
 
614
- aVisibleMeasures.push(oMeasure);
615
- this._getChart(oMDCChart).addMeasure(oMeasure);
616
- }
696
+ Promise.all(aColorPromises).then(function(){
697
+ this._getChart(oMDCChart).setVisibleDimensions(aVisibleDimensions);
698
+ this._getChart(oMDCChart).setVisibleMeasures(aVisibleMeasures);
617
699
 
618
- }.bind(this));
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) {
619
702
 
620
- Promise.all(aColorPromises).then(function(){
621
- this._getChart(oMDCChart).setVisibleDimensions(aVisibleDimensions);
622
- this._getChart(oMDCChart).setVisibleMeasures(aVisibleMeasures);
703
+ var aInResultPromises = [];
623
704
 
624
- var aInResultDimensions = oMDCChart.getDelegate().inResultDimensions;
625
- if (aInResultDimensions && aInResultDimensions instanceof Array && aInResultDimensions.length != 0) {
705
+ aInResultDimensions.forEach(function(sInResultDim){
626
706
 
627
- var aInResultPromises = [];
707
+ aInResultPromises.push(this._getPropertyInfosByName(sInResultDim, oMDCChart).then(function(oPropertyInfos){
708
+ var sName = this.getInternalChartNameFromPropertyNameAndKind(oPropertyInfos.name, "groupable", oMDCChart);
628
709
 
629
- aInResultDimensions.forEach(function(sInResultDim){
710
+ var oDim = new Dimension({
711
+ name: sName,
712
+ label: oPropertyInfos.label
713
+ });
630
714
 
631
- aInResultPromises.push(this._getPropertyInfosByName(sInResultDim, oMDCChart).then(function(oPropertyInfos){
632
- var oDim = new Dimension({
633
- name: oPropertyInfos.name,
634
- label: oPropertyInfos.label
635
- });
715
+ this._getState(oMDCChart).inResultDimensions.push(sName);
716
+ this._getChart(oMDCChart).addDimension(oDim);
717
+ }.bind(this)));
636
718
 
637
- this._getChart(oMDCChart).addDimension(oDim);
638
- }.bind(this)));
719
+ }.bind(this));
639
720
 
640
- }.bind(this));
721
+ Promise.all(aInResultPromises).then(function(){
722
+ this._getChart(oMDCChart).setInResultDimensions(this._getState(oMDCChart).inResultDimensions);
723
+ }.bind(this));
641
724
 
642
- Promise.all(aInResultPromises).then(function(){
643
- this._getChart(oMDCChart).setInResultDimensions(oMDCChart.getDelegate().inResultDimensions);
644
- }.bind(this));
725
+ }
645
726
 
646
- }
727
+ this._updateColoring(oMDCChart, aVisibleDimensions, aVisibleMeasures);
728
+ this._updateSemanticalPattern(oMDCChart);
647
729
 
648
- this._updateColoring(oMDCChart, aVisibleDimensions, aVisibleMeasures);
649
- this._updateSemanticalPattern(oMDCChart, aProperties);
730
+ resolve();
731
+ }.bind(this));
650
732
  }.bind(this));
651
733
 
652
734
  }.bind(this));
653
-
654
735
  };
655
736
 
656
737
  ChartDelegate.getInnerChart = function (oMDCChart) {
@@ -665,6 +746,7 @@ sap.ui.define([
665
746
 
666
747
  if (oItem.getType === "aggregatable") {
667
748
 
749
+ //Uses excact MDC CHart Item name
668
750
  this._getPropertyInfosByName(oItem.getName(), oItem.getParent()).then(function (oPropertyInfo) {
669
751
  for (var j = 0; j < this._getAdditionalColoringMeasuresForItem(oPropertyInfo); j++) {
670
752
 
@@ -702,6 +784,7 @@ sap.ui.define([
702
784
  */
703
785
  ChartDelegate._addCriticality = function (oItem) {
704
786
 
787
+ //Uses excact MDC Chart item name to idenfiy property
705
788
  return this._getPropertyInfosByName(oItem.getName(), oItem.getParent()).then(function (oPropertyInfo) {
706
789
 
707
790
  if (oPropertyInfo.criticality || (oPropertyInfo.datapoint && oPropertyInfo.datapoint.criticality)){
@@ -725,7 +808,8 @@ sap.ui.define([
725
808
  };
726
809
  }
727
810
 
728
- oColorings.Criticality.DimensionValues[oItem.getName()] = mChartCrit;
811
+ var sDimName = this.getInternalChartNameFromPropertyNameAndKind(oItem.getName(), "groupable", oItem.getParent());
812
+ oColorings.Criticality.DimensionValues[sDimName] = mChartCrit;
729
813
 
730
814
  } else {
731
815
  var mCrit = oPropertyInfo.datapoint && oPropertyInfo.datapoint.criticality ? oPropertyInfo.datapoint.criticality : [];
@@ -734,7 +818,8 @@ sap.ui.define([
734
818
  mChartCrit[sKey] = mCrit[sKey];
735
819
  }
736
820
 
737
- oColorings.Criticality.MeasureValues[oItem.getName()] = mChartCrit;
821
+ var sMeasureName = this.getInternalChartNameFromPropertyNameAndKind(oItem.getName(), "aggregatable", oItem.getParent());
822
+ oColorings.Criticality.MeasureValues[sMeasureName] = mChartCrit;
738
823
  }
739
824
 
740
825
  var oState = this._getState(oItem.getParent());
@@ -749,7 +834,7 @@ sap.ui.define([
749
834
 
750
835
  /**
751
836
  * Updates the coloring on the inner chart
752
- * @param {sap.chart.Chart} oChart inner chart
837
+ * @param {sap.chart.Chart} oMDCChart inner chart
753
838
  * @param {array} aVisibleDimensions visible dimensions for inner chart
754
839
  * @param {array} aVisibleMeasures visible measures for inner chart
755
840
  *
@@ -807,23 +892,20 @@ sap.ui.define([
807
892
  /**
808
893
  * Updates the semantical pattern for given measures
809
894
  *
810
- * @param {sap.chart.Chart} oChart the inner chart
811
- * @param {array} aVisibleMeasures array containing the visible measures on the inner chart
812
- * @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?
813
897
  *
814
898
  * @experimental
815
899
  * @private
816
900
  * @ui5-restricted Fiori Elements, sap.ui.mdc
817
901
  */
818
- ChartDelegate._updateSemanticalPattern = function (oMDCChart, aProperties) {
902
+ ChartDelegate._updateSemanticalPattern = function (oMDCChart) {
819
903
 
820
904
  var aVisibleMeasures = this._getChart(oMDCChart).getVisibleMeasures();
821
905
 
822
906
  aVisibleMeasures.forEach(function(sVisibleMeasureName){
823
907
  //first draft only with semantic pattern
824
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
825
- return oCurrentPropertyInfo.name === sVisibleMeasureName;
826
- });
908
+ var oPropertyInfo = this.getPropertyFromNameAndKind(sVisibleMeasureName, "aggregatable", oMDCChart);
827
909
 
828
910
  if (!oPropertyInfo){
829
911
  return;
@@ -942,7 +1024,23 @@ sap.ui.define([
942
1024
  */
943
1025
  ChartDelegate.getDrillStack = function (oMDCChart) {
944
1026
  //TODO: Generify the return values here for other chart frameworks
945
- return this._getChart(oMDCChart).getDrillStack();
1027
+ var aDrillStack = [];
1028
+ aDrillStack = Object.assign(aDrillStack, this._getChart(oMDCChart).getDrillStack());
1029
+
1030
+ aDrillStack.forEach(function(oStackEntry) {
1031
+ // loop over nested dimension arrays -> give them the correct name for filtering
1032
+ oStackEntry.dimension = oStackEntry.dimension.map(function(sDimension) {
1033
+ var oProp = this.getPropertyFromNameAndKind(sDimension, "groupable", oMDCChart);
1034
+ if (oProp) {
1035
+ return oProp.name;
1036
+ } else {
1037
+ Log.error("MDC Chart Delegate: Couldn't map chart dimension to groupable property: " + sDimension);
1038
+ return sDimension;
1039
+ }
1040
+ }.bind(this));
1041
+ }.bind(this));
1042
+
1043
+ return aDrillStack;
946
1044
  };
947
1045
 
948
1046
  /**
@@ -952,30 +1050,38 @@ sap.ui.define([
952
1050
  */
953
1051
  ChartDelegate.getSortedDimensions = function (oMDCChart) {
954
1052
  return new Promise(function (resolve, reject) {
955
- this.fetchProperties(oMDCChart).then(function (aProperties) {
956
1053
 
957
- var aDimensions = aProperties.filter(function (oItem) {
958
- return oItem.groupable; //Groupable means "Dimension" for sap.chart.Chart
959
- });
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
+ };
960
1063
 
961
- if (aDimensions) {
962
- aDimensions.sort(function (a, b) {
963
- if (a.label && b.label) {
964
- return a.label.localeCompare(b.label);
965
- }
966
- });
967
- }
1064
+ ChartDelegate._sortPropertyDimensions = function(aProperties) {
1065
+ var aDimensions = aProperties.filter(function (oItem) {
1066
+ return oItem.groupable; //Groupable means "Dimension" for sap.chart.Chart
1067
+ });
968
1068
 
969
- 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
+ }
970
1074
  });
971
- }.bind(this));
1075
+ }
1076
+
1077
+ return aDimensions;
972
1078
  };
973
1079
 
974
1080
  /**
975
1081
  * Determines which MDC Items are Drillable and returns them
976
1082
  * Used by breadcrumbs
977
1083
  *
978
- * @param {sap.ui.mdc.ChartNew} oMDCChart the MDC Chart to get the Items from
1084
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart to get the Items from
979
1085
  * @returns {array} Array of MDC Items which are drillable
980
1086
  *
981
1087
  */
@@ -989,6 +1095,7 @@ sap.ui.define([
989
1095
  /**
990
1096
  * Sets the chart type of the inner chart
991
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
992
1099
  * @param {string} sChartType the new chart type
993
1100
  */
994
1101
  ChartDelegate.setChartType = function (oMDCChart, sChartType) {
@@ -1000,50 +1107,60 @@ sap.ui.define([
1000
1107
  */
1001
1108
  ChartDelegate.createInnerChartContent = function (oMDCChart, fnCallbackDataLoaded) {
1002
1109
 
1003
- this._setChart(oMDCChart, new Chart({
1004
- id: oMDCChart.getId() + "--innerChart",
1005
- chartType: "column",
1006
- width: "100%",
1007
- isAnalytical: true//,
1008
- }));
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
+ }));
1009
1117
 
1010
- if (oMDCChart.getHeight()){
1011
- this._getChart(oMDCChart).setHeight(this._calculateInnerChartHeight(oMDCChart));
1012
- }
1118
+ //Initialize empty; will get filled later on
1119
+ this._getState(oMDCChart).inResultDimensions = [];
1013
1120
 
1014
- //Set height correctly again if chart changes
1015
- ResizeHandler.register(oMDCChart, function(){
1016
- this.adjustChartHeight(oMDCChart);
1017
- }.bind(this));
1018
-
1019
- var oState = this._getState(oMDCChart);
1020
- oState.aColMeasures = [];
1021
- oState.aInSettings = [];
1022
- this._setState(oMDCChart, oState);
1023
-
1024
- //Create initial content during pre-processing
1025
- this._createContentFromItems(oMDCChart);
1026
-
1027
- //Since zoom information is not yet available for sap.chart.Chart after data load is complete, do it on renderComplete instead
1028
- //This is a workaround which is hopefully not needed in other chart libraries
1029
- this._getChart(oMDCChart).attachRenderComplete(function () {
1030
- if (this._getState(oMDCChart).toolbarUpdateRequested){
1031
- oMDCChart._updateToolbar();
1032
- this._getState(oMDCChart).toolbarUpdateRequested = false;
1121
+ if (oMDCChart.getHeight()){
1122
+ this._getChart(oMDCChart).setHeight(this._calculateInnerChartHeight(oMDCChart));
1033
1123
  }
1034
- }.bind(this));
1035
1124
 
1036
- this._getInnerStructure(oMDCChart).removeAllItems();
1037
- this._getInnerStructure(oMDCChart).setJustifyContent(sap.m.FlexJustifyContent.Start);
1038
- this._getInnerStructure(oMDCChart).setAlignItems(sap.m.FlexAlignItems.Stretch);
1039
- this._getInnerStructure(oMDCChart).addItem(this._getChart(oMDCChart));
1125
+ //Set height correctly again if chart changes
1126
+ ResizeHandler.register(oMDCChart, function(){
1127
+ this.adjustChartHeight(oMDCChart);
1128
+ }.bind(this));
1129
+
1130
+ var oState = this._getState(oMDCChart);
1131
+ oState.aColMeasures = [];
1132
+ oState.aInSettings = [];
1133
+ this._setState(oMDCChart, oState);
1134
+
1135
+ //Create initial content during pre-processing
1136
+ this._createContentFromItems(oMDCChart).then(function(){
1137
+ //Since zoom information is not yet available for sap.chart.Chart after data load is complete, do it on renderComplete instead
1138
+ //This is a workaround which is hopefully not needed in other chart libraries
1139
+ this._getChart(oMDCChart).attachRenderComplete(function () {
1140
+ if (this._getState(oMDCChart).toolbarUpdateRequested){
1141
+ oMDCChart._updateToolbar();
1142
+ this._getState(oMDCChart).toolbarUpdateRequested = false;
1143
+ }
1144
+ }.bind(this));
1145
+
1146
+ this._getInnerStructure(oMDCChart).removeAllItems();
1147
+ this._getInnerStructure(oMDCChart).setJustifyContent(FlexJustifyContent.Start);
1148
+ this._getInnerStructure(oMDCChart).setAlignItems(FlexAlignItems.Stretch);
1149
+ this._getInnerStructure(oMDCChart).addItem(this._getChart(oMDCChart));
1150
+
1151
+ oState.dataLoadedCallback = fnCallbackDataLoaded;
1152
+
1153
+ this._setState(oMDCChart, oState);
1154
+ var oBindingInfo = this._getBindingInfo(oMDCChart);
1155
+ this.updateBindingInfo(oMDCChart, oBindingInfo); //Applies filters
1156
+ this.rebind(oMDCChart, oBindingInfo);
1157
+
1158
+ resolve();
1159
+ }.bind(this));
1160
+
1040
1161
 
1041
- oState.dataLoadedCallback = fnCallbackDataLoaded;
1162
+ }.bind(this));
1042
1163
 
1043
- this._setState(oMDCChart, oState);
1044
- var oBindingInfo = this._getBindingInfo(oMDCChart);
1045
- this.updateBindingInfo(oMDCChart, oBindingInfo); //Applies filters
1046
- this.rebindChart(oMDCChart, oBindingInfo);
1047
1164
  };
1048
1165
 
1049
1166
  ChartDelegate._calculateInnerChartHeight = function(oMDCChart) {
@@ -1075,7 +1192,10 @@ sap.ui.define([
1075
1192
  */
1076
1193
  ChartDelegate.adjustChartHeight = function(oMDCChart){
1077
1194
  if (oMDCChart.getHeight() && this._getChart(oMDCChart)){
1078
- this._getChart(oMDCChart).setHeight(this._calculateInnerChartHeight(oMDCChart));
1195
+ var sHeight = this._calculateInnerChartHeight(oMDCChart);
1196
+
1197
+ this._getInnerStructure(oMDCChart).setHeight(sHeight);
1198
+ this._getChart(oMDCChart).setHeight(sHeight);
1079
1199
  }
1080
1200
  };
1081
1201
 
@@ -1087,30 +1207,18 @@ sap.ui.define([
1087
1207
  //TODO: Check for Hierachy and Time
1088
1208
  //TODO: Check for role annotation
1089
1209
 
1090
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
1091
-
1092
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
1093
- return oCurrentPropertyInfo.name === oMDCChartItem.getName();
1094
- });
1095
-
1096
- this._addInnerDimension(oMDCChart, oMDCChartItem, oPropertyInfo);
1097
-
1210
+ this._getPropertyInfosByName(oMDCChartItem.getName(), oMDCChart).then(function(oPropInfo){
1211
+ this._addInnerDimension(oMDCChart, oMDCChartItem, oPropInfo);
1098
1212
  }.bind(this));
1099
1213
 
1214
+
1100
1215
  };
1101
1216
 
1102
1217
  ChartDelegate.createInnerMeasure = function (oMDCChart, oMDCChartItem) {
1103
1218
 
1104
- this.fetchProperties(oMDCChartItem.getParent()).then(function (aProperties) {
1105
-
1106
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
1107
- return oCurrentPropertyInfo.name === oMDCChartItem.getName();
1108
- });
1109
-
1110
- this._addInnerMeasure(oMDCChart, oMDCChartItem, oPropertyInfo);
1111
-
1219
+ this._getPropertyInfosByName(oMDCChartItem.getName(), oMDCChart).then(function(oPropInfo){
1220
+ this._addInnerMeasure(oMDCChart, oMDCChartItem, oPropInfo);
1112
1221
  }.bind(this));
1113
-
1114
1222
  };
1115
1223
 
1116
1224
  /**
@@ -1118,7 +1226,7 @@ sap.ui.define([
1118
1226
  */
1119
1227
  ChartDelegate._addInnerDimension = function(oMDCChart, oMDCChartItem, oPropertyInfo) {
1120
1228
  var oDimension = new Dimension({
1121
- name: oMDCChartItem.getName(),
1229
+ name: this.getInternalChartNameFromPropertyNameAndKind(oMDCChartItem.getName(), "groupable", oMDCChart),
1122
1230
  role: oMDCChartItem.getRole() ? oMDCChartItem.getRole() : "category",
1123
1231
  label: oMDCChartItem.getLabel()
1124
1232
  });
@@ -1126,7 +1234,7 @@ sap.ui.define([
1126
1234
  if (oPropertyInfo.textProperty){
1127
1235
  oDimension.setTextProperty(oPropertyInfo.textProperty);
1128
1236
  if (oPropertyInfo.textFormatter){
1129
- oDimension.setTextFormatter(oPropertyInfo.textFormatter);
1237
+ oDimension.setTextFormatter(this._formatText.bind(oPropertyInfo));
1130
1238
  }
1131
1239
  oDimension.setDisplayText(true);
1132
1240
  }
@@ -1142,7 +1250,7 @@ sap.ui.define([
1142
1250
  var propertyPath = oPropertyInfo.propertyPath;
1143
1251
 
1144
1252
  var oMeasureSettings = {
1145
- name: this._getAggregatedMeasureNameForMDCItem(oMDCChartItem),//"average" + oItem.getName(),
1253
+ name: this._getAggregatedMeasureNameForMDCItem(oMDCChartItem),//aggregationMethod + oItem.getName() under normal circumstances
1146
1254
  label: oMDCChartItem.getLabel(),
1147
1255
  role: oMDCChartItem.getRole() ? oMDCChartItem.getRole() : "axis1"
1148
1256
  };
@@ -1166,10 +1274,21 @@ sap.ui.define([
1166
1274
  /**
1167
1275
  * Checks the binding of the table and rebinds it if required.
1168
1276
  *
1169
- * @param {sap.ui.mdc.ChartNew} oMDCChart The MDC chart instance
1277
+ * @param {sap.ui.mdc.Chart} oMDCChart The MDC chart instance
1170
1278
  * @param {object} oBindingInfo The bindingInfo of the chart
1279
+ * @deprecated as of 1.98; use rebind instead
1171
1280
  */
1172
- ChartDelegate.rebindChart = function (oMDCChart, oBindingInfo) {
1281
+ ChartDelegate.rebindChart = function (oMDCChart, oBindingInfo) {
1282
+ this.rebind(oMDCChart, oBindingInfo);
1283
+ };
1284
+
1285
+ /**
1286
+ * Checks the binding of the table and rebinds it if required.
1287
+ *
1288
+ * @param {sap.ui.mdc.Chart} oMDCChart The MDC chart instance
1289
+ * @param {object} oBindingInfo The bindingInfo of the chart
1290
+ */
1291
+ ChartDelegate.rebind = function (oMDCChart, oBindingInfo) {
1173
1292
  if (oMDCChart && oBindingInfo && this._getChart(oMDCChart)) {
1174
1293
  //TODO: bindData sap.chart.Chart specific and therefore needs to be changed to a general API.
1175
1294
  this._addBindingListener(oBindingInfo, "dataReceived", this._getState(oMDCChart).dataLoadedCallback.bind(oMDCChart));
@@ -1205,7 +1324,7 @@ sap.ui.define([
1205
1324
 
1206
1325
  /**
1207
1326
  * Returns whether the inner chart is currently bound
1208
- * @returns {bool} true if inner chart is bound; false if not
1327
+ * @returns {boolean} true if inner chart is bound; false if not
1209
1328
  */
1210
1329
  ChartDelegate.getInnerChartBound = function (oMDCChart) {
1211
1330
  var oState = this._getState(oMDCChart);
@@ -1224,89 +1343,104 @@ sap.ui.define([
1224
1343
  * @param {Object} oBindingInfo The binding info of the chart
1225
1344
  */
1226
1345
  ChartDelegate.updateBindingInfo = function (oMDCChart, oBindingInfo) {
1227
- var oFilter = Core.byId(oMDCChart.getFilter());
1228
- if (oFilter) {
1229
- var mConditions = oFilter.getConditions();
1346
+ var aFilters = createInnerFilters.call(this, oMDCChart).concat(createOuterFilters.call(this, oMDCChart));
1347
+ addSearchParameter(oMDCChart, oBindingInfo);
1348
+ oBindingInfo.filters = new Filter(aFilters, true);
1349
+ };
1230
1350
 
1231
- if (mConditions) {
1351
+ function createInnerFilters(oChart) {
1352
+ var bFilterEnabled = oChart.getP13nMode().indexOf("Filter") > -1;
1353
+ var aFilters = [];
1232
1354
 
1233
- if (!oBindingInfo) {
1234
- oBindingInfo = {};
1235
- }
1355
+ if (bFilterEnabled) {
1356
+ var aChartProperties = oChart.getPropertyHelper().getProperties();
1357
+ var oInnerFilterInfo = FilterUtil.getFilterInfo(this.getTypeUtil(), oChart.getConditions(), aChartProperties);
1236
1358
 
1237
- var aPropertiesMetadata = oFilter.getPropertyInfoSet ? oFilter.getPropertyInfoSet() : null;
1238
- var aParameterNames = DelegateUtil.getParameterNames(oFilter);
1239
- var oFilterInfo = FilterUtil.getFilterInfo(ChartDelegate.getTypeUtil(), mConditions, aPropertiesMetadata, aParameterNames);
1240
- if (oFilterInfo) {
1241
- oBindingInfo.filters = oFilterInfo.filters;
1242
- }
1359
+ if (oInnerFilterInfo.filters) {
1360
+ aFilters.push(oInnerFilterInfo.filters);
1361
+ }
1362
+ }
1243
1363
 
1244
- var sParameterPath = DelegateUtil.getParametersInfo(oFilter);
1245
- if (sParameterPath) {
1246
- oBindingInfo.path = sParameterPath;
1247
- }
1248
- }
1364
+ return aFilters;
1365
+ }
1249
1366
 
1250
- // get the basic search
1251
- var sSearchText = oFilter.getSearch instanceof Function ? oFilter.getSearch() : "";
1252
- if (sSearchText) {
1367
+ function createOuterFilters(oChart) {
1368
+ var oFilter = Core.byId(oChart.getFilter());
1369
+ var aFilters = [];
1253
1370
 
1254
- if (!oBindingInfo) {
1255
- oBindingInfo = {};
1256
- }
1371
+ if (!oFilter) {
1372
+ return aFilters;
1373
+ }
1257
1374
 
1258
- if (!oBindingInfo.parameters) {
1259
- oBindingInfo.parameters = {};
1260
- }
1261
- // add basic search parameter as expected by v4.ODataListBinding
1262
- oBindingInfo.parameters.$search = sSearchText;
1263
- } else if (oBindingInfo.parameters && oBindingInfo.parameters.$search) {
1264
- delete oBindingInfo.parameters.$search;
1265
- }
1375
+ var mConditions = oFilter.getConditions();
1376
+
1377
+ if (mConditions) {
1378
+ var aPropertiesMetadata = oFilter.getPropertyInfoSet ? oFilter.getPropertyInfoSet() : null;
1379
+ var aParameterNames = DelegateUtil.getParameterNames(oFilter);
1380
+ var oOuterFilterInfo = FilterUtil.getFilterInfo(this.getTypeUtil(), mConditions, aPropertiesMetadata, aParameterNames);
1266
1381
 
1382
+ if (oOuterFilterInfo.filters) {
1383
+ aFilters.push(oOuterFilterInfo.filters);
1384
+ }
1385
+ }
1386
+
1387
+ return aFilters;
1388
+ }
1389
+
1390
+ function addSearchParameter(oChart, oBindingInfo) {
1391
+ var oFilter = Core.byId(oChart.getFilter());
1392
+ if (!oFilter) {
1393
+ return;
1394
+ }
1395
+
1396
+ var mConditions = oFilter.getConditions();
1397
+ // get the basic search
1398
+ var sSearchText = oFilter.getSearch instanceof Function ? oFilter.getSearch() : "";
1399
+
1400
+ if (mConditions) {
1401
+ var sParameterPath = DelegateUtil.getParametersInfo(oFilter, mConditions);
1402
+ if (sParameterPath) {
1403
+ oBindingInfo.path = sParameterPath;
1404
+ }
1405
+ }
1406
+
1407
+ if (!oBindingInfo.parameters) {
1408
+ oBindingInfo.parameters = {};
1267
1409
  }
1268
- };
1410
+
1411
+ oBindingInfo.parameters["$search"] = sSearchText || undefined;
1412
+ }
1269
1413
 
1270
1414
  ChartDelegate._getAggregatedMeasureNameForMDCItem = function(oMDCItem){
1271
- return oMDCItem.getName();
1415
+ return this.getInternalChartNameFromPropertyNameAndKind(oMDCItem.getName(), "aggregatable", oMDCItem.getParent());
1272
1416
  };
1273
1417
 
1274
1418
  /**
1275
- * This returns the layout options for a specific type of Item (measure/dimension,groupable/aggregatable)
1276
- * It is used by p13n to determine which layout options to show in the p13n panel
1277
- * @param {string} sType the type for which the layout options are requested
1419
+ * This function returns an id which should be used in the internal chart for the measure/dimension
1420
+ * In the standard case, this is just the id of the property.
1421
+ * If it is necessary to use another id internally inside the chart (e.g. on duplicate property ids) this method can be overwritten.
1422
+ * In this case, <code>getPropertyFromNameAndKind</code> needs to be overwritten aswell.
1423
+ * @param {string} sName ID of the property
1424
+ * @param {string} sKind Kind of the Property (Measure/Dimension)
1425
+ * @param {sap.ui.mdc.Chart} oMDCChart reference to the MDC Chart
1426
+ * @returns {string} internal id for the sap.chart.Chart
1278
1427
  */
1279
- ChartDelegate._getLayoutOptionsForType = function(sType){
1280
- var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
1281
- var oAvailableRoles = {
1282
- groupable: [
1283
- {
1284
- key: MDCLib.ChartItemRoleType.category,
1285
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_CATEGORY')
1286
- }, {
1287
- key: MDCLib.ChartItemRoleType.category2,
1288
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_CATEGORY2')
1289
- }, {
1290
- key: MDCLib.ChartItemRoleType.series,
1291
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_SERIES')
1292
- }
1293
- ],
1294
- aggregatable: [
1295
- {
1296
- key: MDCLib.ChartItemRoleType.axis1,
1297
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS1')
1298
- }, {
1299
- key: MDCLib.ChartItemRoleType.axis2,
1300
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS2')
1301
- }, {
1302
- key: MDCLib.ChartItemRoleType.axis3,
1303
- text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_CHARTROLE_AXIS3')
1304
- }
1305
- ]
1306
- };
1307
- return oAvailableRoles[sType];
1428
+ ChartDelegate.getInternalChartNameFromPropertyNameAndKind = function(sName, sKind, oMDCChart) {
1429
+ return sName;
1430
+ };
1431
+
1432
+ /**
1433
+ * This maps an id of an internal chart dimension/measure & kind of a property to its coresponding property entry.
1434
+ * @param {string} sName the id of internal chart measure/dimension
1435
+ * @param {string} sKind the kind of the property
1436
+ * @param {sap.ui.mdc.Chart} oMDCChart reference to the MDC Chart
1437
+ * @returns {object} the property object
1438
+ */
1439
+ ChartDelegate.getPropertyFromNameAndKind = function(sName, sKind, oMDCChart) {
1440
+ return oMDCChart.getPropertyHelper().getProperty(sName);
1308
1441
  };
1309
1442
 
1443
+
1310
1444
  /**
1311
1445
  * Adds an item to the inner chart (measure/dimension)
1312
1446
  */
@@ -1331,7 +1465,8 @@ sap.ui.define([
1331
1465
 
1332
1466
  /**
1333
1467
  * Sets tooltips visible/invisible on inner chart
1334
- * @param {bool} bFlag true for visible, false for invisible
1468
+ * @param {sap.ui.mdc.Chart} oMDCChart the MDC Chart
1469
+ * @param {boolean} bFlag true for visible, false for invisible
1335
1470
  */
1336
1471
  ChartDelegate.setChartTooltipVisibility = function (oMDCChart, bFlag) {
1337
1472
 
@@ -1382,51 +1517,32 @@ sap.ui.define([
1382
1517
  };
1383
1518
 
1384
1519
  /**
1385
- * Initializes a new table property helper for V4 analytics with the property extensions merged into the property infos.
1386
- *
1387
- * @param {sap.ui.mdc.ChartNew} oMDCChart reference to the MDC Chart
1388
- * @returns {Promise<sap.ui.mdc.table.V4AnalyticsPropertyHelper>} A promise that resolves with the property helper.
1389
- * @private
1390
- * @ui5-restricted sap.ui.mdc
1520
+ * Returns the propertyHelper used for the chart delegate
1521
+ * @returns {Promise} Promise with the property helper reference
1391
1522
  */
1392
- ChartDelegate.initPropertyHelper = function (oMDCChart) {
1393
- // TODO: Do this in the DelegateMixin, or provide a function in the base delegate to merge properties and extensions
1394
- return Promise.all([
1395
- this.fetchProperties(oMDCChart),
1396
- loadModules("sap/ui/mdc/odata/v4/ChartPropertyHelperNew")
1397
- ]).then(function (aResult) {
1398
- return Promise.all(aResult.concat(this.fetchPropertyExtensions(oMDCChart, aResult[0])));
1399
- }.bind(this)).then(function (aResult) {
1400
- var aProperties = aResult[0];
1401
- var PropertyHelper = aResult[1][0];
1402
- var mExtensions = aResult[2];
1403
- var iMatchingExtensions = 0;
1404
- var aPropertiesWithExtension = [];
1405
-
1406
- for (var i = 0; i < aProperties.length; i++) {
1407
- aPropertiesWithExtension.push(Object.assign({}, aProperties[i], {
1408
- extension: mExtensions[aProperties[i].name] || {}
1409
- }));
1410
-
1411
- if (aProperties[i].name in mExtensions) {
1412
- iMatchingExtensions++;
1413
- }
1414
- }
1415
-
1416
- if (iMatchingExtensions !== Object.keys(mExtensions).length) {
1417
- throw new Error("At least one property extension does not point to an existing property");
1418
- }
1523
+ ChartDelegate.getPropertyHelperClass = function () {
1524
+ return PropertyHelper;
1525
+ };
1419
1526
 
1420
- return new PropertyHelper(aPropertiesWithExtension, oMDCChart);
1421
- });
1527
+ /**
1528
+ * This allows formatting for axis labels of the inner sap.chart.Chart.
1529
+ * Note: As the inner chart has no association to the propertyInfo, "this" will be bound to the propertyInfo object when calling this method
1530
+ * @param {string} sKey the key of the dimension
1531
+ * @param {string} SDesc the description provided by the metadata
1532
+ * @returns {string} the label which should be shown on the chart axis
1533
+ */
1534
+ ChartDelegate._formatText = function(sKey, SDesc) {
1535
+ return sKey;
1422
1536
  };
1537
+
1423
1538
  /**
1424
1539
  * Returns the relevant propery infos based on the metadata used with the MDC Chart instance.
1425
1540
  *
1426
- * @param {sap.ui.mdc.ChartNew} oMDCChart reference to the MDC Chart
1541
+ * @param {sap.ui.mdc.Chart} oMDCChart reference to the MDC Chart
1427
1542
  * @returns {array} Array of the property infos to be used within MDC Chart
1428
1543
  */
1429
1544
  ChartDelegate.fetchProperties = function (oMDCChart) {
1545
+
1430
1546
  var oModel = this._getModel(oMDCChart);
1431
1547
  var pCreatePropertyInfos;
1432
1548
 
@@ -1436,10 +1552,10 @@ sap.ui.define([
1436
1552
  resolver: resolve
1437
1553
  }, onModelContextChange, this);
1438
1554
  }.bind(this)).then(function (oModel) {
1439
- return this._createPropertyInfos(oMDCChart, oModel);
1555
+ return this._createPropertyInfos(oMDCChart.getDelegate().payload, oModel);
1440
1556
  }.bind(this));
1441
1557
  } else {
1442
- pCreatePropertyInfos = this._createPropertyInfos(oMDCChart, oModel);
1558
+ pCreatePropertyInfos = this._createPropertyInfos(oMDCChart.getDelegate().payload, oModel);
1443
1559
  }
1444
1560
 
1445
1561
  return pCreatePropertyInfos.then(function (aProperties) {
@@ -1460,10 +1576,10 @@ sap.ui.define([
1460
1576
  }
1461
1577
  }
1462
1578
 
1463
- ChartDelegate._createPropertyInfos = function (oMDCChart, oModel) {
1464
- var oMetadataInfo = oMDCChart.getDelegate().payload;
1579
+ ChartDelegate._createPropertyInfos = function (oDelegatePayload, oModel) {
1580
+ //var oMetadataInfo = oMDCChart.getDelegate().payload;
1465
1581
  var aProperties = [];
1466
- var sEntitySetPath = "/" + oMetadataInfo.collectionName;
1582
+ var sEntitySetPath = "/" + oDelegatePayload.collectionName;
1467
1583
  var oMetaModel = oModel.getMetaModel();
1468
1584
 
1469
1585
  return Promise.all([
@@ -1497,10 +1613,11 @@ sap.ui.define([
1497
1613
  }
1498
1614
 
1499
1615
  if (oPropertyAnnotations["@Org.OData.Aggregation.V1.Aggregatable"]){
1500
- aProperties = aProperties.concat(this._createPropertyInfosForAggregatable(sKey, oPropertyAnnotations, oFilterRestrictionsInfo, oSortRestrictionsInfo));
1616
+ aProperties = aProperties.concat(this._createPropertyInfosForAggregatable(sKey, oPropertyAnnotations, oObj, oFilterRestrictionsInfo, oSortRestrictionsInfo));
1501
1617
  }
1502
1618
 
1503
1619
  if (oPropertyAnnotations["@Org.OData.Aggregation.V1.Groupable"]) {
1620
+
1504
1621
  aProperties.push({
1505
1622
  name: sKey,
1506
1623
  propertyPath: sKey,
@@ -1511,12 +1628,13 @@ sap.ui.define([
1511
1628
  aggregatable: false,
1512
1629
  maxConditions: ODataMetaModelUtil.isMultiValueFilterExpression(oFilterRestrictionsInfo.propertyInfo[sKey]) ? -1 : 1,
1513
1630
  sortKey: sKey,
1514
- kind: "Groupable", //TODO: Rename in type; Only needed for P13n Item Panel
1515
- availableRoles: this._getLayoutOptionsForType("groupable"), //for p13n
1631
+ dataType: oObj.$Type,
1632
+ //formatOptions: null,
1633
+ //constraints: {},
1516
1634
  role: MDCLib.ChartItemRoleType.category, //standard, normally this should be interpreted from UI.Chart annotation
1517
1635
  criticality: null ,//To be implemented by FE
1518
1636
  textProperty: oPropertyAnnotations["@com.sap.vocabularies.Common.v1.Text"] ? oPropertyAnnotations["@com.sap.vocabularies.Common.v1.Text"].$Path : null //To be implemented by FE
1519
- //textFormatter: function(){} -> can be used to provide a custom formatter for the textProperty
1637
+ //textFormatter: string-> can be used to provide a custom formatter for the textProperty
1520
1638
  });
1521
1639
  }
1522
1640
  }
@@ -1525,7 +1643,7 @@ sap.ui.define([
1525
1643
  }.bind(this));
1526
1644
  };
1527
1645
 
1528
- ChartDelegate._createPropertyInfosForAggregatable = function(sKey, oPropertyAnnotations, oFilterRestrictionsInfo, oSortRestrictionsInfo) {
1646
+ ChartDelegate._createPropertyInfosForAggregatable = function(sKey, oPropertyAnnotations, oObj, oFilterRestrictionsInfo, oSortRestrictionsInfo) {
1529
1647
  var aProperties = [];
1530
1648
 
1531
1649
  if (oPropertyAnnotations["@Org.OData.Aggregation.V1.SupportedAggregationMethods"]){
@@ -1540,28 +1658,18 @@ sap.ui.define([
1540
1658
  aggregatable: oPropertyAnnotations["@Org.OData.Aggregation.V1.Aggregatable"],
1541
1659
  aggregationMethod: sAggregationMethod,
1542
1660
  maxConditions: ODataMetaModelUtil.isMultiValueFilterExpression(oFilterRestrictionsInfo.propertyInfo[sKey]) ? -1 : 1,
1543
- sortKey: oPropertyAnnotations["@Org.OData.Aggregation.V1.RecommendedAggregationMethod"] + sKey,
1544
- kind: "Aggregatable",//Only needed for P13n Item Panel
1545
- availableRoles: this._getLayoutOptionsForType("aggregatable"), //for p13n
1546
- role: MDCLib.ChartItemRoleType.axis1,
1661
+ dataType: oObj.$Type,
1547
1662
  datapoint: null //To be implemented by FE
1548
1663
  });
1549
- }.bind(this));
1664
+ });
1550
1665
  }
1551
1666
 
1552
1667
  return aProperties;
1553
1668
  };
1554
1669
 
1670
+ //Gets internal property infos by excact property name
1555
1671
  ChartDelegate._getPropertyInfosByName = function(sName, oMDCChart){
1556
- return new Promise(function(resolve){
1557
- this.fetchProperties(oMDCChart).then(function(aProperties){
1558
- var oPropertyInfo = aProperties.find(function (oCurrentPropertyInfo) {
1559
- return oCurrentPropertyInfo.name === sName;
1560
- });
1561
-
1562
- resolve(oPropertyInfo);
1563
- });
1564
- }.bind(this));
1672
+ return oMDCChart._getPropertyByNameAsync(sName);
1565
1673
  };
1566
1674
 
1567
1675