@openui5/sap.ui.mdc 1.98.0 → 1.101.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 (267) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +4 -4
  3. package/src/sap/ui/mdc/.library +1 -1
  4. package/src/sap/ui/mdc/ActionToolbar.js +6 -3
  5. package/src/sap/ui/mdc/AggregationBaseDelegate.js +1 -1
  6. package/src/sap/ui/mdc/Chart.js +186 -102
  7. package/src/sap/ui/mdc/ChartDelegate.js +85 -30
  8. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  9. package/src/sap/ui/mdc/Control.js +11 -6
  10. package/src/sap/ui/mdc/Element.js +10 -6
  11. package/src/sap/ui/mdc/Field.js +19 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  14. package/src/sap/ui/mdc/FilterField.js +41 -3
  15. package/src/sap/ui/mdc/Link.js +22 -4
  16. package/src/sap/ui/mdc/LinkDelegate.js +9 -7
  17. package/src/sap/ui/mdc/MultiValueField.js +30 -6
  18. package/src/sap/ui/mdc/Table.js +332 -316
  19. package/src/sap/ui/mdc/TableDelegate.js +146 -31
  20. package/src/sap/ui/mdc/ValueHelp.js +136 -624
  21. package/src/sap/ui/mdc/ValueHelpDelegate.js +154 -7
  22. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  24. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  25. package/src/sap/ui/mdc/chart/ChartToolbar.js +56 -11
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +24 -10
  27. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -7
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  29. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  30. package/src/sap/ui/mdc/condition/Condition.js +14 -9
  31. package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
  32. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  33. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  34. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +393 -68
  35. package/src/sap/ui/mdc/condition/Operator.js +14 -2
  36. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
  37. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  38. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  39. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +6 -0
  41. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
  42. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  43. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +36 -9
  44. package/src/sap/ui/mdc/enum/PropagationReason.js +43 -0
  45. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  46. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  47. package/src/sap/ui/mdc/field/ConditionType.js +44 -13
  48. package/src/sap/ui/mdc/field/ConditionsType.js +3 -1
  49. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  50. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  51. package/src/sap/ui/mdc/field/DefineConditionPanel.js +31 -9
  52. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  53. package/src/sap/ui/mdc/field/FieldBase.js +69 -14
  54. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
  55. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  56. package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
  57. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  58. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldValueHelp.js +9 -4
  61. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
  64. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
  65. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
  66. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
  67. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  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/TokenDisplay.js +70 -0
  73. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  74. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  75. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  76. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  77. package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
  78. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  79. package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
  80. package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
  81. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  82. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +137 -216
  83. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  84. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
  85. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  86. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
  87. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
  88. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +144 -64
  89. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  90. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  91. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  92. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +73 -23
  93. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  94. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  95. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +7 -42
  96. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  97. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
  98. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
  99. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  100. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  101. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  102. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  103. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +5 -5
  104. package/src/sap/ui/mdc/library.js +41 -30
  105. package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
  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/ContactDetailsRenderer.js +26 -0
  111. package/src/sap/ui/mdc/link/Factory.js +1 -1
  112. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  113. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  114. package/src/sap/ui/mdc/link/Log.js +1 -1
  115. package/src/sap/ui/mdc/link/Panel.js +205 -29
  116. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  117. package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
  118. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  119. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  120. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  121. package/src/sap/ui/mdc/messagebundle.properties +59 -6
  122. package/src/sap/ui/mdc/messagebundle_ar.properties +40 -6
  123. package/src/sap/ui/mdc/messagebundle_bg.properties +58 -24
  124. package/src/sap/ui/mdc/messagebundle_ca.properties +40 -6
  125. package/src/sap/ui/mdc/messagebundle_cs.properties +40 -6
  126. package/src/sap/ui/mdc/messagebundle_cy.properties +40 -6
  127. package/src/sap/ui/mdc/messagebundle_da.properties +40 -6
  128. package/src/sap/ui/mdc/messagebundle_de.properties +40 -6
  129. package/src/sap/ui/mdc/messagebundle_el.properties +39 -5
  130. package/src/sap/ui/mdc/messagebundle_en.properties +40 -6
  131. package/src/sap/ui/mdc/messagebundle_en_GB.properties +40 -6
  132. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +40 -6
  133. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +68 -9
  134. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +41 -7
  135. package/src/sap/ui/mdc/messagebundle_es.properties +40 -6
  136. package/src/sap/ui/mdc/messagebundle_es_MX.properties +41 -7
  137. package/src/sap/ui/mdc/messagebundle_et.properties +40 -6
  138. package/src/sap/ui/mdc/messagebundle_fi.properties +40 -6
  139. package/src/sap/ui/mdc/messagebundle_fr.properties +41 -7
  140. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +40 -6
  141. package/src/sap/ui/mdc/messagebundle_hi.properties +40 -6
  142. package/src/sap/ui/mdc/messagebundle_hr.properties +40 -6
  143. package/src/sap/ui/mdc/messagebundle_hu.properties +40 -6
  144. package/src/sap/ui/mdc/messagebundle_id.properties +40 -6
  145. package/src/sap/ui/mdc/messagebundle_it.properties +41 -7
  146. package/src/sap/ui/mdc/messagebundle_iw.properties +39 -5
  147. package/src/sap/ui/mdc/messagebundle_ja.properties +41 -7
  148. package/src/sap/ui/mdc/messagebundle_kk.properties +40 -6
  149. package/src/sap/ui/mdc/messagebundle_ko.properties +39 -5
  150. package/src/sap/ui/mdc/messagebundle_lt.properties +40 -6
  151. package/src/sap/ui/mdc/messagebundle_lv.properties +44 -10
  152. package/src/sap/ui/mdc/messagebundle_ms.properties +40 -6
  153. package/src/sap/ui/mdc/messagebundle_nl.properties +40 -6
  154. package/src/sap/ui/mdc/messagebundle_no.properties +40 -6
  155. package/src/sap/ui/mdc/messagebundle_pl.properties +40 -6
  156. package/src/sap/ui/mdc/messagebundle_pt.properties +41 -7
  157. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +40 -6
  158. package/src/sap/ui/mdc/messagebundle_ro.properties +40 -6
  159. package/src/sap/ui/mdc/messagebundle_ru.properties +40 -6
  160. package/src/sap/ui/mdc/messagebundle_sh.properties +43 -9
  161. package/src/sap/ui/mdc/messagebundle_sk.properties +40 -6
  162. package/src/sap/ui/mdc/messagebundle_sl.properties +41 -7
  163. package/src/sap/ui/mdc/messagebundle_sv.properties +41 -7
  164. package/src/sap/ui/mdc/messagebundle_th.properties +43 -9
  165. package/src/sap/ui/mdc/messagebundle_tr.properties +41 -7
  166. package/src/sap/ui/mdc/messagebundle_uk.properties +43 -9
  167. package/src/sap/ui/mdc/messagebundle_vi.properties +40 -6
  168. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +40 -6
  169. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +40 -6
  170. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +24 -15
  171. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  172. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  173. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  174. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +354 -0
  175. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  176. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  177. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
  178. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  179. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  180. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +32 -69
  181. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  182. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
  183. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +412 -326
  184. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  185. package/src/sap/ui/mdc/p13n/Engine.js +169 -66
  186. package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
  187. package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -6
  188. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  189. package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
  190. package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
  191. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
  192. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +2 -2
  193. package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
  194. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  195. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  196. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +76 -16
  197. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
  198. package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
  199. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  200. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  201. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  202. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
  203. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
  204. package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
  205. package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
  206. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +40 -12
  207. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
  208. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  209. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
  210. package/src/sap/ui/mdc/table/Column.js +271 -132
  211. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  212. package/src/sap/ui/mdc/table/GridTableType.js +75 -27
  213. package/src/sap/ui/mdc/table/PropertyHelper.js +71 -95
  214. package/src/sap/ui/mdc/table/ResponsiveTableType.js +121 -40
  215. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  216. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  217. package/src/sap/ui/mdc/table/TableSettings.js +10 -22
  218. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  219. package/src/sap/ui/mdc/table/menu/Item.js +78 -0
  220. package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
  221. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
  222. package/src/sap/ui/mdc/themes/base/Chart.less +6 -0
  223. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  224. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  225. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +4 -3
  226. package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
  227. package/src/sap/ui/mdc/ui/Container.js +0 -240
  228. package/src/sap/ui/mdc/util/DateUtil.js +32 -7
  229. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  230. package/src/sap/ui/mdc/util/FormatUtil.js +2 -2
  231. package/src/sap/ui/mdc/util/IdentifierUtil.js +7 -7
  232. package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
  233. package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
  234. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  235. package/src/sap/ui/mdc/valuehelp/Dialog.js +234 -44
  236. package/src/sap/ui/mdc/valuehelp/Popover.js +7 -4
  237. package/src/sap/ui/mdc/valuehelp/base/Container.js +63 -48
  238. package/src/sap/ui/mdc/valuehelp/base/Content.js +35 -16
  239. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  240. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +161 -284
  241. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +4 -4
  242. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  243. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
  244. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
  245. package/src/sap/ui/mdc/valuehelp/content/ListCollection.js +205 -0
  246. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +67 -66
  247. package/src/sap/ui/mdc/valuehelp/content/MTable.js +94 -185
  248. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -1
  249. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
  250. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
  251. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
  252. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +8 -8
  253. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +43 -27
  254. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  255. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  256. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  257. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  258. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  259. package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
  260. package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
  261. package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
  262. package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
  263. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  264. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  265. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  266. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  267. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -4,7 +4,7 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "./BasePanel",
