@openui5/sap.ui.mdc 1.136.2 → 1.138.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 (227) hide show
  1. package/.eslintrc.json +34 -0
  2. package/REUSE.toml +0 -28
  3. package/THIRDPARTY.txt +0 -24
  4. package/package.json +4 -4
  5. package/src/sap/ui/mdc/.library +1 -1
  6. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  7. package/src/sap/ui/mdc/Chart.js +1 -1
  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 +174 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterField.js +22 -2
  14. package/src/sap/ui/mdc/Link.js +1 -1
  15. package/src/sap/ui/mdc/MultiValueField.js +14 -2
  16. package/src/sap/ui/mdc/Table.js +211 -170
  17. package/src/sap/ui/mdc/TableDelegate.js +17 -12
  18. package/src/sap/ui/mdc/ValueHelp.js +20 -1
  19. package/src/sap/ui/mdc/ValueHelpDelegate.js +6 -30
  20. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  21. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
  22. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  23. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  24. package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
  25. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  26. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  27. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  28. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  29. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +18 -18
  30. package/src/sap/ui/mdc/condition/Operator.js +3 -1
  31. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
  32. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  33. package/src/sap/ui/mdc/enums/ContentMode.js +7 -1
  34. package/src/sap/ui/mdc/field/ConditionType.js +6 -3
  35. package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
  36. package/src/sap/ui/mdc/field/ConditionsType.js +26 -4
  37. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  38. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +6 -3
  39. package/src/sap/ui/mdc/field/FieldBase.js +302 -75
  40. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +5 -2
  41. package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
  42. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  43. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  44. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  45. package/src/sap/ui/mdc/field/FieldSelect.js +459 -0
  46. package/src/sap/ui/mdc/field/FieldSelectRenderer.js +66 -0
  47. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  48. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  49. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  50. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  51. package/src/sap/ui/mdc/field/content/ContentFactory.js +35 -6
  52. package/src/sap/ui/mdc/field/content/DateContent.js +6 -0
  53. package/src/sap/ui/mdc/field/content/DateTimeContent.js +3 -0
  54. package/src/sap/ui/mdc/field/content/DefaultContent.js +45 -0
  55. package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
  56. package/src/sap/ui/mdc/field/content/SearchContent.js +6 -0
  57. package/src/sap/ui/mdc/field/content/TimeContent.js +3 -0
  58. package/src/sap/ui/mdc/field/content/UnitContent.js +18 -15
  59. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +1 -1
  60. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  61. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
  62. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  63. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  64. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  65. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  66. package/src/sap/ui/mdc/flexibility/Util.js +10 -0
  67. package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
  68. package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
  69. package/src/sap/ui/mdc/i18n/interaction.xml +2 -2
  70. package/src/sap/ui/mdc/i18n/interaction_ar.xml +3 -3
  71. package/src/sap/ui/mdc/i18n/interaction_bg.xml +2 -2
  72. package/src/sap/ui/mdc/i18n/interaction_ca.xml +2 -2
  73. package/src/sap/ui/mdc/i18n/interaction_cnr.xml +2 -2
  74. package/src/sap/ui/mdc/i18n/interaction_cs.xml +2 -2
  75. package/src/sap/ui/mdc/i18n/interaction_cy.xml +2 -2
  76. package/src/sap/ui/mdc/i18n/interaction_da.xml +2 -2
  77. package/src/sap/ui/mdc/i18n/interaction_de.xml +2 -2
  78. package/src/sap/ui/mdc/i18n/interaction_en.xml +2 -2
  79. package/src/sap/ui/mdc/i18n/interaction_en_GB.xml +2 -2
  80. package/src/sap/ui/mdc/i18n/interaction_en_US_saprigi.xml +2 -2
  81. package/src/sap/ui/mdc/i18n/interaction_es.xml +2 -2
  82. package/src/sap/ui/mdc/i18n/interaction_es_MX.xml +1 -1
  83. package/src/sap/ui/mdc/i18n/interaction_et.xml +2 -2
  84. package/src/sap/ui/mdc/i18n/interaction_fi.xml +2 -2
  85. package/src/sap/ui/mdc/i18n/interaction_hi.xml +2 -2
  86. package/src/sap/ui/mdc/i18n/interaction_hr.xml +2 -2
  87. package/src/sap/ui/mdc/i18n/interaction_hu.xml +2 -2
  88. package/src/sap/ui/mdc/i18n/interaction_id.xml +2 -2
  89. package/src/sap/ui/mdc/i18n/interaction_it.xml +2 -2
  90. package/src/sap/ui/mdc/i18n/interaction_kk.xml +2 -2
  91. package/src/sap/ui/mdc/i18n/interaction_lt.xml +2 -2
  92. package/src/sap/ui/mdc/i18n/interaction_lv.xml +2 -2
  93. package/src/sap/ui/mdc/i18n/interaction_mk.xml +2 -2
  94. package/src/sap/ui/mdc/i18n/interaction_ms.xml +2 -2
  95. package/src/sap/ui/mdc/i18n/interaction_nl.xml +1 -1
  96. package/src/sap/ui/mdc/i18n/interaction_no.xml +2 -2
  97. package/src/sap/ui/mdc/i18n/interaction_pl.xml +2 -2
  98. package/src/sap/ui/mdc/i18n/interaction_pt.xml +2 -2
  99. package/src/sap/ui/mdc/i18n/interaction_pt_PT.xml +2 -2
  100. package/src/sap/ui/mdc/i18n/interaction_ru.xml +2 -2
  101. package/src/sap/ui/mdc/i18n/interaction_sh.xml +2 -2
  102. package/src/sap/ui/mdc/i18n/interaction_sl.xml +2 -2
  103. package/src/sap/ui/mdc/i18n/interaction_sr.xml +2 -2
  104. package/src/sap/ui/mdc/i18n/interaction_sv.xml +2 -2
  105. package/src/sap/ui/mdc/i18n/interaction_tr.xml +1 -1
  106. package/src/sap/ui/mdc/i18n/interaction_uk.xml +2 -2
  107. package/src/sap/ui/mdc/i18n/interaction_vi.xml +2 -2
  108. package/src/sap/ui/mdc/i18n/interaction_zh_CN.xml +2 -2
  109. package/src/sap/ui/mdc/i18n/interaction_zh_TW.xml +2 -2
  110. package/src/sap/ui/mdc/library.js +13 -7
  111. package/src/sap/ui/mdc/link/Factory.js +1 -1
  112. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  113. package/src/sap/ui/mdc/link/Panel.js +1 -1
  114. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  115. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  116. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  117. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  118. package/src/sap/ui/mdc/messagebundle.properties +3 -0
  119. package/src/sap/ui/mdc/messagebundle_ar.properties +2 -0
  120. package/src/sap/ui/mdc/messagebundle_bg.properties +2 -0
  121. package/src/sap/ui/mdc/messagebundle_ca.properties +2 -0
  122. package/src/sap/ui/mdc/messagebundle_cnr.properties +2 -0
  123. package/src/sap/ui/mdc/messagebundle_cs.properties +2 -0
  124. package/src/sap/ui/mdc/messagebundle_cy.properties +2 -0
  125. package/src/sap/ui/mdc/messagebundle_da.properties +2 -0
  126. package/src/sap/ui/mdc/messagebundle_de.properties +2 -0
  127. package/src/sap/ui/mdc/messagebundle_el.properties +2 -0
  128. package/src/sap/ui/mdc/messagebundle_en.properties +2 -0
  129. package/src/sap/ui/mdc/messagebundle_en_GB.properties +2 -0
  130. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +2 -0
  131. package/src/sap/ui/mdc/messagebundle_es.properties +2 -0
  132. package/src/sap/ui/mdc/messagebundle_es_MX.properties +3 -1
  133. package/src/sap/ui/mdc/messagebundle_et.properties +2 -0
  134. package/src/sap/ui/mdc/messagebundle_fi.properties +2 -0
  135. package/src/sap/ui/mdc/messagebundle_fr.properties +2 -0
  136. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +2 -0
  137. package/src/sap/ui/mdc/messagebundle_hi.properties +2 -0
  138. package/src/sap/ui/mdc/messagebundle_hr.properties +4 -2
  139. package/src/sap/ui/mdc/messagebundle_hu.properties +2 -0
  140. package/src/sap/ui/mdc/messagebundle_id.properties +2 -0
  141. package/src/sap/ui/mdc/messagebundle_it.properties +2 -0
  142. package/src/sap/ui/mdc/messagebundle_iw.properties +2 -0
  143. package/src/sap/ui/mdc/messagebundle_ja.properties +2 -0
  144. package/src/sap/ui/mdc/messagebundle_kk.properties +18 -16
  145. package/src/sap/ui/mdc/messagebundle_ko.properties +2 -0
  146. package/src/sap/ui/mdc/messagebundle_lt.properties +2 -0
  147. package/src/sap/ui/mdc/messagebundle_lv.properties +2 -0
  148. package/src/sap/ui/mdc/messagebundle_mk.properties +2 -0
  149. package/src/sap/ui/mdc/messagebundle_ms.properties +2 -0
  150. package/src/sap/ui/mdc/messagebundle_nl.properties +2 -0
  151. package/src/sap/ui/mdc/messagebundle_no.properties +2 -0
  152. package/src/sap/ui/mdc/messagebundle_pl.properties +2 -0
  153. package/src/sap/ui/mdc/messagebundle_pt.properties +2 -0
  154. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +2 -0
  155. package/src/sap/ui/mdc/messagebundle_ro.properties +2 -0
  156. package/src/sap/ui/mdc/messagebundle_ru.properties +2 -0
  157. package/src/sap/ui/mdc/messagebundle_sh.properties +2 -0
  158. package/src/sap/ui/mdc/messagebundle_sk.properties +2 -0
  159. package/src/sap/ui/mdc/messagebundle_sl.properties +2 -0
  160. package/src/sap/ui/mdc/messagebundle_sr.properties +2 -0
  161. package/src/sap/ui/mdc/messagebundle_sv.properties +2 -0
  162. package/src/sap/ui/mdc/messagebundle_th.properties +2 -0
  163. package/src/sap/ui/mdc/messagebundle_tr.properties +2 -0
  164. package/src/sap/ui/mdc/messagebundle_uk.properties +2 -0
  165. package/src/sap/ui/mdc/messagebundle_vi.properties +2 -0
  166. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +2 -0
  167. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +2 -0
  168. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  169. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
  170. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
  171. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  172. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  173. package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
  174. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +12 -39
  175. package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
  176. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  177. package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
  178. package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
  179. package/src/sap/ui/mdc/table/Column.js +14 -13
  180. package/src/sap/ui/mdc/table/ColumnSettings.js +4 -2
  181. package/src/sap/ui/mdc/table/CreationRow.js +7 -3
  182. package/src/sap/ui/mdc/table/DragDropConfig.js +367 -349
  183. package/src/sap/ui/mdc/table/GridTableType.js +70 -42
  184. package/src/sap/ui/mdc/table/{V4AnalyticsPropertyHelper.js → ODataV4PropertyHelper.js} +6 -4
  185. package/src/sap/ui/mdc/table/PropertyHelper.js +10 -13
  186. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +4 -2
  187. package/src/sap/ui/mdc/table/ResponsiveTableType.js +27 -11
  188. package/src/sap/ui/mdc/table/RowActionItem.js +9 -8
  189. package/src/sap/ui/mdc/table/RowSettings.js +19 -19
  190. package/src/sap/ui/mdc/table/TableSettings.js +26 -23
  191. package/src/sap/ui/mdc/table/TableTypeBase.js +2 -1
  192. package/src/sap/ui/mdc/table/{menu → menus}/GroupHeaderRowContextMenu.js +2 -2
  193. package/src/sap/ui/mdc/table/{menu → menus}/QuickActionContainer.js +13 -3
  194. package/src/sap/ui/mdc/table/utils/Personalization.js +2 -2
  195. package/src/sap/ui/mdc/themes/base/Chart.less +30 -27
  196. package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
  197. package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
  198. package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
  199. package/src/sap/ui/mdc/util/InfoBar.js +1 -1
  200. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  201. package/src/sap/ui/mdc/util/PropertyHelper.js +39 -26
  202. package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
  203. package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
  204. package/src/sap/ui/mdc/valuehelp/FilterBar.js +1 -1
  205. package/src/sap/ui/mdc/valuehelp/Popover.js +76 -64
  206. package/src/sap/ui/mdc/valuehelp/RequestShowContainerDefault.js +163 -0
  207. package/src/sap/ui/mdc/valuehelp/base/Container.js +34 -4
  208. package/src/sap/ui/mdc/valuehelp/base/Content.js +26 -3
  209. package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +1 -1
  210. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  211. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
  212. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
  213. package/src/sap/ui/mdc/valuehelp/content/Bool.js +63 -46
  214. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
  215. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +145 -17
  216. package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
  217. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +9 -4
  218. package/src/sap/ui/mdc/valuehelp/content/MTable.js +4 -2
  219. package/test/sap/ui/mdc/testutils/opa/Utils.js +9 -2
  220. package/test/sap/ui/mdc/testutils/opa/field/Actions.js +14 -4
  221. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +302 -95
  222. package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +5 -4
  223. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +27 -0
  224. package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +23 -0
  225. package/test/sap/ui/mdc/testutils/opa/filterfield/TestObjects.js +24 -0
  226. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +47 -35
  227. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +3 -2
