@openui5/sap.ui.core 1.106.0 → 1.107.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 (307) hide show
  1. package/package.json +1 -1
  2. package/src/jquery.sap.global.js +1 -1
  3. package/src/jquery.sap.properties.js +1 -1
  4. package/src/jquery.sap.resources.js +1 -1
  5. package/src/jquery.sap.script.js +1 -1
  6. package/src/jquery.sap.storage.js +3 -3
  7. package/src/jquery.sap.ui.js +5 -7
  8. package/src/sap/base/util/LoaderExtensions.js +6 -6
  9. package/src/sap/base/util/fetch.js +3 -0
  10. package/src/sap/base/util/mixedFetch.js +1 -1
  11. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  12. package/src/sap/base/util/restricted/_castArray.js +1 -1
  13. package/src/sap/base/util/restricted/_compact.js +1 -1
  14. package/src/sap/base/util/restricted/_curry.js +1 -1
  15. package/src/sap/base/util/restricted/_debounce.js +1 -1
  16. package/src/sap/base/util/restricted/_difference.js +1 -1
  17. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  18. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  19. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  21. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  22. package/src/sap/base/util/restricted/_flatten.js +1 -1
  23. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  24. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  25. package/src/sap/base/util/restricted/_intersection.js +1 -1
  26. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  27. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  28. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  29. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  30. package/src/sap/base/util/restricted/_isNil.js +1 -1
  31. package/src/sap/base/util/restricted/_max.js +1 -1
  32. package/src/sap/base/util/restricted/_merge.js +1 -1
  33. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  34. package/src/sap/base/util/restricted/_min.js +1 -1
  35. package/src/sap/base/util/restricted/_omit.js +1 -1
  36. package/src/sap/base/util/restricted/_pick.js +1 -1
  37. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  38. package/src/sap/base/util/restricted/_throttle.js +1 -1
  39. package/src/sap/base/util/restricted/_toArray.js +1 -1
  40. package/src/sap/base/util/restricted/_union.js +1 -1
  41. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  42. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  43. package/src/sap/base/util/restricted/_uniq.js +1 -1
  44. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  45. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  46. package/src/sap/base/util/restricted/_without.js +1 -1
  47. package/src/sap/base/util/restricted/_xor.js +1 -1
  48. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  49. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  50. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  51. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  52. package/src/sap/ui/Device.js +3 -3
  53. package/src/sap/ui/Global.js +4 -4
  54. package/src/sap/ui/base/DataType.js +4 -4
  55. package/src/sap/ui/base/Event.js +1 -1
  56. package/src/sap/ui/base/EventProvider.js +1 -1
  57. package/src/sap/ui/base/Interface.js +1 -1
  58. package/src/sap/ui/base/ManagedObject.js +1 -1
  59. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  60. package/src/sap/ui/base/ManagedObjectRegistry.js +4 -3
  61. package/src/sap/ui/base/Metadata.js +1 -1
  62. package/src/sap/ui/base/Object.js +1 -1
  63. package/src/sap/ui/base/ObjectPool.js +1 -1
  64. package/src/sap/ui/core/.library +1 -1
  65. package/src/sap/ui/core/AppCacheBuster.js +3 -4
  66. package/src/sap/ui/core/BusyIndicator.js +1 -1
  67. package/src/sap/ui/core/BusyIndicatorUtils.js +5 -6
  68. package/src/sap/ui/core/CalendarType.js +0 -1
  69. package/src/sap/ui/core/Component.js +12 -10
  70. package/src/sap/ui/core/ComponentContainer.js +6 -5
  71. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  72. package/src/sap/ui/core/ComponentSupport.js +1 -1
  73. package/src/sap/ui/core/Configuration.js +1 -1
  74. package/src/sap/ui/core/Control.js +7 -7
  75. package/src/sap/ui/core/Core.js +31 -304
  76. package/src/sap/ui/core/CustomData.js +1 -1
  77. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  78. package/src/sap/ui/core/Element.js +6 -6
  79. package/src/sap/ui/core/ElementMetadata.js +1 -1
  80. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  81. package/src/sap/ui/core/EventBus.js +1 -1
  82. package/src/sap/ui/core/FocusHandler.js +50 -2
  83. package/src/sap/ui/core/Fragment.js +1 -1
  84. package/src/sap/ui/core/HTML.js +1 -2
  85. package/src/sap/ui/core/History.js +1 -1
  86. package/src/sap/ui/core/Icon.js +1 -2
  87. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  88. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  89. package/src/sap/ui/core/InvisibleMessage.js +1 -2
  90. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  91. package/src/sap/ui/core/InvisibleText.js +5 -5
  92. package/src/sap/ui/core/Item.js +1 -2
  93. package/src/sap/ui/core/LabelEnablement.js +1 -1
  94. package/src/sap/ui/core/LayoutData.js +1 -2
  95. package/src/sap/ui/core/ListItem.js +1 -2
  96. package/src/sap/ui/core/LocalBusyIndicator.js +1 -2
  97. package/src/sap/ui/core/Locale.js +1 -1
  98. package/src/sap/ui/core/LocaleData.js +11 -9
  99. package/src/sap/ui/core/Manifest.js +8 -6
  100. package/src/sap/ui/core/Message.js +4 -6
  101. package/src/sap/ui/core/Popup.js +62 -5
  102. package/src/sap/ui/core/RenderManager.js +7 -5
  103. package/src/sap/ui/core/Renderer.js +5 -4
  104. package/src/sap/ui/core/Rendering.js +251 -0
  105. package/src/sap/ui/core/ResizeHandler.js +1 -1
  106. package/src/sap/ui/core/ScrollBar.js +6 -9
  107. package/src/sap/ui/core/ScrollBarRenderer.js +3 -3
  108. package/src/sap/ui/core/SeparatorItem.js +1 -2
  109. package/src/sap/ui/core/Title.js +1 -2
  110. package/src/sap/ui/core/TooltipBase.js +1 -2
  111. package/src/sap/ui/core/UIArea.js +389 -121
  112. package/src/sap/ui/core/UIComponent.js +1 -2
  113. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  114. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  115. package/src/sap/ui/core/VariantLayoutData.js +1 -2
  116. package/src/sap/ui/core/XMLComposite.js +1 -1
  117. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  118. package/src/sap/ui/core/XMLTemplateProcessor.js +5 -3
  119. package/src/sap/ui/core/cache/CacheManager.js +7 -6
  120. package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -4
  121. package/src/sap/ui/core/date/Islamic.js +4 -4
  122. package/src/sap/ui/core/date/UniversalDate.js +8 -8
  123. package/src/sap/ui/core/date/UniversalDateUtils.js +3 -3
  124. package/src/sap/ui/core/delegate/ItemNavigation.js +5 -5
  125. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  126. package/src/sap/ui/core/dnd/DragAndDrop.js +4 -3
  127. package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
  128. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -2
  129. package/src/sap/ui/core/dnd/DragInfo.js +1 -2
  130. package/src/sap/ui/core/dnd/DropInfo.js +1 -2
  131. package/src/sap/ui/core/format/DateFormat.js +9 -7
  132. package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +0 -1
  133. package/src/sap/ui/core/format/FileSizeFormat.js +4 -3
  134. package/src/sap/ui/core/format/ListFormat.js +4 -3
  135. package/src/sap/ui/core/format/NumberFormat.js +6 -5
  136. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  137. package/src/sap/ui/core/hyphenation/Hyphenation.js +7 -6
  138. package/src/sap/ui/core/library.js +3 -55
  139. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  140. package/src/sap/ui/core/message/Message.js +1 -1
  141. package/src/sap/ui/core/message/MessageManager.js +13 -23
  142. package/src/sap/ui/core/message/MessageParser.js +1 -1
  143. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  144. package/src/sap/ui/core/messagebundle_fr.properties +1 -1
  145. package/src/sap/ui/core/mvc/Controller.js +3 -3
  146. package/src/sap/ui/core/mvc/EventHandlerResolver.js +5 -3
  147. package/src/sap/ui/core/mvc/HTMLView.js +1 -2
  148. package/src/sap/ui/core/mvc/JSONView.js +1 -2
  149. package/src/sap/ui/core/mvc/JSView.js +1 -2
  150. package/src/sap/ui/core/mvc/TemplateView.js +1 -2
  151. package/src/sap/ui/core/mvc/View.js +21 -20
  152. package/src/sap/ui/core/mvc/ViewType.js +0 -1
  153. package/src/sap/ui/core/mvc/XMLView.js +18 -18
  154. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  155. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  156. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  157. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  158. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  159. package/src/sap/ui/core/routing/async/Target.js +4 -3
  160. package/src/sap/ui/core/rules/Config.support.js +6 -4
  161. package/src/sap/ui/core/rules/CoreHelper.support.js +3 -3
  162. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -2
  163. package/src/sap/ui/core/search/SearchProvider.js +1 -3
  164. package/src/sap/ui/core/service/Service.js +1 -1
  165. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  166. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  167. package/src/sap/ui/core/support/Plugin.js +1 -1
  168. package/src/sap/ui/core/support/Support.js +1 -1
  169. package/src/sap/ui/core/support/ToolsAPI.js +11 -13
  170. package/src/sap/ui/core/support/plugins/ControlTree.js +4 -4
  171. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  172. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  173. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  174. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  175. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  176. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  177. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  178. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +7 -5
  179. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -2
  180. package/src/sap/ui/core/tmpl/DOMElement.js +1 -4
  181. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  182. package/src/sap/ui/core/tmpl/Template.js +1 -2
  183. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -2
  184. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  185. package/src/sap/ui/core/util/Export.js +1 -1
  186. package/src/sap/ui/core/util/ExportCell.js +1 -1
  187. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  188. package/src/sap/ui/core/util/ExportRow.js +1 -1
  189. package/src/sap/ui/core/util/ExportType.js +1 -1
  190. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  191. package/src/sap/ui/core/util/File.js +1 -1
  192. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  193. package/src/sap/ui/core/util/MockServer.js +4 -2
  194. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  195. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  196. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  197. package/src/sap/ui/core/util/serializer/ViewSerializer.js +4 -4
  198. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  199. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  200. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  201. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  202. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  203. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  204. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  205. package/src/sap/ui/debug/ControlTree.js +3 -3
  206. package/src/sap/ui/debug/DebugEnv.js +4 -4
  207. package/src/sap/ui/debug/PropertyList.js +1 -1
  208. package/src/sap/ui/model/ClientModel.js +1 -1
  209. package/src/sap/ui/model/ClientTreeBinding.js +3 -1
  210. package/src/sap/ui/model/CompositeDataState.js +1 -1
  211. package/src/sap/ui/model/CompositeType.js +1 -1
  212. package/src/sap/ui/model/DataState.js +1 -1
  213. package/src/sap/ui/model/MetaModel.js +1 -1
  214. package/src/sap/ui/model/Model.js +1 -1
  215. package/src/sap/ui/model/SelectionModel.js +1 -1
  216. package/src/sap/ui/model/SimpleType.js +1 -1
  217. package/src/sap/ui/model/Sorter.js +22 -17
  218. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  219. package/src/sap/ui/model/TreeBindingAdapter.js +3 -7
  220. package/src/sap/ui/model/Type.js +1 -1
  221. package/src/sap/ui/model/analytics/AnalyticalBinding.js +2 -0
  222. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +5 -7
  223. package/src/sap/ui/model/json/JSONModel.js +8 -6
  224. package/src/sap/ui/model/message/MessageModel.js +1 -1
  225. package/src/sap/ui/model/odata/ODataAnnotations.js +5 -3
  226. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  227. package/src/sap/ui/model/odata/ODataMetaModel.js +31 -8
  228. package/src/sap/ui/model/odata/ODataMetadata.js +5 -4
  229. package/src/sap/ui/model/odata/ODataModel.js +6 -5
  230. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +0 -1
  231. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  232. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  233. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  234. package/src/sap/ui/model/odata/type/Date.js +1 -1
  235. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  236. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  237. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  238. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  239. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  240. package/src/sap/ui/model/odata/type/Double.js +1 -1
  241. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  242. package/src/sap/ui/model/odata/type/Int.js +1 -1
  243. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  244. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  245. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  246. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  247. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  248. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  249. package/src/sap/ui/model/odata/type/Single.js +1 -1
  250. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  251. package/src/sap/ui/model/odata/type/String.js +1 -1
  252. package/src/sap/ui/model/odata/type/Time.js +1 -1
  253. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  254. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  255. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  256. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +4 -3
  257. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +24 -15
  258. package/src/sap/ui/model/odata/v2/ODataListBinding.js +45 -27
  259. package/src/sap/ui/model/odata/v2/ODataModel.js +94 -36
  260. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +5 -5
  261. package/src/sap/ui/model/odata/v4/Context.js +23 -19
  262. package/src/sap/ui/model/odata/v4/ODataBinding.js +7 -3
  263. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -3
  264. package/src/sap/ui/model/odata/v4/ODataListBinding.js +121 -57
  265. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +11 -11
  266. package/src/sap/ui/model/odata/v4/ODataModel.js +111 -69
  267. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +12 -4
  268. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +2 -2
  269. package/src/sap/ui/model/odata/v4/ODataUtils.js +1 -1
  270. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +41 -29
  271. package/src/sap/ui/model/odata/v4/lib/_Cache.js +59 -20
  272. package/src/sap/ui/model/odata/v4/lib/_Helper.js +135 -4
  273. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +21 -7
  274. package/src/sap/ui/model/resource/ResourceModel.js +7 -6
  275. package/src/sap/ui/model/type/Boolean.js +1 -1
  276. package/src/sap/ui/model/type/Currency.js +1 -1
  277. package/src/sap/ui/model/type/Date.js +1 -1
  278. package/src/sap/ui/model/type/DateInterval.js +1 -1
  279. package/src/sap/ui/model/type/DateTime.js +1 -1
  280. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  281. package/src/sap/ui/model/type/FileSize.js +1 -1
  282. package/src/sap/ui/model/type/Float.js +1 -1
  283. package/src/sap/ui/model/type/Integer.js +1 -1
  284. package/src/sap/ui/model/type/String.js +1 -1
  285. package/src/sap/ui/model/type/Time.js +1 -1
  286. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  287. package/src/sap/ui/model/type/Unit.js +5 -4
  288. package/src/sap/ui/model/xml/XMLModel.js +8 -6
  289. package/src/sap/ui/performance/trace/Interaction.js +1 -1
  290. package/src/sap/ui/qunit/QUnitUtils.js +2 -1
  291. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  292. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  293. package/src/sap/ui/test/Opa.js +7 -5
  294. package/src/sap/ui/test/Opa5.js +9 -15
  295. package/src/sap/ui/test/RecorderHotkeyListener.js +1 -1
  296. package/src/sap/ui/test/TestUtils.js +83 -1
  297. package/src/sap/ui/test/autowaiter/_autoWaiter.js +9 -0
  298. package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +114 -0
  299. package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +99 -0
  300. package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +70 -0
  301. package/src/sap/ui/test/autowaiter/_resourceWaiter.js +3 -12
  302. package/src/sap/ui/test/autowaiter/_utils.js +13 -1
  303. package/src/sap/ui/test/generic/TestBase.js +1 -1
  304. package/src/sap/ui/test/matchers/Ancestor.js +1 -0
  305. package/src/sap/ui/test/matchers/Descendant.js +1 -0
  306. package/src/sap/ui/test/matchers/Sibling.js +1 -0
  307. package/src/sap/ui/util/Storage.js +1 -1
