@openui5/sap.ui.core 1.105.1 → 1.107.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/.reuse/dep5 +20 -17
- package/THIRDPARTY.txt +31 -21
- package/package.json +1 -1
- package/src/jquery.sap.dom.js +10 -10
- package/src/jquery.sap.global.js +24 -216
- package/src/jquery.sap.history.js +1 -1
- package/src/jquery.sap.properties.js +2 -2
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +4 -4
- package/src/jquery.sap.ui.js +5 -7
- package/src/sap/base/i18n/ResourceBundle.js +7 -11
- package/src/sap/base/util/LoaderExtensions.js +6 -6
- package/src/sap/base/util/ObjectPath.js +1 -1
- package/src/sap/base/util/Properties.js +1 -1
- package/src/sap/base/util/fetch.js +8 -10
- package/src/sap/base/util/mixedFetch.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/base/util/syncFetch.js +9 -16
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +7 -14
- package/src/sap/ui/VersionInfo.js +57 -54
- package/src/sap/ui/base/BindingInfo.js +198 -0
- package/src/sap/ui/base/DataType.js +5 -5
- package/src/sap/ui/base/Event.js +2 -2
- package/src/sap/ui/base/EventProvider.js +2 -2
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +209 -979
- package/src/sap/ui/base/ManagedObjectMetadata.js +6 -6
- package/src/sap/ui/base/ManagedObjectRegistry.js +4 -3
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +13 -9
- package/src/sap/ui/core/AppCacheBuster.js +3 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +5 -6
- package/src/sap/ui/core/CalendarType.js +0 -1
- package/src/sap/ui/core/Component.js +16 -14
- package/src/sap/ui/core/ComponentContainer.js +6 -5
- package/src/sap/ui/core/ComponentMetadata.js +5 -12
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +525 -336
- package/src/sap/ui/core/Control.js +7 -7
- package/src/sap/ui/core/Core.js +102 -422
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +65 -9
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/FocusHandler.js +79 -9
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -2
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -2
- package/src/sap/ui/core/IconPool.js +8 -8
- package/src/sap/ui/core/IndicationColorSupport.js +2 -2
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -2
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +5 -5
- package/src/sap/ui/core/Item.js +1 -2
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -2
- package/src/sap/ui/core/ListItem.js +1 -2
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -2
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +15 -13
- package/src/sap/ui/core/Manifest.js +8 -6
- package/src/sap/ui/core/Message.js +4 -6
- package/src/sap/ui/core/Popup.js +63 -6
- package/src/sap/ui/core/RenderManager.js +13 -5
- package/src/sap/ui/core/Renderer.js +5 -4
- package/src/sap/ui/core/Rendering.js +251 -0
- package/src/sap/ui/core/ResizeHandler.js +7 -7
- package/src/sap/ui/core/ScrollBar.js +6 -9
- package/src/sap/ui/core/ScrollBarRenderer.js +3 -3
- package/src/sap/ui/core/SeparatorItem.js +1 -2
- package/src/sap/ui/core/Title.js +1 -2
- package/src/sap/ui/core/TooltipBase.js +12 -14
- package/src/sap/ui/core/UIArea.js +396 -129
- package/src/sap/ui/core/UIComponent.js +3 -4
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +2 -2
- package/src/sap/ui/core/VariantLayoutData.js +1 -2
- package/src/sap/ui/core/XMLComposite.js +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +12 -10
- package/src/sap/ui/core/_ConfigurationProvider.js +187 -0
- package/src/sap/ui/core/cache/CacheManager.js +9 -8
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -4
- package/src/sap/ui/core/cldr/es_BO.json +3 -3
- package/src/sap/ui/core/cldr/es_CL.json +3 -3
- package/src/sap/ui/core/cldr/es_MX.json +3 -3
- package/src/sap/ui/core/cldr/es_PE.json +3 -3
- package/src/sap/ui/core/cldr/es_UY.json +3 -3
- package/src/sap/ui/core/cldr/es_VE.json +2 -2
- package/src/sap/ui/core/date/Islamic.js +4 -4
- package/src/sap/ui/core/date/UniversalDate.js +8 -8
- package/src/sap/ui/core/date/UniversalDateUtils.js +3 -3
- package/src/sap/ui/core/delegate/ItemNavigation.js +5 -5
- package/src/sap/ui/core/delegate/ScrollEnablement.js +7 -6
- package/src/sap/ui/core/dnd/DragAndDrop.js +14 -9
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -2
- package/src/sap/ui/core/dnd/DragInfo.js +1 -2
- package/src/sap/ui/core/dnd/DropInfo.js +1 -2
- package/src/sap/ui/core/format/DateFormat.js +14 -7
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +0 -1
- package/src/sap/ui/core/format/FileSizeFormat.js +4 -3
- package/src/sap/ui/core/format/ListFormat.js +4 -3
- package/src/sap/ui/core/format/NumberFormat.js +7 -6
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +7 -6
- package/src/sap/ui/core/library.js +3 -55
- 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 -23
- 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_fr.properties +1 -1
- package/src/sap/ui/core/mvc/Controller.js +8 -3
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +5 -3
- package/src/sap/ui/core/mvc/HTMLView.js +1 -2
- package/src/sap/ui/core/mvc/JSONView.js +1 -2
- package/src/sap/ui/core/mvc/JSView.js +2 -3
- package/src/sap/ui/core/mvc/TemplateView.js +1 -2
- package/src/sap/ui/core/mvc/View.js +21 -20
- package/src/sap/ui/core/mvc/ViewType.js +0 -1
- package/src/sap/ui/core/mvc/XMLView.js +18 -18
- 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/Router.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +4 -3
- package/src/sap/ui/core/rules/App.support.js +11 -13
- package/src/sap/ui/core/rules/Config.support.js +19 -17
- package/src/sap/ui/core/rules/CoreHelper.support.js +4 -4
- package/src/sap/ui/core/rules/Model.support.js +8 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +8 -8
- package/src/sap/ui/core/rules/View.support.js +9 -9
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -2
- package/src/sap/ui/core/search/SearchProvider.js +1 -3
- 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/Hotkeys.js +2 -3
- 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/ToolsAPI.js +11 -13
- package/src/sap/ui/core/support/plugins/ControlTree.js +4 -4
- package/src/sap/ui/core/support/plugins/Debugging.js +3 -3
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
- package/src/sap/ui/core/support/support.html +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +10 -8
- package/src/sap/ui/core/theming/Parameters.js +8 -15
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -2
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -4
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +6 -5
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -2
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +48 -72
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +4 -3
- package/src/sap/ui/core/util/XMLPreprocessor.js +2 -2
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +1 -1
- 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 +4 -4
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +3 -3
- package/src/sap/ui/debug/DebugEnv.js +4 -4
- package/src/sap/ui/debug/PropertyList.css +1 -31
- package/src/sap/ui/debug/PropertyList.js +6 -250
- package/src/sap/ui/dom/getScrollbarSize.js +1 -1
- package/src/sap/ui/dom/jquery/control.js +1 -0
- package/src/sap/ui/events/jquery/EventSimulation.js +4 -4
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +3 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/Context.js +3 -0
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/ListBinding.js +2 -2
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +871 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +16 -5
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +24 -19
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +3 -7
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +2 -0
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +5 -7
- package/src/sap/ui/model/json/JSONModel.js +9 -7
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +4 -4
- package/src/sap/ui/model/odata/ODataAnnotations.js +5 -3
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +10 -10
- package/src/sap/ui/model/odata/ODataMetadata.js +5 -4
- package/src/sap/ui/model/odata/ODataModel.js +6 -5
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +0 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +5 -5
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +4 -3
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +25 -16
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +46 -28
- package/src/sap/ui/model/odata/v2/ODataModel.js +97 -39
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +5 -5
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +3 -3
- package/src/sap/ui/model/odata/v4/Context.js +109 -71
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -7
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +88 -68
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +116 -81
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +23 -20
- package/src/sap/ui/model/odata/v4/ODataModel.js +350 -88
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +35 -9
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +15 -9
- package/src/sap/ui/model/odata/v4/ODataUtils.js +8 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +45 -33
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +40 -6
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +135 -81
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +2 -3
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +179 -36
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +2 -3
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +26 -7
- package/src/sap/ui/model/resource/ResourceModel.js +8 -7
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +2 -2
- 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 +2 -2
- 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 +5 -4
- package/src/sap/ui/model/xml/XMLModel.js +8 -6
- package/src/sap/ui/performance/trace/Interaction.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa.js +7 -5
- package/src/sap/ui/test/Opa5.js +9 -15
- package/src/sap/ui/test/OpaBuilder.js +1 -1
- package/src/sap/ui/test/RecorderHotkeyListener.js +1 -1
- package/src/sap/ui/test/TestUtils.js +83 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +9 -0
- package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +114 -0
- package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +99 -0
- package/src/sap/ui/test/autowaiter/_jsAnimationWaiter.js +70 -0
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +3 -12
- package/src/sap/ui/test/autowaiter/_utils.js +13 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/matchers/Ancestor.js +1 -0
- package/src/sap/ui/test/matchers/Descendant.js +1 -0
- package/src/sap/ui/test/matchers/Sibling.js +1 -0
- package/src/sap/ui/util/Storage.js +1 -1
|
@@ -175,11 +175,13 @@ sap.ui.define([
|
|
|
175
175
|
oEntity = vDeleteProperty
|
|
176
176
|
? vCacheData[vCachePath] || vCacheData.$byPredicate[vCachePath]
|
|
177
177
|
: vCacheData, // deleting at root level
|
|
178
|
+
aMessages,
|
|
178
179
|
mHeaders,
|
|
179
180
|
iIndex = typeof vCachePath === "number" ? vCachePath : undefined,
|
|
180
181
|
sKeyPredicate = _Helper.getPrivateAnnotation(oEntity, "predicate"),
|
|
181
182
|
sEntityPath = _Helper.buildPath(sParentPath,
|
|
182
183
|
Array.isArray(vCacheData) ? sKeyPredicate : vDeleteProperty),
|
|
184
|
+
oModelInterface = that.oRequestor.getModelInterface(),
|
|
183
185
|
oRequestPromise,
|
|
184
186
|
sTransientGroup = _Helper.getPrivateAnnotation(oEntity, "transient"),
|
|
185
187
|
sTransientPredicate = _Helper.getPrivateAnnotation(oEntity, "transientPredicate");
|
|
@@ -194,6 +196,19 @@ sap.ui.define([
|
|
|
194
196
|
if (oEntity["@$ui5.context.isDeleted"]) {
|
|
195
197
|
throw new Error("Must not delete twice: " + sEditUrl);
|
|
196
198
|
}
|
|
199
|
+
|
|
200
|
+
aMessages = oModelInterface.getMessagesByPath(
|
|
201
|
+
_Helper.buildPath("/", that.sResourcePath, sEntityPath), true);
|
|
202
|
+
|
|
203
|
+
if (aMessages.length) {
|
|
204
|
+
aMessages = aMessages.filter(function (oMessage) {
|
|
205
|
+
return !oMessage.persistent;
|
|
206
|
+
});
|
|
207
|
+
_Helper.setPrivateAnnotation(oEntity, "messages", aMessages);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
oModelInterface.reportStateMessages(that.sResourcePath, {}, [sEntityPath]);
|
|
211
|
+
|
|
197
212
|
oEntity["@$ui5.context.isDeleted"] = true;
|
|
198
213
|
if (Array.isArray(vCacheData)) {
|
|
199
214
|
oDeleted = that.addDeleted(vCacheData, iIndex, sKeyPredicate, oGroupLock,
|
|
@@ -221,6 +236,7 @@ sap.ui.define([
|
|
|
221
236
|
&& that.requestCount(oGroupLock || that.oRequestor.lockGroup("$auto", that)),
|
|
222
237
|
oGroupLock && oGroupLock.unlock() // unlock when all requests have been queued
|
|
223
238
|
]).then(function () {
|
|
239
|
+
_Helper.deletePrivateAnnotation(oEntity, "messages");
|
|
224
240
|
if (Array.isArray(vCacheData)) {
|
|
225
241
|
vCacheData.$deleted.splice(vCacheData.$deleted.indexOf(oDeleted), 1);
|
|
226
242
|
delete vCacheData.$byPredicate[sKeyPredicate];
|
|
@@ -232,10 +248,14 @@ sap.ui.define([
|
|
|
232
248
|
} else { // deleting at root level
|
|
233
249
|
oEntity["$ui5.deleted"] = true;
|
|
234
250
|
}
|
|
235
|
-
that.oRequestor.getModelInterface().reportStateMessages(that.sResourcePath,
|
|
236
|
-
{}, [sEntityPath]);
|
|
237
251
|
}, function (oError) {
|
|
238
|
-
var iDeletedIndex
|
|
252
|
+
var iDeletedIndex,
|
|
253
|
+
aMessages = _Helper.getPrivateAnnotation(oEntity, "messages");
|
|
254
|
+
|
|
255
|
+
if (aMessages) {
|
|
256
|
+
oModelInterface.fireMessageChange({newMessages : aMessages});
|
|
257
|
+
}
|
|
258
|
+
_Helper.deletePrivateAnnotation(oEntity, "messages");
|
|
239
259
|
|
|
240
260
|
delete oEntity["@$ui5.context.isDeleted"];
|
|
241
261
|
if (Array.isArray(vCacheData)) {
|
|
@@ -491,7 +511,8 @@ sap.ui.define([
|
|
|
491
511
|
aSelect = _Helper.getQueryOptionsForPath(that.mQueryOptions, sPath).$select;
|
|
492
512
|
_Helper.updateSelected(that.mChangeListeners,
|
|
493
513
|
_Helper.buildPath(sPath, sPredicate || sTransientPredicate), oEntityData,
|
|
494
|
-
oCreatedEntity, aSelect
|
|
514
|
+
oCreatedEntity, aSelect, /*fnCheckKeyPredicate*/ undefined,
|
|
515
|
+
/*bOkIfMissing*/ true);
|
|
495
516
|
|
|
496
517
|
that.removePendingRequest();
|
|
497
518
|
fnResolve(true);
|
|
@@ -622,7 +643,8 @@ sap.ui.define([
|
|
|
622
643
|
* special cases.
|
|
623
644
|
*/
|
|
624
645
|
function missingValue(oValue, sSegment, iPathLength, bAgain) {
|
|
625
|
-
var
|
|
646
|
+
var vPermissions,
|
|
647
|
+
sPropertyName,
|
|
626
648
|
sPropertyPath = aSegments.slice(0, iPathLength).join("/"),
|
|
627
649
|
sPropertyMetaPath = _Helper.getMetaPath(sPropertyPath),
|
|
628
650
|
sReadLink;
|
|
@@ -647,10 +669,15 @@ sap.ui.define([
|
|
|
647
669
|
}
|
|
648
670
|
}
|
|
649
671
|
|
|
672
|
+
vPermissions = oValue[_Helper.getAnnotationKey(oValue, ".Permissions", sSegment)];
|
|
673
|
+
if (vPermissions === 0 || vPermissions === "None") {
|
|
674
|
+
return undefined;
|
|
675
|
+
}
|
|
676
|
+
|
|
650
677
|
return that.oRequestor.getModelInterface()
|
|
651
678
|
.fetchMetadata(that.sMetaPath + "/" + sPropertyMetaPath)
|
|
652
679
|
.then(function (oProperty) {
|
|
653
|
-
var
|
|
680
|
+
var vResult = false;
|
|
654
681
|
|
|
655
682
|
if (!oProperty) {
|
|
656
683
|
return invalidSegment(sSegment);
|
|
@@ -668,11 +695,6 @@ sap.ui.define([
|
|
|
668
695
|
}
|
|
669
696
|
}
|
|
670
697
|
if (!bTransient) {
|
|
671
|
-
vPermissions = oValue[
|
|
672
|
-
_Helper.getAnnotationKey(oValue, ".Permissions", sSegment)];
|
|
673
|
-
if (vPermissions === 0 || vPermissions === "None") {
|
|
674
|
-
return undefined;
|
|
675
|
-
}
|
|
676
698
|
// If there is no entity with a key predicate, try it with the cache root
|
|
677
699
|
// object (in case of SimpleCache, the root object of CollectionCache is an
|
|
678
700
|
// array)
|
|
@@ -680,12 +702,14 @@ sap.ui.define([
|
|
|
680
702
|
oEntity = oData;
|
|
681
703
|
iEntityPathLength = 0;
|
|
682
704
|
}
|
|
683
|
-
|
|
684
|
-
|
|
705
|
+
if (oEntity && !bAgain) {
|
|
706
|
+
vResult = that.fetchLateProperty(oGroupLock, oEntity,
|
|
685
707
|
aSegments.slice(0, iEntityPathLength).join("/"),
|
|
686
|
-
aSegments.slice(iEntityPathLength).join("/")
|
|
687
|
-
|
|
688
|
-
|
|
708
|
+
aSegments.slice(iEntityPathLength).join("/"));
|
|
709
|
+
}
|
|
710
|
+
return typeof vResult === "boolean"
|
|
711
|
+
? invalidSegment(sSegment, /*bAsInfo*/vResult)
|
|
712
|
+
: vResult; // fetchLateProperty's promise
|
|
689
713
|
}
|
|
690
714
|
// inside a transient entity, implicit values are determined as follows
|
|
691
715
|
if (oProperty.$kind === "NavigationProperty") {
|
|
@@ -769,7 +793,7 @@ sap.ui.define([
|
|
|
769
793
|
|
|
770
794
|
/**
|
|
771
795
|
* Fetches a missing property while drilling down into the cache. Writes it into the cache and
|
|
772
|
-
*
|
|
796
|
+
* resolves so that the drill-down can proceed.
|
|
773
797
|
*
|
|
774
798
|
* @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
|
|
775
799
|
* A lock for the group ID (on which unlock has already been called)
|
|
@@ -785,19 +809,18 @@ sap.ui.define([
|
|
|
785
809
|
* The path of the requested property relative to oResource; this property is requested from
|
|
786
810
|
* the server. For annotations, except client annotations, the annotated property is requested
|
|
787
811
|
* from the server.
|
|
788
|
-
* @
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
* requested property is not an expected late property; it rejects with an error if the GET
|
|
794
|
-
* request failed, or if the key predicate or the ETag has changed
|
|
812
|
+
* @returns {sap.ui.base.SyncPromise|boolean}
|
|
813
|
+
* A promise resolving w/o any result if the requested property is an expected late property,
|
|
814
|
+
* or a <code>boolean</code> value if it is not; it rejects with an error if the GET request
|
|
815
|
+
* failed, or if the key predicate or the ETag has changed. The returned <code>boolean</code>
|
|
816
|
+
* value tells if the issue can be safely ignored.
|
|
795
817
|
*
|
|
796
818
|
* @private
|
|
797
819
|
*/
|
|
798
820
|
_Cache.prototype.fetchLateProperty = function (oGroupLock, oResource, sResourcePath,
|
|
799
|
-
sRequestedPropertyPath
|
|
800
|
-
var
|
|
821
|
+
sRequestedPropertyPath) {
|
|
822
|
+
var bDataRequested = false,
|
|
823
|
+
sFullResourceMetaPath,
|
|
801
824
|
sFullResourcePath,
|
|
802
825
|
sGroupId,
|
|
803
826
|
iIndexOfAt = sRequestedPropertyPath.indexOf("@"),
|
|
@@ -810,6 +833,11 @@ sap.ui.define([
|
|
|
810
833
|
aUpdateProperties,
|
|
811
834
|
that = this;
|
|
812
835
|
|
|
836
|
+
function onSubmit() {
|
|
837
|
+
bDataRequested = true;
|
|
838
|
+
that.oRequestor.getModelInterface().fireDataRequested();
|
|
839
|
+
}
|
|
840
|
+
|
|
813
841
|
/*
|
|
814
842
|
* Visits the query options recursively descending $expand. Determines the target type, adds
|
|
815
843
|
* key properties, ETag and key predicate to aUpdateProperties.
|
|
@@ -849,12 +877,12 @@ sap.ui.define([
|
|
|
849
877
|
}
|
|
850
878
|
|
|
851
879
|
if (!this.mLateQueryOptions) {
|
|
852
|
-
return
|
|
880
|
+
return false; // no autoExpandSelect
|
|
853
881
|
}
|
|
854
882
|
|
|
855
883
|
if (iIndexOfAt >= 0) {
|
|
856
884
|
if (sRequestedPropertyPath.startsWith("@$ui5.", iIndexOfAt)) {
|
|
857
|
-
return
|
|
885
|
+
return true; // send no request for a client annotation
|
|
858
886
|
}
|
|
859
887
|
sRequestedPropertyPath = sRequestedPropertyPath.slice(0, iIndexOfAt);
|
|
860
888
|
}
|
|
@@ -868,7 +896,7 @@ sap.ui.define([
|
|
|
868
896
|
[sRequestedPropertyPath], this.oRequestor.getModelInterface().fetchMetadata,
|
|
869
897
|
sFullResourceMetaPath);
|
|
870
898
|
if (!mQueryOptions) {
|
|
871
|
-
return
|
|
899
|
+
return false;
|
|
872
900
|
}
|
|
873
901
|
|
|
874
902
|
visitQueryOptions(mQueryOptions);
|
|
@@ -885,7 +913,7 @@ sap.ui.define([
|
|
|
885
913
|
sGroupId = _Helper.getPrivateAnnotation(oResource, "groupId");
|
|
886
914
|
oPromise = this.oRequestor.request("GET", sMergeBasePath,
|
|
887
915
|
sGroupId ? this.oRequestor.lockGroup(sGroupId, this) : oGroupLock.getUnlockedCopy(),
|
|
888
|
-
undefined, undefined,
|
|
916
|
+
undefined, undefined, onSubmit, undefined, sFullResourceMetaPath, undefined,
|
|
889
917
|
false, mQueryOptions
|
|
890
918
|
).then(function (oData) {
|
|
891
919
|
that.visitResponse(oData, mTypeForMetaPath, sFullResourceMetaPath, sResourcePath);
|
|
@@ -912,9 +940,15 @@ sap.ui.define([
|
|
|
912
940
|
|
|
913
941
|
_Helper.updateSelected(that.mChangeListeners, sResourcePath, oResource, oData,
|
|
914
942
|
aUpdateProperties);
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
943
|
+
if (bDataRequested) {
|
|
944
|
+
bDataRequested = false;
|
|
945
|
+
that.oRequestor.getModelInterface().fireDataReceived();
|
|
946
|
+
}
|
|
947
|
+
}).catch(function (oError) {
|
|
948
|
+
if (bDataRequested) {
|
|
949
|
+
that.oRequestor.getModelInterface().fireDataReceived(oError);
|
|
950
|
+
}
|
|
951
|
+
throw oError;
|
|
918
952
|
}).finally(function () { // clean up only after updateSelected!
|
|
919
953
|
delete that.mPropertyRequestByPath[sRequestPath];
|
|
920
954
|
});
|
|
@@ -1551,6 +1585,7 @@ sap.ui.define([
|
|
|
1551
1585
|
var oOldElement, sTransientPredicate;
|
|
1552
1586
|
|
|
1553
1587
|
if (iIndex === undefined) { // kept-alive element not in the list
|
|
1588
|
+
oOldElement = aElements.$byPredicate[sPredicate];
|
|
1554
1589
|
aElements.$byPredicate[sPredicate] = oElement;
|
|
1555
1590
|
} else {
|
|
1556
1591
|
// the element might have moved due to parallel insert/delete
|
|
@@ -1565,6 +1600,8 @@ sap.ui.define([
|
|
|
1565
1600
|
_Helper.setPrivateAnnotation(oElement, "transientPredicate", sTransientPredicate);
|
|
1566
1601
|
}
|
|
1567
1602
|
}
|
|
1603
|
+
_Helper.restoreUpdatingProperties(oOldElement, oElement);
|
|
1604
|
+
|
|
1568
1605
|
// Note: iStart is not needed here because we know we have key predicates
|
|
1569
1606
|
this.visitResponse(oElement, mTypeForMetaPath,
|
|
1570
1607
|
_Helper.getMetaPath(_Helper.buildPath(this.sMetaPath, sPath)), sPath + sPredicate);
|
|
@@ -1591,7 +1628,7 @@ sap.ui.define([
|
|
|
1591
1628
|
delete mQueryOptions.$expand;
|
|
1592
1629
|
delete mQueryOptions.$orderby;
|
|
1593
1630
|
delete mQueryOptions.$select;
|
|
1594
|
-
sExclusiveFilter = this.
|
|
1631
|
+
sExclusiveFilter = this.getExclusiveFilter();
|
|
1595
1632
|
if (sExclusiveFilter) {
|
|
1596
1633
|
mQueryOptions.$filter = mQueryOptions.$filter
|
|
1597
1634
|
? "(" + mQueryOptions.$filter + ") and " + sExclusiveFilter
|
|
@@ -1717,6 +1754,8 @@ sap.ui.define([
|
|
|
1717
1754
|
* The new value
|
|
1718
1755
|
* @param {string} [sEntityPath]
|
|
1719
1756
|
* Path of the entity, relative to the cache (as used by change listeners)
|
|
1757
|
+
* @param {boolean} [bUpdating]
|
|
1758
|
+
* Whether the given property will not be overwritten by a creation POST(+GET) response
|
|
1720
1759
|
* @returns {Promise}
|
|
1721
1760
|
* A promise which resolves with <code>undefined</code> once the value has been set, or is
|
|
1722
1761
|
* rejected with an error if setting fails somehow
|
|
@@ -1724,14 +1763,14 @@ sap.ui.define([
|
|
|
1724
1763
|
*
|
|
1725
1764
|
* @public
|
|
1726
1765
|
*/
|
|
1727
|
-
_Cache.prototype.setProperty = function (sPropertyPath, vValue, sEntityPath) {
|
|
1766
|
+
_Cache.prototype.setProperty = function (sPropertyPath, vValue, sEntityPath, bUpdating) {
|
|
1728
1767
|
var that = this;
|
|
1729
1768
|
|
|
1730
1769
|
this.checkSharedRequest();
|
|
1731
1770
|
return this.fetchValue(_GroupLock.$cached, sEntityPath, null, null, true)
|
|
1732
1771
|
.then(function (oEntity) {
|
|
1733
1772
|
_Helper.updateAll(that.mChangeListeners, sEntityPath, oEntity,
|
|
1734
|
-
_Cache.makeUpdateData(sPropertyPath.split("/"), vValue));
|
|
1773
|
+
_Cache.makeUpdateData(sPropertyPath.split("/"), vValue, bUpdating));
|
|
1735
1774
|
});
|
|
1736
1775
|
};
|
|
1737
1776
|
|
|
@@ -1915,7 +1954,7 @@ sap.ui.define([
|
|
|
1915
1954
|
mHeaders.Prefer = "return=minimal";
|
|
1916
1955
|
}
|
|
1917
1956
|
oPatchPromise = that.oRequestor.request("PATCH", sEditUrl, oPatchGroupLock,
|
|
1918
|
-
mHeaders, oUpdateData, onSubmit, onCancel, /*sMetaPath*/undefined,
|
|
1957
|
+
mHeaders, oUpdateData, onSubmit, onCancel, /*sMetaPath*/ undefined,
|
|
1919
1958
|
_Helper.buildPath(that.getOriginalResourcePath(oEntity), sEntityPath),
|
|
1920
1959
|
bAtFront, /*mQueryOptions*/ undefined, /*vOwner*/ undefined,
|
|
1921
1960
|
mergePatchRequests);
|
|
@@ -1947,7 +1986,7 @@ sap.ui.define([
|
|
|
1947
1986
|
}, function (oError) {
|
|
1948
1987
|
var sRetryGroupId = sGroupId;
|
|
1949
1988
|
|
|
1950
|
-
if (!fnErrorCallback) {
|
|
1989
|
+
if (!fnErrorCallback && !oError.canceled) {
|
|
1951
1990
|
onCancel();
|
|
1952
1991
|
throw oError;
|
|
1953
1992
|
}
|
|
@@ -1999,6 +2038,9 @@ sap.ui.define([
|
|
|
1999
2038
|
throw new Error("Cannot update '" + sPropertyPath + "': '" + sEntityPath
|
|
2000
2039
|
+ "' does not exist");
|
|
2001
2040
|
}
|
|
2041
|
+
|
|
2042
|
+
_Helper.deleteUpdating(sPropertyPath, oEntity);
|
|
2043
|
+
|
|
2002
2044
|
sTransientGroup = _Helper.getPrivateAnnotation(oEntity, "transient");
|
|
2003
2045
|
if (sTransientGroup) {
|
|
2004
2046
|
if (typeof sTransientGroup !== "string") {
|
|
@@ -2310,6 +2352,34 @@ sap.ui.define([
|
|
|
2310
2352
|
this.aElements.$byPredicate[_Helper.getPrivateAnnotation(oElement, "predicate")] = oElement;
|
|
2311
2353
|
};
|
|
2312
2354
|
|
|
2355
|
+
/**
|
|
2356
|
+
* Checks the given range of currently available elements to contain the given promise.
|
|
2357
|
+
*
|
|
2358
|
+
* @param {sap.ui.base.SyncPromise} oPromise
|
|
2359
|
+
* The promise
|
|
2360
|
+
* @param {number} iStart
|
|
2361
|
+
* The start index
|
|
2362
|
+
* @param {number} iEnd
|
|
2363
|
+
* The end index (will not be filled)
|
|
2364
|
+
* @throws {Error}
|
|
2365
|
+
* If there is an index no longer containing the promise
|
|
2366
|
+
*
|
|
2367
|
+
* @private
|
|
2368
|
+
*/
|
|
2369
|
+
_CollectionCache.prototype.checkRange = function (oPromise, iStart, iEnd) {
|
|
2370
|
+
var i;
|
|
2371
|
+
|
|
2372
|
+
// if the request used $tail, not all indexes got the promise, so we cannot check
|
|
2373
|
+
if (oPromise !== this.aElements.$tail) {
|
|
2374
|
+
iEnd = Math.min(iEnd, this.aElements.length);
|
|
2375
|
+
for (i = iStart; i < iEnd; i += 1) {
|
|
2376
|
+
if (this.aElements[i] !== oPromise) {
|
|
2377
|
+
throw new Error("Found data at an index being read from the back end");
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2313
2383
|
/**
|
|
2314
2384
|
* Creates an empty element for the given predicate to the cache, adds it to the cache and
|
|
2315
2385
|
* returns it.
|
|
@@ -2443,15 +2513,15 @@ sap.ui.define([
|
|
|
2443
2513
|
};
|
|
2444
2514
|
|
|
2445
2515
|
/**
|
|
2446
|
-
* Returns a filter that excludes all created entities in this cache's collection
|
|
2447
|
-
*
|
|
2516
|
+
* Returns a filter that excludes all created entities in this cache's collection and all
|
|
2517
|
+
* entities that have been deleted on the client, but not on the server yet.
|
|
2448
2518
|
*
|
|
2449
2519
|
* @returns {string|undefined}
|
|
2450
|
-
* The filter or <code>undefined</code> if there is no
|
|
2520
|
+
* The filter or <code>undefined</code> if there is no such entity.
|
|
2451
2521
|
*
|
|
2452
2522
|
* @private
|
|
2453
2523
|
*/
|
|
2454
|
-
_CollectionCache.prototype.
|
|
2524
|
+
_CollectionCache.prototype.getExclusiveFilter = function () {
|
|
2455
2525
|
var oElement,
|
|
2456
2526
|
aKeyFilters = [],
|
|
2457
2527
|
mTypeForMetaPath,
|
|
@@ -2476,9 +2546,7 @@ sap.ui.define([
|
|
|
2476
2546
|
}
|
|
2477
2547
|
}
|
|
2478
2548
|
(this.aElements.$deleted || []).forEach(function (oDeleted) {
|
|
2479
|
-
|
|
2480
|
-
addKeyFilter(that.aElements.$byPredicate[oDeleted.predicate]);
|
|
2481
|
-
}
|
|
2549
|
+
addKeyFilter(that.aElements.$byPredicate[oDeleted.predicate]);
|
|
2482
2550
|
});
|
|
2483
2551
|
|
|
2484
2552
|
return aKeyFilters.length ? "not (" + aKeyFilters.sort().join(" or ") + ")" : undefined;
|
|
@@ -2494,7 +2562,7 @@ sap.ui.define([
|
|
|
2494
2562
|
* @private
|
|
2495
2563
|
*/
|
|
2496
2564
|
_CollectionCache.prototype.getQueryString = function () {
|
|
2497
|
-
var sExclusiveFilter = this.
|
|
2565
|
+
var sExclusiveFilter = this.getExclusiveFilter(),
|
|
2498
2566
|
mQueryOptions = Object.assign({}, this.mQueryOptions),
|
|
2499
2567
|
sFilterOptions = mQueryOptions.$filter,
|
|
2500
2568
|
sQueryString = this.sQueryString;
|
|
@@ -2513,28 +2581,6 @@ sap.ui.define([
|
|
|
2513
2581
|
return sQueryString;
|
|
2514
2582
|
};
|
|
2515
2583
|
|
|
2516
|
-
/**
|
|
2517
|
-
* Determines the offset to <code>$skip</code> due to deleted elements in other groups.
|
|
2518
|
-
*
|
|
2519
|
-
* @param {string} sGroupId - The group ID for the read request
|
|
2520
|
-
* @param {number} iStart - The start index for the read
|
|
2521
|
-
* @returns {number} The offset
|
|
2522
|
-
*/
|
|
2523
|
-
_CollectionCache.prototype.getReadOffset = function (sGroupId, iStart) {
|
|
2524
|
-
var iOffset = 0;
|
|
2525
|
-
|
|
2526
|
-
(this.aElements.$deleted || []).forEach(function (oDeleteInfo) {
|
|
2527
|
-
// if deleting in the same group, the entity is gone when the server reads
|
|
2528
|
-
// created-persisted entities are excluded via filter
|
|
2529
|
-
if (oDeleteInfo.groupId !== sGroupId && !oDeleteInfo.created
|
|
2530
|
-
&& oDeleteInfo.index <= iStart) {
|
|
2531
|
-
iOffset += 1;
|
|
2532
|
-
}
|
|
2533
|
-
});
|
|
2534
|
-
|
|
2535
|
-
return iOffset;
|
|
2536
|
-
};
|
|
2537
|
-
|
|
2538
2584
|
/**
|
|
2539
2585
|
* Returns the resource path including the query string with $skip and $top if needed.
|
|
2540
2586
|
*
|
|
@@ -2616,7 +2662,7 @@ sap.ui.define([
|
|
|
2616
2662
|
iResultLength = oResult.value.length,
|
|
2617
2663
|
i;
|
|
2618
2664
|
|
|
2619
|
-
// simulate #
|
|
2665
|
+
// simulate #getExclusiveFilter for newly created persisted
|
|
2620
2666
|
iEnd -= iFiltered;
|
|
2621
2667
|
iResultLength -= iFiltered;
|
|
2622
2668
|
|
|
@@ -2788,7 +2834,7 @@ sap.ui.define([
|
|
|
2788
2834
|
// count persisted inline creation rows which are refreshed separately during a
|
|
2789
2835
|
// side-effects refresh (see #refreshKeptElements) and might be deleted on server;
|
|
2790
2836
|
// increase prefetch to compensate for our exclusive filter (see
|
|
2791
|
-
// #
|
|
2837
|
+
// #getExclusiveFilter) (JIRA: CPOUI5ODATAV4-1521)
|
|
2792
2838
|
iCreatedPersisted += 1;
|
|
2793
2839
|
}
|
|
2794
2840
|
}
|
|
@@ -2960,8 +3006,7 @@ sap.ui.define([
|
|
|
2960
3006
|
*/
|
|
2961
3007
|
_CollectionCache.prototype.requestElements = function (iStart, iEnd, oGroupLock,
|
|
2962
3008
|
iTransientElements, fnDataRequested) {
|
|
2963
|
-
var
|
|
2964
|
-
oPromise,
|
|
3009
|
+
var oPromise,
|
|
2965
3010
|
oReadRequest = {
|
|
2966
3011
|
iEnd : iEnd,
|
|
2967
3012
|
iStart : iStart
|
|
@@ -2972,12 +3017,13 @@ sap.ui.define([
|
|
|
2972
3017
|
this.bSentRequest = true;
|
|
2973
3018
|
oPromise = SyncPromise.all([
|
|
2974
3019
|
this.oRequestor.request("GET",
|
|
2975
|
-
this.getResourcePathWithQuery(iStart
|
|
3020
|
+
this.getResourcePathWithQuery(iStart, iEnd),
|
|
2976
3021
|
oGroupLock, undefined, undefined, fnDataRequested),
|
|
2977
3022
|
this.fetchTypes()
|
|
2978
3023
|
]).then(function (aResult) {
|
|
2979
3024
|
var iFiltered;
|
|
2980
3025
|
|
|
3026
|
+
that.checkRange(oPromise, oReadRequest.iStart, oReadRequest.iEnd);
|
|
2981
3027
|
if (that.aElements.$tail === oPromise) {
|
|
2982
3028
|
that.aElements.$tail = undefined;
|
|
2983
3029
|
}
|
|
@@ -2986,6 +3032,7 @@ sap.ui.define([
|
|
|
2986
3032
|
return that.handleCount(oGroupLock, iTransientElements, oReadRequest.iStart,
|
|
2987
3033
|
oReadRequest.iEnd, aResult[0], iFiltered);
|
|
2988
3034
|
}).catch(function (oError) {
|
|
3035
|
+
that.checkRange(oPromise, oReadRequest.iStart, oReadRequest.iEnd);
|
|
2989
3036
|
that.fill(undefined, oReadRequest.iStart, oReadRequest.iEnd);
|
|
2990
3037
|
throw oError;
|
|
2991
3038
|
}).finally(function () {
|
|
@@ -3138,8 +3185,8 @@ sap.ui.define([
|
|
|
3138
3185
|
for (i = 0, n = oResult.value.length; i < n; i += 1) {
|
|
3139
3186
|
oElement = oResult.value[i];
|
|
3140
3187
|
sPredicate = _Helper.getPrivateAnnotation(oElement, "predicate");
|
|
3141
|
-
_Helper.
|
|
3142
|
-
that.aElements.$byPredicate[sPredicate], oElement,
|
|
3188
|
+
_Helper.updateSelected(that.mChangeListeners, sPredicate,
|
|
3189
|
+
that.aElements.$byPredicate[sPredicate], oElement, aPaths,
|
|
3143
3190
|
preventKeyPredicateChange);
|
|
3144
3191
|
}
|
|
3145
3192
|
});
|
|
@@ -3660,11 +3707,12 @@ sap.ui.define([
|
|
|
3660
3707
|
_Helper.getPrivateAnnotation(oOldValue, "predicate"));
|
|
3661
3708
|
// visit response to report the messages
|
|
3662
3709
|
that.visitResponse(oNewValue, aResult[1]);
|
|
3663
|
-
_Helper.
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
return
|
|
3667
|
-
|
|
3710
|
+
_Helper.updateSelected(that.mChangeListeners, "", oOldValue, oNewValue, aPaths,
|
|
3711
|
+
function (sPath) {
|
|
3712
|
+
// not (below) a $NavigationPropertyPath?
|
|
3713
|
+
return !aPaths.some(function (sSideEffectPath) {
|
|
3714
|
+
return _Helper.getRelativePath(sPath, sSideEffectPath) !== undefined;
|
|
3715
|
+
});
|
|
3668
3716
|
});
|
|
3669
3717
|
});
|
|
3670
3718
|
|
|
@@ -3993,16 +4041,22 @@ sap.ui.define([
|
|
|
3993
4041
|
* The property path split into an array of segments
|
|
3994
4042
|
* @param {any} vValue
|
|
3995
4043
|
* The property value
|
|
4044
|
+
* @param {boolean} [bUpdating]
|
|
4045
|
+
* Whether the given property will not be overwritten by a creation POST(+GET) response
|
|
3996
4046
|
* @returns {object}
|
|
3997
4047
|
* The resulting object
|
|
3998
4048
|
*
|
|
3999
4049
|
* @private
|
|
4000
4050
|
*/
|
|
4001
|
-
_Cache.makeUpdateData = function (aPropertyPath, vValue) {
|
|
4051
|
+
_Cache.makeUpdateData = function (aPropertyPath, vValue, bUpdating) {
|
|
4002
4052
|
return aPropertyPath.reduceRight(function (vValue0, sSegment) {
|
|
4003
4053
|
var oResult = {};
|
|
4004
4054
|
|
|
4005
4055
|
oResult[sSegment] = vValue0;
|
|
4056
|
+
if (bUpdating) {
|
|
4057
|
+
oResult[sSegment + "@$ui5.updating"] = true;
|
|
4058
|
+
bUpdating = false;
|
|
4059
|
+
}
|
|
4006
4060
|
return oResult;
|
|
4007
4061
|
}, vValue);
|
|
4008
4062
|
};
|
|
@@ -19,9 +19,8 @@ sap.ui.define([
|
|
|
19
19
|
* @param {sap.ui.model.odata.v4.lib._CollectionCache} oCache
|
|
20
20
|
* The cache to be enhanced
|
|
21
21
|
* @param {object} oAggregation
|
|
22
|
-
* An object holding the information needed for data aggregation; see also
|
|
23
|
-
*
|
|
24
|
-
* Extension for Data Aggregation Version 4.0</a>; must already be normalized by
|
|
22
|
+
* An object holding the information needed for data aggregation; see also "OData
|
|
23
|
+
* Extension for Data Aggregation Version 4.0"; must already be normalized by
|
|
25
24
|
* {@link _AggregationHelper.buildApply}
|
|
26
25
|
* @param {function[]} [aAdditionalRowHandlers]
|
|
27
26
|
* Handlers for the additional response rows (which are automatically scanned for
|