@@ -0,0 +1,163 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/Device"
9
+ ], (
10
+ Device
11
+ ) => {
12
+ "use strict";
13
+
14
+ /**
15
+ * This object contains default behavior for opening <code>ValueHelp</code> {@link sap.ui.mdc.valuehelp.base.Container containers} in the context of interaction on connected controls.
16
+ * Please also see {@link module:sap/ui/mdc/ValueHelpDelegate.requestShowContainer requestShowContainer}
17
+ *
18
+ * @namespace
19
+ * @author SAP SE
20
+ * @public
21
+ * @since 1.137
22
+ * @alias module:sap/ui/mdc/valuehelp/RequestShowContainerDefault
23
+ */
24
+ const RequestShowContainerDefault = {};
25
+
26
+ /**
27
+ * Default behavior for {@link sap.ui.mdc.enums.RequestShowContainerReason.Tap RequestShowContainerReason.Tap}.
28
+ *
29
+ * On phones, return true for multi-select usage or if the container is not used as a valuehelp.
30
+ * At last, check if the content is a non-boolean, unfiltered fixed list.
31
+ *
32
+ * @param {sap.ui.mdc.ValueHelp} oValueHelp The <code>ValueHelp</code> control instance
33
+ * @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
34
+ * @returns {Promise<boolean>} <code>true</code>, if the value help should trigger opening
35
+ * @public
36
+ */
37
+ RequestShowContainerDefault.Tap = async function (oValueHelp, oContainer) {
38
+ /**
39
+ * @deprecated As of version 1.137
40
+ */
41
+ if (this.shouldOpenOnClick) {
42
+ return await this.shouldOpenOnClick(oValueHelp, oContainer);
43
+ }
44
+ if (Device.system.phone && (!oContainer.isSingleSelect() || !oContainer.isDialog())) {
45
+ return true;
46
+ }
47
+
48
+ const [oContent] = oContainer?.getContent() || [];
49
+ return !!oContent && oContent.isA("sap.ui.mdc.valuehelp.content.FixedList") && oContent.isRestrictedToFixedValues();
50
+ };
51
+
52
+ /**
53
+ * Default behavior for {@link sap.ui.mdc.enums.RequestShowContainerReason.Typing RequestShowContainerReason.Typing}.
54
+ *
55
+ * Preloads delegate content.
56
+ * On phones, return false for single-select usage or if the container is used as a valuehelp.
57
+ * At last, check content's search support.
58
+ *
59
+ * @param {sap.ui.mdc.ValueHelp} oValueHelp The <code>ValueHelp</code> control instance
60
+ * @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
61
+ * @returns {Promise<boolean>} <code>true</code>, if the value help should trigger opening
62
+ * @public
63
+ */
64
+ RequestShowContainerDefault.Typing = async function (oValueHelp, oContainer) {
65
+ await oValueHelp.retrieveDelegateContent(oContainer);
66
+
67
+ if (Device.system.phone && (oContainer.isSingleSelect() || oContainer.isDialog())) {
68
+ return false;
69
+ }
70
+
71
+ const [oContent] = oContainer?.getContent() || [];
72
+ return !!await oContent?.isSearchSupported();
73
+ };
74
+
75
+ /**
76
+ * Default behavior for {@link sap.ui.mdc.enums.RequestShowContainerReason.Filter RequestShowContainerReason.Filter}.
77
+ *
78
+ * On desktop, prevent showing FilterableListContent without given filterValue.
79
+ * On desktop, check ListContent for available data.
80
+ * Show all other content without further checks.
81
+ *
82
+ * @param {sap.ui.mdc.ValueHelp} oValueHelp The <code>ValueHelp</code> control instance
83
+ * @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
84
+ * @returns {Promise<boolean>} <code>true</code>, if the value help should trigger opening
85
+ * @public
86
+ */
87
+ RequestShowContainerDefault.Filter = async function (oValueHelp, oContainer) {
88
+ const [oContent] = oContainer?.getContent() || [];
89
+ /**
90
+ * @deprecated As of version 1.137
91
+ */
92
+ if (this.showTypeahead) {
93
+ return await this.showTypeahead(oValueHelp, oContent);
94
+ }
95
+ if (!Device.system.phone) {
96
+ if (oContent?.isA("sap.ui.mdc.valuehelp.base.FilterableListContent") && !oValueHelp.getFilterValue()) {
97
+ return false;
98
+ }
99
+ if (oContent?.isA("sap.ui.mdc.valuehelp.base.ListContent")) {
100
+ return oContent.getListBinding()?.getCurrentContexts().length > 0;
101
+ }
102
+ }
103
+ return !!oContent;
104
+ };
105
+
106
+ /**
107
+ * Default behavior for {@link sap.ui.mdc.enums.RequestShowContainerReason.Focus RequestShowContainerReason.Focus}.
108
+ *
109
+ * By default, a container is not shown in response to focus events, as it cannot be determined whether the event was triggered by user interaction or programmatically.
110
+ *
111
+ * @param {sap.ui.mdc.ValueHelp} oValueHelp The <code>ValueHelp</code> control instance
112
+ * @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
113
+ * @returns {Promise<boolean>} <code>true</code>, if the value help should trigger opening
114
+ * @public
115
+ */
116
+ RequestShowContainerDefault.Focus = async function (oValueHelp, oContainer) {
117
+ /**
118
+ * @deprecated As of version 1.137
119
+ */
120
+ if (this.shouldOpenOnFocus) {
121
+ return await this.shouldOpenOnFocus(oValueHelp, oContainer);
122
+ }
123
+ return false;
124
+ };
125
+
126
+ /**
127
+ * Default behavior for {@link sap.ui.mdc.enums.RequestShowContainerReason.Navigate RequestShowContainerReason.Navigate}.
128
+ *
129
+ * Preloads delegate content.
130
+ * By default, a container is not shown in response to navigation.
131
+ *
132
+ * @param {sap.ui.mdc.ValueHelp} oValueHelp The <code>ValueHelp</code> control instance
133
+ * @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
134
+ * @returns {Promise<boolean>} <code>true</code>, if the value help should trigger opening
135
+ * @public
136
+ */
137
+ RequestShowContainerDefault.Navigate = async function (oValueHelp, oContainer) {
138
+ await oValueHelp.retrieveDelegateContent(oContainer); // preload potentially necessary content
139
+ /**
140
+ * @deprecated As of version 1.137
141
+ */
142
+ if (this.shouldOpenOnNavigate) {
143
+ return await this.shouldOpenOnNavigate(oValueHelp, oContainer);
144
+ }
145
+ return false;
146
+ };
147
+
148
+ /**
149
+ * Default behavior for {@link sap.ui.mdc.enums.RequestShowContainerReason.ValueHelpRequest RequestShowContainerReason.ValueHelpRequest}.
150
+ *
151
+ * By default, a dialog-like container should be shown on <code>ValueHelpRequest</code> events.
152
+ *
153
+ * @param {sap.ui.mdc.ValueHelp} oValueHelp The <code>ValueHelp</code> control instance
154
+ * @param {sap.ui.mdc.valuehelp.base.Container} oContainer Container instance
155
+ * @returns {Promise<boolean>} <code>true</code>, if the value help should trigger opening
156
+ * @public
157
+ */
158
+ RequestShowContainerDefault.ValueHelpRequest = function (oValueHelp, oContainer) {
159
+ return oContainer.isDialog();
160
+ };
161
+
162
+ return RequestShowContainerDefault;
163
+ });
@@ -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.136.2
29
+ * @version 1.138.0
30
30
  * @constructor
