@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
|
@@ -92,7 +92,7 @@ sap.ui.define([
|
|
|
92
92
|
* @extends sap.ui.model.TreeBinding
|
|
93
93
|
* @hideconstructor
|
|
94
94
|
* @public
|
|
95
|
-
* @version 1.
|
|
95
|
+
* @version 1.95.0
|
|
96
96
|
*/
|
|
97
97
|
var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
|
|
98
98
|
|
|
@@ -275,20 +275,24 @@ sap.ui.define([
|
|
|
275
275
|
};
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
|
-
* Returns root contexts for the tree. You can specify the start index and the length for paging
|
|
279
|
-
* This function is not available when the annotation
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* @param {int} [
|
|
283
|
-
*
|
|
284
|
-
* @param {int} [
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
278
|
+
* Returns root contexts for the tree. You can specify the start index and the length for paging
|
|
279
|
+
* requests. This function is not available when the annotation
|
|
280
|
+
* "hierarchy-node-descendant-count-for" is exposed on the service.
|
|
281
|
+
*
|
|
282
|
+
* @param {int} [iStartIndex=0]
|
|
283
|
+
* The start index of the requested contexts
|
|
284
|
+
* @param {int} [iLength=v2.ODataModel.sizeLimit]
|
|
285
|
+
* The requested amount of contexts. If none given, the default value is the size limit of the
|
|
286
|
+
* underlying sap.ui.model.odata.v2.ODataModel instance.
|
|
287
|
+
* @param {int} [iThreshold=0]
|
|
288
|
+
* The number of entities which should be retrieved in addition to the given length. A higher
|
|
289
|
+
* threshold reduces the number of backend requests, yet these request blow up in size, since
|
|
290
|
+
* more data is loaded.
|
|
291
|
+
* @return {sap.ui.model.odata.v2.Context[]}
|
|
292
|
+
* The root contexts for the tree
|
|
288
293
|
* @public
|
|
289
294
|
*/
|
|
290
295
|
ODataTreeBinding.prototype.getRootContexts = function(iStartIndex, iLength, iThreshold) {
|
|
291
|
-
|
|
292
296
|
var sNodeId = null,
|
|
293
297
|
mRequestParameters = {
|
|
294
298
|
numberOfExpandedLevels: this.iNumberOfExpandedLevels
|
|
@@ -348,15 +352,21 @@ sap.ui.define([
|
|
|
348
352
|
};
|
|
349
353
|
|
|
350
354
|
/**
|
|
351
|
-
* Returns the contexts of the child nodes for the given context. This function is not available
|
|
352
|
-
* is exposed on the service.
|
|
353
|
-
*
|
|
354
|
-
* @param {sap.ui.model.Context} oContext
|
|
355
|
-
*
|
|
356
|
-
* @param {int}
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
355
|
+
* Returns the contexts of the child nodes for the given context. This function is not available
|
|
356
|
+
* when the annotation "hierarchy-node-descendant-count-for" is exposed on the service.
|
|
357
|
+
*
|
|
358
|
+
* @param {sap.ui.model.Context} oContext
|
|
359
|
+
* The context for which the child nodes should be retrieved
|
|
360
|
+
* @param {int} iStartIndex
|
|
361
|
+
* The start index of the requested contexts
|
|
362
|
+
* @param {int} iLength
|
|
363
|
+
* The requested amount of contexts
|
|
364
|
+
* @param {int} [iThreshold=0]
|
|
365
|
+
* The maximum number of contexts to read before and after the given range; with this,
|
|
366
|
+
* controls can prefetch data that is likely to be needed soon, e.g. when scrolling down in a
|
|
367
|
+
* table.
|
|
368
|
+
* @return {sap.ui.model.odata.v2.Context[]}
|
|
369
|
+
* The contexts of the child nodes for the given context
|
|
360
370
|
* @public
|
|
361
371
|
*/
|
|
362
372
|
ODataTreeBinding.prototype.getNodeContexts = function(oContext, iStartIndex, iLength, iThreshold) {
|
|
@@ -417,7 +427,7 @@ sap.ui.define([
|
|
|
417
427
|
if (iLength === 0 && this.oFinalLengths[sNodeKey]) {
|
|
418
428
|
return false;
|
|
419
429
|
}
|
|
420
|
-
// leaves do not have
|
|
430
|
+
// leaves do not have children, only "expanded" and "collapsed" nodes
|
|
421
431
|
// Beware: the drilldownstate may be undefined/empty string,
|
|
422
432
|
// in case the entity (oContext) has no value for the drilldown state property
|
|
423
433
|
if (sDrilldownState === "expanded" || sDrilldownState === "collapsed") {
|
|
@@ -479,16 +489,22 @@ sap.ui.define([
|
|
|
479
489
|
};
|
|
480
490
|
|
|
481
491
|
/**
|
|
482
|
-
* Gets or loads all contexts for a specified node id (dependent on mode)
|
|
483
|
-
*
|
|
484
|
-
* @param {string} sNodeId
|
|
485
|
-
*
|
|
486
|
-
* @param {int}
|
|
487
|
-
*
|
|
488
|
-
* @param {
|
|
489
|
-
*
|
|
490
|
-
* @
|
|
491
|
-
*
|
|
492
|
+
* Gets or loads all contexts for a specified node id (dependent on mode).
|
|
493
|
+
*
|
|
494
|
+
* @param {string} sNodeId
|
|
495
|
+
* The value of the hierarchy node property on which a parent node filter will be performed
|
|
496
|
+
* @param {int} iStartIndex
|
|
497
|
+
* The start index of the page
|
|
498
|
+
* @param {int} iLength
|
|
499
|
+
* The length of the page
|
|
500
|
+
* @param {int} iThreshold
|
|
501
|
+
* The additionally loaded entities
|
|
502
|
+
* @param {object} mRequestParameters
|
|
503
|
+
* The additional request parameters
|
|
504
|
+
* @param {string} mRequestParameters.navPath
|
|
505
|
+
* The navigation path
|
|
506
|
+
* @return {sap.ui.model.odata.v2.Context[]}
|
|
507
|
+
* Contexts for the given node ID
|
|
492
508
|
* @private
|
|
493
509
|
*/
|
|
494
510
|
ODataTreeBinding.prototype._getContextsForNodeId = function(sNodeId, iStartIndex, iLength, iThreshold, mRequestParameters) {
|
|
@@ -869,7 +885,7 @@ sap.ui.define([
|
|
|
869
885
|
* Retrieves parent ids from a given data set
|
|
870
886
|
*
|
|
871
887
|
* @param {Array} aData Lookup array to search for parent ids
|
|
872
|
-
* @param {
|
|
888
|
+
* @param {boolean} bExcludeRootNodes Can be set to exclude root node elements
|
|
873
889
|
* @returns {Array} Array of all parent ids
|
|
874
890
|
*
|
|
875
891
|
* @private
|
|
@@ -1058,8 +1074,6 @@ sap.ui.define([
|
|
|
1058
1074
|
* @param {object} mParameters additional request parameters
|
|
1059
1075
|
* @param {object} mParameters.navPath the navigation path
|
|
1060
1076
|
*
|
|
1061
|
-
* @return {sap.ui.model.Context[]} Array of contexts
|
|
1062
|
-
*
|
|
1063
1077
|
* @private
|
|
1064
1078
|
*/
|
|
1065
1079
|
ODataTreeBinding.prototype._loadSubNodes = function(sNodeId, iStartIndex, iLength, iThreshold, aParams, mParameters, oRequestedSection) {
|
|
@@ -1231,7 +1245,7 @@ sap.ui.define([
|
|
|
1231
1245
|
for (var k = 0; k < oData.results.length; k++) {
|
|
1232
1246
|
oDataObj = oData.results[k];
|
|
1233
1247
|
var sDataKey = oDataObj[that.oTreeProperties["hierarchy-node-for"]];
|
|
1234
|
-
// sanity check: if we have duplicate keys, the data is messed up. Has already
|
|
1248
|
+
// sanity check: if we have duplicate keys, the data is messed up. Has already happened...
|
|
1235
1249
|
if (mParentIds[sDataKey]) {
|
|
1236
1250
|
Log.warning("ODataTreeBinding - Duplicate data entry for key: " + sDataKey + "!");
|
|
1237
1251
|
}
|
|
@@ -1489,23 +1503,29 @@ sap.ui.define([
|
|
|
1489
1503
|
/**
|
|
1490
1504
|
* Applies the given filters to the ODataTreeBinding.
|
|
1491
1505
|
*
|
|
1492
|
-
* Please note that filters of type <code>FilterType.Control</code> are not supported for
|
|
1493
|
-
*
|
|
1494
|
-
* of type <code>Application</code>
|
|
1495
|
-
*
|
|
1506
|
+
* Please note that filters of type <code>FilterType.Control</code> are not supported for
|
|
1507
|
+
* <code>OperationMode.Server</code>,
|
|
1508
|
+
* here only filters of type <code>FilterType.Application</code> are allowed. Filters given via
|
|
1509
|
+
* {@link sap.ui.model.odata.v2.ODataModel#bindTree} are always
|
|
1510
|
+
* of type <code>Application</code> and will be sent with every back-end request.
|
|
1511
|
+
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
1496
1512
|
*
|
|
1497
|
-
* Since 1.34.0, complete client-side filtering is supported for
|
|
1498
|
-
* <code>OperationMode.
|
|
1513
|
+
* Since 1.34.0, complete client-side filtering is supported for
|
|
1514
|
+
* <code>OperationMode.Client</code> and also in <code>OperationMode.Auto</code> if the
|
|
1515
|
+
* back-end count is lower than the threshold.
|
|
1499
1516
|
* In this case, all types of filters will be applied on the client.
|
|
1500
|
-
* See also: {@link sap.ui.model.odata.OperationMode.Auto}
|
|
1501
|
-
*
|
|
1502
|
-
* For the <code>OperationMode.Client</code> and <code>OperationMode.Auto</code>, you may also
|
|
1503
|
-
*
|
|
1504
|
-
* <code>Application</code> will always be applied
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
1508
|
-
* @param {sap.ui.model.
|
|
1517
|
+
* See also: {@link sap.ui.model.odata.OperationMode.Auto} and {@link sap.ui.model.FilterType}.
|
|
1518
|
+
*
|
|
1519
|
+
* For the <code>OperationMode.Client</code> and <code>OperationMode.Auto</code>, you may also
|
|
1520
|
+
* specify the <code>useServersideApplicationFilters</code> binding parameter when creating an
|
|
1521
|
+
* instance. If it is set, the filters of type <code>Application</code> will always be applied
|
|
1522
|
+
* on the back end and trigger an OData request.
|
|
1523
|
+
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
1524
|
+
*
|
|
1525
|
+
* @param {sap.ui.model.Filter[]|sap.ui.model.Filter} aFilters
|
|
1526
|
+
* Filter or array of filters to apply
|
|
1527
|
+
* @param {sap.ui.model.FilterType} sFilterType
|
|
1528
|
+
* Type of the filter which should be adjusted. If it is not given,
|
|
1509
1529
|
* the type <code>FilterType.Control</code> is assumed
|
|
1510
1530
|
* @return {this} Returns <code>this</code> to facilitate method chaining
|
|
1511
1531
|
* @see sap.ui.model.TreeBinding.prototype.filter
|
|
@@ -1712,7 +1732,7 @@ sap.ui.define([
|
|
|
1712
1732
|
var oPropertyMetadata, sType;
|
|
1713
1733
|
|
|
1714
1734
|
if (!oEntityType) {
|
|
1715
|
-
Log.warning("Cannot determine sort comparators, as entitytype of the collection is
|
|
1735
|
+
Log.warning("Cannot determine sort comparators, as entitytype of the collection is unknown!");
|
|
1716
1736
|
return;
|
|
1717
1737
|
}
|
|
1718
1738
|
each(aSorters, function(i, oSorter) {
|
|
@@ -1877,7 +1897,7 @@ sap.ui.define([
|
|
|
1877
1897
|
};
|
|
1878
1898
|
|
|
1879
1899
|
// Checks if no tree annotations are missing
|
|
1880
|
-
// true:
|
|
1900
|
+
// true: everything is fine
|
|
1881
1901
|
// false: we can't proceed
|
|
1882
1902
|
var fnSanityCheckTreeAnnotations = function () {
|
|
1883
1903
|
|
|
@@ -1896,7 +1916,7 @@ sap.ui.define([
|
|
|
1896
1916
|
} else if (iFoundAnnotations > 0 && iFoundAnnotations < iMaxAnnotationLength) {
|
|
1897
1917
|
Log.warning("Incomplete hierarchy tree annotations. Please check your service metadata definition!");
|
|
1898
1918
|
}
|
|
1899
|
-
//if no annotations where found -> we are in the
|
|
1919
|
+
//if no annotations where found -> we are in the navigation property mode
|
|
1900
1920
|
return false;
|
|
1901
1921
|
};
|
|
1902
1922
|
|
|
@@ -1941,41 +1961,41 @@ sap.ui.define([
|
|
|
1941
1961
|
};
|
|
1942
1962
|
|
|
1943
1963
|
/**
|
|
1944
|
-
*
|
|
1945
|
-
*
|
|
1946
|
-
* metadata is loaded.
|
|
1964
|
+
* Initializes the binding. Fires a refresh event once initialization is completed in case the
|
|
1965
|
+
* binding is resolved, or immediately in case it is unresolved.
|
|
1947
1966
|
*
|
|
1948
1967
|
* @returns {sap.ui.model.odata.v2.ODataTreeBinding} The binding instance
|
|
1968
|
+
*
|
|
1949
1969
|
* @public
|
|
1950
1970
|
*/
|
|
1951
|
-
ODataTreeBinding.prototype.initialize = function() {
|
|
1971
|
+
ODataTreeBinding.prototype.initialize = function () {
|
|
1952
1972
|
if (this.oModel.oMetadata && this.oModel.oMetadata.isLoaded() && this.bInitial) {
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
this._initialize();
|
|
1973
|
+
if (this.isResolved()) {
|
|
1974
|
+
this._initialize(this._fireRefresh.bind(this, {reason : ChangeReason.Refresh}));
|
|
1975
|
+
} else {
|
|
1976
|
+
this._fireRefresh({reason : ChangeReason.Refresh});
|
|
1958
1977
|
}
|
|
1959
|
-
|
|
1960
|
-
this._fireRefresh({reason: ChangeReason.Refresh});
|
|
1961
1978
|
}
|
|
1962
1979
|
return this;
|
|
1963
1980
|
};
|
|
1964
1981
|
|
|
1965
1982
|
/**
|
|
1966
1983
|
* Private initialize.
|
|
1967
|
-
* Triggers metadata checks for annotations and
|
|
1984
|
+
* Triggers metadata checks for annotations and applies adapters if necessary.
|
|
1985
|
+
*
|
|
1986
|
+
* @param {function} fnFireEvent
|
|
1987
|
+
* A function which fires an event once the adapter has been applied
|
|
1988
|
+
* @returns {sap.ui.model.odata.v2.ODataTreeBinding}
|
|
1989
|
+
* The binding instance
|
|
1990
|
+
*
|
|
1968
1991
|
* @private
|
|
1969
1992
|
*/
|
|
1970
|
-
ODataTreeBinding.prototype._initialize = function () {
|
|
1993
|
+
ODataTreeBinding.prototype._initialize = function (fnFireEvent) {
|
|
1971
1994
|
this.bInitial = false;
|
|
1972
1995
|
this.bHasTreeAnnotations = this._hasTreeAnnotations();
|
|
1973
1996
|
this.oEntityType = this._getEntityType();
|
|
1974
|
-
|
|
1975
|
-
// build up the $select, based on the given select-properties and the known/necessary annotated properties
|
|
1976
1997
|
this._processSelectParameters();
|
|
1977
|
-
|
|
1978
|
-
this._applyAdapter();
|
|
1998
|
+
this._applyAdapter(fnFireEvent);
|
|
1979
1999
|
|
|
1980
2000
|
return this;
|
|
1981
2001
|
};
|
|
@@ -1984,9 +2004,10 @@ sap.ui.define([
|
|
|
1984
2004
|
* Sets the binding context.
|
|
1985
2005
|
*
|
|
1986
2006
|
* @param {sap.ui.model.Context} [oContext] The new binding context
|
|
2007
|
+
*
|
|
1987
2008
|
* @private
|
|
1988
2009
|
*/
|
|
1989
|
-
ODataTreeBinding.prototype.setContext = function(oContext) {
|
|
2010
|
+
ODataTreeBinding.prototype.setContext = function (oContext) {
|
|
1990
2011
|
if (oContext && oContext.isPreliminary() && !this.bUsePreliminaryContext) {
|
|
1991
2012
|
return;
|
|
1992
2013
|
}
|
|
@@ -1999,21 +2020,17 @@ sap.ui.define([
|
|
|
1999
2020
|
|
|
2000
2021
|
if (Context.hasChanged(this.oContext, oContext)) {
|
|
2001
2022
|
this.oContext = oContext;
|
|
2002
|
-
|
|
2003
2023
|
if (!this.isRelative()) {
|
|
2004
2024
|
return;
|
|
2005
2025
|
}
|
|
2006
2026
|
|
|
2007
2027
|
if (this.getResolvedPath()) {
|
|
2008
2028
|
this.resetData();
|
|
2009
|
-
this._initialize(
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
this.resetData();
|
|
2015
|
-
this._fireChange({ reason: ChangeReason.Context });
|
|
2016
|
-
}
|
|
2029
|
+
this._initialize(this._fireChange.bind(this, {reason : ChangeReason.Context}));
|
|
2030
|
+
} else if (!isEmptyObject(this.oAllKeys) || !isEmptyObject(this.oKeys)
|
|
2031
|
+
|| !isEmptyObject(this._aNodes)) { // binding is now unresolved, but has data
|
|
2032
|
+
this.resetData();
|
|
2033
|
+
this._fireChange({reason : ChangeReason.Context});
|
|
2017
2034
|
}
|
|
2018
2035
|
}
|
|
2019
2036
|
};
|
|
@@ -2064,57 +2081,68 @@ sap.ui.define([
|
|
|
2064
2081
|
};
|
|
2065
2082
|
|
|
2066
2083
|
/**
|
|
2067
|
-
* Applies a TreeBindingAdapter, depending on the metadata.
|
|
2068
|
-
*
|
|
2069
|
-
*
|
|
2084
|
+
* Applies a TreeBindingAdapter, depending on the metadata. Either a hierarchical paging adapter
|
|
2085
|
+
* (nav-props & annotations) or a flat paging adapter (magnitude) is applied.
|
|
2086
|
+
*
|
|
2087
|
+
* @param {function} fnFireEvent A function which is called after the adapter has been applied
|
|
2070
2088
|
* @private
|
|
2071
2089
|
*/
|
|
2072
|
-
ODataTreeBinding.prototype._applyAdapter = function () {
|
|
2073
|
-
var
|
|
2074
|
-
|
|
2075
|
-
|
|
2090
|
+
ODataTreeBinding.prototype._applyAdapter = function (fnFireEvent) {
|
|
2091
|
+
var sAbsolutePath, oEntityType, i, j, sKeyProperty, sName,
|
|
2092
|
+
sAdapterModuleName = "sap/ui/model/odata/ODataTreeBindingAdapter",
|
|
2093
|
+
sMagnitudeAnnotation = "hierarchy-node-descendant-count-for",
|
|
2094
|
+
sPreorderRankAnnotation = "hierarchy-preorder-rank-for",
|
|
2095
|
+
sSiblingRankAnnotation = "hierarchy-sibling-rank-for",
|
|
2096
|
+
that = this;
|
|
2076
2097
|
|
|
2077
|
-
if (this.bHasTreeAnnotations) {
|
|
2098
|
+
if (!this.bHasTreeAnnotations && !this.oNavigationPaths) {
|
|
2099
|
+
Log.error("Neither hierarchy annotations, "
|
|
2100
|
+
+ "nor navigation properties are specified to build the tree.", this);
|
|
2101
|
+
return;
|
|
2102
|
+
}
|
|
2078
2103
|
|
|
2079
|
-
|
|
2104
|
+
if (this.bHasTreeAnnotations) {
|
|
2105
|
+
sAbsolutePath = this.getResolvedPath();
|
|
2080
2106
|
// remove url parameters if any to get correct path for entity type resolving
|
|
2081
2107
|
if (sAbsolutePath.indexOf("?") !== -1) {
|
|
2082
2108
|
sAbsolutePath = sAbsolutePath.split("?")[0];
|
|
2083
2109
|
}
|
|
2084
|
-
|
|
2085
|
-
var that = this;
|
|
2086
|
-
|
|
2110
|
+
oEntityType = this.oModel.oMetadata._getEntityTypeByPath(sAbsolutePath);
|
|
2087
2111
|
//Check if all required properties are available
|
|
2088
2112
|
each(oEntityType.property, function(iIndex, oProperty) {
|
|
2089
2113
|
if (!oProperty.extensions) {
|
|
2090
2114
|
return true;
|
|
2091
2115
|
}
|
|
2092
2116
|
each(oProperty.extensions, function(iIndex, oExtension) {
|
|
2093
|
-
|
|
2117
|
+
sName = oExtension.name;
|
|
2094
2118
|
if (oExtension.namespace === that.oModel.oMetadata.mNamespaces["sap"] &&
|
|
2095
|
-
(sName == sMagnitudeAnnotation || sName == sSiblingRankAnnotation
|
|
2119
|
+
(sName == sMagnitudeAnnotation || sName == sSiblingRankAnnotation
|
|
2120
|
+
|| sName == sPreorderRankAnnotation)) {
|
|
2096
2121
|
that.oTreeProperties[sName] = oProperty.name;
|
|
2097
2122
|
}
|
|
2098
2123
|
});
|
|
2099
2124
|
});
|
|
2100
|
-
|
|
2101
2125
|
//perform magnitude annotation check
|
|
2102
|
-
this.oTreeProperties[sMagnitudeAnnotation] = this.oTreeProperties[sMagnitudeAnnotation]
|
|
2103
|
-
(this.mParameters.treeAnnotationProperties
|
|
2104
|
-
|
|
2105
|
-
// apply
|
|
2106
|
-
// exception: the binding runs in operation-mode "Client"
|
|
2107
|
-
//
|
|
2108
|
-
if (this.oTreeProperties[sMagnitudeAnnotation]
|
|
2109
|
-
|
|
2126
|
+
this.oTreeProperties[sMagnitudeAnnotation] = this.oTreeProperties[sMagnitudeAnnotation]
|
|
2127
|
+
|| (this.mParameters.treeAnnotationProperties
|
|
2128
|
+
&& this.mParameters.treeAnnotationProperties.hierarchyNodeDescendantCountFor);
|
|
2129
|
+
// apply flat auto-expand mixin if the necessary annotations were found (in Server-Mode)
|
|
2130
|
+
// exception: the binding runs in operation-mode "Client". In this case, there is no
|
|
2131
|
+
// need for the advanced auto expand, since everything is loaded anyway.
|
|
2132
|
+
if (this.oTreeProperties[sMagnitudeAnnotation]
|
|
2133
|
+
&& this.sOperationMode == OperationMode.Server) {
|
|
2110
2134
|
// Add Flat-specific tree properties
|
|
2111
|
-
this.oTreeProperties[sSiblingRankAnnotation] =
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2135
|
+
this.oTreeProperties[sSiblingRankAnnotation] =
|
|
2136
|
+
this.oTreeProperties[sSiblingRankAnnotation]
|
|
2137
|
+
|| (this.mParameters.treeAnnotationProperties
|
|
2138
|
+
&& this.mParameters.treeAnnotationProperties.hierarchySiblingRankFor);
|
|
2139
|
+
this.oTreeProperties[sPreorderRankAnnotation] =
|
|
2140
|
+
this.oTreeProperties[sPreorderRankAnnotation]
|
|
2141
|
+
|| (this.mParameters.treeAnnotationProperties
|
|
2142
|
+
&& this.mParameters.treeAnnotationProperties.hierarchyPreorderRankFor);
|
|
2116
2143
|
if (this.mParameters.restoreTreeStateAfterChange) {
|
|
2117
|
-
if (this.oTreeProperties[sSiblingRankAnnotation]
|
|
2144
|
+
if (this.oTreeProperties[sSiblingRankAnnotation]
|
|
2145
|
+
&& this.oTreeProperties[sPreorderRankAnnotation]) {
|
|
2118
2146
|
this._bRestoreTreeStateAfterChange = true;
|
|
2119
2147
|
// Collect entity type key properties
|
|
2120
2148
|
this._aTreeKeyProperties = [];
|
|
@@ -2122,21 +2150,23 @@ sap.ui.define([
|
|
|
2122
2150
|
this._aTreeKeyProperties.push(oEntityType.key.propertyRef[i].name);
|
|
2123
2151
|
}
|
|
2124
2152
|
} else {
|
|
2125
|
-
Log.warning("Tree state restoration not possible: Missing annotation
|
|
2153
|
+
Log.warning("Tree state restoration not possible: Missing annotation "
|
|
2154
|
+
+ "\"hierarchy-sibling-rank-for\" and/or "
|
|
2155
|
+
+ "\"hierarchy-preorder-rank-for\"");
|
|
2126
2156
|
this._bRestoreTreeStateAfterChange = false;
|
|
2127
2157
|
}
|
|
2128
2158
|
} else {
|
|
2129
2159
|
this._bRestoreTreeStateAfterChange = false;
|
|
2130
2160
|
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
// make sure the magnitude is added to the $select if it was not added by the application anyway
|
|
2161
|
+
// make sure magnitude is added to $select if not added by the application anyway
|
|
2134
2162
|
if (this.mParameters && this.mParameters.select) {
|
|
2135
|
-
if (this.mParameters.select.indexOf(this.oTreeProperties[sMagnitudeAnnotation])
|
|
2163
|
+
if (this.mParameters.select.indexOf(this.oTreeProperties[sMagnitudeAnnotation])
|
|
2164
|
+
=== -1) {
|
|
2136
2165
|
this.mParameters.select += "," + this.oTreeProperties[sMagnitudeAnnotation];
|
|
2137
2166
|
}
|
|
2138
2167
|
if (this._bRestoreTreeStateAfterChange) {
|
|
2139
|
-
// Retrieve all key properties to allow filtering on them during tree state
|
|
2168
|
+
// Retrieve all key properties to allow filtering on them during tree state
|
|
2169
|
+
// restoration (PreorderPosition requests)
|
|
2140
2170
|
for (j = this._aTreeKeyProperties.length - 1; j >= 0; j--) {
|
|
2141
2171
|
sKeyProperty = this._aTreeKeyProperties[j];
|
|
2142
2172
|
if (this.mParameters.select.indexOf(sKeyProperty) === -1) {
|
|
@@ -2146,25 +2176,19 @@ sap.ui.define([
|
|
|
2146
2176
|
}
|
|
2147
2177
|
this.sCustomParams = this.oModel.createCustomParams(this.mParameters);
|
|
2148
2178
|
}
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
ODataTreeBindingFlat.apply(this);
|
|
2152
|
-
} else {
|
|
2153
|
-
// apply hierarchical paging adapter
|
|
2154
|
-
var ODataTreeBindingAdapter = sap.ui.requireSync("sap/ui/model/odata/ODataTreeBindingAdapter");
|
|
2155
|
-
ODataTreeBindingAdapter.apply(this);
|
|
2156
|
-
}
|
|
2157
|
-
} else if (this.oNavigationPaths) {
|
|
2158
|
-
// apply hierarchical paging adapter
|
|
2159
|
-
var ODataTreeBindingAdapter = sap.ui.requireSync("sap/ui/model/odata/ODataTreeBindingAdapter");
|
|
2160
|
-
ODataTreeBindingAdapter.apply(this);
|
|
2161
|
-
} else {
|
|
2162
|
-
Log.error("Neither hierarchy annotations, nor navigation properties are specified to build the tree.", this);
|
|
2179
|
+
sAdapterModuleName = "sap/ui/model/odata/ODataTreeBindingFlat";
|
|
2180
|
+
}
|
|
2163
2181
|
}
|
|
2182
|
+
sap.ui.require([sAdapterModuleName], function (oAdapterModule) {
|
|
2183
|
+
oAdapterModule.apply(that);
|
|
2184
|
+
fnFireEvent();
|
|
2185
|
+
});
|
|
2164
2186
|
};
|
|
2165
2187
|
|
|
2166
2188
|
/**
|
|
2167
|
-
* Internal function to
|
|
2189
|
+
* Internal function to build up the $select, based on the select from the binding parameters
|
|
2190
|
+
* and the properties being the target of the tree annotations.
|
|
2191
|
+
*
|
|
2168
2192
|
* @private
|
|
2169
2193
|
*/
|
|
2170
2194
|
ODataTreeBinding.prototype._processSelectParameters = function () {
|
|
@@ -2253,7 +2277,7 @@ sap.ui.define([
|
|
|
2253
2277
|
if (this.getFilterParams()) {
|
|
2254
2278
|
aParams.push("$filter=" + this.getFilterParams());
|
|
2255
2279
|
}
|
|
2256
|
-
//also includes the
|
|
2280
|
+
//also includes the select parameters
|
|
2257
2281
|
//in hierarchy annotated trees, the mapping properties are mandatory
|
|
2258
2282
|
if (this.sCustomParams) {
|
|
2259
2283
|
aParams.push(this.sCustomParams);
|
|
@@ -2299,10 +2323,13 @@ sap.ui.define([
|
|
|
2299
2323
|
};
|
|
2300
2324
|
|
|
2301
2325
|
/**
|
|
2302
|
-
* Sets the rootLevel
|
|
2303
|
-
* The root level is the level of the topmost tree nodes
|
|
2304
|
-
*
|
|
2305
|
-
*
|
|
2326
|
+
* Sets the <code>rootLevel</code>.
|
|
2327
|
+
* The root level is the level of the topmost tree nodes that will be used as an entry point
|
|
2328
|
+
* for OData services.
|
|
2329
|
+
* This is only possible (and necessary) for OData services implementing the hierarchy
|
|
2330
|
+
* annotation specification,
|
|
2331
|
+
* or when providing the annotation information locally as a binding parameter.
|
|
2332
|
+
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
2306
2333
|
* @param {int} iRootLevel
|
|
2307
2334
|
*
|
|
2308
2335
|
* @public
|
|
@@ -98,7 +98,7 @@ sap.ui.define([
|
|
|
98
98
|
* @hideconstructor
|
|
99
99
|
* @public
|
|
100
100
|
* @since 1.39.0
|
|
101
|
-
* @version 1.
|
|
101
|
+
* @version 1.95.0
|
|
102
102
|
*/
|
|
103
103
|
var Context = BaseContext.extend("sap.ui.model.odata.v4.Context", {
|
|
104
104
|
constructor : function (oModel, oBinding, sPath, iIndex, oCreatePromise, iGeneration) {
|
|
@@ -1440,7 +1440,8 @@ sap.ui.define([
|
|
|
1440
1440
|
* @since 1.67.0
|
|
1441
1441
|
*/
|
|
1442
1442
|
Context.prototype.setProperty = function (sPath, vValue, sGroupId, bRetry) {
|
|
1443
|
-
var oGroupLock = null
|
|
1443
|
+
var oGroupLock = null,
|
|
1444
|
+
that = this;
|
|
1444
1445
|
|
|
1445
1446
|
this.oBinding.checkSuspended();
|
|
1446
1447
|
if (typeof vValue === "function" || (vValue && typeof vValue === "object")) {
|
|
@@ -1456,6 +1457,8 @@ sap.ui.define([
|
|
|
1456
1457
|
if (oGroupLock) {
|
|
1457
1458
|
oGroupLock.unlock(true);
|
|
1458
1459
|
}
|
|
1460
|
+
that.oModel.reportError("Failed to update path " + that.oModel.resolve(sPath, that),
|
|
1461
|
+
sClassName, oError);
|
|
1459
1462
|
throw oError;
|
|
1460
1463
|
});
|
|
1461
1464
|
};
|
|
@@ -1559,4 +1562,4 @@ sap.ui.define([
|
|
|
1559
1562
|
Object.defineProperty(oModule, "VIRTUAL", {value : iVIRTUAL});
|
|
1560
1563
|
|
|
1561
1564
|
return oModule;
|
|
1562
|
-
}, /* bExport= */ false);
|
|
1565
|
+
}, /* bExport= */ false);
|
|
@@ -13,8 +13,8 @@ sap.ui.define([
|
|
|
13
13
|
], function (_Helper, SyncPromise, ChangeReason, OperationMode, Context) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
-
var aChangeReasonPrecedence = [ChangeReason.
|
|
17
|
-
ChangeReason.Filter],
|
|
16
|
+
var aChangeReasonPrecedence = [ChangeReason.Context, ChangeReason.Change, ChangeReason.Refresh,
|
|
17
|
+
ChangeReason.Sort, ChangeReason.Filter],
|
|
18
18
|
sClassName = "sap.ui.model.odata.v4.ODataBinding",
|
|
19
19
|
// Whether a path segment is an index or contains a transient predicate
|
|
20
20
|
rIndexOrTransientPredicate = /\/\d|\(\$uid=/;
|
|
@@ -1306,4 +1306,4 @@ sap.ui.define([
|
|
|
1306
1306
|
});
|
|
1307
1307
|
|
|
1308
1308
|
return asODataBinding;
|
|
1309
|
-
}, /* bExport= */ false);
|
|
1309
|
+
}, /* bExport= */ false);
|