@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
@@ -50,10 +50,8 @@ sap.ui.define([
50
50
  */
51
51
  _display: function (vData, oSequencePromise, oTargetCreateInfo) {
52
52
  if (this._oParent) {
53
- // replace the sync
54
53
  oSequencePromise = this._oParent._display(vData, oSequencePromise, Object.assign({}, oTargetCreateInfo));
55
54
  }
56
-
57
55
  return this._place(vData, oSequencePromise, oTargetCreateInfo);
58
56
  },
59
57
 
@@ -215,284 +213,372 @@ sap.ui.define([
215
213
  },
216
214
 
217
215
  /**
218
- * Here the magic happens - recursion + placement + view creation needs to be refactored
216
+ * Load the target and wait for the first <code>routeMatched</code> event if it's a Component target
219
217
  *
220
- * @param {object} [vData] an object that will be passed to the display event in the data property. If the
221
- * target has parents, the data will also be passed to them.
222
- * @param {Promise} oSequencePromise Promise chain for resolution in the correct order
223
- * @param {object} oTargetCreateInfo Additional information for the component creation. Currently the object only contains the prefix for the routerHashChanger
224
- * @return {Promise} resolves with {name: *, view: *, control: *} if the target can be successfully displayed otherwise it rejects with an error message
218
+ * @param {object} oTargetCreateInfo The corresponding target create info
219
+ * @return {Promise} Promise resolving with the loaded target object and the promise that waits for the
220
+ * <code>routeMatched</code> event in case of a Component target
225
221
  * @private
226
222
  */
227
- _place: function (vData, oSequencePromise, oTargetCreateInfo) {
228
- if (vData instanceof Promise) {
229
- oTargetCreateInfo = oSequencePromise;
230
- oSequencePromise = vData;
231
- vData = undefined;
232
- }
223
+ load: function(oTargetCreateInfo) {
224
+ return this._load(oTargetCreateInfo)
225
+ .then(function (oLoadedTarget) {
226
+ return {
227
+ object: oLoadedTarget,
228
+ nestedComponentReady: this.waitForComponentTarget({
229
+ target: oLoadedTarget,
230
+ createInfo: oTargetCreateInfo
231
+ })
232
+ };
233
+ }.bind(this));
234
+ },
233
235
 
234
- var oOptions = this._oOptions,
235
- that = this,
236
- oObject, sErrorMessage, pLoaded,
237
- bInstantResolve = true,
238
- fnResolve,
239
- pNestedRouteMatched,
240
- bIsComponentTarget = oOptions.type === "Component";
236
+ /**
237
+ * Wait for the next <code>routeMatched</code> event from the Component target
238
+ *
239
+ * @param {object} mTargetOptions The option object that contains the loaded target object and the corresponding
240
+ * target create info.
241
+ * @return {Promise} Promise resolving when the first <code>routeMatched</code> event is fired when the target
242
+ * has type "Component" otherwise the Promise resolves immediately
243
+ * @private
244
+ */
245
+ waitForComponentTarget: function(mTargetOptions) {
246
+ return new Promise(function(resolve, reject) {
247
+ var oLoadedTarget = mTargetOptions.target;
248
+ var oTargetCreateInfo = mTargetOptions.createInfo;
249
+ var bInstantResolve = true;
250
+
251
+ if (oLoadedTarget.isA("sap.ui.core.UIComponent")) {
252
+ var oRouter = oLoadedTarget.getRouter();
253
+ if (oRouter && oLoadedTarget.hasNativeRouter()) {
254
+ var sHash = oRouter.getHashChanger().getHash();
255
+ var oRoute = oRouter.getRouteByHash(sHash);
256
+ var bIgnoreInitialHash = oTargetCreateInfo && oTargetCreateInfo.ignoreInitialHash;
257
+
258
+ if (!oRouter._oConfig.async){
259
+ throw new Error("The router of component '" + oLoadedTarget.getId() +
260
+ "' which is loaded via the target '" + this._oOptions._name +
261
+ "' is defined as synchronous which is not supported using as a nested component.");
262
+ }
241
263
 
242
- oTargetCreateInfo = oTargetCreateInfo || {};
264
+ if (oRouter._oOwner && oTargetCreateInfo) {
265
+ // update the flag once the component is displayed again after it's already loaded
266
+ oRouter._oOwner._bRoutingPropagateTitle = oTargetCreateInfo.propagateTitle;
267
+ }
243
268
 
244
- if ((oOptions.name || oOptions.usage) && oOptions.type) {
245
- pNestedRouteMatched = new Promise(function(resolve) {
246
- fnResolve = resolve;
247
- });
248
- if (bIsComponentTarget) {
249
- oTargetCreateInfo.componentId = that._oOptions.id || ManagedObjectMetadata.uid("uicomponent");
269
+ // TODO: offer getter for target info
270
+ //
271
+ // The router is normally initialized in the UIComponent.prototype.init function and the
272
+ // init function should be already called before it reaches this place which means that the
273
+ // router is initialized in most of the cases. If a router is already initialized, we still
274
+ // need to check whether the route match process is finished. If it's not finished, we are
275
+ // sure that there will be a "routeMatched" event fired and we can wait for it.
276
+ if (!bIgnoreInitialHash && (!oRouter.isInitialized() || oRouter._bMatchingProcessStarted) && oRoute && oRoute._oConfig.target) {
277
+ bInstantResolve = false;
278
+ oRouter.attachRouteMatched(resolve);
279
+ }
280
+ if (oRouter.isStopped()) {
281
+ // initialize the router in nested component
282
+ // if it has been previously stopped
283
+ oRouter.initialize(bIgnoreInitialHash);
284
+ }
285
+ }
250
286
  }
251
- pLoaded = this._load(oTargetCreateInfo).then(function (oObject) {
252
- if (oObject.isA("sap.ui.core.UIComponent")) {
253
- var oRouter = oObject.getRouter();
254
- if (oRouter && oObject.hasNativeRouter()) {
255
- var sHash = oRouter.getHashChanger().getHash();
256
- var oRoute = oRouter.getRouteByHash(sHash);
257
- var bIgnoreInitialHash = oTargetCreateInfo && oTargetCreateInfo.ignoreInitialHash;
258
-
259
- if (!oRouter._oConfig.async){
260
- throw new Error("The router of component '" + oObject.getId() +
261
- "' which is loaded via the target '" + that._oOptions._name +
262
- "' is defined as synchronous which is not supported using as a nested component.");
263
- }
264
287
 
265
- if (oRouter._oOwner && oTargetCreateInfo) {
266
- // update the flag once the component is displayed again after it's already loaded
267
- oRouter._oOwner._bRoutingPropagateTitle = oTargetCreateInfo.propagateTitle;
268
- }
288
+ if (bInstantResolve) {
289
+ resolve();
290
+ }
291
+ }.bind(this));
292
+ },
293
+
294
+ /**
295
+ * Find the container control in the following order:
296
+ * <ul>
297
+ * <li>Within the parent target in case <code>oParentInfo</code> is given</li>
298
+ * <li>Within the root view of the owner component</li>
299
+ * <li>Using the given control ID in the global scope</li>
300
+ * </ul>
301
+ *
302
+ * @param {object} [oParentInfo] The view information from the displayed parent target
303
+ * @return {Promise} Promise resolving with the container control
304
+ * @private
305
+ */
306
+ resolveContainerControl: function(oParentInfo) {
307
+ // use a Promise.resovle() to delay the container resolve to occur after the current call stack because the
308
+ // oOptions.rootView can be available after the current call stack.
309
+ return Promise.resolve().then(function() {
310
+ oParentInfo = oParentInfo || {};
311
+
312
+ var oOptions = this._oOptions;
313
+ var vValid = this._isValid(oParentInfo);
314
+ var sErrorMessage;
315
+
316
+ // validate config and log errors if necessary
317
+ if (vValid !== true) {
318
+ sErrorMessage = vValid;
319
+ return this._refuseInvalidTarget(oOptions._name, sErrorMessage);
320
+ }
269
321
 
270
- // TODO: offer getter for target info
271
- //
272
- // The router is normally initialized in the UIComponent.prototype.init function and the
273
- // init function should be already called before it reaches this place which means that the
274
- // router is initialized in most of the cases. If a router is already initialized, we still
275
- // need to check whether the route match process is finished. If it's not finished, we are
276
- // sure that there will be a "routeMatched" event fired and we can wait for it.
277
- if (!bIgnoreInitialHash && (!oRouter.isInitialized() || oRouter._bMatchingProcessStarted) && oRoute && oRoute._oConfig.target) {
278
- bInstantResolve = false;
279
- oRouter.attachRouteMatched(fnResolve);
322
+ var oViewContainingTheControl = oParentInfo.view,
323
+ oControl = oParentInfo.control,
324
+ pViewContainingTheControl,
325
+ pContainerControl;
326
+
327
+ // if the parent target loads a component, the oViewContainingTheControl is an instance of
328
+ // ComponentContainer. The root control of the component should be retrieved and set as
329
+ // oViewContainingTheControl
330
+ if (oViewContainingTheControl && oViewContainingTheControl.isA("sap.ui.core.ComponentContainer")) {
331
+ oViewContainingTheControl = oViewContainingTheControl.getComponentInstance().getRootControl();
332
+ }
333
+
334
+ //no parent view - see if container can be found by using oOptions.controlId under oOptions.rootView
335
+ if (!oViewContainingTheControl && oOptions.rootView) {
336
+ // oOptions.rootView can be either an id or a promise that resolves with the id
337
+ pViewContainingTheControl = Promise.resolve(oOptions.rootView)
338
+ .then(function(oRootViewId) {
339
+ var oView;
340
+
341
+ if (oRootViewId) {
342
+ oView = sap.ui.getCore().byId(oRootViewId);
343
+ oOptions.rootView = oRootViewId;
280
344
  }
281
- if (oRouter.isStopped()) {
282
- // initialize the router in nested component
283
- // if it has been previously stopped
284
- oRouter.initialize(bIgnoreInitialHash);
345
+
346
+ if (!oView) {
347
+ sErrorMessage = "Did not find the root view with the id " + oOptions.rootView;
348
+ return this._refuseInvalidTarget(oOptions._name, sErrorMessage);
349
+ } else {
350
+ return oView;
285
351
  }
286
- }
287
- }
352
+ }.bind(this));
353
+ } else {
354
+ pViewContainingTheControl = Promise.resolve(oViewContainingTheControl);
355
+ }
288
356
 
289
- if (bInstantResolve) {
290
- fnResolve();
357
+ pViewContainingTheControl = pViewContainingTheControl.then(function(oView) {
358
+ if (oView && oView.isA("sap.ui.core.mvc.View")) {
359
+ return oView.loaded();
360
+ } else {
361
+ return oView;
291
362
  }
292
- return oObject;
293
363
  });
294
- // when target information is given
295
- oSequencePromise = oSequencePromise
296
- .then(function(oParentInfo) {
297
- oParentInfo = oParentInfo || {};
298
364
 
299
- var vValid = that._isValid(oParentInfo);
365
+ if (oOptions.controlId) {
366
+ pContainerControl = pViewContainingTheControl.then(function(oContainerView) {
367
+ var oContainerControl;
300
368
 
301
- // validate config and log errors if necessary
302
- if (vValid !== true) {
303
- sErrorMessage = vValid;
304
- return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
369
+ if (oContainerView) {
370
+ oContainerControl = oContainerView.byId(oOptions.controlId);
305
371
  }
306
372
 
307
- var oViewContainingTheControl = oParentInfo.view,
308
- oControl = oParentInfo.control,
309
- pViewContainingTheControl,
310
- pContainerControl;
311
-
312
- // if the parent target loads a component, the oViewContainingTheControl is an instance of
313
- // ComponentContainer. The root control of the component should be retrieved and set as
314
- // oViewContainingTheControl
315
- if (oViewContainingTheControl && oViewContainingTheControl.isA("sap.ui.core.ComponentContainer")) {
316
- oViewContainingTheControl = oViewContainingTheControl.getComponentInstance().getRootControl();
373
+ if (!oContainerControl) {
374
+ //Test if control exists in core (without prefix) since it was not found in the parent or root view
375
+ oContainerControl = sap.ui.getCore().byId(oOptions.controlId);
317
376
  }
318
377
 
319
- //no parent view - see if container can be found by using oOptions.controlId under oOptions.rootView
320
- if (!oViewContainingTheControl && oOptions.rootView) {
321
- // oOptions.rootView can be either an id or a promise that resolves with the id
322
- pViewContainingTheControl = Promise.resolve(oOptions.rootView)
323
- .then(function(oRootViewId) {
324
- var oView;
325
-
326
- if (oRootViewId) {
327
- oView = sap.ui.getCore().byId(oRootViewId);
328
- oOptions.rootView = oRootViewId;
329
- }
330
-
331
- if (!oView) {
332
- sErrorMessage = "Did not find the root view with the id " + oOptions.rootView;
333
- return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
334
- } else {
335
- return oView;
336
- }
337
- });
338
- } else {
339
- pViewContainingTheControl = Promise.resolve(oViewContainingTheControl);
340
- }
378
+ return oContainerControl;
379
+ });
380
+ } else {
381
+ pContainerControl = Promise.resolve(oControl);
382
+ }
341
383
 
342
- pViewContainingTheControl = pViewContainingTheControl.then(function(oView) {
343
- if (oView && oView.isA("sap.ui.core.mvc.View")) {
344
- return oView.loaded();
345
- } else {
346
- return oView;
347
- }
348
- });
384
+ return pContainerControl.then(function(oContainerControl) {
385
+ if (!oContainerControl) {
386
+ sErrorMessage = "Control with ID " + oOptions.controlId + " could not be found";
387
+ return this._refuseInvalidTarget(oOptions._name, sErrorMessage);
388
+ } else {
389
+ return oContainerControl;
390
+ }
391
+ }.bind(this));
392
+ }.bind(this));
393
+ },
349
394
 
350
- if (oOptions.controlId) {
351
- pContainerControl = pViewContainingTheControl.then(function(oContainerView) {
352
- var oContainerControl;
395
+ /**
396
+ * Create and display the placeholder on the respective container
397
+ *
398
+ * @param {object} oTargetCreateInfo Object containing the target create info
399
+ * @param {object} oContainerControl The container control
400
+ * @returns {object} the view info object
401
+ * @private
402
+ */
403
+ displayPlaceholder: function(oTargetCreateInfo, oContainerControl) {
404
+ var oObject,
405
+ oOptions = this._oOptions,
406
+ bIsComponentTarget = oOptions.type === "Component",
407
+ bHasPlaceholderConfig = false,
408
+ oPlaceholderConfig = oTargetCreateInfo.placeholder || oOptions.placeholder || {},
409
+ pPlaceholder = Promise.resolve();
410
+
411
+ if (Placeholder.hasProviders()) {
412
+ Object.assign(oPlaceholderConfig, Placeholder.getPlaceholderFromProviders({
413
+ name: oOptions.name,
414
+ type: oOptions.type
415
+ }));
416
+ }
353
417
 
354
- if (oContainerView) {
355
- oContainerControl = oContainerView.byId(oOptions.controlId);
356
- }
418
+ if (Object.keys(oPlaceholderConfig).length > 0) {
419
+ if (oPlaceholderConfig.autoClose === undefined) {
420
+ oPlaceholderConfig.autoClose = true;
421
+ }
422
+ bHasPlaceholderConfig = true;
423
+ }
357
424
 
358
- if (!oContainerControl) {
359
- //Test if control exists in core (without prefix) since it was not found in the parent or root view
360
- oContainerControl = sap.ui.getCore().byId(oOptions.controlId);
361
- }
425
+ if (bIsComponentTarget) {
426
+ var oOwnerComponent = this._oCache._oComponent;
427
+ var sComponentContainerId = oTargetCreateInfo.componentId + "-container";
362
428
 
363
- return oContainerControl;
364
- });
365
- } else {
366
- pContainerControl = Promise.resolve(oControl);
367
- }
429
+ oObject = (oOwnerComponent && oOwnerComponent.byId(sComponentContainerId))
430
+ || sap.ui.getCore().byId(sComponentContainerId);
368
431
 
369
- return pContainerControl.then(function(oContainerControl) {
370
- if (!oContainerControl) {
371
- sErrorMessage = "Control with ID " + oOptions.controlId + " could not be found";
372
- return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
373
- } else {
374
- return oContainerControl;
375
- }
432
+ if (!oObject) {
433
+ // defaults mixed in with configured settings
434
+ var oContainerOptions = Object.assign({
435
+ height: "100%",
436
+ width: "100%",
437
+ lifecycle: ComponentLifecycle.Application
438
+ }, oOptions.containerOptions);
439
+
440
+ if (oOwnerComponent) {
441
+ oOwnerComponent.runAsOwner(function() {
442
+ oObject = new ComponentContainer(oOwnerComponent.createId(sComponentContainerId), oContainerOptions);
376
443
  });
377
- })
378
- .then(function(oContainerControl) {
379
- var bHasPlaceholderConfig = false;
380
- var oPlaceholderConfig = oTargetCreateInfo.placeholder || that._oOptions.placeholder || {};
381
-
382
- if (Placeholder.hasProviders()) {
383
- Object.assign(oPlaceholderConfig, Placeholder.getPlaceholderFromProviders({
384
- name: that._oOptions.name,
385
- type: that._oOptions.type
386
- })
387
- );
388
- }
444
+ } else {
445
+ oObject = new ComponentContainer(sComponentContainerId, oContainerOptions);
446
+ }
447
+ }
389
448
 
390
- if (Object.keys(oPlaceholderConfig).length > 0) {
391
- if (oPlaceholderConfig.autoClose === undefined) {
392
- oPlaceholderConfig.autoClose = true;
393
- }
394
- bHasPlaceholderConfig = true;
395
- }
449
+ // set container object only if placeholder config is available
450
+ if (bHasPlaceholderConfig) {
451
+ oPlaceholderConfig.container = oObject;
452
+ }
453
+ }
396
454
 
397
- if (bIsComponentTarget) {
398
- var oOwnerComponent = that._oCache._oComponent;
399
- var sComponentContainerId = oTargetCreateInfo.componentId + "-container";
400
-
401
- oObject = (oOwnerComponent && oOwnerComponent.byId(sComponentContainerId))
402
- || sap.ui.getCore().byId(sComponentContainerId);
403
-
404
- if (!oObject) {
405
- // defaults mixed in with configured settings
406
- var oContainerOptions = Object.assign({
407
- height: "100%",
408
- width: "100%",
409
- lifecycle: ComponentLifecycle.Application
410
- }, oOptions.containerOptions);
411
-
412
- if (oOwnerComponent) {
413
- oOwnerComponent.runAsOwner(function() {
414
- oObject = new ComponentContainer(oOwnerComponent.createId(sComponentContainerId), oContainerOptions);
415
- });
416
- } else {
417
- oObject = new ComponentContainer(sComponentContainerId, oContainerOptions);
418
- }
419
- }
455
+ // for view targets use container control to display placeholder
456
+ if (bHasPlaceholderConfig && oContainerControl.isA("sap.ui.core.IPlaceholderSupport")) {
457
+ oPlaceholderConfig.container = oContainerControl;
458
+ }
420
459
 
421
- // set container object only if placeholder config is available
422
- if (bHasPlaceholderConfig) {
423
- oPlaceholderConfig.container = oObject;
424
- }
425
- }
460
+ // Placeholder creation
461
+ if (oPlaceholderConfig.container && !oTargetCreateInfo.repeatedRoute) {
462
+ oPlaceholderConfig.aggregation = this._oOptions.controlAggregation;
426
463
 
427
- // for view targets use container control to display placeholder
428
- if (bHasPlaceholderConfig && oContainerControl.isA("sap.ui.core.IPlaceholderSupport")) {
429
- oPlaceholderConfig.container = oContainerControl;
430
- }
464
+ var oCreateOptions = this._getCreateOptions(oTargetCreateInfo);
465
+ var oCachedObject = this._oCache.fetch(oCreateOptions, this._oOptions.type);
431
466
 
432
- // Placeholder creation
433
- if (oPlaceholderConfig.container) {
434
- oPlaceholderConfig.aggregation = that._oOptions.controlAggregation;
467
+ if (oCachedObject && bIsComponentTarget) {
468
+ // for type "Component", the object that is saved in the placeholder config should be
469
+ // the component container instead of the component
470
+ oPlaceholderConfig.object = oObject;
471
+ } else {
472
+ oPlaceholderConfig.object = oCachedObject;
473
+ }
435
474
 
436
- if (!oTargetCreateInfo.repeatedRoute) {
437
- var oCreateOptions = that._getCreateOptions(oTargetCreateInfo);
438
- var oCachedObject = that._oCache.fetch(oCreateOptions, that._oOptions.type);
475
+ if (oPlaceholderConfig.html) {
476
+ oPlaceholderConfig.placeholder = new Placeholder({
477
+ html: oPlaceholderConfig.html
478
+ });
479
+ }
439
480
 
440
- if (oCachedObject && bIsComponentTarget) {
441
- // for type "Component", the object that is saved in the placeholder config should be
442
- // the component container instead of the component
443
- oPlaceholderConfig.object = oObject;
444
- } else {
445
- oPlaceholderConfig.object = oCachedObject;
446
- }
447
- }
481
+ if (oPlaceholderConfig.placeholder && sap.ui.getCore().getConfiguration().getPlaceholder()) {
482
+ pPlaceholder = this.showPlaceholder(oPlaceholderConfig);
483
+ }
484
+ }
448
485
 
449
- if (oPlaceholderConfig.html) {
450
- oPlaceholderConfig.placeholder = new Placeholder({
451
- html: oPlaceholderConfig.html
452
- });
453
- }
486
+ // wait for placeholder to load
487
+ return pPlaceholder.then(function(sPlaceholderContent) {
488
+ // returning view info object
489
+ return {
490
+ containerControl: oContainerControl,
491
+ object: oObject,
492
+ placeholderConfig: oPlaceholderConfig,
493
+ placeholderShown: !!sPlaceholderContent
494
+ };
495
+ });
496
+ },
454
497
 
455
- if (oPlaceholderConfig.placeholder) {
456
- that.showPlaceholder(oPlaceholderConfig);
457
- }
458
- }
498
+ /**
499
+ * Here the magic happens - recursion + placement + view creation needs to be refactored
500
+ *
501
+ * @param {object} [vData] an object that will be passed to the display event in the data property. If the
502
+ * target has parents, the data will also be passed to them.
503
+ * @param {Promise} oSequencePromise Promise chain for resolution in the correct order
504
+ * @param {object} oTargetCreateInfo Additional information for the component creation. Currently the object only contains the prefix for the routerHashChanger
505
+ * @return {Promise} resolves with {name: *, view: *, control: *} if the target can be successfully displayed otherwise it rejects with an error message
506
+ * @private
507
+ */
508
+ _place: function (vData, oSequencePromise, oTargetCreateInfo) {
509
+ var oOptions = this._oOptions,
510
+ that = this,
511
+ sErrorMessage,
512
+ bIsComponentTarget = oOptions.type === "Component";
459
513
 
460
- return {
461
- containerControl: oContainerControl,
462
- object: oObject,
463
- placeholderConfig: oPlaceholderConfig
464
- };
465
- })
466
- .then(function(oViewInfo) {
467
- return pLoaded.then(function(oObject) {
468
- var oView, oRootControl;
469
- if (bIsComponentTarget) {
470
- var fnOriginalDestroy = oObject.destroy;
471
- oObject.destroy = function () {
472
- if (fnOriginalDestroy) {
473
- fnOriginalDestroy.apply(this);
474
- }
475
- // destroy the component container when the component is destroyed
476
- oViewInfo.object.destroy();
477
- };
478
- oViewInfo.object.setComponent(oObject);
479
-
480
- oRootControl = oObject.getRootControl();
481
- if (oRootControl && oRootControl.isA("sap.ui.core.mvc.View")) {
482
- oView = oRootControl;
514
+ var pLoaded, /* target is loaded and promise for waiting on "routeMatched" event in nested component is ready*/
515
+ pContainerReady; /* container control and placeholder ready */
516
+
517
+ if (vData instanceof Promise) {
518
+ oTargetCreateInfo = oSequencePromise;
519
+ oSequencePromise = vData;
520
+ vData = undefined;
521
+ }
522
+
523
+ oTargetCreateInfo = oTargetCreateInfo || {};
524
+
525
+ if (bIsComponentTarget) {
526
+ oTargetCreateInfo.componentId = oOptions.id || ManagedObjectMetadata.uid("uicomponent");
527
+ }
528
+
529
+ if ((oOptions.name || oOptions.usage) && oOptions.type) {
530
+ // target loading
531
+ pLoaded = this.load(oTargetCreateInfo);
532
+
533
+ // Either if parent available, then we need to wait until the parent got displayed or
534
+ // if no target info is given, then we need to wait for the oSequencePromise to be resolved
535
+ if (this._oParent || oTargetCreateInfo.legacy) {
536
+ // resolve container control and placeholder creation
537
+ pContainerReady = oSequencePromise.then(this.resolveContainerControl.bind(this));
538
+ } else {
539
+ // no need to wait for oSequencePromise, resolve container control in parallel
540
+ pContainerReady = this.resolveContainerControl();
541
+ }
542
+
543
+ pContainerReady = pContainerReady.then(this.displayPlaceholder.bind(this, oTargetCreateInfo));
544
+
545
+ // when target information is given
546
+ oSequencePromise = Promise.all([pLoaded, pContainerReady, oSequencePromise])
547
+ // prepareTitleProvider
548
+ .then(function(aArguments) {
549
+ var oObject = aArguments[0].object,
550
+ oViewInfo = aArguments[1],
551
+ oView, oRootControl;
552
+
553
+ oViewInfo.nestedComponentReady = aArguments[0].nestedComponentReady;
554
+
555
+ if (bIsComponentTarget) {
556
+ var fnOriginalDestroy = oObject.destroy;
557
+ oObject.destroy = function () {
558
+ if (fnOriginalDestroy) {
559
+ fnOriginalDestroy.apply(this);
483
560
  }
484
- } else {
485
- // view
486
- oViewInfo.object = oObject;
487
- oView = oObject;
561
+ // destroy the component container when the component is destroyed
562
+ oViewInfo.object.destroy();
563
+ };
564
+ oViewInfo.object.setComponent(oObject);
565
+
566
+ oRootControl = oObject.getRootControl();
567
+ if (oRootControl && oRootControl.isA("sap.ui.core.mvc.View")) {
568
+ oView = oRootControl;
488
569
  }
570
+ } else {
571
+ // view
572
+ oViewInfo.object = oObject;
573
+ oView = oObject;
574
+ }
489
575
 
490
- that._bindTitleInTitleProvider(oView);
491
- that._addTitleProviderAsDependent(oView);
576
+ that._bindTitleInTitleProvider(oView);
577
+ that._addTitleProviderAsDependent(oView);
492
578
 
493
- return oViewInfo;
494
- });
579
+ return oViewInfo;
495
580
  })
581
+ // placing the view or component into container
496
582
  .then(function(oViewInfo) {
497
583
  var oContainerControl = oViewInfo.containerControl,
498
584
  oObject = oViewInfo.object;
@@ -529,7 +615,9 @@ sap.ui.define([
529
615
  name: oOptions._name,
530
616
  view: oObject,
531
617
  control: oContainerControl,
532
- placeholderConfig: oViewInfo.placeholderConfig
618
+ nestedComponentReady: oViewInfo.nestedComponentReady,
619
+ placeholderConfig: oViewInfo.placeholderConfig,
620
+ placeholderShown: oViewInfo.placeholderShown
533
621
  };
534
622
  });
535
623
  } else {
@@ -540,33 +628,39 @@ sap.ui.define([
540
628
  });
541
629
  }
542
630
 
543
- return Promise.all([oSequencePromise, pNestedRouteMatched]).then(function(aObjects) {
544
- var oContainerControl = aObjects[0].control;
545
- var oObject = aObjects[0].view;
546
-
547
- if (oContainerControl && oObject) {
548
- that.fireDisplay({
549
- view : oObject.isA("sap.ui.core.mvc.View") ? oObject : undefined,
550
- object: oObject,
551
- control : oContainerControl,
552
- config : that._oOptions,
553
- data: vData,
554
- routeRelevant: oTargetCreateInfo.routeRelevant
555
- });
556
- }
631
+ return oSequencePromise.then(function(oParams) {
632
+ var pNestedComponentReady = oParams.nestedComponentReady || Promise.resolve();
633
+ return pNestedComponentReady.then(function() {
634
+ var oContainerControl = oParams.control,
635
+ oObject = oParams.view,
636
+ oPlaceholderConfig = oParams.placeholderConfig;
557
637
 
558
- if (aObjects[0].placeholderConfig && aObjects[0].placeholderConfig.container &&
559
- that.hidePlaceholder && aObjects[0].placeholderConfig.autoClose) {
560
- that.hidePlaceholder(aObjects[0].placeholderConfig);
561
- }
638
+ if (oContainerControl && oObject) {
639
+ that.fireDisplay({
640
+ view : oObject.isA("sap.ui.core.mvc.View") ? oObject : undefined,
641
+ object: oObject,
642
+ control : oContainerControl,
643
+ config : that._oOptions,
644
+ data: vData,
645
+ routeRelevant: oTargetCreateInfo.routeRelevant
646
+ });
647
+ }
648
+
649
+ if (oPlaceholderConfig && oPlaceholderConfig.container &&
650
+ oPlaceholderConfig.autoClose && that.hidePlaceholder) {
651
+ that.hidePlaceholder(oPlaceholderConfig);
652
+ }
562
653
 
563
- return aObjects[0];
654
+ return oParams;
655
+ });
564
656
  });
565
657
  },
566
658
 
567
659
  showPlaceholder: function(mSettings) {
568
660
  if (mSettings.container && mSettings.container.showPlaceholder) {
569
- mSettings.container.showPlaceholder(mSettings);
661
+ return mSettings.container.showPlaceholder(mSettings);
662
+ } else {
663
+ return Promise.resolve();
570
664
  }
571
665
  },
572
666