31
31
  * @abstract
32
32
  *
@@ -36,9 +36,6 @@ sap.ui.define([
36
36
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.navigate as #navigate
37
37
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.getUseAsValueHelp as #getUseAsValueHelp
38
38
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.isValidationSupported as #isValidationSupported
39
- * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.shouldOpenOnNavigate as #shouldOpenOnNavigate
40
- * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.shouldOpenOnFocus as #shouldOpenOnFocus
41
- * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.shouldOpenOnClick as #shouldOpenOnClick
42
39
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.removeVisualFocus as #removeVisualFocus
43
40
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContainer.setVisualFocus as #setVisualFocus
44
41
  *
@@ -715,6 +712,7 @@ sap.ui.define([
715
712
  *
716
713
  * @private
717
714
  * @ui5-restricted sap.ui.mdc.ValueHelp, sap.ui.mdc.valueHelp.base.Content
715
+ * @deprecated As of version 1.137 with no replacement.
718
716
  */
719
717
  Container.prototype.isTypeaheadSupported = function() {
720
718
  return false;
@@ -902,18 +900,36 @@ sap.ui.define([
902
900
  return oContainer && oContainer.getScrollDelegate && oContainer.getScrollDelegate();
903
901
  };
904
902
 
903
+ /**
904
+ * Determines if the value help should be opened when the user focuses the connected control.
905
+ *
906
+ * @returns {Promise<boolean>} If <code>true</code>, the value help should open when user focuses the connected field control
907
+ * @deprecated As of version 1.137 with no replacement.
908
+ */
905
909
  Container.prototype.shouldOpenOnFocus = function() {
906
910
  const oDelegate = this.getValueHelpDelegate();
907
911
  const oValueHelp = this.getValueHelp();
908
912
  return oDelegate ? oDelegate.shouldOpenOnFocus(oValueHelp, this) : Promise.resolve(false);
909
913
  };
910
914
 
915
+ /**
916
+ * Determines if the value help should be opened when the user clicks into the connected control.
917
+ *
918
+ * @returns {Promise<boolean>} If <code>true</code>, the value help should open when user clicks into the connected field control
919
+ * @deprecated As of version 1.137 with no replacement.
920
+ */
911
921
  Container.prototype.shouldOpenOnClick = function() {
912
922
  const oDelegate = this.getValueHelpDelegate();
913
923
  const oValueHelp = this.getValueHelp();
914
924
  return oDelegate ? oDelegate.shouldOpenOnClick(oValueHelp, this) : Promise.resolve(false);
915
925
  };
916
926
 
927
+ /**
928
+ * Determines if the value help should be opened when the user used the arrow keys.
929
+ *
930
+ * @returns {boolean} If <code>true</code>, the value help should open when user used the arrow keys in the connected field control
931
+ * @deprecated As of version 1.137 with no replacement.
932
+ */
917
933
  Container.prototype.shouldOpenOnNavigate = function() {
918
934
  return false;
919
935
  };
@@ -1032,6 +1048,20 @@ sap.ui.define([
1032
1048
 
1033
1049
  };
1034
1050
 
1051
+ /**
1052
+ * If set, the connected field must not allow other values than the items of the <code>FixedList</code>. Free text must be prevented.
1053
+ *
1054
+ * @returns {boolean} If set, only fixed values are allowed
1055
+ * @private
1056
+ * @ui5-restricted sap.ui.mdc.Valuehelp
1057
+ * @since 1.138
1058
+ */
1059
+ Container.prototype.isRestrictedToFixedValues = function() {
1060
+ const oContent = this.getContent();
1061
+ return oContent?.[0].isRestrictedToFixedValues();
1062
+ };
1063
+
1064
+
1035
1065
  Container.prototype.clone = function(sIdSuffix, aLocalIds) {
1036
1066
 
1037
1067
  // detach event handler before cloning to not have it twice on the clone
@@ -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.
38
38
  * @extends sap.ui.core.Element
39
- * @version 1.136.2
39
+ * @version 1.138.0
40
40
  * @constructor
41
41
  * @abstract
42
42
  *
@@ -46,8 +46,6 @@ sap.ui.define([
46
46
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.navigate as #navigate
47
47
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.getUseAsValueHelp as #getUseAsValueHelp
48
48
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.isValidationSupported as #isValidationSupported
49
- * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.shouldOpenOnNavigate as #shouldOpenOnNavigate
50
- * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.shouldOpenOnClick as #shouldOpenOnClick
51
49
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.removeVisualFocus as #removeVisualFocus
52
50
  * @borrows sap.ui.mdc.valuehelp.base.ITypeaheadContent.setVisualFocus as #setVisualFocus
53
51
  * @borrows sap.ui.mdc.valuehelp.base.IDialogContent.getCount as #getCount
@@ -695,10 +693,23 @@ sap.ui.define([
695
693
  return this.getMaxConditions() === 1;
696
694
  };
697
695
 
696
+ /**
697
+ * Determines if the value help should be opened when the user clicks into the connected control.
698
+ *
699
+ * @returns {boolean} If <code>true</code>, the value help should open when user clicks into the connected field control
700
+ * @deprecated As of version 1.137 with no replacement.
701
+ */
698
702
  Content.prototype.shouldOpenOnClick = function() {
699
703
  return false;
700
704
  };
701
705
 
706
+ /**
707
+ * Determines if the value help should be opened when the user used the arrow keys.
708
+ * By default navigation on closed popover is enabled.
709
+ *
710
+ * @returns {boolean} If <code>true</code>, the value help should open when user used the arrow keys in the connected field control
711
+ * @deprecated As of version 1.137 with no replacement.
712
+ */
702
713
  Content.prototype.shouldOpenOnNavigate = function() {
703
714
  return false;
704
715
  };
@@ -890,6 +901,18 @@ sap.ui.define([
890
901
 
891
902
  };
892
903
 
904
+ /**
905
+ * If set, the connected field must not allow other values than the items of the <code>FixedList</code>. Free text must be prevented.
906
+ *
907
+ * @returns {boolean} If set, only fixed values are allowed
908
+ * @private
909
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
910
+ * @since 1.138
911
+ */
912
+ Content.prototype.isRestrictedToFixedValues = function() {
913
+ return false;
914
+ };
915
+
893
916
  PromiseMixin.call(Content.prototype);
894
917
 
895
918
 
@@ -121,7 +121,7 @@ sap.ui.define([
121
121
  * @extends sap.ui.core.Control
122
122
  *
123
123
  * @author SAP SE
124
- * @version 1.136.2
124
+ * @version 1.138.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.136.2
23
+ * @version 1.138.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.136.2
47
+ * @version 1.138.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.136.2
24
+ * @version 1.138.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.136.2
23
+ * @version 1.138.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.mdc
@@ -49,6 +49,9 @@ sap.ui.define([
49
49
  properties: ["config"]
50
50
  });
51
51
 
52
+ this.setEmptyText(this._oResourceBundle.getText("valuehelp.NOT_SELECTED"));
53
+ this.setRestrictedToFixedValues(true);
54
+
52
55
  };
53
56
 
54
57
  Bool.prototype.exit = function() {
@@ -71,23 +74,25 @@ sap.ui.define([
71
74
  return null;
72
75
  }
73
76
 
74
- const FixedListItem = aModules[0];
75
- const JSONModel = aModules[1];
77
+ const [FixedListItem, JSONModel] = aModules;
76
78
  this._oModel = new JSONModel({
77
79
  "type": "",
78
80
  "items": [{
79
- "key": true,
80
- "text": "true"
81
- }, {
82
- "key": false,
83
- "text": "false"
81
+ "key": true
82
+ },
83
+ {
84
+ "key": false
84
85
  }]
85
86
  });
86
- _updateModel.call(this, this.getConfig());
87
+
88
+ const fFormatKey = (vKey) => { // use formatter function as type isset late an can change
89
+ const oConfig = this.getConfig();
90
+ return oConfig?.dataType?.formatValue(vKey, "string");
91
+ };
87
92
 
88
93
  const oItem = new FixedListItem(this.getId() + "-Item", {
89
- key: { path: "$Bool>key" },
90
- text: { path: "$Bool>text" }
94
+ key: { path: "$Bool>key", formatter: fFormatKey }, // as Item has Data-Type String, key needs to be formatted using Type, in FixedList the internalValue is used for Condition
95
+ text: { path: "$Bool>key", formatter: fFormatKey } // text is the same
91
96
  });
92
97
 
93
98
  this.bindAggregation("items", { path: "$Bool>/items", template: oItem });
@@ -110,6 +115,11 @@ sap.ui.define([
110
115
  if (oConfig.checkKey) {
111
116
  if (oConfig.parsedValue === true || oConfig.parsedValue === false) {
112
117
  return { key: oConfig.parsedValue, description: oType.formatValue(oConfig.parsedValue, "string") };
118
+ } else if (oConfig.parsedValue === null) {
119
+ // check if there is an empty-description
120
+ if (oConfig.emptyAllowed) {
121
+ return { key: null, description: this._oResourceBundle.getText("valuehelp.NOT_SELECTED") };
122
+ }
113
123
  } else {
114
124
  // as in bool case the description is comming from the type, search for description (first match) if parsing fails
115
125
  oConfig.checkDescription = true;
@@ -135,17 +145,6 @@ sap.ui.define([
135
145
 
136
146
  };
137
147
 
138
- /**
139
- * Determines if the value help should be opened when the user clicks into the connected control.
140
- *
141
- * @returns {boolean} If <code>true</code>, the value help should open when user clicks into the connected field control
142
- */
143
- Bool.prototype.shouldOpenOnClick = function() {
144
-
145
- return false;
146
-
147
- };
148
-
149
148
  Bool.prototype.isNavigationEnabled = function(iStep) {
150
149
 
151
150
  return true; // always enable, even if items are created lately on opening or navigation
@@ -154,7 +153,7 @@ sap.ui.define([
154
153
 
155
154
  Bool.prototype.observeChanges = function(oChanges) {
156
155
 
157
- if (oChanges.type === "property" && oChanges.name === "config") {
156
+ if (oChanges.name === "config" && (oChanges.current?.dataType !== oChanges.old?.dataType)) {
158
157
  _updateModel.call(this, oChanges.current);
159
158
  }
160
159
 
@@ -162,27 +161,15 @@ sap.ui.define([
162
161
  };
163
162
 
164
163
  function _updateModel(oConfig) {
165
- if (this._oModel && oConfig) {
166
- // use texts of used type
167
- const oType = oConfig.dataType;
168
- const oData = this._oModel.getData();
169
- if (oType && oData["type"] !== oType.getMetadata().getName()) {
170
- oData["type"] = oType.getMetadata().getName();
171
- const aItems = oData["items"];
172
-
173
- for (const oItem of aItems) {
174
- oItem["text"] = oType.formatValue(oItem["key"], "string");
175
- }
176
164
 
177
- this._oModel.checkUpdate(true);
178
- }
179
- }
165
+ this._oModel?.checkUpdate(true);
166
+
180
167
  }
181
168
 
182
169
  /**
183
170
  * Adds some item to the aggregation <code>items</code>.
184
171
  *
185
- * <b>Note:</b> Do not add items to the <code>Bool</code> content. The items will be filled by itself
172
+ * <b>Note:</b> Do not add items to the <code>Bool</code> content. The items will be filled by <code>Bool</code> itself.
186
173
  *
187
174
  * @param {sap.ui.mdc.valuehelp.content.FixedListItem} oItem The item to add; if empty, nothing is inserted
188
175
  * @returns {this} Reference to <code>this</code> to allow method chaining
@@ -197,7 +184,7 @@ sap.ui.define([
197
184
  /**
198
185
  * Inserts a item to the aggregation <code>items</code>.
199
186
  *
200
- * <b>Note:</b> Do not add items to the <code>Bool</code> content. The items will be filled by itself
187
+ * <b>Note:</b> Do not add items to the <code>Bool</code> content. The items will be filled by <code>Bool</code> itself.
201
188
  *
202
189
  * @param {sap.ui.mdc.valuehelp.content.FixedListItem} oItem The item to add; if empty, nothing is inserted
203
190
  * @param {int} iIndex The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
@@ -213,7 +200,7 @@ sap.ui.define([
213
200
  /**
214
201
  * Destroys all the items in the aggregation <code>items</code>.
215
202
  *
216
- * <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by itself
203
+ * <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by <code>Bool</code> itself.
217
204
  *
218
205
  * @returns {this} Reference to <code>this</code> to allow method chaining
219
206
  * @private
@@ -227,7 +214,7 @@ sap.ui.define([
227
214
  /**
228
215
  * Removes all the controls from the aggregation <code>items</code>.
229
216
  *
230
- * <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by itself
217
+ * <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by <code>Bool</code> itself.
231
218
  *
232
219
  * @returns {sap.ui.mdc.valuehelp.content.FixedListItem[]} An array of the removed elements (might be empty)
233
220
  * @private
@@ -241,7 +228,7 @@ sap.ui.define([
241
228
  /**
242
229
  * Removes a item from the aggregation <code>items</code>.
243
230
  *
244
- * <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by itself
231
+ * <b>Note:</b> Do not change items to the <code>Bool</code> content. The items will be filled by <code>Bool</code> itself.
245
232
  *
246
233
  * @param {int|string|sap.ui.mdc.valuehelp.content.FixedListItem} vItem The item to remove or its index or ID
247
234
  * @returns {sap.ui.mdc.valuehelp.content.FixedListItem|null} The removed item or <code>null</code>
@@ -256,7 +243,7 @@ sap.ui.define([
256
243
  /**
257
244
  * Sets a new value for property <code>useFirstMatch</code>.
258
245
  *
259
- * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
246
+ * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by <code>Bool</code> itself.
260
247
  *
261
248
  * @param {boolean} [bUseFirstMatch=true] New value for property <code>useFirstMatch</code>
262
249
  * @returns {this} Reference to <code>this</code> to allow method chaining
@@ -271,7 +258,7 @@ sap.ui.define([
271
258
  /**
272
259
  * Sets a new value for property <code>useAsValueHelp</code>.
273
260
  *
274
- * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
261
+ * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by <code>Bool</code> itself.
275
262
  *
276
263
  * @param {boolean} [bUseAsValueHelp=true] New value for property <code>useAsValueHelp</code>
277
264
  * @returns {this} Reference to <code>this</code> to allow method chaining
@@ -286,7 +273,7 @@ sap.ui.define([
286
273
  /**
287
274
  * Sets a new value for property <code>filterList</code>.
288
275
  *
289
- * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
276
+ * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by <code>Bool</code> itself.
290
277
  *
291
278
  * @param {boolean} [bFilterList=false] New value for property <code>filterList</code>
292
279
  * @returns {this} Reference to <code>this</code> to allow method chaining
@@ -301,7 +288,7 @@ sap.ui.define([
301
288
  /**
302
289
  * Sets a new value for property <code>caseSensitive</code>.
303
290
  *
304
- * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by itself
291
+ * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by <code>Bool</code> itself.
305
292
  *
306
293
  * @param {boolean} [bCaseSensitive=false] New value for property <code>caseSensitive</code>
307
294
  * @returns {this} Reference to <code>this</code> to allow method chaining
@@ -313,5 +300,35 @@ sap.ui.define([
313
300
  * @function
314
301
  */
315
302
 
303
+ /**
304
+ * Sets a new value for property <code>emptyText</code>.
305
+ *
306
+ * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by <code>Bool</code> itself.
307
+ *
308
+ * @param {string} [sText] New value for property <code>emptyText</code>
309
+ * @returns {this} Reference to <code>this</code> to allow method chaining
310
+ * @public
311
+ * @since 1.138
312
+ * @deprecated As of version 1.138, setting of this property is not supported, the property is automatically set.
313
+ * @ui5-not-supported
314
+ * @name sap.ui.mdc.valuehelp.content.Bool#setEmptyText
315
+ * @function
316
+ */
317
+
318
+ /**
319
+ * Sets a new value for property <code>cestrictedToFixedValues</code>.
320
+ *
321
+ * <b>Note:</b> Do not set this property for the <code>Bool</code> content. It will be set by <code>Bool</code> itself.
322
+ *
323
+ * @param {boolean} [bnlyFixedValuesAllowed=false] New value for property <code>restrictedToFixedValues</code>
324
+ * @returns {this} Reference to <code>this</code> to allow method chaining
325
+ * @public
326
+ * @since 1.138
327
+ * @deprecated As of version 1.138, setting of this property is not supported, the property is automatically set.
328
+ * @ui5-not-supported
329
+ * @name sap.ui.mdc.valuehelp.content.Bool#setRestrictedToFixedValues
330
+ * @function
331
+ */
332
+
316
333
  return Bool;
317
334
  });
@@ -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.136.2
30
+ * @version 1.138.0
31
31
  * @constructor
32
32
  * @public
33
33
  * @since 1.95.0