@openui5/sap.ui.mdc 1.93.3 → 1.96.1

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 (237) hide show
  1. package/.reuse/dep5 +6 -11
  2. package/THIRDPARTY.txt +10 -16
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +236 -334
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
  7. package/src/sap/ui/mdc/Chart.js +150 -22
  8. package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
  9. package/src/sap/ui/mdc/ChartNew.js +107 -66
  10. package/src/sap/ui/mdc/Control.js +4 -3
  11. package/src/sap/ui/mdc/Element.js +5 -4
  12. package/src/sap/ui/mdc/Field.js +2 -2
  13. package/src/sap/ui/mdc/FilterBar.js +1 -10
  14. package/src/sap/ui/mdc/FilterField.js +28 -4
  15. package/src/sap/ui/mdc/Link.js +2 -2
  16. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  17. package/src/sap/ui/mdc/Table.js +160 -79
  18. package/src/sap/ui/mdc/TableDelegate.js +20 -3
  19. package/src/sap/ui/mdc/ValueHelp.js +1474 -0
  20. package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
  21. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
  22. package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
  23. package/src/sap/ui/mdc/chart/Item.js +2 -3
  24. package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
  25. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
  26. package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
  27. package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
  28. package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
  29. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
  30. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
  31. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
  32. package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
  33. package/src/sap/ui/mdc/condition/Condition.js +2 -2
  34. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  35. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  36. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  37. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
  38. package/src/sap/ui/mdc/condition/Operator.js +4 -4
  39. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  40. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
  41. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
  42. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
  43. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
  44. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
  45. package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
  46. package/src/sap/ui/mdc/enum/SelectType.js +43 -0
  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 +19 -4
  50. package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
  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 +38 -14
  54. package/src/sap/ui/mdc/field/FieldBase.js +92 -41
  55. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
  56. package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
  57. package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
  58. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
  65. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
  66. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  67. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
  69. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  70. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  71. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  72. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  73. package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
  74. package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
  75. package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
  76. package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
  77. package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
  78. package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
  79. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
  80. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
  81. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
  82. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  83. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
  84. package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
  85. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  86. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
  87. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  88. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  89. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
  90. package/src/sap/ui/mdc/library.js +588 -8
  91. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  92. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  93. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  94. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  95. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  96. package/src/sap/ui/mdc/link/Factory.js +1 -1
  97. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  98. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  99. package/src/sap/ui/mdc/link/Panel.js +1 -1
  100. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  101. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  102. package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
  103. package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
  104. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  105. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  106. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  107. package/src/sap/ui/mdc/messagebundle.properties +31 -5
  108. package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
  109. package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
  110. package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
  111. package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
  112. package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
  113. package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
  114. package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
  115. package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
  116. package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
  117. package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
  118. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
  119. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
  120. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
  121. package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
  122. package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
  123. package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
  124. package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
  125. package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
  126. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
  127. package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
  128. package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
  129. package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
  130. package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
  131. package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
  132. package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
  133. package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
  134. package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
  135. package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
  136. package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
  137. package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
  138. package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
  139. package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
  140. package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
  141. package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
  142. package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
  143. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
  144. package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
  145. package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
  146. package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
  147. package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
  148. package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
  149. package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
  150. package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
  151. package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
  152. package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
  153. package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
  154. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
  155. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -3
  156. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  157. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
  158. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
  159. package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
  160. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
  161. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
  162. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
  163. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
  164. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
  165. package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
  166. package/src/sap/ui/mdc/p13n/Engine.js +3 -2
  167. package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
  168. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  169. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  170. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +22 -24
  171. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
  172. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
  173. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
  174. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
  175. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
  176. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
  177. package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
  178. package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
  179. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
  180. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
  181. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
  182. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
  183. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
  184. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
  185. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
  186. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
  187. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
  188. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
  189. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
  190. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
  191. package/src/sap/ui/mdc/table/Column.js +35 -9
  192. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  193. package/src/sap/ui/mdc/table/GridTableType.js +0 -1
  194. package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
  195. package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
  196. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  197. package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
  198. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  199. package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
  200. package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
  201. package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
  202. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
  203. package/src/sap/ui/mdc/ui/Container.js +2 -2
  204. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  205. package/src/sap/ui/mdc/util/Common.js +26 -0
  206. package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
  207. package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
  208. package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
  209. package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
  210. package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
  211. package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
  212. package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
  213. package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
  214. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
  215. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
  216. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
  217. package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
  218. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
  219. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
  220. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
  221. package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
  222. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
  223. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
  224. package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
  225. package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
  226. package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
  227. package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
  228. package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
  229. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
  230. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
  231. package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
  232. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
  233. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
  234. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
  235. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
  236. package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
  237. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
