@openui5/sap.ui.mdc 1.102.1 → 1.103.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 (194) hide show
  1. package/package.json +4 -4
  2. package/src/sap/ui/mdc/.library +1 -1
  3. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  4. package/src/sap/ui/mdc/AggregationBaseDelegate.js +11 -0
  5. package/src/sap/ui/mdc/Chart.js +111 -55
  6. package/src/sap/ui/mdc/ChartDelegate.js +97 -92
  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 +2 -2
  10. package/src/sap/ui/mdc/FilterBar.js +1 -1
  11. package/src/sap/ui/mdc/FilterField.js +2 -2
  12. package/src/sap/ui/mdc/Link.js +4 -1
  13. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  14. package/src/sap/ui/mdc/Table.js +48 -12
  15. package/src/sap/ui/mdc/ValueHelp.js +1 -19
  16. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -1
  17. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -2
  18. package/src/sap/ui/mdc/chart/ChartToolbar.js +34 -2
  19. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +6 -2
  20. package/src/sap/ui/mdc/chart/Item.js +6 -11
  21. package/src/sap/ui/mdc/chart/PropertyHelper.js +7 -8
  22. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +2 -3
  23. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  24. package/src/sap/ui/mdc/condition/ConditionConverter.js +16 -131
  25. package/src/sap/ui/mdc/condition/ConditionModel.js +50 -21
  26. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  27. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +3 -3
  28. package/src/sap/ui/mdc/condition/Operator.js +1 -1
  29. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
  30. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  31. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +6 -3
  32. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbarAction.designtime.js +53 -0
  33. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +9 -4
  34. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +1 -1
  35. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  36. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  37. package/src/sap/ui/mdc/field/ConditionType.js +135 -39
  38. package/src/sap/ui/mdc/field/ConditionsType.js +71 -10
  39. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -2
  40. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  41. package/src/sap/ui/mdc/field/DefineConditionPanel.js +93 -81
  42. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +9 -62
  43. package/src/sap/ui/mdc/field/FieldBase.js +91 -70
  44. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +20 -1
  45. package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -39
  46. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  47. package/src/sap/ui/mdc/field/FieldInput.js +2 -2
  48. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  49. package/src/sap/ui/mdc/field/FieldMultiInput.js +2 -2
  50. package/src/sap/ui/mdc/field/FieldValueHelp.js +1 -1
  51. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -19
  52. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  53. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +7 -1
  54. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
  55. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  56. package/src/sap/ui/mdc/field/InParameter.js +1 -4
  57. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  58. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  59. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  60. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  61. package/src/sap/ui/mdc/field/TokenDisplay.js +2 -2
  62. package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -2
  63. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -5
  64. package/src/sap/ui/mdc/field/content/DateContent.js +3 -3
  65. package/src/sap/ui/mdc/field/content/DateTimeContent.js +1 -1
  66. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +4 -4
  67. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +1 -1
  68. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  69. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
  70. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  71. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +80 -4
  72. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +19 -38
  73. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  74. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +23 -41
  75. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +43 -58
  76. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  77. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  78. package/src/sap/ui/mdc/flexibility/GroupFlex.js +25 -55
  79. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +21 -42
  80. package/src/sap/ui/mdc/flexibility/SortFlex.js +23 -52
  81. package/src/sap/ui/mdc/flexibility/Table.flexibility.js +3 -3
  82. package/src/sap/ui/mdc/flexibility/Util.js +82 -0
  83. package/src/sap/ui/mdc/flexibility/xConfigFlex.js +137 -0
  84. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +3 -1
  85. package/src/sap/ui/mdc/library.js +4 -15
  86. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  87. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  88. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  89. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  90. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  91. package/src/sap/ui/mdc/link/Factory.js +1 -1
  92. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  93. package/src/sap/ui/mdc/link/LinkItem.js +9 -1
  94. package/src/sap/ui/mdc/link/Panel.js +25 -10
  95. package/src/sap/ui/mdc/link/PanelItem.js +10 -1
  96. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  97. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  98. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  99. package/src/sap/ui/mdc/messagebundle.properties +12 -0
  100. package/src/sap/ui/mdc/messagebundle_ar.properties +8 -0
  101. package/src/sap/ui/mdc/messagebundle_bg.properties +8 -0
  102. package/src/sap/ui/mdc/messagebundle_ca.properties +8 -0
  103. package/src/sap/ui/mdc/messagebundle_cs.properties +8 -0
  104. package/src/sap/ui/mdc/messagebundle_cy.properties +8 -0
  105. package/src/sap/ui/mdc/messagebundle_da.properties +8 -0
  106. package/src/sap/ui/mdc/messagebundle_de.properties +8 -0
  107. package/src/sap/ui/mdc/messagebundle_el.properties +19 -11
  108. package/src/sap/ui/mdc/messagebundle_en.properties +8 -0
  109. package/src/sap/ui/mdc/messagebundle_en_GB.properties +8 -0
  110. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +8 -0
  111. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +8 -0
  112. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +8 -0
  113. package/src/sap/ui/mdc/messagebundle_es.properties +14 -6
  114. package/src/sap/ui/mdc/messagebundle_es_MX.properties +8 -0
  115. package/src/sap/ui/mdc/messagebundle_et.properties +8 -0
  116. package/src/sap/ui/mdc/messagebundle_fi.properties +8 -0
  117. package/src/sap/ui/mdc/messagebundle_fr.properties +9 -1
  118. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +8 -0
  119. package/src/sap/ui/mdc/messagebundle_hi.properties +8 -0
  120. package/src/sap/ui/mdc/messagebundle_hr.properties +8 -0
  121. package/src/sap/ui/mdc/messagebundle_hu.properties +8 -0
  122. package/src/sap/ui/mdc/messagebundle_id.properties +8 -0
  123. package/src/sap/ui/mdc/messagebundle_it.properties +9 -1
  124. package/src/sap/ui/mdc/messagebundle_iw.properties +9 -1
  125. package/src/sap/ui/mdc/messagebundle_ja.properties +8 -0
  126. package/src/sap/ui/mdc/messagebundle_kk.properties +8 -0
  127. package/src/sap/ui/mdc/messagebundle_ko.properties +10 -2
  128. package/src/sap/ui/mdc/messagebundle_lt.properties +8 -0
  129. package/src/sap/ui/mdc/messagebundle_lv.properties +8 -0
  130. package/src/sap/ui/mdc/messagebundle_ms.properties +8 -0
  131. package/src/sap/ui/mdc/messagebundle_nl.properties +22 -14
  132. package/src/sap/ui/mdc/messagebundle_no.properties +8 -0
  133. package/src/sap/ui/mdc/messagebundle_pl.properties +8 -0
  134. package/src/sap/ui/mdc/messagebundle_pt.properties +12 -4
  135. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +8 -0
  136. package/src/sap/ui/mdc/messagebundle_ro.properties +8 -0
  137. package/src/sap/ui/mdc/messagebundle_ru.properties +8 -0
  138. package/src/sap/ui/mdc/messagebundle_sh.properties +9 -1
  139. package/src/sap/ui/mdc/messagebundle_sk.properties +8 -0
  140. package/src/sap/ui/mdc/messagebundle_sl.properties +8 -0
  141. package/src/sap/ui/mdc/messagebundle_sv.properties +8 -0
  142. package/src/sap/ui/mdc/messagebundle_th.properties +8 -0
  143. package/src/sap/ui/mdc/messagebundle_tr.properties +8 -0
  144. package/src/sap/ui/mdc/messagebundle_uk.properties +8 -0
  145. package/src/sap/ui/mdc/messagebundle_vi.properties +8 -0
  146. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +8 -0
  147. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +9 -1
  148. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  149. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  150. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  151. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  152. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  153. package/src/sap/ui/mdc/odata/TypeUtil.js +24 -2
  154. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +5 -5
  155. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +6 -0
  156. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +6 -6
  157. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +0 -33
  158. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +359 -151
  159. package/src/sap/ui/mdc/p13n/Engine.js +1 -1
  160. package/src/sap/ui/mdc/p13n/PersistenceProvider.js +1 -0
  161. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  162. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  163. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
  164. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +133 -0
  165. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +7 -32
  166. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +12 -4
  167. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +1 -1
  168. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
  169. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +22 -27
  170. package/src/sap/ui/mdc/table/Column.js +4 -1
  171. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  172. package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
  173. package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
  174. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  175. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  176. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +5 -0
  177. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  178. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  179. package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
  180. package/src/sap/ui/mdc/util/TypeUtil.js +105 -17
  181. package/src/sap/ui/mdc/valuehelp/Dialog.js +95 -30
  182. package/src/sap/ui/mdc/valuehelp/Popover.js +15 -2
  183. package/src/sap/ui/mdc/valuehelp/base/Container.js +37 -28
  184. package/src/sap/ui/mdc/valuehelp/base/Content.js +39 -21
  185. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +5 -5
  186. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +41 -34
  187. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  188. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  189. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +11 -3
  190. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
  191. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
  192. package/src/sap/ui/mdc/valuehelp/content/MTable.js +2 -2
  193. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +34 -82
  194. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +0 -139
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @extends sap.ui.model.SimpleType
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.102.1
39
+ * @version 1.103.1
40
40
  *
