@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
@@ -10,14 +10,15 @@ sap.ui.define([
10
10
  "sap/base/util/each",
11
11
  "sap/base/util/extend",
12
12
  "sap/base/util/isEmptyObject",
13
+ "sap/ui/core/Configuration",
13
14
  "sap/ui/core/LocaleData",
14
15
  "sap/ui/core/format/NumberFormat",
15
16
  "sap/ui/model/CompositeType",
16
17
  "sap/ui/model/FormatException",
17
18
  "sap/ui/model/ParseException",
18
19
  "sap/ui/model/ValidateException"
19
- ], function(hash, each, extend, isEmptyObject, LocaleData, NumberFormat, CompositeType,
20
- FormatException, ParseException, ValidateException) {
20
+ ], function(hash, each, extend, isEmptyObject, Configuration, LocaleData, NumberFormat,
21
+ CompositeType, FormatException, ParseException, ValidateException) {
21
22
  "use strict";
22
23
 
23
24
 
@@ -47,7 +48,7 @@ sap.ui.define([
47
48
  *
48
49
  *
49
50
  * @author SAP SE
50
- * @version 1.106.0
51
+ * @version 1.107.0
51
52
  *
52
53
  * @public
53
54
  * @param {object} [oFormatOptions]
@@ -114,7 +115,7 @@ sap.ui.define([
114
115
  // might overwrite the given dynamic format options of the type.
115
116
  if (sUnitToBeFormatted && !this.oFormatOptions.customUnits && !oFormatArgs.customUnits) {
116
117
  // checks the global Configuration and CLDR for Units/UnitMappings
117
- var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
118
+ var oLocale = Configuration.getFormatSettings().getFormatLocale();
118
119
  var oLocaleData = LocaleData.getInstance(oLocale);
119
120
  var sLookupMeasure = oLocaleData.getUnitFromMapping(sUnitToBeFormatted) || sUnitToBeFormatted;
120
121
  var mUnitPatterns = oLocaleData.getUnitFormat(sLookupMeasure);
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @extends sap.ui.model.ClientModel
48
48
  *
49
49
  * @author SAP SE
50
- * @version 1.106.0
50
+ * @version 1.107.0
51
51
  *
52
52
  * @param {XMLDocument|string} oData
53
53
  * Either the URL where to load the XML from or an XML document
@@ -120,12 +120,14 @@ sap.ui.define([
120
120
  *
121
121
  * @param {string} sURL A string containing the URL to which the request is sent
122
122
  * @param {object | string} [oParameters] A map of parameters or a single parameter string that is sent to the server with the request
123
- * @param {boolean} [bAsync=true] By default, all requests are sent asynchronous.
124
- * <b>Do not use <code>bAsync=false</code></b> because synchronous requests may temporarily lock
125
- * the browser, disabling any actions while the request is active. Cross-domain requests do not
126
- * support synchronous operation.
123
+ * @param {boolean} [bAsync=true] <b>Deprecated as of Version 1.107</b>; always use asynchronous
124
+ * loading for performance reasons. By default, all requests are sent asynchronously.
125
+ * Synchronous requests may temporarily lock the browser, disabling any actions while
126
+ * the request is active. Cross-domain requests do not support synchronous operations.
127
127
  * @param {string} [sType=GET] HTTP method of request
128
- * @param {string} [bCache=false] Force no caching if false
128
+ * @param {string} [bCache=true] <b>Deprecated as of Version 1.107</b>; always use the cache
129
+ * headers from the back-end system for performance reasons. Disables caching if set to
130
+ * <code>false</code>.
129
131
  * @param {object} [mHeaders] An object of additional header key/value pairs to send along with the request
130
132
  *
131
133
  * @public
@@ -308,8 +308,8 @@ sap.ui.define([
308
308
  if (!sEpp || sAction && sRootContextID && oPendingInteraction.passportAction.endsWith(sAction)) {
309
309
  this.addEventListener("readystatechange", handleResponse.bind(this, oPendingInteraction.id));
310
310
  }
311
+ this.addEventListener("readystatechange", handleInteraction.bind(this, Interaction.notifyAsyncStep()));
311
312
  }
312
- this.addEventListener("readystatechange", handleInteraction.bind(this, Interaction.notifyAsyncStep()));
313
313
  // assign the current interaction to the xhr for later response header retrieval.
314
314
  this.pendingInteraction = oPendingInteraction;
315
315
  }
@@ -23,7 +23,8 @@ sap.ui.define('sap/ui/qunit/QUnitUtils', [
23
23
  "sap/base/strings/camelize",
24
24
  "sap/base/strings/capitalize",
25
25
  "sap/base/util/UriParameters",
26
- "sap/base/Log"
26
+ "sap/base/Log",
27
+ "sap/ui/dom/jquery/control" // jQuery Plugin "control"
27
28
  ],
28
29
  function(
29
30
  jQuery,
@@ -53,7 +53,7 @@ sap.ui.define(['sap/ui/core/Core', "sap/ui/VersionInfo"],
53
53
  * @namespace
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.106.0
56
+ * @version 1.107.0
57
57
  *
58
58
  * @public
59
59
  * @since 1.48.0
@@ -27,7 +27,7 @@ sap.ui.define([ 'sap/ui/core/Element', 'sap/ui/core/Control', 'sap/ui/core/Core'
27
27
  * @namespace
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.106.0
30
+ * @version 1.107.0
31
31
  *
32
32
  * @public
33
33
  * @since 1.48.0
@@ -114,13 +114,15 @@ sap.ui.define([
114
114
  }
115
115
 
116
116
  function getMessageForException (oError) {
117
- var sExceptionText = oError.toString();
117
+ return "Exception thrown by the testcode:'" + getErrorMessage(oError) + "'";
118
+ }
119
+
120
+ function getErrorMessage(oError) {
121
+ var sErrorMessage = oError.toString();
118
122
  // Some browsers don't have the stack property it will be added later for those browsers
119
123
  if (oError.stack) {
120
- sExceptionText += "\n" + oError.stack;
124
+ sErrorMessage += "\n" + oError.stack;
121
125
  }
122
-
123
- var sErrorMessage = "Exception thrown by the testcode:'" + sExceptionText + "'";
124
126
  return sErrorMessage;
125
127
  }
126
128
 
@@ -635,7 +637,7 @@ sap.ui.define([
635
637
  mPromiseState.done = true;
636
638
  }, function (error) {
637
639
  mPromiseState.errorMessage = "Error while waiting for promise scheduled on flow" +
638
- (error ? ", details: " + error : "");
640
+ (error ? ", details: " + getErrorMessage(error) : "");
639
641
  });
640
642
  }
641
643
  if (mPromiseState.errorMessage) {
@@ -163,7 +163,6 @@ sap.ui.define([
163
163
  */
164
164
  Opa5.prototype.iStartMyUIComponent = function iStartMyUIComponent(oOptions) {
165
165
  var that = this;
166
- var bComponentLoaded = false;
167
166
  oOptions = oOptions || {};
168
167
 
169
168
  // apply the appParams to this frame URL so the application under test uses appParams
@@ -185,23 +184,18 @@ sap.ui.define([
185
184
 
186
185
  HashChanger.getInstance().setHash(oOptions.hash || "");
187
186
 
188
- componentLauncher.start(oOptions.componentConfig).then(function () {
189
- bComponentLoaded = true;
190
- });
187
+ // wait till component is started
188
+ var oComponentStartedOptions = createWaitForObjectWithoutDefaults();
189
+ oComponentStartedOptions.errorMessage = "Unable to load the component with the name: " + oOptions.componentConfig.name;
190
+ if (oOptions.timeout) {
191
+ oComponentStartedOptions.timeout = oOptions.timeout;
192
+ }
193
+ Opa.prototype._schedulePromiseOnFlow.call(that,
194
+ componentLauncher.start(oOptions.componentConfig),
195
+ oComponentStartedOptions);
191
196
  };
192
197
  this.waitFor(oStartComponentOptions);
193
198
 
194
- // wait till component is started
195
- var oComponentStartedOptions = createWaitForObjectWithoutDefaults();
196
- oComponentStartedOptions.errorMessage = "Unable to load the component with the name: " + oOptions.name;
197
- oComponentStartedOptions.check = function () {
198
- return bComponentLoaded;
199
- };
200
- if (oOptions.timeout) {
201
- oComponentStartedOptions.timeout = oOptions.timeout;
202
- }
203
- that.waitFor(oComponentStartedOptions);
204
-
205
199
  // load extensions
206
200
  var oLoadExtensionOptions = createWaitForObjectWithoutDefaults();
207
201
  oLoadExtensionOptions.success = function () {
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  if (e.shiftKey && e.altKey && e.ctrlKey && e.keyCode === KEY_CODE.T && bLeftAlt) {
28
28
  e.preventDefault();
29
29
  sap.ui.require(["sap/ui/testrecorder/Bootstrap"], function (Bootstrap) {
30
- Bootstrap.init(["true", "window"]);
30
+ Bootstrap.init(["true"]);
31
31
  }, function (oError) {
32
32
  /*eslint-disable no-console */
33
33
  console.warn("Could not load module 'sap/ui/testrecorder/Bootstrap'! Details: " + oError);
@@ -8,9 +8,10 @@ sap.ui.define([
8
8
  "sap/base/Log",
9
9
  "sap/base/util/merge",
10
10
  "sap/base/util/UriParameters",
11
+ "sap/ui/base/SyncPromise",
11
12
  "sap/ui/thirdparty/jquery",
12
13
  "sap/ui/core/Core" // provides sap.ui.getCore()
13
- ], function (Log, merge, UriParameters, jQuery) {
14
+ ], function (Log, merge, UriParameters, SyncPromise, jQuery) {
14
15
  "use strict";
15
16
  /*global QUnit, sinon */
16
17
  // Note: The dependency to Sinon.JS has been omitted deliberately. Most test files load it via
@@ -172,6 +173,87 @@ sap.ui.define([
172
173
  assert.strictEqual(oError.name, fnConstructor.name);
173
174
  },
174
175
 
176
+ /**
177
+ * Checks for a given object its "get*" and "request*" methods, corresponding to the named
178
+ * "fetch*" method, using the given arguments.
179
+ *
180
+ * @param {object} oTestContext
181
+ * The QUnit "test" object
182
+ * @param {object} oTestee
183
+ * The test candidate having the get<sMethodName> created via
184
+ * sap.ui.model.odata.v4.lib._Helper.createGetMethod and request<sMethodName> created via
185
+ * sap.ui.model.odata.v4.lib._Helper.createRequestMethod for the corresponding
186
+ * fetch<sMethodName>
187
+ * @param {object} assert
188
+ * The QUnit "assert" object
189
+ * @param {string} sMethodName
190
+ * Method name "fetch*"
191
+ * @param {object[]} aArguments
192
+ * Method arguments
193
+ * @param {boolean} [bThrow]
194
+ * Whether the "get*" method throws if the promise is not fulfilled
195
+ * @returns {Promise}
196
+ * The "request*" method's promise
197
+ *
198
+ * @see sap.ui.model.odata.v4.lib._Helper.createGetMethod
199
+ * @see sap.ui.model.odata.v4.lib._Helper.createRequestMethod
200
+ */
201
+ checkGetAndRequest: function (oTestContext, oTestee, assert, sMethodName, aArguments,
202
+ bThrow) {
203
+ var oExpectation,
204
+ sGetMethodName = sMethodName.replace("fetch", "get"),
205
+ oPromiseMock = oTestContext.mock(Promise),
206
+ oReason = new Error("rejected"),
207
+ oRejectedPromise = Promise.reject(oReason),
208
+ sRequestMethodName = sMethodName.replace("fetch", "request"),
209
+ oResult = {},
210
+ oSyncPromise = SyncPromise.resolve(oRejectedPromise);
211
+
212
+ // resolve...
213
+ oExpectation = oTestContext.mock(oTestee).expects(sMethodName).exactly(4);
214
+ oExpectation = oExpectation.withExactArgs.apply(oExpectation, aArguments);
215
+ oExpectation.returns(SyncPromise.resolve(oResult));
216
+
217
+ // get: fulfilled
218
+ assert.strictEqual(oTestee[sGetMethodName].apply(oTestee, aArguments), oResult);
219
+
220
+ // reject...
221
+ oExpectation.returns(oSyncPromise);
222
+ oPromiseMock.expects("resolve")
223
+ .withExactArgs(sinon.match.same(oSyncPromise))
224
+ .returns(oRejectedPromise); // return any promise (this is not unwrapping!)
225
+
226
+ // request (promise still pending!)
227
+ assert.strictEqual(oTestee[sRequestMethodName].apply(oTestee, aArguments),
228
+ oRejectedPromise);
229
+
230
+ // restore early so that JS coding executed from Selenium Webdriver does not cause
231
+ // unexpected calls on the mock when it uses Promise.resolve and runs before automatic
232
+ // mock reset in afterEach
233
+ oPromiseMock.restore();
234
+
235
+ // get: pending
236
+ if (bThrow) {
237
+ assert.throws(function () {
238
+ oTestee[sGetMethodName].apply(oTestee, aArguments);
239
+ }, new Error("Result pending"));
240
+ } else {
241
+ assert.strictEqual(oTestee[sGetMethodName].apply(oTestee, aArguments),
242
+ undefined, "pending");
243
+ }
244
+ return oSyncPromise.catch(function () {
245
+ // get: rejected
246
+ if (bThrow) {
247
+ assert.throws(function () {
248
+ oTestee[sGetMethodName].apply(oTestee, aArguments);
249
+ }, oReason);
250
+ } else {
251
+ assert.strictEqual(oTestee[sGetMethodName].apply(oTestee, aArguments),
252
+ undefined, "rejected");
253
+ }
254
+ });
255
+ },
256
+
175
257
  /**
176
258
  * Companion to <code>QUnit.deepEqual</code> which only tests for the existence of expected
177
259
  * properties, not the absence of others.
@@ -12,6 +12,9 @@ sap.ui.define([
12
12
  "sap/ui/test/autowaiter/_timeoutWaiter",
13
13
  "sap/ui/test/autowaiter/_promiseWaiter",
14
14
  "sap/ui/test/autowaiter/_navigationContainerWaiter",
15
+ "sap/ui/test/autowaiter/_cssTransitionWaiter",
16
+ "sap/ui/test/autowaiter/_cssAnimationWaiter",
17
+ "sap/ui/test/autowaiter/_jsAnimationWaiter",
15
18
  "sap/ui/test/autowaiter/_UIUpdatesWaiter",
16
19
  "sap/ui/test/autowaiter/_moduleWaiter",
17
20
  "sap/ui/test/autowaiter/_resourceWaiter"
@@ -23,6 +26,9 @@ sap.ui.define([
23
26
  _timeoutWaiter,
24
27
  _promiseWaiter,
25
28
  _navigationContainerWaiter,
29
+ _cssTransitionWaiter,
30
+ _cssAnimationWaiter,
31
+ _jsAnimationWaiter,
26
32
  _UIUpdatesWaiter,
27
33
  _moduleWaiter,
28
34
  _resourceWaiter
@@ -105,6 +111,9 @@ sap.ui.define([
105
111
  timeoutWaiter: _timeoutWaiter,
106
112
  promiseWaiter: _promiseWaiter,
107
113
  navigationWaiter: _navigationContainerWaiter,
114
+ cssTransitionWaiter: _cssTransitionWaiter,
115
+ cssAnimationWaiter: _cssAnimationWaiter,
116
+ jsAnimationWaiter: _jsAnimationWaiter,
108
117
  uiUpdatesWaiter: _UIUpdatesWaiter,
109
118
  moduleWaiter: _moduleWaiter,
110
119
  resourceWaiter: _resourceWaiter
@@ -0,0 +1,114 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "./WaiterBase",
9
+ "./_utils",
10
+ "sap/ui/thirdparty/jquery"
11
+ ], function(WaiterBase, _utils, jQueryDOM) {
12
+ "use strict";
13
+
14
+ var TIMEOUT = 600;
15
+
16
+ var CSSAnimationWaiter = WaiterBase.extend("sap.ui.test.autowaiter._cssAnimationWaiter", {
17
+ constructor: function() {
18
+ WaiterBase.apply(this, arguments);
19
+ this._oTrackedAnimations = new Set();
20
+
21
+ var oObserver = new window.MutationObserver(function(mutationList) {
22
+ var oNextSibling, oPreviousSibling;
23
+ mutationList.forEach(function(mutation) {
24
+ if (mutation.type === "attributes") {
25
+ this._trackDelayedAnimation(mutation.target);
26
+ } else if (mutation.type === "childList") {
27
+ mutation.addedNodes.forEach(function (node) {
28
+ this._trackDelayedAnimation(node);
29
+ }, this);
30
+ oNextSibling = mutation.nextSibling;
31
+ oPreviousSibling = mutation.previousSibling;
32
+ oNextSibling && this._trackDelayedAnimation(oNextSibling);
33
+ oPreviousSibling && this._trackDelayedAnimation(oPreviousSibling);
34
+ }
35
+ }, this);
36
+ }.bind(this));
37
+
38
+ _utils.onElementAvailable("body", function(oRootDomNode) {
39
+ jQueryDOM(oRootDomNode).on("webkitAnimationStart animationstart", function(oEvent) {
40
+ this._register(oEvent.target, oEvent.originalEvent.type);
41
+ }.bind(this));
42
+
43
+ jQueryDOM(oRootDomNode).on("webkitAnimationEnd webkitAnimationCancel animationend animationcancel", function(oEvent) {
44
+ this._deregister(oEvent.target, oEvent.originalEvent.type);
45
+ }.bind(this));
46
+
47
+ // use mutation observer to detect animations with *delay*
48
+ // (because no native event for start of delay countdown)
49
+ oObserver.observe(oRootDomNode, { attributes: true, childList: true, subtree: true }); // TODO: filter needed?
50
+ }.bind(this));
51
+ },
52
+
53
+ hasPending: function () {
54
+ var bHasPending = this._oTrackedAnimations.size > 0;
55
+ this._oLogger.trace("hasPending", bHasPending);
56
+ if (bHasPending) {
57
+ this._oHasPendingLogger.debug("cssAnimation in progress");
58
+ }
59
+ return bHasPending;
60
+ },
61
+
62
+ _trackDelayedAnimation: function(oElement) {
63
+ var oChildren = oElement.children;
64
+ if (this._hasDelayedAnimation(oElement)) {
65
+ this._register(oElement, "observed animation with delay");
66
+ }
67
+ if (oChildren) {
68
+ for (var i = 0; i < oChildren.length; i++) {
69
+ this._trackDelayedAnimation(oChildren[i]);
70
+ }
71
+ }
72
+ },
73
+
74
+ _hasDelayedAnimation: function(oElement) {
75
+ var bIsElement = oElement.nodeType === Node.ELEMENT_NODE,
76
+ oComputedStyle = bIsElement && getComputedStyle(oElement);
77
+
78
+ return oComputedStyle
79
+ && oComputedStyle.animationName !== "none"
80
+ && parseInt(oComputedStyle.animationDelay);
81
+ },
82
+
83
+ _register: function (oElement, sReason) {
84
+ this._log("register", oElement, sReason);
85
+
86
+ if (!this._oTrackedAnimations.has(oElement)) {
87
+ this._oTrackedAnimations.add(oElement);
88
+
89
+ setTimeout(function() {
90
+ if (this._oTrackedAnimations.has(oElement)) {
91
+ this._deregister(oElement, "timed out");
92
+ }
93
+ }.bind(this), TIMEOUT, 'TIMEOUT_WAITER_IGNORE');
94
+ }
95
+ },
96
+
97
+ _deregister: function (oElement, sReason) {
98
+ this._log("deregister", oElement, sReason);
99
+
100
+ if (this._oTrackedAnimations.has(oElement)) {
101
+ this._oTrackedAnimations.delete(oElement);
102
+ }
103
+ },
104
+
105
+ _log: function(sMsg, oElement, sReason) {
106
+ this._oLogger.trace(sMsg,
107
+ "ElementId: " + oElement.id
108
+ + " Reason: " + sReason
109
+ + " Animation: " + getComputedStyle(oElement).animation);
110
+ }
111
+ });
112
+
113
+ return new CSSAnimationWaiter();
114
+ });
@@ -0,0 +1,99 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "./WaiterBase",
9
+ "./_utils",
10
+ "sap/ui/thirdparty/jquery",
11
+ "sap/base/util/isEmptyObject"
12
+ ], function(WaiterBase, _utils, jQueryDOM, isEmptyObject) {
13
+ "use strict";
14
+
15
+ var TIMEOUT = 1000;
16
+
17
+ var TransitionWaiter = WaiterBase.extend("sap.ui.test.autowaiter._cssTransitionWaiter", {
18
+ constructor: function() {
19
+ WaiterBase.apply(this, arguments);
20
+ this._oTrackedTransitions = new Map();
21
+
22
+ _utils.onElementAvailable("body", function(oRootDomNode) {
23
+ jQueryDOM(oRootDomNode).on("webkitTransitionRun webkitTransitionStart transitionrun transitionstart",
24
+ function(oEvent) {
25
+ this._register({
26
+ element: oEvent.target,
27
+ propertyName: oEvent.originalEvent.propertyName,
28
+ reason: oEvent.originalEvent.type
29
+ });
30
+ }.bind(this));
31
+
32
+ jQueryDOM(oRootDomNode).on("webkitTransitionEnd webkitTransitionCancel transitionend transitioncancel",
33
+ function(oEvent) {
34
+ this._deregister({
35
+ element: oEvent.target,
36
+ propertyName: oEvent.originalEvent.propertyName,
37
+ reason: oEvent.originalEvent.type
38
+ });
39
+ }.bind(this));
40
+ }.bind(this));
41
+ },
42
+
43
+ hasPending: function () {
44
+ var bHasPending = this._oTrackedTransitions.size > 0;
45
+ this._oLogger.trace("hasPending", bHasPending);
46
+ if (bHasPending) {
47
+ this._oHasPendingLogger.debug("transition in progress");
48
+ }
49
+ return bHasPending;
50
+ },
51
+
52
+ _register: function (oOptions) {
53
+ var oElement = oOptions.element,
54
+ sPropertyName = oOptions.propertyName;
55
+
56
+ this._log("register", oOptions);
57
+
58
+ if (!this._oTrackedTransitions.has(oElement)) {
59
+ this._oTrackedTransitions.set(oElement, {});
60
+ }
61
+
62
+ this._oTrackedTransitions.get(oElement)[oOptions.propertyName] = oOptions.propertyName;
63
+
64
+ setTimeout(function() {
65
+ if (this._oTrackedTransitions.has(oElement)) {
66
+ this._deregister({
67
+ element: oElement,
68
+ propertyName: sPropertyName,
69
+ reason: "timed out"
70
+ });
71
+ }
72
+ }.bind(this), TIMEOUT, 'TIMEOUT_WAITER_IGNORE');
73
+ },
74
+
75
+ _deregister: function (oOptions) {
76
+ var oElement = oOptions.element,
77
+ sPropertyName = oOptions.propertyName;
78
+
79
+ this._log("deregister", oOptions);
80
+
81
+ if (this._oTrackedTransitions.has(oElement)) {
82
+ var oEntry = this._oTrackedTransitions.get(oElement);
83
+ delete oEntry[sPropertyName];
84
+ if (isEmptyObject(oEntry)) {
85
+ this._oTrackedTransitions.delete(oElement);
86
+ }
87
+ }
88
+ },
89
+
90
+ _log: function(sMsg, oOptions) {
91
+ this._oLogger.trace(sMsg,
92
+ "ElementId: " + oOptions.element.id
93
+ + " Reason: " + oOptions.reason
94
+ + " PropertyName: " + oOptions.propertyName);
95
+ }
96
+ });
97
+
98
+ return new TransitionWaiter();
99
+ });
@@ -0,0 +1,70 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "./WaiterBase"
9
+ ], function(WaiterBase) {
10
+ "use strict";
11
+
12
+ var oState = {
13
+ PENDING: "PENDING",
14
+ EXECUTED: "EXECUTED",
15
+ CANCELLED: "CANCELLED"
16
+ };
17
+
18
+ var JSAnimationWaiter = WaiterBase.extend("sap.ui.test.autowaiter._jsAnimationWaiter", {
19
+ constructor: function() {
20
+ WaiterBase.apply(this, arguments);
21
+ this._oTrackedAnimations = new Set();
22
+
23
+ if (window.requestAnimationFrame) {
24
+ var fnOriginalRequestAnimationFrame = window.requestAnimationFrame;
25
+ window.requestAnimationFrame = function(callback) {
26
+ var sId,
27
+ aCallbackArgs = Array.prototype.slice.call(arguments, 1),
28
+ wrappedCallback = function(iTimestamp) {
29
+ callback(iTimestamp);
30
+ this._deregister(sId, oState.EXECUTED);
31
+ }.bind(this);
32
+
33
+ sId = fnOriginalRequestAnimationFrame.apply(null, [wrappedCallback].concat(aCallbackArgs));
34
+
35
+ this._register(sId, oState.PENDING);
36
+ return sId;
37
+ }.bind(this);
38
+ }
39
+
40
+ if (window.cancelAnimationFrame) {
41
+ var fnOriginalCancelAnimationFrame = window.cancelAnimationFrame;
42
+ window.cancelAnimationFrame = function(sId) {
43
+ this._deregister(sId, oState.CANCELLED);
44
+ return fnOriginalCancelAnimationFrame(sId);
45
+ }.bind(this);
46
+ }
47
+ },
48
+
49
+ _register: function(sId, sReason) {
50
+ this._oLogger.trace("register", "ID: " + sId + " Reason: " + sReason);
51
+ this._oTrackedAnimations.add(sId);
52
+ },
53
+
54
+ _deregister: function(sId, sReason) {
55
+ this._oLogger.trace("deregister", "ID: " + sId + " Reason: " + sReason);
56
+ this._oTrackedAnimations.delete(sId);
57
+ },
58
+
59
+ hasPending: function () {
60
+ var bHasPending = this._oTrackedAnimations.size > 0;
61
+ this._oLogger.trace("hasPending", bHasPending);
62
+ if (bHasPending) {
63
+ this._oHasPendingLogger.debug("jsAnimation in progress");
64
+ }
65
+ return bHasPending;
66
+ }
67
+ });
68
+
69
+ return new JSAnimationWaiter();
70
+ });
@@ -5,8 +5,9 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "./WaiterBase",
8
+ "./_utils",
8
9
  "sap/ui/thirdparty/jquery"
9
- ], function (WaiterBase, jQueryDOM) {
10
+ ], function (WaiterBase, _utils, jQueryDOM) {
10
11
  "use strict";
11
12
 
12
13
  var STATE = {
@@ -45,7 +46,7 @@ sap.ui.define([
45
46
  }.bind(this));
46
47
  }.bind(this));
47
48
 
48
- this._onElementAvailable("body", function (oElement) {
49
+ _utils.onElementAvailable("body", function (oElement) {
49
50
  observer.observe(oElement, {
50
51
  attributes: true,
51
52
  attributeFilter: ["src"],
@@ -104,16 +105,6 @@ sap.ui.define([
104
105
  this._oLogger.trace("Image with src '" + oElement.src + "' failed to load");
105
106
  }.bind(this));
106
107
  }
107
- },
108
- _onElementAvailable: function (sSelector, fnOnAvailable) {
109
- var aElements = jQueryDOM(sSelector);
110
- if (aElements.length) {
111
- fnOnAvailable(aElements[0]);
112
- } else {
113
- setTimeout(function () {
114
- this._onElementAvailable(sSelector, fnOnAvailable);
115
- }.bind(this), 100);
116
- }
117
108
  }
118
109
  });
119
110
 
@@ -57,10 +57,22 @@ sap.ui.define([
57
57
  }
58
58
  }
59
59
 
60
+ function onElementAvailable (sSelector, fnCallback) {
61
+ var oElement = document.querySelector(sSelector);
62
+ if (oElement) {
63
+ fnCallback(oElement);
64
+ } else {
65
+ setTimeout(function () {
66
+ onElementAvailable(sSelector, fnCallback);
67
+ }, 100);
68
+ }
69
+ }
70
+
60
71
  return {
61
72
  resolveStackTrace: resolveStackTrace,
62
73
  functionToString: functionToString,
63
- argumentsToString: argumentsToString
74
+ argumentsToString: argumentsToString,
75
+ onElementAvailable: onElementAvailable
64
76
  };
65
77
 
66
78
  }, true);
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.base.Object
25
25
  * @abstract
26
26
  * @author SAP SE
27
- * @version 1.106.0
27
+ * @version 1.107.0
28
28
  * @since 1.100
29
29
  */
30
30
  return BaseObject.extend("sap.ui.test.generic.TestBase", {