@openui5/sap.ui.mdc 1.99.0 → 1.100.1

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 (173) hide show
  1. package/THIRDPARTY.txt +2 -2
  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 +50 -32
  6. package/src/sap/ui/mdc/ChartDelegate.js +66 -21
  7. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  8. package/src/sap/ui/mdc/Control.js +11 -6
  9. package/src/sap/ui/mdc/Element.js +10 -6
  10. package/src/sap/ui/mdc/Field.js +19 -4
  11. package/src/sap/ui/mdc/FilterBar.js +1 -1
  12. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  13. package/src/sap/ui/mdc/FilterField.js +41 -3
  14. package/src/sap/ui/mdc/Link.js +3 -3
  15. package/src/sap/ui/mdc/MultiValueField.js +11 -1
  16. package/src/sap/ui/mdc/Table.js +73 -39
  17. package/src/sap/ui/mdc/TableDelegate.js +28 -1
  18. package/src/sap/ui/mdc/ValueHelp.js +8 -3
  19. package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
  20. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  21. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  22. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  23. package/src/sap/ui/mdc/chart/ChartToolbar.js +13 -6
  24. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +7 -7
  25. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  26. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  27. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  28. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  29. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  30. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  31. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +133 -25
  32. package/src/sap/ui/mdc/condition/Operator.js +4 -2
  33. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
  34. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  35. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  36. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  37. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +3 -0
  38. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  39. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
  40. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  41. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  42. package/src/sap/ui/mdc/field/ConditionType.js +15 -4
  43. package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
  44. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  45. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  46. package/src/sap/ui/mdc/field/DefineConditionPanel.js +16 -5
  47. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  48. package/src/sap/ui/mdc/field/FieldBase.js +62 -11
  49. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
  50. package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
  51. package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -1
  52. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  53. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  54. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  55. package/src/sap/ui/mdc/field/FieldValueHelp.js +4 -1
  56. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  57. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  58. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
  59. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +5 -3
  60. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
  62. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  63. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  64. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  65. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  66. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  67. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  68. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  69. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  70. package/src/sap/ui/mdc/field/content/ContentFactory.js +5 -1
  71. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  72. package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
  73. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +76 -208
  74. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  75. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +127 -57
  76. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  77. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  78. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  79. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +37 -19
  80. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  81. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  82. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  83. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  84. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
  85. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  86. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  87. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  88. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  89. package/src/sap/ui/mdc/library.js +11 -4
  90. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  91. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  92. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  93. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  94. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  95. package/src/sap/ui/mdc/link/Factory.js +1 -1
  96. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  97. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  98. package/src/sap/ui/mdc/link/Panel.js +1 -1
  99. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  100. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  101. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  102. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  103. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  104. package/src/sap/ui/mdc/messagebundle.properties +2 -1
  105. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +20 -19
  106. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  107. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  108. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  109. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
  110. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  111. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  112. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  113. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  114. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +11 -33
  115. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  116. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
  117. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +281 -263
  118. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  119. package/src/sap/ui/mdc/p13n/Engine.js +21 -18
  120. package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -5
  121. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  122. package/src/sap/ui/mdc/p13n/StateUtil.js +4 -0
  123. package/src/sap/ui/mdc/p13n/UIManager.js +16 -13
  124. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +18 -14
  125. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
  126. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  127. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  128. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +4 -3
  129. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
  130. package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
  131. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  132. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  133. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  134. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
  135. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +8 -4
  136. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  137. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +2 -2
  138. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  139. package/src/sap/ui/mdc/table/GridTableType.js +75 -27
  140. package/src/sap/ui/mdc/table/PropertyHelper.js +20 -13
  141. package/src/sap/ui/mdc/table/ResponsiveTableType.js +86 -13
  142. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  143. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  144. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  145. package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
  146. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
  147. package/src/sap/ui/mdc/util/DateUtil.js +32 -7
  148. package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
  149. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  150. package/src/sap/ui/mdc/util/PropertyHelper.js +201 -76
  151. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  152. package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
  153. package/src/sap/ui/mdc/valuehelp/Popover.js +5 -3
  154. package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
  155. package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
  156. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  157. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -4
  158. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  159. package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
  160. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
  161. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +13 -10
  162. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +4 -10
  163. package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -4
  164. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +2 -0
  165. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +0 -1
  166. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +8 -6
  167. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  168. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  169. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  170. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  171. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  172. package/src/sap/ui/mdc/ui/Container.js +0 -240
  173. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -4,8 +4,8 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/mdc/filterbar/p13n/GroupContainer", "sap/ui/mdc/filterbar/p13n/FilterGroupLayout","sap/ui/mdc/filterbar/p13n/TableContainer", "sap/ui/mdc/filterbar/p13n/FilterColumnLayout", "sap/ui/mdc/filterbar/FilterBarBase", "sap/ui/mdc/filterbar/FilterBarBaseRenderer"
