@openui5/sap.ui.core 1.93.3 → 1.96.2

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 (416) hide show
  1. package/.eslintrc.json +13 -2
  2. package/.reuse/dep5 +6 -11
  3. package/THIRDPARTY.txt +10 -16
  4. package/package.json +1 -1
  5. package/src/jquery.sap.global.js +5 -2
  6. package/src/jquery.sap.properties.js +1 -1
  7. package/src/jquery.sap.resources.js +1 -1
  8. package/src/jquery.sap.script.js +1 -1
  9. package/src/jquery.sap.storage.js +3 -3
  10. package/src/jquery.sap.stubs.js +2 -1
  11. package/src/jquery.sap.trace.js +2 -1
  12. package/src/sap/base/i18n/ResourceBundle.js +6 -2
  13. package/src/sap/base/strings/whitespaceReplacer.js +52 -0
  14. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  15. package/src/sap/base/util/restricted/_castArray.js +1 -1
  16. package/src/sap/base/util/restricted/_compact.js +1 -1
  17. package/src/sap/base/util/restricted/_curry.js +1 -1
  18. package/src/sap/base/util/restricted/_debounce.js +1 -1
  19. package/src/sap/base/util/restricted/_difference.js +1 -1
  20. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  21. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  22. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  23. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  24. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  25. package/src/sap/base/util/restricted/_flatten.js +1 -1
  26. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  27. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  28. package/src/sap/base/util/restricted/_intersection.js +1 -1
  29. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  30. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  31. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  32. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  33. package/src/sap/base/util/restricted/_isNil.js +1 -1
  34. package/src/sap/base/util/restricted/_max.js +1 -1
  35. package/src/sap/base/util/restricted/_merge.js +1 -1
  36. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  37. package/src/sap/base/util/restricted/_min.js +1 -1
  38. package/src/sap/base/util/restricted/_omit.js +1 -1
  39. package/src/sap/base/util/restricted/_pick.js +1 -1
  40. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  41. package/src/sap/base/util/restricted/_throttle.js +1 -1
  42. package/src/sap/base/util/restricted/_toArray.js +1 -1
  43. package/src/sap/base/util/restricted/_union.js +1 -1
  44. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  45. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  46. package/src/sap/base/util/restricted/_uniq.js +1 -1
  47. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  48. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  49. package/src/sap/base/util/restricted/_without.js +1 -1
  50. package/src/sap/base/util/restricted/_xor.js +1 -1
  51. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  52. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  53. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  54. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  55. package/src/sap/ui/Device.js +37 -42
  56. package/src/sap/ui/Global.js +8 -7
  57. package/src/sap/ui/base/DataType.js +14 -8
  58. package/src/sap/ui/base/Event.js +1 -1
  59. package/src/sap/ui/base/EventProvider.js +1 -1
  60. package/src/sap/ui/base/ExpressionParser.js +9 -6
  61. package/src/sap/ui/base/Interface.js +3 -49
  62. package/src/sap/ui/base/ManagedObject.js +12 -7
  63. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  64. package/src/sap/ui/base/Metadata.js +1 -1
  65. package/src/sap/ui/base/Object.js +49 -4
  66. package/src/sap/ui/base/ObjectPool.js +1 -1
  67. package/src/sap/ui/base/syncXHRFix.js +2 -1
  68. package/src/sap/ui/core/.library +5 -5
  69. package/src/sap/ui/core/AppCacheBuster.js +4 -4
  70. package/src/sap/ui/core/BusyIndicator.js +1 -11
  71. package/src/sap/ui/core/Component.js +300 -140
  72. package/src/sap/ui/core/ComponentContainer.js +24 -8
  73. package/src/sap/ui/core/ComponentMetadata.js +14 -3
  74. package/src/sap/ui/core/ComponentSupport.js +1 -1
  75. package/src/sap/ui/core/Configuration.js +67 -31
  76. package/src/sap/ui/core/Control.js +1 -1
  77. package/src/sap/ui/core/Core.js +103 -25
  78. package/src/sap/ui/core/CustomData.js +1 -1
  79. package/src/sap/ui/core/CustomizingConfiguration.js +35 -260
  80. package/src/sap/ui/core/DeclarativeSupport.js +3 -2
  81. package/src/sap/ui/core/Element.js +1 -1
  82. package/src/sap/ui/core/ElementMetadata.js +4 -2
  83. package/src/sap/ui/core/EnabledPropagator.js +91 -73
  84. package/src/sap/ui/core/EventBus.js +1 -1
  85. package/src/sap/ui/core/ExtensionPoint.js +7 -14
  86. package/src/sap/ui/core/Fragment.js +30 -32
  87. package/src/sap/ui/core/HTML.js +1 -1
  88. package/src/sap/ui/core/History.js +1 -1
  89. package/src/sap/ui/core/Icon.js +7 -8
  90. package/src/sap/ui/core/IconPool.js +26 -1097
  91. package/src/sap/ui/core/IconRenderer.js +6 -6
  92. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  93. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  94. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  95. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  96. package/src/sap/ui/core/InvisibleText.js +1 -1
  97. package/src/sap/ui/core/Item.js +1 -1
  98. package/src/sap/ui/core/LabelEnablement.js +1 -1
  99. package/src/sap/ui/core/LayoutData.js +1 -1
  100. package/src/sap/ui/core/ListItem.js +1 -1
  101. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  102. package/src/sap/ui/core/Locale.js +26 -4
  103. package/src/sap/ui/core/LocaleData.js +1 -1
  104. package/src/sap/ui/core/Manifest.js +4 -61
  105. package/src/sap/ui/core/Message.js +1 -1
  106. package/src/sap/ui/core/Patcher.js +27 -3
  107. package/src/sap/ui/core/Placeholder.js +28 -15
  108. package/src/sap/ui/core/RenderManager.js +36 -6
  109. package/src/sap/ui/core/Renderer.js +13 -3
  110. package/src/sap/ui/core/ResizeHandler.js +1 -1
  111. package/src/sap/ui/core/ScrollBar.js +2 -2
  112. package/src/sap/ui/core/SeparatorItem.js +1 -1
  113. package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
  114. package/src/sap/ui/core/Title.js +1 -1
  115. package/src/sap/ui/core/TooltipBase.js +1 -1
  116. package/src/sap/ui/core/UIArea.js +1 -1
  117. package/src/sap/ui/core/UIComponent.js +42 -16
  118. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  119. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  120. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  121. package/src/sap/ui/core/XMLComposite.js +2 -2
  122. package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
  123. package/src/sap/ui/core/XMLTemplateProcessor.js +116 -41
  124. package/src/sap/ui/core/_IconRegistry.js +1148 -0
  125. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  126. package/src/sap/ui/core/delegate/ScrollEnablement.js +6 -3
  127. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  128. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  129. package/src/sap/ui/core/dnd/DragInfo.js +2 -2
  130. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  131. package/src/sap/ui/core/format/NumberFormat.js +16 -1
  132. package/src/sap/ui/core/hyphenation/Hyphenation.js +73 -221
  133. package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +11 -10
  134. package/src/sap/ui/core/library.js +3 -3
  135. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  136. package/src/sap/ui/core/message/Message.js +1 -1
  137. package/src/sap/ui/core/message/MessageManager.js +13 -15
  138. package/src/sap/ui/core/message/MessageParser.js +1 -1
  139. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  140. package/src/sap/ui/core/messagebundle_de.properties +1 -1
  141. package/src/sap/ui/core/messagebundle_fr.properties +1 -1
  142. package/src/sap/ui/core/messagebundle_it.properties +1 -1
  143. package/src/sap/ui/core/messagebundle_pl.properties +1 -1
  144. package/src/sap/ui/core/messagebundle_th.properties +2 -2
  145. package/src/sap/ui/core/mvc/Controller.js +38 -19
  146. package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
  147. package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
  148. package/src/sap/ui/core/mvc/HTMLView.js +2 -2
  149. package/src/sap/ui/core/mvc/JSONView.js +2 -2
  150. package/src/sap/ui/core/mvc/JSView.js +2 -2
  151. package/src/sap/ui/core/mvc/TemplateView.js +2 -2
  152. package/src/sap/ui/core/mvc/View.js +58 -85
  153. package/src/sap/ui/core/mvc/XMLView.js +2 -2
  154. package/src/sap/ui/core/mvc/XMLViewRenderer.js +17 -20
  155. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  156. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  157. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  158. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  159. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  160. package/src/sap/ui/core/routing/History.js +10 -2
  161. package/src/sap/ui/core/routing/Router.js +8 -1
  162. package/src/sap/ui/core/routing/Target.js +13 -0
  163. package/src/sap/ui/core/routing/Targets.js +13 -2
  164. package/src/sap/ui/core/routing/async/Route.js +1 -1
  165. package/src/sap/ui/core/routing/async/Target.js +353 -259
  166. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  167. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  168. package/src/sap/ui/core/service/Service.js +1 -1
  169. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  170. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  171. package/src/sap/ui/core/support/BootSupportTool.js +11 -0
  172. package/src/sap/ui/core/support/InteractionTree.css +4 -0
  173. package/src/sap/ui/core/support/Plugin.js +1 -1
  174. package/src/sap/ui/core/support/Support.js +1 -1
  175. package/src/sap/ui/core/support/ViewInfo.css +599 -0
  176. package/src/sap/ui/core/support/controls/InteractionTree.js +352 -222
  177. package/src/sap/ui/core/support/controls/ObjectViewer.js +3 -41
  178. package/src/sap/ui/core/support/controls/TimelineOverview.js +49 -24
  179. package/src/sap/ui/core/support/controls/TreeViewer.js +12 -58
  180. package/src/sap/ui/core/support/plugins/ControlTree.js +59 -68
  181. package/src/sap/ui/core/support/plugins/Debugging.js +9 -11
  182. package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
  183. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  184. package/src/sap/ui/core/support/plugins/Performance.js +147 -75
  185. package/src/sap/ui/core/support/plugins/Selector.js +19 -24
  186. package/src/sap/ui/core/support/plugins/TechInfo.js +5 -5
  187. package/src/sap/ui/core/support/plugins/Trace.js +95 -32
  188. package/src/sap/ui/core/support/plugins/ViewInfo.js +9 -73
  189. package/src/sap/ui/core/support/support.css +109 -14
  190. package/src/sap/ui/core/support/support.html +6 -2
  191. package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
  192. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +149 -72
  193. package/src/sap/ui/core/themes/base/Icon.less +9 -0
  194. package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
  195. package/src/sap/ui/core/theming/Parameters.js +6 -4
  196. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  197. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  198. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  199. package/src/sap/ui/core/tmpl/Template.js +10 -28
  200. package/src/sap/ui/core/tmpl/TemplateControl.js +4 -4
  201. package/src/sap/ui/core/tmpl/_parsePath.js +35 -0
  202. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  203. package/src/sap/ui/core/util/DraftEnabledMockServer.js +9 -4
  204. package/src/sap/ui/core/util/Export.js +1 -1
  205. package/src/sap/ui/core/util/ExportCell.js +1 -1
  206. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  207. package/src/sap/ui/core/util/ExportRow.js +1 -1
  208. package/src/sap/ui/core/util/ExportType.js +1 -1
  209. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  210. package/src/sap/ui/core/util/File.js +1 -1
  211. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  212. package/src/sap/ui/core/util/MockServer.js +5 -5
  213. package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +3 -2
  214. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  215. package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
  216. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +136 -63
  217. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +170 -153
  218. package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +424 -293
  219. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  220. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  221. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  222. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  223. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  224. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  225. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  226. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  227. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  228. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  229. package/src/sap/ui/debug/ControlTree.js +10 -4
  230. package/src/sap/ui/debug/DebugEnv.js +3 -4
  231. package/src/sap/ui/debug/Highlighter.js +8 -2
  232. package/src/sap/ui/debug/PropertyList.css +55 -0
  233. package/src/sap/ui/debug/PropertyList.js +111 -182
  234. package/src/sap/ui/model/Binding.js +174 -118
  235. package/src/sap/ui/model/ClientContextBinding.js +1 -1
  236. package/src/sap/ui/model/ClientListBinding.js +1 -3
  237. package/src/sap/ui/model/ClientModel.js +4 -4
  238. package/src/sap/ui/model/ClientPropertyBinding.js +4 -2
  239. package/src/sap/ui/model/ClientTreeBinding.js +15 -9
  240. package/src/sap/ui/model/ClientTreeBindingAdapter.js +28 -23
  241. package/src/sap/ui/model/CompositeBinding.js +98 -77
  242. package/src/sap/ui/model/CompositeDataState.js +2 -2
  243. package/src/sap/ui/model/CompositeType.js +2 -2
  244. package/src/sap/ui/model/Context.js +4 -2
  245. package/src/sap/ui/model/ContextBinding.js +6 -14
  246. package/src/sap/ui/model/DataState.js +2 -2
  247. package/src/sap/ui/model/Filter.js +255 -53
  248. package/src/sap/ui/model/FilterOperator.js +1 -1
  249. package/src/sap/ui/model/FilterProcessor.js +27 -17
  250. package/src/sap/ui/model/FilterType.js +1 -1
  251. package/src/sap/ui/model/ListBinding.js +180 -117
  252. package/src/sap/ui/model/MetaModel.js +4 -9
  253. package/src/sap/ui/model/Model.js +345 -294
  254. package/src/sap/ui/model/PropertyBinding.js +92 -58
  255. package/src/sap/ui/model/SelectionModel.js +2 -2
  256. package/src/sap/ui/model/SimpleType.js +2 -2
  257. package/src/sap/ui/model/Sorter.js +1 -1
  258. package/src/sap/ui/model/SorterProcessor.js +1 -1
  259. package/src/sap/ui/model/StaticBinding.js +1 -1
  260. package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
  261. package/src/sap/ui/model/TreeBinding.js +1 -1
  262. package/src/sap/ui/model/TreeBindingAdapter.js +251 -100
  263. package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
  264. package/src/sap/ui/model/TreeBindingUtils.js +1 -0
  265. package/src/sap/ui/model/Type.js +1 -1
  266. package/src/sap/ui/model/analytics/AnalyticalBinding.js +8 -4
  267. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
  268. package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
  269. package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
  270. package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
  271. package/src/sap/ui/model/analytics/odata4analytics.js +34 -25
  272. package/src/sap/ui/model/base/ManagedObjectModel.js +4 -0
  273. package/src/sap/ui/model/json/JSONListBinding.js +8 -5
  274. package/src/sap/ui/model/json/JSONModel.js +24 -15
  275. package/src/sap/ui/model/json/JSONPropertyBinding.js +4 -3
  276. package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
  277. package/src/sap/ui/model/message/MessageListBinding.js +6 -3
  278. package/src/sap/ui/model/message/MessageModel.js +23 -15
  279. package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
  280. package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
  281. package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
  282. package/src/sap/ui/model/odata/CountMode.js +1 -1
  283. package/src/sap/ui/model/odata/Filter.js +1 -1
  284. package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
  285. package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
  286. package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
  287. package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
  288. package/src/sap/ui/model/odata/ODataMetaModel.js +5 -3
  289. package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
  290. package/src/sap/ui/model/odata/ODataModel.js +8 -7
  291. package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
  292. package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
  293. package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
  294. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +2 -2
  295. package/src/sap/ui/model/odata/ODataUtils.js +13 -11
  296. package/src/sap/ui/model/odata/OperationMode.js +1 -1
  297. package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -1
  298. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  299. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  300. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  301. package/src/sap/ui/model/odata/type/Date.js +1 -1
  302. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  303. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  304. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  305. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  306. package/src/sap/ui/model/odata/type/Double.js +1 -1
  307. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  308. package/src/sap/ui/model/odata/type/Int.js +1 -1
  309. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  310. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  311. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  312. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  313. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  314. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  315. package/src/sap/ui/model/odata/type/Single.js +1 -1
  316. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  317. package/src/sap/ui/model/odata/type/String.js +1 -1
  318. package/src/sap/ui/model/odata/type/Time.js +1 -1
  319. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  320. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  321. package/src/sap/ui/model/odata/v2/Context.js +81 -9
  322. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +3 -3
  323. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +39 -49
  324. package/src/sap/ui/model/odata/v2/ODataListBinding.js +236 -73
  325. package/src/sap/ui/model/odata/v2/ODataModel.js +314 -164
  326. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +110 -97
  327. package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +129 -0
  328. package/src/sap/ui/model/odata/v4/Context.js +6 -3
  329. package/src/sap/ui/model/odata/v4/ODataBinding.js +5 -6
  330. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +117 -40
  331. package/src/sap/ui/model/odata/v4/ODataListBinding.js +95 -15
  332. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +44 -31
  333. package/src/sap/ui/model/odata/v4/ODataModel.js +86 -78
  334. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +47 -28
  335. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -7
  336. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
  337. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +8 -1
  338. package/src/sap/ui/model/odata/v4/lib/_Cache.js +24 -16
  339. package/src/sap/ui/model/odata/v4/lib/_Helper.js +32 -30
  340. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +52 -17
  341. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
  342. package/src/sap/ui/model/resource/ResourceModel.js +6 -2
  343. package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
  344. package/src/sap/ui/model/type/Boolean.js +2 -2
  345. package/src/sap/ui/model/type/Currency.js +2 -2
  346. package/src/sap/ui/model/type/Date.js +9 -3
  347. package/src/sap/ui/model/type/DateInterval.js +4 -2
  348. package/src/sap/ui/model/type/DateTime.js +2 -2
  349. package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
  350. package/src/sap/ui/model/type/FileSize.js +4 -2
  351. package/src/sap/ui/model/type/Float.js +4 -2
  352. package/src/sap/ui/model/type/Integer.js +4 -2
  353. package/src/sap/ui/model/type/String.js +2 -2
  354. package/src/sap/ui/model/type/Time.js +2 -2
  355. package/src/sap/ui/model/type/TimeInterval.js +2 -2
  356. package/src/sap/ui/model/type/Unit.js +14 -7
  357. package/src/sap/ui/model/xml/XMLListBinding.js +15 -9
  358. package/src/sap/ui/model/xml/XMLModel.js +70 -41
  359. package/src/sap/ui/model/xml/XMLPropertyBinding.js +4 -4
  360. package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
  361. package/src/sap/ui/performance/trace/Interaction.js +30 -15
  362. package/src/sap/ui/performance/trace/initTraces.js +1 -1
  363. package/src/sap/ui/qunit/QUnitUtils.js +3 -2
  364. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  365. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +9 -11
  366. package/src/sap/ui/test/TestUtils.js +11 -4
  367. package/src/sap/ui/test/actions/Drag.js +6 -2
  368. package/src/sap/ui/test/actions/Drop.js +6 -2
  369. package/src/sap/ui/test/actions/EnterText.js +6 -0
  370. package/src/sap/ui/test/actions/Press.js +6 -0
  371. package/src/sap/ui/test/actions/Scroll.js +6 -0
  372. package/src/sap/ui/test/autowaiter/_resourceWaiter.js +4 -4
  373. package/src/sap/ui/test/launchers/componentLauncher.js +0 -4
  374. package/src/sap/ui/test/matchers/I18NText.js +29 -11
  375. package/src/sap/ui/test/opaQunit.js +5 -0
  376. package/src/sap/ui/thirdparty/crossroads.js +6 -4
  377. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
  378. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
  379. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
  380. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
  381. package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
  382. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
  383. package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
  384. package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
  385. package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
  386. package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
  387. package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
  388. package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
  389. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
  390. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
  391. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
  392. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
  393. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
  394. package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
  395. package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
  396. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
  397. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
  398. package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
  399. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
  400. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
  401. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
  402. package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
  403. package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
  404. package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
  405. package/src/sap/ui/thirdparty/jquery.js +9 -1
  406. package/src/sap/ui/thirdparty/qunit-2.js +1 -1
  407. package/src/sap/ui/thirdparty/qunit.js +1 -1
  408. package/src/sap/ui/util/Mobile.js +2 -20
  409. package/src/sap/ui/util/Storage.js +1 -1
  410. package/src/sap/ui/util/isCrossOriginURL.js +16 -6
  411. package/src/sap-ui-core-nojQuery.js +1 -1
  412. package/src/sap-ui-core.js +1 -1
  413. package/src/sap-ui-debug.js +3 -17
  414. package/ui5.yaml +5 -2
  415. package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
  416. package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
