@openui5/sap.ui.core 1.136.4 → 1.139.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +3 -3
- package/README.md +1 -1
- package/REUSE.toml +8 -29
- package/THIRDPARTY.txt +72 -90
- package/package.json +2 -2
- package/src/jquery.sap.global.js +1 -1
- 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/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageFallback.js +18 -2
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/Localization.js +5 -3
- package/src/sap/base/i18n/ResourceBundle.js +59 -35
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +3 -3
- package/src/sap/ui/base/BindingInfo.js +18 -9
- package/src/sap/ui/base/BindingParser.js +13 -6
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -8
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +37 -27
- 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 +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/base/OwnStatics.js +49 -0
- package/src/sap/ui/core/.library +9 -31
- package/src/sap/ui/core/BusyIndicator.js +8 -8
- package/src/sap/ui/core/Component.js +63 -73
- package/src/sap/ui/core/ComponentContainer.js +34 -4
- 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 +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +2 -2
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +13 -11
- package/src/sap/ui/core/Element.js +1 -3
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +4 -4
- package/src/sap/ui/core/Fragment.js +10 -6
- 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 +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/Lib.js +39 -24
- 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 +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +39 -178
- package/src/sap/ui/core/RenderManager.js +1 -1
- 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/Theming.js +2 -2
- 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 +16 -57
- 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 +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +5 -1
- package/src/sap/ui/core/_IconRegistry.js +2 -0
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +2 -2
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +12 -2
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +5 -3
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/interaction/KeyboardInteractionDisplay.js +64 -37
- 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 +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +6 -6
- package/src/sap/ui/core/messagebundle.properties +58 -28
- package/src/sap/ui/core/messagebundle_mk.properties +3 -3
- package/src/sap/ui/core/mvc/Controller.js +5 -1
- package/src/sap/ui/core/mvc/HTMLView.js +6 -2
- package/src/sap/ui/core/mvc/JSONView.js +6 -2
- package/src/sap/ui/core/mvc/JSView.js +6 -3
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +69 -195
- package/src/sap/ui/core/mvc/XMLView.js +7 -2
- package/src/sap/ui/core/mvc/_ViewFactory.js +196 -0
- 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/Route.js +197 -13
- package/src/sap/ui/core/routing/Router.js +19 -8
- package/src/sap/ui/core/routing/RouterHashChanger.js +12 -3
- package/src/sap/ui/core/routing/Target.js +714 -61
- package/src/sap/ui/core/routing/TargetCache.js +205 -25
- package/src/sap/ui/core/routing/Targets.js +162 -67
- package/src/sap/ui/core/routing/Views.js +1 -0
- package/src/sap/ui/core/routing/sync/Route.js +1 -1
- package/src/sap/ui/core/routing/sync/Target.js +11 -1
- package/src/sap/ui/core/routing/sync/TargetCache.js +3 -3
- package/src/sap/ui/core/routing/sync/Targets.js +1 -1
- 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 -48
- package/src/sap/ui/core/service/ServiceFactory.js +44 -4
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +356 -353
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +4 -2
- package/src/sap/ui/core/themes/base/base.less +20 -20
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/global.less +4 -0
- package/src/sap/ui/core/themes/base/skeleton.less +3 -3
- package/src/sap/ui/core/theming/ThemeHelper.js +1 -18
- 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 +4 -4
- package/src/sap/ui/core/tmpl/Template.js +1 -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 +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +8 -1
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +4 -4
- 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/webc/WebComponent.js +2 -3
- package/src/sap/ui/core/webc/WebComponentMetadata.js +2 -3
- package/src/sap/ui/core/webc/WebComponentRenderer.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 +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +2 -2
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/Filter.js +55 -35
- package/src/sap/ui/model/FilterOperator.js +79 -9
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -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 +2 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +2 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +2 -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/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +3 -3
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +2 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +3 -3
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +20 -17
- package/src/sap/ui/model/odata/v4/ODataBinding.js +2 -2
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +4 -4
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +34 -22
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +60 -22
- package/src/sap/ui/model/odata/v4/ODataModel.js +9 -8
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +2 -2
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataUtils.js +2 -2
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +98 -89
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +39 -7
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +32 -26
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +10 -4
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +44 -24
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +50 -19
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- 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 +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -4
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa.js +14 -2
- package/src/sap/ui/test/Opa5.js +61 -10
- package/src/sap/ui/test/TestUtils.js +6 -2
- package/src/sap/ui/test/generic/GenericTestCollection.js +11 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/thirdparty/datajs.js +13 -10
- package/src/sap/ui/thirdparty/jquery.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +49 -59
- package/src/ui5loader.js +1 -1
- package/src/sap/ui/core/routing/async/Route.js +0 -186
- package/src/sap/ui/core/routing/async/Target.js +0 -712
- package/src/sap/ui/core/routing/async/TargetCache.js +0 -196
- package/src/sap/ui/core/routing/async/Targets.js +0 -130
- package/src/sap/ui/thirdparty/iscroll-lite.js +0 -603
- package/src/sap/ui/thirdparty/iscroll.js +0 -1104
- package/src/sap/ui/thirdparty/mobiscroll/css/mobiscroll-core.css +0 -416
- package/src/sap/ui/thirdparty/mobiscroll/js/mobiscroll-core.js +0 -127
- package/src/sap/ui/thirdparty/mobiscroll/js/mobiscroll-datetime.js +0 -818
- package/src/sap/ui/thirdparty/mobiscroll/js/mobiscroll-scroller.js +0 -1264
- package/src/sap/ui/thirdparty/swipe-view.js +0 -560
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
sap.ui.define([
|
|
7
|
-
"sap/ui/core/mvc/View",
|
|
8
|
-
"sap/ui/core/Component",
|
|
9
|
-
"sap/ui/core/routing/HashChanger"
|
|
10
|
-
], function(View, Component, HashChanger) {
|
|
11
|
-
"use strict";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Provide methods for sap.ui.core.routing.TargetCache in async mode
|
|
15
|
-
* @private
|
|
16
|
-
* @since 1.58
|
|
17
|
-
*/
|
|
18
|
-
return {
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Determines the object with the given <code>oOptions</code>, <code>sType</code> and <code>oTargetCreateInfo</code>
|
|
22
|
-
*
|
|
23
|
-
* @param {object} oOptions The options of the desired object
|
|
24
|
-
* @param {string} sType The type of the desired object, e.g. 'View', 'Component', etc.
|
|
25
|
-
* @param {object} oTargetCreateInfo The object which contains extra information for the creation of the target
|
|
26
|
-
* @param {boolean} [bSynchronousCreate] When <code>true</code> the <code>View._create</code> is used for creating
|
|
27
|
-
* the view instance synchronously. In all other cases the asynchronous <code>View.create</code> factory is used.
|
|
28
|
-
* @returns {Promise | object} The desired object, if the object already exists in the cache, if not the promise is returned
|
|
29
|
-
* @private
|
|
30
|
-
* @ui5-transform-hint replace-param bSynchronousCreate false
|
|
31
|
-
*/
|
|
32
|
-
_getObjectWithGlobalId : function (oOptions, sType, oTargetCreateInfo, bSynchronousCreate, bNoCreate) {
|
|
33
|
-
var that = this,
|
|
34
|
-
vPromiseOrObject,
|
|
35
|
-
sName,
|
|
36
|
-
oInstanceCache,
|
|
37
|
-
oOwnerComponent = this._oComponent,
|
|
38
|
-
aWrittenIds = [];
|
|
39
|
-
|
|
40
|
-
oTargetCreateInfo = oTargetCreateInfo || {};
|
|
41
|
-
|
|
42
|
-
function fnCreateObjectAsync() {
|
|
43
|
-
/**
|
|
44
|
-
* @ui5-transform-hint replace-local false
|
|
45
|
-
*/
|
|
46
|
-
const bLegacyCreate = !oOptions.async || bSynchronousCreate;
|
|
47
|
-
|
|
48
|
-
switch (sType) {
|
|
49
|
-
case "View":
|
|
50
|
-
oOptions.viewName = oOptions.name;
|
|
51
|
-
delete oOptions.name;
|
|
52
|
-
if (bLegacyCreate) {
|
|
53
|
-
return View._create(oOptions);
|
|
54
|
-
} else {
|
|
55
|
-
return View.create(oOptions);
|
|
56
|
-
}
|
|
57
|
-
case "Component":
|
|
58
|
-
oOptions.settings = oOptions.settings || {};
|
|
59
|
-
|
|
60
|
-
// forward info, if parent component expects title propagation
|
|
61
|
-
oOptions.settings._propagateTitle = oTargetCreateInfo.propagateTitle;
|
|
62
|
-
|
|
63
|
-
// create the RouterHashChanger for the component which is going to be created
|
|
64
|
-
var oRouterHashChanger = that._createRouterHashChanger(oTargetCreateInfo.prefix);
|
|
65
|
-
if (oRouterHashChanger) {
|
|
66
|
-
// put the RouterHashChanger as a private property to the Component constructor
|
|
67
|
-
oOptions.settings._routerHashChanger = oRouterHashChanger;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (oOptions.usage) {
|
|
71
|
-
return oOwnerComponent.createComponent(oOptions);
|
|
72
|
-
} else {
|
|
73
|
-
return Component.create(oOptions);
|
|
74
|
-
}
|
|
75
|
-
default:
|
|
76
|
-
// do nothing
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function afterLoaded(oObject) {
|
|
81
|
-
if (that._oCache) { // the TargetCache may already be destroyed
|
|
82
|
-
aWrittenIds.forEach(function(sId) {
|
|
83
|
-
oInstanceCache[sId] = oObject;
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
if (oTargetCreateInfo.afterCreate) {
|
|
87
|
-
oTargetCreateInfo.afterCreate(oObject);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
that.fireCreated({
|
|
91
|
-
object: oObject,
|
|
92
|
-
type: sType,
|
|
93
|
-
options: oOptions
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return oObject;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (oOptions.async === undefined) {
|
|
101
|
-
oOptions.async = true;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
sName = oOptions.usage || oOptions.name;
|
|
105
|
-
this._checkName(sName, sType);
|
|
106
|
-
|
|
107
|
-
oInstanceCache = this._oCache[sType.toLowerCase()][sName];
|
|
108
|
-
|
|
109
|
-
vPromiseOrObject = oInstanceCache && oInstanceCache[oOptions.id];
|
|
110
|
-
|
|
111
|
-
if (bNoCreate || vPromiseOrObject) {
|
|
112
|
-
return vPromiseOrObject;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (oOwnerComponent) {
|
|
116
|
-
vPromiseOrObject = oOwnerComponent.runAsOwner(fnCreateObjectAsync);
|
|
117
|
-
|
|
118
|
-
if (vPromiseOrObject instanceof Promise) {
|
|
119
|
-
oOwnerComponent.registerForDestroy(vPromiseOrObject);
|
|
120
|
-
}
|
|
121
|
-
} else {
|
|
122
|
-
vPromiseOrObject = fnCreateObjectAsync();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (vPromiseOrObject instanceof Promise) {
|
|
126
|
-
vPromiseOrObject = vPromiseOrObject.then(afterLoaded);
|
|
127
|
-
} else {
|
|
128
|
-
vPromiseOrObject.loaded().then(afterLoaded);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (!oInstanceCache) {
|
|
132
|
-
oInstanceCache = this._oCache[sType.toLowerCase()][sName] = {};
|
|
133
|
-
// save the object also to the undefined key if this is the first object created for its class
|
|
134
|
-
oInstanceCache[undefined] = vPromiseOrObject;
|
|
135
|
-
aWrittenIds.push(undefined);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (oOptions.id !== undefined) {
|
|
139
|
-
oInstanceCache[oOptions.id] = vPromiseOrObject;
|
|
140
|
-
aWrittenIds.push(oOptions.id);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return vPromiseOrObject;
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Determines the view with the given <code>oOptions</code>
|
|
148
|
-
*
|
|
149
|
-
* @param {object} oOptions The options of the desired object
|
|
150
|
-
* @param {boolean} [bSynchronousCreate] When <code>true</code> the <code>View._create</code> is used for creating
|
|
151
|
-
* the view instance synchronously. In all other cases the asynchronous <code>View.create</code> factory is used.
|
|
152
|
-
* @returns {Promise | object} The desired object, if the object already exists in the cache, if not the promise is returned
|
|
153
|
-
* @private
|
|
154
|
-
* @ui5-transform-hint replace-param bSynchronousCreate false
|
|
155
|
-
*/
|
|
156
|
-
_getViewWithGlobalId : function (oOptions, bSynchronousCreate, bNoCreate) {
|
|
157
|
-
if (oOptions && !oOptions.name) {
|
|
158
|
-
oOptions.name = oOptions.viewName;
|
|
159
|
-
}
|
|
160
|
-
return this._getObjectWithGlobalId(oOptions, "View", undefined, bSynchronousCreate, bNoCreate);
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Determines the component with the given <code>oOptions</code> and <code>oTargetCreateInfo</code>
|
|
165
|
-
*
|
|
166
|
-
* @param {object} oOptions The options of the desired object
|
|
167
|
-
* @param {object} oTargetCreateInfo The object which contains extra information for the creation of the target
|
|
168
|
-
* @returns {Promise | object} The desired object, if the object already exists in the cache, if not the promise is returned
|
|
169
|
-
* @private
|
|
170
|
-
*/
|
|
171
|
-
_getComponentWithGlobalId : function(oOptions, oTargetCreateInfo, bNoCreate) {
|
|
172
|
-
return this._getObjectWithGlobalId(oOptions, "Component", oTargetCreateInfo, bNoCreate);
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Creates a new hash changer for the nested component
|
|
177
|
-
*
|
|
178
|
-
* @param {string} [sPrefix] The prefix of the target
|
|
179
|
-
* @returns {sap.ui.core.routing.HashChanger} The created sub hash changer, if creation was not possible the hash changer of the current component is returned
|
|
180
|
-
* @private
|
|
181
|
-
*/
|
|
182
|
-
_createRouterHashChanger: function(sPrefix) {
|
|
183
|
-
var oRouterHashChanger;
|
|
184
|
-
|
|
185
|
-
var oRouter = this._oComponent && this._oComponent.getRouter();
|
|
186
|
-
if (oRouter) {
|
|
187
|
-
oRouterHashChanger = oRouter.getHashChanger();
|
|
188
|
-
if (oRouterHashChanger && sPrefix) {
|
|
189
|
-
oRouterHashChanger = oRouterHashChanger.createSubHashChanger(sPrefix);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
// default to the root RouterHashChanger
|
|
193
|
-
return oRouterHashChanger || HashChanger.getInstance().createRouterHashChanger();
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
});
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
sap.ui.define(["sap/base/future"], function(future) {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Provide methods for sap.ui.core.routing.Targets in async mode
|
|
11
|
-
* @private
|
|
12
|
-
* @since 1.33
|
|
13
|
-
*/
|
|
14
|
-
return {
|
|
15
|
-
/**
|
|
16
|
-
* Creates a view and puts it in an aggregation of the specified control.
|
|
17
|
-
*
|
|
18
|
-
* @param {string|string[]|object|object[]} vTargets the key of the target as specified in the {@link #constructor}. To display multiple targets you may also pass an array of keys. If the target(s) represents a sap.ui.core.UIComponent, a prefix for its Router is needed. You can set this parameter with an object which has the 'name' property set with the key of the target and the 'prefix' property set with the prefix for the UIComponent's router. To display multiple component targets, you man also pass an array of objects.
|
|
19
|
-
* @param {object} [vData] an object that will be passed to the display event in the data property. If the target has parents, the data will also be passed to them.
|
|
20
|
-
* @param {string} [sTitleTarget] the name of the target from which the title option is taken for firing the {@link sap.ui.core.routing.Targets#event:titleChanged titleChanged} event
|
|
21
|
-
* @private
|
|
22
|
-
* @returns {Promise} resolving with {{name: *, view: *, control: *}|undefined} for every vTargets, object for single, array for multiple
|
|
23
|
-
*/
|
|
24
|
-
display : function (vTargets, vData, sTitleTarget) {
|
|
25
|
-
var oSequencePromise = Promise.resolve();
|
|
26
|
-
return this._display(vTargets, vData, sTitleTarget, oSequencePromise);
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Hook to distinguish between the router and an application calling this
|
|
31
|
-
*
|
|
32
|
-
* @param {string|string[]|object|object[]} vTargets targets or single target to be displayed
|
|
33
|
-
* @param {object} vData an object that will be passed to the display event in the data property. If the
|
|
34
|
-
target has parents, the data will also be passed to them.
|
|
35
|
-
* @param {string} sTitleTarget the name of the target from which the title option is taken for firing the {@link sap.ui.core.routing.Targets#event:titleChanged titleChanged} event
|
|
36
|
-
* @param {Promise} oSequencePromise the promise for chaining
|
|
37
|
-
* @return {Promise} resolving with {{name: *, view: *, control: *}|undefined} for every vTargets, object for single, array for multiple
|
|
38
|
-
*
|
|
39
|
-
* @private
|
|
40
|
-
*/
|
|
41
|
-
_display : function (vTargets, vData, sTitleTarget, oSequencePromise) {
|
|
42
|
-
var that = this,
|
|
43
|
-
aViewInfos = [];
|
|
44
|
-
|
|
45
|
-
if (!Array.isArray(vTargets)) {
|
|
46
|
-
vTargets = [vTargets];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
this._attachTitleChanged(vTargets, sTitleTarget);
|
|
50
|
-
|
|
51
|
-
return this._alignTargetsInfo(vTargets).reduce(function(oPromise, oTargetInfo) {
|
|
52
|
-
var oTargetCreateInfo = {
|
|
53
|
-
prefix: oTargetInfo.prefix,
|
|
54
|
-
propagateTitle: oTargetInfo.propagateTitle || false,
|
|
55
|
-
ignoreInitialHash: oTargetInfo.ignoreInitialHash,
|
|
56
|
-
placeholder: oTargetInfo.placeholder,
|
|
57
|
-
repeatedRoute: oTargetInfo.repeatedRoute,
|
|
58
|
-
routeRelevant: oTargetInfo.routeRelevant || false
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
// gather view infos while processing Promise chain
|
|
62
|
-
return that._displaySingleTarget(oTargetInfo, vData, oPromise, oTargetCreateInfo).then(function(oViewInfo) {
|
|
63
|
-
oViewInfo = oViewInfo || {};
|
|
64
|
-
oViewInfo.targetInfo = oTargetInfo;
|
|
65
|
-
aViewInfos.push(oViewInfo);
|
|
66
|
-
});
|
|
67
|
-
}, oSequencePromise).then(function() {
|
|
68
|
-
return aViewInfos;
|
|
69
|
-
});
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Adds a target to the route's config
|
|
74
|
-
* @param {object} oTargetInfo the object containing information about the single target
|
|
75
|
-
* @private
|
|
76
|
-
*/
|
|
77
|
-
_addDynamicTargetToRoute : function(oTargetInfo) {
|
|
78
|
-
if (this._oRouter) {
|
|
79
|
-
var sRouteToConnect = this._oRouter._getLastMatchedRouteName();
|
|
80
|
-
var oRoute, bSameTargetFound;
|
|
81
|
-
|
|
82
|
-
if (sRouteToConnect) {
|
|
83
|
-
oRoute = this._oRouter.getRoute(sRouteToConnect);
|
|
84
|
-
|
|
85
|
-
if (oRoute && oRoute._oConfig && oRoute._oConfig.target) {
|
|
86
|
-
bSameTargetFound = this._alignTargetsInfo(oRoute._oConfig.target).some(function(oCompareTargetInfo) {
|
|
87
|
-
return oCompareTargetInfo.name === oTargetInfo.name;
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
if (!bSameTargetFound) {
|
|
91
|
-
oRoute._oConfig.dynamicTarget = oRoute._oConfig.dynamicTarget || [];
|
|
92
|
-
oRoute._oConfig.dynamicTarget.push(oTargetInfo);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Displays a single target
|
|
101
|
-
*
|
|
102
|
-
* @param {object} oTargetInfo the object containing information (e.g. name) about the single target
|
|
103
|
-
* @param {any} vData an object that will be passed to the display event in the data property.
|
|
104
|
-
* @param {Promise} oSequencePromise the promise which for chaining
|
|
105
|
-
* @param {object} [oTargetCreateInfo] the object which contains extra information for the creation of the target
|
|
106
|
-
* @param {function} [oTargetCreateInfo.afterCreate] the function which is called after a target View/Component is instantiated
|
|
107
|
-
* @param {string} [oTargetCreateInfo.prefix] the prefix which will be used by the RouterHashChanger of the target
|
|
108
|
-
* @returns {Promise} Resolves with {name: *, view: *, control: *} if the target can be successfully displayed otherwise it rejects with error information
|
|
109
|
-
* @private
|
|
110
|
-
*/
|
|
111
|
-
_displaySingleTarget : function (oTargetInfo, vData, oSequencePromise, oTargetCreateInfo) {
|
|
112
|
-
var sName = oTargetInfo.name,
|
|
113
|
-
oTarget = this.getTarget(sName);
|
|
114
|
-
|
|
115
|
-
if (oTarget !== undefined) {
|
|
116
|
-
if (oTargetInfo.routeRelevant) {
|
|
117
|
-
this._addDynamicTargetToRoute(oTargetInfo);
|
|
118
|
-
}
|
|
119
|
-
return oTarget._display(vData, oSequencePromise, oTargetCreateInfo);
|
|
120
|
-
} else {
|
|
121
|
-
var sErrorMessage = `${this}: The target with the name "${sName}" does not exist!`;
|
|
122
|
-
future.errorThrows(sErrorMessage);
|
|
123
|
-
return Promise.resolve({
|
|
124
|
-
name: sName,
|
|
125
|
-
error: sErrorMessage
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
});
|