@openui5/sap.ui.mdc 1.93.3 → 1.96.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 (237) hide show
  1. package/.reuse/dep5 +6 -11
  2. package/THIRDPARTY.txt +10 -16
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +236 -334
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
  7. package/src/sap/ui/mdc/Chart.js +150 -22
  8. package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
  9. package/src/sap/ui/mdc/ChartNew.js +107 -66
  10. package/src/sap/ui/mdc/Control.js +4 -3
  11. package/src/sap/ui/mdc/Element.js +5 -4
  12. package/src/sap/ui/mdc/Field.js +2 -2
  13. package/src/sap/ui/mdc/FilterBar.js +1 -10
  14. package/src/sap/ui/mdc/FilterField.js +28 -4
  15. package/src/sap/ui/mdc/Link.js +2 -2
  16. package/src/sap/ui/mdc/MultiValueField.js +1 -1
  17. package/src/sap/ui/mdc/Table.js +160 -79
  18. package/src/sap/ui/mdc/TableDelegate.js +20 -3
  19. package/src/sap/ui/mdc/ValueHelp.js +1474 -0
  20. package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
  21. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
  22. package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
  23. package/src/sap/ui/mdc/chart/Item.js +2 -3
  24. package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
  25. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
  26. package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
  27. package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
  28. package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
  29. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
  30. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
  31. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
  32. package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
  33. package/src/sap/ui/mdc/condition/Condition.js +2 -2
  34. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  35. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  36. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  37. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
  38. package/src/sap/ui/mdc/condition/Operator.js +4 -4
  39. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  40. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
  41. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
  42. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
  43. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
  44. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
  45. package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
  46. package/src/sap/ui/mdc/enum/SelectType.js +43 -0
  47. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  49. package/src/sap/ui/mdc/field/ConditionType.js +19 -4
  50. package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
  51. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  52. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  53. package/src/sap/ui/mdc/field/DefineConditionPanel.js +38 -14
  54. package/src/sap/ui/mdc/field/FieldBase.js +92 -41
  55. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
  56. package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
  57. package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
  58. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
  65. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
  66. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  67. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  68. package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
  69. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  70. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  71. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  72. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  73. package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
  74. package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
  75. package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
  76. package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
  77. package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
  78. package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
  79. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
  80. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
  81. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
  82. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
  83. package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
  84. package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
  85. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  86. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
  87. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  88. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  89. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
  90. package/src/sap/ui/mdc/library.js +588 -8
  91. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  92. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  93. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  94. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  95. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  96. package/src/sap/ui/mdc/link/Factory.js +1 -1
  97. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  98. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  99. package/src/sap/ui/mdc/link/Panel.js +1 -1
  100. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  101. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  102. package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
  103. package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
  104. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  105. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  106. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  107. package/src/sap/ui/mdc/messagebundle.properties +31 -5
  108. package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
  109. package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
  110. package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
  111. package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
  112. package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
  113. package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
  114. package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
  115. package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
  116. package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
  117. package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
  118. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
  119. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
  120. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
  121. package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
  122. package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
  123. package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
  124. package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
  125. package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
  126. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
  127. package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
  128. package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
  129. package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
  130. package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
  131. package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
  132. package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
  133. package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
  134. package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
  135. package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
  136. package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
  137. package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
  138. package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
  139. package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
  140. package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
  141. package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
  142. package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
  143. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
  144. package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
  145. package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
  146. package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
  147. package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
  148. package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
  149. package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
  150. package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
  151. package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
  152. package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
  153. package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
  154. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
  155. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -3
  156. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  157. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
  158. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
  159. package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
  160. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
  161. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
  162. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
  163. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
  164. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
  165. package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
  166. package/src/sap/ui/mdc/p13n/Engine.js +3 -2
  167. package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
  168. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  169. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  170. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +22 -24
  171. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
  172. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
  173. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
  174. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
  175. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
  176. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
  177. package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
  178. package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
  179. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
  180. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
  181. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
  182. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
  183. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
  184. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
  185. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
  186. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
  187. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
  188. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
  189. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
  190. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
  191. package/src/sap/ui/mdc/table/Column.js +35 -9
  192. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  193. package/src/sap/ui/mdc/table/GridTableType.js +0 -1
  194. package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
  195. package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
  196. package/src/sap/ui/mdc/table/RowSettings.js +1 -1
  197. package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
  198. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
  199. package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
  200. package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
  201. package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
  202. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
  203. package/src/sap/ui/mdc/ui/Container.js +2 -2
  204. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  205. package/src/sap/ui/mdc/util/Common.js +26 -0
  206. package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
  207. package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
  208. package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
  209. package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
  210. package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
  211. package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
  212. package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
  213. package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
  214. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
  215. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
  216. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
  217. package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
  218. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
  219. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
  220. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
  221. package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
  222. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
  223. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
  224. package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
  225. package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
  226. package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
  227. package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
  228. package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
  229. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
  230. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
  231. package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
  232. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
  233. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
  234. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
  235. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
  236. package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
  237. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
