@openui5/sap.ui.mdc 1.124.2 → 1.126.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 (171) hide show
  1. package/.reuse/dep5 +9 -4
  2. package/THIRDPARTY.txt +13 -6
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +2 -2
  6. package/src/sap/ui/mdc/Chart.js +69 -40
  7. package/src/sap/ui/mdc/ChartDelegate.js +50 -26
  8. package/src/sap/ui/mdc/Control.js +1 -1
  9. package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
  10. package/src/sap/ui/mdc/Element.js +1 -1
  11. package/src/sap/ui/mdc/Field.js +2 -2
  12. package/src/sap/ui/mdc/FilterBar.js +55 -7
  13. package/src/sap/ui/mdc/FilterField.js +68 -11
  14. package/src/sap/ui/mdc/Link.js +6 -5
  15. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  16. package/src/sap/ui/mdc/Table.js +8 -2
  17. package/src/sap/ui/mdc/ValueHelp.js +22 -1
  18. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  19. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
  20. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +220 -113
  21. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  22. package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +10 -6
  23. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  24. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  25. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  26. package/src/sap/ui/mdc/condition/ConditionModelPropertyBinding.js +22 -4
  27. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  28. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +19 -11
  29. package/src/sap/ui/mdc/condition/Operator.js +3 -3
  30. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +2 -2
  31. package/src/sap/ui/mdc/condition/RangeOperator.js +34 -8
  32. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +6 -3
  33. package/src/sap/ui/mdc/field/ConditionType.js +35 -40
  34. package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
  35. package/src/sap/ui/mdc/field/ConditionsType.js +10 -6
  36. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  37. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -1
  38. package/src/sap/ui/mdc/field/FieldBase.js +66 -22
  39. package/src/sap/ui/mdc/field/FieldInfoBase.js +12 -3
  40. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  41. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  42. package/src/sap/ui/mdc/field/FieldMultiInput.js +108 -4
  43. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  44. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  45. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  46. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  47. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +1 -0
  48. package/src/sap/ui/mdc/field/content/DateContent.js +2 -2
  49. package/src/sap/ui/mdc/field/content/DefaultContent.js +4 -4
  50. package/src/sap/ui/mdc/field/content/UnitContent.js +3 -3
  51. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +19 -3
  52. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  53. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +2 -2
  54. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  55. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  56. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  57. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  58. package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +90 -100
  59. package/src/sap/ui/mdc/flexibility/Util.js +5 -2
  60. package/src/sap/ui/mdc/library.js +2 -2
  61. package/src/sap/ui/mdc/link/Factory.js +1 -1
  62. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  63. package/src/sap/ui/mdc/link/Panel.js +12 -15
  64. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  65. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  66. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  67. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  68. package/src/sap/ui/mdc/messagebundle.properties +5 -0
  69. package/src/sap/ui/mdc/messagebundle_ar.properties +3 -0
  70. package/src/sap/ui/mdc/messagebundle_bg.properties +3 -0
  71. package/src/sap/ui/mdc/messagebundle_ca.properties +3 -0
  72. package/src/sap/ui/mdc/messagebundle_cnr.properties +3 -0
  73. package/src/sap/ui/mdc/messagebundle_cs.properties +3 -0
  74. package/src/sap/ui/mdc/messagebundle_cy.properties +3 -0
  75. package/src/sap/ui/mdc/messagebundle_da.properties +3 -0
  76. package/src/sap/ui/mdc/messagebundle_de.properties +5 -2
  77. package/src/sap/ui/mdc/messagebundle_el.properties +3 -0
  78. package/src/sap/ui/mdc/messagebundle_en.properties +3 -0
  79. package/src/sap/ui/mdc/messagebundle_en_GB.properties +3 -0
  80. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -0
  81. package/src/sap/ui/mdc/messagebundle_es.properties +3 -0
  82. package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -0
  83. package/src/sap/ui/mdc/messagebundle_et.properties +3 -0
  84. package/src/sap/ui/mdc/messagebundle_fi.properties +3 -0
  85. package/src/sap/ui/mdc/messagebundle_fr.properties +3 -0
  86. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +3 -0
  87. package/src/sap/ui/mdc/messagebundle_hi.properties +3 -0
  88. package/src/sap/ui/mdc/messagebundle_hr.properties +3 -0
  89. package/src/sap/ui/mdc/messagebundle_hu.properties +3 -0
  90. package/src/sap/ui/mdc/messagebundle_id.properties +3 -0
  91. package/src/sap/ui/mdc/messagebundle_it.properties +3 -0
  92. package/src/sap/ui/mdc/messagebundle_iw.properties +3 -0
  93. package/src/sap/ui/mdc/messagebundle_ja.properties +5 -2
  94. package/src/sap/ui/mdc/messagebundle_kk.properties +3 -0
  95. package/src/sap/ui/mdc/messagebundle_ko.properties +3 -0
  96. package/src/sap/ui/mdc/messagebundle_lt.properties +3 -0
  97. package/src/sap/ui/mdc/messagebundle_lv.properties +3 -0
  98. package/src/sap/ui/mdc/messagebundle_mk.properties +3 -0
  99. package/src/sap/ui/mdc/messagebundle_ms.properties +3 -0
  100. package/src/sap/ui/mdc/messagebundle_nl.properties +3 -0
  101. package/src/sap/ui/mdc/messagebundle_no.properties +3 -0
  102. package/src/sap/ui/mdc/messagebundle_pl.properties +3 -0
  103. package/src/sap/ui/mdc/messagebundle_pt.properties +3 -0
  104. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +3 -0
  105. package/src/sap/ui/mdc/messagebundle_ro.properties +3 -0
  106. package/src/sap/ui/mdc/messagebundle_ru.properties +3 -0
  107. package/src/sap/ui/mdc/messagebundle_sh.properties +3 -0
  108. package/src/sap/ui/mdc/messagebundle_sk.properties +3 -0
  109. package/src/sap/ui/mdc/messagebundle_sl.properties +3 -0
  110. package/src/sap/ui/mdc/messagebundle_sr.properties +3 -0
  111. package/src/sap/ui/mdc/messagebundle_sv.properties +3 -0
  112. package/src/sap/ui/mdc/messagebundle_th.properties +4 -1
  113. package/src/sap/ui/mdc/messagebundle_tr.properties +3 -0
  114. package/src/sap/ui/mdc/messagebundle_uk.properties +3 -0
  115. package/src/sap/ui/mdc/messagebundle_vi.properties +3 -0
  116. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +3 -0
  117. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +3 -0
  118. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  119. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  120. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  121. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  122. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  123. package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
  124. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +3 -1
  125. package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
  126. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +1 -1
  127. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  128. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +10 -3
  129. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +7 -3
  130. package/src/sap/ui/mdc/table/Column.js +6 -0
  131. package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
  132. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  133. package/src/sap/ui/mdc/table/DragDropConfig.js +37 -13
  134. package/src/sap/ui/mdc/table/GridTableType.js +1 -1
  135. package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
  136. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
  137. package/src/sap/ui/mdc/table/ResponsiveTableType.js +6 -7
  138. package/src/sap/ui/mdc/table/RowActionItem.js +2 -1
  139. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  140. package/src/sap/ui/mdc/table/TableTypeBase.js +1 -0
  141. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  142. package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
  143. package/src/sap/ui/mdc/themes/base/PersonalizationDialog.less +4 -4
  144. package/src/sap/ui/mdc/themes/base/Table.less +1 -0
  145. package/src/sap/ui/mdc/ushell/LinkDelegate.js +25 -19
  146. package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
  147. package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
  148. package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
  149. package/src/sap/ui/mdc/util/InfoBar.js +1 -1
  150. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  151. package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
  152. package/src/sap/ui/mdc/valuehelp/Dialog.js +2 -2
  153. package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
  154. package/src/sap/ui/mdc/valuehelp/Popover.js +21 -3
  155. package/src/sap/ui/mdc/valuehelp/base/Container.js +28 -1
  156. package/src/sap/ui/mdc/valuehelp/base/Content.js +19 -1
  157. package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +1 -1
  158. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  159. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
  160. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  161. package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
  162. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
  163. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
  164. package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
  165. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
  166. package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -45
  167. package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +339 -332
  168. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +7 -1
  169. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +23 -1
  170. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
  171. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +6 -2
