@openui5/sap.ui.core 1.91.0 → 1.93.2
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/.eslintrc.json +37 -0
- package/.reuse/dep5 +46 -0
- package/THIRDPARTY.txt +59 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +6 -2
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +7 -4
- package/src/jquery.sap.stubs.js +0 -1
- package/src/sap/base/i18n/ResourceBundle.js +2 -2
- package/src/sap/base/security/encodeCSS.js +1 -0
- package/src/sap/base/security/encodeJS.js +1 -0
- package/src/sap/base/security/encodeURL.js +1 -0
- package/src/sap/base/security/encodeXML.js +2 -0
- package/src/sap/base/util/LoaderExtensions.js +1 -1
- package/src/sap/base/util/Properties.js +4 -1
- package/src/sap/base/util/isEmptyObject.js +1 -2
- 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/ui/Device.js +10 -10
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/VersionInfo.js +1 -0
- package/src/sap/ui/base/DataType.js +1 -0
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +121 -18
- package/src/sap/ui/base/ManagedObjectMetadata.js +13 -4
- 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 +4 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +4 -1
- package/src/sap/ui/core/Component.js +144 -43
- package/src/sap/ui/core/ComponentContainer.js +51 -2
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +2 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +20 -22
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +2 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -3
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +59 -16
- package/src/sap/ui/core/Fragment.js +3 -3
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +9 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +15 -1328
- package/src/sap/ui/core/Manifest.js +124 -69
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +143 -153
- package/src/sap/ui/core/Placeholder.js +173 -0
- package/src/sap/ui/core/Popup.js +29 -5
- package/src/sap/ui/core/RenderManager.js +344 -104
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +14 -62
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +6 -3
- package/src/sap/ui/core/UIComponent.js +46 -23
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +3 -5
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +5 -6
- package/src/sap/ui/core/cldr/en.json +1 -0
- package/src/sap/ui/core/date/UniversalDate.js +4 -2
- package/src/sap/ui/core/delegate/ItemNavigation.js +4 -4
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragAndDrop.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +2 -9
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +41 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +4 -2
- package/src/sap/ui/core/format/NumberFormat.js +3 -0
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +26 -4
- 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 +4 -2
- 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_cs.properties +1 -1
- package/src/sap/ui/core/messagebundle_ms.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt.properties +6 -6
- package/src/sap/ui/core/messagebundle_tr.properties +1 -1
- package/src/sap/ui/core/mvc/Controller.js +146 -8
- package/src/sap/ui/core/mvc/HTMLView.js +3 -1
- package/src/sap/ui/core/mvc/JSONView.js +7 -5
- package/src/sap/ui/core/mvc/JSView.js +4 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +145 -68
- package/src/sap/ui/core/mvc/ViewType.js +2 -0
- package/src/sap/ui/core/mvc/XMLView.js +13 -9
- 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/HashChangerBase.js +9 -2
- package/src/sap/ui/core/routing/History.js +188 -87
- package/src/sap/ui/core/routing/Route.js +10 -1
- package/src/sap/ui/core/routing/Router.js +8 -5
- package/src/sap/ui/core/routing/RouterHashChanger.js +26 -16
- package/src/sap/ui/core/routing/TargetCache.js +19 -8
- package/src/sap/ui/core/routing/Targets.js +29 -3
- package/src/sap/ui/core/routing/async/Route.js +9 -1
- package/src/sap/ui/core/routing/async/Target.js +249 -85
- package/src/sap/ui/core/routing/async/TargetCache.js +9 -7
- package/src/sap/ui/core/routing/async/Targets.js +4 -2
- package/src/sap/ui/core/routing/sync/Target.js +15 -0
- package/src/sap/ui/core/rules/App.support.js +36 -2
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- 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/InteractionTree.css +0 -14
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -2
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/TimelineOverview.css +0 -35
- package/src/sap/ui/core/support/controls/ObjectViewer.js +5 -9
- package/src/sap/ui/core/support/controls/TreeViewer.js +0 -1
- package/src/sap/ui/core/support/interactionSlider.css +0 -3
- package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
- 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/MessageTest.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +2 -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 +1 -3
- package/src/sap/ui/core/support/support.css +4 -164
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +0 -22
- package/src/sap/ui/core/themes/base/BlindLayer.less +0 -2
- package/src/sap/ui/core/themes/base/BrowserScrollbar.less +0 -9
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +5 -5
- package/src/sap/ui/core/themes/base/SAP-icons.css +2 -0
- package/src/sap/ui/core/themes/base/SAP-icons.less +10 -0
- package/src/sap/ui/core/themes/base/TechnicalInfo.less +0 -1
- package/src/sap/ui/core/themes/base/base.less +569 -414
- package/src/sap/ui/core/themes/base/global.less +38 -0
- package/src/sap/ui/core/themes/base/library.source.less +1 -2
- package/src/sap/ui/core/themes/base/shared.less +1 -1
- package/src/sap/ui/core/themes/sap_hcb/global.less +34 -0
- package/src/sap/ui/core/theming/Parameters.js +222 -60
- package/src/sap/ui/core/theming/ThemeHelper.js +94 -0
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +2 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- 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 +27 -7
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +2 -2
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +18 -0
- 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 +1 -1
- 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 +2 -2
- package/src/sap/ui/core/util/serializer/delegate/XML.js +2 -2
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +2 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/dom/jquery/zIndex.js +3 -3
- package/src/sap/ui/events/jquery/EventSimulation.js +7 -6
- package/src/sap/ui/events/jquery/EventTriggerHook.js +1 -1
- package/src/sap/ui/model/Binding.js +7 -3
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -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 +31 -11
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +19 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +3 -3
- package/src/sap/ui/model/SelectionModel.js +5 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +36 -45
- package/src/sap/ui/model/analytics/odata4analytics.js +31 -31
- package/src/sap/ui/model/base/ManagedObjectModel.js +11 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +23 -18
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +1 -0
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +52 -40
- package/src/sap/ui/model/odata/ODataMetadata.js +3 -3
- package/src/sap/ui/model/odata/ODataModel.js +6 -6
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +1 -1
- package/src/sap/ui/model/odata/ODataUtils.js +126 -0
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +30 -27
- 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 +7 -2
- 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/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 +3 -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 +7 -2
- package/src/sap/ui/model/odata/type/UnitMixin.js +20 -7
- package/src/sap/ui/model/odata/v2/Context.js +165 -0
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +19 -5
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +20 -79
- package/src/sap/ui/model/odata/v2/ODataModel.js +75 -53
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +55 -41
- package/src/sap/ui/model/odata/v4/Context.js +48 -15
- package/src/sap/ui/model/odata/v4/ODataBinding.js +89 -9
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +87 -21
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +72 -50
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +8 -8
- package/src/sap/ui/model/odata/v4/ODataModel.js +109 -171
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +34 -67
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +18 -9
- package/src/sap/ui/model/odata/v4/ODataUtils.js +1 -1
- package/src/sap/ui/model/odata/v4/SubmitMode.js +3 -3
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +17 -16
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +86 -117
- package/src/sap/ui/model/odata/v4/lib/{_GrandTotalHelper.js → _ConcatHelper.js} +34 -27
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +2 -2
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +122 -7
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +2 -2
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +25 -74
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +49 -12
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +7 -7
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +3 -3
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +3 -3
- 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 +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +3 -3
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/performance/Measurement.js +3 -5
- package/src/sap/ui/performance/trace/FESR.js +2 -1
- package/src/sap/ui/performance/trace/Interaction.js +11 -9
- package/src/sap/ui/qunit/QUnitUtils.js +1 -1
- package/src/sap/ui/qunit/qunit-coverage.js +1 -0
- package/src/sap/ui/qunit/qunit-junit.js +1 -0
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/security/FrameOptions.js +2 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +1 -0
- package/src/sap/ui/test/TestUtils.js +17 -30
- package/src/sap/ui/test/_BrowserLogCollector.js +1 -0
- package/src/sap/ui/test/actions/Action.js +1 -1
- package/src/sap/ui/test/launchers/componentLauncher.js +2 -1
- package/src/sap/ui/test/opaQunit.js +6 -9
- package/src/sap/ui/test/pipelines/MatcherPipeline.js +1 -1
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -4
- package/src/sap/ui/test/starter/_utils.js +6 -0
- package/src/sap/ui/test/starter/createSuite.js +1 -1
- package/src/sap/ui/thirdparty/IPv6.js +2 -2
- package/src/sap/ui/thirdparty/SecondLevelDomains.js +2 -2
- package/src/sap/ui/thirdparty/URI.js +14 -5
- package/src/sap/ui/thirdparty/URITemplate.js +2 -2
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/thirdparty/crossroads.js +10 -2
- package/src/sap/ui/util/Mobile.js +10 -7
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +1 -1
- package/src/ui5loader.js +24 -6
- package/src/sap/ui/model/odata/v4/.eslintrc +0 -6
|
@@ -38,6 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
) {
|
|
39
39
|
|
|
40
40
|
"use strict";
|
|
41
|
+
/*global SVGElement*/
|
|
41
42
|
|
|
42
43
|
var aCommonMethods = ["renderControl", "cleanupControlWithoutRendering", "accessibilityState", "icon"];
|
|
43
44
|
|
|
@@ -49,6 +50,10 @@ sap.ui.define([
|
|
|
49
50
|
|
|
50
51
|
var aNonRendererMethods = ["render", "flush", "destroy"];
|
|
51
52
|
|
|
53
|
+
var oTemplate = document.createElement("template");
|
|
54
|
+
|
|
55
|
+
var ATTR_STYLE_KEY_MARKER = "data-sap-ui-stylekey";
|
|
56
|
+
|
|
52
57
|
/**
|
|
53
58
|
* Creates an instance of the RenderManager.
|
|
54
59
|
*
|
|
@@ -78,7 +83,7 @@ sap.ui.define([
|
|
|
78
83
|
* suffix 'Renderer'. So for a control <code>sap.m.Input</code> the default renderer will be searched
|
|
79
84
|
* for under the global name <code>sap.m.Input<i>Renderer</i></code>.
|
|
80
85
|
*
|
|
81
|
-
* <h3>
|
|
86
|
+
* <h3>Semantic Rendering</h3>
|
|
82
87
|
* As of 1.67, <code>RenderManager</code> provides a set of new APIs to describe the structure of the DOM that can be used by the control renderers.
|
|
83
88
|
*
|
|
84
89
|
* <pre>
|
|
@@ -118,7 +123,7 @@ sap.ui.define([
|
|
|
118
123
|
* <pre>
|
|
119
124
|
*
|
|
120
125
|
* var myButtonRenderer = {
|
|
121
|
-
* apiVersion: 2 // enable
|
|
126
|
+
* apiVersion: 2 // enable semantic rendering
|
|
122
127
|
* };
|
|
123
128
|
*
|
|
124
129
|
* myButtonRenderer.render = function(rm, oButton) {
|
|
@@ -175,12 +180,9 @@ sap.ui.define([
|
|
|
175
180
|
* @see sap.ui.core.Core
|
|
176
181
|
* @see sap.ui.getCore
|
|
177
182
|
*
|
|
178
|
-
* @borrows sap.ui.core.RenderManager#writeAccessibilityState as #accessibilityState
|
|
179
|
-
* @borrows sap.ui.core.RenderManager#writeIcon as #icon
|
|
180
|
-
*
|
|
181
183
|
* @extends Object
|
|
182
184
|
* @author SAP SE
|
|
183
|
-
* @version 1.
|
|
185
|
+
* @version 1.93.2
|
|
184
186
|
* @alias sap.ui.core.RenderManager
|
|
185
187
|
* @public
|
|
186
188
|
*/
|
|
@@ -198,7 +200,9 @@ sap.ui.define([
|
|
|
198
200
|
bDomInterface, // specifies the rendering interface that is used by the control renderers
|
|
199
201
|
sLegacyRendererControlId = "", // stores the id of the control that has a legacy renderer while its parent has the new semantic renderer
|
|
200
202
|
oStringInterface = {}, // holds old string based rendering API and the string implementation of the new semantic rendering API
|
|
201
|
-
oDomInterface = {}
|
|
203
|
+
oDomInterface = {}, // semantic rendering API for the controls whose renderer provides apiVersion=2 marker
|
|
204
|
+
aRenderingStyles = [], // during string-based rendering, stores the styles that couldn't be set via style attribute due to CSP restrictions
|
|
205
|
+
oPatcher = new Patcher(); // the Patcher instance to handle in-place DOM patching
|
|
202
206
|
|
|
203
207
|
/**
|
|
204
208
|
* Sets the focus handler to be used by the RenderManager.
|
|
@@ -260,10 +264,27 @@ sap.ui.define([
|
|
|
260
264
|
//#################################################################################################
|
|
261
265
|
|
|
262
266
|
/**
|
|
263
|
-
* Write the given texts to the buffer
|
|
267
|
+
* Write the given texts to the buffer.
|
|
264
268
|
* @param {...string|number} sText (can be a number too)
|
|
265
|
-
* @
|
|
269
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
266
270
|
* @public
|
|
271
|
+
* @deprecated Since 1.92. Instead, use the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
272
|
+
* There is no 1:1 replacement for <code>write</code>. Typically, <code>write</code> is used to create
|
|
273
|
+
* a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call.
|
|
274
|
+
* Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
|
|
275
|
+
*
|
|
276
|
+
* <br><br>Example:<br>
|
|
277
|
+
* oRm.write("<span id=\"" + oCtrl.getId() + "-outer\" class=\"myCtrlOuter\">"
|
|
278
|
+
* + "&nbsp;" + oResourceBundle.getText("TEXT_KEY") + "&nbsp;</span>");
|
|
279
|
+
* <br><br>
|
|
280
|
+
* has to be transformed to
|
|
281
|
+
* <br><br>
|
|
282
|
+
* oRm.openStart("span", oCtrl.getId() + "-outer").class("myCtrlOuter").openEnd().text("\u00a0" + oResourceBundle.getText("TEXT_KEY") + "\u00a0").close("span");
|
|
283
|
+
* <br><br>
|
|
284
|
+
* Note that "&nbsp;" was replaced with "\u00a0" (no-break-space). In general, HTML entities
|
|
285
|
+
* have to be replaced by the corresponding Unicode character escapes. A mapping table can be found
|
|
286
|
+
* at {@link https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references}.
|
|
287
|
+
*
|
|
267
288
|
* @SecSink {*|XSS}
|
|
268
289
|
*/
|
|
269
290
|
this.write = function(/** string|number */ sText /* ... */) {
|
|
@@ -279,8 +300,9 @@ sap.ui.define([
|
|
|
279
300
|
*
|
|
280
301
|
* @param {any} sText the text to escape
|
|
281
302
|
* @param {boolean} [bLineBreaks=false] Whether to convert line breaks into <br> tags
|
|
282
|
-
* @
|
|
303
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
283
304
|
* @public
|
|
305
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#text} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
284
306
|
*/
|
|
285
307
|
this.writeEscaped = function(sText, bLineBreaks) {
|
|
286
308
|
if ( sText != null ) {
|
|
@@ -300,8 +322,9 @@ sap.ui.define([
|
|
|
300
322
|
*
|
|
301
323
|
* @param {string} sName Name of the attribute
|
|
302
324
|
* @param {string | number | boolean} vValue Value of the attribute
|
|
303
|
-
* @
|
|
325
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
304
326
|
* @public
|
|
327
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#attr} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
305
328
|
* @SecSink {0 1|XSS} Attributes are written to HTML without validation
|
|
306
329
|
*/
|
|
307
330
|
this.writeAttribute = function(sName, vValue) {
|
|
@@ -318,8 +341,9 @@ sap.ui.define([
|
|
|
318
341
|
*
|
|
319
342
|
* @param {string} sName Name of the attribute
|
|
320
343
|
* @param {any} vValue Value of the attribute
|
|
321
|
-
* @
|
|
344
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
322
345
|
* @public
|
|
346
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#attr} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
323
347
|
* @SecSink {0|XSS}
|
|
324
348
|
*/
|
|
325
349
|
this.writeAttributeEscaped = function(sName, vValue) {
|
|
@@ -334,8 +358,9 @@ sap.ui.define([
|
|
|
334
358
|
*
|
|
335
359
|
* @param {string} sName Name of the CSS property to write
|
|
336
360
|
* @param {string|float|int} vValue Value to write
|
|
337
|
-
* @
|
|
361
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
338
362
|
* @public
|
|
363
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#style} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
339
364
|
* @SecSink {0 1|XSS} Styles are written to HTML without validation
|
|
340
365
|
*/
|
|
341
366
|
this.addStyle = function(sName, vValue) {
|
|
@@ -353,13 +378,17 @@ sap.ui.define([
|
|
|
353
378
|
|
|
354
379
|
/**
|
|
355
380
|
* Writes and flushes the style collection
|
|
356
|
-
* @
|
|
381
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
357
382
|
* @public
|
|
383
|
+
* @deprecated Since 1.92. Not longer needed, when using the {@link sap.ui.core.RenderManager Semantic Rendering API}
|
|
384
|
+
* the actual writing of styles happens when {@link sap.ui.core.RenderManager#openEnd} or {@link sap.ui.core.RenderManager#voidEnd} are used.
|
|
358
385
|
*/
|
|
359
386
|
this.writeStyles = function() {
|
|
360
387
|
var oStyle = aStyleStack[aStyleStack.length - 1];
|
|
361
388
|
if (oStyle.aStyle && oStyle.aStyle.length) {
|
|
362
|
-
|
|
389
|
+
// Due to possible CSP restrictions we do not write styles into the HTML buffer. Instead, we store the styles in the aRenderingStyles array
|
|
390
|
+
// and add a ATTR_STYLE_KEY_MARKER attribute marker for which the value references the original style index in the aRenderingStyles array.
|
|
391
|
+
this.writeAttribute(ATTR_STYLE_KEY_MARKER, aRenderingStyles.push(oStyle.aStyle.join(" ")) - 1);
|
|
363
392
|
}
|
|
364
393
|
oStyle.aStyle = null;
|
|
365
394
|
return this;
|
|
@@ -370,8 +399,9 @@ sap.ui.define([
|
|
|
370
399
|
* The class collection is flushed if it is written to the buffer using {@link #writeClasses}
|
|
371
400
|
*
|
|
372
401
|
* @param {string} sName name of the class to be added; null values are ignored
|
|
373
|
-
* @
|
|
402
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
374
403
|
* @public
|
|
404
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#class} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
375
405
|
* @SecSink {0|XSS} Classes are written to HTML without validation
|
|
376
406
|
*/
|
|
377
407
|
this.addClass = function(sName) {
|
|
@@ -393,8 +423,10 @@ sap.ui.define([
|
|
|
393
423
|
* classes are added instead. If oElement === false, no custom style classes are added.
|
|
394
424
|
*
|
|
395
425
|
* @param {sap.ui.core.Element | boolean} [oElement] an Element from which to add custom style classes (instead of adding from the control itself)
|
|
396
|
-
* @
|
|
426
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
397
427
|
* @public
|
|
428
|
+
* @deprecated Since 1.92. Not longer needed, when using the {@link sap.ui.core.RenderManager Semantic Rendering API}
|
|
429
|
+
* the actual writing of classes happens when {@link sap.ui.core.RenderManager#openEnd} or {@link sap.ui.core.RenderManager#voidEnd} are used.
|
|
398
430
|
*/
|
|
399
431
|
this.writeClasses = function(oElement) {
|
|
400
432
|
assert(!oElement || typeof oElement === "boolean" || BaseObject.isA(oElement, 'sap.ui.core.Element'), "oElement must be empty, a boolean, or an sap.ui.core.Element");
|
|
@@ -439,7 +471,7 @@ sap.ui.define([
|
|
|
439
471
|
*
|
|
440
472
|
* @param {string} sTagName Tag name of the HTML element
|
|
441
473
|
* @param {sap.ui.core.Element|sap.ui.core.ID} [vControlOrId] Control instance or ID to identify the element
|
|
442
|
-
* @
|
|
474
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
443
475
|
*
|
|
444
476
|
* @public
|
|
445
477
|
* @since 1.67
|
|
@@ -466,7 +498,7 @@ sap.ui.define([
|
|
|
466
498
|
*
|
|
467
499
|
* This indicates that there are no more attributes to set to the open tag.
|
|
468
500
|
*
|
|
469
|
-
* @
|
|
501
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
470
502
|
* @public
|
|
471
503
|
* @since 1.67
|
|
472
504
|
*/
|
|
@@ -488,7 +520,7 @@ sap.ui.define([
|
|
|
488
520
|
* This indicates that there are no more children to append to the open tag.
|
|
489
521
|
*
|
|
490
522
|
* @param {string} sTagName Tag name of the HTML element
|
|
491
|
-
* @
|
|
523
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
492
524
|
* @public
|
|
493
525
|
* @since 1.67
|
|
494
526
|
*/
|
|
@@ -510,7 +542,7 @@ sap.ui.define([
|
|
|
510
542
|
*
|
|
511
543
|
* @param {string} sTagName Tag name of the HTML element
|
|
512
544
|
* @param {sap.ui.core.Element|sap.ui.core.ID} [vControlOrId] Control instance or ID to identify the element
|
|
513
|
-
* @
|
|
545
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
514
546
|
* @public
|
|
515
547
|
* @since 1.67
|
|
516
548
|
*/
|
|
@@ -527,7 +559,7 @@ sap.ui.define([
|
|
|
527
559
|
* This indicates that there are no more attributes to set to the open tag.
|
|
528
560
|
* For self-closing tags <code>close</code> must not be called.
|
|
529
561
|
*
|
|
530
|
-
* @
|
|
562
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
531
563
|
* @public
|
|
532
564
|
* @since 1.67
|
|
533
565
|
*/
|
|
@@ -549,7 +581,7 @@ sap.ui.define([
|
|
|
549
581
|
* This must not be used for plain texts; use the <code>text</code> method instead.
|
|
550
582
|
*
|
|
551
583
|
* @param {string} sHtml Well-formed, valid HTML markup
|
|
552
|
-
* @
|
|
584
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
553
585
|
* @public
|
|
554
586
|
* @since 1.67
|
|
555
587
|
* @SecSink {*|XSS}
|
|
@@ -564,8 +596,17 @@ sap.ui.define([
|
|
|
564
596
|
/**
|
|
565
597
|
* Sets the text content with the given text.
|
|
566
598
|
*
|
|
599
|
+
* Line breaks are not supported by this method, use CSS
|
|
600
|
+
* {@link https://www.w3.org/TR/CSS2/text.html#white-space-prop white-space: pre-line}
|
|
601
|
+
* option to implement line breaks.
|
|
602
|
+
*
|
|
603
|
+
* HTML entities are not supported by this method,
|
|
604
|
+
* use unicode escaping or the unicode character to implement HTML entities.
|
|
605
|
+
* For further information see
|
|
606
|
+
* {@link https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references}.
|
|
607
|
+
*
|
|
567
608
|
* @param {string} sText The text to be written
|
|
568
|
-
* @
|
|
609
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
569
610
|
* @public
|
|
570
611
|
* @since 1.67
|
|
571
612
|
*/
|
|
@@ -586,9 +627,14 @@ sap.ui.define([
|
|
|
586
627
|
* For HTML elements, {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes attribute names} must all be set in lowercase.
|
|
587
628
|
* For foreign elements, such as SVG, {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute attribute names} can be set in upper camel case (e.g. viewBox).
|
|
588
629
|
*
|
|
630
|
+
* HTML entities are not supported by this method,
|
|
631
|
+
* use unicode escaping or the unicode character to implement HTML entities.
|
|
632
|
+
* For further information see
|
|
633
|
+
* {@link https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references}.
|
|
634
|
+
*
|
|
589
635
|
* @param {string} sName Name of the attribute
|
|
590
636
|
* @param {*} vValue Value of the attribute
|
|
591
|
-
* @
|
|
637
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
592
638
|
* @public
|
|
593
639
|
* @since 1.67
|
|
594
640
|
*/
|
|
@@ -606,7 +652,7 @@ sap.ui.define([
|
|
|
606
652
|
* Class name must not contain any whitespace.
|
|
607
653
|
*
|
|
608
654
|
* @param {string} sClass Class name to be written
|
|
609
|
-
* @
|
|
655
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
610
656
|
* @public
|
|
611
657
|
* @since 1.67
|
|
612
658
|
*/
|
|
@@ -623,10 +669,13 @@ sap.ui.define([
|
|
|
623
669
|
* Adds a style name-value pair to the style collection of the last open HTML element.
|
|
624
670
|
*
|
|
625
671
|
* This is only valid when called between <code>openStart/voidStart</code> and <code>openEnd/voidEnd</code>.
|
|
672
|
+
* To allow a more efficient DOM update, the CSS property names and values have to be used in their canonical form.
|
|
673
|
+
* In general, CSS properties are lower-cased in their canonical form, except for parts that are not under the control of CSS.
|
|
674
|
+
* For more information, see {@link https://www.w3.org/TR/CSS/#indices}.
|
|
626
675
|
*
|
|
627
676
|
* @param {string} sName Name of the style property
|
|
628
677
|
* @param {string} sValue Value of the style property
|
|
629
|
-
* @
|
|
678
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
630
679
|
* @public
|
|
631
680
|
* @since 1.67
|
|
632
681
|
*/
|
|
@@ -637,10 +686,101 @@ sap.ui.define([
|
|
|
637
686
|
return this;
|
|
638
687
|
};
|
|
639
688
|
|
|
640
|
-
|
|
689
|
+
/**
|
|
690
|
+
* Collects accessibility related attributes for an <code>Element</code> and renders them as part of
|
|
691
|
+
* the currently rendered DOM element.
|
|
692
|
+
*
|
|
693
|
+
* See the WAI-ARIA specification for a general description of the accessibility related attributes.
|
|
694
|
+
* Attributes are only rendered when the accessibility feature is activated in the UI5 runtime configuration.
|
|
695
|
+
*
|
|
696
|
+
* The values for the attributes are collected from the following sources (last one wins):
|
|
697
|
+
* <ol>
|
|
698
|
+
* <li>from the properties and associations of the given <code>oElement</code>, using a heuristic mapping
|
|
699
|
+
* (described below)</li>
|
|
700
|
+
* <li>from the <code>mProps</code> parameter, as provided by the caller</li>
|
|
701
|
+
* <li>from the parent of the given <code>oElement</code>, if it has a parent and if the parent implements
|
|
702
|
+
* the method {@link sap.ui.core.Element#enhanceAccessibilityState enhanceAccessibilityState}</li>
|
|
703
|
+
* </ol>
|
|
704
|
+
* If no <code>oElement</code> is given, only <code>mProps</code> will be taken into account.
|
|
705
|
+
*
|
|
706
|
+
*
|
|
707
|
+
* <h3>Heuristic Mapping</h3>
|
|
708
|
+
* The following mapping from properties/values to ARIA attributes is used (if the element does have such properties):
|
|
709
|
+
* <ul>
|
|
710
|
+
* <li><code>editable===false</code> => <code>aria-readonly="true"</code></li>
|
|
711
|
+
* <li><code>enabled===false</code> => <code>aria-disabled="true"</code></li>
|
|
712
|
+
* <li><code>visible===false</code> => <code>aria-hidden="true"</code></li>
|
|
713
|
+
* <li><code>required===true</code> => <code>aria-required="true"</code></li>
|
|
714
|
+
* <li><code>selected===true</code> => <code>aria-selected="true"</code></li>
|
|
715
|
+
* <li><code>checked===true</code> => <code>aria-checked="true"</code></li>
|
|
716
|
+
* </ul>
|
|
717
|
+
*
|
|
718
|
+
* In case of the <code>required</code> property, all label controls which reference the given element
|
|
719
|
+
* in their <code>labelFor</code> relation are additionally taken into account when determining the
|
|
720
|
+
* value for the <code>aria-required</code> attribute.
|
|
721
|
+
*
|
|
722
|
+
* Additionally, the associations <code>ariaDescribedBy</code> and <code>ariaLabelledBy</code> are used to
|
|
723
|
+
* determine the lists of IDs for the ARIA attributes <code>aria-describedby</code> and
|
|
724
|
+
* <code>aria-labelledby</code>.
|
|
725
|
+
*
|
|
726
|
+
* Label controls that reference the given element in their <code>labelFor</code> relation are automatically
|
|
727
|
+
* added to the <code>aria-labelledby</code> attribute.
|
|
728
|
+
*
|
|
729
|
+
* Note: This function is only a heuristic of a control property to ARIA attribute mapping. Control developers
|
|
730
|
+
* have to check whether it fulfills their requirements. In case of problems (for example the <code>RadioButton</code> has a
|
|
731
|
+
* <code>selected</code> property but must provide an <code>aria-checked</code> attribute) the auto-generated
|
|
732
|
+
* result of this function can be influenced via the parameter <code>mProps</code> as described below.
|
|
733
|
+
*
|
|
734
|
+
* The parameter <code>mProps</code> can be used to either provide additional attributes which should be rendered
|
|
735
|
+
* and/or to avoid the automatic generation of single ARIA attributes. The 'aria-' prefix will be prepended
|
|
736
|
+
* automatically to the keys (Exception: Attribute <code>role</code> does not get the prefix 'aria-').
|
|
737
|
+
*
|
|
738
|
+
*
|
|
739
|
+
* Examples:<br>
|
|
740
|
+
* <code>{hidden : true}</code> results in <code>aria-hidden="true"</code> independent of the presence or
|
|
741
|
+
* absence of the visibility property.<br>
|
|
742
|
+
* <code>{hidden : null}</code> ensures that no <code>aria-hidden</code> attribute is written independent
|
|
743
|
+
* of the presence or absence of the visibility property.<br>
|
|
744
|
+
*
|
|
745
|
+
* The function behaves in the same way for the associations <code>ariaDescribedBy</code> and <code>ariaLabelledBy</code>.
|
|
746
|
+
* To append additional values to the auto-generated <code>aria-describedby</code> and <code>aria-labelledby</code>
|
|
747
|
+
* attributes, the following format can be used:
|
|
748
|
+
* <pre>
|
|
749
|
+
* {describedby : {value: "id1 id2", append: true}} => aria-describedby = "ida idb id1 id2"
|
|
750
|
+
* </pre>
|
|
751
|
+
* (assuming that "ida idb" is the auto-generated part based on the association <code>ariaDescribedBy</code>).
|
|
752
|
+
*
|
|
753
|
+
* @param {sap.ui.core.Element}
|
|
754
|
+
* [oElement] The <code>Element</code> whose accessibility state should be rendered
|
|
755
|
+
* @param {object}
|
|
756
|
+
* [mProps] A map of additional properties that should be added or changed.
|
|
757
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
758
|
+
* @public
|
|
759
|
+
* @function
|
|
760
|
+
*/
|
|
641
761
|
this.accessibilityState = this.writeAccessibilityState;
|
|
642
762
|
|
|
643
|
-
|
|
763
|
+
/**
|
|
764
|
+
* Writes either an <img> tag for normal URI or a <span> tag with needed properties for an icon URI.
|
|
765
|
+
*
|
|
766
|
+
* Additional classes and attributes can be added to the tag with the second and third parameter.
|
|
767
|
+
* All of the given attributes are escaped when necessary for security consideration.
|
|
768
|
+
*
|
|
769
|
+
* When an <img> tag is rendered, the following two attributes are added by default
|
|
770
|
+
* and can be overwritten with corresponding values in the <code>mAttributes</code> parameter:
|
|
771
|
+
* <ul>
|
|
772
|
+
* <li><code>role: "presentation"</code></Li>
|
|
773
|
+
* <li><code>alt: ""</code></li>
|
|
774
|
+
* </ul>
|
|
775
|
+
*
|
|
776
|
+
* @param {sap.ui.core.URI} sURI URI of an image or of an icon registered in {@link sap.ui.core.IconPool}
|
|
777
|
+
* @param {array|string} [aClasses] Additional classes that are added to the rendered tag
|
|
778
|
+
* @param {object} [mAttributes] Additional attributes that will be added to the rendered tag.
|
|
779
|
+
* Currently the attributes <code>class</code> and <code>style</code> are not allowed
|
|
780
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
781
|
+
* @public
|
|
782
|
+
* @function
|
|
783
|
+
*/
|
|
644
784
|
this.icon = this.writeIcon;
|
|
645
785
|
|
|
646
786
|
|
|
@@ -655,11 +795,11 @@ sap.ui.define([
|
|
|
655
795
|
sOpenTag = sTagName;
|
|
656
796
|
|
|
657
797
|
if (!vControlOrId) {
|
|
658
|
-
|
|
798
|
+
oPatcher.openStart(sTagName);
|
|
659
799
|
} else if (typeof vControlOrId == "string") {
|
|
660
|
-
|
|
800
|
+
oPatcher.openStart(sTagName, vControlOrId);
|
|
661
801
|
} else {
|
|
662
|
-
|
|
802
|
+
oPatcher.openStart(sTagName, vControlOrId.getId());
|
|
663
803
|
renderElementData(this, vControlOrId);
|
|
664
804
|
}
|
|
665
805
|
|
|
@@ -679,7 +819,7 @@ sap.ui.define([
|
|
|
679
819
|
assertValidAttr(sName);
|
|
680
820
|
assertOpenTagHasStarted("attr");
|
|
681
821
|
|
|
682
|
-
|
|
822
|
+
oPatcher.attr(sName, vValue);
|
|
683
823
|
return this;
|
|
684
824
|
};
|
|
685
825
|
|
|
@@ -689,7 +829,7 @@ sap.ui.define([
|
|
|
689
829
|
assertValidClass.apply(this, arguments);
|
|
690
830
|
assertOpenTagHasStarted("class");
|
|
691
831
|
|
|
692
|
-
|
|
832
|
+
oPatcher.class(sClass);
|
|
693
833
|
}
|
|
694
834
|
|
|
695
835
|
return this;
|
|
@@ -700,7 +840,7 @@ sap.ui.define([
|
|
|
700
840
|
assertValidStyle(sName);
|
|
701
841
|
assertOpenTagHasStarted("style");
|
|
702
842
|
|
|
703
|
-
|
|
843
|
+
oPatcher.style(sName, vValue);
|
|
704
844
|
return this;
|
|
705
845
|
};
|
|
706
846
|
|
|
@@ -710,7 +850,7 @@ sap.ui.define([
|
|
|
710
850
|
var oStyle = aStyleStack[aStyleStack.length - 1];
|
|
711
851
|
var aStyleClasses = oStyle.aCustomStyleClasses;
|
|
712
852
|
if (aStyleClasses) {
|
|
713
|
-
aStyleClasses.forEach(
|
|
853
|
+
aStyleClasses.forEach(oPatcher.class, oPatcher);
|
|
714
854
|
oStyle.aCustomStyleClasses = null;
|
|
715
855
|
}
|
|
716
856
|
}
|
|
@@ -720,7 +860,7 @@ sap.ui.define([
|
|
|
720
860
|
assert(bExludeStyleClasses === undefined || bExludeStyleClasses === true, "The private parameter bExludeStyleClasses must be true or omitted!");
|
|
721
861
|
sOpenTag = "";
|
|
722
862
|
|
|
723
|
-
|
|
863
|
+
oPatcher.openEnd();
|
|
724
864
|
return this;
|
|
725
865
|
};
|
|
726
866
|
|
|
@@ -730,7 +870,7 @@ sap.ui.define([
|
|
|
730
870
|
var oStyle = aStyleStack[aStyleStack.length - 1];
|
|
731
871
|
var aStyleClasses = oStyle.aCustomStyleClasses;
|
|
732
872
|
if (aStyleClasses) {
|
|
733
|
-
aStyleClasses.forEach(
|
|
873
|
+
aStyleClasses.forEach(oPatcher.class, oPatcher);
|
|
734
874
|
oStyle.aCustomStyleClasses = null;
|
|
735
875
|
}
|
|
736
876
|
}
|
|
@@ -740,7 +880,7 @@ sap.ui.define([
|
|
|
740
880
|
bVoidOpen = false;
|
|
741
881
|
sOpenTag = "";
|
|
742
882
|
|
|
743
|
-
|
|
883
|
+
oPatcher.voidEnd();
|
|
744
884
|
return this;
|
|
745
885
|
};
|
|
746
886
|
|
|
@@ -749,7 +889,7 @@ sap.ui.define([
|
|
|
749
889
|
assertOpenTagHasEnded();
|
|
750
890
|
|
|
751
891
|
if (sText != null) {
|
|
752
|
-
|
|
892
|
+
oPatcher.text(sText);
|
|
753
893
|
}
|
|
754
894
|
|
|
755
895
|
return this;
|
|
@@ -759,7 +899,7 @@ sap.ui.define([
|
|
|
759
899
|
oDomInterface.unsafeHtml = function(sHtml) {
|
|
760
900
|
assertOpenTagHasEnded();
|
|
761
901
|
|
|
762
|
-
|
|
902
|
+
oPatcher.unsafeHtml(sHtml);
|
|
763
903
|
return this;
|
|
764
904
|
};
|
|
765
905
|
|
|
@@ -768,7 +908,7 @@ sap.ui.define([
|
|
|
768
908
|
assertValidName(sTagName, "tag");
|
|
769
909
|
assertOpenTagHasEnded();
|
|
770
910
|
|
|
771
|
-
|
|
911
|
+
oPatcher.close(sTagName);
|
|
772
912
|
return this;
|
|
773
913
|
};
|
|
774
914
|
|
|
@@ -959,21 +1099,26 @@ sap.ui.define([
|
|
|
959
1099
|
} else if (bDomInterface === undefined) {
|
|
960
1100
|
|
|
961
1101
|
// rendering interface must be determined for the root control once per rendering
|
|
962
|
-
|
|
963
|
-
oDomRef = oControl.getDomRef() || InvisibleRenderer.getDomRef(oControl);
|
|
1102
|
+
if (RenderManager.getApiVersion(oRenderer) == 2) {
|
|
964
1103
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
if (oDomRef && RenderManager.getApiVersion(oRenderer) == 2 && !RenderManager.isPreservedContent(oDomRef)) {
|
|
1104
|
+
// get the visible or invisible DOM element of the control
|
|
1105
|
+
oDomRef = oDomRef || oControl.getDomRef() || InvisibleRenderer.getDomRef(oControl);
|
|
968
1106
|
|
|
969
|
-
//
|
|
970
|
-
|
|
1107
|
+
// If the control is in the preserved area then we should not use the DOM-based rendering to avoid patching of preserved nodes
|
|
1108
|
+
if (RenderManager.isPreservedContent(oDomRef)) {
|
|
1109
|
+
bDomInterface = false;
|
|
1110
|
+
} else {
|
|
1111
|
+
// patching will happen during the control renderer calls therefore we need to get the focus info before the patching
|
|
1112
|
+
if (oDomRef && oFocusHandler) {
|
|
1113
|
+
oFocusHandler.storePatchingControlFocusInfo(oDomRef);
|
|
1114
|
+
}
|
|
971
1115
|
|
|
972
|
-
|
|
973
|
-
|
|
1116
|
+
// set the starting point of the Patcher
|
|
1117
|
+
oPatcher.setRootNode(oDomRef);
|
|
974
1118
|
|
|
975
|
-
|
|
976
|
-
|
|
1119
|
+
// remember that we are using DOM based rendering interface
|
|
1120
|
+
bDomInterface = true;
|
|
1121
|
+
}
|
|
977
1122
|
|
|
978
1123
|
} else {
|
|
979
1124
|
|
|
@@ -1005,17 +1150,17 @@ sap.ui.define([
|
|
|
1005
1150
|
if (bDomInterface) {
|
|
1006
1151
|
|
|
1007
1152
|
// remember the cursor of the Patcher before the control renderer is executed
|
|
1008
|
-
var oCurrentNode =
|
|
1153
|
+
var oCurrentNode = oPatcher.getCurrentNode();
|
|
1009
1154
|
|
|
1010
1155
|
// execute the control renderer with DOM rendering interface
|
|
1011
1156
|
oRenderer.render(oDomInterface, oControl);
|
|
1012
1157
|
|
|
1013
1158
|
// during the rendering the cursor of the Patcher should move to the next element when openStart or voidStart is called
|
|
1014
1159
|
// compare after rendering cursor with before rendering cursor to determine whether the control produced any output
|
|
1015
|
-
if (
|
|
1160
|
+
if (oPatcher.getCurrentNode() == oCurrentNode) {
|
|
1016
1161
|
|
|
1017
1162
|
// we need to remove the control DOM if there is no output produced
|
|
1018
|
-
|
|
1163
|
+
oPatcher.unsafeHtml("", oControl.getId());
|
|
1019
1164
|
oControl.bOutput = false;
|
|
1020
1165
|
} else {
|
|
1021
1166
|
oControl.bOutput = true;
|
|
@@ -1038,7 +1183,7 @@ sap.ui.define([
|
|
|
1038
1183
|
|
|
1039
1184
|
// at the end of the rendering apply the rendering buffer of the control that is forced to render string interface
|
|
1040
1185
|
if (sLegacyRendererControlId && sLegacyRendererControlId === oControl.getId()) {
|
|
1041
|
-
|
|
1186
|
+
oPatcher.unsafeHtml(aBuffer.join(""), sLegacyRendererControlId, restoreStyles);
|
|
1042
1187
|
sLegacyRendererControlId = "";
|
|
1043
1188
|
bDomInterface = true;
|
|
1044
1189
|
aBuffer = [];
|
|
@@ -1083,7 +1228,7 @@ sap.ui.define([
|
|
|
1083
1228
|
*
|
|
1084
1229
|
* @param {sap.ui.core.Control}
|
|
1085
1230
|
* oControl the Control whose HTML should be returned.
|
|
1086
|
-
* @
|
|
1231
|
+
* @returns {string} the resulting HTML of the provided control
|
|
1087
1232
|
* @deprecated Since version 0.15.0. Use <code>flush()</code> instead render content outside the rendering phase.
|
|
1088
1233
|
* @public
|
|
1089
1234
|
*/
|
|
@@ -1155,15 +1300,52 @@ sap.ui.define([
|
|
|
1155
1300
|
}
|
|
1156
1301
|
}
|
|
1157
1302
|
|
|
1158
|
-
function flushInternal(fnPutIntoDom, fnDone) {
|
|
1303
|
+
function flushInternal(fnPutIntoDom, fnDone, oTargetDomNode) {
|
|
1159
1304
|
|
|
1160
1305
|
var oStoredFocusInfo;
|
|
1161
1306
|
if (!bDomInterface) {
|
|
1307
|
+
// DOM-based rendering was not possible we are in the string-based initial rendering or re-rendering phase
|
|
1162
1308
|
oStoredFocusInfo = oFocusHandler && oFocusHandler.getControlFocusInfo();
|
|
1163
|
-
|
|
1309
|
+
var sHtml = aBuffer.join("");
|
|
1310
|
+
if (sHtml && aRenderingStyles.length) {
|
|
1311
|
+
// During the string-based rendering, RM#writeStyles method is not writing the styles into the HTML buffer due to possible CSP restrictions.
|
|
1312
|
+
// Instead, we store the styles in the aRenderingStyles array and add an ATTR_STYLE_KEY_MARKER attribute marker for which the value
|
|
1313
|
+
// references the original style index in this array.
|
|
1314
|
+
// Not to violate the CSP, we need to bring the original styles via HTMLElement.style API. Here we are converting the HTML buffer of
|
|
1315
|
+
// string-based rendering to DOM nodes so that we can restore the orginal styles before we inject the rendering output to the DOM tree.
|
|
1316
|
+
if (oTargetDomNode instanceof SVGElement && oTargetDomNode.localName != "foreignObject") {
|
|
1317
|
+
oTemplate.innerHTML = "<svg>" + sHtml + "</svg>";
|
|
1318
|
+
oTemplate.replaceWith.apply(oTemplate.content.firstChild, oTemplate.content.firstChild.childNodes);
|
|
1319
|
+
} else {
|
|
1320
|
+
oTemplate.innerHTML = sHtml;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
restoreStyles(oTemplate.content.childNodes);
|
|
1324
|
+
fnPutIntoDom(oTemplate.content);
|
|
1325
|
+
} else {
|
|
1326
|
+
fnPutIntoDom(sHtml);
|
|
1327
|
+
}
|
|
1164
1328
|
} else {
|
|
1165
|
-
|
|
1166
|
-
|
|
1329
|
+
// get the root node of the Patcher to determine whether we are in the initial rendering or the re-rendering phase
|
|
1330
|
+
var oRootNode = oPatcher.getRootNode();
|
|
1331
|
+
|
|
1332
|
+
// in case of DOM-based initial rendering, the Patcher creates a DocumentFragment to assemble all created control DOM nodes within it
|
|
1333
|
+
if (oRootNode.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) {
|
|
1334
|
+
// even though we are in the initial rendering phase a control within the control tree might has been already rendered before
|
|
1335
|
+
// therefore we need to store the currectly focused control info before we inject the DocumentFragment into the real DOM tree
|
|
1336
|
+
oStoredFocusInfo = oFocusHandler && oFocusHandler.getControlFocusInfo();
|
|
1337
|
+
|
|
1338
|
+
// controls are not necessarily need to produce output during their rendering
|
|
1339
|
+
// in case of output is produced, let the callback injects the DocumentFragment
|
|
1340
|
+
fnPutIntoDom(oRootNode.lastChild ? oRootNode : "");
|
|
1341
|
+
} else {
|
|
1342
|
+
// in case of DOM-based re-rendering, the root node of the Patcher must be an existing HTMLElement
|
|
1343
|
+
// since the re-rendering happens during the control renderer APIs are executed here we get the stored focus info before the patching
|
|
1344
|
+
oStoredFocusInfo = oFocusHandler && oFocusHandler.getPatchingControlFocusInfo();
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
// make the Patcher ready for the next patching
|
|
1348
|
+
oPatcher.reset();
|
|
1167
1349
|
}
|
|
1168
1350
|
|
|
1169
1351
|
finalizeRendering(oStoredFocusInfo);
|
|
@@ -1177,6 +1359,34 @@ sap.ui.define([
|
|
|
1177
1359
|
}
|
|
1178
1360
|
}
|
|
1179
1361
|
|
|
1362
|
+
function restoreStyle(oElement, iDomIndex) {
|
|
1363
|
+
var sStyleIndex = oElement.getAttribute(ATTR_STYLE_KEY_MARKER);
|
|
1364
|
+
if (sStyleIndex != iDomIndex) {
|
|
1365
|
+
return 0;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
oElement.style = aRenderingStyles[iDomIndex];
|
|
1369
|
+
oElement.removeAttribute(ATTR_STYLE_KEY_MARKER);
|
|
1370
|
+
return 1;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
function restoreStyles(aDomNodes) {
|
|
1374
|
+
if (!aRenderingStyles.length) {
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
var iDomIndex = 0;
|
|
1379
|
+
aDomNodes.forEach(function(oDomNode) {
|
|
1380
|
+
if (oDomNode.nodeType == 1 /* Node.ELEMENT_NODE */) {
|
|
1381
|
+
iDomIndex += restoreStyle(oDomNode, iDomIndex);
|
|
1382
|
+
oDomNode.querySelectorAll("[" + ATTR_STYLE_KEY_MARKER + "]").forEach(function(oElement) {
|
|
1383
|
+
iDomIndex += restoreStyle(oElement, iDomIndex);
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
aRenderingStyles = [];
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1180
1390
|
/**
|
|
1181
1391
|
* Renders the content of the rendering buffer into the provided DOM node.
|
|
1182
1392
|
*
|
|
@@ -1219,7 +1429,7 @@ sap.ui.define([
|
|
|
1219
1429
|
RenderManager.preserveContent(oTargetDomNode);
|
|
1220
1430
|
}
|
|
1221
1431
|
|
|
1222
|
-
flushInternal(function(
|
|
1432
|
+
flushInternal(function(vHTML) {
|
|
1223
1433
|
|
|
1224
1434
|
for (var i = 0; i < aRenderedControls.length; i++) {
|
|
1225
1435
|
//TODO It would be enough to loop over the controls for which renderControl was initially called but for this
|
|
@@ -1235,24 +1445,24 @@ sap.ui.define([
|
|
|
1235
1445
|
}
|
|
1236
1446
|
if (typeof vInsert === "number") {
|
|
1237
1447
|
if (vInsert <= 0) { // new HTML should be inserted at the beginning
|
|
1238
|
-
|
|
1448
|
+
insertAdjacent(oTargetDomNode, "prepend", vHTML);
|
|
1239
1449
|
} else { // new element should be inserted at a certain position > 0
|
|
1240
|
-
var
|
|
1241
|
-
if (
|
|
1450
|
+
var oPredecessor = oTargetDomNode.children[vInsert - 1]; // find the element which should be directly before the new one
|
|
1451
|
+
if (oPredecessor) {
|
|
1242
1452
|
// element found - put the HTML in after this element
|
|
1243
|
-
|
|
1453
|
+
insertAdjacent(oPredecessor, "after", vHTML);
|
|
1244
1454
|
} else {
|
|
1245
1455
|
// element not found (this should not happen when properly used), append the new HTML
|
|
1246
|
-
|
|
1456
|
+
insertAdjacent(oTargetDomNode, "append", vHTML);
|
|
1247
1457
|
}
|
|
1248
1458
|
}
|
|
1249
1459
|
} else if (!vInsert) {
|
|
1250
|
-
jQuery(oTargetDomNode).html(
|
|
1460
|
+
jQuery(oTargetDomNode).html(vHTML); // Put the HTML into the given DOM Node
|
|
1251
1461
|
} else {
|
|
1252
|
-
|
|
1462
|
+
insertAdjacent(oTargetDomNode, "append", vHTML); // Append the HTML into the given DOM Node
|
|
1253
1463
|
}
|
|
1254
1464
|
|
|
1255
|
-
}, fnDone);
|
|
1465
|
+
}, fnDone, oTargetDomNode);
|
|
1256
1466
|
|
|
1257
1467
|
};
|
|
1258
1468
|
|
|
@@ -1288,7 +1498,7 @@ sap.ui.define([
|
|
|
1288
1498
|
// FIXME: MULTIPLE ROOTS
|
|
1289
1499
|
// The implementation of this method doesn't support multiple roots for a control.
|
|
1290
1500
|
// Affects all places where 'oldDomNode' is used
|
|
1291
|
-
flushInternal(function(
|
|
1501
|
+
flushInternal(function(vHTML) {
|
|
1292
1502
|
|
|
1293
1503
|
if (oControl && oTargetDomNode) {
|
|
1294
1504
|
|
|
@@ -1300,15 +1510,6 @@ sap.ui.define([
|
|
|
1300
1510
|
|
|
1301
1511
|
var bNewTarget = oldDomNode && oldDomNode.parentNode != oTargetDomNode;
|
|
1302
1512
|
|
|
1303
|
-
var fAppend = function(){
|
|
1304
|
-
var jTarget = jQuery(oTargetDomNode);
|
|
1305
|
-
if (oTargetDomNode.innerHTML == "") {
|
|
1306
|
-
jTarget.html(sHTML);
|
|
1307
|
-
} else {
|
|
1308
|
-
jTarget.append(sHTML);
|
|
1309
|
-
}
|
|
1310
|
-
};
|
|
1311
|
-
|
|
1312
1513
|
if (bNewTarget) { //Control was rendered already and is now moved to different location
|
|
1313
1514
|
|
|
1314
1515
|
if (!RenderManager.isPreservedContent(oldDomNode)) {
|
|
@@ -1319,21 +1520,22 @@ sap.ui.define([
|
|
|
1319
1520
|
}
|
|
1320
1521
|
}
|
|
1321
1522
|
|
|
1322
|
-
if (
|
|
1323
|
-
|
|
1523
|
+
if (vHTML) {
|
|
1524
|
+
insertAdjacent(oTargetDomNode, "append", vHTML);
|
|
1324
1525
|
}
|
|
1325
1526
|
|
|
1326
1527
|
} else { //Control either rendered initially or rerendered at the same location
|
|
1327
1528
|
|
|
1328
|
-
if (
|
|
1529
|
+
if (vHTML) {
|
|
1329
1530
|
if (oldDomNode) {
|
|
1330
1531
|
if (RenderManager.isInlineTemplate(oldDomNode)) {
|
|
1331
|
-
jQuery(oldDomNode).html(
|
|
1532
|
+
jQuery(oldDomNode).html(vHTML);
|
|
1332
1533
|
} else {
|
|
1333
|
-
|
|
1534
|
+
insertAdjacent(oldDomNode, "after", vHTML);
|
|
1535
|
+
jQuery(oldDomNode).remove();
|
|
1334
1536
|
}
|
|
1335
1537
|
} else {
|
|
1336
|
-
|
|
1538
|
+
insertAdjacent(oTargetDomNode, "append", vHTML);
|
|
1337
1539
|
}
|
|
1338
1540
|
} else {
|
|
1339
1541
|
if (RenderManager.isInlineTemplate(oldDomNode)) {
|
|
@@ -1352,7 +1554,7 @@ sap.ui.define([
|
|
|
1352
1554
|
}
|
|
1353
1555
|
|
|
1354
1556
|
}
|
|
1355
|
-
}, fnDone);
|
|
1557
|
+
}, fnDone, oTargetDomNode);
|
|
1356
1558
|
};
|
|
1357
1559
|
|
|
1358
1560
|
/**
|
|
@@ -1388,7 +1590,7 @@ sap.ui.define([
|
|
|
1388
1590
|
/**
|
|
1389
1591
|
* Returns the public interface of the RenderManager which can be used by Renderers.
|
|
1390
1592
|
*
|
|
1391
|
-
* @
|
|
1593
|
+
* @returns {sap.ui.base.Interface} the interface
|
|
1392
1594
|
* @private
|
|
1393
1595
|
*/
|
|
1394
1596
|
this.getRendererInterface = function() {
|
|
@@ -1405,8 +1607,9 @@ sap.ui.define([
|
|
|
1405
1607
|
/**
|
|
1406
1608
|
* Returns the configuration object
|
|
1407
1609
|
* Shortcut for <code>sap.ui.getCore().getConfiguration()</code>
|
|
1408
|
-
* @
|
|
1610
|
+
* @returns {sap.ui.core.Configuration} the configuration object
|
|
1409
1611
|
* @public
|
|
1612
|
+
* @deprecated Since 1.92. Instead, use the {@link sap.ui.core.Core#getConfiguration} API.
|
|
1410
1613
|
*/
|
|
1411
1614
|
RenderManager.prototype.getConfiguration = function() {
|
|
1412
1615
|
return sap.ui.getCore().getConfiguration();
|
|
@@ -1423,7 +1626,7 @@ sap.ui.define([
|
|
|
1423
1626
|
|
|
1424
1627
|
/**
|
|
1425
1628
|
* @deprecated As of version 1.1, never has been implemented - DO NOT USE
|
|
1426
|
-
* @
|
|
1629
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
1427
1630
|
* @public
|
|
1428
1631
|
*/
|
|
1429
1632
|
RenderManager.prototype.writeAcceleratorKey = function() {
|
|
@@ -1442,8 +1645,10 @@ sap.ui.define([
|
|
|
1442
1645
|
* Writes the controls data into the HTML.
|
|
1443
1646
|
* Control Data consists at least of the id of a control
|
|
1444
1647
|
* @param {sap.ui.core.Control} oControl the control whose identifying information should be written to the buffer
|
|
1445
|
-
* @
|
|
1648
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
1446
1649
|
* @public
|
|
1650
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#openStart} or {@link sap.ui.core.RenderManager#voidStart}
|
|
1651
|
+
* of the {@link sap.ui.core.RenderManager Semantic Rendering API} and pass the desired control data as the second parameter to the new API.
|
|
1447
1652
|
*/
|
|
1448
1653
|
RenderManager.prototype.writeControlData = function(oControl) {
|
|
1449
1654
|
assert(oControl && BaseObject.isA(oControl, 'sap.ui.core.Control'), "oControl must be an sap.ui.core.Control");
|
|
@@ -1455,8 +1660,10 @@ sap.ui.define([
|
|
|
1455
1660
|
* Writes the elements data into the HTML.
|
|
1456
1661
|
* Element Data consists at least of the id of an element
|
|
1457
1662
|
* @param {sap.ui.core.Element} oElement the element whose identifying information should be written to the buffer
|
|
1458
|
-
* @
|
|
1663
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
1459
1664
|
* @public
|
|
1665
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#openStart} or {@link sap.ui.core.RenderManager#voidStart}
|
|
1666
|
+
* of the {@link sap.ui.core.RenderManager Semantic Rendering API} and pass the desired element data as the second parameter to the new API.
|
|
1460
1667
|
*/
|
|
1461
1668
|
RenderManager.prototype.writeElementData = function(oElement) {
|
|
1462
1669
|
assert(oElement && BaseObject.isA(oElement, 'sap.ui.core.Element'), "oElement must be an sap.ui.core.Element");
|
|
@@ -1501,14 +1708,14 @@ sap.ui.define([
|
|
|
1501
1708
|
* value for the <code>aria-required</code> attribute.
|
|
1502
1709
|
*
|
|
1503
1710
|
* Additionally, the associations <code>ariaDescribedBy</code> and <code>ariaLabelledBy</code> are used to
|
|
1504
|
-
* determine the lists of
|
|
1711
|
+
* determine the lists of IDs for the ARIA attributes <code>aria-describedby</code> and
|
|
1505
1712
|
* <code>aria-labelledby</code>.
|
|
1506
1713
|
*
|
|
1507
1714
|
* Label controls that reference the given element in their <code>labelFor</code> relation are automatically
|
|
1508
1715
|
* added to the <code>aria-labelledby</code> attributes.
|
|
1509
1716
|
*
|
|
1510
1717
|
* Note: This function is only a heuristic of a control property to ARIA attribute mapping. Control developers
|
|
1511
|
-
* have to check whether it fulfills their requirements. In case of problems (for example the RadioButton has a
|
|
1718
|
+
* have to check whether it fulfills their requirements. In case of problems (for example the <code>RadioButton</code> has a
|
|
1512
1719
|
* <code>selected</code> property but must provide an <code>aria-checked</code> attribute) the auto-generated
|
|
1513
1720
|
* result of this function can be influenced via the parameter <code>mProps</code> as described below.
|
|
1514
1721
|
*
|
|
@@ -1535,8 +1742,9 @@ sap.ui.define([
|
|
|
1535
1742
|
* [oElement] The <code>Element</code> whose accessibility state should be rendered
|
|
1536
1743
|
* @param {object}
|
|
1537
1744
|
* [mProps] A map of additional properties that should be added or changed.
|
|
1538
|
-
* @
|
|
1745
|
+
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
1539
1746
|
* @public
|
|
1747
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#accessibilityState} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
1540
1748
|
*/
|
|
1541
1749
|
RenderManager.prototype.writeAccessibilityState = function(oElement, mProps) {
|
|
1542
1750
|
if (!sap.ui.getCore().getConfiguration().getAccessibility()) {
|
|
@@ -1655,6 +1863,7 @@ sap.ui.define([
|
|
|
1655
1863
|
* @param {object} [mAttributes] Additional attributes that will be added to the rendered tag
|
|
1656
1864
|
* @returns {this} Reference to <code>this</code> in order to allow method chaining
|
|
1657
1865
|
* @public
|
|
1866
|
+
* @deprecated Since 1.92. Instead use {@link sap.ui.core.RenderManager#icon} of the {@link sap.ui.core.RenderManager Semantic Rendering API}.
|
|
1658
1867
|
*/
|
|
1659
1868
|
RenderManager.prototype.writeIcon = function(sURI, aClasses, mAttributes){
|
|
1660
1869
|
var IconPool = sap.ui.requireSync("sap/ui/core/IconPool"),
|
|
@@ -1765,7 +1974,7 @@ sap.ui.define([
|
|
|
1765
1974
|
* Returns the renderer class for a given control instance
|
|
1766
1975
|
*
|
|
1767
1976
|
* @param {sap.ui.core.Control} oControl the control that should be rendered
|
|
1768
|
-
* @
|
|
1977
|
+
* @returns {object} the renderer class for a given control instance
|
|
1769
1978
|
* @public
|
|
1770
1979
|
*/
|
|
1771
1980
|
RenderManager.prototype.getRenderer = function(oControl) {
|
|
@@ -1820,7 +2029,7 @@ sap.ui.define([
|
|
|
1820
2029
|
* @param {sap.ui.core.Control}
|
|
1821
2030
|
* oControl the control that should be rendered
|
|
1822
2031
|
* @type function
|
|
1823
|
-
* @
|
|
2032
|
+
* @returns {object} the renderer class for a given control instance
|
|
1824
2033
|
* @static
|
|
1825
2034
|
* @public
|
|
1826
2035
|
*/
|
|
@@ -2040,7 +2249,7 @@ sap.ui.define([
|
|
|
2040
2249
|
// a move to the preserveArea will modify the sibling relationship!
|
|
2041
2250
|
candidate = next;
|
|
2042
2251
|
next = next.nextSibling;
|
|
2043
|
-
if ( candidate.nodeType === 1 /* Node.
|
|
2252
|
+
if ( candidate.nodeType === 1 /* Node.ELEMENT_NODE */ ) {
|
|
2044
2253
|
check(candidate);
|
|
2045
2254
|
}
|
|
2046
2255
|
}
|
|
@@ -2063,7 +2272,7 @@ sap.ui.define([
|
|
|
2063
2272
|
* Searches "to-be-preserved" nodes for the given control id.
|
|
2064
2273
|
*
|
|
2065
2274
|
* @param {string} sId control id to search content for.
|
|
2066
|
-
* @
|
|
2275
|
+
* @returns {jQuery} a jQuery collection representing the found content
|
|
2067
2276
|
* @public
|
|
2068
2277
|
* @static
|
|
2069
2278
|
*/
|
|
@@ -2090,7 +2299,7 @@ sap.ui.define([
|
|
|
2090
2299
|
* Checks whether the given DOM element is part of the 'preserve' area.
|
|
2091
2300
|
*
|
|
2092
2301
|
* @param {Element} oElement DOM element to check
|
|
2093
|
-
* @
|
|
2302
|
+
* @returns {boolean} Whether element is part of 'preserve' area
|
|
2094
2303
|
* @private
|
|
2095
2304
|
* @static
|
|
2096
2305
|
*/
|
|
@@ -2101,7 +2310,7 @@ sap.ui.define([
|
|
|
2101
2310
|
/**
|
|
2102
2311
|
* Returns the hidden area reference belonging to the current window instance.
|
|
2103
2312
|
*
|
|
2104
|
-
* @
|
|
2313
|
+
* @returns {Element} The hidden area reference belonging to the current window instance.
|
|
2105
2314
|
* @public
|
|
2106
2315
|
* @static
|
|
2107
2316
|
*/
|
|
@@ -2126,7 +2335,7 @@ sap.ui.define([
|
|
|
2126
2335
|
* Checks whether the given DOM node is an 'inline template' area.
|
|
2127
2336
|
*
|
|
2128
2337
|
* @param {Element} oDomNode dom node which is checked
|
|
2129
|
-
* @
|
|
2338
|
+
* @returns {boolean} whether node is an 'inline template' area
|
|
2130
2339
|
* @private
|
|
2131
2340
|
* @static
|
|
2132
2341
|
*/
|
|
@@ -2140,7 +2349,7 @@ sap.ui.define([
|
|
|
2140
2349
|
* The inherited <code>apiVersion</code> value is not taken into account, <code>apiVersion</code> must be defined explicitly as an own property of the renderer.
|
|
2141
2350
|
*
|
|
2142
2351
|
* @param {sap.ui.core.Renderer} oRenderer The renderer of the control
|
|
2143
|
-
* @
|
|
2352
|
+
* @returns {int} API version of the Renderer
|
|
2144
2353
|
* @private
|
|
2145
2354
|
* @static
|
|
2146
2355
|
*/
|
|
@@ -2168,6 +2377,10 @@ sap.ui.define([
|
|
|
2168
2377
|
var sId = oElement.getId();
|
|
2169
2378
|
oRm.attr("data-sap-ui", sId);
|
|
2170
2379
|
|
|
2380
|
+
if (oElement.__slot) {
|
|
2381
|
+
oRm.attr("slot", oElement.__slot);
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2171
2384
|
// render custom data
|
|
2172
2385
|
oElement.getCustomData().forEach(function(oData) {
|
|
2173
2386
|
var oCheckResult = oData._checkWriteToDom(oElement);
|
|
@@ -2199,6 +2412,33 @@ sap.ui.define([
|
|
|
2199
2412
|
return this;
|
|
2200
2413
|
}
|
|
2201
2414
|
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* Inserts a given Node or HTML string at a given position relative to the provided HTML element.
|
|
2419
|
+
*
|
|
2420
|
+
* <!-- before : beforebegin -->
|
|
2421
|
+
* <p>
|
|
2422
|
+
* <!-- prepend : afterbegin -->
|
|
2423
|
+
* foo
|
|
2424
|
+
* <!-- append : beforeend -->
|
|
2425
|
+
* </p>
|
|
2426
|
+
* <!-- after : afterend -->
|
|
2427
|
+
*
|
|
2428
|
+
* @param {HTMLElement} oElement The reference HTML element which the API is invoked upon
|
|
2429
|
+
* @param {string} sPosition The insertion position "before", "after", "append", "prepend"
|
|
2430
|
+
* @param {string|Node} vHTMLorNode The Node or HTML string to be inserted
|
|
2431
|
+
* @private
|
|
2432
|
+
*/
|
|
2433
|
+
var mAdjacentMap = { before: "beforebegin", prepend: "afterbegin", append: "beforeend", after: "afterend" };
|
|
2434
|
+
function insertAdjacent(oElement, sPosition, vHTMLorNode) {
|
|
2435
|
+
if (typeof vHTMLorNode == "string") {
|
|
2436
|
+
oElement.insertAdjacentHTML(mAdjacentMap[sPosition], vHTMLorNode);
|
|
2437
|
+
} else {
|
|
2438
|
+
oElement[sPosition](vHTMLorNode);
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2202
2442
|
return RenderManager;
|
|
2203
2443
|
|
|
2204
2444
|
}, true);
|