8
- ], function( GroupContainer, FilterGroupLayout, TableContainer, FilterColumnLayout, FilterBarBase, FilterBarBaseRenderer) {
7
+ "sap/ui/mdc/filterbar/p13n/GroupContainer", "sap/ui/mdc/filterbar/p13n/FilterColumnLayout", "sap/ui/mdc/filterbar/p13n/FilterGroupLayout","sap/ui/mdc/filterbar/p13n/TableContainer", "sap/ui/mdc/filterbar/FilterBarBase", "sap/ui/mdc/filterbar/FilterBarBaseRenderer", "sap/base/util/merge", "sap/base/util/UriParameters", "sap/ui/core/Core"
8
+ ], function( GroupContainer, FilterColumnLayout, FilterGroupLayout, TableContainer, FilterBarBase, FilterBarBaseRenderer, merge, SAPUriParameters, Core) {
9
9
  "use strict";
10
10
 
11
11
  /**
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  *
19
19
  * @extends sap.ui.mdc.filterbar.FilterBarBase
20
20
  * @author SAP SE
21
- * @version 1.99.0
21
+ * @version 1.100.1
22
22
  * @constructor
23
23
  * @private
24
24
  * @since 1.80.0
@@ -28,12 +28,13 @@ sap.ui.define([
28
28
  var AdaptationFilterBar = FilterBarBase.extend("sap.ui.mdc.filterbar.p13n.AdaptationFilterBar", {
29
29
  metadata: {
30
30
  library: "sap.ui.mdc",
31
- properties: {
31
+ associations: {
32
32
  /**
33
33
  * Determines the parent on which the condition changes should be applied on.
34
34
  */
35
35
  adaptationControl: {
36
- type: "object"
36
+ type: "sap.ui.mdc.Control",
37
+ multiple: false
37
38
  }
38
39
  },
