@openui5/sap.ui.core 1.92.0 → 1.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/{.eslintrc → .eslintrc.json} +1 -2
  2. package/.reuse/dep5 +1 -6
  3. package/THIRDPARTY.txt +4 -10
  4. package/package.json +1 -1
  5. package/src/jquery.sap.global.js +9 -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 +7 -4
  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 +8 -4
  13. package/src/sap/base/strings/whitespaceReplacer.js +52 -0
  14. package/src/sap/base/util/Properties.js +4 -1
  15. package/src/sap/base/util/isEmptyObject.js +1 -2
  16. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  17. package/src/sap/base/util/restricted/_castArray.js +1 -1
  18. package/src/sap/base/util/restricted/_compact.js +1 -1
  19. package/src/sap/base/util/restricted/_curry.js +1 -1
  20. package/src/sap/base/util/restricted/_debounce.js +1 -1
  21. package/src/sap/base/util/restricted/_difference.js +1 -1
  22. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  23. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  24. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  25. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  26. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  27. package/src/sap/base/util/restricted/_flatten.js +1 -1
  28. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  29. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  30. package/src/sap/base/util/restricted/_intersection.js +1 -1
  31. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  32. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  33. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  34. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  35. package/src/sap/base/util/restricted/_isNil.js +1 -1
  36. package/src/sap/base/util/restricted/_max.js +1 -1
  37. package/src/sap/base/util/restricted/_merge.js +1 -1
  38. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  39. package/src/sap/base/util/restricted/_min.js +1 -1
  40. package/src/sap/base/util/restricted/_omit.js +1 -1
  41. package/src/sap/base/util/restricted/_pick.js +1 -1
  42. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  43. package/src/sap/base/util/restricted/_throttle.js +1 -1
  44. package/src/sap/base/util/restricted/_toArray.js +1 -1
  45. package/src/sap/base/util/restricted/_union.js +1 -1
  46. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  47. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  48. package/src/sap/base/util/restricted/_uniq.js +1 -1
  49. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  50. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  51. package/src/sap/base/util/restricted/_without.js +1 -1
  52. package/src/sap/base/util/restricted/_xor.js +1 -1
  53. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  54. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  55. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  56. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  57. package/src/sap/ui/Device.js +37 -42
  58. package/src/sap/ui/Global.js +6 -6
  59. package/src/sap/ui/VersionInfo.js +1 -0
  60. package/src/sap/ui/base/DataType.js +14 -7
  61. package/src/sap/ui/base/Event.js +1 -1
  62. package/src/sap/ui/base/EventProvider.js +1 -1
  63. package/src/sap/ui/base/ExpressionParser.js +9 -6
  64. package/src/sap/ui/base/Interface.js +3 -49
  65. package/src/sap/ui/base/ManagedObject.js +131 -24
  66. package/src/sap/ui/base/ManagedObjectMetadata.js +13 -4
  67. package/src/sap/ui/base/Metadata.js +1 -1
  68. package/src/sap/ui/base/Object.js +49 -4
  69. package/src/sap/ui/base/ObjectPool.js +1 -1
  70. package/src/sap/ui/base/syncXHRFix.js +2 -1
  71. package/src/sap/ui/core/.library +5 -5
  72. package/src/sap/ui/core/AppCacheBuster.js +4 -4
  73. package/src/sap/ui/core/BusyIndicator.js +1 -11
  74. package/src/sap/ui/core/BusyIndicatorUtils.js +4 -1
  75. package/src/sap/ui/core/Component.js +441 -179
  76. package/src/sap/ui/core/ComponentContainer.js +16 -6
  77. package/src/sap/ui/core/ComponentMetadata.js +14 -3
  78. package/src/sap/ui/core/ComponentSupport.js +1 -1
  79. package/src/sap/ui/core/Configuration.js +64 -32
  80. package/src/sap/ui/core/Control.js +1 -1
  81. package/src/sap/ui/core/Core.js +57 -40
  82. package/src/sap/ui/core/CustomData.js +1 -1
  83. package/src/sap/ui/core/CustomizingConfiguration.js +35 -260
  84. package/src/sap/ui/core/DeclarativeSupport.js +3 -2
  85. package/src/sap/ui/core/Element.js +1 -1
  86. package/src/sap/ui/core/ElementMetadata.js +4 -2
  87. package/src/sap/ui/core/EnabledPropagator.js +91 -73
  88. package/src/sap/ui/core/EventBus.js +1 -1
  89. package/src/sap/ui/core/ExtensionPoint.js +7 -14
  90. package/src/sap/ui/core/Fragment.js +30 -32
  91. package/src/sap/ui/core/HTML.js +1 -1
  92. package/src/sap/ui/core/History.js +1 -1
  93. package/src/sap/ui/core/Icon.js +5 -5
  94. package/src/sap/ui/core/IconPool.js +15 -1097
  95. package/src/sap/ui/core/IconRenderer.js +2 -2
  96. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  97. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  98. package/src/sap/ui/core/InvisibleMessage.js +9 -1
  99. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  100. package/src/sap/ui/core/InvisibleText.js +1 -1
  101. package/src/sap/ui/core/Item.js +1 -1
  102. package/src/sap/ui/core/LabelEnablement.js +1 -1
  103. package/src/sap/ui/core/LayoutData.js +1 -1
  104. package/src/sap/ui/core/ListItem.js +1 -1
  105. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  106. package/src/sap/ui/core/Locale.js +26 -4
  107. package/src/sap/ui/core/LocaleData.js +1 -1
  108. package/src/sap/ui/core/Manifest.js +124 -126
  109. package/src/sap/ui/core/Message.js +1 -1
  110. package/src/sap/ui/core/Patcher.js +53 -80
  111. package/src/sap/ui/core/Placeholder.js +25 -11
  112. package/src/sap/ui/core/Popup.js +29 -5
  113. package/src/sap/ui/core/RenderManager.js +41 -24
  114. package/src/sap/ui/core/Renderer.js +13 -3
  115. package/src/sap/ui/core/ResizeHandler.js +1 -1
  116. package/src/sap/ui/core/ScrollBar.js +2 -2
  117. package/src/sap/ui/core/SeparatorItem.js +1 -1
  118. package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
  119. package/src/sap/ui/core/ThemeCheck.js +13 -61
  120. package/src/sap/ui/core/Title.js +1 -1
  121. package/src/sap/ui/core/TooltipBase.js +1 -1
  122. package/src/sap/ui/core/UIArea.js +5 -2
  123. package/src/sap/ui/core/UIComponent.js +81 -40
  124. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  125. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  126. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  127. package/src/sap/ui/core/XMLComposite.js +1 -1
  128. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  129. package/src/sap/ui/core/XMLTemplateProcessor.js +5 -5
  130. package/src/sap/ui/core/_IconRegistry.js +1215 -0
  131. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  132. package/src/sap/ui/core/delegate/ScrollEnablement.js +6 -3
  133. package/src/sap/ui/core/dnd/DragDropBase.js +2 -9
  134. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  135. package/src/sap/ui/core/dnd/DragInfo.js +41 -1
  136. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  137. package/src/sap/ui/core/format/DateFormat.js +2 -0
  138. package/src/sap/ui/core/format/NumberFormat.js +2 -0
  139. package/src/sap/ui/core/hyphenation/Hyphenation.js +73 -221
  140. package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +11 -10
  141. package/src/sap/ui/core/library.js +3 -3
  142. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  143. package/src/sap/ui/core/message/Message.js +1 -1
  144. package/src/sap/ui/core/message/MessageManager.js +13 -13
  145. package/src/sap/ui/core/message/MessageParser.js +1 -1
  146. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  147. package/src/sap/ui/core/messagebundle_de.properties +1 -1
  148. package/src/sap/ui/core/messagebundle_fr.properties +1 -1
  149. package/src/sap/ui/core/messagebundle_it.properties +1 -1
  150. package/src/sap/ui/core/messagebundle_pl.properties +1 -1
  151. package/src/sap/ui/core/messagebundle_th.properties +2 -2
  152. package/src/sap/ui/core/mvc/Controller.js +166 -9
  153. package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
  154. package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
  155. package/src/sap/ui/core/mvc/HTMLView.js +4 -2
  156. package/src/sap/ui/core/mvc/JSONView.js +8 -6
  157. package/src/sap/ui/core/mvc/JSView.js +5 -3
  158. package/src/sap/ui/core/mvc/TemplateView.js +2 -2
  159. package/src/sap/ui/core/mvc/View.js +73 -89
  160. package/src/sap/ui/core/mvc/ViewType.js +2 -0
  161. package/src/sap/ui/core/mvc/XMLView.js +14 -10
  162. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  163. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  164. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  165. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  166. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  167. package/src/sap/ui/core/routing/History.js +36 -18
  168. package/src/sap/ui/core/routing/Route.js +10 -1
  169. package/src/sap/ui/core/routing/Router.js +8 -5
  170. package/src/sap/ui/core/routing/Target.js +13 -0
  171. package/src/sap/ui/core/routing/TargetCache.js +1 -1
  172. package/src/sap/ui/core/routing/Targets.js +39 -2
  173. package/src/sap/ui/core/routing/async/Route.js +7 -4
  174. package/src/sap/ui/core/routing/async/Target.js +383 -262
  175. package/src/sap/ui/core/routing/sync/Target.js +15 -0
  176. package/src/sap/ui/core/rules/App.support.js +35 -1
  177. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  178. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  179. package/src/sap/ui/core/service/Service.js +1 -1
  180. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  181. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  182. package/src/sap/ui/core/support/BootSupportTool.js +11 -0
  183. package/src/sap/ui/core/support/InteractionTree.css +4 -0
  184. package/src/sap/ui/core/support/Plugin.js +1 -1
  185. package/src/sap/ui/core/support/Support.js +1 -1
  186. package/src/sap/ui/core/support/ViewInfo.css +599 -0
  187. package/src/sap/ui/core/support/controls/InteractionTree.js +352 -222
  188. package/src/sap/ui/core/support/controls/ObjectViewer.js +8 -50
  189. package/src/sap/ui/core/support/controls/TimelineOverview.js +49 -24
  190. package/src/sap/ui/core/support/controls/TreeViewer.js +12 -58
  191. package/src/sap/ui/core/support/plugins/ControlTree.js +23 -26
  192. package/src/sap/ui/core/support/plugins/Debugging.js +9 -11
  193. package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
  194. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  195. package/src/sap/ui/core/support/plugins/Performance.js +147 -75
  196. package/src/sap/ui/core/support/plugins/Selector.js +19 -24
  197. package/src/sap/ui/core/support/plugins/TechInfo.js +5 -5
  198. package/src/sap/ui/core/support/plugins/Trace.js +95 -32
  199. package/src/sap/ui/core/support/plugins/ViewInfo.js +9 -73
  200. package/src/sap/ui/core/support/support.css +109 -14
  201. package/src/sap/ui/core/support/support.html +6 -2
  202. package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
  203. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +149 -72
  204. package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
  205. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +5 -0
  206. package/src/sap/ui/core/themes/base/base.less +27 -25
  207. package/src/sap/ui/core/themes/base/shared.less +1 -0
  208. package/src/sap/ui/core/theming/Parameters.js +225 -61
  209. package/src/sap/ui/core/theming/ThemeHelper.js +94 -0
  210. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  211. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  212. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  213. package/src/sap/ui/core/tmpl/Template.js +11 -28
  214. package/src/sap/ui/core/tmpl/TemplateControl.js +4 -4
  215. package/src/sap/ui/core/tmpl/_parsePath.js +35 -0
  216. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  217. package/src/sap/ui/core/util/DraftEnabledMockServer.js +9 -4
  218. package/src/sap/ui/core/util/Export.js +1 -1
  219. package/src/sap/ui/core/util/ExportCell.js +1 -1
  220. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  221. package/src/sap/ui/core/util/ExportRow.js +1 -1
  222. package/src/sap/ui/core/util/ExportType.js +1 -1
  223. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  224. package/src/sap/ui/core/util/File.js +1 -1
  225. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  226. package/src/sap/ui/core/util/MockServer.js +24 -5
  227. package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +3 -2
  228. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  229. package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
  230. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +154 -63
  231. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +171 -152
  232. package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +419 -291
  233. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  234. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  235. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  236. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  237. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  238. package/src/sap/ui/core/util/serializer/delegate/HTML.js +2 -2
  239. package/src/sap/ui/core/util/serializer/delegate/XML.js +2 -2
  240. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  241. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  242. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  243. package/src/sap/ui/debug/ControlTree.js +10 -4
  244. package/src/sap/ui/debug/DebugEnv.js +3 -4
  245. package/src/sap/ui/debug/PropertyList.css +55 -0
  246. package/src/sap/ui/debug/PropertyList.js +111 -182
  247. package/src/sap/ui/events/jquery/EventSimulation.js +7 -6
  248. package/src/sap/ui/events/jquery/EventTriggerHook.js +1 -1
  249. package/src/sap/ui/model/ClientModel.js +1 -1
  250. package/src/sap/ui/model/ClientPropertyBinding.js +3 -1
  251. package/src/sap/ui/model/ClientTreeBinding.js +14 -8
  252. package/src/sap/ui/model/CompositeDataState.js +1 -1
  253. package/src/sap/ui/model/CompositeType.js +1 -1
  254. package/src/sap/ui/model/Context.js +31 -11
  255. package/src/sap/ui/model/DataState.js +1 -1
  256. package/src/sap/ui/model/ListBinding.js +19 -0
  257. package/src/sap/ui/model/MetaModel.js +1 -1
  258. package/src/sap/ui/model/Model.js +3 -3
  259. package/src/sap/ui/model/SelectionModel.js +5 -1
  260. package/src/sap/ui/model/SimpleType.js +1 -1
  261. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  262. package/src/sap/ui/model/Type.js +1 -1
  263. package/src/sap/ui/model/analytics/AnalyticalBinding.js +14 -9
  264. package/src/sap/ui/model/analytics/odata4analytics.js +31 -23
  265. package/src/sap/ui/model/base/ManagedObjectModel.js +13 -1
  266. package/src/sap/ui/model/json/JSONModel.js +4 -2
  267. package/src/sap/ui/model/message/MessageModel.js +4 -2
  268. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  269. package/src/sap/ui/model/odata/ODataListBinding.js +1 -0
  270. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  271. package/src/sap/ui/model/odata/ODataMetaModel.js +5 -2
  272. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  273. package/src/sap/ui/model/odata/ODataModel.js +7 -6
  274. package/src/sap/ui/model/odata/ODataUtils.js +31 -10
  275. package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +30 -27
  276. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  277. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  278. package/src/sap/ui/model/odata/type/Currency.js +7 -2
  279. package/src/sap/ui/model/odata/type/Date.js +1 -1
  280. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  281. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  282. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  283. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  284. package/src/sap/ui/model/odata/type/Double.js +1 -1
  285. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  286. package/src/sap/ui/model/odata/type/Int.js +1 -1
  287. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  288. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  289. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  290. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  291. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  292. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  293. package/src/sap/ui/model/odata/type/Single.js +1 -1
  294. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  295. package/src/sap/ui/model/odata/type/String.js +3 -1
  296. package/src/sap/ui/model/odata/type/Time.js +1 -1
  297. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  298. package/src/sap/ui/model/odata/type/Unit.js +7 -2
  299. package/src/sap/ui/model/odata/type/UnitMixin.js +20 -7
  300. package/src/sap/ui/model/odata/v2/Context.js +187 -0
  301. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +2 -2
  302. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +55 -51
  303. package/src/sap/ui/model/odata/v2/ODataListBinding.js +42 -106
  304. package/src/sap/ui/model/odata/v2/ODataModel.js +251 -159
  305. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +163 -136
  306. package/src/sap/ui/model/odata/v4/Context.js +6 -3
  307. package/src/sap/ui/model/odata/v4/ODataBinding.js +3 -3
  308. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +97 -25
  309. package/src/sap/ui/model/odata/v4/ODataListBinding.js +112 -24
  310. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +15 -12
  311. package/src/sap/ui/model/odata/v4/ODataModel.js +85 -77
  312. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +25 -15
  313. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +21 -12
  314. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
  315. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +13 -4
  316. package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -1
  317. package/src/sap/ui/model/odata/v4/lib/_Cache.js +28 -17
  318. package/src/sap/ui/model/odata/v4/lib/_Helper.js +47 -30
  319. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +55 -19
  320. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
  321. package/src/sap/ui/model/resource/ResourceModel.js +5 -2
  322. package/src/sap/ui/model/type/Boolean.js +1 -1
  323. package/src/sap/ui/model/type/Currency.js +1 -1
  324. package/src/sap/ui/model/type/Date.js +1 -1
  325. package/src/sap/ui/model/type/DateInterval.js +1 -1
  326. package/src/sap/ui/model/type/DateTime.js +1 -1
  327. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  328. package/src/sap/ui/model/type/FileSize.js +1 -1
  329. package/src/sap/ui/model/type/Float.js +1 -1
  330. package/src/sap/ui/model/type/Integer.js +1 -1
  331. package/src/sap/ui/model/type/String.js +1 -1
  332. package/src/sap/ui/model/type/Time.js +1 -1
  333. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  334. package/src/sap/ui/model/type/Unit.js +1 -1
  335. package/src/sap/ui/model/xml/XMLModel.js +4 -2
  336. package/src/sap/ui/performance/Measurement.js +1 -1
  337. package/src/sap/ui/performance/trace/FESR.js +2 -1
  338. package/src/sap/ui/performance/trace/Interaction.js +42 -25
  339. package/src/sap/ui/performance/trace/initTraces.js +1 -1
  340. package/src/sap/ui/qunit/QUnitUtils.js +1 -1
  341. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  342. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  343. package/src/sap/ui/security/FrameOptions.js +2 -1
  344. package/src/sap/ui/test/Opa5.js +1 -1
  345. package/src/sap/ui/test/OpaBuilder.js +1 -0
  346. package/src/sap/ui/test/TestUtils.js +28 -34
  347. package/src/sap/ui/test/actions/Drag.js +6 -2
  348. package/src/sap/ui/test/actions/Drop.js +6 -2
  349. package/src/sap/ui/test/actions/EnterText.js +6 -0
  350. package/src/sap/ui/test/actions/Press.js +6 -0
  351. package/src/sap/ui/test/actions/Scroll.js +6 -0
  352. package/src/sap/ui/test/autowaiter/_resourceWaiter.js +4 -4
  353. package/src/sap/ui/test/launchers/componentLauncher.js +1 -4
  354. package/src/sap/ui/test/matchers/I18NText.js +29 -11
  355. package/src/sap/ui/test/opaQunit.js +11 -9
  356. package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -4
  357. package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
  358. package/src/sap/ui/thirdparty/crossroads.js +16 -6
  359. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
  360. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
  361. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
  362. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
  363. package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
  364. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
  365. package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
  366. package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
  367. package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
  368. package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
  369. package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
  370. package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
  371. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
  372. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
  373. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
  374. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
  375. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
  376. package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
  377. package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
  378. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
  379. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
  380. package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
  381. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
  382. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
  383. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
  384. package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
  385. package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
  386. package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
  387. package/src/sap/ui/util/Storage.js +1 -1
  388. package/src/sap/ui/util/isCrossOriginURL.js +16 -6
  389. package/src/sap-ui-core-nojQuery.js +1 -1
  390. package/src/sap-ui-core.js +1 -1
  391. package/src/sap-ui-debug.js +3 -17
  392. package/src/ui5loader.js +5 -2
  393. package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
  394. package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
