@openui5/sap.ui.core 1.105.1 → 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.
- package/.reuse/dep5 +20 -17
- package/THIRDPARTY.txt +31 -21
- package/package.json +1 -1
- package/src/jquery.sap.dom.js +10 -10
- package/src/jquery.sap.global.js +24 -216
- package/src/jquery.sap.history.js +1 -1
- package/src/jquery.sap.properties.js +2 -2
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +4 -4
- package/src/jquery.sap.ui.js +5 -7
- package/src/sap/base/i18n/ResourceBundle.js +7 -11
- package/src/sap/base/util/LoaderExtensions.js +6 -6
- package/src/sap/base/util/ObjectPath.js +1 -1
- package/src/sap/base/util/Properties.js +1 -1
- package/src/sap/base/util/fetch.js +8 -10
- package/src/sap/base/util/mixedFetch.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/base/util/syncFetch.js +9 -16
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +7 -14
- package/src/sap/ui/VersionInfo.js +57 -54
- package/src/sap/ui/base/BindingInfo.js +198 -0
- package/src/sap/ui/base/DataType.js +5 -5
- package/src/sap/ui/base/Event.js +2 -2
- package/src/sap/ui/base/EventProvider.js +2 -2
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +209 -979
- package/src/sap/ui/base/ManagedObjectMetadata.js +6 -6
- package/src/sap/ui/base/ManagedObjectRegistry.js +4 -3
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +13 -9
- package/src/sap/ui/core/AppCacheBuster.js +3 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +5 -6
- package/src/sap/ui/core/CalendarType.js +0 -1
- package/src/sap/ui/core/Component.js +16 -14
- package/src/sap/ui/core/ComponentContainer.js +6 -5
- package/src/sap/ui/core/ComponentMetadata.js +5 -12
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +525 -336
- package/src/sap/ui/core/Control.js +7 -7
- package/src/sap/ui/core/Core.js +102 -422
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +65 -9
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/FocusHandler.js +79 -9
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -2
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -2
- package/src/sap/ui/core/IconPool.js +8 -8
- package/src/sap/ui/core/IndicationColorSupport.js +2 -2
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -2
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +5 -5
- package/src/sap/ui/core/Item.js +1 -2
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -2
- package/src/sap/ui/core/ListItem.js +1 -2
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -2
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +15 -13
- package/src/sap/ui/core/Manifest.js +8 -6
- package/src/sap/ui/core/Message.js +4 -6
- package/src/sap/ui/core/Popup.js +63 -6
- package/src/sap/ui/core/RenderManager.js +13 -5
- package/src/sap/ui/core/Renderer.js +5 -4
- package/src/sap/ui/core/Rendering.js +251 -0
- package/src/sap/ui/core/ResizeHandler.js +7 -7
- package/src/sap/ui/core/ScrollBar.js +6 -9
- package/src/sap/ui/core/ScrollBarRenderer.js +3 -3
- package/src/sap/ui/core/SeparatorItem.js +1 -2
- package/src/sap/ui/core/Title.js +1 -2
- package/src/sap/ui/core/TooltipBase.js +12 -14
- package/src/sap/ui/core/UIArea.js +396 -129
- package/src/sap/ui/core/UIComponent.js +3 -4
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +2 -2
- package/src/sap/ui/core/VariantLayoutData.js +1 -2
- package/src/sap/ui/core/XMLComposite.js +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +12 -10
- package/src/sap/ui/core/_ConfigurationProvider.js +187 -0
- package/src/sap/ui/core/cache/CacheManager.js +9 -8
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -4
- package/src/sap/ui/core/cldr/es_BO.json +3 -3
- package/src/sap/ui/core/cldr/es_CL.json +3 -3
- package/src/sap/ui/core/cldr/es_MX.json +3 -3
- package/src/sap/ui/core/cldr/es_PE.json +3 -3
- package/src/sap/ui/core/cldr/es_UY.json +3 -3
- package/src/sap/ui/core/cldr/es_VE.json +2 -2
- package/src/sap/ui/core/date/Islamic.js +4 -4
- package/src/sap/ui/core/date/UniversalDate.js +8 -8
- package/src/sap/ui/core/date/UniversalDateUtils.js +3 -3
- package/src/sap/ui/core/delegate/ItemNavigation.js +5 -5
- package/src/sap/ui/core/delegate/ScrollEnablement.js +7 -6
- package/src/sap/ui/core/dnd/DragAndDrop.js +14 -9
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -2
- package/src/sap/ui/core/dnd/DragInfo.js +1 -2
- package/src/sap/ui/core/dnd/DropInfo.js +1 -2
- package/src/sap/ui/core/format/DateFormat.js +14 -7
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +0 -1
- package/src/sap/ui/core/format/FileSizeFormat.js +4 -3
- package/src/sap/ui/core/format/ListFormat.js +4 -3
- package/src/sap/ui/core/format/NumberFormat.js +7 -6
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +7 -6
- package/src/sap/ui/core/library.js +3 -55
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +13 -23
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/mvc/Controller.js +8 -3
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +5 -3
- package/src/sap/ui/core/mvc/HTMLView.js +1 -2
- package/src/sap/ui/core/mvc/JSONView.js +1 -2
- package/src/sap/ui/core/mvc/JSView.js +2 -3
- package/src/sap/ui/core/mvc/TemplateView.js +1 -2
- package/src/sap/ui/core/mvc/View.js +21 -20
- package/src/sap/ui/core/mvc/ViewType.js +0 -1
- package/src/sap/ui/core/mvc/XMLView.js +18 -18
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Router.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +4 -3
- package/src/sap/ui/core/rules/App.support.js +11 -13
- package/src/sap/ui/core/rules/Config.support.js +19 -17
- package/src/sap/ui/core/rules/CoreHelper.support.js +4 -4
- package/src/sap/ui/core/rules/Model.support.js +8 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +8 -8
- package/src/sap/ui/core/rules/View.support.js +9 -9
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -2
- package/src/sap/ui/core/search/SearchProvider.js +1 -3
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Hotkeys.js +2 -3
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/ToolsAPI.js +11 -13
- package/src/sap/ui/core/support/plugins/ControlTree.js +4 -4
- package/src/sap/ui/core/support/plugins/Debugging.js +3 -3
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
- package/src/sap/ui/core/support/support.html +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +10 -8
- package/src/sap/ui/core/theming/Parameters.js +8 -15
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -2
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -4
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +6 -5
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -2
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +48 -72
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +4 -3
- package/src/sap/ui/core/util/XMLPreprocessor.js +2 -2
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +4 -4
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +3 -3
- package/src/sap/ui/debug/DebugEnv.js +4 -4
- package/src/sap/ui/debug/PropertyList.css +1 -31
- package/src/sap/ui/debug/PropertyList.js +6 -250
- package/src/sap/ui/dom/getScrollbarSize.js +1 -1
- package/src/sap/ui/dom/jquery/control.js +1 -0
- package/src/sap/ui/events/jquery/EventSimulation.js +4 -4
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +3 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/Context.js +3 -0
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/ListBinding.js +2 -2
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +871 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +16 -5
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +24 -19
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +3 -7
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +2 -0
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +5 -7
- package/src/sap/ui/model/json/JSONModel.js +9 -7
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +4 -4
- package/src/sap/ui/model/odata/ODataAnnotations.js +5 -3
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +10 -10
- package/src/sap/ui/model/odata/ODataMetadata.js +5 -4
- package/src/sap/ui/model/odata/ODataModel.js +6 -5
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +0 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +5 -5
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +4 -3
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +25 -16
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +46 -28
- package/src/sap/ui/model/odata/v2/ODataModel.js +97 -39
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +5 -5
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +3 -3
- package/src/sap/ui/model/odata/v4/Context.js +109 -71
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -7
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +88 -68
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +116 -81
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +23 -20
- package/src/sap/ui/model/odata/v4/ODataModel.js +350 -88
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +35 -9
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +15 -9
- package/src/sap/ui/model/odata/v4/ODataUtils.js +8 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +45 -33
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +40 -6
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +135 -81
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +2 -3
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +179 -36
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +2 -3
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +26 -7
- package/src/sap/ui/model/resource/ResourceModel.js +8 -7
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +5 -4
- package/src/sap/ui/model/xml/XMLModel.js +8 -6
- package/src/sap/ui/performance/trace/Interaction.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa.js +7 -5
- package/src/sap/ui/test/Opa5.js +9 -15
- package/src/sap/ui/test/OpaBuilder.js +1 -1
- package/src/sap/ui/test/RecorderHotkeyListener.js +1 -1
- package/src/sap/ui/test/TestUtils.js +83 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +9 -0
- package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +114 -0
- package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +99 -0
- package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +70 -0
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +3 -12
- package/src/sap/ui/test/autowaiter/_utils.js +13 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/matchers/Ancestor.js +1 -0
- package/src/sap/ui/test/matchers/Descendant.js +1 -0
- package/src/sap/ui/test/matchers/Sibling.js +1 -0
- 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,
|
|
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.
|
|
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 =
|
|
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.
|
|
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]
|
|
124
|
-
*
|
|
125
|
-
* the browser, disabling any actions while
|
|
126
|
-
* support synchronous
|
|
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=
|
|
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
|
}
|
package/src/sap/ui/test/Opa.js
CHANGED
|
@@ -114,13 +114,15 @@ sap.ui.define([
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
function getMessageForException (oError) {
|
|
117
|
-
|
|
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
|
-
|
|
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) {
|
package/src/sap/ui/test/Opa5.js
CHANGED
|
@@ -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
|
-
|
|
189
|
-
|
|
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 () {
|
|
@@ -1123,7 +1123,7 @@ sap.ui.define(
|
|
|
1123
1123
|
* Creates a matcher function that returns an aggregation element of a control at a given index.
|
|
1124
1124
|
* @param {string} sAggregationName the name of the aggregation that is used for matching
|
|
1125
1125
|
* @param {int} iIndex the index within the aggregation
|
|
1126
|
-
* @returns {function} the matcher function returns the item at a certain index in the aggregation or <code>undefined</code> if index not in range
|
|
1126
|
+
* @returns {function(sap.ui.core.Control): sap.ui.base.ManagedObject} the matcher function returns the item at a certain index in the aggregation or <code>undefined</code> if index not in range
|
|
1127
1127
|
* @public
|
|
1128
1128
|
* @static
|
|
1129
1129
|
*/
|
|
@@ -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"
|
|
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
|
-
|
|
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);
|