@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
@@ -16,8 +16,11 @@ sap.ui.define([
16
16
  "sap/m/Text",
17
17
  "sap/m/Title",
18
18
  "sap/m/ColumnHeaderPopover",
19
+ "sap/m/ColumnPopoverSelectListItem",
20
+ "sap/m/ColumnPopoverActionItem",
19
21
  "sap/m/OverflowToolbar",
20
22
  "sap/m/library",
23
+ "sap/m/table/columnmenu/Menu",
21
24
  "sap/ui/core/Core",
22
25
  "sap/ui/core/format/NumberFormat",
23
26
  "sap/ui/core/dnd/DragDropInfo",
@@ -30,6 +33,7 @@ sap.ui.define([
30
33
  "sap/base/strings/capitalize",
31
34
  "sap/base/util/deepEqual",
32
35
  "sap/base/util/Deferred",
36
+ "sap/base/util/UriParameters",
33
37
  "sap/ui/core/InvisibleMessage",
34
38
  "sap/ui/core/InvisibleText",
35
39
  "sap/ui/mdc/p13n/subcontroller/ColumnController",
@@ -37,10 +41,13 @@ sap.ui.define([
37
41
  "sap/ui/mdc/p13n/subcontroller/FilterController",
38
42
  "sap/ui/mdc/p13n/subcontroller/GroupController",
39
43
  "sap/ui/mdc/p13n/subcontroller/AggregateController",
40
- "sap/m/ColumnPopoverSelectListItem",
41
- "sap/m/ColumnPopoverActionItem",
42
44
  "sap/ui/mdc/p13n/subcontroller/ColumnWidthController",
43
- "sap/ui/mdc/actiontoolbar/ActionToolbarAction"
45
+ "sap/ui/mdc/actiontoolbar/ActionToolbarAction",
46
+ "sap/ui/mdc/table/RowActionItem",
47
+ "sap/ui/mdc/table/RowSettings",
48
+ "sap/ui/mdc/table/menu/QuickActionContainer",
49
+ "sap/ui/mdc/table/menu/ItemContainer",
50
+ "sap/ui/base/ManagedObjectMetadata"
44
51
  ], function(
45
52
  Control,
46
53
  ActionToolbar,
@@ -53,8 +60,11 @@ sap.ui.define([
53
60
  Text,
54
61
  Title,
55
62
  ColumnHeaderPopover,
63
+ ColumnPopoverSelectListItem,
64
+ ColumnPopoverActionItem,
56
65
  OverflowToolbar,
57
66
  MLibrary,
67
+ ColumnMenu,
58
68
  Core,
59
69
  NumberFormat,
60
70
  DragDropInfo,
@@ -67,6 +77,7 @@ sap.ui.define([
67
77
  capitalize,
68
78
  deepEqual,
69
79
  Deferred,
80
+ UriParameters,
70
81
  InvisibleMessage,
71
82
  InvisibleText,
72
83
  ColumnController,
@@ -74,20 +85,25 @@ sap.ui.define([
74
85
  FilterController,
75
86
  GroupController,
76
87
  AggregateController,
77
- ColumnPopoverSelectListItem,
78
- ColumnPopoverActionItem,
79
88
  ColumnWidthController,
80
- ActionToolbarAction
89
+ ActionToolbarAction,
90
+ RowActionItem,
91
+ RowSettings,
92
+ QuickActionContainer,
93
+ ItemContainer,
94
+ ManagedObjectMetadata
81
95
  ) {
82
96
  "use strict";
83
97
 
84
98
  var SelectionMode = library.SelectionMode;
85
99
  var TableType = library.TableType;
86
100
  var RowAction = library.RowAction;
101
+ var P13nMode = library.TableP13nMode;
87
102
  var ToolbarDesign = MLibrary.ToolbarDesign;
88
103
  var ToolbarStyle = MLibrary.ToolbarStyle;
89
104
  var MultiSelectMode = library.MultiSelectMode;
90
105
  var TitleLevel = coreLibrary.TitleLevel;
106
+ var SortOrder = coreLibrary.SortOrder;
91
107
  var internalMap = new window.WeakMap();
92
108
  var internal = function(oTable) {
93
109
  if (!internalMap.has(oTable)) {
@@ -160,6 +176,7 @@ sap.ui.define([
160
176
  * Actions available for a table row.
161
177
  *
162
178
  * @since 1.60
179
+ * @deprecated as of version 1.98, use row settings instead.
163
180
  */
164
181
  rowAction: {
165
182
  type: "sap.ui.mdc.RowAction[]",
@@ -582,6 +599,7 @@ sap.ui.define([
582
599
  constructor: function() {
583
600
  this._oTableReady = new Deferred();
584
601
  this._oFullInitialize = new Deferred();
602
+ this._bUseColumnMenu = UriParameters.fromQuery(window.location.search).get("sap-ui-xx-columnmenu") === "true";
585
603
 
586
604
  Control.apply(this, arguments);
587
605
  this.bCreated = true;
@@ -648,23 +666,25 @@ sap.ui.define([
648
666
  * @inheritDoc
649
667
  */
650
668
  Table.prototype.init = function() {
651
-
652
669
  Control.prototype.init.apply(this, arguments);
653
670
 
654
- // indicates whether binding the table is inevitable or not
655
- this._bForceRebind = true;
656
- this._updateAdaptation(this.getP13nMode());
657
-
658
671
  // Skip propagation of properties (models and bindingContexts)
659
672
  this.mSkipPropagation = {
660
673
  rowSettings: true
661
674
  };
675
+
676
+ // indicates whether binding the table is inevitable or not
677
+ this._bForceRebind = true;
678
+
679
+ this._aSupportedP13nModes = Object.keys(P13nMode);
680
+ this._updateAdaptation();
662
681
  };
663
682
 
664
683
  /**
665
684
  * @inheritDoc
666
685
  */
667
686
  Table.prototype.applySettings = function() {
687
+ this._setPropertyHelperClass(PropertyHelper);
668
688
  Control.prototype.applySettings.apply(this, arguments);
669
689
  this.initControlDelegate();
670
690
  };
@@ -869,14 +889,20 @@ sap.ui.define([
869
889
  // ----End Type----
870
890
 
871
891
  Table.prototype.setRowSettings = function(oRowSettings) {
892
+ if (this._oTableRowAction) {
893
+ if (oRowSettings.getRowActions().length == 0) {
894
+ oRowSettings.addRowAction(this._oTableRowAction);
895
+ }
896
+ }
872
897
  this.setAggregation("rowSettings", oRowSettings, true);
873
898
 
874
899
  if (this._oTable) {
875
900
  // Apply the new setting to the existing table
901
+ this._oRowActions = {};
876
902
  if (this._isOfType(TableType.ResponsiveTable)) {
877
- ResponsiveTableType.updateRowSettings(this._oTemplate, oRowSettings);
903
+ ResponsiveTableType.updateRowSettings(this, oRowSettings, this._onResponsiveRowActionPress);
878
904
  } else {
879
- GridTableType.updateRowSettings(this._oTable, oRowSettings);
905
+ GridTableType.updateRowSettings(this._oTable, oRowSettings, [this._onRowActionPress, this]);
880
906
  }
881
907
 
882
908
  this._bForceRebind = true;
@@ -942,14 +968,20 @@ sap.ui.define([
942
968
  return this;
943
969
  };
944
970
 
971
+ // TODO: Temporary solution until apps adapted changes. Remove this, as this is replaced by rowSettings
945
972
  Table.prototype.setRowAction = function(aActions) {
946
- var aOldActions = this.getRowAction();
947
-
948
973
  this.setProperty("rowAction", aActions, true);
949
974
 
950
- if (!deepEqual(aOldActions.sort(), this.getRowAction().sort())) {
951
- this._updateRowAction();
975
+ var oRowSettings = this.getRowSettings() || new RowSettings();
976
+
977
+ oRowSettings.destroyRowActions();
978
+ if (this.getRowAction().indexOf(RowAction.Navigation) > -1) {
979
+ this._oTableRowAction = new RowActionItem({
980
+ type: RowAction.Navigation
981
+ });
982
+ oRowSettings.addRowAction(this._oTableRowAction);
952
983
  }
984
+ this.setRowSettings(oRowSettings);
953
985
 
954
986
  return this;
955
987
  };
@@ -970,36 +1002,23 @@ sap.ui.define([
970
1002
 
971
1003
  if (this.getEnableColumnResize() !== bOldEnableColumnResize) {
972
1004
  this._updateColumnResizer();
973
- this._updateAdaptation(this.getP13nMode());
1005
+ this._updateAdaptation();
974
1006
  }
975
1007
 
976
1008
  return this;
977
1009
  };
978
1010
 
979
1011
  Table.prototype._onModifications = function() {
980
- if (!this._oTable) {
981
- return;
982
- }
983
- var oColumnWidth = this.getCurrentState().xConfig;
984
- var oColumnWidthContent = oColumnWidth.aggregations && oColumnWidth.aggregations.columns;
985
-
986
- this.getColumns().forEach(function(oColumn, iIndex) {
987
- var sWidth = oColumnWidthContent && oColumnWidthContent[oColumn.getDataProperty()] && oColumnWidthContent[oColumn.getDataProperty()].width;
988
- var oInnerColumn = this._oTable.getColumns()[iIndex];
989
- if (!sWidth && oInnerColumn.getWidth() !== oColumn.getWidth()) {
990
- oInnerColumn.setWidth(oColumn.getWidth());
991
- } else if (sWidth && sWidth !== oInnerColumn.getWidth()) {
992
- oInnerColumn.setWidth(sWidth);
993
- }
994
- }, this);
1012
+ this.getColumns().forEach(function(oColumn) {
1013
+ oColumn._onModifications();
1014
+ });
995
1015
  };
996
1016
 
997
1017
  Table.prototype.setP13nMode = function(aMode) {
998
1018
  var aOldP13nMode = this.getP13nMode();
999
1019
 
1000
- var aSortedKeys = null;
1020
+ var aSortedKeys = [];
1001
1021
  if (aMode && aMode.length > 1){
1002
- aSortedKeys = [];
1003
1022
  var mKeys = aMode.reduce(function(mMap, sKey, iIndex){
1004
1023
  mMap[sKey] = true;
1005
1024
  return mMap;
@@ -1027,7 +1046,7 @@ sap.ui.define([
1027
1046
 
1028
1047
  this.setProperty("p13nMode", aSortedKeys, true);
1029
1048
 
1030
- this._updateAdaptation(this.getP13nMode());
1049
+ this._updateAdaptation();
1031
1050
 
1032
1051
  if (!deepEqual(aOldP13nMode.sort(), this.getP13nMode().sort())) {
1033
1052
  updateP13nSettings(this);
@@ -1036,11 +1055,10 @@ sap.ui.define([
1036
1055
  return this;
1037
1056
  };
1038
1057
 
1039
- Table.prototype._updateAdaptation = function(aMode) {
1058
+ Table.prototype._updateAdaptation = function() {
1040
1059
  var oRegisterConfig = {
1041
1060
  controller: {}
1042
1061
  };
1043
-
1044
1062
  var mRegistryOptions = {
1045
1063
  Column: ColumnController,
1046
1064
  Sort: SortController,
@@ -1050,9 +1068,8 @@ sap.ui.define([
1050
1068
  ColumnWidth: ColumnWidthController
1051
1069
  };
1052
1070
 
1053
- aMode.forEach(function(sMode){
1054
- var sKey = sMode;
1055
- oRegisterConfig.controller[sKey] = mRegistryOptions[sMode];
1071
+ this.getActiveP13nModes().forEach(function(sMode){
1072
+ oRegisterConfig.controller[sMode] = mRegistryOptions[sMode];
1056
1073
  });
1057
1074
 
1058
1075
  if (this.getEnableColumnResize()) {
@@ -1073,7 +1090,7 @@ sap.ui.define([
1073
1090
  if (oTable._oTable) {
1074
1091
  var oDnDColumns = oTable._oTable.getDragDropConfig()[0];
1075
1092
  if (oDnDColumns) {
1076
- oDnDColumns.setEnabled(oTable.getP13nMode().indexOf("Column") > -1);
1093
+ oDnDColumns.setEnabled(oTable.getActiveP13nModes().indexOf("Column") > -1);
1077
1094
  }
1078
1095
  }
1079
1096
 
@@ -1283,17 +1300,24 @@ sap.ui.define([
1283
1300
  return oRb.getText("table.NO_DATA");
1284
1301
  }
1285
1302
 
1286
- return oRb.getText("table.NO_RESULTS");
1303
+ // Table is bound, but does not show any data
1304
+ // If table-internal or external (for example FilterBar) filters are set, then show the message that the data not found and also ask to adjust the filters.
1305
+ var oExternalFilter = Core.byId(this.getFilter());
1306
+ if ((this.isFilteringEnabled() && getFilteredProperties(this).length > 0) || //internal filters check
1307
+ (oExternalFilter && getFilteredProperties(oExternalFilter).length > 0)) { //external filters check
1308
+ return oRb.getText("table.NO_RESULTS");
1309
+ }
1310
+ // If no filters set, show only message that the data are not found, and nothing about the filters.
1311
+ return oRb.getText("table.NO_DATA");
1287
1312
  };
1288
1313
 
1289
1314
  Table.prototype._updateRowAction = function() {
1290
1315
  if (!this._oTable) {
1291
1316
  return;
1292
1317
  }
1293
- var bNavigation = this.getRowAction().indexOf(RowAction.Navigation) > -1;
1294
1318
  var oType = this._bMobileTable ? ResponsiveTableType : GridTableType;
1295
1319
  // For ResponsiveTable itemPress event is registered during creation
1296
- oType.updateRowAction(this, bNavigation, this._bMobileTable ? undefined : this._onRowActionPress);
1320
+ oType.updateRowActions(this, this.getRowSettings(), this._bMobileTable ? this._onResponsiveRowActionPress : this._onRowActionPress);
1297
1321
  };
1298
1322
 
1299
1323
  Table.prototype._initializeContent = function() {
@@ -1322,6 +1346,9 @@ sap.ui.define([
1322
1346
  }
1323
1347
 
1324
1348
  var oDelegate = this.getControlDelegate();
1349
+ this._aSupportedP13nModes = oDelegate.getSupportedP13nModes(this);
1350
+ this._updateAdaptation();
1351
+
1325
1352
  if (oDelegate.preInit) {
1326
1353
  // Call after libraries are loaded, but before initializing controls.
1327
1354
  // This allows the delegate to load additional modules, e.g. from previously loaded libraries, in parallel.
@@ -1366,7 +1393,7 @@ sap.ui.define([
1366
1393
  this._onAfterTableCreated(true); // Resolve any pending promise if table exists
1367
1394
 
1368
1395
  var pTableInit = this.initialized().then(function() {
1369
- this.initPropertyHelper(PropertyHelper);
1396
+ this.initPropertyHelper();
1370
1397
 
1371
1398
  // add this to the micro task execution queue to enable consumers to handle this correctly
1372
1399
  var oCreationRow = this.getCreationRow();
@@ -1467,7 +1494,6 @@ sap.ui.define([
1467
1494
  // Create Toolbar
1468
1495
  this._oToolbar = new ActionToolbar(this.getId() + "-toolbar", {
1469
1496
  design: ToolbarDesign.Transparent,
1470
- style: this._isOfType(TableType.ResponsiveTable) ? ToolbarStyle.Standard : ToolbarStyle.Clear,
1471
1497
  begin: [
1472
1498
  this._oTitle
1473
1499
  ],
@@ -1478,6 +1504,7 @@ sap.ui.define([
1478
1504
  ]
1479
1505
  });
1480
1506
  }
1507
+ this._oToolbar.setStyle(this._bMobileTable ? ToolbarStyle.Standard : ToolbarStyle.Clear);
1481
1508
  return this._oToolbar;
1482
1509
  };
1483
1510
 
@@ -1523,8 +1550,9 @@ sap.ui.define([
1523
1550
  return this.getEngine().readXConfig(this);
1524
1551
  };
1525
1552
 
1526
- function getFilteredProperties(oTable) {
1527
- var mFilterConditions = oTable.getFilterConditions();
1553
+ // oControl can be a Table or FilterBar - any Control that is able to have Filter
1554
+ function getFilteredProperties(oControl) {
1555
+ var mFilterConditions = oControl.getFilterConditions();
1528
1556
 
1529
1557
  return Object.keys(mFilterConditions).filter(function(sProperty) {
1530
1558
  return mFilterConditions[sProperty].length > 0;
@@ -1540,7 +1568,7 @@ sap.ui.define([
1540
1568
  */
1541
1569
  Table.prototype.getCurrentState = function() {
1542
1570
  var oState = {};
1543
- var aP13nMode = this.getP13nMode();
1571
+ var aP13nMode = this.getActiveP13nModes();
1544
1572
 
1545
1573
  if (aP13nMode.indexOf("Column") > -1) {
1546
1574
  oState.items = this._getVisibleProperties();
@@ -1576,7 +1604,7 @@ sap.ui.define([
1576
1604
  * @returns {boolean} Whether filter personalization is enabled
1577
1605
  */
1578
1606
  Table.prototype.isFilteringEnabled = function() {
1579
- return this.getP13nMode().indexOf("Filter") > -1;
1607
+ return this.getActiveP13nModes().includes(P13nMode.Filter);
1580
1608
  };
1581
1609
 
1582
1610
  /**
@@ -1586,7 +1614,7 @@ sap.ui.define([
1586
1614
  * @returns {boolean} Whether sort personalization is enabled
1587
1615
  */
1588
1616
  Table.prototype.isSortingEnabled = function() {
1589
- return this.getP13nMode().indexOf("Sort") > -1;
1617
+ return this.getActiveP13nModes().includes(P13nMode.Sort);
1590
1618
  };
1591
1619
 
1592
1620
  /**
@@ -1596,7 +1624,7 @@ sap.ui.define([
1596
1624
  * @returns {boolean} Whether group personalization is enabled
1597
1625
  */
1598
1626
  Table.prototype.isGroupingEnabled = function () {
1599
- return this.getP13nMode().indexOf("Group") > -1;
1627
+ return this.getActiveP13nModes().includes(P13nMode.Group);
1600
1628
  };
1601
1629
 
1602
1630
  /**
@@ -1606,11 +1634,26 @@ sap.ui.define([
1606
1634
  * @returns {boolean} Whether aggregation personalization is enabled
1607
1635
  */
1608
1636
  Table.prototype.isAggregationEnabled = function () {
1609
- return this.getP13nMode().indexOf("Aggregate") > -1;
1637
+ return this.getActiveP13nModes().includes(P13nMode.Aggregate);
1638
+ };
1639
+
1640
+ Table.prototype.getSupportedP13nModes = function() {
1641
+ return this._aSupportedP13nModes || [];
1642
+ };
1643
+
1644
+ Table.prototype.getActiveP13nModes = function() {
1645
+ var aP13nModes = this.getP13nMode();
1646
+ var aSupportedP13nModes = this.getSupportedP13nModes();
1647
+
1648
+ aP13nModes = aP13nModes.filter(function(sMode) {
1649
+ return aSupportedP13nModes.includes(sMode);
1650
+ });
1651
+
1652
+ return aP13nModes;
1610
1653
  };
1611
1654
 
1612
1655
  Table.prototype._getP13nButtons = function() {
1613
- var aP13nMode = this.getP13nMode();
1656
+ var aP13nMode = this.getActiveP13nModes();
1614
1657
  var aButtons = [];
1615
1658
 
1616
1659
  // Note: 'Aggregate' does not have a p13n UI, if only 'Aggregate' is enabled no settings icon is necessary
@@ -1733,13 +1776,32 @@ sap.ui.define([
1733
1776
  var oRowBinding = that._getRowBinding();
1734
1777
  var mExportSettings = {
1735
1778
  workbook: {
1736
- columns: aSheetColumns
1779
+ columns: aSheetColumns,
1780
+ context: {
1781
+ title: that.getHeader() || mCustomConfig.fileName
1782
+ }
1737
1783
  },
1738
1784
  dataSource: oRowBinding,
1739
- fileType: mCustomConfig.selectedFileType == "pdf" ? "PDF" : "XLSX",
1740
- fileName: mCustomConfig ? mCustomConfig.fileName : that.getHeader()
1785
+ fileType: mCustomConfig.selectedFileType,
1786
+ fileName: mCustomConfig ? mCustomConfig.fileName : this.getHeader()
1741
1787
  };
1742
1788
 
1789
+ var mPDFUserSettings = {
1790
+ border: mCustomConfig.border,
1791
+ fontSize: mCustomConfig.fontSize,
1792
+ paperSize: mCustomConfig.selectedPaperSize,
1793
+ doEnableAccessibility: mCustomConfig.doEnableAccessibility,
1794
+ signature: mCustomConfig.signature,
1795
+ signatureReason: mCustomConfig.signatureReason,
1796
+ orientation: mCustomConfig.selectedOrientation,
1797
+ fitToPage: mCustomConfig.fitToPage,
1798
+ pdfArchive: mCustomConfig.pdfArchive
1799
+ };
1800
+
1801
+ if (mExportSettings.fileType === "PDF") {
1802
+ Object.assign(mExportSettings, mPDFUserSettings);
1803
+ }
1804
+
1743
1805
  that._loadExportLibrary().then(function() {
1744
1806
  sap.ui.require(["sap/ui/export/ExportUtils"], function(ExportUtils) {
1745
1807
  var oProcessor = Promise.resolve();
@@ -1749,12 +1811,10 @@ sap.ui.define([
1749
1811
  return oPropertyHelper.hasProperty(sPropertyName) ? oPropertyHelper.getProperty(sPropertyName).label : null;
1750
1812
  }).then(function(oFilterConfig) {
1751
1813
  if (oFilterConfig) {
1752
- mExportSettings.workbook.context = {
1753
- metaSheetName: oFilterConfig.name,
1754
- metainfo: [
1755
- oFilterConfig
1756
- ]
1757
- };
1814
+ var oContext = mExportSettings.workbook.context;
1815
+
1816
+ oContext.metaSheetName = oFilterConfig.name;
1817
+ oContext.metainfo = [oFilterConfig];
1758
1818
  }
1759
1819
  });
1760
1820
  }
@@ -1799,10 +1859,11 @@ sap.ui.define([
1799
1859
 
1800
1860
  this._loadExportLibrary().then(function() {
1801
1861
  sap.ui.require(['sap/ui/export/ExportUtils'], function(ExportUtils) {
1802
- var bEnablePDFExport = new URL(window.location.href).search.indexOf("sap-ui-xx-enablePDFExport=true") > -1;
1803
- ExportUtils.getExportSettingsViaDialog(that._cachedExportSettings, that, undefined, bEnablePDFExport).then(function(oUserInput) {
1804
- that._cachedExportSettings = oUserInput;
1805
- that._onExport(oUserInput);
1862
+ that.getControlDelegate().fetchExportCapabilities().then(function(oExportCapabilities) {
1863
+ ExportUtils.getExportSettingsViaDialog(that._cachedExportSettings, oExportCapabilities, that).then(function(oUserInput) {
1864
+ that._cachedExportSettings = oUserInput;
1865
+ that._onExport(oUserInput);
1866
+ });
1806
1867
  });
1807
1868
  });
1808
1869
  });
@@ -1881,7 +1942,6 @@ sap.ui.define([
1881
1942
  ]
1882
1943
  });
1883
1944
  this._oTemplate = ResponsiveTableType.createTemplate(this.getId() + "-innerTableRow", oRowSettings);
1884
- this._createColumn = Table.prototype._createMobileColumn;
1885
1945
  this._sAggregation = "items";
1886
1946
  // map bindItems to bindRows for Mobile Table to enable reuse of rebind mechanism
1887
1947
  this._oTable.bindRows = this._oTable.bindItems;
@@ -1913,7 +1973,6 @@ sap.ui.define([
1913
1973
  ],
1914
1974
  rowSettingsTemplate: oRowSettings
1915
1975
  });
1916
- this._createColumn = Table.prototype._createColumn;
1917
1976
  this._sAggregation = "rows";
1918
1977
  }
1919
1978
 
@@ -1930,7 +1989,7 @@ sap.ui.define([
1930
1989
  sourceAggregation: "columns",
1931
1990
  targetAggregation: "columns",
1932
1991
  dropPosition: "Between",
1933
- enabled: this.getP13nMode().indexOf("Column") > -1,
1992
+ enabled: this.getActiveP13nModes().includes(P13nMode.Column),
1934
1993
  drop: [
1935
1994
  this._onColumnRearrange, this
1936
1995
  ]
@@ -1966,11 +2025,6 @@ sap.ui.define([
1966
2025
  } else {
1967
2026
  oTableType.disableColumnResizer(this, this._oTable);
1968
2027
  }
1969
-
1970
- var aMDCColumns = this.getColumns();
1971
- aMDCColumns.forEach(function(oColumn) {
1972
- oColumn.updateColumnResizing(bEnableColumnResizer);
1973
- }, this);
1974
2028
  };
1975
2029
 
1976
2030
  Table.prototype._updateSelectionBehavior = function() {
@@ -2005,82 +2059,106 @@ sap.ui.define([
2005
2059
 
2006
2060
  var oParent = oColumn.getParent(),
2007
2061
  iIndex = oParent.indexOfColumn(oColumn),
2008
- oMDCColumn = this.getColumns()[iIndex],
2009
- bResizeButton = this._bMobileTable && this.getEnableColumnResize();
2062
+ oMDCColumn = this.getColumns()[iIndex];
2010
2063
 
2011
2064
  this._fullyInitialized().then(function() {
2012
- var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.mdc");
2013
- var oProperty = this.getPropertyHelper().getProperty(oMDCColumn.getDataProperty());
2065
+ if (this._bUseColumnMenu) {
2066
+ if (!this._oColumnHeaderMenu) {
2067
+ this._oQuickActionContainer = new QuickActionContainer({table: this});
2068
+ this._oItemContainer = new ItemContainer({table: this});
2069
+ this._oColumnHeaderMenu = new ColumnMenu({
2070
+ _quickActions: [this._oQuickActionContainer],
2071
+ _items: [this._oItemContainer]
2072
+ });
2073
+ }
2074
+ this._oQuickActionContainer.setAssociation("column", oMDCColumn);
2075
+
2076
+ Promise.all([
2077
+ this._oQuickActionContainer.initializeQuickActions(),
2078
+ this._oItemContainer.initializeItems()
2079
+ ]).then(function() {
2080
+ if (this._oQuickActionContainer.hasQuickActions() || this._oItemContainer.hasItems()) {
2081
+ if (this._oColumnHeaderMenu._oItemsContainer) {
2082
+ this._oColumnHeaderMenu._oItemsContainer.destroy();
2083
+ this._oColumnHeaderMenu._oItemsContainer = null;
2084
+ }
2085
+ this._oColumnHeaderMenu.openBy(oColumn);
2086
+ }
2087
+ }.bind(this));
2088
+ } else {
2089
+ var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.mdc"),
2090
+ bResizeButton = this._bMobileTable && this.getEnableColumnResize();
2014
2091
 
2015
- if (this._oPopover) {
2016
- this._oPopover.destroy();
2017
- this._oPopover = null;
2018
- }
2092
+ if (this._oPopover) {
2093
+ this._oPopover.destroy();
2094
+ this._oPopover = null;
2095
+ }
2096
+ if (this.isSortingEnabled()) {
2097
+ var aAscendItems = [] , aDescendItems = [];
2098
+ var aSortableProperties = this.getPropertyHelper().getProperty(oMDCColumn.getDataProperty()).getSortableProperties();
2099
+ aSortableProperties.forEach(function(oProperty) {
2100
+ aAscendItems.push(new Item({
2101
+ text: oProperty.label,
2102
+ key: oProperty.name
2103
+ }));
2104
+ aDescendItems.push(new Item({
2105
+ text: oProperty.label,
2106
+ key: oProperty.name
2107
+ }));
2108
+ });
2019
2109
 
2020
- if (this.isSortingEnabled() && oProperty) {
2021
- var aAscendItems = [];
2022
- var aDescendItems = [];
2110
+ // create ColumnHeaderPopover
2111
+ if (aAscendItems.length > 0) {
2112
+ this._oPopover = new ColumnHeaderPopover({
2113
+ items: [
2114
+ new ColumnPopoverSelectListItem({
2115
+ items: aAscendItems,
2116
+ label: oResourceBundle.getText("table.SETTINGS_ASCENDING"),
2117
+ icon: "sap-icon://sort-ascending",
2118
+ action: [SortOrder.Ascending, this._onCustomSort, this]
2119
+ }),
2120
+ new ColumnPopoverSelectListItem({
2121
+ items: aDescendItems,
2122
+ label: oResourceBundle.getText("table.SETTINGS_DESCENDING"),
2123
+ icon: "sap-icon://sort-descending",
2124
+ action: [SortOrder.Descending, this._onCustomSort, this]
2125
+ })
2126
+ ]
2127
+ });
2128
+ oColumn.addDependent(this._oPopover);
2129
+ }
2130
+ }
2023
2131
 
2024
- oProperty.getSortableProperties().forEach(function(oProperty) {
2025
- aAscendItems.push(new Item({
2026
- text: oProperty.label,
2027
- key: oProperty.name
2028
- }));
2029
- aDescendItems.push(new Item({
2132
+ var aFilterable = [];
2133
+ var oDelegate = this.getControlDelegate();
2134
+ var aHeaderItems = (oDelegate.addColumnMenuItems && oDelegate.addColumnMenuItems(this, oMDCColumn)) || [];
2135
+
2136
+ this.getPropertyHelper().getFilterableProperties(oMDCColumn.getDataProperty()).forEach(function(oProperty) {
2137
+ aFilterable.push(new Item({
2030
2138
  text: oProperty.label,
2031
2139
  key: oProperty.name
2032
2140
  }));
2033
2141
  });
2034
2142
 
2035
- // create ColumnHeaderPopover
2036
- if (aAscendItems.length > 0) {
2037
- this._oPopover = new ColumnHeaderPopover({
2038
- items: [
2039
- new ColumnPopoverSelectListItem({
2040
- items: aAscendItems,
2041
- label: oResourceBundle.getText("table.SETTINGS_ASCENDING"),
2042
- icon: "sap-icon://sort-ascending",
2043
- action: [false, this._onCustomSort, this]
2044
- }),
2045
- new ColumnPopoverSelectListItem({
2046
- items: aDescendItems,
2047
- label: oResourceBundle.getText("table.SETTINGS_DESCENDING"),
2048
- icon: "sap-icon://sort-descending",
2049
- action: [true, this._onCustomSort, this]
2050
- })
2051
- ]
2143
+ if (this.isFilteringEnabled() && aFilterable.length) {
2144
+ var oFilter = new ColumnPopoverSelectListItem({
2145
+ label: oResourceBundle.getText("table.SETTINGS_FILTER"),
2146
+ icon: "sap-icon://filter",
2147
+ action: [onShowFilterDialog, this]
2052
2148
  });
2053
- oColumn.addDependent(this._oPopover);
2149
+ aHeaderItems.unshift(oFilter);
2054
2150
  }
2055
- }
2056
- var oDelegate = this.getControlDelegate();
2057
- var aHeaderItems = (oDelegate.addColumnMenuItems && oDelegate.addColumnMenuItems(this, oMDCColumn)) || [];
2058
-
2059
- if (this.isFilteringEnabled() && oProperty && oProperty.getFilterableProperties().length > 0) {
2060
- aHeaderItems.unshift(new ColumnPopoverSelectListItem({
2061
- label: oResourceBundle.getText("table.SETTINGS_FILTER"),
2062
- icon: "sap-icon://filter",
2063
- action: [onShowFilterDialog, this]
2064
- }));
2065
- }
2066
2151
 
2067
- if (bResizeButton) {
2068
- var oColumnResize = ResponsiveTableType.startColumnResize(this._oTable, oColumn);
2069
- oColumnResize && aHeaderItems.push(oColumnResize);
2070
- }
2071
-
2072
- aHeaderItems.forEach(function(oItem) {
2073
- this._createPopover(oItem, oColumn);
2074
- }, this);
2152
+ if (bResizeButton) {
2153
+ var oColumnResize = ResponsiveTableType.startColumnResize(this._oTable, oColumn);
2154
+ oColumnResize && aHeaderItems.push(oColumnResize);
2155
+ }
2075
2156
 
2076
- if (this._oPopover) {
2077
- this._oPopover.openBy(oColumn);
2078
- this._oPopover.getAggregation("_popover").attachAfterClose(function() {
2079
- this._bSuppressOpenMenu = false;
2157
+ aHeaderItems.forEach(function(oItem) {
2158
+ this._createPopover(oItem, oColumn);
2080
2159
  }, this);
2081
- this._bSuppressOpenMenu = true;
2160
+ this._oPopover && this._oPopover.openBy(oColumn);
2082
2161
  }
2083
-
2084
2162
  }.bind(this));
2085
2163
  };
2086
2164
 
@@ -2095,10 +2173,18 @@ sap.ui.define([
2095
2173
  }
2096
2174
  };
2097
2175
 
2098
- Table.prototype._onCustomSort = function(oEvent, bDescending) {
2176
+ Table.prototype._onCustomSort = function(oEvent, sSortOrder) {
2099
2177
  var sSortProperty = oEvent.getParameter("property");
2100
2178
 
2101
- TableSettings.createSort(this, sSortProperty, bDescending, true);
2179
+ this.getCurrentState().sorters.forEach(function(oProp) {
2180
+ if (oProp.name === sSortProperty) {
2181
+ if (oProp.descending && sSortOrder === SortOrder.Descending || !oProp.descending && sSortOrder === SortOrder.Ascending) {
2182
+ sSortOrder = SortOrder.None;
2183
+ }
2184
+ }
2185
+ });
2186
+
2187
+ TableSettings.createSort(this, sSortProperty, sSortOrder, true);
2102
2188
  };
2103
2189
 
2104
2190
  Table.prototype._onColumnResize = function(oEvent) {
@@ -2119,34 +2205,20 @@ sap.ui.define([
2119
2205
  TableSettings.createAggregation(this, sSortProperty);
2120
2206
  };
2121
2207
 
2122
- Table.prototype._setColumnWidth = function(oMDCColumn) {
2123
- if (!this.getEnableAutoColumnWidth() || oMDCColumn.getWidth() || oMDCColumn.isBound("width")) {
2124
- return;
2125
- }
2126
-
2127
- var oPropertyHelper = this._oPropertyHelper;
2128
- if (oPropertyHelper) {
2129
- oPropertyHelper.setColumnWidth(oMDCColumn);
2130
- } else {
2131
- this.awaitPropertyHelper().then(this._setColumnWidth.bind(this, oMDCColumn));
2132
- }
2133
- };
2134
-
2135
- Table.prototype._insertInnerColumn = function(oMDCColumn, iIndex) {
2208
+ Table.prototype._insertInnerColumn = function(oColumn, iIndex) {
2136
2209
  if (!this._oTable) {
2137
2210
  return;
2138
2211
  }
2139
2212
 
2140
- this._setColumnWidth(oMDCColumn);
2213
+ var oInnerColumn = oColumn.getInnerColumn();
2141
2214
 
2142
- var oColumn = this._createColumn(oMDCColumn);
2143
- setColumnTemplate(this, oMDCColumn, oColumn, iIndex);
2215
+ this._setMobileColumnTemplate(oColumn, iIndex);
2144
2216
  this._bForceRebind = true;
2145
2217
 
2146
2218
  if (iIndex === undefined) {
2147
- this._oTable.addColumn(oColumn);
2219
+ this._oTable.addColumn(oInnerColumn);
2148
2220
  } else {
2149
- this._oTable.insertColumn(oColumn, iIndex);
2221
+ this._oTable.insertColumn(oInnerColumn, iIndex);
2150
2222
  }
2151
2223
  };
2152
2224
 
@@ -2171,143 +2243,82 @@ sap.ui.define([
2171
2243
  }, this);
2172
2244
  };
2173
2245
 
2174
- function setColumnTemplate(oTable, oColumn, oInnerColumn, iIndex) {
2175
- var oCellTemplate = oColumn.getTemplate(true);
2176
-
2177
- if (!oTable._bMobileTable) {
2178
- var oCreationTemplateClone = oColumn.getCreationTemplate(true);
2179
-
2180
- // Grid Table content cannot be wrapped!
2181
- [oCellTemplate, oCreationTemplateClone].forEach(function(oTemplate) {
2182
- if (!oTemplate) {
2183
- return;
2184
- }
2185
-
2186
- if (oTemplate.setWrapping) {
2187
- oTemplate.setWrapping(false);
2188
- }
2189
-
2190
- if (oTemplate.setRenderWhitespace) {
2191
- oTemplate.setRenderWhitespace(false);
2192
- }
2193
- });
2194
-
2195
- oInnerColumn.setTemplate(oCellTemplate);
2196
- oInnerColumn.setCreationTemplate(oCreationTemplateClone);
2197
- } else if (iIndex >= 0) {
2198
- oTable._oTemplate.insertCell(oCellTemplate, iIndex);
2199
- oTable._oTable.getItems().forEach(function(oItem) {
2200
- // Add lightweight placeholders that can be rendered - if they cannot be rendered, there will be errors in the console.
2201
- // The actual cells are created after rebind.
2202
- oItem.insertAggregation("cells", new InvisibleText(), iIndex, true);
2203
- });
2204
- } else {
2205
- oTable._oTemplate.addCell(oCellTemplate);
2206
- }
2207
- }
2208
-
2209
- /**
2210
- * Creates and returns a Column that can be added to the grid table, based on the provided MDCColumn
2211
- *
2212
- * @param {object} oMDCColumn - the mdc column instance using which the GridTable column will be created
2213
- * @private
2214
- * @returns {object} the column that is created
2215
- */
2216
- Table.prototype._createColumn = function(oMDCColumn) {
2217
- return GridTableType.createColumn(oMDCColumn.getId() + "-innerColumn", {
2218
- width: oMDCColumn.getWidth(),
2219
- minWidth: Math.round(oMDCColumn.getMinWidth() * parseFloat(MLibrary.BaseFontSize)),
2220
- hAlign: oMDCColumn.getHAlign(),
2221
- label: oMDCColumn.getColumnHeaderControl(this._bMobileTable, this.getEnableColumnResize()),
2222
- resizable: this.getEnableColumnResize(),
2223
- autoResizable: this.getEnableColumnResize()
2224
- });
2225
- };
2226
-
2227
- /**
2228
- * Creates and returns a MobileColumn that can be added to the mobile table, based on the provided MDCColumn
2229
- *
2230
- * @param {object} oMDCColumn - the mdc column instance using which the ResponsiveTable column will be created
2231
- * @private
2232
- * @returns {object} the column that is created
2233
- */
2234
- Table.prototype._createMobileColumn = function(oMDCColumn) {
2235
- return ResponsiveTableType.createColumn(oMDCColumn.getId() + "-innerColumn", {
2236
- width: oMDCColumn.getWidth(),
2237
- autoPopinWidth: oMDCColumn.getMinWidth(),
2238
- hAlign: oMDCColumn.getHAlign(),
2239
- header: oMDCColumn.getColumnHeaderControl(this._bMobileTable, this.getEnableColumnResize()),
2240
- importance: oMDCColumn.getImportance(),
2241
- popinDisplay: "Inline"
2242
- });
2243
- };
2244
-
2245
2246
  /**
2246
2247
  * Runtime API for JS flex change to avoid rebind.
2247
2248
  *
2248
- * @param {object} oMDCColumn - the mdc column instance which should be moved
2249
+ * @param {object} oColumn - the mdc column instance which should be moved
2249
2250
  * @param {int} iIndex - the index to which the column should be moved to
2250
2251
  * @private
2251
2252
  */
2252
- Table.prototype.moveColumn = function(oMDCColumn, iIndex) {
2253
- var oColumn;
2254
- // move column in mdc Table
2255
- this.removeAggregation("columns", oMDCColumn, true);
2256
- this.insertAggregation("columns", oMDCColumn, iIndex, true);
2253
+ Table.prototype.moveColumn = function(oColumn, iIndex) {
2254
+ oColumn._bIsBeingMoved = true;
2255
+ this.removeAggregation("columns", oColumn, true);
2256
+ this.insertAggregation("columns", oColumn, iIndex, true);
2257
+ delete oColumn._bIsBeingMoved;
2258
+
2257
2259
  if (this._oTable) {
2260
+ var oInnerColumn = oColumn.getInnerColumn();
2261
+
2258
2262
  // move column in inner table
2259
- oColumn = this._oTable.removeColumn(oMDCColumn.getId() + "-innerColumn");
2260
- this._oTable.insertColumn(oColumn, iIndex);
2263
+ this._oTable.removeColumn(oInnerColumn);
2264
+ this._oTable.insertColumn(oInnerColumn, iIndex);
2261
2265
 
2262
- // update template for ResponsiveTable
2263
- if (this._bMobileTable) {
2264
- this._updateColumnTemplate(oMDCColumn, iIndex);
2265
- }
2266
+ this._setMobileColumnOrder();
2267
+ this._updateMobileColumnTemplate(oColumn, iIndex);
2266
2268
  }
2267
2269
  };
2268
2270
 
2269
- Table.prototype.removeColumn = function(oMDCColumn) {
2270
- oMDCColumn = this.removeAggregation("columns", oMDCColumn, true);
2271
- if (this._oTable) {
2272
- var oColumn = this._oTable.removeColumn(oMDCColumn.getId() + "-innerColumn");
2273
- oColumn.destroy("KeepDom");
2274
-
2275
- // update template for ResponsiveTable
2276
- if (this._bMobileTable) {
2277
- this._updateColumnTemplate(oMDCColumn, -1);
2278
- }
2279
- this._onModifications();
2280
- }
2281
- return oMDCColumn;
2271
+ Table.prototype.removeColumn = function(oColumn) {
2272
+ oColumn = this.removeAggregation("columns", oColumn, true);
2273
+ this._updateMobileColumnTemplate(oColumn, -1);
2274
+ return oColumn;
2282
2275
  };
2283
2276
 
2284
- Table.prototype.addColumn = function(oMDCColumn) {
2285
- this.addAggregation("columns", oMDCColumn, true);
2286
-
2287
- this._insertInnerColumn(oMDCColumn);
2277
+ Table.prototype.addColumn = function(oColumn) {
2278
+ this.addAggregation("columns", oColumn, true);
2279
+ this._insertInnerColumn(oColumn);
2280
+ return this;
2281
+ };
2288
2282
 
2283
+ Table.prototype.insertColumn = function(oColumn, iIndex) {
2284
+ this.insertAggregation("columns", oColumn, iIndex, true);
2285
+ this._insertInnerColumn(oColumn, iIndex);
2289
2286
  return this;
2290
2287
  };
2291
2288
 
2292
- Table.prototype.insertColumn = function(oMDCColumn, iIndex) {
2293
- this.insertAggregation("columns", oMDCColumn, iIndex, true);
2289
+ Table.prototype._setMobileColumnTemplate = function(oColumn, iIndex) {
2290
+ if (!this._bMobileTable) {
2291
+ return;
2292
+ }
2294
2293
 
2295
- this._insertInnerColumn(oMDCColumn, iIndex);
2296
- this._onModifications();
2297
- return this;
2294
+ var oCellTemplate = oColumn.getTemplateClone();
2295
+
2296
+ if (iIndex >= 0) {
2297
+ this._oTemplate.insertCell(oCellTemplate, iIndex);
2298
+ this._oTable.getItems().forEach(function(oItem) {
2299
+ // Add lightweight placeholders that can be rendered - if they cannot be rendered, there will be errors in the console.
2300
+ // The actual cells are created after rebind.
2301
+ oItem.insertAggregation("cells", new InvisibleText(), iIndex, true);
2302
+ });
2303
+ } else {
2304
+ this._oTemplate.addCell(oCellTemplate);
2305
+ }
2298
2306
  };
2299
2307
 
2300
- // ResponsiveTable
2301
- Table.prototype._updateColumnTemplate = function(oMDCColumn, iIndex) {
2308
+ Table.prototype._updateMobileColumnTemplate = function(oMDCColumn, iIndex) {
2309
+ if (!this._bMobileTable) {
2310
+ return;
2311
+ }
2312
+
2302
2313
  var oCellTemplate, iCellIndex;
2303
2314
  // TODO: Check if this can be moved inside the m.Table.
2304
2315
 
2305
2316
  // Remove cell template when column is hidden
2306
2317
  // Remove template cell from ColumnListItem (template)
2307
2318
  if (this._oTemplate) {
2308
- oCellTemplate = oMDCColumn.getTemplate(true);
2319
+ oCellTemplate = oMDCColumn.getTemplateClone();
2309
2320
  iCellIndex = this._oTemplate.indexOfCell(oCellTemplate);
2310
- Table._removeItemCell(this._oTemplate, iCellIndex, iIndex);
2321
+ removeMobileItemCell(this._oTemplate, iCellIndex, iIndex);
2311
2322
  }
2312
2323
 
2313
2324
  // Remove cells from actual rendered items, as this is not done automatically
@@ -2315,14 +2326,36 @@ sap.ui.define([
2315
2326
  this._oTable.getItems().forEach(function(oItem) {
2316
2327
  // Grouping row (when enabled) will not have cells
2317
2328
  if (oItem.removeCell) {
2318
- Table._removeItemCell(oItem, iCellIndex, iIndex);
2329
+ removeMobileItemCell(oItem, iCellIndex, iIndex);
2319
2330
  }
2320
2331
  });
2321
2332
  }
2322
2333
  };
2323
2334
 
2324
- Table._removeItemCell = function(oItem, iRemoveIndex, iInsertIndex) {
2325
- // remove cell from index
2335
+ /**
2336
+ * Sets the column order for the responsive table. The order is set according to the index of the mdc columns.
2337
+ * Updating the responsive table's column order and invalidating avoid rebinds.
2338
+ * @private
2339
+ */
2340
+ Table.prototype._setMobileColumnOrder = function() {
2341
+ if (!this._bMobileTable) {
2342
+ return;
2343
+ }
2344
+
2345
+ this.getColumns().forEach(function(oColumn) {
2346
+ var oInnerColumn = oColumn.getInnerColumn();
2347
+ if (!oInnerColumn) {
2348
+ return;
2349
+ }
2350
+ // since we ensure correct index of the mdcColumn control we can set the same order to the inner responsive table columns
2351
+ oInnerColumn.setOrder(this.indexOfColumn(oColumn));
2352
+ }, this);
2353
+
2354
+ // invalidate the inner table to apply the correct order on the UI. See sap.m.Column#setOrder
2355
+ this._oTable.invalidate();
2356
+ };
2357
+
2358
+ function removeMobileItemCell(oItem, iRemoveIndex, iInsertIndex) {
2326
2359
  var oCell = oItem.removeCell(iRemoveIndex);
2327
2360
  if (oCell) {
2328
2361
  // -1 index destroys the inner content
@@ -2332,12 +2365,13 @@ sap.ui.define([
2332
2365
  oCell.destroy();
2333
2366
  }
2334
2367
  }
2335
- };
2368
+ }
2336
2369
 
2337
2370
  Table.prototype._onItemPress = function(oEvent) {
2338
2371
  this.fireRowPress({
2339
2372
  bindingContext: oEvent.getParameter("listItem").getBindingContext()
2340
2373
  });
2374
+ ResponsiveTableType._onRowActionPress.apply(this, [oEvent]);
2341
2375
  };
2342
2376
 
2343
2377
  Table.prototype._onSelectionChange = function(oEvent) {
@@ -2377,13 +2411,6 @@ sap.ui.define([
2377
2411
  });
2378
2412
  };
2379
2413
 
2380
- Table.prototype._onRowActionPress = function(oEvent) {
2381
- var oRow = oEvent.getParameter("row");
2382
- this.fireRowPress({
2383
- bindingContext: oRow.getBindingContext()
2384
- });
2385
- };
2386
-
2387
2414
  Table.prototype._onRowSelectionChange = function(oEvent) {
2388
2415
  if (!this._bSelectionChangedByAPI) { // TODO Table / Plugin needs to ensure that events are only fired when "relevant" for the app.
2389
2416
  this.fireSelectionChange({
@@ -2399,14 +2426,14 @@ sap.ui.define([
2399
2426
  this._onColumnPress(oEvent.getParameter("column"));
2400
2427
  };
2401
2428
 
2402
- // TODO: maybe selectedContexts should be an association
2403
- // TODO: The API is unstable/unreliable in GridTable scenarios and has to be worked upon
2404
2429
  /**
2405
- * Gets contexts from the table that have been selected by the user.
2430
+ * Gets contexts that have been selected by the user.
2406
2431
  *
2407
- * @returns {Array} Contexts of rows/items selected by the user
2432
+ * @returns {sap.ui.model.Context[]} The selected contexts
2408
2433
  * @private
2409
- * @experimental The API is unstable/unreliable in GridTable scenarios
2434
+ * @ui5-restricted sap.fe
2435
+ * MDC_PUBLIC_CANDIDATE
2436
+ * @experimental The API is subject to change.
2410
2437
  */
2411
2438
  Table.prototype.getSelectedContexts = function() {
2412
2439
  if (this._oTable) {
@@ -2424,9 +2451,11 @@ sap.ui.define([
2424
2451
  };
2425
2452
 
2426
2453
  /**
2427
- * API to get clear selection from the table.
2454
+ * Clears the selection.
2428
2455
  *
2429
2456
  * @private
2457
+ * @ui5-restricted sap.fe
2458
+ * MDC_PUBLIC_CANDIDATE
2430
2459
  */
2431
2460
  Table.prototype.clearSelection = function() {
2432
2461
  if (this._oTable) {
@@ -2471,7 +2500,7 @@ sap.ui.define([
2471
2500
 
2472
2501
  var oBindingInfo = {};
2473
2502
 
2474
- this.getControlDelegate().updateBindingInfo(this, oBindingInfo, oBindingInfo);
2503
+ this.getControlDelegate().updateBindingInfo(this, oBindingInfo);
2475
2504
 
2476
2505
  if (oBindingInfo.path) {
2477
2506
  this._oTable.setShowOverlay(false);
@@ -2485,7 +2514,7 @@ sap.ui.define([
2485
2514
  Table._addBindingListener(oBindingInfo, "dataReceived", this._onDataReceived.bind(this));
2486
2515
  Table._addBindingListener(oBindingInfo, "change", this._onBindingChange.bind(this));
2487
2516
 
2488
- this._updateColumnsBeforeBinding(oBindingInfo);
2517
+ this._updateColumnsBeforeBinding();
2489
2518
  this.getControlDelegate().updateBinding(this, oBindingInfo, this._bForceRebind ? null : this.getRowBinding());
2490
2519
  this._updateInnerTableNoDataText();
2491
2520
  this._bForceRebind = false;
@@ -2579,32 +2608,27 @@ sap.ui.define([
2579
2608
  }
2580
2609
  };
2581
2610
 
2582
- Table.prototype._updateColumnsBeforeBinding = function(oBindingInfo) {
2583
- var aSorters = [].concat(oBindingInfo.sorter || []);
2584
- var aMDCColumns = this.getColumns();
2585
- var bMobileTable = this._bMobileTable;
2611
+ Table.prototype._updateColumnsBeforeBinding = function() {
2612
+ var aColumns = this.getColumns();
2586
2613
  var oPropertyHelper = this.getPropertyHelper();
2587
2614
 
2588
- aMDCColumns.forEach(function(oMDCColumn) {
2589
- var oInnerColumn = Core.byId(oMDCColumn.getId() + "-innerColumn");
2590
- var oProperty = oPropertyHelper.getProperty(oMDCColumn.getDataProperty());
2591
- var aSortablePaths = oProperty ? oProperty.getSortableProperties().map(function(oProperty) {
2592
- return oProperty.path;
2615
+ aColumns.forEach(function(oColumn) {
2616
+ var oInnerColumn = oColumn.getInnerColumn();
2617
+ var oProperty = oPropertyHelper.getProperty(oColumn.getDataProperty());
2618
+ var aSortableProperties = oProperty ? oProperty.getSortableProperties().map(function(oProperty) {
2619
+ return oProperty.name;
2593
2620
  }) : [];
2621
+ var oSortCondition = this._getSortedProperties().find(function(oSortCondition) {
2622
+ return aSortableProperties.includes(oSortCondition.name);
2623
+ });
2624
+ var sSortOrder = oSortCondition && oSortCondition.descending ? SortOrder.Descending : SortOrder.Ascending;
2594
2625
 
2595
- if (aSortablePaths.length > 0) {
2596
- var oSorter = aSorters.find(function(oSorter) {
2597
- return aSortablePaths.indexOf(oSorter.sPath) > -1;
2598
- });
2599
- var sSortOrder = oSorter && oSorter.bDescending ? "Descending" : "Ascending";
2600
-
2601
- if (bMobileTable) {
2602
- oInnerColumn.setSortIndicator(oSorter ? sSortOrder : "None");
2603
- } else {
2604
- oInnerColumn.setSorted(!!oSorter).setSortOrder(sSortOrder);
2605
- }
2626
+ if (this._bMobileTable) {
2627
+ oInnerColumn.setSortIndicator(oSortCondition ? sSortOrder : SortOrder.None);
2628
+ } else {
2629
+ oInnerColumn.setSorted(!!oSortCondition).setSortOrder(sSortOrder);
2606
2630
  }
2607
- });
2631
+ }, this);
2608
2632
  };
2609
2633
 
2610
2634
  /**
@@ -2623,8 +2647,7 @@ sap.ui.define([
2623
2647
  var iRowCount;
2624
2648
  if (!bConsiderTotal) {
2625
2649
  iRowCount = oRowBinding.getLength();
2626
- } else {
2627
- if (typeof oRowBinding.getCount === 'function') {
2650
+ } else if (typeof oRowBinding.getCount === 'function') {
2628
2651
  iRowCount = oRowBinding.getCount();
2629
2652
  } else if (oRowBinding.isLengthFinal()) {
2630
2653
  // This branch is only fallback and for TreeBindings (TreeBindings should be excluded when MDCTable will support TreeBinding,
@@ -2632,7 +2655,6 @@ sap.ui.define([
2632
2655
  // ListBindings should in general get a getCount function in nearer future (5341464)
2633
2656
  iRowCount = oRowBinding.getLength();
2634
2657
  }
2635
- }
2636
2658
 
2637
2659
  if (iRowCount < 0 || iRowCount === "0") {
2638
2660
  iRowCount = 0;
@@ -2693,11 +2715,6 @@ sap.ui.define([
2693
2715
  }
2694
2716
  };
2695
2717
 
2696
- // TODO: Delete!
2697
- Table.prototype.rebindTable = function () {
2698
- this._rebind();
2699
- };
2700
-
2701
2718
  /**
2702
2719
  * Rebinds the table rows.
2703
2720
  */
@@ -2790,5 +2807,4 @@ sap.ui.define([
2790
2807
  };
2791
2808
 
2792
2809
  return Table;
2793
-
2794
- });
2810
+ });