@openui5/sap.ui.mdc 1.112.0 → 1.113.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 (178) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +4 -4
  3. package/src/sap/ui/mdc/.library +1 -1
  4. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  5. package/src/sap/ui/mdc/Chart.js +52 -14
  6. package/src/sap/ui/mdc/ChartDelegate.js +191 -103
  7. package/src/sap/ui/mdc/Control.js +1 -1
  8. package/src/sap/ui/mdc/Element.js +1 -1
  9. package/src/sap/ui/mdc/Field.js +41 -6
  10. package/src/sap/ui/mdc/FilterBar.js +1 -1
  11. package/src/sap/ui/mdc/FilterField.js +3 -3
  12. package/src/sap/ui/mdc/Link.js +5 -1
  13. package/src/sap/ui/mdc/MultiValueField.js +39 -3
  14. package/src/sap/ui/mdc/Table.js +164 -65
  15. package/src/sap/ui/mdc/TableDelegate.js +27 -15
  16. package/src/sap/ui/mdc/ValueHelp.js +9 -10
  17. package/src/sap/ui/mdc/ValueHelpDelegate.js +11 -6
  18. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  19. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +2 -2
  20. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -2
  21. package/src/sap/ui/mdc/chart/ChartToolbar.js +1 -1
  22. package/src/sap/ui/mdc/chart/ChartTypeButton.js +39 -49
  23. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +3 -3
  24. package/src/sap/ui/mdc/chart/DrillStackHandler.js +60 -69
  25. package/src/sap/ui/mdc/chart/PropertyHelper.js +7 -7
  26. package/src/sap/ui/mdc/condition/Condition.js +20 -14
  27. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  28. package/src/sap/ui/mdc/condition/ConditionModel.js +6 -149
  29. package/src/sap/ui/mdc/condition/ConditionModelPropertyBinding.js +5 -3
  30. package/src/sap/ui/mdc/condition/FilterConverter.js +2 -22
  31. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +20 -6
  32. package/src/sap/ui/mdc/condition/Operator.js +75 -39
  33. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +3 -2
  34. package/src/sap/ui/mdc/condition/RangeOperator.js +104 -104
  35. package/src/sap/ui/mdc/enum/ConditionValidated.js +4 -1
  36. package/src/sap/ui/mdc/enum/ContentMode.js +1 -1
  37. package/src/sap/ui/mdc/enum/EditMode.js +7 -7
  38. package/src/sap/ui/mdc/enum/FieldDisplay.js +3 -3
  39. package/src/sap/ui/mdc/enum/OperatorOverwrite.js +34 -0
  40. package/src/sap/ui/mdc/field/ConditionType.js +4 -4
  41. package/src/sap/ui/mdc/field/ConditionsType.js +5 -5
  42. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  43. package/src/sap/ui/mdc/field/DefineConditionPanel.js +10 -24
  44. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +22 -10
  45. package/src/sap/ui/mdc/field/FieldBase.js +41 -16
  46. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +7 -15
  47. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  48. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  49. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  50. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  51. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +2 -2
  52. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  53. package/src/sap/ui/mdc/field/TokenDisplay.js +2 -2
  54. package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -2
  55. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +4 -9
  56. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  57. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +5 -12
  58. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +1 -1
  59. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  60. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +16 -10
  61. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +0 -21
  62. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  63. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +0 -18
  64. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +0 -15
  65. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  66. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  67. package/src/sap/ui/mdc/flexibility/GroupFlex.js +2 -22
  68. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
  69. package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -21
  70. package/src/sap/ui/mdc/flexibility/Util.js +9 -7
  71. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +1 -1
  72. package/src/sap/ui/mdc/library.js +13 -2
  73. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  74. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  75. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  76. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  77. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  78. package/src/sap/ui/mdc/link/Factory.js +1 -1
  79. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  80. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  81. package/src/sap/ui/mdc/link/Panel.js +1 -1
  82. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  83. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  84. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  85. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  86. package/src/sap/ui/mdc/messagebundle.properties +8 -2
  87. package/src/sap/ui/mdc/messagebundle_ar.properties +18 -15
  88. package/src/sap/ui/mdc/messagebundle_bg.properties +4 -1
  89. package/src/sap/ui/mdc/messagebundle_ca.properties +3 -0
  90. package/src/sap/ui/mdc/messagebundle_cs.properties +3 -0
  91. package/src/sap/ui/mdc/messagebundle_cy.properties +3 -0
  92. package/src/sap/ui/mdc/messagebundle_da.properties +4 -1
  93. package/src/sap/ui/mdc/messagebundle_de.properties +5 -2
  94. package/src/sap/ui/mdc/messagebundle_el.properties +3 -0
  95. package/src/sap/ui/mdc/messagebundle_en.properties +3 -0
  96. package/src/sap/ui/mdc/messagebundle_en_GB.properties +3 -0
  97. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +4 -1
  98. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +4 -1
  99. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +4 -1
  100. package/src/sap/ui/mdc/messagebundle_es.properties +3 -0
  101. package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -0
  102. package/src/sap/ui/mdc/messagebundle_et.properties +3 -0
  103. package/src/sap/ui/mdc/messagebundle_fi.properties +3 -0
  104. package/src/sap/ui/mdc/messagebundle_fr.properties +3 -0
  105. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +3 -0
  106. package/src/sap/ui/mdc/messagebundle_hi.properties +3 -0
  107. package/src/sap/ui/mdc/messagebundle_hr.properties +3 -0
  108. package/src/sap/ui/mdc/messagebundle_hu.properties +3 -0
  109. package/src/sap/ui/mdc/messagebundle_id.properties +3 -0
  110. package/src/sap/ui/mdc/messagebundle_it.properties +3 -0
  111. package/src/sap/ui/mdc/messagebundle_iw.properties +3 -0
  112. package/src/sap/ui/mdc/messagebundle_ja.properties +3 -0
  113. package/src/sap/ui/mdc/messagebundle_kk.properties +3 -0
  114. package/src/sap/ui/mdc/messagebundle_ko.properties +3 -0
  115. package/src/sap/ui/mdc/messagebundle_lt.properties +3 -0
  116. package/src/sap/ui/mdc/messagebundle_lv.properties +3 -0
  117. package/src/sap/ui/mdc/messagebundle_ms.properties +3 -0
  118. package/src/sap/ui/mdc/messagebundle_nl.properties +3 -0
  119. package/src/sap/ui/mdc/messagebundle_no.properties +4 -1
  120. package/src/sap/ui/mdc/messagebundle_pl.properties +3 -0
  121. package/src/sap/ui/mdc/messagebundle_pt.properties +3 -0
  122. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +3 -0
  123. package/src/sap/ui/mdc/messagebundle_ro.properties +3 -0
  124. package/src/sap/ui/mdc/messagebundle_ru.properties +3 -0
  125. package/src/sap/ui/mdc/messagebundle_sh.properties +3 -0
  126. package/src/sap/ui/mdc/messagebundle_sk.properties +3 -0
  127. package/src/sap/ui/mdc/messagebundle_sl.properties +3 -0
  128. package/src/sap/ui/mdc/messagebundle_sv.properties +3 -0
  129. package/src/sap/ui/mdc/messagebundle_th.properties +3 -0
  130. package/src/sap/ui/mdc/messagebundle_tr.properties +3 -0
  131. package/src/sap/ui/mdc/messagebundle_uk.properties +5 -2
  132. package/src/sap/ui/mdc/messagebundle_vi.properties +3 -0
  133. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +3 -0
  134. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +3 -0
  135. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  136. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  137. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  138. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  139. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  140. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +32 -0
  141. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +20 -23
  142. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  143. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  144. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +4 -0
  145. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +12 -24
  146. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +1 -1
  147. package/src/sap/ui/mdc/table/Column.js +0 -8
  148. package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
  149. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  150. package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
  151. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
  152. package/src/sap/ui/mdc/table/ResponsiveTableType.js +22 -9
  153. package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
  154. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  155. package/src/sap/ui/mdc/table/TableSettings.js +15 -113
  156. package/src/sap/ui/mdc/table/TableTypeBase.js +8 -0
  157. package/src/sap/ui/mdc/table/TreeTableType.js +1 -1
  158. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  159. package/src/sap/ui/mdc/table/menu/Item.js +1 -1
  160. package/src/sap/ui/mdc/table/menu/ItemContainer.js +4 -0
  161. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +12 -7
  162. package/src/sap/ui/mdc/table/utils/Personalization.js +236 -0
  163. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +3 -3
  164. package/src/sap/ui/mdc/util/InfoBar.js +2 -2
  165. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  166. package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
  167. package/src/sap/ui/mdc/valuehelp/Dialog.js +5 -4
  168. package/src/sap/ui/mdc/valuehelp/Popover.js +3 -2
  169. package/src/sap/ui/mdc/valuehelp/base/Container.js +20 -2
  170. package/src/sap/ui/mdc/valuehelp/base/Content.js +5 -2
  171. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  172. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +12 -36
  173. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +5 -2
  174. package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
  175. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +3 -2
  176. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +3 -2
  177. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +3 -2
  178. package/src/sap/ui/mdc/valuehelp/content/MTable.js +8 -7
