@openui5/sap.ui.mdc 1.101.0 → 1.103.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 (222) hide show
  1. package/.eslintrc.json +19 -0
  2. package/THIRDPARTY.txt +1 -1
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +11 -0
  7. package/src/sap/ui/mdc/Chart.js +111 -55
  8. package/src/sap/ui/mdc/ChartDelegate.js +97 -92
  9. package/src/sap/ui/mdc/Control.js +1 -1
  10. package/src/sap/ui/mdc/Element.js +1 -1
  11. package/src/sap/ui/mdc/Field.js +9 -2
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterField.js +2 -2
  14. package/src/sap/ui/mdc/Link.js +4 -1
  15. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  16. package/src/sap/ui/mdc/Table.js +114 -160
  17. package/src/sap/ui/mdc/TableDelegate.js +3 -23
  18. package/src/sap/ui/mdc/ValueHelp.js +20 -32
  19. package/src/sap/ui/mdc/ValueHelpDelegate.js +9 -3
  20. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -1
  21. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -2
  22. package/src/sap/ui/mdc/chart/ChartToolbar.js +38 -3
  23. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +6 -2
  24. package/src/sap/ui/mdc/chart/Item.js +6 -11
  25. package/src/sap/ui/mdc/chart/PropertyHelper.js +7 -8
  26. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +2 -3
  27. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  28. package/src/sap/ui/mdc/condition/ConditionConverter.js +16 -131
  29. package/src/sap/ui/mdc/condition/ConditionModel.js +50 -21
  30. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  31. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +11 -11
  32. package/src/sap/ui/mdc/condition/Operator.js +85 -15
  33. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +5 -3
  34. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  35. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +6 -3
  36. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbarAction.designtime.js +53 -0
  37. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +13 -1
  38. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +9 -4
  39. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +1 -1
  40. package/src/sap/ui/mdc/enum/PropagationReason.js +2 -2
  41. package/src/sap/ui/mdc/enum/SelectType.js +3 -0
  42. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  43. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  44. package/src/sap/ui/mdc/field/ConditionType.js +166 -52
  45. package/src/sap/ui/mdc/field/ConditionsType.js +76 -11
  46. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -2
  47. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  48. package/src/sap/ui/mdc/field/DefineConditionPanel.js +107 -99
  49. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +9 -62
  50. package/src/sap/ui/mdc/field/FieldBase.js +108 -73
  51. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +20 -1
  52. package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -39
  53. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  54. package/src/sap/ui/mdc/field/FieldInput.js +2 -2
  55. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  56. package/src/sap/ui/mdc/field/FieldMultiInput.js +2 -2
  57. package/src/sap/ui/mdc/field/FieldValueHelp.js +1 -1
  58. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -19
  59. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +3 -1
  60. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +13 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -3
  62. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +28 -29
  63. package/src/sap/ui/mdc/field/InParameter.js +1 -4
  64. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  65. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  66. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  67. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/TokenDisplay.js +2 -2
  69. package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -2
  70. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -5
  71. package/src/sap/ui/mdc/field/content/ContentFactory.js +8 -0
  72. package/src/sap/ui/mdc/field/content/DateContent.js +3 -3
  73. package/src/sap/ui/mdc/field/content/DateTimeContent.js +43 -2
  74. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +4 -4
  75. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +1 -1
  76. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  77. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +21 -1
  78. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  79. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +80 -4
  80. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +19 -38
  81. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  82. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +23 -41
  83. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +43 -58
  84. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  85. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  86. package/src/sap/ui/mdc/flexibility/GroupFlex.js +25 -55
  87. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +21 -42
  88. package/src/sap/ui/mdc/flexibility/SortFlex.js +23 -52
  89. package/src/sap/ui/mdc/flexibility/Table.flexibility.js +3 -3
  90. package/src/sap/ui/mdc/flexibility/Util.js +82 -0
  91. package/src/sap/ui/mdc/flexibility/xConfigFlex.js +137 -0
  92. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +3 -1
  93. package/src/sap/ui/mdc/library.js +6 -17
  94. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  95. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  96. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  97. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  98. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  99. package/src/sap/ui/mdc/link/ContactDetailsRenderer.js +1 -1
  100. package/src/sap/ui/mdc/link/Factory.js +1 -1
  101. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  102. package/src/sap/ui/mdc/link/LinkItem.js +9 -1
  103. package/src/sap/ui/mdc/link/Panel.js +25 -13
  104. package/src/sap/ui/mdc/link/PanelItem.js +10 -1
  105. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  106. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  107. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  108. package/src/sap/ui/mdc/messagebundle.properties +13 -1
  109. package/src/sap/ui/mdc/messagebundle_ar.properties +11 -3
  110. package/src/sap/ui/mdc/messagebundle_bg.properties +9 -1
  111. package/src/sap/ui/mdc/messagebundle_ca.properties +9 -1
  112. package/src/sap/ui/mdc/messagebundle_cs.properties +9 -1
  113. package/src/sap/ui/mdc/messagebundle_cy.properties +9 -1
  114. package/src/sap/ui/mdc/messagebundle_da.properties +9 -1
  115. package/src/sap/ui/mdc/messagebundle_de.properties +9 -1
  116. package/src/sap/ui/mdc/messagebundle_el.properties +20 -12
  117. package/src/sap/ui/mdc/messagebundle_en.properties +9 -1
  118. package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -1
  119. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +9 -1
  120. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +8 -0
  121. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +8 -0
  122. package/src/sap/ui/mdc/messagebundle_es.properties +15 -7
  123. package/src/sap/ui/mdc/messagebundle_es_MX.properties +9 -1
  124. package/src/sap/ui/mdc/messagebundle_et.properties +9 -1
  125. package/src/sap/ui/mdc/messagebundle_fi.properties +9 -1
  126. package/src/sap/ui/mdc/messagebundle_fr.properties +10 -2
  127. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +9 -1
  128. package/src/sap/ui/mdc/messagebundle_hi.properties +9 -1
  129. package/src/sap/ui/mdc/messagebundle_hr.properties +9 -1
  130. package/src/sap/ui/mdc/messagebundle_hu.properties +9 -1
  131. package/src/sap/ui/mdc/messagebundle_id.properties +9 -1
  132. package/src/sap/ui/mdc/messagebundle_it.properties +10 -2
  133. package/src/sap/ui/mdc/messagebundle_iw.properties +10 -2
  134. package/src/sap/ui/mdc/messagebundle_ja.properties +9 -1
  135. package/src/sap/ui/mdc/messagebundle_kk.properties +9 -1
  136. package/src/sap/ui/mdc/messagebundle_ko.properties +11 -3
  137. package/src/sap/ui/mdc/messagebundle_lt.properties +9 -1
  138. package/src/sap/ui/mdc/messagebundle_lv.properties +9 -1
  139. package/src/sap/ui/mdc/messagebundle_ms.properties +9 -1
  140. package/src/sap/ui/mdc/messagebundle_nl.properties +23 -15
  141. package/src/sap/ui/mdc/messagebundle_no.properties +9 -1
  142. package/src/sap/ui/mdc/messagebundle_pl.properties +9 -1
  143. package/src/sap/ui/mdc/messagebundle_pt.properties +18 -10
  144. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +9 -1
  145. package/src/sap/ui/mdc/messagebundle_ro.properties +9 -1
  146. package/src/sap/ui/mdc/messagebundle_ru.properties +9 -1
  147. package/src/sap/ui/mdc/messagebundle_sh.properties +10 -2
  148. package/src/sap/ui/mdc/messagebundle_sk.properties +9 -1
  149. package/src/sap/ui/mdc/messagebundle_sl.properties +9 -1
  150. package/src/sap/ui/mdc/messagebundle_sv.properties +9 -1
  151. package/src/sap/ui/mdc/messagebundle_th.properties +9 -1
  152. package/src/sap/ui/mdc/messagebundle_tr.properties +11 -3
  153. package/src/sap/ui/mdc/messagebundle_uk.properties +9 -1
  154. package/src/sap/ui/mdc/messagebundle_vi.properties +9 -1
  155. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -1
  156. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -2
  157. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  158. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  159. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  160. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  161. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +4 -4
  162. package/src/sap/ui/mdc/odata/TypeUtil.js +25 -2
  163. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +5 -5
  164. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +6 -0
  165. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +6 -6
  166. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +0 -33
  167. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +378 -154
  168. package/src/sap/ui/mdc/p13n/Engine.js +8 -4
  169. package/src/sap/ui/mdc/p13n/PersistenceProvider.js +1 -0
  170. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  171. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  172. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +14 -11
  173. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +133 -0
  174. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +41 -42
  175. package/src/sap/ui/mdc/p13n/panels/GroupView.js +1 -0
  176. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +12 -4
  177. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +1 -1
  178. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
  179. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +22 -27
  180. package/src/sap/ui/mdc/table/Column.js +4 -1
  181. package/src/sap/ui/mdc/table/CreationRow.js +3 -1
  182. package/src/sap/ui/mdc/table/GridTableType.js +0 -5
  183. package/src/sap/ui/mdc/table/PropertyHelper.js +27 -74
  184. package/src/sap/ui/mdc/table/ResponsiveTableType.js +29 -17
  185. package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
  186. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  187. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  188. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +3 -3
  189. package/src/sap/ui/mdc/themes/base/Chart.less +5 -0
  190. package/src/sap/ui/mdc/themes/base/InfoPanel.less +1 -0
  191. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +5 -0
  192. package/src/sap/ui/mdc/util/DateUtil.js +30 -5
  193. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  194. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  195. package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
  196. package/src/sap/ui/mdc/util/TypeUtil.js +105 -17
  197. package/src/sap/ui/mdc/valuehelp/Dialog.js +148 -48
  198. package/src/sap/ui/mdc/valuehelp/Popover.js +16 -3
  199. package/src/sap/ui/mdc/valuehelp/base/Container.js +45 -32
  200. package/src/sap/ui/mdc/valuehelp/base/Content.js +60 -28
  201. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +5 -5
  202. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +75 -32
  203. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +3 -3
  204. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  205. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +11 -3
  206. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
  207. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +7 -3
  208. package/src/sap/ui/mdc/valuehelp/content/MTable.js +9 -3
  209. package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +48 -2
  210. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +3 -3
  211. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +3 -3
  212. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +55 -4
  213. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +2 -2
  214. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +53 -12
  215. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +6 -6
  216. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +121 -202
  217. package/test/sap/ui/mdc/testutils/opa/p13n/waitForSelectWithSelectedTextOnPanel.js +5 -2
  218. package/test/sap/ui/mdc/testutils/opa/table/Actions.js +70 -0
  219. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +9 -7
  220. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +2 -2
  221. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +0 -139
  222. package/src/sap/ui/mdc/valuehelp/content/ListCollection.js +0 -205
