@openui5/sap.ui.mdc 1.99.1 → 1.102.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 (257) hide show
  1. package/.eslintrc.json +19 -0
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +4 -4
  4. package/src/sap/ui/mdc/.library +1 -1
  5. package/src/sap/ui/mdc/ActionToolbar.js +1 -1
  6. package/src/sap/ui/mdc/Chart.js +77 -77
  7. package/src/sap/ui/mdc/ChartDelegate.js +76 -21
  8. package/src/sap/ui/mdc/ChartRenderer.js +1 -1
  9. package/src/sap/ui/mdc/Control.js +11 -6
  10. package/src/sap/ui/mdc/Element.js +10 -6
  11. package/src/sap/ui/mdc/Field.js +26 -4
  12. package/src/sap/ui/mdc/FilterBar.js +1 -1
  13. package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
  14. package/src/sap/ui/mdc/FilterField.js +41 -3
  15. package/src/sap/ui/mdc/Link.js +3 -3
  16. package/src/sap/ui/mdc/LinkDelegate.js +7 -5
  17. package/src/sap/ui/mdc/MultiValueField.js +11 -1
  18. package/src/sap/ui/mdc/Table.js +340 -417
  19. package/src/sap/ui/mdc/TableDelegate.js +115 -35
  20. package/src/sap/ui/mdc/ValueHelp.js +150 -632
  21. package/src/sap/ui/mdc/ValueHelpDelegate.js +161 -8
  22. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
  23. package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
  24. package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
  25. package/src/sap/ui/mdc/chart/ChartToolbar.js +18 -6
  26. package/src/sap/ui/mdc/chart/ChartTypeButton.js +11 -2
  27. package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -7
  28. package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
  29. package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
  30. package/src/sap/ui/mdc/condition/Condition.js +14 -9
  31. package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
  32. package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
  33. package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
  34. package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +146 -34
  35. package/src/sap/ui/mdc/condition/Operator.js +98 -16
  36. package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +80 -24
  37. package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
  38. package/src/sap/ui/mdc/designtime/Util.js +63 -0
  39. package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
  40. package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +16 -1
  41. package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
  42. package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
  43. package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
  44. package/src/sap/ui/mdc/enum/PropagationReason.js +43 -0
  45. package/src/sap/ui/mdc/enum/SelectType.js +3 -0
  46. package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
  47. package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
  48. package/src/sap/ui/mdc/field/ConditionType.js +70 -22
  49. package/src/sap/ui/mdc/field/ConditionsType.js +8 -2
  50. package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
  51. package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
  52. package/src/sap/ui/mdc/field/DefineConditionPanel.js +30 -23
  53. package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
  54. package/src/sap/ui/mdc/field/FieldBase.js +84 -17
  55. package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
  56. package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
  57. package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -1
  58. package/src/sap/ui/mdc/field/FieldInput.js +1 -1
  59. package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
  60. package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
  61. package/src/sap/ui/mdc/field/FieldValueHelp.js +9 -4
  62. package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
  63. package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
  64. package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +7 -4
  65. package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +11 -3
  66. package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -3
  67. package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +31 -32
  68. package/src/sap/ui/mdc/field/InParameter.js +1 -1
  69. package/src/sap/ui/mdc/field/ListFieldHelp.js +1 -1
  70. package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
  71. package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
  72. package/src/sap/ui/mdc/field/OutParameter.js +1 -1
  73. package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
  74. package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
  75. package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
  76. package/src/sap/ui/mdc/field/content/ContentFactory.js +13 -1
  77. package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
  78. package/src/sap/ui/mdc/field/content/DateTimeContent.js +42 -7
  79. package/src/sap/ui/mdc/filterbar/FilterBarBase.js +128 -239
  80. package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
  81. package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
  82. package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
  83. package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
  84. package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +164 -64
  85. package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
  86. package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
  87. package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
  88. package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +73 -23
  89. package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
  90. package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
  91. package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +4 -41
  92. package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
  93. package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
  94. package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
  95. package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
  96. package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
  97. package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
  98. package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
  99. package/src/sap/ui/mdc/library.js +30 -27
  100. package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
  101. package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
  102. package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
  103. package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
  104. package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
  105. package/src/sap/ui/mdc/link/ContactDetailsRenderer.js +26 -0
  106. package/src/sap/ui/mdc/link/Factory.js +1 -1
  107. package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
  108. package/src/sap/ui/mdc/link/LinkItem.js +1 -1
  109. package/src/sap/ui/mdc/link/Panel.js +197 -22
  110. package/src/sap/ui/mdc/link/PanelItem.js +1 -1
  111. package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
  112. package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
  113. package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
  114. package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
  115. package/src/sap/ui/mdc/messagebundle.properties +11 -6
  116. package/src/sap/ui/mdc/messagebundle_ar.properties +9 -7
  117. package/src/sap/ui/mdc/messagebundle_bg.properties +7 -5
  118. package/src/sap/ui/mdc/messagebundle_ca.properties +7 -5
  119. package/src/sap/ui/mdc/messagebundle_cs.properties +7 -5
  120. package/src/sap/ui/mdc/messagebundle_cy.properties +7 -5
  121. package/src/sap/ui/mdc/messagebundle_da.properties +7 -5
  122. package/src/sap/ui/mdc/messagebundle_de.properties +7 -5
  123. package/src/sap/ui/mdc/messagebundle_el.properties +6 -4
  124. package/src/sap/ui/mdc/messagebundle_en.properties +7 -5
  125. package/src/sap/ui/mdc/messagebundle_en_GB.properties +7 -5
  126. package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -5
  127. package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +7 -5
  128. package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -5
  129. package/src/sap/ui/mdc/messagebundle_es.properties +7 -5
  130. package/src/sap/ui/mdc/messagebundle_es_MX.properties +7 -5
  131. package/src/sap/ui/mdc/messagebundle_et.properties +7 -5
  132. package/src/sap/ui/mdc/messagebundle_fi.properties +7 -5
  133. package/src/sap/ui/mdc/messagebundle_fr.properties +7 -5
  134. package/src/sap/ui/mdc/messagebundle_fr_CA.properties +7 -5
  135. package/src/sap/ui/mdc/messagebundle_hi.properties +7 -5
  136. package/src/sap/ui/mdc/messagebundle_hr.properties +7 -5
  137. package/src/sap/ui/mdc/messagebundle_hu.properties +7 -5
  138. package/src/sap/ui/mdc/messagebundle_id.properties +7 -5
  139. package/src/sap/ui/mdc/messagebundle_it.properties +7 -5
  140. package/src/sap/ui/mdc/messagebundle_iw.properties +6 -4
  141. package/src/sap/ui/mdc/messagebundle_ja.properties +8 -6
  142. package/src/sap/ui/mdc/messagebundle_kk.properties +7 -5
  143. package/src/sap/ui/mdc/messagebundle_ko.properties +6 -4
  144. package/src/sap/ui/mdc/messagebundle_lt.properties +7 -5
  145. package/src/sap/ui/mdc/messagebundle_lv.properties +7 -5
  146. package/src/sap/ui/mdc/messagebundle_ms.properties +7 -5
  147. package/src/sap/ui/mdc/messagebundle_nl.properties +7 -5
  148. package/src/sap/ui/mdc/messagebundle_no.properties +7 -5
  149. package/src/sap/ui/mdc/messagebundle_pl.properties +7 -5
  150. package/src/sap/ui/mdc/messagebundle_pt.properties +13 -11
  151. package/src/sap/ui/mdc/messagebundle_pt_PT.properties +7 -5
  152. package/src/sap/ui/mdc/messagebundle_ro.properties +7 -5
  153. package/src/sap/ui/mdc/messagebundle_ru.properties +7 -5
  154. package/src/sap/ui/mdc/messagebundle_sh.properties +10 -8
  155. package/src/sap/ui/mdc/messagebundle_sk.properties +7 -5
  156. package/src/sap/ui/mdc/messagebundle_sl.properties +8 -6
  157. package/src/sap/ui/mdc/messagebundle_sv.properties +8 -6
  158. package/src/sap/ui/mdc/messagebundle_th.properties +7 -5
  159. package/src/sap/ui/mdc/messagebundle_tr.properties +10 -8
  160. package/src/sap/ui/mdc/messagebundle_uk.properties +7 -5
  161. package/src/sap/ui/mdc/messagebundle_vi.properties +7 -5
  162. package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -5
  163. package/src/sap/ui/mdc/messagebundle_zh_TW.properties +7 -5
  164. package/src/sap/ui/mdc/mixin/AdaptationMixin.js +23 -29
  165. package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
  166. package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
  167. package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
  168. package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +354 -0
  169. package/src/sap/ui/mdc/odata/TypeUtil.js +2 -1
  170. package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
  171. package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
  172. package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
  173. package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
  174. package/src/sap/ui/mdc/odata/v4/TableDelegate.js +29 -66
  175. package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
  176. package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
  177. package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +353 -262
  178. package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
  179. package/src/sap/ui/mdc/p13n/Engine.js +172 -69
  180. package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
  181. package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
  182. package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
  183. package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
  184. package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
  185. package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +15 -12
  186. package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
  187. package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
  188. package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
  189. package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +75 -15
  190. package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +160 -0
  191. package/src/sap/ui/mdc/p13n/panels/GroupView.js +54 -28
  192. package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
  193. package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
  194. package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
  195. package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +2 -2
  196. package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
  197. package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
  198. package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
  199. package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +32 -10
  200. package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
  201. package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
  202. package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
  203. package/src/sap/ui/mdc/table/Column.js +271 -132
  204. package/src/sap/ui/mdc/table/CreationRow.js +1 -1
  205. package/src/sap/ui/mdc/table/GridTableType.js +70 -27
  206. package/src/sap/ui/mdc/table/PropertyHelper.js +92 -163
  207. package/src/sap/ui/mdc/table/ResponsiveTableType.js +133 -40
  208. package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
  209. package/src/sap/ui/mdc/table/RowSettings.js +42 -1
  210. package/src/sap/ui/mdc/table/TableSettings.js +10 -22
  211. package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
  212. package/src/sap/ui/mdc/table/menu/Item.js +78 -0
  213. package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
  214. package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
  215. package/src/sap/ui/mdc/themes/base/Chart.less +11 -0
  216. package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
  217. package/src/sap/ui/mdc/ui/Container.js +0 -240
  218. package/src/sap/ui/mdc/util/DateUtil.js +56 -6
  219. package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
  220. package/src/sap/ui/mdc/util/IdentifierUtil.js +3 -3
  221. package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
  222. package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
  223. package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
  224. package/src/sap/ui/mdc/valuehelp/Dialog.js +291 -66
  225. package/src/sap/ui/mdc/valuehelp/Popover.js +8 -5
  226. package/src/sap/ui/mdc/valuehelp/base/Container.js +71 -52
  227. package/src/sap/ui/mdc/valuehelp/base/Content.js +57 -24
  228. package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
  229. package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +196 -283
  230. package/src/sap/ui/mdc/valuehelp/base/ListContent.js +6 -6
  231. package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
  232. package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
  233. package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
  234. package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +66 -66
  235. package/src/sap/ui/mdc/valuehelp/content/MTable.js +100 -185
  236. package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +48 -2
  237. package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
  238. package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
  239. package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +55 -4
  240. package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +2 -3
  241. package/test/sap/ui/mdc/testutils/opa/link/Actions.js +53 -12
  242. package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +6 -6
  243. package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +111 -128
  244. package/test/sap/ui/mdc/testutils/opa/p13n/waitForSelectWithSelectedTextOnPanel.js +5 -2
  245. package/test/sap/ui/mdc/testutils/opa/table/Actions.js +70 -0
  246. package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +9 -7
  247. package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +2 -2
  248. package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
  249. package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
  250. package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
  251. package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
  252. package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
  253. package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
  254. package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
  255. package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
  256. package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
  257. package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
