@openui5/sap.ui.mdc 1.113.0 → 1.115.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 (269) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/README.md +22 -9
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +4 -4
  5. package/src/sap/ui/mdc/.library +1 -1
  6. package/src/sap/ui/mdc/ActionToolbar.js +5 -7
  7. package/src/sap/ui/mdc/AggregationBaseDelegate.js +5 -5
  8. package/src/sap/ui/mdc/BaseDelegate.js +49 -14
  9. package/src/sap/ui/mdc/Chart.js +147 -179
  10. package/src/sap/ui/mdc/ChartDelegate.js +404 -514
  11. package/src/sap/ui/mdc/ChartRenderer.js +11 -11
  12. package/src/sap/ui/mdc/Control.js +4 -4
  13. package/src/sap/ui/mdc/DefaultTypeMap.js +84 -0
  14. package/src/sap/ui/mdc/Element.js +4 -4
  15. package/src/sap/ui/mdc/Field.js +98 -96
  16. package/src/sap/ui/mdc/FilterBar.js +33 -56
  17. package/src/sap/ui/mdc/FilterBarDelegate.js +36 -69
  18. package/src/sap/ui/mdc/FilterField.js +93 -47
  19. package/src/sap/ui/mdc/Link.js +83 -82
  20. package/src/sap/ui/mdc/LinkDelegate.js +29 -48
  21. package/src/sap/ui/mdc/MultiValueField.js +34 -30
  22. package/src/sap/ui/mdc/Table.js +182 -193
  23. package/src/sap/ui/mdc/TableDelegate.js +244 -33
  24. package/src/sap/ui/mdc/ValueHelp.js +67 -50
  25. package/src/sap/ui/mdc/ValueHelpDelegate.js +57 -89
  26. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +4 -12
  27. package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +192 -197
  28. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +10 -20
  29. package/src/sap/ui/mdc/chart/ChartToolbar.js +50 -50
  30. package/src/sap/ui/mdc/chart/ChartTypeButton.js +23 -27
  31. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +10 -10
  32. package/src/sap/ui/mdc/chart/DrillStackHandler.js +14 -14
  33. package/src/sap/ui/mdc/chart/Item.js +30 -17
  34. package/src/sap/ui/mdc/chart/PropertyHelper.js +10 -10
  35. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +23 -15
  36. package/src/sap/ui/mdc/condition/Condition.js +11 -23
  37. package/src/sap/ui/mdc/condition/ConditionConverter.js +8 -8
  38. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  39. package/src/sap/ui/mdc/condition/FilterConverter.js +2 -2
  40. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +771 -123
  41. package/src/sap/ui/mdc/condition/Operator.js +52 -50
  42. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +14 -14
  43. package/src/sap/ui/mdc/condition/RangeOperator.js +3 -5
  44. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +2 -2
  45. package/src/sap/ui/mdc/enum/ActionToolbarActionAlignment.js +5 -9
  46. package/src/sap/ui/mdc/enum/BaseType.js +15 -20
  47. package/src/sap/ui/mdc/enum/ConditionValidated.js +5 -9
  48. package/src/sap/ui/mdc/enum/ContentMode.js +1 -0
  49. package/src/sap/ui/mdc/enum/EditMode.js +7 -19
  50. package/src/sap/ui/mdc/enum/FieldDisplay.js +12 -18
  51. package/src/sap/ui/mdc/enum/FilterBarValidationStatus.js +3 -1
  52. package/src/sap/ui/mdc/enum/LinkType.js +40 -0
  53. package/src/sap/ui/mdc/enum/OperatorOverwrite.js +4 -2
  54. package/src/sap/ui/mdc/enum/OperatorValueType.js +47 -0
  55. package/src/sap/ui/mdc/enum/PersistenceMode.js +36 -36
  56. package/src/sap/ui/mdc/enum/ProcessingStrategy.js +3 -1
  57. package/src/sap/ui/mdc/enum/PropagationReason.js +1 -1
  58. package/src/sap/ui/mdc/enum/ReasonMode.js +1 -0
  59. package/src/sap/ui/mdc/enum/SelectType.js +1 -0
  60. package/src/sap/ui/mdc/enums/ActionToolbarActionAlignment.js +31 -0
  61. package/src/sap/ui/mdc/enums/BaseType.js +72 -0
  62. package/src/sap/ui/mdc/enums/ChartItemRoleType.js +61 -0
  63. package/src/sap/ui/mdc/enums/ChartItemType.js +31 -0
  64. package/src/sap/ui/mdc/enums/ChartP13nMode.js +48 -0
  65. package/src/sap/ui/mdc/enums/ChartToolbarActionType.js +49 -0
  66. package/src/sap/ui/mdc/enums/ConditionValidated.js +43 -0
  67. package/src/sap/ui/mdc/enums/ContentMode.js +74 -0
  68. package/src/sap/ui/mdc/enums/FieldDisplay.js +49 -0
  69. package/src/sap/ui/mdc/enums/FieldEditMode.js +55 -0
  70. package/src/sap/ui/mdc/enums/FilterBarP13nMode.js +36 -0
  71. package/src/sap/ui/mdc/enums/FilterBarValidationStatus.js +56 -0
  72. package/src/sap/ui/mdc/enums/LinkType.js +38 -0
  73. package/src/sap/ui/mdc/enums/OperatorOverwrite.js +34 -0
  74. package/src/sap/ui/mdc/enums/OperatorValueType.js +44 -0
  75. package/src/sap/ui/mdc/enums/PersistenceMode.js +44 -0
  76. package/src/sap/ui/mdc/enums/ProcessingStrategy.js +39 -0
  77. package/src/sap/ui/mdc/enums/ReasonMode.js +53 -0
  78. package/src/sap/ui/mdc/enums/TableGrowingMode.js +42 -0
  79. package/src/sap/ui/mdc/enums/TableMultiSelectMode.js +35 -0
  80. package/src/sap/ui/mdc/enums/TableP13nMode.js +54 -0
  81. package/src/sap/ui/mdc/enums/TableRowAction.js +30 -0
  82. package/src/sap/ui/mdc/enums/TableRowCountMode.js +36 -0
  83. package/src/sap/ui/mdc/enums/TableSelectionMode.js +45 -0
  84. package/src/sap/ui/mdc/enums/TableType.js +43 -0
  85. package/src/sap/ui/mdc/enums/ValueHelpPropagationReason.js +41 -0
  86. package/src/sap/ui/mdc/enums/ValueHelpSelectionType.js +46 -0
  87. package/src/sap/ui/mdc/field/ConditionType.js +120 -88
  88. package/src/sap/ui/mdc/field/ConditionsType.js +149 -44
  89. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  90. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +15 -17
  91. package/src/sap/ui/mdc/field/FieldBase.js +512 -323
  92. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +31 -114
  93. package/src/sap/ui/mdc/field/FieldBaseRenderer.js +4 -4
  94. package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -21
  95. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  96. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  97. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  98. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +8 -29
  99. package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +2 -7
  100. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +2 -6
  101. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  102. package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -1
  103. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +0 -4
  104. package/src/sap/ui/mdc/field/content/BooleanContent.js +2 -2
  105. package/src/sap/ui/mdc/field/content/ContentFactory.js +47 -35
  106. package/src/sap/ui/mdc/field/content/DateContent.js +49 -43
  107. package/src/sap/ui/mdc/field/content/DateTimeContent.js +2 -2
  108. package/src/sap/ui/mdc/field/content/DefaultContent.js +8 -8
  109. package/src/sap/ui/mdc/field/content/LinkContent.js +10 -6
  110. package/src/sap/ui/mdc/field/content/SearchContent.js +4 -4
  111. package/src/sap/ui/mdc/field/content/TimeContent.js +2 -2
  112. package/src/sap/ui/mdc/field/content/UnitContent.js +19 -11
  113. package/src/sap/ui/mdc/field/splitValue.js +45 -0
  114. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +109 -218
  115. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +22 -19
  116. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +6 -7
  117. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +2 -4
  118. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +3 -7
  119. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +52 -41
  120. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -4
  121. package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +1 -3
  122. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +4 -2
  123. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +14 -21
  124. package/src/sap/ui/mdc/filterbar/vh/FilterBarDelegate.js +1 -1
  125. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
  126. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +2 -38
  127. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +3 -3
  128. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +11 -6
  129. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  130. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +2 -2
  131. package/src/sap/ui/mdc/flexibility/GroupFlex.js +11 -2
  132. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +25 -9
  133. package/src/sap/ui/mdc/flexibility/SortFlex.js +11 -1
  134. package/src/sap/ui/mdc/flexibility/Util.js +2 -2
  135. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +7 -4
  136. package/src/sap/ui/mdc/library.js +178 -84
  137. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  138. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  139. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  140. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  141. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  142. package/src/sap/ui/mdc/link/Factory.js +1 -1
  143. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  144. package/src/sap/ui/mdc/link/LinkItem.js +26 -5
  145. package/src/sap/ui/mdc/link/Panel.js +1 -1
  146. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  147. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  148. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  149. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  150. package/src/sap/ui/mdc/messagebundle.properties +9 -0
  151. package/src/sap/ui/mdc/messagebundle_ar.properties +7 -1
  152. package/src/sap/ui/mdc/messagebundle_bg.properties +19 -13
  153. package/src/sap/ui/mdc/messagebundle_ca.properties +6 -0
  154. package/src/sap/ui/mdc/messagebundle_cs.properties +6 -0
  155. package/src/sap/ui/mdc/messagebundle_cy.properties +6 -0
  156. package/src/sap/ui/mdc/messagebundle_da.properties +6 -0
  157. package/src/sap/ui/mdc/messagebundle_de.properties +6 -0
  158. package/src/sap/ui/mdc/messagebundle_el.properties +13 -7
  159. package/src/sap/ui/mdc/messagebundle_en.properties +6 -0
  160. package/src/sap/ui/mdc/messagebundle_en_GB.properties +6 -0
  161. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +6 -0
  162. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +6 -0
  163. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +6 -0
  164. package/src/sap/ui/mdc/messagebundle_es.properties +6 -0
  165. package/src/sap/ui/mdc/messagebundle_es_MX.properties +6 -0
  166. package/src/sap/ui/mdc/messagebundle_et.properties +6 -0
  167. package/src/sap/ui/mdc/messagebundle_fi.properties +7 -1
  168. package/src/sap/ui/mdc/messagebundle_fr.properties +6 -0
  169. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -4
  170. package/src/sap/ui/mdc/messagebundle_hi.properties +6 -0
  171. package/src/sap/ui/mdc/messagebundle_hr.properties +15 -9
  172. package/src/sap/ui/mdc/messagebundle_hu.properties +8 -2
  173. package/src/sap/ui/mdc/messagebundle_id.properties +6 -0
  174. package/src/sap/ui/mdc/messagebundle_it.properties +10 -4
  175. package/src/sap/ui/mdc/messagebundle_iw.properties +6 -0
  176. package/src/sap/ui/mdc/messagebundle_ja.properties +14 -8
  177. package/src/sap/ui/mdc/messagebundle_kk.properties +16 -10
  178. package/src/sap/ui/mdc/messagebundle_ko.properties +9 -3
  179. package/src/sap/ui/mdc/messagebundle_lt.properties +6 -0
  180. package/src/sap/ui/mdc/messagebundle_lv.properties +6 -0
  181. package/src/sap/ui/mdc/messagebundle_ms.properties +9 -3
  182. package/src/sap/ui/mdc/messagebundle_nl.properties +7 -1
  183. package/src/sap/ui/mdc/messagebundle_no.properties +6 -0
  184. package/src/sap/ui/mdc/messagebundle_pl.properties +8 -2
  185. package/src/sap/ui/mdc/messagebundle_pt.properties +6 -0
  186. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +6 -0
  187. package/src/sap/ui/mdc/messagebundle_ro.properties +6 -0
  188. package/src/sap/ui/mdc/messagebundle_ru.properties +6 -0
  189. package/src/sap/ui/mdc/messagebundle_sh.properties +6 -0
  190. package/src/sap/ui/mdc/messagebundle_sk.properties +8 -2
  191. package/src/sap/ui/mdc/messagebundle_sl.properties +6 -0
  192. package/src/sap/ui/mdc/messagebundle_sv.properties +6 -0
  193. package/src/sap/ui/mdc/messagebundle_th.properties +19 -13
  194. package/src/sap/ui/mdc/messagebundle_tr.properties +6 -0
  195. package/src/sap/ui/mdc/messagebundle_uk.properties +7 -1
  196. package/src/sap/ui/mdc/messagebundle_vi.properties +6 -0
  197. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -1
  198. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +6 -0
  199. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
  200. package/src/sap/ui/mdc/mixin/DelegateMixin.js +33 -14
  201. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -5
  202. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  203. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
  204. package/src/sap/ui/mdc/odata/TypeMap.js +155 -0
  205. package/src/sap/ui/mdc/odata/TypeUtil.js +42 -1
  206. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +17 -11
  207. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +5 -50
  208. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +1 -1
  209. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +156 -44
  210. package/src/sap/ui/mdc/odata/v4/TypeMap.js +70 -0
  211. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -1
  212. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +8 -9
  213. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +380 -390
  214. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  215. package/src/sap/ui/mdc/p13n/StateUtil.js +6 -19
  216. package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
  217. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +43 -34
  218. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +3 -4
  219. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +1 -1
  220. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +4 -6
  221. package/src/sap/ui/mdc/table/Column.js +45 -17
  222. package/src/sap/ui/mdc/table/ColumnSettings.js +2 -5
  223. package/src/sap/ui/mdc/table/CreationRow.js +4 -6
  224. package/src/sap/ui/mdc/table/GridTableType.js +31 -115
  225. package/src/sap/ui/mdc/table/PropertyHelper.js +56 -11
  226. package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +2 -5
  227. package/src/sap/ui/mdc/table/ResponsiveTableType.js +13 -84
  228. package/src/sap/ui/mdc/table/RowActionItem.js +9 -14
  229. package/src/sap/ui/mdc/table/RowSettings.js +2 -5
  230. package/src/sap/ui/mdc/table/TableSettings.js +23 -19
  231. package/src/sap/ui/mdc/table/TableTypeBase.js +43 -15
  232. package/src/sap/ui/mdc/table/TreeTableType.js +12 -32
  233. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -5
  234. package/src/sap/ui/mdc/table/menu/Item.js +1 -1
  235. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +3 -3
  236. package/src/sap/ui/mdc/table/utils/Personalization.js +4 -4
  237. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +6 -6
  238. package/src/sap/ui/mdc/util/DateUtil.js +15 -11
  239. package/src/sap/ui/mdc/util/FilterUtil.js +44 -19
  240. package/src/sap/ui/mdc/util/IdentifierUtil.js +0 -1
  241. package/src/sap/ui/mdc/util/InfoBar.js +1 -2
  242. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  243. package/src/sap/ui/mdc/util/PropertyHelper.js +15 -8
  244. package/src/sap/ui/mdc/util/TypeMap.js +377 -0
  245. package/src/sap/ui/mdc/util/TypeUtil.js +35 -2
  246. package/src/sap/ui/mdc/util/mapVersions.js +225 -0
  247. package/src/sap/ui/mdc/valuehelp/Dialog.js +52 -33
  248. package/src/sap/ui/mdc/valuehelp/Popover.js +33 -35
  249. package/src/sap/ui/mdc/valuehelp/base/Container.js +193 -62
  250. package/src/sap/ui/mdc/valuehelp/base/Content.js +134 -57
  251. package/src/sap/ui/mdc/{field → valuehelp/base}/DefineConditionPanel.js +426 -197
  252. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -2
  253. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +140 -47
  254. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +11 -9
  255. package/src/sap/ui/mdc/valuehelp/content/Bool.js +11 -20
  256. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +26 -32
  257. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +14 -17
  258. package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +60 -0
  259. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +194 -199
  260. package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -51
  261. package/test/sap/ui/mdc/testutils/opa/chart/AssertionsViz.js +4 -4
  262. package/test/sap/ui/mdc/testutils/opa/field/Actions.js +1 -1
  263. package/test/sap/ui/mdc/testutils/opa/field/Assertions.js +3 -3
  264. package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +4 -2
  265. package/test/sap/ui/mdc/testutils/opa/filterfield/Assertions.js +1 -1
  266. package/test/sap/ui/mdc/testutils/opa/table/Actions.js +41 -70
  267. package/test/sap/ui/mdc/testutils/opa/valueHelp/doWait.js +1 -1
  268. package/src/sap/ui/mdc/designtime/p13n/PersistenceProvider.designtime.js +0 -21
  269. package/src/sap/ui/mdc/util/FormatUtil.js +0 -82