@@ -5,12 +5,11 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/base/Log",
8
- "sap/ui/core/Component",
9
- "sap/ui/core/UIComponent",
8
+ "sap/ui/base/ManagedObjectMetadata",
10
9
  "sap/ui/core/ComponentContainer",
11
10
  "sap/ui/core/Placeholder",
12
11
  "sap/ui/core/library"
13
- ], function(Log, Component, UIComponent, ComponentContainer, Placeholder, coreLib) {
12
+ ], function(Log, ManagedObjectMetadata, ComponentContainer, Placeholder, coreLib) {
14
13
  "use strict";
15
14
 
16
15
  // shortcut for sap.ui.core.ComponentLifecycle
@@ -51,10 +50,8 @@ sap.ui.define([
51
50
  */
52
51
  _display: function (vData, oSequencePromise, oTargetCreateInfo) {
53
52
  if (this._oParent) {
54
- // replace the sync
55
53
  oSequencePromise = this._oParent._display(vData, oSequencePromise, Object.assign({}, oTargetCreateInfo));
56
54
  }
57
-
58
55
  return this._place(vData, oSequencePromise, oTargetCreateInfo);
59
56
  },
60
57
 
@@ -85,6 +82,32 @@ sap.ui.define([
85
82
  Log.warning("The target with name '" + this._oOptions._name + "' can't be suspended because it's being loaded or not loaded yet");
86
83
  }
87
84
 
85
+ return this;
86
+ },
87
+
88
+ /**
89
+ * Resumes the object which is loaded by the target.
90
+ *
91
+ * Currently this function initializes the router of the component without parsing the current hash when
92
+ * the object which is loaded by this target is an instance of
93
+ * UIComponent.
94
+ *
95
+ * @return {sap.ui.core.routing.Target} The 'this' to chain the call
96
+ * @private
97
+ */
98
+ resume: function() {
99
+ if (this._oParent) {
100
+ this._oParent.resume();
101
+ }
102
+
103
+ if (this._isLoaded()) {
104
+ var oObject = this._get(),
105
+ oRouter;
106
+
107
+ if (oObject.isA("sap.ui.core.UIComponent") && (oRouter = oObject.getRouter()) && oObject.hasNativeRouter()) {
108
+ oRouter.initialize(true);
109
+ }
110
+ }
88
111
 
89
112
  return this;
90
113
  },
@@ -190,284 +213,374 @@ sap.ui.define([
190
213
  },
191
214
 
192
215
  /**
193
- * 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
194
217
  *
195
- * @param {object} [vData] an object that will be passed to the display event in the data property. If the
196
- * target has parents, the data will also be passed to them.
197
- * @param {Promise} oSequencePromise Promise chain for resolution in the correct order
198
- * @param {object} oTargetCreateInfo Additional information for the component creation. Currently the object only contains the prefix for the routerHashChanger
199
- * @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
200
221
  * @private
201
222
  */
202
- _place: function (vData, oSequencePromise, oTargetCreateInfo) {
203
- if (vData instanceof Promise) {
204
- oTargetCreateInfo = oSequencePromise;
205
- oSequencePromise = vData;
206
- vData = undefined;
207
- }
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
+ },
208
235
 
209
- var oOptions = this._oOptions,
210
- that = this,
211
- oObject, sErrorMessage, pLoaded,
212
- bInstantResolve = true,
213
- fnResolve,
214
- pNestedRouteMatched,
215
- 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
+ }
216
263
 
217
- 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
+ }
218
268
 
219
- if ((oOptions.name || oOptions.usage) && oOptions.type) {
220
- pNestedRouteMatched = new Promise(function(resolve) {
221
- fnResolve = resolve;
222
- });
223
- if (bIsComponentTarget) {
224
- oTargetCreateInfo.componentId = that._oOptions.id || UIComponent.getMetadata().uid();
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
+ }
225
286
  }
226
- pLoaded = this._load(oTargetCreateInfo).then(function (oObject) {
227
- if (oObject.isA("sap.ui.core.UIComponent")) {
228
- var oRouter = oObject.getRouter();
229
- if (oRouter && oObject.hasNativeRouter()) {
230
- var sHash = oRouter.getHashChanger().getHash();
231
- var oRoute = oRouter.getRouteByHash(sHash);
232
- var bIgnoreInitialHash = oTargetCreateInfo && oTargetCreateInfo.ignoreInitialHash;
233
-
234
- if (!oRouter._oConfig.async){
235
- throw new Error("The router of component '" + oObject.getId() +
236
- "' which is loaded via the target '" + that._oOptions._name +
237
- "' is defined as synchronous which is not supported using as a nested component.");
238
- }
239
287
 
240
- if (oRouter._oOwner && oTargetCreateInfo) {
241
- // update the flag once the component is displayed again after it's already loaded
242
- oRouter._oOwner._bRoutingPropagateTitle = oTargetCreateInfo.propagateTitle;
243
- }
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
+ }
321
+
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
+ }
244
333
 
245
- // TODO: offer getter for target info
246
- //
247
- // The router is normally initialized in the UIComponent.prototype.init function and the
248
- // init function should be already called before it reaches this place which means that the
249
- // router is initialized in most of the cases. If a router is already initialized, we still
250
- // need to check whether the route match process is finished. If it's not finished, we are
251
- // sure that there will be a "routeMatched" event fired and we can wait for it.
252
- if (!bIgnoreInitialHash && (!oRouter.isInitialized() || oRouter._bMatchingProcessStarted) && oRoute && oRoute._oConfig.target) {
253
- bInstantResolve = false;
254
- oRouter.attachRouteMatched(fnResolve);
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;
255
344
  }
256
- if (oRouter.isStopped()) {
257
- // initialize the router in nested component
258
- // if it has been previously stopped
259
- 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;
260
351
  }
261
- }
262
- }
352
+ }.bind(this));
353
+ } else {
354
+ pViewContainingTheControl = Promise.resolve(oViewContainingTheControl);
355
+ }
263
356
 