@@ -11,10 +11,12 @@ sap.ui.define([
11
11
  "sap/ui/test/matchers/PropertyStrictEquals",
12
12
  "sap/ui/test/actions/Press",
13
13
  "sap/ui/test/actions/EnterText",
14
- "./waitForP13nButtonWithParentAndIcon",
14
+ "./waitForP13nButtonWithMatchers",
15
15
  "./waitForP13nDialog",
16
16
  "./waitForSelectWithSelectedTextOnPanel",
17
- "./Util"
17
+ "./Util",
18
+ "sap/base/Log",
19
+ "sap/base/util/UriParameters"
18
20
  ], function(
19
21
  Opa5,
20
22
  Matcher,
@@ -24,40 +26,62 @@ sap.ui.define([
24
26
  PropertyStrictEquals,
25
27
  Press,
26
28
  EnterText,
27
- waitForP13nButtonWithParentAndIcon,
29
+ waitForP13nButtonWithMatchers,
28
30
  waitForP13nDialog,
29
31
  waitForSelectWithSelectedTextOnPanel,
30
- Util
32
+ Util,
33
+ Log,
34
+ UriParameters
31
35
  ) {
32
36
  "use strict";
33
37
 
38
+ var oMDCBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
39
+
34
40
  var iOpenThePersonalizationDialog = function(oControl, oSettings) {
35
41
  var sControlId = typeof oControl === "string" ? oControl : oControl.getId();
36
- var aMatchers = [
37
- new Properties({
38
- title: "View Settings"
39
- })
40
- ];
42
+ var aDialogMatchers = [];
43
+ var aButtonMatchers = [];
41
44
  return this.waitFor({
42
45
  id: sControlId,
43
46
  success: function(oControlInstance) {
44
47
  Opa5.assert.ok(oControlInstance);
45
48
 
49
+ aButtonMatchers.push(new Ancestor(oControlInstance));
50
+
46
51
  if (oControlInstance.isA("sap.ui.comp.smartchart.SmartChart")) {
47
- aMatchers.push(function(oP13nDialog) {
52
+ aDialogMatchers.push(function(oP13nDialog) {
48
53
  return oP13nDialog.getParent().getChart() === oControlInstance.getChart().getId();
49
54
  });
50
55
  } else {
51
- aMatchers.push(new Ancestor(oControlInstance, false));
56
+ aDialogMatchers.push(new Ancestor(oControlInstance, false));
57
+ }
58
+
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
+ }));
52
77
  }
53
78
 
54
- waitForP13nButtonWithParentAndIcon.call(this, {
55
- parent: oControlInstance,
56
- icon: Util.icons.settings,
79
+ waitForP13nButtonWithMatchers.call(this, {
57
80
  actions: new Press(),
81
+ matchers: aButtonMatchers,
58
82
  success: function() {
59
83
  waitForP13nDialog.call(this, {
60
- matchers: aMatchers,
84
+ matchers: aDialogMatchers,
61
85
  success: function(oP13nDialog) {
62
86
  if (oSettings && typeof oSettings.success === "function") {
63
87
  oSettings.success.call(this, oP13nDialog);
@@ -127,7 +151,7 @@ sap.ui.define([
127
151
  success: function(aLists) {
128
152
  Opa5.assert.equal(aLists.length, 1 , "One list found");
129
153
  if (oSettings && typeof oSettings.success === "function") {
130
- oSettings.succes.call(this, aLists[0]);
154
+ oSettings.success.call(this, aLists[0]);
131
155
  }
132
156
  }
133
157
  });
@@ -430,17 +454,321 @@ sap.ui.define([
430
454
  });
431
455
  };
432
456
 
457
+ var iPersonalizeListViewItems = function(oP13nDialog, aItems) {
458
+ this.waitFor({
459
+ controlType: oP13nDialog.getContent()[0].getView("columns") ? "sap.ui.mdc.p13n.panels.ListView" : "sap.m.p13n.SelectionPanel",
460
+ matchers: new Ancestor(oP13nDialog, false),
461
+ success: function(aListViews) {
462
+ var oListView = aListViews[0];
463
+ this.waitFor({
464
+ controlType: "sap.m.ColumnListItem",
465
+ matchers: new Ancestor(oListView, false),
466
+ actions: function(oColumnListItem) {
467
+ this.waitFor({
468
+ controlType: "sap.m.Label",
469
+ matchers: new Ancestor(oColumnListItem, false),
470
+ success: function(aLabels) {
471
+ var oLabelControl = aLabels[0];
472
+ this.waitFor({
473
+ controlType: "sap.m.CheckBox",
474
+ matchers: [
475
+ new Ancestor(oColumnListItem, false)
476
+ ],
477
+ actions: function(oCheckBox) {
478
+ if ((!oCheckBox.getSelected() && aItems.includes(oLabelControl.getText())) ||
479
+ (oCheckBox.getSelected() && !aItems.includes(oLabelControl.getText()))) {
480
+ new Press().executeOn(oCheckBox);
481
+ }
482
+ },
483
+ success: function(aCheckBoxes) {
484
+ if (aCheckBoxes[0].getSelected()) {
485
+ // click on columnlist item
486
+ new Press().executeOn(oColumnListItem);
487
+ // click on move to top
488
+ if (oColumnListItem.getParent().getItems().indexOf(oColumnListItem) > 0) {
489
+ this.waitFor({
490
+ controlType: "sap.m.Button",
491
+ matchers: [
492
+ new PropertyStrictEquals({
493
+ name: "icon",
494
+ value: Util.icons.movetotop
495
+ })
496
+ ],
497
+ actions: new Press(),
498
+ success: function() {
499
+ var iIndex = aItems.indexOf(oLabelControl.getText());
500
+ while (iIndex > 0) {
501
+ this.waitFor({
502
+ controlType: "sap.m.Button",
503
+ matchers: [
504
+ new PropertyStrictEquals({
505
+ name: "icon",
506
+ value: Util.icons.movedown
507
+ })
508
+ ],
509
+ actions: new Press()
510
+ });
511
+ iIndex--;
512
+ }
513
+ }
514
+ });
515
+ }
516
+ }
517
+ }
518
+ });
519
+ }
520
+ });
521
+ }.bind(this),
522
+ success: function() {
523
+ iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
524
+ }
525
+ });
526
+ }
527
+ });
528
+ };
529
+
530
+ var iPersonalizeGroupViewItem = function(oGroupViewItem, mSettings) {
531
+ // Get sap.m.Panel of GroupViewItem
532
+ this.waitFor({
533
+ controlType: "sap.m.Panel",
534
+ matchers: new Ancestor(oGroupViewItem, true),
535
+ success: function(aPanels) {
536
+ var oGroupPanel = aPanels[0];
537
+ // Get the expand button for the panel
538
+ this.waitFor({
539
+ controlType: "sap.m.Button",
540
+ matchers: new Ancestor(oGroupPanel, true),
541
+ success: function(aButtons) {
542
+ var oButton = aButtons[0];
543
+ // click on expand button
544
+ if (!oGroupPanel.getExpanded()) {
545
+ new Press().executeOn(oButton);
546
+ }
547
+ this.waitFor({
548
+ controlType: "sap.m.Toolbar",
549
+ matchers: new Ancestor(oGroupPanel, true),
550
+ success: function(aToolbars) {
551
+ var oToolbar = aToolbars[0];
552
+ // Get label of the GroupViewItem
553
+ this.waitFor({
554
+ controlType: "sap.m.Label",
555
+ matchers: new Ancestor(oToolbar, true),
556
+ success: function(aToolbarLabels) {
557
+ var oToolbarLabel = aToolbarLabels[0];
558
+ this.waitFor({
559
+ controlType: "sap.m.List",
560
+ matchers: new Ancestor(oGroupPanel, true),
561
+ success: function(aLists) {
562
+ var oList = aLists[0];
563
+ // Get CustomListItems inside the GroupViewItem panel
564
+ this.waitFor({
565
+ controlType: "sap.m.CustomListItem",
566
+ matchers: new Ancestor(oList, true),
567
+ actions: function(oFilterItem) {
568
+ this.waitFor({
569
+ controlType: "sap.m.Label",
570
+ matchers: new Ancestor(oFilterItem, false),
571
+ success: function(aFilterItemLabels) {
572
+ var oFilterItemLabel = aFilterItemLabels[0];
573
+ this.waitFor({
574
+ controlType: "sap.m.CheckBox",
575
+ matchers: new Ancestor(oFilterItem, false),
576
+ actions: function (oFilterItemCheckBox) {
577
+ if (mSettings[oToolbarLabel.getText()]) {
578
+ var aSettings = mSettings[oToolbarLabel.getText()];
579
+ // check / uncheck item if needed and group is in mSettings
580
+ if ((aSettings.includes(oFilterItemLabel.getText()) && !oFilterItemCheckBox.getSelected()) ||
581
+ (!aSettings.includes(oFilterItemLabel.getText()) && oFilterItemCheckBox.getSelected())) {
582
+ new Press().executeOn(oFilterItemCheckBox);
583
+ }
584
+ } else {
585
+ // uncheck all items of group if it's not in mSettings
586
+ if (oFilterItemCheckBox.getSelected()) {
587
+ new Press().executeOn(oFilterItemCheckBox);
588
+ }
589
+ }
590
+ }
591
+ });
592
+ }
593
+ });
594
+ }.bind(this),
595
+ // close group panel
596
+ success: function() {
597
+ if (oGroupPanel.getExpanded()) {
598
+ new Press().executeOn(oButton);
599
+ }
600
+ }
601
+ });
602
+ }
603
+ });
604
+ }
605
+ });
606
+ }
607
+ });
608
+ }
609
+ });
610
+ }
611
+ });
612
+ };
613
+
433
614
  return {
615
+ iPressTheOKButtonOnTheDialog: function(oDialog, oSettings) {
616
+ return iPressTheOKButtonOnTheDialog.call(this, oDialog, oSettings);
617
+ },
618
+ iOpenThePersonalizationDialog: function(oControl, oSettings) {
619
+ return iOpenThePersonalizationDialog.call(this, oControl, oSettings);
620
+ },
434
621
  iPersonalizeChart: function(oControl, sChartType, aItems) {
435
622
  return iPersonalize.call(this, oControl, Util.texts.chart, {
436
623
  success: function(oP13nDialog) {
437
- this.waitFor({
438
- controlType: "sap.m.P13nDimMeasurePanel",
439
- matchers: new Ancestor(oP13nDialog, false),
440
- success: function(aP13nDimMeasurePanels) {
441
- var oP13nDimMeasurePanel = aP13nDimMeasurePanels[0];
442
- // Setup chart type
443
- this.waitFor({
624
+
625
+ if (UriParameters.fromQuery(window.location.search).get("newChartP13n") === "true") {
626
+
627
+ this.waitFor({
628
+ controlType: "sap.ui.mdc.p13n.panels.ChartItemPanelNew",
629
+ matchers: new Ancestor(oP13nDialog, false),
630
+ success: function() {
631
+ // Setup chart type
632
+ var aItemsToRemoveIds = [];
633
+ var aItemsAlreadyPresent = [];
634
+
635
+ this.waitFor({
636
+
637
+ controlType: "sap.m.ColumnListItem",
638
+ matchers: [
639
+ new Ancestor(oP13nDialog, false)
640
+ ],
641
+ 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){
676
+
677
+ this.waitFor({
678
+
679
+ controlType: "sap.m.Button",
680
+ matchers: [
681
+ new Ancestor(oP13nDialog, false),
682
+ new Properties({
683
+ id: oBtnId
684
+ })
685
+ ],
686
+ success: function(aBtns) {
687
+ new Press().executeOn(aBtns[0]);
688
+ }
689
+ });
690
+
691
+ }.bind(this));
692
+
693
+ var aItemsToAdd = aItems.filter(function(oItem){return aItemsAlreadyPresent.indexOf(oItem.key) === -1;});
694
+
695
+ aItemsToAdd.forEach(function(oItem) {
696
+
697
+ if (oItem.kind) {
698
+ this.waitFor({
699
+ controlType: "sap.m.ComboBox",
700
+ matchers: [
701
+ new Ancestor(oP13nDialog, false),
702
+ new Properties({
703
+ id: "p13nPanel-templateComboBox-" + oItem.kind
704
+ })
705
+ ],
706
+ actions: function(oComboBox) {
707
+ iChangeComboBoxSelection.call(this, oComboBox, oItem.key);
708
+ }.bind(this)
709
+ });
710
+ } else {
711
+ Log.error("P13nChartPersonalizationOPA: No kind field given for " + oItem.key + ". Ignoring the field!");
712
+ }
713
+
714
+
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;
734
+
735
+ if (bItemIsPresent) {
736
+
737
+ var bMobile = oColumnListItem.getTable().getParent().getParent()._bMobileMode;
738
+ if (bMobile && oColumnListItem.getCells()[0].getItems[1].getVisible() == false) {
739
+ return;
740
+ }
741
+
742
+ 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({
444
772
  controlType: "sap.m.OverflowToolbar",
445
773
  matchers: new Ancestor(oP13nDimMeasurePanel, false),
446
774
  success: function(aOverflowToolbars) {
@@ -493,7 +821,7 @@ sap.ui.define([
493
821
  });
494
822
  }.bind(this),
495
823
  success: function() {
496
- iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
824
+ iPressTheOKButtonOnTheDialog.call(this,oP13nDialog);
497
825
  }
498
826
  });
499
827
  }
@@ -501,9 +829,10 @@ sap.ui.define([
501
829
  }
502
830
  });
503
831
  }
504
- });
505
- }
506
- });
832
+ });
833
+ }
834
+ });
835
+ }
507
836
  }
508
837
  });
509
838
  },
@@ -515,79 +844,59 @@ sap.ui.define([
515
844
  */
516
845
  iPersonalizeColumns: function(oControl, aColumns) {
517
846
  return iPersonalize.call(this, oControl, Util.texts.column, {
847
+ success: function(oP13nDialog) {
848
+ iPersonalizeListViewItems.call(this, oP13nDialog, aColumns);
849
+ }
850
+ });
851
+ },
852
+ iPersonalizeFilterBar: function(oControl, mSettings) {
853
+ var sIcon = Util.icons.group;
854
+ return iOpenThePersonalizationDialog.call(this, oControl, {
518
855
  success: function(oP13nDialog) {
519
856
  this.waitFor({
520
- controlType: "sap.ui.mdc.p13n.panels.ListView",
521
- matchers: new Ancestor(oP13nDialog, false),
522
- success: function(aListViews) {
523
- var oListView = aListViews[0];
857
+ controlType: "sap.m.Button",
858
+ matchers: [
859
+ new Ancestor(oP13nDialog, false),
860
+ new PropertyStrictEquals({
861
+ name: "icon",
862
+ value: sIcon
863
+ })
864
+ ],
865
+ actions: new Press(),
866
+ success: function() {
524
867
  this.waitFor({
525
- controlType: "sap.m.Label",
526
- matchers: new Ancestor(oListView, false),
527
- actions: function(oLabelControl) {
868
+ controlType: "sap.ui.mdc.p13n.panels.GroupView",
869
+ matchers: new Ancestor(oP13nDialog, false),
870
+ success: function(aGroupViews) {
871
+ var oGroupView = aGroupViews[0];
528
872
  this.waitFor({
529
- controlType: "sap.m.ColumnListItem",
530
- matchers: [
531
- new Ancestor(oP13nDialog, false),
532
- new Descendant(oLabelControl)
533
- ],
534
- success: function(aColumnListItems) {
535
- var oColumnListItem = aColumnListItems[0];
873
+ controlType: "sap.m.VBox",
874
+ matchers: new Ancestor(oGroupView, true),
875
+ success: function(aVBoxes) {
876
+ var oVBox = aVBoxes[0];
536
877
  this.waitFor({
537
- controlType: "sap.m.CheckBox",
538
- matchers: [
539
- new Ancestor(oColumnListItem, false)
540
- ],
541
- actions: function(oCheckBox) {
542
- if ((!oCheckBox.getSelected() && aColumns.includes(oLabelControl.getText())) ||
543
- (oCheckBox.getSelected() && !aColumns.includes(oLabelControl.getText()))) {
544
- new Press().executeOn(oCheckBox);
545
- }
546
- },
547
- success: function(aCheckBoxes) {
548
- if (aCheckBoxes[0].getSelected()) {
549
- // click on columnlist item
550
- new Press().executeOn(oColumnListItem);
551
- // click on move to top
552
- if (oColumnListItem.getParent().getItems().indexOf(oColumnListItem) > 0) {
553
- this.waitFor({
554
- controlType: "sap.m.Button",
555
- matchers: [
556
- new PropertyStrictEquals({
557
- name: "icon",
558
- value: Util.icons.movetotop
559
- })
560
- ],
561
- actions: new Press(),
562
- success: function() {
563
- var iIndex = aColumns.indexOf(oLabelControl.getText());
564
- while (iIndex > 0) {
565
- this.waitFor({
566
- controlType: "sap.m.Button",
567
- matchers: [
568
- new PropertyStrictEquals({
569
- name: "icon",
570
- value: Util.icons.movedown
571
- })
572
- ],
573
- actions: new Press()
574
- });
575
- iIndex--;
576
- }
577
- }
578
- });
878
+ controlType: "sap.m.List",
879
+ matchers: new Ancestor(oVBox, true),
880
+ success: function(aLists) {
881
+ var oList = aLists[0];
882
+ this.waitFor({
883
+ controlType: "sap.m.CustomListItem",
884
+ matchers: new Ancestor(oList, true),
885
+ actions: function(oGroupViewItem) {
886
+ iPersonalizeGroupViewItem.call(this, oGroupViewItem, mSettings);
887
+ }.bind(this),
888
+ success: function() {
889
+ iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
579
890
  }
580
- }
891
+ });
581
892
  }
582
893
  });
583
894
  }
584
895
  });
585
- }.bind(this),
586
- success: function() {
587
- iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
588
896
  }
589
897
  });
590
- }
898
+ },
899
+ errorMessage: "No button with icon '" + sIcon + "' found on P13nDialog"
591
900
  });
592
901
  }
593
902
  });
@@ -663,14 +972,14 @@ sap.ui.define([
663
972
  return iPersonalize.call(this, oControl, Util.texts.group, {
664
973
  success: function(oP13nDialog) {
665
974
  this.waitFor({
666
- controlType: "sap.ui.mdc.p13n.panels.GroupPanel",
975
+ controlType: (oP13nDialog.getContent()[0].getView("group") ? "sap.ui.mdc.p13n.panels.GroupPanel" : "sap.m.p13n.GroupPanel"),
667
976
  matchers: new Ancestor(oP13nDialog, false),
668
977
  success: function(aGroupPanels) {
669
978
  var oGroupPanel = aGroupPanels[0];
670
979
  // Remove all group entries
671
980
  iPressAllDeclineButtonsOnPanel.call(this, oGroupPanel, {
672
981
  // Add new group entries
673
- itemAmount: oGroupPanel.getItems().length,
982
+ itemAmount: oGroupPanel._oListControl.getItems().length, //TODO: cleanup
674
983
  success: function() {
675
984
  this.waitFor({
676
985
  controlType: "sap.m.CustomListItem",
@@ -705,14 +1014,14 @@ sap.ui.define([
705
1014
  return iPersonalize.call(this, oControl, Util.texts.sort, {
706
1015
  success: function(oP13nDialog) {
707
1016
  this.waitFor({
708
- controlType: "sap.ui.mdc.p13n.panels.SortQueryPanel",
1017
+ controlType: oP13nDialog.getContent()[0].getView("sort") ? "sap.ui.mdc.p13n.panels.SortQueryPanel" : "sap.m.p13n.SortPanel",
709
1018
  matchers: new Ancestor(oP13nDialog, false),
710
1019
  success: function(aSortPanels) {
711
1020
  var oSortPanel = aSortPanels[0];
712
1021
  // Remove all Sort entries
713
1022
  iPressAllDeclineButtonsOnPanel.call(this, oSortPanel, {
714
1023
  // Add new Sort entries
715
- itemAmount: oSortPanel.getItems().length,
1024
+ itemAmount: oSortPanel._oListControl.getItems().length, //TODO: cleanup,
716
1025
  success: function() {
717
1026
  this.waitFor({
718
1027
  controlType: "sap.m.CustomListItem",
@@ -722,7 +1031,6 @@ sap.ui.define([
722
1031
  aConfigurations.forEach(function(oConfiguration, iIndex) {
723
1032
  iAddSortConfiguration.call(this, oSortPanel, oConfiguration);
724
1033
  }.bind(this));
725
-
726
1034
  iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
727
1035
  }
728
1036
  });
@@ -28,7 +28,10 @@ sap.ui.define([
28
28
  decline: "sap-icon://decline",
29
29
  settings: "sap-icon://action-settings",
30
30
  movetotop: "sap-icon://collapse-group",
31
- movedown: "sap-icon://navigation-down-arrow"
31
+ movetobottom: "sap-icon://expand-group",
32
+ movedown: "sap-icon://navigation-down-arrow",
33
+ moveup: "sap-icon://navigation-up-arrow",
34
+ group: "sap-icon://group-2"
32
35
  }
33
36
 
34
37
  };
@@ -2,28 +2,15 @@
2
2
  * ${copyright}
3
3
  */
4
4
  sap.ui.define([
5
- "sap/ui/test/Opa5",
6
- "sap/ui/test/matchers/Ancestor",
7
- "sap/ui/test/matchers/Properties"
5
+ "sap/ui/test/Opa5"
8
6
  ], function(
9
- Opa5,
10
- Ancestor,
11
- Properties
7
+ Opa5
12
8
  ) {
13
9
  "use strict";
14
10
 
15
- return function waitForP13nButtonWithParentAndIcon(oSettings) {
16
- var aMatchers = [];
17
- if (oSettings.parent) {
18
- aMatchers.push(new Ancestor(oSettings.parent, false));
19
- }
20
- if (oSettings.icon) {
21
- aMatchers.push(
22
- new Properties({
23
- icon: oSettings.icon
24
- })
25
- );
26
- }
11
+ return function waitForP13nButtonWithMatchers(oSettings) {
12
+ var aMatchers = oSettings.matchers ? oSettings.matchers : [];
13
+
27
14
  return this.waitFor({
28
15
  controlType: "sap.m.Button",
29
16
  matchers: aMatchers,
@@ -1,7 +1,6 @@
1
1
  /*!
2
2
  * ${copyright}
3
3
  */
4
-
5
4
  sap.ui.define([
6
5
  "sap/ui/test/Opa5",
7
6
  "test-resources/sap/ui/mdc/testutils/opa/p13n/Actions",