7
+ "sap/m/p13n/BasePanel",
8
8
  "sap/m/Label",
9
9
  "sap/base/util/deepEqual",
10
10
  "sap/m/CustomListItem",
@@ -15,8 +15,9 @@ sap.ui.define([
15
15
  "sap/ui/core/Icon",
16
16
  "sap/ui/core/library",
17
17
  "sap/m/HBox",
18
- "sap/m/library"
19
- ], function(BasePanel, Label, deepEqual, CustomListItem, List, Panel, Toolbar,Text, Icon, coreLibrary, HBox, mLibrary) {
18
+ "sap/m/library",
19
+ "sap/base/util/merge"
20
+ ], function(BasePanel, Label, deepEqual, CustomListItem, List, Panel, Toolbar,Text, Icon, coreLibrary, HBox, mLibrary, merge) {
20
21
  "use strict";
21
22
 
22
23
 
@@ -35,7 +36,7 @@ sap.ui.define([
35
36
  * @param {string} [sId] ID for the new control, generated automatically if no ID is given
36
37
  * @param {object} [mSettings] initial settings for the new control
37
38
  * @class The GroupView is a list based view to personalize selection and filter values of a Control that allows certain filter capabilities.
38
- * @extends sap.ui.mdc.p13n.panels.BasePanel
39
+ * @extends sap.m.p13n.BasePanel
39
40
  * @author SAP SE
40
41
  * @private
41
42
  * @experimental
@@ -45,7 +46,12 @@ sap.ui.define([
45
46
  */
46
47
  var GroupView = BasePanel.extend("sap.ui.mdc.p13n.panels.GroupView", {
47
48
  metadata: {
48
- library: "sap.ui.mdc"
49
+ library: "sap.ui.mdc",
50
+ properties: {
51
+ itemFactory: {
52
+ type: "function"
53
+ }
54
+ }
49
55
  },
50
56
  renderer: {
51
57
  apiVersion: 2
@@ -64,8 +70,8 @@ sap.ui.define([
64
70
  //Do not read the whole content
65
71
  //Announce tet 'Filter Group' + <grouplabel>, e.g. "Filter Group Basic"
66
72
  formatter: function(sGroupLabel) {
67
- return this.getResourceText("p13nDialog.FILTER_GROUP_DESCRIPTION", sGroupLabel);
68
- }.bind(this)
73
+ return sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.FILTER_GROUP_DESCRIPTION", sGroupLabel);
74
+ }
69
75
  },
70
76
  content: [
71
77
  this._createGroupPanelTemplate()
@@ -77,11 +83,12 @@ sap.ui.define([
77
83
 
78
84
  this._aInitializedLists = [];
79
85
 
80
- this.setTemplate(oGroupPanelTemplate);
86
+ this._setTemplate(oGroupPanelTemplate);
87
+ oGroupPanelTemplate.setType("Inactive");
81
88
  this._setMoveButtonVisibility(true);
82
89
  };
83
90
 
84
- GroupView.prototype.getShowFactory = function() {
91
+ GroupView.prototype._getShowFactory = function() {
85
92
  return this._bShowFactory;
86
93
  };
87
94
 
@@ -116,9 +123,9 @@ sap.ui.define([
116
123
  var oSource = oEvt.getSource();
117
124
  var oInnerList = oSource.getContent()[0];
118
125
  this._addInitializedList(oInnerList);
119
- if (this.getShowFactory()){
126
+ if (this._getShowFactory()){
120
127
  this._addFactoryControl(oInnerList);
121
- this.filterWithoutDestroy(this._aCurrentFilters);// --> check if there is already an existing Filter
128
+ this.filterContent(this._aCurrentFilters);// --> check if there is already an existing Filter
122
129
  }
123
130
 
124
131
  }.bind(this),
@@ -144,16 +151,18 @@ sap.ui.define([
144
151
  GroupView.prototype._createGroupListTemplate = function() {
145
152
  var oList = new List({
146
153
  keyboardMode: ListKeyboardMode.Navigation,
147
- selectionChange: function(oBindingInfo) {
148
- var sPath = oBindingInfo.getParameter("listItem").getBindingContext(this.P13N_MODEL).sPath;
149
- var oItem = this.getP13nModel().getProperty(sPath);
154
+ selectionChange: function(oEvent) {
155
+ var sPath = oEvent.getParameter("listItem").getBindingContext(this.P13N_MODEL).sPath;
156
+ var oItem = this._getP13nModel().getProperty(sPath);
150
157
  var oP13nModel = this.getModel(this.P13N_MODEL);
151
158
  //TODO: remove 'selected' condition enhance
152
159
  if (oP13nModel && oItem) {
153
160
  oP13nModel.setProperty(sPath + "/selected", oItem.visible);
154
161
  }
162
+ var sSpecialChangeReason = this._checkSpecialChangeReason(oEvent.getParameter("selectAll"), oEvent.getParameter("listItems"));
163
+
155
164
  this.fireChange({
156
- reason: oItem.visible ? "Add" : "Remove",
165
+ reason: sSpecialChangeReason || (oItem.visible ? this.CHANGE_REASON_ADD : this.CHANGE_REASON_REMOVE),
157
166
  item: oItem
158
167
  });
159
168
  }.bind(this),
@@ -245,7 +254,7 @@ sap.ui.define([
245
254
  size: "0.5rem",
246
255
  color: IconColor.Neutral,
247
256
  visible: {
248
- path: this.P13N_MODEL + ">isFiltered",
257
+ path: this.P13N_MODEL + ">active",
249
258
  formatter: function(bIsFiltered) {
250
259
  if (bIsFiltered){
251
260
  return true;
@@ -273,7 +282,7 @@ sap.ui.define([
273
282
  oList.getItems().forEach(function(oItem){
274
283
 
275
284
  var sPath = oItem.getBindingContextPath();
276
- var sKey = this.getP13nModel().getProperty(sPath).name;
285
+ var sKey = this._getP13nModel().getProperty(sPath).name;
277
286
 
278
287
  fnItemCallback.call(this, oItem, sKey);
279
288
  }.bind(this));
@@ -332,7 +341,7 @@ sap.ui.define([
332
341
  return aSelectedItems;
333
342
  };
334
343
 
335
- GroupView.prototype.filterWithoutDestroy = function(aFilter) {
344
+ GroupView.prototype.filterContent = function(aFilter) {
336
345
  if (!this._bInitialized || deepEqual(aFilter, this._aCurrentFilters)) {
337
346
  return;
338
347
  }
@@ -348,7 +357,7 @@ sap.ui.define([
348
357
  this._togglePanelVisibility(oPanel);
349
358
  }
350
359
 
351
- if (this.getShowFactory() && aInitializedGroups.indexOf(oInnerList.getId()) > -1) {
360
+ if (this._getShowFactory() && aInitializedGroups.indexOf(oInnerList.getId()) > -1) {
352
361
  this._addFactoryControl(oInnerList);
353
362
  }
354
363
  }.bind(this));
@@ -382,7 +391,7 @@ sap.ui.define([
382
391
  this._oListControl.getItems().forEach(function(oOuterItem){
383
392
  var oPanel = oOuterItem.getContent()[0];
384
393
  var sBindingPath = oPanel.getBindingContext(this.P13N_MODEL).sPath;
385
- var oItem = this.getP13nModel().getProperty(sBindingPath);
394
+ var oItem = this._getP13nModel().getProperty(sBindingPath);
386
395
  if (oItem.group === sGroup) {
387
396
  oPanel.setExpanded(bExpand);
388
397
  }
@@ -396,14 +405,18 @@ sap.ui.define([
396
405
  if (oContext){
397
406
  var sPanelBindingContextPath = oContext.sPath;
398
407
 
399
- var oItem = this.getP13nModel().getProperty(sPanelBindingContextPath);
408
+ var oItem = this._getP13nModel().getProperty(sPanelBindingContextPath);
400
409
  oItem.groupVisible = oInnerList.getVisibleItems().length < 1 ? false : true;
401
410
 
402
- this.getP13nModel().setProperty(sPanelBindingContextPath, oItem);
411
+ this._getP13nModel().setProperty(sPanelBindingContextPath, oItem);
403
412
  }
404
413
 
405
414
  };
406
415
 
416
+ GroupView.prototype.getItems = function() {
417
+ return this._oListControl.getItems();
418
+ };
419
+
407
420
  GroupView.prototype._checkFirstGroup = function() {
408
421
 
409
422
  //One time operation for the first panel in the group view
@@ -429,32 +442,44 @@ sap.ui.define([
429
442
 
430
443
  this._oListControl.getInfoToolbar().addContent(new Text({
431
444
  width: "75%",
432
- text: this.getResourceText("p13nDialog.LIST_VIEW_COLUMN")
445
+ text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.LIST_VIEW_COLUMN")
433
446
  }).addStyleClass("firstColumnPadding"));
434
447
 
435
448
  if (!this._bShowFactory) {
436
449
  this._oListControl.getInfoToolbar().addContent(new Text({
437
450
  textAlign: "Center",
438
451
  width: "25%",
439
- text: this.getResourceText("p13nDialog.LIST_VIEW_ACTIVE")
452
+ text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("p13nDialog.LIST_VIEW_ACTIVE")
440
453
  }).addStyleClass("firstColumnPadding"));
441
454
  }
442
455
 
443
456
  };
444
457
 
445
- GroupView.prototype.setP13nModel = function(oModel) {
446
- this.setModel(oModel, this.P13N_MODEL);
447
- this._bindListItems();
458
+ GroupView.prototype.setP13nData = function(aP13nData) {
459
+ this._getP13nModel().setProperty("/itemsGrouped", aP13nData);
460
+ if (!this._bInitialized) {
461
+ this._bindListItems();
462
+ }
448
463
  this._checkFirstGroup();
449
464
  this._checkAllPanels();
450
465
  };
451
466
 
467
+ GroupView.prototype.getP13nData = function (bOnlyActive) {
468
+ var aItems = this._getP13nModel().getProperty("/itemsGrouped");
469
+ if (bOnlyActive) {
470
+ aItems = aItems.filter(function(oItem){
471
+ return oItem[this.PRESENCE_ATTRIBUTE];
472
+ }.bind(this));
473
+ }
474
+ return aItems;
475
+ };
476
+
452
477
  GroupView.prototype._bindListItems = function () {
453
478
  this._oListControl.bindItems(Object.assign({
454
479
  path: this.P13N_MODEL + ">/itemsGrouped",
455
480
  templateShareable: false,
456
481
  key: "group",
457
- template: this.getTemplate().clone()
482
+ template: this.getAggregation("_template").clone()
458
483
  }));
459
484
  };
460
485
 
@@ -7,14 +7,15 @@
7
7
  sap.ui.define([
8
8
  "sap/m/p13n/SelectionPanel",
9
9
  "sap/m/ColumnListItem",
10
- "sap/m/HBox",
11
- "sap/m/VBox",
10
+ "sap/m/HBox",
11
+ "sap/m/VBox",
12
12
  "sap/m/Link",
13
13
  "sap/m/Text",
14
14
  "sap/ui/core/Icon",
15
15
  "sap/m/library",
16
- "sap/m/MessageBox"
17
- ], function (SelectionPanel, ColumnListItem, HBox, VBox, Link, Text, Icon, mLibrary, MessageBox) {
16
+ "sap/m/OverflowToolbar",
17
+ "sap/ui/model/Filter"
18
+ ], function (SelectionPanel, ColumnListItem, HBox, VBox, Link, Text, Icon, mLibrary, OverflowToolbar, Filter) {
18
19
  "use strict";
19
20
 
20
21
  // shortcut for sap.m.ListType
@@ -40,25 +41,49 @@ sap.ui.define([
40
41
  selected: "{" + this.P13N_MODEL + ">" + this.PRESENCE_ATTRIBUTE + "}",
41
42
  type: ListType.Active,
42
43
  cells: [
43
- new VBox({
44
- items: [
45
- new Link({
46
- tooltip: "{" + this.P13N_MODEL + ">tooltip}",
47
- text: "{" + this.P13N_MODEL + ">text}",
48
- href: "{" + this.P13N_MODEL + ">href}",
49
- target: "{" + this.P13N_MODEL + ">target}",
50
- press: this._onLinkPressed.bind(this)
51
- }),
52
- new Text({
53
- text: "{" + this.P13N_MODEL + ">description}",
54
- visible: "{= ${" + this.P13N_MODEL + ">description} ? true:false}"
44
+ new HBox({
45
+ items: [
46
+ new VBox({
47
+ items: [
48
+ new Link({
49
+ tooltip: "{" + this.P13N_MODEL + ">tooltip}",
50
+ text: "{" + this.P13N_MODEL + ">text}",
51
+ href: "{" + this.P13N_MODEL + ">href}",
52
+ target: "{" + this.P13N_MODEL + ">target}",
53
+ press: this._onLinkPressed.bind(this)
54
+ }),
55
+ new Text({
56
+ text: "{" + this.P13N_MODEL + ">description}",
57
+ visible: "{= ${" + this.P13N_MODEL + ">description} ? true:false}"
58
+ })
59
+ ]
55
60
  })
56
- ]
57
- })
61
+ ]
62
+ })
58
63
  ]
59
64
  });
60
65
  };
61
66
 
67
+ LinkSelectionPanel.prototype.setShowHeader = function(bShowHeader) {
68
+ if (bShowHeader){
69
+ this._oListControl.setHeaderToolbar(new OverflowToolbar({
70
+ content: [
71
+ this._getSearchField()
72
+ ]
73
+ }));
74
+ }
75
+ this.setProperty("showHeader", bShowHeader);
76
+ return this;
77
+ };
78
+
79
+ LinkSelectionPanel.prototype._getSearchField = function() {
80
+ var oSearchField = SelectionPanel.prototype._getSearchField.apply(this, arguments);
81
+
82
+ oSearchField.getLayoutData().setMaxWidth(undefined);
83
+
84
+ return oSearchField;
85
+ };
86
+
62
87
  LinkSelectionPanel.prototype._onLinkPressed = function(oEvent) {
63
88
  this.fireLinkPressed(oEvent);
64
89
  };
@@ -67,6 +92,17 @@ sap.ui.define([
67
92
  this._oListControl.setMultiSelectMode(sMultiSelectMode);
68
93
  };
69
94
 
95
+ LinkSelectionPanel.prototype._filterList = function(bShowSelected, sSarch) {
96
+ var oSearchFilter = [], oSelectedFilter = [];
97
+ if (bShowSelected) {
98
+ oSelectedFilter = new Filter(this.PRESENCE_ATTRIBUTE, "EQ", true);
99
+ }
100
+ if (sSarch) {
101
+ oSearchFilter = new Filter("text", "Contains", sSarch);
102
+ }
103
+ this._oListControl.getBinding("items").filter(new Filter([].concat(oSelectedFilter, oSearchFilter), true));
104
+ };
105
+
70
106
  return LinkSelectionPanel;
71
107
 
72
108
  });
@@ -27,14 +27,11 @@ sap.ui.define([
27
27
  showHeader: true
28
28
  });
29
29
  oSelectionPanel.setEnableReorder(false);
30
- oSelectionPanel.setPanelColumns([oResourceBundle.getText("actiontoolbar.RTA_COLUMN_HEADER"), new Column({
31
- width: "25%",
32
- hAlign: "Center",
33
- vAlign: "Middle"
34
- })]);
35
- var oAdaptationModel = this._getP13nModel(oPropertyHelper);
36
- oSelectionPanel.setP13nModel(oAdaptationModel);
30
+ oSelectionPanel.setFieldColumn(oResourceBundle.getText("actiontoolbar.RTA_COLUMN_HEADER"));
37
31
 
32
+ var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
33
+ oSelectionPanel.setP13nData(oAdaptationData.items);
34
+ this._oPanel = oSelectionPanel;
38
35
  return Promise.resolve(oSelectionPanel);
39
36
  };
40
37
 
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
 
54
54
  return this.getAdaptationControl().retrieveInbuiltFilter().then(function(oAdaptationFilterBar){
55
55
  var oAdaptationModel = this._getP13nModel(oPropertyHelper);
56
- oAdaptationFilterBar.setP13nModel(oAdaptationModel);
56
+ oAdaptationFilterBar.setP13nData(oAdaptationModel.oData);
57
57
  oAdaptationFilterBar.setLiveMode(false);
58
58
  return oAdaptationFilterBar.createFilterFields().then(function(){
59
59
  return oAdaptationFilterBar;
@@ -79,7 +79,6 @@ sap.ui.define([
79
79
  var aExistingFilters = mExistingFilters[oProperty.name];
80
80
  oItem.visible = oExistingProperty ? true : false;
81
81
  oItem.visibleInDialog = true;
82
- oItem.selected = oItem.visible;
83
82
  oItem.position = oExistingProperty ? oExistingProperty.position : -1;
84
83
  oItem.isFiltered = aExistingFilters && aExistingFilters.length > 0 ? true : false;
85
84
  oItem.required = oProperty.required;
@@ -10,8 +10,8 @@ sap.ui.define([
10
10
 
11
11
  var AggregateController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.AggregateController");
12
12
 
13
- AggregateController.prototype.getCurrentState = function () {
14
- return this.getAdaptationControl().getCurrentState().aggregations;
13
+ AggregateController.prototype.getStateKey = function () {
14
+ return "aggregations";
15
15
  };
16
16
 
17
17
  AggregateController.prototype.sanityCheck = function(change) {
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.base.Object
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.98.0
31
+ * @version 1.101.0
32
32
  *
33
33
  * @private
34
34
  * @ui5-restricted sap.ui.mdc
@@ -128,9 +128,13 @@ sap.ui.define([
128
128
  };
129
129
 
130
130
  BaseController.prototype.getCurrentState = function(){
131
- return this._oAdaptationControl.getCurrentState().items;
131
+ return this._oAdaptationControl.getCurrentState()[this.getStateKey()];
132
132
  };
133
133
 
134
+ BaseController.prototype.getStateKey = function(){
135
+ return "items";
136
+ };
137
+
134
138
  BaseController.prototype.getDelta = function(mPropertyBag) {
135
139
  var sPresenceAttribute = this._getPresenceAttribute(mPropertyBag.externalAppliance);
136
140
  var aNewStatePrepared;
@@ -395,6 +399,30 @@ sap.ui.define([
395
399
  return this._oAdaptationModel;
396
400
  };
397
401
 
402
+ BaseController.prototype.changesToState = function(aChanges) {
403
+
404
+ var aState = [];
405
+
406
+ aChanges.forEach(function(oChange){
407
+ var oStateDiffContent = merge({}, oChange.changeSpecificData.content);
408
+ var iIndex = oStateDiffContent.index;
409
+ delete oStateDiffContent.index;
410
+
411
+ //set the position attribute in case to an explicit move
412
+ if (oChange.changeSpecificData.changeType === this.getChangeOperations()["move"]) {
413
+ oStateDiffContent.position = iIndex;
414
+ }
415
+
416
+ //set the presence attribute to false in case of an explicit remove
417
+ if (oChange.changeSpecificData.changeType === this.getChangeOperations()["remove"]) {
418
+ oStateDiffContent[this._getPresenceAttribute()] = false;
419
+ }
420
+
421
+ aState.push(oStateDiffContent);
422
+ }.bind(this));
423
+
424
+ return aState;
425
+ };
398
426
 
399
427
  BaseController.prototype.destroy = function() {
400
428
  BaseObject.prototype.destroy.apply(this, arguments);
@@ -0,0 +1,46 @@
1
+ /*
2
+ * ! OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ './BaseController'
9
+ ], function (BaseController) {
10
+ "use strict";
11
+
12
+ var ChartTypeController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.ChartTypeController", {
13
+ constructor: function() {
14
+ BaseController.apply(this, arguments);
15
+ this._bResetEnabled = true;
16
+ }
17
+ });
18
+
19
+ ChartTypeController.prototype.getCurrentState = function() {
20
+ return {properties: {chartType: this.getAdaptationControl().getChartType()}};
21
+ };
22
+
23
+ ChartTypeController.prototype.getStateKey = function() {
24
+ return "supplementaryConfig";
25
+ };
26
+
27
+ ChartTypeController.prototype.getDelta = function(mPropertyBag) {
28
+
29
+ var sType = mPropertyBag.changedState.type ? mPropertyBag.changedState.type : mPropertyBag.changedState.properties.chartType;
30
+
31
+ var oConditionChange = {
32
+ selectorElement: mPropertyBag.control,
33
+ changeSpecificData: {
34
+ changeType: "setChartType",
35
+ content: {
36
+ chartType: sType
37
+ }
38
+ }
39
+ };
40
+
41
+ return [oConditionChange];
42
+ };
43
+
44
+ return ChartTypeController;
45
+
46
+ });
@@ -6,24 +6,27 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "./BaseController",
9
- "sap/ui/mdc/p13n/FlexUtil"
10
- ], function (BaseController, FlexUtil) {
9
+ "sap/ui/mdc/p13n/FlexUtil",
10
+ 'sap/ui/mdc/p13n/modules/xConfigAPI',
11
+ "sap/base/util/merge"
12
+ ], function (BaseController, FlexUtil, xConfigAPI, merge) {
11
13
  "use strict";
12
14
 
13
15
  var ColumnWidthController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.ColumnWidthController", {
14
16
  constructor: function() {
15
17
  BaseController.apply(this, arguments);
18
+ this._bXConfigEnabled = true;
16
19
  this._bResetEnabled = true;
17
20
  }
18
21
  });
19
22
 
20
- ColumnWidthController.prototype.sanityCheck = function(oChange) {
23
+ ColumnWidthController.prototype.sanityCheck = function(oState) {
21
24
  var aColumnWidth = [];
22
- if (oChange.hasOwnProperty("aggregations") && oChange.aggregations.hasOwnProperty("columns")) {
23
- Object.keys(oChange.aggregations.columns).forEach(function(sItem) {
25
+ if (oState && oState.hasOwnProperty("aggregations") && oState.aggregations.hasOwnProperty("columns")) {
26
+ Object.keys(oState.aggregations.columns).forEach(function(sItem) {
24
27
  var oColumnWidth = {
25
28
  name: sItem,
26
- width: oChange.aggregations.columns[sItem].width
29
+ width: oState.aggregations.columns[sItem].width
27
30
  };
28
31
  aColumnWidth.push(oColumnWidth);
29
32
  });
@@ -35,9 +38,37 @@ sap.ui.define([
35
38
  return this.getAdaptationControl().getCurrentState().xConfig;
36
39
  };
37
40
 
41
+ ColumnWidthController.prototype.getStateKey = function() {
42
+ return "supplementaryConfig";
43
+ };
44
+
45
+ ColumnWidthController.prototype.changesToState = function(aChanges) {
46
+
47
+ var oState;
48
+ var oControl = aChanges.length && aChanges[0].selectorElement;
49
+
50
+ aChanges.forEach(function(oChange){
51
+ var oChangeContent = merge({}, oChange.changeSpecificData.content);
52
+ var oXSettings = {
53
+ name: oChangeContent.name,
54
+ controlMeta: {
55
+ aggregation: "columns",
56
+ property: "width"
57
+ },
58
+ value: oChangeContent.value
59
+ };
60
+
61
+ oState = xConfigAPI.createConfigObject(oControl, oXSettings, oState);
62
+
63
+ });
64
+
65
+ return oState || {};
66
+ };
67
+
38
68
  ColumnWidthController.prototype.getDelta = function(mPropertyBag) {
39
69
  mPropertyBag.deltaAttribute = "width";
40
70
  mPropertyBag.operation = "setColumnWidth";
71
+ mPropertyBag.changedState = mPropertyBag.changedState instanceof Array ? mPropertyBag.changedState : this.sanityCheck(mPropertyBag.changedState);
41
72
  mPropertyBag.existingState = this.sanityCheck(mPropertyBag.existingState);
42
73
  return FlexUtil.getPropertySetterChanges(mPropertyBag);
43
74
  };
@@ -5,8 +5,8 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- 'sap/ui/mdc/condition/FilterOperatorUtil', './BaseController', 'sap/ui/mdc/p13n/P13nBuilder', 'sap/ui/mdc/p13n/FlexUtil', 'sap/base/Log'
9
- ], function (FilterOperatorUtil, BaseController, P13nBuilder, FlexUtil, Log) {
8
+ 'sap/ui/mdc/condition/FilterOperatorUtil', './BaseController', 'sap/ui/mdc/p13n/P13nBuilder', 'sap/ui/mdc/p13n/FlexUtil', 'sap/base/Log', 'sap/base/util/merge'
9
+ ], function (FilterOperatorUtil, BaseController, P13nBuilder, FlexUtil, Log, merge) {
10
10
  "use strict";
11
11
 
12
12
  var FilterController = BaseController.extend("sap.ui.mdc.p13n.subcontroller.FilterController", {
@@ -16,9 +16,8 @@ sap.ui.define([
16
16
  }
17
17
  });
18
18
 
19
- FilterController.prototype.getCurrentState = function() {
20
- var oControlState = this.getAdaptationControl().getCurrentState();
21
- return oControlState.hasOwnProperty("filter") ? oControlState.filter : {};
19
+ FilterController.prototype.getStateKey = function() {
20
+ return "filter";
22
21
  };
23
22
 
24
23
  FilterController.prototype.getUISettings = function() {
@@ -28,9 +27,15 @@ sap.ui.define([
28
27
  afterClose: function(oEvt) {
29
28
  var oDialog = oEvt.getSource();
30
29
  if (oDialog) {
31
- oDialog.removeAllContent();
32
- oDialog.destroy();
30
+ var oDialogContent = oDialog.getContent()[0];
31
+ if (oDialogContent.isA("sap.m.p13n.Container")) {
32
+ oDialogContent.removeView("Filter");
33
+ } else {
34
+ oDialog.removeAllContent();
35
+ }
33
36
  }
37
+
38
+ oDialog.destroy();
34
39
  }
35
40
  };
36
41
  };
@@ -90,11 +95,15 @@ sap.ui.define([
90
95
  }
91
96
  };
92
97
 
98
+ FilterController.prototype._getPresenceAttribute = function(bexternalAppliance){
99
+ return "isFiltered";
100
+ };
101
+
93
102
  FilterController.prototype.getAdaptationUI = function (oPropertyHelper, oWrapper) {
94
103
  var oAdaptationModel = this._getP13nModel(oPropertyHelper);
95
104
 
96
105
  return this.getAdaptationControl().retrieveInbuiltFilter().then(function(oAdaptationFilterBar){
97
- oAdaptationFilterBar.setP13nModel(oAdaptationModel);
106
+ oAdaptationFilterBar.setP13nData(oAdaptationModel.oData);
98
107
  oAdaptationFilterBar.setLiveMode(false);
99
108
  this._oAdaptationFB = oAdaptationFilterBar;
100
109
  return oAdaptationFilterBar.createFilterFields().then(function(){
@@ -105,18 +114,24 @@ sap.ui.define([
105
114
 
106
115
  FilterController.prototype.update = function(){
107
116
  BaseController.prototype.update.apply(this, arguments);
108
- this.getAdaptationControl().getInbuiltFilter().createFilterFields();
117
+ var oAdaptationControl = this.getAdaptationControl();
118
+ var oInbuiltFilter = oAdaptationControl && oAdaptationControl.getInbuiltFilter();
119
+
120
+ if (oInbuiltFilter) {
121
+ oInbuiltFilter.createFilterFields();
122
+ }
109
123
  };
110
124
 
111
125
  FilterController.prototype.getDelta = function(mPropertyBag) {
126
+ mPropertyBag.applyAbsolute = true; //Note: currently the filter appliance is always handled as Snapshot, also via StateUtil!
112
127
  return FlexUtil.getConditionDeltaChanges(mPropertyBag);
113
128
  };
114
129
 
115
130
  FilterController.prototype.model2State = function() {
116
131
  var oItems = {},
117
132
  oFilter = this.getCurrentState();
118
- this._oAdaptationModel.getProperty("/items").forEach(function(oItem) {
119
- if (oItem.isFiltered && Object.keys(oFilter).includes(oItem.name)) {
133
+ this._oAdaptationModel.getProperty("/items").forEach(function(oItem) {
134
+ if (oItem.active && Object.keys(oFilter).includes(oItem.name)) {
120
135
  oItems[oItem.name] = oFilter[oItem.name];
121
136
  }
122
137
  });
@@ -133,7 +148,7 @@ sap.ui.define([
133
148
  var sName = oProperty.name;
134
149
 
135
150
  var aExistingFilters = mExistingFilters[sName];
136
- mItem.isFiltered = aExistingFilters && aExistingFilters.length > 0 ? true : false;
151
+ mItem.active = aExistingFilters && aExistingFilters.length > 0 ? true : false;
137
152
 
138
153
  return !(oProperty.filterable === false);
139
154
  });
@@ -146,6 +161,19 @@ sap.ui.define([
146
161
  return oP13nData;
147
162
  };
148
163
 
164
+ FilterController.prototype.changesToState = function(aChanges, mOld, mNew) {
165
+
166
+ var mStateDiff = {};
167
+
168
+ aChanges.forEach(function(oChange){
169
+ var oDiffContent = merge({}, oChange.changeSpecificData.content);
170
+ var sName = oDiffContent.name;
171
+ mStateDiff[sName] = mNew[sName];
172
+ });
173
+
174
+ return mStateDiff;
175
+ };
176
+
149
177
  return FilterController;
150
178
 
151
179
  });