@@ -11,15 +11,6 @@ sap.ui.define(
11
11
  function (Engine) {
12
12
  "use strict";
13
13
 
14
- /**
15
- * @namespace
16
- * @name sap.ui.mdc.mixin
17
- * @private
18
- * @since 1.82.0
19
- * @experimental As of version 1.82.0
20
- * @ui5-restricted sap.ui.mdc
21
- */
22
-
23
14
  /**
24
15
  * Enhances a given control prototype with consolidated handling for adaptation.
25
16
  *
@@ -41,7 +32,7 @@ sap.ui.define(
41
32
  *
42
33
  *
43
34
  * @author SAP SE
44
- * @version 1.99.1
35
+ * @version 1.102.0
45
36
  * @alias sap.ui.mdc.mixin.AdaptationMixin
46
37
  * @namespace
47
38
  * @since 1.82.0
@@ -56,27 +47,19 @@ sap.ui.define(
56
47
  };
57
48
 
58
49
  /**
59
- * Hook which is executed after a chain of changes has been processed by a changehandler.
60
- * <b>Note</b>: This hook will be executed whenever a change is applied or reverted, e.g:
61
- * <ul>
62
- * <li><code>variant appliance</code></li>
63
- * <li><code>enduser personalization</code></li>
64
- * <li><code>reset triggered</code></li>
65
- * </ul>
66
- *
67
- */
50
+ * Hook which is executed after a chain of changes has been processed by a changehandler.
51
+ * <b>Note</b>: This hook will be executed whenever a change is applied or reverted, e.g:
52
+ * <ul>
53
+ * <li><code>variant appliance</code></li>
54
+ * <li><code>enduser personalization</code></li>
55
+ * <li><code>reset triggered</code></li>
56
+ * </ul>
57
+ *
58
+ */
68
59
  AdaptationMixin._onModifications = function() {
69
60
  //
70
61
  };
71
62
 
72
- /**
73
- * Hook which is executed whenever a set of enduser changes being processed during runtime.
74
- *
75
- */
76
- AdaptationMixin._onChangeAppliance = function() {
77
- //
78
- };
79
-
80
63
  /**
81
64
  * Initializes the <code>AdaptationFilterBar</code> used for inbuilt filtering.
82
65
  *
@@ -125,7 +108,9 @@ sap.ui.define(
125
108
  * @returns {object} The value returned by {@link sap.ui.mdc.AggregationBaseDelegate#validateState validateState}
126
109
  */
127
110
  AdaptationMixin.validateState = function(oTheoreticalState, sKey) {
128
- return this.getControlDelegate().validateState(this, oTheoreticalState, sKey);
111
+ if (this.getControlDelegate().validateState instanceof Function) {
112
+ return this.getControlDelegate().validateState(this, oTheoreticalState, sKey);
113
+ }
129
114
  };
130
115
 
131
116
  AdaptationMixin.getInbuiltFilter = function() {
@@ -156,12 +141,21 @@ sap.ui.define(
156
141
  };
157
142
  };
158
143
 
144
+ // Needed for unit testing as flex is not available
145
+ AdaptationMixin._getWaitForChangesPromise = function() {
146
+ var oEngine = this.getEngine && this.getEngine();
147
+ if (!oEngine) {
148
+ throw "Engine instance not found.";
149
+ }
150
+ return oEngine.waitForChanges(this);
151
+ };
152
+
159
153
  return function () {
160
154
  this.retrieveInbuiltFilter = AdaptationMixin.retrieveInbuiltFilter;
161
155
  this.getInbuiltFilter = AdaptationMixin.getInbuiltFilter;
162
156
  this.validateState = AdaptationMixin.validateState;
163
157
  this._onModifications = AdaptationMixin._onModifications;
164
- this._onChangeAppliance = AdaptationMixin._onChangeAppliance;
158
+ this._getWaitForChangesPromise = AdaptationMixin._getWaitForChangesPromise;
165
159
  this.getEngine = AdaptationMixin.getEngine;
166
160
  this.exit = AdaptationMixin.exit(this.exit);
167
161
  };
@@ -28,14 +28,6 @@ sap.ui.define(["sap/ui/mdc/util/loadModules", "sap/base/Log"], function (loadMod
28
28
  delete this.fnRejectDelegate;
29
29
  };
30
30
 
31
- /**
32
- * @namespace
33
- * @name sap.ui.mdc.mixin
34
- * @private
35
- * @experimental As of version 1.82.0
36
- * @ui5-restricted sap.ui.mdc
37
- */
38
-
39
31
  /**
40
32
  * Enhances a given control prototype with consolidated asynchronous handling for delegate modules and their initialization.
41
33
  *
@@ -69,7 +61,7 @@ sap.ui.define(["sap/ui/mdc/util/loadModules", "sap/base/Log"], function (loadMod
69
61
  * </ul>
70
62
  *
71
63
  * @author SAP SE
72
- * @version 1.99.1
64
+ * @version 1.102.0
73
65
  * @alias sap.ui.mdc.mixin.DelegateMixin
74
66
  * @namespace
75
67
  * @since 1.76.0
@@ -90,13 +82,6 @@ sap.ui.define(["sap/ui/mdc/util/loadModules", "sap/base/Log"], function (loadMod
90
82
  this.fnRejectDelegate = reject;
91
83
  }.bind(this));
92
84
 
93
- this._oPropertyHelper = null;
94
- this._bPropertyHelperIsBeingInitialized = false;
95
- this._pInitPropertyHelper = new Promise(function(resolve, reject) {
96
- this._fnResolveInitPropertyHelper = resolve;
97
- this._fnRejectInitPropertyHelper = reject;
98
- }.bind(this));
99
-
100
85
  if (fnInit) {
101
86
  fnInit.apply(this, arguments);
102
87
  }
@@ -208,119 +193,6 @@ sap.ui.define(["sap/ui/mdc/util/loadModules", "sap/base/Log"], function (loadMod
208
193
  return this._oDelegateInitialized;
209
194
  };
210
195
 
211
- /**
212
- * Loads and initializes the property helper related to the enhanced control.
213
- *
214
- * @protected
215
- * @param {sap.ui.mdc.util.PropertyHelper} [CustomPropertyHelper] Custom property helper class
216
- * @returns {Promise<sap.ui.mdc.util.PropertyHelper>} Returns a <code>Promise</code> that resolves with the property helper
217
- */
218
- DelegateMixin.initPropertyHelper = function(CustomPropertyHelper) {
219
- if (CustomPropertyHelper && (!CustomPropertyHelper.getMetadata || !CustomPropertyHelper.getMetadata().isA("sap.ui.mdc.util.PropertyHelper"))) {
220
- throw new Error("The custom property helper class must be sap.ui.mdc.util.PropertyHelper or a subclass of it.");
221
- }
222
-
223
- if (!this.bIsDestroyed && !this._oPropertyHelper && !this._bPropertyHelperIsBeingInitialized) {
224
- this._bPropertyHelperIsBeingInitialized = true;
225
- this.awaitControlDelegate().then(function(oDelegate) {
226
- if (this.bIsDestroyed) {
227
- return null;
228
- }
229
- return initPropertyHelper(this, oDelegate, CustomPropertyHelper);
230
- }.bind(this)).catch(function(oError) {
231
- this._fnRejectInitPropertyHelper(oError);
232
- }.bind(this));
233
- }
234
-
235
- return this._pInitPropertyHelper;
236
- };
237
-
238
- function initPropertyHelper(oControl, oDelegate, CustomPropertyHelper) {
239
- return Promise.all([
240
- oDelegate.fetchProperties(oControl)
241
- ]).then(function(aResult) {
242
- if (oControl.bIsDestroyed) {
243
- return [];
244
- }
245
-
246
- if (typeof oDelegate.fetchPropertyExtensions === "function") {
247
- return oDelegate.fetchPropertyExtensions(oControl, aResult[0]).then(function(mExtensions) {
248
- return aResult.concat(mExtensions);
249
- });
250
- }
251
-
252
- return aResult.concat(undefined);
253
- }).then(function(aResult) {
254
- if (oControl.bIsDestroyed) {
255
- return [];
256
- }
257
-
258
- return fetchPropertyHelper(oControl, oDelegate, CustomPropertyHelper, aResult[0], aResult[1]).then(function(PropertyHelper) {
259
- return aResult.concat(PropertyHelper);
260
- });
261
- }).then(function(aResult) {
262
- if (oControl.bIsDestroyed) {
263
- return;
264
- }
265
-
266
- var aProperties = aResult[0];
267
- var mExtensions = aResult[1];
268
- var PropertyHelper = aResult[2];
269
- var bPropertyHelperIsInstance = !!PropertyHelper.isA;
270
-
271
- oControl._oPropertyHelper = bPropertyHelperIsInstance ? PropertyHelper : new PropertyHelper(aProperties, mExtensions, oControl);
272
- oControl._bPropertyHelperIsBeingInitialized = false;
273
- oControl._fnResolveInitPropertyHelper(oControl._oPropertyHelper);
274
- });
275
- }
276
-
277
- function fetchPropertyHelper(oControl, oDelegate, CustomPropertyHelper, aProperties, mExtensions) {
278
- if (typeof oDelegate.fetchPropertyHelper === "function") {
279
- return oDelegate.fetchPropertyHelper(oControl, aProperties, mExtensions).then(function(PropertyHelper) {
280
- var sBaseClass = CustomPropertyHelper ? CustomPropertyHelper.getMetadata().getName() : "sap.ui.mdc.util.PropertyHelper";
281
-
282
- if (!PropertyHelper || !PropertyHelper.getMetadata || !PropertyHelper.getMetadata().isA(sBaseClass)) {
283
- throw new Error("The property helper must be a class or instance of type " + sBaseClass + " or a subclass of it.");
284
- }
285
-
286
- return PropertyHelper;
287
- });
288
- }
289
-
290
- if (CustomPropertyHelper) {
291
- return Promise.resolve(CustomPropertyHelper);
292
- }
293
-
294
- return loadModules("sap/ui/mdc/util/PropertyHelper").then(function(aResult) {
295
- return aResult[0];
296
- });
297
- }
298
-
299
- /**
300
- * Provides access to the property helper initialization <code>Promise</code>.
301
- *
302
- * @protected
303
- * @returns {Promise<sap.ui.mdc.util.PropertyHelper>} Returns a <code>Promise</code> that resolves with the property helper
304
- */
305
- DelegateMixin.awaitPropertyHelper = function() {
306
- return this._pInitPropertyHelper;
307
- };
308
-
309
- /**
310
- * Returns the property helper instance, if available.
311
- *
312
- * @protected
313
- * @returns {sap.ui.mdc.util.PropertyHelper} The property helper
314
- * @throws Throws an error if the property helper is not available
315
- */
316
- DelegateMixin.getPropertyHelper = function() {
317
- if (!this._oPropertyHelper) {
318
- throw new Error("A property helper is not (yet) available. You must first initialize the delegate and the property helper.");
319
- }
320
-
321
- return this._oPropertyHelper;
322
- };
323
-
324
196
  DelegateMixin.exit = function (fnExit) {
325
197
  return function () {
326
198
  this.fnResolveDelegate = null;
@@ -334,15 +206,6 @@ sap.ui.define(["sap/ui/mdc/util/loadModules", "sap/base/Log"], function (loadMod
334
206
  this._oPayload = null;
335
207
  this._oTypeUtil = null;
336
208
 
337
- if (this._oPropertyHelper && !this._oPropertyHelper.bIsDestroyed) {
338
- this._oPropertyHelper.destroy();
339
- }
340
- this._oPropertyHelper = null;
341
- this._fnResolveInitPropertyHelper = null;
342
- this._fnRejectInitPropertyHelper = null;
343
- this._bPropertyHelperIsBeingInitialized = false;
344
- this._pInitPropertyHelper = null;
345
-
346
209
  if (fnExit) {
347
210
  fnExit.apply(this, arguments);
348
211
  }
@@ -362,9 +225,6 @@ sap.ui.define(["sap/ui/mdc/util/loadModules", "sap/base/Log"], function (loadMod
362
225
  this.getPayload = DelegateMixin.getPayload;
363
226
  this.getTypeUtil = DelegateMixin.getTypeUtil;
364
227
  this.initControlDelegate = DelegateMixin.initControlDelegate;
365
- this.initPropertyHelper = DelegateMixin.initPropertyHelper;
366
- this.awaitPropertyHelper = DelegateMixin.awaitPropertyHelper;
367
- this.getPropertyHelper = DelegateMixin.getPropertyHelper;
368
228
  };
369
229
 
370
230
  });
@@ -9,14 +9,6 @@ sap.ui.define([
9
9
  ], function (Core) {
10
10
  "use strict";
11
11
 
12
- /**
13
- * @namespace
14
- * @name sap.ui.mdc.mixin
15
- * @private
16
- * @experimental As of version 1.82.0
17
- * @ui5-restricted sap.ui.mdc
18
- */
19
-
20
12
  /**
21
13
  * Enhances a given control prototype with consolidated handling for external IFilter integration
22
14
  *
@@ -51,7 +43,7 @@ sap.ui.define([
51
43
  * </ul>
52
44
  *
53
45
  * @author SAP SE
54
- * @version 1.99.1
46
+ * @version 1.102.0
55
47
  * @alias sap.ui.mdc.mixin.FilterIntegrationMixin
56
48
  * @namespace
57
49
  * @since 1.82.0
@@ -13,7 +13,7 @@ sap.ui.define(
13
13
  * Calling any of the enhanced methods after control exit will result in a no-op.
14
14
  *
15
15
  * @author SAP SE
16
- * @version 1.99.1
16
+ * @version 1.102.0
17
17
  * @alias sap.ui.mdc.mixin.PromiseMixin
18
18
  * @namespace
19
19
  * @since 1.85.0
@@ -0,0 +1,354 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define(["sap/base/util/Deferred", "sap/ui/mdc/util/loadModules", "sap/base/Log"], function (Deferred, loadModules, Log) {
8
+ "use strict";
9
+
10
+ /**
11
+ * Enhances a given control prototype with consolidated asynchronous handling for providing a PropertyHelper
12
+ *
13
+ * The following methods are available:
14
+ *
15
+ * <ul>
16
+ * <li><code>initPropertyHelper</code> - Loads and initializes the property helper related to the enhanced control.</li>
17
+ * <li><code>awaitPropertyHelper</code> - Provides access to the property helper initialization <code>Promise</code>.</li>
18
+ * <li><code>finalizePropertyHelper</code> - Finalizes the propertyHelper fetching all available propertyInfo via a given control delegate.</li>
19
+ * <li><code>isPropertyHelperFinal</code> - Indicates if the propertyHelper for this control allready contains all available propertyInfo.</li>
20
+ * <li><code>getPropertyHelper</code> - Returns the property helper instance, if available.</li>
21
+ * </ul>
22
+ *
23
+ * Additionally, the following methods are wrapped:
24
+ *
25
+ * <ul>
26
+ * <li><code>applySettings</code></li>
27
+ * <li><code>exit</code></li>
28
+ * <li><code>init</code></li>
29
+ * </ul>
30
+ *
31
+ * @author SAP SE
32
+ * @version 1.102.0
33
+ * @alias sap.ui.mdc.mixin.PropertyHelperMixin
34
+ * @namespace
35
+ * @since 1.100.0
36
+ * @private
37
+ * @experimental
38
+ * @ui5-restricted sap.ui.mdc
39
+ */
40
+ var PropertyHelperMixin = {};
41
+
42
+ PropertyHelperMixin.init = function (fnInit) {
43
+ return function () {
44
+
45
+ this._oPropertyHelper = null;
46
+ this._oPropertyHelperDeferred = new Deferred();
47
+ this._oApplySettingsDeferred = new Deferred();
48
+
49
+ this._bPropertyHelperFinal = false;
50
+ this._bPropertyHelperInitializing = false;
51
+ this._sPropertyInfoStore = null;
52
+
53
+ if (fnInit) {
54
+ fnInit.apply(this, arguments);
55
+ }
56
+
57
+ };
58
+ };
59
+
60
+ PropertyHelperMixin.applySettings = function (fnApplySettings) {
61
+ return function () {
62
+ if (fnApplySettings) {
63
+ fnApplySettings.apply(this, arguments);
64
+ }
65
+
66
+ // initialize propertyHelper also, when store is initially empty
67
+ if (this._sPropertyInfoStore && (!arguments[0] || !arguments[0].hasOwnProperty(this._sPropertyInfoStore))) {
68
+ _createOrUpdatePropertyHelper.call(this, [], false);
69
+ }
70
+
71
+ this._oApplySettingsDeferred.resolve(this); // We want to make sure all other initial properties are set before initializing propertyHelper (e.g. delegate)
72
+ return this;
73
+ };
74
+ };
75
+
76
+ /**
77
+ * Loads and initializes the property helper related to the enhanced control.
78
+ *
79
+ * @protected
80
+ * @param {sap.ui.mdc.util.PropertyHelper} [PropertyHelperClass] Custom property helper class
81
+ * @param {object[]} [aProperties] optional set of initial properties
82
+ * @param {object[]} [bFinal] flag for mark the propertyHelper as final
83
+ * @returns {Promise<sap.ui.mdc.util.PropertyHelper>} Returns a <code>Promise</code> that resolves with the property helper
84
+ */
85
+ PropertyHelperMixin.initPropertyHelper = function(PropertyHelperClass, aProperties, bFinal) {
86
+ if (PropertyHelperClass) {
87
+ this._setPropertyHelperClass(PropertyHelperClass);
88
+ }
89
+
90
+ return _createOrUpdatePropertyHelper.call(this, aProperties, bFinal);
91
+ };
92
+
93
+ /**
94
+ * Provide a new set of properties for the propertyHelper.
95
+ *
96
+ * @protected
97
+ * @param {object[]} [aProperties] optional set of initial properties
98
+ * @param {object[]} [bFinal] flag for mark the propertyHelper as final
99
+ * @returns {Promise<sap.ui.mdc.util.PropertyHelper>} Returns a <code>Promise</code> that resolves with the property helper
100
+ * @throws exception if propertyHelper is already marked as final
101
+ */
102
+ PropertyHelperMixin.updatePropertyHelper = function(aProperties, bFinal) {
103
+ return _createOrUpdatePropertyHelper.call(this, aProperties, bFinal);
104
+ };
105
+
106
+ /**
107
+ * Finalize the propertyHelper using the control's delegate.
108
+ *
109
+ * @protected
110
+ * @param {object[]} [aProperties] optional set of initial properties
111
+ * @param {object[]} [bFinal] flag for mark the propertyHelper as final
112
+ * @returns {Promise<sap.ui.mdc.util.PropertyHelper>} Returns a <code>Promise</code> that resolves with the property helper
113
+ */
114
+ PropertyHelperMixin.finalizePropertyHelper = function() {
115
+ this._pHelperFinalizationPromise = this._pHelperFinalizationPromise || _getDelegateProperties(this).then(function (aResult) {
116
+ return _createOrUpdatePropertyHelper.call(this, aResult, true);
117
+ }.bind(this));
118
+ return this._pHelperFinalizationPromise;
119
+ };
120
+
121
+ /**
122
+ * Indicates if the control's propertyHelper already contains all available properties
123
+ *
124
+ * @protected
125
+ * @returns {boolean} Returns a <code>boolean</code> indicating the propertyHelper's final state
126
+ */
127
+ PropertyHelperMixin.isPropertyHelperFinal = function() {
128
+ return this._bPropertyHelperFinal;
129
+ };
130
+
131
+ /**
132
+ * Provides access to the property helper initialization <code>Promise</code>.
133
+ *
134
+ * @protected
135
+ * @returns {Promise<sap.ui.mdc.util.PropertyHelper>} Returns a <code>Promise</code> that resolves with the property helper
136
+ */
137
+ PropertyHelperMixin.awaitPropertyHelper = function() {
138
+ return this._oPropertyHelperDeferred.promise;
139
+ };
140
+
141
+ /**
142
+ * Returns the property helper instance, if available.
143
+ *
144
+ * @protected
145
+ * @returns {sap.ui.mdc.util.PropertyHelper} The property helper
146
+ */
147
+ PropertyHelperMixin.getPropertyHelper = function() {
148
+ return this._oPropertyHelper;
149
+ };
150
+
151
+ PropertyHelperMixin.exit = function (fnExit) {
152
+ return function () {
153
+ this._oPropertyHelper = null;
154
+ this._oPropertyHelperDeferred = null;
155
+ this._oApplySettingsDeferred = null;
156
+ this._bPropertyHelperFinal = null;
157
+ this._bPropertyHelperInitializing = null;
158
+ this._pHelperFinalizationPromise = null;
159
+ this._oPropertyHelperClass = null;
160
+ this._sPropertyInfoStore = null;
161
+
162
+ if (this._oPropertyInfoStoreMutatorOverride) {
163
+ this[this._oPropertyInfoStoreMutatorOverride.key] = this._oPropertyInfoStoreMutatorOverride.mutator;
164
+ this._oPropertyInfoStoreMutatorOverride = null;
165
+ }
166
+
167
+ if (fnExit) {
168
+ fnExit.apply(this, arguments);
169
+ }
170
+ };
171
+ };
172
+
173
+ /**
174
+ * Controls may provide a property identifier representing a propertyInfo store for this control.
175
+ * This should be called as early as possible as the given property's mutator is overriden.
176
+ * @private
177
+ * @param {string} sPropertyName Name of the property containing propertyInfo for this control
178
+ *
179
+ */
180
+ PropertyHelperMixin._setupPropertyInfoStore = function(sPropertyName) {
181
+ var oProperties = this.getMetadata().getAllProperties();
182
+ var oPropertyInfoProperty = oProperties && oProperties[sPropertyName];
183
+ if (!oPropertyInfoProperty) {
184
+ throw new Error("PropertyHelperMixin: Property '" + sPropertyName + "' not found.");
185
+ }
186
+ var oJSONKeys = this.getMetadata().getJSONKeys()[sPropertyName];
187
+ this._oPropertyInfoStoreMutatorOverride = {key: oJSONKeys._sMutator, mutator: this[oJSONKeys._sMutator]};
188
+
189
+ this[oJSONKeys._sMutator] = function () {
190
+ this._oPropertyInfoStoreMutatorOverride.mutator.apply(this, arguments);
191
+ if (!this._bPropertyHelperFinal) {
192
+ _createOrUpdatePropertyHelper.call(this, this[oJSONKeys._sGetter](), false);
193
+ }
194
+ return this;
195
+ };
196
+ this._sPropertyInfoStore = sPropertyName;
197
+ };
198
+
199
+ // Should ideally be called already during init for controls featuring a propertyInfo property (auto-initalization of PH after applySettings).
200
+ PropertyHelperMixin._setPropertyHelperClass = function (PropertyHelperClass) {
201
+ if (this._oPropertyHelper || this._bPropertyHelperInitializing) {
202
+ throw new Error("PropertyHelper already initializing/ed.");
203
+ }
204
+
205
+ if (PropertyHelperClass && (!PropertyHelperClass.getMetadata || !PropertyHelperClass.getMetadata().isA("sap.ui.mdc.util.PropertyHelper"))) {
206
+ throw new Error("The custom property helper class must be sap.ui.mdc.util.PropertyHelper or a subclass of it.");
207
+ }
208
+ this._oPropertyHelperClass = PropertyHelperClass;
209
+ };
210
+
211
+ PropertyHelperMixin._getPropertyByName = function(sName) {
212
+ return this._oPropertyHelper && this._oPropertyHelper.getProperty(sName);
213
+ };
214
+
215
+ PropertyHelperMixin._getPropertyByNameAsync = function(sName) {
216
+ var oProperty = this._getPropertyByName(sName);
217
+
218
+ if (!oProperty) {
219
+ return this.finalizePropertyHelper().then(function (oPropertyHelper) {
220
+ return this._getPropertyByName(sName);
221
+ }.bind(this));
222
+ }
223
+ return Promise.resolve(oProperty);
224
+ };
225
+
226
+ function _createOrUpdatePropertyHelper(aProperties, bFinal) {
227
+ if (!this.bIsDestroyed) {
228
+ if (this._bPropertyHelperInitializing && typeof aProperties !== "undefined") {
229
+ return this._oPropertyHelperDeferred.promise.then(function () {
230
+ return _updatePropertyHelper.call(this, aProperties, bFinal);
231
+ }.bind(this));
232
+ }
233
+
234
+ if (this._oPropertyHelper && typeof aProperties !== "undefined") {
235
+ _updatePropertyHelper.call(this, aProperties, bFinal);
236
+ }
237
+ if (!this._oPropertyHelper) {
238
+ _createPropertyHelper.call(this, aProperties, bFinal);
239
+ }
240
+ }
241
+ return this._oPropertyHelperDeferred && this._oPropertyHelperDeferred.promise;
242
+ }
243
+
244
+ function _createPropertyHelper (aProperties, bFinal) {
245
+ this._bPropertyHelperInitializing = true;
246
+
247
+ if (bFinal || !aProperties) { // also fall back to delegate if no initial properties given
248
+ bFinal = true;
249
+ this._pHelperFinalizationPromise = this._oPropertyHelperDeferred.promise;
250
+ }
251
+
252
+ var oDelegate;
253
+
254
+ // we need to initialize the delegate for extensions or ph overrides first
255
+ return this._oApplySettingsDeferred.promise.then(function () {
256
+ return this.initControlDelegate();
257
+ }.bind(this)).then(function (oControlDelegate) {
258
+ oDelegate = oControlDelegate;
259
+ return bFinal ? _getDelegateProperties(this) : aProperties;
260
+ }.bind(this)).then(function(aProperties) {
261
+ if (this.bIsDestroyed) {
262
+ return [];
263
+ }
264
+ var aResult = [aProperties];
265
+ if (oDelegate && typeof oDelegate.fetchPropertyExtensions === "function") {
266
+ return oDelegate.fetchPropertyExtensions(this, aProperties).then(function(mExtensions) {
267
+ return aResult.concat(mExtensions);
268
+ });
269
+ }
270
+ return aResult.concat(undefined);
271
+ }.bind(this)).then(function(aResult) {
272
+ if (this.bIsDestroyed) {
273
+ return [];
274
+ }
275
+ return fetchPropertyHelperClass(this, oDelegate, aResult[0], aResult[1]).then(function(PropertyHelper) {
276
+ return aResult.concat(PropertyHelper);
277
+ });
278
+ }.bind(this)).then(function(aResult) {
279
+ if (this.bIsDestroyed) {
280
+ return undefined;
281
+ }
282
+
283
+ var aProperties = aResult[0];
284
+ var mExtensions = aResult[1];
285
+ var PropertyHelper = aResult[2];
286
+ this._oPropertyHelper = new PropertyHelper(aProperties, mExtensions, this, undefined, undefined);
287
+ this._bPropertyHelperInitializing = false;
288
+ if (bFinal) {
289
+ this._bPropertyHelperFinal = true;
290
+ }
291
+ return this._oPropertyHelperDeferred.resolve(this._oPropertyHelper);
292
+ }.bind(this)).catch(function (oError) {
293
+ return this._oPropertyHelperDeferred && this._oPropertyHelperDeferred.reject(oError);
294
+ }.bind(this));
295
+ }
296
+
297
+ function _updatePropertyHelper(aProperties, bFinal) {
298
+ if (this._bPropertyHelperFinal) {
299
+ throw new Error("This property helper is already final and cannot be updated further.");
300
+ }
301
+ this._oPropertyHelper.setProperties(aProperties);
302
+ this._bPropertyHelperFinal = bFinal || this._bPropertyHelperFinal;
303
+ return this._oPropertyHelper;
304
+ }
305
+
306
+ // use delegate for final properties
307
+ function _getDelegateProperties (oControl) {
308
+ return oControl.initControlDelegate().then(function () {
309
+ return oControl.getControlDelegate(oControl).fetchProperties(oControl); // not using arg as some unit tests override "getControlDelegate"
310
+
311
+
312
+ });
313
+ }
314
+
315
+ function fetchPropertyHelperClass(oControl, oDelegate, aProperties) {
316
+ if (oDelegate && typeof oDelegate.getPropertyHelperClass === "function") {
317
+ var oDelegatePropertyHelperClass = oDelegate.getPropertyHelperClass();
318
+ var sBaseClass = oControl._oPropertyHelperClass ? oControl._oPropertyHelperClass.getMetadata().getName() : "sap.ui.mdc.util.PropertyHelper";
319
+
320
+ if (!oDelegatePropertyHelperClass || !oDelegatePropertyHelperClass.getMetadata || !oDelegatePropertyHelperClass.getMetadata().isA(sBaseClass)) {
321
+ throw new Error("The property helper class must be " + sBaseClass + " or a subclass of it.");
322
+ }
323
+ return Promise.resolve(oDelegatePropertyHelperClass);
324
+ }
325
+
326
+ if (oControl._oPropertyHelperClass) {
327
+ return Promise.resolve(oControl._oPropertyHelperClass);
328
+ }
329
+
330
+ return loadModules("sap/ui/mdc/util/PropertyHelper").then(function(aResult) {
331
+ return aResult[0];
332
+ });
333
+ }
334
+
335
+ return function () {
336
+ this.init = PropertyHelperMixin.init(this.init);
337
+ this.exit = PropertyHelperMixin.exit(this.exit);
338
+ this.applySettings = PropertyHelperMixin.applySettings(this.applySettings);
339
+
340
+
341
+ this.initPropertyHelper = PropertyHelperMixin.initPropertyHelper;
342
+ this.awaitPropertyHelper = PropertyHelperMixin.awaitPropertyHelper;
343
+ this.getPropertyHelper = PropertyHelperMixin.getPropertyHelper;
344
+
345
+ this.finalizePropertyHelper = PropertyHelperMixin.finalizePropertyHelper;
346
+ this.isPropertyHelperFinal = PropertyHelperMixin.isPropertyHelperFinal;
347
+
348
+ this._getPropertyByName = PropertyHelperMixin._getPropertyByName;
349
+ this._getPropertyByNameAsync = PropertyHelperMixin._getPropertyByNameAsync;
350
+ this._setPropertyHelperClass = PropertyHelperMixin._setPropertyHelperClass;
351
+ this._setupPropertyInfoStore = PropertyHelperMixin._setupPropertyInfoStore;
352
+
353
+ };
354
+ });
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  *
30
30
  * Falls back to 'object' if type cannot be found.
31
31
  *
32
- * @param {string} sType Given model specific type
32
+ * @param {string} sDataType Given model specific type
33
33
  * @returns {string} primitive type name
34
34
  */
35
35
  getPrimitiveType: function (sDataType) {
@@ -98,6 +98,7 @@ sap.ui.define([
98
98
  }
99
99
 
100
100
  case "sap.ui.model.odata.type.DateTimeOffset":
101
+ case "sap.ui.model.odata.type.DateTimeWithTimezone":
101
102
  return BaseType.DateTime;
102
103
 
103
104
  case "sap.ui.model.odata.type.Time":