@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
package/src/sap/ui/core/Core.js
CHANGED
|
@@ -9,17 +9,16 @@ sap.ui.define([
|
|
|
9
9
|
'jquery.sap.global',
|
|
10
10
|
'sap/ui/Device',
|
|
11
11
|
'sap/ui/Global',
|
|
12
|
-
'sap/ui/base/BindingParser',
|
|
13
12
|
'sap/ui/base/DataType',
|
|
14
13
|
'sap/ui/base/EventProvider',
|
|
15
14
|
'sap/ui/base/Interface',
|
|
16
15
|
'sap/ui/base/Object',
|
|
17
16
|
'sap/ui/base/ManagedObject',
|
|
18
|
-
'sap/ui/performance/trace/Interaction',
|
|
19
17
|
'./Component',
|
|
20
18
|
'./Configuration',
|
|
21
19
|
'./Element',
|
|
22
20
|
'./ElementMetadata',
|
|
21
|
+
'./Rendering',
|
|
23
22
|
'./RenderManager',
|
|
24
23
|
'./ThemeCheck',
|
|
25
24
|
'./UIArea',
|
|
@@ -34,7 +33,6 @@ sap.ui.define([
|
|
|
34
33
|
"sap/base/util/ObjectPath",
|
|
35
34
|
"sap/base/util/Version",
|
|
36
35
|
"sap/base/util/array/uniqueSort",
|
|
37
|
-
"sap/base/util/uid",
|
|
38
36
|
'sap/ui/performance/trace/initTraces',
|
|
39
37
|
'sap/base/util/LoaderExtensions',
|
|
40
38
|
'sap/base/util/isEmptyObject',
|
|
@@ -47,17 +45,16 @@ sap.ui.define([
|
|
|
47
45
|
jQuery,
|
|
48
46
|
Device,
|
|
49
47
|
Global,
|
|
50
|
-
BindingParser,
|
|
51
48
|
DataType,
|
|
52
49
|
EventProvider,
|
|
53
50
|
Interface,
|
|
54
51
|
BaseObject,
|
|
55
52
|
ManagedObject,
|
|
56
|
-
Interaction,
|
|
57
53
|
Component,
|
|
58
54
|
Configuration,
|
|
59
55
|
Element,
|
|
60
56
|
ElementMetadata,
|
|
57
|
+
Rendering,
|
|
61
58
|
RenderManager,
|
|
62
59
|
ThemeCheck,
|
|
63
60
|
UIArea,
|
|
@@ -72,7 +69,6 @@ sap.ui.define([
|
|
|
72
69
|
ObjectPath,
|
|
73
70
|
Version,
|
|
74
71
|
uniqueSort,
|
|
75
|
-
uid,
|
|
76
72
|
initTraces,
|
|
77
73
|
LoaderExtensions,
|
|
78
74
|
isEmptyObject,
|
|
@@ -84,8 +80,6 @@ sap.ui.define([
|
|
|
84
80
|
|
|
85
81
|
"use strict";
|
|
86
82
|
|
|
87
|
-
/*global Map, Promise */
|
|
88
|
-
|
|
89
83
|
// when the Core module has been executed before, don't execute it again
|
|
90
84
|
if (sap.ui.getCore && sap.ui.getCore()) {
|
|
91
85
|
return sap.ui.getCore();
|
|
@@ -99,9 +93,6 @@ sap.ui.define([
|
|
|
99
93
|
// Initialize SAP Passport or FESR
|
|
100
94
|
initTraces();
|
|
101
95
|
|
|
102
|
-
// share the rendering log with the UIArea
|
|
103
|
-
var oRenderLog = UIArea._oRenderLog;
|
|
104
|
-
|
|
105
96
|
/**
|
|
106
97
|
* Set of libraries that have been loaded and initialized already.
|
|
107
98
|
* This is maintained separately from Core.mLibraries to protect it against
|
|
@@ -211,7 +202,7 @@ sap.ui.define([
|
|
|
211
202
|
* @extends sap.ui.base.Object
|
|
212
203
|
* @final
|
|
213
204
|
* @author SAP SE
|
|
214
|
-
* @version 1.
|
|
205
|
+
* @version 1.107.0
|
|
215
206
|
* @alias sap.ui.core.Core
|
|
216
207
|
* @public
|
|
217
208
|
* @hideconstructor
|
|
@@ -250,12 +241,6 @@ sap.ui.define([
|
|
|
250
241
|
*/
|
|
251
242
|
this.bInitialized = false;
|
|
252
243
|
|
|
253
|
-
/**
|
|
254
|
-
* Whether the DOM is ready (document.ready)
|
|
255
|
-
* @private
|
|
256
|
-
*/
|
|
257
|
-
this.bDomReady = false;
|
|
258
|
-
|
|
259
244
|
/**
|
|
260
245
|
* Available plugins in the order of registration.
|
|
261
246
|
* @private
|
|
@@ -275,13 +260,6 @@ sap.ui.define([
|
|
|
275
260
|
*/
|
|
276
261
|
this.mResourceBundles = {};
|
|
277
262
|
|
|
278
|
-
/**
|
|
279
|
-
* Currently created UIAreas keyed by their id.
|
|
280
|
-
* @private
|
|
281
|
-
* @todo FIXME how can a UI area ever be removed?
|
|
282
|
-
*/
|
|
283
|
-
this.mUIAreas = {};
|
|
284
|
-
|
|
285
263
|
/**
|
|
286
264
|
* Default model used for databinding
|
|
287
265
|
* @private
|
|
@@ -335,56 +313,26 @@ sap.ui.define([
|
|
|
335
313
|
*/
|
|
336
314
|
this.bInitLegacyLib = false;
|
|
337
315
|
|
|
338
|
-
/**
|
|
339
|
-
* The ID of a timer that will execute the next rendering.
|
|
340
|
-
*
|
|
341
|
-
* A non-falsy value indicates that a timer exists already, or at least that no
|
|
342
|
-
* new timer needs to be created as. During the boot phase, this member is set
|
|
343
|
-
* to the special value <code>this</code> which is non-falsy and which should never
|
|
344
|
-
* represent a valid timer ID (no chance of misinterpretation).
|
|
345
|
-
*/
|
|
346
|
-
this._sRerenderTimer = this;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Tasks that are called just before the rendering starts.
|
|
350
|
-
* @private
|
|
351
|
-
*/
|
|
352
|
-
this.aPrerenderingTasks = [];
|
|
353
|
-
|
|
354
316
|
Log.info("Creating Core",null,METHOD);
|
|
355
317
|
|
|
356
318
|
Measurement.start("coreComplete", "Core.js - complete");
|
|
357
319
|
Measurement.start("coreBoot", "Core.js - boot");
|
|
358
320
|
Measurement.start("coreInit", "Core.js - init");
|
|
359
321
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
* Initialized from the global "sap-ui-config" object and from URL parameters
|
|
363
|
-
* @private
|
|
364
|
-
*/
|
|
365
|
-
this.oConfiguration = new Configuration(this);
|
|
366
|
-
|
|
322
|
+
// freeze Config
|
|
323
|
+
Configuration.setCore(this);
|
|
367
324
|
// initialize frameOptions script (anti-clickjacking, etc.)
|
|
368
|
-
var oFrameOptionsConfig =
|
|
369
|
-
oFrameOptionsConfig.mode =
|
|
370
|
-
oFrameOptionsConfig.allowlistService =
|
|
325
|
+
var oFrameOptionsConfig = Configuration.getValue("frameOptionsConfig") || {};
|
|
326
|
+
oFrameOptionsConfig.mode = Configuration.getFrameOptions();
|
|
327
|
+
oFrameOptionsConfig.allowlistService = Configuration.getAllowlistService();
|
|
371
328
|
this.oFrameOptions = new FrameOptions(oFrameOptionsConfig);
|
|
372
329
|
|
|
373
|
-
// enable complex bindings if configured
|
|
374
|
-
if ( this.oConfiguration["bindingSyntax"] === "complex" ) {
|
|
375
|
-
ManagedObject.bindingParser = BindingParser.complexParser;
|
|
376
|
-
}
|
|
377
|
-
// switch bindingParser to designTime mode if configured
|
|
378
|
-
if (this.oConfiguration["xx-designMode"] == true ) {
|
|
379
|
-
BindingParser._keepBindingStrings = true;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
330
|
// let Element and Component get friend access to the respective register/deregister methods
|
|
383
331
|
this._grantFriendAccess();
|
|
384
332
|
|
|
385
333
|
// handle modules
|
|
386
|
-
var aModules = this.
|
|
387
|
-
if (
|
|
334
|
+
var aModules = this.aModules = Configuration.getValue("modules");
|
|
335
|
+
if ( Configuration.getDebug() ) {
|
|
388
336
|
// add debug module if configured
|
|
389
337
|
aModules.unshift("sap.ui.debug.DebugEnv");
|
|
390
338
|
}
|
|
@@ -398,29 +346,12 @@ sap.ui.define([
|
|
|
398
346
|
}
|
|
399
347
|
|
|
400
348
|
// enable LessSupport if specified in configuration
|
|
401
|
-
if (
|
|
349
|
+
if (Configuration.getValue("xx-lesssupport") && aModules.indexOf("sap.ui.core.plugin.LessSupport") == -1) {
|
|
402
350
|
Log.info("Including LessSupport into declared modules");
|
|
403
351
|
aModules.push("sap.ui.core.plugin.LessSupport");
|
|
404
352
|
}
|
|
405
353
|
|
|
406
|
-
|
|
407
|
-
var sPreloadMode = this.oConfiguration.preload;
|
|
408
|
-
// if debug sources are requested, then the preload feature must be deactivated
|
|
409
|
-
if ( window["sap-ui-debug"] === true ) {
|
|
410
|
-
sPreloadMode = "";
|
|
411
|
-
}
|
|
412
|
-
// when the preload mode is 'auto', it will be set to 'async' or 'sync' for optimized sources
|
|
413
|
-
// depending on whether the ui5loader is configured async
|
|
414
|
-
if ( sPreloadMode === "auto" ) {
|
|
415
|
-
if (window["sap-ui-optimized"]) {
|
|
416
|
-
sPreloadMode = sap.ui.loader.config().async ? "async" : "sync";
|
|
417
|
-
} else {
|
|
418
|
-
sPreloadMode = "";
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
// write back the determined mode for later evaluation (e.g. loadLibrary)
|
|
422
|
-
this.oConfiguration.preload = sPreloadMode;
|
|
423
|
-
|
|
354
|
+
var sPreloadMode = Configuration.getPreload();
|
|
424
355
|
// This flag controls the core initialization flow.
|
|
425
356
|
// We can switch to async when an async preload is used or the ui5loader
|
|
426
357
|
// is in async mode. The latter might also happen for debug scenarios
|
|
@@ -428,7 +359,7 @@ sap.ui.define([
|
|
|
428
359
|
var bAsync = sPreloadMode === "async" || sap.ui.loader.config().async;
|
|
429
360
|
|
|
430
361
|
// evaluate configuration for library preload file types
|
|
431
|
-
|
|
362
|
+
Configuration.getValue("xx-libraryPreloadFiles").forEach(function(v){
|
|
432
363
|
var fields = String(v).trim().split(/\s*:\s*/),
|
|
433
364
|
name = fields[0],
|
|
434
365
|
fileType = fields[1];
|
|
@@ -467,12 +398,8 @@ sap.ui.define([
|
|
|
467
398
|
return that.getInterface();
|
|
468
399
|
};
|
|
469
400
|
|
|
470
|
-
// create the RenderManager so it can be used already
|
|
471
|
-
this.oRenderManager = new RenderManager();
|
|
472
|
-
|
|
473
401
|
// sync point 1 synchronizes document ready and rest of UI5 boot
|
|
474
402
|
var oSyncPoint1 = new SyncPoint("UI5 Document Ready", function(iOpenTasks, iFailures) {
|
|
475
|
-
that.bDomReady = true;
|
|
476
403
|
that.init();
|
|
477
404
|
});
|
|
478
405
|
var iDocumentReadyTask = oSyncPoint1.startTask("document.ready");
|
|
@@ -506,7 +433,7 @@ sap.ui.define([
|
|
|
506
433
|
|
|
507
434
|
// load the version info file in case of a custom theme to determine
|
|
508
435
|
// the distribution version which should be provided in library.css requests.
|
|
509
|
-
if (
|
|
436
|
+
if (Configuration.getValue("versionedLibCss")) {
|
|
510
437
|
var iVersionInfoTask = oSyncPoint2.startTask("load version info");
|
|
511
438
|
|
|
512
439
|
var fnCallback = function(oVersionInfo) {
|
|
@@ -544,7 +471,7 @@ sap.ui.define([
|
|
|
544
471
|
|
|
545
472
|
function postConstructorTasks() {
|
|
546
473
|
// when a boot task is configured, add it to syncpoint2
|
|
547
|
-
var fnCustomBootTask =
|
|
474
|
+
var fnCustomBootTask = Configuration.getValue("xx-bootTask");
|
|
548
475
|
if ( fnCustomBootTask ) {
|
|
549
476
|
var iCustomBootTask = oSyncPoint2.startTask("custom boot task");
|
|
550
477
|
fnCustomBootTask( function(bSuccess) {
|
|
@@ -554,7 +481,7 @@ sap.ui.define([
|
|
|
554
481
|
|
|
555
482
|
if ( sPreloadMode === "sync" || sPreloadMode === "async" ) {
|
|
556
483
|
// determine set of libraries
|
|
557
|
-
var aLibs = aModules.reduce(function(aResult, sModule) {
|
|
484
|
+
var aLibs = that.aModules.reduce(function(aResult, sModule) {
|
|
558
485
|
var iPos = sModule.search(/\.library$/);
|
|
559
486
|
if ( iPos >= 0 ) {
|
|
560
487
|
aResult.push(sModule.slice(0, iPos));
|
|
@@ -577,7 +504,7 @@ sap.ui.define([
|
|
|
577
504
|
}
|
|
578
505
|
|
|
579
506
|
// initializes the application cachebuster mechanism if configured
|
|
580
|
-
var aACBConfig =
|
|
507
|
+
var aACBConfig = Configuration.getAppCacheBuster();
|
|
581
508
|
if (aACBConfig && aACBConfig.length > 0) {
|
|
582
509
|
if ( bAsync ) {
|
|
583
510
|
var iLoadACBTask = oSyncPoint2.startTask("require AppCachebuster");
|
|
@@ -593,13 +520,13 @@ sap.ui.define([
|
|
|
593
520
|
}
|
|
594
521
|
|
|
595
522
|
// Initialize support info stack
|
|
596
|
-
if (
|
|
523
|
+
if (Configuration.getSupportMode() !== null) {
|
|
597
524
|
var iSupportInfoTask = oSyncPoint2.startTask("support info script");
|
|
598
525
|
|
|
599
526
|
var fnCallbackSupportBootstrapInfo = function(Support, Bootstrap) {
|
|
600
|
-
Support.initializeSupportMode(
|
|
527
|
+
Support.initializeSupportMode(Configuration.getSupportMode(), bAsync);
|
|
601
528
|
|
|
602
|
-
Bootstrap.initSupportRules(
|
|
529
|
+
Bootstrap.initSupportRules(Configuration.getSupportMode());
|
|
603
530
|
|
|
604
531
|
oSyncPoint2.finishTask(iSupportInfoTask);
|
|
605
532
|
};
|
|
@@ -623,11 +550,11 @@ sap.ui.define([
|
|
|
623
550
|
}
|
|
624
551
|
|
|
625
552
|
// Initialize test tools
|
|
626
|
-
if (
|
|
553
|
+
if (Configuration.getTestRecorderMode() !== null) {
|
|
627
554
|
var iTestRecorderTask = oSyncPoint2.startTask("test recorder script");
|
|
628
555
|
|
|
629
556
|
var fnCallbackTestRecorder = function (Bootstrap) {
|
|
630
|
-
Bootstrap.init(
|
|
557
|
+
Bootstrap.init(Configuration.getTestRecorderMode());
|
|
631
558
|
oSyncPoint2.finishTask(iTestRecorderTask);
|
|
632
559
|
};
|
|
633
560
|
|
|
@@ -698,7 +625,6 @@ sap.ui.define([
|
|
|
698
625
|
// - Init
|
|
699
626
|
"boot",
|
|
700
627
|
// - UIArea & Rendering
|
|
701
|
-
"_createUIArea",
|
|
702
628
|
"addPrerenderingTask",
|
|
703
629
|
// - Messaging
|
|
704
630
|
"setMessageManager",
|
|
@@ -736,13 +662,6 @@ sap.ui.define([
|
|
|
736
662
|
LibraryChanged : "libraryChanged",
|
|
737
663
|
ValidationError : "validationError", ParseError : "parseError", FormatError : "formatError", ValidationSuccess : "validationSuccess"};
|
|
738
664
|
|
|
739
|
-
|
|
740
|
-
// Id of the static UIArea
|
|
741
|
-
var STATIC_UIAREA_ID = "sap-ui-static";
|
|
742
|
-
|
|
743
|
-
// to protect against nested rendering we use an array of Steps instead of a single one
|
|
744
|
-
Core.aFnDone = [];
|
|
745
|
-
|
|
746
665
|
/**
|
|
747
666
|
* The core allows some friend components to register/deregister themselves
|
|
748
667
|
* @private
|
|
@@ -763,27 +682,19 @@ sap.ui.define([
|
|
|
763
682
|
Core.prototype._setupThemes = function() {
|
|
764
683
|
var METHOD = "sap.ui.core.Core";
|
|
765
684
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
if (
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
this.setThemeRoot(themeName, themeRoot);
|
|
780
|
-
} else {
|
|
781
|
-
for (var lib in themeRoot) {
|
|
782
|
-
if (lib.length > 0) {
|
|
783
|
-
this.setThemeRoot(themeName, [lib], themeRoot[lib]);
|
|
784
|
-
} else {
|
|
785
|
-
this.setThemeRoot(themeName, themeRoot[lib]);
|
|
786
|
-
}
|
|
685
|
+
// read themeRoots configuration
|
|
686
|
+
var themeRoots = Configuration.getValue("themeRoots");
|
|
687
|
+
if (themeRoots) {
|
|
688
|
+
for (var themeName in themeRoots) {
|
|
689
|
+
var themeRoot = themeRoots[themeName];
|
|
690
|
+
if (typeof themeRoot === "string") {
|
|
691
|
+
this.setThemeRoot(themeName, themeRoot);
|
|
692
|
+
} else {
|
|
693
|
+
for (var lib in themeRoot) {
|
|
694
|
+
if (lib.length > 0) {
|
|
695
|
+
this.setThemeRoot(themeName, [lib], themeRoot[lib]);
|
|
696
|
+
} else {
|
|
697
|
+
this.setThemeRoot(themeName, themeRoot[lib]);
|
|
787
698
|
}
|
|
788
699
|
}
|
|
789
700
|
}
|
|
@@ -791,7 +702,7 @@ sap.ui.define([
|
|
|
791
702
|
}
|
|
792
703
|
|
|
793
704
|
// set CSS class for the theme name
|
|
794
|
-
this.sTheme =
|
|
705
|
+
this.sTheme = Configuration.getTheme();
|
|
795
706
|
document.documentElement.classList.add("sapUiTheme-" + this.sTheme);
|
|
796
707
|
Log.info("Declared theme " + this.sTheme,null,METHOD);
|
|
797
708
|
};
|
|
@@ -802,7 +713,7 @@ sap.ui.define([
|
|
|
802
713
|
*/
|
|
803
714
|
Core.prototype._setupContentDirection = function() {
|
|
804
715
|
var METHOD = "sap.ui.core.Core",
|
|
805
|
-
sDir =
|
|
716
|
+
sDir = Configuration.getRTL() ? "rtl" : "ltr";
|
|
806
717
|
|
|
807
718
|
document.documentElement.setAttribute("dir", sDir); // webkit does not allow setting document.dir before the body exists
|
|
808
719
|
Log.info("Content direction set to '" + sDir + "'",null,METHOD);
|
|
@@ -864,7 +775,7 @@ sap.ui.define([
|
|
|
864
775
|
|
|
865
776
|
// append the lang info to the document (required for ARIA support)
|
|
866
777
|
var fnUpdateLangAttr = function() {
|
|
867
|
-
var oLocale =
|
|
778
|
+
var oLocale = Configuration.getLocale();
|
|
868
779
|
oLocale ? html.setAttribute("lang", oLocale.toString()) : html.removeAttribute("lang");
|
|
869
780
|
};
|
|
870
781
|
fnUpdateLangAttr.call(this);
|
|
@@ -878,18 +789,13 @@ sap.ui.define([
|
|
|
878
789
|
* @private
|
|
879
790
|
*/
|
|
880
791
|
Core.prototype._setupAnimation = function() {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
var bAnimation = (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.AnimationMode.none);
|
|
889
|
-
html.dataset.sapUiAnimation = bAnimation ? "on" : "off";
|
|
890
|
-
if (typeof jQuery !== "undefined") {
|
|
891
|
-
jQuery.fx.off = !bAnimation;
|
|
892
|
-
}
|
|
792
|
+
var html = document.documentElement;
|
|
793
|
+
var sAnimationMode = Configuration.getAnimationMode();
|
|
794
|
+
html.dataset.sapUiAnimationMode = sAnimationMode;
|
|
795
|
+
var bAnimation = (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.AnimationMode.none);
|
|
796
|
+
html.dataset.sapUiAnimation = bAnimation ? "on" : "off";
|
|
797
|
+
if (typeof jQuery !== "undefined") {
|
|
798
|
+
jQuery.fx.off = !bAnimation;
|
|
893
799
|
}
|
|
894
800
|
};
|
|
895
801
|
|
|
@@ -925,13 +831,13 @@ sap.ui.define([
|
|
|
925
831
|
Core.prototype._boot = function(bAsync, fnCallback) {
|
|
926
832
|
|
|
927
833
|
// if a list of preloaded library CSS is configured, request a merged CSS (if application did not already do it)
|
|
928
|
-
var aCSSLibs =
|
|
929
|
-
if (aCSSLibs && aCSSLibs.length > 0 && !
|
|
834
|
+
var aCSSLibs = Configuration.getValue("preloadLibCss");
|
|
835
|
+
if (aCSSLibs && aCSSLibs.length > 0 && !Configuration.getCssAppManaged()) {
|
|
930
836
|
this.includeLibraryTheme("sap-ui-merged", undefined, "?l=" + aCSSLibs.join(","));
|
|
931
837
|
}
|
|
932
838
|
|
|
933
839
|
// add CalendarClass to list of modules
|
|
934
|
-
this.
|
|
840
|
+
this.aModules.push("sap/ui/core/date/" + Configuration.getCalendarType());
|
|
935
841
|
|
|
936
842
|
// load all modules now
|
|
937
843
|
if ( bAsync ) {
|
|
@@ -948,7 +854,7 @@ sap.ui.define([
|
|
|
948
854
|
};
|
|
949
855
|
});
|
|
950
856
|
|
|
951
|
-
this.
|
|
857
|
+
this.aModules.forEach( function(mod) {
|
|
952
858
|
var m = mod.match(/^(.*)\.library$/);
|
|
953
859
|
if ( m ) {
|
|
954
860
|
this.loadLibrary(m[1]);
|
|
@@ -966,7 +872,7 @@ sap.ui.define([
|
|
|
966
872
|
var aLibs = [],
|
|
967
873
|
aModules = [];
|
|
968
874
|
|
|
969
|
-
this.
|
|
875
|
+
this.aModules.forEach(function(sModule) {
|
|
970
876
|
var m = sModule.match(/^(.*)\.library$/);
|
|
971
877
|
if (m) {
|
|
972
878
|
aLibs.push(m[1]);
|
|
@@ -1013,7 +919,7 @@ sap.ui.define([
|
|
|
1013
919
|
assert(typeof sThemeName === "string", "sThemeName must be a string");
|
|
1014
920
|
assert(typeof sThemeBaseUrl === "string" || typeof sThemeBaseUrl === "undefined", "sThemeBaseUrl must be a string or undefined");
|
|
1015
921
|
|
|
1016
|
-
sThemeName =
|
|
922
|
+
sThemeName = Configuration.normalizeTheme(sThemeName, sThemeBaseUrl);
|
|
1017
923
|
|
|
1018
924
|
if (sThemeBaseUrl) {
|
|
1019
925
|
this.setThemeRoot(sThemeName, sThemeBaseUrl);
|
|
@@ -1025,7 +931,7 @@ sap.ui.define([
|
|
|
1025
931
|
var html = document.documentElement;
|
|
1026
932
|
this._updateThemeUrls(sThemeName, /* bSuppressFOUC */ true);
|
|
1027
933
|
this.sTheme = sThemeName;
|
|
1028
|
-
|
|
934
|
+
Configuration.setTheme(sThemeName);
|
|
1029
935
|
|
|
1030
936
|
// modify the <html> tag's CSS class with the theme name
|
|
1031
937
|
html.classList.remove("sapUiTheme-" + sCurrentTheme);
|
|
@@ -1045,7 +951,7 @@ sap.ui.define([
|
|
|
1045
951
|
sLibFileName,
|
|
1046
952
|
sQuery,
|
|
1047
953
|
sStandardLibFilePrefix = "library",
|
|
1048
|
-
sRTL =
|
|
954
|
+
sRTL = Configuration.getRTL() ? "-RTL" : "",
|
|
1049
955
|
sHref,
|
|
1050
956
|
pos;
|
|
1051
957
|
|
|
@@ -1176,9 +1082,9 @@ sap.ui.define([
|
|
|
1176
1082
|
* Resources for styling the <code>my.own.library</code> controls will be loaded from the configured
|
|
1177
1083
|
* location:
|
|
1178
1084
|
* <pre>
|
|
1179
|
-
* https://openui5.
|
|
1180
|
-
* https://openui5.
|
|
1181
|
-
* https://openui5.
|
|
1085
|
+
* https://sdk.openui5.org/resources/sap/ui/core/themes/sap_belize/library.css
|
|
1086
|
+
* https://sdk.openui5.org/resources/sap/ui/layout/themes/sap_belize/library.css
|
|
1087
|
+
* https://sdk.openui5.org/resources/sap/m/themes/sap_belize/library.css
|
|
1182
1088
|
* https://mythemeserver.com/allThemes/my/own/library/themes/sap_belize/library.css
|
|
1183
1089
|
* </pre>
|
|
1184
1090
|
*
|
|
@@ -1241,6 +1147,9 @@ sap.ui.define([
|
|
|
1241
1147
|
return;
|
|
1242
1148
|
}
|
|
1243
1149
|
|
|
1150
|
+
// provide core for event handling and UIArea creation
|
|
1151
|
+
UIArea.setCore(this);
|
|
1152
|
+
|
|
1244
1153
|
var METHOD = "sap.ui.core.Core.init()";
|
|
1245
1154
|
|
|
1246
1155
|
Log.info("Initializing",null,METHOD);
|
|
@@ -1255,64 +1164,39 @@ sap.ui.define([
|
|
|
1255
1164
|
this.startPlugins();
|
|
1256
1165
|
Log.info("Plugins started",null,METHOD);
|
|
1257
1166
|
|
|
1258
|
-
this._createUIAreas();
|
|
1259
|
-
|
|
1260
1167
|
this._setBodyAccessibilityRole();
|
|
1261
1168
|
|
|
1262
1169
|
this.oThemeCheck.fireThemeChangedEvent(true);
|
|
1263
1170
|
|
|
1264
|
-
var sWaitForTheme =
|
|
1171
|
+
var sWaitForTheme = Configuration.getValue("xx-waitForTheme");
|
|
1265
1172
|
if ( this.isThemeApplied() || !sWaitForTheme ) {
|
|
1266
|
-
Core.aFnDone.push(Interaction.notifyAsyncStep());
|
|
1267
1173
|
this._executeInitialization();
|
|
1268
|
-
|
|
1174
|
+
Rendering.renderPendingUIUpdates("during Core init"); // directly render without setTimeout, so rendering is guaranteed to be finished when init() ends
|
|
1269
1175
|
Measurement.end("coreComplete");
|
|
1270
1176
|
|
|
1271
1177
|
} else if (sWaitForTheme === "rendering") {
|
|
1272
|
-
|
|
1178
|
+
Rendering.notifyInteractionStep();
|
|
1273
1179
|
this._executeInitialization();
|
|
1274
|
-
|
|
1275
|
-
oRenderLog.debug("delay initial rendering until theme has been loaded");
|
|
1180
|
+
Rendering.getLogger().debug("delay initial rendering until theme has been loaded");
|
|
1276
1181
|
_oEventProvider.attachEventOnce(Core.M_EVENTS.ThemeChanged, function() {
|
|
1277
|
-
|
|
1278
|
-
this.renderPendingUIUpdates.bind(this, "after theme has been loaded"),
|
|
1279
|
-
Device.browser.safari ? 50 : 0
|
|
1280
|
-
);
|
|
1182
|
+
Rendering.renderPendingUIUpdates("after theme has been loaded", 0);
|
|
1281
1183
|
}, this);
|
|
1282
|
-
|
|
1283
1184
|
Measurement.end("coreComplete");
|
|
1284
1185
|
|
|
1285
1186
|
} else if (sWaitForTheme === "init") {
|
|
1286
|
-
|
|
1287
|
-
|
|
1187
|
+
Rendering.getLogger().debug("delay init event and initial rendering until theme has been loaded");
|
|
1188
|
+
Rendering.notifyInteractionStep();
|
|
1288
1189
|
_oEventProvider.attachEventOnce(Core.M_EVENTS.ThemeChanged, function() {
|
|
1289
1190
|
this._executeInitialization();
|
|
1290
|
-
|
|
1291
|
-
this.renderPendingUIUpdates.bind(this, "after theme has been loaded"),
|
|
1292
|
-
Device.browser.safari ? 50 : 0
|
|
1293
|
-
);
|
|
1294
|
-
|
|
1191
|
+
Rendering.renderPendingUIUpdates("after theme has been loaded", 0);
|
|
1295
1192
|
Measurement.end("coreComplete");
|
|
1296
|
-
|
|
1297
1193
|
}, this);
|
|
1298
1194
|
|
|
1299
1195
|
}
|
|
1300
1196
|
};
|
|
1301
1197
|
|
|
1302
|
-
Core.prototype._createUIAreas = function() {
|
|
1303
|
-
var oConfig = this.oConfiguration;
|
|
1304
|
-
|
|
1305
|
-
// create any pre-configured UIAreas
|
|
1306
|
-
if ( oConfig.areas ) {
|
|
1307
|
-
for (var i = 0, l = oConfig.areas.length; i < l; i++) {
|
|
1308
|
-
this._createUIArea(oConfig.areas[i]);
|
|
1309
|
-
}
|
|
1310
|
-
oConfig.areas = undefined;
|
|
1311
|
-
}
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
1198
|
Core.prototype._executeOnInit = function() {
|
|
1315
|
-
var vOnInit =
|
|
1199
|
+
var vOnInit = Configuration.getValue("onInit");
|
|
1316
1200
|
|
|
1317
1201
|
// execute a configured init hook
|
|
1318
1202
|
if ( vOnInit ) {
|
|
@@ -1342,7 +1226,6 @@ sap.ui.define([
|
|
|
1342
1226
|
}
|
|
1343
1227
|
}
|
|
1344
1228
|
}
|
|
1345
|
-
this.oConfiguration.onInit = undefined;
|
|
1346
1229
|
}
|
|
1347
1230
|
};
|
|
1348
1231
|
|
|
@@ -1354,12 +1237,11 @@ sap.ui.define([
|
|
|
1354
1237
|
* @private
|
|
1355
1238
|
*/
|
|
1356
1239
|
Core.prototype._setupRootComponent = function() {
|
|
1357
|
-
var METHOD = "sap.ui.core.Core.init()"
|
|
1358
|
-
oConfig = this.oConfiguration;
|
|
1240
|
+
var METHOD = "sap.ui.core.Core.init()";
|
|
1359
1241
|
|
|
1360
1242
|
// load the root component
|
|
1361
1243
|
// @deprecated concept, superseded by "sap/ui/core/ComponentSupport"
|
|
1362
|
-
var sRootComponent =
|
|
1244
|
+
var sRootComponent = Configuration.getRootComponent();
|
|
1363
1245
|
if (sRootComponent) {
|
|
1364
1246
|
|
|
1365
1247
|
Log.info("Loading Root Component: " + sRootComponent,null,METHOD);
|
|
@@ -1368,7 +1250,7 @@ sap.ui.define([
|
|
|
1368
1250
|
});
|
|
1369
1251
|
this.oRootComponent = oComponent;
|
|
1370
1252
|
|
|
1371
|
-
var sRootNode =
|
|
1253
|
+
var sRootNode = Configuration.getValue("xx-rootComponentNode");
|
|
1372
1254
|
if (sRootNode && oComponent.isA('sap.ui.core.UIComponent')) {
|
|
1373
1255
|
var oRootNode = document.getElementById(sRootNode);
|
|
1374
1256
|
if (oRootNode) {
|
|
@@ -1385,7 +1267,7 @@ sap.ui.define([
|
|
|
1385
1267
|
} else {
|
|
1386
1268
|
|
|
1387
1269
|
// @deprecated concept, superseded by "sap/ui/core/Component"
|
|
1388
|
-
var sApplication =
|
|
1270
|
+
var sApplication = Configuration.getApplication();
|
|
1389
1271
|
if (sApplication) {
|
|
1390
1272
|
|
|
1391
1273
|
Log.warning("The configuration 'application' is deprecated. Please use the configuration 'component' instead! " +
|
|
@@ -1409,11 +1291,10 @@ sap.ui.define([
|
|
|
1409
1291
|
};
|
|
1410
1292
|
|
|
1411
1293
|
Core.prototype._setBodyAccessibilityRole = function() {
|
|
1412
|
-
var
|
|
1413
|
-
body = document.body;
|
|
1294
|
+
var body = document.body;
|
|
1414
1295
|
|
|
1415
1296
|
//Add ARIA role 'application'
|
|
1416
|
-
if (
|
|
1297
|
+
if (Configuration.getAccessibility() && Configuration.getAutoAriaBodyRole() && !body.getAttribute("role")) {
|
|
1417
1298
|
body.setAttribute("role", "application");
|
|
1418
1299
|
}
|
|
1419
1300
|
};
|
|
@@ -1552,7 +1433,7 @@ sap.ui.define([
|
|
|
1552
1433
|
* @public
|
|
1553
1434
|
*/
|
|
1554
1435
|
Core.prototype.getConfiguration = function () {
|
|
1555
|
-
return
|
|
1436
|
+
return Configuration;
|
|
1556
1437
|
};
|
|
1557
1438
|
|
|
1558
1439
|
/**
|
|
@@ -1666,7 +1547,7 @@ sap.ui.define([
|
|
|
1666
1547
|
var lib = libConfig.name,
|
|
1667
1548
|
fileType = libConfig.fileType,
|
|
1668
1549
|
libPackage = lib.replace(/\./g, '/'),
|
|
1669
|
-
http2 =
|
|
1550
|
+
http2 = Configuration.getDepCache();
|
|
1670
1551
|
|
|
1671
1552
|
if ( fileType === 'none' || sap.ui.loader._.getModuleState(libPackage + '/library.js') ) {
|
|
1672
1553
|
return Promise.resolve(true);
|
|
@@ -2121,7 +2002,7 @@ sap.ui.define([
|
|
|
2121
2002
|
registerModulePath(sLibrary, vUrl);
|
|
2122
2003
|
}
|
|
2123
2004
|
|
|
2124
|
-
if (
|
|
2005
|
+
if ( Configuration.getPreload() === 'sync' || Configuration.getPreload() === 'async' ) {
|
|
2125
2006
|
preloadLibrarySync(sLibrary);
|
|
2126
2007
|
}
|
|
2127
2008
|
|
|
@@ -2169,7 +2050,7 @@ sap.ui.define([
|
|
|
2169
2050
|
// default values for options
|
|
2170
2051
|
mOptions = Object.assign({ async : true, preloadOnly : false }, mOptions);
|
|
2171
2052
|
|
|
2172
|
-
var bPreload =
|
|
2053
|
+
var bPreload = Configuration.getPreload() === 'sync' || Configuration.getPreload() === 'async',
|
|
2173
2054
|
bAsync = mOptions.async,
|
|
2174
2055
|
bRequire = !mOptions.preloadOnly;
|
|
2175
2056
|
|
|
@@ -2483,7 +2364,7 @@ sap.ui.define([
|
|
|
2483
2364
|
// (e.g. IconPool which includes font files from sap.ui.core base theme)
|
|
2484
2365
|
this._ensureThemeRoot(sLibName, "base");
|
|
2485
2366
|
|
|
2486
|
-
if (
|
|
2367
|
+
if (!Configuration.getValue("preloadLibCss").includes(sLibName)) {
|
|
2487
2368
|
// check for configured query parameters and use them
|
|
2488
2369
|
var sQuery = this._getLibraryCssQueryParams(oLibInfo);
|
|
2489
2370
|
|
|
@@ -2538,8 +2419,8 @@ sap.ui.define([
|
|
|
2538
2419
|
}
|
|
2539
2420
|
|
|
2540
2421
|
// determine CSS Variables / RTL
|
|
2541
|
-
var sCssVars = (/^(true|x)$/i.test(
|
|
2542
|
-
var sRtl = (
|
|
2422
|
+
var sCssVars = (/^(true|x)$/i.test(Configuration.getValue("xx-cssVariables")) ? "_skeleton" : "");
|
|
2423
|
+
var sRtl = (Configuration.getRTL() ? "-RTL" : "");
|
|
2543
2424
|
|
|
2544
2425
|
// create the library file name
|
|
2545
2426
|
var sLibFileName,
|
|
@@ -2559,7 +2440,7 @@ sap.ui.define([
|
|
|
2559
2440
|
|
|
2560
2441
|
// include the css variables
|
|
2561
2442
|
var cssPathAndName;
|
|
2562
|
-
if (/^(true|x|additional)$/i.test(
|
|
2443
|
+
if (/^(true|x|additional)$/i.test(Configuration.getValue("xx-cssVariables"))) {
|
|
2563
2444
|
cssPathAndName = this._getThemePath(sLibName, this.sTheme) + "css_variables.css" + (sQuery ? sQuery : "");
|
|
2564
2445
|
Log.info("Including " + cssPathAndName + " - sap.ui.core.Core.includeLibraryTheme()");
|
|
2565
2446
|
includeStylesheet(cssPathAndName, sLinkId);
|
|
@@ -2593,7 +2474,7 @@ sap.ui.define([
|
|
|
2593
2474
|
*/
|
|
2594
2475
|
Core.prototype._getLibraryCssQueryParams = function(oLibInfo) {
|
|
2595
2476
|
var sQuery;
|
|
2596
|
-
if (
|
|
2477
|
+
if (Configuration.getValue("versionedLibCss") && oLibInfo) {
|
|
2597
2478
|
sQuery = "?version=" + oLibInfo.version;
|
|
2598
2479
|
|
|
2599
2480
|
// distribution version may not be available (will be loaded in Core constructor syncpoint2)
|
|
@@ -2664,7 +2545,7 @@ sap.ui.define([
|
|
|
2664
2545
|
* @param {string} [sLibraryName='sap.ui.core'] Name of the library to retrieve the bundle for
|
|
2665
2546
|
* @param {string} [sLocale] Locale to retrieve the resource bundle for
|
|
2666
2547
|
* @param {boolean} [bAsync=false] Whether the resource bundle is loaded asynchronously
|
|
2667
|
-
* @
|
|
2548
|
+
* @returns {module:sap/base/i18n/ResourceBundle|undefined|Promise<module:sap/base/i18n/ResourceBundle|undefined>} The best matching resource bundle for the given
|
|
2668
2549
|
* parameters or <code>undefined</code>; in asynchronous case a Promise on that bundle is returned
|
|
2669
2550
|
* @public
|
|
2670
2551
|
*/
|
|
@@ -2790,63 +2671,7 @@ sap.ui.define([
|
|
|
2790
2671
|
* @deprecated As of version 1.1, use {@link sap.ui.core.Control#placeAt Control#placeAt} instead!
|
|
2791
2672
|
*/
|
|
2792
2673
|
Core.prototype.createUIArea = function(oDomRef) {
|
|
2793
|
-
return
|
|
2794
|
-
};
|
|
2795
|
-
|
|
2796
|
-
/**
|
|
2797
|
-
* Creates a new {@link sap.ui.core.UIArea UIArea}.
|
|
2798
|
-
* Must only be used by sap.ui.core functionality.
|
|
2799
|
-
*
|
|
2800
|
-
* @param {Element|string} oDomRef a DOM Element or ID string of the UIArea
|
|
2801
|
-
* @return {sap.ui.core.UIArea} a new UIArea
|
|
2802
|
-
* @private
|
|
2803
|
-
* @ui5-restricted sap.ui.core
|
|
2804
|
-
*/
|
|
2805
|
-
Core.prototype._createUIArea = function(oDomRef) {
|
|
2806
|
-
var that = this;
|
|
2807
|
-
assert(typeof oDomRef === "string" || typeof oDomRef === "object", "oDomRef must be a string or object");
|
|
2808
|
-
|
|
2809
|
-
if (!oDomRef) {
|
|
2810
|
-
throw new Error("oDomRef must not be null");
|
|
2811
|
-
}
|
|
2812
|
-
|
|
2813
|
-
// oDomRef might be (and actually IS in most cases!) a string (the ID of a DOM element)
|
|
2814
|
-
if (typeof (oDomRef) === "string") {
|
|
2815
|
-
var id = oDomRef;
|
|
2816
|
-
|
|
2817
|
-
if (id == STATIC_UIAREA_ID) {
|
|
2818
|
-
oDomRef = this.getStaticAreaRef();
|
|
2819
|
-
} else {
|
|
2820
|
-
oDomRef = document.getElementById(oDomRef);
|
|
2821
|
-
if (!oDomRef) {
|
|
2822
|
-
throw new Error("DOM element with ID '" + id + "' not found in page, but application tries to insert content.");
|
|
2823
|
-
}
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
// if the domref does not have an ID or empty ID => generate one
|
|
2828
|
-
if (!oDomRef.id || oDomRef.id.length == 0) {
|
|
2829
|
-
oDomRef.id = uid();
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
// create a new or fetch an existing UIArea
|
|
2833
|
-
var sId = oDomRef.id;
|
|
2834
|
-
if (!this.mUIAreas[sId]) {
|
|
2835
|
-
this.mUIAreas[sId] = new UIArea(this, oDomRef);
|
|
2836
|
-
if (!isEmptyObject(this.oModels)) {
|
|
2837
|
-
var oProperties = {
|
|
2838
|
-
oModels: Object.assign({}, this.oModels),
|
|
2839
|
-
oBindingContexts: {},
|
|
2840
|
-
aPropagationListeners: []
|
|
2841
|
-
};
|
|
2842
|
-
that.mUIAreas[sId]._propagateProperties(true, that.mUIAreas[sId], oProperties, true);
|
|
2843
|
-
}
|
|
2844
|
-
} else {
|
|
2845
|
-
// this should solve the issue of 'recreation' of a UIArea
|
|
2846
|
-
// e.g. via setRoot with a new domRef
|
|
2847
|
-
this.mUIAreas[sId].setRootNode(oDomRef);
|
|
2848
|
-
}
|
|
2849
|
-
return this.mUIAreas[sId];
|
|
2674
|
+
return UIArea.create(oDomRef);
|
|
2850
2675
|
};
|
|
2851
2676
|
|
|
2852
2677
|
/**
|
|
@@ -2854,7 +2679,8 @@ sap.ui.define([
|
|
|
2854
2679
|
*
|
|
2855
2680
|
* @public
|
|
2856
2681
|
* @param {string|Element} o DOM element or ID of the UIArea
|
|
2857
|
-
* @return {sap.ui.core.UIArea} UIArea with the given ID or DOM element or <code>null</code> or <code>undefined</code>.
|
|
2682
|
+
* @return {sap.ui.core.UIArea|null|undefined} UIArea with the given ID or DOM element or <code>null</code> or <code>undefined</code>.
|
|
2683
|
+
* @deprecated As of version 1.107, use {@link sap.ui.core.UIArea.registry#get UIArea.registry#get} instead!
|
|
2858
2684
|
*/
|
|
2859
2685
|
Core.prototype.getUIArea = function(o) {
|
|
2860
2686
|
assert(typeof o === "string" || typeof o === "object", "o must be a string or object");
|
|
@@ -2867,109 +2693,12 @@ sap.ui.define([
|
|
|
2867
2693
|
}
|
|
2868
2694
|
|
|
2869
2695
|
if (sId) {
|
|
2870
|
-
return
|
|
2696
|
+
return UIArea.registry.get(sId);
|
|
2871
2697
|
}
|
|
2872
2698
|
|
|
2873
2699
|
return null;
|
|
2874
2700
|
};
|
|
2875
2701
|
|
|
2876
|
-
/**
|
|
2877
|
-
* Informs the core about a UIArea that just became invalid.
|
|
2878
|
-
*
|
|
2879
|
-
* The core might use this information to minimize the set of
|
|
2880
|
-
* re-rendered UIAreas. But for the time being it just registers
|
|
2881
|
-
* a timer to trigger a re-rendering after the current event
|
|
2882
|
-
* has been processed.
|
|
2883
|
-
*
|
|
2884
|
-
* @param {sap.ui.core.UIArea} oUIArea UIArea that just became invalid
|
|
2885
|
-
* @private
|
|
2886
|
-
*/
|
|
2887
|
-
Core.prototype.addInvalidatedUIArea = function(oUIArea) {
|
|
2888
|
-
if ( !this._sRerenderTimer ) {
|
|
2889
|
-
oRenderLog.debug("Registering timer for delayed re-rendering");
|
|
2890
|
-
// start async interaction step
|
|
2891
|
-
Core.aFnDone.push(Interaction.notifyAsyncStep());
|
|
2892
|
-
this._sRerenderTimer = setTimeout(this["renderPendingUIUpdates"].bind(this), 0); // decoupled for collecting several invalidations into one redraw
|
|
2893
|
-
}
|
|
2894
|
-
};
|
|
2895
|
-
|
|
2896
|
-
Core.MAX_RENDERING_ITERATIONS = 20;
|
|
2897
|
-
|
|
2898
|
-
/**
|
|
2899
|
-
* Asks all UIAreas to execute any pending rendering tasks.
|
|
2900
|
-
*
|
|
2901
|
-
* The execution of rendering tasks might require multiple iterations
|
|
2902
|
-
* until either no more rendering tasks are produced or until
|
|
2903
|
-
* MAX_RENDERING_ITERATIONS are reached.
|
|
2904
|
-
*
|
|
2905
|
-
* With a value of MAX_RENDERING_ITERATIONS=0 the loop can be avoided
|
|
2906
|
-
* and the remaining tasks are executed after another timeout.
|
|
2907
|
-
*
|
|
2908
|
-
* @private
|
|
2909
|
-
*/
|
|
2910
|
-
Core.prototype.renderPendingUIUpdates = function(sCaller) {
|
|
2911
|
-
// start performance measurement
|
|
2912
|
-
oRenderLog.debug("Render pending UI updates: start (" + (sCaller || "by timer" ) + ")");
|
|
2913
|
-
|
|
2914
|
-
Measurement.start("renderPendingUIUpdates","Render pending UI updates in all UIAreas");
|
|
2915
|
-
|
|
2916
|
-
var bUIUpdated = false,
|
|
2917
|
-
bLooped = Core.MAX_RENDERING_ITERATIONS > 0,
|
|
2918
|
-
iLoopCount = 0;
|
|
2919
|
-
|
|
2920
|
-
this._bRendering = true;
|
|
2921
|
-
|
|
2922
|
-
do {
|
|
2923
|
-
|
|
2924
|
-
if ( bLooped ) {
|
|
2925
|
-
// try to detect long running ('endless') rendering loops
|
|
2926
|
-
iLoopCount++;
|
|
2927
|
-
// if we run another iteration despite the tracking mode, we complain ourselves
|
|
2928
|
-
if ( iLoopCount > Core.MAX_RENDERING_ITERATIONS ) {
|
|
2929
|
-
this._bRendering = false;
|
|
2930
|
-
throw new Error("Rendering has been re-started too many times (" + iLoopCount + "). Add URL parameter sap-ui-xx-debugRendering=true for a detailed analysis.");
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
|
-
if ( iLoopCount > 1 ) {
|
|
2934
|
-
oRenderLog.debug("Render pending UI updates: iteration " + iLoopCount);
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
// clear a pending timer so that the next call to re-render will create a new timer
|
|
2939
|
-
if (this._sRerenderTimer) {
|
|
2940
|
-
if ( this._sRerenderTimer !== this ) { // 'this' is used as a marker for a delayed initial rendering, no timer to cleanup then
|
|
2941
|
-
clearTimeout(this._sRerenderTimer); // explicitly stop the timer, as this call might be a synchronous call (applyChanges) while still a timer is running
|
|
2942
|
-
}
|
|
2943
|
-
this._sRerenderTimer = undefined;
|
|
2944
|
-
if (Core.aFnDone.length > 0) {
|
|
2945
|
-
Core.aFnDone.pop()();
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
this.runPrerenderingTasks();
|
|
2950
|
-
|
|
2951
|
-
var mUIAreas = this.mUIAreas;
|
|
2952
|
-
for (var sId in mUIAreas) {
|
|
2953
|
-
bUIUpdated = mUIAreas[sId].rerender() || bUIUpdated;
|
|
2954
|
-
}
|
|
2955
|
-
|
|
2956
|
-
// eslint-disable-next-line no-unmodified-loop-condition
|
|
2957
|
-
} while ( bLooped && this._sRerenderTimer ); // iterate if there are new rendering tasks
|
|
2958
|
-
|
|
2959
|
-
this._bRendering = false;
|
|
2960
|
-
|
|
2961
|
-
// TODO: Provide information on what actually was re-rendered...
|
|
2962
|
-
if (bUIUpdated) {
|
|
2963
|
-
this.fireUIUpdated();
|
|
2964
|
-
}
|
|
2965
|
-
|
|
2966
|
-
oRenderLog.debug("Render pending UI updates: finished");
|
|
2967
|
-
|
|
2968
|
-
// end performance measurement
|
|
2969
|
-
Measurement.end("renderPendingUIUpdates");
|
|
2970
|
-
};
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
2702
|
/**
|
|
2974
2703
|
* Returns <code>true</code> if there are any pending rendering tasks or when
|
|
2975
2704
|
* such rendering tasks are currently being executed.
|
|
@@ -2978,7 +2707,7 @@ sap.ui.define([
|
|
|
2978
2707
|
* @public
|
|
2979
2708
|
*/
|
|
2980
2709
|
Core.prototype.getUIDirty = function() {
|
|
2981
|
-
return
|
|
2710
|
+
return Rendering.getUIDirty();
|
|
2982
2711
|
};
|
|
2983
2712
|
|
|
2984
2713
|
/**
|
|
@@ -2996,9 +2725,9 @@ sap.ui.define([
|
|
|
2996
2725
|
_oEventProvider.detachEvent(Core.M_EVENTS.UIUpdated, fnFunction, oListener);
|
|
2997
2726
|
};
|
|
2998
2727
|
|
|
2999
|
-
|
|
3000
|
-
_oEventProvider.fireEvent(Core.M_EVENTS.UIUpdated,
|
|
3001
|
-
};
|
|
2728
|
+
Rendering.attachUIUpdated(function(oEvent) {
|
|
2729
|
+
_oEventProvider.fireEvent(Core.M_EVENTS.UIUpdated, oEvent.getParameters());
|
|
2730
|
+
});
|
|
3002
2731
|
|
|
3003
2732
|
/**
|
|
3004
2733
|
* Triggers a realignment of controls
|
|
@@ -3216,7 +2945,7 @@ sap.ui.define([
|
|
|
3216
2945
|
* and then to update their bindings and corresponding data types (phase 2)
|
|
3217
2946
|
*/
|
|
3218
2947
|
function notifyAll(iPhase) {
|
|
3219
|
-
|
|
2948
|
+
UIArea.registry.forEach(function(oUIArea) {
|
|
3220
2949
|
fnAdapt.call(oUIArea, iPhase);
|
|
3221
2950
|
});
|
|
3222
2951
|
Component.registry.forEach(function(oComponent) {
|
|
@@ -3237,7 +2966,7 @@ sap.ui.define([
|
|
|
3237
2966
|
// modify style sheet URLs
|
|
3238
2967
|
this._updateThemeUrls(this.sTheme);
|
|
3239
2968
|
// invalidate all UIAreas
|
|
3240
|
-
|
|
2969
|
+
UIArea.registry.forEach(function(oUIArea) {
|
|
3241
2970
|
oUIArea.invalidate();
|
|
3242
2971
|
});
|
|
3243
2972
|
Log.info("RTL mode " + mChanges.rtl ? "activated" : "deactivated");
|
|
@@ -3311,7 +3040,7 @@ sap.ui.define([
|
|
|
3311
3040
|
* @public
|
|
3312
3041
|
*/
|
|
3313
3042
|
Core.prototype.applyChanges = function() {
|
|
3314
|
-
|
|
3043
|
+
Rendering.renderPendingUIUpdates("forced by applyChanges");
|
|
3315
3044
|
};
|
|
3316
3045
|
|
|
3317
3046
|
/**
|
|
@@ -3474,40 +3203,7 @@ sap.ui.define([
|
|
|
3474
3203
|
* @public
|
|
3475
3204
|
*/
|
|
3476
3205
|
Core.prototype.getStaticAreaRef = function() {
|
|
3477
|
-
|
|
3478
|
-
oConfig, oFirstFocusElement;
|
|
3479
|
-
|
|
3480
|
-
if (!oStaticArea) {
|
|
3481
|
-
|
|
3482
|
-
oStaticArea = document.createElement("div");
|
|
3483
|
-
oFirstFocusElement = document.createElement("span");
|
|
3484
|
-
oConfig = this.getConfiguration();
|
|
3485
|
-
|
|
3486
|
-
if (!this.bDomReady) {
|
|
3487
|
-
throw new Error("DOM is not ready yet. Static UIArea cannot be created.");
|
|
3488
|
-
}
|
|
3489
|
-
|
|
3490
|
-
oStaticArea.setAttribute("id", STATIC_UIAREA_ID);
|
|
3491
|
-
|
|
3492
|
-
Object.assign(oStaticArea.style, {
|
|
3493
|
-
"height": "0",
|
|
3494
|
-
"width": "0",
|
|
3495
|
-
"overflow": "hidden",
|
|
3496
|
-
"float": oConfig.getRTL() ? "right" : "left"
|
|
3497
|
-
});
|
|
3498
|
-
|
|
3499
|
-
oFirstFocusElement.setAttribute("id", STATIC_UIAREA_ID + "-firstfe");
|
|
3500
|
-
oFirstFocusElement.setAttribute("tabindex", -1);
|
|
3501
|
-
oFirstFocusElement.style.fontSize = 0;
|
|
3502
|
-
|
|
3503
|
-
oStaticArea.appendChild(oFirstFocusElement);
|
|
3504
|
-
|
|
3505
|
-
document.body.insertBefore(oStaticArea, document.body.firstChild);
|
|
3506
|
-
|
|
3507
|
-
this._createUIArea(oStaticArea).bInitial = false;
|
|
3508
|
-
}
|
|
3509
|
-
return oStaticArea;
|
|
3510
|
-
|
|
3206
|
+
return UIArea.getStaticAreaRef();
|
|
3511
3207
|
};
|
|
3512
3208
|
|
|
3513
3209
|
/**
|
|
@@ -3518,7 +3214,7 @@ sap.ui.define([
|
|
|
3518
3214
|
* @protected
|
|
3519
3215
|
*/
|
|
3520
3216
|
Core.prototype.isStaticAreaRef = function(oDomRef) {
|
|
3521
|
-
return
|
|
3217
|
+
return UIArea.isStaticAreaRef(oDomRef);
|
|
3522
3218
|
};
|
|
3523
3219
|
|
|
3524
3220
|
/**
|
|
@@ -3801,7 +3497,7 @@ sap.ui.define([
|
|
|
3801
3497
|
}
|
|
3802
3498
|
// propagate Models to all UI areas
|
|
3803
3499
|
|
|
3804
|
-
|
|
3500
|
+
UIArea.registry.forEach(function (oUIArea){
|
|
3805
3501
|
if (oModel != oUIArea.getModel(sName)) {
|
|
3806
3502
|
oUIArea._propagateProperties(sName, oUIArea, oProperties, false, sName);
|
|
3807
3503
|
}
|
|
@@ -3809,7 +3505,7 @@ sap.ui.define([
|
|
|
3809
3505
|
} else if (oModel && oModel !== this.oModels[sName] ) {
|
|
3810
3506
|
this.oModels[sName] = oModel;
|
|
3811
3507
|
// propagate Models to all UI areas
|
|
3812
|
-
|
|
3508
|
+
UIArea.registry.forEach(function (oUIArea){
|
|
3813
3509
|
if (oModel != oUIArea.getModel(sName)) {
|
|
3814
3510
|
var oProperties = {
|
|
3815
3511
|
oModels: Object.assign({}, this.oModels),
|
|
@@ -4279,26 +3975,10 @@ sap.ui.define([
|
|
|
4279
3975
|
* @param {boolean} [bFirst=false]
|
|
4280
3976
|
* Whether the task should become the first one, not the last one
|
|
4281
3977
|
* @private
|
|
3978
|
+
* @ui5-restricted sap.ui.model.odata.v4
|
|
4282
3979
|
*/
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
this.aPrerenderingTasks.unshift(fnPrerenderingTask);
|
|
4286
|
-
} else {
|
|
4287
|
-
this.aPrerenderingTasks.push(fnPrerenderingTask);
|
|
4288
|
-
}
|
|
4289
|
-
};
|
|
4290
|
-
|
|
4291
|
-
/**
|
|
4292
|
-
* Runs all prerendering tasks and resets the list.
|
|
4293
|
-
* @private
|
|
4294
|
-
*/
|
|
4295
|
-
Core.prototype.runPrerenderingTasks = function () {
|
|
4296
|
-
var aTasks = this.aPrerenderingTasks.slice();
|
|
4297
|
-
|
|
4298
|
-
this.aPrerenderingTasks = [];
|
|
4299
|
-
aTasks.forEach(function (fnPrerenderingTask) {
|
|
4300
|
-
fnPrerenderingTask();
|
|
4301
|
-
});
|
|
3980
|
+
Core.prototype.addPrerenderingTask = function (fnPrerenderingTask, bFirst) {
|
|
3981
|
+
Rendering.addPrerenderingTask(fnPrerenderingTask, bFirst);
|
|
4302
3982
|
};
|
|
4303
3983
|
|
|
4304
3984
|
Core.prototype.destroy = function() {
|