@openui5/sap.ui.mdc 1.96.5 → 1.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +7 -9
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
  7. package/src/sap/ui/mdc/BaseDelegate.js +1 -1
  8. package/src/sap/ui/mdc/Chart.js +1100 -1796
  9. package/src/sap/ui/mdc/ChartDelegate.js +429 -270
  10. package/src/sap/ui/mdc/ChartRenderer.js +73 -77
  11. package/src/sap/ui/mdc/Control.js +1 -1
  12. package/src/sap/ui/mdc/Element.js +1 -1
  13. package/src/sap/ui/mdc/Field.js +3 -2
  14. package/src/sap/ui/mdc/FilterBar.js +3 -2
  15. package/src/sap/ui/mdc/FilterField.js +25 -8
  16. package/src/sap/ui/mdc/Link.js +23 -4
  17. package/src/sap/ui/mdc/LinkDelegate.js +3 -3
  18. package/src/sap/ui/mdc/MultiValueField.js +21 -6
  19. package/src/sap/ui/mdc/Table.js +204 -161
  20. package/src/sap/ui/mdc/TableDelegate.js +47 -17
  21. package/src/sap/ui/mdc/ValueHelp.js +51 -15
  22. package/src/sap/ui/mdc/ValueHelpDelegate.js +20 -0
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  24. package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
  25. package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +49 -13
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
  27. package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
  29. package/src/sap/ui/mdc/chart/Item.js +62 -92
  30. package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
  31. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
  32. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  33. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  34. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  35. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  36. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +261 -44
  37. package/src/sap/ui/mdc/condition/Operator.js +9 -9
  38. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +437 -0
  39. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +80 -5
  41. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +97 -0
  42. package/src/sap/ui/mdc/designtime/field/FieldBase.designtime.js +104 -0
  43. package/src/sap/ui/mdc/designtime/field/FilterField.designtime.js +22 -0
  44. package/src/sap/ui/mdc/designtime/field/MultiValueField.designtime.js +23 -0
  45. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
  46. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +60 -20
  47. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  49. package/src/sap/ui/mdc/field/ConditionType.js +9 -9
  50. package/src/sap/ui/mdc/field/ConditionsType.js +7 -7
  51. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  52. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  53. package/src/sap/ui/mdc/field/DefineConditionPanel.js +75 -27
  54. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +311 -0
  55. package/src/sap/ui/mdc/field/FieldBase.js +85 -52
  56. package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
  57. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  58. package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -10
  59. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -7
  63. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +20 -0
  65. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  66. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
  67. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +7 -3
  68. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  69. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  70. package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
  71. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  72. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  73. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  74. package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
  75. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  76. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  77. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  78. package/src/sap/ui/mdc/field/ValueHelpPanel.js +2 -1
  79. package/src/sap/ui/mdc/field/content/BooleanContent.js +1 -1
  80. package/src/sap/ui/mdc/field/content/ContentFactory.js +28 -26
  81. package/src/sap/ui/mdc/field/content/DateContent.js +128 -2
  82. package/src/sap/ui/mdc/field/content/DateTimeContent.js +9 -1
  83. package/src/sap/ui/mdc/field/content/DefaultContent.js +36 -14
  84. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  85. package/src/sap/ui/mdc/field/content/TimeContent.js +8 -1
  86. package/src/sap/ui/mdc/field/content/UnitContent.js +23 -4
  87. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +359 -142
  88. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  89. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  90. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
  91. package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
  92. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
  93. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
  94. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
  95. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
  96. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
  97. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
  98. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  99. package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
  100. package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
  101. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
  102. package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
  103. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
  104. package/src/sap/ui/mdc/library.js +62 -43
  105. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  106. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  107. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  108. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  109. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  110. package/src/sap/ui/mdc/link/Factory.js +2 -2
  111. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  112. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  113. package/src/sap/ui/mdc/link/Log.js +1 -1
  114. package/src/sap/ui/mdc/link/Panel.js +140 -177
  115. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  116. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  117. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  118. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  119. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  120. package/src/sap/ui/mdc/messagebundle.properties +68 -5
  121. package/src/sap/ui/mdc/messagebundle_ar.properties +47 -6
  122. package/src/sap/ui/mdc/messagebundle_bg.properties +61 -20
  123. package/src/sap/ui/mdc/messagebundle_ca.properties +45 -4
  124. package/src/sap/ui/mdc/messagebundle_cs.properties +60 -19
  125. package/src/sap/ui/mdc/messagebundle_cy.properties +45 -4
  126. package/src/sap/ui/mdc/messagebundle_da.properties +52 -11
  127. package/src/sap/ui/mdc/messagebundle_de.properties +45 -4
  128. package/src/sap/ui/mdc/messagebundle_el.properties +46 -5
  129. package/src/sap/ui/mdc/messagebundle_en.properties +45 -4
  130. package/src/sap/ui/mdc/messagebundle_en_GB.properties +45 -4
  131. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +51 -2
  132. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +45 -4
  133. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +51 -2
  134. package/src/sap/ui/mdc/messagebundle_es.properties +46 -5
  135. package/src/sap/ui/mdc/messagebundle_es_MX.properties +59 -18
  136. package/src/sap/ui/mdc/messagebundle_et.properties +45 -4
  137. package/src/sap/ui/mdc/messagebundle_fi.properties +51 -10
  138. package/src/sap/ui/mdc/messagebundle_fr.properties +50 -9
  139. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +45 -4
  140. package/src/sap/ui/mdc/messagebundle_hi.properties +46 -5
  141. package/src/sap/ui/mdc/messagebundle_hr.properties +45 -4
  142. package/src/sap/ui/mdc/messagebundle_hu.properties +45 -4
  143. package/src/sap/ui/mdc/messagebundle_id.properties +45 -4
  144. package/src/sap/ui/mdc/messagebundle_it.properties +61 -20
  145. package/src/sap/ui/mdc/messagebundle_iw.properties +46 -5
  146. package/src/sap/ui/mdc/messagebundle_ja.properties +46 -5
  147. package/src/sap/ui/mdc/messagebundle_kk.properties +45 -4
  148. package/src/sap/ui/mdc/messagebundle_ko.properties +46 -5
  149. package/src/sap/ui/mdc/messagebundle_lt.properties +45 -4
  150. package/src/sap/ui/mdc/messagebundle_lv.properties +49 -8
  151. package/src/sap/ui/mdc/messagebundle_ms.properties +45 -4
  152. package/src/sap/ui/mdc/messagebundle_nl.properties +49 -8
  153. package/src/sap/ui/mdc/messagebundle_no.properties +53 -12
  154. package/src/sap/ui/mdc/messagebundle_pl.properties +46 -5
  155. package/src/sap/ui/mdc/messagebundle_pt.properties +52 -11
  156. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +45 -4
  157. package/src/sap/ui/mdc/messagebundle_ro.properties +45 -4
  158. package/src/sap/ui/mdc/messagebundle_ru.properties +45 -4
  159. package/src/sap/ui/mdc/messagebundle_sh.properties +45 -4
  160. package/src/sap/ui/mdc/messagebundle_sk.properties +45 -4
  161. package/src/sap/ui/mdc/messagebundle_sl.properties +45 -4
  162. package/src/sap/ui/mdc/messagebundle_sv.properties +47 -6
  163. package/src/sap/ui/mdc/messagebundle_th.properties +48 -7
  164. package/src/sap/ui/mdc/messagebundle_tr.properties +45 -4
  165. package/src/sap/ui/mdc/messagebundle_uk.properties +49 -8
  166. package/src/sap/ui/mdc/messagebundle_vi.properties +45 -4
  167. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +46 -5
  168. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +45 -4
  169. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +19 -5
  170. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
  171. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +16 -11
  172. package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
  173. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  174. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
  175. package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
  176. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +160 -116
  177. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
  178. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
  179. package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
  180. package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +215 -116
  181. package/src/sap/ui/mdc/p13n/Engine.js +61 -20
  182. package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
  183. package/src/sap/ui/mdc/p13n/P13nBuilder.js +8 -8
  184. package/src/sap/ui/mdc/p13n/PersistenceProvider.js +21 -10
  185. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  186. package/src/sap/ui/mdc/p13n/StateUtil.js +40 -6
  187. package/src/sap/ui/mdc/p13n/UIManager.js +15 -12
  188. package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
  189. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
  190. package/src/sap/ui/mdc/p13n/{DefaultProviderRegistry.js → modules/DefaultProviderRegistry.js} +2 -2
  191. package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +86 -0
  192. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +19 -3
  193. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
  194. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
  195. package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
  196. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
  197. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +1 -1
  198. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
  199. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
  200. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
  201. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +14 -7
  202. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
  203. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
  204. package/src/sap/ui/mdc/table/Column.js +35 -10
  205. package/src/sap/ui/mdc/table/CreationRow.js +14 -13
  206. package/src/sap/ui/mdc/table/GridTableType.js +13 -13
  207. package/src/sap/ui/mdc/table/PropertyHelper.js +64 -27
  208. package/src/sap/ui/mdc/table/ResponsiveTableType.js +26 -29
  209. package/src/sap/ui/mdc/table/RowSettings.js +7 -5
  210. package/src/sap/ui/mdc/table/TableTypeBase.js +6 -6
  211. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +15 -71
  212. package/src/sap/ui/mdc/themes/base/Chart.less +3 -0
  213. package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
  214. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  215. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  216. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +15 -4
  217. package/src/sap/ui/mdc/themes/base/library.source.less +3 -0
  218. package/src/sap/ui/mdc/ui/Container.js +2 -2
  219. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  220. package/src/sap/ui/mdc/util/Common.js +1 -1
  221. package/src/sap/ui/mdc/util/DateUtil.js +1 -1
  222. package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
  223. package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
  224. package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
  225. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  226. package/src/sap/ui/mdc/util/PropertyHelper.js +148 -325
  227. package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
  228. package/src/sap/ui/mdc/valuehelp/Dialog.js +12 -8
  229. package/src/sap/ui/mdc/valuehelp/Popover.js +14 -2
  230. package/src/sap/ui/mdc/valuehelp/base/Container.js +33 -1
  231. package/src/sap/ui/mdc/valuehelp/base/Content.js +36 -5
  232. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
  233. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +43 -15
  234. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
  235. package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
  236. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +28 -32
  237. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
  238. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +50 -10
  239. package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -26
  240. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
  241. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
  242. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
  243. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
  244. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
  245. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
  246. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
  247. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +289 -0
  248. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
  249. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +9 -9
  250. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
  251. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
  252. package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
  253. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
  254. package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
  255. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +362 -233
  256. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
  257. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  258. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  259. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  260. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  261. package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
  262. package/src/sap/ui/mdc/ChartNew.js +0 -1114
  263. package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
  264. package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
  265. package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
  266. package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
  267. package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
  268. package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
  269. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
  270. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
  271. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
  272. package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
  273. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
  274. package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
  275. package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
  276. package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
  277. package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
  278. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1171
  279. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +0 -111
  280. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +0 -322
  281. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +0 -133
  282. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +0 -203