@@ -7,7 +7,6 @@ sap.ui.define([
7
7
  'sap/ui/mdc/field/FieldBase',
8
8
  'sap/ui/mdc/field/FieldBaseRenderer',
9
9
  'sap/ui/mdc/enum/FieldDisplay',
10
- 'sap/ui/mdc/condition/FilterOperatorUtil',
11
10
  'sap/ui/mdc/enum/BaseType',
12
11
  'sap/base/util/deepEqual',
13
12
  'sap/base/util/merge',
@@ -18,7 +17,6 @@ sap.ui.define([
18
17
  FieldBase,
19
18
  FieldBaseRenderer,
20
19
  FieldDisplay,
21
- FilterOperatorUtil,
22
20
  BaseType,
23
21
  deepEqual,
24
22
  merge,
@@ -42,12 +40,12 @@ sap.ui.define([
42
40
  * @implements sap.ui.core.IFormContent
43
41
  *
44
42
  * @author SAP SE
45
- * @version 1.112.0
43
+ * @version 1.113.0
46
44
  *
47
45
  * @constructor
48
46
  * @alias sap.ui.mdc.Field
49
47
  * @author SAP SE
50
- * @version 1.112.0
48
+ * @version 1.113.0
51
49
  * @since 1.54.0
52
50
  * @experimental As of version 1.54
53
51
  *
@@ -68,7 +66,8 @@ sap.ui.define([
68
66
  */
69
67
  value: {
70
68
  type: "any",
71
- defaultValue: null
69
+ defaultValue: null,
70
+ bindable: "bindable"
72
71
  },
73
72
 
74
73
  /**
@@ -79,7 +78,8 @@ sap.ui.define([
79
78
  */
80
79
  additionalValue: {
81
80
  type: "any",
82
- defaultValue: null
81
+ defaultValue: null,
82
+ bindable: "bindable"
83
83
  }
84
84
  },
85
85
  events: {
@@ -595,6 +595,41 @@ sap.ui.define([
595
595
  * @function
596
596
  */
597
597
 
598
+ /**
599
+ * Binds property <code>conditions</code> to model data.
600
+ *
601
+ * See {@link sap.ui.base.ManagedObject#bindProperty ManagedObject.bindProperty} for a detailed description of the possible properties of oBindingInfo
602
+ *
603
+ * Do not use the <code>conditions</code> property,
604
+ * use the <code>value</code> and <code>additionalValue</code> properties instead.
605
+ *
606
+ * @param {sap.ui.base.ManagedObject.PropertyBindingInfo} oBindingInfo The binding information
607
+ * @returns {this} Reference to <code>this</code> to allow method chaining
608
+ * @private
609
+ * @ui5-restricted sap.fe
610
+ * @MDC_PUBLIC_CANDIDATE
611
+ * @deprecated Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
612
+ * @ui5-not-supported
613
+ * @name sap.ui.mdc.Field#bindConditions
614
+ * @function
615
+ */
616
+
617
+ /**
618
+ * Unbinds property <code>conditions</code> from model data.
619
+ *
620
+ * Do not use the <code>conditions</code> property,
621
+ * use the <code>value</code> and <code>additionalValue</code> properties instead.
622
+ *
623
+ * @returns {this} Reference to <code>this</code> to allow method chaining
624
+ * @private
625
+ * @ui5-restricted sap.fe
626
+ * @MDC_PUBLIC_CANDIDATE
627
+ * @deprecated Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
628
+ * @ui5-not-supported
629
+ * @name sap.ui.mdc.Field#unbindConditions
630
+ * @function
631
+ */
632
+
598
633
  /**
599
634
  * Sets a new value for property <code>dataType</code>.
600
635
  *
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * The metadata information is provided via the {@link sap.ui.mdc.FilterBarDelegate FilterBarDelegate} implementation. This implementation has to be provided by the application.
22
22
  * @extends sap.ui.mdc.filterbar.FilterBarBase
23
23
  * @author SAP SE
24
- * @version 1.112.0
24
+ * @version 1.113.0
25
25
  * @constructor
26
26
  * @experimental As of version 1.61
27
27
  * @private
@@ -33,12 +33,12 @@ sap.ui.define([
33
33
  * @extends sap.ui.mdc.field.FieldBase
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.112.0
36
+ * @version 1.113.0
37
37
  *
38
38
  * @constructor
39
39
  * @alias sap.ui.mdc.FilterField
40
40
  * @author SAP SE
41
- * @version 1.112.0
41
+ * @version 1.113.0
42
42
  * @since 1.48.0
43
43
  *
44
44
  * @experimental As of version 1.48
@@ -219,7 +219,7 @@ sap.ui.define([
219
219
  /**
220
220
  * Adds an operator to the list of known operators.
221
221
  *
222
- * <b>Note</b>: If no operator is set, the used type of the <code>FilterField</code> defines the set of default operators.
222
+ * <b>Note</b>: If no operator is set, the used <code>datatType</code> of the <code>FilterField</code> defines the set of default operators.
223
223
  *
224
224
  * @param {sap.ui.mdc.condition.Operator|string} vOperator The operator instance or operator name
225
225
  * @returns {this} Reference to <code>this</code> to allow method chaining
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @extends sap.ui.mdc.field.FieldInfoBase
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.112.0
48
+ * @version 1.113.0
49
49
  *
50
50
  * @constructor
51
51
  * @alias sap.ui.mdc.Link
@@ -177,6 +177,10 @@ sap.ui.define([
177
177
  */
178
178
  Link.prototype.getDirectLinkHrefAndTarget = function() {
179
179
  return this._retrieveDirectLinkItem().then(function(oDirectLinkItem) {
180
+ if (this.isDestroyed()) {
181
+ return null;
182
+ }
183
+
180
184
  this.addDependent(oDirectLinkItem);
181
185
  return oDirectLinkItem ? {
182
186
  target: oDirectLinkItem.getTarget(),
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @constructor
36
36
  * @alias sap.ui.mdc.MultiValueField
37
37
  * @author SAP SE
38
- * @version 1.112.0
38
+ * @version 1.113.0
39
39
  * @since 1.93.0
40
40
  *
41
41
  * @private
@@ -70,7 +70,8 @@ sap.ui.define([
70
70
  items: {
71
71
  type: "sap.ui.mdc.field.MultiValueFieldItem",
72
72
  multiple: true,
73
- singularName : "item"
73
+ singularName : "item",
74
+ bindable: "bindable"
74
75
  }
75
76
  },
76
77
  defaultAggregation: "items",
@@ -86,7 +87,7 @@ sap.ui.define([
86
87
  /**
87
88
  * The new items of the <code>MultiValueField</code> control.
88
89
  *
89
- * If a <code>FieldHelp</code> element is assigned to the <code>MultiValueField</code> control, the <code>key</code> of the items is used as key for the <code>FieldHelp</code> items.
90
+ * If a <code>ValueHelp</code> element is assigned to the <code>MultiValueField</code> control, the <code>key</code> of the items is used as key for the <code>FieldHelp</code> items.
90
91
  */
91
92
  items: { type: "sap.ui.mdc.field.MultiValueFieldItem[]" },
92
93
 
@@ -361,6 +362,41 @@ sap.ui.define([
361
362
  * @function
362
363
  */
363
364
 
365
+ /**
366
+ * Binds property <code>conditions</code> to model data.
367
+ *
368
+ * See {@link sap.ui.base.ManagedObject#bindProperty ManagedObject.bindProperty} for a detailed description of the possible properties of oBindingInfo
369
+ *
370
+ * Do not use the <code>conditions</code> property,
371
+ * use the <code>value</code> and <code>additionalValue</code> properties instead.
372
+ *
373
+ * @param {sap.ui.base.ManagedObject.PropertyBindingInfo} oBindingInfo The binding information
374
+ * @returns {this} Reference to <code>this</code> to allow method chaining
375
+ * @private
376
+ * @ui5-restricted sap.fe
377
+ * @MDC_PUBLIC_CANDIDATE
378
+ * @deprecated Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
379
+ * @ui5-not-supported
380
+ * @name sap.ui.mdc.MultiValueField#bindConditions
381
+ * @function
382
+ */
383
+
384
+ /**
385
+ * Unbinds property <code>conditions</code> from model data.
386
+ *
387
+ * Do not use the <code>conditions</code> property,
388
+ * use the <code>value</code> and <code>additionalValue</code> properties instead.
389
+ *
390
+ * @returns {this} Reference to <code>this</code> to allow method chaining
391
+ * @private
392
+ * @ui5-restricted sap.fe
393
+ * @MDC_PUBLIC_CANDIDATE
394
+ * @deprecated Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
395
+ * @ui5-not-supported
396
+ * @name sap.ui.mdc.MultiValueField#unbindConditions
397
+ * @function
398
+ */
399
+
364
400
  /**
365
401
  * The type of data handled by the field. The type is used to parse, format, and validate the value.
366
402
  *
@@ -12,9 +12,12 @@ sap.ui.define([
12
12
  "./table/TreeTableType",
13
13
  "./table/ResponsiveTableType",
14
14
  "./table/PropertyHelper",
15
+ "./table/utils/Personalization",
15
16
  "./mixin/FilterIntegrationMixin",
16
17
  "./library",
17
18
  "sap/m/Text",
19
+ "sap/m/ToolbarSpacer",
20
+ "sap/m/Button",
18
21
  "sap/m/Title",
19
22
  "sap/m/OverflowToolbar",
20
23
  "sap/m/library",
@@ -42,6 +45,7 @@ sap.ui.define([
42
45
  "sap/ui/mdc/actiontoolbar/ActionToolbarAction",
43
46
  "sap/ui/mdc/table/menu/QuickActionContainer",
44
47
  "sap/ui/mdc/table/menu/ItemContainer",
48
+ "sap/ui/mdc/enum/ProcessingStrategy",
45
49
  "sap/ui/core/theming/Parameters",
46
50
  "sap/base/Log"
47
51
  ], function(
@@ -52,9 +56,12 @@ sap.ui.define([
52
56
  TreeTableType,
53
57
  ResponsiveTableType,
54
58
  PropertyHelper,
59
+ PersonalizationUtils,
55
60
  FilterIntegrationMixin,
56
61
  library,
57
62
  Text,
63
+ ToolbarSpacer,
64
+ Button,
58
65
  Title,
59
66
  OverflowToolbar,
60
67
  MLibrary,
@@ -82,6 +89,7 @@ sap.ui.define([
82
89
  ActionToolbarAction,
83
90
  QuickActionContainer,
84
91
  ItemContainer,
92
+ ProcessingStrategy,
85
93
  ThemeParameters,
86
94
  Log
87
95
  ) {
@@ -629,7 +637,6 @@ sap.ui.define([
629
637
  Control.apply(this, arguments);
630
638
  this.bCreated = true;
631
639
  this._updateAdaptation();
632
- this._doOneTimeOperations();
633
640
  this._initializeContent();
634
641
  },
635
642
  renderer: {
@@ -773,7 +780,7 @@ sap.ui.define([
773
780
  oDataStateIndicator[sAction + "ApplyFilter"](this._onApplyMessageFilter, this);
774
781
  oDataStateIndicator[sAction + "ClearFilter"](this._onClearMessageFilter, this);
775
782
  oDataStateIndicator[sAction + "Event"]("filterInfoPress", function() {
776
- showFilterDialog(this);
783
+ PersonalizationUtils.openFilterDialog(this);
777
784
  }, this);
778
785
  }
779
786
  };
@@ -998,7 +1005,28 @@ sap.ui.define([
998
1005
  return this;
999
1006
  };
1000
1007
 
1001
- Table.prototype._onModifications = function() {
1008
+ var fCheckIfRebindIsRequired = function(aAffectedP13nControllers) {
1009
+ var bRebindRequired = false;
1010
+ if (
1011
+ aAffectedP13nControllers && (
1012
+ aAffectedP13nControllers.indexOf("Sort") > -1 ||
1013
+ aAffectedP13nControllers.indexOf("Column") > -1 ||
1014
+ aAffectedP13nControllers.indexOf("Group") > -1 ||
1015
+ aAffectedP13nControllers.indexOf("Aggregate") > -1 ||
1016
+ aAffectedP13nControllers.indexOf("Filter") > -1
1017
+ )
1018
+ ) {
1019
+ bRebindRequired = true;
1020
+ }
1021
+
1022
+ return bRebindRequired;
1023
+ };
1024
+
1025
+ Table.prototype._onModifications = function(aAffectedP13nControllers) {
1026
+ if (fCheckIfRebindIsRequired(aAffectedP13nControllers) && this.isTableBound()) {
1027
+ this.rebind();
1028
+ }
1029
+
1002
1030
  if (!this.isPropertyHelperFinal()) {
1003
1031
  this._bFinalzingPropertiesOnModification = true;
1004
1032
  this.finalizePropertyHelper().then(function() {
@@ -1183,6 +1211,7 @@ sap.ui.define([
1183
1211
  function createFilterInfoBar(oTable) {
1184
1212
  var sToolbarId = oTable.getId() + "-filterInfoBar";
1185
1213
  var oFilterInfoToolbar = internal(oTable).oFilterInfoBar;
1214
+ var oRb = Core.getLibraryResourceBundle("sap.ui.mdc");
1186
1215
 
1187
1216
  if (oFilterInfoToolbar && !oFilterInfoToolbar.bIsDestroyed) {
1188
1217
  oFilterInfoToolbar.destroy();
@@ -1197,18 +1226,30 @@ sap.ui.define([
1197
1226
  new Text({
1198
1227
  id: sToolbarId + "-text",
1199
1228
  wrapping: false
1229
+ }),
1230
+ new ToolbarSpacer(),
1231
+ new Button({
1232
+ type: MLibrary.ButtonType.Transparent,
1233
+ tooltip: oRb.getText("infobar.REMOVEALLFILTERS"),
1234
+ icon: "sap-icon://decline",
1235
+ press: function () {
1236
+ // Clear all filters. Makes current variant dirty.
1237
+ PersonalizationUtils.createFilterChange(oTable, {
1238
+ conditions: [],
1239
+ strategy: ProcessingStrategy.FullReplace
1240
+ });
1241
+ oTable.focus();
1242
+ }
1200
1243
  })
1201
1244
  ],
1202
1245
  press: function() {
1203
- showFilterDialog(oTable).then(function(oP13nDialog) {
1246
+ PersonalizationUtils.openFilterDialog(oTable, function() {
1204
1247
  // Because the filter info bar was pressed, it must have had the focus when opening the dialog. When removing all filters in
1205
1248
  // the dialog and confirming, the filter info bar will be hidden, and the dialog tries to restore the focus on the hidden filter
1206
1249
  // info bar. To avoid a focus loss, the table gets the focus.
1207
- oP13nDialog.attachEventOnce("afterClose", function() {
1208
- if (getInternallyFilteredProperties(oTable).length === 0) {
1209
- oTable.focus();
1210
- }
1211
- });
1250
+ if (getInternallyFilteredProperties(oTable).length === 0) {
1251
+ oTable.focus();
1252
+ }
1212
1253
  });
1213
1254
  }
1214
1255
  });
@@ -1281,8 +1322,9 @@ sap.ui.define([
1281
1322
 
1282
1323
  var oNoColumnsMessage = this._oTable.getAggregation("_noColumnsMessage");
1283
1324
  if (!oNoColumnsMessage) {
1284
- var fnOpenColumnsPanel = TableSettings.showPanel.bind(TableSettings, this, "Columns");
1285
- oNoColumnsMessage = MTableUtil.getNoColumnsIllustratedMessage(fnOpenColumnsPanel);
1325
+ oNoColumnsMessage = MTableUtil.getNoColumnsIllustratedMessage(function() {
1326
+ PersonalizationUtils.openSettingsDialog(this);
1327
+ }.bind(this));
1286
1328
  oNoColumnsMessage.setEnableVerticalResponsiveness(!this._isOfType(TableType.ResponsiveTable));
1287
1329
  this._oTable.setAggregation("_noColumnsMessage", oNoColumnsMessage);
1288
1330
  }
@@ -1417,14 +1459,6 @@ sap.ui.define([
1417
1459
  }.bind(this));
1418
1460
  };
1419
1461
 
1420
- Table.prototype._doOneTimeOperations = function() {
1421
- // Order the Columns once after init
1422
- if (!this.bColumnsOrdered) {
1423
- this.bColumnsOrdered = true;
1424
- this._orderColumns();
1425
- }
1426
- };
1427
-
1428
1462
  Table.prototype._onAfterTableCreated = function(bResult) {
1429
1463
  if (this._oTableReady) {
1430
1464
  this._oTableReady[bResult ? "resolve" : "reject"](this);
@@ -1442,6 +1476,8 @@ sap.ui.define([
1442
1476
  this._createTable();
1443
1477
  this._updateColumnResize();
1444
1478
  this._updateRowActions();
1479
+ this._updateExpandAllButton();
1480
+ this._updateCollapseAllButton();
1445
1481
  this._updateExportButton();
1446
1482
  this.getColumns().forEach(this._insertInnerColumn, this);
1447
1483
  this.setAggregation("_content", this._oTable);
@@ -1463,14 +1499,15 @@ sap.ui.define([
1463
1499
 
1464
1500
  if (this.getAutoBindOnInit()) {
1465
1501
  var oEngine = this.getEngine();
1466
-
1467
- if (oEngine.isModificationSupported(this)) {
1468
- oEngine.waitForChanges(this).then(function() {
1502
+ oEngine.isModificationSupported(this).then(function(bModificationSupported) {
1503
+ if (bModificationSupported) {
1504
+ oEngine.waitForChanges(this).then(function() {
1505
+ this.rebind();
1506
+ }.bind(this));
1507
+ } else {
1469
1508
  this.rebind();
1470
- }.bind(this));
1471
- } else {
1472
- this.rebind();
1473
- }
1509
+ }
1510
+ }.bind(this));
1474
1511
  }
1475
1512
 
1476
1513
  this._bFullyInitialized = true;
@@ -1552,6 +1589,10 @@ sap.ui.define([
1552
1589
  this._updateP13nButton();
1553
1590
  };
1554
1591
 
1592
+ Table.prototype._isP13nButtonHidden = function () {
1593
+ return this._bHideP13nButton;
1594
+ };
1595
+
1555
1596
  Table.prototype._createToolbar = function() {
1556
1597
  if (this.isDestroyStarted() || this.isDestroyed()) {
1557
1598
  return;
@@ -1766,7 +1807,9 @@ sap.ui.define([
1766
1807
 
1767
1808
  Table.prototype._getP13nButton = function() {
1768
1809
  if (!this._oP13nButton) {
1769
- this._oP13nButton = TableSettings.createSettingsButton(this.getId(), [onShowSettingsDialog, this]);
1810
+ this._oP13nButton = TableSettings.createSettingsButton(this.getId(), [function() {
1811
+ PersonalizationUtils.openSettingsDialog(this);
1812
+ }, this]);
1770
1813
  }
1771
1814
  this._updateP13nButton();
1772
1815
  return this._oP13nButton;
@@ -1792,7 +1835,9 @@ sap.ui.define([
1792
1835
  };
1793
1836
 
1794
1837
  Table.prototype._isExportEnabled = function() {
1795
- return this.getEnableExport() && this.bDelegateInitialized && this.getControlDelegate().isExportSupported(this);
1838
+ return this.getEnableExport()
1839
+ && this.bDelegateInitialized
1840
+ && this.getControlDelegate().getSupportedFeatures(this)["export"];
1796
1841
  };
1797
1842
 
1798
1843
  Table.prototype._updateExportButton = function() {
@@ -1859,6 +1904,72 @@ sap.ui.define([
1859
1904
  }.bind(this));
1860
1905
  };
1861
1906
 
1907
+ Table.prototype._isCollapseAllEnabled = function() {
1908
+ return this.bDelegateInitialized && this.getControlDelegate().getSupportedFeatures(this)["collapseAll"];
1909
+ };
1910
+
1911
+ /**
1912
+ * Retrieves the "Collapse All" button. Creates the button if necessary.
1913
+ *
1914
+ * @returns {sap.m.MenuButton} button for "Expand All"
1915
+ * @private
1916
+ */
1917
+ Table.prototype._updateCollapseAllButton = function() {
1918
+ var bNeedCollapseAllButton = this._oToolbar != null && this._isCollapseAllEnabled();
1919
+
1920
+ if (bNeedCollapseAllButton && !this._oCollapseAllButton) {
1921
+ this._oCollapseAllButton = TableSettings.createExpandCollapseAllButton(this.getId(), [
1922
+ function() {
1923
+ this.getControlDelegate().collapseAll(this, this.getRowBinding());
1924
+ }, this
1925
+ ], false);
1926
+ }
1927
+
1928
+ if (!this._oCollapseAllButton) {
1929
+ return;
1930
+ }
1931
+
1932
+ if (this._oToolbar && !this._oToolbar.getEnd().includes(this._oCollapseAllButton)) {
1933
+ this._oToolbar.insertEnd(this._oCollapseAllButton, 0);
1934
+ }
1935
+
1936
+ this._oCollapseAllButton.setEnabled(this._getRowCount(false) > 0);
1937
+ this._oCollapseAllButton.setVisible(this._isCollapseAllEnabled());
1938
+ };
1939
+
1940
+ Table.prototype._isExpandAllEnabled = function() {
1941
+ return this.bDelegateInitialized && this.getControlDelegate().getSupportedFeatures(this)["expandAll"];
1942
+ };
1943
+
1944
+ /**
1945
+ * Retrieves the "Collapse All" button. Creates the button if necessary.
1946
+ *
1947
+ * @returns {sap.m.MenuButton} button for "Expand All"
1948
+ * @private
1949
+ */
1950
+ Table.prototype._updateExpandAllButton = function() {
1951
+ var bNeedExpandAllButton = this._oToolbar != null && this._isExpandAllEnabled();
1952
+
1953
+ if (bNeedExpandAllButton && !this._oExpandAllButton) {
1954
+ this._oExpandAllButton = TableSettings.createExpandCollapseAllButton(this.getId(), [
1955
+ function() {
1956
+ this.getControlDelegate().expandAll(this, this.getRowBinding());
1957
+ }, this
1958
+ ], true);
1959
+ }
1960
+
1961
+ if (!this._oExpandAllButton) {
1962
+ return;
1963
+ }
1964
+
1965
+ if (this._oToolbar && !this._oToolbar.getEnd().includes(this._oExpandAllButton)) {
1966
+ this._oToolbar.insertEnd(this._oExpandAllButton, 0);
1967
+ }
1968
+
1969
+ this._oExpandAllButton.setEnabled(this._getRowCount(false) > 0);
1970
+ this._oExpandAllButton.setVisible(this._isExpandAllEnabled());
1971
+ };
1972
+
1862
1973
  /**
1863
1974
  * Returns the label/header text of the column
1864
1975
  * @param {string} sPath column key
@@ -2046,7 +2157,7 @@ sap.ui.define([
2046
2157
  _quickActions: [this._oQuickActionContainer],
2047
2158
  _items: [this._oItemContainer]
2048
2159
  });
2049
-
2160
+ this.addDependent(this._oColumnHeaderMenu);
2050
2161
  this._oColumnHeaderMenu.attachBeforeOpen(this._createColumnMenuContent, this);
2051
2162
  }
2052
2163
  };
@@ -2069,6 +2180,7 @@ sap.ui.define([
2069
2180
  ]).then(function() {
2070
2181
  if (this._oQuickActionContainer.hasQuickActions() || this._oItemContainer.hasItems()) {
2071
2182
  this._oColumnHeaderMenu.openBy(oInnerColumn, true);
2183
+ PersonalizationUtils.detectUserPersonalizationCompletion(this, this._oColumnHeaderMenu);
2072
2184
  }
2073
2185
  }.bind(this));
2074
2186
  }.bind(this));
@@ -2090,7 +2202,10 @@ sap.ui.define([
2090
2202
  };
2091
2203
 
2092
2204
  Table.prototype._onColumnMove = function(mPropertyBag) {
2093
- TableSettings.moveColumn(this, mPropertyBag.column, mPropertyBag.newIndex);
2205
+ PersonalizationUtils.createColumnReorderChange(this, {
2206
+ column: mPropertyBag.column,
2207
+ index: mPropertyBag.newIndex
2208
+ });
2094
2209
  };
2095
2210
 
2096
2211
  Table.prototype._onCustomSort = function(oEvent, sSortOrder) {
@@ -2104,7 +2219,10 @@ sap.ui.define([
2104
2219
  }
2105
2220
  });
2106
2221
 
2107
- TableSettings.createSort(this, sSortProperty, sSortOrder, true);
2222
+ PersonalizationUtils.createSortChange(this, {
2223
+ property: sSortProperty,
2224
+ sortOrder: sSortOrder
2225
+ });
2108
2226
  };
2109
2227
 
2110
2228
  Table.prototype._onRowPress = function(mPropertyBag) {
@@ -2126,15 +2244,22 @@ sap.ui.define([
2126
2244
  };
2127
2245
 
2128
2246
  Table.prototype._onColumnResize = function(mPropertyBag) {
2129
- TableSettings.createColumnWidth(this, mPropertyBag.column.getDataProperty(), mPropertyBag.width);
2247
+ PersonalizationUtils.createColumnWidthChange(this, {
2248
+ column: mPropertyBag.column,
2249
+ width: mPropertyBag.width
2250
+ });
2130
2251
  };
2131
2252
 
2132
- Table.prototype._onCustomGroup = function (sSortProperty) {
2133
- TableSettings.createGroup(this, sSortProperty);
2253
+ Table.prototype._onCustomGroup = function(sProperty) {
2254
+ PersonalizationUtils.createGroupChange(this, {
2255
+ property: sProperty
2256
+ });
2134
2257
  };
2135
2258
 
2136
- Table.prototype._onCustomAggregate = function (sSortProperty) {
2137
- TableSettings.createAggregation(this, sSortProperty);
2259
+ Table.prototype._onCustomAggregate = function (sProperty) {
2260
+ PersonalizationUtils.createAggregateChange(this, {
2261
+ property: sProperty
2262
+ });
2138
2263
  };
2139
2264
 
2140
2265
  Table.prototype._insertInnerColumn = function(oColumn, iIndex) {
@@ -2152,27 +2277,7 @@ sap.ui.define([
2152
2277
  } else {
2153
2278
  this._oTable.insertColumn(oInnerColumn, iIndex);
2154
2279
  }
2155
- };
2156
-
2157
- Table.prototype._orderColumns = function() {
2158
- var iInitialIndex, aColumnInfos = [], aMDCColumns = this.getColumns();
2159
- aMDCColumns.forEach(function(oColumn) {
2160
- iInitialIndex = oColumn.getInitialIndex();
2161
- if (iInitialIndex > -1) {
2162
- aColumnInfos.push({
2163
- index: iInitialIndex,
2164
- column: this.removeColumn(oColumn)
2165
- });
2166
- }
2167
- }, this);
2168
-
2169
- aColumnInfos.sort(function(oColInfo1, oColInfo2) {
2170
- return oColInfo1 - oColInfo2;
2171
- });
2172
-
2173
- aColumnInfos.forEach(function(oColumnInfo) {
2174
- this.insertColumn(oColumnInfo.column, oColumnInfo.index);
2175
- }, this);
2280
+ this._getType()._onColumnInsert(oColumn);
2176
2281
  };
2177
2282
 
2178
2283
  /**
@@ -2388,6 +2493,8 @@ sap.ui.define([
2388
2493
  * @private
2389
2494
  */
2390
2495
  Table.prototype._onBindingChange = function() {
2496
+ this._updateExpandAllButton();
2497
+ this._updateCollapseAllButton();
2391
2498
  this._updateExportButton();
2392
2499
 
2393
2500
  /* skip calling of _updateHeaderText till data is received otherwise _announceTableUpdate
@@ -2571,14 +2678,6 @@ sap.ui.define([
2571
2678
  }
2572
2679
  };
2573
2680
 
2574
- function onShowSettingsDialog(oEvent) {
2575
- TableSettings.showPanel(this, "Columns");
2576
- }
2577
-
2578
- function showFilterDialog(oTable) {
2579
- return TableSettings.showPanel(oTable, "Filter");
2580
- }
2581
-
2582
2681
  // TODO: move to a base util that can be used by most aggregations
2583
2682
  Table.prototype._getSorters = function() {
2584
2683
  var aSorterProperties = this.getSortConditions() ? this.getSortConditions().sorters : [];
@@ -13,15 +13,13 @@ sap.ui.define([
13
13
  "./library",
14
14
  "sap/ui/model/Sorter",
15
15
  "sap/ui/core/library",
16
- "sap/ui/core/Core",
17
- "sap/base/util/UriParameters"
16
+ "sap/ui/core/Core"
18
17
  ], function(
19
18
  AggregationBaseDelegate,
20
19
  library,
21
20
  Sorter,
22
21
  coreLibrary,
23
- Core,
24
- UriParameters
22
+ Core
25
23
  ) {
26
24
  "use strict";
27
25
 
@@ -238,25 +236,39 @@ sap.ui.define([
238
236
  };
239
237
 
240
238
  /**
241
- * Checks whether data export is supported by the combination of this delegate and the current table state (e.g. type).
239
+ * Expands all nodes.
242
240
  *
243
- * @param {sap.ui.mdc.Table} oTable Instance of the MDC table.
244
- * @returns {boolean} Whether data export is supported.
245
- * @private
241
+ * @param {sap.ui.mdc.Table} oTable Instance of the MDC table
242
+ * @protected
246
243
  */
247
- TableDelegate.isExportSupported = function(oTable) {
248
- return !oTable._isOfType(TableType.TreeTable) || UriParameters.fromURL(window.location.href).has("sap-ui-xx-mdc-tree-export");
244
+ TableDelegate.expandAll = function (oTable) {
245
+ throw Error("Unsupported operation: TableDelegate does not support #expandAll");
249
246
  };
250
247
 
251
248
  /**
252
- * Checks whether selection is supported by the combination of this delegate and the current table state (e.g. type).
249
+ * Collapses all nodes.
253
250
  *
254
- * @param {sap.ui.mdc.Table} oTable Instance of the MDC table.
255
- * @returns {boolean} Whether selection is supported.
251
+ * @param {sap.ui.mdc.Table} oTable Instance of the MDC table
252
+ * @protected
253
+ */
254
+ TableDelegate.collapseAll = function (oTable) {
255
+ throw Error("Unsupported operation: TableDelegate does not support #collapseAll");
256
+ };
257
+
258
+ /**
259
+ * Gets the features that are supported by the combination of this delegate and the current table state (e.g. type).
260
+ *
261
+ * @param {sap.ui.mdc.Table} oTable
262
+ * @returns {object} The supported features
256
263
  * @private
257
264
  */
258
- TableDelegate.isSelectionSupported = function(oTable) {
259
- return !oTable._isOfType(TableType.TreeTable);
265
+ TableDelegate.getSupportedFeatures = function(oTable) {
266
+ return {
267
+ "export": true,
268
+ "selection": !oTable._isOfType(TableType.TreeTable),
269
+ "expandAll": false,
270
+ "collapseAll": false
271
+ };
260
272
  };
261
273
 
262
274
  /**