@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
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.ui.base.Object
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.93.3
28
+ * @version 1.96.1
29
29
  *
30
30
  * @private
31
31
  * @ui5-restricted sap.ui.mdc
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @extends sap.ui.base.Object
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.93.3
42
+ * @version 1.96.1
43
43
  *
44
44
  * @private
45
45
  * @ui5-restricted sap.ui.mdc
@@ -957,6 +957,7 @@ sap.ui.define([
957
957
  Engine.prototype._retrievePropertyHelper = function(vControl, aCustomPropertyInfo){
958
958
 
959
959
  var oRegistryEntry = this._getRegistryEntry(vControl);
960
+ var oControl = Engine.getControlInstance(vControl);
960
961
 
961
962
  if (aCustomPropertyInfo) {
962
963
  if (oRegistryEntry.helper){
@@ -970,7 +971,7 @@ sap.ui.define([
970
971
  return Promise.resolve(oRegistryEntry.helper);
971
972
  }
972
973
 
973
- return vControl.initPropertyHelper().then(function(oPropertyHelper){
974
+ return oControl.initPropertyHelper().then(function(oPropertyHelper){
974
975
  oRegistryEntry.helper = oPropertyHelper;
975
976
  return oPropertyHelper;
976
977
  }, function(sHelperError){
@@ -171,7 +171,8 @@ sap.ui.define([
171
171
  text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.RESET"),
172
172
  press: function(oEvt) {
173
173
 
174
- var oControl = oEvt.getSource().getParent().getParent().getParent();
174
+ var oDialog = oEvt.getSource().getParent().getParent();
175
+ var oControl = oDialog.getParent();
175
176
 
176
177
  var sResetText = mSettings.warningText ? mSettings.warningText : sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("filterbar.ADAPT_RESET_WARNING");
177
178
  MessageBox.warning(sResetText, {
@@ -179,6 +180,8 @@ sap.ui.define([
179
180
  emphasizedAction: MessageBox.Action.OK,
180
181
  onClose: function (sAction) {
181
182
  if (sAction === MessageBox.Action.OK) {
183
+ // --> focus "OK" button after 'reset' has been triggered
184
+ oDialog.getButtons()[0].focus();
182
185
  mSettings.reset(oControl);
183
186
  }
184
187
  }
@@ -193,7 +196,7 @@ sap.ui.define([
193
196
  prepareAdaptationData: function(vProperties, fnEnhace, bGroupData) {
194
197
 
195
198
  var oPropertyHelper =
196
- vProperties.isA && vProperties.isA("sap.ui.mdc.util.PropertyHelper") ?
199
+ vProperties && vProperties.getProperties instanceof Function ?
197
200
  vProperties : new P13nPropertyHelper(vProperties);
198
201
 
199
202
  var aItems = [];
@@ -214,7 +217,7 @@ sap.ui.define([
214
217
 
215
218
  mItem.name = oProperty.name;
216
219
  mItem.label = oProperty.getLabel() || oProperty.name;
217
- mItem.tooltip = oProperty.tooltip ? oProperty.tooltip : oProperty.getLabel();
220
+ mItem.tooltip = oProperty.tooltip;
218
221
 
219
222
  if (mItemsGrouped) {
220
223
  mItem.group = oProperty.group ? oProperty.group : "BASIC";
@@ -239,63 +242,6 @@ sap.ui.define([
239
242
 
240
243
  },
241
244
 
242
- //TODO: align comp<>mdc
243
- prepareP13nData: function(oCurrentState, vProperties, fnEnhace) {
244
-
245
- var oPropertyHelper =
246
- vProperties.isA && vProperties.isA("sap.ui.mdc.util.PropertyHelper") ?
247
- vProperties : new P13nPropertyHelper(vProperties);
248
-
249
- var aItems = [], mItemsGrouped = {};
250
-
251
- //TODO----
252
- var aItemState = oCurrentState.items || [];
253
- var mExistingFilters = oCurrentState.filter || [];
254
- var mExistingProperties = this.arrayToMap(aItemState);
255
- //TODO-----
256
-
257
- oPropertyHelper.getProperties().forEach(function(oProperty) {
258
-
259
- var mItem = merge({}, oProperty, mExistingProperties[oProperty.name]);
260
-
261
- //TODO-----
262
- var sKey = oProperty.name;
263
- var oExistingProperty = mExistingProperties[sKey];
264
- mItem.visible = oExistingProperty ? true : false;
265
- mItem.position = oExistingProperty ? oExistingProperty.position : -1;
266
- if (mExistingFilters[sKey]) {
267
- var aExistingFilters = mExistingFilters[sKey];
268
- mItem.isFiltered = aExistingFilters && aExistingFilters.length > 0 ? true : false;
269
- }
270
- //TODO------
271
-
272
-
273
- if (fnEnhace instanceof Function) {
274
- var bIsValid = fnEnhace(mItem, oProperty);
275
- if (!bIsValid) {
276
- return;
277
- }
278
- }
279
-
280
- mItem.name = oProperty.name;
281
- mItem.label = oProperty.getLabel() || oProperty.name;
282
- mItem.tooltip = oProperty.tooltip ? oProperty.tooltip : oProperty.getLabel();
283
- mItem.visibleInDialog = oProperty.hasOwnProperty("visibleInDialog") ? oProperty.visibleInDialog : true;
284
-
285
- mItem.group = mItem.group ? mItem.group : "BASIC";
286
- mItemsGrouped[mItem.group] = mItemsGrouped[mItem.group] ? mItemsGrouped[mItem.group] : [];
287
- mItemsGrouped[mItem.group].push(mItem);
288
-
289
- aItems.push(mItem);
290
-
291
- });
292
-
293
- return {
294
- items: aItems,
295
- itemsGrouped: this._buildGroupStructure(mItemsGrouped)
296
- };
297
- },
298
-
299
245
  //TODO: generify
300
246
  sortP13nData: function (oSorting, aItems) {
301
247
 
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.mdc.util.PropertyHelper
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.93.3
32
+ * @version 1.96.1
33
33
  *
34
34
  * @private
35
35
  * @experimental
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @extends sap.ui.base.Object
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.93.3
34
+ * @version 1.96.1
35
35
  *
36
36
  * @private
37
37
  * @ui5-restricted sap.ui.mdc
@@ -104,20 +104,20 @@ sap.ui.define([
104
104
  var sAggregationName;
105
105
  var oXConfig;
106
106
 
107
- return Promise.resolve()
108
- .then(oModifier.getControlMetadata.bind(oModifier, oControl))
107
+ return oModifier.getControlMetadata(oControl)
109
108
  .then(function(oRetrievedControlMetadata) {
110
109
  oControlMetadata = oRetrievedControlMetadata;
111
110
  sAggregationName = sAffectedAggregation ? sAffectedAggregation : oControlMetadata.getDefaultAggregation().name;
112
111
  return oModifier.getAggregation(oControl, "customData");
113
112
  })
114
113
  .then(function(aCustomData) {
115
- return aCustomData.find(function(oCustomData) {
116
- return Promise.resolve()
117
- .then(oModifier.getProperty.bind(oModifier, oCustomData, "key"))
118
- .then(function(sKey) {
119
- return sKey == "xConfig";
120
- });
114
+
115
+ return Promise.all(aCustomData.map(function(oCustomData){
116
+ return oModifier.getProperty(oCustomData, "key");
117
+ })).then(function(aCustomDataKeys){
118
+ return aCustomData.reduce(function(oResult, mCustomData, iIndex){
119
+ return aCustomDataKeys[iIndex] === "xConfig" ? mCustomData : oResult;
120
+ }, undefined);
121
121
  });
122
122
  })
123
123
  .then(function(oRetrievedXConfig) {
@@ -160,12 +160,12 @@ sap.ui.define([
160
160
 
161
161
  var oAppComponent = mPropertyBag ? mPropertyBag.appComponent : undefined;
162
162
 
163
- if (!oXConfig) {
164
- return Promise.resolve()
165
- .then(oModifier.createAndAddCustomData.bind(oModifier, oControl, "xConfig", oConfig, oAppComponent))
166
- .then(function() {
167
- return oConfig;
168
- });
163
+ if (!oControl._bHasXConfig) {
164
+ oControl._bHasXConfig = true;
165
+ return oModifier.createAndAddCustomData(oControl, "xConfig", oConfig, oAppComponent)
166
+ .then(function() {
167
+ return oConfig;
168
+ });
169
169
  } else {
170
170
  oModifier.setProperty(oXConfig, "value", oConfig);
171
171
  return oConfig;
@@ -187,21 +187,19 @@ sap.ui.define([
187
187
 
188
188
  if (oModificationPayload) {
189
189
  var oModifier = oModificationPayload.propertyBag ? oModificationPayload.propertyBag.modifier : JsControlTreeModifier;
190
- return Promise.resolve()
191
- .then(oModifier.getAggregation.bind(oModifier, oControl, "customData"))
190
+ return oModifier.getAggregation(oControl, "customData")
192
191
  .then(function(aCustomData) {
193
- return aCustomData.find(function(oCustomData) {
194
- return Promise.resolve()
195
- .then(oModifier.getProperty.bind(oModifier, oCustomData, "key"))
196
- .then(function(sKey) {
197
- return sKey == "xConfig";
198
- });
192
+ return Promise.all(aCustomData.map(function(oCustomData){
193
+ return oModifier.getProperty(oCustomData, "key");
194
+ })).then(function(aCustomDataKeys){
195
+ return aCustomData.reduce(function(oResult, mCustomData, iIndex){
196
+ return aCustomDataKeys[iIndex] === "xConfig" ? mCustomData : oResult;
197
+ }, undefined);
199
198
  });
200
199
  })
201
200
  .then(function(oAggregationConfig) {
202
201
  if (oAggregationConfig) {
203
- return Promise.resolve()
204
- .then(oModifier.getProperty.bind(oModifier, oAggregationConfig, "value"))
202
+ return oModifier.getProperty(oAggregationConfig, "value")
205
203
  .then(function(oValue) {
206
204
  return merge({}, oValue);
207
205
  });
@@ -0,0 +1,59 @@
1
+ /*
2
+ * ! OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "./ListView",
8
+ "sap/ui/model/Sorter"
9
+ ], function(ListView, Sorter) {
10
+ "use strict";
11
+
12
+ /**
13
+ * Constructor for a new ActionToolbarPanel
14
+ *
15
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
16
+ * @param {object} [mSettings] initial settings for the new control
17
+ * @class
18
+ * @extends sap.ui.mdc.p13n.panels.ListView
19
+ * @author SAP SE
20
+ * @constructor The ActionToolbarPanel is a list based view to personalize selection and ordering of a Control aggregation.
21
+ * @private
22
+ * @experimental
23
+ * @since 1.85
24
+ * @alias sap.ui.mdc.p13n.panels.ActionToolbarPanel
25
+ * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
26
+ */
27
+ var ActionToolbarPanel = ListView.extend("sap.ui.mdc.p13n.panels.ActionToolbarPanel", {
28
+ metadata: {
29
+ library: "sap.ui.mdc"
30
+ },
31
+ renderer: {
32
+ apiVersion: 2
33
+ }
34
+ });
35
+
36
+ ActionToolbarPanel.prototype._bindListItems = function(mBindingInfo) {
37
+ var oTemplate = this.getTemplate();
38
+ if (oTemplate) {
39
+ var fnGetAlignment = function(oContext) {
40
+ return oContext.getProperty("alignment");
41
+ };
42
+ var oSorter = new Sorter({
43
+ path: "alignment",
44
+ descending: false,
45
+ group: fnGetAlignment
46
+ });
47
+ this._oListControl.bindItems(Object.assign({
48
+ path: this.P13N_MODEL + ">/items",
49
+ sorter: oSorter,
50
+ key: "name",
51
+ templateShareable: false,
52
+ template: this.getTemplate().clone()
53
+ }, mBindingInfo));
54
+ }
55
+ };
56
+
57
+ return ActionToolbarPanel;
58
+
59
+ });
@@ -31,10 +31,9 @@ sap.ui.define([
31
31
  *
32
32
  * @param {string} [sId] ID for the new control, generated automatically if no ID is given
33
33
  * @param {object} [mSettings] initial settings for the new control
34
- * @class
34
+ * @class The AdaptFiltersPanel is meant to provide a container for different filter personalization views.
35
35
  * @extends sap.ui.mdc.ui.Container
36
36
  * @author SAP SE
37
- * @constructor The AdaptFiltersPanel is meant to provide a container for different filter personalization views.
38
37
  * @private
39
38
  * @experimental
40
39
  * @since 1.85
@@ -19,7 +19,6 @@ sap.ui.define([
19
19
  * The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
20
20
  * @extends sap.ui.core.Control
21
21
  * @author SAP SE
22
- * @constructor The API/behaviour is not finalised and hence this control should not be used for productive usage.
23
22
  * @private
24
23
  * @experimental
25
24
  * @since 1.66
@@ -77,9 +76,15 @@ sap.ui.define([
77
76
  * This event is fired if there has been made any change within the <code>BasePanel</code> control.
78
77
  */
79
78
  change: {
79
+ /**
80
+ * Reason for the change (e.g. Add, Remove, Move, SelectAll, DeselectAll)
81
+ */
80
82
  reason: {
81
83
  type: "string"
82
84
  },
85
+ /**
86
+ * The affected item (Note: this may only provided in case one item is affected)
87
+ */
83
88
  item: {
84
89
  type: "object"
85
90
  }
@@ -470,7 +475,10 @@ sap.ui.define([
470
475
  }, this);
471
476
 
472
477
  if (bSelectAll || bDeSelectAll) {
473
- this.fireChange();
478
+ this.fireChange({
479
+ reason: bSelectAll ? "SelectAll" : "DeselectAll",
480
+ item: undefined //No direct item is affected
481
+ });
474
482
  }
475
483
 
476
484
  // in case of 'deselect all', the move buttons for positioning are going to be disabled
@@ -602,7 +610,7 @@ sap.ui.define([
602
610
  };
603
611
 
604
612
  BasePanel.prototype._selectTableItem = function(oTableItem, bSelectAll) {
605
- this._updateEnableOfMoveButtons(oTableItem, true);
613
+ this._updateEnableOfMoveButtons(oTableItem, bSelectAll ? false : true);
606
614
  this._oSelectedItem = oTableItem;
607
615
  if (!bSelectAll) {
608
616
  var oItem = this.getP13nModel().getProperty(this._oSelectedItem.getBindingContext(this.P13N_MODEL).sPath);
@@ -637,19 +645,19 @@ sap.ui.define([
637
645
  var aFields = this.getP13nModel().getProperty("/items");
638
646
 
639
647
  // index of the item in the model not the index in the aggregation
640
- var iOldIndex = aFields.indexOf(oItem.getBindingContext(this.P13N_MODEL).getObject());
648
+ var iOlModelIndex = aFields.indexOf(oItem.getBindingContext(this.P13N_MODEL).getObject());
641
649
 
642
650
  // limit the minumum and maximum index
643
651
  iNewIndex = (iNewIndex <= 0) ? 0 : Math.min(iNewIndex, aItems.length - 1);
644
652
 
645
653
  // new index of the item in the model
646
- iNewIndex = aFields.indexOf(aItems[iNewIndex].getBindingContext(this.P13N_MODEL).getObject());
647
- if (iNewIndex == iOldIndex) {
654
+ var iNewModelIndex = aFields.indexOf(aItems[iNewIndex].getBindingContext(this.P13N_MODEL).getObject());
655
+ if (iNewModelIndex == iOlModelIndex) {
648
656
  return;
649
657
  }
650
658
 
651
659
  // remove data from old position and insert it into new position
652
- aFields.splice(iNewIndex, 0, aFields.splice(iOldIndex, 1)[0]);
660
+ aFields.splice(iNewModelIndex, 0, aFields.splice(iOlModelIndex, 1)[0]);
653
661
  this.getP13nModel().setProperty("/items", aFields);
654
662
 
655
663
  // store the moved item again due to binding
@@ -678,12 +686,13 @@ sap.ui.define([
678
686
 
679
687
  BasePanel.prototype._updateEnableOfMoveButtons = function(oTableItem, bFocus) {
680
688
  var iTableItemPos = this._oListControl.getItems().indexOf(oTableItem);
689
+ var iLastItemPos = this._oListControl.getItems().length - 1;
681
690
  var bUpEnabled = true, bDownEnabled = true;
682
691
  if (iTableItemPos == 0) {
683
692
  // disable move buttons upwards, if the item is at the top
684
693
  bUpEnabled = false;
685
694
  }
686
- if (iTableItemPos == this._oListControl.getItems().length - 1) {
695
+ if (iTableItemPos == iLastItemPos) {
687
696
  // disable move buttons downwards, if the item is at the bottom
688
697
  bDownEnabled = false;
689
698
  }
@@ -18,7 +18,6 @@ sap.ui.define([
18
18
  * The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
19
19
  * @extends sap.ui.mdc.p13n.panels.BasePanel
20
20
  * @author SAP SE
21
- * @constructor The API/behaviour is not finalised and hence this control should not be used for productive usage.
22
21
  * @private
23
22
  * @experimental
24
23
  * @since 1.66
@@ -135,4 +134,4 @@ sap.ui.define([
135
134
 
136
135
  return ChartItemPanel;
137
136
 
138
- });
137
+ });