@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
|
@@ -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,14 +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",
|
|
22
|
-
"sap/ui/
|
|
23
|
-
"sap/ui/
|
|
27
|
+
"sap/ui/dom/_ready",
|
|
28
|
+
"sap/ui/thirdparty/jquery"
|
|
24
29
|
],
|
|
25
30
|
function(
|
|
26
31
|
ManagedObject,
|
|
32
|
+
ManagedObjectRegistry,
|
|
33
|
+
Configuration,
|
|
27
34
|
Element,
|
|
28
35
|
RenderManager,
|
|
29
36
|
FocusHandler,
|
|
@@ -33,13 +40,36 @@ sap.ui.define([
|
|
|
33
40
|
Log,
|
|
34
41
|
assert,
|
|
35
42
|
Measurement,
|
|
43
|
+
uid,
|
|
44
|
+
isEmptyObject,
|
|
45
|
+
Rendering,
|
|
36
46
|
EventExtension,
|
|
37
47
|
ControlEvents,
|
|
38
48
|
F6Navigation,
|
|
49
|
+
_ready,
|
|
39
50
|
jQuery
|
|
40
51
|
) {
|
|
41
52
|
"use strict";
|
|
42
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
|
+
});
|
|
43
73
|
|
|
44
74
|
EventExtension.apply();
|
|
45
75
|
|
|
@@ -48,30 +78,11 @@ sap.ui.define([
|
|
|
48
78
|
F6Navigation.handleF6GroupNavigation(oEvent, null);
|
|
49
79
|
});
|
|
50
80
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
* invalidations occur during rendering, they will be logged to the console together
|
|
57
|
-
* with the causing stack traces.
|
|
58
|
-
*
|
|
59
|
-
* @private
|
|
60
|
-
* @todo Add more log output where helpful
|
|
61
|
-
*/
|
|
62
|
-
var oRenderLog = Log.getLogger("sap.ui.Rendering",
|
|
63
|
-
(
|
|
64
|
-
// Note that the sap-ui-config option still is expected in camel case.
|
|
65
|
-
// Lower case is only accepted here because of the config normalization which will be removed in future
|
|
66
|
-
(window["sap-ui-config"] && (window["sap-ui-config"]["xx-debugRendering"] || window["sap-ui-config"]["xx-debugrendering"]) )
|
|
67
|
-
|| /sap-ui-xx-debug(R|-r)endering=(true|x|X)/.test(document.location.search)
|
|
68
|
-
) ? Log.Level.DEBUG : Math.min(Log.Level.INFO, Log.getLevel())
|
|
69
|
-
),
|
|
70
|
-
fnDbgWrap = function(oControl) {
|
|
71
|
-
return oControl;
|
|
72
|
-
},
|
|
73
|
-
fnDbgReport = function() {},
|
|
74
|
-
fnDbgAnalyzeDelta = function() {};
|
|
81
|
+
var fnDbgWrap = function(oControl) {
|
|
82
|
+
return oControl;
|
|
83
|
+
},
|
|
84
|
+
fnDbgReport = function() {},
|
|
85
|
+
fnDbgAnalyzeDelta = function() {};
|
|
75
86
|
|
|
76
87
|
if ( oRenderLog.isLoggable() ) {
|
|
77
88
|
|
|
@@ -102,13 +113,12 @@ sap.ui.define([
|
|
|
102
113
|
* @private
|
|
103
114
|
*/
|
|
104
115
|
fnDbgReport = function(that, mControls) {
|
|
105
|
-
var
|
|
106
|
-
mReport = {},
|
|
116
|
+
var mReport = {},
|
|
107
117
|
n, oControl;
|
|
108
118
|
|
|
109
119
|
for (n in mControls) {
|
|
110
120
|
// resolve oControl anew as it might have changed
|
|
111
|
-
oControl =
|
|
121
|
+
oControl = Element.registry.get(n);
|
|
112
122
|
/*eslint-disable no-nested-ternary */
|
|
113
123
|
mReport[n] = {
|
|
114
124
|
type: oControl ? oControl.getMetadata().getName() : (mControls[n].obj === that ? "UIArea" : "(no such control)"),
|
|
@@ -140,9 +150,7 @@ sap.ui.define([
|
|
|
140
150
|
mAfter[n].reason = "invalidated during rendering";
|
|
141
151
|
}
|
|
142
152
|
}
|
|
143
|
-
|
|
144
153
|
};
|
|
145
|
-
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
/**
|
|
@@ -175,8 +183,7 @@ sap.ui.define([
|
|
|
175
183
|
*
|
|
176
184
|
* @extends sap.ui.base.ManagedObject
|
|
177
185
|
* @author SAP SE
|
|
178
|
-
* @version 1.
|
|
179
|
-
* @param {sap.ui.core.Core} oCore internal API of the <core>Core</code> that manages this UIArea
|
|
186
|
+
* @version 1.107.0
|
|
180
187
|
* @param {object} [oRootNode] reference to the DOM element that should be 'hosting' the UI Area.
|
|
181
188
|
* @public
|
|
182
189
|
* @alias sap.ui.core.UIArea
|
|
@@ -184,24 +191,21 @@ sap.ui.define([
|
|
|
184
191
|
*/
|
|
185
192
|
var UIArea = ManagedObject.extend("sap.ui.core.UIArea", {
|
|
186
193
|
|
|
187
|
-
constructor: function(
|
|
194
|
+
constructor: function(oRootNode) {
|
|
188
195
|
if (arguments.length === 0) {
|
|
189
196
|
return;
|
|
190
197
|
}
|
|
191
|
-
|
|
192
198
|
// Note: UIArea has a modifiable Id. This doesn't perfectly match the default behavior of ManagedObject
|
|
193
199
|
// But UIArea overrides getId().
|
|
194
200
|
ManagedObject.apply(this);
|
|
195
201
|
|
|
196
|
-
//TODO we could get rid of oCore here, if we wanted to...
|
|
197
|
-
this.oCore = oCore;
|
|
198
202
|
this.bLocked = false;
|
|
199
203
|
this.bInitial = true;
|
|
200
204
|
this.aContentToRemove = [];
|
|
201
205
|
|
|
202
206
|
this.bNeedsRerendering = false;
|
|
203
207
|
if (oRootNode != null) {
|
|
204
|
-
this.
|
|
208
|
+
this._setRootNode(oRootNode);
|
|
205
209
|
// Figure out whether UI Area is pre-rendered (server-side JS rendering)!
|
|
206
210
|
this.bNeedsRerendering = this.bNeedsRerendering && !document.getElementById(oRootNode.id + "-Init");
|
|
207
211
|
}
|
|
@@ -210,8 +214,8 @@ sap.ui.define([
|
|
|
210
214
|
if (!this.bNeedsRerendering) {
|
|
211
215
|
this.bRenderSelf = false;
|
|
212
216
|
} else {
|
|
213
|
-
//
|
|
214
|
-
|
|
217
|
+
// Rendering needs to be notified about an invalid UIArea
|
|
218
|
+
Rendering.invalidateUIArea(this);
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
},
|
|
@@ -287,11 +291,25 @@ sap.ui.define([
|
|
|
287
291
|
*
|
|
288
292
|
* The node must have an ID that will be used as ID for this instance of <code>UIArea</code>.
|
|
289
293
|
*
|
|
290
|
-
* @param {
|
|
294
|
+
* @param {Element} oRootNode
|
|
291
295
|
* the hosting DOM node for this instance of <code>UIArea</code>.
|
|
292
296
|
* @public
|
|
297
|
+
* @deprecated as of version 1.107.0
|
|
293
298
|
*/
|
|
294
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) {
|
|
295
313
|
if (this.oRootNode === oRootNode) {
|
|
296
314
|
return;
|
|
297
315
|
}
|
|
@@ -304,7 +322,10 @@ sap.ui.define([
|
|
|
304
322
|
this._ondetach();
|
|
305
323
|
}
|
|
306
324
|
|
|
325
|
+
// UIArea gets its id from the rootNode, so we must update the registry
|
|
326
|
+
this.deregister();
|
|
307
327
|
this.oRootNode = oRootNode;
|
|
328
|
+
this.register();
|
|
308
329
|
if ( this.getContent().length > 0 ) {
|
|
309
330
|
this.invalidate();
|
|
310
331
|
}
|
|
@@ -457,8 +478,8 @@ sap.ui.define([
|
|
|
457
478
|
UIArea.prototype.unlock = function() {
|
|
458
479
|
if ( this.bLocked && this.bNeedsRerendering ) {
|
|
459
480
|
// While being locked, we might have ignored a call to rerender()
|
|
460
|
-
// Therefore notify the
|
|
461
|
-
|
|
481
|
+
// Therefore notify the Rendering (again)
|
|
482
|
+
Rendering.invalidateUIArea(this);
|
|
462
483
|
}
|
|
463
484
|
this.bLocked = false;
|
|
464
485
|
};
|
|
@@ -491,7 +512,7 @@ sap.ui.define([
|
|
|
491
512
|
* @protected
|
|
492
513
|
*/
|
|
493
514
|
UIArea.prototype.getEventingParent = function() {
|
|
494
|
-
return
|
|
515
|
+
return oCore._getEventProvider();
|
|
495
516
|
};
|
|
496
517
|
|
|
497
518
|
// ###########################################################################
|
|
@@ -538,9 +559,9 @@ sap.ui.define([
|
|
|
538
559
|
return;
|
|
539
560
|
}
|
|
540
561
|
|
|
541
|
-
// inform the
|
|
562
|
+
// inform the Rendering, if we are getting invalid now
|
|
542
563
|
if ( !this.bNeedsRerendering ) {
|
|
543
|
-
|
|
564
|
+
Rendering.invalidateUIArea(this);
|
|
544
565
|
}
|
|
545
566
|
|
|
546
567
|
var sId = oControl.getId();
|
|
@@ -568,11 +589,11 @@ sap.ui.define([
|
|
|
568
589
|
*
|
|
569
590
|
* Either renders the whole <code>UIArea</code> or a set of descendant controls that have been invalidated.
|
|
570
591
|
*
|
|
571
|
-
* @param {boolean}
|
|
592
|
+
* @param {boolean} bForce Whether a re-rendering of the <code>UIArea</code> should be enforced
|
|
572
593
|
* @return {boolean} Whether a redraw was necessary or not
|
|
573
594
|
* @private
|
|
574
595
|
*/
|
|
575
|
-
|
|
596
|
+
UIArea.prototype.rerender = function(bForce) {
|
|
576
597
|
var that = this;
|
|
577
598
|
|
|
578
599
|
function clearRenderingInfo() {
|
|
@@ -582,7 +603,7 @@ sap.ui.define([
|
|
|
582
603
|
that.bNeedsRerendering = false;
|
|
583
604
|
}
|
|
584
605
|
|
|
585
|
-
if (
|
|
606
|
+
if (bForce) {
|
|
586
607
|
this.bNeedsRerendering = true;
|
|
587
608
|
}
|
|
588
609
|
if ( this.bLocked || !this.bNeedsRerendering ) {
|
|
@@ -640,7 +661,7 @@ sap.ui.define([
|
|
|
640
661
|
|
|
641
662
|
for (var i = 0; i < len; i++) {
|
|
642
663
|
if (aContent[i] && aContent[i].getParent() === this) {
|
|
643
|
-
|
|
664
|
+
oRenderManager.render(aContent[i], this.oRootNode, true);
|
|
644
665
|
}
|
|
645
666
|
}
|
|
646
667
|
bUpdated = true;
|
|
@@ -655,10 +676,8 @@ sap.ui.define([
|
|
|
655
676
|
}
|
|
656
677
|
|
|
657
678
|
} else {
|
|
658
|
-
|
|
659
679
|
// cannot re-render now; wait!
|
|
660
680
|
oRenderLog.debug("Full Rendering of UIArea '" + this.getId() + "' postponed, no root node");
|
|
661
|
-
|
|
662
681
|
}
|
|
663
682
|
|
|
664
683
|
} else { // only partial update (invalidated controls)
|
|
@@ -690,20 +709,17 @@ sap.ui.define([
|
|
|
690
709
|
if ( mInvalidatedControls.hasOwnProperty(oCandidate.getId()) ) {
|
|
691
710
|
return true;
|
|
692
711
|
}
|
|
693
|
-
|
|
694
712
|
}
|
|
695
|
-
|
|
696
713
|
};
|
|
697
714
|
|
|
698
715
|
for (var n in mInvalidatedControls) {
|
|
699
|
-
var oControl =
|
|
716
|
+
var oControl = Element.registry.get(n);
|
|
700
717
|
// CSN 0000834961 2011: control may have been destroyed since invalidation happened -> check whether it still exists
|
|
701
718
|
if ( oControl && !isRenderedTogetherWithAncestor(oControl) ) {
|
|
702
719
|
oControl.rerender();
|
|
703
720
|
bUpdated = true;
|
|
704
721
|
}
|
|
705
722
|
}
|
|
706
|
-
|
|
707
723
|
}
|
|
708
724
|
|
|
709
725
|
// enrich the bookkeeping
|
|
@@ -718,9 +734,7 @@ sap.ui.define([
|
|
|
718
734
|
Measurement.resume("renderPendingUIUpdates");
|
|
719
735
|
|
|
720
736
|
return bUpdated;
|
|
721
|
-
|
|
722
|
-
};
|
|
723
|
-
|
|
737
|
+
};
|
|
724
738
|
/**
|
|
725
739
|
* Receives a notification from the RenderManager immediately after a control has been rendered.
|
|
726
740
|
*
|
|
@@ -737,7 +751,6 @@ sap.ui.define([
|
|
|
737
751
|
delete this.mInvalidatedControls[sId];
|
|
738
752
|
}
|
|
739
753
|
};
|
|
740
|
-
|
|
741
754
|
/**
|
|
742
755
|
* Rerenders the given control
|
|
743
756
|
* @see sap.ui.core.Control.rerender()
|
|
@@ -756,18 +769,18 @@ sap.ui.define([
|
|
|
756
769
|
|
|
757
770
|
var oParentDomRef = oDomRef && oDomRef.parentNode; // remember parent here as preserveContent() might move the node!
|
|
758
771
|
if (oParentDomRef) {
|
|
759
|
-
var
|
|
760
|
-
|
|
761
|
-
|
|
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)"));
|
|
762
776
|
RenderManager.preserveContent(oDomRef, /* bPreserveRoot */ true, /* bPreserveNodesWithId */ false, oControl /* oControlBeforeRerender */);
|
|
763
|
-
|
|
777
|
+
oRM.render(oControl, oParentDomRef);
|
|
764
778
|
} else {
|
|
765
|
-
var
|
|
766
|
-
|
|
779
|
+
var oUIArea = oControl.getUIArea();
|
|
780
|
+
oUIArea && oUIArea._onControlRendered(oControl);
|
|
767
781
|
oRenderLog.warning("Couldn't rerender '" + oControl.getId() + "', as its DOM location couldn't be determined");
|
|
768
782
|
}
|
|
769
783
|
};
|
|
770
|
-
|
|
771
784
|
var rEvents = /^(mousedown|mouseup|click|keydown|keyup|keypress|touchstart|touchend|tap)$/;
|
|
772
785
|
var aPreprocessors = [], aPostprocessors = [];
|
|
773
786
|
var mVerboseEvents = {mousemove: 1, mouseover: 1, mouseout: 1, scroll: 1, dragover: 1, dragenter: 1, dragleave: 1};
|
|
@@ -829,8 +842,8 @@ sap.ui.define([
|
|
|
829
842
|
* });
|
|
830
843
|
* });
|
|
831
844
|
*
|
|
832
|
-
* @param {
|
|
833
|
-
* @returns {
|
|
845
|
+
* @param {Object<string, boolean>} [mEventTypes] Map of logging flags keyed by event types
|
|
846
|
+
* @returns {Object<string, boolean>} A copy of the resulting event logging configuration (not normalized)
|
|
834
847
|
* @public
|
|
835
848
|
* @since 1.62
|
|
836
849
|
*/
|
|
@@ -853,7 +866,7 @@ sap.ui.define([
|
|
|
853
866
|
|
|
854
867
|
// TODO: this should be the 'lowest' SAPUI5 Control of this very
|
|
855
868
|
// UIArea instance's scope -> nesting scenario
|
|
856
|
-
oTargetElement = oElement =
|
|
869
|
+
oTargetElement = oElement = Element.closestTo(oEvent.target);
|
|
857
870
|
|
|
858
871
|
ActivityDetection.refresh();
|
|
859
872
|
|
|
@@ -897,12 +910,12 @@ sap.ui.define([
|
|
|
897
910
|
// forward the control event:
|
|
898
911
|
// if the control propagation has been stopped or the default should be
|
|
899
912
|
// prevented then do not forward the control event.
|
|
900
|
-
|
|
913
|
+
oCore._handleControlEvent(oEvent, sId);
|
|
901
914
|
|
|
902
915
|
// if the UIArea or the Core is locked then we do not dispatch
|
|
903
916
|
// any event to the control => but they will still be dispatched
|
|
904
917
|
// as control event afterwards!
|
|
905
|
-
if (this.bLocked ||
|
|
918
|
+
if (this.bLocked || oCore.isLocked()) {
|
|
906
919
|
return;
|
|
907
920
|
}
|
|
908
921
|
|
|
@@ -985,7 +998,7 @@ sap.ui.define([
|
|
|
985
998
|
// ensure we do not bubble the control tree higher than our rootNode
|
|
986
999
|
while (oDomRef && oDomRef !== this.getRootNode()) {
|
|
987
1000
|
if (oDomRef.id) {
|
|
988
|
-
oElement =
|
|
1001
|
+
oElement = Element.closestTo(oDomRef);
|
|
989
1002
|
if (oElement) {
|
|
990
1003
|
break;
|
|
991
1004
|
}
|
|
@@ -1032,50 +1045,49 @@ sap.ui.define([
|
|
|
1032
1045
|
* @private
|
|
1033
1046
|
*/
|
|
1034
1047
|
UIArea.prototype._onattach = function() {
|
|
1035
|
-
|
|
1036
|
-
//
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
// }
|
|
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
|
+
// }
|
|
1079
1091
|
|
|
1080
1092
|
// check for existing root node
|
|
1081
1093
|
var oDomRef = this.getRootNode();
|
|
@@ -1105,15 +1117,13 @@ sap.ui.define([
|
|
|
1105
1117
|
|
|
1106
1118
|
// TODO: when optimizing the events => take care to unbind only the
|
|
1107
1119
|
// required. additionally consider not to remove other event handlers.
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
// ojQRef.off("blur", oFH.onfocusout);
|
|
1116
|
-
|
|
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);
|
|
1117
1127
|
};
|
|
1118
1128
|
|
|
1119
1129
|
/**
|
|
@@ -1139,7 +1149,7 @@ sap.ui.define([
|
|
|
1139
1149
|
var oKey = UIArea._oFieldGroupValidationKey;
|
|
1140
1150
|
if (oEvent.type === "focusin" || oEvent.type === "focusout") {
|
|
1141
1151
|
if (oEvent.type === "focusout") {
|
|
1142
|
-
oElement =
|
|
1152
|
+
oElement = Element.closestTo(document.activeElement);
|
|
1143
1153
|
}
|
|
1144
1154
|
// delay the check for a field group change to allow focus forwarding and resetting focus after selection
|
|
1145
1155
|
if (UIArea._iFieldGroupDelayTimer) {
|
|
@@ -1187,7 +1197,7 @@ sap.ui.define([
|
|
|
1187
1197
|
}
|
|
1188
1198
|
|
|
1189
1199
|
var oCurrentControl = this.getFieldGroupControl();
|
|
1190
|
-
if ( oControl != oCurrentControl ) {
|
|
1200
|
+
if ( oControl != oCurrentControl && document.activeElement && (document.activeElement.id !== "sap-ui-static-firstfe")) {
|
|
1191
1201
|
var aCurrentGroupIds = (oCurrentControl ? oCurrentControl._getFieldGroupIds() : []),
|
|
1192
1202
|
aNewGroupIds = (oControl ? oControl._getFieldGroupIds() : []),
|
|
1193
1203
|
aTargetFieldGroupIds = aCurrentGroupIds.filter(function(sCurrentGroupId) {
|
|
@@ -1217,6 +1227,15 @@ sap.ui.define([
|
|
|
1217
1227
|
return null;
|
|
1218
1228
|
};
|
|
1219
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
|
+
|
|
1220
1239
|
// field group static members
|
|
1221
1240
|
|
|
1222
1241
|
/*
|
|
@@ -1245,6 +1264,254 @@ sap.ui.define([
|
|
|
1245
1264
|
// share the render log with Core
|
|
1246
1265
|
UIArea._oRenderLog = oRenderLog;
|
|
1247
1266
|
|
|
1248
|
-
|
|
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");
|
|
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
|
+
*/
|
|
1249
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;
|
|
1250
1517
|
});
|