@@ -16,7 +16,8 @@ sap.ui.define([
16
16
  "./waitForSelectWithSelectedTextOnPanel",
17
17
  "./Util",
18
18
  "sap/base/Log",
19
- "sap/base/util/UriParameters"
19
+ "sap/base/util/UriParameters",
20
+ "sap/ui/core/Core"
20
21
  ], function(
21
22
  Opa5,
22
23
  Matcher,
@@ -31,11 +32,12 @@ sap.ui.define([
31
32
  waitForSelectWithSelectedTextOnPanel,
32
33
  Util,
33
34
  Log,
34
- UriParameters
35
+ UriParameters,
36
+ oCore
35
37
  ) {
36
38
  "use strict";
37
39
 
38
- var oMDCBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
40
+ var oMDCBundle = oCore.getLibraryResourceBundle("sap.ui.mdc");
39
41
 
40
42
  var iOpenThePersonalizationDialog = function(oControl, oSettings) {
41
43
  var sControlId = typeof oControl === "string" ? oControl : oControl.getId();
@@ -46,51 +48,88 @@ sap.ui.define([
46
48
  success: function(oControlInstance) {
47
49
  Opa5.assert.ok(oControlInstance);
48
50
 
49
- aButtonMatchers.push(new Ancestor(oControlInstance));
51
+ if (oControlInstance.isA("sap.m.Link")) {
52
+ // mdc.Link handling
50
53
 
51
- if (oControlInstance.isA("sap.ui.comp.smartchart.SmartChart")) {
52
- aDialogMatchers.push(function(oP13nDialog) {
53
- return oP13nDialog.getParent().getChart() === oControlInstance.getChart().getId();
54
+ new Press().executeOn(oControlInstance);
55
+ this.waitFor({
56
+ controlType: "sap.ui.mdc.link.Panel",
57
+ success: function(aPanels) {
58
+ Opa5.assert.equal(aPanels.length, 1, "mdc.link.Panel found");
59
+ var oPanel = aPanels[0];
60
+
61
+ waitForP13nButtonWithMatchers.call(this, {
62
+ actions: new Press(),
63
+ matchers: [
64
+ new Ancestor(oPanel, false),
65
+ new PropertyStrictEquals({
66
+ name: "text",
67
+ value: oMDCBundle.getText("info.POPOVER_DEFINE_LINKS")
68
+ })
69
+ ],
70
+ success: function() {
71
+ waitForP13nDialog.call(this, {
72
+ matchers: new PropertyStrictEquals({
73
+ name: "title",
74
+ value: oMDCBundle.getText("info.SELECTION_DIALOG_ALIGNEDTITLE")
75
+ }),
76
+ success: function(oP13nDialog) {
77
+ if (oSettings && typeof oSettings.success === "function") {
78
+ oSettings.success.call(this, oP13nDialog);
79
+ }
80
+ }
81
+ });
82
+ }
83
+ });
84
+ }
54
85
  });
55
86
  } else {
56
- aDialogMatchers.push(new Ancestor(oControlInstance, false));
57
- }
87
+ aButtonMatchers.push(new Ancestor(oControlInstance));
58
88
 
59
- if (oControlInstance.isA("sap.ui.mdc.FilterBar")) {
60
- // Add matcher for p13n button text
61
- var oMatcher = new Matcher();
62
- oMatcher.isMatching = function(oButton) {
63
- return oButton.getText().includes(oMDCBundle.getText("filterbar.ADAPT"));
64
- };
65
- aButtonMatchers.push(oMatcher);
66
- aDialogMatchers.push(new Properties({
67
- title: oMDCBundle.getText("filterbar.ADAPT_TITLE")
68
- }));
69
- } else {
70
- // Add matcher for p13n button icon
71
- aButtonMatchers.push(new Properties({
72
- icon: Util.icons.settings
73
- }));
74
- aDialogMatchers.push(new Properties({
75
- title: oMDCBundle.getText("p13nDialog.VIEW_SETTINGS")
76
- }));
77
- }
89
+ if (oControlInstance.isA("sap.ui.comp.smartchart.SmartChart")) {
90
+ aDialogMatchers.push(function(oP13nDialog) {
91
+ return oP13nDialog.getParent().getChart() === oControlInstance.getChart().getId();
92
+ });
93
+ } else {
94
+ aDialogMatchers.push(new Ancestor(oControlInstance, false));
95
+ }
78
96
 
79
- waitForP13nButtonWithMatchers.call(this, {
80
- actions: new Press(),
81
- matchers: aButtonMatchers,
82
- success: function() {
83
- waitForP13nDialog.call(this, {
84
- matchers: aDialogMatchers,
85
- success: function(oP13nDialog) {
86
- if (oSettings && typeof oSettings.success === "function") {
87
- oSettings.success.call(this, oP13nDialog);
97
+ if (oControlInstance.isA("sap.ui.mdc.FilterBar")) {
98
+ // Add matcher for p13n button text
99
+ var oMatcher = new Matcher();
100
+ oMatcher.isMatching = function(oButton) {
101
+ return oButton.getText().includes(oMDCBundle.getText("filterbar.ADAPT"));
102
+ };
103
+ aButtonMatchers.push(oMatcher);
104
+ aDialogMatchers.push(new Properties({
105
+ title: oMDCBundle.getText("filterbar.ADAPT_TITLE")
106
+ }));
107
+ } else {
108
+ // Add matcher for p13n button icon
109
+ aButtonMatchers.push(new Properties({
110
+ icon: Util.icons.settings
111
+ }));
112
+ aDialogMatchers.push(new Properties({
113
+ title: oMDCBundle.getText("p13nDialog.VIEW_SETTINGS")
114
+ }));
115
+ }
116
+
117
+ waitForP13nButtonWithMatchers.call(this, {
118
+ actions: new Press(),
119
+ matchers: aButtonMatchers,
120
+ success: function() {
121
+ waitForP13nDialog.call(this, {
122
+ matchers: aDialogMatchers,
123
+ success: function(oP13nDialog) {
124
+ if (oSettings && typeof oSettings.success === "function") {
125
+ oSettings.success.call(this, oP13nDialog);
126
+ }
88
127
  }
89
- }
90
- });
91
- },
92
- errorMessage: "Control '" + sControlId + "' has no P13n button"
93
- });
128
+ });
129
+ },
130
+ errorMessage: "Control '" + sControlId + "' has no P13n button"
131
+ });
132
+ }
94
133
  },
95
134
  errorMessage: "Control '" + sControlId + "' not found."
96
135
  });
@@ -456,7 +495,7 @@ sap.ui.define([
456
495
 
457
496
  var iPersonalizeListViewItems = function(oP13nDialog, aItems) {
458
497
  this.waitFor({
459
- controlType: oP13nDialog.getContent()[0].getView("columns") ? "sap.ui.mdc.p13n.panels.ListView" : "sap.m.p13n.SelectionPanel",
498
+ controlType: oP13nDialog.getContent()[0].getView("columns") && oP13nDialog.getContent()[0].getView("columns").getContent().isA("sap.ui.mdc.p13n.panels.ListView") ? "sap.ui.mdc.p13n.panels.ListView" : "sap.m.p13n.SelectionPanel",
460
499
  matchers: new Ancestor(oP13nDialog, false),
461
500
  success: function(aListViews) {
462
501
  var oListView = aListViews[0];
@@ -611,26 +650,120 @@ sap.ui.define([
611
650
  });
612
651
  };
613
652
 
614
- return {
653
+ var iPersonalizeOldChartP13n = function(oControl, sChartType, aItems, oP13nDialog) {
654
+ this.waitFor({
655
+ controlType: "sap.m.P13nDimMeasurePanel",
656
+ matchers: new Ancestor(oP13nDialog, false),
657
+ success: function(aP13nDimMeasurePanels) {
658
+ var oP13nDimMeasurePanel = aP13nDimMeasurePanels[0];
659
+ this.waitFor({
660
+ controlType: "sap.m.OverflowToolbar",
661
+ matchers: new Ancestor(oP13nDimMeasurePanel, false),
662
+ success: function(aOverflowToolbars) {
663
+ var oOverflowToolbar = aOverflowToolbars[0];
664
+ this.waitFor({
665
+ controlType: "sap.m.ComboBox",
666
+ matchers: new Ancestor(oOverflowToolbar),
667
+ success: function(aComboBoxes) {
668
+ var oComboBox = aComboBoxes[0];
669
+ iChangeComboBoxSelection.call(this, oComboBox, sChartType, {
670
+ success: function() {
671
+ this.waitFor({
672
+ controlType: "sap.m.ColumnListItem",
673
+ matchers: [
674
+ new Ancestor(oP13nDialog, false)
675
+ ],
676
+ actions: function(oColumnListItem) {
677
+ this.waitFor({
678
+ controlType: "sap.m.Text",
679
+ matchers: new Ancestor(oColumnListItem),
680
+ success: function(aTexts) {
681
+ var oText = aTexts[0];
682
+ var oItem = aItems.find(function(oItem) {
683
+ return oText.getText() === oItem.key;
684
+ });
685
+ var bItemIsPresent = !!oItem;
686
+
687
+ this.waitFor({
688
+ controlType: "sap.m.CheckBox",
689
+ matchers: new Ancestor(oColumnListItem),
690
+ actions: function(oCheckBox) {
691
+ if ((!oCheckBox.getSelected() && bItemIsPresent) ||
692
+ (oCheckBox.getSelected() && !bItemIsPresent)) {
693
+ new Press().executeOn(oCheckBox);
694
+ }
695
+ },
696
+ success: function() {
697
+ if (bItemIsPresent) {
698
+ this.waitFor({
699
+ controlType: "sap.m.Select",
700
+ matchers: new Ancestor(oColumnListItem),
701
+ actions: function(oSelect) {
702
+ iChangeSelectSelection.call(this, oSelect, oItem.role);
703
+ }.bind(this)
704
+ });
705
+ }
706
+ }
707
+ });
708
+ }
709
+ });
710
+ }.bind(this),
711
+ success: function() {
712
+ iPressTheOKButtonOnTheDialog.call(this,oP13nDialog);
713
+ }
714
+ });
715
+ }
716
+ });
717
+ }
718
+ });
719
+ }
720
+ });
721
+ }
722
+ });
723
+ };
724
+
725
+ return {
615
726
  iPressTheOKButtonOnTheDialog: function(oDialog, oSettings) {
616
727
  return iPressTheOKButtonOnTheDialog.call(this, oDialog, oSettings);
617
728
  },
618
729
  iOpenThePersonalizationDialog: function(oControl, oSettings) {
619
730
  return iOpenThePersonalizationDialog.call(this, oControl, oSettings);
620
731
  },
732
+ /**
733
+ * @typedef {object} ChartPersonalizationConfiguration
734
+ * @property {string} key Key of the value that is the result of the personalization
735
+ * @property {string} role Role of the given value
736
+ */
737
+ /**
738
+ * OPA5 test action
739
+ * 1. Opens the personalization dialog of a given chart.
740
+ * 2. Selects a chart type given by <code>sChartType</code>.
741
+ * 3. Executes the given <code>ChartPersonalizationConfiguration</code>.
742
+ * 4. Closes the personalization dialog.
743
+ * @param {sap.ui.core.Control | string} oChart Instance / ID of the <code>SmartChart</code> that is personalized
744
+ * @param {string} sChartType String containing the type of chart that is displayed
745
+ * @param {ChartPersonalizationConfiguration[]} aConfigurations Array containing the chart personalization configuration objects
746
+ * @returns {Promise} OPA waitFor
747
+ */
621
748
  iPersonalizeChart: function(oControl, sChartType, aItems) {
622
749
  return iPersonalize.call(this, oControl, Util.texts.chart, {
623
750
  success: function(oP13nDialog) {
624
751
 
625
- if (UriParameters.fromQuery(window.location.search).get("newChartP13n") === "true") {
626
-
752
+ //oP13nDialog.getContent()[0].getView("item") && oP13nDialog.getContent()[0].getView("item").getContent().isA("sap.ui.mdc.p13n.panels.ListView")
753
+ if (oP13nDialog.getContent()[0].getView("dimeasure").getContent().isA("sap.m.P13nDimMeasurePanel")){
754
+ iPersonalizeOldChartP13n.call(this, oControl, sChartType, aItems, oP13nDialog);
755
+ } else {
627
756
  this.waitFor({
628
- controlType: "sap.ui.mdc.p13n.panels.ChartItemPanelNew",
757
+ controlType: "sap.ui.mdc.p13n.panels.ChartItemPanel",
629
758
  matchers: new Ancestor(oP13nDialog, false),
630
- success: function() {
631
- // Setup chart type
759
+ success: function(aItemPanels) {
760
+ //This is done in 3 steps
761
+ //1. Remove current selection
762
+ //2. Add items in order
763
+ //3. Select correct roles
764
+
632
765
  var aItemsToRemoveIds = [];
633
- var aItemsAlreadyPresent = [];
766
+ var oItemPanel = aItemPanels[0];
634
767
 
635
768
  this.waitFor({
636
769
 
@@ -639,196 +772,128 @@ sap.ui.define([
639
772
  new Ancestor(oP13nDialog, false)
640
773
  ],
641
774
  actions: function(oColumnListItem) {
642
- this.waitFor({
643
- controlType: "sap.m.ComboBox",
644
- matchers: new Ancestor(oColumnListItem),
645
- success: function(aComboBoxes) {
646
- var oComboBox = aComboBoxes[0];
647
- var oItem = aItems.find(function(oItem) {
648
- return oComboBox.getSelectedKey() === oItem.key;
649
- });
650
- var bItemIsPresent = !!oItem;
651
-
652
- //Remove if not selected
653
- if (!bItemIsPresent) {
654
-
655
- //Template has only one cell (no role & remove)
656
- var bTemplate = oColumnListItem.getCells().length === 1;
657
-
658
- if (!bTemplate){
659
- this.waitFor({
660
- controlType: "sap.m.Button",
661
- matchers: new Ancestor(oColumnListItem, false),
662
- actions: function(oBtn) {
663
- aItemsToRemoveIds.push(oBtn.getId());
664
- }
665
- });
666
- }
667
- } else {
668
- aItemsAlreadyPresent.push(oComboBox.getSelectedKey());
669
- }
670
- }
671
- });
672
- }.bind(this),
673
- success: function() {
674
-
675
- aItemsToRemoveIds.forEach(function(oBtnId){
775
+ //Step 1.1: Find all remove buttons
776
+ var bTemplate = oColumnListItem.getCells().length === 1;
676
777
 
778
+ if (!bTemplate){
677
779
  this.waitFor({
678
-
679
780
  controlType: "sap.m.Button",
680
781
  matchers: [
681
- new Ancestor(oP13nDialog, false),
782
+ new Ancestor(oColumnListItem),
682
783
  new Properties({
683
- id: oBtnId
784
+ icon: "sap-icon://decline"
684
785
  })
685
786
  ],
686
787
  success: function(aBtns) {
687
- new Press().executeOn(aBtns[0]);
788
+ var oButton = aBtns[0];
789
+ aItemsToRemoveIds.push(oButton.getId());
688
790
  }
689
791
  });
792
+ }
793
+ }.bind(this),
794
+ success: function() {
690
795
 
691
- }.bind(this));
796
+ var iClickOnChartP13nRemoveButton = function(sCurrentBtnId, oP13nDialog, aBtnIds, fnFollowUpFunction, aFollowUpParams){
797
+ this.waitFor({
692
798
 
693
- var aItemsToAdd = aItems.filter(function(oItem){return aItemsAlreadyPresent.indexOf(oItem.key) === -1;});
799
+ controlType: "sap.m.Button",
800
+ id: sCurrentBtnId,
801
+ matchers: [
802
+ new Ancestor(oP13nDialog, false)
803
+ ],
804
+ success: function(oBtn) {
805
+ new Press().executeOn(oBtn);
806
+
807
+ var iIdx = aBtnIds.indexOf(sCurrentBtnId);
694
808
 
695
- aItemsToAdd.forEach(function(oItem) {
809
+ if (iIdx === aBtnIds.length - 1){
810
+ fnFollowUpFunction.apply(this, aFollowUpParams);
811
+ } else {
812
+ iClickOnChartP13nRemoveButton.call(this, aBtnIds[iIdx + 1], oP13nDialog, aBtnIds, fnFollowUpFunction, aFollowUpParams);
813
+ }
814
+ }
815
+ });
816
+ };
696
817
 
697
- if (oItem.kind) {
818
+ var fnAddAllItems = function(oCurrentItem, aItems, fnFollowUp){
819
+ if (oCurrentItem.kind) {
698
820
  this.waitFor({
699
821
  controlType: "sap.m.ComboBox",
700
- matchers: [
701
- new Ancestor(oP13nDialog, false),
702
- new Properties({
703
- id: "p13nPanel-templateComboBox-" + oItem.kind
704
- })
705
- ],
822
+ id: "p13nPanel-templateComboBox-" + oCurrentItem.kind,
823
+ matchers: new Ancestor(oP13nDialog, false),
706
824
  actions: function(oComboBox) {
707
- iChangeComboBoxSelection.call(this, oComboBox, oItem.key);
708
- }.bind(this)
825
+ iChangeComboBoxSelection.call(this, oComboBox, oCurrentItem.key);
826
+ }.bind(this),
827
+ success: function(){
828
+ var iIdx = aItems.indexOf(oCurrentItem);
829
+
830
+ if (iIdx === aItems.length - 1){
831
+ fnFollowUp.call(this);
832
+ } else {
833
+ fnAddAllItems.call(this, aItems[iIdx + 1], aItems, fnFollowUp);
834
+ }
835
+ }
709
836
  });
710
837
  } else {
711
- Log.error("P13nChartPersonalizationOPA: No kind field given for " + oItem.key + ". Ignoring the field!");
838
+ Log.error("P13nChartPersonalizationOPA: No kind field given for " + oCurrentItem.key + ". Ignoring the field!");
712
839
  }
840
+ };
713
841
 
842
+ var fnAssignRoles = function(){
843
+ this.waitFor({
714
844
 
715
- }.bind(this));
716
-
717
- //Make sure every new item has the correct role
718
- this.waitFor({
719
-
720
- controlType: "sap.m.ColumnListItem",
721
- matchers: [
722
- new Ancestor(oP13nDialog, false)
723
- ],
724
- actions: function(oColumnListItem) {
725
- this.waitFor({
726
- controlType: "sap.m.ComboBox",
727
- matchers: new Ancestor(oColumnListItem),
728
- success: function(aComboBoxes) {
729
- var oComboBox = aComboBoxes[0];
730
- var oItem = aItems.find(function(oItem) {
731
- return oComboBox.getSelectedKey() === oItem.key;
732
- });
733
- var bItemIsPresent = !!oItem;
845
+ controlType: "sap.m.ColumnListItem",
846
+ matchers: [
847
+ new Ancestor(oP13nDialog, false)
848
+ ],
849
+ actions: function(oColumnListItem) {
850
+ this.waitFor({
851
+ controlType: "sap.m.ComboBox",
852
+ matchers: new Ancestor(oColumnListItem),
853
+ success: function(aComboBoxes) {
854
+ var oComboBox = aComboBoxes[0];
855
+ var oItem = aItems.find(function(oItem) {
856
+ return oComboBox.getSelectedKey() === oItem.key;
857
+ });
858
+ var bItemIsPresent = !!oItem;
734
859
 
735
- if (bItemIsPresent) {
860
+ if (bItemIsPresent) {
736
861
 
737
- var bMobile = oColumnListItem.getTable().getParent().getParent()._bMobileMode;
738
- if (bMobile && oColumnListItem.getCells()[0].getItems[1].getVisible() == false) {
739
- return;
740
- }
862
+ //Ignore templates / items with no role select (due to chart type)
863
+ var bMobile = oItemPanel._bMobileMode;
864
+ if (bMobile && oColumnListItem.getCells()[0].getItems[1].getVisible() == false) {
865
+ return;
866
+ }
741
867
 
742
868
  if (!bMobile && !oColumnListItem.getCells()[1].getVisible()) {
743
- return;
744
- }
745
-
746
- //Select correct role if selected
747
- this.waitFor({
748
- controlType: "sap.m.Select",
749
- matchers: new Ancestor(oColumnListItem),
750
- actions: function(oSelect) {
751
- iChangeSelectSelection.call(this, oSelect, oItem.role);
752
- }.bind(this)
753
- });
754
- }
755
- }.bind(this)
756
- });
757
- }.bind(this)
758
- });
759
-
760
- iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
761
- }
762
- });
763
- }
764
- });
765
- } else {
766
- this.waitFor({
767
- controlType: "sap.m.P13nDimMeasurePanel",
768
- matchers: new Ancestor(oP13nDialog, false),
769
- success: function(aP13nDimMeasurePanels) {
770
- var oP13nDimMeasurePanel = aP13nDimMeasurePanels[0];
771
- this.waitFor({
772
- controlType: "sap.m.OverflowToolbar",
773
- matchers: new Ancestor(oP13nDimMeasurePanel, false),
774
- success: function(aOverflowToolbars) {
775
- var oOverflowToolbar = aOverflowToolbars[0];
776
- this.waitFor({
777
- controlType: "sap.m.ComboBox",
778
- matchers: new Ancestor(oOverflowToolbar),
779
- success: function(aComboBoxes) {
780
- var oComboBox = aComboBoxes[0];
781
- iChangeComboBoxSelection.call(this, oComboBox, sChartType, {
782
- success: function() {
783
- this.waitFor({
784
- controlType: "sap.m.ColumnListItem",
785
- matchers: [
786
- new Ancestor(oP13nDialog, false)
787
- ],
788
- actions: function(oColumnListItem) {
789
- this.waitFor({
790
- controlType: "sap.m.Text",
791
- matchers: new Ancestor(oColumnListItem),
792
- success: function(aTexts) {
793
- var oText = aTexts[0];
794
- var oItem = aItems.find(function(oItem) {
795
- return oText.getText() === oItem.key;
796
- });
797
- var bItemIsPresent = !!oItem;
798
-
799
- this.waitFor({
800
- controlType: "sap.m.CheckBox",
801
- matchers: new Ancestor(oColumnListItem),
802
- actions: function(oCheckBox) {
803
- if ((!oCheckBox.getSelected() && bItemIsPresent) ||
804
- (oCheckBox.getSelected() && !bItemIsPresent)) {
805
- new Press().executeOn(oCheckBox);
806
- }
807
- },
808
- success: function() {
809
- if (bItemIsPresent) {
810
- this.waitFor({
811
- controlType: "sap.m.Select",
812
- matchers: new Ancestor(oColumnListItem),
813
- actions: function(oSelect) {
814
- iChangeSelectSelection.call(this, oSelect, oItem.role);
815
- }.bind(this)
816
- });
817
- }
818
- }
819
- });
869
+ return;
820
870
  }
821
- });
822
- }.bind(this),
823
- success: function() {
824
- iPressTheOKButtonOnTheDialog.call(this,oP13nDialog);
825
- }
871
+
872
+ //Select correct role if selected
873
+ this.waitFor({
874
+ controlType: "sap.m.Select",
875
+ matchers: new Ancestor(oColumnListItem),
876
+ actions: function(oSelect) {
877
+ iChangeSelectSelection.call(this, oSelect, oItem.role);
878
+ }.bind(this)
879
+ });
880
+ }
881
+ }.bind(this)
826
882
  });
883
+ }.bind(this),
884
+ success: function() {
885
+ iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
827
886
  }
828
887
  });
888
+ };
889
+
890
+
891
+ if (aItemsToRemoveIds.length != 0){
892
+ iClickOnChartP13nRemoveButton.call(this, aItemsToRemoveIds[0], oP13nDialog, aItemsToRemoveIds, fnAddAllItems, [aItems[0], aItems, fnAssignRoles]);
893
+ } else {
894
+ fnAddAllItems.call(this, aItems[0], aItems, fnAssignRoles);
829
895
  }
830
- });
831
- }
896
+ }
832
897
  });
833
898
  }
834
899
  });
@@ -837,9 +902,12 @@ sap.ui.define([
837
902
  });
838
903
  },
839
904
  /**
840
- *
905
+ * OPA5 test action
906
+ * 1. Opens the personalization dialog of a given table.
907
+ * 2. Selects all columns determined by the given labels. Also deselects all other columns that are selected but not included in the given labels.
908
+ * 3. Closes the personalization dialog.
841
909
  * @param {sap.ui.core.Control | string} oControl Instance / ID of the control which is to be personalized
842
- * @param {string[]} aColumns Array containing the keys of the columns that should be result of the personalisation
910
+ * @param {string[]} aColumns Array containing the labels of the columns that are the result of the personalization
843
911
  * @returns {Promise} Opa waitFor
844
912
  */
845
913
  iPersonalizeColumns: function(oControl, aColumns) {
@@ -901,18 +969,68 @@ sap.ui.define([
901
969
  }
902
970
  });
903
971
  },
972
+ /**
973
+ * @param {sap.ui.core.Control | string} oControl Instance / ID of the control which is to be personalized
974
+ * @param {string[]} aLinks an array containing the names of the links that should be result of the personalisation
975
+ * @returns {Promise} Opa waitFor
976
+ */
977
+ iPersonalizeLink: function(oControl, aLinks) {
978
+ return iOpenThePersonalizationDialog.call(this, oControl, {
979
+ success: function(oP13nDialog) {
980
+ this.waitFor({
981
+ controlType: "sap.ui.mdc.p13n.panels.LinkSelectionPanel",
982
+ matchers: new Ancestor(oP13nDialog, false),
983
+ success: function(aLinkSelectionPanels) {
984
+ Opa5.assert.equal(aLinkSelectionPanels.length, 1, "sap.ui.mdc.p13n.panels.LinkSelectionPanel found");
985
+ var oLinkSelectionPanel = aLinkSelectionPanels[0];
986
+ this.waitFor({
987
+ controlType: "sap.m.ColumnListItem",
988
+ matchers: new Ancestor(oLinkSelectionPanel, false),
989
+ actions: function(oColumnListItem) {
990
+ this.waitFor({
991
+ controlType: "sap.m.Link",
992
+ matchers: new Ancestor(oColumnListItem, false),
993
+ success: function(aLinkControls) {
994
+ var oLinkControl = aLinkControls[0];
995
+ this.waitFor({
996
+ controlType: "sap.m.CheckBox",
997
+ matchers: [
998
+ new Ancestor(oColumnListItem, false)
999
+ ],
1000
+ actions: function(oCheckBox) {
1001
+ if ((!oCheckBox.getSelected() && aLinks.includes(oLinkControl.getText())) ||
1002
+ (oCheckBox.getSelected() && !aLinks.includes(oLinkControl.getText()))) {
1003
+ new Press().executeOn(oCheckBox);
1004
+ }
1005
+ }
1006
+ });
1007
+ }
1008
+ });
1009
+ }.bind(this),
1010
+ success: function() {
1011
+ iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
1012
+ }
1013
+ });
1014
+ }
1015
+ });
1016
+ }
1017
+ });
1018
+ },
904
1019
  /**
905
1020
  * @typedef {object} FilterPersonalizationConfiguration
906
- * @property {string} key of the item that should be result of the personalisation
907
- * @property {string} operator operator in which the items should be filtered
908
- * @property {string[]} values filter values for the given operator
909
- * @property {string} inputControl
1021
+ * @property {string} key Key of the value that is the result of the personalization
1022
+ * @property {string} operator Operator defining how the items are filtered
1023
+ * @property {string[]} values Filter values for the given operator
1024
+ * @property {string} inputControl <code>Control</code> that is used as input for the value
910
1025
  */
911
1026
  /**
912
- *
913
- * @param {sap.ui.core.Control | string} oControl Instance / ID of the control which is to be reset
914
- * @param {FilterPersonalizationConfiguration[]} aConfigurations an array containing the group personalization configuration objects
915
- * @returns {Promise} Opa waitFor
1027
+ * OPA5 test action
1028
+ * 1. Opens the personalization dialog of a given chart.
1029
+ * 2. Executes the given <code>FilterPersonalizationConfiguration</code>.
1030
+ * 3. Closes the personalization dialog.
1031
+ * @param {sap.ui.core.Control | string} oControl Instance / ID of the <code>Control</code> that is filtered
1032
+ * @param {FilterPersonalizationConfiguration[]} aConfigurations Array containing the filter personalization configuration objects
1033
+ * @returns {Promise} OPA waitFor
916
1034
  */
917
1035
  iPersonalizeFilter: function(oControl, aConfigurations) {
918
1036
  return iPersonalize.call(this, oControl, Util.texts.filter, {
@@ -959,11 +1077,14 @@ sap.ui.define([
959
1077
  },
960
1078
  /**
961
1079
  * @typedef {object} GroupPersonalizationConfiguration
962
- * @property {string} key of the item that should be result of the personalisation
963
- * @property {boolean} showFieldAsColumn determinating if the "Show Field as Column" checkbox should be checked
1080
+ * @property {string} key of the item that is the result of the personalization
1081
+ * @property {boolean} showFieldAsColumn Determines if the "Show Field as Column" checkbox is to be checked
964
1082
  */
965
1083
  /**
966
- *
1084
+ * Opa5 test action:
1085
+ * 1. Opens the personalization dialog of a given control.
1086
+ * 2. Executes the given <code>GroupPersonalizationConfiguration</code>.
1087
+ * 3. Closes the personalization dialog.
967
1088
  * @param {sap.ui.core.Control | string} oControl Instance / ID of the control which is to be reset
968
1089
  * @param {GroupPersonalizationConfiguration[]} aConfigurations an array containing the group personalization configuration objects
969
1090
  * @returns {Promise} Opa waitFor
@@ -972,7 +1093,7 @@ sap.ui.define([
972
1093
  return iPersonalize.call(this, oControl, Util.texts.group, {
973
1094
  success: function(oP13nDialog) {
974
1095
  this.waitFor({
975
- controlType: (oP13nDialog.getContent()[0].getView("group") ? "sap.ui.mdc.p13n.panels.GroupPanel" : "sap.m.p13n.GroupPanel"),
1096
+ controlType: oP13nDialog.getContent()[0].getView("group") && oP13nDialog.getContent()[0].getView("group").getContent().isA("sap.ui.mdc.p13n.panels.GroupPanel") ? "sap.ui.mdc.p13n.panels.GroupPanel" : "sap.m.p13n.GroupPanel",
976
1097
  matchers: new Ancestor(oP13nDialog, false),
977
1098
  success: function(aGroupPanels) {
978
1099
  var oGroupPanel = aGroupPanels[0];
@@ -1001,20 +1122,23 @@ sap.ui.define([
1001
1122
  },
1002
1123
  /**
1003
1124
  * @typedef {object} SortPersonalizationConfiguration
1004
- * @property {string} key of the item that should be result of the personalisation
1005
- * @property {boolean} descending determinating if the sort direction is descending
1125
+ * @property {string} key Key of the item that is the result of the personalization
1126
+ * @property {boolean} descending Determines whether the sort direction is descending
1006
1127
  */
1007
1128
  /**
1008
- *
1009
- * @param {sap.ui.core.Control | string} oControl Instance / ID of the control which is to be reset
1010
- * @param {SortPersonalizationConfiguration[]} aConfigurations an array containing the sort personalization configuration objects
1011
- * @returns {Promise} Opa waitFor
1129
+ * OPA5 test action
1130
+ * 1. Opens the personalization dialog of a given chart.
1131
+ * 2. Executes the given <code>SortPersonalizationConfiguration</code>.
1132
+ * 3. Closes the personalization dialog.
1133
+ * @param {sap.ui.core.Control | string} oControl Instance / ID of the <code>Control</code> that is sorted
1134
+ * @param {SortPersonalizationConfiguration[]} aConfigurations Array containing the sort personalization configuration objects
1135
+ * @returns {Promise} OPA waitFor
1012
1136
  */
1013
1137
  iPersonalizeSort: function(oControl, aConfigurations) {
1014
1138
  return iPersonalize.call(this, oControl, Util.texts.sort, {
1015
1139
  success: function(oP13nDialog) {
1016
1140
  this.waitFor({
1017
- controlType: oP13nDialog.getContent()[0].getView("sort") ? "sap.ui.mdc.p13n.panels.SortQueryPanel" : "sap.m.p13n.SortPanel",
1141
+ controlType: oP13nDialog.getContent()[0].getView("sort") && oP13nDialog.getContent()[0].getView("sort").getContent().isA("sap.ui.mdc.p13n.panels.SortQueryPanel") ? "sap.ui.mdc.p13n.panels.SortQueryPanel" : "sap.m.p13n.SortPanel",
1018
1142
  matchers: new Ancestor(oP13nDialog, false),
1019
1143
  success: function(aSortPanels) {
1020
1144
  var oSortPanel = aSortPanels[0];
@@ -1042,8 +1166,13 @@ sap.ui.define([
1042
1166
  });
1043
1167
  },
1044
1168
  /**
1045
- * @param {sap.ui.core.Control | string} oControl Instance / ID of the control which is to be reset
1046
- * @returns {Promise} Opa waitFor
1169
+ * Opa5 test action
1170
+ * 1. Opens the personalization dialog of a given chart.
1171
+ * 2. Presses the reset personalization button.
1172
+ * 3. Confirms the reset dialog.
1173
+ * 4. Closes the personalization dialog.
1174
+ * @param {sap.ui.core.Control | string} oControl Instance / ID of the <code>Control</code> that is reset
1175
+ * @returns {Promise} OPA waitFor
1047
1176
  */
1048
1177
  iResetThePersonalization: function (oControl) {
1049
1178
  return iOpenThePersonalizationDialog.call(this, oControl, {
@@ -1064,5 +1193,5 @@ sap.ui.define([
1064
1193
  }
1065
1194
  });
1066
1195
  }
1067
- };
1196
+ };
1068
1197
  });