@@ -7,6 +7,8 @@
7
7
  // Provides class sap.ui.core.UIArea
8
8
  sap.ui.define([
9
9
  'sap/ui/base/ManagedObject',
10
+ 'sap/ui/base/ManagedObjectRegistry',
11
+ './Configuration',
10
12
  './Element',
11
13
  './RenderManager',
12
14
  './FocusHandler',
@@ -16,13 +18,19 @@ sap.ui.define([
16
18
  "sap/base/Log",
17
19
  "sap/base/assert",
18
20
  "sap/ui/performance/Measurement",
21
+ "sap/base/util/uid",
22
+ "sap/base/util/isEmptyObject",
23
+ "sap/ui/core/Rendering",
19
24
  'sap/ui/events/jquery/EventExtension',
20
25
  "sap/ui/events/ControlEvents",
21
26
  "sap/ui/events/F6Navigation",
27
+ "sap/ui/dom/_ready",
22
28
  "sap/ui/thirdparty/jquery"
23
29
  ],
24
30
  function(
25
31
  ManagedObject,
32
+ ManagedObjectRegistry,
33
+ Configuration,
26
34
  Element,
27
35
  RenderManager,
28
36
  FocusHandler,
@@ -32,13 +40,36 @@ sap.ui.define([
32
40
  Log,
33
41
  assert,
34
42
  Measurement,
43
+ uid,
44
+ isEmptyObject,
45
+ Rendering,
35
46
  EventExtension,
36
47
  ControlEvents,
37
48
  F6Navigation,
49
+ _ready,
38
50
  jQuery
39
51
  ) {
40
52
  "use strict";
41
53
 
54
+ // Id of the static UIArea
55
+ var STATIC_UIAREA_ID = "sap-ui-static";
56
+
57
+ var oRenderLog = Rendering.getLogger();
58
+
59
+ // create the RenderManager so it can be used already
60
+ var oRenderManager = new RenderManager();
61
+
62
+ var oCore;
63
+
64
+ /**
65
+ * Whether the DOM is ready (document.ready)
66
+ * @private
67
+ */
68
+ var bDomReady = false;
69
+
70
+ _ready().then(function() {
71
+ bDomReady = true;
72
+ });
42
73
 
43
74
  EventExtension.apply();
44
75
 
@@ -47,30 +78,11 @@ sap.ui.define([
47
78
  F6Navigation.handleF6GroupNavigation(oEvent, null);
48
79
  });
49
80
 
50
- /**
51
- * A private logger instance used for 'debugRendering' logging.
52
- *
53
- * It can be activated by setting the URL parameter sap-ui-xx-debugRerendering to true.
54
- * If activated, stack traces of invalidate() calls will be recorded and if new
55
- * invalidations occur during rendering, they will be logged to the console together
56
- * with the causing stack traces.
57
- *
58
- * @private
59
- * @todo Add more log output where helpful
60
- */
61
- var oRenderLog = Log.getLogger("sap.ui.Rendering",
62
- (
63
- // Note that the sap-ui-config option still is expected in camel case.
64
- // Lower case is only accepted here because of the config normalization which will be removed in future
65
- (window["sap-ui-config"] && (window["sap-ui-config"]["xx-debugRendering"] || window["sap-ui-config"]["xx-debugrendering"]) )
66
- || /sap-ui-xx-debug(R|-r)endering=(true|x|X)/.test(document.location.search)
67
- ) ? Log.Level.DEBUG : Math.min(Log.Level.INFO, Log.getLevel())
68
- ),
69
- fnDbgWrap = function(oControl) {
70
- return oControl;
71
- },
72
- fnDbgReport = function() {},
73
- fnDbgAnalyzeDelta = function() {};
81
+ var fnDbgWrap = function(oControl) {
82
+ return oControl;
83
+ },
84
+ fnDbgReport = function() {},
85
+ fnDbgAnalyzeDelta = function() {};
74
86
 
75
87
  if ( oRenderLog.isLoggable() ) {
76
88
 
@@ -101,13 +113,12 @@ sap.ui.define([
101
113
  * @private
102
114
  */
103
115
  fnDbgReport = function(that, mControls) {
104
- var oCore = sap.ui.getCore(),
105
- mReport = {},
116
+ var mReport = {},
106
117
  n, oControl;
107
118
 
108
119
  for (n in mControls) {
109
120
  // resolve oControl anew as it might have changed
110
- oControl = oCore.byId(n);
121
+ oControl = Element.registry.get(n);
111
122
  /*eslint-disable no-nested-ternary */
112
123
  mReport[n] = {
113
124
  type: oControl ? oControl.getMetadata().getName() : (mControls[n].obj === that ? "UIArea" : "(no such control)"),
@@ -139,9 +150,7 @@ sap.ui.define([
139
150
  mAfter[n].reason = "invalidated during rendering";
140
151
  }
141
152
  }
142
-
143
153
  };
144
-
145
154
  }
146
155
 
147
156
  /**
@@ -174,8 +183,7 @@ sap.ui.define([
174
183
  *
175
184
  * @extends sap.ui.base.ManagedObject
176
185
  * @author SAP SE
177
- * @version 1.106.0
178
- * @param {sap.ui.core.Core} oCore internal API of the <core>Core</code> that manages this UIArea
186
+ * @version 1.107.0
179
187
  * @param {object} [oRootNode] reference to the DOM element that should be 'hosting' the UI Area.
180
188
  * @public
181
189
  * @alias sap.ui.core.UIArea
@@ -183,24 +191,21 @@ sap.ui.define([
183
191
  */
184
192
  var UIArea = ManagedObject.extend("sap.ui.core.UIArea", {
185
193
 
186
- constructor: function(oCore, oRootNode) {
194
+ constructor: function(oRootNode) {
187
195
  if (arguments.length === 0) {
188
196
  return;
189
197
  }
190
-
191
198
  // Note: UIArea has a modifiable Id. This doesn't perfectly match the default behavior of ManagedObject
192
199
  // But UIArea overrides getId().
193
200
  ManagedObject.apply(this);
194
201
 
195
- //TODO we could get rid of oCore here, if we wanted to...
196
- this.oCore = oCore;
197
202
  this.bLocked = false;
198
203
  this.bInitial = true;
199
204
  this.aContentToRemove = [];
200
205
 
201
206
  this.bNeedsRerendering = false;
202
207
  if (oRootNode != null) {
203
- this.setRootNode(oRootNode);
208
+ this._setRootNode(oRootNode);
204
209
  // Figure out whether UI Area is pre-rendered (server-side JS rendering)!
205
210
  this.bNeedsRerendering = this.bNeedsRerendering && !document.getElementById(oRootNode.id + "-Init");
206
211
  }
@@ -209,8 +214,8 @@ sap.ui.define([
209
214
  if (!this.bNeedsRerendering) {
210
215
  this.bRenderSelf = false;
211
216
  } else {
212
- // Core needs to be notified about an invalid UIArea
213
- this.oCore.addInvalidatedUIArea(this);
217
+ // Rendering needs to be notified about an invalid UIArea
218
+ Rendering.invalidateUIArea(this);
214
219
  }
215
220
 
216
221
  },
@@ -289,8 +294,22 @@ sap.ui.define([
289
294
  * @param {Element} oRootNode
290
295
  * the hosting DOM node for this instance of <code>UIArea</code>.
291
296
  * @public
297
+ * @deprecated as of version 1.107.0
292
298
  */
293
299
  UIArea.prototype.setRootNode = function(oRootNode) {
300
+ this._setRootNode(oRootNode);
301
+ };
302
+
303
+ /**
304
+ * Allows setting the root node hosting this instance of <code>UIArea</code>.
305
+ *
306
+ * The node must have an ID that will be used as ID for this instance of <code>UIArea</code>.
307
+ *
308
+ * @param {Element} oRootNode
309
+ * the hosting DOM node for this instance of <code>UIArea</code>.
310
+ * @private
311
+ */
312
+ UIArea.prototype._setRootNode = function(oRootNode) {
294
313
  if (this.oRootNode === oRootNode) {
295
314
  return;
296
315
  }
@@ -303,7 +322,10 @@ sap.ui.define([
303
322
  this._ondetach();
304
323
  }
305
324
 
325
+ // UIArea gets its id from the rootNode, so we must update the registry
326
+ this.deregister();
306
327
  this.oRootNode = oRootNode;
328
+ this.register();
307
329
  if ( this.getContent().length > 0 ) {
308
330
  this.invalidate();
309
331
  }
@@ -456,8 +478,8 @@ sap.ui.define([
456
478
  UIArea.prototype.unlock = function() {
457
479
  if ( this.bLocked && this.bNeedsRerendering ) {
458
480
  // While being locked, we might have ignored a call to rerender()
459
- // Therefore notify the Core (again)
460
- this.oCore.addInvalidatedUIArea(this);
481
+ // Therefore notify the Rendering (again)
482
+ Rendering.invalidateUIArea(this);
461
483
  }
462
484
  this.bLocked = false;
463
485
  };
@@ -490,7 +512,7 @@ sap.ui.define([
490
512
  * @protected
491
513
  */
492
514
  UIArea.prototype.getEventingParent = function() {
493
- return this.oCore._getEventProvider();
515
+ return oCore._getEventProvider();
494
516
  };
495
517
 
496
518
  // ###########################################################################
@@ -537,9 +559,9 @@ sap.ui.define([
537
559
  return;
538
560
  }
539
561
 
540
- // inform the Core, if we are getting invalid now
562
+ // inform the Rendering, if we are getting invalid now
541
563
  if ( !this.bNeedsRerendering ) {
542
- this.oCore.addInvalidatedUIArea(this);
564
+ Rendering.invalidateUIArea(this);
543
565
  }
544
566
 
545
567
  var sId = oControl.getId();
@@ -567,11 +589,11 @@ sap.ui.define([
567
589
  *
568
590
  * Either renders the whole <code>UIArea</code> or a set of descendant controls that have been invalidated.
569
591
  *
570
- * @param {boolean} force Whether a re-rendering of the <code>UIArea</code> should be enforced
592
+ * @param {boolean} bForce Whether a re-rendering of the <code>UIArea</code> should be enforced
571
593
  * @return {boolean} Whether a redraw was necessary or not
572
594
  * @private
573
595
  */
574
- UIArea.prototype.rerender = function(force){
596
+ UIArea.prototype.rerender = function(bForce) {
575
597
  var that = this;
576
598
 
577
599
  function clearRenderingInfo() {
@@ -581,7 +603,7 @@ sap.ui.define([
581
603
  that.bNeedsRerendering = false;
582
604
  }
583
605
 
584
- if (force) {
606
+ if (bForce) {
585
607
  this.bNeedsRerendering = true;
586
608
  }
587
609
  if ( this.bLocked || !this.bNeedsRerendering ) {
@@ -639,7 +661,7 @@ sap.ui.define([
639
661
 
640
662
  for (var i = 0; i < len; i++) {
641
663
  if (aContent[i] && aContent[i].getParent() === this) {
642
- this.oCore.oRenderManager.render(aContent[i], this.oRootNode, true);
664
+ oRenderManager.render(aContent[i], this.oRootNode, true);
643
665
  }
644
666
  }
645
667
  bUpdated = true;
@@ -654,10 +676,8 @@ sap.ui.define([
654
676
  }
655
677
 
656
678
  } else {
657
-
658
679
  // cannot re-render now; wait!
659
680
  oRenderLog.debug("Full Rendering of UIArea '" + this.getId() + "' postponed, no root node");
660
-
661
681
  }
662
682
 
663
683
  } else { // only partial update (invalidated controls)
@@ -689,20 +709,17 @@ sap.ui.define([
689
709
  if ( mInvalidatedControls.hasOwnProperty(oCandidate.getId()) ) {
690
710
  return true;
691
711
  }
692
-
693
712
  }
694
-
695
713
  };
696
714
 
697
715
  for (var n in mInvalidatedControls) {
698
- var oControl = this.oCore.byId(n);
716
+ var oControl = Element.registry.get(n);
699
717
  // CSN 0000834961 2011: control may have been destroyed since invalidation happened -> check whether it still exists
700
718
  if ( oControl && !isRenderedTogetherWithAncestor(oControl) ) {
701
719
  oControl.rerender();
702
720
  bUpdated = true;
703
721
  }
704
722
  }
705
-
706
723
  }
707
724
 
708
725
  // enrich the bookkeeping
@@ -717,9 +734,7 @@ sap.ui.define([
717
734
  Measurement.resume("renderPendingUIUpdates");
718
735
 
719
736
  return bUpdated;
720
-
721
- };
722
-
737
+ };
723
738
  /**
724
739
  * Receives a notification from the RenderManager immediately after a control has been rendered.
725
740
  *
@@ -736,7 +751,6 @@ sap.ui.define([
736
751
  delete this.mInvalidatedControls[sId];
737
752
  }
738
753
  };
739
-
740
754
  /**
741
755
  * Rerenders the given control
742
756
  * @see sap.ui.core.Control.rerender()
@@ -755,18 +769,18 @@ sap.ui.define([
755
769
 
756
770
  var oParentDomRef = oDomRef && oDomRef.parentNode; // remember parent here as preserveContent() might move the node!
757
771
  if (oParentDomRef) {
758
- var uiArea = oControl.getUIArea();
759
- var rm = uiArea ? uiArea.oCore.oRenderManager : sap.ui.getCore().createRenderManager();
760
- oRenderLog.debug("Rerender Control '" + oControl.getId() + "'" + (uiArea ? "" : " (using a temp. RenderManager)"));
772
+ var oUIArea = oControl.getUIArea();
773
+ // Why this is really needed?
774
+ var oRM = oUIArea ? oRenderManager : new RenderManager();
775
+ oRenderLog.debug("Rerender Control '" + oControl.getId() + "'" + (oUIArea ? "" : " (using a temp. RenderManager)"));
761
776
  RenderManager.preserveContent(oDomRef, /* bPreserveRoot */ true, /* bPreserveNodesWithId */ false, oControl /* oControlBeforeRerender */);
762
- rm.render(oControl, oParentDomRef);
777
+ oRM.render(oControl, oParentDomRef);
763
778
  } else {
764
- var uiArea = oControl.getUIArea();
765
- uiArea && uiArea._onControlRendered(oControl);
779
+ var oUIArea = oControl.getUIArea();
780
+ oUIArea && oUIArea._onControlRendered(oControl);
766
781
  oRenderLog.warning("Couldn't rerender '" + oControl.getId() + "', as its DOM location couldn't be determined");
767
782
  }
768
783
  };
769
-
770
784
  var rEvents = /^(mousedown|mouseup|click|keydown|keyup|keypress|touchstart|touchend|tap)$/;
771
785
  var aPreprocessors = [], aPostprocessors = [];
772
786
  var mVerboseEvents = {mousemove: 1, mouseover: 1, mouseout: 1, scroll: 1, dragover: 1, dragenter: 1, dragleave: 1};
@@ -896,12 +910,12 @@ sap.ui.define([
896
910
  // forward the control event:
897
911
  // if the control propagation has been stopped or the default should be
898
912
  // prevented then do not forward the control event.
899
- this.oCore._handleControlEvent(oEvent, sId);
913
+ oCore._handleControlEvent(oEvent, sId);
900
914
 
901
915
  // if the UIArea or the Core is locked then we do not dispatch
902
916
  // any event to the control => but they will still be dispatched
903
917
  // as control event afterwards!
904
- if (this.bLocked || this.oCore.isLocked()) {
918
+ if (this.bLocked || oCore.isLocked()) {
905
919
  return;
906
920
  }
907
921
 
@@ -1031,50 +1045,49 @@ sap.ui.define([
1031
1045
  * @private
1032
1046
  */
1033
1047
  UIArea.prototype._onattach = function() {
1034
-
1035
- // TODO optimizations for 'matching event list' could be done here.
1036
- // // create the events string (space separated list of event names):
1037
- // // the first time a control is attached - it will determine the required
1038
- // // events and store this information in the controls metadata which is
1039
- // // shared across the control instances.
1040
- // if (!this.getMetadata().sEvents) {
1041
- //
1042
- // // shorten the access to the array of events and pseudo events
1043
- // var aEv = ControlEvents.events;
1044
- // var oPsEv = PseudoEvents.events; // required from sap/ui/events/PseudoEvents
1045
- //
1046
- // // create the data structures for the event handler registration
1047
- // this.sEvents = "";
1048
- // var aEvents = [];
1049
- //
1050
- // // check for pseudo events and register them for their relevant types
1051
- // for (var evt in oPsEv) {
1052
- // for (j = 0, js = oPsEv[evt].aTypes.length; j < js; j++) {
1053
- // var type = oPsEv[evt].aTypes[j];
1054
- // if (aEvents.indexOf(type) === -1) {
1055
- // aEvents.push(type);
1056
- // }
1057
- // }
1058
- // }
1059
- //
1060
- // // check for events and register them
1061
- // for (var i = 0, is = aEv.length; i < is; i++) {
1062
- // var type = aEv[i];
1063
- // if (aEvents.indexOf(type) === -1) {
1064
- // aEvents.push(type);
1065
- // }
1066
- // }
1067
- //
1068
- // // keep the list of events for the jQuery bind/unbind method
1069
- // this.sEvents = aEvents.join(" ");
1070
- //
1071
- // // cache the event handlers registry map
1072
- // this.getMetadata().sEvents = this.sEvents;
1073
- //
1074
- // } else {
1075
- // // use the cached map of event handlers
1076
- // this.sEvents = this.getMetadata().sEvents;
1077
- // }
1048
+ // TODO optimizations for 'matching event list' could be done here.
1049
+ // // create the events string (space separated list of event names):
1050
+ // // the first time a control is attached - it will determine the required
1051
+ // // events and store this information in the controls metadata which is
1052
+ // // shared across the control instances.
1053
+ // if (!this.getMetadata().sEvents) {
1054
+ //
1055
+ // // shorten the access to the array of events and pseudo events
1056
+ // var aEv = ControlEvents.events;
1057
+ // var oPsEv = PseudoEvents.events; // required from sap/ui/events/PseudoEvents
1058
+ //
1059
+ // // create the data structures for the event handler registration
1060
+ // this.sEvents = "";
1061
+ // var aEvents = [];
1062
+ //
1063
+ // // check for pseudo events and register them for their relevant types
1064
+ // for (var evt in oPsEv) {
1065
+ // for (j = 0, js = oPsEv[evt].aTypes.length; j < js; j++) {
1066
+ // var type = oPsEv[evt].aTypes[j];
1067
+ // if (aEvents.indexOf(type) === -1) {
1068
+ // aEvents.push(type);
1069
+ // }
1070
+ // }
1071
+ // }
1072
+ //
1073
+ // // check for events and register them
1074
+ // for (var i = 0, is = aEv.length; i < is; i++) {
1075
+ // var type = aEv[i];
1076
+ // if (aEvents.indexOf(type) === -1) {
1077
+ // aEvents.push(type);
1078
+ // }
1079
+ // }
1080
+ //
1081
+ // // keep the list of events for the jQuery bind/unbind method
1082
+ // this.sEvents = aEvents.join(" ");
1083
+ //
1084
+ // // cache the event handlers registry map
1085
+ // this.getMetadata().sEvents = this.sEvents;
1086
+ //
1087
+ // } else {
1088
+ // // use the cached map of event handlers
1089
+ // this.sEvents = this.getMetadata().sEvents;
1090
+ // }
1078
1091
 
1079
1092
  // check for existing root node
1080
1093
  var oDomRef = this.getRootNode();
@@ -1104,15 +1117,13 @@ sap.ui.define([
1104
1117
 
1105
1118
  // TODO: when optimizing the events => take care to unbind only the
1106
1119
  // required. additionally consider not to remove other event handlers.
1107
- // var ojQRef = jQuery(oDomRef);
1108
- // if (this.sEvents) {
1109
- // ojQRef.off(this.sEvents, this._handleEvent);
1110
- // }
1111
- //
1112
- // var oFH = this.oCore.oFocusHandler;
1113
- // ojQRef.off("focus",oFH.onfocusin);
1114
- // ojQRef.off("blur", oFH.onfocusout);
1115
-
1120
+ // var ojQRef = jQuery(oDomRef);
1121
+ // if (this.sEvents) {
1122
+ // ojQRef.off(this.sEvents, this._handleEvent);
1123
+ // }
1124
+ //
1125
+ // ojQRef.off("focus",FocusHandler.onfocusin);
1126
+ // ojQRef.off("blur", FocusHandler.onfocusout);
1116
1127
  };
1117
1128
 
1118
1129
  /**
@@ -1186,7 +1197,7 @@ sap.ui.define([
1186
1197
  }
1187
1198
 
1188
1199
  var oCurrentControl = this.getFieldGroupControl();
1189
- if ( oControl != oCurrentControl ) {
1200
+ if ( oControl != oCurrentControl && document.activeElement && (document.activeElement.id !== "sap-ui-static-firstfe")) {
1190
1201
  var aCurrentGroupIds = (oCurrentControl ? oCurrentControl._getFieldGroupIds() : []),
1191
1202
  aNewGroupIds = (oControl ? oControl._getFieldGroupIds() : []),
1192
1203
  aTargetFieldGroupIds = aCurrentGroupIds.filter(function(sCurrentGroupId) {
@@ -1216,6 +1227,15 @@ sap.ui.define([
1216
1227
  return null;
1217
1228
  };
1218
1229
 
1230
+ // apply the registry mixin
1231
+ ManagedObjectRegistry.apply(UIArea, {
1232
+ onDuplicate: function(sId, oldUIArea, newUIArea) {
1233
+ var sMsg = "adding UIArea with duplicate id '" + sId + "'";
1234
+ Log.error(sMsg);
1235
+ throw new Error("Error: " + sMsg);
1236
+ }
1237
+ });
1238
+
1219
1239
  // field group static members
1220
1240
 
1221
1241
  /*
@@ -1244,6 +1264,254 @@ sap.ui.define([
1244
1264
  // share the render log with Core
1245
1265
  UIArea._oRenderLog = oRenderLog;
1246
1266
 
1247
- return UIArea;
1267
+ /**
1268
+ * Creates a new {@link sap.ui.core.UIArea UIArea}.
1269
+ * Must only be used by sap.ui.core.Core or sap.ui.core.Control.
1270
+ *
1271
+ * @param {Element|string} oDomRef a DOM Element or ID string of the UIArea
1272
+ * @return {sap.ui.core.UIArea} a new UIArea
1273
+ * @private
1274
+ * @ui5-restricted sap.ui.core
1275
+ */
1276
+ UIArea.create = function(oDomRef) {
1277
+ assert(typeof oDomRef === "string" || typeof oDomRef === "object", "oDomRef must be a string or object");
1248
1278
 
1279
+ if (!oDomRef) {
1280
+ throw new Error("oDomRef must not be null");
1281
+ }
1282
+
1283
+ // oDomRef might be (and actually IS in most cases!) a string (the ID of a DOM element)
1284
+ if (typeof (oDomRef) === "string") {
1285
+ var id = oDomRef;
1286
+
1287
+ if (id == STATIC_UIAREA_ID) {
1288
+ oDomRef = UIArea.getStaticAreaRef();
1289
+ } else {
1290
+ oDomRef = document.getElementById(oDomRef);
1291
+ if (!oDomRef) {
1292
+ throw new Error("DOM element with ID '" + id + "' not found in page, but application tries to insert content.");
1293
+ }
1294
+ }
1295
+ }
1296
+
1297
+ // if the domref does not have an ID or empty ID => generate one
1298
+ if (!oDomRef.id || oDomRef.id.length == 0) {
1299
+ oDomRef.id = uid();
1300
+ }
1301
+
1302
+ // create a new or fetch an existing UIArea
1303
+ var sId = oDomRef.id;
1304
+ var oUIArea = UIArea.registry.get(sId);
1305
+ if (!oUIArea) {
1306
+ oUIArea = new UIArea(oDomRef);
1307
+ if (!isEmptyObject(oCore.oModels)) {
1308
+ var oProperties = {
1309
+ oModels: Object.assign({}, oCore.oModels),
1310
+ oBindingContexts: {},
1311
+ aPropagationListeners: []
1312
+ };
1313
+ oUIArea._propagateProperties(true, oUIArea, oProperties, true);
1314
+ }
1315
+ } else {
1316
+ // this should solve the issue of 'recreation' of a UIArea
1317
+ // e.g. via setRoot with a new domRef
1318
+ oUIArea._setRootNode(oDomRef);
1319
+ }
1320
+ return oUIArea;
1321
+ };
1322
+
1323
+ /**
1324
+ * Returns the static, hidden area DOM element belonging to this core instance.
1325
+ *
1326
+ * It can be used e.g. for hiding elements like Popups, Shadow, Blocklayer etc.
1327
+ *
1328
+ * If it is not yet available, a DIV is created and appended to the body.
1329
+ *
1330
+ * @returns {Element} the static, hidden area DOM element belonging to this core instance.
1331
+ * @throws {Error} an Error if the document is not yet ready
1332
+ * @private
1333
+ */
1334
+ UIArea.getStaticAreaRef = function() {
1335
+ if (!bDomReady) {
1336
+ throw new Error("DOM is not ready yet. Static UIArea cannot be created.");
1337
+ }
1338
+
1339
+ var oStaticArea = document.getElementById(STATIC_UIAREA_ID), oFirstFocusElement;
1340
+
1341
+ if (!oStaticArea) {
1342
+
1343
+ oStaticArea = document.createElement("div");
1344
+ oFirstFocusElement = document.createElement("span");
1345
+
1346
+ oStaticArea.setAttribute("id", STATIC_UIAREA_ID);
1347
+
1348
+ Object.assign(oStaticArea.style, {
1349
+ "height": "0",
1350
+ "width": "0",
1351
+ "overflow": "hidden",
1352
+ "float": Configuration.getRTL() ? "right" : "left"
1353
+ });
1354
+
1355
+ oFirstFocusElement.setAttribute("id", STATIC_UIAREA_ID + "-firstfe");
1356
+ oFirstFocusElement.setAttribute("tabindex", -1);
1357
+ oFirstFocusElement.style.fontSize = 0;
1358
+
1359
+ oStaticArea.appendChild(oFirstFocusElement);
1360
+
1361
+ document.body.insertBefore(oStaticArea, document.body.firstChild);
1362
+
1363
+ UIArea.create(oStaticArea).bInitial = false;
1364
+ }
1365
+ return oStaticArea;
1366
+ };
1367
+
1368
+ /**
1369
+ * Checks whether the given DOM element is the root of the static area.
1370
+ *
1371
+ * @param {Element} oDomRef DOM element to check
1372
+ * @returns {boolean} Whether the given DOM element is the root of the static area
1373
+ * @private
1374
+ */
1375
+ UIArea.isStaticAreaRef = function(oDomRef) {
1376
+ return !!(oDomRef && (oDomRef.id === STATIC_UIAREA_ID));
1377
+ };
1378
+
1379
+ /**
1380
+ * Sets the Core instance in Core onInit
1381
+ * @param {sap.ui.core.Core} oCoreInstance the Core instance
1382
+ * @private
1383
+ */
1384
+ UIArea.setCore = function(oCoreInstance) {
1385
+ oCore = oCoreInstance;
1386
+
1387
+ var aUiAreas = Configuration.getValue("areas");
1388
+ // create any pre-configured UIAreas
1389
+ if ( aUiAreas ) {
1390
+ for (var i = 0, l = aUiAreas.length; i < l; i++) {
1391
+ UIArea.create(aUiAreas[i]);
1392
+ }
1393
+ }
1394
+ };
1395
+
1396
+ /**
1397
+ * Registry of all <code>sap.ui.core.Element</code>s that currently exist.
1398
+ *
1399
+ * @namespace sap.ui.core.UIArea.registry
1400
+ * @public
1401
+ * @since 1.107
1402
+ */
1403
+
1404
+ /**
1405
+ * Number of existing UIAreas.
1406
+ *
1407
+ * @type {int}
1408
+ * @readonly
1409
+ * @name sap.ui.core.UIArea.registry.size
1410
+ * @public
1411
+ */
1412
+
1413
+ /**
1414
+ * Return an object with all instances of <code>sap.ui.core.UIArea</code>,
1415
+ * keyed by their ID.
1416
+ *
1417
+ * Each call creates a new snapshot object. Depending on the size of the UI,
1418
+ * this operation therefore might be expensive. Consider to use the <code>forEach</code>
1419
+ * or <code>filter</code> method instead of executing similar operations on the returned
1420
+ * object.
1421
+ *
1422
+ * <b>Note</b>: The returned object is created by a call to <code>Object.create(null)</code>,
1423
+ * and therefore lacks all methods of <code>Object.prototype</code>, e.g. <code>toString</code> etc.
1424
+ *
1425
+ * @returns {Object<sap.ui.core.ID,sap.ui.core.UIArea>} Object with all UIAreas, keyed by their ID
1426
+ * @name sap.ui.core.UIArea.registry.all
1427
+ * @function
1428
+ * @public
1429
+ */
1430
+
1431
+ /**
1432
+ * Retrieves an UIArea by its ID.
1433
+ *
1434
+ * When the ID is <code>null</code> or <code>undefined</code> or when there's no UIArea with
1435
+ * the given ID, then <code>undefined</code> is returned.
1436
+ *
1437
+ * @param {sap.ui.core.ID} id ID of the UIArea to retrieve
1438
+ * @returns {sap.ui.core.UIArea|undefined} UIArea with the given ID or <code>undefined</code>
1439
+ * @name sap.ui.core.UIArea.registry.get
1440
+ * @function
1441
+ * @public
1442
+ */
1443
+
1444
+ /**
1445
+ * Calls the given <code>callback</code> for each UIArea.
1446
+ *
1447
+ * The expected signature of the callback is
1448
+ * <pre>
1449
+ * function callback(oUIArea, sID)
1450
+ * </pre>
1451
+ * where <code>oUIArea</code> is the currently visited UIArea instance and <code>sID</code>
1452
+ * is the ID of that instance.
1453
+ *
1454
+ * The order in which the callback is called for UIAreas is not specified and might change between
1455
+ * calls (over time and across different versions of UI5).
1456
+ *
1457
+ * If UIAreas are created or destroyed within the <code>callback</code>, then the behavior is
1458
+ * not specified. Newly added objects might or might not be visited. When an UIArea is destroyed or
1459
+ * the root node is changed during the filtering and was not visited yet, it might or might not be
1460
+ * visited. As the behavior for such concurrent modifications is not specified, it may change in
1461
+ * newer releases.
1462
+ *
1463
+ * If a <code>thisArg</code> is given, it will be provided as <code>this</code> context when calling
1464
+ * <code>callback</code>. The <code>this</code> value that the implementation of <code>callback</code>
1465
+ * sees, depends on the usual resolution mechanism. E.g. when <code>callback</code> was bound to some
1466
+ * context object, that object wins over the given <code>thisArg</code>.
1467
+ *
1468
+ * @param {function(sap.ui.core.UIArea,sap.ui.core.ID)} callback
1469
+ * Function to call for each UIArea
1470
+ * @param {Object} [thisArg=undefined]
1471
+ * Context object to provide as <code>this</code> in each call of <code>callback</code>
1472
+ * @throws {TypeError} If <code>callback</code> is not a function
1473
+ * @name sap.ui.core.UIArea.registry.forEach
1474
+ * @function
1475
+ * @public
1476
+ */
1477
+
1478
+ /**
1479
+ * Returns an array with UIAreas for which the given <code>callback</code> returns a value that coerces
1480
+ * to <code>true</code>.
1481
+ *
1482
+ * The expected signature of the callback is
1483
+ * <pre>
1484
+ * function callback(oUIArea, sID)
1485
+ * </pre>
1486
+ * where <code>oUIArea</code> is the currently visited UIArea instance and <code>sID</code>
1487
+ * is the ID of that instance.
1488
+ *
1489
+ * If UIAreas are created or destroyed within the <code>callback</code>, then the behavior is
1490
+ * not specified. Newly added objects might or might not be visited. When an UIArea is destroyed or
1491
+ * the root node is changed during the filtering and was not visited yet, it might or might not be
1492
+ * visited. As the behavior for such concurrent modifications is not specified, it may change in
1493
+ * newer releases.
1494
+ *
1495
+ * If a <code>thisArg</code> is given, it will be provided as <code>this</code> context when calling
1496
+ * <code>callback</code>. The <code>this</code> value that the implementation of <code>callback</code>
1497
+ * sees, depends on the usual resolution mechanism. E.g. when <code>callback</code> was bound to some
1498
+ * context object, that object wins over the given <code>thisArg</code>.
1499
+ *
1500
+ * This function returns an array with all UIAreas matching the given predicate. The order of the
1501
+ * UIAreas in the array is not specified and might change between calls (over time and across different
1502
+ * versions of UI5).
1503
+ *
1504
+ * @param {function(sap.ui.core.UIArea,sap.ui.core.ID):boolean} callback
1505
+ * predicate against which each UIArea is tested
1506
+ * @param {Object} [thisArg=undefined]
1507
+ * context object to provide as <code>this</code> in each call of <code>callback</code>
1508
+ * @returns {sap.ui.core.UIArea[]}
1509
+ * Array of UIAreas matching the predicate; order is undefined and might change in newer versions of UI5
1510
+ * @throws {TypeError} If <code>callback</code> is not a function
1511
+ * @name sap.ui.core.UIArea.registry.filter
1512
+ * @function
1513
+ * @public
1514
+ */
1515
+
1516
+ return UIArea;
1249
1517
  });