264
- if (bInstantResolve) {
265
- 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;
266
362
  }
267
- return oObject;
268
363
  });
269
- // when target information is given
270
- oSequencePromise = oSequencePromise
271
- .then(function(oParentInfo) {
272
- oParentInfo = oParentInfo || {};
273
364
 
274
- var vValid = that._isValid(oParentInfo);
365
+ if (oOptions.controlId) {
366
+ pContainerControl = pViewContainingTheControl.then(function(oContainerView) {
367
+ var oContainerControl;
275
368
 
276
- // validate config and log errors if necessary
277
- if (vValid !== true) {
278
- sErrorMessage = vValid;
279
- return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
369
+ if (oContainerView) {
370
+ oContainerControl = oContainerView.byId(oOptions.controlId);
280
371
  }
281
372
 
282
- var oViewContainingTheControl = oParentInfo.view,
283
- oControl = oParentInfo.control,
284
- pViewContainingTheControl,
285
- pContainerControl;
286
-
287
- // if the parent target loads a component, the oViewContainingTheControl is an instance of
288
- // ComponentContainer. The root control of the component should be retrieved and set as
289
- // oViewContainingTheControl
290
- if (oViewContainingTheControl && oViewContainingTheControl.isA("sap.ui.core.ComponentContainer")) {
291
- 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);
292
376
  }
293
377
 
294
- //no parent view - see if container can be found by using oOptions.controlId under oOptions.rootView
295
- if (!oViewContainingTheControl && oOptions.rootView) {
296
- // oOptions.rootView can be either an id or a promise that resolves with the id
297
- pViewContainingTheControl = Promise.resolve(oOptions.rootView)
298
- .then(function(oRootViewId) {
299
- var oView;
300
-
301
- if (oRootViewId) {
302
- oView = sap.ui.getCore().byId(oRootViewId);
303
- oOptions.rootView = oRootViewId;
304
- }
305
-
306
- if (!oView) {
307
- sErrorMessage = "Did not find the root view with the id " + oOptions.rootView;
308
- return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
309
- } else {
310
- return oView;
311
- }
312
- });
313
- } else {
314
- pViewContainingTheControl = Promise.resolve(oViewContainingTheControl);
315
- }
378
+ return oContainerControl;
379
+ });
380
+ } else {
381
+ pContainerControl = Promise.resolve(oControl);
382
+ }
316
383
 
317
- pViewContainingTheControl = pViewContainingTheControl.then(function(oView) {
318
- if (oView && oView.isA("sap.ui.core.mvc.View")) {
319
- return oView.loaded();
320
- } else {
321
- return oView;
322
- }
323
- });
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
+ },
324
394
 
325
- if (oOptions.controlId) {
326
- pContainerControl = pViewContainingTheControl.then(function(oContainerView) {
327
- 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;
410
+
411
+ if (Placeholder.hasProviders()) {
412
+ Object.assign(oPlaceholderConfig, Placeholder.getPlaceholderFromProviders({
413
+ name: oOptions.name,
414
+ type: oOptions.type
415
+ }));
416
+ }
328
417
 
329
- if (oContainerView) {
330
- oContainerControl = oContainerView.byId(oOptions.controlId);
331
- }
418
+ if (Object.keys(oPlaceholderConfig).length > 0) {
419
+ if (oPlaceholderConfig.autoClose === undefined) {
420
+ oPlaceholderConfig.autoClose = true;
421
+ }
422
+ bHasPlaceholderConfig = true;
423
+ }
332
424
 
333
- if (!oContainerControl) {
334
- //Test if control exists in core (without prefix) since it was not found in the parent or root view
335
- oContainerControl = sap.ui.getCore().byId(oOptions.controlId);
336
- }
425
+ if (bIsComponentTarget) {
426
+ var oOwnerComponent = this._oCache._oComponent;
427
+ var sComponentContainerId = oTargetCreateInfo.componentId + "-container";
337
428
 
338
- return oContainerControl;
339
- });
340
- } else {
341
- pContainerControl = Promise.resolve(oControl);
342
- }
429
+ oObject = (oOwnerComponent && oOwnerComponent.byId(sComponentContainerId))
430
+ || sap.ui.getCore().byId(sComponentContainerId);
343
431
 
344
- return pContainerControl.then(function(oContainerControl) {
345
- if (!oContainerControl) {
346
- sErrorMessage = "Control with ID " + oOptions.controlId + " could not be found";
347
- return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
348
- } else {
349
- return oContainerControl;
350
- }
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);
351
443
  });
352
- })
353
- .then(function(oContainerControl) {
354
- var bHasPlaceholderConfig = false;
355
- var oPlaceholderConfig = oTargetCreateInfo.placeholder || that._oOptions.placeholder || {};
356
-
357
- if (Placeholder.hasProviders()) {
358
- Object.assign(oPlaceholderConfig, Placeholder.getPlaceholderFromProviders({
359
- name: that._oOptions.name,
360
- type: that._oOptions.type
361
- })
362
- );
363
- }
444
+ } else {
445
+ oObject = new ComponentContainer(sComponentContainerId, oContainerOptions);
446
+ }
447
+ }
364
448
 
