@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,628 @@
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/base/ManagedObjectObserver',
11
+ 'sap/ui/mdc/condition/Condition',
12
+ 'sap/ui/mdc/condition/FilterOperatorUtil',
13
+ 'sap/ui/mdc/condition/Operator',
14
+ 'sap/ui/mdc/enum/ConditionValidated',
15
+ 'sap/base/strings/formatMessage'
16
+ ], function(
17
+ Element,
18
+ PromiseMixin,
19
+ ManagedObjectObserver,
20
+ Condition,
21
+ FilterOperatorUtil,
22
+ Operator,
23
+ ConditionValidated,
24
+ formatMessage
25
+ ) {
26
+ "use strict";
27
+
28
+ /**
29
+ * Constructor for a new <code>Content</code>.
30
+ *
31
+ * @param {string} [sId] ID for the new control, generated automatically if no ID is given
32
+ * @param {object} [mSettings] Initial settings for the new control
33
+ * @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element.
34
+ * @extends sap.ui.core.Element
35
+ * @version 1.96.1
36
+ * @constructor
37
+ * @abstract
38
+ * @private
39
+ * @ui5-restricted sap.ui.mdc
40
+ * @since 1.95.0
41
+ * @alias sap.ui.mdc.valuehelp.base.Content
42
+ * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
43
+ */
44
+ var Content = Element.extend("sap.ui.mdc.valuehelp.base.Content", /** @lends sap.ui.mdc.valuehelp.base.Content.prototype */
45
+ {
46
+ metadata: {
47
+ library: "sap.ui.mdc",
48
+ properties: {
49
+ /**
50
+ * Title text that appears tab header.
51
+ */
52
+ title: {
53
+ type: "string",
54
+ group: "Appearance",
55
+ defaultValue: ""
56
+ },
57
+ /**
58
+ * Title text that appears in the dialog header.
59
+ */
60
+ shortTitle: {
61
+ type: "string",
62
+ group: "Appearance",
63
+ defaultValue: ""
64
+ },
65
+ /**
66
+ * Conditions of the value help
67
+ *
68
+ * <b>Note:</b> This property must not be set from outside, it is only to be used by the corresponding container
69
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
70
+ */
71
+ conditions: { // TODO: only internal? make restricted?
72
+ type: "object[]",
73
+ defaultValue: [],
74
+ byValue: true
75
+ },
76
+ /**
77
+ * Value for filtering ($search)
78
+ *
79
+ * <b>Note:</b> This property must not be set from outside, it is only to be used by the corresponding container
80
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
81
+ */
82
+ filterValue: { // TODO: how to hide? Or how to access from ValueHelp?
83
+ type: "string",
84
+ defaultValue: ""//,
85
+ //visibility: "hidden"
86
+ },
87
+ /**
88
+ * internal configuration
89
+ *
90
+ * <b>Note:</b> This property must not be set from outside, it is only to be used by the corresponding container
91
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
92
+ */
93
+ config: {
94
+ type: "object",
95
+ defaultValue: {}//,
96
+ // visibility: "hidden"
97
+ }
98
+
99
+ },
100
+ aggregations: {
101
+ /**
102
+ * Content control that is put inside the parent container
103
+ *
104
+ * <b>Note:</b> This aggregation must not be set from outside, it is only to be used by the corresponding container
105
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
106
+ */
107
+ displayContent: {
108
+ type: "sap.ui.core.Control",
109
+ multiple: false//,
110
+ //visibility: "hidden" // as ManagedObjectModel can only observe hidden aggregations on root-control
111
+ }
112
+ },
113
+ events: {
114
+ /**
115
+ * Fired if the selected condition changed.
116
+ */
117
+ select: {
118
+ parameters: {
119
+ /**
120
+ * Type of the selection change (add, remove)
121
+ */
122
+ type: { type: "sap.ui.mdc.enum.SelectType" },
123
+ /**
124
+ * Changed conditions
125
+ *
126
+ * <b>Note:</b> A condition must have the structure of {@link sap.ui.mdc.condition.ConditionObject ConditionObject}.
127
+ */
128
+ conditions: { type: "object[]" }
129
+ }
130
+ },
131
+ /**
132
+ * Fired if a change on the content is confirmed
133
+ */
134
+ confirm: {
135
+ parameters: {
136
+ /**
137
+ * True if the value help need to be closed
138
+ */
139
+ close: { type: "boolean" }
140
+ }
141
+ },
142
+ /**
143
+ * Fired if the change is cancelled.
144
+ */
145
+ cancel: {},
146
+ /**
147
+ * Fired if the content requests the delegate content.
148
+ */
149
+ requestDelegateContent: {},
150
+ /**
151
+ * Fired if the value help should switch to dialog mode.
152
+ */
153
+ requestSwitchToDialog: {},
154
+ /**
155
+ * Fired if a navigation was executed in the content
156
+ */
157
+ navigated: {
158
+ parameters: {
159
+ /**
160
+ * True if the focus should be set back to the field.
161
+ */
162
+ bLeaveFocus: { type: "boolean" },
163
+ /**
164
+ * Navigated condition.
165
+ *
166
+ * <b>Note:</b> A condition must have the structure of {@link sap.ui.mdc.condition.ConditionObject ConditionObject}.
167
+ */
168
+ condition: { type: "object" },
169
+ /**
170
+ * ID of the navigated item. (This is needed to set the corresponding aria-attribute)
171
+ */
172
+ itemId: { type: "string" }
173
+ }
174
+ }
175
+ }
176
+ }
177
+ });
178
+
179
+ Content.prototype.init = function() {
180
+
181
+ this._oObserver = new ManagedObjectObserver(this._observeChanges.bind(this));
182
+
183
+ this._oObserver.observe(this, {
184
+ properties: ["filterValue", "conditions", "config"]
185
+ });
186
+
187
+ };
188
+
189
+ Content.prototype.exit = function() {
190
+
191
+ this._oObserver.disconnect();
192
+ this._oObserver = undefined;
193
+
194
+ };
195
+
196
+ Content.prototype.setProperty = function(sPropertyName, oValue, bSuppressInvalidate) {
197
+
198
+ // don't rerender content or parent-container on conditions change. This needs only be updated on
199
+ // content control inside (Table, List, DefineConditionPanel...).
200
+ if (sPropertyName === "conditions" || sPropertyName === "filterValue" || sPropertyName === "config") {
201
+ bSuppressInvalidate = true;
202
+ }
203
+
204
+ return Element.prototype.setProperty.apply(this, [sPropertyName, oValue, bSuppressInvalidate]);
205
+
206
+ };
207
+
208
+
209
+ /**
210
+ * Gets the content controls
211
+ *
212
+ * @returns {Promise<sap.ui.core.Control>} This promise resolves after the content is created
213
+ *
214
+ * @private
215
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
216
+ */
217
+ Content.prototype.getContent = function () {
218
+
219
+ };
220
+
221
+ /**
222
+ * Provides a configuration map for supported containers
223
+ *
224
+ * @example
225
+ * // Example configuration:
226
+ * {
227
+ * 'sap.ui.mdc.valuehelp.MyCustomContainer': {
228
+ * showArrow: true,
229
+ * showHeader: true,
230
+ getFooter: function () { Promise.resolve(oFooter); },
231
+ * getContentWidth: function () { return "500px"; },
232
+ getContentHeight: function () { ... },
233
+ * }
234
+ * }
235
+ * @returns {object|undefined} if available, a container configuration object is returned.
236
+ * @private
237
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
238
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
239
+ */
240
+ Content.prototype.getContainerConfig = function () {
241
+
242
+ };
243
+
244
+ /**
245
+ * Called if the content will be shown.
246
+ *
247
+ * @private
248
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
249
+ */
250
+ Content.prototype.onShow = function () {
251
+ this._bVisible = true;
252
+ this._handleConditionsUpdate();
253
+ //this._handleFilterValueUpdate();
254
+ };
255
+
256
+ /**
257
+ * Called if the content will be hidden.
258
+ *
259
+ * @private
260
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
261
+ */
262
+ Content.prototype.onHide = function () {
263
+ this._bVisible = false;
264
+ };
265
+
266
+ /**
267
+ * Determines the item (key and description) for a given value.
268
+ *
269
+ * The content checks if there is an item with a key or description that fits this value.
270
+ *
271
+ * <b>Note:</b> This function must only be called by the <code>Container</code> element.
272
+ *
273
+ * @param {object} oConfig Configuration
274
+ * @param {any} oConfig.value Value as entered by user
275
+ * @param {any} [oConfig.parsedValue] Value parsed by type to fit the data type of the key
276
+ * @param {object} [oConfig.inParameters] In parameters for the key (as a key must not be unique.)
277
+ * @param {object} [oConfig.outParameters] Out parameters for the key (as a key must not be unique.)
278
+ * @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.
279
+ * @param {boolean} [oConfig.checkKeyFirst] If set, the content checks first if the value fits a key // TODO: not longer needed?
280
+ * @param {boolean} oConfig.checkKey If set, the content 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.
281
+ * @param {boolean} oConfig.checkDescription If set, the content 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.
282
+ * @param {sap.ui.mdc.condition.ConditionModel} [oConfig.conditionModel] <code>ConditionModel</code>, in case of <code>FilterField</code>
283
+ * @param {string} [oConfig.conditionModelName] Name of the <code>ConditionModel</code>, in case of <code>FilterField</code>
284
+ * @param {boolean} [oConfig.caseSensitive] If set, the check is done case sensitive
285
+ * @returns {Promise<sap.ui.mdc.field.FieldHelpItem>} Promise returning object containing description, key, in and out parameters.
286
+ * @throws {sap.ui.model.FormatException|sap.ui.model.ParseException} if entry is not found or not unique
287
+ *
288
+ * @private
289
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
290
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
291
+ */
292
+ Content.prototype.getItemForValue = function (oConfig) {
293
+
294
+ };
295
+
296
+ /**
297
+ * Defines if the content can be used for input validation.
298
+ *
299
+ * @returns {boolean} True if content can be used for input validation
300
+ *
301
+ * @private
302
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
303
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
304
+ */
305
+ Content.prototype.isValidationSupported = function() { // TODO only for TypeAhead content
306
+ return false;
307
+ };
308
+
309
+ Content.prototype.getScrollDelegate = function() {
310
+ var oContainer = this.getParent();
311
+ return oContainer && oContainer.getScrollDelegate();
312
+ };
313
+
314
+ Content.prototype._observeChanges = function(oChanges) {
315
+ if (oChanges.name === "conditions") {
316
+ this._handleConditionsUpdate(oChanges);
317
+ }
318
+
319
+ if (oChanges.name === "filterValue") {
320
+ this._handleFilterValueUpdate(oChanges);
321
+ }
322
+
323
+ if (oChanges.name === "config") {
324
+ _configChanged.call(this, oChanges.current);
325
+ }
326
+ };
327
+
328
+ Content.prototype._handleFilterValueUpdate = function(oChanges) {
329
+
330
+ };
331
+
332
+ Content.prototype._handleConditionsUpdate = function(oChanges) {
333
+
334
+ };
335
+
336
+ /**
337
+ * Creates a condition based on the used operator.
338
+ *
339
+ * @param {string} vValue Value of the condition. For item conditions this must be the key.
340
+ * @param {string} [sDescription] Description of the operator
341
+ * @param {object} [oInParameters] In parameters of the condition
342
+ * @param {object} [oOutParameters] Out parameters of the condition
343
+ * @returns {sap.ui.mdc.condition.ConditionObject} The new condition object with the maintained operator along with <code>sKey</code> and <code>sDescription</code> as <code>aValues</code>
344
+ * @private
345
+ * @ui5-restricted FieldHelp subclasses
346
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
347
+ */
348
+ Content.prototype._createCondition = function(vValue, sDescription, oInParameters, oOutParameters) {
349
+
350
+ var oOperator = _getOperator.call(this);
351
+
352
+ var aValues = [vValue];
353
+ if (oOperator.valueTypes.length > 1 && oOperator.valueTypes[1] !== Operator.ValueType.Static && sDescription !== null && sDescription !== undefined) {
354
+ // description is supported
355
+ aValues.push(sDescription);
356
+ }
357
+
358
+ return Condition.createCondition(oOperator.name, aValues, oInParameters, oOutParameters, ConditionValidated.Validated); // Conditions from help are always validated
359
+
360
+ };
361
+
362
+ /**
363
+ * The focus visualization of the field help needs to be removed as the user starts typing into the field.
364
+ *
365
+ * Only needed for typeahead.
366
+ *
367
+ * @private
368
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Container
369
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
370
+ */
371
+ Content.prototype.removeFocus = function() {
372
+
373
+ };
374
+
375
+ /**
376
+ * Triggers navigation in the content.
377
+ *
378
+ * As this could be asyncron as data might be loaded a promise is returned.
379
+ *
380
+ * <b>Note:</b> This function must only be called by the <code>Container</code> element.
381
+ *
382
+ * @param {int} iStep Number of steps for navigation (e.g. 1 means next item, -1 means previous item)
383
+ * @returns {Promise<object>} Promise returning object of navigated item (condition and itemId)
384
+ *
385
+ * @private
386
+ * @ui5-restricted sap.ui.mdc.valueHelp.base.Container
387
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
388
+ */
389
+ Content.prototype.navigate = function(iStep) {
390
+
391
+ };
392
+
393
+ Content.prototype.getUIArea = function() {
394
+ // Table, List or other content might be rerendered. In this case the corresponding UIArea is the one of the Popover or Dialog, not the one of the parents.
395
+ var oContainer = this.getParent();
396
+ if (oContainer && oContainer._getUIAreaForContent) {
397
+ return oContainer._getUIAreaForContent();
398
+ }
399
+
400
+ return Element.prototype.getUIArea.apply(this, arguments);
401
+ };
402
+
403
+ /**
404
+ * Determines if the container of the content is used as typeAhead inside the value help
405
+ *
406
+ * <b>Note:</b> This function is used by the content and must not be used from outside
407
+ *
408
+ * @returns {boolean} True if used as typeahead
409
+ *
410
+ * @private
411
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
412
+ */
413
+ Content.prototype.isTypeahead = function () {
414
+ var oContainer = this.getParent();
415
+ return oContainer && oContainer.isTypeahead();
416
+ };
417
+
418
+ Content.prototype.isContainerOpen = function () {
419
+ var oContainer = this.getParent();
420
+ return oContainer && oContainer.isOpen();
421
+ };
422
+
423
+ Content.prototype.isContainerOpening = function () {
424
+ var oContainer = this.getParent();
425
+ return oContainer && oContainer.isOpening();
426
+ };
427
+
428
+ Content.prototype._getValueHelpDelegate = function () {
429
+ var oContainer = this.getParent();
430
+ return oContainer && oContainer.getValueHelpDelegate();
431
+ };
432
+
433
+ Content.prototype._getValueHelpDelegatePayload = function () {
434
+ var oContainer = this.getParent();
435
+ return oContainer && oContainer.getValueHelpDelegatePayload();
436
+ };
437
+
438
+ Content.prototype._awaitValueHelpDelegate = function () {
439
+ var oContainer = this.getParent();
440
+ return oContainer && oContainer.awaitValueHelpDelegate();
441
+ };
442
+
443
+ Content.prototype._isValueHelpDelegateInitialized = function () {
444
+ var oContainer = this.getParent();
445
+ return oContainer && oContainer.isValueHelpDelegateInitialized();
446
+ };
447
+
448
+ Content.prototype.getCount = function (aConditions) {
449
+ return 0;
450
+ };
451
+
452
+ /**
453
+ * Return the value help icon that should be used for the field.
454
+ *
455
+ * <b>Note</b> This function needs only to be implemented for <code>Content</code>
456
+ * implementing the <code>sap.ui.mdc.valuehelp.Popover</code> container.
457
+ * On dialogs the <code>Dialog</code> container defines the icon, as it could have multiple contents.
458
+ *
459
+ * @returns {string} Name of the icon
460
+ * @private
461
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
462
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
463
+ */
464
+ Content.prototype.getValueHelpIcon = function() {
465
+ };
466
+
467
+ //TODO: define aria attribute object
468
+ /**
469
+ * Returns the aria attributes the field needs from the value help
470
+ *
471
+ * <b>Note</b> This function needs only to be implemented for <code>Content</code>
472
+ * implementing the <code>sap.ui.mdc.valuehelp.Popover</code> container.
473
+ * On dialogs the <code>Dialog</code> container defines the attributes, as it could have multiple contents.
474
+ *
475
+ * @param {int} iMaxConditions maximal conditions allowed (as FieldHelp might not be connected to a field)
476
+ * @returns {object} object with the aria-attibutes
477
+ * @private
478
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
479
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
480
+ */
481
+ Content.prototype.getAriaAttributes = function(iMaxConditions) {
482
+
483
+ return { // return default values, but needs to be implemented by specific content
484
+ contentId: null,
485
+ ariaHasPopup: "listbox",
486
+ roleDescription: null
487
+ };
488
+
489
+ };
490
+
491
+ Content.prototype._isSingleSelect = function (oEvent) {
492
+ return this._getMaxConditions() === 1;
493
+ };
494
+
495
+ /**
496
+ * Determines if the value help should be opened when the user clicks into the connected control.
497
+ *
498
+ * @returns {boolean} If <code>true</code>, the value help should open when user clicks into the connected field control
499
+ * @private
500
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
501
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
502
+ */
503
+ Content.prototype.shouldOpenOnClick = function() {
504
+ return false;
505
+ };
506
+
507
+ /**
508
+ * Determines if the value help should be opened when the user used the arrow keys.
509
+ * By default closed navigation is only enabled for single select scenarios
510
+ *
511
+ * @returns {boolean} If <code>true</code>, the value help should open when user used the arrow keys in the connected field control
512
+ * @private
513
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
514
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
515
+ */
516
+ Content.prototype.shouldOpenOnNavigate = function() {
517
+ return !this._isSingleSelect();
518
+ };
519
+
520
+
521
+ /**
522
+ * Determines if the focus is set in the value help or stays in the calling control.
523
+ *
524
+ * @returns {boolean} if true, focus goes to the value help, if false it stays in the calling control.
525
+ *
526
+ * @private
527
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
528
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
529
+ */
530
+ Content.prototype.isFocusInHelp = function() {
531
+
532
+ return !this.isTypeahead();
533
+
534
+ };
535
+
536
+ /**
537
+ * Determines if multiselection is active.
538
+ *
539
+ * @returns {boolean} if true, multi-selection is active.
540
+ *
541
+ * @private
542
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
543
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
544
+ */
545
+ Content.prototype.isMultiSelect = function() {
546
+
547
+ return !this._isSingleSelect();
548
+
549
+ };
550
+
551
+
552
+ /**
553
+ * Determines if value help dialog should show the tokenizer for the content.
554
+ *
555
+ * @returns {boolean} if for one content the value is true, the dialog shows the tokenizer.
556
+ *
557
+ * @private
558
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
559
+ */
560
+ Content.prototype.getRequiresTokenizer = function() {
561
+ return true;
562
+ };
563
+
564
+ function _configChanged(oConfig) {
565
+
566
+ _determineOperator.call(this, oConfig.operators);
567
+
568
+ }
569
+
570
+ function _determineOperator(aOperators) {
571
+ this._oOperator = undefined;
572
+ if (aOperators) {
573
+ this._oOperator = FilterOperatorUtil.getEQOperator(aOperators);
574
+ }
575
+ }
576
+
577
+ function _getOperator() {
578
+ return this._oOperator;
579
+ }
580
+
581
+ /**
582
+ * Determines the title used in the TabBar of the dialog.
583
+ *
584
+ * <b>Note:</b> This function is used by the container and must not be used from outside
585
+ *
586
+ * @param {int} iCount Number of selected items or conditions
587
+ * @returns {string} title
588
+ *
589
+ * @private
590
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
591
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
592
+ */
593
+ Content.prototype.getFormattedTitle = function(iCount) {
594
+ var sTitle = this.getTitle();
595
+ if (sTitle) {
596
+ sTitle = formatMessage(sTitle, iCount ? iCount : "");
597
+ }
598
+ return sTitle;
599
+ };
600
+
601
+ /**
602
+ * Determines the title used in the header of the dialog.
603
+ *
604
+ * <b>Note:</b> This function is used by the container and must not be used from outside
605
+ *
606
+ * @returns {string} title
607
+ *
608
+ * @private
609
+ * @ui5-restricted sap.ui.mdc.valuehelp.base.Container
610
+ * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
611
+ */
612
+ Content.prototype.getFormattedShortTitle = function() {
613
+ return this.getShortTitle();
614
+ };
615
+
616
+ Content.prototype._getMaxConditions = function() {
617
+
618
+ var oConfig = this.getConfig();
619
+ return oConfig && oConfig.maxConditions;
620
+
621
+ };
622
+
623
+ PromiseMixin.call(Content.prototype);
624
+
625
+
626
+ return Content;
627
+
628
+ });