@openui5/sap.ui.core 1.92.0 → 1.95.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 → .eslintrc.json} +1 -2
- package/.reuse/dep5 +1 -6
- package/THIRDPARTY.txt +4 -10
- package/package.json +1 -1
- package/src/jquery.sap.global.js +9 -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 +2 -1
- package/src/jquery.sap.trace.js +2 -1
- package/src/sap/base/i18n/ResourceBundle.js +8 -4
- package/src/sap/base/strings/whitespaceReplacer.js +52 -0
- 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 +37 -42
- package/src/sap/ui/Global.js +6 -6
- package/src/sap/ui/VersionInfo.js +1 -0
- package/src/sap/ui/base/DataType.js +14 -7
- 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 +131 -24
- 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 +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/BusyIndicatorUtils.js +4 -1
- package/src/sap/ui/core/Component.js +441 -179
- package/src/sap/ui/core/ComponentContainer.js +16 -6
- 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 +64 -32
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +57 -40
- 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 +5 -5
- package/src/sap/ui/core/IconPool.js +15 -1097
- package/src/sap/ui/core/IconRenderer.js +2 -2
- 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 +26 -4
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +124 -126
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +53 -80
- package/src/sap/ui/core/Placeholder.js +25 -11
- package/src/sap/ui/core/Popup.js +29 -5
- package/src/sap/ui/core/RenderManager.js +41 -24
- 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/ThemeCheck.js +13 -61
- 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 +5 -2
- package/src/sap/ui/core/UIComponent.js +81 -40
- 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 -5
- package/src/sap/ui/core/_IconRegistry.js +1215 -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 +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 +2 -0
- package/src/sap/ui/core/format/NumberFormat.js +2 -0
- 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 -13
- 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 +166 -9
- 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 +4 -2
- package/src/sap/ui/core/mvc/JSONView.js +8 -6
- package/src/sap/ui/core/mvc/JSView.js +5 -3
- package/src/sap/ui/core/mvc/TemplateView.js +2 -2
- package/src/sap/ui/core/mvc/View.js +73 -89
- package/src/sap/ui/core/mvc/ViewType.js +2 -0
- package/src/sap/ui/core/mvc/XMLView.js +14 -10
- 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 +36 -18
- 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/Target.js +13 -0
- package/src/sap/ui/core/routing/TargetCache.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +39 -2
- package/src/sap/ui/core/routing/async/Route.js +7 -4
- package/src/sap/ui/core/routing/async/Target.js +383 -262
- package/src/sap/ui/core/routing/sync/Target.js +15 -0
- package/src/sap/ui/core/rules/App.support.js +35 -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 -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 +8 -50
- 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 +23 -26
- 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/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +5 -0
- package/src/sap/ui/core/themes/base/base.less +27 -25
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/theming/Parameters.js +225 -61
- 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 +11 -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 +24 -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 +154 -63
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +171 -152
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +419 -291
- 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 +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/PropertyList.css +55 -0
- package/src/sap/ui/debug/PropertyList.js +111 -182
- 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/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientPropertyBinding.js +3 -1
- package/src/sap/ui/model/ClientTreeBinding.js +14 -8
- 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 +14 -9
- package/src/sap/ui/model/analytics/odata4analytics.js +31 -23
- package/src/sap/ui/model/base/ManagedObjectModel.js +13 -1
- package/src/sap/ui/model/json/JSONModel.js +4 -2
- package/src/sap/ui/model/message/MessageModel.js +4 -2
- 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 +5 -2
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +7 -6
- package/src/sap/ui/model/odata/ODataUtils.js +31 -10
- 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 +187 -0
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +55 -51
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +42 -106
- package/src/sap/ui/model/odata/v2/ODataModel.js +251 -159
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +163 -136
- package/src/sap/ui/model/odata/v4/Context.js +6 -3
- package/src/sap/ui/model/odata/v4/ODataBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +97 -25
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +112 -24
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +15 -12
- package/src/sap/ui/model/odata/v4/ODataModel.js +85 -77
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +25 -15
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +21 -12
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +13 -4
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +28 -17
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +47 -30
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +55 -19
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
- package/src/sap/ui/model/resource/ResourceModel.js +5 -2
- 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 -1
- package/src/sap/ui/model/xml/XMLModel.js +4 -2
- package/src/sap/ui/performance/Measurement.js +1 -1
- package/src/sap/ui/performance/trace/FESR.js +2 -1
- package/src/sap/ui/performance/trace/Interaction.js +42 -25
- package/src/sap/ui/performance/trace/initTraces.js +1 -1
- package/src/sap/ui/qunit/QUnitUtils.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/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 +28 -34
- 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 +1 -4
- package/src/sap/ui/test/matchers/I18NText.js +29 -11
- package/src/sap/ui/test/opaQunit.js +11 -9
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -4
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/thirdparty/crossroads.js +16 -6
- 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/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/src/ui5loader.js +5 -2
- package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/Log",
|
|
8
|
-
"sap/ui/
|
|
9
|
-
"sap/ui/core/UIComponent",
|
|
8
|
+
"sap/ui/base/ManagedObjectMetadata",
|
|
10
9
|
"sap/ui/core/ComponentContainer",
|
|
11
10
|
"sap/ui/core/Placeholder",
|
|
12
11
|
"sap/ui/core/library"
|
|
13
|
-
], function(Log,
|
|
12
|
+
], function(Log, ManagedObjectMetadata, ComponentContainer, Placeholder, coreLib) {
|
|
14
13
|
"use strict";
|
|
15
14
|
|
|
16
15
|
// shortcut for sap.ui.core.ComponentLifecycle
|
|
@@ -51,10 +50,8 @@ sap.ui.define([
|
|
|
51
50
|
*/
|
|
52
51
|
_display: function (vData, oSequencePromise, oTargetCreateInfo) {
|
|
53
52
|
if (this._oParent) {
|
|
54
|
-
// replace the sync
|
|
55
53
|
oSequencePromise = this._oParent._display(vData, oSequencePromise, Object.assign({}, oTargetCreateInfo));
|
|
56
54
|
}
|
|
57
|
-
|
|
58
55
|
return this._place(vData, oSequencePromise, oTargetCreateInfo);
|
|
59
56
|
},
|
|
60
57
|
|
|
@@ -85,6 +82,32 @@ sap.ui.define([
|
|
|
85
82
|
Log.warning("The target with name '" + this._oOptions._name + "' can't be suspended because it's being loaded or not loaded yet");
|
|
86
83
|
}
|
|
87
84
|
|
|
85
|
+
return this;
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Resumes the object which is loaded by the target.
|
|
90
|
+
*
|
|
91
|
+
* Currently this function initializes the router of the component without parsing the current hash when
|
|
92
|
+
* the object which is loaded by this target is an instance of
|
|
93
|
+
* UIComponent.
|
|
94
|
+
*
|
|
95
|
+
* @return {sap.ui.core.routing.Target} The 'this' to chain the call
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
resume: function() {
|
|
99
|
+
if (this._oParent) {
|
|
100
|
+
this._oParent.resume();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (this._isLoaded()) {
|
|
104
|
+
var oObject = this._get(),
|
|
105
|
+
oRouter;
|
|
106
|
+
|
|
107
|
+
if (oObject.isA("sap.ui.core.UIComponent") && (oRouter = oObject.getRouter()) && oObject.hasNativeRouter()) {
|
|
108
|
+
oRouter.initialize(true);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
88
111
|
|
|
89
112
|
return this;
|
|
90
113
|
},
|
|
@@ -190,284 +213,374 @@ sap.ui.define([
|
|
|
190
213
|
},
|
|
191
214
|
|
|
192
215
|
/**
|
|
193
|
-
*
|
|
216
|
+
* Load the target and wait for the first <code>routeMatched</code> event if it's a Component target
|
|
194
217
|
*
|
|
195
|
-
* @param {object}
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* @param {object} oTargetCreateInfo Additional information for the component creation. Currently the object only contains the prefix for the routerHashChanger
|
|
199
|
-
* @return {Promise} resolves with {name: *, view: *, control: *} if the target can be successfully displayed otherwise it rejects with an error message
|
|
218
|
+
* @param {object} oTargetCreateInfo The corresponding target create info
|
|
219
|
+
* @return {Promise} Promise resolving with the loaded target object and the promise that waits for the
|
|
220
|
+
* <code>routeMatched</code> event in case of a Component target
|
|
200
221
|
* @private
|
|
201
222
|
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
223
|
+
load: function(oTargetCreateInfo) {
|
|
224
|
+
return this._load(oTargetCreateInfo)
|
|
225
|
+
.then(function (oLoadedTarget) {
|
|
226
|
+
return {
|
|
227
|
+
object: oLoadedTarget,
|
|
228
|
+
nestedComponentReady: this.waitForComponentTarget({
|
|
229
|
+
target: oLoadedTarget,
|
|
230
|
+
createInfo: oTargetCreateInfo
|
|
231
|
+
})
|
|
232
|
+
};
|
|
233
|
+
}.bind(this));
|
|
234
|
+
},
|
|
208
235
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
236
|
+
/**
|
|
237
|
+
* Wait for the next <code>routeMatched</code> event from the Component target
|
|
238
|
+
*
|
|
239
|
+
* @param {object} mTargetOptions The option object that contains the loaded target object and the corresponding
|
|
240
|
+
* target create info.
|
|
241
|
+
* @return {Promise} Promise resolving when the first <code>routeMatched</code> event is fired when the target
|
|
242
|
+
* has type "Component" otherwise the Promise resolves immediately
|
|
243
|
+
* @private
|
|
244
|
+
*/
|
|
245
|
+
waitForComponentTarget: function(mTargetOptions) {
|
|
246
|
+
return new Promise(function(resolve, reject) {
|
|
247
|
+
var oLoadedTarget = mTargetOptions.target;
|
|
248
|
+
var oTargetCreateInfo = mTargetOptions.createInfo;
|
|
249
|
+
var bInstantResolve = true;
|
|
250
|
+
|
|
251
|
+
if (oLoadedTarget.isA("sap.ui.core.UIComponent")) {
|
|
252
|
+
var oRouter = oLoadedTarget.getRouter();
|
|
253
|
+
if (oRouter && oLoadedTarget.hasNativeRouter()) {
|
|
254
|
+
var sHash = oRouter.getHashChanger().getHash();
|
|
255
|
+
var oRoute = oRouter.getRouteByHash(sHash);
|
|
256
|
+
var bIgnoreInitialHash = oTargetCreateInfo && oTargetCreateInfo.ignoreInitialHash;
|
|
257
|
+
|
|
258
|
+
if (!oRouter._oConfig.async){
|
|
259
|
+
throw new Error("The router of component '" + oLoadedTarget.getId() +
|
|
260
|
+
"' which is loaded via the target '" + this._oOptions._name +
|
|
261
|
+
"' is defined as synchronous which is not supported using as a nested component.");
|
|
262
|
+
}
|
|
216
263
|
|
|
217
|
-
|
|
264
|
+
if (oRouter._oOwner && oTargetCreateInfo) {
|
|
265
|
+
// update the flag once the component is displayed again after it's already loaded
|
|
266
|
+
oRouter._oOwner._bRoutingPropagateTitle = oTargetCreateInfo.propagateTitle;
|
|
267
|
+
}
|
|
218
268
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
269
|
+
// TODO: offer getter for target info
|
|
270
|
+
//
|
|
271
|
+
// The router is normally initialized in the UIComponent.prototype.init function and the
|
|
272
|
+
// init function should be already called before it reaches this place which means that the
|
|
273
|
+
// router is initialized in most of the cases. If a router is already initialized, we still
|
|
274
|
+
// need to check whether the route match process is finished. If it's not finished, we are
|
|
275
|
+
// sure that there will be a "routeMatched" event fired and we can wait for it.
|
|
276
|
+
if (!bIgnoreInitialHash && (!oRouter.isInitialized() || oRouter._bMatchingProcessStarted) && oRoute && oRoute._oConfig.target) {
|
|
277
|
+
bInstantResolve = false;
|
|
278
|
+
oRouter.attachRouteMatched(resolve);
|
|
279
|
+
}
|
|
280
|
+
if (oRouter.isStopped()) {
|
|
281
|
+
// initialize the router in nested component
|
|
282
|
+
// if it has been previously stopped
|
|
283
|
+
oRouter.initialize(bIgnoreInitialHash);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
225
286
|
}
|
|
226
|
-
pLoaded = this._load(oTargetCreateInfo).then(function (oObject) {
|
|
227
|
-
if (oObject.isA("sap.ui.core.UIComponent")) {
|
|
228
|
-
var oRouter = oObject.getRouter();
|
|
229
|
-
if (oRouter && oObject.hasNativeRouter()) {
|
|
230
|
-
var sHash = oRouter.getHashChanger().getHash();
|
|
231
|
-
var oRoute = oRouter.getRouteByHash(sHash);
|
|
232
|
-
var bIgnoreInitialHash = oTargetCreateInfo && oTargetCreateInfo.ignoreInitialHash;
|
|
233
|
-
|
|
234
|
-
if (!oRouter._oConfig.async){
|
|
235
|
-
throw new Error("The router of component '" + oObject.getId() +
|
|
236
|
-
"' which is loaded via the target '" + that._oOptions._name +
|
|
237
|
-
"' is defined as synchronous which is not supported using as a nested component.");
|
|
238
|
-
}
|
|
239
287
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
288
|
+
if (bInstantResolve) {
|
|
289
|
+
resolve();
|
|
290
|
+
}
|
|
291
|
+
}.bind(this));
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Find the container control in the following order:
|
|
296
|
+
* <ul>
|
|
297
|
+
* <li>Within the parent target in case <code>oParentInfo</code> is given</li>
|
|
298
|
+
* <li>Within the root view of the owner component</li>
|
|
299
|
+
* <li>Using the given control ID in the global scope</li>
|
|
300
|
+
* </ul>
|
|
301
|
+
*
|
|
302
|
+
* @param {object} [oParentInfo] The view information from the displayed parent target
|
|
303
|
+
* @return {Promise} Promise resolving with the container control
|
|
304
|
+
* @private
|
|
305
|
+
*/
|
|
306
|
+
resolveContainerControl: function(oParentInfo) {
|
|
307
|
+
// use a Promise.resovle() to delay the container resolve to occur after the current call stack because the
|
|
308
|
+
// oOptions.rootView can be available after the current call stack.
|
|
309
|
+
return Promise.resolve().then(function() {
|
|
310
|
+
oParentInfo = oParentInfo || {};
|
|
311
|
+
|
|
312
|
+
var oOptions = this._oOptions;
|
|
313
|
+
var vValid = this._isValid(oParentInfo);
|
|
314
|
+
var sErrorMessage;
|
|
315
|
+
|
|
316
|
+
// validate config and log errors if necessary
|
|
317
|
+
if (vValid !== true) {
|
|
318
|
+
sErrorMessage = vValid;
|
|
319
|
+
return this._refuseInvalidTarget(oOptions._name, sErrorMessage);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
var oViewContainingTheControl = oParentInfo.view,
|
|
323
|
+
oControl = oParentInfo.control,
|
|
324
|
+
pViewContainingTheControl,
|
|
325
|
+
pContainerControl;
|
|
326
|
+
|
|
327
|
+
// if the parent target loads a component, the oViewContainingTheControl is an instance of
|
|
328
|
+
// ComponentContainer. The root control of the component should be retrieved and set as
|
|
329
|
+
// oViewContainingTheControl
|
|
330
|
+
if (oViewContainingTheControl && oViewContainingTheControl.isA("sap.ui.core.ComponentContainer")) {
|
|
331
|
+
oViewContainingTheControl = oViewContainingTheControl.getComponentInstance().getRootControl();
|
|
332
|
+
}
|
|
244
333
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
|
|
254
|
-
|
|
334
|
+
//no parent view - see if container can be found by using oOptions.controlId under oOptions.rootView
|
|
335
|
+
if (!oViewContainingTheControl && oOptions.rootView) {
|
|
336
|
+
// oOptions.rootView can be either an id or a promise that resolves with the id
|
|
337
|
+
pViewContainingTheControl = Promise.resolve(oOptions.rootView)
|
|
338
|
+
.then(function(oRootViewId) {
|
|
339
|
+
var oView;
|
|
340
|
+
|
|
341
|
+
if (oRootViewId) {
|
|
342
|
+
oView = sap.ui.getCore().byId(oRootViewId);
|
|
343
|
+
oOptions.rootView = oRootViewId;
|
|
255
344
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
345
|
+
|
|
346
|
+
if (!oView) {
|
|
347
|
+
sErrorMessage = "Did not find the root view with the id " + oOptions.rootView;
|
|
348
|
+
return this._refuseInvalidTarget(oOptions._name, sErrorMessage);
|
|
349
|
+
} else {
|
|
350
|
+
return oView;
|
|
260
351
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
352
|
+
}.bind(this));
|
|
353
|
+
} else {
|
|
354
|
+
pViewContainingTheControl = Promise.resolve(oViewContainingTheControl);
|
|
355
|
+
}
|
|
263
356
|
|
|
264
|
-
|
|
265
|
-
|
|
357
|
+
pViewContainingTheControl = pViewContainingTheControl.then(function(oView) {
|
|
358
|
+
if (oView && oView.isA("sap.ui.core.mvc.View")) {
|
|
359
|
+
return oView.loaded();
|
|
360
|
+
} else {
|
|
361
|
+
return oView;
|
|
266
362
|
}
|
|
267
|
-
return oObject;
|
|
268
363
|
});
|
|
269
|
-
// when target information is given
|
|
270
|
-
oSequencePromise = oSequencePromise
|
|
271
|
-
.then(function(oParentInfo) {
|
|
272
|
-
oParentInfo = oParentInfo || {};
|
|
273
364
|
|
|
274
|
-
|
|
365
|
+
if (oOptions.controlId) {
|
|
366
|
+
pContainerControl = pViewContainingTheControl.then(function(oContainerView) {
|
|
367
|
+
var oContainerControl;
|
|
275
368
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
sErrorMessage = vValid;
|
|
279
|
-
return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
|
|
369
|
+
if (oContainerView) {
|
|
370
|
+
oContainerControl = oContainerView.byId(oOptions.controlId);
|
|
280
371
|
}
|
|
281
372
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
pContainerControl;
|
|
286
|
-
|
|
287
|
-
// if the parent target loads a component, the oViewContainingTheControl is an instance of
|
|
288
|
-
// ComponentContainer. The root control of the component should be retrieved and set as
|
|
289
|
-
// oViewContainingTheControl
|
|
290
|
-
if (oViewContainingTheControl && oViewContainingTheControl.isA("sap.ui.core.ComponentContainer")) {
|
|
291
|
-
oViewContainingTheControl = oViewContainingTheControl.getComponentInstance().getRootControl();
|
|
373
|
+
if (!oContainerControl) {
|
|
374
|
+
//Test if control exists in core (without prefix) since it was not found in the parent or root view
|
|
375
|
+
oContainerControl = sap.ui.getCore().byId(oOptions.controlId);
|
|
292
376
|
}
|
|
293
377
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
var oView;
|
|
300
|
-
|
|
301
|
-
if (oRootViewId) {
|
|
302
|
-
oView = sap.ui.getCore().byId(oRootViewId);
|
|
303
|
-
oOptions.rootView = oRootViewId;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
if (!oView) {
|
|
307
|
-
sErrorMessage = "Did not find the root view with the id " + oOptions.rootView;
|
|
308
|
-
return that._refuseInvalidTarget(oOptions._name, sErrorMessage);
|
|
309
|
-
} else {
|
|
310
|
-
return oView;
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
} else {
|
|
314
|
-
pViewContainingTheControl = Promise.resolve(oViewContainingTheControl);
|
|
315
|
-
}
|
|
378
|
+
return oContainerControl;
|
|
379
|
+
});
|
|
380
|
+
} else {
|
|
381
|
+
pContainerControl = Promise.resolve(oControl);
|
|
382
|
+
}
|
|
316
383
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
384
|
+
return pContainerControl.then(function(oContainerControl) {
|
|
385
|
+
if (!oContainerControl) {
|
|
386
|
+
sErrorMessage = "Control with ID " + oOptions.controlId + " could not be found";
|
|
387
|
+
return this._refuseInvalidTarget(oOptions._name, sErrorMessage);
|
|
388
|
+
} else {
|
|
389
|
+
return oContainerControl;
|
|
390
|
+
}
|
|
391
|
+
}.bind(this));
|
|
392
|
+
}.bind(this));
|
|
393
|
+
},
|
|
324
394
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
395
|
+
/**
|
|
396
|
+
* Create and display the placeholder on the respective container
|
|
397
|
+
*
|
|
398
|
+
* @param {object} oTargetCreateInfo Object containing the target create info
|
|
399
|
+
* @param {object} oContainerControl The container control
|
|
400
|
+
* @returns {object} the view info object
|
|
401
|
+
* @private
|
|
402
|
+
*/
|
|
403
|
+
displayPlaceholder: function(oTargetCreateInfo, oContainerControl) {
|
|
404
|
+
var oObject,
|
|
405
|
+
oOptions = this._oOptions,
|
|
406
|
+
bIsComponentTarget = oOptions.type === "Component",
|
|
407
|
+
bHasPlaceholderConfig = false,
|
|
408
|
+
oPlaceholderConfig = oTargetCreateInfo.placeholder || oOptions.placeholder || {},
|
|
409
|
+
pPlaceholder;
|
|
410
|
+
|
|
411
|
+
if (Placeholder.hasProviders()) {
|
|
412
|
+
Object.assign(oPlaceholderConfig, Placeholder.getPlaceholderFromProviders({
|
|
413
|
+
name: oOptions.name,
|
|
414
|
+
type: oOptions.type
|
|
415
|
+
}));
|
|
416
|
+
}
|
|
328
417
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
418
|
+
if (Object.keys(oPlaceholderConfig).length > 0) {
|
|
419
|
+
if (oPlaceholderConfig.autoClose === undefined) {
|
|
420
|
+
oPlaceholderConfig.autoClose = true;
|
|
421
|
+
}
|
|
422
|
+
bHasPlaceholderConfig = true;
|
|
423
|
+
}
|
|
332
424
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
425
|
+
if (bIsComponentTarget) {
|
|
426
|
+
var oOwnerComponent = this._oCache._oComponent;
|
|
427
|
+
var sComponentContainerId = oTargetCreateInfo.componentId + "-container";
|
|
337
428
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
} else {
|
|
341
|
-
pContainerControl = Promise.resolve(oControl);
|
|
342
|
-
}
|
|
429
|
+
oObject = (oOwnerComponent && oOwnerComponent.byId(sComponentContainerId))
|
|
430
|
+
|| sap.ui.getCore().byId(sComponentContainerId);
|
|
343
431
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
432
|
+
if (!oObject) {
|
|
433
|
+
// defaults mixed in with configured settings
|
|
434
|
+
var oContainerOptions = Object.assign({
|
|
435
|
+
height: "100%",
|
|
436
|
+
width: "100%",
|
|
437
|
+
lifecycle: ComponentLifecycle.Application
|
|
438
|
+
}, oOptions.containerOptions);
|
|
439
|
+
|
|
440
|
+
if (oOwnerComponent) {
|
|
441
|
+
oOwnerComponent.runAsOwner(function() {
|
|
442
|
+
oObject = new ComponentContainer(oOwnerComponent.createId(sComponentContainerId), oContainerOptions);
|
|
351
443
|
});
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
if (Placeholder.hasProviders()) {
|
|
358
|
-
Object.assign(oPlaceholderConfig, Placeholder.getPlaceholderFromProviders({
|
|
359
|
-
name: that._oOptions.name,
|
|
360
|
-
type: that._oOptions.type
|
|
361
|
-
})
|
|
362
|
-
);
|
|
363
|
-
}
|
|
444
|
+
} else {
|
|
445
|
+
oObject = new ComponentContainer(sComponentContainerId, oContainerOptions);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
364
448
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
449
|
+
// set container object only if placeholder config is available
|
|
450
|
+
if (bHasPlaceholderConfig) {
|
|
451
|
+
oPlaceholderConfig.container = oObject;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
371
454
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
oObject = (oOwnerComponent && oOwnerComponent.byId(sComponentContainerId))
|
|
377
|
-
|| sap.ui.getCore().byId(sComponentContainerId);
|
|
378
|
-
|
|
379
|
-
if (!oObject) {
|
|
380
|
-
// defaults mixed in with configured settings
|
|
381
|
-
var oContainerOptions = Object.assign({
|
|
382
|
-
height: "100%",
|
|
383
|
-
width: "100%",
|
|
384
|
-
lifecycle: ComponentLifecycle.Application
|
|
385
|
-
}, oOptions.containerOptions);
|
|
386
|
-
|
|
387
|
-
if (oOwnerComponent) {
|
|
388
|
-
oOwnerComponent.runAsOwner(function() {
|
|
389
|
-
oObject = new ComponentContainer(oOwnerComponent.createId(sComponentContainerId), oContainerOptions);
|
|
390
|
-
});
|
|
391
|
-
} else {
|
|
392
|
-
oObject = new ComponentContainer(sComponentContainerId, oContainerOptions);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
455
|
+
// for view targets use container control to display placeholder
|
|
456
|
+
if (bHasPlaceholderConfig && oContainerControl.isA("sap.ui.core.IPlaceholderSupport")) {
|
|
457
|
+
oPlaceholderConfig.container = oContainerControl;
|
|
458
|
+
}
|
|
395
459
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
}
|
|
460
|
+
// Placeholder creation
|
|
461
|
+
if (oPlaceholderConfig.container && !oTargetCreateInfo.repeatedRoute) {
|
|
462
|
+
oPlaceholderConfig.aggregation = this._oOptions.controlAggregation;
|
|
401
463
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
oPlaceholderConfig.container = oContainerControl;
|
|
405
|
-
}
|
|
464
|
+
var oCreateOptions = this._getCreateOptions(oTargetCreateInfo);
|
|
465
|
+
var oCachedObject = this._oCache.fetch(oCreateOptions, this._oOptions.type);
|
|
406
466
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
467
|
+
if (oCachedObject && bIsComponentTarget) {
|
|
468
|
+
// for type "Component", the object that is saved in the placeholder config should be
|
|
469
|
+
// the component container instead of the component
|
|
470
|
+
oPlaceholderConfig.object = oObject;
|
|
471
|
+
} else {
|
|
472
|
+
oPlaceholderConfig.object = oCachedObject;
|
|
473
|
+
}
|
|
410
474
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
475
|
+
if (oPlaceholderConfig.html) {
|
|
476
|
+
oPlaceholderConfig.placeholder = new Placeholder({
|
|
477
|
+
html: oPlaceholderConfig.html
|
|
478
|
+
});
|
|
479
|
+
}
|
|
414
480
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
} else {
|
|
420
|
-
oPlaceholderConfig.object = oCachedObject;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
481
|
+
if (oPlaceholderConfig.placeholder) {
|
|
482
|
+
pPlaceholder = this.showPlaceholder(oPlaceholderConfig);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
423
485
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
486
|
+
pPlaceholder = pPlaceholder || Promise.resolve();
|
|
487
|
+
|
|
488
|
+
// wait for placeholder to load
|
|
489
|
+
return pPlaceholder.then(function(sPlaceholderContent) {
|
|
490
|
+
// returning view info object
|
|
491
|
+
return {
|
|
492
|
+
containerControl: oContainerControl,
|
|
493
|
+
object: oObject,
|
|
494
|
+
placeholderConfig: oPlaceholderConfig,
|
|
495
|
+
placeholderShown: !!sPlaceholderContent
|
|
496
|
+
};
|
|
497
|
+
});
|
|
498
|
+
},
|
|
429
499
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
500
|
+
/**
|
|
501
|
+
* Here the magic happens - recursion + placement + view creation needs to be refactored
|
|
502
|
+
*
|
|
503
|
+
* @param {object} [vData] an object that will be passed to the display event in the data property. If the
|
|
504
|
+
* target has parents, the data will also be passed to them.
|
|
505
|
+
* @param {Promise} oSequencePromise Promise chain for resolution in the correct order
|
|
506
|
+
* @param {object} oTargetCreateInfo Additional information for the component creation. Currently the object only contains the prefix for the routerHashChanger
|
|
507
|
+
* @return {Promise} resolves with {name: *, view: *, control: *} if the target can be successfully displayed otherwise it rejects with an error message
|
|
508
|
+
* @private
|
|
509
|
+
*/
|
|
510
|
+
_place: function (vData, oSequencePromise, oTargetCreateInfo) {
|
|
511
|
+
var oOptions = this._oOptions,
|
|
512
|
+
that = this,
|
|
513
|
+
sErrorMessage,
|
|
514
|
+
bIsComponentTarget = oOptions.type === "Component";
|
|
434
515
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
516
|
+
var pLoaded, /* target is loaded and promise for waiting on "routeMatched" event in nested component is ready*/
|
|
517
|
+
pContainerReady; /* container control and placeholder ready */
|
|
518
|
+
|
|
519
|
+
if (vData instanceof Promise) {
|
|
520
|
+
oTargetCreateInfo = oSequencePromise;
|
|
521
|
+
oSequencePromise = vData;
|
|
522
|
+
vData = undefined;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
oTargetCreateInfo = oTargetCreateInfo || {};
|
|
526
|
+
|
|
527
|
+
if (bIsComponentTarget) {
|
|
528
|
+
oTargetCreateInfo.componentId = oOptions.id || ManagedObjectMetadata.uid("uicomponent");
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if ((oOptions.name || oOptions.usage) && oOptions.type) {
|
|
532
|
+
// target loading
|
|
533
|
+
pLoaded = this.load(oTargetCreateInfo);
|
|
534
|
+
|
|
535
|
+
// Either if parent available, then we need to wait until the parent got displayed or
|
|
536
|
+
// if no target info is given, then we need to wait for the oSequencePromise to be resolved
|
|
537
|
+
if (this._oParent || oTargetCreateInfo.legacy) {
|
|
538
|
+
// resolve container control and placeholder creation
|
|
539
|
+
pContainerReady = oSequencePromise.then(this.resolveContainerControl.bind(this));
|
|
540
|
+
} else {
|
|
541
|
+
// no need to wait for oSequencePromise, resolve container control in parallel
|
|
542
|
+
pContainerReady = this.resolveContainerControl();
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
pContainerReady = pContainerReady.then(this.displayPlaceholder.bind(this, oTargetCreateInfo));
|
|
546
|
+
|
|
547
|
+
// when target information is given
|
|
548
|
+
oSequencePromise = Promise.all([pLoaded, pContainerReady, oSequencePromise])
|
|
549
|
+
// prepareTitleProvider
|
|
550
|
+
.then(function(aArguments) {
|
|
551
|
+
var oObject = aArguments[0].object,
|
|
552
|
+
oViewInfo = aArguments[1],
|
|
553
|
+
oView, oRootControl;
|
|
554
|
+
|
|
555
|
+
oViewInfo.nestedComponentReady = aArguments[0].nestedComponentReady;
|
|
556
|
+
|
|
557
|
+
if (bIsComponentTarget) {
|
|
558
|
+
var fnOriginalDestroy = oObject.destroy;
|
|
559
|
+
oObject.destroy = function () {
|
|
560
|
+
if (fnOriginalDestroy) {
|
|
561
|
+
fnOriginalDestroy.apply(this);
|
|
458
562
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
563
|
+
// destroy the component container when the component is destroyed
|
|
564
|
+
oViewInfo.object.destroy();
|
|
565
|
+
};
|
|
566
|
+
oViewInfo.object.setComponent(oObject);
|
|
567
|
+
|
|
568
|
+
oRootControl = oObject.getRootControl();
|
|
569
|
+
if (oRootControl && oRootControl.isA("sap.ui.core.mvc.View")) {
|
|
570
|
+
oView = oRootControl;
|
|
463
571
|
}
|
|
572
|
+
} else {
|
|
573
|
+
// view
|
|
574
|
+
oViewInfo.object = oObject;
|
|
575
|
+
oView = oObject;
|
|
576
|
+
}
|
|
464
577
|
|
|
465
|
-
|
|
466
|
-
|
|
578
|
+
that._bindTitleInTitleProvider(oView);
|
|
579
|
+
that._addTitleProviderAsDependent(oView);
|
|
467
580
|
|
|
468
|
-
|
|
469
|
-
});
|
|
581
|
+
return oViewInfo;
|
|
470
582
|
})
|
|
583
|
+
// placing the view or component into container
|
|
471
584
|
.then(function(oViewInfo) {
|
|
472
585
|
var oContainerControl = oViewInfo.containerControl,
|
|
473
586
|
oObject = oViewInfo.object;
|
|
@@ -504,7 +617,9 @@ sap.ui.define([
|
|
|
504
617
|
name: oOptions._name,
|
|
505
618
|
view: oObject,
|
|
506
619
|
control: oContainerControl,
|
|
507
|
-
|
|
620
|
+
nestedComponentReady: oViewInfo.nestedComponentReady,
|
|
621
|
+
placeholderConfig: oViewInfo.placeholderConfig,
|
|
622
|
+
placeholderShown: oViewInfo.placeholderShown
|
|
508
623
|
};
|
|
509
624
|
});
|
|
510
625
|
} else {
|
|
@@ -515,33 +630,39 @@ sap.ui.define([
|
|
|
515
630
|
});
|
|
516
631
|
}
|
|
517
632
|
|
|
518
|
-
return
|
|
519
|
-
var
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
view : oObject.isA("sap.ui.core.mvc.View") ? oObject : undefined,
|
|
525
|
-
object: oObject,
|
|
526
|
-
control : oContainerControl,
|
|
527
|
-
config : that._oOptions,
|
|
528
|
-
data: vData,
|
|
529
|
-
routeRelevant: oTargetCreateInfo.routeRelevant
|
|
530
|
-
});
|
|
531
|
-
}
|
|
633
|
+
return oSequencePromise.then(function(oParams) {
|
|
634
|
+
var pNestedComponentReady = oParams.nestedComponentReady || Promise.resolve();
|
|
635
|
+
return pNestedComponentReady.then(function() {
|
|
636
|
+
var oContainerControl = oParams.control,
|
|
637
|
+
oObject = oParams.view,
|
|
638
|
+
oPlaceholderConfig = oParams.placeholderConfig;
|
|
532
639
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
640
|
+
if (oContainerControl && oObject) {
|
|
641
|
+
that.fireDisplay({
|
|
642
|
+
view : oObject.isA("sap.ui.core.mvc.View") ? oObject : undefined,
|
|
643
|
+
object: oObject,
|
|
644
|
+
control : oContainerControl,
|
|
645
|
+
config : that._oOptions,
|
|
646
|
+
data: vData,
|
|
647
|
+
routeRelevant: oTargetCreateInfo.routeRelevant
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
if (oPlaceholderConfig && oPlaceholderConfig.container &&
|
|
652
|
+
oPlaceholderConfig.autoClose && that.hidePlaceholder) {
|
|
653
|
+
that.hidePlaceholder(oPlaceholderConfig);
|
|
654
|
+
}
|
|
537
655
|
|
|
538
|
-
|
|
656
|
+
return oParams;
|
|
657
|
+
});
|
|
539
658
|
});
|
|
540
659
|
},
|
|
541
660
|
|
|
542
661
|
showPlaceholder: function(mSettings) {
|
|
543
662
|
if (mSettings.container && mSettings.container.showPlaceholder) {
|
|
544
|
-
mSettings.container.showPlaceholder(mSettings);
|
|
663
|
+
return mSettings.container.showPlaceholder(mSettings);
|
|
664
|
+
} else {
|
|
665
|
+
return Promise.resolve();
|
|
545
666
|
}
|
|
546
667
|
},
|
|
547
668
|
|