365
- if (Object.keys(oPlaceholderConfig).length > 0) {
366
- if (oPlaceholderConfig.autoClose === undefined) {
367
- oPlaceholderConfig.autoClose = true;
368
- }
369
- bHasPlaceholderConfig = true;
370
- }
449
+ // set container object only if placeholder config is available
450
+ if (bHasPlaceholderConfig) {
451
+ oPlaceholderConfig.container = oObject;
452
+ }
453
+ }
371
454
 
372
- if (bIsComponentTarget) {
373
- var oOwnerComponent = that._oCache._oComponent;
374
- var sComponentContainerId = oTargetCreateInfo.componentId + "-container";
375
-
376
- oObject = (oOwnerComponent && oOwnerComponent.byId(sComponentContainerId))
377
- || sap.ui.getCore().byId(sComponentContainerId);
378
-
379
- if (!oObject) {
380
- // defaults mixed in with configured settings
381
- var oContainerOptions = Object.assign({
382
- height: "100%",
383
- width: "100%",
384
- lifecycle: ComponentLifecycle.Application
385
- }, oOptions.containerOptions);
386
-
387
- if (oOwnerComponent) {
388
- oOwnerComponent.runAsOwner(function() {
389
- oObject = new ComponentContainer(oOwnerComponent.createId(sComponentContainerId), oContainerOptions);
390
- });
391
- } else {
392
- oObject = new ComponentContainer(sComponentContainerId, oContainerOptions);
393
- }
394
- }
455
+ // for view targets use container control to display placeholder
456
+ if (bHasPlaceholderConfig && oContainerControl.isA("sap.ui.core.IPlaceholderSupport")) {
457
+ oPlaceholderConfig.container = oContainerControl;
458
+ }
395
459
 
396
- // set container object only if placeholder config is available
397
- if (bHasPlaceholderConfig) {
398
- oPlaceholderConfig.container = oObject;
399
- }
400
- }
460
+ // Placeholder creation
461
+ if (oPlaceholderConfig.container && !oTargetCreateInfo.repeatedRoute) {
462
+ oPlaceholderConfig.aggregation = this._oOptions.controlAggregation;
401
463
 
402
- // for view targets use container control to display placeholder
403
- if (bHasPlaceholderConfig && oContainerControl.isA("sap.ui.core.IPlaceholderSupport")) {
404
- oPlaceholderConfig.container = oContainerControl;
405
- }
464
+ var oCreateOptions = this._getCreateOptions(oTargetCreateInfo);
465
+ var oCachedObject = this._oCache.fetch(oCreateOptions, this._oOptions.type);
406
466
 
407
- // Placeholder creation
408
- if (oPlaceholderConfig.container) {
409
- 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
+ }
410
474
 
411
- if (!oTargetCreateInfo.repeatedRoute) {
412
- var oCreateOptions = that._getCreateOptions(oTargetCreateInfo);
413
- var oCachedObject = that._oCache.fetch(oCreateOptions, that._oOptions.type);
475
+ if (oPlaceholderConfig.html) {
476
+ oPlaceholderConfig.placeholder = new Placeholder({
477
+ html: oPlaceholderConfig.html
478
+ });
479
+ }
414
480
 
415
- if (oCachedObject && bIsComponentTarget) {
416
- // for type "Component", the object that is saved in the placeholder config should be
417
- // the component container instead of the component
418
- oPlaceholderConfig.object = oObject;
419
- } else {
420
- oPlaceholderConfig.object = oCachedObject;
421
- }
422
- }
481
+ if (oPlaceholderConfig.placeholder) {
482
+ pPlaceholder = this.showPlaceholder(oPlaceholderConfig);
483
+ }
484
+ }
423
485
 
