@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,6 +5,7 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ 'sap/base/util/array/diff',
8
9
  'sap/ui/base/Object',
9
10
  'sap/ui/mdc/p13n/FlexUtil',
10
11
  'sap/ui/mdc/p13n/P13nBuilder',
@@ -12,18 +13,22 @@ sap.ui.define([
12
13
  'sap/base/util/deepEqual',
13
14
  'sap/ui/model/json/JSONModel',
14
15
  'sap/m/p13n/SelectionPanel'
15
- ], function (BaseObject, FlexUtil, P13nBuilder, merge, deepEqual, JSONModel, SelectionPanel) {
16
+ ], function (diff, BaseObject, FlexUtil, P13nBuilder, merge, deepEqual, JSONModel, SelectionPanel) {
16
17
  "use strict";
17
18
 
18
- /**
19
- * Constructor for a new BaseController. The BaseController serves as
20
- * base class to create control specific personalization implementations.
19
+ /**
20
+ * Constructor for a new <code>BaseController</code>.
21
+ *
22
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
23
+ * @param {object} [mSettings] Initial settings for the new control
21
24
  *
22
25
  * @class
26
+ * The <code>BaseController</code> serves as base class to create control specific personalization implementations.
27
+ *
23
28
  * @extends sap.ui.base.Object
24
29
  *
25
30
  * @author SAP SE
26
- * @version 1.97.1
31
+ * @version 1.100.0
27
32
  *
28
33
  * @private
29
34
  * @ui5-restricted sap.ui.mdc
@@ -66,7 +71,7 @@ sap.ui.define([
66
71
  /**
67
72
  * Defines whether a Dialog (Change creation on 'OK') or a Popover (liveChanges) should be used.
68
73
  *
69
- * @returns {boolean}
74
+ * @returns {boolean} Determines if the livemode should be enabled
70
75
  */
71
76
  BaseController.prototype.getLiveMode = function(){
72
77
  return this._bLiveMode;
@@ -88,12 +93,21 @@ sap.ui.define([
88
93
  /**
89
94
  * Defines whether the container should include a reset.
90
95
  *
91
- * @returns {boolean}
96
+ * @returns {boolean} Determines if the reset should be enabled
92
97
  */
93
98
  BaseController.prototype.getResetEnabled = function() {
94
99
  return this._bResetEnabled;
95
100
  };
96
101
 
102
+ /**
103
+ * Defines which control(s) are considered for the reset.
104
+ *
105
+ * @returns {sap.ui.core.Control|sap.ui.core.Control[]}
106
+ */
107
+ BaseController.prototype.getSelectorForReset = function() {
108
+ return this._oAdaptationControl;
109
+ };
110
+
97
111
  BaseController.prototype.sanityCheck = function(oState) {
98
112
  return oState;
99
113
  };
@@ -101,6 +115,7 @@ sap.ui.define([
101
115
  /**
102
116
  * The actual UI used for personalization.
103
117
  *
118
+ * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The property helper instance
104
119
  * @returns {sap.ui.core.Control|string|Promise} The control which is going to be used in the p13n container.
105
120
  */
106
121
  BaseController.prototype.getAdaptationUI = function(oPropertyHelper){
@@ -133,12 +148,137 @@ sap.ui.define([
133
148
  if (deepEqual(mPropertyBag.existingState, aNewStatePrepared)){
134
149
  return [];
135
150
  } else {
136
- return FlexUtil.getArrayDeltaChanges(mPropertyBag);
151
+ return this.getArrayDeltaChanges(mPropertyBag);
152
+ }
153
+
154
+ };
155
+
156
+ /**
157
+ * Generates a set of changes based on the given arrays for a specified control
158
+ *
159
+ * @public
160
+ *
161
+ * @param {object} mDeltaInfo Map containing the necessary information to calculate the diff as change objects
162
+ * @param {array} mDeltaInfo.existingState An array describing the control state before a adaptation
163
+ * @param {array} mDeltaInfo.changedState An array describing the control state after a certain adaptation
164
+ * @param {object} mDeltaInfo.control Control instance which is being used to generate the changes
165
+ * @param {object} mDeltaInfo.changeOperations Map containing the changeOperations for the given Control instance
166
+ * @param {string} mDeltaInfo.changeOperations.add Name of the control specific 'add' changehandler
167
+ * @param {string} mDeltaInfo.changeOperations.remove Name of the control specific 'remove' changehandler
168
+ * @param {string} [mDeltaInfo.changeOperations.move] Name of the control specific 'move' changehandler
169
+ * @param {string} [mDeltaInfo.generator] Name of the change generator (E.g. the namespace of the UI creating the change object)
170
+ *
171
+ * @returns {array} Array containing the delta based created changes
172
+ */
173
+ BaseController.prototype.getArrayDeltaChanges = function (mDeltaInfo) {
174
+
175
+ var aExistingArray = mDeltaInfo.existingState;
176
+ var aChangedArray = mDeltaInfo.changedState;
177
+ var oControl = mDeltaInfo.control;
178
+ var sInsertOperation = mDeltaInfo.changeOperations.add;
179
+ var sRemoveOperation = mDeltaInfo.changeOperations.remove;
180
+ var sMoveOperation = mDeltaInfo.changeOperations.move;
181
+ var sGenerator = mDeltaInfo.generator;
182
+
183
+ var aDeltaAttributes = mDeltaInfo.deltaAttributes || [];
184
+
185
+ var fnSymbol = function(o) {
186
+ var sDiff = "";
187
+ aDeltaAttributes.forEach(function(sAttribute){
188
+ sDiff = sDiff + o[sAttribute];
189
+ });
190
+ return sDiff;
191
+ };
192
+
193
+ var aResults = diff(aExistingArray, aChangedArray, fnSymbol);
194
+ // Function to match field with exising field in the given array
195
+ var fMatch = function (oField, aArray) {
196
+ return aArray.filter(function (oExistingField) {
197
+ return oExistingField && (oExistingField.name === oField.name);
198
+ })[0];
199
+ };
200
+
201
+ var aChanges = [];
202
+ var aProcessedArray = aExistingArray.slice(0);
203
+
204
+ aResults.forEach(function (oResult) {
205
+ // Begin --> hack for handling result returned by diff
206
+ if (oResult.type === "delete" && aProcessedArray[oResult.index] === undefined) {
207
+ aProcessedArray.splice(oResult.index, 1);
208
+ return;
209
+ }
210
+
211
+ var oProp, oExistingProp, iLength;
212
+ if (oResult.type === "insert") {
213
+ oExistingProp = fMatch(aChangedArray[oResult.index], aProcessedArray);
214
+ if (oExistingProp) {
215
+ oExistingProp.index = aProcessedArray.indexOf(oExistingProp);
216
+ aProcessedArray.splice(oExistingProp.index, 1, undefined);
217
+ aChanges = aChanges.concat(this._createAddRemoveChange(oControl, sRemoveOperation, FlexUtil._getChangeContent(oExistingProp, aDeltaAttributes), sGenerator));
218
+ }
219
+ }
220
+ // End hack
221
+ oProp = oResult.type === "delete" ? aProcessedArray[oResult.index] : aChangedArray[oResult.index];
222
+ oProp.index = oResult.index;
223
+ if (oResult.type === "delete") {
224
+ aProcessedArray.splice(oProp.index, 1);
225
+ } else {
226
+ aProcessedArray.splice(oProp.index, 0, oProp);
227
+ }
228
+ // Move operation shows up as insert followed by delete OR delete followed by insert
229
+ if (sMoveOperation) {
230
+ iLength = aChanges.length;
231
+ // Get the last added change
232
+ if (iLength) {
233
+ oExistingProp = aChanges[iLength - 1];
234
+ oExistingProp = oExistingProp ? oExistingProp.changeSpecificData.content : undefined;
235
+ }
236
+ // Matching property exists with a different index --> then this is a move operation
237
+ if (oExistingProp && oExistingProp.name === oProp.name && oResult.index != oExistingProp.index) {
238
+ // remove the last insert/delete operation
239
+ aChanges.pop();
240
+ aChanges = aChanges.concat(this._createMoveChange(oExistingProp.id, oExistingProp.name, oResult.index, sMoveOperation, oControl, sMoveOperation !== "moveSort", sGenerator));
241
+ return;
242
+ }
243
+ }
244
+
245
+ aChanges = aChanges.concat(this._createAddRemoveChange(oControl, oResult.type === "delete" ? sRemoveOperation : sInsertOperation, FlexUtil._getChangeContent(oProp, aDeltaAttributes), sGenerator));
246
+
247
+ }.bind(this));
248
+ return aChanges;
249
+ };
250
+
251
+ BaseController.prototype._createAddRemoveChange = function(oControl, sOperation, oContent){
252
+ var oAddRemoveChange = {
253
+ selectorElement: oControl,
254
+ changeSpecificData: {
255
+ changeType: sOperation,
256
+ content: oContent
257
+ }
258
+ };
259
+ return oAddRemoveChange;
260
+ };
261
+
262
+ BaseController.prototype._createMoveChange = function(sId, sPropertyName, iNewIndex, sMoveOperation, oControl, bPersistId){
263
+ var oMoveChange = {
264
+ selectorElement: oControl,
265
+ changeSpecificData: {
266
+ changeType: sMoveOperation,
267
+ content: {
268
+ id: sId,
269
+ name: sPropertyName,
270
+ index: iNewIndex
271
+ }
272
+ }
273
+ };
274
+
275
+ if (!bPersistId) {
276
+ delete oMoveChange.changeSpecificData.content.id;
137
277
  }
138
278
 
279
+ return oMoveChange;
139
280
  };
140
281
 
141
- //TODO: check if this can be avoided
142
282
  BaseController.prototype._getPresenceAttribute = function(bexternalAppliance){
143
283
  return "visible";
144
284
  };
@@ -157,6 +297,7 @@ sap.ui.define([
157
297
  * Initialized the inner model for the Personalization.
158
298
  *
159
299
  * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The propertyhelper that should be utilized for property determination.
300
+ * @returns {object} The personalization model data
160
301
  */
161
302
  BaseController.prototype.mixInfoAndState = function(oPropertyHelper) {
162
303
 
@@ -191,6 +332,8 @@ sap.ui.define([
191
332
 
192
333
  /**
193
334
  * Can be used to trigger update after UI interactions such as "Ok" and "Reset"
335
+ *
336
+ * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The property helper instance
194
337
  */
195
338
  BaseController.prototype.update = function(oPropertyHelper) {
196
339
  if (this._oPanel) {
@@ -204,8 +347,6 @@ sap.ui.define([
204
347
  }
205
348
  };
206
349
 
207
-
208
- //TODO: move to FlexUtil? --> Split FlexUtil<>DeltaUtil
209
350
  BaseController.prototype._getFilledArray = function(aPreviousItems, aNewItems, sRemoveProperty) {
210
351
  var aNewItemsPrepared = merge([], aPreviousItems);
211
352
  var aNewItemState = merge([], aNewItems);
@@ -235,6 +376,10 @@ sap.ui.define([
235
376
  };
236
377
 
237
378
  /**
379
+ *
380
+ * Getter for the personalization model
381
+ *
382
+ * @param {sap.ui.mdc.util.PropertyHelper} oPropertyHelper The property helper instance
238
383
  * @returns {sap.ui.model.json.JSONModel} The personalization model.
239
384
  *
240
385
  */
@@ -6,10 +6,8 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "./BaseController",
9
- "sap/ui/mdc/p13n/P13nBuilder",
10
- "sap/base/util/UriParameters",
11
- "sap/ui/mdc/p13n/panels/ChartItemPanel"
12
- ], function (BaseController, P13nBuilder, UriParameters, ChartItemPanel) {
9
+ "sap/ui/mdc/p13n/P13nBuilder"
10
+ ], function (BaseController, P13nBuilder) {
13
11
  "use strict";
14
12
 
15
13
  var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
@@ -18,36 +16,27 @@ sap.ui.define([
18
16
 
19
17
  ChartItemController.prototype.getAdaptationUI = function(oPropertyHelper) {
20
18
 
21
- if (UriParameters.fromQuery(window.location.search).get("newChartP13n") === "true"){
19
+ var fnResolve;
22
20
 
23
- var fnResolve;
21
+ this._oAdaptationControl.getAdaptationUI().then(function(oPanel){
22
+ this._oPanel = oPanel;
23
+ this._oPropHelper = oPropertyHelper;
24
+ var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
25
+ oPanel.setP13nData(oAdaptationData.items);
26
+ fnResolve(oPanel);
27
+ }.bind(this));
24
28
 
25
- this._oAdaptationControl.getAdaptationUI().then(function(oPanel){
26
- this._oPanel = oPanel;
27
- this._oPropHelper = oPropertyHelper;
28
- var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
29
- oPanel.setP13nData(oAdaptationData.items);
30
- fnResolve(oPanel);
31
- }.bind(this));
32
-
33
- return new Promise(function (resolve, reject) {
34
- fnResolve = resolve;
35
- });
36
-
37
- } else {
38
- var oChartItemPanel = new ChartItemPanel();
39
- oChartItemPanel.setP13nModel(this._getP13nModel(oPropertyHelper));
40
- return Promise.resolve(oChartItemPanel);
41
- }
29
+ return new Promise(function (resolve, reject) {
30
+ fnResolve = resolve;
31
+ });
42
32
 
43
33
  };
44
34
 
45
35
  ChartItemController.prototype.update = function(){
46
36
  BaseController.prototype.update.apply(this, arguments);
47
37
 
48
- if (UriParameters.fromQuery(window.location.search).get("newChartP13n") === "true"){
49
- this._oPanel.setP13nData(this.mixInfoAndState(this._oPropHelper).items);
50
- }
38
+ this._oPanel.setP13nData(this.mixInfoAndState(this._oPropHelper).items);
39
+
51
40
  };
52
41
 
53
42
  ChartItemController.prototype.getDelta = function(mPropertyBag) {
@@ -10,7 +10,12 @@ sap.ui.define([
10
10
  "use strict";
11
11
 
12
12
  var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
13
- var ColumnController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.ColumnController");
13
+ var ColumnController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.ColumnController", {
14
+ constructor: function() {
15
+ BaseController.apply(this, arguments);
16
+ this._bResetEnabled = true;
17
+ }
18
+ });
14
19
 
15
20
  ColumnController.prototype.getUISettings = function() {
16
21
  return {
@@ -19,10 +24,6 @@ sap.ui.define([
19
24
  };
20
25
  };
21
26
 
22
- ColumnController.prototype.getResetEnabled = function() {
23
- return true;
24
- };
25
-
26
27
  ColumnController.prototype.model2State = function() {
27
28
  var aItems = [];
28
29
  this._oPanel.getP13nData(true).forEach(function(oItem){
@@ -9,17 +9,18 @@ sap.ui.define([
9
9
  ], function (FilterOperatorUtil, BaseController, P13nBuilder, FlexUtil, Log) {
10
10
  "use strict";
11
11
 
12
- var FilterController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.FilterController");
12
+ var FilterController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.FilterController", {
13
+ constructor: function() {
14
+ BaseController.apply(this, arguments);
15
+ this._bResetEnabled = true;
16
+ }
17
+ });
13
18
 
14
19
  FilterController.prototype.getCurrentState = function() {
15
20
  var oControlState = this.getAdaptationControl().getCurrentState();
16
21
  return oControlState.hasOwnProperty("filter") ? oControlState.filter : {};
17
22
  };
18
23
 
19
- FilterController.prototype.getResetEnabled = function() {
20
- return true;
21
- };
22
-
23
24
  FilterController.prototype.getUISettings = function() {
24
25
  return {
25
26
  title: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("filter.PERSONALIZATION_DIALOG_TITLE"),
@@ -27,9 +28,15 @@ sap.ui.define([
27
28
  afterClose: function(oEvt) {
28
29
  var oDialog = oEvt.getSource();
29
30
  if (oDialog) {
30
- oDialog.removeAllContent();
31
- oDialog.destroy();
31
+ var oDialogContent = oDialog.getContent()[0];
32
+ if (oDialogContent.isA("sap.m.p13n.Container")) {
33
+ oDialogContent.removeView("Filter");
34
+ } else {
35
+ oDialog.removeAllContent();
36
+ }
32
37
  }
38
+
39
+ oDialog.destroy();
33
40
  }
34
41
  };
35
42
  };
@@ -89,11 +96,15 @@ sap.ui.define([
89
96
  }
90
97
  };
91
98
 
99
+ FilterController.prototype._getPresenceAttribute = function(bexternalAppliance){
100
+ return "isFiltered";
101
+ };
102
+
92
103
  FilterController.prototype.getAdaptationUI = function (oPropertyHelper, oWrapper) {
93
104
  var oAdaptationModel = this._getP13nModel(oPropertyHelper);
94
105
 
95
106
  return this.getAdaptationControl().retrieveInbuiltFilter().then(function(oAdaptationFilterBar){
96
- oAdaptationFilterBar.setP13nModel(oAdaptationModel);
107
+ oAdaptationFilterBar.setP13nData(oAdaptationModel.oData);
97
108
  oAdaptationFilterBar.setLiveMode(false);
98
109
  this._oAdaptationFB = oAdaptationFilterBar;
99
110
  return oAdaptationFilterBar.createFilterFields().then(function(){
@@ -114,8 +125,8 @@ sap.ui.define([
114
125
  FilterController.prototype.model2State = function() {
115
126
  var oItems = {},
116
127
  oFilter = this.getCurrentState();
117
- this._oAdaptationModel.getProperty("/items").forEach(function(oItem) {
118
- if (oItem.isFiltered && Object.keys(oFilter).includes(oItem.name)) {
128
+ this._oAdaptationModel.getProperty("/items").forEach(function(oItem) {
129
+ if (oItem.active && Object.keys(oFilter).includes(oItem.name)) {
119
130
  oItems[oItem.name] = oFilter[oItem.name];
120
131
  }
121
132
  });
@@ -132,7 +143,7 @@ sap.ui.define([
132
143
  var sName = oProperty.name;
133
144
 
134
145
  var aExistingFilters = mExistingFilters[sName];
135
- mItem.isFiltered = aExistingFilters && aExistingFilters.length > 0 ? true : false;
146
+ mItem.active = aExistingFilters && aExistingFilters.length > 0 ? true : false;
136
147
 
137
148
  return !(oProperty.filterable === false);
138
149
  });
@@ -0,0 +1,174 @@
1
+ /*
2
+ * ! OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/mdc/p13n/P13nBuilder",
9
+ "./BaseController",
10
+ "sap/ui/mdc/p13n/panels/LinkSelectionPanel",
11
+ "sap/m/library",
12
+ "sap/m/MessageBox"
13
+ ], function (P13nBuilder, BaseController, SelectionPanel, library, MessageBox) {
14
+ "use strict";
15
+
16
+ var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
17
+
18
+ var MultiSelectMode = library.MultiSelectMode;
19
+ var LinkPanelController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.LinkPanelController", {
20
+ constructor: function() {
21
+ BaseController.apply(this, arguments);
22
+ this._bResetEnabled = true;
23
+ }
24
+ });
25
+
26
+ LinkPanelController.prototype.getUISettings = function() {
27
+ return {
28
+ contentWidth: "28rem",
29
+ contentHeight: "35rem",
30
+ reset: {
31
+ warningText: oResourceBundle.getText("info.SELECTION_DIALOG_RESET_WARNING")
32
+ },
33
+ title: oResourceBundle.getText("info.SELECTION_DIALOG_ALIGNEDTITLE")
34
+ };
35
+ };
36
+
37
+ LinkPanelController.prototype.getSelectorForReset = function() {
38
+ return this.getAdaptationControl().getItems().concat(this.getAdaptationControl());
39
+ };
40
+
41
+ LinkPanelController.prototype.getAdaptationUI = function(oPropertyHelper) {
42
+ var oSelectionPanel = new SelectionPanel({
43
+ showHeader: true,
44
+ fieldColumn: oResourceBundle.getText("info.SELECTION_DIALOG_COLUMNHEADER_WITHOUT_COUNT"),
45
+ enableCount: true,
46
+ linkPressed: this._onLinkPressed.bind(this)
47
+ });
48
+ var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
49
+ oSelectionPanel.setP13nData(oAdaptationData.items);
50
+ oSelectionPanel.setEnableReorder(false);
51
+ oSelectionPanel.setMultiSelectMode(MultiSelectMode.Default);
52
+ this._oPanel = oSelectionPanel;
53
+ return Promise.resolve(oSelectionPanel);
54
+ };
55
+
56
+ LinkPanelController.prototype._onLinkPressed = function(oEvent) {
57
+ var oSource = oEvent.getParameter("oSource");
58
+ var sTarget = oSource.getTarget();
59
+
60
+ if (sTarget !== "_blank") {
61
+ oEvent.preventDefault();
62
+
63
+ var oPanel = this.getAdaptationControl();
64
+ var sHref = oSource.getHref();
65
+
66
+ if (oPanel.getBeforeNavigationCallback) {
67
+ oPanel.getBeforeNavigationCallback()(oEvent).then(function (bNavigate) {
68
+ if (bNavigate) {
69
+ oPanel.navigate(sHref);
70
+ }
71
+ });
72
+ } else {
73
+ MessageBox.show(sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("info.SELECTION_DIALOG_LINK_VALIDATION_QUESTION"), {
74
+ icon: MessageBox.Icon.WARNING,
75
+ title: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("info.SELECTION_DIALOG_LINK_VALIDATION_TITLE"),
76
+ actions: [
77
+ MessageBox.Action.YES, MessageBox.Action.NO
78
+ ],
79
+ onClose: function (oAction) {
80
+ if (oAction === MessageBox.Action.YES) {
81
+ oPanel.navigate(sHref);
82
+ }
83
+ },
84
+ styleClass: this.$().closest(".sapUiSizeCompact").length ? "sapUiSizeCompact" : ""
85
+ });
86
+ }
87
+ }
88
+ };
89
+
90
+ LinkPanelController.prototype._createAddRemoveChange = function(oControl, vOperations, oContent) {
91
+ var sLinkItemId = oContent.name;
92
+
93
+ var oLinkItem = sap.ui.getCore().byId(sLinkItemId);
94
+
95
+ var aChanges = [];
96
+
97
+ if (!oLinkItem) {
98
+ aChanges.push({
99
+ selectorElement: oControl,
100
+ changeSpecificData: {
101
+ changeType: "createItem",
102
+ content: {
103
+ selector: sLinkItemId
104
+ }
105
+ }
106
+ });
107
+ } else {
108
+ aChanges.push({
109
+ selectorElement: oLinkItem,
110
+ changeSpecificData: {
111
+ changeType: vOperations === "hideItem" ? "hideItem" : "revealItem",
112
+ content: {}
113
+ }
114
+ });
115
+ }
116
+
117
+ return aChanges;
118
+ };
119
+
120
+ LinkPanelController.prototype.mixInfoAndState = function(oPropertyHelper) {
121
+
122
+ var aItemState = this.getCurrentState();
123
+ var mExistingLinkItems = P13nBuilder.arrayToMap(aItemState);
124
+
125
+ var oP13nData = P13nBuilder.prepareAdaptationData(oPropertyHelper, function(mItem, oProperty){
126
+
127
+ var oExistingLinkItem = mExistingLinkItems[oProperty.name];
128
+ mItem.visible = oExistingLinkItem ? true : false;
129
+ mItem.position = oExistingLinkItem ? oExistingLinkItem.position : -1;
130
+ mItem.href = oProperty.href;
131
+ mItem.description = oProperty.description;
132
+ mItem.target = oProperty.target;
133
+ mItem.text = oProperty.text;
134
+ //mItem.icon = oProperty.icon;
135
+
136
+ return true;
137
+ });
138
+
139
+ P13nBuilder.sortP13nData({
140
+ visible: "visible",
141
+ position: "position"
142
+ }, oP13nData.items);
143
+
144
+ oP13nData.presenceAttribute = this._getPresenceAttribute();
145
+
146
+ oP13nData.items.forEach(function(oItem){delete oItem.position;});
147
+
148
+ return oP13nData;
149
+ };
150
+
151
+ LinkPanelController.prototype._createMoveChange = function(sId, sPropertyName, iNewIndex, sMoveOperation, oControl, bPersistId) {
152
+ return {
153
+ selectorElement: oControl,
154
+ changeSpecificData: {
155
+ changeType: sMoveOperation,
156
+ content: {
157
+ index: iNewIndex,
158
+ name: sPropertyName
159
+ }
160
+ }
161
+ };
162
+ };
163
+
164
+ LinkPanelController.prototype.getChangeOperations = function() {
165
+ return {
166
+ add: ["createItem", "revealItem"],
167
+ remove: "hideItem",
168
+ move: "moveItem"
169
+ };
170
+ };
171
+
172
+ return LinkPanelController;
173
+
174
+ });
@@ -5,20 +5,21 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- './BaseController', 'sap/ui/mdc/p13n/P13nBuilder', 'sap/ui/mdc/p13n/panels/SortPanel', 'sap/m/p13n/SortPanel'
9
- ], function (BaseController, P13nBuilder, SortPanelOld, SortPanel) {
8
+ './BaseController', 'sap/ui/mdc/p13n/P13nBuilder', 'sap/m/p13n/SortPanel'
9
+ ], function (BaseController, P13nBuilder, SortPanel) {
10
10
  "use strict";
11
11
 
12
- var SortController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.SortController");
12
+ var SortController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.SortController", {
13
+ constructor: function() {
14
+ BaseController.apply(this, arguments);
15
+ this._bResetEnabled = true;
16
+ }
17
+ });
13
18
 
14
19
  SortController.prototype.getCurrentState = function() {
15
20
  return this.getAdaptationControl().getCurrentState().sorters;
16
21
  };
17
22
 
18
- SortController.prototype.getResetEnabled = function() {
19
- return true;
20
- };
21
-
22
23
  SortController.prototype.getUISettings = function() {
23
24
  return {
24
25
  tabText: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.TAB_Sort"),
@@ -33,20 +34,12 @@ sap.ui.define([
33
34
 
34
35
  SortController.prototype.getAdaptationUI = function(oPropertyHelper){
35
36
 
36
- var oAdaptationControl = this.getAdaptationControl();
37
37
  var oSortPanel;
38
38
 
39
- //TODO: remove this condition once 'ChartNew' migration has been merged
40
- if (oAdaptationControl.isA("sap.ui.mdc.Chart") && !oAdaptationControl._bNewP13n) {
41
- oSortPanel = new SortPanelOld();
42
- var oAdaptationModel = this._getP13nModel(oPropertyHelper);
43
- oSortPanel.setP13nModel(oAdaptationModel);
44
- } else {
45
- oSortPanel = new SortPanel();
46
- var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
47
- oSortPanel.setP13nData(oAdaptationData.items);
48
- this._oPanel = oSortPanel;
49
- }
39
+ oSortPanel = new SortPanel();
40
+ var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
41
+ oSortPanel.setP13nData(oAdaptationData.items);
42
+ this._oPanel = oSortPanel;
50
43
 
51
44
  return Promise.resolve(oSortPanel);
52
45
  };