@@ -66,9 +66,27 @@ sap.ui.define([
66
66
  * In case oLinkType.type is 2 the Link will get rendered as a Link and will open a Popover (default)
67
67
  */
68
68
  LinkDelegate.fetchLinkType = function(oLink) {
69
+ const oPayload = oLink.getPayload();
70
+
71
+ if (oPayload && oPayload.semanticObjects) {
72
+ return LinkDelegate.hasDistinctSemanticObjects(oPayload.semanticObjects).then((bHasDisctinctSemanticObject) => {
73
+ return Promise.resolve({
74
+ type: bHasDisctinctSemanticObject ? LinkType.Popover : LinkType.Text,
75
+ directLink: undefined
76
+ });
77
+ });
78
+ } else {
79
+ throw new Error("no payload or semanticObjects found");
80
+ }
81
+ };
82
+
83
+ /**
84
+ * @param {string[]} aSemanticObjects Names of the SemanticObjects to check
85
+ * @returns {Promise<boolean>} Promise resolving to true if atleast one SemanticObject exists
86
+ */
87
+ LinkDelegate.hasDistinctSemanticObjects = (aSemanticObjects) => {
69
88
  const mSemanticObjects = {};
70
89
  let oPromise = null;
71
- const oPayload = oLink.getPayload();
72
90
 
73
91
  const fnHaveBeenRetrievedAllSemanticObjects = function(aSemanticObjects) {
74
92
  return aSemanticObjects.filter((sSemanticObject) => {
@@ -104,25 +122,13 @@ sap.ui.define([
104
122
  }
105
123
  return oPromise;
106
124
  };
107
- const fnHasDistinctSemanticObject = function(aSemanticObjects) {
108
- if (fnHaveBeenRetrievedAllSemanticObjects(aSemanticObjects)) {
109
- return Promise.resolve(fnAtLeastOneExistsSemanticObject(aSemanticObjects));
110
- }
111
- return fnRetrieveDistinctSemanticObjects().then(() => {
112
- return fnAtLeastOneExistsSemanticObject(aSemanticObjects);
113
- });
114
- };
115
125
 
116
- if (oPayload && oPayload.semanticObjects) {
117
- return fnHasDistinctSemanticObject(oPayload.semanticObjects).then((bHasDisctinctSemanticObject) => {
118
- return Promise.resolve({
119
- type: bHasDisctinctSemanticObject ? LinkType.Popover : LinkType.Text,
120
- directLink: undefined
121
- });
122
- });
123
- } else {
124
- throw new Error("no payload or semanticObjects found");
126
+ if (fnHaveBeenRetrievedAllSemanticObjects(aSemanticObjects)) {
127
+ return Promise.resolve(fnAtLeastOneExistsSemanticObject(aSemanticObjects));
125
128
  }
129
+ return fnRetrieveDistinctSemanticObjects().then(() => {
130
+ return fnAtLeastOneExistsSemanticObject(aSemanticObjects);
131
+ });
126
132
  };
127
133
 
128
134
  /**
@@ -234,7 +240,7 @@ sap.ui.define([
234
240
  ownNavigation: undefined,
235
241
  availableActions: []
236
242
  };
237
- return Library.load({name: 'sap.ui.fl'}).then(() => {
243
+ return Library.load({ name: 'sap.ui.fl' }).then(() => {
238
244
 
239
245
  const Utils = sap.ui.require('sap/ui/fl/Utils');
240
246
  if (!Utils) {
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @param {object} [mSettings] initial settings for the new control
17
17
  * @class Type for...
18
18
  * @extends sap.ui.core.Element
19
- * @version 1.124.2
19
+ * @version 1.126.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.120
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @param {object} [mSettings] initial settings for the new control
17
17
  * @class Type for...
18
18
  * @extends sap.ui.core.Element
19
- * @version 1.124.2
19
+ * @version 1.126.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.120
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @param {object} [mSettings] initial settings for the new control
17
17
  * @class Type for...
18
18
  * @extends sap.ui.core.Element
19
- * @version 1.124.2
19
+ * @version 1.126.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.120
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class The <code>InfoBar</code> control provides an easy way of displaying filter information inside an <code>sap.ui.mdc.Chart</code> and an <code>sap.ui.mdc.Table</code>.
25
25
  * @extends sap.ui.core.Control
26
26
  * @author SAP SE
27
- * @version 1.124.2
27
+ * @version 1.126.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @ui5-restricted sap.ui.mdc
@@ -45,7 +45,7 @@ sap.ui.define(
45
45
  * Destroying the cache will cancel all registered promises and delete references. Convenience methods for promise creation, wrapping and replacement are offered.
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.124.2
48
+ * @version 1.126.0
49
49
  * @alias sap.ui.mdc.util.PromiseCache
50
50
  * @since 1.85.0
51
51
  * @private
@@ -592,7 +592,7 @@ sap.ui.define([
592
592
  * @extends sap.ui.base.Object
593
593
  *
594
594
  * @author SAP SE
595
- * @version 1.124.2
595
+ * @version 1.126.0
596
596
  *
597
597
  * @private
598
598
  * @since 1.83
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * @param {object} [mSettings] Initial settings for the new control
66
66
  * @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a dialog.
67
67
  * @extends sap.ui.mdc.valuehelp.base.Container
68
- * @version 1.124.2
68
+ * @version 1.126.0
69
69
  * @constructor
70
70
  * @public
71
71
  * @since 1.95.0
@@ -755,7 +755,7 @@ sap.ui.define([
755
755
  const oFilter = new Filter({ path: 'isEmpty', operator: 'NE', value1: true });
756
756
  this._oConditionType.setFormatOptions(_getConditionFormatOptions.call(this)); // as config might be changed
757
757
  const oTokenTemplate = new Token(this.getId() + "-Token", { text: { path: '$valueHelp>', type: this._oConditionType } });
758
- this.oTokenMultiInput.bindAggregation("tokens", { path: '/conditions', model: "$valueHelp", templateShareable: false, template: oTokenTemplate, filters: oFilter });
758
+ this.oTokenMultiInput.bindAggregation("tokens", { path: '/conditions', model: "$valueHelp", templateShareable: false, template: oTokenTemplate, filters: oFilter, length: 50, startIndex: -50 });
759
759
  }
760
760
  } else if (oBindingInfo) { // remove binding if dialog is closed to prevent updated on tokens if conditions are updated. (Suspend would not be enough, as every single binding on token would need to be suspended too.)
761
761
  this.oTokenMultiInput.unbindAggregation("tokens");
@@ -43,7 +43,7 @@ sap.ui.define(
43
43
  * <b>Note:</b> The <code>FilterBar</code> can only be used for a {@link sap.ui.mdc.valuehelp.Dialog Dialog} and not on its own.
44
44
  * @extends sap.ui.mdc.filterbar.FilterBarBase
45
45
  * @author SAP SE
46
- * @version 1.124.2
46
+ * @version 1.126.0
47
47
  * @constructor
48
48
  * @public
49
49
  * @since 1.124.0
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @param {object} [mSettings] Initial settings for the new control
36
36
  * @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element showing a popover.
37
37
  * @extends sap.ui.mdc.valuehelp.base.Container
38
- * @version 1.124.2
38
+ * @version 1.126.0
39
39
  * @constructor
40
40
  * @public
41
41
  * @since 1.95.0
@@ -215,8 +215,6 @@ sap.ui.define([
215
215
  this._oInvisibleText = new InvisibleText({ text: Library.getResourceBundleFor("sap.ui.mdc").getText("valuehelp.POPOVER_AVALIABLE_VALUES") }).toStatic();
216
216
  oPopover.addAriaLabelledBy(this._oInvisibleText);
217
217
 
218
- oPopover.setFollowOf(false);
219
-
220
218
  if (oValueStateHeader) {
221
219
  oValueStateHeader.setPopup(oPopover);
222
220
  }
@@ -633,10 +631,25 @@ sap.ui.define([
633
631
  const bSingleSelect = this.isSingleSelect();
634
632
  const bClose = oEvent.getParameter("close");
635
633
  if (!Device.system.phone || bSingleSelect || bClose) {
634
+ if (!bClose) {
635
+ this._disableFollowOfTemporarily();
636
+ }
636
637
  this.fireConfirm({ close: bClose || bSingleSelect });
637
638
  }
638
639
  };
639
640
 
641
+ // Workaround to prevent the popup from closing unexpectedly should formatting lead to field size adjustments
642
+ Popover.prototype._disableFollowOfTemporarily = function () {
643
+ if (this._followOfTimer) {
644
+ clearTimeout(this._followOfTimer);
645
+ }
646
+ const oPopover = this.getAggregation("_container");
647
+ oPopover.setFollowOf(false);
648
+ this._followOfTimer = setTimeout(() => {
649
+ oPopover.setFollowOf(true);
650
+ }, 300);
651
+ };
652
+
640
653
  Popover.prototype.handleCanceled = function(oEvent) {
641
654
  if (!Device.system.phone) { // on phone don't cancel if filterValue cleared
642
655
  Container.prototype.handleCanceled.apply(this, arguments);
@@ -797,6 +810,11 @@ sap.ui.define([
797
810
  this._oTokenConditionType = undefined;
798
811
  }
799
812
 
813
+ if (this._followOfTimer) {
814
+ clearTimeout(this._followOfTimer);
815
+ this._followOfTimer = null;
816
+ }
817
+
800
818
  Container.prototype.exit.apply(this, arguments);
801
819
  };
802
820
 
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @param {object} [mSettings] Initial settings for the new element
27
27
  * @class Container for the {@link sap.ui.mdc.ValueHelp ValueHelp} element.
28
28
  * @extends sap.ui.core.Element
29
- * @version 1.124.2
29
+ * @version 1.126.0
30
30
  * @constructor
31
31
  * @abstract
32
32
  * @public
@@ -76,6 +76,9 @@ sap.ui.define([
76
76
  events: {
77
77
  /**
78
78
  * This event is fired if the selected condition has changed.
79
+ *
80
+ * @private
81
+ * @ui5-restricted sap.ui.mdc.ValueHelp
79
82
  */
80
83
  select: {
81
84
  parameters: {
@@ -93,6 +96,9 @@ sap.ui.define([
93
96
  },
94
97
  /**
95
98
  * This event is fired if a change of the value help is confirmed.
99
+ *
100
+ * @private
101
+ * @ui5-restricted sap.ui.mdc.ValueHelp
96
102
  */
97
103
  confirm: {
98
104
  parameters: {
@@ -104,6 +110,9 @@ sap.ui.define([
104
110
  },
105
111
  /**
106
112
  * This event is fired if the value help is opened.
113
+ *
114
+ * @private
115
+ * @ui5-restricted sap.ui.mdc.ValueHelp
107
116
  */
108
117
  opened: {
109
118
  parameters: {
@@ -115,14 +124,23 @@ sap.ui.define([
115
124
  },
116
125
  /**
117
126
  * This event is fired if the value help is closed.
127
+ *
128
+ * @private
129
+ * @ui5-restricted sap.ui.mdc.ValueHelp
118
130
  */
119
131
  closed: {},
120
132
  /**
121
133
  * This event is fired if the change is cancelled.
134
+ *
135
+ * @private
136
+ * @ui5-restricted sap.ui.mdc.ValueHelp
122
137
  */
123
138
  cancel: {},
124
139
  /**
125
140
  * This event is fired if the container requests the delegate content.
141
+ *
142
+ * @private
143
+ * @ui5-restricted sap.ui.mdc.ValueHelp
126
144
  */
127
145
  requestDelegateContent: {
128
146
  parameters: {
@@ -134,10 +152,16 @@ sap.ui.define([
134
152
  },
135
153
  /**
136
154
  * This event is fired if the value help should switch to dialog mode.
155
+ *
156
+ * @private
157
+ * @ui5-restricted sap.ui.mdc.ValueHelp
137
158
  */
138
159
  requestSwitchToDialog: {},
139
160
  /**
140
161
  * This event is fired if a navigation has been executed in the content of the container.
162
+ *
163
+ * @private
164
+ * @ui5-restricted sap.ui.mdc.ValueHelp
141
165
  */
142
166
  navigated: {
143
167
  parameters: {
@@ -159,6 +183,9 @@ sap.ui.define([
159
183
  },
160
184
  /**
161
185
  * This event is fired after a suggested item has been found for a type-ahead.
186
+ *
187
+ * @private
188
+ * @ui5-restricted sap.ui.mdc.ValueHelp
162
189
  * @since 1.120.0
163
190
  */
164
191
  typeaheadSuggested: {
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @param {object} [mSettings] Initial settings for the new element
35
35
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
36
36
  * @extends sap.ui.core.Element
37
- * @version 1.124.2
37
+ * @version 1.126.0
38
38
  * @constructor
39
39
  * @abstract
40
40
  * @public
@@ -132,6 +132,9 @@ sap.ui.define([
132
132
  events: {
133
133
  /**
134
134
  * This event is fired if the selected condition has changed.
135
+ *
136
+ * @private
137
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
135
138
  */
136
139
  select: {
137
140
  parameters: {
@@ -149,6 +152,9 @@ sap.ui.define([
149
152
  },
150
153
  /**
151
154
  * This event is fired if a change of the content is confirmed.
155
+ *
156
+ * @private
157
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
152
158
  */
153
159
  confirm: {
154
160
  parameters: {
@@ -160,15 +166,24 @@ sap.ui.define([
160
166
  },
161
167
  /**
162
168
  * This event is fired if the change is cancelled.
169
+ *
170
+ * @private
171
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
163
172
  */
164
173
  cancel: {},
165
174
 
166
175
  /**
167
176
  * This event is fired if the value help should switch to dialog mode.
177
+ *
178
+ * @private
179
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
168
180
  */
169
181
  requestSwitchToDialog: {},
170
182
  /**
171
183
  * This event is fired if a navigation has been executed in the content.
184
+ *
185
+ * @private
186
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
172
187
  */
173
188
  navigated: {
174
189
  parameters: {
@@ -190,6 +205,9 @@ sap.ui.define([
190
205
  },
191
206
  /**
192
207
  * This event is fired after a suggested item has been found for a type-ahead.
208
+ *
209
+ * @private
210
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
193
211
  * @since 1.120.0
194
212
  */
195
213
  typeaheadSuggested: {
@@ -121,7 +121,7 @@ sap.ui.define([
121
121
  * @extends sap.ui.core.Control
122
122
  *
123
123
  * @author SAP SE
124
- * @version 1.124.2
124
+ * @version 1.126.0
125
125
  *
126
126
  * @constructor
127
127
  * @alias sap.ui.mdc.valuehelp.base.DefineConditionPanel
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @param {object} [mSettings] Initial settings for the new control
21
21
  * @class Content for the <code>sap.ui.mdc.valuehelp.content.Dialog</code> element.
22
22
  * @extends sap.ui.core.Control
23
- * @version 1.124.2
23
+ * @version 1.126.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.mdc
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @param {object} [mSettings] Initial settings for the new element
45
45
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
46
46
  * @extends sap.ui.mdc.valuehelp.base.ListContent
47
- * @version 1.124.2
47
+ * @version 1.126.0
48
48
  * @constructor
49
49
  * @abstract
50
50
  * @public
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @param {object} [mSettings] Initial settings for the new element
22
22
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element.
23
23
  * @extends sap.ui.mdc.valuehelp.base.Content
24
- * @version 1.124.2
24
+ * @version 1.126.0
25
25
  * @constructor
26
26
  * @abstract
27
27
  * @public
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @param {object} [mSettings] Initial settings for the new element
21
21
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element to provide a value help for boolean fields.
22
22
  * @extends sap.ui.mdc.valuehelp.content.FixedList
23
- * @version 1.124.2
23
+ * @version 1.126.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.mdc
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @param {object} [mSettings] Initial settings for the new element
28
28
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a condition panel.
29
29
  * @extends sap.ui.mdc.valuehelp.base.Content
30
- * @version 1.124.2
30
+ * @version 1.126.0
31
31
  * @constructor
32
32
  * @public
33
33
  * @since 1.95.0
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @param {object} [mSettings] Initial settings for the new element
33
33
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element showing a list with fixed values.
34
34
  * @extends sap.ui.mdc.valuehelp.base.ListContent
35
- * @version 1.124.2
35
+ * @version 1.126.0
36
36
  * @constructor
37
37
  * @public
38
38
  * @since 1.95.0
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.ui.core.ListItem
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.124.2
26
+ * @version 1.126.0
27
27
  *
28
28
  * @public
29
29
  * @since 1.114.0
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @param {object} [mSettings] Initial settings for the new element
37
37
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.ui.mdc.Table}.
38
38
  * @extends sap.ui.mdc.valuehelp.base.FilterableListContent
39
- * @version 1.124.2
39
+ * @version 1.126.0
40
40
  * @constructor
41
41
  * @public
42
42
  * @since 1.95.0
@@ -51,7 +51,7 @@ sap.ui.define([
51
51
  * @param {object} [mSettings] Initial settings for the new element
52
52
  * @class Content for the {@link sap.ui.mdc.valuehelp.base.Container Container} element using a {@link sap.m.Table}.
53
53
  * @extends sap.ui.mdc.valuehelp.base.FilterableListContent
54
- * @version 1.124.2
54
+ * @version 1.126.0
55
55
  * @constructor
56
56
  * @public
57
57
  * @since 1.95.0
@@ -290,22 +290,38 @@ sap.ui.define([
290
290
  return this._oTable;
291
291
  };
292
292
 
293
+ /*
294
+ * For non-typeahead multi-select content, 'SingleSelectMaster', 'SingleSelectLeft' and 'MultiSelect' are considered valid.
295
+ * For typeahead content, 'SingleSelectLeft' is considered invalid.
296
+ * For single-select content, 'MultiSelect' mode is considered invalid.
297
+ */
298
+ function _getValidTableSelectModes(bTypeahead, bEnforceSingleSelect) {
299
+ return [
300
+ ListMode.SingleSelectMaster,
301
+ ...bTypeahead ? [] : [ListMode.SingleSelectLeft],
302
+ ...bEnforceSingleSelect ? [] : [ListMode.MultiSelect]
303
+ ];
304
+ }
305
+
293
306
  MTable.prototype.onShow = function(bInitial) {
294
307
  const oTable = this._getTable();
295
308
  if (oTable) {
296
309
  if (!oTable.hasStyleClass("sapMComboBoxList")) { // TODO: only in typeahead case?
297
310
  oTable.addStyleClass("sapMComboBoxList"); // to allow focus outline in navigation
298
311
  }
299
- // check if selection mode is fine
300
- let sSelectionMode = this.isTypeahead() ? ListMode.SingleSelectMaster : ListMode.SingleSelectLeft;
301
- if (!FilterableListContent.prototype.isSingleSelect.apply(this) && oTable.getMode() !== sSelectionMode) { // if in multi-select mode only single-selection on table is allowed this is also OK
302
- sSelectionMode = ListMode.MultiSelect;
303
- }
304
- if (oTable.getMode() === ListMode.None) { // only set automatically if not provided from outside (and do it only once)
305
- oTable.setMode(sSelectionMode);
306
- }
307
- if (oTable.getMode() !== sSelectionMode) {
308
- throw new Error("Table selection mode needs to be " + sSelectionMode);
312
+
313
+ const bTypeahead = this.isTypeahead();
314
+ const bEnforceSingleSelect = FilterableListContent.prototype.isSingleSelect.apply(this);
315
+ const sTableSelectMode = oTable.getMode();
316
+
317
+ if (sTableSelectMode === ListMode.None) { // set selection mode, if none is given
318
+ const sPreferredSingleSelectMode = bTypeahead ? ListMode.SingleSelectMaster : ListMode.SingleSelectLeft;
319
+ oTable.setMode(bEnforceSingleSelect ? sPreferredSingleSelectMode : ListMode.MultiSelect);
320
+ } else { // check if selection mode is fine
321
+ const aValidSelectModes = _getValidTableSelectModes(bTypeahead, bEnforceSingleSelect);
322
+ if (!aValidSelectModes.includes(sTableSelectMode)) {
323
+ throw new Error(`Table selection mode needs to be '${aValidSelectModes.join("' or '")}'`);
324
+ }
309
325
  }
310
326
  }
311
327
 
@@ -423,9 +439,18 @@ sap.ui.define([
423
439
 
424
440
  MTable.prototype.getItemForValue = function(oConfig) {
425
441
 
426
- if (!oConfig.checkKey && oConfig.parsedValue && !oConfig.checkDescription) {
442
+ if (!oConfig.checkKey && !oConfig.checkDescription) {
427
443
  return null;
428
444
  }
445
+
446
+ if (oConfig.checkKey && !oConfig.hasOwnProperty("parsedValue")) {
447
+ throw new Error("MTable: Cannot check key without a given parsedValue! " + this.getId());
448
+ }
449
+
450
+ if (oConfig.checkDescription && !oConfig.hasOwnProperty("parsedDescription")) {
451
+ throw new Error("MTable: Cannot check description without a given parsedDescription! " + this.getId());
452
+ }
453
+
429
454
  if (oConfig.checkKey && !this.getKeyPath()) {
430
455
  throw new Error("MTable: KeyPath missing! " + this.getId());
431
456
  }
@@ -519,7 +544,7 @@ sap.ui.define([
519
544
 
520
545
  let oFilter = aFilters.length > 1 ? new Filter({ filters: aFilters, and: false }) : aFilters[0];
521
546
 
522
- if (oConditions) {
547
+ if (oFilter && oConditions) {
523
548
  const oConditionTypes = this._getTypesForConditions(oConditions);
524
549
  const oConditionsFilter = FilterConverter.createFilters(oConditions, oConditionTypes, undefined, this.getCaseSensitive());
525
550
  if (oConditionsFilter) {
@@ -561,10 +586,6 @@ sap.ui.define([
561
586
  return null;
562
587
  }
563
588
 
564
- /* steps:
565
- TODO: 1. wait for table binding
566
- 2. consider existing inparameters
567
- */
568
589
  const sKeyPath = this.getKeyPath();
569
590
  const sDescriptionPath = this.getDescriptionPath();
570
591
  const bUseFirstMatch = this.getUseFirstMatch();
@@ -576,35 +597,26 @@ sap.ui.define([
576
597
  const oDelegate = this.getValueHelpDelegate();
577
598
  const oValueHelp = this.getValueHelpInstance();
578
599
 
579
- const sPromiseKey = "loadItemForValue:" + JSON.stringify([sPath,
580
- sKeyPath,
581
- oConfig.parsedValue || oConfig.value,
582
- oConfig.context,
583
- oConfig.bindingContext && oConfig.bindingContext.getPath(),
584
- oConditions
585
- ]);
600
+ const oFilter = _createItemFilters.call(this, oConfig, oConditions);
601
+ const oFilterListBinding = oListBinding.getModel().bindList(sPath, oListBinding.getContext(), undefined, oFilter);
602
+ oFilterListBinding.initialize();
586
603
 
587
- return this._retrievePromise(sPromiseKey, () => {
588
- const oFilter = _createItemFilters.call(this, oConfig, oConditions);
589
- const oFilterListBinding = oListBinding.getModel().bindList(sPath, oListBinding.getContext(), undefined, oFilter);
590
- oFilterListBinding.initialize();
591
- return oDelegate.executeFilter(oValueHelp, oFilterListBinding, 2).then((oBinding) => {
592
- const aContexts = oBinding.getContexts();
593
-
594
- setTimeout(() => { // as Binding might process other steps after event was fired - destroy it lazy
595
- oFilterListBinding.destroy();
596
- }, 0);
597
-
598
- if (aContexts.length && (aContexts.length < 2 || bUseFirstMatch)) {
599
- return this.getItemFromContext(aContexts[0], { keyPath: sKeyPath, descriptionPath: sDescriptionPath, inParameters: undefined });
600
- } else if (oConfig.checkKey && oConfig.parsedValue === "" && aContexts.length === 0) {
601
- // nothing found for empty key -> this is not an error
602
- return null;
603
- } else {
604
- const oException = _createException.call(this, oConfig.exception, aContexts.length > 1, oConfig.value);
605
- throw oException;
606
- }
607
- });
604
+ return oDelegate.executeFilter(oValueHelp, oFilterListBinding, 2).then((oBinding) => {
605
+ const aContexts = oBinding.getContexts();
606
+
607
+ setTimeout(() => { // as Binding might process other steps after event was fired - destroy it lazy
608
+ oFilterListBinding.destroy();
609
+ }, 0);
610
+
611
+ if (aContexts.length && (aContexts.length < 2 || bUseFirstMatch)) {
612
+ return this.getItemFromContext(aContexts[0], { keyPath: sKeyPath, descriptionPath: sDescriptionPath, inParameters: undefined });
613
+ } else if (oConfig.checkKey && oConfig.parsedValue === "" && aContexts.length === 0) {
614
+ // nothing found for empty key -> this is not an error
615
+ return null;
616
+ } else {
617
+ const oException = _createException.call(this, oConfig.exception, aContexts.length > 1, oConfig.value);
618
+ throw oException;
619
+ }
608
620
  });
609
621
  };
610
622