424
- if (oPlaceholderConfig.html) {
425
- oPlaceholderConfig.placeholder = new Placeholder({
426
- html: oPlaceholderConfig.html
427
- });
428
- }
486
+ pPlaceholder = pPlaceholder || Promise.resolve();
487
+
488
+ // wait for placeholder to load
489
+ return pPlaceholder.then(function(sPlaceholderContent) {
490
+ // returning view info object
491
+ return {
492
+ containerControl: oContainerControl,
493
+ object: oObject,
494
+ placeholderConfig: oPlaceholderConfig,
495
+ placeholderShown: !!sPlaceholderContent
496
+ };
497
+ });
498
+ },
429
499
 
430
- if (oPlaceholderConfig.placeholder) {
431
- that.showPlaceholder(oPlaceholderConfig);
432
- }
433
- }
500
+ /**
501
+ * Here the magic happens - recursion + placement + view creation needs to be refactored
502
+ *
503
+ * @param {object} [vData] an object that will be passed to the display event in the data property. If the
504
+ * target has parents, the data will also be passed to them.
505
+ * @param {Promise} oSequencePromise Promise chain for resolution in the correct order
506
+ * @param {object} oTargetCreateInfo Additional information for the component creation. Currently the object only contains the prefix for the routerHashChanger
507
+ * @return {Promise} resolves with {name: *, view: *, control: *} if the target can be successfully displayed otherwise it rejects with an error message
508
+ * @private
509
+ */
510
+ _place: function (vData, oSequencePromise, oTargetCreateInfo) {
511
+ var oOptions = this._oOptions,
512
+ that = this,
513
+ sErrorMessage,
514
+ bIsComponentTarget = oOptions.type === "Component";
434
515
 
435
- return {
436
- containerControl: oContainerControl,
437
- object: oObject,
438
- placeholderConfig: oPlaceholderConfig
439
- };
440
- })
441
- .then(function(oViewInfo) {
442
- return pLoaded.then(function(oObject) {
443
- var oView, oRootControl;
444
- if (bIsComponentTarget) {
445
- var fnOriginalDestroy = oObject.destroy;
446
- oObject.destroy = function () {
447
- if (fnOriginalDestroy) {
448
- fnOriginalDestroy.apply(this);
449
- }
450
- // destroy the component container when the component is destroyed
451
- oViewInfo.object.destroy();
452
- };
453
- oViewInfo.object.setComponent(oObject);
454
-
455
- oRootControl = oObject.getRootControl();
456
- if (oRootControl && oRootControl.isA("sap.ui.core.mvc.View")) {
457
- oView = oRootControl;
516
+ var pLoaded, /* target is loaded and promise for waiting on "routeMatched" event in nested component is ready*/
517
+ pContainerReady; /* container control and placeholder ready */
518
+
519
+ if (vData instanceof Promise) {
520
+ oTargetCreateInfo = oSequencePromise;
521
+ oSequencePromise = vData;
522
+ vData = undefined;
523
+ }
524
+
525
+ oTargetCreateInfo = oTargetCreateInfo || {};
526
+
527
+ if (bIsComponentTarget) {
528
+ oTargetCreateInfo.componentId = oOptions.id || ManagedObjectMetadata.uid("uicomponent");
529
+ }
530
+
531
+ if ((oOptions.name || oOptions.usage) && oOptions.type) {
532
+ // target loading
533
+ pLoaded = this.load(oTargetCreateInfo);
534
+
535
+ // Either if parent available, then we need to wait until the parent got displayed or
536
+ // if no target info is given, then we need to wait for the oSequencePromise to be resolved
537
+ if (this._oParent || oTargetCreateInfo.legacy) {
538
+ // resolve container control and placeholder creation
539
+ pContainerReady = oSequencePromise.then(this.resolveContainerControl.bind(this));
540
+ } else {
541
+ // no need to wait for oSequencePromise, resolve container control in parallel
542
+ pContainerReady = this.resolveContainerControl();
543
+ }
544
+
545
+ pContainerReady = pContainerReady.then(this.displayPlaceholder.bind(this, oTargetCreateInfo));
546
+
547
+ // when target information is given
548
+ oSequencePromise = Promise.all([pLoaded, pContainerReady, oSequencePromise])
549
+ // prepareTitleProvider
550
+ .then(function(aArguments) {
551
+ var oObject = aArguments[0].object,
552
+ oViewInfo = aArguments[1],
553
+ oView, oRootControl;
554
+
555
+ oViewInfo.nestedComponentReady = aArguments[0].nestedComponentReady;
556
+
557
+ if (bIsComponentTarget) {
558
+ var fnOriginalDestroy = oObject.destroy;
559
+ oObject.destroy = function () {
560
+ if (fnOriginalDestroy) {
561
+ fnOriginalDestroy.apply(this);
458
562
  }
459
- } else {
460
- // view
461
- oViewInfo.object = oObject;
462
- oView = oObject;
563
+ // destroy the component container when the component is destroyed
564
+ oViewInfo.object.destroy();
565
+ };
566
+ oViewInfo.object.setComponent(oObject);
567
+
568
+ oRootControl = oObject.getRootControl();
569
+ if (oRootControl && oRootControl.isA("sap.ui.core.mvc.View")) {
570
+ oView = oRootControl;
463
571
  }
572
+ } else {
573
+ // view
574
+ oViewInfo.object = oObject;
575
+ oView = oObject;
576
+ }
464
577
 
465
- that._bindTitleInTitleProvider(oView);
466
- that._addTitleProviderAsDependent(oView);
578
+ that._bindTitleInTitleProvider(oView);
579
+ that._addTitleProviderAsDependent(oView);
467
580
 
468
- return oViewInfo;
469
- });
581
+ return oViewInfo;
470
582
  })
583
+ // placing the view or component into container
471
584
  .then(function(oViewInfo) {
472
585
  var oContainerControl = oViewInfo.containerControl,
473
586
  oObject = oViewInfo.object;
@@ -504,7 +617,9 @@ sap.ui.define([
504
617
  name: oOptions._name,
505
618
  view: oObject,
506
619
  control: oContainerControl,
507
- placeholderConfig: oViewInfo.placeholderConfig
620
+ nestedComponentReady: oViewInfo.nestedComponentReady,
621
+ placeholderConfig: oViewInfo.placeholderConfig,
622
+ placeholderShown: oViewInfo.placeholderShown
508
623
  };
509
624
  });
510
625
  } else {
@@ -515,33 +630,39 @@ sap.ui.define([
515
630
  });
516
631
  }
517
632
 
518
- return Promise.all([oSequencePromise, pNestedRouteMatched]).then(function(aObjects) {
519
- var oContainerControl = aObjects[0].control;
520
- var oObject = aObjects[0].view;
521
-
522
- if (oContainerControl && oObject) {
523
- that.fireDisplay({
524
- view : oObject.isA("sap.ui.core.mvc.View") ? oObject : undefined,
525
- object: oObject,
526
- control : oContainerControl,
527
- config : that._oOptions,
528
- data: vData,
529
- routeRelevant: oTargetCreateInfo.routeRelevant
530
- });
531
- }
633
+ return oSequencePromise.then(function(oParams) {
634
+ var pNestedComponentReady = oParams.nestedComponentReady || Promise.resolve();
635
+ return pNestedComponentReady.then(function() {
636
+ var oContainerControl = oParams.control,
637
+ oObject = oParams.view,
638
+ oPlaceholderConfig = oParams.placeholderConfig;
532
639
 
533
- if (aObjects[0].placeholderConfig && aObjects[0].placeholderConfig.container &&
534
- that.hidePlaceholder && aObjects[0].placeholderConfig.autoClose) {
535
- that.hidePlaceholder(aObjects[0].placeholderConfig);
536
- }
640
+ if (oContainerControl && oObject) {
641
+ that.fireDisplay({
642
+ view : oObject.isA("sap.ui.core.mvc.View") ? oObject : undefined,
643
+ object: oObject,
644
+ control : oContainerControl,
645
+ config : that._oOptions,
646
+ data: vData,
647
+ routeRelevant: oTargetCreateInfo.routeRelevant
648
+ });
649
+ }
650
+
651
+ if (oPlaceholderConfig && oPlaceholderConfig.container &&
652
+ oPlaceholderConfig.autoClose && that.hidePlaceholder) {
653
+ that.hidePlaceholder(oPlaceholderConfig);
654
+ }
537
655
 
538
- return aObjects[0];
656
+ return oParams;
657
+ });
539
658
  });
540
659
  },
541
660
 
542
661
  showPlaceholder: function(mSettings) {
543
662
  if (mSettings.container && mSettings.container.showPlaceholder) {
544
- mSettings.container.showPlaceholder(mSettings);
663
+ return mSettings.container.showPlaceholder(mSettings);
664
+ } else {
665
+ return Promise.resolve();
545
666
  }
546
667
  },
547
668