@openui5/sap.ui.mdc 1.96.5 → 1.99.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 (282) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +7 -9
  6. package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
  7. package/src/sap/ui/mdc/BaseDelegate.js +1 -1
  8. package/src/sap/ui/mdc/Chart.js +1100 -1796
  9. package/src/sap/ui/mdc/ChartDelegate.js +429 -270
  10. package/src/sap/ui/mdc/ChartRenderer.js +73 -77
  11. package/src/sap/ui/mdc/Control.js +1 -1
  12. package/src/sap/ui/mdc/Element.js +1 -1
  13. package/src/sap/ui/mdc/Field.js +3 -2
  14. package/src/sap/ui/mdc/FilterBar.js +3 -2
  15. package/src/sap/ui/mdc/FilterField.js +25 -8
  16. package/src/sap/ui/mdc/Link.js +23 -4
  17. package/src/sap/ui/mdc/LinkDelegate.js +3 -3
  18. package/src/sap/ui/mdc/MultiValueField.js +21 -6
  19. package/src/sap/ui/mdc/Table.js +204 -161
  20. package/src/sap/ui/mdc/TableDelegate.js +47 -17
  21. package/src/sap/ui/mdc/ValueHelp.js +51 -15
  22. package/src/sap/ui/mdc/ValueHelpDelegate.js +20 -0
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
  24. package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
  25. package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +49 -13
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
  27. package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
  29. package/src/sap/ui/mdc/chart/Item.js +62 -92
  30. package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
  31. package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
  32. package/src/sap/ui/mdc/condition/Condition.js +1 -1
  33. package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
  34. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  35. package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
  36. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +261 -44
  37. package/src/sap/ui/mdc/condition/Operator.js +9 -9
  38. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +437 -0
  39. package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +80 -5
  41. package/src/sap/ui/mdc/designtime/field/Field.designtime.js +97 -0
  42. package/src/sap/ui/mdc/designtime/field/FieldBase.designtime.js +104 -0
  43. package/src/sap/ui/mdc/designtime/field/FilterField.designtime.js +22 -0
  44. package/src/sap/ui/mdc/designtime/field/MultiValueField.designtime.js +23 -0
  45. package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
  46. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +60 -20
  47. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  49. package/src/sap/ui/mdc/field/ConditionType.js +9 -9
  50. package/src/sap/ui/mdc/field/ConditionsType.js +7 -7
  51. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  52. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  53. package/src/sap/ui/mdc/field/DefineConditionPanel.js +75 -27
  54. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +311 -0
  55. package/src/sap/ui/mdc/field/FieldBase.js +85 -52
  56. package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
  57. package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
  58. package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -10
  59. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  62. package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -7
  63. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +20 -0
  65. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
  66. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
  67. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +7 -3
  68. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
  69. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  70. package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
  71. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  72. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  73. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  74. package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
  75. package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
  76. package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
  77. package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
  78. package/src/sap/ui/mdc/field/ValueHelpPanel.js +2 -1
  79. package/src/sap/ui/mdc/field/content/BooleanContent.js +1 -1
  80. package/src/sap/ui/mdc/field/content/ContentFactory.js +28 -26
  81. package/src/sap/ui/mdc/field/content/DateContent.js +128 -2
  82. package/src/sap/ui/mdc/field/content/DateTimeContent.js +9 -1
  83. package/src/sap/ui/mdc/field/content/DefaultContent.js +36 -14
  84. package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
  85. package/src/sap/ui/mdc/field/content/TimeContent.js +8 -1
  86. package/src/sap/ui/mdc/field/content/UnitContent.js +23 -4
  87. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +359 -142
  88. package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
  89. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
  90. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
  91. package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
  92. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
  93. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
  94. package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
  95. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
  96. package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
  97. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
  98. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  99. package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
  100. package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
  101. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
  102. package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
  103. package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
  104. package/src/sap/ui/mdc/library.js +62 -43
  105. package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
  106. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  107. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  108. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  109. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  110. package/src/sap/ui/mdc/link/Factory.js +2 -2
  111. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  112. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  113. package/src/sap/ui/mdc/link/Log.js +1 -1
  114. package/src/sap/ui/mdc/link/Panel.js +140 -177
  115. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  116. package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
  117. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  118. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  119. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  120. package/src/sap/ui/mdc/messagebundle.properties +68 -5
  121. package/src/sap/ui/mdc/messagebundle_ar.properties +47 -6
  122. package/src/sap/ui/mdc/messagebundle_bg.properties +61 -20
  123. package/src/sap/ui/mdc/messagebundle_ca.properties +45 -4
  124. package/src/sap/ui/mdc/messagebundle_cs.properties +60 -19
  125. package/src/sap/ui/mdc/messagebundle_cy.properties +45 -4
  126. package/src/sap/ui/mdc/messagebundle_da.properties +52 -11
  127. package/src/sap/ui/mdc/messagebundle_de.properties +45 -4
  128. package/src/sap/ui/mdc/messagebundle_el.properties +46 -5
  129. package/src/sap/ui/mdc/messagebundle_en.properties +45 -4
  130. package/src/sap/ui/mdc/messagebundle_en_GB.properties +45 -4
  131. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +51 -2
  132. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +45 -4
  133. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +51 -2
  134. package/src/sap/ui/mdc/messagebundle_es.properties +46 -5
  135. package/src/sap/ui/mdc/messagebundle_es_MX.properties +59 -18
  136. package/src/sap/ui/mdc/messagebundle_et.properties +45 -4
  137. package/src/sap/ui/mdc/messagebundle_fi.properties +51 -10
  138. package/src/sap/ui/mdc/messagebundle_fr.properties +50 -9
  139. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +45 -4
  140. package/src/sap/ui/mdc/messagebundle_hi.properties +46 -5
  141. package/src/sap/ui/mdc/messagebundle_hr.properties +45 -4
  142. package/src/sap/ui/mdc/messagebundle_hu.properties +45 -4
  143. package/src/sap/ui/mdc/messagebundle_id.properties +45 -4
  144. package/src/sap/ui/mdc/messagebundle_it.properties +61 -20
  145. package/src/sap/ui/mdc/messagebundle_iw.properties +46 -5
  146. package/src/sap/ui/mdc/messagebundle_ja.properties +46 -5
  147. package/src/sap/ui/mdc/messagebundle_kk.properties +45 -4
  148. package/src/sap/ui/mdc/messagebundle_ko.properties +46 -5
  149. package/src/sap/ui/mdc/messagebundle_lt.properties +45 -4
  150. package/src/sap/ui/mdc/messagebundle_lv.properties +49 -8
  151. package/src/sap/ui/mdc/messagebundle_ms.properties +45 -4
  152. package/src/sap/ui/mdc/messagebundle_nl.properties +49 -8
  153. package/src/sap/ui/mdc/messagebundle_no.properties +53 -12
  154. package/src/sap/ui/mdc/messagebundle_pl.properties +46 -5
  155. package/src/sap/ui/mdc/messagebundle_pt.properties +52 -11
  156. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +45 -4
  157. package/src/sap/ui/mdc/messagebundle_ro.properties +45 -4
  158. package/src/sap/ui/mdc/messagebundle_ru.properties +45 -4
  159. package/src/sap/ui/mdc/messagebundle_sh.properties +45 -4
  160. package/src/sap/ui/mdc/messagebundle_sk.properties +45 -4
  161. package/src/sap/ui/mdc/messagebundle_sl.properties +45 -4
  162. package/src/sap/ui/mdc/messagebundle_sv.properties +47 -6
  163. package/src/sap/ui/mdc/messagebundle_th.properties +48 -7
  164. package/src/sap/ui/mdc/messagebundle_tr.properties +45 -4
  165. package/src/sap/ui/mdc/messagebundle_uk.properties +49 -8
  166. package/src/sap/ui/mdc/messagebundle_vi.properties +45 -4
  167. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +46 -5
  168. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +45 -4
  169. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +19 -5
  170. package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
  171. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +16 -11
  172. package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
  173. package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
  174. package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
  175. package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
  176. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +160 -116
  177. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
  178. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
  179. package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
  180. package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +215 -116
  181. package/src/sap/ui/mdc/p13n/Engine.js +61 -20
  182. package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
  183. package/src/sap/ui/mdc/p13n/P13nBuilder.js +8 -8
  184. package/src/sap/ui/mdc/p13n/PersistenceProvider.js +21 -10
  185. package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
  186. package/src/sap/ui/mdc/p13n/StateUtil.js +40 -6
  187. package/src/sap/ui/mdc/p13n/UIManager.js +15 -12
  188. package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
  189. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
  190. package/src/sap/ui/mdc/p13n/{DefaultProviderRegistry.js → modules/DefaultProviderRegistry.js} +2 -2
  191. package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +86 -0
  192. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +19 -3
  193. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
  194. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
  195. package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
  196. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
  197. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +1 -1
  198. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
  199. package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
  200. package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
  201. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +14 -7
  202. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
  203. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
  204. package/src/sap/ui/mdc/table/Column.js +35 -10
  205. package/src/sap/ui/mdc/table/CreationRow.js +14 -13
  206. package/src/sap/ui/mdc/table/GridTableType.js +13 -13
  207. package/src/sap/ui/mdc/table/PropertyHelper.js +64 -27
  208. package/src/sap/ui/mdc/table/ResponsiveTableType.js +26 -29
  209. package/src/sap/ui/mdc/table/RowSettings.js +7 -5
  210. package/src/sap/ui/mdc/table/TableTypeBase.js +6 -6
  211. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +15 -71
  212. package/src/sap/ui/mdc/themes/base/Chart.less +3 -0
  213. package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
  214. package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
  215. package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
  216. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +15 -4
  217. package/src/sap/ui/mdc/themes/base/library.source.less +3 -0
  218. package/src/sap/ui/mdc/ui/Container.js +2 -2
  219. package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
  220. package/src/sap/ui/mdc/util/Common.js +1 -1
  221. package/src/sap/ui/mdc/util/DateUtil.js +1 -1
  222. package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
  223. package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
  224. package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
  225. package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
  226. package/src/sap/ui/mdc/util/PropertyHelper.js +148 -325
  227. package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
  228. package/src/sap/ui/mdc/valuehelp/Dialog.js +12 -8
  229. package/src/sap/ui/mdc/valuehelp/Popover.js +14 -2
  230. package/src/sap/ui/mdc/valuehelp/base/Container.js +33 -1
  231. package/src/sap/ui/mdc/valuehelp/base/Content.js +36 -5
  232. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
  233. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +43 -15
  234. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
  235. package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
  236. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +28 -32
  237. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
  238. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +50 -10
  239. package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -26
  240. package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
  241. package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
  242. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
  243. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
  244. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
  245. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
  246. package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
  247. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +289 -0
  248. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
  249. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +9 -9
  250. package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
  251. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
  252. package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
  253. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
  254. package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
  255. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +362 -233
  256. package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
  257. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
  258. package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
  259. package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
  260. package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
  261. package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
  262. package/src/sap/ui/mdc/ChartNew.js +0 -1114
  263. package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
  264. package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
  265. package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
  266. package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
  267. package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
  268. package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
  269. package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
  270. package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
  271. package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
  272. package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
  273. package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
  274. package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
  275. package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
  276. package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
  277. package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
  278. package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1171
  279. package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +0 -111
  280. package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +0 -322
  281. package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +0 -133
  282. package/src/sap/ui/mdc/p13n/panels/Wrapper.js +0 -203
