@openui5/sap.ui.core 1.93.3 → 1.96.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 +13 -2
- package/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +1 -1
- package/src/jquery.sap.global.js +5 -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 +3 -3
- package/src/jquery.sap.stubs.js +2 -1
- package/src/jquery.sap.trace.js +2 -1
- package/src/sap/base/i18n/ResourceBundle.js +6 -2
- package/src/sap/base/strings/whitespaceReplacer.js +52 -0
- 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 +37 -42
- package/src/sap/ui/Global.js +8 -7
- package/src/sap/ui/base/DataType.js +14 -8
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +9 -6
- package/src/sap/ui/base/Interface.js +3 -49
- package/src/sap/ui/base/ManagedObject.js +12 -7
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +49 -4
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/base/syncXHRFix.js +2 -1
- package/src/sap/ui/core/.library +5 -5
- package/src/sap/ui/core/AppCacheBuster.js +4 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -11
- package/src/sap/ui/core/Component.js +300 -140
- package/src/sap/ui/core/ComponentContainer.js +24 -8
- package/src/sap/ui/core/ComponentMetadata.js +14 -3
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +67 -31
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +103 -25
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +35 -260
- package/src/sap/ui/core/DeclarativeSupport.js +3 -2
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +4 -2
- package/src/sap/ui/core/EnabledPropagator.js +91 -73
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +7 -14
- package/src/sap/ui/core/Fragment.js +30 -32
- 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 +7 -8
- package/src/sap/ui/core/IconPool.js +26 -1097
- package/src/sap/ui/core/IconRenderer.js +6 -6
- 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 +1 -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 +26 -4
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +4 -61
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +27 -3
- package/src/sap/ui/core/Placeholder.js +28 -15
- package/src/sap/ui/core/RenderManager.js +36 -6
- package/src/sap/ui/core/Renderer.js +13 -3
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +2 -2
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
- 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 +1 -1
- package/src/sap/ui/core/UIComponent.js +42 -16
- 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 +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
- package/src/sap/ui/core/XMLTemplateProcessor.js +116 -41
- package/src/sap/ui/core/_IconRegistry.js +1148 -0
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +6 -3
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +2 -2
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +16 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +73 -221
- package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +11 -10
- package/src/sap/ui/core/library.js +3 -3
- 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 -15
- 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_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +1 -1
- package/src/sap/ui/core/messagebundle_pl.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +2 -2
- package/src/sap/ui/core/mvc/Controller.js +38 -19
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
- package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
- package/src/sap/ui/core/mvc/HTMLView.js +2 -2
- package/src/sap/ui/core/mvc/JSONView.js +2 -2
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +2 -2
- package/src/sap/ui/core/mvc/View.js +58 -85
- package/src/sap/ui/core/mvc/XMLView.js +2 -2
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +17 -20
- 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/History.js +10 -2
- package/src/sap/ui/core/routing/Router.js +8 -1
- package/src/sap/ui/core/routing/Target.js +13 -0
- package/src/sap/ui/core/routing/Targets.js +13 -2
- package/src/sap/ui/core/routing/async/Route.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +353 -259
- 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/BootSupportTool.js +11 -0
- package/src/sap/ui/core/support/InteractionTree.css +4 -0
- 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/ViewInfo.css +599 -0
- package/src/sap/ui/core/support/controls/InteractionTree.js +352 -222
- package/src/sap/ui/core/support/controls/ObjectViewer.js +3 -41
- package/src/sap/ui/core/support/controls/TimelineOverview.js +49 -24
- package/src/sap/ui/core/support/controls/TreeViewer.js +12 -58
- package/src/sap/ui/core/support/plugins/ControlTree.js +59 -68
- package/src/sap/ui/core/support/plugins/Debugging.js +9 -11
- package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +147 -75
- package/src/sap/ui/core/support/plugins/Selector.js +19 -24
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -5
- package/src/sap/ui/core/support/plugins/Trace.js +95 -32
- package/src/sap/ui/core/support/plugins/ViewInfo.js +9 -73
- package/src/sap/ui/core/support/support.css +109 -14
- package/src/sap/ui/core/support/support.html +6 -2
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +149 -72
- package/src/sap/ui/core/themes/base/Icon.less +9 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +6 -4
- 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 +10 -28
- package/src/sap/ui/core/tmpl/TemplateControl.js +4 -4
- package/src/sap/ui/core/tmpl/_parsePath.js +35 -0
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/DraftEnabledMockServer.js +9 -4
- 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 +5 -5
- package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +3 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +136 -63
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +170 -153
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +424 -293
- 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 +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 +10 -4
- package/src/sap/ui/debug/DebugEnv.js +3 -4
- package/src/sap/ui/debug/Highlighter.js +8 -2
- package/src/sap/ui/debug/PropertyList.css +55 -0
- package/src/sap/ui/debug/PropertyList.js +111 -182
- package/src/sap/ui/model/Binding.js +174 -118
- package/src/sap/ui/model/ClientContextBinding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +1 -3
- package/src/sap/ui/model/ClientModel.js +4 -4
- package/src/sap/ui/model/ClientPropertyBinding.js +4 -2
- package/src/sap/ui/model/ClientTreeBinding.js +15 -9
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +28 -23
- package/src/sap/ui/model/CompositeBinding.js +98 -77
- package/src/sap/ui/model/CompositeDataState.js +2 -2
- package/src/sap/ui/model/CompositeType.js +2 -2
- package/src/sap/ui/model/Context.js +4 -2
- package/src/sap/ui/model/ContextBinding.js +6 -14
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/Filter.js +255 -53
- package/src/sap/ui/model/FilterOperator.js +1 -1
- package/src/sap/ui/model/FilterProcessor.js +27 -17
- package/src/sap/ui/model/FilterType.js +1 -1
- package/src/sap/ui/model/ListBinding.js +180 -117
- package/src/sap/ui/model/MetaModel.js +4 -9
- package/src/sap/ui/model/Model.js +345 -294
- package/src/sap/ui/model/PropertyBinding.js +92 -58
- package/src/sap/ui/model/SelectionModel.js +2 -2
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +1 -1
- package/src/sap/ui/model/SorterProcessor.js +1 -1
- package/src/sap/ui/model/StaticBinding.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
- package/src/sap/ui/model/TreeBinding.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +251 -100
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
- package/src/sap/ui/model/TreeBindingUtils.js +1 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +8 -4
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +34 -25
- package/src/sap/ui/model/base/ManagedObjectModel.js +4 -0
- package/src/sap/ui/model/json/JSONListBinding.js +8 -5
- package/src/sap/ui/model/json/JSONModel.js +24 -15
- package/src/sap/ui/model/json/JSONPropertyBinding.js +4 -3
- package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +6 -3
- package/src/sap/ui/model/message/MessageModel.js +23 -15
- package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
- package/src/sap/ui/model/odata/CountMode.js +1 -1
- package/src/sap/ui/model/odata/Filter.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +5 -3
- package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
- package/src/sap/ui/model/odata/ODataModel.js +8 -7
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +2 -2
- package/src/sap/ui/model/odata/ODataUtils.js +13 -11
- package/src/sap/ui/model/odata/OperationMode.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -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/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 +81 -9
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +3 -3
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +39 -49
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +236 -73
- package/src/sap/ui/model/odata/v2/ODataModel.js +314 -164
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +110 -97
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +129 -0
- package/src/sap/ui/model/odata/v4/Context.js +6 -3
- package/src/sap/ui/model/odata/v4/ODataBinding.js +5 -6
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +117 -40
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +95 -15
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +44 -31
- package/src/sap/ui/model/odata/v4/ODataModel.js +86 -78
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +47 -28
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -7
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +8 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +24 -16
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +32 -30
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +52 -17
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
- package/src/sap/ui/model/resource/ResourceModel.js +6 -2
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +2 -2
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +9 -3
- package/src/sap/ui/model/type/DateInterval.js +4 -2
- package/src/sap/ui/model/type/DateTime.js +2 -2
- package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
- package/src/sap/ui/model/type/FileSize.js +4 -2
- package/src/sap/ui/model/type/Float.js +4 -2
- package/src/sap/ui/model/type/Integer.js +4 -2
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +2 -2
- package/src/sap/ui/model/type/TimeInterval.js +2 -2
- package/src/sap/ui/model/type/Unit.js +14 -7
- package/src/sap/ui/model/xml/XMLListBinding.js +15 -9
- package/src/sap/ui/model/xml/XMLModel.js +70 -41
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +4 -4
- package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
- package/src/sap/ui/performance/trace/Interaction.js +30 -15
- package/src/sap/ui/performance/trace/initTraces.js +1 -1
- package/src/sap/ui/qunit/QUnitUtils.js +3 -2
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +9 -11
- package/src/sap/ui/test/TestUtils.js +11 -4
- package/src/sap/ui/test/actions/Drag.js +6 -2
- package/src/sap/ui/test/actions/Drop.js +6 -2
- package/src/sap/ui/test/actions/EnterText.js +6 -0
- package/src/sap/ui/test/actions/Press.js +6 -0
- package/src/sap/ui/test/actions/Scroll.js +6 -0
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +4 -4
- package/src/sap/ui/test/launchers/componentLauncher.js +0 -4
- package/src/sap/ui/test/matchers/I18NText.js +29 -11
- package/src/sap/ui/test/opaQunit.js +5 -0
- package/src/sap/ui/thirdparty/crossroads.js +6 -4
- package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
- package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
- package/src/sap/ui/thirdparty/jquery.js +9 -1
- package/src/sap/ui/thirdparty/qunit-2.js +1 -1
- package/src/sap/ui/thirdparty/qunit.js +1 -1
- package/src/sap/ui/util/Mobile.js +2 -20
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +16 -6
- package/src/sap-ui-core-nojQuery.js +1 -1
- package/src/sap-ui-core.js +1 -1
- package/src/sap-ui-debug.js +3 -17
- package/ui5.yaml +5 -2
- package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
|
@@ -16,7 +16,6 @@ sap.ui.define([
|
|
|
16
16
|
"sap/base/util/includes",
|
|
17
17
|
"sap/base/util/ObjectPath",
|
|
18
18
|
"sap/base/util/isPlainObject",
|
|
19
|
-
// needed to have sap.ui.xmlfragment
|
|
20
19
|
"sap/ui/core/Fragment"
|
|
21
20
|
], function(
|
|
22
21
|
BaseTreeModifier,
|
|
@@ -27,7 +26,8 @@ sap.ui.define([
|
|
|
27
26
|
EventHandlerResolver,
|
|
28
27
|
includes,
|
|
29
28
|
ObjectPath,
|
|
30
|
-
isPlainObject
|
|
29
|
+
isPlainObject,
|
|
30
|
+
Fragment
|
|
31
31
|
) {
|
|
32
32
|
|
|
33
33
|
"use strict";
|
|
@@ -85,7 +85,12 @@ sap.ui.define([
|
|
|
85
85
|
* @inheritDoc
|
|
86
86
|
*/
|
|
87
87
|
getStashed: function (oControl) {
|
|
88
|
-
return
|
|
88
|
+
return Promise.all([
|
|
89
|
+
XmlTreeModifier.getProperty(oControl, "stashed"),
|
|
90
|
+
XmlTreeModifier.getProperty(oControl, "visible")
|
|
91
|
+
]).then(function (aProperties) {
|
|
92
|
+
return !!aProperties[0] || !aProperties[1];
|
|
93
|
+
});
|
|
89
94
|
},
|
|
90
95
|
|
|
91
96
|
/**
|
|
@@ -125,35 +130,49 @@ sap.ui.define([
|
|
|
125
130
|
* @inheritDoc
|
|
126
131
|
*/
|
|
127
132
|
getProperty: function (oControl, sPropertyName) {
|
|
133
|
+
var oPropertyInfo;
|
|
134
|
+
var oType;
|
|
128
135
|
var vPropertyValue = oControl.getAttribute(sPropertyName);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
return XmlTreeModifier.getControlMetadata(oControl)
|
|
137
|
+
.then(function (oMetadata) {
|
|
138
|
+
oPropertyInfo = oMetadata.getProperty(sPropertyName);
|
|
139
|
+
if (oPropertyInfo) { //not a property like aggregation
|
|
140
|
+
oType = oPropertyInfo.getType();
|
|
141
|
+
if (
|
|
142
|
+
sPropertyName === "value"
|
|
143
|
+
&& XmlTreeModifier.getControlType(oControl) === "sap.ui.core.CustomData"
|
|
144
|
+
) {
|
|
145
|
+
return XmlTreeModifier.getProperty(oControl, "key")
|
|
146
|
+
.then(function (oKeyProperty) {
|
|
147
|
+
if (oKeyProperty === "sap-ui-custom-settings") {
|
|
148
|
+
oType = DataType.getType("object");
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return undefined;
|
|
154
|
+
})
|
|
155
|
+
.then(function () {
|
|
156
|
+
if (oPropertyInfo) {
|
|
157
|
+
if (vPropertyValue === null) {
|
|
158
|
+
vPropertyValue = oPropertyInfo.getDefaultValue() || oType.getDefaultValue();
|
|
148
159
|
} else {
|
|
149
|
-
|
|
160
|
+
// unescape binding like XMLTemplateProcessor
|
|
161
|
+
var vUnescaped = ManagedObject.bindingParser(vPropertyValue, undefined, true);
|
|
162
|
+
// if it is a binding, return undefined as it has to be handled differently
|
|
163
|
+
if (isPlainObject(vUnescaped)) {
|
|
164
|
+
if (vUnescaped.path || vUnescaped.parts) {
|
|
165
|
+
vPropertyValue = undefined;
|
|
166
|
+
} else {
|
|
167
|
+
vPropertyValue = vUnescaped;
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
vPropertyValue = oType.parseValue(vUnescaped || vPropertyValue);
|
|
171
|
+
}
|
|
150
172
|
}
|
|
151
|
-
} else {
|
|
152
|
-
vPropertyValue = oType.parseValue(vUnescaped || vPropertyValue);
|
|
153
173
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return vPropertyValue;
|
|
174
|
+
return vPropertyValue;
|
|
175
|
+
});
|
|
157
176
|
},
|
|
158
177
|
|
|
159
178
|
/**
|
|
@@ -185,6 +204,7 @@ sap.ui.define([
|
|
|
185
204
|
return vUnescaped;
|
|
186
205
|
}
|
|
187
206
|
}
|
|
207
|
+
return undefined;
|
|
188
208
|
},
|
|
189
209
|
|
|
190
210
|
/**
|
|
@@ -192,6 +212,7 @@ sap.ui.define([
|
|
|
192
212
|
*/
|
|
193
213
|
createAndAddCustomData: function(oControl, sCustomDataKey, sValue) {
|
|
194
214
|
oControl.setAttributeNS(CUSTOM_DATA_NS, "custom.data.via.modifier:" + sCustomDataKey, XmlTreeModifier._escapeCurlyBracketsInString(sValue));
|
|
215
|
+
return Promise.resolve();
|
|
195
216
|
},
|
|
196
217
|
|
|
197
218
|
/**
|
|
@@ -213,16 +234,19 @@ sap.ui.define([
|
|
|
213
234
|
if (sId) {
|
|
214
235
|
oNewElementNode.setAttribute("id", sId);
|
|
215
236
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
237
|
+
return Promise.resolve()
|
|
238
|
+
.then(function () {
|
|
239
|
+
if (mSettings) {
|
|
240
|
+
return XmlTreeModifier.applySettings(oNewElementNode, mSettings);
|
|
241
|
+
}
|
|
242
|
+
return undefined;
|
|
243
|
+
})
|
|
244
|
+
.then(function () {
|
|
245
|
+
return Promise.resolve(oNewElementNode);
|
|
246
|
+
});
|
|
220
247
|
} else {
|
|
221
248
|
oError = new Error("Can't create a control with duplicated ID " + sId);
|
|
222
|
-
|
|
223
|
-
return Promise.reject(oError);
|
|
224
|
-
}
|
|
225
|
-
throw oError;
|
|
249
|
+
return Promise.reject(oError);
|
|
226
250
|
}
|
|
227
251
|
},
|
|
228
252
|
|
|
@@ -230,27 +254,29 @@ sap.ui.define([
|
|
|
230
254
|
* @inheritDoc
|
|
231
255
|
*/
|
|
232
256
|
applySettings: function(oControl, mSettings) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
257
|
+
return XmlTreeModifier.getControlMetadata(oControl)
|
|
258
|
+
.then(function (oMetadata) {
|
|
259
|
+
var mMetadata = oMetadata.getJSONKeys();
|
|
260
|
+
Object.keys(mSettings).forEach(function(sKey) {
|
|
261
|
+
var oKeyInfo = mMetadata[sKey];
|
|
262
|
+
var vValue = mSettings[sKey];
|
|
263
|
+
switch (oKeyInfo._iKind) {
|
|
264
|
+
case 0: // PROPERTY
|
|
265
|
+
// Settings provided as property could have some bindings that needs to be resolved by the core
|
|
266
|
+
// and therefore they shouldn't be escaped by setProperty function. In opposite to the common
|
|
267
|
+
// setProperty functionality!
|
|
268
|
+
XmlTreeModifier._setProperty(oControl, sKey, vValue, false);
|
|
269
|
+
break;
|
|
270
|
+
// case 1: // SINGLE_AGGREGATION
|
|
271
|
+
// XmlTreeModifier.insertAggregation(oControl, sKey, vValue);
|
|
272
|
+
case 3: // SINGLE_ASSOCIATION
|
|
273
|
+
XmlTreeModifier.setAssociation(oControl, sKey, vValue);
|
|
274
|
+
break;
|
|
275
|
+
default:
|
|
276
|
+
throw new Error("Unsupported in applySettings on XMLTreeModifier: " + sKey);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
});
|
|
254
280
|
},
|
|
255
281
|
|
|
256
282
|
/**
|
|
@@ -262,10 +288,10 @@ sap.ui.define([
|
|
|
262
288
|
if (oView) {
|
|
263
289
|
if (oView.ownerDocument && oView.ownerDocument.getElementById && oView.ownerDocument.getElementById(sId)) {
|
|
264
290
|
return oView.ownerDocument.getElementById(sId);
|
|
265
|
-
} else {
|
|
266
|
-
return oView.querySelector("[id='" + sId + "']");
|
|
267
291
|
}
|
|
292
|
+
return oView.querySelector("[id='" + sId + "']");
|
|
268
293
|
}
|
|
294
|
+
return undefined;
|
|
269
295
|
},
|
|
270
296
|
|
|
271
297
|
/**
|
|
@@ -324,111 +350,145 @@ sap.ui.define([
|
|
|
324
350
|
* @inheritDoc
|
|
325
351
|
*/
|
|
326
352
|
getAllAggregations: function (oControl) {
|
|
327
|
-
|
|
328
|
-
|
|
353
|
+
return XmlTreeModifier.getControlMetadata(oControl)
|
|
354
|
+
.then(function (oControlMetadata) {
|
|
355
|
+
return oControlMetadata.getAllAggregations();
|
|
356
|
+
});
|
|
329
357
|
},
|
|
330
358
|
|
|
331
359
|
/**
|
|
332
360
|
* @inheritDoc
|
|
333
361
|
*/
|
|
334
362
|
getAggregation: function (oParent, sName) {
|
|
335
|
-
var oAggregationNode = XmlTreeModifier._findAggregationNode(oParent, sName);
|
|
336
|
-
var bSingleValueAggregation = XmlTreeModifier._isSingleValueAggregation(oParent, sName);
|
|
337
363
|
var aChildren = [];
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
364
|
+
var bSingleValueAggregation;
|
|
365
|
+
return XmlTreeModifier._isSingleValueAggregation(oParent, sName)
|
|
366
|
+
.then(function (bSingleValueAggregationReturn) {
|
|
367
|
+
bSingleValueAggregation = bSingleValueAggregationReturn;
|
|
368
|
+
return XmlTreeModifier._findAggregationNode(oParent, sName);
|
|
369
|
+
})
|
|
370
|
+
.then(function (oAggregationNode) {
|
|
371
|
+
if (oAggregationNode) {
|
|
372
|
+
return XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode)
|
|
373
|
+
.then(function (aChildrenLocal) {
|
|
374
|
+
aChildren = aChildrenLocal;
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
return XmlTreeModifier._isAltTypeAggregation(oParent, sName)
|
|
378
|
+
.then(function (isAltTypeAggregation) {
|
|
379
|
+
if (isAltTypeAggregation && bSingleValueAggregation) {
|
|
380
|
+
return XmlTreeModifier.getProperty(oParent, sName)
|
|
381
|
+
.then(function (oChild) {
|
|
382
|
+
aChildren.push(oChild);
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
return undefined;
|
|
386
|
+
});
|
|
387
|
+
})
|
|
388
|
+
.then(function () {
|
|
389
|
+
if (sName === "customData") {
|
|
390
|
+
//check namespaced attributes:
|
|
391
|
+
var mCustomSettings;
|
|
392
|
+
var aNewCustomData = Array.prototype.slice.call(oParent.attributes).reduce(function(aNamespacedCustomData, oAttribute) {
|
|
393
|
+
var sLocalName = XmlTreeModifier._getLocalName(oAttribute);
|
|
394
|
+
if (oAttribute.namespaceURI === CUSTOM_DATA_NS) {
|
|
395
|
+
var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
|
|
396
|
+
oNewCustomData.setAttribute("key", sLocalName);
|
|
397
|
+
oNewCustomData.setAttribute("value", oAttribute.value);
|
|
398
|
+
aNamespacedCustomData.push(oNewCustomData);
|
|
399
|
+
} else if (oAttribute.namespaceURI && oAttribute.name.indexOf("xmlns:") !== 0 ) { // other, unknown namespace and not an xml namespace alias definition
|
|
400
|
+
if (!mCustomSettings) {
|
|
401
|
+
mCustomSettings = {};
|
|
402
|
+
}
|
|
403
|
+
if (!mCustomSettings.hasOwnProperty(oAttribute.namespaceURI)) {
|
|
404
|
+
mCustomSettings[oAttribute.namespaceURI] = {};
|
|
405
|
+
}
|
|
406
|
+
mCustomSettings[oAttribute.namespaceURI][sLocalName] = oAttribute.nodeValue;
|
|
407
|
+
}
|
|
408
|
+
return aNamespacedCustomData;
|
|
409
|
+
}, []);
|
|
410
|
+
aChildren = aChildren.concat(aNewCustomData);
|
|
411
|
+
//add custom settings as custom data "sap-ui-custom-settings"
|
|
412
|
+
if (mCustomSettings) {
|
|
413
|
+
var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
|
|
414
|
+
oNewCustomData.setAttribute("key", "sap-ui-custom-settings");
|
|
415
|
+
XmlTreeModifier.setProperty(oNewCustomData, "value", mCustomSettings);
|
|
416
|
+
aChildren.push(oNewCustomData);
|
|
359
417
|
}
|
|
360
|
-
mCustomSettings[oAttribute.namespaceURI][sLocalName] = oAttribute.nodeValue;
|
|
361
418
|
}
|
|
362
|
-
return
|
|
363
|
-
}
|
|
364
|
-
aChildren = aChildren.concat(aNewCustomData);
|
|
365
|
-
//add custom settings as custom data "sap-ui-custom-settings"
|
|
366
|
-
if (mCustomSettings) {
|
|
367
|
-
var oNewCustomData = oParent.ownerDocument.createElementNS("sap.ui.core","CustomData");
|
|
368
|
-
oNewCustomData.setAttribute("key", "sap-ui-custom-settings");
|
|
369
|
-
XmlTreeModifier.setProperty(oNewCustomData, "value", mCustomSettings);
|
|
370
|
-
aChildren.push(oNewCustomData);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
return bSingleValueAggregation ? aChildren[0] : aChildren;
|
|
419
|
+
return bSingleValueAggregation ? aChildren[0] : aChildren;
|
|
420
|
+
});
|
|
374
421
|
},
|
|
375
422
|
|
|
376
423
|
/**
|
|
377
424
|
* @inheritDoc
|
|
378
425
|
*/
|
|
379
426
|
insertAggregation: function (oParent, sName, oObject, iIndex, oView, bSkipAdjustIndex) {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
if (
|
|
396
|
-
|
|
427
|
+
return XmlTreeModifier._findAggregationNode(oParent, sName)
|
|
428
|
+
.then(function (oAggregationNode) {
|
|
429
|
+
if (!oAggregationNode) {
|
|
430
|
+
// named aggregation must have the same namespace as the parent
|
|
431
|
+
var sNamespaceURI = oParent.namespaceURI;
|
|
432
|
+
// no ids for aggregation nodes => no need pass id or component
|
|
433
|
+
return XmlTreeModifier.createControl(sNamespaceURI + "." + sName, undefined, oView)
|
|
434
|
+
.then(function (oAggregationNode) {
|
|
435
|
+
oParent.appendChild(oAggregationNode);
|
|
436
|
+
return oAggregationNode;
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
return oAggregationNode;
|
|
440
|
+
})
|
|
441
|
+
.then(function (oAggregationNode) {
|
|
442
|
+
if (!bSkipAdjustIndex) {
|
|
443
|
+
var aChildren = oAggregationNode.children;
|
|
444
|
+
var iOffset = 0;
|
|
445
|
+
var iStopIndex = (iIndex < aChildren.length) ? iIndex : aChildren.length;
|
|
446
|
+
for (var i = 0; i < iStopIndex; i++) {
|
|
447
|
+
if (aChildren[i].namespaceURI === "sap.ui.core" && aChildren[i].tagName.indexOf("ExtensionPoint") > -1) {
|
|
448
|
+
iOffset = iOffset + 1 - aChildren[i].children.length;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
iIndex = iIndex + iOffset;
|
|
397
452
|
}
|
|
398
|
-
}
|
|
399
|
-
iIndex = iIndex + iOffset;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
if (iIndex >= oAggregationNode.childElementCount) {
|
|
403
|
-
oAggregationNode.appendChild(oObject);
|
|
404
|
-
} else {
|
|
405
|
-
var oReferenceNode = XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode)[iIndex];
|
|
406
|
-
oAggregationNode.insertBefore(oObject, oReferenceNode);
|
|
407
|
-
}
|
|
408
453
|
|
|
454
|
+
if (iIndex >= oAggregationNode.childElementCount) {
|
|
455
|
+
oAggregationNode.appendChild(oObject);
|
|
456
|
+
} else {
|
|
457
|
+
return XmlTreeModifier._getControlsInAggregation(oParent, oAggregationNode)
|
|
458
|
+
.then(function (aReferenceNodes) {
|
|
459
|
+
oAggregationNode.insertBefore(oObject, aReferenceNodes[iIndex]);
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
return undefined;
|
|
463
|
+
});
|
|
409
464
|
},
|
|
410
465
|
|
|
411
466
|
/**
|
|
412
467
|
* @inheritDoc
|
|
413
468
|
*/
|
|
414
469
|
removeAggregation: function (oParent, sName, oObject) {
|
|
415
|
-
|
|
416
|
-
|
|
470
|
+
return XmlTreeModifier._findAggregationNode(oParent, sName)
|
|
471
|
+
.then(function (oAggregationNode) {
|
|
472
|
+
oAggregationNode.removeChild(oObject);
|
|
473
|
+
});
|
|
417
474
|
},
|
|
418
475
|
|
|
419
476
|
/**
|
|
420
477
|
* @inheritDoc
|
|
421
478
|
*/
|
|
422
479
|
removeAllAggregation: function (oControl, sName) {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
480
|
+
return XmlTreeModifier._findAggregationNode(oControl, sName)
|
|
481
|
+
.then(function (oAggregationNode) {
|
|
482
|
+
if (oControl === oAggregationNode) {
|
|
483
|
+
return XmlTreeModifier._getControlsInAggregation(oControl, oControl)
|
|
484
|
+
.then(function (aChildControls) {
|
|
485
|
+
aChildControls.forEach(function(oChildControl) {
|
|
486
|
+
oControl.removeChild(oChildControl);
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
return oControl.removeChild(oAggregationNode);
|
|
428
491
|
});
|
|
429
|
-
} else {
|
|
430
|
-
oControl.removeChild(oAggregationNode);
|
|
431
|
-
}
|
|
432
492
|
},
|
|
433
493
|
|
|
434
494
|
/**
|
|
@@ -444,46 +504,64 @@ sap.ui.define([
|
|
|
444
504
|
break;
|
|
445
505
|
}
|
|
446
506
|
}
|
|
447
|
-
|
|
448
|
-
|
|
507
|
+
var oPromise = Promise.resolve(oAggregationNode);
|
|
508
|
+
if (!oAggregationNode) {
|
|
509
|
+
oPromise = oPromise
|
|
510
|
+
.then(XmlTreeModifier._isDefaultAggregation.bind(XmlTreeModifier, oParent, sName))
|
|
511
|
+
.then(function (bIsDefaultAggregation) {
|
|
512
|
+
if (bIsDefaultAggregation) {
|
|
513
|
+
return oParent;
|
|
514
|
+
}
|
|
515
|
+
return oAggregationNode;
|
|
516
|
+
});
|
|
449
517
|
}
|
|
450
|
-
return
|
|
518
|
+
return oPromise;
|
|
451
519
|
},
|
|
452
520
|
|
|
453
521
|
/**
|
|
454
522
|
* @private
|
|
455
523
|
*/
|
|
456
524
|
_isDefaultAggregation: function(oParent, sAggregationName) {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
525
|
+
return XmlTreeModifier.getControlMetadata(oParent)
|
|
526
|
+
.then(function (oControlMetadata) {
|
|
527
|
+
var oDefaultAggregation = oControlMetadata.getDefaultAggregation();
|
|
528
|
+
return oDefaultAggregation && sAggregationName === oDefaultAggregation.name;
|
|
529
|
+
});
|
|
460
530
|
},
|
|
461
531
|
|
|
462
532
|
/**
|
|
463
533
|
* @private
|
|
464
534
|
*/
|
|
465
535
|
_isNotNamedAggregationNode: function(oParent, oChildNode) {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
536
|
+
return XmlTreeModifier.getAllAggregations(oParent)
|
|
537
|
+
.then(function (mAllAggregatiosnMetadata) {
|
|
538
|
+
var oAggregation = mAllAggregatiosnMetadata[oChildNode.localName];
|
|
539
|
+
return oParent.namespaceURI !== oChildNode.namespaceURI || !oAggregation; //same check as in XMLTemplateProcessor (handleChild)
|
|
540
|
+
});
|
|
469
541
|
},
|
|
470
542
|
|
|
471
543
|
/**
|
|
472
544
|
* @private
|
|
473
545
|
*/
|
|
474
546
|
_isSingleValueAggregation: function(oParent, sAggregationName) {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
547
|
+
return XmlTreeModifier.getAllAggregations(oParent)
|
|
548
|
+
.then(function (mAllAggregatiosnMetadata) {
|
|
549
|
+
var oAggregationMetadata = mAllAggregatiosnMetadata[sAggregationName];
|
|
550
|
+
return !oAggregationMetadata.multiple;
|
|
551
|
+
});
|
|
478
552
|
},
|
|
479
553
|
|
|
480
554
|
/**
|
|
481
555
|
* @private
|
|
482
556
|
*/
|
|
483
557
|
_isAltTypeAggregation: function(oParent, sAggregationName) {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
558
|
+
return XmlTreeModifier.getControlMetadata(oParent)
|
|
559
|
+
.then(function (oControlMetadata) {
|
|
560
|
+
return oControlMetadata.getAllAggregations()[sAggregationName];
|
|
561
|
+
})
|
|
562
|
+
.then(function (oAggregationMetadata) {
|
|
563
|
+
return !!oAggregationMetadata.altTypes;
|
|
564
|
+
});
|
|
487
565
|
},
|
|
488
566
|
|
|
489
567
|
/**
|
|
@@ -506,7 +584,15 @@ sap.ui.define([
|
|
|
506
584
|
_getControlsInAggregation: function(oParent, oAggregationNode) {
|
|
507
585
|
//convert NodeList to Array
|
|
508
586
|
var aChildren = Array.prototype.slice.call(XmlTreeModifier._children(oAggregationNode));
|
|
509
|
-
return
|
|
587
|
+
return Promise.all(aChildren.map(function (oChild) {
|
|
588
|
+
return XmlTreeModifier._isNotNamedAggregationNode(oParent, oChild)
|
|
589
|
+
.then(function (bIsNotNamedAggregationNode) {
|
|
590
|
+
return bIsNotNamedAggregationNode ? oChild : undefined;
|
|
591
|
+
});
|
|
592
|
+
}))
|
|
593
|
+
.then(function (aChildren) {
|
|
594
|
+
return aChildren.filter(function (oChild) { return !!oChild; });
|
|
595
|
+
});
|
|
510
596
|
},
|
|
511
597
|
|
|
512
598
|
/**
|
|
@@ -531,13 +617,16 @@ sap.ui.define([
|
|
|
531
617
|
* @inheritDoc
|
|
532
618
|
*/
|
|
533
619
|
getBindingTemplate: function (oControl, sAggregationName) {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
620
|
+
return XmlTreeModifier._findAggregationNode(oControl, sAggregationName)
|
|
621
|
+
.then(function (oAggregationNode) {
|
|
622
|
+
if (oAggregationNode) {
|
|
623
|
+
var aChildren = XmlTreeModifier._children(oAggregationNode);
|
|
624
|
+
if (aChildren.length === 1){
|
|
625
|
+
return aChildren[0];
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
return undefined;
|
|
629
|
+
});
|
|
541
630
|
},
|
|
542
631
|
|
|
543
632
|
/**
|
|
@@ -551,82 +640,97 @@ sap.ui.define([
|
|
|
551
640
|
* @inheritDoc
|
|
552
641
|
*/
|
|
553
642
|
findIndexInParentAggregation: function (oControl) {
|
|
554
|
-
var oParent,
|
|
555
|
-
sAggregationName,
|
|
556
|
-
aControlsInAggregation;
|
|
557
|
-
|
|
558
643
|
// find the parent
|
|
559
|
-
oParent = XmlTreeModifier.getParent(oControl);
|
|
644
|
+
var oParent = XmlTreeModifier.getParent(oControl);
|
|
560
645
|
|
|
561
646
|
if (!oParent) {
|
|
562
|
-
return -1;
|
|
647
|
+
return Promise.resolve(-1);
|
|
563
648
|
}
|
|
564
649
|
|
|
565
650
|
// we need the aggregation name in order to find all control nodes in the parent
|
|
566
651
|
// which are relevant to this aggregation and skip all other possible nodes
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
652
|
+
return XmlTreeModifier.getParentAggregationName(oControl, oParent)
|
|
653
|
+
.then(function (sAggregationName) {
|
|
654
|
+
// get the relevant controls from the aggregation node
|
|
655
|
+
return XmlTreeModifier.getAggregation(oParent, sAggregationName);
|
|
656
|
+
})
|
|
657
|
+
.then(function (aControlsInAggregation) {
|
|
658
|
+
// if the result from the above is array:
|
|
659
|
+
if (Array.isArray(aControlsInAggregation)) {
|
|
660
|
+
// to harmonize behavior with JSControlTree, where stashed controls are not added to the parent aggregation
|
|
661
|
+
var aPromises = aControlsInAggregation.map(function (oControl) {
|
|
662
|
+
return Promise.resolve()
|
|
663
|
+
.then(function () {
|
|
664
|
+
if (XmlTreeModifier._isExtensionPoint(oControl)) {
|
|
665
|
+
return oControl;
|
|
666
|
+
}
|
|
667
|
+
return XmlTreeModifier.getProperty(oControl, "stashed")
|
|
668
|
+
.then(function (oProperty) {
|
|
669
|
+
return !oProperty ? oControl : undefined;
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
});
|
|
673
|
+
return Promise.all(aPromises)
|
|
674
|
+
.then(function (aControlsInAggregation) {
|
|
675
|
+
// find and return the correct index
|
|
676
|
+
return aControlsInAggregation.filter(function (oControl) {
|
|
677
|
+
return !!oControl;
|
|
678
|
+
}).indexOf(oControl);
|
|
679
|
+
});
|
|
680
|
+
} else {
|
|
681
|
+
// if aControlsInAggregation is not an array, then the aggregation is
|
|
682
|
+
// of type 0..1 and aControlsInAggregation is the oControl provided
|
|
683
|
+
// to the function initially, so its index is 0
|
|
684
|
+
return 0;
|
|
578
685
|
}
|
|
579
|
-
return !XmlTreeModifier.getProperty(oControl, "stashed");
|
|
580
686
|
});
|
|
581
|
-
|
|
582
|
-
// find and return the correct index
|
|
583
|
-
return aControlsInAggregation.indexOf(oControl);
|
|
584
|
-
} else {
|
|
585
|
-
// if aControlsInAggregation is not an array, then the aggregation is
|
|
586
|
-
// of type 0..1 and aControlsInAggregation is the oControl provided
|
|
587
|
-
// to the function initially, so its index is 0
|
|
588
|
-
return 0;
|
|
589
|
-
}
|
|
590
687
|
},
|
|
591
688
|
|
|
592
689
|
/**
|
|
593
690
|
* @inheritDoc
|
|
594
691
|
*/
|
|
595
692
|
getParentAggregationName: function (oControl, oParent) {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
693
|
+
return Promise.resolve()
|
|
694
|
+
.then(function () {
|
|
695
|
+
// check if the control is in named aggregatio node
|
|
696
|
+
if (!oParent.isSameNode(oControl.parentNode)) {
|
|
697
|
+
// the control is in named aggregation
|
|
698
|
+
return false;
|
|
699
|
+
} else {
|
|
700
|
+
// again check just in case
|
|
701
|
+
return XmlTreeModifier._isNotNamedAggregationNode(oParent, oControl);
|
|
702
|
+
}
|
|
703
|
+
})
|
|
704
|
+
.then(function (bNotNamedAggregation) {
|
|
705
|
+
// check if the the control is in default aggregation
|
|
706
|
+
// and get the name of the aggregation
|
|
707
|
+
if (bNotNamedAggregation) {
|
|
708
|
+
// the control is in the default aggregation of the parent
|
|
709
|
+
return XmlTreeModifier.getControlMetadata(oParent)
|
|
710
|
+
.then(function (oMetadata) {
|
|
711
|
+
return oMetadata.getDefaultAggregationName();
|
|
712
|
+
});
|
|
713
|
+
} else {
|
|
714
|
+
// the agregation name is provided and we can simply take it from the xml node
|
|
715
|
+
return XmlTreeModifier._getLocalName(oControl.parentNode);
|
|
716
|
+
}
|
|
717
|
+
});
|
|
619
718
|
},
|
|
620
719
|
|
|
621
720
|
/**
|
|
622
721
|
* @inheritDoc
|
|
623
722
|
*/
|
|
624
723
|
findAggregation: function(oControl, sAggregationName) {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
724
|
+
return XmlTreeModifier.getControlMetadata(oControl)
|
|
725
|
+
.then(function (oMetadata) {
|
|
726
|
+
return oMetadata.getAllAggregations();
|
|
727
|
+
})
|
|
728
|
+
.then(function (oAggregations) {
|
|
729
|
+
if (oAggregations) {
|
|
730
|
+
return oAggregations[sAggregationName];
|
|
731
|
+
}
|
|
732
|
+
return undefined;
|
|
733
|
+
});
|
|
630
734
|
},
|
|
631
735
|
|
|
632
736
|
/**
|
|
@@ -635,44 +739,51 @@ sap.ui.define([
|
|
|
635
739
|
validateType: function(oControl, mAggregationMetadata, oParent, sFragment, iIndex) {
|
|
636
740
|
var sTypeOrInterface = mAggregationMetadata.type;
|
|
637
741
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
742
|
+
return XmlTreeModifier.getAggregation(oParent, mAggregationMetadata.name)
|
|
743
|
+
.then(function (oAggregation) {
|
|
744
|
+
// if aggregation is not multiple and already has element inside, then it is not valid for element
|
|
745
|
+
if (mAggregationMetadata.multiple === false && oAggregation && oAggregation.length > 0) {
|
|
746
|
+
return false;
|
|
747
|
+
}
|
|
748
|
+
return Fragment.load({
|
|
749
|
+
definition: sFragment
|
|
750
|
+
});
|
|
751
|
+
}).then(function(aControls) {
|
|
752
|
+
if (!Array.isArray(aControls)) {
|
|
753
|
+
aControls = [aControls];
|
|
754
|
+
}
|
|
755
|
+
var bReturn = aControls[iIndex].isA(sTypeOrInterface);
|
|
756
|
+
aControls.forEach(function(oFragmentControl) {
|
|
757
|
+
oFragmentControl.destroy();
|
|
758
|
+
});
|
|
759
|
+
return bReturn;
|
|
760
|
+
});
|
|
652
761
|
},
|
|
653
762
|
|
|
654
763
|
/**
|
|
655
764
|
* @inheritDoc
|
|
656
765
|
*/
|
|
657
766
|
instantiateFragment: function(sFragment, sNamespace, oView) {
|
|
658
|
-
var aControls;
|
|
659
767
|
var oFragment = XMLHelper.parse(sFragment);
|
|
660
|
-
|
|
768
|
+
return XmlTreeModifier._checkAndPrefixIdsInFragment(oFragment, sNamespace)
|
|
769
|
+
.then(function (oFragment) {
|
|
770
|
+
var aControls;
|
|
661
771
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
772
|
+
if (oFragment.localName === "FragmentDefinition") {
|
|
773
|
+
aControls = XmlTreeModifier._getElementNodeChildren(oFragment);
|
|
774
|
+
} else {
|
|
775
|
+
aControls = [oFragment];
|
|
776
|
+
}
|
|
667
777
|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
778
|
+
// check if there is already a field with the same ID and throw error if so
|
|
779
|
+
aControls.forEach(function(oNode) {
|
|
780
|
+
if (XmlTreeModifier._byId(oNode.getAttribute("id"), oView)) {
|
|
781
|
+
throw Error("The following ID is already in the view: " + oNode.getAttribute("id"));
|
|
782
|
+
}
|
|
783
|
+
});
|
|
674
784
|
|
|
675
|
-
|
|
785
|
+
return aControls;
|
|
786
|
+
});
|
|
676
787
|
},
|
|
677
788
|
|
|
678
789
|
/**
|
|
@@ -709,25 +820,27 @@ sap.ui.define([
|
|
|
709
820
|
*/
|
|
710
821
|
attachEvent: function(oNode, sEventName, sFunctionPath, vData) {
|
|
711
822
|
if (typeof ObjectPath.get(sFunctionPath) !== "function") {
|
|
712
|
-
|
|
823
|
+
return Promise.reject(new Error("Can't attach event because the event handler function is not found or not a function."));
|
|
713
824
|
}
|
|
825
|
+
return XmlTreeModifier.getProperty(oNode, sEventName)
|
|
826
|
+
.then(function (sValue) {
|
|
827
|
+
sValue = sValue || "";
|
|
828
|
+
var aEventHandlers = EventHandlerResolver.parse(sValue);
|
|
829
|
+
var sEventHandler = sFunctionPath;
|
|
830
|
+
var aParams = ["$event"];
|
|
714
831
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
var aParams = ["$event"];
|
|
719
|
-
|
|
720
|
-
if (vData) {
|
|
721
|
-
aParams.push(JSON.stringify(vData));
|
|
722
|
-
}
|
|
832
|
+
if (vData) {
|
|
833
|
+
aParams.push(JSON.stringify(vData));
|
|
834
|
+
}
|
|
723
835
|
|
|
724
|
-
|
|
836
|
+
sEventHandler += "(" + aParams.join(",") + ")";
|
|
725
837
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
838
|
+
if (!includes(aEventHandlers, sEventHandler)) {
|
|
839
|
+
aEventHandlers.push(sEventHandler);
|
|
840
|
+
}
|
|
729
841
|
|
|
730
|
-
|
|
842
|
+
oNode.setAttribute(sEventName, aEventHandlers.join(";"));
|
|
843
|
+
});
|
|
731
844
|
},
|
|
732
845
|
|
|
733
846
|
/**
|
|
@@ -735,68 +848,86 @@ sap.ui.define([
|
|
|
735
848
|
*/
|
|
736
849
|
detachEvent: function(oNode, sEventName, sFunctionPath) {
|
|
737
850
|
if (typeof ObjectPath.get(sFunctionPath) !== "function") {
|
|
738
|
-
|
|
851
|
+
return Promise.reject(new Error("Can't attach event because the event handler function is not found or not a function."));
|
|
739
852
|
}
|
|
853
|
+
return XmlTreeModifier.getProperty(oNode, sEventName)
|
|
854
|
+
.then(function (sValue) {
|
|
855
|
+
sValue = sValue || "";
|
|
856
|
+
var aEventHandlers = EventHandlerResolver.parse(sValue);
|
|
740
857
|
|
|
741
|
-
|
|
742
|
-
|
|
858
|
+
var iEventHandlerIndex = aEventHandlers.findIndex(function (sEventHandler) {
|
|
859
|
+
return sEventHandler.includes(sFunctionPath);
|
|
860
|
+
});
|
|
743
861
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
if (iEventHandlerIndex > -1) {
|
|
749
|
-
aEventHandlers.splice(iEventHandlerIndex, 1);
|
|
750
|
-
}
|
|
862
|
+
if (iEventHandlerIndex > -1) {
|
|
863
|
+
aEventHandlers.splice(iEventHandlerIndex, 1);
|
|
864
|
+
}
|
|
751
865
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
866
|
+
if (aEventHandlers.length) {
|
|
867
|
+
oNode.setAttribute(sEventName, aEventHandlers.join(";"));
|
|
868
|
+
} else {
|
|
869
|
+
oNode.removeAttribute(sEventName);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
757
872
|
},
|
|
758
873
|
|
|
759
874
|
/**
|
|
760
875
|
* @inheritDoc
|
|
761
876
|
*/
|
|
762
877
|
bindAggregation: function (oNode, sAggregationName, vBindingInfos, oView) {
|
|
763
|
-
|
|
764
|
-
|
|
878
|
+
return Promise.resolve()
|
|
879
|
+
.then(function () {
|
|
880
|
+
XmlTreeModifier.bindProperty(oNode, sAggregationName, vBindingInfos.path);
|
|
881
|
+
return XmlTreeModifier.insertAggregation(oNode, sAggregationName, vBindingInfos.template, 0, oView);
|
|
882
|
+
});
|
|
765
883
|
},
|
|
766
884
|
|
|
767
885
|
/**
|
|
768
886
|
* @inheritDoc
|
|
769
887
|
*/
|
|
770
888
|
unbindAggregation: function (oNode, sAggregationName) {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
889
|
+
return Promise.resolve()
|
|
890
|
+
.then(function () {
|
|
891
|
+
if (oNode.hasAttribute(sAggregationName)) {
|
|
892
|
+
oNode.removeAttribute(sAggregationName);
|
|
893
|
+
return XmlTreeModifier.removeAllAggregation(oNode, sAggregationName);
|
|
894
|
+
}
|
|
895
|
+
return undefined;
|
|
896
|
+
});
|
|
775
897
|
},
|
|
776
898
|
|
|
777
899
|
/**
|
|
778
900
|
* @inheritDoc
|
|
779
901
|
*/
|
|
780
902
|
getExtensionPointInfo: function(sExtensionPointName, oView) {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
903
|
+
return Promise.resolve()
|
|
904
|
+
.then(function () {
|
|
905
|
+
if (oView && sExtensionPointName) {
|
|
906
|
+
var aExtensionPoints = Array.prototype.slice.call(oView.getElementsByTagNameNS("sap.ui.core", "ExtensionPoint"));
|
|
907
|
+
var aFilteredExtensionPoints = aExtensionPoints.filter(function(oExtPoint) {
|
|
908
|
+
return oExtPoint.getAttribute("name") === sExtensionPointName;
|
|
909
|
+
});
|
|
910
|
+
var oExtensionPoint = (aFilteredExtensionPoints.length === 1) ? aFilteredExtensionPoints[0] : undefined;
|
|
911
|
+
if (oExtensionPoint) {
|
|
912
|
+
var oParent = XmlTreeModifier.getParent(oExtensionPoint);
|
|
913
|
+
|
|
914
|
+
return Promise.all([
|
|
915
|
+
XmlTreeModifier.getParentAggregationName(oExtensionPoint, oParent),
|
|
916
|
+
XmlTreeModifier.findIndexInParentAggregation(oExtensionPoint)
|
|
917
|
+
]).then(function (aProperties) {
|
|
918
|
+
// increase the index by 1 to get the index behind the extension point for xml-case
|
|
919
|
+
var oExtensionPointInfo = {
|
|
920
|
+
parent: oParent,
|
|
921
|
+
aggregationName: aProperties[0],
|
|
922
|
+
index: aProperties[1] + 1,
|
|
923
|
+
defaultContent: Array.prototype.slice.call(XmlTreeModifier._children(oExtensionPoint))
|
|
924
|
+
};
|
|
925
|
+
return oExtensionPointInfo;
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
return undefined;
|
|
785
930
|
});
|
|
786
|
-
var oExtensionPoint = (aFilteredExtensionPoints.length === 1) ? aFilteredExtensionPoints[0] : undefined;
|
|
787
|
-
if (oExtensionPoint) {
|
|
788
|
-
var oParent = XmlTreeModifier.getParent(oExtensionPoint);
|
|
789
|
-
// increase the index by 1 to get the index behind the extension point for xml-case
|
|
790
|
-
var oExtensionPointInfo = {
|
|
791
|
-
parent: oParent,
|
|
792
|
-
aggregationName: XmlTreeModifier.getParentAggregationName(oExtensionPoint, oParent),
|
|
793
|
-
index: XmlTreeModifier.findIndexInParentAggregation(oExtensionPoint) + 1,
|
|
794
|
-
defaultContent: Array.prototype.slice.call(XmlTreeModifier._children(oExtensionPoint))
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
return oExtensionPointInfo;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
931
|
}
|
|
801
932
|
});
|
|
802
933
|
|