@@ -5,16 +5,17 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  'sap/ui/Device',
8
- 'sap/ui/mdc/enum/EditMode',
9
- 'sap/ui/mdc/enum/FieldDisplay',
10
- 'sap/ui/mdc/enum/ConditionValidated',
8
+ 'sap/ui/mdc/enums/FieldEditMode',
9
+ 'sap/ui/mdc/enums/FieldDisplay',
10
+ 'sap/ui/mdc/enums/ConditionValidated',
11
11
  'sap/ui/mdc/field/FieldBaseRenderer',
12
12
  'sap/ui/mdc/condition/FilterOperatorUtil',
13
13
  'sap/ui/mdc/condition/Condition',
14
14
  'sap/ui/mdc/condition/ConditionValidateException',
15
15
  'sap/ui/mdc/field/ConditionType',
16
16
  'sap/ui/mdc/field/ConditionsType',
17
- 'sap/ui/mdc/enum/BaseType',
17
+ 'sap/ui/mdc/field/splitValue',
18
+ 'sap/ui/mdc/enums/BaseType',
18
19
  'sap/ui/mdc/field/content/ContentFactory',
19
20
  'sap/ui/mdc/Control',
20
21
  "sap/ui/mdc/util/loadModules",
@@ -36,7 +37,7 @@ sap.ui.define([
36
37
  'sap/ui/events/KeyCodes'
37
38
  ], function(
38
39
  Device,
39
- EditMode,
40
+ FieldEditMode,
40
41
  FieldDisplay,
41
42
  ConditionValidated,
42
43
  FieldBaseRenderer,
@@ -45,6 +46,7 @@ sap.ui.define([
45
46
  ConditionValidateException,
46
47
  ConditionType,
47
48
  ConditionsType,
49
+ splitValue,
48
50
  BaseType,
49
51
  ContentFactory,
50
52
  Control,
@@ -77,10 +79,7 @@ sap.ui.define([
77
79
  * @namespace
78
80
  * @name sap.ui.mdc.field
79
81
  * @since 1.58.0
80
- * @private
81
- * @experimental As of version 1.58
82
- * @ui5-restricted sap.ui.mdc sap.fe
83
- * @MDC_PUBLIC_CANDIDATE
82
+ * @public
84
83
  */
85
84
 
86
85
  /**
@@ -90,25 +89,25 @@ sap.ui.define([
90
89
  * @param {object} [mSettings] Initial settings for the new control
91
90
  *
92
91
  * @class
93
- * The <code>FieldBase</code> control is the basic control to be used within the {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}
92
+ * The <code>FieldBase</code> control is the base class for the {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}
94
93
  * and {@link sap.ui.mdc.FilterField FilterField} controls.
95
94
  * It must not be used stand-alone.
96
95
  *
97
96
  * @extends sap.ui.mdc.Control
98
- * @implements sap.ui.core.IFormContent, sap.ui.core.ISemanticFormContent
97
+ * @implements sap.ui.core.IFormContent, sap.ui.core.ISemanticFormContent, sap.m.IOverflowToolbarContent
99
98
  *
100
99
  * @author SAP SE
101
- * @version 1.113.0
100
+ * @version 1.115.0
102
101
  *
103
102
  * @constructor
104
103
  * @alias sap.ui.mdc.field.FieldBase
105
104
  * @since 1.58.0
106
105
  * @abstract
107
106
  *
108
- * @private
109
- * @ui5-restricted sap.fe
110
- * @MDC_PUBLIC_CANDIDATE
111
- * @experimental As of version 1.58
107
+ * @borrows sap.ui.core.ISemanticFormContent.getFormFormattedValue as #getFormFormattedValue
108
+ * @borrows sap.ui.core.ISemanticFormContent.getFormValueProperty as #getFormValueProperty
109
+ *
110
+ * @public
112
111
  */
113
112
  var FieldBase = Control.extend("sap.ui.mdc.field.FieldBase", /* @lends sap.ui.mdc.field.FieldBase.prototype */ {
114
113
  metadata: {
@@ -148,9 +147,9 @@ sap.ui.define([
148
147
  * Determines whether the field is editable, read-only, or disabled.
149
148
  */
150
149
  editMode: {
151
- type: "sap.ui.mdc.enum.EditMode",
150
+ type: "sap.ui.mdc.enums.FieldEditMode",
152
151
  group: "Data",
153
- defaultValue: EditMode.Editable
152
+ defaultValue: FieldEditMode.Editable
154
153
  },
155
154
 
156
155
  /**
@@ -163,10 +162,10 @@ sap.ui.define([
163
162
  },
164
163
 
165
164
  /**
166
- * Defines whether the value and/or description of the field is shown and in what order.
165
+ * Defines whether the value and/or description of the field is shown and in which order.
167
166
  */
168
167
  display: {
169
- type: "sap.ui.mdc.enum.FieldDisplay",
168
+ type: "sap.ui.mdc.enums.FieldDisplay",
170
169
  defaultValue: FieldDisplay.Value
171
170
  },
172
171
 
@@ -182,7 +181,7 @@ sap.ui.define([
182
181
  },
183
182
 
184
183
  /**
185
- * Defines the text directionality of the input field, for example <code>RTL</code>, <code>LTR</code>.
184
+ * Defines the text directionality of the input field, for example, <code>RTL</code> or <code>LTR</code>.
186
185
  *
187
186
  * <b>Note:</b> If the rendered control doesn't support this feature, this property is ignored.
188
187
  */
@@ -193,8 +192,8 @@ sap.ui.define([
193
192
  },
194
193
 
195
194
  /**
196
- * Defines a short hint intended to aid the user with data entry when the control has no value.
197
- * If the value is <code>null</code> no placeholder is shown.
195
+ * Defines a short hint intended to help the user with the data entry when the control has no value.
196
+ * If the value is <code>null</code>, no placeholder is shown.
198
197
  *
199
198
  * <b>Note:</b> If the rendered control doesn't support this feature, this property is ignored.
200
199
  */
@@ -205,7 +204,7 @@ sap.ui.define([
205
204
  },
206
205
 
207
206
  /**
208
- * Visualizes the validation state of the control, for example <code>Error</code>, <code>Warning</code>, <code>Success</code>.
207
+ * Visualizes the validation state of the control, for example, <code>Error</code>, <code>Warning</code> or <code>Success</code>.
209
208
  *
210
209
  * <b>Note:</b> The visualization of the <code>ValueState</code> property is handled by the inner rendered control.
211
210
  * If a control is set (using <code>content</code>, <code>contentEdit</code>, or <code>contentDisplay</code>), this control needs to support
@@ -218,7 +217,7 @@ sap.ui.define([
218
217
  },
219
218
 
220
219
  /**
221
- * Defines the text that appears in the value state message pop-up. If this has not specified, a default text from the resource bundle is shown.
220
+ * Defines the text that appears in the value state message pop-up. If this has not been specified, a default text from the resource bundle is shown.
222
221
  */
223
222
  valueStateText: {
224
223
  type: "string",
@@ -242,7 +241,7 @@ sap.ui.define([
242
241
  *
243
242
  * This property is only used for single-value fields.
244
243
  *
245
- * <b>Note</b> If the data type used doesn't support multiple lines an error is thrown.
244
+ * <b>Note</b> If the data type used doesn't support multiple lines, an error is thrown.
246
245
  */
247
246
  multipleLines: {
248
247
  type: "boolean",
@@ -251,9 +250,9 @@ sap.ui.define([
251
250
  },
252
251
 
253
252
  /**
254
- * Sets the maximum amount of conditions that are allowed for this field.
253
+ * Sets the maximum number of conditions that are allowed for this field.
255
254
  *
256
- * The default value of -1 indicates that an unlimited amount of conditions can be defined.
255
+ * The default value of -1 indicates that an unlimited number of conditions can be defined.
257
256
  *
258
257
  * <b>Note</b> If the data type used doesn't support multiple conditions, an error is thrown.
259
258
  */
@@ -266,11 +265,11 @@ sap.ui.define([
266
265
  /**
267
266
  * Sets the conditions that represent the values of the field.
268
267
  *
269
- * This should be bound to a {@link sap.ui.mdc.condition.ConditionModel ConditionModel} using the corresponding fieldPath.
268
+ * These should be bound to a {@link sap.ui.mdc.condition.ConditionModel ConditionModel} using the corresponding <code>fieldPath</code>.
270
269
  *
271
270
  * <b>Note:</b> For {@link sap.ui.mdc.FilterField FilterField} controls, the <code>conditions</code> property must be used to bind
272
271
  * {@link sap.ui.mdc.FilterField FilterField} to a {@link sap.ui.mdc.condition.ConditionModel ConditionModel}.</br>
273
- * For example, for a {@link sap.ui.mdc.FilterField FilterField} control inside a {@link sap.ui.mdc.FilterBar FilterBar} control the binding looks like this:</br>
272
+ * For example, for a {@link sap.ui.mdc.FilterField FilterField} control inside a {@link sap.ui.mdc.FilterBar FilterBar} control, the binding looks like this:</br>
274
273
  * <code>conditions="{$filters>/conditions/propertyPath}"</code> with the following data:
275
274
  * <ul>
276
275
  * <li><code>$filters</code> as the name of the condition model</li>
@@ -278,16 +277,6 @@ sap.ui.define([
278
277
  * <li><code>propertyPath</code> as the property name</li>
279
278
  * </ul>
280
279
  *
281
- * For an Any (see {@link sap.ui.model.FilterOperator}) {@link sap.ui.mdc.FilterField FilterField} control, the binding looks like this:</br>
282
- * <code>conditions='{$filters>/conditions/navPath&#42;/propertyPath}'</code> with the following data:
283
- * <ul>
284
- * <li><code>$filters</code> as the name of the condition model</li>
285
- * <li><code>/conditions/</code> as a required static part of the binding</li>
286
- * <li><code>navPath&#42;/</code> as the navigation property name</li>
287
- * <li><code>propertyPath</code> as the property name</li>
288
- * </ul>
289
- * Between <code>navPath</code> and <code>propertyPath</code>, <b>&#42;/</b> is required.
290
- *
291
280
  * <b>Note:</b> A condition must have the structure of {@link sap.ui.mdc.condition.ConditionObject ConditionObject}.
292
281
  */
293
282
  conditions: {
@@ -303,8 +292,7 @@ sap.ui.define([
303
292
  *
304
293
  * This can be used by {@link sap.ui.mdc.FilterBar FilterBar} or {@link sap.ui.layout.form.Form Form} controls to create a {@link sap.m.Label Label} control for the field.
305
294
  *
306
- * @experimental
307
- * @since 1.62.0 Disclaimer: this property is in a beta state - incompatible API changes may be done before its official public release. Use at your own discretion.
295
+ * @since 1.62.0
308
296
  */
309
297
  label: {
310
298
  type: "string",
@@ -329,7 +317,7 @@ sap.ui.define([
329
317
  },
330
318
 
331
319
  /**
332
- * If set, an empty <code>Field</code> renders an empty-indicator in display mode.
320
+ * If set, an empty <code>Field</code> renders an empty indicator in display mode.
333
321
  *
334
322
  * This property only takes effect if <code>editMode</code> is set to <code>Display</code>.
335
323
  *
@@ -366,6 +354,15 @@ sap.ui.define([
366
354
  defaultValue: {},
367
355
  byValue: true,
368
356
  visibility: "hidden"
357
+ },
358
+
359
+ /**
360
+ * Internal property to bind the operators to the internal <code>DynamicDateRange</code> (or other) control.
361
+ */
362
+ _operators: {
363
+ type: "string[]",
364
+ defaultValue: [],
365
+ visibility: "hidden"
369
366
  }
370
367
 
371
368
  },
@@ -373,6 +370,10 @@ sap.ui.define([
373
370
  /**
374
371
  * Optional content that can be rendered.
375
372
  *
373
+ * Per default, depending on <code>editMode</code>, <code>multipleLines</code> and the used data type, a content control is rendered. For simple string types, a {@link sap.m.Text Text}
374
+ * control is rendered in display mode and a {@link sap.m.Input Input} control in edit mode. If a control is assigned in the <code>content</code> aggregation, this will be
375
+ * rendered instead.
376
+ *
376
377
  * <b>Note:</b> Bind the value-holding property of the control to <code>'$field>/conditions'</code>
377
378
  * using {@link sap.ui.mdc.field.ConditionsType ConditionsType} as type.
378
379
  *
@@ -391,6 +392,9 @@ sap.ui.define([
391
392
  /**
392
393
  * Optional content to be rendered if the <code>editMode</code> property is not set to <code>Display</code>.
393
394
  *
395
+ * Per default, depending on <code>multipleLines</code> and the used data type, a content control is rendered in edit mode. For simple string types, an {@link sap.m.Input Input}
396
+ * control is rendered in edit mode. If a control is assigned in the <code>contentEdit</code> aggregation, this will be rendered instead.
397
+ *
394
398
  * <b>Note:</b> If a control is assigned to the <code>content</code> aggregation, this one is ignored.
395
399
  *
396
400
  * <b>Note:</b> Bind the value-holding property of the control to <code>'$field>/conditions'</code>
@@ -413,6 +417,9 @@ sap.ui.define([
413
417
  /**
414
418
  * Optional content to be rendered if the <code>editMode</code> property is set to <code>Display</code>.
415
419
  *
420
+ * Per default, depending on <code>multipleLines</code> and the used data type, a content control is rendered in display mode. For simple string types, a {@link sap.m.Text Text}
421
+ * control is rendered in display mode. If a control is assigned in the <code>contentDisplay</code> aggregation, this will be rendered instead.
422
+ *
416
423
  * <b>Note:</b> If a control is assigned to the <code>content</code> aggregation, this one is ignored.
417
424
  *
418
425
  * <b>Note:</b> Bind the value-holding property of the control to <code>'$field>/conditions'</code>
@@ -443,6 +450,7 @@ sap.ui.define([
443
450
 
444
451
  /**
445
452
  * Optional <code>FieldInfo</code> used for detail information. This is only active in display mode.
453
+ * Especially {@link sap.ui.mdc.Link} can be used to activate link features.
446
454
  *
447
455
  * <b>Note:</b> If a special data type is defined or a content control is set, this is ignored.
448
456
  */
@@ -464,12 +472,31 @@ sap.ui.define([
464
472
  * be rendering or update issues.
465
473
  *
466
474
  * <b>Note:</b> For <code>Boolean</code> fields, no <code>ValueHelp</code> should be added, but a default <code>ValueHelp</code> used instead.
475
+ * @deprecated as of 1.114.0, replaced by {@link #setValueHelp valueHelp} association
467
476
  */
468
477
  fieldHelp: {
469
478
  type: "sap.ui.mdc.ValueHelp",
470
479
  multiple: false
471
480
  },
472
481
 
482
+ /**
483
+ * Optional <code>ValueHelp</code>.
484
+ *
485
+ * This is an association that allows the usage of one <code>ValueHelp</code> instance for multiple fields.
486
+ *
487
+ * <b>Note:</b> If the field is inside of a table, do not set the <code>ValueHelp</code> instance as <code>dependent</code>
488
+ * to the field. If you do, every field instance in every table row gets a clone of it.
489
+ * Put the <code>ValueHelp</code> instance e.g. as dependent on the table or page.
490
+ * The <code>ValueHelp</code> instance must be somewhere in the control tree, otherwise there might
491
+ * be rendering or update issues.
492
+ *
493
+ * <b>Note:</b> For <code>Boolean</code> fields, no <code>ValueHelp</code> should be added, but a default <code>ValueHelp</code> used instead.
494
+ */
495
+ valueHelp: {
496
+ type: "sap.ui.mdc.ValueHelp",
497
+ multiple: false
498
+ },
499
+
473
500
  /**
474
501
  * Association to controls / IDs that label this control (see WAI-ARIA attribute aria-labelledby).
475
502
  */
@@ -541,7 +568,10 @@ sap.ui.define([
541
568
  onsappageup: _handleKeybordEvent,
542
569
  onsappagedown: _handleKeybordEvent,
543
570
 
544
- onsapbackspace: _handleKeybordEvent
571
+ onsapbackspace: _handleKeybordEvent,
572
+ onchange: _handleContentOnchange,
573
+ onsapfocusleave: _handleContentOnsapfocusleave,
574
+ onpaste: _handlePaste
545
575
  };
546
576
 
547
577
  var oContentEventDelegateAfter = {
@@ -564,7 +594,6 @@ sap.ui.define([
564
594
  bool: {
565
595
  modules: ["sap/ui/mdc/ValueHelp", "sap/ui/mdc/valuehelp/Popover", "sap/ui/mdc/valuehelp/content/Bool"],
566
596
  id: "BoolDefaultHelp",
567
- getDelegate: "getDefaultValueHelpDelegate",
568
597
  contentProperties: {},
569
598
  dialog: false,
570
599
  control: undefined,
@@ -575,7 +604,6 @@ sap.ui.define([
575
604
  defineConditions: {
576
605
  modules: ["sap/ui/mdc/ValueHelp", "sap/ui/mdc/valuehelp/Dialog", "sap/ui/mdc/valuehelp/content/Conditions"],
577
606
  id: "Field-DefineConditions-Help",
578
- getDelegate: "getDefaultValueHelpDelegate",
579
607
  contentProperties: {},
580
608
  dialog: true,
581
609
  control: undefined,
@@ -594,16 +622,16 @@ sap.ui.define([
594
622
 
595
623
  Control.prototype.init.apply(this, arguments);
596
624
 
597
- this._oObserver = new ManagedObjectObserver(this._observeChanges.bind(this));
625
+ this._oObserver = new ManagedObjectObserver(this.observeChanges.bind(this));
598
626
 
599
627
  this._oObserver.observe(this, {
600
628
  properties: ["display", "editMode", "dataType", "dataTypeFormatOptions", "dataTypeConstraints",
601
629
  "multipleLines", "maxConditions", "conditions", "delegate"],
602
630
  aggregations: ["fieldInfo", "content", "contentEdit", "contentDisplay"],
603
- associations: ["fieldHelp", "ariaLabelledBy"]
631
+ associations: ["fieldHelp", "valueHelp", "ariaLabelledBy"]
604
632
  });
605
633
 
606
- this.attachEvent("modelContextChange", this._handleModelContextChange, this);
634
+ this.attachEvent("modelContextChange", this.handleModelContextChange, this);
607
635
 
608
636
  this._oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
609
637
 
@@ -611,7 +639,7 @@ sap.ui.define([
611
639
 
612
640
  this._bPreventGetDescription = false; // set in navigate or select from field help
613
641
 
614
- this._oContentFactory = this._getContentFactory();
642
+ this._oContentFactory = this.getContentFactory();
615
643
 
616
644
  this._oCreateContentPromise = undefined;
617
645
 
@@ -620,11 +648,11 @@ sap.ui.define([
620
648
  };
621
649
 
622
650
  /**
623
- * @private
651
+ * @protected
624
652
  * @returns {sap.ui.mdc.field.content.ContentFactory} oContentFactory the ContentFactory of the Field
625
653
  */
626
- FieldBase.prototype._getContentFactory = function() {
627
- if (this._bIsBeingDestroyed || this.bIsDestroyed) {
654
+ FieldBase.prototype.getContentFactory = function() {
655
+ if (this.isFieldDestroyed()) {
628
656
  return;
629
657
  }
630
658
  if (!this._oContentFactory) {
@@ -645,8 +673,10 @@ sap.ui.define([
645
673
  var oFieldHelp = _getFieldHelp.call(this);
646
674
  if (oFieldHelp && !this._iFocusTimer && oFieldHelp.shouldOpenOnFocus() && !oFieldHelp.isOpen()) {
647
675
  this._iFocusTimer = setTimeout(function () {
648
- oFieldHelp.open(true);
649
- this._redirectFocus(oEvent, oFieldHelp);
676
+ if (!this.isFieldDestroyed() && !oFieldHelp.isOpen()) {
677
+ _handleValueHelpRequest.call(this, oEvent, true); // open typeahead
678
+ this._redirectFocus(oEvent, oFieldHelp);
679
+ }
650
680
  this._iFocusTimer = null;
651
681
  }.bind(this),300);
652
682
  }
@@ -716,7 +746,7 @@ sap.ui.define([
716
746
  if (!this.bDelegateInitialized && !this.bDelegateLoading) {
717
747
  this.initControlDelegate();
718
748
  }
719
- this._triggerCheckCreateInternalContent();
749
+ this.triggerCheckCreateInternalContent();
720
750
 
721
751
  this._bSettingsApplied = true;
722
752
 
@@ -730,7 +760,7 @@ sap.ui.define([
730
760
  if (sPropertyName === "editMode") {
731
761
  // only invalidate if switched between edit and display, not for redonly or disabled
732
762
  var sOld = this.getEditMode();
733
- if (sOld !== EditMode.Display && sOld !== EditMode.EditableDisplay && vValue !== EditMode.Display && vValue !== EditMode.EditableDisplay) {
763
+ if (sOld !== FieldEditMode.Display && sOld !== FieldEditMode.EditableDisplay && vValue !== FieldEditMode.Display && vValue !== FieldEditMode.EditableDisplay) {
734
764
  bSuppressInvalidate = true;
735
765
  }
736
766
  } else if (sPropertyName !== "width" && sPropertyName !== "multipleLines" && sPropertyName !== "showEmptyIndicator") {
@@ -775,7 +805,7 @@ sap.ui.define([
775
805
  if (oPromise) {
776
806
  _executeChange.call(this, undefined, undefined, undefined, oPromise);
777
807
  } else {
778
- _executeChange.call(this, this.getConditions(), !this._isInvalidInput());
808
+ _executeChange.call(this, this.getConditions(), !this.isInvalidInput());
779
809
  }
780
810
  }
781
811
  }
@@ -817,13 +847,13 @@ sap.ui.define([
817
847
 
818
848
  FieldBase.prototype._handleNavigate = function(oEvent, iStep) {
819
849
 
820
- if (this.getEditMode() === EditMode.Editable) {
850
+ if (this.getEditMode() === FieldEditMode.Editable) {
821
851
  var oFieldHelp = _getFieldHelp.call(this);
822
852
  var oSource = oEvent.srcControl;
823
853
 
824
854
  if (oFieldHelp) {
825
855
  if (oFieldHelp.isNavigationEnabled(iStep) && // if open let ValueHelp decide if and how to navigate
826
- (!this._getContentFactory().isMeasure() || oSource.getShowValueHelp())) { // for Currenncy/Unit field navigate only in part with valueHelp
856
+ (!this.getContentFactory().isMeasure() || oSource.getShowValueHelp())) { // for Currenncy/Unit field navigate only in part with valueHelp
827
857
  // if only type-ahead but no real value help, only navigate if open
828
858
  oEvent.preventDefault();
829
859
  oEvent.stopPropagation();
@@ -855,7 +885,7 @@ sap.ui.define([
855
885
 
856
886
  FieldBase.prototype._redirectFocus = function (oEvent, oFieldHelp) {
857
887
  var oSource = oEvent.srcControl;
858
- if (oFieldHelp.isOpen() && (!this._getContentFactory().isMeasure() || (oSource.getShowValueHelp && oSource.getShowValueHelp()))) {
888
+ if (oFieldHelp.isOpen() && (!this.getContentFactory().isMeasure() || (oSource.getShowValueHelp && oSource.getShowValueHelp()))) {
859
889
  oSource.addStyleClass("sapMFocus"); // to show focus outline again after navigation
860
890
  oFieldHelp.removeFocus();
861
891
  }
@@ -867,7 +897,7 @@ sap.ui.define([
867
897
  var oFieldHelp = _getFieldHelp.call(this);
868
898
  if (oFieldHelp) {
869
899
  if (oFieldHelp.shouldOpenOnClick() && !oFieldHelp.isOpen()) {
870
- oFieldHelp.open(true);
900
+ _handleValueHelpRequest.call(this, oEvent, true); // open typeahead
871
901
  }
872
902
  this._redirectFocus(oEvent, oFieldHelp);
873
903
  }
@@ -878,7 +908,7 @@ sap.ui.define([
878
908
 
879
909
  // detach event handler before cloning to not have it twice on the clone
880
910
  // attach it after clone again
881
- this.detachEvent("modelContextChange", this._handleModelContextChange, this);
911
+ this.detachEvent("modelContextChange", this.handleModelContextChange, this);
882
912
 
883
913
  var oContent = this.getContent();
884
914
  if (oContent) {
@@ -900,7 +930,7 @@ sap.ui.define([
900
930
 
901
931
  var oClone = Control.prototype.clone.apply(this, arguments);
902
932
 
903
- this.attachEvent("modelContextChange", this._handleModelContextChange, this);
933
+ this.attachEvent("modelContextChange", this.handleModelContextChange, this);
904
934
 
905
935
  if (oContent) {
906
936
  _attachContentHandlers.call(this, oContent);
@@ -934,6 +964,7 @@ sap.ui.define([
934
964
  * @private
935
965
  * @ui5-restricted sap.ui.mdc.filterbar.FilterBarBase
936
966
  */
967
+ // @deprecated as of 1.115.0, replaced by {@link #setPropertyKey propertyKey} property
937
968
  FieldBase.prototype.getFieldPath = function() {
938
969
 
939
970
  var sBindingPath = this.getBindingPath("conditions");
@@ -947,7 +978,7 @@ sap.ui.define([
947
978
 
948
979
  function _triggerChange(aConditions, bValid, vWrongValue, oPromise) {
949
980
 
950
- if (this._getContent().length > 1) {
981
+ if (this.getCurrentContent().length > 1) {
951
982
  // in unit/currency field fire Change only if ENTER pressed or field completely left. Not on focus between number and unit
952
983
  this._bPendingChange = true;
953
984
  } else {
@@ -961,7 +992,7 @@ sap.ui.define([
961
992
  if (!oPromise) {
962
993
  // not promise -> change is synchronously -> return resolved SyncPromise
963
994
  if (bValid) {
964
- oPromise = Promise.resolve(this._getResultForPromise(aConditions));
995
+ oPromise = Promise.resolve(this.getResultForChangePromise(aConditions));
965
996
  } else {
966
997
  var oException = this._getInvalidInputException();
967
998
  if (oException) {
@@ -972,13 +1003,17 @@ sap.ui.define([
972
1003
  }
973
1004
  }
974
1005
 
975
- this._fireChange(aConditions, bValid, vWrongValue, oPromise);
1006
+ this.fireChangeEvent(aConditions, bValid, vWrongValue, oPromise);
976
1007
 
977
1008
  this._bPendingChange = false;
978
1009
 
979
1010
  }
980
1011
 
981
- FieldBase.prototype._fireChange = function(aConditions, bValid, vWrongValue, oPromise) {
1012
+ /**
1013
+ * Here inheriting controls need to fire the control-specific change event.
1014
+ * @protected
1015
+ */
1016
+ FieldBase.prototype.fireChangeEvent = function(aConditions, bValid, vWrongValue, oPromise) {
982
1017
  // to be implemented by Filed and FilterField
983
1018
  };
984
1019
 
@@ -993,17 +1028,17 @@ sap.ui.define([
993
1028
 
994
1029
  if (oPromise) {
995
1030
  bPending = true;
996
- } else if (this._isInvalidInput()) {
1031
+ } else if (this.isInvalidInput()) {
997
1032
  oPromise = Promise.reject();
998
1033
  } else {
999
- oPromise = Promise.resolve(this._getResultForPromise(this.getConditions()));
1034
+ oPromise = Promise.resolve(this.getResultForChangePromise(this.getConditions()));
1000
1035
  }
1001
1036
 
1002
1037
  if (this._bPendingChange) {
1003
1038
  if (bPending) {
1004
1039
  _executeChange.call(this, undefined, undefined, undefined, oPromise);
1005
1040
  } else {
1006
- _executeChange.call(this, this.getConditions(), !this._isInvalidInput(), undefined, oPromise);
1041
+ _executeChange.call(this, this.getConditions(), !this.isInvalidInput(), undefined, oPromise);
1007
1042
  }
1008
1043
  }
1009
1044
 
@@ -1012,45 +1047,97 @@ sap.ui.define([
1012
1047
 
1013
1048
  }
1014
1049
 
1015
- // to be enhanced by Field
1016
- FieldBase.prototype._initDataType = function() {
1017
- if (this._getContentFactory().getDataType()) {
1018
- this._getContentFactory().getDataType().destroy();
1019
- this._getContentFactory().setDataType(undefined);
1050
+ function _handlePaste(oEvent) {
1051
+
1052
+ var iMaxConditions = this.getMaxConditions();
1053
+
1054
+ if (iMaxConditions === 1) { // only for multi-value
1055
+ return;
1056
+ }
1057
+
1058
+ // for the purpose to copy from column in excel and paste in FilterField/MultiValueField
1059
+ var sOriginalText = oEvent.originalEvent.clipboardData.getData('text/plain');
1060
+ var aSeparatedText = splitValue(sOriginalText, true); // check without BT support as if TAB is inside the Paste logic needs to be used anyhow
1061
+
1062
+ if (aSeparatedText.length <= 1) {
1063
+ // only one entry -> use default logic
1064
+ return;
1065
+ }
1066
+
1067
+ var oControl = oEvent.srcControl;
1068
+ var sBoundProperty;
1069
+ for (var sProperty in oControl.getMetadata().getAllProperties()) {
1070
+ if (oControl.getBindingPath(sProperty) === "/conditions") {
1071
+ sBoundProperty = sProperty;
1072
+ break;
1073
+ }
1074
+ }
1075
+ oControl.updateModelProperty(sBoundProperty, sOriginalText, oControl.getProperty(sBoundProperty)); // Use normal parsing functionality to habe Async-handling and error handling
1076
+
1077
+ oEvent.stopImmediatePropagation(true); // to prevent MultiInputs own logic
1078
+ oEvent.preventDefault(); // to prevent pasting string into INPUT
1079
+
1080
+ oEvent.source = oEvent.srcControl; // to align with other events
1081
+ oEvent.parameters = {}; // to align with other events
1082
+ // as change might be async
1083
+ var iLength = this._aAsyncChanges.length;
1084
+ var oPromise;
1085
+ var bValid;
1086
+ var aConditions;
1087
+ if (iLength > 0) {
1088
+ this._aAsyncChanges[iLength - 1].changeFired = true;
1089
+ this._aAsyncChanges[iLength - 1].changeEvent = oEvent;
1090
+ oPromise = this._aAsyncChanges[iLength - 1].promise;
1091
+ } else {
1092
+ bValid = !this._bParseError;
1093
+ aConditions = this.getConditions();
1094
+ }
1095
+ _triggerChange.call(this, aConditions, bValid, undefined, oPromise);
1096
+
1097
+ }
1098
+
1099
+ /**
1100
+ * Initializes internal data-types and dependent objects.
1101
+ * @protected
1102
+ */
1103
+ FieldBase.prototype.initDataType = function() {
1104
+ if (this.getContentFactory().getDataType()) {
1105
+ this.getContentFactory().getDataType().destroy();
1106
+ this.getContentFactory().setDataType(undefined);
1020
1107
  }
1021
1108
 
1022
- if (this._getContentFactory().getDateOriginalType()) {
1023
- if (this._getContentFactory().getDateOriginalType()._bCreatedByField) {
1109
+ if (this.getContentFactory().getDateOriginalType()) {
1110
+ if (this.getContentFactory().getDateOriginalType()._bCreatedByField) {
1024
1111
  // do not destroy if used in Field binding
1025
- this._getContentFactory().getDateOriginalType().destroy();
1112
+ this.getContentFactory().getDateOriginalType().destroy();
1026
1113
  }
1027
- this._getContentFactory().setDateOriginalType(undefined);
1114
+ this.getContentFactory().setDateOriginalType(undefined);
1028
1115
  }
1029
1116
 
1030
- if (this._getContentFactory().getUnitOriginalType()) {
1031
- if (this._getContentFactory().getUnitOriginalType()._bCreatedByField) {
1117
+ if (this.getContentFactory().getUnitOriginalType()) {
1118
+ if (this.getContentFactory().getUnitOriginalType()._bCreatedByField) {
1032
1119
  // do not destroy if used in Field binding
1033
- this._getContentFactory().getUnitOriginalType().destroy();
1120
+ this.getContentFactory().getUnitOriginalType().destroy();
1034
1121
  }
1035
- this._getContentFactory().setUnitOriginalType(undefined);
1122
+ this.getContentFactory().setUnitOriginalType(undefined);
1036
1123
  }
1037
1124
 
1038
- this._getContentFactory().setIsMeasure(false);
1125
+ this.getContentFactory().setIsMeasure(false);
1039
1126
  };
1040
1127
 
1041
1128
  function _getDataTypeName() {
1042
- var oDataType = this._getContentFactory().getDateOriginalType() || this._getContentFactory().getUnitOriginalType() || this._getContentFactory().getDataType(); // use original data type
1129
+ var oDataType = this.getContentFactory().getDateOriginalType() || this.getContentFactory().getUnitOriginalType() || this.getContentFactory().getDataType(); // use original data type
1043
1130
  if (oDataType && typeof oDataType === "object") {
1044
1131
  return oDataType.getMetadata().getName();
1045
1132
  } else if (this.bDelegateInitialized) {
1046
- return this.getTypeUtil().getDataTypeClassName(this.getDataType());
1133
+ return this.getTypeMap().getDataTypeClassName(this.getDataType());
1047
1134
  } else {
1048
1135
  return this.getDataType();
1049
1136
  }
1050
1137
  }
1051
1138
 
1052
1139
  function _getDataTypeConstraints() {
1053
- var oDataType = this._getContentFactory().getDateOriginalType() || this._getContentFactory().getUnitOriginalType() || this._getContentFactory().getDataType(); // use original data type
1140
+ var oDataType = this.getContentFactory().getDateOriginalType() || this.getContentFactory().getUnitOriginalType() || this.getContentFactory().getDataType(); // use original data type
1054
1141
  if (oDataType && typeof oDataType === "object" && oDataType.getConstraints()) {
1055
1142
  return oDataType.getConstraints();
1056
1143
  } else {
@@ -1059,7 +1146,7 @@ sap.ui.define([
1059
1146
  }
1060
1147
 
1061
1148
  function _getDataTypeFormatOptions() {
1062
- var oDataType = this._getContentFactory().getDateOriginalType() || this._getContentFactory().getUnitOriginalType() || this._getContentFactory().getDataType(); // use original data type
1149
+ var oDataType = this.getContentFactory().getDateOriginalType() || this.getContentFactory().getUnitOriginalType() || this.getContentFactory().getDataType(); // use original data type
1063
1150
  if (oDataType && typeof oDataType === "object" && oDataType.getFormatOptions()) {
1064
1151
  return oDataType.getFormatOptions();
1065
1152
  } else {
@@ -1067,11 +1154,16 @@ sap.ui.define([
1067
1154
  }
1068
1155
  }
1069
1156
 
1157
+ /**
1158
+ * Determines the <code>BaseType</code> of the currently used data type.
1159
+ * @returns {sap.ui.mdc.enums.BaseType} BaseType
1160
+ * @protected
1161
+ */
1070
1162
  FieldBase.prototype.getBaseType = function() {
1071
1163
  var sDataType = _getDataTypeName.call(this);
1072
1164
  var oDataTypeConstraints = _getDataTypeConstraints.call(this);
1073
1165
  var oDataTypeFormatOptions = _getDataTypeFormatOptions.call(this);
1074
- var sBaseType = this.getTypeUtil().getBaseType(sDataType, oDataTypeFormatOptions, oDataTypeConstraints);
1166
+ var sBaseType = this.getTypeMap().getBaseType(sDataType, oDataTypeFormatOptions, oDataTypeConstraints);
1075
1167
 
1076
1168
  return sBaseType;
1077
1169
  };
@@ -1086,13 +1178,17 @@ sap.ui.define([
1086
1178
 
1087
1179
  }
1088
1180
 
1089
- // needed in Renderer
1090
- FieldBase.prototype._getContent = function() {
1181
+ /**
1182
+ * Gets the currently used content controls.
1183
+ * @returns {sap.ui.core.Conterol[]} Array of content controls
1184
+ * @protected
1185
+ */
1186
+ FieldBase.prototype.getCurrentContent = function() {
1091
1187
 
1092
1188
  var oContent = this.getContent();
1093
1189
 
1094
1190
  if (!oContent) {
1095
- if (this.getEditMode() === EditMode.Display) {
1191
+ if (this.getEditMode() === FieldEditMode.Display) {
1096
1192
  oContent = this.getContentDisplay();
1097
1193
  } else {
1098
1194
  oContent = this.getContentEdit();
@@ -1107,7 +1203,12 @@ sap.ui.define([
1107
1203
 
1108
1204
  };
1109
1205
 
1110
- FieldBase.prototype._handleModelContextChange = function(oEvent) {
1206
+ /**
1207
+ * Handler of the <code>ModelContextChange</code> event.
1208
+ * @param {object} oEvent event
1209
+ * @protected
1210
+ */
1211
+ FieldBase.prototype.handleModelContextChange = function(oEvent) {
1111
1212
 
1112
1213
  // let empty as overwritten in Field
1113
1214
 
@@ -1130,23 +1231,23 @@ sap.ui.define([
1130
1231
  /**
1131
1232
  * Observes changes.
1132
1233
  *
1133
- * To be enhanced by <code>Field</code>, </code>FilterField</code>, or other inherited controls.
1234
+ * To be enhanced by {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField},
1235
+ * {@link sap.ui.mdc.FilterField FilterField}, or other inherited controls.
1134
1236
  *
1135
1237
  * @param {object} oChanges Changes
1136
- * @private
1137
- * @ui5-restricted FieldBase subclasses
1238
+ * @protected
1138
1239
  */
1139
- FieldBase.prototype._observeChanges = function(oChanges) {
1240
+ FieldBase.prototype.observeChanges = function(oChanges) {
1140
1241
 
1141
1242
  if (oChanges.name === "dataType") {
1142
1243
  // check only if different type (in Field type might be already taken from binding)
1143
- if (this._getContentFactory().getDataType()) {
1244
+ if (this.getContentFactory().getDataType()) {
1144
1245
  var fnCheck = function(sType) {
1145
- this._getContentFactory().checkDataTypeChanged(sType).then(function(bChanged) {
1146
- if (bChanged && !this._bIsBeingDestroyed) {
1147
- this._initDataType();
1246
+ this.getContentFactory().checkDataTypeChanged(sType).then(function(bChanged) {
1247
+ if (bChanged && !this.isFieldDestroyed()) {
1248
+ this.initDataType();
1148
1249
  this.destroyAggregation("_content");
1149
- this._getContentFactory().updateConditionType();
1250
+ this.getContentFactory().updateConditionType();
1150
1251
  }
1151
1252
  }.bind(this)).catch(function(oError) {
1152
1253
  throw oError;
@@ -1163,19 +1264,19 @@ sap.ui.define([
1163
1264
 
1164
1265
  if (oChanges.name === "dataTypeFormatOptions" || oChanges.name === "dataTypeConstraints") {
1165
1266
  // if type is not created right now nothing to do
1166
- if (this._getContentFactory().getDataType()) {
1167
- this._initDataType();
1267
+ if (this.getContentFactory().getDataType()) {
1268
+ this.initDataType();
1168
1269
  this.destroyAggregation("_content");
1169
- this._getContentFactory().updateConditionType();
1270
+ this.getContentFactory().updateConditionType();
1170
1271
  }
1171
1272
  }
1172
1273
 
1173
1274
  if (oChanges.name === "maxConditions") {
1174
- this._updateInternalContent();
1275
+ this.updateInternalContent();
1175
1276
  }
1176
1277
 
1177
1278
  if (oChanges.name === "conditions") {
1178
- this._resetInvalidInput(); // if conditions updated from outside parse error is obsolete. If updated from inside no parse error occurs
1279
+ this.resetInvalidInput(); // if conditions updated from outside parse error is obsolete. If updated from inside no parse error occurs
1179
1280
  _handleConditionsChange.call(this, oChanges.current, oChanges.old);
1180
1281
 
1181
1282
  // try to find the corresponding async. change
@@ -1194,19 +1295,19 @@ sap.ui.define([
1194
1295
  }
1195
1296
 
1196
1297
  // in display mode rerender if changed from or to empty (show or hide empty-indicator)
1197
- if ((oChanges.current.length === 0 || oChanges.old.length === 0) && this.getShowEmptyIndicator() && this.getEditMode() === EditMode.Display && !this.getContent() && !this.getContentDisplay()) {
1298
+ if ((oChanges.current.length === 0 || oChanges.old.length === 0) && this.getShowEmptyIndicator() && this.getEditMode() === FieldEditMode.Display && !this.getContent() && !this.getContentDisplay()) {
1198
1299
  this.invalidate();
1199
1300
  }
1200
1301
  }
1201
1302
 
1202
1303
  if (oChanges.name === "display") {
1203
- this._destroyInternalContent(); // as bound property can change
1204
- this._getContentFactory().updateConditionType();
1304
+ this.destroyInternalContent(); // as bound property can change
1305
+ this.getContentFactory().updateConditionType();
1205
1306
  }
1206
1307
 
1207
- if (oChanges.name === "fieldHelp" && oChanges.ids) {
1308
+ if ((oChanges.name === "fieldHelp" || oChanges.name === "valueHelp") && oChanges.ids) {
1208
1309
  _fieldHelpChanged.call(this, oChanges.ids, oChanges.mutation);
1209
- this._getContentFactory().updateConditionType();
1310
+ this.getContentFactory().updateConditionType();
1210
1311
  }
1211
1312
 
1212
1313
  if (oChanges.name === "fieldInfo" && oChanges.child) {
@@ -1235,25 +1336,30 @@ sap.ui.define([
1235
1336
 
1236
1337
  if (oChanges.name === "editMode") {
1237
1338
  _refreshLabel.call(this); // as required-idicator might set or removed on Label
1238
- if (this._bSettingsApplied && (oChanges.old === EditMode.Display || oChanges.old === EditMode.EditableDisplay || oChanges.current === EditMode.Display || oChanges.current === EditMode.EditableDisplay)) {
1339
+ if (this._bSettingsApplied && (oChanges.old === FieldEditMode.Display || oChanges.old === FieldEditMode.EditableDisplay || oChanges.current === FieldEditMode.Display || oChanges.current === FieldEditMode.EditableDisplay)) {
1239
1340
  // edit mode changed after settings applied (happens if edit mode is bound and binding updates after control initialization)
1240
- this._triggerCheckCreateInternalContent();
1341
+ this.triggerCheckCreateInternalContent();
1241
1342
  }
1242
1343
  }
1243
1344
  };
1244
1345
 
1245
- // to allow Field or FilterField trigger and update if content control
1246
- FieldBase.prototype._updateInternalContent = function() {
1346
+ /**
1347
+ * Triggers an update of the internal content controls.
1348
+ *
1349
+ * Should be called if properties are changed that might influence the content control.
1350
+ * @protected
1351
+ */
1352
+ FieldBase.prototype.updateInternalContent = function() {
1247
1353
  if (this.getAggregation("_content", []).length > 0) {
1248
1354
  _createInternalContentWrapper.call(this);
1249
- this._getContentFactory().updateConditionType(); // if control is not excanged at least ConditionType needs to be updated
1355
+ this.getContentFactory().updateConditionType(); // if control is not excanged at least ConditionType needs to be updated
1250
1356
  }
1251
1357
  };
1252
1358
 
1253
1359
  // return the focus DOM elementof the used control
1254
1360
  FieldBase.prototype.getFocusDomRef = function() {
1255
1361
 
1256
- var aContent = this._getContent();
1362
+ var aContent = this.getCurrentContent();
1257
1363
 
1258
1364
  if (aContent.length > 0) {
1259
1365
  return aContent[0].getFocusDomRef();
@@ -1267,7 +1373,7 @@ sap.ui.define([
1267
1373
  FieldBase.prototype.getIdForLabel = function() {
1268
1374
 
1269
1375
  var sId;
1270
- var aContent = this._getContent();
1376
+ var aContent = this.getCurrentContent();
1271
1377
  if (aContent.length > 0) {
1272
1378
  sId = aContent[0].getIdForLabel();
1273
1379
  } else {
@@ -1295,9 +1401,9 @@ sap.ui.define([
1295
1401
  */
1296
1402
  FieldBase.prototype.getControlForSuggestion = function() {
1297
1403
 
1298
- var aContent = this._getContent();
1404
+ var aContent = this.getCurrentContent();
1299
1405
  if (aContent.length > 0) {
1300
- if (this._getContentFactory().isMeasure()) {
1406
+ if (this.getContentFactory().isMeasure()) {
1301
1407
  return aContent[1];
1302
1408
  } else {
1303
1409
  return aContent[0];
@@ -1342,7 +1448,7 @@ sap.ui.define([
1342
1448
  */
1343
1449
  FieldBase.prototype.getMaxConditionsForHelp = function() {
1344
1450
 
1345
- if (this._getContentFactory().isMeasure()) {
1451
+ if (this.getContentFactory().isMeasure()) {
1346
1452
  return 1; // only one unit allowed in help
1347
1453
  } else {
1348
1454
  return this.getMaxConditions();
@@ -1367,16 +1473,16 @@ sap.ui.define([
1367
1473
  this._oResourceBundleM = sap.ui.getCore().getLibraryResourceBundle("sap.m");
1368
1474
  }
1369
1475
  return this._oResourceBundleM.getText("EMPTY_INDICATOR"); // TODO: clarify accessibility support for semantic conected fields
1370
- } else if (this._getContentFactory().isMeasure() && this._getContentFactory().getUnitOriginalType()) {
1476
+ } else if (this.getContentFactory().isMeasure() && this.getContentFactory().getUnitOriginalType()) {
1371
1477
  // in unit case use original data type for formatting (as internal type hides unit)
1372
1478
  var aValue = aConditions.length > 0 ? aConditions[0].values[0] : [0, null]; // TODO: support multiple conditions or other operator than EQ?
1373
- return this._getContentFactory().getUnitOriginalType().formatValue(aValue, "string");
1374
- } else if (this._getContentFactory().getDateOriginalType()) {
1479
+ return this.getContentFactory().getUnitOriginalType().formatValue(aValue, "string");
1480
+ } else if (this.getContentFactory().getDateOriginalType()) {
1375
1481
  // in date case use original data type for formatting (as internal type formats to ISO format)
1376
1482
  var vValue = aConditions.length > 0 ? aConditions[0].values[0] : null; // TODO: support multiple conditions or other operator than EQ?
1377
- return this._getContentFactory().getDateOriginalType().formatValue(vValue, "string");
1483
+ return this.getContentFactory().getDateOriginalType().formatValue(vValue, "string");
1378
1484
  } else {
1379
- var oConditionsType = this._getContentFactory().getConditionsType();
1485
+ var oConditionsType = this.getContentFactory().getConditionsType();
1380
1486
  var oFormatOptions = oConditionsType.getFormatOptions();
1381
1487
  var bNoFormatting = oFormatOptions.noFormatting;
1382
1488
  oFormatOptions.noFormatting = false; // for display text always format
@@ -1404,7 +1510,7 @@ sap.ui.define([
1404
1510
 
1405
1511
  /**
1406
1512
  * Required by the {@link sap.m.IOverflowToolbarContent} interface.
1407
- * Registers invalidations event which is fired when width of the control is changed.
1513
+ * Registers invalidations event that is fired when width of the control is changed.
1408
1514
  *
1409
1515
  * @protected
1410
1516
  * @returns {object} Configuration information for the <code>sap.m.IOverflowToolbarContent</code> interface.
@@ -1431,14 +1537,14 @@ sap.ui.define([
1431
1537
 
1432
1538
  };
1433
1539
 
1434
- /**
1540
+ /*
1435
1541
  * @returns {object} Current accessibility state of the control.
1436
1542
  * @see sap.ui.core.Control#getAccessibilityInfo
1437
1543
  * @protected
1438
1544
  */
1439
1545
  FieldBase.prototype.getAccessibilityInfo = function() {
1440
1546
 
1441
- var aContent = this._getContent();
1547
+ var aContent = this.getCurrentContent();
1442
1548
  if (aContent.length > 0 && aContent[0].getAccessibilityInfo) {
1443
1549
  return aContent[0].getAccessibilityInfo(); // TODO: unit field
1444
1550
  } else {
@@ -1513,18 +1619,15 @@ sap.ui.define([
1513
1619
  }
1514
1620
 
1515
1621
  /**
1516
- * Assigns a <code>Label</code> control to the {@link sap.ui.mdc.Field Field} or {@link sap.ui.mdc.FilterField FilterField} controls.
1622
+ * Assigns a <code>Label</code> control to the {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}, or {@link sap.ui.mdc.FilterField FilterField} controls.
1517
1623
  *
1518
- * The text of the label is taken from the {@link sap.ui.mdc.Field Field} or {@link sap.ui.mdc.FilterField FilterField} controls.
1519
- * The <code>labelFor</code> association is set to the {@link sap.ui.mdc.Field Field} or {@link sap.ui.mdc.FilterField FilterField} control.
1624
+ * The text of the label is taken from the {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}, or {@link sap.ui.mdc.FilterField FilterField} controls.
1625
+ * The <code>labelFor</code> association is set to the {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}, or {@link sap.ui.mdc.FilterField FilterField} control.
1520
1626
  *
1521
1627
  * @param {sap.ui.core.Label} oLabel Label control
1522
1628
  * @returns {this} Reference to <code>this</code> to allow method chaining
1523
1629
  *
1524
- * @private
1525
- * @ui5-restricted sap.ui.mdc sap.fe
1526
- * @MDC_PUBLIC_CANDIDATE
1527
- * @experimental As of version 1.62.0
1630
+ * @public
1528
1631
  * @since 1.62.0 Disclaimer: this function is in a beta state - incompatible API changes may be done before its official public release. Use at your own discretion.
1529
1632
  */
1530
1633
  FieldBase.prototype.connectLabel = function(oLabel) {
@@ -1558,8 +1661,8 @@ sap.ui.define([
1558
1661
  _restoreKeyboardHandler.call(this, oContent);
1559
1662
  _restoreFieldGroupHandler.call(this, oContent);
1560
1663
 
1561
- if (this._getContentFactory().getContentConditionTypes()) {
1562
- delete this._getContentFactory().getContentConditionTypes()[sName];
1664
+ if (this.getContentFactory().getContentConditionTypes()) {
1665
+ delete this.getContentFactory().getContentConditionTypes()[sName];
1563
1666
  }
1564
1667
  oContent.setModel(null, "$field"); // remove binding to Field
1565
1668
  // let the internal control be created on rendering
@@ -1574,23 +1677,23 @@ sap.ui.define([
1574
1677
  // bind to ManagedObjectModel at rendering to prevent unneded updates
1575
1678
 
1576
1679
  if (this.getAggregation("_content", []).length > 0) {
1577
- this._destroyInternalContent();
1680
+ this.destroyInternalContent();
1578
1681
  }
1579
1682
 
1580
1683
  // as for edit and display different Types are possible switch them with edit mode
1581
- if (!this._getContentFactory().getContentConditionTypes()) {
1582
- this._getContentFactory().setContentConditionTypes({});
1684
+ if (!this.getContentFactory().getContentConditionTypes()) {
1685
+ this.getContentFactory().setContentConditionTypes({});
1583
1686
  }
1584
- if (!this._getContentFactory().getContentConditionTypes()[sName]) {
1585
- this._getContentFactory().getContentConditionTypes()[sName] = {};
1687
+ if (!this.getContentFactory().getContentConditionTypes()[sName]) {
1688
+ this.getContentFactory().getContentConditionTypes()[sName] = {};
1586
1689
  }
1587
- this._getContentFactory().setNoFormatting(false); // initialize
1690
+ this.getContentFactory().setNoFormatting(false); // initialize
1588
1691
  this.awaitControlDelegate().then(function() {
1589
- if (!this.bIsDestroyed) {
1590
- var bHideOperator = _isOnlyOneSingleValue.call(this, this._getOperators());
1591
- if (bHideOperator !== this._getContentFactory().getHideOperator()) {
1592
- this._getContentFactory().setHideOperator(bHideOperator); // in single value eq Field hide operator
1593
- this._getContentFactory()._setUsedConditionType(this.getContent(), this.getContentEdit(), this.getContentDisplay(), this.getEditMode()); // if external content use it's conditionType
1692
+ if (!this.isFieldDestroyed()) {
1693
+ var bHideOperator = _isOnlyOneSingleValue.call(this, this.getSupportedOperators());
1694
+ if (bHideOperator !== this.getContentFactory().getHideOperator()) {
1695
+ this.getContentFactory().setHideOperator(bHideOperator); // in single value eq Field hide operator
1696
+ this.getContentFactory()._setUsedConditionType(this.getContent(), this.getContentEdit(), this.getContentDisplay(), this.getEditMode()); // if external content use it's conditionType
1594
1697
  }
1595
1698
  }
1596
1699
  }.bind(this));
@@ -1603,7 +1706,7 @@ sap.ui.define([
1603
1706
  if (oContent.getBindingPath(sProperty) === "/conditions") {
1604
1707
  oBindingInfo = oContent.getBindingInfo(sProperty);
1605
1708
  if (oBindingInfo && oBindingInfo.type && oBindingInfo.type instanceof ConditionsType) {
1606
- this._getContentFactory().getContentConditionTypes()[sName].oConditionsType = oBindingInfo.type;
1709
+ this.getContentFactory().getContentConditionTypes()[sName].oConditionsType = oBindingInfo.type;
1607
1710
  }
1608
1711
  bPropertyBound = true;
1609
1712
  }
@@ -1649,9 +1752,9 @@ sap.ui.define([
1649
1752
  for (sProperty in oBindingInfo.template.getMetadata().getAllProperties()) {
1650
1753
  var oTemplateBindingInfo = oBindingInfo.template.getBindingInfo(sProperty);
1651
1754
  if (oTemplateBindingInfo && oTemplateBindingInfo.type && oTemplateBindingInfo.type instanceof ConditionType) {
1652
- this._getContentFactory().getContentConditionTypes()[sName].oConditionType = oTemplateBindingInfo.type;
1755
+ this.getContentFactory().getContentConditionTypes()[sName].oConditionType = oTemplateBindingInfo.type;
1653
1756
  if (bPropertyBound) { // both value and tokens are bound -> don't format Value, only parse it
1654
- this._getContentFactory().setNoFormatting(true);
1757
+ this.getContentFactory().setNoFormatting(true);
1655
1758
  }
1656
1759
  break;
1657
1760
  }
@@ -1665,7 +1768,7 @@ sap.ui.define([
1665
1768
  }
1666
1769
 
1667
1770
  if (oContent.getMetadata().getAllAssociations().ariaLabelledBy) {
1668
- this._getContentFactory().setAriaLabelledBy(oContent);
1771
+ this.getContentFactory().setAriaLabelledBy(oContent);
1669
1772
  }
1670
1773
  }
1671
1774
 
@@ -1738,29 +1841,34 @@ sap.ui.define([
1738
1841
  }
1739
1842
  }
1740
1843
 
1741
- /*
1742
- * Check if all needed information are provided. If possible create internal controls
1844
+ /**
1845
+ * Checks if all needed information is provided to create the internal content control.
1846
+ * If possible create internal controls.
1847
+ * @protected
1743
1848
  */
1744
- FieldBase.prototype._checkCreateInternalContent = function() {
1849
+ FieldBase.prototype.checkCreateInternalContent = function() {
1745
1850
 
1746
- if (!this.bIsDestroyed && this.getVisible() && this._getContentFactory().getDataType()) {
1851
+ if (!this.isFieldDestroyed() && this.getVisible() && this.getContentFactory().getDataType()) {
1747
1852
  _createInternalContentWrapper.call(this);
1748
1853
  }
1749
1854
 
1750
1855
  };
1751
1856
 
1752
- /*
1753
- * To be sure that the check is not called multiple times it needs
1857
+ /**
1858
+ * Triggers a check if all relevant properties are set to create the internal content control.
1859
+ *
1860
+ * To be sure that the check is not called multiple times, it needs
1754
1861
  * to be checked if there is a pending check.
1755
- * Multiple calls might happen if properties are cheged oftten or
1756
- * the chck is triggered in BindingContext update (what is often called in propagation).
1862
+ * Multiple calls might happen if properties are changed often or
1863
+ * the check is triggered during a <code>BindingContext</code> update (which is often called in propagation).
1864
+ * @protected
1757
1865
  */
1758
- FieldBase.prototype._triggerCheckCreateInternalContent = function() {
1866
+ FieldBase.prototype.triggerCheckCreateInternalContent = function() {
1759
1867
 
1760
1868
  if (!this._oCheckCreateInternalContentPromise) {
1761
1869
  this._oCheckCreateInternalContentPromise = this.awaitControlDelegate().then(function() {
1762
1870
  delete this._oCheckCreateInternalContentPromise;
1763
- this._checkCreateInternalContent();
1871
+ this.checkCreateInternalContent();
1764
1872
  }.bind(this));
1765
1873
  }
1766
1874
 
@@ -1768,7 +1876,7 @@ sap.ui.define([
1768
1876
 
1769
1877
  function _createInternalContent() {
1770
1878
 
1771
- if (this._bIsBeingDestroyed || this.bIsDestroyed) {
1879
+ if (this.isFieldDestroyed()) {
1772
1880
  return; // for destroyed field do nothing on internal control
1773
1881
  }
1774
1882
 
@@ -1777,16 +1885,16 @@ sap.ui.define([
1777
1885
  var oContentEdit = this.getContentEdit();
1778
1886
  var oContentDisplay = this.getContentDisplay();
1779
1887
 
1780
- this._getContentFactory()._setUsedConditionType(oContent, oContentEdit, oContentDisplay, sEditMode); // if external content use it's conditionType
1781
- _checkFieldHelpExist.call(this, this.getFieldHelp()); // as FieldHelp might be created after ID is assigned to Field
1888
+ this.getContentFactory()._setUsedConditionType(oContent, oContentEdit, oContentDisplay, sEditMode); // if external content use it's conditionType
1889
+ _checkFieldHelpExist.call(this, this._getValueHelp()); // as ValueHelp might be created after ID is assigned to Field
1782
1890
  _setAriaAttributes.call(this, false);
1783
1891
 
1784
1892
 
1785
1893
  if (oContent ||
1786
- (sEditMode === EditMode.Display && oContentDisplay) ||
1787
- (sEditMode !== EditMode.Display && oContentEdit)) {
1788
- this._destroyInternalContent();
1789
- var aContent = this._getContent(); // external set content
1894
+ (sEditMode === FieldEditMode.Display && oContentDisplay) ||
1895
+ (sEditMode !== FieldEditMode.Display && oContentEdit)) {
1896
+ this.destroyInternalContent();
1897
+ var aContent = this.getCurrentContent(); // external set content
1790
1898
  if (aContent.length === 1) {
1791
1899
  _setModelOnContent.call(this, aContent[0]); // bind to ManagedObjectModel
1792
1900
  }
@@ -1795,7 +1903,7 @@ sap.ui.define([
1795
1903
 
1796
1904
  // Moved to ContentFactory logic
1797
1905
  var iMaxConditions = this.getMaxConditions();
1798
- var aOperators = this._getOperators();
1906
+ var aOperators = this.getSupportedOperators();
1799
1907
  var sControlName;
1800
1908
  var aContentOld = this.getAggregation("_content", []);
1801
1909
  var oContentOld;
@@ -1803,28 +1911,28 @@ sap.ui.define([
1803
1911
 
1804
1912
  var bMultipleLines = this.getMultipleLines();
1805
1913
  var bIsTriggerable = this._bTriggerable;
1806
- var oContentType = this._getContentFactory().getContentType(this.getBaseType(), this.getMaxConditions(), bIsTriggerable);
1914
+ var oContentType = this.getContentFactory().getContentType(this.getBaseType(), this.getMaxConditions(), bIsTriggerable);
1807
1915
 
1808
1916
  if (aContentOld.length > 0) {
1809
1917
  oContentOld = aContentOld[0];
1810
1918
  sControlNameOld = oContentOld.getMetadata().getName().replace(/\./g, "/");
1811
1919
  }
1812
1920
 
1813
- var sContentMode = this._getContentFactory().getContentMode(oContentType, sEditMode, iMaxConditions, bMultipleLines, aOperators);
1921
+ var sContentMode = this.getContentFactory().getContentMode(oContentType, sEditMode, iMaxConditions, bMultipleLines, aOperators);
1814
1922
  var aControlNames = oContentType.getControlNames(sContentMode, aOperators[0]);
1815
1923
  sControlName = aControlNames[0];
1816
1924
  if (sControlName !== sControlNameOld) {
1817
- this._getContentFactory().setHideOperator(_isOnlyOneSingleValue.call(this, aOperators)); // in single value eq Field hide operator
1925
+ this.getContentFactory().setHideOperator(_isOnlyOneSingleValue.call(this, aOperators)); // in single value eq Field hide operator
1818
1926
 
1819
1927
  if (oContentOld) {
1820
- this._destroyInternalContent();
1928
+ this.destroyInternalContent();
1821
1929
 
1822
1930
  if (oContentOld.isA("sap.m.DateTimeField")) {
1823
1931
  // in case of DatePicker remove type with special format options
1824
- this._initDataType();
1932
+ this.initDataType();
1825
1933
  }
1826
1934
 
1827
- this._getContentFactory().updateConditionType();
1935
+ this.getContentFactory().updateConditionType();
1828
1936
  }
1829
1937
 
1830
1938
  if (_useDefaultFieldHelp.call(this, oContentType, aOperators, sEditMode, iMaxConditions)) {
@@ -1835,10 +1943,10 @@ sap.ui.define([
1835
1943
  }
1836
1944
 
1837
1945
  var sId = _getIdForInternalControl.call(this);
1838
- this._oCreateContentPromise = this._getContentFactory().createContent(oContentType, sContentMode, sId);
1946
+ this._oCreateContentPromise = this.getContentFactory().createContent(oContentType, sContentMode, sId);
1839
1947
  this._oCreateContentPromise.then(function(aControls) {
1840
1948
  delete this._oCreateContentPromise; // after finished new creation request can be sync again (clear at the beginning as error might break function before end)
1841
- for (var iIndex = 0; iIndex < aControls.length; iIndex++) {
1949
+ for (var iIndex = 0; iIndex < aControls.length; iIndex++) { // if already destroyed ContentFactory will not create any content control
1842
1950
  var oControl = aControls[iIndex];
1843
1951
  oControl.attachEvent("parseError", _handleParseError, this);
1844
1952
  oControl.attachEvent("validationError", _handleValidationError, this);
@@ -1846,9 +1954,6 @@ sap.ui.define([
1846
1954
  _modifyKeyboardHandler.call(this, oControl, oContentType.getUseDefaultEnterHandler());
1847
1955
  _modifyFieldGroupHandler.call(this, oControl, false);
1848
1956
  _setModelOnContent.call(this, oControl);
1849
- if (this._bConnected && ((iIndex === 0 && !this._getContentFactory().isMeasure()) || (iIndex === 1 && this._getContentFactory().isMeasure()))) {
1850
- _setFocusHandlingForFieldHelp.call(this, oControl);
1851
- }
1852
1957
  this.addAggregation("_content", oControl);
1853
1958
  }
1854
1959
 
@@ -1866,34 +1971,38 @@ sap.ui.define([
1866
1971
 
1867
1972
  }
1868
1973
 
1869
- FieldBase.prototype._destroyInternalContent = function () {
1974
+ /**
1975
+ * Destroys the internal content controls.
1976
+ * @protected
1977
+ */
1978
+ FieldBase.prototype.destroyInternalContent = function () {
1870
1979
 
1871
1980
  // if the internalContent must be new created the data type must be switched back to original one
1872
1981
  // so new creation of control is using original data
1873
1982
  this.destroyAggregation("_content");
1874
1983
 
1875
- if (this._getContentFactory().getDateOriginalType()) {
1876
- this._getContentFactory().setDataType(this._getContentFactory().getDateOriginalType());
1877
- this._getContentFactory().setDateOriginalType(undefined);
1878
- } else if (this._getContentFactory().getUnitOriginalType()) {
1879
- this._getContentFactory().setDataType(this._getContentFactory().getUnitOriginalType());
1880
- this._getContentFactory().setUnitOriginalType(undefined);
1984
+ if (this.getContentFactory().getDateOriginalType()) {
1985
+ this.getContentFactory().setDataType(this.getContentFactory().getDateOriginalType());
1986
+ this.getContentFactory().setDateOriginalType(undefined);
1987
+ } else if (this.getContentFactory().getUnitOriginalType()) {
1988
+ this.getContentFactory().setDataType(this.getContentFactory().getUnitOriginalType());
1989
+ this.getContentFactory().setUnitOriginalType(undefined);
1881
1990
  }
1882
1991
 
1883
- if (this._isInvalidInput()) {
1992
+ if (this.isInvalidInput()) {
1884
1993
  // as wrong input get lost if content control is destroyed.
1885
- this._resetInvalidInput();
1994
+ this.resetInvalidInput();
1886
1995
  this._removeUIMessage();
1887
1996
  }
1888
1997
 
1889
- if (this._getContentFactory().isMeasure()) {
1890
- this._getContentFactory().setIsMeasure(false);
1998
+ if (this.getContentFactory().isMeasure()) {
1999
+ this.getContentFactory().setIsMeasure(false);
1891
2000
  }
1892
2001
 
1893
2002
  };
1894
2003
 
1895
2004
  function _setModelOnContent(oContent) {
1896
- if (!this._oManagedObjectModel && !this._bIsBeingDestroyed) {
2005
+ if (!this._oManagedObjectModel && !this.isFieldDestroyed()) {
1897
2006
  this._oManagedObjectModel = new ManagedObjectModel(this);
1898
2007
  }
1899
2008
  oContent.setModel(this._oManagedObjectModel, "$field");
@@ -2038,7 +2147,7 @@ sap.ui.define([
2038
2147
 
2039
2148
  var oValueHelp = mDefaultHelps[sType].control;
2040
2149
 
2041
- if (oValueHelp && oValueHelp.bIsDestroyed) {
2150
+ if (oValueHelp && oValueHelp.isDestroyed()) {
2042
2151
  // someone destroyed FieldHelp -> initialize
2043
2152
  mDefaultHelps[sType].control = undefined;
2044
2153
  oValueHelp = undefined;
@@ -2054,9 +2163,8 @@ sap.ui.define([
2054
2163
  var ValueHelp = aModules[0];
2055
2164
  var Container = aModules[1];
2056
2165
  var Content = aModules[2];
2057
- var oDelegate = this.bDelegateInitialized && this.getControlDelegate()[mDefaultHelps[sType].getDelegate]();
2058
2166
  oValueHelp = new ValueHelp(mDefaultHelps[sType].id, {
2059
- delegate: oDelegate
2167
+ delegate: {name: "sap/ui/mdc/ValueHelpDelegate", payload: {isDefaultHelp: true}} // use base-delegate as TypeUtil of delegate is not used in current ValueHelp implementation as we transfer the Type of the Field into the ValueHelp (oConfig)
2060
2168
  });
2061
2169
  var oContainer = new Container(mDefaultHelps[sType].id + "-container", {
2062
2170
  content: [new Content(mDefaultHelps[sType].id + "-content", mDefaultHelps[sType].contentProperties)]
@@ -2091,7 +2199,7 @@ sap.ui.define([
2091
2199
  function _useDefaultFieldHelp(oContentType, aOperators, sEditMode, iMaxConditions) {
2092
2200
 
2093
2201
  var oUseDefaultFieldHelp = oContentType.getUseDefaultFieldHelp();
2094
- if (oUseDefaultFieldHelp && !this.getFieldHelp() && sEditMode !== EditMode.Display) {
2202
+ if (oUseDefaultFieldHelp && !this._getValueHelp() && sEditMode !== FieldEditMode.Display) {
2095
2203
  if ((iMaxConditions === 1 && oUseDefaultFieldHelp.single) || (iMaxConditions !== 1 && oUseDefaultFieldHelp.multi)) {
2096
2204
  if (aOperators.length === 1) {
2097
2205
  var bIsSingleValue = _isOnlyOneSingleValue.call(this, aOperators); // if operator not exists unse no field help
@@ -2140,13 +2248,24 @@ sap.ui.define([
2140
2248
 
2141
2249
  };
2142
2250
 
2143
- FieldBase.prototype._resetInvalidInput = function() {
2251
+ /**
2252
+ * Resets invalid input information.
2253
+ *
2254
+ * Might be called if Binding changes or field is initialized.
2255
+ * @protected
2256
+ */
2257
+ FieldBase.prototype.resetInvalidInput = function() {
2144
2258
 
2145
2259
  this._oInvalidInput = null;
2146
2260
 
2147
2261
  };
2148
2262
 
2149
- FieldBase.prototype._isInvalidInput = function() {
2263
+ /**
2264
+ * Checks if there is invalid input.
2265
+ * @returns {boolean} True if there is invalid input
2266
+ * @protected
2267
+ */
2268
+ FieldBase.prototype.isInvalidInput = function() {
2150
2269
 
2151
2270
  return !!this._oInvalidInput;
2152
2271
 
@@ -2198,7 +2317,7 @@ sap.ui.define([
2198
2317
 
2199
2318
  function _handleValidationSuccess(oEvent) {
2200
2319
 
2201
- this._resetInvalidInput(); // if last valid value is entered again no condition is updated
2320
+ this.resetInvalidInput(); // if last valid value is entered again no condition is updated
2202
2321
 
2203
2322
  }
2204
2323
 
@@ -2231,7 +2350,7 @@ sap.ui.define([
2231
2350
 
2232
2351
  if (oChange.changeEvent.parameters.hasOwnProperty("valid")) {
2233
2352
  bValid = oChange.changeEvent.parameters["valid"];
2234
- } else if (this._isInvalidInput()) {
2353
+ } else if (this.isInvalidInput()) {
2235
2354
  // this might be result of a value that cannot be parsed
2236
2355
  bValid = false;
2237
2356
  }
@@ -2255,7 +2374,7 @@ sap.ui.define([
2255
2374
 
2256
2375
  if (this._oNavigateCondition) {
2257
2376
  this._oNavigateCondition = undefined; // navigation now finished
2258
- this._getContentFactory().updateConditionType();
2377
+ this.getContentFactory().updateConditionType();
2259
2378
  }
2260
2379
 
2261
2380
  if (oChange.resolve) {
@@ -2275,7 +2394,7 @@ sap.ui.define([
2275
2394
  var oSource = oEvent.getSource();
2276
2395
 
2277
2396
  this._oNavigateCondition = undefined; // navigation item is not longer valid
2278
- this._getContentFactory().updateConditionType();
2397
+ this.getContentFactory().updateConditionType();
2279
2398
 
2280
2399
  if ("value" in oEvent.getParameters()) {
2281
2400
  vValue = oEvent.getParameter("value");
@@ -2297,7 +2416,7 @@ sap.ui.define([
2297
2416
 
2298
2417
  var oFieldHelp = _getFieldHelp.call(this);
2299
2418
 
2300
- if (oFieldHelp && (!this._getContentFactory().isMeasure() || oSource.getShowValueHelp())) {
2419
+ if (oFieldHelp && (!this.getContentFactory().isMeasure() || oSource.getShowValueHelp())) {
2301
2420
  if (bEscPressed) {
2302
2421
  // close FieldHelp if escape pressed and not repoen it for last typed characters
2303
2422
  if (oFieldHelp.isOpen()) {
@@ -2307,7 +2426,7 @@ sap.ui.define([
2307
2426
  this._sFilterValue = "";
2308
2427
  }
2309
2428
  } else {
2310
- var aOperators = this._getOperators(); // show suggestion only if equal operators are supported
2429
+ var aOperators = this.getSupportedOperators(); // show suggestion only if equal operators are supported
2311
2430
  var bUseFieldHelp = false;
2312
2431
 
2313
2432
  // check if at least one operator supports field help
@@ -2373,7 +2492,7 @@ sap.ui.define([
2373
2492
  }
2374
2493
  }.bind(this);
2375
2494
 
2376
- if (this._bConnected && this._getContent()[0]) {
2495
+ if (this._bConnected && this.getCurrentContent()[0]) {
2377
2496
  oFieldHelp.isTypeaheadSupported().then(function (bTypeahead) {
2378
2497
  return !!bTypeahead && _handleTypeahead();
2379
2498
  });
@@ -2420,7 +2539,7 @@ sap.ui.define([
2420
2539
  if (oFieldInfo) {
2421
2540
  oFieldInfo.getTriggerHref().then(function(sHref) {
2422
2541
  if (!sHref) {
2423
- oFieldInfo.open(this._getContent()[0]);
2542
+ oFieldInfo.open(this.getCurrentContent()[0]);
2424
2543
  _setAriaAttributes.call(this, true);
2425
2544
  }
2426
2545
  }.bind(this));
@@ -2448,7 +2567,7 @@ sap.ui.define([
2448
2567
 
2449
2568
  for (i = aConditions.length - 1; i >= 0; i--) {
2450
2569
  if (aConditions[i].delete) {
2451
- if (this._getContentFactory().isMeasure()) {
2570
+ if (this.getContentFactory().isMeasure()) {
2452
2571
  // store for dummy condition if all conditions are removed
2453
2572
  sUnit = aConditions[i].values[0][1];
2454
2573
  oPayload = aConditions[i].payload;
@@ -2457,7 +2576,7 @@ sap.ui.define([
2457
2576
  }
2458
2577
  }
2459
2578
 
2460
- if (this._getContentFactory().isMeasure() && sUnit && aConditions.length === 0) {
2579
+ if (this.getContentFactory().isMeasure() && sUnit && aConditions.length === 0) {
2461
2580
  // create dummy condition for unit
2462
2581
  aConditions = [Condition.createItemCondition([undefined, sUnit], undefined, undefined, undefined, oPayload)];
2463
2582
  }
@@ -2488,7 +2607,7 @@ sap.ui.define([
2488
2607
  _checkFieldHelpExist.call(this, sId);
2489
2608
 
2490
2609
  // update icon (on remove not necessary as hidden)
2491
- var oControl = this._getContent()[0];
2610
+ var oControl = this.getCurrentContent()[0];
2492
2611
  if (oControl && oControl.setValueHelpIconSrc) {
2493
2612
  oControl.setValueHelpIconSrc(this._getFieldHelpIcon());
2494
2613
  }
@@ -2512,9 +2631,16 @@ sap.ui.define([
2512
2631
 
2513
2632
  }
2514
2633
 
2634
+ // TODO: remove this function and replace by getValueHelp once FieldHelp association is completetly removed.
2635
+ FieldBase.prototype._getValueHelp = function() {
2636
+
2637
+ return this.getValueHelp() || (this.getFieldHelp && this.getFieldHelp()); // as getFieldHelp not exist in legacy-free UI5
2638
+
2639
+ };
2640
+
2515
2641
  function _getFieldHelp() {
2516
2642
 
2517
- var sId = this.getFieldHelp();
2643
+ var sId = this._getValueHelp();
2518
2644
  var oFieldHelp;
2519
2645
 
2520
2646
  if (!sId && this._sDefaultFieldHelp) {
@@ -2536,11 +2662,11 @@ sap.ui.define([
2536
2662
  }
2537
2663
 
2538
2664
  var aHelpConditions;
2539
- if (this._isInvalidInput() && this.getMaxConditionsForHelp() === 1) {
2665
+ if (this.isInvalidInput() && this.getMaxConditionsForHelp() === 1) {
2540
2666
  // if parsing error and single value case do not see the old (outdated) condition as selected
2541
2667
  // TODO: handling if error only on unit or number part
2542
2668
  aHelpConditions = [];
2543
- } else if (this._getContentFactory().isMeasure()) {
2669
+ } else if (this.getContentFactory().isMeasure()) {
2544
2670
  // for unit or curreny add only the unit/currency to FieldHelp
2545
2671
  aHelpConditions = [];
2546
2672
  for (var i = 0; i < aConditions.length; i++) {
@@ -2558,7 +2684,7 @@ sap.ui.define([
2558
2684
 
2559
2685
  }
2560
2686
 
2561
- function _handleValueHelpRequest(oEvent) {
2687
+ function _handleValueHelpRequest(oEvent, bOpenAsTypeahed) { // if triggered by valueHelpRequest event alway open as dialog, if called from Tap or Focus as typeahead
2562
2688
 
2563
2689
  var oFieldHelp = _getFieldHelp.call(this);
2564
2690
 
@@ -2569,10 +2695,10 @@ sap.ui.define([
2569
2695
  oFieldHelp.setFilterValue(this._sFilterValue); // use types value for filtering, even if reopening FieldHelp
2570
2696
  var aConditions = this.getConditions();
2571
2697
  _setConditionsOnFieldHelp.call(this, aConditions, oFieldHelp);
2572
- oFieldHelp.toggleOpen(false);
2698
+ oFieldHelp.toggleOpen(!!bOpenAsTypeahed);
2573
2699
  if (!oFieldHelp.isFocusInHelp()) {
2574
2700
  // need to reset bValueHelpRequested in Input, otherwise on focusout no change event and navigation don't work
2575
- var oContent = oEvent.getSource();
2701
+ var oContent = oEvent.srcControl || oEvent.getSource(); // as, if called from Tap or other brwowser event getSource is not available
2576
2702
  if (oContent.bValueHelpRequested) {
2577
2703
  oContent.bValueHelpRequested = false; // TODO: need API
2578
2704
  }
@@ -2594,7 +2720,7 @@ sap.ui.define([
2594
2720
  var sDOMValue;
2595
2721
  var i = 0;
2596
2722
 
2597
- if (this._getContentFactory().isMeasure()) {
2723
+ if (this.getContentFactory().isMeasure()) {
2598
2724
  if (aNewConditions.length > 1) {
2599
2725
  throw new Error("Only one item must be selected! " + this);
2600
2726
  }
@@ -2620,12 +2746,12 @@ sap.ui.define([
2620
2746
  }
2621
2747
  }
2622
2748
  } else {
2623
- var oOperator = FilterOperatorUtil.getEQOperator(this._getOperators());
2624
- var aValue = this.getControlDelegate().enhanceValueForUnit(this.getPayload(), [null, aNewConditions[0].values[0]], this._oTypeInitialization); // Delegate must be initialized right now
2749
+ var oOperator = FilterOperatorUtil.getEQOperator(this.getSupportedOperators());
2750
+ var aValue = [null, aNewConditions[0].values[0]];
2625
2751
  oCondition = Condition.createCondition(oOperator.name, [aValue], aNewConditions[0].inParameters, aNewConditions[0].outParameters, ConditionValidated.NotValidated, aNewConditions[0].payload);
2626
2752
  aConditions.push(oCondition);
2627
- var oConditionType = this._getContentFactory().getConditionType(true);
2628
- var oConditionsType = this._getContentFactory().getUnitConditionsType(true);
2753
+ var oConditionType = this.getContentFactory().getConditionType(true);
2754
+ var oConditionsType = this.getContentFactory().getUnitConditionsType(true);
2629
2755
  // TODO: format once to update current value in type (as empty condtions are not displayed as token)
2630
2756
  if (oConditionType) {
2631
2757
  sDOMValue = oConditionType.formatValue(oCondition);
@@ -2645,7 +2771,7 @@ sap.ui.define([
2645
2771
  }
2646
2772
 
2647
2773
  // take what ever comes from field help as valid - even if it is an empty key
2648
- var iIndex = FilterOperatorUtil.indexOfCondition(oCondition, aConditions); // check if already exist
2774
+ var iIndex = bAdd ? FilterOperatorUtil.indexOfCondition(oCondition, aConditions) : -1; // check if already exist
2649
2775
  if (iIndex === -1) { // new -> add
2650
2776
  aConditions.push(oCondition);
2651
2777
  } else if (oCondition.validated === ConditionValidated.Validated && oCondition.values.length > 1 && (aConditions[iIndex].values.length === 1 || oCondition.values[1] !== aConditions[iIndex].values[1])) {
@@ -2666,12 +2792,12 @@ sap.ui.define([
2666
2792
  // the focus is still in the Field. The update of the inner control is done via ManagedObjectModel binding.
2667
2793
  // The inner Input is configured to prefer user input in this case.
2668
2794
  // so we need to set the DOM value here. Otherwise it is not updated or, if empty, selected.
2669
- if (this._getContentFactory().isMeasure() && this._getContentFactory().getUnitConditionsType()) {
2670
- sDOMValue = this._getContentFactory().getUnitConditionsType().formatValue(aConditions);
2671
- } else if (this._getContentFactory().getConditionType(true)) {
2672
- sDOMValue = this._getContentFactory().getConditionType().formatValue(aConditions[0]);
2673
- } else if (this._getContentFactory().getConditionsType(true)) {
2674
- sDOMValue = this._getContentFactory().getConditionsType().formatValue(aConditions);
2795
+ if (this.getContentFactory().isMeasure() && this.getContentFactory().getUnitConditionsType()) {
2796
+ sDOMValue = this.getContentFactory().getUnitConditionsType().formatValue(aConditions);
2797
+ } else if (this.getContentFactory().getConditionType(true)) {
2798
+ sDOMValue = this.getContentFactory().getConditionType().formatValue(aConditions[0]);
2799
+ } else if (this.getContentFactory().getConditionsType(true)) {
2800
+ sDOMValue = this.getContentFactory().getConditionsType().formatValue(aConditions);
2675
2801
  }
2676
2802
 
2677
2803
  var fnUpdateDOMValue = function(sText) {
@@ -2700,8 +2826,8 @@ sap.ui.define([
2700
2826
  }
2701
2827
 
2702
2828
  // after selection input cannot be wrong
2703
- if (this._isInvalidInput()) { // only remove messages set by Field itself, message from outside should stay.
2704
- this._resetInvalidInput();
2829
+ if (this.isInvalidInput()) { // only remove messages set by Field itself, message from outside should stay.
2830
+ this.resetInvalidInput();
2705
2831
  this._removeUIMessage();
2706
2832
  bChangeAfterError = true;
2707
2833
  }
@@ -2711,7 +2837,7 @@ sap.ui.define([
2711
2837
 
2712
2838
  if (!deepEqual(aConditions, aConditionsOld)) {
2713
2839
  this._oNavigateCondition = undefined;
2714
- this._getContentFactory().updateConditionType();
2840
+ this.getContentFactory().updateConditionType();
2715
2841
 
2716
2842
  this.setProperty("conditions", aConditions, true); // do not invalidate whole field
2717
2843
 
@@ -2740,7 +2866,7 @@ sap.ui.define([
2740
2866
  var sNewValue;
2741
2867
  var sDOMValue;
2742
2868
  var oContent = this.getControlForSuggestion();
2743
- var oOperator = FilterOperatorUtil.getEQOperator(this._getOperators()); /// use EQ operator of Field (might be different one)
2869
+ var oOperator = FilterOperatorUtil.getEQOperator(this.getSupportedOperators()); /// use EQ operator of Field (might be different one)
2744
2870
  var oFieldHelp = _getFieldHelp.call(this);
2745
2871
 
2746
2872
  if (bLeaveFocus) {
@@ -2760,7 +2886,7 @@ sap.ui.define([
2760
2886
  this._oNavigateCondition = Condition.createCondition(oOperator.name, [vKey, sValue],undefined, undefined, ConditionValidated.Validated);
2761
2887
  }
2762
2888
 
2763
- if (this._getContentFactory().isMeasure()) {
2889
+ if (this.getContentFactory().isMeasure()) {
2764
2890
  var aConditions = this.getConditions();
2765
2891
  // use number of first condition. In Multicase all conditions must be updated in change event
2766
2892
  if (aConditions.length > 0) {
@@ -2772,12 +2898,12 @@ sap.ui.define([
2772
2898
  this._oNavigateCondition.values.splice(1);
2773
2899
  }
2774
2900
  } else {
2775
- this._oNavigateCondition.values = [this.getControlDelegate().enhanceValueForUnit(this.getPayload(), [null, vKey], this._oTypeInitialization)]; // Delegate must be initialized right now
2901
+ this._oNavigateCondition.values = [[null, vKey]];
2776
2902
  }
2777
2903
  }
2778
2904
 
2779
2905
  this._bPreventGetDescription = true; // if no description in navigated condition, no description exist. Don't try to read one
2780
- this._getContentFactory().updateConditionType();
2906
+ this.getContentFactory().updateConditionType();
2781
2907
 
2782
2908
  // take what ever comes from field help as valid - even if it is an empty key
2783
2909
  // TODO: what if field is required?
@@ -2795,12 +2921,12 @@ sap.ui.define([
2795
2921
 
2796
2922
  if (oContent && oContent.setDOMValue) {
2797
2923
  if (!sDOMValue) {
2798
- if (this._getContentFactory().isMeasure() && this._getContentFactory().getUnitConditionsType() && this._oNavigateCondition) {
2799
- sDOMValue = this._getContentFactory().getUnitConditionsType().formatValue([this._oNavigateCondition]);
2800
- } else if (this._getContentFactory().getConditionType(true) && this._oNavigateCondition) {
2801
- sDOMValue = this._getContentFactory().getConditionType().formatValue(this._oNavigateCondition);
2802
- } else if (this._getContentFactory().getConditionsType(true) && this._oNavigateCondition) {
2803
- sDOMValue = this._getContentFactory().getConditionsType().formatValue([this._oNavigateCondition]);
2924
+ if (this.getContentFactory().isMeasure() && this.getContentFactory().getUnitConditionsType() && this._oNavigateCondition) {
2925
+ sDOMValue = this.getContentFactory().getUnitConditionsType().formatValue([this._oNavigateCondition]);
2926
+ } else if (this.getContentFactory().getConditionType(true) && this._oNavigateCondition) {
2927
+ sDOMValue = this.getContentFactory().getConditionType().formatValue(this._oNavigateCondition);
2928
+ } else if (this.getContentFactory().getConditionsType(true) && this._oNavigateCondition) {
2929
+ sDOMValue = this.getContentFactory().getConditionsType().formatValue([this._oNavigateCondition]);
2804
2930
  } else {
2805
2931
  sDOMValue = sValue || vKey;
2806
2932
  }
@@ -2815,7 +2941,7 @@ sap.ui.define([
2815
2941
  }
2816
2942
 
2817
2943
  this._bPreventGetDescription = false; // back to default
2818
- this._getContentFactory().updateConditionType();
2944
+ this.getContentFactory().updateConditionType();
2819
2945
 
2820
2946
  _setAriaAttributes.call(this, bOpen, sItemId);
2821
2947
 
@@ -2832,7 +2958,7 @@ sap.ui.define([
2832
2958
  this._bIgnoreInputValue = false;
2833
2959
  oContent.setDOMValue("");
2834
2960
  this._sFilterValue = "";
2835
- this._getContentFactory().updateConditionType();
2961
+ this.getContentFactory().updateConditionType();
2836
2962
  if (this.getMaxConditions() !== 1) {
2837
2963
  // clear "value" property of MultiInput as there might be an old value from a invalid input before
2838
2964
  this._oManagedObjectModel.checkUpdate(true); // forces update of value property via binding to conditions
@@ -2868,13 +2994,13 @@ sap.ui.define([
2868
2994
 
2869
2995
  function _handleHelpDataUpdate(oEvent) {
2870
2996
 
2871
- var isEditing = this.getEditMode() === EditMode.Editable && this._getContent().length > 0 &&
2872
- sap.ui.getCore().getCurrentFocusedControlId() === this._getContent()[0].getId();
2997
+ var isEditing = this.getEditMode() === FieldEditMode.Editable && this.getCurrentContent().length > 0 &&
2998
+ sap.ui.getCore().getCurrentFocusedControlId() === this.getCurrentContent()[0].getId();
2873
2999
 
2874
3000
  // // also in display mode to get right text
2875
3001
  // _handleConditionsChange.call(this, this.getConditions());
2876
3002
  if (!isEditing && !this._bPendingConditionUpdate && this.getConditions().length > 0 &&
2877
- (this.getMaxConditions() !== 1 || (this.getDisplay() !== FieldDisplay.Value && !this._isInvalidInput()))
3003
+ (this.getMaxConditions() !== 1 || (this.getDisplay() !== FieldDisplay.Value && !this.isInvalidInput()))
2878
3004
  && this._oManagedObjectModel) {
2879
3005
  // update tokens in MultiValue
2880
3006
  // update text/value only if no parse error, otherwise wrong value would be removed
@@ -2911,21 +3037,21 @@ sap.ui.define([
2911
3037
  var oFieldHelp = _getFieldHelp.call(this);
2912
3038
  if (oFieldHelp) { // as Config or BindingContext might change, update connection on every focus
2913
3039
  var oType;
2914
- var bIsMeasure = this._getContentFactory().isMeasure();
3040
+ var bIsMeasure = this.getContentFactory().isMeasure();
2915
3041
 
2916
3042
  if (bIsMeasure) {
2917
3043
  // for value help, use the basic type of the unit part, not the unit type. (As ony this part is tranfered, not the composite-array.)
2918
- var aCompositeTypes = this._getContentFactory().getCompositeTypes();
3044
+ var aCompositeTypes = this.getContentFactory().getCompositeTypes();
2919
3045
  if (aCompositeTypes && aCompositeTypes.length > 1) { // if no type is defined the default (String) will be used
2920
3046
  oType = aCompositeTypes[1];
2921
3047
  }
2922
3048
  } else {
2923
- oType = this._getContentFactory().getDataType(); // use data type of Field
3049
+ oType = this.getContentFactory().getDataType(); // use data type of Field
2924
3050
  }
2925
3051
  var oConfig = { // TODO: only what is needed (also for DefineConditions and Tokenizer)
2926
3052
  maxConditions: this.getMaxConditions(), // TODO: in unit case only 1?
2927
3053
  dataType: oType,
2928
- operators: this._getOperators(),
3054
+ operators: this.getSupportedOperators(),
2929
3055
  display: bIsMeasure ? FieldDisplay.Value : this.getDisplay(),
2930
3056
  delegate: this.getControlDelegate(),
2931
3057
  delegateName: this.getDelegate() && this.getDelegate().name,
@@ -2946,8 +3072,6 @@ sap.ui.define([
2946
3072
  var aConditions = this.getConditions();
2947
3073
  _setConditionsOnFieldHelp.call(this, aConditions, oFieldHelp);
2948
3074
 
2949
- var oContent = this.getControlForSuggestion();
2950
- _setFocusHandlingForFieldHelp.call(this, oContent);
2951
3075
  if (oFieldHelp._bIsDefaultHelp) {
2952
3076
  // use label as default title for FilterField
2953
3077
  mDefaultHelps[oFieldHelp._sDefaultHelpType].updateTitle(oFieldHelp, this.getLabel());
@@ -2957,34 +3081,41 @@ sap.ui.define([
2957
3081
 
2958
3082
  }
2959
3083
 
2960
- function _setFocusHandlingForFieldHelp(oContent) {
2961
-
2962
- if (oContent && !oContent.orgOnsapfocusleave && oContent.onsapfocusleave) {
2963
- //TODO: find better solution
2964
- oContent.orgOnsapfocusleave = oContent.onsapfocusleave;
2965
- oContent.onsapfocusleave = function(oEvent) {
2966
- var oFieldHelp = _getFieldHelp.call(this.getParent());
2967
-
2968
- if (oFieldHelp) {
2969
- var oFocusedControl = sap.ui.getCore().byId(oEvent.relatedControlId);
2970
- if (oFocusedControl) {
2971
- if (containsOrEquals(oFieldHelp.getDomRef(), oFocusedControl.getFocusDomRef())) {
2972
- oEvent.stopPropagation(); // to prevent focusleave on Field itself
2973
- if (this.bValueHelpRequested) {
2974
- this.bValueHelpRequested = false; // to enable change-event after closing value help
2975
- }
2976
- return; // do not execute Inputs logic to prevent to run in Inputs own suggest-popup logic
2977
- } else {
2978
- oFieldHelp.skipOpening();
2979
- }
3084
+ function _handleContentOnsapfocusleave(oEvent) {
3085
+
3086
+ var oFieldHelp = _getFieldHelp.call(this);
3087
+ var oContent = this.getControlForSuggestion();
3088
+ var oSourceControl = oEvent.srcControl;
3089
+
3090
+ if (oFieldHelp && oContent === oSourceControl) { // in unit case only handle content with assigned value help
3091
+ var oFocusedControl = sap.ui.getCore().byId(oEvent.relatedControlId);
3092
+ if (oFocusedControl) {
3093
+ if (containsOrEquals(oFieldHelp.getDomRef(), oFocusedControl.getFocusDomRef())) {
3094
+ oEvent.stopPropagation(); // to prevent focusleave on Field itself
3095
+ oEvent.stopImmediatePropagation(true); // to prevent focusleave on content
3096
+ if (oContent.bValueHelpRequested) {
3097
+ oContent.bValueHelpRequested = false; // to enable change-event after closing value help
2980
3098
  }
3099
+ } else {
3100
+ oFieldHelp.skipOpening();
2981
3101
  }
2982
- this.orgOnsapfocusleave(oEvent);
2983
- };
3102
+ }
3103
+ }
3104
+
3105
+ }
3106
+
3107
+ function _handleContentOnchange(oEvent) {
3108
+
3109
+ if (_getFieldHelp.call(this)) { // there is a similar logic in sap.m.Input to not execute change if ValueHelp or suggestion is used
3110
+ oEvent.stopImmediatePropagation(true);
2984
3111
  }
2985
3112
 
2986
3113
  }
2987
3114
 
3115
+ /**
3116
+ * Gets the icon that needs to be rendered for used value help.
3117
+ * @returns {sap.ui.core.URI|null} Icon
3118
+ */
2988
3119
  FieldBase.prototype._getFieldHelpIcon = function() {
2989
3120
 
2990
3121
  var oFieldHelp = _getFieldHelp.call(this);
@@ -3013,7 +3144,7 @@ sap.ui.define([
3013
3144
  oFieldInfo.isTriggerable().then(function(bTriggerable) {
3014
3145
  that._bTriggerable = bTriggerable;
3015
3146
  var aContent = that.getAggregation("_content", []);
3016
- if (aContent.length > 0 && that.getEditMode() === EditMode.Display) {
3147
+ if (aContent.length > 0 && that.getEditMode() === FieldEditMode.Display) {
3017
3148
  _createInternalContentWrapper.call(that);
3018
3149
  if (that._bTriggerable) {
3019
3150
  aContent = that.getAggregation("_content", []);
@@ -3028,26 +3159,26 @@ sap.ui.define([
3028
3159
 
3029
3160
  // TODO: better API?
3030
3161
  /**
3031
- * Provides some internals of the field to be used in the value help.
3162
+ * Provides some internals of the field to be used in {@link sap.ui.mdc.field.ConditionsType ConditionsType} for format and parse the conditions.
3032
3163
  *
3033
- * @returns {object} formatOptions of the field
3034
- * @private
3164
+ * @returns {object} formatOptions of the field (see {@link sap.ui.mdc.field.ConditionsType ConditionsType})
3165
+ * @protected
3035
3166
  */
3036
- FieldBase.prototype._getFormatOptions = function() {
3167
+ FieldBase.prototype.getFormatOptions = function() {
3037
3168
 
3038
3169
  if (!this._asyncParsingCall) {
3039
3170
  this._asyncParsingCall = _asyncParsingCall.bind(this); //as variable to have the same function after each update of formatOptions. Otherwise it would be a change on FormatOption in ValueHelpPanel every time
3040
3171
  }
3041
3172
 
3042
3173
  return {
3043
- valueType: this._getContentFactory().retrieveDataType(),
3044
- originalDateType: this._getContentFactory().getDateOriginalType() || this._getContentFactory().getUnitOriginalType(),
3045
- additionalType: this._getContentFactory().getUnitType(), // only set if unit or timezone
3046
- compositeTypes: this._getContentFactory().getCompositeTypes(), // only set if CompositeType used
3047
- display: this._getContentFactory().isMeasure() ? FieldDisplay.Value : this.getDisplay(),
3048
- fieldHelpID: this._getContentFactory().isMeasure() ? undefined : this.getFieldHelp() || this._sDefaultFieldHelp,
3049
- operators: this._getOperators(),
3050
- hideOperator: this._getContentFactory().getHideOperator(),
3174
+ valueType: this.getContentFactory().retrieveDataType(),
3175
+ originalDateType: this.getContentFactory().getDateOriginalType() || this.getContentFactory().getUnitOriginalType(),
3176
+ additionalType: this.getContentFactory().getUnitType(), // only set if unit or timezone
3177
+ compositeTypes: this.getContentFactory().getCompositeTypes(), // only set if CompositeType used
3178
+ display: this.getContentFactory().isMeasure() ? FieldDisplay.Value : this.getDisplay(),
3179
+ valueHelpID: this.getContentFactory().isMeasure() ? undefined : this._getValueHelp() || this._sDefaultFieldHelp,
3180
+ operators: this.getSupportedOperators(),
3181
+ hideOperator: this.getContentFactory().getHideOperator(),
3051
3182
  maxConditions: this.getMaxConditions(),
3052
3183
  bindingContext: this.getBindingContext(), // to dertmine text and key usding in/out-parameter using correct bindingContext (In Table FieldHelp might be connected to other row)
3053
3184
  asyncParsing: this._asyncParsingCall,
@@ -3056,11 +3187,11 @@ sap.ui.define([
3056
3187
  delegateName: this.getDelegate() && this.getDelegate().name,
3057
3188
  payload: this.getPayload(),
3058
3189
  preventGetDescription: this._bPreventGetDescription,
3059
- convertWhitespaces: this.getEditMode() === EditMode.Display || this.getMaxConditions() !== 1, // also replace whitespaces in tokens
3190
+ convertWhitespaces: this.getEditMode() === FieldEditMode.Display || this.getMaxConditions() !== 1, // also replace whitespaces in tokens
3060
3191
  control: this,
3061
3192
  defaultOperatorName : this.getDefaultOperator ? this.getDefaultOperator() : null,
3062
3193
  getConditions: this.getConditions.bind(this), // to add condition in multi-value case
3063
- noFormatting: this._getContentFactory().getNoFormatting(),
3194
+ noFormatting: this.getContentFactory().getNoFormatting(),
3064
3195
  keepValue: this._bIgnoreInputValue ? this._sFilterValue : null
3065
3196
  };
3066
3197
 
@@ -3073,17 +3204,16 @@ sap.ui.define([
3073
3204
  *
3074
3205
  * @param {any} vValue Value to be checked
3075
3206
  * @returns {boolean} true if value is initial
3076
- * @private
3077
- * @ui5-restricted FieldBase subclasses
3207
+ * @protected
3078
3208
  */
3079
- FieldBase.prototype._checkValueInitial = function(vValue) {
3209
+ FieldBase.prototype.checkValueInitial = function(vValue) {
3080
3210
 
3081
3211
  if (vValue === null || vValue === undefined) {
3082
3212
  return true;
3083
3213
  }
3084
3214
 
3085
3215
  if (vValue === "" || (typeof (vValue) === "string" && vValue.match(/^0+$/))) { // if String is dig-sequence, initial value contains only "0"s
3086
- var oType = this._getContentFactory().retrieveDataType();
3216
+ var oType = this.getContentFactory().retrieveDataType();
3087
3217
  var vResult = oType.parseValue("", "string");
3088
3218
  if (vResult === vValue) {
3089
3219
  return true; // it's initial value
@@ -3097,7 +3227,7 @@ sap.ui.define([
3097
3227
  }
3098
3228
  } else {
3099
3229
  var sDataType = _getDataTypeName.call(this);
3100
- if (this.getTypeUtil().getBaseType(sDataType) === BaseType.Unit
3230
+ if (this.getTypeMap().getBaseType(sDataType) === BaseType.Unit
3101
3231
  && Array.isArray(vValue) && vValue.length > 1 && (vValue[0] === undefined || vValue[0] === null) && !vValue[1]) { // as 0 is a valid number
3102
3232
  //no number and no unit -> initial
3103
3233
  return true;
@@ -3110,19 +3240,25 @@ sap.ui.define([
3110
3240
 
3111
3241
  };
3112
3242
 
3113
- FieldBase.prototype._getUnitFormatOptions = function() {
3243
+ /**
3244
+ * Provides some internals of the unit part of the field to be used in {@link sap.ui.mdc.field.ConditionsType ConditionsType} for format and parse the conditions.
3245
+ *
3246
+ * @returns {object} formatOptions of the field (see {@link sap.ui.mdc.field.ConditionsType ConditionsType})
3247
+ * @protected
3248
+ */
3249
+ FieldBase.prototype.getUnitFormatOptions = function() {
3114
3250
 
3115
3251
  if (!this._asyncParsingCall) { //as variable to have the same function after each update of formatOptions. Otherwise it would be a change on FormatOption in ValueHelpPanel every time
3116
3252
  this._asyncParsingCall = _asyncParsingCall.bind(this);
3117
3253
  }
3118
3254
 
3119
3255
  return {
3120
- valueType: this._getContentFactory().getUnitType(),
3121
- originalDateType: this._getContentFactory().getDateOriginalType() || this._getContentFactory().getUnitOriginalType(),
3122
- additionalType: this._getContentFactory().retrieveDataType(), // use type of measure for currentValue
3123
- compositeTypes: this._getContentFactory().getCompositeTypes(),
3256
+ valueType: this.getContentFactory().getUnitType(),
3257
+ originalDateType: this.getContentFactory().getDateOriginalType() || this.getContentFactory().getUnitOriginalType(),
3258
+ additionalType: this.getContentFactory().retrieveDataType(), // use type of measure for currentValue
3259
+ compositeTypes: this.getContentFactory().getCompositeTypes(),
3124
3260
  display: this.getDisplay(),
3125
- fieldHelpID: this.getFieldHelp() || this._sDefaultFieldHelp,
3261
+ valueHelpID: this._getValueHelp() || this._sDefaultFieldHelp,
3126
3262
  operators: ["EQ"],
3127
3263
  hideOperator: true, // TODO: no operator for units
3128
3264
  maxConditions: 1, // TODO: only one unit allowed
@@ -3133,7 +3269,7 @@ sap.ui.define([
3133
3269
  delegateName: this.getDelegate() && this.getDelegate().name,
3134
3270
  payload: this.getPayload(),
3135
3271
  preventGetDescription: this._bPreventGetDescription,
3136
- convertWhitespaces: this.getEditMode() === EditMode.Display || this.getEditMode() === EditMode.EditableDisplay,
3272
+ convertWhitespaces: this.getEditMode() === FieldEditMode.Display || this.getEditMode() === FieldEditMode.EditableDisplay,
3137
3273
  control: this,
3138
3274
  getConditions: this.getConditions.bind(this), // TODO: better solution to update unit in all conditions
3139
3275
  noFormatting: false
@@ -3161,7 +3297,7 @@ sap.ui.define([
3161
3297
 
3162
3298
  oPromise.then(function(vResult) {// vResult can be a condition or an array of conditions
3163
3299
  oChange.result = vResult;
3164
- this._resetInvalidInput();
3300
+ this.resetInvalidInput();
3165
3301
  var aConditions = this.getConditions();
3166
3302
  if (deepEqual(vResult, aConditions)) {
3167
3303
  // parsingResult is same as current value -> no update will happen
@@ -3196,7 +3332,7 @@ sap.ui.define([
3196
3332
 
3197
3333
  if (aPromises.length > 0) {
3198
3334
  return Promise.all(aPromises).then(function() {
3199
- return this._getResultForPromise(this.getConditions());
3335
+ return this.getResultForChangePromise(this.getConditions());
3200
3336
  }.bind(this));
3201
3337
  }
3202
3338
 
@@ -3204,7 +3340,13 @@ sap.ui.define([
3204
3340
 
3205
3341
  }
3206
3342
 
3207
- FieldBase.prototype._getResultForPromise = function(aConditions) {
3343
+ /**
3344
+ * Determines, based on conditions, the value returned by the <code>change</code> event.
3345
+ * @param {sap.ui.mdc.field.ConditionType[]} aConditions Array of conditions
3346
+ * @returns {any} control-dependent value for <code>change</code> event
3347
+ * @protected
3348
+ */
3349
+ FieldBase.prototype.getResultForChangePromise = function(aConditions) {
3208
3350
 
3209
3351
  // to be overwritten by Field - per default resolve conditions
3210
3352
  return aConditions;
@@ -3213,7 +3355,7 @@ sap.ui.define([
3213
3355
 
3214
3356
  function _resolveAsyncChange(oChange) {
3215
3357
 
3216
- oChange.resolve(this._getResultForPromise(oChange.result));
3358
+ oChange.resolve(this.getResultForChangePromise(oChange.result));
3217
3359
 
3218
3360
  }
3219
3361
 
@@ -3235,27 +3377,50 @@ sap.ui.define([
3235
3377
 
3236
3378
  }
3237
3379
 
3238
- /*
3239
- * returns the supported operators
3380
+ /**
3381
+ * Returns the supported operators.
3240
3382
  *
3241
- * To be overwritten by Field and FilterField
3383
+ * Needs to be overwritten by {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField}
3384
+ * and {@link sap.ui.mdc.FilterField FilterField}
3385
+ * @returns {string[]} Array of operator names
3386
+ * @protected
3242
3387
  */
3243
- FieldBase.prototype._getOperators = function() {
3388
+ FieldBase.prototype.getSupportedOperators = function() {
3244
3389
 
3245
- var regexp = new RegExp("^\\*(.*)\\*|\\$search$");
3246
- if (regexp.test(this.getFieldPath()) && this.getMaxConditions() === 1) {
3390
+ var aOperators;
3391
+ if (this.isSearchField()) {
3247
3392
  // for SearchField use Contains operator
3248
- return ["Contains"];
3249
- }
3393
+ aOperators = ["Contains"];
3394
+ } else {
3395
+ // get default operators for type
3396
+ var sBaseType = this.getBaseType(); // TODO what if delegate not loaded
3250
3397
 
3251
- // get default operators for type
3252
- var sBaseType = this.getBaseType(); // TODO what if delegate not loaded
3398
+ if (sBaseType === BaseType.Unit) {
3399
+ sBaseType = BaseType.Numeric;
3400
+ }
3253
3401
 
3254
- if (sBaseType === BaseType.Unit) {
3255
- sBaseType = BaseType.Numeric;
3402
+ aOperators = FilterOperatorUtil.getOperatorsForType(sBaseType);
3256
3403
  }
3257
3404
 
3258
- return FilterOperatorUtil.getOperatorsForType(sBaseType);
3405
+ this.setProperty("_operators", aOperators, true);
3406
+ return aOperators;
3407
+
3408
+ };
3409
+
3410
+ /**
3411
+ * Checks if the field is configured to be a <code>SearchField</code>
3412
+ *
3413
+ * Needs to be overwritten by {@link sap.ui.mdc.Field Field}, {@link sap.ui.mdc.MultiValueField MultiValueField},
3414
+ * and {@link sap.ui.mdc.FilterField FilterField}
3415
+ * @returns {boolean} True if configures as search field
3416
+ * @protected
3417
+ * @since 1.115.0
3418
+ */
3419
+ FieldBase.prototype.isSearchField = function() {
3420
+
3421
+ var regexp = new RegExp("^\\*(.*)\\*|\\$search$");
3422
+ var sFieldPath = this.getFieldPath();
3423
+ return regexp.test(sFieldPath) && this.getMaxConditions() === 1;
3259
3424
 
3260
3425
  };
3261
3426
 
@@ -3265,7 +3430,7 @@ sap.ui.define([
3265
3430
  */
3266
3431
  function _isValidOperator(sOperator) {
3267
3432
 
3268
- var aOperators = this._getOperators();
3433
+ var aOperators = this.getSupportedOperators();
3269
3434
 
3270
3435
  for (var i = 0; i < aOperators.length; i++) {
3271
3436
  if (sOperator === aOperators[i]) {
@@ -3277,7 +3442,16 @@ sap.ui.define([
3277
3442
 
3278
3443
  }
3279
3444
 
3280
- FieldBase.prototype._isPropertyInitial = function(sPropertyName) {
3445
+ /**
3446
+ * Returns whether the given property value is initial and has not been explicitly set or no binding exist.
3447
+ * Even after setting the default value or setting null/undefined (which also causes the default value to be set),
3448
+ * the property is no longer initial. A property can be reset to initial state by calling <code>resetProperty(sPropertyName)</code>.
3449
+ *
3450
+ * @param {string} sPropertyName the name of the property
3451
+ * @returns {boolean} true if the property is initial
3452
+ * @protected
3453
+ */
3454
+ FieldBase.prototype.isFieldPropertyInitial = function(sPropertyName) {
3281
3455
 
3282
3456
  // as bound propertys are never initial even if there is no existing binding right now check the binding too
3283
3457
  if (this.isBound(sPropertyName) && !this.getBinding(sPropertyName)) {
@@ -3288,6 +3462,21 @@ sap.ui.define([
3288
3462
 
3289
3463
  };
3290
3464
 
3465
+ /**
3466
+ * Checks if the field is already destoyed or destruction has started.
3467
+ *
3468
+ * In this casse creation of internal content or binding must be prevented.
3469
+ *
3470
+ * @returns {boolean} True if destroyed or destruction has been started
3471
+ * @protected
3472
+ * @since 1.115.0
3473
+ */
3474
+ FieldBase.prototype.isFieldDestroyed = function() {
3475
+
3476
+ return this.isDestroyed() || this.isDestroyStarted();
3477
+
3478
+ };
3479
+
3291
3480
  return FieldBase;
3292
3481
 
3293
3482
  });