@@ -91,7 +91,7 @@ sap.ui.define([
91
91
  * Creates the suitable controls for the given content type and mode and returns the control instances.
92
92
  * @param {sap.ui.mdc.field.content.DefaultContent} oContentType The content type object
93
93
  * @param {sap.ui.mdc.enum.ContentMode} sContentMode A given content mode
94
- * @param {String} sId ID of the {@link sap.ui.mdc.field.FieldBase}
94
+ * @param {string} sId ID of the {@link sap.ui.mdc.field.FieldBase}
95
95
  * @returns {sap.ui.core.Control[]} Array containing the created controls
96
96
  */
97
97
  ContentFactory.prototype.createContent = function(oContentType, sContentMode, sId) {
@@ -132,9 +132,9 @@ sap.ui.define([
132
132
  * Determines in which {@link sap.ui.mdc.enum.ContentMode} the given content type is displayed.
133
133
  * @param {sap.ui.mdc.field.content.DefaultContent} oContentType The content type object
134
134
  * @param {sap.ui.mdc.enum.EditMode} sEditMode The display mode of the {@link sap.ui.mdc.field.FieldBase}
135
- * @param {Integer} iMaxConditions Maximum number of conditions of the {@link sap.ui.mdc.field.FieldBase}
135
+ * @param {int} iMaxConditions Maximum number of conditions of the {@link sap.ui.mdc.field.FieldBase}
136
136
  * @param {boolean} bMultipleLines Determines if the content type has a multiple line input
137
- * @param {String[]} aOperators Names of the operators if the <code>EditOperator</code> content mode is used
137
+ * @param {string[]} aOperators Names of the operators if the <code>EditOperator</code> content mode is used
138
138
  * @returns {sap.ui.mdc.enum.ContentMode} sContentMode A given content mode
139
139
  */
140
140
  ContentFactory.prototype.getContentMode = function(oContentType, sEditMode, iMaxConditions, bMultipleLines, aOperators) {
@@ -163,7 +163,7 @@ sap.ui.define([
163
163
  /**
164
164
  * Determines which content type object to use.
165
165
  * @param {sap.ui.mdc.enum.BaseType} sBaseType Base type determined by {@link sap.ui.mdc.field.FieldBase}
166
- * @param {Integer} iMaxConditions Maximum number of conditions of the {@link sap.ui.mdc.field.FieldBase}
166
+ * @param {int} iMaxConditions Maximum number of conditions of the {@link sap.ui.mdc.field.FieldBase}
167
167
  * @param {boolean} bIsTriggerable Checks if the {@link sap.ui.mdc.field.FieldBase} is triggerable or not - needed for link content type
168
168
  * @returns {sap.ui.mdc.field.content.DefaultContent} oContentType Content type object
169
169
  */
@@ -242,7 +242,7 @@ sap.ui.define([
242
242
 
243
243
  /**
244
244
  * Defines to which property the field value is bound.
245
- * @param {String} sBoundProperty the name of the property.
245
+ * @param {string} sBoundProperty the name of the property.
246
246
  */
247
247
  ContentFactory.prototype.setBoundProperty = function(sBoundProperty) {
248
248
  this._sBoundProperty = sBoundProperty;
@@ -271,28 +271,36 @@ sap.ui.define([
271
271
  return this._bHideOperator;
272
272
  };
273
273
 
274
- ContentFactory.prototype.getConditionType = function(bSkipConditionTypeGeneration) {
275
- if (!bSkipConditionTypeGeneration && !this._oConditionType) {
276
- var oFormatOptions = this.getField()._getFormatOptions();
277
- this._oConditionType = new ConditionType(oFormatOptions);
278
- this._oConditionType._bCreatedByField = true;
274
+ function _getCondType(sCondType, CondType, fnGetFormatOptions, bSkipTypeGeneration) {
275
+
276
+ if (!bSkipTypeGeneration) {
277
+ if (this[sCondType] && this[sCondType].getMetadata().getName() !== CondType.getMetadata().getName()) {
278
+ // ConditionsType changed
279
+ this[sCondType].destroy();
280
+ this[sCondType] = undefined;
281
+ }
282
+
283
+ if (!this[sCondType]) {
284
+ var oFormatOptions = fnGetFormatOptions();
285
+ this[sCondType] = new CondType(oFormatOptions);
286
+ this[sCondType]._bCreatedByField = true;
287
+ }
279
288
  }
289
+ return this[sCondType];
290
+
291
+ }
280
292
 
281
- return this._oConditionType;
293
+ ContentFactory.prototype.getConditionType = function(bSkipConditionTypeGeneration) {
294
+ return _getCondType.call(this, "_oConditionType", ConditionType, this.getField()._getFormatOptions.bind(this.getField()), bSkipConditionTypeGeneration);
282
295
  };
283
296
 
284
297
  ContentFactory.prototype.setConditionType = function(oConditionType) {
285
298
  this._oConditionType = oConditionType;
286
299
  };
287
300
 
288
- ContentFactory.prototype.getConditionsType = function(bSkipConditionsTypeGeneration) {
289
- if (!bSkipConditionsTypeGeneration && !this._oConditionsType) {
290
- var oFormatOptions = this.getField()._getFormatOptions();
291
- this._oConditionsType = new ConditionsType(oFormatOptions);
292
- this._oConditionsType._bCreatedByField = true;
293
- }
294
-
295
- return this._oConditionsType;
301
+ ContentFactory.prototype.getConditionsType = function (bSkipConditionsTypeGeneration, CustomConditionsType) {
302
+ var UsedConditionType = CustomConditionsType || ConditionsType; // CustomConditionsType used for DynamicDateRange
303
+ return _getCondType.call(this, "_oConditionsType", UsedConditionType, this.getField()._getFormatOptions.bind(this.getField()), bSkipConditionsTypeGeneration);
296
304
  };
297
305
 
298
306
  ContentFactory.prototype.setConditionsType = function(oConditionsType) {
@@ -300,13 +308,7 @@ sap.ui.define([
300
308
  };
301
309
 
302
310
  ContentFactory.prototype.getUnitConditionsType = function(bSkipConditionsTypeGeneration) {
303
- if (!bSkipConditionsTypeGeneration && !this._oUnitConditionsType) {
304
- var oFormatOptions = this.getField()._getUnitFormatOptions();
305
- this._oUnitConditionsType = new ConditionsType(oFormatOptions);
306
- this._oUnitConditionsType._bCreatedByField = true;
307
- }
308
-
309
- return this._oUnitConditionsType;
311
+ return _getCondType.call(this, "_oUnitConditionsType", ConditionsType, this.getField()._getUnitFormatOptions.bind(this.getField()), bSkipConditionsTypeGeneration);
310
312
  };
311
313
 
312
314
  ContentFactory.prototype.getContentConditionTypes = function() {
@@ -7,11 +7,22 @@ sap.ui.define([
7
7
  "sap/ui/mdc/field/content/DefaultContent",
8
8
  "sap/ui/mdc/enum/BaseType",
9
9
  "sap/ui/mdc/util/DateUtil",
10
+ "sap/ui/mdc/condition/FilterOperatorUtil",
11
+ "sap/ui/mdc/condition/Operator",
10
12
  "sap/ui/core/library"
11
- ], function(DefaultContent, BaseType, DateUtil, coreLibrary) {
13
+ ], function(
14
+ DefaultContent,
15
+ BaseType,
16
+ DateUtil,
17
+ FilterOperatorUtil,
18
+ Operator,
19
+ coreLibrary) {
12
20
  "use strict";
13
21
 
14
22
  var CalendarType = coreLibrary.CalendarType;
23
+ var StandardDynamicDateRangeKeys;
24
+ var DynamicDateUtil;
25
+ var DynamicDateFormat;
15
26
 
16
27
  /**
17
28
  * Object-based definition of the date content type that is used in the {@link sap.ui.mdc.field.content.ContentFactory}.
@@ -29,14 +40,20 @@ sap.ui.define([
29
40
  getEditMultiLine: function() {
30
41
  return [null];
31
42
  },
43
+ getEdit: function() {
44
+ return ["sap/m/DynamicDateRange", "sap/ui/mdc/condition/OperatorDynamicDateOption", "sap/ui/mdc/field/DynamicDateRangeConditionsType", "sap/m/StandardDynamicDateRangeKeys", "sap/m/DynamicDateUtil", "sap/m/DynamicDateFormat"];
45
+ },
32
46
  getEditOperator: function() {
33
47
  return {
34
48
  "EQ": { name: "sap/m/DatePicker", create: this._createDatePickerControl }, // TODO: how to check custom operators
35
49
  "BT": { name: "sap/m/DateRangeSelection", create: this._createDateRangePickerControl }
36
50
  };
37
51
  },
52
+ getEditForHelp: function() {
53
+ return DefaultContent.getEdit.apply(this, arguments);
54
+ },
38
55
  getUseDefaultFieldHelp: function() {
39
- return { name: "defineConditions", oneOperatorSingle: false, oneOperatorMulti: true };
56
+ return { name: "defineConditions", oneOperatorSingle: false, oneOperatorMulti: true, single: false, multi: true };
40
57
  },
41
58
  createEditMultiLine: function() {
42
59
  throw new Error("sap.ui.mdc.field.content.DateContent - createEditMultiLine not defined!");
@@ -155,6 +172,115 @@ sap.ui.define([
155
172
  oContentFactory.setCalendarType(oFormatOptions.calendarType);
156
173
  }
157
174
  }
175
+ },
176
+ createEdit: function(oContentFactory, aControlClasses, sId) {
177
+
178
+ var DynamicDateRange = aControlClasses[0];
179
+ var OperatorDynamicDateOption = aControlClasses[1];
180
+ var DynamicDateRangeConditionsType = aControlClasses[2];
181
+
182
+ if (!StandardDynamicDateRangeKeys || !DynamicDateUtil || !DynamicDateFormat) {
183
+ StandardDynamicDateRangeKeys = aControlClasses[3];
184
+ DynamicDateUtil = aControlClasses[4];
185
+ DynamicDateFormat = aControlClasses[5];
186
+ }
187
+
188
+ var oConditionsType = oContentFactory.getConditionsType(false, DynamicDateRangeConditionsType);
189
+ var vOptions;
190
+ if (oContentFactory.getField().getMetadata().hasProperty("operators")) { // TODO: Field case needed?
191
+ var fnGetDateRangeOptions = function (aOperators) {
192
+ return this._getDateRangeOptions(aOperators, oContentFactory, OperatorDynamicDateOption);
193
+ }.bind(this);
194
+ vOptions = {path: "$field>/operators", formatter: fnGetDateRangeOptions};
195
+ } else {
196
+ vOptions = this._getDateRangeOptions(undefined, oContentFactory, OperatorDynamicDateOption);
197
+ }
198
+
199
+ var oDynamicDateRange = new DynamicDateRange(sId, {
200
+ value: { path: "$field>/conditions", type: oConditionsType },
201
+ formatter: this._getDateRangeFormatter(oContentFactory),
202
+ placeholder: "{$field>/placeholder}",
203
+ // textAlign: "{$field>/textAlign}", // this is currently not supported by the DynamicDateRange
204
+ // textDirection: "{$field>/textDirection}", // this is currently not supported by the DynamicDateRange
205
+ required: "{$field>/required}",
206
+ editable: { path: "$field>/editMode", formatter: oContentFactory.getMetadata()._oClass._getEditable },
207
+ enabled: { path: "$field>/editMode", formatter: oContentFactory.getMetadata()._oClass._getEnabled },
208
+ valueState: "{$field>/valueState}",
209
+ valueStateText: "{$field>/valueStateText}",
210
+ width: "100%",
211
+ tooltip: "{$field>/tooltip}",
212
+ // enableGroupHeaders: false, // disable the grouping of the options
213
+ options: vOptions,
214
+ change: oContentFactory.getHandleContentChange()
215
+ });
216
+
217
+ oContentFactory.setBoundProperty("value");
218
+ oContentFactory.setAriaLabelledBy(DynamicDateRange);
219
+
220
+ return [oDynamicDateRange];
221
+
222
+ },
223
+ createEditForHelp: function(oContentFactory, aControlClasses, sId) {
224
+ return DefaultContent.createEdit.apply(this, arguments);
225
+ },
226
+
227
+ _getDateRangeOptions: function(aOperators, oContentFactory, OperatorDynamicDateOption) {
228
+ if (!aOperators || aOperators.length === 0) {
229
+ aOperators = oContentFactory.getField()._getOperators(); // to use default operators if none given
230
+ }
231
+ var aOptions = [];
232
+
233
+ for (var i = 0; i < aOperators.length; i++) {
234
+ var sOperator = aOperators[i];
235
+ var sOption = this._getDateRangeOption(sOperator, oContentFactory, OperatorDynamicDateOption);
236
+ if (sOption) {
237
+ aOptions.push(sOption);
238
+ }
239
+ }
240
+
241
+ return aOptions;
242
+ },
243
+
244
+ _getDateRangeOption: function(sOperator, oContentFactory, OperatorDynamicDateOption) {
245
+ var oOperator = FilterOperatorUtil.getOperator(sOperator);
246
+ var sOption = oOperator.name;
247
+ if (!StandardDynamicDateRangeKeys[sOption]) {
248
+ sOption = oOperator.alias || sOption;
249
+ }
250
+
251
+ if (StandardDynamicDateRangeKeys[sOption]) {
252
+ return sOption; // use standard option
253
+ } else
254
+ // use OperatorDynamicDateOption
255
+ if (oOperator) {
256
+ if (!DynamicDateUtil.getOption(sOption)) {
257
+ var oType = oContentFactory.retrieveDataType(); // TODO: do we need to create data type right now?
258
+ var aValueTypes = [];
259
+
260
+ for (var j = 0; j < oOperator.valueTypes.length; j++) {
261
+ if (oOperator.valueTypes[j] && oOperator.valueTypes[j] !== Operator.ValueType.Static) {
262
+ aValueTypes.push("custom"); // provide value as it is to use type to format and parse // TODO: only if custom control?
263
+ }
264
+ }
265
+
266
+ DynamicDateUtil.addOption(new OperatorDynamicDateOption({key: sOption, operator: oOperator, type: oType, valueTypes: aValueTypes})); // TODO: use name as key?
267
+ }
268
+ return sOption;
269
+ }
270
+ },
271
+
272
+ _getDateRangeFormatter: function(oContentFactory) {
273
+ var oType = oContentFactory.retrieveDataType(); // TODO: do we need to create data type right now?
274
+ var oFormatOptions = oType.getFormatOptions();
275
+ var oDateRangeFormatOptions = {};
276
+
277
+ if (oFormatOptions.style) {
278
+ oDateRangeFormatOptions.date = {style: oFormatOptions.style};
279
+ } else if (oFormatOptions.pattern) {
280
+ oDateRangeFormatOptions.date = {pattern: oFormatOptions.pattern};
281
+ }
282
+
283
+ return DynamicDateFormat.getInstance(oDateRangeFormatOptions);
158
284
  }
159
285
  });
160
286
 
@@ -4,8 +4,9 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
+ "sap/ui/mdc/field/content/DefaultContent",
7
8
  "sap/ui/mdc/field/content/DateContent"
8
- ], function(DateContent) {
9
+ ], function(DefaultContent, DateContent) {
9
10
  "use strict";
10
11
 
11
12
  /**
@@ -26,9 +27,16 @@ sap.ui.define([
26
27
  "EQ": { name: "sap/m/DateTimePicker", create: this._createDatePickerControl } // as same API as DatePicker
27
28
  };
28
29
  },
30
+ getEdit: function() {
31
+ return DefaultContent.getEdit.apply(this, arguments);
32
+ },
29
33
  createEditMultiLine: function() {
30
34
  throw new Error("sap.ui.mdc.field.content.DateTimeContent - createEditMultiLine not defined!");
35
+ },
36
+ createEdit: function(oContentFactory, aControlClasses, sId) {
37
+ return DefaultContent.createEdit.apply(this, arguments);
31
38
  }
39
+
32
40
  });
33
41
 
34
42
  return DateTimeContent;
@@ -13,6 +13,7 @@ sap.ui.define([
13
13
  "use strict";
14
14
 
15
15
  var EmptyIndicatorMode = mLibrary.EmptyIndicatorMode;
16
+ var TokenizerRenderMode = mLibrary.TokenizerRenderMode;
16
17
 
17
18
  /**
18
19
  * Object-based definition of the default content type that is used in the {@link sap.ui.mdc.field.content.ContentFactory}.
@@ -31,7 +32,7 @@ sap.ui.define([
31
32
  return ["sap/m/Text"];
32
33
  },
33
34
  getDisplayMultiValue: function() {
34
- return this.getDisplayMultiLine();
35
+ return ["sap/ui/mdc/field/TokenizerDisplay", "sap/ui/mdc/field/TokenDisplay"];
35
36
  },
36
37
  getDisplayMultiLine: function() {
37
38
  return ["sap/m/ExpandableText"];
@@ -55,13 +56,13 @@ sap.ui.define([
55
56
  return true;
56
57
  },
57
58
  getUseDefaultFieldHelp: function() {
58
- return { name: "defineConditions", oneOperatorSingle: false, oneOperatorMulti: false };
59
+ return { name: "defineConditions", oneOperatorSingle: false, oneOperatorMulti: false, single: true, multi: true };
59
60
  },
60
61
  /**
61
62
  * Determines which controls to return for a given {@link sap.ui.mdc.enum.ContentMode}.
62
63
  * @param {sap.ui.mdc.enum.ContentMode} sContentMode The given content mode
63
- * @param {String} sOperator Name of the operator if the <code>EditOperator</code> content mode is used
64
- * @returns {String[]} aControlNames Names of the determined controls
64
+ * @param {string} sOperator Name of the operator if the <code>EditOperator</code> content mode is used
65
+ * @returns {string[]} aControlNames Names of the determined controls
65
66
  */
66
67
  getControlNames: function(sContentMode, sOperator) {
67
68
  var aControlNames;
@@ -103,9 +104,9 @@ sap.ui.define([
103
104
  * Creates the suitable controls for the given content mode and returns the control instances.
104
105
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls this function
105
106
  * @param {sap.ui.mdc.enum.ContentMode} sContentMode a given content mode
106
- * @param {String} sOperator Name of the operator if the <code>EditOperator</code> content mode is used
107
+ * @param {string} sOperator Name of the operator if the <code>EditOperator</code> content mode is used
107
108
  * @param {Object[]} aControls Array containing the control classes that are to be created
108
- * @param {String} sId ID of the {@link sap.ui.mdc.field.FieldBase}
109
+ * @param {string} sId ID of the {@link sap.ui.mdc.field.FieldBase}
109
110
  * @returns {sap.ui.core.Control[]} Array containing the created controls
110
111
  */
111
112
  create: function(oContentFactory, sContentMode, sOperator, aControls, sId) {
@@ -135,7 +136,7 @@ sap.ui.define([
135
136
  * Creates the suitable controls for content mode <code>Edit</code>.
136
137
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
137
138
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
138
- * @param {String} sId ID of the field control
139
+ * @param {string} sId ID of the field control
139
140
  * @returns {sap.ui.core.Control[]} Array containing the created controls
140
141
  */
141
142
  createEdit: function(oContentFactory, aControlClasses, sId) {
@@ -172,7 +173,7 @@ sap.ui.define([
172
173
  * Creates the suitable controls for content mode <code>EditMultiValue</code>.
173
174
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
174
175
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
175
- * @param {String} sId ID of the field control
176
+ * @param {string} sId ID of the field control
176
177
  * @returns {sap.ui.core.Control[]} Array containing the created controls
177
178
  */
178
179
  createEditMultiValue: function(oContentFactory, aControlClasses, sId) {
@@ -219,7 +220,7 @@ sap.ui.define([
219
220
  * Creates the suitable controls for content mode <code>EditMultiLine</code>.
220
221
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
221
222
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
222
- * @param {String} sId ID of the field control
223
+ * @param {string} sId ID of the field control
223
224
  * @returns {sap.ui.core.Control[]} Array containing the created controls
224
225
  */
225
226
  createEditMultiLine: function(oContentFactory, aControlClasses, sId) {
@@ -252,7 +253,7 @@ sap.ui.define([
252
253
  * Creates the suitable controls for content mode <code>Display</code>.
253
254
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
254
255
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
255
- * @param {String} sId ID of the field control
256
+ * @param {string} sId ID of the field control
256
257
  * @returns {sap.ui.core.Control[]} Array containing the created controls
257
258
  */
258
259
  createDisplay: function(oContentFactory, aControlClasses, sId) {
@@ -275,7 +276,7 @@ sap.ui.define([
275
276
  * Creates the suitable controls for content mode <code>DisplayMultiLine</code>.
276
277
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
277
278
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
278
- * @param {String} sId ID of the field control
279
+ * @param {string} sId ID of the field control
279
280
  * @returns {sap.ui.core.Control[]} Array containing the created controls
280
281
  * @since 1.91
281
282
  */
@@ -297,18 +298,39 @@ sap.ui.define([
297
298
  * Creates the suitable controls for content mode <code>DisplayMultiValue</code>.
298
299
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
299
300
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
300
- * @param {String} sId ID of the field control
301
+ * @param {string} sId ID of the field control
301
302
  * @returns {sap.ui.core.Control[]} Array containing the created controls
302
303
  * @since 1.96
303
304
  */
304
305
  createDisplayMultiValue: function(oContentFactory, aControlClasses, sId) {
305
- return this.createDisplayMultiLine(oContentFactory, aControlClasses, sId); // for now just return the same asl in MultiLine mode
306
+ var Tokenizer = aControlClasses[0];
307
+ var Token = aControlClasses[1];
308
+ var oConditionType = oContentFactory.getConditionType();
309
+ var oToken = new Token(sId + "-token", {
310
+ text: {
311
+ path: '$field>',
312
+ type: oConditionType
313
+ }
314
+ });
315
+
316
+ var oTokenizer = new Tokenizer(sId, {
317
+ editable: false,
318
+ // textAlign: "{$field>/textAlign}",
319
+ emptyIndicatorMode: EmptyIndicatorMode.Auto,
320
+ renderMode: TokenizerRenderMode.Narrow,
321
+ width: "100%",
322
+ tooltip: "{$field>/tooltip}",
323
+ tokens: { path: "$field>/conditions", template: oToken },
324
+ dependents: [oToken] // to destroy it if Control is destroyed
325
+ });
326
+
327
+ return [oTokenizer];
306
328
  },
307
329
  /**
308
330
  * Creates the suitable controls for content mode <code>EditForHelp</code>.
309
331
  * @param {sap.ui.mdc.field.content.ContentFactory} oContentFactory The content factory that calls the create function
310
332
  * @param {Object[]} aControlClasses Array containing the control classes which are to be created
311
- * @param {String} sId ID of the field control
333
+ * @param {string} sId ID of the field control
312
334
  * @returns {sap.ui.core.Control[]} Array containing the created controls
313
335
  * @since 1.96
314
336
  */
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  textDirection: "{$field>/textDirection}",
44
44
  tooltip: "{$field>/tooltip}",
45
45
  press: oContentFactory.getHandleContentPress(),
46
- wrapping: true
46
+ wrapping: "{$field>/multipleLines}"
47
47
  });
48
48
  var oFieldInfo = oContentFactory.getField().getFieldInfo();
49
49
  if (oFieldInfo) {
@@ -4,8 +4,9 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
+ "sap/ui/mdc/field/content/DefaultContent",
7
8
  "sap/ui/mdc/field/content/DateContent"
8
- ], function(DateContent) {
9
+ ], function(DefaultContent, DateContent) {
9
10
  "use strict";
10
11
 
11
12
  /**
@@ -26,8 +27,14 @@ sap.ui.define([
26
27
  "EQ": { name: "sap/m/TimePicker", create: this._createDatePickerControl } // as same API as DatePicker
27
28
  };
28
29
  },
30
+ getEdit: function() {
31
+ return DefaultContent.getEdit.apply(this, arguments);
32
+ },
29
33
  createEditMultiLine: function() {
30
34
  throw new Error("sap.ui.mdc.field.content.TimeContent - createEditMultiLine not defined!");
35
+ },
36
+ createEdit: function(oContentFactory, aControlClasses, sId) {
37
+ return DefaultContent.createEdit.apply(this, arguments);
31
38
  }
32
39
  });
33
40
 
@@ -26,8 +26,11 @@ sap.ui.define([
26
26
  * @MDC_PUBLIC_CANDIDATE
27
27
  */
28
28
  var UnitContent = Object.assign({}, DefaultContent, {
29
+ getEdit: function() {
30
+ return ["sap/ui/mdc/field/FieldInput", "sap/ui/core/InvisibleText"];
31
+ },
29
32
  getEditMultiValue: function() {
30
- return ["sap/ui/mdc/field/FieldMultiInput", "sap/ui/mdc/field/FieldInput", "sap/m/Token"];
33
+ return ["sap/ui/mdc/field/FieldMultiInput", "sap/ui/mdc/field/FieldInput", "sap/m/Token", "sap/ui/core/InvisibleText"];
31
34
  },
32
35
  getEditMultiLine: function() {
33
36
  return [null];
@@ -38,9 +41,11 @@ sap.ui.define([
38
41
  createEdit: function(oContentFactory, aControlClasses, sId) {
39
42
  oContentFactory.setIsMeasure(true); // FieldHelp only on unit field
40
43
  var Input = aControlClasses[0];
44
+ var InvisibleText = aControlClasses[1];
41
45
  var oConditionsType = oContentFactory.getConditionsType();
42
46
  this._adjustDataTypeForUnit(oContentFactory);
43
47
 
48
+ var sInvisibleTextId = InvisibleText.getStaticId("sap.ui.mdc", "field.NUMBER");
44
49
  var aControls = [];
45
50
  var oInput1 = new Input(sId, {
46
51
  value: { path: "$field>/conditions", type: oConditionsType },
@@ -58,13 +63,14 @@ sap.ui.define([
58
63
  tooltip: "{$field>/tooltip}",
59
64
  autocomplete: false,
60
65
  fieldGroupIds: [oContentFactory.getField().getId()], // use FieldGroup to fire change only if focus leaved complete Field
66
+ ariaDescribedBy: [sInvisibleTextId],
61
67
  change: oContentFactory.getHandleContentChange(),
62
68
  liveChange: oContentFactory.getHandleContentLiveChange()
63
69
  });
64
70
  oInput1._setPreferUserInteraction(true);
65
71
  oContentFactory.setAriaLabelledBy(oInput1);
66
72
  aControls.push(oInput1);
67
- aControls = this._addUnitControl(oContentFactory, aControls, sId, Input);
73
+ aControls = this._addUnitControl(oContentFactory, aControls, sId, Input, InvisibleText);
68
74
 
69
75
  oContentFactory.setBoundProperty("value");
70
76
 
@@ -75,6 +81,7 @@ sap.ui.define([
75
81
  var MultiInput = aControlClasses[0];
76
82
  var Token = aControlClasses[2]; // is loaded by MultiInput
77
83
  var Input = aControlClasses[1];
84
+ var InvisibleText = aControlClasses[3];
78
85
  var oConditionType = oContentFactory.getConditionType();
79
86
  this._adjustDataTypeForUnit(oContentFactory);
80
87
 
@@ -98,6 +105,7 @@ sap.ui.define([
98
105
  }
99
106
  });
100
107
 
108
+ var sInvisibleTextId = InvisibleText.getStaticId("sap.ui.mdc", "field.NUMBER");
101
109
  var oMultiInput = new MultiInput(sId, {
102
110
  placeholder: "{$field>/placeholder}",
103
111
  textAlign: "{$field>/textAlign}",
@@ -111,6 +119,7 @@ sap.ui.define([
111
119
  width: "70%",
112
120
  tooltip: "{$field>/tooltip}",
113
121
  fieldGroupIds: [oContentFactory.getField().getId()], // use FieldGroup to fire change only if focus leaved complete Field
122
+ ariaDescribedBy: [sInvisibleTextId],
114
123
  tokens: { path: "$field>/conditions", template: oToken, filters: [oFilter] },
115
124
  dependents: [oToken], // to destroy it if MultiInput is destroyed
116
125
  change: oContentFactory.getHandleContentChange(),
@@ -120,7 +129,7 @@ sap.ui.define([
120
129
  oMultiInput._setPreferUserInteraction(true);
121
130
  oContentFactory.setAriaLabelledBy(oMultiInput);
122
131
  aControls.push(oMultiInput);
123
- aControls = this._addUnitControl(oContentFactory, aControls, sId, Input);
132
+ aControls = this._addUnitControl(oContentFactory, aControls, sId, Input, InvisibleText);
124
133
 
125
134
  oContentFactory.setBoundProperty("value");
126
135
 
@@ -129,7 +138,7 @@ sap.ui.define([
129
138
  createEditMultiLine: function() {
130
139
  throw new Error("sap.ui.mdc.field.content.UnitContent - createEditMultiLine not defined!");
131
140
  },
132
- _addUnitControl: function(oContentFactory, aControls, sId, Input) {
141
+ _addUnitControl: function(oContentFactory, aControls, sId, Input, InvisibleText) {
133
142
  var oUnitConditionsType = oContentFactory.getUnitConditionsType();
134
143
 
135
144
  if (oContentFactory.getField().getEditMode() === EditMode.EditableDisplay) {
@@ -137,6 +146,15 @@ sap.ui.define([
137
146
  aControls[0].setWidth("100%");
138
147
  aControls[0].setFieldWidth("70%");
139
148
  } else {
149
+ var sInvisibleTextId;
150
+ var oType = oContentFactory.getUnitOriginalType();
151
+ var sName = oType && oType.getMetadata().getName();
152
+ if (sName && sName.indexOf("Currency") >= 0) { // TODO: better solution
153
+ sInvisibleTextId = InvisibleText.getStaticId("sap.ui.mdc", "field.CURRENCY");
154
+ } else {
155
+ sInvisibleTextId = InvisibleText.getStaticId("sap.ui.mdc", "field.UNIT");
156
+ }
157
+
140
158
  var oInput = new Input(sId + "-unit", {
141
159
  value: { path: "$field>/conditions", type: oUnitConditionsType },
142
160
  placeholder: "{$field>/placeholder}",
@@ -154,6 +172,7 @@ sap.ui.define([
154
172
  tooltip: "{$field>/tooltip}",
155
173
  autocomplete: false,
156
174
  fieldGroupIds: [oContentFactory.getField().getId()], // use FieldGroup to fire change only if focus leaved complete Field
175
+ ariaDescribedBy: [sInvisibleTextId],
157
176
  change: oContentFactory.getHandleContentChange(),
158
177
  liveChange: oContentFactory.getHandleContentLiveChange(),
159
178
  valueHelpRequest: oContentFactory.getHandleValueHelpRequest()