@@ -29,7 +29,6 @@ sap.ui.define([
29
29
  "sap/ui/core/library",
30
30
  "sap/ui/events/KeyCodes",
31
31
  "sap/ui/model/Sorter",
32
- "sap/ui/dom/containsOrEquals",
33
32
  "sap/base/strings/capitalize",
34
33
  "sap/base/util/deepEqual",
35
34
  "sap/base/util/Deferred",
@@ -73,7 +72,6 @@ sap.ui.define([
73
72
  coreLibrary,
74
73
  KeyCodes,
75
74
  Sorter,
76
- containsOrEquals,
77
75
  capitalize,
78
76
  deepEqual,
79
77
  Deferred,
@@ -97,7 +95,6 @@ sap.ui.define([
97
95
 
98
96
  var SelectionMode = library.SelectionMode;
99
97
  var TableType = library.TableType;
100
- var RowAction = library.RowAction;
101
98
  var P13nMode = library.TableP13nMode;
102
99
  var ToolbarDesign = MLibrary.ToolbarDesign;
103
100
  var ToolbarStyle = MLibrary.ToolbarStyle;
@@ -172,16 +169,6 @@ sap.ui.define([
172
169
  defaultValue: null,
173
170
  invalidate: true
174
171
  },
175
- /**
176
- * Actions available for a table row.
177
- *
178
- * @since 1.60
179
- * @deprecated as of version 1.98, use row settings instead.
180
- */
181
- rowAction: {
182
- type: "sap.ui.mdc.RowAction[]",
183
- defaultValue: []
184
- },
185
172
  /**
186
173
  * Personalization options for the table.<br>
187
174
  * <b>Note:</b> The order of the options does not influence the position on the UI.
@@ -889,11 +876,6 @@ sap.ui.define([
889
876
  // ----End Type----
890
877
 
891
878
  Table.prototype.setRowSettings = function(oRowSettings) {
892
- if (this._oTableRowAction) {
893
- if (oRowSettings.getRowActions().length == 0) {
894
- oRowSettings.addRowAction(this._oTableRowAction);
895
- }
896
- }
897
879
  this.setAggregation("rowSettings", oRowSettings, true);
898
880
 
899
881
  if (this._oTable) {
@@ -922,11 +904,8 @@ sap.ui.define([
922
904
  };
923
905
 
924
906
  Table.prototype.focus = function(oFocusInfo) {
925
- //see Element.prototype.focus, MDCTable does not have any own focusable DOM, therefor forward to inner control
926
- var oDomRef = this.getDomRef();
927
-
928
- if (this._oTable && oDomRef && !containsOrEquals(oDomRef, document.activeElement)) {
929
- this._oTable.focus();
907
+ if (this._oTable) {
908
+ this._oTable.focus(oFocusInfo);
930
909
  }
931
910
  };
932
911
 
@@ -968,24 +947,6 @@ sap.ui.define([
968
947
  return this;
969
948
  };
970
949
 
971
- // TODO: Temporary solution until apps adapted changes. Remove this, as this is replaced by rowSettings
972
- Table.prototype.setRowAction = function(aActions) {
973
- this.setProperty("rowAction", aActions, true);
974
-
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);
983
- }
984
- this.setRowSettings(oRowSettings);
985
-
986
- return this;
987
- };
988
-
989
950
  Table.prototype.setCreationRow = function(oCreationRow) {
990
951
  this.setAggregation("creationRow", oCreationRow, true);
991
952
 
@@ -1117,13 +1078,13 @@ sap.ui.define([
1117
1078
  function updateFilterInfoBar(oTable) {
1118
1079
  var oFilterInfoBar = getFilterInfoBar(oTable);
1119
1080
  var oFilterInfoBarText = getFilterInfoBarText(oTable);
1120
- var aFilteredProperties = getFilteredProperties(oTable);
1081
+ var aFilteredProperties = getInternallyFilteredProperties(oTable);
1121
1082
 
1122
1083
  if (!oFilterInfoBar) {
1123
1084
  return;
1124
1085
  }
1125
1086
 
1126
- if (aFilteredProperties.length === 0 || !oTable.isFilteringEnabled()) {
1087
+ if (aFilteredProperties.length === 0) {
1127
1088
  var oFilterInfoBarDomRef = oFilterInfoBar.getDomRef();
1128
1089
 
1129
1090
  if (oFilterInfoBarDomRef && oFilterInfoBarDomRef.contains(document.activeElement)) {
@@ -1131,7 +1092,7 @@ sap.ui.define([
1131
1092
  }
1132
1093
 
1133
1094
  oFilterInfoBar.setVisible(false);
1134
- oTable._oTable.removeAriaLabelledBy(oFilterInfoBarText);
1095
+ getFilterInfoBarInvisibleText(oTable).setText("");
1135
1096
 
1136
1097
  return;
1137
1098
  }
@@ -1147,10 +1108,10 @@ sap.ui.define([
1147
1108
 
1148
1109
  if (!oFilterInfoBar.getVisible()) {
1149
1110
  oFilterInfoBar.setVisible(true);
1150
- oTable._oTable.addAriaLabelledBy(oFilterInfoBarText);
1151
1111
  }
1152
1112
 
1153
1113
  oFilterInfoBarText.setText(sFilterText);
1114
+ getFilterInfoBarInvisibleText(oTable).setText(sFilterText);
1154
1115
  });
1155
1116
  }
1156
1117
 
@@ -1173,9 +1134,19 @@ sap.ui.define([
1173
1134
  oTable._oTable.insertExtension(oFilterInfoBar, 1);
1174
1135
  }
1175
1136
 
1176
- if (oFilterInfoBar.getVisible()) {
1177
- oTable._oTable.addAriaLabelledBy(getFilterInfoBarText(oTable));
1137
+ var oInvisibleText = getFilterInfoBarInvisibleText(oTable);
1138
+ oTable._oTable.addAriaLabelledBy(oInvisibleText.getId());
1139
+ }
1140
+
1141
+ function getFilterInfoBarInvisibleText(oTable) {
1142
+ if (!oTable) {
1143
+ return null;
1144
+ }
1145
+
1146
+ if (!oTable._oFilterInfoBarInvisibleText) {
1147
+ oTable._oFilterInfoBarInvisibleText = new InvisibleText().toStatic();
1178
1148
  }
1149
+ return oTable._oFilterInfoBarInvisibleText;
1179
1150
  }
1180
1151
 
1181
1152
  function createFilterInfoBar(oTable) {
@@ -1300,13 +1271,13 @@ sap.ui.define([
1300
1271
  return oRb.getText("table.NO_DATA");
1301
1272
  }
1302
1273
 
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
1274
+ // Table is bound, but does not show any data.
1275
+ // If the table is filtered internally or externally, e.g. FilterBar, then show the message that no data was found and that filters can be
1276
+ // adjusted.
1277
+ if (isFiltered(this)) {
1308
1278
  return oRb.getText("table.NO_RESULTS");
1309
1279
  }
1280
+
1310
1281
  // If no filters set, show only message that the data are not found, and nothing about the filters.
1311
1282
  return oRb.getText("table.NO_DATA");
1312
1283
  };
@@ -1550,12 +1521,44 @@ sap.ui.define([
1550
1521
  return this.getEngine().readXConfig(this);
1551
1522
  };
1552
1523
 
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();
1524
+ /**
1525
+ * Gets the keys of properties that are filtered internally via the inbuilt filtering ({@link sap.ui.mdc.filterbar.p13n.AdaptationFilterBar}).
1526
+ *
1527
+ * @param {sap.ui.mdc.Table} oTable Instance of the table.
1528
+ * @returns {string[]} The keys of the filtered properties.
1529
+ */
1530
+ function getInternallyFilteredProperties(oTable) {
1531
+ return oTable.isFilteringEnabled() ? getFilteredProperties(oTable.getFilterConditions()) : [];
1532
+ }
1533
+
1534
+ /**
1535
+ * Gets the keys of properties that are filtered externally via the associated filter ({@link sap.ui.mdc.IFilter}).
1536
+ *
1537
+ * @param {sap.ui.mdc.Table} oTable Instance of the table.
1538
+ * @returns {string[]} The keys of the filtered properties.
1539
+ */
1540
+ function getExternallyFilteredProperties(oTable) {
1541
+ var oFilter = Core.byId(oTable.getFilter());
1542
+ return oFilter ? getFilteredProperties(oFilter.getConditions()) : [];
1543
+ }
1544
+
1545
+ /**
1546
+ * Whether the table is filtered internally via the inbuilt filtering ({@link sap.ui.mdc.filterbar.p13n.AdaptationFilterBar}), or externally via
1547
+ * the associated filter ({@link sap.ui.mdc.IFilter}).
1548
+ *
1549
+ * @param {sap.ui.mdc.Table} oTable Instance of the table.
1550
+ * @return {boolean} Whether the table is filtered (internally or externally).
1551
+ */
1552
+ function isFiltered(oTable) {
1553
+ var oFilter = Core.byId(oTable.getFilter());
1554
+ return getInternallyFilteredProperties(oTable).length > 0
1555
+ || getExternallyFilteredProperties(oTable).length > 0
1556
+ || oFilter && oFilter.getSearch() !== "";
1557
+ }
1556
1558
 
1557
- return Object.keys(mFilterConditions).filter(function(sProperty) {
1558
- return mFilterConditions[sProperty].length > 0;
1559
+ function getFilteredProperties(mConditions) {
1560
+ return Object.keys(mConditions || {}).filter(function(sProperty) {
1561
+ return mConditions[sProperty].length > 0;
1559
1562
  });
1560
1563
  }
1561
1564
 
@@ -1685,23 +1688,17 @@ sap.ui.define([
1685
1688
  return null;
1686
1689
  }
1687
1690
 
1688
- var mDefaultExportSettings = {
1689
- fileName: this.getHeader()
1690
- };
1691
-
1692
- if (!this._cachedExportSettings) {
1693
- this._cachedExportSettings = mDefaultExportSettings;
1694
- }
1695
-
1696
1691
  if (!this._oExportButton) {
1697
1692
  this._oExportButton = TableSettings.createExportButton(this.getId(), {
1698
1693
  "default": [
1699
1694
  function() {
1700
- this._onExport(mDefaultExportSettings);
1695
+ this._onExport();
1701
1696
  }, this
1702
1697
  ],
1703
1698
  "exportAs": [
1704
- this._onExportAs, this
1699
+ function() {
1700
+ this._onExport(true);
1701
+ }, this
1705
1702
  ]
1706
1703
  });
1707
1704
  }
@@ -1734,8 +1731,7 @@ sap.ui.define([
1734
1731
  * @returns {Promise} Column configuration to be exported
1735
1732
  * @private
1736
1733
  */
1737
- Table.prototype._createExportColumnConfiguration = function(mCustomConfig) {
1738
- var bSplitCells = mCustomConfig && mCustomConfig.splitCells;
1734
+ Table.prototype._createExportColumnConfiguration = function() {
1739
1735
  var aColumns = this.getColumns();
1740
1736
 
1741
1737
  return this._fullyInitialized().then(function() {
@@ -1743,26 +1739,35 @@ sap.ui.define([
1743
1739
  var aSheetColumns = [];
1744
1740
 
1745
1741
  aColumns.forEach(function(oColumn) {
1746
- var aColumnExportSettings = oPropertyHelper.getColumnExportSettings(oColumn, bSplitCells);
1742
+ var aColumnExportSettings = oPropertyHelper.getColumnExportSettings(oColumn);
1747
1743
  aSheetColumns = aSheetColumns.concat(aColumnExportSettings);
1748
1744
  }, this);
1749
- return [aSheetColumns, oPropertyHelper];
1745
+ return aSheetColumns;
1750
1746
  }.bind(this));
1751
1747
  };
1752
1748
 
1749
+ /**
1750
+ * Returns the label/header text of the column
1751
+ * @param {string} sPath column key
1752
+ * @returns {string|null} column label/header text. Returns null if no column or header/label text is available.
1753
+ * @private
1754
+ */
1755
+ Table.prototype._getColumnLabel = function(sPath) {
1756
+ var oPropertyHelper = this.getPropertyHelper();
1757
+ var mPropertyInfo = oPropertyHelper.getProperty(sPath);
1758
+ return mPropertyInfo && mPropertyInfo.label;
1759
+ };
1760
+
1753
1761
  /**
1754
1762
  * Triggers export via "sap.ui.export"/"Document Export Services" export functionality
1755
1763
  *
1756
- * @param {Object} mCustomConfig Custom config for the spreadsheet export
1764
+ * @param {boolean} bExportAs controls whether the regular export or the Export As dialog should be called
1757
1765
  * @returns {Promise} export build process promise
1758
1766
  * @private
1759
1767
  */
1760
- Table.prototype._onExport = function(mCustomConfig) {
1768
+ Table.prototype._onExport = function(bExportAs) {
1761
1769
  var that = this;
1762
- return this._createExportColumnConfiguration(mCustomConfig).then(function(aResult) {
1763
- var aSheetColumns = aResult[0];
1764
- var oPropertyHelper = aResult[1];
1765
-
1770
+ return this._createExportColumnConfiguration().then(function(aSheetColumns) {
1766
1771
  // If no columns exist, show message and return without exporting
1767
1772
  if (!aSheetColumns || !aSheetColumns.length) {
1768
1773
  sap.ui.require(["sap/m/MessageBox"], function(MessageBox) {
@@ -1774,95 +1779,39 @@ sap.ui.define([
1774
1779
  }
1775
1780
 
1776
1781
  var oRowBinding = that._getRowBinding();
1782
+ var fnGetColumnLabel = that._getColumnLabel.bind(that);
1777
1783
  var mExportSettings = {
1778
1784
  workbook: {
1779
1785
  columns: aSheetColumns,
1780
1786
  context: {
1781
- title: that.getHeader() || mCustomConfig.fileName
1787
+ title: that.getHeader()
1782
1788
  }
1783
1789
  },
1784
1790
  dataSource: oRowBinding,
1785
- fileType: mCustomConfig.selectedFileType,
1786
- fileName: mCustomConfig ? mCustomConfig.fileName : this.getHeader()
1791
+ fileName: that.getHeader()
1787
1792
  };
1788
1793
 
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
-
1805
1794
  that._loadExportLibrary().then(function() {
1806
- sap.ui.require(["sap/ui/export/ExportUtils"], function(ExportUtils) {
1807
- var oProcessor = Promise.resolve();
1808
-
1809
- if (mCustomConfig.includeFilterSettings) {
1810
- oProcessor = ExportUtils.parseFilterConfiguration(oRowBinding, function(sPropertyName) {
1811
- return oPropertyHelper.hasProperty(sPropertyName) ? oPropertyHelper.getProperty(sPropertyName).label : null;
1812
- }).then(function(oFilterConfig) {
1813
- if (oFilterConfig) {
1814
- var oContext = mExportSettings.workbook.context;
1815
-
1816
- oContext.metaSheetName = oFilterConfig.name;
1817
- oContext.metainfo = [oFilterConfig];
1818
- }
1819
- });
1820
- }
1821
-
1822
- oProcessor.then(function() {
1823
- var mUserSettings = {
1824
- splitCells: false,
1825
- includeFilterSettings: false
1826
- };
1827
-
1828
- if (mCustomConfig) {
1829
- mUserSettings.splitCells = mCustomConfig.splitCells;
1830
- mUserSettings.includeFilterSettings = mCustomConfig.includeFilterSettings;
1831
- }
1832
-
1833
- ExportUtils.getExportInstance(mExportSettings).then(function(oSheet){
1834
- oSheet.attachBeforeExport(function(oEvent) {
1835
- var oExportSettings = oEvent.getParameter("exportSettings");
1836
-
1837
- that.fireBeforeExport({
1838
- exportSettings: oExportSettings,
1839
- userExportSettings: mUserSettings
1840
- });
1841
- }, that);
1842
- oSheet.build().finally(function() {
1843
- oSheet.destroy();
1795
+ sap.ui.require(["sap/ui/export/ExportHandler"], function(ExportHandler) {
1796
+ var oHandler;
1797
+
1798
+ that.getControlDelegate().fetchExportCapabilities(that).then(function(oExportCapabilities) {
1799
+ if (!that._oExportHandler) {
1800
+ oHandler = new ExportHandler(oExportCapabilities);
1801
+
1802
+ oHandler.attachBeforeExport(function(oEvent) {
1803
+ that.fireBeforeExport({
1804
+ exportSettings: oEvent.getParameter('exportSettings'),
1805
+ userExportSettings: oEvent.getParameter('userExportSettings')
1806
+ });
1844
1807
  });
1845
- });
1846
- });
1847
- });
1848
- });
1849
- });
1850
- };
1851
-
1852
- /**
1853
- * Opens the export settings dialog for providing user specific export settings.
1854
- *
1855
- * @private
1856
- */
1857
- Table.prototype._onExportAs = function(mCustomConfig) {
1858
- var that = this;
1859
-
1860
- this._loadExportLibrary().then(function() {
1861
- sap.ui.require(['sap/ui/export/ExportUtils'], function(ExportUtils) {
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);
1808
+ that._oExportHandler = oHandler;
1809
+ }
1810
+ if (bExportAs) {
1811
+ that._oExportHandler.exportAs(mExportSettings, fnGetColumnLabel);
1812
+ } else {
1813
+ that._oExportHandler.export(mExportSettings, fnGetColumnLabel);
1814
+ }
1866
1815
  });
1867
1816
  });
1868
1817
  });
@@ -1895,7 +1844,7 @@ sap.ui.define([
1895
1844
 
1896
1845
  if ((oEvent.metaKey || oEvent.ctrlKey) && oEvent.shiftKey && oEvent.which === KeyCodes.E) {
1897
1846
  if (this.getEnableExport() && this._oExportButton && this._oExportButton.getEnabled()) {
1898
- this._onExportAs();
1847
+ this._onExport(true);
1899
1848
  oEvent.setMarked();
1900
1849
  oEvent.preventDefault();
1901
1850
  }
@@ -2078,10 +2027,6 @@ sap.ui.define([
2078
2027
  this._oItemContainer.initializeItems()
2079
2028
  ]).then(function() {
2080
2029
  if (this._oQuickActionContainer.hasQuickActions() || this._oItemContainer.hasItems()) {
2081
- if (this._oColumnHeaderMenu._oItemsContainer) {
2082
- this._oColumnHeaderMenu._oItemsContainer.destroy();
2083
- this._oColumnHeaderMenu._oItemsContainer = null;
2084
- }
2085
2030
  this._oColumnHeaderMenu.openBy(oColumn);
2086
2031
  }
2087
2032
  }.bind(this));
@@ -2296,6 +2241,10 @@ sap.ui.define([
2296
2241
  if (iIndex >= 0) {
2297
2242
  this._oTemplate.insertCell(oCellTemplate, iIndex);
2298
2243
  this._oTable.getItems().forEach(function(oItem) {
2244
+ // ignore group headers since it does not have "cells" aggregation
2245
+ if (oItem.isA("sap.m.GroupHeaderListItem")) {
2246
+ return;
2247
+ }
2299
2248
  // Add lightweight placeholders that can be rendered - if they cannot be rendered, there will be errors in the console.
2300
2249
  // The actual cells are created after rebind.
2301
2250
  oItem.insertAggregation("cells", new InvisibleText(), iIndex, true);
@@ -2793,6 +2742,11 @@ sap.ui.define([
2793
2742
  this._oFullInitialize = null;
2794
2743
  this._oPasteButton = null;
2795
2744
 
2745
+ if (this._oFilterInfoBarInvisibleText) {
2746
+ this._oFilterInfoBarInvisibleText.destroy();
2747
+ this._oFilterInfoBarInvisibleText = null;
2748
+ }
2749
+
2796
2750
  Control.prototype.exit.apply(this, arguments);
2797
2751
  };
2798
2752
 
@@ -206,32 +206,12 @@ sap.ui.define([
206
206
  /**
207
207
  * Returns the feature set for exporting data in the MDC Table.
208
208
  *
209
+ * @param {sap.ui.mdc.Table} oTable Instance of the MDC table
209
210
  * @returns {Promise} Export capabilities with specific features
210
211
  * @protected
211
212
  */
212
- TableDelegate.fetchExportCapabilities = function() {
213
- var oExportCapabilities = {
214
- "XLSX": {} // default
215
- };
216
-
217
- // This is a temporary approach for testing purposes
218
- if (new URL(window.location.href).search.indexOf("sap-ui-xx-enablePDFExport=true") > -1) {
219
- oExportCapabilities["PDF"] = {
220
- DocumentDescriptionReference: "../../../../default/iwbep/common/0001/$metadata",
221
- DocumentDescriptionCollection: "MyDocumentDescriptions",
222
- ArchiveFormat: true,
223
- Border: true,
224
- CoverPage: true,
225
- FitToPage: true,
226
- FontName: true,
227
- FontSize: true,
228
- Margin: true,
229
- Signature: true,
230
- ResultSizeDefault: 5000,
231
- ResultSizeMaximum: 20000
232
- };
233
- }
234
- return Promise.resolve(oExportCapabilities);
213
+ TableDelegate.fetchExportCapabilities = function(oTable) {
214
+ return Promise.resolve({ XLSX: {} });
235
215
  };
236
216
 
237
217
  TableDelegate.getSupportedP13nModes = function(oTable) {