39
40
  events: {
@@ -49,15 +50,51 @@ sap.ui.define([
49
50
 
50
51
  AdaptationFilterBar.prototype.init = function() {
51
52
  FilterBarBase.prototype.init.apply(this,arguments);
53
+ this.addStyleClass("sapUIAdaptationFilterBar");
52
54
  this._bPersistValues = true;
55
+
56
+ this._fnResolveAdaptationControlPromise = null;
57
+ this._oAdaptationControlPromise = new Promise(function(resolve, reject) {
58
+ this._fnResolveAdaptationControlPromise = resolve;
59
+ }.bind(this));
60
+ };
61
+ AdaptationFilterBar.prototype.applySettings = function() {
62
+ FilterBarBase.prototype._applySettings.apply(this, arguments);
63
+ this._waitForAdaptControlAndPropertyHelper().then(function() {
64
+ this._initControlDelegate();
65
+ }.bind(this));
53
66
  };
54
67
 
68
+ AdaptationFilterBar.prototype._waitForAdaptControlAndPropertyHelper = function(){
69
+ return this._oAdaptationControlPromise.then(function() {
70
+ return this._getAdaptationControlInstance().awaitPropertyHelper().then(function(oPropertyHelper) {
71
+ this._oPropertyHelper = oPropertyHelper;
72
+ }.bind(this));
73
+ }.bind(this));
74
+ };
55
75
  AdaptationFilterBar.prototype._initControlDelegate = function() {
56
- this._retrieveMetadata().then(function() {
57
- this._applyInitialFilterConditions();
76
+ return this.initControlDelegate().then(function() {
77
+ //this.getTypeUtil();
78
+ if (!this._bIsBeingDestroyed) {
79
+ this._applyInitialFilterConditions();
80
+ }
81
+ }.bind(this));
82
+ };
83
+
84
+ AdaptationFilterBar.prototype.initControlDelegate = function() {
85
+ return this._oAdaptationControlPromise.then(function() {
86
+ return this._getAdaptationControlInstance().initControlDelegate();
58
87
  }.bind(this));
59
88
  };
60
89
 
90
+ AdaptationFilterBar.prototype.getTypeUtil = function() {
91
+ if (!this._getAdaptationControlInstance()) {
92
+ throw new Error("No adaptation control assigned yet.");
93
+ }
94
+
95
+ return this._getAdaptationControlInstance().getTypeUtil();
96
+ };
97
+
61
98
  AdaptationFilterBar.prototype.setMessageStrip = function(oStrip) {
62
99
  this._oFilterBarLayout.setMessageStrip(oStrip);
63
100
  };
@@ -73,14 +110,13 @@ sap.ui.define([
73
110
  //update adaptationModel while dialog is open
74
111
  this._oConditionModel.attachPropertyChange(function(oEvt){
75
112
  var sKey = oEvt.getParameter("path").substring(12);
76
- if (this.oAdaptationModel){
77
- var aItems = this.oAdaptationModel.getProperty("/items");
113
+ if (this.oAdaptationData){
114
+ var aItems = this.oAdaptationData.items;
78
115
  var oItem = aItems.find(function(o){
79
116
  return o.name == sKey;
80
117
  });
81
118
  if (oItem) {
82
- oItem.isFiltered = this._getConditionModel().getConditions(sKey).length > 0 ? true : false;
83
- this.oAdaptationModel.setProperty("/items", aItems);
119
+ oItem.active = this._getConditionModel().getConditions(sKey).length > 0 ? true : false;
84
120
  }
85
121
  }
86
122
  }.bind(this));
@@ -88,37 +124,53 @@ sap.ui.define([
88
124
  return this;
89
125
  };
90
126
 
127
+ AdaptationFilterBar.prototype._retrieveMetadata = function() {
128
+
129
+ return this._oAdaptationControlPromise.then(function() {
130
+ return this._getAdaptationControlInstance().awaitPropertyHelper().then(function(oPropertyHelper) {
131
+ this._oMetadataAppliedPromise = Promise.resolve();
132
+ if (!this._getAdaptationControlInstance().isPropertyHelperFinal()) {
133
+ return this.finalizePropertyHelper();
134
+ }
135
+
136
+ return FilterBarBase.prototype._retrieveMetadata.apply(this, arguments);
137
+ }.bind(this));
138
+ }.bind(this));
139
+ };
140
+
91
141
  AdaptationFilterBar.prototype.createConditionChanges = function() {
92
- var mConditions = this._getModelConditions(this._getConditionModel(), false, true);
93
- if (this._bPersistValues) {
94
- //this.getAdaptationControl(), "Filter", mConditions, true, true
95
- return this.getEngine().createChanges({
96
- control: this.getAdaptationControl(),
97
- key: "Filter",
98
- state: mConditions,
99
- suppressAppliance: true
100
- });
101
- } else {
102
- //TODO: currently only required once the parent FilterBar has p13nMode 'value' disabled.
103
- this.getAdaptationControl()._setXConditions(mConditions, true);
104
- return Promise.resolve(null);
105
- }
142
+ return Promise.all([this._oAdaptationControlPromise, this._getAdaptationControlInstance().awaitControlDelegate()]).then(function() {
143
+ var mConditions = this._getModelConditions(this._getConditionModel(), false, true);
144
+ if (this._bPersistValues) {
145
+ //this._getAdaptationControlInstance(), "Filter", mConditions, true, true
146
+ return this.getEngine().createChanges({
147
+ control: this._getAdaptationControlInstance(),
148
+ key: "Filter",
149
+ state: mConditions,
150
+ suppressAppliance: true
151
+ });
152
+ } else {
153
+ //TODO: currently only required once the parent FilterBar has p13nMode 'value' disabled.
154
+ this._getAdaptationControlInstance()._setXConditions(mConditions, true);
155
+ return Promise.resolve(null);
156
+ }
157
+ }.bind(this));
106
158
  };
107
159
 
108
160
  /**
109
161
  *
110
162
  * Please note that the provided model should be created with sap.ui.mdc.p13n.P13nBuilder
111
163
  *
112
- * @param {object} oP13nModel Model providing the necessary data to display and create <code>FilterColumnLayout</code> instances.
164
+ * @param {object} oP13nData Necessary data to display and create <code>FilterColumnLayout</code> instances.
113
165
  *
114
166
  */
115
- AdaptationFilterBar.prototype.setP13nModel = function(oP13nModel) {
116
- this.oAdaptationModel = oP13nModel;
117
- this._oFilterBarLayout.update();
167
+ AdaptationFilterBar.prototype.setP13nData = function(oP13nData) {
168
+ this.oAdaptationData = oP13nData;
169
+ this._oFilterBarLayout.update(oP13nData);
118
170
  };
119
171
 
120
- AdaptationFilterBar.prototype.getP13nModel = function(oP13nModel) {
121
- return this.oAdaptationModel;
172
+ AdaptationFilterBar.prototype.getP13nData = function() {
173
+ return this.oAdaptationData;
122
174
  };
123
175
 
124
176
  AdaptationFilterBar.prototype._handleFilterItemSubmit = function() {
@@ -127,7 +179,7 @@ sap.ui.define([
127
179
 
128
180
  AdaptationFilterBar.prototype._getWaitForChangesPromise = function() {
129
181
  //Change is applied on parent --> wait for the parent promise not the child
130
- return this.getEngine().waitForChanges(this.getAdaptationControl());
182
+ return this.getEngine().waitForChanges(this._getAdaptationControlInstance());
131
183
  };
132
184
 
133
185
  AdaptationFilterBar.prototype.applyConditionsAfterChangesApplied = function() {
@@ -135,13 +187,6 @@ sap.ui.define([
135
187
  this.triggerSearch();
136
188
  };
137
189
 
138
-
139
- AdaptationFilterBar.prototype.initPropertyHelper = function(){
140
- return this.getAdaptationControl().awaitPropertyHelper().then(function(oPropertyHelper) {
141
- this._oPropertyHelper = oPropertyHelper;
142
- }.bind(this));
143
- };
144
-
145
190
  /**
146
191
  * Method which will initialize the <code>AdaptationFilterBar</code> and create the required FilterFields
147
192
  *
@@ -149,14 +194,15 @@ sap.ui.define([
149
194
  */
150
195
  AdaptationFilterBar.prototype.createFilterFields = function(){
151
196
  return this.initialized().then(function(){
152
- var mConditions = this._bPersistValues ? this.getAdaptationControl().getFilterConditions() : this.getAdaptationControl()._getXConditions();
197
+ var mConditions = this._bPersistValues ? this._getAdaptationControlInstance().getFilterConditions() : this._getAdaptationControlInstance()._getXConditions();
153
198
  this._setXConditions(mConditions, true);
154
199
 
155
200
  if (this._bFilterFieldsCreated) {
201
+ this._oFilterBarLayout.setP13nData(this.oAdaptationData);
156
202
  return this;
157
203
  }
158
204
 
159
- var oAdaptationControl = this.getAdaptationControl();
205
+ var oAdaptationControl = this._getAdaptationControlInstance();
160
206
  var oDelegate = oAdaptationControl.getControlDelegate();
161
207
  var oFilterDelegate = this._checkAdvancedParent(oAdaptationControl) ? oDelegate : oDelegate.getFilterDelegate();
162
208
 
@@ -165,7 +211,7 @@ sap.ui.define([
165
211
 
166
212
  var aFieldPromises = [];
167
213
 
168
- this.oAdaptationModel.getProperty("/items").forEach(function(oItem, iIndex){
214
+ this.oAdaptationData.items.forEach(function(oItem, iIndex){
169
215
  var oFilterFieldPromise;
170
216
 
171
217
  oFilterFieldPromise = this._checkExisting(oItem, oFilterDelegate);
@@ -198,14 +244,12 @@ sap.ui.define([
198
244
  }.bind(this));
199
245
 
200
246
  return Promise.all(aFieldPromises).then(function(){
201
- this.oAdaptationModel.getProperty("/items").forEach(function(oItem){
247
+ this.oAdaptationData.items.forEach(function(oItem){
202
248
  this.addAggregation("filterItems", oItem.filterfield);
203
249
  delete oItem.filterfield;
204
250
  }.bind(this));
205
251
 
206
- if (this._oFilterBarLayout.getInner().setP13nModel){
207
- this._oFilterBarLayout.getInner().setP13nModel(this.oAdaptationModel);
208
- }
252
+ this._oFilterBarLayout.setP13nData(this.oAdaptationData);
209
253
  this._bFilterFieldsCreated = true;
210
254
 
211
255
  return this;
@@ -226,7 +270,7 @@ sap.ui.define([
226
270
  AdaptationFilterBar.prototype._checkExisting = function(oItem, oFilterDelegate) {
227
271
  var oFilterFieldPromise;
228
272
 
229
- var oAdaptationControl = this.getAdaptationControl();
273
+ var oAdaptationControl = this._getAdaptationControlInstance();
230
274
  var aExistingItems = this._checkAdvancedParent(oAdaptationControl) ? oAdaptationControl.getFilterItems() : [];
231
275
 
232
276
  var mExistingFilterItems = aExistingItems.reduce(function(mMap, oField){
@@ -238,7 +282,7 @@ sap.ui.define([
238
282
  oFilterFieldPromise = Promise.resolve(mExistingFilterItems[oItem.name]);
239
283
  } else {
240
284
 
241
- oFilterFieldPromise = oFilterDelegate.addItem(oItem.name, this.getAdaptationControl());
285
+ oFilterFieldPromise = oFilterDelegate.addItem(oItem.name, this._getAdaptationControlInstance());
242
286
 
243
287
  oFilterFieldPromise = oFilterFieldPromise.then(function(oFilterField){
244
288
 
@@ -260,10 +304,10 @@ sap.ui.define([
260
304
  var aOriginalsToRemove = [];
261
305
 
262
306
  Object.keys(this._mOriginalsForClone).forEach(function(sKey){
263
- var oDelegate = this.getAdaptationControl().getControlDelegate();
307
+ var oDelegate = this._getAdaptationControlInstance().getControlDelegate();
264
308
 
265
309
  if (aExistingItems.indexOf(sKey) < 0) {//Originals that have not been selected --> use continue similar to 'ItemBaseFlex'
266
- var oRemovePromise = oDelegate.removeItem.call(oDelegate, sKey, this.getAdaptationControl()).then(function(bContinue){
310
+ var oRemovePromise = oDelegate.removeItem.call(oDelegate, sKey, this._getAdaptationControlInstance()).then(function(bContinue){
267
311
  if (bContinue && this._mOriginalsForClone[sKey]) {
268
312
  // destroy the item
269
313
  this._mOriginalsForClone[sKey].destroy();
@@ -292,32 +336,58 @@ sap.ui.define([
292
336
  * @param {boolean} bSuppressInvalidate suppress invalidation
293
337
  */
294
338
  AdaptationFilterBar.prototype.setAdaptationControl = function(oControl, bSuppressInvalidate) {
295
- this.setProperty("adaptationControl", oControl, bSuppressInvalidate);
296
339
 
297
- this._checkAdvancedParent(oControl);
340
+ if (this._fnResolveAdaptationControlPromise) {
341
+ this._fnResolveAdaptationControlPromise();
342
+ this._fnResolveAdaptationControlPromise = null;
343
+ }
344
+
345
+ this.setAssociation("adaptationControl", oControl, bSuppressInvalidate);
346
+
347
+ //FIXME: remove once the UI has been decided
348
+ var bUseQueryPanel = new SAPUriParameters(window.location.search).getAll("sap-ui-xx-filterQueryPanel")[0] === "true";
349
+ this._cLayoutItem = bUseQueryPanel || this._checkAdvancedParent(oControl) ? FilterGroupLayout : FilterColumnLayout; //Note: once the URL parameter is removed, FilterColumnLayout can be deleted
298
350
 
299
- //TODO: use 'GroupView' for inbuilt filtering enabled Controls
300
- this._cLayoutItem = this._checkAdvancedParent(oControl) ? FilterGroupLayout : FilterColumnLayout;
301
351
  this._oFilterBarLayout = this._checkAdvancedParent(oControl) ? new GroupContainer() : new TableContainer();
352
+
302
353
  this._oFilterBarLayout.getInner().setParent(this);
303
354
  this.setAggregation("layout", this._oFilterBarLayout, true);
304
- this.addStyleClass("sapUIAdaptationFilterBar");
305
355
 
306
356
  if (this._oFilterBarLayout.getInner().attachChange) {
307
- this._oFilterBarLayout.getInner().attachChange(function(){
357
+ this._oFilterBarLayout.getInner().attachChange(function(oEvt){
358
+ if (oEvt.getParameter("reason") === "Remove") {
359
+ var oItem = oEvt.getParameter("item");
360
+ var mConditions = this._bPersistValues ? merge({}, this._getAdaptationControlInstance().getFilterConditions()) : this._getAdaptationControlInstance()._getXConditions();
361
+ mConditions[oItem.name] = [];
362
+ this._setXConditions(mConditions, true);
363
+ }
308
364
  this.fireChange();
309
365
  }.bind(this));
310
366
  }
311
367
  return this;
312
368
  };
313
369
 
370
+ /**
371
+ * Returns an instance of the associated adaptation control, if available.
372
+ * @private
373
+ * @ui5-restricted sap.ui.mdc
374
+ * @returns {sap.ui.mdc.Control} The adaptation control instance.
375
+ */
376
+ AdaptationFilterBar.prototype._getAdaptationControlInstance = function () {
377
+ var sAdaptationControlId = this.getAdaptationControl();
378
+ return sAdaptationControlId && Core.byId(sAdaptationControlId);
379
+ };
380
+
314
381
  AdaptationFilterBar.prototype.exit = function() {
315
382
  FilterBarBase.prototype.exit.apply(this, arguments);
316
383
  for (var sKey in this._mOriginalsForClone) {
317
384
  this._mOriginalsForClone[sKey].destroy();
318
385
  }
319
386
  this._mOriginalsForClone = null;
320
- this.oAdaptationModel = null;
387
+ this.oAdaptationData = null;
388
+
389
+ this._fnResolveAdaptationControlPromise = null;
390
+ this._oAdaptationControlPromise = null;
321
391
  };
322
392
 
323
393
  return AdaptationFilterBar;
@@ -1,3 +1,4 @@
1
+
1
2
  /*
2
3
  * ! OpenUI5
3
4
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
@@ -62,5 +63,4 @@ sap.ui.define(['sap/m/ColumnListItem', 'sap/m/ColumnListItemRenderer', 'sap/m/La
62
63
  };
63
64
 
64
65
  return FilterColumnLayout;
65
-
66
- });
66
+ });
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
 
13
13
  /**
14
14
  * Constructor for a new filterBar/p13n/GroupContainer.
15
- * Used for a complex groupable FilterBar UI, should be used in combination with <code>FilterColumnLayout</code>
15
+ * Used for a complex groupable FilterBar UI, should be used in combination with <code>FilterGroupLayout</code>
16
16
  * @param {string} [sId] ID for the new control, generated automatically if no ID is given
17
17
  * @class The GroupContainer is a IFilterContainer implementation for <code>sap.m.Table</code>
18
18
  * @extends sap.ui.mdc.filterbar.IFilterContainer
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  this.oLayout = new AdaptFiltersPanel();
35
35
 
36
36
  this.oLayout.setItemFactory(function(oBindingContext){
37
- var sKey = this.oLayout.getModel(this.oLayout.P13N_MODEL).getProperty(oBindingContext.sPath).name;
37
+ var sKey = oBindingContext.getProperty(oBindingContext.sPath).name;
38
38
  var oFilterItem = this.mFilterItems[sKey];
39
39
  return oFilterItem;
40
40
  }.bind(this));
@@ -62,10 +62,14 @@ sap.ui.define([
62
62
  return aFilterItems;
63
63
  };
64
64
 
65
- GroupContainer.prototype.update = function() {
65
+ GroupContainer.prototype.update = function(oP13nData) {
66
66
  this.oLayout.restoreDefaults();
67
67
  };
68
68
 
69
+ GroupContainer.prototype.setP13nData = function(oAdaptationData) {
70
+ this.oLayout.setP13nData(oAdaptationData);
71
+ };
72
+
69
73
  GroupContainer.prototype.exit = function() {
70
74
  this.mFilterItems = null;
71
75
  this.mFilterFields = null;
@@ -6,13 +6,13 @@
6
6
 
7
7
  // Provides control sap.ui.mdc.filterbar.FilterItemLayout.
8
8
  sap.ui.define([
9
- 'sap/ui/mdc/filterbar/IFilterContainer','sap/m/Table', 'sap/m/Column', 'sap/m/Text', 'sap/m/VBox'
10
- ], function(IFilterContainer, Table, Column, Text, VBox) {
9
+ 'sap/ui/mdc/filterbar/IFilterContainer','sap/m/Table', 'sap/m/Column', 'sap/m/Text', 'sap/m/VBox', 'sap/ui/mdc/p13n/panels/FilterPanel', 'sap/base/util/UriParameters'
10
+ ], function(IFilterContainer, Table, Column, Text, VBox, FilterPanel, SAPUriParameters) {
11
11
  "use strict";
12
12
 
13
13
  /**
14
14
  * Constructor for a new filterBar/p13n/TableContainer.
15
- * Used for a simple FilterBar table like view, should be used in combination with <code>FilterCellLayout</code>
15
+ * Used for a simple FilterBar table like view, should be used in combination with <code>FilterGroupLayout</code>
16
16
  * @param {string} [sId] ID for the new control, generated automatically if no ID is given
17
17
  * @class The TableContainer is a IFilterContainer implementation for <code>sap.m.Table</code>
18
18
  * @extends sap.ui.mdc.filterbar.IFilterContainer
@@ -44,18 +44,51 @@ sap.ui.define([
44
44
  ]
45
45
  });
46
46
 
47
- this._oMessageStripContainer = new VBox(this.getId() + "-messageStripContainer");
47
+ var oURLParams = new SAPUriParameters(window.location.search);
48
+ this._bUseQueryPanel = oURLParams.getAll("sap-ui-xx-filterQueryPanel")[0] === "true";
49
+
50
+ //FIXME: remove check once the UI has been decided
51
+ if (this._bUseQueryPanel) {
52
+ this.oLayout = new FilterPanel({
53
+ enableReorder: false
54
+ });
55
+
56
+ this.mFilterItems = {};
57
+
58
+ this.oLayout.setItemFactory(function(oItem){
59
+ var sKey = oItem.name;
60
+ var oFilterItem = this.mFilterItems[sKey];
61
+ return oFilterItem;
62
+ }.bind(this));
63
+ } else {
64
+ this._oMessageStripContainer = new VBox(this.getId() + "-messageStripContainer");
65
+
66
+ this.oLayout = new VBox({
67
+ items: [
68
+ this._oMessageStripContainer,
69
+ this._oTable
70
+ ]
71
+ });
72
+ }
48
73
 
49
- this.oLayout = new VBox({
50
- items: [
51
- this._oMessageStripContainer,
52
- this._oTable
53
- ]
54
- });
55
74
  };
56
75
 
57
76
  TableContainer.prototype.insertFilterField = function(oControl, iIndex) {
58
- this._oTable.insertItem(oControl, iIndex);
77
+
78
+ //FIXME: remove check once the UI has been decided
79
+ if (this._bUseQueryPanel) {
80
+ this.mFilterItems[oControl._getFieldPath()] = oControl;
81
+ } else {
82
+ this._oTable.insertItem(oControl, iIndex);
83
+ }
84
+
85
+ };
86
+
87
+ TableContainer.prototype.setP13nData = function(oAdaptationData) {
88
+ //FIXME: remove check once the UI has been decided
89
+ if (this._bUseQueryPanel) {
90
+ this.oLayout.setP13nData(oAdaptationData.items);
91
+ }
59
92
  };
60
93
 
61
94
  TableContainer.prototype.removeFilterField = function(oControl) {
@@ -63,15 +96,20 @@ sap.ui.define([
63
96
  };
64
97
 
65
98
  TableContainer.prototype.setMessageStrip = function(oStrip) {
66
- this._oMessageStripContainer.removeAllItems();
67
- this._oMessageStripContainer.addItem(oStrip);
99
+ //FIXME: remove check once the UI has been decided
100
+ if (this._bUseQueryPanel) {
101
+ this.oLayout.setMessageStrip(oStrip);
102
+ } else {
103
+ this._oMessageStripContainer.removeAllItems();
104
+ this._oMessageStripContainer.addItem(oStrip);
105
+ }
68
106
  };
69
107
 
70
108
  TableContainer.prototype.getFilterFields = function() {
71
109
  return this._oTable.getItems();
72
110
  };
73
111
 
74
- TableContainer.prototype.update = function() {
112
+ TableContainer.prototype.update = function(oP13nModel) {
75
113
  //Called when the UI model is being set - trigger update logic here
76
114
  };
77
115
 
@@ -33,9 +33,11 @@ sap.ui.define(
33
33
  * The metadata information is provided via the {@link sap.ui.mdc.FilterBarDelegate FilterBarDelegate} implementation. This implementation has to be provided by the application.
34
34
  * @extends sap.ui.mdc.filterbar.FilterBarBase
35
35
  * @author SAP SE
36
- * @version 1.99.0
36
+ * @version 1.100.1
37
37
  * @constructor
38
38
  * @private
39
+ * @ui5-restricted sap.fe
40
+ * @MDC_PUBLIC_CANDIDATE
39
41
  * @since 1.84.0
40
42
  * @alias sap.ui.mdc.filterbar.vh.FilterBar
41
43
  * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
@@ -59,23 +61,8 @@ sap.ui.define(
59
61
  type: "int",
60
62
  defaultValue: 8
61
63
  }
62
-
63
- // delegate: {
64
- // type: "object",
65
- // group: "Data",
66
- // defaultValue: {name: 'sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate'}
67
- // }
68
64
  },
69
65
  aggregations : {
70
- /**
71
- * <code>collectiveSearch</code> control of the filterbar.
72
- *
73
- * @since 1.87.0
74
- */
75
- collectiveSearch: {
76
- type: "sap.ui.mdc.filterbar.vh.CollectiveSearchSelect",
77
- multiple: false
78
- }
79
66
  }
80
67
  },
81
68
 
@@ -145,11 +132,18 @@ sap.ui.define(
145
132
  this._waitForMetadata();
146
133
  };
147
134
 
135
+ FilterBar.prototype._handleConditionModelPropertyChange = function() {
136
+ this.fireFiltersChanged({conditionsBased: true});
137
+ };
138
+
148
139
 
149
140
  FilterBar.prototype.exit = function() {
141
+ if (this._oCollectiveSearch) { // do not destroy CollectiveSearch as it is owned by value help and might be reused there
142
+ this._oFilterBarLayout.removeControl(this._oCollectiveSearch);
143
+ this._oCollectiveSearch = null;
144
+ }
150
145
  FilterBarBase.prototype.exit.apply(this, arguments);
151
146
  this._oBasicSearchField = null;
152
- this._oCollectiveSearch = null;
153
147
  this._oBtnFilters = null;
154
148
  this._oShowAllFiltersBtn = null;
155
149
  };
@@ -162,6 +156,15 @@ sap.ui.define(
162
156
  this._oFilterBarLayout._updateFilterBarLayout(true);
163
157
  };
164
158
 
159
+ /**
160
+ * Sets the <code>CollectiveSearch</code> control
161
+ *
162
+ * <b>Note:</b> This must only be done by the corresponding value help, not from outside.
163
+ *
164
+ * @param {sap.ui.mdc.filterbar.vh.CollectiveSearchSelect} oCollectiveSearch <code>CollectiveSearch</code> control
165
+ * @returns {this} Reference to <code>this</code> to allow method chaining
166
+ * @protected
167
+ */
165
168
  FilterBar.prototype.setCollectiveSearch = function (oCollectiveSearch) {
166
169
  if (this._oCollectiveSearch) {
167
170
  if (this._oFilterBarLayout) {
@@ -176,11 +179,27 @@ sap.ui.define(
176
179
  return this;
177
180
  };
178
181
 
182
+ /**
183
+ * Gets the <code>CollectiveSearch</code> control
184
+ *
185
+ * <b>Note:</b> This must only be used by the corresponding value help, not from outside.
186
+ *
187
+ * @returns {sap.ui.mdc.filterbar.vh.CollectiveSearchSelect} <code>CollectiveSearch</code> control
188
+ * @protected
189
+ */
179
190
  FilterBar.prototype.getCollectiveSearch = function () {
180
191
  return this._oCollectiveSearch;
181
192
  };
182
193
 
183
- FilterBar.prototype.destroyCollectiveSearch = function () {
194
+ /**
195
+ * Destroyes the <code>CollectiveSearch</code> control
196
+ *
197
+ * <b>Note:</b> This must only be used by the corresponding value help, not from outside.
198
+ *
199
+ * @returns {this} Reference to <code>this</code> to allow method chaining
200
+ * @protected
201
+ */
202
+ FilterBar.prototype.destroyCollectiveSearch = function () {
184
203
  if (this._oCollectiveSearch && this._oFilterBarLayout) {
185
204
  this._oFilterBarLayout.removeControl(this._oCollectiveSearch);
186
205
  this._oCollectiveSearch.destroy();
@@ -190,7 +209,6 @@ sap.ui.define(
190
209
  return this;
191
210
  };
192
211
 
193
-
194
212
  FilterBar.prototype.setBasicSearchField = function (oBasicSearchField) {
195
213
  if (this._oBasicSearchField) {
196
214
  if (this._oFilterBarLayout) {
@@ -27,7 +27,7 @@ sap.ui.define(
27
27
  * @class The FilterContainer is a IFilterContainer implementation for <code>AlignedFlowLayout</code>
28
28
  * @extends sap.ui.mdc.filterbar.IFilterContainer
29
29
  * @constructor
30
- * @private
30
+ * @protected
31
31
  * @since 1.84.0
32
32
  * @alias sap.ui.mdc.filterbar.vh.FilterContainer
33
33
  * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel