@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
@@ -4,10 +4,35 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "./BasePanel", "sap/m/Label", "sap/m/ColumnListItem", "sap/m/Select", "sap/m/Text", "sap/ui/core/Item", "sap/ui/mdc/library"
8
- ], function (BasePanel, Label, ColumnListItem, Select, Text, Item, MDCLib) {
7
+ "sap/m/p13n/BasePanel",
8
+ "sap/m/Label",
9
+ "sap/m/ColumnListItem",
10
+ "sap/m/Select",
11
+ "sap/m/Text",
12
+ "sap/ui/core/Item",
13
+ "sap/ui/mdc/library",
14
+ "sap/m/Button",
15
+ 'sap/m/Column',
16
+ "sap/m/Table",
17
+ "sap/ui/model/Filter",
18
+ "sap/ui/model/FilterOperator",
19
+ "sap/m/VBox",
20
+ "sap/m/HBox",
21
+ "sap/m/ComboBox",
22
+ "sap/ui/model/Sorter",
23
+ "sap/base/Log",
24
+ "sap/m/library",
25
+ "sap/ui/Device",
26
+ "sap/ui/core/ResizeHandler",
27
+ "sap/ui/core/CustomData",
28
+ "sap/ui/thirdparty/jquery"
29
+ ], function (BasePanel, Label, ColumnListItem, Select, Text, Item, MDCLib, Button, Column, Table, Filter, FilterOperator, VBox, HBox, ComboBox, Sorter, Log, mLibrary, Device, ResizeHandler, CustomData, jQuery) {
9
30
  "use strict";
10
31
 
32
+ // shortcut for sap.m.FlexJustifyContent
33
+ var FlexJustifyContent = mLibrary.FlexJustifyContent;
34
+ var core = sap.ui.getCore();
35
+
11
36
  /**
12
37
  * Constructor for ChartItemPanel
13
38
  *
@@ -16,77 +41,790 @@ sap.ui.define([
16
41
  * @class TODO
17
42
  * <h3><b>Note:</b></h3>
18
43
  * The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
19
- * @extends sap.ui.mdc.p13n.panels.BasePanel
44
+ * @extends sap.m.p13n.BasePanel
20
45
  * @author SAP SE
46
+ * @constructor The API/behaviour is not finalised and hence this control should not be used for productive usage.
21
47
  * @private
22
48
  * @experimental
23
- * @since 1.66
49
+ * @since 1.97
24
50
  * @alias sap.ui.mdc.p13n.panels.ChartItemPanel
25
51
  * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
26
52
  */
27
53
  var ChartItemPanel = BasePanel.extend("sap.ui.mdc.p13n.panels.ChartItemPanel", {
28
54
  metadata: {
29
- library: "sap.ui.mdc"
55
+ library: "sap.ui.mdc",
56
+ properties: {
57
+ /*This provides the panel the necessary information to build the UI for MDC/Comp.
58
+ * The object contains the following information:
59
+ * {
60
+ * allowedLayoutOptions : [] -> an array of strings with the allowed layout options for the current chart type, e.g. "axis1", "axis2", "category", "series", ...
61
+ templateConfig : [ -> array containing information how the templating rows should look like
62
+ {kind: "Groupable"}, -> object containing information for which tyoe should be a termplate row created (may contain additional config in the future e.g. only one measure allwoed)
63
+ {kind: "Aggregatable"}
64
+ ]
65
+ * }
66
+ */
67
+ panelConfig: {
68
+ type: "object"
69
+ }
70
+ },
71
+ events: {
72
+ // TODO
73
+ /**
74
+ * Event raised when one or more <code>DimMeasureItems</code> has been updated.
75
+ * Aggregation <code>DimMeasureItems</code> should be updated outside...
76
+ * @since 1.50.0
77
+ */
78
+ changeItems: {}
79
+ }
30
80
  },
31
81
  init: function () {
82
+
83
+ this._bMobileMode = Device.system.phone;
84
+
32
85
  // Initialize the BasePanel
33
86
  BasePanel.prototype.init.apply(this, arguments);
34
- var oChartItemPanelTemplate = new ColumnListItem({
35
- selected: "{" + this.P13N_MODEL + ">visible}",
36
- cells: [
37
- new Label({
38
- wrapping: true,
39
- text: "{" + this.P13N_MODEL + ">label}",
40
- tooltip: "{" + this.P13N_MODEL + ">tooltip}"
41
- }),
42
- new Text({
43
- wrapping: true,
44
- text: "{" + this.P13N_MODEL + ">kind}"
45
- }),
46
- new Select({
47
- width: "100%",
48
- selectedKey: "{" + this.P13N_MODEL + ">role}",
49
- change: [this.onChangeOfRole, this],
50
- forceSelection: false,
51
- enabled: {
52
- path: this.P13N_MODEL + ">visible",
53
- formatter: function(bEnabled) {
54
- return !!bEnabled;
55
- }
56
- },
57
- items: {
58
- path: this.P13N_MODEL + ">availableRoles",
59
- templateShareable: false,
60
- template: new Item({
61
- key: "{" + this.P13N_MODEL + ">key}",
62
- text: "{" + this.P13N_MODEL + ">text}"
63
- })
64
- }
65
- })
66
- ]
67
- });
68
87
 
69
- this.setTemplate(oChartItemPanelTemplate);
70
- this.setPanelColumns([
71
- this.getResourceText("chart.PERSONALIZATION_DIALOG_COLUMN_DESCRIPTION"), this.getResourceText("chart.PERSONALIZATION_DIALOG_COLUMN_TYPE"), this.getResourceText("chart.PERSONALIZATION_DIALOG_COLUMN_ROLE")
72
- ]);
88
+ this._bindListItems();
89
+
73
90
  },
74
91
  renderer: {}
75
92
  });
76
93
 
77
- ChartItemPanel.prototype.setP13nModel = function(oP13nModel){
78
- BasePanel.prototype.setP13nModel.apply(this, arguments);
94
+ ChartItemPanel.prototype._setInnerLayout = function() {
95
+
96
+ this._oInnerControl = new VBox({
97
+ items: [
98
+ this._oListControl
99
+ ]
100
+ });
101
+
102
+ this.setAggregation("_content", this._oInnerControl);
103
+
104
+ this._fnHandleResize = function() {
105
+ //var bChangeResult = false, iScrollContainerHeightOld, iScrollContainerHeightNew;
106
+ if (this.getParent) {
107
+ var $dialogCont = null;
108
+ var oParent = this.getParent();
109
+ if (oParent && oParent.$) {
110
+ $dialogCont = oParent.$("cont");
111
+ if ($dialogCont.children().length > 0) {
112
+ var iScrollContainerWidth = this._oInnerControl.$()[0].clientWidth;
113
+ var iMinWidth = 570;
114
+
115
+ if (!this._bMobileMode && iScrollContainerWidth <= iMinWidth) {
116
+ this._switchMobileMode(true);
117
+ } else if (this._bMobileMode && iScrollContainerWidth > iMinWidth) {
118
+ this._switchMobileMode(false);
119
+ }
120
+
121
+ }
122
+ }
123
+ }
124
+ //return bChangeResult;
125
+ };
126
+
127
+
128
+ if (Device.system.desktop) {
129
+ this._sContainerResizeListener = ResizeHandler.register(this._oInnerControl , this._fnHandleResize.bind(this));
130
+ }
131
+
132
+ };
133
+
134
+ ChartItemPanel.prototype._switchMobileMode = function(bMobile) {
135
+
136
+ if (this._bMobileMode == bMobile) {
137
+ return;
138
+ }
139
+
140
+ this._bMobileMode = bMobile;
141
+
142
+ if (this._sContainerResizeListener) {
143
+ ResizeHandler.deregister(this._sContainerResizeListener);
144
+ this._sContainerResizeListener = null;
145
+ }
146
+
147
+ this._oListControl.destroy();
148
+ this._oDragDropInfo = null;
149
+
150
+ // list is necessary to set the template + model on
151
+ this._oListControl = this._createInnerListControl();
152
+
153
+ // disable 'select all'
154
+ this._oListControl.setMultiSelectMode("ClearAll");
155
+
156
+ this._setInnerLayout();
157
+ this._bindListItems();
158
+
159
+ };
160
+
161
+ ChartItemPanel.prototype._createInnerListControl = function() {
162
+
163
+ var sId = this._bMobileMode ? this.getId() + "-innerP13nListMobile" : this.getId() + "-innerP13nList";
164
+
165
+ var oTable = new Table(sId, Object.assign(this._getListControlConfig(), {}));
166
+ this.setEnableReorder(true); //We always want reordering to be active in this panel
167
+
168
+ oTable.addEventDelegate({
169
+ onAfterRendering: this._checkFocusAfterTableRerender.bind(this)
170
+ });
171
+
172
+ return oTable;
173
+ };
174
+
175
+ ChartItemPanel.prototype._checkFocusAfterTableRerender = function(){
176
+
177
+ if (this._oFocusInfo && this._oFocusInfo.tableItem){
178
+ //Focus table item directly
179
+ this._oFocusInfo.tableItem.focus();
180
+ }
181
+
182
+ //Reset focus info
183
+ this._oFocusInfo = null;
184
+ };
185
+
186
+ ChartItemPanel.prototype._bindListItems = function(mBindingInfo) {
187
+ var oSorter;
188
+ var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
189
+
190
+ if ( this.getPanelConfig() && this.getPanelConfig().sorter) {
191
+ oSorter = this.getPanelConfig().sorter;
192
+ } else {
193
+
194
+ var oMeasuresGroup = { text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_MEASURE_GROUP_HEADER')};
195
+ var oDimensionsGroup = { text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_DIMENSION_GROUP_HEADER')};
196
+
197
+ var mGroupInfo = {
198
+ "Aggregatable": oMeasuresGroup,
199
+ "Groupable" : oDimensionsGroup,
200
+ "Measure": oMeasuresGroup,
201
+ "Dimension" : oDimensionsGroup
202
+ };
203
+
204
+ var fGrouper = function(oContext) {
205
+ var group = oContext.getProperty("kind");
206
+ return { key: group, text: mGroupInfo[group].text };
207
+ };
208
+
209
+ var fSorter = function(a,b) {
210
+ if (a === b) {
211
+ return 0;
212
+ }
213
+
214
+ if (a === "MEASURE" || a === "AGGREGATABLE"){
215
+ return 1;
216
+ }
217
+
218
+ return -1;
219
+ };
220
+
221
+ oSorter = new Sorter("kind", false, fGrouper, fSorter);
222
+ }
223
+
224
+
225
+ var oFactoryFunction;
226
+ this._mTemplatesMap = new Map();
227
+ if (this._bMobileMode) {
228
+ oFactoryFunction = this._createListItemMobile;
229
+ } else {
230
+ oFactoryFunction = this._createListItem;
231
+ }
232
+
233
+ this._oListControl.bindItems(Object.assign({
234
+ path: this.P13N_MODEL + ">/items",
235
+ key: "name", //TODO: Bind with combined key (name + kind)?
236
+ filters: [new Filter({
237
+ filters: [
238
+ new Filter("visible", FilterOperator.EQ, true),
239
+ new Filter("template", FilterOperator.EQ, true)
240
+ ],
241
+ and: false
242
+ })],
243
+ factory: oFactoryFunction.bind(this),
244
+ sorter : oSorter
245
+ }, mBindingInfo));
246
+ };
247
+
248
+ ChartItemPanel.prototype._getTemplateComboBox = function(sKind){
249
+ var oVisibleFilter = new Filter("visible", FilterOperator.EQ, false);
250
+
251
+ var oComboBox = new ComboBox({
252
+ id: "p13nPanel-templateComboBox-" + sKind,
253
+ width: "100%",
254
+ placeholder: this._getPlaceholderTextForTemplate(sKind),
255
+ items: {
256
+ path: this.P13N_MODEL + ">/items",
257
+ template: new Item({
258
+ key: "{" + this.P13N_MODEL + ">name}",
259
+ text: "{" + this.P13N_MODEL + ">label}"
260
+ }),
261
+ templateShareable : false,
262
+ filters: [oVisibleFilter, new Filter("kind", FilterOperator.EQ, sKind)]
263
+ },
264
+ change: [this.onChangeOfTemplateName, this]
265
+ });
266
+
267
+ this._mTemplatesMap.set(sKind, oComboBox);
268
+
269
+ return oComboBox;
270
+ };
271
+
272
+ ChartItemPanel.prototype._getPlaceholderTextForTemplate = function(sKind) {
273
+ var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
274
+ return MDCRb.getText('chart.PERSONALIZATION_DIALOG_TEMPLATE_PLACEHOLDER');
275
+ };
276
+
277
+ ChartItemPanel.prototype._getRoleSelect = function() {
278
+ return new Select({
279
+ width: "100%",
280
+ selectedKey: "{" + this.P13N_MODEL + ">role}",
281
+ change: [this.onChangeOfRole, this],
282
+ forceSelection: false,
283
+ items: {
284
+ path: this.P13N_MODEL + ">availableRoles",
285
+ templateShareable: false,
286
+ template: new Item({
287
+ key: "{" + this.P13N_MODEL + ">key}",
288
+ text: "{" + this.P13N_MODEL + ">text}"
289
+ })
290
+ },
291
+ visible: {
292
+ path: this.P13N_MODEL + ">availableRoles",
293
+ formatter: function(aRoles) {
294
+
295
+ if (!aRoles) {
296
+ return false;
297
+ }
298
+
299
+ return aRoles.length > 1;
300
+ }
301
+ }
302
+ });
303
+ };
304
+
305
+ ChartItemPanel.prototype._getNameComboBox = function(sKind, sName) {
306
+ var oNameFilterPersistent = new Filter({
307
+ filters: [
308
+ new Filter("visible", FilterOperator.EQ, false),
309
+ new Filter("name", FilterOperator.EQ, sName)
310
+ ],
311
+ and: false
312
+ });
313
+
314
+ return new ComboBox({
315
+ width: "100%",
316
+ items: {
317
+ path: this.P13N_MODEL + ">/items",
318
+ template: new Item({
319
+ key: "{" + this.P13N_MODEL + ">name}",
320
+ text: "{" + this.P13N_MODEL + ">label}"
321
+ }),
322
+ templateShareable : false,
323
+ filters: [oNameFilterPersistent, new Filter("kind", FilterOperator.EQ, sKind)]
324
+ },
325
+ change: [this.onChangeOfItemName, this],
326
+ selectedKey: "{" + this.P13N_MODEL + ">tempName}",
327
+ customData: [new CustomData({key: "prevName", value: sName}),
328
+ new CustomData({key: "prevKind", value: sKind})]
329
+ });
330
+ };
331
+
332
+ ChartItemPanel.prototype._createListItem = function(sId, oObject){
333
+
334
+ var sRemoveBtnId, aCells = [];
335
+
336
+
337
+ if (oObject.getObject() && oObject.getObject().template){
338
+ aCells.push(this._getTemplateComboBox(oObject.getObject().kind));
339
+ } else {
340
+ aCells.push(this._getNameComboBox(oObject.getObject().kind, oObject.getObject().name));
341
+ aCells.push(this._getRoleSelect());
342
+ sRemoveBtnId = this.getId() + oObject.getObject().kind + "-RemoveBtn-" + oObject.getObject().name;
343
+
344
+ aCells.push(new HBox({
345
+ justifyContent: FlexJustifyContent.End,
346
+ items: [
347
+ new Button({
348
+ id: sRemoveBtnId,
349
+ press: [this._onPressHide, this],
350
+ type: "Transparent",
351
+ icon: "sap-icon://decline",
352
+ tooltip: this._getResourceTextMDC("chart.PERSONALIZATION_DIALOG_REMOVE_ENTRY"),
353
+ customData: [new CustomData({key: "propertyName", value: "{" + this.P13N_MODEL + ">name}"}),
354
+ new CustomData({key: "propertyKind", value: "{" + this.P13N_MODEL + ">kind}"})]
355
+ })
356
+ ]}));
357
+ }
358
+
359
+ var oListItem;
360
+ if (oObject.getObject() && oObject.getObject().template) {
361
+ var sKind = oObject.getObject().kind;
362
+ oListItem = new ColumnListItem({
363
+ cells: aCells,
364
+ visible: {
365
+ path: this.P13N_MODEL + ">/items",
366
+ formatter: function(aItems){
367
+ aItems = aItems.filter(function(oItem){return oItem.visible === false && oItem.template === false && oItem.kind === sKind;});
368
+ return aItems.length != 0;
369
+ }
370
+ }
371
+ });
372
+ } else {
373
+ oListItem = new ColumnListItem({
374
+ cells: aCells
375
+ });
376
+ }
377
+
378
+ oListItem.addEventDelegate({
379
+ onmouseover: this._hoverHandler.bind(this),
380
+ onfocusin: this._focusHandler.bind(this),
381
+ onkeydown: this._handleOnKeyDown.bind(this)
382
+ });
383
+
384
+ return oListItem;
385
+ };
386
+
387
+ ChartItemPanel.prototype._createListItemMobile = function(sId, oObject){
388
+
389
+ var sRemoveBtnId, aCells = [];
390
+
391
+ if (oObject.getObject() && oObject.getObject().template){
392
+ aCells.push(this._getTemplateComboBox(oObject.getObject().kind));
393
+ } else {
394
+
395
+ var oVBox = new VBox({
396
+ items: [
397
+ this._getNameComboBox(oObject.getObject().kind, oObject.getObject().name),
398
+ this._getRoleSelect()
399
+ ]
400
+ });
401
+
402
+ sRemoveBtnId = oObject.getObject().kind + "-RemoveBtn-" + oObject.getObject().name;
403
+ aCells.push(oVBox);
404
+
405
+ }
406
+
407
+ var oRemoveColumn = new HBox({
408
+ justifyContent: FlexJustifyContent.End,
409
+ items: [new Button({
410
+ id: sRemoveBtnId,
411
+ press: [this._onPressHide, this],
412
+ type: "Transparent", icon: "sap-icon://decline",
413
+ visible: {
414
+ path: this.P13N_MODEL + ">template",
415
+ formatter: function(bEnabled) {
416
+ return !bEnabled;
417
+ }
418
+ },
419
+ customData: [new CustomData({key: "propertyName", value: "{" + this.P13N_MODEL + ">name}"}),
420
+ new CustomData({key: "propertyKind", value: "{" + this.P13N_MODEL + ">kind}"})]
421
+ })]});
422
+
423
+ aCells.push(oRemoveColumn);
424
+
425
+
426
+ var oListItem;
427
+ if (oObject.getObject() && oObject.getObject().template) {
428
+ var sKind = oObject.getObject().kind;
429
+ oListItem = new ColumnListItem({
430
+ cells: aCells,
431
+ visible: {
432
+ path: this.P13N_MODEL + ">/items",
433
+ formatter: function(aItems){
434
+ aItems = aItems.filter(function(oItem){return oItem.visible === false && oItem.template === false && oItem.kind === sKind;});
435
+ return aItems.length != 0;
436
+ }
437
+ }
438
+ });
439
+ } else {
440
+ oListItem = new ColumnListItem({
441
+ cells: aCells
442
+ });
443
+ }
444
+
445
+ oListItem.addEventDelegate({
446
+ onmouseover: this._hoverHandler.bind(this),
447
+ onfocusin: this._focusHandler.bind(this),
448
+ onkeydown: this._handleOnKeyDown.bind(this)
449
+ });
450
+
451
+ return oListItem;
452
+ };
453
+
454
+ //ACC realted stuff
455
+ ChartItemPanel.prototype._handleOnKeyDown = function(oEvent){
456
+ if (oEvent.keyCode === 38 && oEvent.ctrlKey){
457
+ //Ctrl+Arrow Up
458
+ //Move Up
459
+ //Disabled for now until further clarification
460
+ /*
461
+ if (this._oMoveUpButton && this._oMoveUpButton.getEnabled() && this._getMoveButtonContainer()){
462
+ this._onPressButtonMoveUp(oEvent, core.byId(oEvent.currentTarget.id));
463
+ }*/
464
+ } else if (oEvent.keyCode === 40 && oEvent.ctrlKey){
465
+ //Ctrl+Arrow Down
466
+ //Move Down
467
+ //Disabled for now until further clarification
468
+ /*
469
+ if (this._oMoveUpButton && this._oMoveDownButton.getEnabled() && this._getMoveButtonContainer()){
470
+ this._onPressButtonMoveDown(oEvent, core.byId(oEvent.currentTarget.id));
471
+ }*/
472
+ } else if (oEvent.keyCode === 68 && oEvent.ctrlKey){
473
+ //Ctrl+D
474
+ //Remove
475
+ var oRemoveBtn, oListItem = core.byId(oEvent.currentTarget.id);
476
+
477
+ if (this._bMobileMode) {
478
+ oRemoveBtn = oListItem.getCells()[1].getItems()[oListItem.getCells()[1].getItems().length - 1];
479
+ } else {
480
+ oRemoveBtn = oListItem.getCells()[2].getItems()[oListItem.getCells()[2].getItems().length - 1];
481
+ }
482
+
483
+ if (oRemoveBtn){
484
+ this._onPressHide(oEvent, oRemoveBtn);
485
+ oEvent.preventDefault();
486
+ }
487
+
488
+ }
489
+
490
+ };
491
+
492
+ ChartItemPanel.prototype._focusHandler = function(oEvt) {
493
+
494
+ var oTarget = core.byId(oEvt.target.id);
495
+
496
+ //Don't handle focus on button presses as this messes up event propagation
497
+ if (oTarget instanceof Button){
498
+ return;
499
+ }
500
+
501
+ BasePanel.prototype._focusHandler.apply(this, arguments);
502
+ };
503
+
504
+ ChartItemPanel.prototype._handleActivated = function(oHoveredItem) {
505
+ var oItem = this._getModelItemByTableItem(oHoveredItem);
506
+ if (oItem && oItem.template) {
507
+ this.removeMoveButtons();
508
+ }
509
+
510
+ this._oHoveredItem = oHoveredItem;
511
+ this._updateEnableOfMoveButtons(oHoveredItem, false);
512
+ this._addMoveButtons(oHoveredItem);
513
+ this._setMoveButtonVisibility(true);
514
+
515
+ };
516
+
517
+ ChartItemPanel.prototype.onChangeOfItemName = function(oEvent) {
518
+ var sPrevName = oEvent.getSource().data().prevName;
519
+ var sKind = oEvent.getSource().data().prevKind; //Can only select fields within same kind
520
+ var sNewName = oEvent.getSource().getSelectedKey();
521
+
522
+ var oPrevItem = this._getP13nModel().getProperty("/items").find(function(it){ return it.name === sPrevName && it.kind === sKind;});
523
+ var oNewItem = this._getP13nModel().getProperty("/items").find(function(it){ return it.name === sNewName && it.kind === sKind;});
524
+
525
+ this.removeMoveButtons();
526
+
527
+ if (oPrevItem && oNewItem) {
528
+
529
+ oPrevItem.visible = false;
530
+ oNewItem.visible = true;
531
+
532
+ oPrevItem.tempName = oPrevItem.name;
533
+
534
+ oNewItem.role = oPrevItem.role;
535
+ this._moveItemsByIndex(this._getItemIndex(oNewItem), this._getItemIndex(oPrevItem));
536
+
537
+ this._getP13nModel().refresh(true);
538
+
539
+ this._fireChangeItems();
540
+ }
541
+
542
+ };
543
+
544
+ ChartItemPanel.prototype._getItemIndexByNameAndKind = function(sName, sKind) {
545
+ var aFields = this._getP13nModel().getProperty("/items");
546
+ var oField = aFields.find(function(it){return (it.name === sName && it.kind === sKind && !it.template);});
547
+
548
+ return this._getItemIndex(oField);
549
+ };
550
+
551
+ ChartItemPanel.prototype._getItemIndex = function(oItem) {
552
+ return this._getP13nModel().getProperty("/items").indexOf(oItem);
553
+ };
554
+
555
+ ChartItemPanel.prototype.removeMoveButtons = function() {
556
+ var oMoveButtonBox = this._getMoveButtonContainer();
557
+
558
+ if (oMoveButtonBox){
559
+ oMoveButtonBox.removeItem(this._getMoveBottomButton());
560
+ oMoveButtonBox.removeItem(this._getMoveDownButton());
561
+ oMoveButtonBox.removeItem(this._getMoveUpButton());
562
+ oMoveButtonBox.removeItem(this._getMoveTopButton());
563
+ }
564
+
565
+ };
566
+
567
+ //Called on exit of panel; resets templates
568
+ ChartItemPanel.prototype.getP13nData = function() {
569
+
570
+ var aItems = this._getCleanP13nItems();
571
+
572
+ this._getP13nModel().setProperty("/items", aItems);
573
+
574
+ return aItems;
575
+ };
576
+
577
+ ChartItemPanel.prototype._getMoveButtonContainer = function() {
578
+ if (this._oMoveUpButton &&
579
+ this._oMoveUpButton.getParent() &&
580
+ this._oMoveUpButton.getParent().isA("sap.m.FlexBox")
581
+ ){
582
+ return this._oMoveUpButton.getParent();
583
+ }
584
+
585
+ return undefined;
586
+ };
587
+
588
+ ChartItemPanel.prototype._addMoveButtons = function(oItem) {
589
+ var oTableItem = oItem;
590
+ if (!oTableItem){
591
+ return;
592
+ }
593
+
594
+ var bIgnore = this._getP13nModel().getProperty(oTableItem.getBindingContextPath()) ? this._getP13nModel().getProperty(oTableItem.getBindingContextPath()).template : true;
595
+
596
+ if (!bIgnore){
597
+ if (this._bMobileMode){
598
+ oTableItem.getCells()[1].insertItem(this._getMoveDownButton(), 0);
599
+ oTableItem.getCells()[1].insertItem(this._getMoveUpButton(), 0);
600
+ } else {
601
+ oTableItem.getCells()[2].insertItem(this._getMoveBottomButton(), 0);
602
+ oTableItem.getCells()[2].insertItem(this._getMoveDownButton(), 0);
603
+ oTableItem.getCells()[2].insertItem(this._getMoveUpButton(), 0);
604
+ oTableItem.getCells()[2].insertItem(this._getMoveTopButton(), 0);
605
+ }
606
+
607
+ }
608
+ };
609
+
610
+ ChartItemPanel.prototype._moveSelectedItem = function(){
611
+ this._oSelectedItem = this._getMoveButtonContainer().getParent();
612
+
613
+ BasePanel.prototype._moveSelectedItem.apply(this, arguments);
614
+ };
615
+
616
+
617
+ ChartItemPanel.prototype._updateAvailableRolesForItems = function() {
618
+ var aItems = this._getP13nModel().getProperty("/items");
619
+ var aAllowedRoles = [];
620
+ if (this.getPanelConfig() && this.getPanelConfig().allowedLayoutOptions) {
621
+ aAllowedRoles = this.getPanelConfig().allowedLayoutOptions;
622
+ } else {
623
+ Log.warning("No allowedLayoutOptions configured for chart type. This will not show any p13n options!");
624
+ }
625
+
626
+
627
+ aItems.forEach(function(oItem){
628
+
629
+ if (!oItem.availableRoles) {
630
+ return;
631
+ }
632
+
633
+ oItem.availableRoles = oItem.availableRoles.filter(function(it){return aAllowedRoles.indexOf(it.key) != -1;});
634
+ });
635
+
636
+ this._getP13nModel().setProperty("/items", aItems);
637
+ this._getP13nModel().refresh(true);
638
+ };
639
+
640
+ ChartItemPanel.prototype._onPressHide = function(oEvent, oRemoveBtn) {
641
+
642
+ var sPropertyName;
643
+ if (oRemoveBtn) {
644
+ sPropertyName = oRemoveBtn.data().propertyName;
645
+ } else {
646
+ sPropertyName = oEvent.getSource().data().propertyName;
647
+ }
648
+
649
+ var aItems = jQuery.extend([], this._getP13nModel().getProperty("/items"), true);
650
+
651
+ aItems.filter(function(it){return it.name === sPropertyName;}).forEach(function(oItem){
652
+ oItem.visible = false;
653
+ //Used to set focus on template row after re-render of table
654
+ if (this._mTemplatesMap.has(oItem.kind) && this._mTemplatesMap.get(oItem.kind).getVisible()){
655
+ this._mTemplatesMap.get(oItem.kind).focus();
656
+ }
657
+ }.bind(this));
658
+
659
+ this._getP13nModel().setProperty("/items", aItems);
660
+ this._getP13nModel().refresh(true);
661
+ this._fireChangeItems();
662
+ this._updateVisibleIndexes();
663
+ };
664
+
665
+ ChartItemPanel.prototype.setP13nData = function(aP13nData){
666
+
667
+ //Clear previous templates (if any)
668
+ aP13nData = aP13nData.filter(function(it){return !it.template;});
669
+
670
+ BasePanel.prototype.setP13nData.apply(this, arguments);
79
671
 
80
672
  var aItems = [];
673
+ var aAddableItems = [];
81
674
 
82
- this.getP13nModel().getProperty("/items").forEach(function(oItem){
675
+ this.getP13nData().forEach(function(oItem, iIndex){
83
676
  if (!oItem.availableRoles) {
84
677
  oItem.availableRoles = this._getChartItemTextByKey(oItem.kind);
85
678
  }
679
+
680
+ if (this.getPanelConfig() && this.getPanelConfig().allowedLayoutOptions) {
681
+ var aAllowedRoles = this.getPanelConfig().allowedLayoutOptions;
682
+
683
+ if (aAllowedRoles && aAllowedRoles.length >= 1) {
684
+ oItem.availableRoles = oItem.availableRoles.filter(function(it){return aAllowedRoles.indexOf(it.key) != -1;});
685
+
686
+ //Reset if an invalid role is selected
687
+ if (aAllowedRoles.indexOf(oItem.role) === -1) {
688
+ oItem.role = aAllowedRoles[0];
689
+ }
690
+ }
691
+ }
692
+
693
+ oItem.template = false;
694
+ //Used for comboboxes renaming
695
+ oItem.tempName = oItem.name;
696
+
697
+ if (!oItem.visible){
698
+ aAddableItems.push(oItem);
699
+ }
700
+
701
+ if (!oItem.index) {
702
+ oItem.index = iIndex;
703
+ }
704
+
86
705
  aItems.push(oItem);
87
706
  }.bind(this));
88
707
 
89
- this.getP13nModel().setProperty("/items", aItems);
708
+ aItems = aItems.concat(this._getTemplateItems());
709
+
710
+ this._getP13nModel().setProperty("/items", aItems);
711
+ this._updateVisibleIndexes();
712
+ };
713
+
714
+ ChartItemPanel.prototype._updateVisibleIndexes = function() {
715
+ this._mVisibleIndexes = new Map();
716
+
717
+ this._getP13nModel().getProperty("/items").forEach(function(oItem, _iIndex){
718
+
719
+ if (oItem.template || !oItem.visible) {
720
+ return;
721
+ }
722
+
723
+ if (this._mVisibleIndexes.has(oItem.kind)){
724
+ this._mVisibleIndexes.get(oItem.kind).push(_iIndex);
725
+ } else {
726
+ var aIndexes = [_iIndex];
727
+ this._mVisibleIndexes.set(oItem.kind, aIndexes);
728
+ }
729
+ }.bind(this));
730
+
731
+ };
732
+
733
+ ChartItemPanel.prototype.onChangeOfTemplateName = function(oEvent){
734
+
735
+ var sSelectedName = oEvent.getSource().getSelectedKey();
736
+
737
+ var oSelectedItem = this._getCleanP13nItems().find(function(it){ return it.name === sSelectedName;});
738
+
739
+ if (oSelectedItem){
740
+ oSelectedItem.visible = true;
741
+
742
+ oEvent.getSource().setSelectedKey(undefined);
743
+ this._getP13nModel().refresh(true);
744
+
745
+ var aIndexes = this._mVisibleIndexes.has(oSelectedItem.kind) ? this._mVisibleIndexes.get(oSelectedItem.kind) : [];
746
+ var iOldIndex = this._getItemIndexByNameAndKind(oSelectedItem.name, oSelectedItem.kind);
747
+ var iNewIndex = aIndexes[aIndexes.length - 1];
748
+
749
+ if (iOldIndex > iNewIndex) {
750
+ iNewIndex += 1;
751
+ }
752
+
753
+ if (iNewIndex && iOldIndex != iNewIndex) {
754
+ this._moveItemsByIndex(iOldIndex, iNewIndex, true);
755
+ } else {
756
+ this._fireChangeItems(); //Otherwise already fired by _moveItemsByIndex
757
+ }
758
+
759
+
760
+ this._updateVisibleIndexes();
761
+ } else {
762
+ oEvent.getSource().setSelectedKey(undefined);
763
+ }
764
+
765
+ };
766
+
767
+ ChartItemPanel.prototype._getTemplateItems = function() {
768
+ var aItems = [];
769
+
770
+ if (!this.getPanelConfig() || !this.getPanelConfig().templateConfig){
771
+ return [];
772
+ }
773
+
774
+ this.getPanelConfig().templateConfig.forEach(function(oTemplateConfig){
775
+ var oItem = {template: true, kind: oTemplateConfig.kind};
776
+
777
+ aItems.push(oItem);
778
+ });
779
+
780
+ return aItems;
781
+ };
782
+
783
+ ChartItemPanel.prototype._getListControlConfig = function(){
784
+ var oConfig = BasePanel.prototype._getListControlConfig.apply(this, arguments);
785
+
786
+ if (this._bMobileMode){
787
+ oConfig.columns = [new Column({
788
+ header: new Text({
789
+ text: this._getResourceTextMDC("chart.PERSONALIZATION_DIALOG_COLUMN_DESCRIPTION") + " / " + this._getResourceTextMDC("chart.PERSONALIZATION_DIALOG_COLUMN_ROLE")
790
+ })
791
+ }), new Column()];
792
+ } else {
793
+
794
+ var oDescColumn = new Column({
795
+ header: new Text({
796
+ text: this._getResourceTextMDC("chart.PERSONALIZATION_DIALOG_COLUMN_DESCRIPTION")
797
+ })
798
+ });
799
+
800
+ var oRoleColumn = new Column({
801
+ header: new Text({
802
+ text: this._getResourceTextMDC("chart.PERSONALIZATION_DIALOG_COLUMN_ROLE")
803
+ })
804
+ });
805
+ oConfig.columns = [oDescColumn, oRoleColumn, new Column()];
806
+ }
807
+
808
+ oConfig.mode = "None";
809
+ return oConfig;
810
+ };
811
+
812
+ ChartItemPanel.prototype._getCleanP13nItems = function() {
813
+ return this._getP13nModel().getProperty("/items").filter(function(it){return !it.template;});
814
+ };
815
+
816
+ ChartItemPanel.prototype._fireChangeItems = function() {
817
+
818
+ this.fireChangeItems({
819
+ items: this._getCleanP13nItems().map(function(oMItem) {
820
+ return {
821
+ columnKey: oMItem.name,
822
+ visible: oMItem.visible,
823
+ index: oMItem.index,
824
+ role: oMItem.role
825
+ };
826
+ })
827
+ });
90
828
 
91
829
  };
92
830
 
@@ -94,11 +832,313 @@ sap.ui.define([
94
832
  var oSelectedItem = oEvent.getParameter("selectedItem");
95
833
  // Fire event only for valid selection
96
834
  if (oSelectedItem) {
97
- var oTableItem = oEvent.getSource().getParent();
835
+
836
+ var oTableItem;
837
+
838
+ if (this._bMobileMode){
839
+ oTableItem = oEvent.getSource().getParent().getParent();
840
+ } else {
841
+ oTableItem = oEvent.getSource().getParent();
842
+ }
98
843
 
99
844
  this.fireChange();
100
845
  this._updateEnableOfMoveButtons(oTableItem);
101
846
  }
847
+
848
+ this._fireChangeItems();
849
+ };
850
+
851
+ ChartItemPanel.prototype._updateEnableOfMoveButtons = function(oTableItem, bFocus) {
852
+
853
+ if (!oTableItem) {
854
+ return;
855
+ }
856
+
857
+ var aIndexes, oMItem = this._getModelItemByTableItem(oTableItem);
858
+ var iTableItemPos = this._getP13nModel().getProperty("/items").indexOf(oMItem);
859
+ var bUpEnabled = true, bDownEnabled = true;
860
+
861
+ if (!oMItem || oMItem.template) {
862
+ return;
863
+ }
864
+
865
+ aIndexes = this._mVisibleIndexes.has(oMItem.kind) ? this._mVisibleIndexes.get(oMItem.kind) : [];
866
+
867
+ if (iTableItemPos == 0 || aIndexes.indexOf(iTableItemPos) === 0 ) {
868
+ // disable move buttons upwards, if the item is at the top
869
+ bUpEnabled = false;
870
+ }
871
+
872
+ if (aIndexes.indexOf(iTableItemPos) === aIndexes.length - 1 ) {
873
+ bDownEnabled = false;
874
+ }
875
+
876
+ this._getMoveTopButton().setEnabled(bUpEnabled);
877
+ this._getMoveUpButton().setEnabled(bUpEnabled);
878
+ this._getMoveDownButton().setEnabled(bDownEnabled);
879
+ this._getMoveBottomButton().setEnabled(bDownEnabled);
880
+
881
+ if (bFocus) {
882
+ //Table re-renders after reorder; this is used in onAfterRendering
883
+ this._oFocusInfo = {tableItem : oTableItem};
884
+ }
885
+ };
886
+
887
+ ChartItemPanel.prototype._getListItemFromMoveButton = function (oBtn) {
888
+ if (oBtn && oBtn.getParent() && oBtn.getParent().getParent()) {
889
+ return oBtn.getParent().getParent();
890
+ }
891
+
892
+ return undefined;
893
+ };
894
+
895
+ ChartItemPanel.prototype._onPressButtonMoveToTop = function(oEvent) {
896
+ var oListItem = this._getListItemFromMoveButton(oEvent.getSource());
897
+ if (!oListItem){
898
+ return;
899
+ }
900
+ var oMItem = this._getP13nModel().getProperty(oListItem.getBindingContextPath());
901
+ var oTopIndex = this._mVisibleIndexes.get(oMItem.kind)[0];
902
+
903
+ this._oSelectedItem = oListItem;
904
+
905
+ this._moveSelectedItem(oTopIndex);
906
+ };
907
+
908
+ ChartItemPanel.prototype._onPressButtonMoveUp = function(oEvent, oListItem) {
909
+ if (!oListItem){
910
+ oListItem = this._getListItemFromMoveButton(oEvent.getSource());
911
+ }
912
+
913
+ if (!oListItem){
914
+ return;
915
+ }
916
+ var oMItem = this._getP13nModel().getProperty(oListItem.getBindingContextPath());
917
+ var aIndexes = this._mVisibleIndexes.get(oMItem.kind);
918
+ var iTableItemPos = this._getP13nModel().getProperty("/items").indexOf(oMItem);
919
+
920
+ this._oSelectedItem = oListItem;
921
+
922
+ //TODO: Get current index
923
+ var oNewIndex = aIndexes[aIndexes.indexOf(iTableItemPos) - 1];
924
+
925
+ this._moveSelectedItem(oNewIndex);
926
+ };
927
+
928
+ ChartItemPanel.prototype._onPressButtonMoveDown = function(oEvent, oListItem) {
929
+ if (!oListItem){
930
+ oListItem = this._getListItemFromMoveButton(oEvent.getSource());
931
+ }
932
+
933
+ if (!oListItem){
934
+ return;
935
+ }
936
+ var oMItem = this._getP13nModel().getProperty(oListItem.getBindingContextPath());
937
+ var aIndexes = this._mVisibleIndexes.get(oMItem.kind);
938
+ var iTableItemPos = this._getP13nModel().getProperty("/items").indexOf(oMItem);
939
+
940
+ this._oSelectedItem = oListItem;
941
+
942
+ //TODO: Get current index
943
+ var oNewIndex = aIndexes[aIndexes.indexOf(iTableItemPos) + 1];
944
+
945
+ this._moveSelectedItem(oNewIndex);
946
+ };
947
+
948
+ ChartItemPanel.prototype._onPressButtonMoveToBottom = function(oEvent) {
949
+
950
+ var oListItem = this._getListItemFromMoveButton(oEvent.getSource());
951
+ if (!oListItem){
952
+ return;
953
+ }
954
+ var oMItem = this._getP13nModel().getProperty(oListItem.getBindingContextPath());
955
+ var oBottomIndex = this._mVisibleIndexes.get(oMItem.kind)[this._mVisibleIndexes.get(oMItem.kind).length - 1];
956
+
957
+ this._oSelectedItem = oListItem;
958
+ this._moveSelectedItem(oBottomIndex);
959
+ };
960
+
961
+ ChartItemPanel.prototype._moveTableItem = function(oItem, iNewIndex) {
962
+ var aFields = this._getP13nModel().getProperty("/items");
963
+
964
+ // index of the item in the model not the index in the aggregation
965
+ var iOldIndex = aFields.indexOf(oItem.getBindingContext(this.P13N_MODEL).getObject());
966
+
967
+ this._moveItemsByIndex(iOldIndex, iNewIndex);
968
+ };
969
+
970
+ ChartItemPanel.prototype._moveItemsByIndex = function(iOldIndex, iNewIndex, bPreventFocusHandling) {
971
+ var aFields = this._getP13nModel().getProperty("/items");
972
+
973
+ // limit the minumum and maximum index
974
+ iNewIndex = (iNewIndex <= 0) ? 0 : Math.min(iNewIndex, aFields.length - 1);
975
+
976
+ if (iNewIndex == iOldIndex) {
977
+ return;
978
+ }
979
+
980
+ // remove data from old position and insert it into new position
981
+ aFields.splice(iNewIndex, 0, aFields.splice(iOldIndex, 1)[0]);
982
+ aFields.forEach(function(oField, iIndex){
983
+ if (!oField.template) {
984
+ oField.index = iIndex;
985
+ }
986
+ });
987
+ this._getP13nModel().setProperty("/items", aFields);
988
+
989
+ if (!bPreventFocusHandling){
990
+ // store the moved item again due to binding
991
+ this._oSelectedItem = this._oListControl.getItems().find(function(it){
992
+ var oItem = this._getModelItemByTableItem(it);
993
+
994
+ return oItem && oItem === aFields[iNewIndex];
995
+
996
+ }.bind(this));
997
+
998
+ this._updateEnableOfMoveButtons(this._oSelectedItem, !bPreventFocusHandling);
999
+
1000
+ this._handleActivated(this._oSelectedItem);
1001
+ }
1002
+
1003
+ this._fireChangeItems();
1004
+ };
1005
+
1006
+ ChartItemPanel.prototype._getModelItemByTableItem = function (oTableItem) {
1007
+ return this._getP13nModel().getProperty(oTableItem.getBindingContextPath());
1008
+ };
1009
+ //TODO: Check from here on for kind
1010
+
1011
+ ChartItemPanel.prototype._getMoveConfigForTableItem = function(oTableItem) {
1012
+
1013
+ var oModelItem = this._getModelItemByTableItem(oTableItem);
1014
+
1015
+ if (!oModelItem) {
1016
+ return undefined;
1017
+ }
1018
+
1019
+ return {
1020
+ currentIndex: this._getP13nModel().getProperty("/items").indexOf(oModelItem),
1021
+ aggregationRole: oModelItem.kind,
1022
+ template: oModelItem.template
1023
+ };
1024
+ };
1025
+
1026
+ ChartItemPanel.prototype._getDragDropConfig = function () {
1027
+ if (!this._oDragDropInfo) {
1028
+ var oDndConfig = BasePanel.prototype._getDragDropConfig.apply(this, arguments);
1029
+
1030
+ oDndConfig.attachDragStart(this._checkDragStart.bind(this));
1031
+ oDndConfig.attachDragEnter(this._checkDrag.bind(this));
1032
+ oDndConfig.attachDragEnd(function() {
1033
+ this._oDraggedItem = null;
1034
+ }.bind(this));
1035
+
1036
+ return oDndConfig;
1037
+ }
1038
+
1039
+ return this._oDragDropInfo;
1040
+ };
1041
+
1042
+ ChartItemPanel.prototype._checkDrag = function(oEvent) {
1043
+ var oEventItem = oEvent.getParameter("target");
1044
+ var oMoveConfigEvent = this._getMoveConfigForTableItem(oEventItem);
1045
+ var oMoveConfigDragged = this._getMoveConfigForTableItem(this._oDraggedItem);
1046
+
1047
+ //Prevents template from being draggable
1048
+ if (!oMoveConfigEvent || oMoveConfigEvent.template || oMoveConfigDragged.aggregationRole != oMoveConfigEvent.aggregationRole) {
1049
+ oEvent.preventDefault();
1050
+ return;
1051
+ }
1052
+ };
1053
+
1054
+ ChartItemPanel.prototype._checkDragStart = function(oEvent) {
1055
+ this._oDraggedItem = oEvent.getParameter("target");
1056
+
1057
+ this._checkDrag(oEvent);
1058
+ };
1059
+
1060
+ ChartItemPanel.prototype._onRearrange = function(oEvent) {
1061
+ var oDraggedItem = oEvent.getParameter("draggedControl");
1062
+ var oDroppedItem = oEvent.getParameter("droppedControl");
1063
+ var sDropPosition = oEvent.getParameter("dropPosition");
1064
+
1065
+ var oMoveConfigDragged = this._getMoveConfigForTableItem(oDraggedItem);
1066
+ var oMoveConfigDropped = this._getMoveConfigForTableItem(oDroppedItem);
1067
+
1068
+ if (!oMoveConfigDragged || oMoveConfigDragged.template || !oMoveConfigDropped) {
1069
+ oEvent.preventDefault();
1070
+ return;
1071
+ }
1072
+
1073
+ var iDraggedIndex = oMoveConfigDragged.currentIndex;
1074
+ var iDroppedIndex = oMoveConfigDropped.currentIndex;
1075
+
1076
+ if (oMoveConfigDropped.template && sDropPosition == "After") {
1077
+ oEvent.preventDefault();
1078
+ return;
1079
+ }
1080
+
1081
+ if (!oMoveConfigDropped.template &&
1082
+ (
1083
+ oMoveConfigDragged.aggregationRole != undefined &&
1084
+ oMoveConfigDragged.aggregationRole != oMoveConfigDropped.aggregationRole)) {
1085
+ oEvent.preventDefault();
1086
+ return;
1087
+ }
1088
+
1089
+ //When an item gets dragged into the same "direction" it come from inside the array, an offset is needed
1090
+ if (iDraggedIndex < iDroppedIndex) {
1091
+ if (sDropPosition == "Before" && iDroppedIndex != 0) {
1092
+ iDroppedIndex -= 1;
1093
+ }
1094
+
1095
+ //Max index not needed here since draggedIndex must be greater than dropped index -> can't be dropped at max
1096
+ } else if (sDropPosition == "After") {
1097
+
1098
+ iDroppedIndex += 1;
1099
+ }
1100
+
1101
+ this._moveItemsByIndex(iDraggedIndex, iDroppedIndex);
1102
+
1103
+ this._getP13nModel().refresh(true);
1104
+ this._updateVisibleIndexes();
1105
+
1106
+ };
1107
+
1108
+ ChartItemPanel.prototype._getMoveTopButton = function() {
1109
+
1110
+ if (this._oMoveTopBtn && this._oMoveTopBtn.isDestroyed()) {
1111
+ this._oMoveTopBtn = null;
1112
+ }
1113
+
1114
+ return BasePanel.prototype._getMoveTopButton.apply(this, arguments);
1115
+ };
1116
+
1117
+ ChartItemPanel.prototype._getMoveUpButton = function() {
1118
+
1119
+ if (this._oMoveUpButton && this._oMoveUpButton.isDestroyed()) {
1120
+ this._oMoveUpButton = null;
1121
+ }
1122
+
1123
+ return BasePanel.prototype._getMoveUpButton.apply(this, arguments);
1124
+ };
1125
+
1126
+ ChartItemPanel.prototype._getMoveDownButton = function() {
1127
+
1128
+ if (this._oMoveDownButton && this._oMoveDownButton.isDestroyed()) {
1129
+ this._oMoveDownButton = null;
1130
+ }
1131
+
1132
+ return BasePanel.prototype._getMoveDownButton.apply(this, arguments);
1133
+ };
1134
+
1135
+ ChartItemPanel.prototype._getMoveBottomButton = function() {
1136
+
1137
+ if (this._oMoveBottomButton && this._oMoveBottomButton.isDestroyed()) {
1138
+ this._oMoveBottomButton = null;
1139
+ }
1140
+
1141
+ return BasePanel.prototype._getMoveBottomButton.apply(this, arguments);
102
1142
  };
103
1143
 
104
1144
  ChartItemPanel.prototype._getChartItemTextByKey = function (sKey) {
@@ -132,6 +1172,11 @@ sap.ui.define([
132
1172
  return oAvailableRoles[sKey];
133
1173
  };
134
1174
 
1175
+ ChartItemPanel.prototype._getResourceTextMDC = function(sText, vValue) {
1176
+ this.oResourceBundleMDC = this.oResourceBundleMDC ? this.oResourceBundleMDC : sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
1177
+ return sText ? this.oResourceBundleMDC.getText(sText, vValue) : this.oResourceBundleMDC;
1178
+ };
1179
+
135
1180
  return ChartItemPanel;
136
1181
 
137
- });
1182
+ });