@@ -16,7 +16,6 @@ sap.ui.define([
16
16
  "sap/base/util/includes",
17
17
  "sap/base/util/ObjectPath",
18
18
  "sap/base/util/isPlainObject",
19
- // needed to have sap.ui.xmlfragment
20
19
  "sap/ui/core/Fragment"
21
20
  ], function(
22
21
  BaseTreeModifier,
@@ -27,7 +26,8 @@ sap.ui.define([
27
26
  EventHandlerResolver,
28
27
  includes,
29
28
  ObjectPath,
30
- isPlainObject
29
+ isPlainObject,
30
+ Fragment
31
31
  ) {
32
32
 
33
33
  "use strict";
@@ -85,7 +85,12 @@ sap.ui.define([
85
85
  * @inheritDoc
86
86
  */
87
87
  getStashed: function (oControl) {
88
- return XmlTreeModifier.getProperty(oControl, "stashed") || !XmlTreeModifier.getProperty(oControl, "visible");
88
+ return Promise.all([
89
+ XmlTreeModifier.getProperty(oControl, "stashed"),
90
+ XmlTreeModifier.getProperty(oControl, "visible")
91
+ ]).then(function (aProperties) {
92
+ return !!aProperties[0] || !aProperties[1];
93
+ });
89
94
  },
90
95
 
91
96
  /**
@@ -125,35 +130,49 @@ sap.ui.define([
125
130
  * @inheritDoc
126
131
  */
127
132
  getProperty: function (oControl, sPropertyName) {
133
+ var oPropertyInfo;
134
+ var oType;
128
135
  var vPropertyValue = oControl.getAttribute(sPropertyName);
129
- var oPropertyInfo = XmlTreeModifier.getControlMetadata(oControl).getProperty(sPropertyName);
130
- if (oPropertyInfo) { //not a property like aggregation
131
- var oType = oPropertyInfo.getType();
132
- if (
133
- sPropertyName === "value"
134
- && XmlTreeModifier.getControlType(oControl) === "sap.ui.core.CustomData"
135
- && XmlTreeModifier.getProperty(oControl, "key") === "sap-ui-custom-settings"
136
- ) {
137
- oType = DataType.getType("object");
138
- }
139
- if (vPropertyValue === null) {
140
- vPropertyValue = oPropertyInfo.getDefaultValue() || oType.getDefaultValue();
141
- } else {
142
- // unescape binding like XMLTemplateProcessor
143
- var vUnescaped = ManagedObject.bindingParser(vPropertyValue, undefined, true);
144
- // if it is a binding, return undefined as it has to be handled differently
145
- if (isPlainObject(vUnescaped)) {
146
- if (vUnescaped.path || vUnescaped.parts) {
147
- vPropertyValue = undefined;
136
+ return XmlTreeModifier.getControlMetadata(oControl)
137
+ .then(function (oMetadata) {
138
+ oPropertyInfo = oMetadata.getProperty(sPropertyName);
139
+ if (oPropertyInfo) { //not a property like aggregation
140
+ oType = oPropertyInfo.getType();
141
+ if (
142
+ sPropertyName === "value"
143
+ && XmlTreeModifier.getControlType(oControl) === "sap.ui.core.CustomData"
144
+ ) {
145
+ return XmlTreeModifier.getProperty(oControl, "key")
146
+ .then(function (oKeyProperty) {
147
+ if (oKeyProperty === "sap-ui-custom-settings") {
148
+ oType = DataType.getType("object");
149
+ }
150
+ });
151
+ }
152
+ }
153
+ return undefined;
154
+ })
155
+ .then(function () {
156
+ if (oPropertyInfo) {
157
+ if (vPropertyValue === null) {
158
+ vPropertyValue = oPropertyInfo.getDefaultValue() || oType.getDefaultValue();
148
159
  } else {
149
- vPropertyValue = vUnescaped;
160
+ // unescape binding like XMLTemplateProcessor
161
+ var vUnescaped = ManagedObject.bindingParser(vPropertyValue, undefined, true);
162
+ // if it is a binding, return undefined as it has to be handled differently
163
+ if (isPlainObject(vUnescaped)) {
164
+ if (vUnescaped.path || vUnescaped.parts) {
165
+ vPropertyValue = undefined;
166
+ } else {
167
+ vPropertyValue = vUnescaped;
168
+ }
169
+ } else {
170
+ vPropertyValue = oType.parseValue(vUnescaped || vPropertyValue);
171
+ }
150
172
  }
151
- } else {
152
- vPropertyValue = oType.parseValue(vUnescaped || vPropertyValue);
153
173
  }
154
- }
155
- }
156
- return vPropertyValue;
174
+ return vPropertyValue;
175
+ });
157
176
  },
158
177
 
159
178
  /**
@@ -185,6 +204,7 @@ sap.ui.define([
185
204
  return vUnescaped;
186
205
  }
187
206
  }
207
+ return undefined;
188
208
  },
189
209
 
190
210
  /**
@@ -192,6 +212,7 @@ sap.ui.define([
192
212
  */
193
213
  createAndAddCustomData: function(oControl, sCustomDataKey, sValue) {
194
214
  oControl.setAttributeNS(CUSTOM_DATA_NS, "custom.data.via.modifier:" + sCustomDataKey, XmlTreeModifier._escapeCurlyBracketsInString(sValue));
215
+ return Promise.resolve();
195
216
  },
196
217
 
197
218
  /**
@@ -213,16 +234,19 @@ sap.ui.define([
213
234
  if (sId) {
214
235
  oNewElementNode.setAttribute("id", sId);
215
236
  }
216
- if (mSettings) {
217
- XmlTreeModifier.applySettings(oNewElementNode, mSettings);
218
- }
219
- return bAsync ? Promise.resolve(oNewElementNode) : oNewElementNode;
237
+ return Promise.resolve()
238
+ .then(function () {
239
+ if (mSettings) {
240
+ return XmlTreeModifier.applySettings(oNewElementNode, mSettings);
241
+ }
242
+ return undefined;
243
+ })
244
+ .then(function () {
245
+ return Promise.resolve(oNewElementNode);
246
+ });
220
247
  } else {
221
248
  oError = new Error("Can't create a control with duplicated ID " + sId);
222
- if (bAsync) {
223
- return Promise.reject(oError);
224
- }
225
- throw oError;
249
+ return Promise.reject(oError);
226
250
  }
227
251
  },
228
252
 
@@ -230,27 +254,29 @@ sap.ui.define([
230
254
  * @inheritDoc
231
255
  */
232
256
  applySettings: function(oControl, mSettings) {
233
- var oMetadata = XmlTreeModifier.getControlMetadata(oControl);
234
- var mMetadata = oMetadata.getJSONKeys();
235
- Object.keys(mSettings).forEach(function(sKey) {
236
- var oKeyInfo = mMetadata[sKey];
237
- var vValue = mSettings[sKey];
238
- switch (oKeyInfo._iKind) {
239
- case 0: // PROPERTY
240
- // Settings provided as property could have some bindings that needs to be resolved by the core
241
- // and therefore they shouldn't be escaped by setProperty function. In opposite to the common
242
- // setProperty functionality!
243
- XmlTreeModifier._setProperty(oControl, sKey, vValue, false);
244
- break;
245
- // case 1: // SINGLE_AGGREGATION
246
- // XmlTreeModifier.insertAggregation(oControl, sKey, vValue);
247
- case 3: // SINGLE_ASSOCIATION
248
- XmlTreeModifier.setAssociation(oControl, sKey, vValue);
249
- break;
250
- default:
251
- throw new Error("Unsupported in applySettings on XMLTreeModifier: " + sKey);
252
- }
253
- });
257
+ return XmlTreeModifier.getControlMetadata(oControl)
258
+ .then(function (oMetadata) {
259
+ var mMetadata = oMetadata.getJSONKeys();
260
+ Object.keys(mSettings).forEach(function(sKey) {
261
+ var oKeyInfo = mMetadata[sKey];
262
+ var vValue = mSettings[sKey];
263
+ switch (oKeyInfo._iKind) {
264
+ case 0: // PROPERTY
265
+ // Settings provided as property could have some bindings that needs to be resolved by the core
266
+ // and therefore they shouldn't be escaped by setProperty function. In opposite to the common
267
+ // setProperty functionality!
268
+ XmlTreeModifier._setProperty(oControl, sKey, vValue, false);
269
+ break;
270
+ // case 1: // SINGLE_AGGREGATION
271
+ // XmlTreeModifier.insertAggregation(oControl, sKey, vValue);
272
+ case 3: // SINGLE_ASSOCIATION
273
+ XmlTreeModifier.setAssociation(oControl, sKey, vValue);
274
+ break;
275
+ default:
276
+ throw new Error("Unsupported in applySettings on XMLTreeModifier: " + sKey);
277
+ }
278
+ });
279
+ });
254
280
  },
255
281
 
256
282
  /**
@@ -262,10 +288,10 @@ sap.ui.define([
262
288
  if (oView) {
263
289
  if (oView.ownerDocument && oView.ownerDocument.getElementById && oView.ownerDocument.getElementById(sId)) {
264
290
  return oView.ownerDocument.getElementById(sId);
265
- } else {
266
- return oView.querySelector("[id='" + sId + "']");
267
291
  }
292
+ return oView.querySelector("[id='" + sId + "']");
268
293
  }
294
+ return undefined;
269
295
  },
270
296
 
271
297
  /**
@@ -324,111 +350,145 @@ sap.ui.define([
324
350
  * @inheritDoc
325
351
  */
326
352
  getAllAggregations: function (oControl) {
327
- var oControlMetadata = XmlTreeModifier.getControlMetadata(oControl);
328
- return oControlMetadata.getAllAggregations();
353
+ return XmlTreeModifier.getControlMetadata(oControl)
354
+ .then(function (oControlMetadata) {
355
+ return oControlMetadata.getAllAggregations();
356
+ });
329
357
  },
330
358
 
331
359
  /**
332
360
  * @inheritDoc
333
361
  */
334
362
  getAggregation: function (oParent, sName) {
335
- var oAggregationNode = XmlTreeModifier._findAggregationNode(oParent, sName);
336
- var bSingleValueAggregation = XmlTreeModifier._isSingleValueAggregation(oParent, sName);
337
363
  var aChildren = [];
338
- if (oAggregationNode) {
339
- aChildren = XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode);
340
- } else if (XmlTreeModifier._isAltTypeAggregation(oParent, sName) && bSingleValueAggregation) {
341
- aChildren.push(XmlTreeModifier.getProperty(oParent, sName));
342
- }
343
- if (sName === "customData") {
344
- //check namespaced attributes:
345
- var mCustomSettings;
346
- var aNewCustomData = Array.prototype.slice.call(oParent.attributes).reduce(function(aNamespacedCustomData, oAttribute) {
347
- var sLocalName = XmlTreeModifier._getLocalName(oAttribute);
348
- if (oAttribute.namespaceURI === CUSTOM_DATA_NS) {
349
- var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
350
- oNewCustomData.setAttribute("key", sLocalName);
351
- oNewCustomData.setAttribute("value", oAttribute.value);
352
- aNamespacedCustomData.push(oNewCustomData);
353
- } else if (oAttribute.namespaceURI && oAttribute.name.indexOf("xmlns:") !== 0 ) { // other, unknown namespace and not an xml namespace alias definition
354
- if (!mCustomSettings) {
355
- mCustomSettings = {};
356
- }
357
- if (!mCustomSettings.hasOwnProperty(oAttribute.namespaceURI)) {
358
- mCustomSettings[oAttribute.namespaceURI] = {};
364
+ var bSingleValueAggregation;
365
+ return XmlTreeModifier._isSingleValueAggregation(oParent, sName)
366
+ .then(function (bSingleValueAggregationReturn) {
367
+ bSingleValueAggregation = bSingleValueAggregationReturn;
368
+ return XmlTreeModifier._findAggregationNode(oParent, sName);
369
+ })
370
+ .then(function (oAggregationNode) {
371
+ if (oAggregationNode) {
372
+ return XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode)
373
+ .then(function (aChildrenLocal) {
374
+ aChildren = aChildrenLocal;
375
+ });
376
+ }
377
+ return XmlTreeModifier._isAltTypeAggregation(oParent, sName)
378
+ .then(function (isAltTypeAggregation) {
379
+ if (isAltTypeAggregation && bSingleValueAggregation) {
380
+ return XmlTreeModifier.getProperty(oParent, sName)
381
+ .then(function (oChild) {
382
+ aChildren.push(oChild);
383
+ });
384
+ }
385
+ return undefined;
386
+ });
387
+ })
388
+ .then(function () {
389
+ if (sName === "customData") {
390
+ //check namespaced attributes:
391
+ var mCustomSettings;
392
+ var aNewCustomData = Array.prototype.slice.call(oParent.attributes).reduce(function(aNamespacedCustomData, oAttribute) {
393
+ var sLocalName = XmlTreeModifier._getLocalName(oAttribute);
394
+ if (oAttribute.namespaceURI === CUSTOM_DATA_NS) {
395
+ var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
396
+ oNewCustomData.setAttribute("key", sLocalName);
397
+ oNewCustomData.setAttribute("value", oAttribute.value);
398
+ aNamespacedCustomData.push(oNewCustomData);
399
+ } else if (oAttribute.namespaceURI && oAttribute.name.indexOf("xmlns:") !== 0 ) { // other, unknown namespace and not an xml namespace alias definition
400
+ if (!mCustomSettings) {
401
+ mCustomSettings = {};
402
+ }
403
+ if (!mCustomSettings.hasOwnProperty(oAttribute.namespaceURI)) {
404
+ mCustomSettings[oAttribute.namespaceURI] = {};
405
+ }
406
+ mCustomSettings[oAttribute.namespaceURI][sLocalName] = oAttribute.nodeValue;
407
+ }
408
+ return aNamespacedCustomData;
409
+ }, []);
410
+ aChildren = aChildren.concat(aNewCustomData);
411
+ //add custom settings as custom data "sap-ui-custom-settings"
412
+ if (mCustomSettings) {
413
+ var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
414
+ oNewCustomData.setAttribute("key", "sap-ui-custom-settings");
415
+ XmlTreeModifier.setProperty(oNewCustomData, "value", mCustomSettings);
416
+ aChildren.push(oNewCustomData);
359
417
  }
360
- mCustomSettings[oAttribute.namespaceURI][sLocalName] = oAttribute.nodeValue;
361
418
  }
362
- return aNamespacedCustomData;
363
- }, []);
364
- aChildren = aChildren.concat(aNewCustomData);
365
- //add custom settings as custom data "sap-ui-custom-settings"
366
- if (mCustomSettings) {
367
- var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
368
- oNewCustomData.setAttribute("key", "sap-ui-custom-settings");
369
- XmlTreeModifier.setProperty(oNewCustomData, "value", mCustomSettings);
370
- aChildren.push(oNewCustomData);
371
- }
372
- }
373
- return bSingleValueAggregation ? aChildren[0] : aChildren;
419
+ return bSingleValueAggregation ? aChildren[0] : aChildren;
420
+ });
374
421
  },
375
422
 
376
423
  /**
377
424
  * @inheritDoc
378
425
  */
379
426
  insertAggregation: function (oParent, sName, oObject, iIndex, oView, bSkipAdjustIndex) {
380
- var oAggregationNode = XmlTreeModifier._findAggregationNode(oParent, sName);
381
-
382
- if (!oAggregationNode) {
383
- // named aggregation must have the same namespace as the parent
384
- var sNamespaceURI = oParent.namespaceURI;
385
- // no ids for aggregation nodes => no need pass id or component
386
- oAggregationNode = XmlTreeModifier.createControl(sNamespaceURI + "." + sName, undefined, oView);
387
- oParent.appendChild(oAggregationNode);
388
- }
389
-
390
- if (!bSkipAdjustIndex) {
391
- var aChildren = oAggregationNode.children;
392
- var iOffset = 0;
393
- var iStopIndex = (iIndex < aChildren.length) ? iIndex : aChildren.length;
394
- for (var i = 0; i < iStopIndex; i++) {
395
- if (aChildren[i].namespaceURI === "sap.ui.core" && aChildren[i].tagName.indexOf("ExtensionPoint") > -1) {
396
- iOffset = iOffset + 1 - aChildren[i].children.length;
427
+ return XmlTreeModifier._findAggregationNode(oParent, sName)
428
+ .then(function (oAggregationNode) {
429
+ if (!oAggregationNode) {
430
+ // named aggregation must have the same namespace as the parent
431
+ var sNamespaceURI = oParent.namespaceURI;
432
+ // no ids for aggregation nodes => no need pass id or component
433
+ return XmlTreeModifier.createControl(sNamespaceURI + "." + sName, undefined, oView)
434
+ .then(function (oAggregationNode) {
435
+ oParent.appendChild(oAggregationNode);
436
+ return oAggregationNode;
437
+ });
438
+ }
439
+ return oAggregationNode;
440
+ })
441
+ .then(function (oAggregationNode) {
442
+ if (!bSkipAdjustIndex) {
443
+ var aChildren = oAggregationNode.children;
444
+ var iOffset = 0;
445
+ var iStopIndex = (iIndex < aChildren.length) ? iIndex : aChildren.length;
446
+ for (var i = 0; i < iStopIndex; i++) {
447
+ if (aChildren[i].namespaceURI === "sap.ui.core" && aChildren[i].tagName.indexOf("ExtensionPoint") > -1) {
448
+ iOffset = iOffset + 1 - aChildren[i].children.length;
449
+ }
450
+ }
451
+ iIndex = iIndex + iOffset;
397
452
  }
398
- }
399
- iIndex = iIndex + iOffset;
400
- }
401
-
402
- if (iIndex >= oAggregationNode.childElementCount) {
403
- oAggregationNode.appendChild(oObject);
404
- } else {
405
- var oReferenceNode = XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode)[iIndex];
406
- oAggregationNode.insertBefore(oObject, oReferenceNode);
407
- }
408
453
 
454
+ if (iIndex >= oAggregationNode.childElementCount) {
455
+ oAggregationNode.appendChild(oObject);
456
+ } else {
457
+ return XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode)
458
+ .then(function (aReferenceNodes) {
459
+ oAggregationNode.insertBefore(oObject, aReferenceNodes[iIndex]);
460
+ });
461
+ }
462
+ return undefined;
463
+ });
409
464
  },
410
465
 
411
466
  /**
412
467
  * @inheritDoc
413
468
  */
414
469
  removeAggregation: function (oParent, sName, oObject) {
415
- var oAggregationNode = XmlTreeModifier._findAggregationNode(oParent, sName);
416
- oAggregationNode.removeChild(oObject);
470
+ return XmlTreeModifier._findAggregationNode(oParent, sName)
471
+ .then(function (oAggregationNode) {
472
+ oAggregationNode.removeChild(oObject);
473
+ });
417
474
  },
418
475
 
419
476
  /**
420
477
  * @inheritDoc
421
478
  */
422
479
  removeAllAggregation: function (oControl, sName) {
423
- var oAggregationNode = XmlTreeModifier._findAggregationNode(oControl, sName);
424
- if (oControl === oAggregationNode) {
425
- var aChildControls = XmlTreeModifier._getControlsInAggregation(oControl, oControl);
426
- aChildControls.forEach(function(oChildControl) {
427
- oControl.removeChild(oChildControl);
480
+ return XmlTreeModifier._findAggregationNode(oControl, sName)
481
+ .then(function (oAggregationNode) {
482
+ if (oControl === oAggregationNode) {
483
+ return XmlTreeModifier._getControlsInAggregation(oControl, oControl)
484
+ .then(function (aChildControls) {
485
+ aChildControls.forEach(function(oChildControl) {
486
+ oControl.removeChild(oChildControl);
487
+ });
488
+ });
489
+ }
490
+ return oControl.removeChild(oAggregationNode);
428
491
  });
429
- } else {
430
- oControl.removeChild(oAggregationNode);
431
- }
432
492
  },
433
493
 
434
494
  /**
@@ -444,46 +504,64 @@ sap.ui.define([
444
504
  break;
445
505
  }
446
506
  }
447
- if (!oAggregationNode && XmlTreeModifier._isDefaultAggregation(oParent, sName)) {
448
- oAggregationNode = oParent;
507
+ var oPromise = Promise.resolve(oAggregationNode);
508
+ if (!oAggregationNode) {
509
+ oPromise = oPromise
510
+ .then(XmlTreeModifier._isDefaultAggregation.bind(XmlTreeModifier, oParent, sName))
511
+ .then(function (bIsDefaultAggregation) {
512
+ if (bIsDefaultAggregation) {
513
+ return oParent;
514
+ }
515
+ return oAggregationNode;
516
+ });
449
517
  }
450
- return oAggregationNode;
518
+ return oPromise;
451
519
  },
452
520
 
453
521
  /**
454
522
  * @private
455
523
  */
456
524
  _isDefaultAggregation: function(oParent, sAggregationName) {
457
- var oControlMetadata = XmlTreeModifier.getControlMetadata(oParent);
458
- var oDefaultAggregation = oControlMetadata.getDefaultAggregation();
459
- return oDefaultAggregation && sAggregationName === oDefaultAggregation.name;
525
+ return XmlTreeModifier.getControlMetadata(oParent)
526
+ .then(function (oControlMetadata) {
527
+ var oDefaultAggregation = oControlMetadata.getDefaultAggregation();
528
+ return oDefaultAggregation && sAggregationName === oDefaultAggregation.name;
529
+ });
460
530
  },
461
531
 
462
532
  /**
463
533
  * @private
464
534
  */
465
535
  _isNotNamedAggregationNode: function(oParent, oChildNode) {
466
- var mAllAggregatiosnMetadata = XmlTreeModifier.getAllAggregations(oParent);
467
- var oAggregation = mAllAggregatiosnMetadata[oChildNode.localName];
468
- return oParent.namespaceURI !== oChildNode.namespaceURI || !oAggregation; //same check as in XMLTemplateProcessor (handleChild)
536
+ return XmlTreeModifier.getAllAggregations(oParent)
537
+ .then(function (mAllAggregatiosnMetadata) {
538
+ var oAggregation = mAllAggregatiosnMetadata[oChildNode.localName];
539
+ return oParent.namespaceURI !== oChildNode.namespaceURI || !oAggregation; //same check as in XMLTemplateProcessor (handleChild)
540
+ });
469
541
  },
470
542
 
471
543
  /**
472
544
  * @private
473
545
  */
474
546
  _isSingleValueAggregation: function(oParent, sAggregationName) {
475
- var mAllAggregatiosnMetadata = XmlTreeModifier.getAllAggregations(oParent);
476
- var oAggregationMetadata = mAllAggregatiosnMetadata[sAggregationName];
477
- return !oAggregationMetadata.multiple;
547
+ return XmlTreeModifier.getAllAggregations(oParent)
548
+ .then(function (mAllAggregatiosnMetadata) {
549
+ var oAggregationMetadata = mAllAggregatiosnMetadata[sAggregationName];
550
+ return !oAggregationMetadata.multiple;
551
+ });
478
552
  },
479
553
 
480
554
  /**
481
555
  * @private
482
556
  */
483
557
  _isAltTypeAggregation: function(oParent, sAggregationName) {
484
- var oControlMetadata = XmlTreeModifier.getControlMetadata(oParent);
485
- var oAggregationMetadata = oControlMetadata.getAllAggregations()[sAggregationName];
486
- return !!oAggregationMetadata.altTypes;
558
+ return XmlTreeModifier.getControlMetadata(oParent)
559
+ .then(function (oControlMetadata) {
560
+ return oControlMetadata.getAllAggregations()[sAggregationName];
561
+ })
562
+ .then(function (oAggregationMetadata) {
563
+ return !!oAggregationMetadata.altTypes;
564
+ });
487
565
  },
488
566
 
489
567
  /**
@@ -506,7 +584,15 @@ sap.ui.define([
506
584
  _getControlsInAggregation: function(oParent, oAggregationNode) {
507
585
  //convert NodeList to Array
508
586
  var aChildren = Array.prototype.slice.call(XmlTreeModifier._children(oAggregationNode));
509
- return aChildren.filter(XmlTreeModifier._isNotNamedAggregationNode.bind(this, oParent));
587
+ return Promise.all(aChildren.map(function (oChild) {
588
+ return XmlTreeModifier._isNotNamedAggregationNode(oParent, oChild)
589
+ .then(function (bIsNotNamedAggregationNode) {
590
+ return bIsNotNamedAggregationNode ? oChild : undefined;
591
+ });
592
+ }))
593
+ .then(function (aChildren) {
594
+ return aChildren.filter(function (oChild) { return !!oChild; });
595
+ });
510
596
  },
511
597
 
512
598
  /**
@@ -531,13 +617,16 @@ sap.ui.define([
531
617
  * @inheritDoc
532
618
  */
533
619
  getBindingTemplate: function (oControl, sAggregationName) {
534
- var oAggregationNode = XmlTreeModifier._findAggregationNode(oControl, sAggregationName);
535
- if (oAggregationNode) {
536
- var aChildren = XmlTreeModifier._children(oAggregationNode);
537
- if (aChildren.length === 1){
538
- return aChildren[0];
539
- }
540
- }
620
+ return XmlTreeModifier._findAggregationNode(oControl, sAggregationName)
621
+ .then(function (oAggregationNode) {
622
+ if (oAggregationNode) {
623
+ var aChildren = XmlTreeModifier._children(oAggregationNode);
624
+ if (aChildren.length === 1){
625
+ return aChildren[0];
626
+ }
627
+ }
628
+ return undefined;
629
+ });
541
630
  },
542
631
 
543
632
  /**
@@ -551,82 +640,97 @@ sap.ui.define([
551
640
  * @inheritDoc
552
641
  */
553
642
  findIndexInParentAggregation: function (oControl) {
554
- var oParent,
555
- sAggregationName,
556
- aControlsInAggregation;
557
-
558
643
  // find the parent
559
- oParent = XmlTreeModifier.getParent(oControl);
644
+ var oParent = XmlTreeModifier.getParent(oControl);
560
645
 
561
646
  if (!oParent) {
562
- return -1;
647
+ return Promise.resolve(-1);
563
648
  }
564
649
 
565
650
  // we need the aggregation name in order to find all control nodes in the parent
566
651
  // which are relevant to this aggregation and skip all other possible nodes
567
- sAggregationName = XmlTreeModifier.getParentAggregationName(oControl, oParent);
568
-
569
- // get the relevant controls from the aggregation node
570
- aControlsInAggregation = XmlTreeModifier.getAggregation(oParent, sAggregationName);
571
-
572
- // if the result from the above is array:
573
- if (Array.isArray(aControlsInAggregation)) {
574
- // to harmonize behavior with JSControlTree, where stashed controls are not added to the parent aggregation
575
- aControlsInAggregation = aControlsInAggregation.filter(function(oControl) {
576
- if (XmlTreeModifier._isExtensionPoint(oControl)) {
577
- return true;
652
+ return XmlTreeModifier.getParentAggregationName(oControl, oParent)
653
+ .then(function (sAggregationName) {
654
+ // get the relevant controls from the aggregation node
655
+ return XmlTreeModifier.getAggregation(oParent, sAggregationName);
656
+ })
657
+ .then(function (aControlsInAggregation) {
658
+ // if the result from the above is array:
659
+ if (Array.isArray(aControlsInAggregation)) {
660
+ // to harmonize behavior with JSControlTree, where stashed controls are not added to the parent aggregation
661
+ var aPromises = aControlsInAggregation.map(function (oControl) {
662
+ return Promise.resolve()
663
+ .then(function () {
664
+ if (XmlTreeModifier._isExtensionPoint(oControl)) {
665
+ return oControl;
666
+ }
667
+ return XmlTreeModifier.getProperty(oControl, "stashed")
668
+ .then(function (oProperty) {
669
+ return !oProperty ? oControl : undefined;
670
+ });
671
+ });
672
+ });
673
+ return Promise.all(aPromises)
674
+ .then(function (aControlsInAggregation) {
675
+ // find and return the correct index
676
+ return aControlsInAggregation.filter(function (oControl) {
677
+ return !!oControl;
678
+ }).indexOf(oControl);
679
+ });
680
+ } else {
681
+ // if aControlsInAggregation is not an array, then the aggregation is
682
+ // of type 0..1 and aControlsInAggregation is the oControl provided
683
+ // to the function initially, so its index is 0
684
+ return 0;
578
685
  }
579
- return !XmlTreeModifier.getProperty(oControl, "stashed");
580
686
  });
581
-
582
- // find and return the correct index
583
- return aControlsInAggregation.indexOf(oControl);
584
- } else {
585
- // if aControlsInAggregation is not an array, then the aggregation is
586
- // of type 0..1 and aControlsInAggregation is the oControl provided
587
- // to the function initially, so its index is 0
588
- return 0;
589
- }
590
687
  },
591
688
 
592
689
  /**
593
690
  * @inheritDoc
594
691
  */
595
692
  getParentAggregationName: function (oControl, oParent) {
596
- var bNotNamedAggregation,
597
- sAggregationName;
598
-
599
- // check if the control is in named aggregatio node
600
- if (!oParent.isSameNode(oControl.parentNode)) {
601
- // the control is in named aggregation
602
- bNotNamedAggregation = false;
603
- } else {
604
- // again check just in case
605
- bNotNamedAggregation = XmlTreeModifier._isNotNamedAggregationNode(oParent, oControl);
606
- }
607
-
608
- // check if the the control is in default aggregation
609
- // and get the name of the aggregation
610
- if (bNotNamedAggregation) {
611
- // the control is in the default aggregation of the parent
612
- sAggregationName = XmlTreeModifier.getControlMetadata(oParent).getDefaultAggregationName();
613
- } else {
614
- // the agregation name is provided and we can simply take it from the xml node
615
- sAggregationName = XmlTreeModifier._getLocalName(oControl.parentNode);
616
- }
617
-
618
- return sAggregationName;
693
+ return Promise.resolve()
694
+ .then(function () {
695
+ // check if the control is in named aggregatio node
696
+ if (!oParent.isSameNode(oControl.parentNode)) {
697
+ // the control is in named aggregation
698
+ return false;
699
+ } else {
700
+ // again check just in case
701
+ return XmlTreeModifier._isNotNamedAggregationNode(oParent, oControl);
702
+ }
703
+ })
704
+ .then(function (bNotNamedAggregation) {
705
+ // check if the the control is in default aggregation
706
+ // and get the name of the aggregation
707
+ if (bNotNamedAggregation) {
708
+ // the control is in the default aggregation of the parent
709
+ return XmlTreeModifier.getControlMetadata(oParent)
710
+ .then(function (oMetadata) {
711
+ return oMetadata.getDefaultAggregationName();
712
+ });
713
+ } else {
714
+ // the agregation name is provided and we can simply take it from the xml node
715
+ return XmlTreeModifier._getLocalName(oControl.parentNode);
716
+ }
717
+ });
619
718
  },
620
719
 
621
720
  /**
622
721
  * @inheritDoc
623
722
  */
624
723
  findAggregation: function(oControl, sAggregationName) {
625
- var oMetadata = XmlTreeModifier.getControlMetadata(oControl);
626
- var oAggregations = oMetadata.getAllAggregations();
627
- if (oAggregations) {
628
- return oAggregations[sAggregationName];
629
- }
724
+ return XmlTreeModifier.getControlMetadata(oControl)
725
+ .then(function (oMetadata) {
726
+ return oMetadata.getAllAggregations();
727
+ })
728
+ .then(function (oAggregations) {
729
+ if (oAggregations) {
730
+ return oAggregations[sAggregationName];
731
+ }
732
+ return undefined;
733
+ });
630
734
  },
631
735
 
632
736
  /**
@@ -635,44 +739,51 @@ sap.ui.define([
635
739
  validateType: function(oControl, mAggregationMetadata, oParent, sFragment, iIndex) {
636
740
  var sTypeOrInterface = mAggregationMetadata.type;
637
741
 
638
- // if aggregation is not multiple and already has element inside, then it is not valid for element
639
- if (mAggregationMetadata.multiple === false && XmlTreeModifier.getAggregation(oParent, mAggregationMetadata.name) &&
640
- XmlTreeModifier.getAggregation(oParent, mAggregationMetadata.name).length > 0) {
641
- return false;
642
- }
643
- var aControls = sap.ui.xmlfragment({fragmentContent: sFragment});
644
- if (!Array.isArray(aControls)) {
645
- aControls = [aControls];
646
- }
647
- var bReturn = aControls[iIndex].isA(sTypeOrInterface);
648
- aControls.forEach(function(oFragmentControl) {
649
- oFragmentControl.destroy();
650
- });
651
- return bReturn;
742
+ return XmlTreeModifier.getAggregation(oParent, mAggregationMetadata.name)
743
+ .then(function (oAggregation) {
744
+ // if aggregation is not multiple and already has element inside, then it is not valid for element
745
+ if (mAggregationMetadata.multiple === false && oAggregation && oAggregation.length > 0) {
746
+ return false;
747
+ }
748
+ return Fragment.load({
749
+ definition: sFragment
750
+ });
751
+ }).then(function(aControls) {
752
+ if (!Array.isArray(aControls)) {
753
+ aControls = [aControls];
754
+ }
755
+ var bReturn = aControls[iIndex].isA(sTypeOrInterface);
756
+ aControls.forEach(function(oFragmentControl) {
757
+ oFragmentControl.destroy();
758
+ });
759
+ return bReturn;
760
+ });
652
761
  },
653
762
 
654
763
  /**
655
764
  * @inheritDoc
656
765
  */
657
766
  instantiateFragment: function(sFragment, sNamespace, oView) {
658
- var aControls;
659
767
  var oFragment = XMLHelper.parse(sFragment);
660
- oFragment = XmlTreeModifier._checkAndPrefixIdsInFragment(oFragment, sNamespace);
768
+ return XmlTreeModifier._checkAndPrefixIdsInFragment(oFragment, sNamespace)
769
+ .then(function (oFragment) {
770
+ var aControls;
661
771
 
662
- if (oFragment.localName === "FragmentDefinition") {
663
- aControls = XmlTreeModifier._getElementNodeChildren(oFragment);
664
- } else {
665
- aControls = [oFragment];
666
- }
772
+ if (oFragment.localName === "FragmentDefinition") {
773
+ aControls = XmlTreeModifier._getElementNodeChildren(oFragment);
774
+ } else {
775
+ aControls = [oFragment];
776
+ }
667
777
 
668
- // check if there is already a field with the same ID and throw error if so
669
- aControls.forEach(function(oNode) {
670
- if (XmlTreeModifier._byId(oNode.getAttribute("id"), oView)) {
671
- throw Error("The following ID is already in the view: " + oNode.getAttribute("id"));
672
- }
673
- });
778
+ // check if there is already a field with the same ID and throw error if so
779
+ aControls.forEach(function(oNode) {
780
+ if (XmlTreeModifier._byId(oNode.getAttribute("id"), oView)) {
781
+ throw Error("The following ID is already in the view: " + oNode.getAttribute("id"));
782
+ }
783
+ });
674
784
 
675
- return aControls;
785
+ return aControls;
786
+ });
676
787
  },
677
788
 
678
789
  /**
@@ -709,25 +820,27 @@ sap.ui.define([
709
820
  */
710
821
  attachEvent: function(oNode, sEventName, sFunctionPath, vData) {
711
822
  if (typeof ObjectPath.get(sFunctionPath) !== "function") {
712
- throw new Error("Can't attach event because the event handler function is not found or not a function.");
823
+ return Promise.reject(new Error("Can't attach event because the event handler function is not found or not a function."));
713
824
  }
825
+ return XmlTreeModifier.getProperty(oNode, sEventName)
826
+ .then(function (sValue) {
827
+ sValue = sValue || "";
828
+ var aEventHandlers = EventHandlerResolver.parse(sValue);
829
+ var sEventHandler = sFunctionPath;
830
+ var aParams = ["$event"];
714
831
 
715
- var sValue = XmlTreeModifier.getProperty(oNode, sEventName) || "";
716
- var aEventHandlers = EventHandlerResolver.parse(sValue);
717
- var sEventHandler = sFunctionPath;
718
- var aParams = ["$event"];
719
-
720
- if (vData) {
721
- aParams.push(JSON.stringify(vData));
722
- }
832
+ if (vData) {
833
+ aParams.push(JSON.stringify(vData));
834
+ }
723
835
 
724
- sEventHandler += "(" + aParams.join(",") + ")";
836
+ sEventHandler += "(" + aParams.join(",") + ")";
725
837
 
726
- if (!includes(aEventHandlers, sEventHandler)) {
727
- aEventHandlers.push(sEventHandler);
728
- }
838
+ if (!includes(aEventHandlers, sEventHandler)) {
839
+ aEventHandlers.push(sEventHandler);
840
+ }
729
841
 
730
- oNode.setAttribute(sEventName, aEventHandlers.join(";"));
842
+ oNode.setAttribute(sEventName, aEventHandlers.join(";"));
843
+ });
731
844
  },
732
845
 
733
846
  /**
@@ -735,68 +848,86 @@ sap.ui.define([
735
848
  */
736
849
  detachEvent: function(oNode, sEventName, sFunctionPath) {
737
850
  if (typeof ObjectPath.get(sFunctionPath) !== "function") {
738
- throw new Error("Can't attach event because the event handler function is not found or not a function.");
851
+ return Promise.reject(new Error("Can't attach event because the event handler function is not found or not a function."));
739
852
  }
853
+ return XmlTreeModifier.getProperty(oNode, sEventName)
854
+ .then(function (sValue) {
855
+ sValue = sValue || "";
856
+ var aEventHandlers = EventHandlerResolver.parse(sValue);
740
857
 
741
- var sValue = XmlTreeModifier.getProperty(oNode, sEventName) || "";
742
- var aEventHandlers = EventHandlerResolver.parse(sValue);
858
+ var iEventHandlerIndex = aEventHandlers.findIndex(function (sEventHandler) {
859
+ return sEventHandler.includes(sFunctionPath);
860
+ });
743
861
 
744
- var iEventHandlerIndex = aEventHandlers.findIndex(function (sEventHandler) {
745
- return sEventHandler.includes(sFunctionPath);
746
- });
747
-
748
- if (iEventHandlerIndex > -1) {
749
- aEventHandlers.splice(iEventHandlerIndex, 1);
750
- }
862
+ if (iEventHandlerIndex > -1) {
863
+ aEventHandlers.splice(iEventHandlerIndex, 1);
864
+ }
751
865
 
752
- if (aEventHandlers.length) {
753
- oNode.setAttribute(sEventName, aEventHandlers.join(";"));
754
- } else {
755
- oNode.removeAttribute(sEventName);
756
- }
866
+ if (aEventHandlers.length) {
867
+ oNode.setAttribute(sEventName, aEventHandlers.join(";"));
868
+ } else {
869
+ oNode.removeAttribute(sEventName);
870
+ }
871
+ });
757
872
  },
758
873
 
759
874
  /**
760
875
  * @inheritDoc
761
876
  */
762
877
  bindAggregation: function (oNode, sAggregationName, vBindingInfos, oView) {
763
- XmlTreeModifier.bindProperty(oNode, sAggregationName, vBindingInfos.path);
764
- XmlTreeModifier.insertAggregation(oNode, sAggregationName, vBindingInfos.template, 0, oView);
878
+ return Promise.resolve()
879
+ .then(function () {
880
+ XmlTreeModifier.bindProperty(oNode, sAggregationName, vBindingInfos.path);
881
+ return XmlTreeModifier.insertAggregation(oNode, sAggregationName, vBindingInfos.template, 0, oView);
882
+ });
765
883
  },
766
884
 
767
885
  /**
768
886
  * @inheritDoc
769
887
  */
770
888
  unbindAggregation: function (oNode, sAggregationName) {
771
- if (oNode.hasAttribute(sAggregationName)) {
772
- oNode.removeAttribute(sAggregationName);
773
- XmlTreeModifier.removeAllAggregation(oNode, sAggregationName);
774
- }
889
+ return Promise.resolve()
890
+ .then(function () {
891
+ if (oNode.hasAttribute(sAggregationName)) {
892
+ oNode.removeAttribute(sAggregationName);
893
+ return XmlTreeModifier.removeAllAggregation(oNode, sAggregationName);
894
+ }
895
+ return undefined;
896
+ });
775
897
  },
776
898
 
777
899
  /**
778
900
  * @inheritDoc
779
901
  */
780
902
  getExtensionPointInfo: function(sExtensionPointName, oView) {
781
- if (oView && sExtensionPointName) {
782
- var aExtensionPoints = Array.prototype.slice.call(oView.getElementsByTagNameNS("sap.ui.core", "ExtensionPoint"));
783
- var aFilteredExtensionPoints = aExtensionPoints.filter(function(oExtPoint) {
784
- return oExtPoint.getAttribute("name") === sExtensionPointName;
903
+ return Promise.resolve()
904
+ .then(function () {
905
+ if (oView && sExtensionPointName) {
906
+ var aExtensionPoints = Array.prototype.slice.call(oView.getElementsByTagNameNS("sap.ui.core", "ExtensionPoint"));
907
+ var aFilteredExtensionPoints = aExtensionPoints.filter(function(oExtPoint) {
908
+ return oExtPoint.getAttribute("name") === sExtensionPointName;
909
+ });
910
+ var oExtensionPoint = (aFilteredExtensionPoints.length === 1) ? aFilteredExtensionPoints[0] : undefined;
911
+ if (oExtensionPoint) {
912
+ var oParent = XmlTreeModifier.getParent(oExtensionPoint);
913
+
914
+ return Promise.all([
915
+ XmlTreeModifier.getParentAggregationName(oExtensionPoint, oParent),
916
+ XmlTreeModifier.findIndexInParentAggregation(oExtensionPoint)
917
+ ]).then(function (aProperties) {
918
+ // increase the index by 1 to get the index behind the extension point for xml-case
919
+ var oExtensionPointInfo = {
920
+ parent: oParent,
921
+ aggregationName: aProperties[0],
922
+ index: aProperties[1] + 1,
923
+ defaultContent: Array.prototype.slice.call(XmlTreeModifier._children(oExtensionPoint))
924
+ };
925
+ return oExtensionPointInfo;
926
+ });
927
+ }
928
+ }
929
+ return undefined;
785
930
  });
786
- var oExtensionPoint = (aFilteredExtensionPoints.length === 1) ? aFilteredExtensionPoints[0] : undefined;
787
- if (oExtensionPoint) {
788
- var oParent = XmlTreeModifier.getParent(oExtensionPoint);
789
- // increase the index by 1 to get the index behind the extension point for xml-case
790
- var oExtensionPointInfo = {
791
- parent: oParent,
792
- aggregationName: XmlTreeModifier.getParentAggregationName(oExtensionPoint, oParent),
793
- index: XmlTreeModifier.findIndexInParentAggregation(oExtensionPoint) + 1,
794
- defaultContent: Array.prototype.slice.call(XmlTreeModifier._children(oExtensionPoint))
795
- };
796
-
797
- return oExtensionPointInfo;
798
- }
799
- }
800
931
  }
801
932
  });
802
933