41
41
  * @since 1.62.0
42
42
  * @private
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @MDC_PUBLIC_CANDIDATE
45
45
  *
46
46
  * @param {object} [oFormatOptions] Formatting options
47
- * @param {sap.ui.model.Type} [oFormatOptions.valueType] Type of the value of the condition (used for formatting and parsing)
47
+ * @param {sap.ui.model.Type} [oFormatOptions.valueType] Type of the value of the condition (used for formatting, parsing and validating)
48
48
  * @param {string[]} [oFormatOptions.operators] Possible operators to be used in the condition
49
49
  * @param {sap.ui.mdc.enum.FieldDisplay} [oFormatOptions.display] DisplayFormat used to visualize a value
50
50
  * @param {string} [oFormatOptions.fieldHelpID] ID of the field help to determine the key and description // TODO: async request????
@@ -128,7 +128,28 @@ sap.ui.define([
128
128
 
129
129
  };
130
130
 
131
- ConditionsType.prototype.formatValue = function(aConditions, sInternalType) {
131
+ /**
132
+ * Formats the given conditions to an output value of the given target type.
133
+ * This values are formatted using the given data type. Depending of the operator
134
+ * and the configuration (set in <code>FormatOptions</code>) a description will be determined via given value help or delegate.
135
+ *
136
+ * @param {sap.ui.mdc.condition.ConditionObject[]} aConditions
137
+ * The conditions to be formatted
138
+ * @param {string} sTargetType
139
+ * The target type; see {@link topic:ac56d92162ed47ff858fdf1ce26c18c4 Allowed Property Types}
140
+ * In addition to the standard target types <code>sap.ui.mdc.raw</code> can be used. In this case the value is not formatted and just
141
+ * forwarded to the target. If the value is an array representing data for a <code>CompositeType</code> the index of the needed raw value can be added to the
142
+ * name (For example if a unit should be forwarded as raw value <code>sap.ui.mdc.raw:1</code> can be used).
143
+ * @return {any|Promise}
144
+ * The formatted output value or a <code>Promise</code> resolving with the formatted value
145
+ * @throws {sap.ui.model.FormatException}
146
+ * If formatting to the target type is not possible
147
+ *
148
+ * @private
149
+ * @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
150
+ * @MDC_PUBLIC_CANDIDATE
151
+ */
152
+ ConditionsType.prototype.formatValue = function(aConditions, sTargetType) {
132
153
 
133
154
  if (aConditions == undefined || aConditions == null || this._bDestroyed) { // if destroyed do nothing
134
155
  return null;
@@ -140,23 +161,23 @@ sap.ui.define([
140
161
 
141
162
  var vValue;
142
163
 
143
- if (!sInternalType || sInternalType === "string" || sInternalType === "any") {
164
+ if (!sTargetType || sTargetType === "string" || sTargetType === "any") {
144
165
  vValue = ""; // if string requested use string
145
- } else if (sInternalType === "float" || sInternalType === "int") {
166
+ } else if (sTargetType === "float" || sTargetType === "int") {
146
167
  vValue = 0; // if number requested use number
147
168
  }
148
169
 
149
170
  var iMaxConditions = _getMaxConditions.call(this);
150
171
 
151
172
  var aSyncPromises = [];
152
- var fnCreateSyncPromise = function (oCondition, sInternalType) { // as function should not be declared inside a loop
173
+ var fnCreateSyncPromise = function (oCondition, sTargetType) { // as function should not be declared inside a loop
153
174
  return SyncPromise.resolve().then(function() {
154
- return this._oConditionType.formatValue(oCondition, sInternalType);
175
+ return this._oConditionType.formatValue(oCondition, sTargetType);
155
176
  }.bind(this));
156
177
  };
157
178
 
158
179
  for (var i = 0; i < aConditions.length; i++) {
159
- aSyncPromises.push(fnCreateSyncPromise.call(this, aConditions[i], sInternalType));
180
+ aSyncPromises.push(fnCreateSyncPromise.call(this, aConditions[i], sTargetType));
160
181
 
161
182
  if (iMaxConditions > 0 && i >= iMaxConditions - 1) {
162
183
  break;
@@ -183,7 +204,32 @@ sap.ui.define([
183
204
 
184
205
  }
185
206
 
186
- ConditionsType.prototype.parseValue = function(sValue, sInternalType) {
207
+ /**
208
+ * Parses an external value of the given source type to an array of conditions that holds the value in model
209
+ * representation.
210
+ * These values are parsed using the given data type. Depending of the operator
211
+ * and the configuration (set in <code>FormatOptions</code>) a value will be determined via given value help or delegate.
212
+ *
213
+ * @param {any} vValue
214
+ * The value to be parsed
215
+ * @param {string} sSourceType
216
+ * The type of the given value; see
217
+ * {@link topic:ac56d92162ed47ff858fdf1ce26c18c4 Allowed Property Types}
218
+ * In addition to the standard source types <code>sap.ui.mdc.raw</code> can be used. In this case the value is not parsed and just
219
+ * used in the condition. If the value of the condition is an array representing data for a <code>CompositeType</code> the index of the needed raw value can be added to the
220
+ * name (For example if a unit should be forwarded as raw value <code>sap.ui.mdc.raw:1</code> can be used).
221
+ * @return {null|sap.ui.mdc.condition.ConditionObject[]|Promise<null|sap.ui.mdc.condition.ConditionObject[]>}
222
+ * The array of conditions or a <code>Promise</code> resolving with the array of conditions.
223
+ * If there is no value <code>null</code> is returned.
224
+ * @throws {sap.ui.model.ParseException}
225
+ * If parsing to the model type is not possible; the message of the exception is language
226
+ * dependent as it may be displayed on the UI
227
+ *
228
+ * @private
229
+ * @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
230
+ * @MDC_PUBLIC_CANDIDATE
231
+ */
232
+ ConditionsType.prototype.parseValue = function(vValue, sSourceType) {
187
233
 
188
234
  if (this._bDestroyed) { // if destroyed do nothing
189
235
  return null;
@@ -195,7 +241,7 @@ sap.ui.define([
195
241
  }
196
242
 
197
243
  var oCondition = SyncPromise.resolve().then(function() {
198
- return this._oConditionType.parseValue(sValue, sInternalType);
244
+ return this._oConditionType.parseValue(vValue, sSourceType);
199
245
  }.bind(this)).then(function(oCondition) {
200
246
  return _parseConditionToConditions.call(this, oCondition);
201
247
  }.bind(this)).unwrap();
@@ -253,6 +299,21 @@ sap.ui.define([
253
299
 
254
300
  }
255
301
 
302
+ /**
303
+ * Validates a given array of conditions. The values of the conditions are validated using the given data type.
304
+ *
305
+ * @param {sap.ui.mdc.condition.ConditionObject[]} aConditions
306
+ * The conditions to be validated
307
+ * @returns {void|Promise}
308
+ * <code>undefined</code> or a <code>Promise</code> resolving with an undefined value
309
+ * @throws {sap.ui.model.ValidateException}
310
+ * If at least one of the values of the conditions is not valid for the given data type; the message of the exception is
311
+ * language dependent as it may be displayed on the UI
312
+ *
313
+ * @private
314
+ * @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
315
+ * @MDC_PUBLIC_CANDIDATE
316
+ */
256
317
  ConditionsType.prototype.validateValue = function(aConditions) {
257
318
 
258
319
  if (aConditions === undefined || aConditions === null || this._bDestroyed) { // if destroyed do nothing
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @param {object} [mSettings] Initial settings for the new control
17
17
  * @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls that allows you to add custom content.
18
18
  * @extends sap.ui.mdc.field.FieldHelpBase
19
- * @version 1.102.1
19
+ * @version 1.103.1
20
20
  * @constructor
21
21
  * @private
22
22
  * @ui5-restricted sap.fe
@@ -81,7 +81,6 @@ sap.ui.define([
81
81
  * @private
82
82
  * @ui5-restricted sap.fe
83
83
  * @MDC_PUBLIC_CANDIDATE
84
- * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
85
84
  */
86
85
  CustomFieldHelp.prototype.fireSelectEvent = function(aConditions) {
87
86
 
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @param {object} [mSettings] Initial settings for the new control
17
17
  * @class A field help used in the <code>FieldInfo</code> aggregation in <code>FieldBase</code> controls that allows you to add custom content.
18
18
  * @extends sap.ui.mdc.field.FieldInfoBase
19
- * @version 1.102.1
19
+ * @version 1.103.1
20
20
  * @constructor
21
21
  * @private
22
22
  * @ui5-restricted sap.fe
@@ -17,7 +17,9 @@ sap.ui.define([
17
17
  'sap/ui/mdc/enum/BaseType',
18
18
  'sap/ui/mdc/enum/ConditionValidated',
19
19
  'sap/ui/mdc/Field',
20
- 'sap/ui/mdc/field/ListFieldHelp',
20
+ 'sap/ui/mdc/ValueHelp',
21
+ 'sap/ui/mdc/valuehelp/Popover',
22
+ 'sap/ui/mdc/valuehelp/content/FixedList',
21
23
  'sap/ui/mdc/field/ListFieldHelpItem',
22
24
  'sap/ui/model/base/ManagedObjectModel',
23
25
  'sap/ui/model/json/JSONModel',
@@ -25,7 +27,6 @@ sap.ui.define([
25
27
  'sap/ui/model/type/String',
26
28
  'sap/ui/core/library',
27
29
  'sap/ui/core/InvisibleText',
28
- 'sap/ui/core/ListItem',
29
30
  'sap/ui/layout/Grid',
30
31
  'sap/ui/layout/GridData',
31
32
  'sap/m/library',
@@ -48,7 +49,9 @@ sap.ui.define([
48
49
  BaseType,
49
50
  ConditionValidated,
50
51
  Field,
51
- ListFieldHelp,
52
+ ValueHelp,
53
+ Popover,
54
+ FixedList,
52
55
  ListFieldHelpItem,
53
56
  ManagedObjectModel,
54
57
  JSONModel,
@@ -56,7 +59,6 @@ sap.ui.define([
56
59
  StringType,
57
60
  coreLibrary,
58
61
  InvisibleText,
59
- ListItem,
60
62
  Grid,
61
63
  GridData,
62
64
  mLibrary,
@@ -91,7 +93,7 @@ sap.ui.define([
91
93
  * @extends sap.ui.core.Control
92
94
  *
93
95
  * @author SAP SE
94
- * @version 1.102.1
96
+ * @version 1.103.1
95
97
  *
96
98
  * @constructor
97
99
  * @alias sap.ui.mdc.field.DefineConditionPanel
@@ -371,90 +373,95 @@ sap.ui.define([
371
373
 
372
374
  onSelectChange: function(oEvent) {
373
375
  var oField = oEvent.getSource();
374
- var oCondition = oField.getBindingContext("$this").getObject();
375
- var aConditions = this.getConditions();
376
- var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
377
- if (iIndex >= 0) {
378
- oCondition = aConditions[iIndex]; // to get right instance
379
- }
380
-
381
- if (!oEvent.getParameter("valid")) { // if Operator in error state -> don't update values
382
- oCondition.invalid = true;
383
- this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
384
- oField._sOldKey = oField.getValue();
385
- _checkInvalidInput.call(this, true); // set imediately, not only if row left
386
- return;
387
- }
388
-
389
- var sKey = oField.getValue();
390
- var sOldKey = oField._sOldKey;
391
- var oOperator = FilterOperatorUtil.getOperator(sKey); // operator must exist as List is created from valid operators
392
- var oOperatorOld = sOldKey && FilterOperatorUtil.getOperator(sOldKey);
376
+ var oPromise = oEvent.getParameter("promise"); // as with FixedList direct user input is parsed async wait for the promise
393
377
 
394
- if (oOperator && oOperatorOld) {
395
- var bUpdate = false;
378
+ oPromise.then(function (sKey) {
379
+ var sOldKey = oField._sOldKey;
380
+ var oOperator = FilterOperatorUtil.getOperator(sKey); // operator must exist as List is created from valid operators
381
+ var oOperatorOld = sOldKey && FilterOperatorUtil.getOperator(sOldKey);
382
+ var oCondition = oField.getBindingContext("$this").getObject();
383
+ var aConditions = this.getConditions();
384
+ var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
385
+ if (iIndex >= 0) {
386
+ oCondition = aConditions[iIndex]; // to get right instance
387
+ }
396
388
 
397
- if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== Operator.ValueType.Static ) {
398
- // type changed -> remove entered value (only if changed by user in Select)
399
- // As Static text updated on condition change, don't delete it here.
400
- if (iIndex >= 0) {
401
- oCondition.values.forEach(function(value, index) {
402
- if (value !== null) {
403
- if ((oOperator.valueTypes[index] === Operator.ValueType.Self && oOperatorOld.valueTypes[index] === Operator.ValueType.SelfNoParse) ||
404
- (oOperator.valueTypes[index] === Operator.ValueType.SelfNoParse && oOperatorOld.valueTypes[index] === Operator.ValueType.Self)) {
405
- // as for Decimal values the type might change we need to format and parse again
406
- var oType = _getFieldType.call(this, oOperator.name, index);
407
- var oTypeOld = _getFieldType.call(this, oOperatorOld.name, index);
408
- var sValue = oTypeOld.formatValue(oCondition.values[index], "string");
409
- var vValue = oType.parseValue(sValue, "string");
410
- if (vValue !== oCondition.values[index]) {
411
- oCondition.values[index] = oType.parseValue(sValue, "string");
389
+ if (oOperator && oOperatorOld) {
390
+ var bUpdate = false;
391
+
392
+ if (!deepEqual(oOperator.valueTypes[0], oOperatorOld.valueTypes[0]) && oOperator.valueTypes[0] !== Operator.ValueType.Static ) {
393
+ // type changed -> remove entered value (only if changed by user in Select)
394
+ // As Static text updated on condition change, don't delete it here.
395
+ if (iIndex >= 0) {
396
+ oCondition.values.forEach(function(value, index) {
397
+ if (value !== null) {
398
+ if ((oOperator.valueTypes[index] === Operator.ValueType.Self && oOperatorOld.valueTypes[index] === Operator.ValueType.SelfNoParse) ||
399
+ (oOperator.valueTypes[index] === Operator.ValueType.SelfNoParse && oOperatorOld.valueTypes[index] === Operator.ValueType.Self)) {
400
+ // as for Decimal values the type might change we need to format and parse again
401
+ var oType = _getFieldType.call(this, oOperator.name, index);
402
+ var oTypeOld = _getFieldType.call(this, oOperatorOld.name, index);
403
+ var sValue = oTypeOld.formatValue(oCondition.values[index], "string");
404
+ var vValue = oType.parseValue(sValue, "string");
405
+ if (vValue !== oCondition.values[index]) {
406
+ oCondition.values[index] = oType.parseValue(sValue, "string");
407
+ bUpdate = true;
408
+ }
409
+ } else {
410
+ oCondition.values[index] = null;
412
411
  bUpdate = true;
413
412
  }
414
- } else {
415
- oCondition.values[index] = null;
416
- bUpdate = true;
417
413
  }
414
+ }.bind(this));
415
+ }
416
+ }
417
+
418
+ if (iIndex >= 0 && oOperator.valueDefaults) {
419
+ // sets the default values for the operator back to default, if the condition is inital or the value is null
420
+ oCondition.values.forEach(function(value, index) {
421
+ if ((oCondition.isInitial && value !== oOperator.valueDefaults[index]) || (value === null)) {
422
+ // set the default value and mark the condition as initial
423
+ oCondition.values[index] = oOperator.valueDefaults[index];
424
+ oCondition.isInitial = true;
425
+ bUpdate = true;
418
426
  }
419
- }.bind(this));
427
+ });
420
428
  }
421
- }
422
429
 
423
- if (iIndex >= 0 && oOperator.valueDefaults) {
424
- // sets the default values for the operator back to default, if the condition is inital or the value is null
425
- oCondition.values.forEach(function(value, index) {
426
- if ((oCondition.isInitial && value !== oOperator.valueDefaults[index]) || (value === null)) {
427
- // set the default value and mark the condition as initial
428
- oCondition.values[index] = oOperator.valueDefaults[index];
429
- oCondition.isInitial = true;
430
- bUpdate = true;
430
+ if (!oOperator.valueTypes[1] && oOperatorOld.valueTypes[1]) {
431
+ // switch from BT to EQ -> remove second value even if filled
432
+ if (iIndex >= 0) {
433
+ if (oCondition.values.length > 1 && oCondition.values[1]) {
434
+ oCondition.values = oCondition.values.slice(0, 1);
435
+ bUpdate = true;
436
+ }
431
437
  }
432
- });
433
- }
434
-
438
+ }
435
439
 
436
- if (!oOperator.valueTypes[1] && oOperatorOld.valueTypes[1]) {
437
- // switch from BT to EQ -> remove second value even if filled
438
- if (iIndex >= 0) {
439
- if (oCondition.values.length > 1 && oCondition.values[1]) {
440
- oCondition.values = oCondition.values.slice(0, 1);
441
- bUpdate = true;
442
- }
440
+ if (oCondition.invalid) {
441
+ delete oCondition.invalid;
442
+ bUpdate = true;
443
+ }
444
+ if (bUpdate) {
445
+ FilterOperatorUtil.checkConditionsEmpty(oCondition, _getOperators.call(this));
446
+ this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
447
+ _checkInvalidInput.call(this, false); // set imediately, not only if row left
443
448
  }
444
449
  }
445
450
 
446
- if (oCondition.invalid) {
447
- delete oCondition.invalid;
448
- bUpdate = true;
449
- }
450
- if (bUpdate) {
451
- FilterOperatorUtil.checkConditionsEmpty(oCondition, _getOperators.call(this));
452
- this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
453
- _checkInvalidInput.call(this, false); // set imediately, not only if row left
451
+ delete oField._sOldKey;
452
+ }.bind(this)).catch(function (oException) { // if Operator in error state -> don't update values
453
+ var oCondition = oField.getBindingContext("$this").getObject();
454
+ var aConditions = this.getConditions();
455
+ var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions);
456
+ if (iIndex >= 0) {
457
+ oCondition = aConditions[iIndex]; // to get right instance
454
458
  }
455
- }
459
+ oCondition.invalid = true;
460
+ this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
461
+ oField._sOldKey = oField.getValue();
462
+ _checkInvalidInput.call(this, true); // set imediately, not only if row left
463
+ }.bind(this));
456
464
 
457
- delete oField._sOldKey;
458
465
  },
459
466
 
460
467
  onPaste: function(oEvent) {
@@ -880,16 +887,17 @@ sap.ui.define([
880
887
 
881
888
  var bHasMultipleGroups = _hasMultipleOperatorGroups.call(this);
882
889
 
883
- var sFieldHelpId = this.getId() + "--rowSelect-help";
884
- var oListFieldHelp = sap.ui.getCore().byId(sFieldHelpId);
890
+ var sFixedListId = this.getId() + "--rowSelect-help-pop-fl";
891
+ var oFixedList = sap.ui.getCore().byId(sFixedListId);
885
892
 
886
893
  var oTemplate;
887
894
  if (bHasMultipleGroups) {
888
895
  oTemplate = new ListFieldHelpItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}", groupKey: "{om>groupId}", groupText: "{om>groupText}"});
889
896
  } else {
890
- oTemplate = new ListItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}"});
897
+ oTemplate = new ListFieldHelpItem({key: "{om>key}", text: "{om>text}", additionalText: "{om>additionalText}"});
891
898
  }
892
- oListFieldHelp.bindAggregation("items", { path: 'om>/', templateShareable: false, template: oTemplate});
899
+ oFixedList.bindAggregation("items", { path: 'om>/', templateShareable: false, template: oTemplate});
900
+ oFixedList.setGroupable(bHasMultipleGroups);
893
901
 
894
902
  for (var i = 0; i < aOperators.length; i++) {
895
903
  var sOperator = aOperators[i];
@@ -1016,9 +1024,13 @@ sap.ui.define([
1016
1024
  ).addStyleClass("sapMdcDefineconditionPanel");
1017
1025
 
1018
1026
  oPanel.addDependent(
1019
- new ListFieldHelp(this.getId() + "--rowSelect-help", {
1020
- filterList: false,
1021
- useFirstMatch: true
1027
+ new ValueHelp(this.getId() + "--rowSelect-help", {
1028
+ typeahead: new Popover(this.getId() + "--rowSelect-help-pop", {
1029
+ content: [new FixedList(this.getId() + "--rowSelect-help-pop-fl", {
1030
+ filterList: false,
1031
+ useFirstMatch: true
1032
+ })]
1033
+ })
1022
1034
  })
1023
1035
  );
1024
1036
 
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @extends sap.ui.mdc.field.ConditionsType
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.102.1
49
+ * @version 1.103.1
50
50
  *
51
51
  * @since 1.96.0
52
52
  * @private
@@ -166,78 +166,25 @@ sap.ui.define([
166
166
 
167
167
  function _dateToTimestamp(vValue) {
168
168
 
169
- var oType = _getInternalType.call(this);
170
- var sBaseType = _getBaseType.call(this);
171
- var sDate = oType.formatValue(vValue, "string");
172
- var aParts;
173
- var iHour = 0;
174
- var iMinute = 0;
175
- var iSecond = 0;
176
- var iMillisecond = 0;
177
-
178
- if (sBaseType === BaseType.DateTime) {
179
- aParts = sDate.split("T");
180
- sDate = aParts[0];
181
- var sTime = aParts[1];
182
- aParts = sTime.split(":");
183
- iHour = parseInt(aParts[0]);
184
- iMinute = parseInt(aParts[1]);
185
- iSecond = parseInt(aParts[2]);
186
- // iMillisecond = parseInt(aParts[3]);
187
- }
188
-
189
- aParts = sDate.split("-");
190
- var iYear = parseInt(aParts[0]);
191
- var iMonth = parseInt(aParts[1]) - 1;
192
- var iDate = parseInt(aParts[2]);
193
- var iTimeStamp = new Date(iYear, iMonth, iDate, iHour, iMinute, iSecond, iMillisecond).getTime();
194
-
195
- return iTimeStamp;
169
+ var oType = _getValueType.call(this);
170
+ var oModelFormat = oType.getModelFormat();
171
+ var oDate = oModelFormat.parse(vValue); // All Date and DateTime types parse the model specific value into a JS-Date via ModelFormat. UTC is used, so the JS Date is timezone independent. For Date types UTC 00:00:00 is used.
172
+ return oDate.getTime();
196
173
 
197
174
  }
198
175
 
199
176
  function _timestampToDate(iTimeStamp) {
200
177
 
201
- var oType = _getInternalType.call(this);
202
- var sBaseType = _getBaseType.call(this);
178
+ var oType = _getValueType.call(this);
179
+ var oModelFormat = oType.getModelFormat();
203
180
  var oDate = new Date(iTimeStamp);
204
- var iYear = oDate.getFullYear();
205
- var iMonth = oDate.getMonth() + 1;
206
- var iDate = oDate.getDate();
207
- var sDate = iYear.toString() + "-" + ((iMonth < 10) ? "0" : "") + iMonth.toString() + "-" + ((iDate < 10) ? "0" : "") + iDate.toString();
208
-
209
- if (sBaseType === BaseType.DateTime) {
210
- var iHour = oDate.getHours();
211
- var iMinute = oDate.getMinutes();
212
- var iSecond = oDate.getSeconds();
213
- var iMillisecond = 0/*oDate.getMilliseconds()*/;
214
- sDate = sDate + "T" + ((iHour < 10) ? "0" : "") + iHour.toString() + ":" + ((iMinute < 10) ? "0" : "") + iMinute.toString() + ":" + ((iSecond < 10) ? "0" : "") + iSecond.toString() + ":" + ((iMillisecond < 100) ? "0" : "") + ((iMillisecond < 10) ? "0" : "") + iMillisecond.toString();
215
- }
216
- var vDate = oType.parseValue(sDate, "string");
181
+ oDate.setUTCMilliseconds(0); // ignore missiseconds for the moment (As not saved in variants)
182
+ var vDate = oModelFormat.format(oDate); // All Date and DateTime types parse the model specific value into a JS-Date via ModelFormat. UTC is used, so the JS Date is timezone independent. For Date types UTC 00:00:00 is used.
217
183
 
218
184
  return vDate;
219
185
 
220
186
  }
221
187
 
222
- function _getInternalType() {
223
-
224
- if (!this._oInternalType) {
225
- var oType = _getValueType.call(this);
226
- var sBaseType = _getBaseType.call(this);
227
- var sPattern;
228
-
229
- if (sBaseType === BaseType.DateTime) {
230
- sPattern = "yyyy-MM-dd'T'HH:mm:ss:SSS";
231
- } else {
232
- sPattern = "yyyy-MM-dd";
233
- }
234
- this._oInternalType = DateUtil.createInternalType(oType, sPattern);
235
- }
236
-
237
- return this._oInternalType;
238
-
239
- }
240
-
241
188
  DynamicDateRangeConditionsType.prototype.parseValue = function(oValue, sInternalType) {
242
189
 
243
190
  if (this._bDestroyed) { // if destroyed do nothing