@openui5/sap.ui.core 1.106.0 → 1.107.1
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/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/jquery.sap.ui.js +5 -7
- package/src/sap/base/util/LoaderExtensions.js +6 -6
- package/src/sap/base/util/fetch.js +3 -0
- 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/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/DataType.js +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- 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 +1 -1
- 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 +12 -10
- package/src/sap/ui/core/ComponentContainer.js +6 -5
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +1 -1
- package/src/sap/ui/core/Control.js +7 -7
- package/src/sap/ui/core/Core.js +31 -304
- 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 +6 -6
- 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 +50 -2
- 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/IndicationColorSupport.js +1 -1
- 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 +11 -9
- 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 +62 -5
- package/src/sap/ui/core/RenderManager.js +7 -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 +1 -1
- 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 +1 -2
- package/src/sap/ui/core/UIArea.js +389 -121
- package/src/sap/ui/core/UIComponent.js +1 -2
- 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 -2
- 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 -3
- package/src/sap/ui/core/cache/CacheManager.js +7 -6
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -4
- 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 +1 -1
- package/src/sap/ui/core/dnd/DragAndDrop.js +4 -3
- 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 +9 -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 +6 -5
- 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 +3 -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 +1 -2
- 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/async/Target.js +4 -3
- package/src/sap/ui/core/rules/Config.support.js +6 -4
- package/src/sap/ui/core/rules/CoreHelper.support.js +3 -3
- 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/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/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 +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +7 -5
- 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 +1 -2
- 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 +4 -2
- package/src/sap/ui/core/util/PasteHelper.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.js +1 -1
- 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/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/Sorter.js +22 -17
- 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 +8 -6
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- 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 +31 -8
- 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 +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +4 -3
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +24 -15
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +45 -27
- package/src/sap/ui/model/odata/v2/ODataModel.js +94 -36
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +5 -5
- package/src/sap/ui/model/odata/v4/Context.js +23 -19
- package/src/sap/ui/model/odata/v4/ODataBinding.js +7 -3
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +121 -57
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +11 -11
- package/src/sap/ui/model/odata/v4/ODataModel.js +111 -69
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +12 -4
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/v4/ODataUtils.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +41 -29
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +59 -20
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +135 -4
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +21 -7
- package/src/sap/ui/model/resource/ResourceModel.js +7 -6
- 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 +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/QUnitUtils.js +2 -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/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
|
@@ -36,6 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
"sap/base/Log",
|
|
37
37
|
"sap/ui/base/SyncPromise",
|
|
38
38
|
"sap/ui/core/cache/CacheManager",
|
|
39
|
+
"sap/ui/core/Configuration",
|
|
39
40
|
"sap/ui/core/library",
|
|
40
41
|
"sap/ui/core/message/Message",
|
|
41
42
|
"sap/ui/model/BindingMode",
|
|
@@ -45,18 +46,16 @@ sap.ui.define([
|
|
|
45
46
|
"sap/ui/thirdparty/URI"
|
|
46
47
|
], function (ODataContextBinding, ODataListBinding, ODataMetaModel, ODataPropertyBinding,
|
|
47
48
|
SubmitMode, _GroupLock, _Helper, _MetadataRequestor, _Parser, _Requestor, assert, Log,
|
|
48
|
-
SyncPromise, CacheManager, coreLibrary, Message, BindingMode, BaseContext,
|
|
49
|
-
OperationMode, URI) {
|
|
49
|
+
SyncPromise, CacheManager, Configuration, coreLibrary, Message, BindingMode, BaseContext,
|
|
50
|
+
Model, OperationMode, URI) {
|
|
50
51
|
"use strict";
|
|
51
52
|
|
|
52
|
-
var
|
|
53
|
-
sClassName = "sap.ui.model.odata.v4.ODataModel",
|
|
53
|
+
var sClassName = "sap.ui.model.odata.v4.ODataModel",
|
|
54
54
|
// system query options allowed within a $expand query option
|
|
55
55
|
aExpandQueryOptions = ["$count", "$expand", "$filter", "$levels", "$orderby", "$search",
|
|
56
56
|
"$select"],
|
|
57
57
|
// binding-specific parameters allowed in getKeepAliveContext
|
|
58
58
|
aGetKeepAliveParameters = ["$$groupId", "$$patchWithoutSideEffects", "$$updateGroupId"],
|
|
59
|
-
rGroupID = /^(\$auto(\.\w+)?|\$direct|\w+)$/,
|
|
60
59
|
MessageType = coreLibrary.MessageType,
|
|
61
60
|
aMessageTypes = [
|
|
62
61
|
undefined,
|
|
@@ -219,7 +218,7 @@ sap.ui.define([
|
|
|
219
218
|
* @extends sap.ui.model.Model
|
|
220
219
|
* @public
|
|
221
220
|
* @since 1.37.0
|
|
222
|
-
* @version 1.
|
|
221
|
+
* @version 1.107.1
|
|
223
222
|
*/
|
|
224
223
|
ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
225
224
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
|
|
@@ -245,9 +244,10 @@ sap.ui.define([
|
|
|
245
244
|
function constructor(mParameters) {
|
|
246
245
|
var sGroupId,
|
|
247
246
|
oGroupProperties,
|
|
248
|
-
sLanguageTag =
|
|
247
|
+
sLanguageTag = Configuration.getLanguageTag(),
|
|
249
248
|
sODataVersion,
|
|
250
249
|
sParameter,
|
|
250
|
+
mQueryParams,
|
|
251
251
|
sServiceUrl,
|
|
252
252
|
oUri,
|
|
253
253
|
mUriParameters,
|
|
@@ -286,7 +286,7 @@ sap.ui.define([
|
|
|
286
286
|
mUriParameters = this.buildQueryOptions(oUri.query(true), false, true);
|
|
287
287
|
// BEWARE: these are shared across all bindings!
|
|
288
288
|
this.mUriParameters = mUriParameters;
|
|
289
|
-
if (
|
|
289
|
+
if (Configuration.getStatisticsEnabled()) {
|
|
290
290
|
// Note: this way, "sap-statistics" is not sent within $batch
|
|
291
291
|
mUriParameters = Object.assign({"sap-statistics" : true}, mUriParameters);
|
|
292
292
|
}
|
|
@@ -298,11 +298,11 @@ sap.ui.define([
|
|
|
298
298
|
if (this.sGroupId !== "$auto" && this.sGroupId !== "$direct") {
|
|
299
299
|
throw new Error("Group ID must be '$auto' or '$direct'");
|
|
300
300
|
}
|
|
301
|
-
|
|
301
|
+
_Helper.checkGroupId(mParameters.updateGroupId, false, "Invalid update group ID: ");
|
|
302
302
|
this.sUpdateGroupId = mParameters.updateGroupId || this.getGroupId();
|
|
303
303
|
this.mGroupProperties = {};
|
|
304
304
|
for (sGroupId in mParameters.groupProperties) {
|
|
305
|
-
|
|
305
|
+
_Helper.checkGroupId(sGroupId, true);
|
|
306
306
|
oGroupProperties = mParameters.groupProperties[sGroupId];
|
|
307
307
|
if (typeof oGroupProperties !== "object"
|
|
308
308
|
|| Object.keys(oGroupProperties).length !== 1
|
|
@@ -324,24 +324,26 @@ sap.ui.define([
|
|
|
324
324
|
}
|
|
325
325
|
this.bSharedRequests = mParameters.sharedRequests === true;
|
|
326
326
|
|
|
327
|
+
// BEWARE: do not share mHeaders between _MetadataRequestor and _Requestor!
|
|
327
328
|
this.mHeaders = {"Accept-Language" : sLanguageTag};
|
|
328
329
|
this.mMetadataHeaders = {"Accept-Language" : sLanguageTag};
|
|
329
330
|
|
|
330
|
-
|
|
331
|
+
mQueryParams = Object.assign({}, mUriParameters, mParameters.metadataUrlParams);
|
|
331
332
|
this.oMetaModel = new ODataMetaModel(
|
|
332
|
-
_MetadataRequestor.create(this.mMetadataHeaders, sODataVersion,
|
|
333
|
-
Object.assign({}, mUriParameters, mParameters.metadataUrlParams)),
|
|
333
|
+
_MetadataRequestor.create(this.mMetadataHeaders, sODataVersion, mQueryParams),
|
|
334
334
|
this.sServiceUrl + "$metadata", mParameters.annotationURI, this,
|
|
335
|
-
mParameters.supportReferences);
|
|
335
|
+
mParameters.supportReferences, mQueryParams["sap-language"]);
|
|
336
336
|
this.oInterface = {
|
|
337
337
|
fetchEntityContainer : this.oMetaModel.fetchEntityContainer.bind(this.oMetaModel),
|
|
338
338
|
fetchMetadata : this.oMetaModel.fetchObject.bind(this.oMetaModel),
|
|
339
|
+
fireMessageChange : this.fireMessageChange.bind(this),
|
|
339
340
|
fireDataReceived : this.fireDataReceived.bind(this),
|
|
340
341
|
fireDataRequested : this.fireDataRequested.bind(this),
|
|
341
342
|
fireSessionTimeout : function () {
|
|
342
343
|
that.fireEvent("sessionTimeout");
|
|
343
344
|
},
|
|
344
345
|
getGroupProperty : this.getGroupProperty.bind(this),
|
|
346
|
+
getMessagesByPath : this.getMessagesByPath.bind(this),
|
|
345
347
|
getOptimisticBatchEnabler : this.getOptimisticBatchEnabler.bind(this),
|
|
346
348
|
getReporter : this.getReporter.bind(this),
|
|
347
349
|
onCreateGroup : function (sGroupId) {
|
|
@@ -417,7 +419,11 @@ sap.ui.define([
|
|
|
417
419
|
* is not.
|
|
418
420
|
*
|
|
419
421
|
* If a back-end request fails, the 'dataReceived' event provides an <code>Error</code> in the
|
|
420
|
-
* 'error' event parameter.
|
|
422
|
+
* 'error' event parameter. If multiple requests are processed within a single $batch
|
|
423
|
+
* (or even a single change set), the order of 'dataReceived' events is not guaranteed. For
|
|
424
|
+
* requests which are not processed because a previous request failed, <code>error.cause</code>
|
|
425
|
+
* points to the root cause error - you should either ignore those events, or unwrap the error
|
|
426
|
+
* to access the root cause immediately.
|
|
421
427
|
*
|
|
422
428
|
* @param {sap.ui.base.Event} oEvent
|
|
423
429
|
* @param {object} oEvent.getParameters()
|
|
@@ -560,7 +566,7 @@ sap.ui.define([
|
|
|
560
566
|
* @returns {this} <code>this</code> to allow method chaining
|
|
561
567
|
*
|
|
562
568
|
* @public
|
|
563
|
-
* @since 1.
|
|
569
|
+
* @since 1.106.0
|
|
564
570
|
*/
|
|
565
571
|
ODataModel.prototype.attachDataReceived = function (fnFunction, oListener) {
|
|
566
572
|
return this.attachEvent("dataReceived", fnFunction, oListener);
|
|
@@ -1192,37 +1198,12 @@ sap.ui.define([
|
|
|
1192
1198
|
* @private
|
|
1193
1199
|
*/
|
|
1194
1200
|
ODataModel.prototype.checkBatchGroupId = function (sGroupId) {
|
|
1195
|
-
|
|
1201
|
+
_Helper.checkGroupId(sGroupId);
|
|
1196
1202
|
if (this.isDirectGroup(sGroupId)) {
|
|
1197
1203
|
throw new Error("Group ID does not use batch requests: " + sGroupId);
|
|
1198
1204
|
}
|
|
1199
1205
|
};
|
|
1200
1206
|
|
|
1201
|
-
/**
|
|
1202
|
-
* Checks whether the given group ID is valid, which means it is either undefined, '$auto',
|
|
1203
|
-
* '$auto.*', '$direct' or an application group ID as specified in
|
|
1204
|
-
* {@link sap.ui.model.odata.v4.ODataModel}.
|
|
1205
|
-
*
|
|
1206
|
-
* @param {string} sGroupId
|
|
1207
|
-
* The group ID
|
|
1208
|
-
* @param {boolean} [bApplicationGroup]
|
|
1209
|
-
* Whether only an application group ID is considered valid
|
|
1210
|
-
* @param {string} [sErrorMessage]
|
|
1211
|
-
* The error message to be used if group ID is not valid; the group ID will be appended
|
|
1212
|
-
* @throws {Error}
|
|
1213
|
-
* For invalid group IDs
|
|
1214
|
-
*
|
|
1215
|
-
* @private
|
|
1216
|
-
*/
|
|
1217
|
-
ODataModel.prototype.checkGroupId = function (sGroupId, bApplicationGroup, sErrorMessage) {
|
|
1218
|
-
if (!bApplicationGroup && sGroupId === undefined
|
|
1219
|
-
|| typeof sGroupId === "string"
|
|
1220
|
-
&& (bApplicationGroup ? rApplicationGroupID : rGroupID).test(sGroupId)) {
|
|
1221
|
-
return;
|
|
1222
|
-
}
|
|
1223
|
-
throw new Error((sErrorMessage || "Invalid group ID: ") + sGroupId);
|
|
1224
|
-
};
|
|
1225
|
-
|
|
1226
1207
|
/**
|
|
1227
1208
|
* Creates a binding context for the given path. A relative path can only be resolved if a
|
|
1228
1209
|
* context is provided.
|
|
@@ -1447,7 +1428,7 @@ sap.ui.define([
|
|
|
1447
1428
|
if (sCanonicalPath[0] !== "/") {
|
|
1448
1429
|
throw new Error("Invalid path: " + sCanonicalPath);
|
|
1449
1430
|
}
|
|
1450
|
-
|
|
1431
|
+
_Helper.checkGroupId(sGroupId);
|
|
1451
1432
|
sGroupId = sGroupId || this.getUpdateGroupId();
|
|
1452
1433
|
if (this.isApiGroup(sGroupId)) {
|
|
1453
1434
|
throw new Error("Illegal update group ID: " + sGroupId);
|
|
@@ -1504,7 +1485,7 @@ sap.ui.define([
|
|
|
1504
1485
|
* @returns {this} <code>this</code> to allow method chaining
|
|
1505
1486
|
*
|
|
1506
1487
|
* @public
|
|
1507
|
-
* @since 1.
|
|
1488
|
+
* @since 1.106.0
|
|
1508
1489
|
*/
|
|
1509
1490
|
ODataModel.prototype.detachDataReceived = function (fnFunction, oListener) {
|
|
1510
1491
|
return this.detachEvent("dataReceived", fnFunction, oListener);
|
|
@@ -1538,6 +1519,31 @@ sap.ui.define([
|
|
|
1538
1519
|
return this.detachEvent("sessionTimeout", fnFunction, oListener);
|
|
1539
1520
|
};
|
|
1540
1521
|
|
|
1522
|
+
/**
|
|
1523
|
+
* Requests the metadata for the given meta path and calculates the key predicate by taking the
|
|
1524
|
+
* key properties from the given entity instance.
|
|
1525
|
+
*
|
|
1526
|
+
* @param {string} sMetaPath
|
|
1527
|
+
* An absolute metadata path to the entity set
|
|
1528
|
+
* @param {object} oEntity
|
|
1529
|
+
* The entity instance with the key property values
|
|
1530
|
+
* @returns {sap.ui.base.SyncPromise<string|undefined>}
|
|
1531
|
+
* A promise that gets resolved with the proper URI encoded key predicate, for example
|
|
1532
|
+
* "(Sector='A%2FB%26C',ID='42')" or "('42')", or <code>undefined</code>, if at least one key
|
|
1533
|
+
* property is undefined. It gets rejected if the metadata cannot be fetched or in case the
|
|
1534
|
+
* entity has no key properties according to metadata.
|
|
1535
|
+
*
|
|
1536
|
+
* @private
|
|
1537
|
+
* @see #requestKeyPredicate
|
|
1538
|
+
*/
|
|
1539
|
+
ODataModel.prototype.fetchKeyPredicate = function (sMetaPath, oEntity) {
|
|
1540
|
+
var mTypeForMetaPath = {};
|
|
1541
|
+
|
|
1542
|
+
return this.oRequestor.fetchType(mTypeForMetaPath, sMetaPath).then(function () {
|
|
1543
|
+
return _Helper.getKeyPredicate(oEntity, sMetaPath, mTypeForMetaPath);
|
|
1544
|
+
});
|
|
1545
|
+
};
|
|
1546
|
+
|
|
1541
1547
|
/**
|
|
1542
1548
|
* @override
|
|
1543
1549
|
* @see sap.ui.model.Model#filterMatchingMessages
|
|
@@ -1705,6 +1711,28 @@ sap.ui.define([
|
|
|
1705
1711
|
return mHeadersCopy;
|
|
1706
1712
|
};
|
|
1707
1713
|
|
|
1714
|
+
/**
|
|
1715
|
+
* Takes the metadata for the given meta path and calculates the key predicate by taking the key
|
|
1716
|
+
* properties from the given entity instance.
|
|
1717
|
+
*
|
|
1718
|
+
* @param {string} sMetaPath
|
|
1719
|
+
* An absolute metadata path to an entity set
|
|
1720
|
+
* @param {object} oEntity
|
|
1721
|
+
* The entity instance with the key property values
|
|
1722
|
+
* @returns {string|undefined}
|
|
1723
|
+
* The proper URI-encoded key predicate, for example "(Sector='A%2FB%26C',ID='42')" or
|
|
1724
|
+
* "('42')", or <code>undefined</code> if at least one key property is undefined.
|
|
1725
|
+
* @throws {Error}
|
|
1726
|
+
* If the key predicate cannot be determined synchronously
|
|
1727
|
+
* (due to a pending metadata request), or if the metadata could not be fetched.
|
|
1728
|
+
*
|
|
1729
|
+
* @function
|
|
1730
|
+
* @public
|
|
1731
|
+
* @see #requestKeyPredicate
|
|
1732
|
+
* @since 1.107.0
|
|
1733
|
+
*/
|
|
1734
|
+
ODataModel.prototype.getKeyPredicate = _Helper.createGetMethod("fetchKeyPredicate", true);
|
|
1735
|
+
|
|
1708
1736
|
/**
|
|
1709
1737
|
* Returns messages of this model associated with the given context, that is messages belonging
|
|
1710
1738
|
* to the object referred to by this context or a child object of that object. The messages are
|
|
@@ -1811,7 +1839,7 @@ sap.ui.define([
|
|
|
1811
1839
|
* {@link sap.ui.model.odata.v4.Context#getBinding binding} during its lifetime.
|
|
1812
1840
|
*
|
|
1813
1841
|
* @param {string} sPath
|
|
1814
|
-
* A list context path to an entity
|
|
1842
|
+
* A list context path to an entity, see also {@link #requestKeyPredicate}
|
|
1815
1843
|
* @param {boolean} [bRequestMessages]
|
|
1816
1844
|
* Whether to request messages for the context's entity
|
|
1817
1845
|
* @param {object} [mParameters]
|
|
@@ -1859,7 +1887,7 @@ sap.ui.define([
|
|
|
1859
1887
|
throw new Error("Invalid parameter: " + sParameter);
|
|
1860
1888
|
}
|
|
1861
1889
|
});
|
|
1862
|
-
sListPath = sPath.slice(0,
|
|
1890
|
+
sListPath = sPath.slice(0, _Helper.getPredicateIndex(sPath));
|
|
1863
1891
|
oListBinding = this.mKeepAliveBindingsByPath[sListPath];
|
|
1864
1892
|
if (!oListBinding) {
|
|
1865
1893
|
aListBindings = this.aAllBindings.filter(function (oBinding) {
|
|
@@ -1882,27 +1910,6 @@ sap.ui.define([
|
|
|
1882
1910
|
return oListBinding.getKeepAliveContext(sPath, bRequestMessages, mParameters.$$groupId);
|
|
1883
1911
|
};
|
|
1884
1912
|
|
|
1885
|
-
/**
|
|
1886
|
-
* Returns the index of the key predicate in the last segment of the given path.
|
|
1887
|
-
*
|
|
1888
|
-
* @param {string} sPath - The path
|
|
1889
|
-
* @returns {number} The index of the key predicate
|
|
1890
|
-
* @throws {Error} If no path is given or the last segment contains no key predicate
|
|
1891
|
-
*
|
|
1892
|
-
* @private
|
|
1893
|
-
*/
|
|
1894
|
-
ODataModel.prototype.getPredicateIndex = function (sPath) {
|
|
1895
|
-
var iPredicateIndex = sPath
|
|
1896
|
-
? sPath.indexOf("(", sPath.lastIndexOf("/"))
|
|
1897
|
-
: -1;
|
|
1898
|
-
|
|
1899
|
-
if (iPredicateIndex < 0 || !sPath.endsWith(")")) {
|
|
1900
|
-
throw new Error("Not a list context path to an entity: " + sPath);
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
return iPredicateIndex;
|
|
1904
|
-
};
|
|
1905
|
-
|
|
1906
1913
|
/**
|
|
1907
1914
|
* Returns the model's update group ID.
|
|
1908
1915
|
*
|
|
@@ -1937,6 +1944,20 @@ sap.ui.define([
|
|
|
1937
1944
|
};
|
|
1938
1945
|
};
|
|
1939
1946
|
|
|
1947
|
+
/**
|
|
1948
|
+
* Returns this model's root URL of the service to request data from (as defined by the
|
|
1949
|
+
* "serviceUrl" model parameter, see {@link sap.ui.model.odata.v4.ODataModel#constructor}),
|
|
1950
|
+
* without query options.
|
|
1951
|
+
*
|
|
1952
|
+
* @returns {string} The service URL
|
|
1953
|
+
*
|
|
1954
|
+
* @public
|
|
1955
|
+
* @since 1.107.0
|
|
1956
|
+
*/
|
|
1957
|
+
ODataModel.prototype.getServiceUrl = function () {
|
|
1958
|
+
return this.sServiceUrl;
|
|
1959
|
+
};
|
|
1960
|
+
|
|
1940
1961
|
/**
|
|
1941
1962
|
* Returns <code>true</code> if there are pending changes, meaning updates or created entities
|
|
1942
1963
|
* (see {@link sap.ui.model.odata.v4.ODataListBinding#create}) that have not yet been
|
|
@@ -2098,7 +2119,7 @@ sap.ui.define([
|
|
|
2098
2119
|
if (typeof sGroupId === "boolean") {
|
|
2099
2120
|
throw new Error("Unsupported parameter bForceUpdate");
|
|
2100
2121
|
}
|
|
2101
|
-
|
|
2122
|
+
_Helper.checkGroupId(sGroupId);
|
|
2102
2123
|
|
|
2103
2124
|
// Note: getBindings() returns an array that contains all bindings with change listeners
|
|
2104
2125
|
// (owned by Model)
|
|
@@ -2363,6 +2384,27 @@ sap.ui.define([
|
|
|
2363
2384
|
return oEntityContext.requestCanonicalPath();
|
|
2364
2385
|
};
|
|
2365
2386
|
|
|
2387
|
+
/**
|
|
2388
|
+
* Requests the metadata for the given meta path and calculates the key predicate by taking the
|
|
2389
|
+
* key properties from the given entity instance.
|
|
2390
|
+
*
|
|
2391
|
+
* @param {string} sMetaPath
|
|
2392
|
+
* An absolute metadata path to the entity set
|
|
2393
|
+
* @param {object} oEntity
|
|
2394
|
+
* The entity instance with the key property values
|
|
2395
|
+
* @returns {Promise<string|undefined>}
|
|
2396
|
+
* A promise that gets resolved with the proper URI-encoded key predicate, for example
|
|
2397
|
+
* "(Sector='A%2FB%26C',ID='42')" or "('42')", or <code>undefined</code> if at least one key
|
|
2398
|
+
* property is undefined. It gets rejected if the metadata cannot be fetched, or in case the
|
|
2399
|
+
* entity has no key properties according to the metadata.
|
|
2400
|
+
*
|
|
2401
|
+
* @function
|
|
2402
|
+
* @public
|
|
2403
|
+
* @see #getKeyPredicates
|
|
2404
|
+
* @since 1.107.0
|
|
2405
|
+
*/
|
|
2406
|
+
ODataModel.prototype.requestKeyPredicate = _Helper.createRequestMethod("fetchKeyPredicate");
|
|
2407
|
+
|
|
2366
2408
|
/**
|
|
2367
2409
|
* Requests side effects for the given paths on all affected root bindings.
|
|
2368
2410
|
*
|
|
@@ -2600,7 +2642,7 @@ sap.ui.define([
|
|
|
2600
2642
|
/**
|
|
2601
2643
|
* Returns a string representation of this object including the service URL.
|
|
2602
2644
|
*
|
|
2603
|
-
* @
|
|
2645
|
+
* @returns {string} A string description of this model
|
|
2604
2646
|
* @public
|
|
2605
2647
|
* @since 1.37.0
|
|
2606
2648
|
*/
|
|
@@ -54,11 +54,13 @@ sap.ui.define([
|
|
|
54
54
|
*
|
|
55
55
|
* @param {function} fnFunction The function to call when the event occurs
|
|
56
56
|
* @param {object} [oListener] Object on which to call the given function
|
|
57
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
58
|
+
*
|
|
57
59
|
* @public
|
|
58
60
|
* @since 1.59.0
|
|
59
61
|
*/
|
|
60
62
|
ODataParentBinding.prototype.attachPatchCompleted = function (fnFunction, oListener) {
|
|
61
|
-
this.attachEvent("patchCompleted", fnFunction, oListener);
|
|
63
|
+
return this.attachEvent("patchCompleted", fnFunction, oListener);
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
/**
|
|
@@ -66,11 +68,13 @@ sap.ui.define([
|
|
|
66
68
|
*
|
|
67
69
|
* @param {function} fnFunction The function to call when the event occurs
|
|
68
70
|
* @param {object} [oListener] Object on which to call the given function
|
|
71
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
72
|
+
*
|
|
69
73
|
* @public
|
|
70
74
|
* @since 1.59.0
|
|
71
75
|
*/
|
|
72
76
|
ODataParentBinding.prototype.detachPatchCompleted = function (fnFunction, oListener) {
|
|
73
|
-
this.detachEvent("patchCompleted", fnFunction, oListener);
|
|
77
|
+
return this.detachEvent("patchCompleted", fnFunction, oListener);
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
/**
|
|
@@ -138,11 +142,13 @@ sap.ui.define([
|
|
|
138
142
|
*
|
|
139
143
|
* @param {function} fnFunction The function to call when the event occurs
|
|
140
144
|
* @param {object} [oListener] Object on which to call the given function
|
|
145
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
146
|
+
*
|
|
141
147
|
* @public
|
|
142
148
|
* @since 1.59.0
|
|
143
149
|
*/
|
|
144
150
|
ODataParentBinding.prototype.attachPatchSent = function (fnFunction, oListener) {
|
|
145
|
-
this.attachEvent("patchSent", fnFunction, oListener);
|
|
151
|
+
return this.attachEvent("patchSent", fnFunction, oListener);
|
|
146
152
|
};
|
|
147
153
|
|
|
148
154
|
/**
|
|
@@ -150,11 +156,13 @@ sap.ui.define([
|
|
|
150
156
|
*
|
|
151
157
|
* @param {function} fnFunction The function to call when the event occurs
|
|
152
158
|
* @param {object} [oListener] Object on which to call the given function
|
|
159
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
160
|
+
*
|
|
153
161
|
* @public
|
|
154
162
|
* @since 1.59.0
|
|
155
163
|
*/
|
|
156
164
|
ODataParentBinding.prototype.detachPatchSent = function (fnFunction, oListener) {
|
|
157
|
-
this.detachEvent("patchSent", fnFunction, oListener);
|
|
165
|
+
return this.detachEvent("patchSent", fnFunction, oListener);
|
|
158
166
|
};
|
|
159
167
|
|
|
160
168
|
/**
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @mixes sap.ui.model.odata.v4.ODataBinding
|
|
43
43
|
* @public
|
|
44
44
|
* @since 1.37.0
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.107.1
|
|
46
46
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
47
47
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
48
48
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -760,7 +760,7 @@ sap.ui.define([
|
|
|
760
760
|
throw reportError(new Error("Must not specify a group ID (" + sGroupId
|
|
761
761
|
+ ") with $$noPatch"));
|
|
762
762
|
}
|
|
763
|
-
|
|
763
|
+
_Helper.checkGroupId(sGroupId);
|
|
764
764
|
if (typeof vValue === "function" || (vValue && typeof vValue === "object")) {
|
|
765
765
|
throw reportError(new Error("Not a primitive value"));
|
|
766
766
|
}
|
|
@@ -76,7 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
* corresponding number of milliseconds since 1 January, 1970 UTC.
|
|
77
77
|
* Otherwise the values are compared with the JavaScript operators <code>===</code>
|
|
78
78
|
* and <code>></code>.
|
|
79
|
-
* @
|
|
79
|
+
* @returns {number}
|
|
80
80
|
* The result of the comparison: <code>0</code> if the values are equal,
|
|
81
81
|
* <code>1</code> if the first value is larger, <code>-1</code> if the second value
|
|
82
82
|
* is larger, <code>NaN</code> if they cannot be compared
|
|
@@ -885,59 +885,71 @@ sap.ui.define([
|
|
|
885
885
|
* If this parameter is set, multiple requests for a cache using the same resource path will
|
|
886
886
|
* always return the same, shared cache. This cache is read-only, modifying calls lead to an
|
|
887
887
|
* error.
|
|
888
|
+
* @param {boolean} [bIsGrouped]
|
|
889
|
+
* Whether the list binding is grouped via its first sorter
|
|
888
890
|
* @returns {sap.ui.model.odata.v4.lib._Cache}
|
|
889
891
|
* The cache
|
|
890
892
|
* @throws {Error}
|
|
891
893
|
* If the system query option "$filter" is combined with group levels or with grand totals
|
|
892
|
-
* (unless "grandTotal like 1.84"), or if grand totals or group levels
|
|
893
|
-
* min/max, or if the system query options
|
|
894
|
-
* aggregation (no recursive hierarchy), or
|
|
895
|
-
* with grand totals or group levels or a
|
|
894
|
+
* (unless "grandTotal like 1.84"), or if grand totals or group levels or recursive hierarchy
|
|
895
|
+
* are combined with min/max or with grouping via sorter, or if the system query options
|
|
896
|
+
* "$expand" or "$select" are combined with pure data aggregation (no recursive hierarchy), or
|
|
897
|
+
* if the system query option "$search" is combined with grand totals or group levels or a
|
|
898
|
+
* recursive hierarchy
|
|
896
899
|
*
|
|
897
900
|
* @public
|
|
898
901
|
*/
|
|
899
902
|
_AggregationCache.create = function (oRequestor, sResourcePath, sDeepResourcePath, oAggregation,
|
|
900
|
-
mQueryOptions, bSortExpandSelect, bSharedRequest) {
|
|
901
|
-
var bHasGrandTotal, bHasGroupLevels
|
|
903
|
+
mQueryOptions, bSortExpandSelect, bSharedRequest, bIsGrouped) {
|
|
904
|
+
var bHasGrandTotal, bHasGroupLevels;
|
|
905
|
+
|
|
906
|
+
function checkExpandSelect() {
|
|
907
|
+
if ("$expand" in mQueryOptions) {
|
|
908
|
+
throw new Error("Unsupported system query option: $expand");
|
|
909
|
+
}
|
|
910
|
+
if ("$select" in mQueryOptions) {
|
|
911
|
+
throw new Error("Unsupported system query option: $select");
|
|
912
|
+
}
|
|
913
|
+
}
|
|
902
914
|
|
|
903
915
|
if (oAggregation) {
|
|
904
916
|
bHasGrandTotal = _AggregationHelper.hasGrandTotal(oAggregation.aggregate);
|
|
905
917
|
bHasGroupLevels = oAggregation.groupLevels && !!oAggregation.groupLevels.length;
|
|
906
|
-
bHasMinOrMax = _AggregationHelper.hasMinOrMax(oAggregation.aggregate);
|
|
907
918
|
|
|
908
|
-
if (
|
|
909
|
-
&& (bHasGrandTotal && !oAggregation["grandTotal like 1.84"]
|
|
910
|
-
|| bHasGroupLevels)) {
|
|
911
|
-
throw new Error("Unsupported system query option: $filter");
|
|
912
|
-
}
|
|
913
|
-
if (mQueryOptions.$search
|
|
914
|
-
&& (bHasGrandTotal || bHasGroupLevels || oAggregation.hierarchyQualifier)) {
|
|
915
|
-
throw new Error("Unsupported system query option: $search");
|
|
916
|
-
}
|
|
917
|
-
if (bHasMinOrMax) {
|
|
919
|
+
if (_AggregationHelper.hasMinOrMax(oAggregation.aggregate)) {
|
|
918
920
|
if (bHasGrandTotal) {
|
|
919
921
|
throw new Error("Unsupported grand totals together with min/max");
|
|
920
922
|
}
|
|
921
923
|
if (bHasGroupLevels) {
|
|
922
924
|
throw new Error("Unsupported group levels together with min/max");
|
|
923
925
|
}
|
|
926
|
+
if (oAggregation.hierarchyQualifier) {
|
|
927
|
+
throw new Error("Unsupported recursive hierarchy together with min/max");
|
|
928
|
+
}
|
|
929
|
+
checkExpandSelect();
|
|
930
|
+
|
|
931
|
+
return _MinMaxHelper.createCache(oRequestor, sResourcePath, oAggregation,
|
|
932
|
+
mQueryOptions);
|
|
924
933
|
}
|
|
925
934
|
|
|
926
|
-
if (
|
|
927
|
-
|
|
935
|
+
if (mQueryOptions.$filter
|
|
936
|
+
&& (bHasGrandTotal && !oAggregation["grandTotal like 1.84"]
|
|
937
|
+
|| bHasGroupLevels)) {
|
|
938
|
+
throw new Error("Unsupported system query option: $filter");
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
if (bHasGrandTotal || bHasGroupLevels || oAggregation.hierarchyQualifier) {
|
|
942
|
+
if (mQueryOptions.$search) {
|
|
943
|
+
throw new Error("Unsupported system query option: $search");
|
|
944
|
+
}
|
|
928
945
|
if (!oAggregation.hierarchyQualifier) {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
throw new Error("Unsupported system query option: $select");
|
|
934
|
-
}
|
|
946
|
+
checkExpandSelect();
|
|
947
|
+
}
|
|
948
|
+
if (bIsGrouped) {
|
|
949
|
+
throw new Error("Unsupported grouping via sorter");
|
|
935
950
|
}
|
|
936
951
|
|
|
937
|
-
return
|
|
938
|
-
? _MinMaxHelper.createCache(oRequestor, sResourcePath, oAggregation,
|
|
939
|
-
mQueryOptions)
|
|
940
|
-
: new _AggregationCache(oRequestor, sResourcePath, oAggregation, mQueryOptions,
|
|
952
|
+
return new _AggregationCache(oRequestor, sResourcePath, oAggregation, mQueryOptions,
|
|
941
953
|
bHasGrandTotal);
|
|
942
954
|
}
|
|
943
955
|
}
|