@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
@@ -1,721 +0,0 @@
1
- /*
2
- * ! OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
-
7
- sap.ui.define([
8
- 'sap/m/VBox', 'sap/ui/core/Control', 'sap/m/Column', 'sap/m/Text', 'sap/ui/model/Filter', "sap/m/Table", "sap/m/OverflowToolbar", "sap/m/SearchField", "sap/m/ToolbarSpacer", "sap/m/OverflowToolbarButton", "sap/m/OverflowToolbarLayoutData", "sap/m/Button", "sap/ui/core/dnd/DragDropInfo"
9
- ], function(VBox, Control, Column, Text, Filter, Table, OverflowToolbar, SearchField, ToolbarSpacer, OverflowToolbarButton, OverflowToolbarLayoutData, Button, DragDropInfo) {
10
- "use strict";
11
-
12
- /**
13
- * Constructor for BasePanel.
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 TODO
18
- * <h3><b>Note:</b></h3>
19
- * The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
20
- * @extends sap.ui.core.Control
21
- * @author SAP SE
22
- * @private
23
- * @experimental
24
- * @since 1.66
25
- * @alias sap.ui.mdc.p13n.panels.BasePanel
26
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
27
- */
28
-
29
- var BasePanel = Control.extend("sap.ui.mdc.p13n.panels.BasePanel", {
30
- metadata: {
31
- library: "sap.ui.mdc",
32
- associations: {},
33
- defaultAggregation: "items",
34
- properties: {
35
- /**
36
- * Determines whether the reordering of items should be enabled
37
- */
38
- enableReorder: {
39
- type: "boolean",
40
- defaultValue: true
41
- },
42
- /**
43
- * Factory function which can be used to enhance custom content
44
- */
45
- itemFactory: {
46
- type: "function"
47
- }
48
- },
49
- aggregations: {
50
- /**
51
- * Content to be set for the <code>BasePanel</code>.
52
- */
53
- _content: {
54
- type: "sap.ui.core.Control",
55
- multiple: false,
56
- visibility: "hidden"
57
- },
58
- /**
59
- * This template is going to be set from the implementing panel using the <code>BasePanel</code> control, by setting the template
60
- * for the columns of the inner <code>sap.m.Table</code>.
61
- */
62
- template: {
63
- type: "sap.ui.core.Control",
64
- multiple: false
65
- },
66
- /**
67
- * Defines an optional message strip to be displayed in the content area
68
- */
69
- messageStrip: {
70
- type: "sap.m.MessageStrip",
71
- multiple: false
72
- }
73
- },
74
- events: {
75
- /**
76
- * This event is fired if there has been made any change within the <code>BasePanel</code> control.
77
- */
78
- change: {
79
- /**
80
- * Reason for the change (e.g. Add, Remove, Move, SelectAll, DeselectAll)
81
- */
82
- reason: {
83
- type: "string"
84
- },
85
- /**
86
- * The affected item (Note: this may only provided in case one item is affected)
87
- */
88
- item: {
89
- type: "object"
90
- }
91
- }
92
- }
93
- },
94
- renderer: {
95
- apiVersion: 2,
96
- render: function(oRm, oControl) {
97
- oRm.openStart("div", oControl);
98
- oRm.style("height", "100%");
99
- oRm.openEnd();
100
- oRm.renderControl(oControl.getAggregation("_content"));
101
- oRm.close("div");
102
- }
103
- }
104
-
105
- });
106
-
107
- BasePanel.prototype.P13N_MODEL = "$p13n";
108
-
109
- BasePanel.prototype.init = function() {
110
-
111
- Control.prototype.init.apply(this, arguments);
112
-
113
- // list is necessary to set the template + model on
114
- this._oListControl = this._createInnerListControl();
115
-
116
- // disable 'select all'
117
- this._oListControl.setMultiSelectMode("ClearAll");
118
-
119
- this._setInnerLayout();
120
- };
121
-
122
- /**
123
- * Can be overwritten in case a different wrapping Control is required for the inner content
124
- */
125
- BasePanel.prototype._setInnerLayout = function() {
126
- this.setAggregation("_content", new VBox({
127
- items: [
128
- this._oListControl
129
- ]
130
- }));
131
- };
132
-
133
- /**
134
- * Displays a MessageStrip instance between the title and content area of the <code>BasePanel</code>.
135
- *
136
- * @param {sap.m.MessageStrip} oStrip Instance of a sap.m.MessageStrip
137
- */
138
- BasePanel.prototype.setMessageStrip = function(oStrip){
139
- if (!oStrip) {
140
- this.getAggregation("_content").removeItem(this._oMessageStrip);
141
- this._oMessageStrip = null;
142
- } else {
143
- if (this._oMessageStrip) {
144
- this._oMessageStrip.destroy();
145
- }
146
- this._oMessageStrip = oStrip;
147
- this.getAggregation("_content").insertItem(oStrip, 0);
148
- }
149
-
150
- return this;
151
- };
152
-
153
- BasePanel.prototype._getDragDropConfig = function() {
154
- if (!this._oDragDropInfo){
155
- this._oDragDropInfo = new DragDropInfo({
156
- enabled: false,
157
- sourceAggregation: "items",
158
- targetAggregation: "items",
159
- dropPosition: "Between",
160
- drop: [this._onRearrange, this]
161
- });
162
- }
163
- return this._oDragDropInfo;
164
- };
165
-
166
- BasePanel.prototype._getMoveTopButton = function() {
167
- if (!this._oMoveTopBtn) {
168
- this._oMoveTopBtn = new OverflowToolbarButton(this.getId() + "-moveTopBtn",{
169
- type: "Transparent",
170
- tooltip: this.getResourceText("p13nDialog.MOVE_TO_TOP"),
171
- icon: "sap-icon://collapse-group",
172
- press: [this._onPressButtonMoveToTop, this],
173
- visible: false,
174
- layoutData: new OverflowToolbarLayoutData({
175
- moveToOverflow: true,
176
- priority: "Low",
177
- group: 2
178
- })
179
- });
180
- this.addDependent(this._oMoveTopBtn);
181
- }
182
-
183
- return this._oMoveTopBtn;
184
- };
185
-
186
- BasePanel.prototype.getItems = function() {
187
- return this._oListControl.getItems();
188
- };
189
-
190
- BasePanel.prototype._getMoveUpButton = function() {
191
- if (!this._oMoveUpButton) {
192
- this._oMoveUpButton = new OverflowToolbarButton(this.getId() + "-moveUpBtn",{
193
- type: "Transparent",
194
- tooltip: this.getResourceText("p13nDialog.MOVE_UP"),
195
- icon: "sap-icon://navigation-up-arrow",
196
- press: [this._onPressButtonMoveUp, this],
197
- visible: false,
198
- layoutData: new OverflowToolbarLayoutData({
199
- moveToOverflow: true,
200
- priority: "High",
201
- group: 1
202
- })
203
- });
204
- this.addDependent(this._oMoveUpButton);
205
- }
206
-
207
- return this._oMoveUpButton;
208
- };
209
-
210
- BasePanel.prototype._getMoveDownButton = function() {
211
- if (!this._oMoveDownButton) {
212
- this._oMoveDownButton = new OverflowToolbarButton(this.getId() + "-moveDownpBtn",{
213
- type: "Transparent",
214
- tooltip: this.getResourceText("p13nDialog.MOVE_DOWN"),
215
- icon: "sap-icon://navigation-down-arrow",
216
- press: [this._onPressButtonMoveDown, this],
217
- visible: false,
218
- layoutData: new OverflowToolbarLayoutData({
219
- moveToOverflow: true,
220
- priority: "High",
221
- group: 1
222
- })
223
- });
224
- this.addDependent(this._oMoveDownButton);
225
- }
226
-
227
- return this._oMoveDownButton;
228
- };
229
-
230
- BasePanel.prototype._getMoveBottomButton = function() {
231
- if (!this._oMoveBottomButton) {
232
- this._oMoveBottomButton = new OverflowToolbarButton(this.getId() + "-moveBottomBtn",{
233
- type: "Transparent",
234
- tooltip: this.getResourceText("p13nDialog.MOVE_TO_BOTTOM"),
235
- icon: "sap-icon://expand-group",
236
- press: [this._onPressButtonMoveToBottom, this],
237
- visible: false,
238
- layoutData: new OverflowToolbarLayoutData({
239
- moveToOverflow: true,
240
- priority: "Low",
241
- group: 2
242
- })
243
- });
244
- this.addDependent(this._oMoveBottomButton);
245
- }
246
-
247
- return this._oMoveBottomButton;
248
- };
249
-
250
- BasePanel.prototype._createInnerListControl = function() {
251
- return new Table(this.getId() + "-innerP13nList", Object.assign(this._getListControlConfig(), {
252
- headerToolbar: new OverflowToolbar({
253
- content: [
254
- this._getSearchField(),
255
- new ToolbarSpacer(),
256
- this._getMoveTopButton(),
257
- this._getMoveUpButton(),
258
- this._getMoveDownButton(),
259
- this._getMoveBottomButton(),
260
- this._getReorderButton()
261
- ]
262
- })
263
- }));
264
- };
265
-
266
- BasePanel.prototype.setEnableReorder = function(bEnableReorder) {
267
- var oTemplate = this.getTemplate();
268
- if (bEnableReorder) {
269
- this._addHover(oTemplate);
270
- } else if (oTemplate && oTemplate.aDelegates && oTemplate.aDelegates.length > 0) {
271
- oTemplate.removeEventDelegate(oTemplate.aDelegates[0].oDelegate);
272
- }
273
- this._getDragDropConfig().setEnabled(bEnableReorder);
274
- this._setMoveButtonVisibility(bEnableReorder);
275
- this.setProperty("enableReorder", bEnableReorder);
276
-
277
- return this;
278
- };
279
-
280
- BasePanel.prototype._addHover = function(oRow) {
281
- if (oRow && oRow.aDelegates.length < 1) {
282
- oRow.addEventDelegate({
283
- onmouseover: this._hoverHandler.bind(this),
284
- onfocusin: this._focusHandler.bind(this)
285
- });
286
- }
287
- };
288
-
289
- BasePanel.prototype._focusHandler = function(oEvt) {
290
- if (!this.getEnableReorder()){
291
- return;
292
- }
293
-
294
- //(new) hovered item
295
- var oHoveredItem = sap.ui.getCore().byId(oEvt.currentTarget.id);
296
- this._handleActivated(oHoveredItem);
297
- };
298
-
299
- BasePanel.prototype._hoverHandler = function(oEvt) {
300
- //Only use hover if no item has been selected yet
301
- if (this._oSelectedItem && !this._oSelectedItem.bIsDestroyed) {
302
- return;
303
- }
304
-
305
- if (!this.getEnableReorder()){
306
- return;
307
- }
308
-
309
- //(new) hovered item
310
- var oHoveredItem = sap.ui.getCore().byId(oEvt.currentTarget.id);
311
-
312
- this._handleActivated(oHoveredItem);
313
- };
314
-
315
- BasePanel.prototype._handleActivated = function(oHoveredItem) {
316
- this._oHoveredItem = oHoveredItem;
317
- //Implement custom hover handling in derivation here..
318
- };
319
-
320
- BasePanel.prototype._getReorderButton = function() {
321
- if (!this.oReorderButton) {
322
- this.oReorderButton = new Button(this.getId() + "-showSelectedBtn",{
323
- text: {
324
- path: this.P13N_MODEL + ">/reorderMode",
325
- formatter: function (bReorderMode) {
326
- return bReorderMode ? this.getResourceText("p13nDialog.SELECT") : this.getResourceText("p13nDialog.REORDER");
327
- }.bind(this)
328
- },
329
- press: [this._onPressToggleMode, this]
330
- });
331
- }
332
- return this.oReorderButton;
333
- };
334
-
335
- BasePanel.prototype._getListControlConfig = function() {
336
- return {
337
- mode:"MultiSelect",
338
- rememberSelections: true,
339
- itemPress: [this._onItemPressed, this],
340
- selectionChange: [this._onSelectionChange, this],
341
- sticky: ["HeaderToolbar", "ColumnHeaders", "InfoToolbar"],
342
- dragDropConfig: this._getDragDropConfig()
343
- };
344
- };
345
-
346
- BasePanel.prototype._getSearchField = function() {
347
- if (!this._oSearchField) {
348
- this._oSearchField = new SearchField(this.getId() + "-searchField",{
349
- liveChange: [this._onSearchFieldLiveChange, this],
350
- width: "100%",
351
- layoutData: new OverflowToolbarLayoutData({
352
- shrinkable: true,
353
- moveToOverflow: true,
354
- priority: "High",
355
- maxWidth: "16rem"
356
- })
357
- });
358
- }
359
- return this._oSearchField;
360
- };
361
-
362
- BasePanel.prototype.setTemplate = function(oTemplate) {
363
- this.setAggregation("template", oTemplate);
364
- if (oTemplate) {
365
- if (this.getEnableReorder()){
366
- this._addHover(oTemplate);
367
- }
368
- this._oSelectionBindingInfo = oTemplate.getBindingInfo("selected");
369
- // Extract the binding info parts
370
- if (this._oSelectionBindingInfo && this._oSelectionBindingInfo.parts) {
371
- this._oSelectionBindingInfo = {
372
- parts: this._oSelectionBindingInfo.parts
373
- };
374
- }
375
- }
376
- this._bindListItems();
377
- return this;
378
- };
379
-
380
- BasePanel.prototype.setPanelColumns = function(vColumns) {
381
- var aColumns;
382
- if (vColumns instanceof Array) {
383
- aColumns = vColumns;
384
- } else {
385
- aColumns = [
386
- vColumns
387
- ];
388
- }
389
- this._addTableColumns(aColumns);
390
- };
391
-
392
- /**
393
- * @param {Object} oP13nModel Personalization model provided by sap.ui.mdc.p13n.P13nBuilder
394
- */
395
- BasePanel.prototype.setP13nModel = function(oP13nModel) {
396
- this.setModel(oP13nModel, this.P13N_MODEL);
397
- //initial value for "Reorder"-mode is false
398
- this.setPanelMode(false);
399
- };
400
-
401
- BasePanel.prototype.getP13nModel = function() {
402
- return this.getModel(this.P13N_MODEL);
403
- };
404
-
405
- BasePanel.prototype.getP13nState = function () {
406
- return this.getP13nModel().getProperty("/items").filter(function(oField){
407
- return oField[this._getPresenceAttribute()] === true;
408
- }.bind(this));
409
- };
410
-
411
- BasePanel.prototype.getResourceText = function(sText, vValue) {
412
- this.oResourceBundle = this.oResourceBundle ? this.oResourceBundle : sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
413
- return sText ? this.oResourceBundle.getText(sText, vValue) : this.oResourceBundle;
414
- };
415
-
416
- BasePanel.prototype._addTableColumns = function(aColumns) {
417
- var aRemovedColumns = this._oListControl.removeAllColumns();
418
- aRemovedColumns.forEach(function(oRemovedColumn){
419
- oRemovedColumn.destroy();
420
- });
421
- aColumns.forEach(function(vColumn) {
422
- var oColumn;
423
-
424
- if (typeof vColumn == "string") {
425
- oColumn = new Column({
426
- header: new Text({
427
- text: vColumn
428
- })
429
- });
430
- } else {
431
- oColumn = vColumn;
432
- }
433
-
434
- this._oListControl.addColumn(oColumn);
435
- }, this);
436
- };
437
-
438
- BasePanel.prototype._getPresenceAttribute = function() {
439
- var sPresenceAttribute = this.getP13nModel().getProperty("/presenceAttribute") || "visible";
440
- return sPresenceAttribute;
441
- };
442
-
443
- BasePanel.prototype._bindListItems = function(mBindingInfo) {
444
- var oTemplate = this.getTemplate();
445
- if (oTemplate) {
446
- /*
447
- * NOTE: as the dialog offers two modes (Select / Reorder) for personalization changes,
448
- * the type is only required as "Active" in case the user is in "Reorder"-mode, as there
449
- * are no buttons visible in "Select"-mode. This is only being used to disable/enable the
450
- * buttons in the "Reorder"-mode via press event.
451
- */
452
- oTemplate.bindProperty("type", {
453
- path: this.P13N_MODEL + ">/reorderMode",
454
- formatter: function(bReorderMode) {
455
- return bReorderMode ? "Active" : "Inactive";
456
- }
457
- });
458
- this._oListControl.bindItems(Object.assign({
459
- path: this.P13N_MODEL + ">/items",
460
- key: "name",
461
- templateShareable: false,
462
- template: this.getTemplate().clone()
463
- }, mBindingInfo));
464
- }
465
- };
466
-
467
- BasePanel.prototype._onSelectionChange = function(oEvent) {
468
-
469
- var aListItems = oEvent.getParameter("listItems");
470
- var bSelectAll = oEvent.getParameter("selectAll");
471
- var bDeSelectAll = !bSelectAll && aListItems.length > 1;
472
-
473
- aListItems.forEach(function(oTableItem) {
474
- this._selectTableItem(oTableItem, bSelectAll || bDeSelectAll);
475
- }, this);
476
-
477
- if (bSelectAll || bDeSelectAll) {
478
- this.fireChange({
479
- reason: bSelectAll ? "SelectAll" : "DeselectAll",
480
- item: undefined //No direct item is affected
481
- });
482
- }
483
-
484
- // in case of 'deselect all', the move buttons for positioning are going to be disabled
485
- if (bDeSelectAll) {
486
- this._getMoveTopButton().setEnabled(false);
487
- this._getMoveUpButton().setEnabled(false);
488
- this._getMoveDownButton().setEnabled(false);
489
- this._getMoveBottomButton().setEnabled(false);
490
- }
491
- };
492
-
493
- BasePanel.prototype._onItemPressed = function(oEvent) {
494
- var oTableItem = oEvent.getParameter('listItem');
495
- this._oSelectedItem = oTableItem;
496
-
497
- var oContext = oTableItem.getBindingContext(this.P13N_MODEL);
498
- if (this.getEnableReorder() && oContext && oContext.getProperty(this._getPresenceAttribute())){
499
- this._handleActivated(oTableItem);
500
- this._updateEnableOfMoveButtons(oTableItem, true);
501
- }
502
- };
503
-
504
- BasePanel.prototype._onSearchFieldLiveChange = function(oEvent) {
505
- this._oListControl.getBinding("items").filter(new Filter("label", "Contains", oEvent.getSource().getValue()));
506
- };
507
-
508
- BasePanel.prototype._onPressButtonMoveToTop = function() {
509
- this._moveSelectedItem(0);
510
- };
511
-
512
- BasePanel.prototype._onPressButtonMoveUp = function() {
513
- this._moveSelectedItem("Up");
514
- };
515
-
516
- BasePanel.prototype._onPressButtonMoveDown = function() {
517
- this._moveSelectedItem("Down");
518
- };
519
-
520
- BasePanel.prototype._onPressButtonMoveToBottom = function() {
521
- var iIndex = this._oListControl.getItems().length - 1;
522
- this._moveSelectedItem(iIndex);
523
- };
524
-
525
- BasePanel.prototype._onPressToggleMode = function(oEvent) {
526
- this._togglePanelMode();
527
- };
528
-
529
- BasePanel.prototype.getPanelMode = function() {
530
- return this.getP13nModel() ? this.getP13nModel().getProperty("/reorderMode") : false;
531
- };
532
-
533
- BasePanel.prototype.setPanelMode = function(bReorder) {
534
- return this.getP13nModel().setProperty("/reorderMode", bReorder);
535
- };
536
-
537
- BasePanel.prototype._togglePanelMode = function() {
538
- // switch panel mode
539
- var bReorderMode = !this.getPanelMode();
540
- this.setPanelMode(bReorderMode);
541
-
542
- if (bReorderMode) {
543
- this._updateModelItems();
544
- }
545
- // Switch the list mode (which also unbinds selection) and then filter by selected
546
- this.switchListMode(bReorderMode ? "None" : "MultiSelect");
547
- this._filterBySelected(bReorderMode, this._oListControl);
548
- // Show/Hide and clear the search field
549
- this._oSearchField.setVisible(!bReorderMode);
550
- this._oSearchField.setValue("");
551
-
552
- // set the movement buttons to visible / invisible
553
- this._setMoveButtonVisibility(bReorderMode);
554
-
555
- this._getMoveTopButton().setEnabled(false);
556
- this._getMoveUpButton().setEnabled(false);
557
- this._getMoveDownButton().setEnabled(false);
558
- this._getMoveBottomButton().setEnabled(false);
559
-
560
- //disable / enable d&d
561
- this._getDragDropConfig().setEnabled(bReorderMode);
562
- };
563
-
564
- BasePanel.prototype._setMoveButtonVisibility = function(bVisible) {
565
- this._getMoveTopButton().setVisible(bVisible);
566
- this._getMoveUpButton().setVisible(bVisible);
567
- this._getMoveDownButton().setVisible(bVisible);
568
- this._getMoveBottomButton().setVisible(bVisible);
569
- };
570
-
571
- BasePanel.prototype._updateModelItems = function() {
572
- // Sort and update the model items to ensure selected ones, are at the top
573
- var aFields = this.getP13nModel().getProperty("/items");
574
- var aSelectedFields = [], aOtherFields = [];
575
- aFields.forEach(function(oField) {
576
- if (oField[this._getPresenceAttribute()]) {
577
- aSelectedFields.push(oField);
578
- } else {
579
- aOtherFields.push(oField);
580
- }
581
- }.bind(this));
582
- this.getP13nModel().setProperty("/items", aSelectedFields.concat(aOtherFields));
583
- };
584
-
585
- BasePanel.prototype._filterBySelected = function(bShowSelected, oList) {
586
- oList.getBinding("items").filter(bShowSelected ? new Filter(this._getPresenceAttribute(), "EQ", true) : []);
587
- };
588
-
589
- BasePanel.prototype.switchListMode = function(sMode) {
590
- // If selection binding exists then unbind the table items
591
- if (this._oSelectionBindingInfo) {
592
- if (sMode === "None") {
593
- // Unbind selected property
594
- this.getTemplate().unbindProperty("selected");
595
- } else {
596
- // bind selected property
597
- this.getTemplate().bindProperty("selected", this._oSelectionBindingInfo);
598
- }
599
- // Unbind the table to ensure selected is not used
600
- this._oListControl.unbindAggregation("items");
601
- }
602
-
603
- // Update the selection mode of the table
604
- this._oListControl.setMode(sMode);
605
-
606
- if (this._oSelectionBindingInfo) {
607
- // Bind the table to ensure selection state (selected binding) is used by the table
608
- this._bindListItems();
609
- }
610
- };
611
-
612
- BasePanel.prototype._selectTableItem = function(oTableItem, bSelectAll) {
613
- this._updateEnableOfMoveButtons(oTableItem, bSelectAll ? false : true);
614
- this._oSelectedItem = oTableItem;
615
- if (!bSelectAll) {
616
- var oItem = this.getP13nModel().getProperty(this._oSelectedItem.getBindingContext(this.P13N_MODEL).sPath);
617
- // only fire this event if one item is being selected in a live scenario, else fire the change event in the _onSelectionChange method
618
- //TODO: remove 'selected' condition enhance
619
- var oP13nModel = this.getModel(this.P13N_MODEL);
620
- if (oP13nModel && oItem) {
621
- oP13nModel.setProperty(oTableItem.getBindingContext(this.P13N_MODEL).sPath + "/selected", oItem.visible);
622
- }
623
- this.fireChange({
624
- reason: oItem[this._getPresenceAttribute()] ? "Add" : "Remove",
625
- item: oItem
626
- });
627
- }
628
- };
629
-
630
- BasePanel.prototype._moveSelectedItem = function(vNewIndex) {
631
- var oSelectedItem = this._oSelectedItem;
632
- var iSelectedIndex = this._oListControl.indexOfItem(oSelectedItem);
633
- if (iSelectedIndex < 0) {
634
- return;
635
- }
636
-
637
- // determine the new index relative to selected index when "Up" or "Down" is passed as a parameter
638
- var iNewIndex = (typeof vNewIndex == "number") ? vNewIndex : iSelectedIndex + (vNewIndex == "Up" ? -1 : 1);
639
- this._moveTableItem(oSelectedItem, iNewIndex);
640
-
641
- };
642
-
643
- BasePanel.prototype._moveTableItem = function(oItem, iNewIndex) {
644
- var aItems = this._oListControl.getItems();
645
- var aFields = this.getP13nModel().getProperty("/items");
646
-
647
- // index of the item in the model not the index in the aggregation
648
- var iOlModelIndex = aFields.indexOf(oItem.getBindingContext(this.P13N_MODEL).getObject());
649
-
650
- // limit the minumum and maximum index
651
- iNewIndex = (iNewIndex <= 0) ? 0 : Math.min(iNewIndex, aItems.length - 1);
652
-
653
- // new index of the item in the model
654
- var iNewModelIndex = aFields.indexOf(aItems[iNewIndex].getBindingContext(this.P13N_MODEL).getObject());
655
- if (iNewModelIndex == iOlModelIndex) {
656
- return;
657
- }
658
-
659
- // remove data from old position and insert it into new position
660
- aFields.splice(iNewModelIndex, 0, aFields.splice(iOlModelIndex, 1)[0]);
661
- this.getP13nModel().setProperty("/items", aFields);
662
-
663
- // store the moved item again due to binding
664
- this._oSelectedItem = this._oListControl.getItems()[iNewIndex];
665
-
666
- this._updateEnableOfMoveButtons(this._oSelectedItem, true);
667
-
668
- this._handleActivated(this._oSelectedItem);
669
-
670
- this.fireChange({
671
- reason: "Move",
672
- item: this.getP13nModel().getProperty(this._oSelectedItem.getBindingContext(this.P13N_MODEL).sPath)
673
- });
674
- };
675
-
676
- BasePanel.prototype._onRearrange = function(oEvent) {
677
- var oDraggedItem = oEvent.getParameter("draggedControl");
678
- var oDroppedItem = oEvent.getParameter("droppedControl");
679
- var sDropPosition = oEvent.getParameter("dropPosition");
680
- var iDraggedIndex = this._oListControl.indexOfItem(oDraggedItem);
681
- var iDroppedIndex = this._oListControl.indexOfItem(oDroppedItem);
682
- var iActualDroppedIndex = iDroppedIndex + (sDropPosition == "Before" ? 0 : 1) + (iDraggedIndex < iDroppedIndex ? -1 : 0);
683
-
684
- this._moveTableItem(oDraggedItem, iActualDroppedIndex);
685
- };
686
-
687
- BasePanel.prototype._updateEnableOfMoveButtons = function(oTableItem, bFocus) {
688
- var iTableItemPos = this._oListControl.getItems().indexOf(oTableItem);
689
- var iLastItemPos = this._oListControl.getItems().length - 1;
690
- var bUpEnabled = true, bDownEnabled = true;
691
- if (iTableItemPos == 0) {
692
- // disable move buttons upwards, if the item is at the top
693
- bUpEnabled = false;
694
- }
695
- if (iTableItemPos == iLastItemPos) {
696
- // disable move buttons downwards, if the item is at the bottom
697
- bDownEnabled = false;
698
- }
699
- this._getMoveTopButton().setEnabled(bUpEnabled);
700
- this._getMoveUpButton().setEnabled(bUpEnabled);
701
- this._getMoveDownButton().setEnabled(bDownEnabled);
702
- this._getMoveBottomButton().setEnabled(bDownEnabled);
703
- if (bFocus) {
704
- oTableItem.focus();
705
- }
706
- };
707
-
708
- BasePanel.prototype.exit = function() {
709
- Control.prototype.exit.apply(this, arguments);
710
- this._oSelectionBindingInfo = null;
711
- this._oSelectedItem = null;
712
- this._oListControl = null;
713
- this._oMoveTopBtn = null;
714
- this._oMoveUpButton = null;
715
- this._oMoveDownButton = null;
716
- this._oMoveBottomButton = null;
717
- this._oSearchField = null;
718
- };
719
-
720
- return BasePanel;
721
- });