@@ -0,0 +1,642 @@
1
+ /*
2
+ * ! OpenUI5
3
+ * (c) Copyright 2009-2021 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/core/Element',
9
+ 'sap/ui/mdc/mixin/PromiseMixin',
10
+ 'sap/ui/model/BindingMode',
11
+ 'sap/ui/base/ManagedObjectObserver'
12
+ ], function(
13
+ Element,
14
+ PromiseMixin,
15
+ BindingMode,
16
+ ManagedObjectObserver
17
+ ) {
18
+ "use strict";
19
+
20
+ /**
21
+ * Constructor for a new <code>Container</code>.
22
+ *
23
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
24
+ * @param {object} [mSettings] Initial settings for the new control
25
+ * @class Container for the <code>ValueHelp</code> element.
26
+ * @extends sap.ui.core.Element
27
+ * @version 1.96.1
28
+ * @constructor
29
+ * @abstract
30
+ * @private
31
+ * @ui5-restricted sap.ui.mdc
32
+ * @since 1.95.0
33
+ * @alias sap.ui.mdc.valuehelp.base.Container
34
+ * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
35
+ */
36
+ var Container = Element.extend("sap.ui.mdc.valuehelp.base.Container", /** @lends sap.ui.mdc.valuehelp.base.Container.prototype */
37
+ {
38
+ metadata: {
39
+ library: "sap.ui.mdc",
40
+ properties: {
41
+ /**
42
+ * Title text that appears in the dialog or tab header.
43
+ */
44
+ title: {
45
+ type: "string",
46
+ group: "Appearance",
47
+ defaultValue: ""
48
+ }
49
+ },
50
+ aggregations: {
51
+ /**
52
+ * Used container element. (e.g. Popover or Dialog)
53
+ */
54
+ _container: {
55
+ type: "sap.ui.core.Element",
56
+ multiple: false,
57
+ visibility: "hidden"
58
+ },
59
+ /**
60
+ * Content of the container.
61
+ * This aggregation holds the actual controls enabling the user to select items or create conditions (e.g. tables or condition panels)
62
+ */
63
+ content: {
64
+ type: "sap.ui.mdc.valuehelp.base.Content",
65
+ multiple: true
66
+ }
67
+ },
68
+ events: {
69
+ /**
70
+ * Fired if the selected condition changed.
71
+ */
72
+ select: {
73
+ parameters: {
74
+ /**
75
+ * Type of the selection change (add, remove)
76
+ */
77
+ type: { type: "sap.ui.mdc.enum.SelectType" },
78
+ /**
79
+ * Changed conditions
80
+ *
81
+ * <b>Note:</b> A condition must have the structure of {@link sap.ui.mdc.condition.ConditionObject ConditionObject}.
82
+ */
83
+ conditions: { type: "object[]" }
84
+ }
85
+ },
86
+ /**
87
+ * Fired if a change on the value help is confirmed
88
+ */
89
+ confirm: {
90
+ parameters: {
91
+ /**
92
+ * True if the value help needs to be closed
93
+ */
94
+ close: { type: "boolean" }
95
+ }
96
+ },
97
+ /**
98
+ * Fired if the value help is opened.
99
+ */
100
+ opened: {},
101
+ /**
102
+ * Fired if the value help is closed.
103
+ */
104
+ closed: {},
105
+ /**
106
+ * Fired if the change is cancelled.
107
+ */
108
+ cancel: {},
109
+ /**
110
+ * Fired if the Container requests the delegate content.
111
+ */
112
+ requestDelegateContent: {
113
+ parameters: {
114
+ container: { type: "sap.ui.mdc.valuehelp.base.Container" }
115
+ }
116
+ },
117
+ /**
118
+ * Fired if the value help should switch to dialog mode.
119
+ */
120
+ requestSwitchToDialog: {},
121
+ /**
122
+ * Fired if a navigation was executed in the content of the container
123
+ */
124
+ navigated: {
125
+ parameters: {
126
+ /**
127
+ * True if the focus should be set back to the field.
128
+ */
129
+ bLeaveFocus: { type: "boolean" },
130
+ /**
131
+ * Navigated condition.
132
+ *
133
+ * <b>Note:</b> A condition must have the structure of {@link sap.ui.mdc.condition.ConditionObject ConditionObject}.
134
+ */
135
+ condition: { type: "object" },
136
+ /**
137
+ * ID of the navigated item. (This is needed to set the corresponding aria-attribute)
138
+ */
139
+ itemId: { type: "string" }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ });
145
+
146
+ Container.prototype.init = function () {
147
+ this._oObserver = new ManagedObjectObserver(this._observeChanges.bind(this));
148
+ this._oObserver.observe(this, {
149
+ aggregations: ["content"]
150
+ });
151
+ };
152
+
153
+ Container.prototype._observeChanges = function (oChanges) {
154
+ if (oChanges.name === "content") {
155
+ var oContent = oChanges.child;
156
+ if (oChanges.mutation === "remove") {
157
+ oContent.unbindProperty("filterValue");
158
+ oContent.unbindProperty("conditions");
159
+ oContent.unbindProperty("config");
160
+ oContent.detachConfirm(this._handleConfirmed, this);
161
+ oContent.detachCancel(this._handleCanceled, this);
162
+ oContent.detachSelect(this._handleSelect, this);
163
+ oContent.detachRequestDelegateContent(this._handleRequestDelegateContent, this);
164
+
165
+ if (oContent.detachNavigated) {
166
+ oContent.detachNavigated(this._handleNavigated, this);
167
+ }
168
+
169
+ if (oContent.detachRequestSwitchToDialog) {
170
+ oContent.detachRequestSwitchToDialog(this._handleRequestSwitchToDialog, this);
171
+ }
172
+
173
+ } else {
174
+ oContent.bindProperty("filterValue", { path: "/filterValue", model: "$valueHelp", mode: BindingMode.OneWay}); // inherit from ValueHelp
175
+ var oBindingOptions = { path: "/conditions", model: "$valueHelp", mode: BindingMode.OneWay};
176
+ if (oContent._formatConditions) {
177
+ oBindingOptions.formatter = oContent._formatConditions.bind(oContent);
178
+ }
179
+ oContent.bindProperty("conditions", oBindingOptions); // inherit from ValueHelp
180
+ oContent.bindProperty("config", { path: "/_config", model: "$valueHelp", mode: BindingMode.OneWay}); // inherit from ValueHelp
181
+
182
+ oContent.attachConfirm(this._handleConfirmed, this);
183
+ oContent.attachCancel(this._handleCanceled, this);
184
+ oContent.attachSelect(this._handleSelect, this);
185
+ oContent.attachRequestDelegateContent(this._handleRequestDelegateContent, this);
186
+
187
+ if (oContent.attachNavigated) {
188
+ oContent.attachNavigated(this._handleNavigated, this);
189
+ }
190
+
191
+ if (oContent.attachRequestSwitchToDialog) {
192
+ oContent.attachRequestSwitchToDialog(this._handleRequestSwitchToDialog, this);
193
+ }
194
+ }
195
+ }
196
+ };
197
+
198
+ Container.prototype._handleNavigated = function (oEvent) {
199
+ this.fireNavigated(oEvent.mParameters);
200
+ };
201
+
202
+ Container.prototype._handleRequestSwitchToDialog = function (oEvent) {
203
+ this.fireRequestSwitchToDialog({container: this});
204
+ };
205
+
206
+ Container.prototype._getContainer = function () {
207
+ };
208
+
209
+ Container.prototype._getControl = function () {
210
+ var oValueHelp = this.getParent();
211
+ return oValueHelp && oValueHelp.getControl();
212
+ };
213
+
214
+ Container.prototype.getMaxConditions = function() {
215
+ var oVHModel = this.getModel("$valueHelp");
216
+ return oVHModel && oVHModel.getObject("/_config/maxConditions");
217
+ };
218
+
219
+ Container.prototype._isSingleSelect = function() {
220
+ return this.getMaxConditions() === 1;
221
+ };
222
+
223
+ Container.prototype.getDomRef = function() {
224
+ var oContainer = this.getAggregation("_container");
225
+ return oContainer && oContainer.getDomRef();
226
+ };
227
+
228
+ Container.prototype.getUIArea = function() { // TODO: Ask Frank, if better way available
229
+ return null; // don't use UIArea of parent as rendered as Popover or Dialog
230
+ };
231
+
232
+ Container.prototype._getUIAreaForContent = function() { // to map UIArea of content to Popover or Dialog
233
+ return this.getUIArea();
234
+ };
235
+
236
+ /**
237
+ * Opens the container
238
+ *
239
+ * @param {Promise} oValueHelpContentPromise Promise for content request
240
+ * @returns {Promise} This promise resolves after the container completely opened.
241
+ *
242
+ * @private
243
+ * @ui5-restricted sap.ui.mdc.ValueHelp
244
+ */
245
+ Container.prototype.open = function (oValueHelpContentPromise) {
246
+ if (!this.isOpening()) {
247
+ var oOpenPromise = this._addPromise("open");
248
+ return Promise.all([this._getContainer(), oValueHelpContentPromise]).then(function (aResults) {
249
+ return this._placeContent(aResults[0]);
250
+ }.bind(this)).then(function(oContainer) {
251
+ if (!oOpenPromise.isCanceled()) {
252
+ this._open(oContainer);
253
+ }
254
+ return oOpenPromise;
255
+ }.bind(this));
256
+ }
257
+
258
+ return this._retrievePromise("open");
259
+ };
260
+
261
+ /**
262
+ * Closes the container
263
+ *
264
+ * @private
265
+ * @ui5-restricted sap.ui.mdc.ValueHelp
266
+ */
267
+ Container.prototype.close = function () {
268
+ var oPromise = this._retrievePromise("open");
269
+ if (oPromise) {
270
+ if (oPromise.isSettled()) {
271
+ this._close();
272
+ } else {
273
+ this._cancelPromise(oPromise);
274
+ }
275
+ }
276
+ };
277
+
278
+ Container.prototype._placeContent = function (oContainer) {
279
+ return oContainer;
280
+ };
281
+
282
+ Container.prototype._open = function (oContainer) {
283
+
284
+ };
285
+
286
+ Container.prototype._close = function () {
287
+ };
288
+
289
+ Container.prototype._handleOpened = function () {
290
+ this._resolvePromise("open");
291
+ this.fireOpened();
292
+ };
293
+
294
+ Container.prototype._handleClosed = function (oEvent) {
295
+ this._removePromise("open");
296
+ this.fireClosed();
297
+ };
298
+
299
+ Container.prototype._handleConfirmed = function (oEvent) {
300
+ this.fireConfirm();
301
+ };
302
+
303
+ Container.prototype._handleCanceled = function (oEvent) {
304
+ this.fireCancel();
305
+ };
306
+
307
+ Container.prototype._handleRequestDelegateContent = function (oEvent) {
308
+ this.fireRequestDelegateContent({container: this});
309
+ };
310
+
311
+ Container.prototype._handleSelect = function (oEvent) {
312
+ this.fireSelect({type: oEvent.getParameter("type"), conditions: oEvent.getParameter("conditions")});
313
+ };
314
+
315
+ /**
316
+ * Determines if the container is open.
317
+ *
318
+ * <b>Note:</b> This function must only be called by the <code>ValueHelp</code> element.
319
+ *
320
+ * @returns {boolean} true if open or opening
321
+ *
322
+ * @private
323
+ * @ui5-restricted sap.ui.mdc.ValueHelp
324
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
325
+ */
326
+ Container.prototype.isOpen = function () {
327
+ var oPromise = this._retrievePromise("open");
328
+ return oPromise && oPromise.isSettled();
329
+ };
330
+
331
+ /**
332
+ * Determines if the container is opening.
333
+ *
334
+ * <b>Note:</b> This function must only be called by the <code>ValueHelp</code> element.
335
+ *
336
+ * @returns {boolean} true if opening
337
+ *
338
+ * @private
339
+ * @ui5-restricted sap.ui.mdc.ValueHelp
340
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
341
+ */
342
+ Container.prototype.isOpening = function () {
343
+ var oPromise = this._retrievePromise("open");
344
+ return oPromise && !oPromise.isCanceled() && !oPromise.isSettled();
345
+ };
346
+
347
+ /**
348
+ * Determines the item (key and description) for a given value.
349
+ *
350
+ * The container checks if there is an item with a key or description that fits this value.
351
+ *
352
+ * <b>Note:</b> This function must only be called by the <code>ValueHelp</code> element.
353
+ *
354
+ * @param {object} oConfig Configuration
355
+ * @param {any} oConfig.value Value as entered by user
356
+ * @param {any} [oConfig.parsedValue] Value parsed by type to fit the data type of the key
357
+ * @param {object} [oConfig.inParameters] In parameters for the key (as a key must not be unique.)
358
+ * @param {object} [oConfig.outParameters] Out parameters for the key (as a key must not be unique.)
359
+ * @param {sap.ui.model.Context} [oConfig.bindingContext] <code>BindingContext</code> of the checked field. Inside a table the <code>ValueHelp</code> element might be connected to a different row.
360
+ * @param {boolean} [oConfig.checkKeyFirst] If set, the container checks first if the value fits a key // TODO: not longer needed?
361
+ * @param {boolean} oConfig.checkKey If set, the container checks only if there is an item with the given key. This is set to <code>false</code> if the value cannot be a valid key because of type validation.
362
+ * @param {boolean} oConfig.checkDescription If set, the container checks only if there is an item with the given description. This is set to <code>false</code> if only the key is used in the field.
363
+ * @param {sap.ui.mdc.condition.ConditionModel} [oConfig.conditionModel] <code>ConditionModel</code>, in case of <code>FilterField</code>
364
+ * @param {string} [oConfig.conditionModelName] Name of the <code>ConditionModel</code>, in case of <code>FilterField</code>
365
+ * @param {boolean} [oConfig.caseSensitive] If set, the check is done case sensitive
366
+ * @returns {Promise<sap.ui.mdc.field.FieldHelpItem>} Promise returning object containing description, key, in and out parameters.
367
+ * @throws {sap.ui.model.FormatException|sap.ui.model.ParseException} if entry is not found or not unique
368
+ *
369
+ * @private
370
+ * @ui5-restricted sap.ui.mdc.ValueHelp
371
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
372
+ */
373
+ Container.prototype.getItemForValue = function(oConfig) { // TODO only for TypeAhead container
374
+ };
375
+
376
+ /**
377
+ * Defines if the content of the container can be used for input validation.
378
+ *
379
+ * @returns {boolean} True if content can be used for input validation
380
+ *
381
+ * @private
382
+ * @ui5-restricted sap.ui.mdc.ValueHelp
383
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
384
+ */
385
+ Container.prototype.isValidationSupported = function() { // TODO only for TypeAhead container
386
+ return false;
387
+ };
388
+
389
+
390
+ /**
391
+ * Triggers navigation in the content of the container.
392
+ *
393
+ * As this could be asynchronous in case additional data needs to be loaded a promise is returned.
394
+ *
395
+ * <b>Note:</b> This function must only be called by the <code>ValueHelp</code> element.
396
+ *
397
+ * @param {int} iStep Number of steps for navigation (e.g. 1 means next item, -1 means previous item)
398
+ * @returns {Promise<object>} Promise returning object of navigated item (condition and itemId)
399
+ *
400
+ * @private
401
+ * @ui5-restricted sap.ui.mdc.ValueHelp
402
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
403
+ */
404
+ Container.prototype.navigate = function(iStep) { // pass through to content
405
+ return Promise.all([this._getContainer()]).then(function (aResults) {
406
+ return this._placeContent(aResults[0]);
407
+ }.bind(this)).then(function(oContainer) {
408
+ this._navigate(iStep);
409
+ }.bind(this));
410
+ };
411
+
412
+ Container.prototype._navigate = function(iStep) { // implemented by Popover
413
+ };
414
+
415
+ /**
416
+ * The focus visualization of the field help needs to be removed as the user starts typing into the field.
417
+ *
418
+ * @private
419
+ * @ui5-restricted sap.ui.mdc.ValueHelp
420
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
421
+ */
422
+ Container.prototype.removeFocus = function() {
423
+ };
424
+
425
+ /**
426
+ * Determines if the container is used as typeahead inside the value help
427
+ *
428
+ * <b>Note:</b> This function is used by the container and content and must not be used from outside
429
+ *
430
+ * @returns {boolean} True if used as typeahead
431
+ *
432
+ * @private
433
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Content
434
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
435
+ */
436
+ Container.prototype.isTypeahead = function () {
437
+ var oValueHelp = this.getParent();
438
+ return oValueHelp && oValueHelp.getTypeahead() === this;
439
+ };
440
+
441
+ /**
442
+ * Determines the delegate of the value help
443
+ *
444
+ * <b>Note:</b> This function is used by the container and content and must not be used from outside
445
+ *
446
+ * @returns {sap.ui.mdc.BaseDelegate} <code>typeUtil</code> made available by a delegate module
447
+ * @throws Throws an error if the delegate module is not available
448
+ *
449
+ * @private
450
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Content
451
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
452
+ */
453
+ Container.prototype.getValueHelpDelegate = function () {
454
+ var oValueHelp = this.getParent();
455
+ return oValueHelp && oValueHelp.getControlDelegate();
456
+ };
457
+
458
+ /**
459
+ * Determines the delegate payload of the value help
460
+ *
461
+ * <b>Note:</b> This function is used by the container and content and must not be used from outside
462
+ *
463
+ * @returns {object} payload
464
+ *
465
+ * @private
466
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Content
467
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
468
+ */
469
+ Container.prototype.getValueHelpDelegatePayload = function () {
470
+ var oValueHelp = this.getParent();
471
+ return oValueHelp && oValueHelp.getPayload();
472
+ };
473
+
474
+ /**
475
+ * Provides access to the delegate initialization <code>Promise</code> of the value help.
476
+ *
477
+ * <b>Note:</b> This function is used by the container and content and must not be used from outside
478
+ *
479
+ * @returns {Promise} Returns a <code>Promise</code> reflecting the delegate initialization
480
+ * @throws Throws an error if the delegate module is not available
481
+ *
482
+ * @private
483
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Content
484
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
485
+ */
486
+ Container.prototype.awaitValueHelpDelegate = function () {
487
+ var oValueHelp = this.getParent();
488
+ return oValueHelp && oValueHelp.awaitControlDelegate();
489
+ };
490
+
491
+ /**
492
+ * Determines if delegate of the value help is initialized
493
+ *
494
+ * <b>Note:</b> This function is used by the container and content and must not be used from outside
495
+ *
496
+ * @returns {boolean} True if delegate is initialized
497
+ *
498
+ * @private
499
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Content
500
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
501
+ */
502
+ Container.prototype.isValueHelpDelegateInitialized = function () {
503
+ var oValueHelp = this.getParent();
504
+ return oValueHelp && oValueHelp.bDelegateInitialized;
505
+ };
506
+
507
+ /**
508
+ * If the container is used for type-ahead it might be wanted that the same content should
509
+ * also be shown as valuehelp. If not, the field should not show a valuehelp icon.
510
+ *
511
+ * <b>Note</b> This function needs only to be implemented for <code>Container</code>
512
+ * implementing the <code>sap.ui.mdc.valuehelp.container.ITypeahead</code> interface.
513
+ *
514
+ * @returns {boolean} True if value help shall open as valuehelp
515
+ * @private
516
+ * @ui5-restricted sap.ui.mdc.ValueHelp
517
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
518
+ */
519
+ Container.prototype.getUseAsValueHelp = function() {
520
+ return false;
521
+ };
522
+
523
+ /**
524
+ * Return the value help icon that should be used for the field.
525
+ *
526
+ * @returns {string} Name of the icon
527
+ * @private
528
+ * @ui5-restricted sap.ui.mdc.ValueHelp
529
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
530
+ */
531
+ Container.prototype.getValueHelpIcon = function() {
532
+ // not define icon property on Container as it might be dependent Popover/Dialog or used content
533
+ };
534
+
535
+ //TODO: define aria attribute object
536
+ /**
537
+ * Returns the aria attributes the field needs from the value help
538
+ *
539
+ * @param {int} iMaxConditions maximal conditions allowed (as FieldHelp might not be connected to a field)
540
+ * @returns {object} object with the aria-attibutes
541
+ * @private
542
+ * @ui5-restricted sap.ui.mdc.ValueHelp
543
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
544
+ */
545
+ Container.prototype.getAriaAttributes = function(iMaxConditions) {
546
+
547
+ return { // return default values, but needs to be implemented by specific container
548
+ contentId: null,
549
+ ariaHasPopup: "listbox",
550
+ role: "combobox",
551
+ roleDescription: null
552
+ };
553
+
554
+ };
555
+
556
+ Container.prototype.getScrollDelegate = function(iMaxConditions) {
557
+ var oContainer = this.getAggregation("_container");
558
+ return oContainer && oContainer.getScrollDelegate && oContainer.getScrollDelegate();
559
+ };
560
+
561
+ /**
562
+ * Determines if the value help should be opened when the user clicks into the connected control.
563
+ *
564
+ * @returns {boolean} If <code>true</code>, the value help should open when user clicks into the connected field control
565
+ * @private
566
+ * @ui5-restricted sap.ui.mdc.ValueHelp
567
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
568
+ */
569
+ Container.prototype.shouldOpenOnClick = function() {
570
+ return false;
571
+ };
572
+
573
+ /**
574
+ * Determines if the value help should be opened when the user used the arrow keys.
575
+ *
576
+ * @returns {boolean} If <code>true</code>, the value help should open when user used the arrow keys in the connected field control
577
+ * @private
578
+ * @ui5-restricted sap.ui.mdc.ValueHelp
579
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
580
+ */
581
+ Container.prototype.shouldOpenOnNavigate = function() {
582
+ return false;
583
+ };
584
+
585
+
586
+ /**
587
+ * Determines if the focus is set in the value help or stays in the calling control.
588
+ *
589
+ * @returns {boolean} if true, focus goes to the value help, if false it stays in the calling control.
590
+ *
591
+ * @private
592
+ * @ui5-restricted sap.ui.mdc.ValueHelp
593
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
594
+ */
595
+ Container.prototype.isFocusInHelp = function() {
596
+
597
+ return !this.isTypeahead();
598
+
599
+ };
600
+
601
+ /**
602
+ * Determines if multiselection is active.
603
+ *
604
+ * @returns {boolean} if true, multi-selection is active.
605
+ *
606
+ * @private
607
+ * @ui5-restricted sap.ui.mdc.ValueHelp
608
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
609
+ */
610
+ Container.prototype.isMultiSelect = function() {
611
+
612
+ return false;
613
+
614
+ };
615
+
616
+ Container.prototype._getContainerConfig = function (oContent) {
617
+ var oConfig = oContent && oContent.getContainerConfig();
618
+ var oResult = oConfig && oConfig[this.getMetadata().getName()]; // find configuration for this exact type
619
+
620
+ if (!oResult && oConfig) { // search for configurations of other implemented types
621
+ var aTypes = Object.keys(oConfig);
622
+ var sNonSpecificType = aTypes.find(function (sType) {
623
+ return this.isA(sType);
624
+ }.bind(this));
625
+ if (sNonSpecificType) {
626
+ oResult = oConfig[sNonSpecificType];
627
+ }
628
+ }
629
+
630
+ return oResult;
631
+ };
632
+
633
+ Container.prototype.exit = function() {
634
+ this._oObserver.disconnect();
635
+ this._oObserver = undefined;
636
+ };
637
+
638
+ PromiseMixin.call(Container.prototype);
639
+
640
+ return Container;
641
+
642
+ });