@openui5/sap.ui.core 1.91.0 → 1.93.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +37 -0
- package/.reuse/dep5 +46 -0
- package/THIRDPARTY.txt +59 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +6 -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 +0 -1
- package/src/sap/base/i18n/ResourceBundle.js +2 -2
- package/src/sap/base/security/encodeCSS.js +1 -0
- package/src/sap/base/security/encodeJS.js +1 -0
- package/src/sap/base/security/encodeURL.js +1 -0
- package/src/sap/base/security/encodeXML.js +2 -0
- package/src/sap/base/util/LoaderExtensions.js +1 -1
- 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 +10 -10
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/VersionInfo.js +1 -0
- package/src/sap/ui/base/DataType.js +1 -0
- 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 +121 -18
- 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 +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +4 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +4 -1
- package/src/sap/ui/core/Component.js +144 -43
- package/src/sap/ui/core/ComponentContainer.js +51 -2
- 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 +2 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +20 -22
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +2 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -3
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +59 -16
- package/src/sap/ui/core/Fragment.js +3 -3
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +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 +1 -1
- package/src/sap/ui/core/LocaleData.js +15 -1328
- package/src/sap/ui/core/Manifest.js +124 -69
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +143 -153
- package/src/sap/ui/core/Placeholder.js +173 -0
- package/src/sap/ui/core/Popup.js +29 -5
- package/src/sap/ui/core/RenderManager.js +344 -104
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +14 -62
- 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 +6 -3
- package/src/sap/ui/core/UIComponent.js +46 -23
- 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 +3 -5
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +5 -6
- package/src/sap/ui/core/cldr/en.json +1 -0
- package/src/sap/ui/core/date/UniversalDate.js +4 -2
- package/src/sap/ui/core/delegate/ItemNavigation.js +4 -4
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragAndDrop.js +1 -1
- 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 +4 -2
- package/src/sap/ui/core/format/NumberFormat.js +3 -0
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +26 -4
- 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 +4 -2
- 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_cs.properties +1 -1
- package/src/sap/ui/core/messagebundle_ms.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt.properties +6 -6
- package/src/sap/ui/core/messagebundle_tr.properties +1 -1
- package/src/sap/ui/core/mvc/Controller.js +146 -8
- package/src/sap/ui/core/mvc/HTMLView.js +3 -1
- package/src/sap/ui/core/mvc/JSONView.js +7 -5
- package/src/sap/ui/core/mvc/JSView.js +4 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +145 -68
- package/src/sap/ui/core/mvc/ViewType.js +2 -0
- package/src/sap/ui/core/mvc/XMLView.js +13 -9
- 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/HashChangerBase.js +9 -2
- package/src/sap/ui/core/routing/History.js +188 -87
- 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/RouterHashChanger.js +26 -16
- package/src/sap/ui/core/routing/TargetCache.js +19 -8
- package/src/sap/ui/core/routing/Targets.js +29 -3
- package/src/sap/ui/core/routing/async/Route.js +9 -1
- package/src/sap/ui/core/routing/async/Target.js +249 -85
- package/src/sap/ui/core/routing/async/TargetCache.js +9 -7
- package/src/sap/ui/core/routing/async/Targets.js +4 -2
- package/src/sap/ui/core/routing/sync/Target.js +15 -0
- package/src/sap/ui/core/rules/App.support.js +36 -2
- 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/InteractionTree.css +0 -14
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -2
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/TimelineOverview.css +0 -35
- package/src/sap/ui/core/support/controls/ObjectViewer.js +5 -9
- package/src/sap/ui/core/support/controls/TreeViewer.js +0 -1
- package/src/sap/ui/core/support/interactionSlider.css +0 -3
- package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
- 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/MessageTest.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +2 -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 -3
- package/src/sap/ui/core/support/support.css +4 -164
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +0 -22
- package/src/sap/ui/core/themes/base/BlindLayer.less +0 -2
- package/src/sap/ui/core/themes/base/BrowserScrollbar.less +0 -9
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +5 -5
- package/src/sap/ui/core/themes/base/SAP-icons.css +2 -0
- package/src/sap/ui/core/themes/base/SAP-icons.less +10 -0
- package/src/sap/ui/core/themes/base/TechnicalInfo.less +0 -1
- package/src/sap/ui/core/themes/base/base.less +569 -414
- package/src/sap/ui/core/themes/base/global.less +38 -0
- package/src/sap/ui/core/themes/base/library.source.less +1 -2
- package/src/sap/ui/core/themes/base/shared.less +1 -1
- package/src/sap/ui/core/themes/sap_hcb/global.less +34 -0
- package/src/sap/ui/core/theming/Parameters.js +222 -60
- 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 +2 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +27 -7
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +2 -2
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +18 -0
- 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 +2 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/dom/jquery/zIndex.js +3 -3
- 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/Binding.js +7 -3
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -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 +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 +36 -45
- package/src/sap/ui/model/analytics/odata4analytics.js +31 -31
- package/src/sap/ui/model/base/ManagedObjectModel.js +11 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +23 -18
- 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 +52 -40
- package/src/sap/ui/model/odata/ODataMetadata.js +3 -3
- package/src/sap/ui/model/odata/ODataModel.js +6 -6
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +1 -1
- package/src/sap/ui/model/odata/ODataUtils.js +126 -0
- 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 +165 -0
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +19 -5
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +20 -79
- package/src/sap/ui/model/odata/v2/ODataModel.js +75 -53
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +55 -41
- package/src/sap/ui/model/odata/v4/Context.js +48 -15
- package/src/sap/ui/model/odata/v4/ODataBinding.js +89 -9
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +87 -21
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +72 -50
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +8 -8
- package/src/sap/ui/model/odata/v4/ODataModel.js +109 -171
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +34 -67
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +18 -9
- package/src/sap/ui/model/odata/v4/ODataUtils.js +1 -1
- package/src/sap/ui/model/odata/v4/SubmitMode.js +3 -3
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +17 -16
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +86 -117
- package/src/sap/ui/model/odata/v4/lib/{_GrandTotalHelper.js → _ConcatHelper.js} +34 -27
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +2 -2
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +122 -7
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +2 -2
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +25 -74
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +49 -12
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +7 -7
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +3 -3
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +3 -3
- 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 +3 -3
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/performance/Measurement.js +3 -5
- package/src/sap/ui/performance/trace/FESR.js +2 -1
- package/src/sap/ui/performance/trace/Interaction.js +11 -9
- package/src/sap/ui/qunit/QUnitUtils.js +1 -1
- package/src/sap/ui/qunit/qunit-coverage.js +1 -0
- package/src/sap/ui/qunit/qunit-junit.js +1 -0
- 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 +17 -30
- package/src/sap/ui/test/_BrowserLogCollector.js +1 -0
- package/src/sap/ui/test/actions/Action.js +1 -1
- package/src/sap/ui/test/launchers/componentLauncher.js +2 -1
- package/src/sap/ui/test/opaQunit.js +6 -9
- package/src/sap/ui/test/pipelines/MatcherPipeline.js +1 -1
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -4
- package/src/sap/ui/test/starter/_utils.js +6 -0
- package/src/sap/ui/test/starter/createSuite.js +1 -1
- package/src/sap/ui/thirdparty/IPv6.js +2 -2
- package/src/sap/ui/thirdparty/SecondLevelDomains.js +2 -2
- package/src/sap/ui/thirdparty/URI.js +14 -5
- package/src/sap/ui/thirdparty/URITemplate.js +2 -2
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/src/sap/ui/thirdparty/crossroads.js +10 -2
- package/src/sap/ui/util/Mobile.js +10 -7
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +1 -1
- package/src/ui5loader.js +24 -6
- package/src/sap/ui/model/odata/v4/.eslintrc +0 -6
|
@@ -22,20 +22,20 @@ sap.ui.define(function () {
|
|
|
22
22
|
* {@link sap.ui.model.odata.v4.ODataModel#submitBatch}.
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
API: "API",
|
|
25
|
+
API : "API",
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Requests associated with the group ID are sent in a batch request which is triggered
|
|
29
29
|
* automatically before rendering.
|
|
30
30
|
* @public
|
|
31
31
|
*/
|
|
32
|
-
Auto: "Auto",
|
|
32
|
+
Auto : "Auto",
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Requests associated with the group ID are sent directly without batch.
|
|
36
36
|
* @public
|
|
37
37
|
*/
|
|
38
|
-
Direct: "Direct"
|
|
38
|
+
Direct : "Direct"
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
return SubmitMode;
|
|
@@ -290,7 +290,7 @@ sap.ui.define([
|
|
|
290
290
|
* Returns the string representation of the given parameter value.
|
|
291
291
|
* @param {object} oParameterValue the parameter value
|
|
292
292
|
* @param {boolean} bComplex whether the result is a complex binding or a simple binding
|
|
293
|
-
* @param {boolean} [bRaw
|
|
293
|
+
* @param {boolean} [bRaw] whether the result will contain the raw value
|
|
294
294
|
*/
|
|
295
295
|
function toString(oParameterValue, bComplex, bRaw) {
|
|
296
296
|
return Basics.resultToString(Expression.wrapExpression(oParameterValue), true,
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"./_AggregationHelper",
|
|
10
10
|
"./_Cache",
|
|
11
|
-
"./
|
|
11
|
+
"./_ConcatHelper",
|
|
12
12
|
"./_GroupLock",
|
|
13
13
|
"./_Helper",
|
|
14
14
|
"./_MinMaxHelper",
|
|
15
15
|
"sap/base/Log",
|
|
16
16
|
"sap/ui/base/SyncPromise"
|
|
17
|
-
], function (_AggregationHelper, _Cache,
|
|
17
|
+
], function (_AggregationHelper, _Cache, _ConcatHelper, _GroupLock, _Helper, _MinMaxHelper,
|
|
18
18
|
Log, SyncPromise) {
|
|
19
19
|
"use strict";
|
|
20
20
|
|
|
@@ -48,7 +48,8 @@ sap.ui.define([
|
|
|
48
48
|
*/
|
|
49
49
|
function _AggregationCache(oRequestor, sResourcePath, oAggregation, mQueryOptions,
|
|
50
50
|
bHasGrandTotal) {
|
|
51
|
-
var
|
|
51
|
+
var fnCount = function () {}, // no specific handling needed for "UI5__count" here
|
|
52
|
+
fnLeaves = null,
|
|
52
53
|
that = this;
|
|
53
54
|
|
|
54
55
|
_Cache.call(this, oRequestor, sResourcePath, mQueryOptions, true);
|
|
@@ -74,7 +75,7 @@ sap.ui.define([
|
|
|
74
75
|
this.oGrandTotalPromise = undefined;
|
|
75
76
|
if (bHasGrandTotal) {
|
|
76
77
|
this.oGrandTotalPromise = new SyncPromise(function (resolve) {
|
|
77
|
-
|
|
78
|
+
_ConcatHelper.enhanceCache(that.oFirstLevel, oAggregation, [fnLeaves,
|
|
78
79
|
function (oGrandTotal) {
|
|
79
80
|
var oGrandTotalCopy;
|
|
80
81
|
|
|
@@ -96,11 +97,10 @@ sap.ui.define([
|
|
|
96
97
|
_Helper.setPrivateAnnotation(oGrandTotal, "predicate", "()");
|
|
97
98
|
|
|
98
99
|
resolve(oGrandTotal);
|
|
99
|
-
},
|
|
100
|
+
}, fnCount]);
|
|
100
101
|
});
|
|
101
102
|
} else if (fnLeaves) {
|
|
102
|
-
|
|
103
|
-
fnLeaves);
|
|
103
|
+
_ConcatHelper.enhanceCache(that.oFirstLevel, oAggregation, [fnLeaves, fnCount]);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -219,15 +219,14 @@ sap.ui.define([
|
|
|
219
219
|
*
|
|
220
220
|
* @param {object} [oGroupNode]
|
|
221
221
|
* The group node or <code>undefined</code> for the first level cache
|
|
222
|
-
* @param {boolean} [
|
|
223
|
-
* Whether the
|
|
222
|
+
* @param {boolean} [bHasConcatHelper]
|
|
223
|
+
* Whether the _ConcatHelper is involved (use only for the first level cache!)
|
|
224
224
|
* @returns {sap.ui.model.odata.v4.lib._CollectionCache}
|
|
225
225
|
* The group level cache
|
|
226
226
|
*
|
|
227
227
|
* @private
|
|
228
228
|
*/
|
|
229
|
-
_AggregationCache.prototype.createGroupLevelCache = function (oGroupNode,
|
|
230
|
-
bHasGrandTotalHelper) {
|
|
229
|
+
_AggregationCache.prototype.createGroupLevelCache = function (oGroupNode, bHasConcatHelper) {
|
|
231
230
|
var oAggregation = this.oAggregation,
|
|
232
231
|
aAllProperties = _AggregationHelper.getAllProperties(oAggregation),
|
|
233
232
|
oCache, aGroupBy, bLeaf, iLevel, mQueryOptions, bTotal;
|
|
@@ -251,8 +250,8 @@ sap.ui.define([
|
|
|
251
250
|
? " and (" + mQueryOptions.$$filterBeforeAggregate + ")"
|
|
252
251
|
: "");
|
|
253
252
|
}
|
|
254
|
-
if (!
|
|
255
|
-
// Note: UI5__count currently handled only by
|
|
253
|
+
if (!bHasConcatHelper) {
|
|
254
|
+
// Note: UI5__count currently handled only by _ConcatHelper!
|
|
256
255
|
delete mQueryOptions.$count;
|
|
257
256
|
mQueryOptions = _AggregationHelper.buildApply(oAggregation, mQueryOptions, iLevel);
|
|
258
257
|
}
|
|
@@ -783,11 +782,13 @@ sap.ui.define([
|
|
|
783
782
|
bHasGroupLevels = !!oAggregation.groupLevels.length;
|
|
784
783
|
bHasMinOrMax = _AggregationHelper.hasMinOrMax(oAggregation.aggregate);
|
|
785
784
|
|
|
786
|
-
if (
|
|
785
|
+
if (mQueryOptions.$filter
|
|
786
|
+
&& (bHasGrandTotal && !oAggregation["grandTotal like 1.84"]
|
|
787
|
+
|| bHasGroupLevels)) {
|
|
787
788
|
throw new Error("Unsupported system query option: $filter");
|
|
788
789
|
}
|
|
789
|
-
if (
|
|
790
|
-
throw new Error("Unsupported system query option: $
|
|
790
|
+
if (mQueryOptions.$search && (bHasGrandTotal || bHasGroupLevels)) {
|
|
791
|
+
throw new Error("Unsupported system query option: $search");
|
|
791
792
|
}
|
|
792
793
|
if (bHasMinOrMax) {
|
|
793
794
|
if (bHasGrandTotal) {
|
|
@@ -32,6 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
groupLevels : ["string"],
|
|
35
|
+
search : "string",
|
|
35
36
|
subtotalsAtBottomOnly : "boolean"
|
|
36
37
|
},
|
|
37
38
|
rComma = /,|%2C|%2c/,
|
|
@@ -317,6 +318,9 @@ sap.ui.define([
|
|
|
317
318
|
sApply = "concat(" + sLeaves + "," + sApply + ")";
|
|
318
319
|
}
|
|
319
320
|
}
|
|
321
|
+
if (oAggregation.search) {
|
|
322
|
+
sApply = "search(" + oAggregation.search + ")/" + sApply;
|
|
323
|
+
}
|
|
320
324
|
if (mQueryOptions.$$filterBeforeAggregate) {
|
|
321
325
|
sApply = "filter(" + mQueryOptions.$$filterBeforeAggregate + ")/" + sApply;
|
|
322
326
|
delete mQueryOptions.$$filterBeforeAggregate;
|
|
@@ -367,7 +371,7 @@ sap.ui.define([
|
|
|
367
371
|
_AggregationHelper.checkTypeof(vValue[sKey], vType[bIsMap ? "*" : sKey],
|
|
368
372
|
sPath + "/" + sKey);
|
|
369
373
|
});
|
|
370
|
-
} else if (typeof vValue !== vType) {
|
|
374
|
+
} else if (typeof vValue !== vType) { // eslint-disable-line valid-typeof
|
|
371
375
|
throw new Error("Not a " + vType + " value for '" + sPath + "'");
|
|
372
376
|
}
|
|
373
377
|
},
|
|
@@ -11,8 +11,9 @@ sap.ui.define([
|
|
|
11
11
|
"./_Requestor",
|
|
12
12
|
"sap/base/Log",
|
|
13
13
|
"sap/base/util/isEmptyObject",
|
|
14
|
-
"sap/ui/base/SyncPromise"
|
|
15
|
-
|
|
14
|
+
"sap/ui/base/SyncPromise",
|
|
15
|
+
"sap/ui/model/odata/ODataUtils"
|
|
16
|
+
], function (_GroupLock, _Helper, _Requestor, Log, isEmptyObject, SyncPromise, ODataUtils) {
|
|
16
17
|
"use strict";
|
|
17
18
|
|
|
18
19
|
var sClassName = "sap.ui.model.odata.v4.lib._Cache",
|
|
@@ -85,7 +86,7 @@ sap.ui.define([
|
|
|
85
86
|
* A resource path relative to the service URL
|
|
86
87
|
* @param {object} [mQueryOptions]
|
|
87
88
|
* A map of key-value pairs representing the query string
|
|
88
|
-
* @param {boolean} [bSortExpandSelect
|
|
89
|
+
* @param {boolean} [bSortExpandSelect]
|
|
89
90
|
* Whether the paths in $expand and $select shall be sorted in the cache's query string;
|
|
90
91
|
* note that this flag can safely be ignored for all "new" features (after 1.47) which
|
|
91
92
|
* should just sort always
|
|
@@ -93,7 +94,7 @@ sap.ui.define([
|
|
|
93
94
|
* A function that returns the cache's original resource path to be used to build the target
|
|
94
95
|
* path for bound messages; if it is not given or returns nothing, <code>sResourcePath</code>
|
|
95
96
|
* is used instead. See {@link #getOriginalResourcePath}.
|
|
96
|
-
* @param {boolean} [bSharedRequest
|
|
97
|
+
* @param {boolean} [bSharedRequest]
|
|
97
98
|
* If this parameter is set, the cache is read-only and modifying calls lead to an error.
|
|
98
99
|
*
|
|
99
100
|
* @alias sap.ui.model.odata.v4.lib._Cache
|
|
@@ -1045,7 +1046,7 @@ sap.ui.define([
|
|
|
1045
1046
|
* The function is called just before the back-end request is sent.
|
|
1046
1047
|
* If no back-end request is needed, the function is not called.
|
|
1047
1048
|
* @returns {sap.ui.base.SyncPromise}
|
|
1048
|
-
* A promise which resolves
|
|
1049
|
+
* A promise which resolves without a defined result when it is updated in the cache.
|
|
1049
1050
|
* @throws {Error} If the cache is shared
|
|
1050
1051
|
*
|
|
1051
1052
|
* @public
|
|
@@ -1087,8 +1088,6 @@ sap.ui.define([
|
|
|
1087
1088
|
var oElement = aResult[0];
|
|
1088
1089
|
|
|
1089
1090
|
that.replaceElement(aElements, iIndex, sPredicate, oElement, aResult[1], sPath);
|
|
1090
|
-
|
|
1091
|
-
return oElement;
|
|
1092
1091
|
});
|
|
1093
1092
|
});
|
|
1094
1093
|
};
|
|
@@ -1609,7 +1608,7 @@ sap.ui.define([
|
|
|
1609
1608
|
* Path of the entity, relative to the cache (as used by change listeners)
|
|
1610
1609
|
* @param {string} [sUnitOrCurrencyPath]
|
|
1611
1610
|
* Path of the unit or currency for the property, relative to the entity
|
|
1612
|
-
* @param {boolean} [bPatchWithoutSideEffects
|
|
1611
|
+
* @param {boolean} [bPatchWithoutSideEffects]
|
|
1613
1612
|
* Whether the PATCH response is ignored, except for a new ETag
|
|
1614
1613
|
* @param {function} [fnPatchSent]
|
|
1615
1614
|
* The function is called just before a back-end request is sent for the first time.
|
|
@@ -2002,11 +2001,11 @@ sap.ui.define([
|
|
|
2002
2001
|
* A resource path relative to the service URL
|
|
2003
2002
|
* @param {object} [mQueryOptions]
|
|
2004
2003
|
* A map of key-value pairs representing the query string
|
|
2005
|
-
* @param {boolean} [bSortExpandSelect
|
|
2004
|
+
* @param {boolean} [bSortExpandSelect]
|
|
2006
2005
|
* Whether the paths in $expand and $select shall be sorted in the cache's query string
|
|
2007
2006
|
* @param {string} [sDeepResourcePath=sResourcePath]
|
|
2008
2007
|
* The deep resource path to be used to build the target path for bound messages
|
|
2009
|
-
* @param {boolean} [bSharedRequest
|
|
2008
|
+
* @param {boolean} [bSharedRequest]
|
|
2010
2009
|
* If this parameter is set, the cache is read-only and modifying calls lead to an error.
|
|
2011
2010
|
*
|
|
2012
2011
|
* @alias sap.ui.model.odata.v4.lib._CollectionCache
|
|
@@ -2218,56 +2217,6 @@ sap.ui.define([
|
|
|
2218
2217
|
return sQueryString;
|
|
2219
2218
|
};
|
|
2220
2219
|
|
|
2221
|
-
/**
|
|
2222
|
-
* Calculates the index range to be read for the given start, length and prefetch length.
|
|
2223
|
-
* Checks if <code>aElements</code> entries are available for half the prefetch length left and
|
|
2224
|
-
* right to it. If not, the full prefetch length is added to this side.
|
|
2225
|
-
*
|
|
2226
|
-
* @param {number} iStart
|
|
2227
|
-
* The start index for the data request
|
|
2228
|
-
* @param {number} iLength
|
|
2229
|
-
* The number of requested entries
|
|
2230
|
-
* @param {number} iPrefetchLength
|
|
2231
|
-
* The number of entries to prefetch before and after the given range; <code>Infinity</code>
|
|
2232
|
-
* is supported
|
|
2233
|
-
* @returns {object}
|
|
2234
|
-
* Returns an object with a member <code>start</code> for the start index for the next
|
|
2235
|
-
* read and <code>length</code> for the number of entries to be read.
|
|
2236
|
-
*
|
|
2237
|
-
* @private
|
|
2238
|
-
*/
|
|
2239
|
-
_CollectionCache.prototype.getReadRange = function (iStart, iLength, iPrefetchLength) {
|
|
2240
|
-
var aElements = this.aElements;
|
|
2241
|
-
|
|
2242
|
-
// Checks whether aElements contains at least one <code>undefined</code> entry within the
|
|
2243
|
-
// given start (inclusive) and end (exclusive).
|
|
2244
|
-
function isDataMissing(iStart, iEnd) {
|
|
2245
|
-
var i;
|
|
2246
|
-
for (i = iStart; i < iEnd; i += 1) {
|
|
2247
|
-
if (aElements[i] === undefined) {
|
|
2248
|
-
return true;
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
return false;
|
|
2252
|
-
}
|
|
2253
|
-
|
|
2254
|
-
if (isDataMissing(iStart + iLength, iStart + iLength + iPrefetchLength / 2)) {
|
|
2255
|
-
iLength += iPrefetchLength;
|
|
2256
|
-
}
|
|
2257
|
-
if (isDataMissing(Math.max(iStart - iPrefetchLength / 2, 0), iStart)) {
|
|
2258
|
-
iLength += iPrefetchLength;
|
|
2259
|
-
iStart -= iPrefetchLength;
|
|
2260
|
-
if (iStart < 0) {
|
|
2261
|
-
iLength += iStart; // Note: Infinity + -Infinity === NaN
|
|
2262
|
-
if (isNaN(iLength)) {
|
|
2263
|
-
iLength = Infinity;
|
|
2264
|
-
}
|
|
2265
|
-
iStart = 0;
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
return {length : iLength, start : iStart};
|
|
2269
|
-
};
|
|
2270
|
-
|
|
2271
2220
|
/**
|
|
2272
2221
|
* Returns the resource path including the query string with $skip and $top if needed.
|
|
2273
2222
|
*
|
|
@@ -2346,8 +2295,7 @@ sap.ui.define([
|
|
|
2346
2295
|
if (sPredicate) {
|
|
2347
2296
|
oKeptElement = this.aElements.$byPredicate[sPredicate];
|
|
2348
2297
|
if (oKeptElement) {
|
|
2349
|
-
if (oElement["@odata.etag"]
|
|
2350
|
-
&& oElement["@odata.etag"] === oKeptElement["@odata.etag"]) {
|
|
2298
|
+
if (oElement["@odata.etag"] === oKeptElement["@odata.etag"]) {
|
|
2351
2299
|
oElement = oKeptElement;
|
|
2352
2300
|
} else if (this.hasPendingChangesForPath(sPredicate)) {
|
|
2353
2301
|
throw new Error("Modified on client and on server: "
|
|
@@ -2429,11 +2377,8 @@ sap.ui.define([
|
|
|
2429
2377
|
_CollectionCache.prototype.read = function (iIndex, iLength, iPrefetchLength, oGroupLock,
|
|
2430
2378
|
fnDataRequested) {
|
|
2431
2379
|
var aElementsRange,
|
|
2432
|
-
iEnd,
|
|
2433
|
-
iGapStart = -1,
|
|
2434
2380
|
oPromise = this.oPendingRequestsPromise || this.aElements.$tail,
|
|
2435
|
-
|
|
2436
|
-
i, n, that = this;
|
|
2381
|
+
that = this;
|
|
2437
2382
|
|
|
2438
2383
|
if (iIndex < 0) {
|
|
2439
2384
|
throw new Error("Illegal index " + iIndex + ", must be >= 0");
|
|
@@ -2448,34 +2393,23 @@ sap.ui.define([
|
|
|
2448
2393
|
});
|
|
2449
2394
|
}
|
|
2450
2395
|
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
fnDataRequested);
|
|
2460
|
-
fnDataRequested = undefined;
|
|
2461
|
-
iGapStart = -1;
|
|
2462
|
-
}
|
|
2463
|
-
} else if (iGapStart < 0) {
|
|
2464
|
-
iGapStart = i;
|
|
2465
|
-
}
|
|
2466
|
-
}
|
|
2467
|
-
if (iGapStart >= 0) {
|
|
2468
|
-
this.requestElements(iGapStart, iEnd, oGroupLock.getUnlockedCopy(), fnDataRequested);
|
|
2469
|
-
}
|
|
2396
|
+
ODataUtils._getReadIntervals(this.aElements, iIndex, iLength,
|
|
2397
|
+
this.bServerDrivenPaging ? 0 : iPrefetchLength,
|
|
2398
|
+
this.aElements.$created + this.iLimit)
|
|
2399
|
+
.forEach(function (oInterval) {
|
|
2400
|
+
that.requestElements(oInterval.start, oInterval.end, oGroupLock.getUnlockedCopy(),
|
|
2401
|
+
fnDataRequested);
|
|
2402
|
+
fnDataRequested = undefined;
|
|
2403
|
+
});
|
|
2470
2404
|
|
|
2471
2405
|
oGroupLock.unlock();
|
|
2472
2406
|
|
|
2473
|
-
aElementsRange = this.aElements.slice(iIndex,
|
|
2474
|
-
if (this.aElements.$tail
|
|
2407
|
+
aElementsRange = this.aElements.slice(iIndex, iIndex + iLength + iPrefetchLength);
|
|
2408
|
+
if (this.aElements.$tail && iIndex + iLength > this.aElements.length) {
|
|
2475
2409
|
aElementsRange.push(this.aElements.$tail);
|
|
2476
2410
|
}
|
|
2477
2411
|
return SyncPromise.all(aElementsRange).then(function () {
|
|
2478
|
-
var aElements = that.aElements.slice(iIndex,
|
|
2412
|
+
var aElements = that.aElements.slice(iIndex, iIndex + iLength);
|
|
2479
2413
|
|
|
2480
2414
|
aElements.$count = that.aElements.$count;
|
|
2481
2415
|
|
|
@@ -2801,7 +2735,7 @@ sap.ui.define([
|
|
|
2801
2735
|
};
|
|
2802
2736
|
|
|
2803
2737
|
/**
|
|
2804
|
-
* Returns a promise to be resolved with
|
|
2738
|
+
* Returns a promise to be resolved with the requested property value.
|
|
2805
2739
|
*
|
|
2806
2740
|
* @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
|
|
2807
2741
|
* A lock for the group to associate the request with
|
|
@@ -2839,11 +2773,10 @@ sap.ui.define([
|
|
|
2839
2773
|
fnDataRequested, undefined, this.sMetaPath));
|
|
2840
2774
|
}
|
|
2841
2775
|
return this.oPromise.then(function (oResult) {
|
|
2842
|
-
// for a null value, null is returned due to "204 No Content". But it is expected in the
|
|
2843
|
-
// value property of an object
|
|
2844
|
-
oResult = oResult || {value : null};
|
|
2845
2776
|
that.registerChange("", oListener);
|
|
2846
|
-
|
|
2777
|
+
// Note: For a null value, null is returned due to "204 No Content". For $count,
|
|
2778
|
+
// "a simple primitive integer value with media type text/plain" is returned.
|
|
2779
|
+
return oResult && typeof oResult === "object" ? oResult.value : oResult;
|
|
2847
2780
|
});
|
|
2848
2781
|
};
|
|
2849
2782
|
|
|
@@ -2873,9 +2806,9 @@ sap.ui.define([
|
|
|
2873
2806
|
* A resource path relative to the service URL
|
|
2874
2807
|
* @param {object} [mQueryOptions]
|
|
2875
2808
|
* A map of key-value pairs representing the query string
|
|
2876
|
-
* @param {boolean} [bSortExpandSelect
|
|
2809
|
+
* @param {boolean} [bSortExpandSelect]
|
|
2877
2810
|
* Whether the paths in $expand and $select shall be sorted in the cache's query string
|
|
2878
|
-
* @param {boolean} [bSharedRequest
|
|
2811
|
+
* @param {boolean} [bSharedRequest]
|
|
2879
2812
|
* If this parameter is set, the cache is read-only and modifying calls lead to an error.
|
|
2880
2813
|
* @param {function} [fnGetOriginalResourcePath]
|
|
2881
2814
|
* A function that returns the cache's original resource path to be used to build the target
|
|
@@ -2992,7 +2925,14 @@ sap.ui.define([
|
|
|
2992
2925
|
* The entity which contains the ETag to be sent as "If-Match" header with the POST request.
|
|
2993
2926
|
* @param {boolean} [bIgnoreETag]
|
|
2994
2927
|
* Whether the entity's ETag should be actively ignored (If-Match:*); used only in case an
|
|
2995
|
-
* entity is given
|
|
2928
|
+
* entity is given and an ETag is present
|
|
2929
|
+
* @param {function} [fnOnStrictHandlingFailed]
|
|
2930
|
+
* If this callback is given, then the preference "handling=strict" is applied.
|
|
2931
|
+
* If the request fails with an error having <code>oError.strictHandlingFailed</code> set,
|
|
2932
|
+
* this error is passed to the callback which returns a promise. If this promise resolves with
|
|
2933
|
+
* <code>true</code> the action is repeated w/o the preference, otherwise this function's
|
|
2934
|
+
* result promise is rejected with an <code>Error</code> instance <code>oError</code> where
|
|
2935
|
+
* <code>oError.canceled === true</code>.
|
|
2996
2936
|
* @returns {sap.ui.base.SyncPromise}
|
|
2997
2937
|
* A promise to be resolved with the result of the request.
|
|
2998
2938
|
* @throws {Error}
|
|
@@ -3001,11 +2941,48 @@ sap.ui.define([
|
|
|
3001
2941
|
*
|
|
3002
2942
|
* @public
|
|
3003
2943
|
*/
|
|
3004
|
-
_SingleCache.prototype.post = function (oGroupLock, oData, oEntity, bIgnoreETag
|
|
2944
|
+
_SingleCache.prototype.post = function (oGroupLock, oData, oEntity, bIgnoreETag,
|
|
2945
|
+
fnOnStrictHandlingFailed) {
|
|
3005
2946
|
var sGroupId,
|
|
2947
|
+
mHeaders = oEntity
|
|
2948
|
+
? {"If-Match" : bIgnoreETag && "@odata.etag" in oEntity ? "*" : oEntity}
|
|
2949
|
+
: {},
|
|
3006
2950
|
sHttpMethod = "POST",
|
|
3007
2951
|
that = this;
|
|
3008
2952
|
|
|
2953
|
+
function post(oGroupLock0) {
|
|
2954
|
+
that.bPosting = true;
|
|
2955
|
+
|
|
2956
|
+
// BEWARE! Avoid finally here! BCP: 2070200175
|
|
2957
|
+
return SyncPromise.all([
|
|
2958
|
+
that.oRequestor.request(sHttpMethod,
|
|
2959
|
+
that.sResourcePath + that.sQueryString, oGroupLock0, mHeaders, oData),
|
|
2960
|
+
that.fetchTypes()
|
|
2961
|
+
]).then(function (aResult) {
|
|
2962
|
+
that.visitResponse(aResult[0], aResult[1]);
|
|
2963
|
+
that.bPosting = false;
|
|
2964
|
+
|
|
2965
|
+
return aResult[0];
|
|
2966
|
+
}, function (oError) {
|
|
2967
|
+
that.bPosting = false;
|
|
2968
|
+
if (fnOnStrictHandlingFailed && oError.strictHandlingFailed) {
|
|
2969
|
+
return fnOnStrictHandlingFailed(oError).then(function (bConfirm) {
|
|
2970
|
+
var oCanceledError;
|
|
2971
|
+
|
|
2972
|
+
if (bConfirm) {
|
|
2973
|
+
delete mHeaders["Prefer"];
|
|
2974
|
+
return post(oGroupLock0.getUnlockedCopy());
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
oCanceledError = Error("Action canceled due to strict handling");
|
|
2978
|
+
oCanceledError.canceled = true;
|
|
2979
|
+
throw oCanceledError;
|
|
2980
|
+
});
|
|
2981
|
+
}
|
|
2982
|
+
throw oError;
|
|
2983
|
+
});
|
|
2984
|
+
}
|
|
2985
|
+
|
|
3009
2986
|
this.checkSharedRequest();
|
|
3010
2987
|
if (!this.bPost) {
|
|
3011
2988
|
throw new Error("POST request not allowed");
|
|
@@ -3031,22 +3008,11 @@ sap.ui.define([
|
|
|
3031
3008
|
}
|
|
3032
3009
|
}
|
|
3033
3010
|
|
|
3034
|
-
this.bPosting = true;
|
|
3035
3011
|
this.bSentRequest = true;
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
]).then(function (aResult) {
|
|
3041
|
-
that.visitResponse(aResult[0], aResult[1]);
|
|
3042
|
-
that.bPosting = false;
|
|
3043
|
-
|
|
3044
|
-
return aResult[0];
|
|
3045
|
-
}, function (oError) {
|
|
3046
|
-
// BEWARE! Avoid finally here! BCP: 2070200175
|
|
3047
|
-
that.bPosting = false;
|
|
3048
|
-
throw oError;
|
|
3049
|
-
});
|
|
3012
|
+
if (fnOnStrictHandlingFailed) {
|
|
3013
|
+
mHeaders["Prefer"] = "handling=strict";
|
|
3014
|
+
}
|
|
3015
|
+
this.oPromise = post(oGroupLock);
|
|
3050
3016
|
|
|
3051
3017
|
return this.oPromise;
|
|
3052
3018
|
};
|
|
@@ -3109,6 +3075,9 @@ sap.ui.define([
|
|
|
3109
3075
|
var oNewValue = aResult[0],
|
|
3110
3076
|
oOldValue = aResult[2];
|
|
3111
3077
|
|
|
3078
|
+
// ensure that the new value has a predicate although key properties were not requested
|
|
3079
|
+
_Helper.setPrivateAnnotation(oNewValue, "predicate",
|
|
3080
|
+
_Helper.getPrivateAnnotation(oOldValue, "predicate"));
|
|
3112
3081
|
// visit response to report the messages
|
|
3113
3082
|
that.visitResponse(oNewValue, aResult[1]);
|
|
3114
3083
|
_Helper.updateAll(that.mChangeListeners, "", oOldValue, oNewValue, function (sPath) {
|
|
@@ -3142,11 +3111,11 @@ sap.ui.define([
|
|
|
3142
3111
|
* Examples:
|
|
3143
3112
|
* {foo : "bar", "bar" : "baz"} results in the query string "foo=bar&bar=baz"
|
|
3144
3113
|
* {foo : ["bar", "baz"]} results in the query string "foo=bar&foo=baz"
|
|
3145
|
-
* @param {boolean} [bSortExpandSelect
|
|
3114
|
+
* @param {boolean} [bSortExpandSelect]
|
|
3146
3115
|
* Whether the paths in $expand and $select shall be sorted in the cache's query string
|
|
3147
3116
|
* @param {string} [sDeepResourcePath=sResourcePath]
|
|
3148
3117
|
* The deep resource path to be used to build the target path for bound messages
|
|
3149
|
-
* @param {boolean} [bSharedRequest
|
|
3118
|
+
* @param {boolean} [bSharedRequest]
|
|
3150
3119
|
* If this parameter is set, multiple requests for a cache using the same resource path will
|
|
3151
3120
|
* always return the same, shared cache. This cache is read-only, modifying calls lead to an
|
|
3152
3121
|
* error.
|
|
@@ -3238,9 +3207,9 @@ sap.ui.define([
|
|
|
3238
3207
|
* Examples:
|
|
3239
3208
|
* {foo : "bar", "bar" : "baz"} results in the query string "foo=bar&bar=baz"
|
|
3240
3209
|
* {foo : ["bar", "baz"]} results in the query string "foo=bar&foo=baz"
|
|
3241
|
-
* @param {boolean} [bSortExpandSelect
|
|
3210
|
+
* @param {boolean} [bSortExpandSelect]
|
|
3242
3211
|
* Whether the paths in $expand and $select shall be sorted in the cache's query string
|
|
3243
|
-
* @param {boolean} [bSharedRequest
|
|
3212
|
+
* @param {boolean} [bSharedRequest]
|
|
3244
3213
|
* If this parameter is set, multiple requests for a cache using the same resource path might
|
|
3245
3214
|
* always return the same, shared cache. This cache is read-only, modifying calls lead to an
|
|
3246
3215
|
* error.
|
|
@@ -3329,4 +3298,4 @@ sap.ui.define([
|
|
|
3329
3298
|
};
|
|
3330
3299
|
|
|
3331
3300
|
return _Cache;
|
|
3332
|
-
}, /* bExport= */false);
|
|
3301
|
+
}, /* bExport= */false);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
//Provides class sap.ui.model.odata.v4.lib.
|
|
7
|
+
//Provides class sap.ui.model.odata.v4.lib._ConcatHelper
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"./_AggregationHelper"
|
|
10
10
|
], function (_AggregationHelper) {
|
|
@@ -12,8 +12,9 @@ sap.ui.define([
|
|
|
12
12
|
|
|
13
13
|
return {
|
|
14
14
|
/**
|
|
15
|
-
* Enhances the given cache, so that
|
|
16
|
-
*
|
|
15
|
+
* Enhances the given cache, so that additional rows are requested together with the first
|
|
16
|
+
* request using "concat"; this means that $count needs to be requested as "UI5__count"
|
|
17
|
+
* instead, in a separate row. Subsequent requests remain unchanged.
|
|
17
18
|
*
|
|
18
19
|
* @param {sap.ui.model.odata.v4.lib._CollectionCache} oCache
|
|
19
20
|
* The cache to be enhanced
|
|
@@ -22,19 +23,22 @@ sap.ui.define([
|
|
|
22
23
|
* <a href="http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/">OData
|
|
23
24
|
* Extension for Data Aggregation Version 4.0</a>; must already be normalized by
|
|
24
25
|
* {@link _AggregationHelper.buildApply}
|
|
25
|
-
* @param {function} [
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* @param {function[]} [aAdditionalRowHandlers]
|
|
27
|
+
* Handlers for the additional response rows (which are automatically scanned for
|
|
28
|
+
* "UI5__count"); if a handler is missing, the corresponding row is assumed to be missing
|
|
29
|
+
* as well
|
|
30
|
+
* @param {object} [mAlias2MeasureAndMethod]
|
|
31
|
+
* A map which is filled by {@link _AggregationHelper.buildApply} in case an aggregatable
|
|
32
|
+
* property requests minimum or maximum values.
|
|
29
33
|
*/
|
|
30
|
-
|
|
34
|
+
enhanceCache : function (oCache, oAggregation, aAdditionalRowHandlers,
|
|
35
|
+
mAlias2MeasureAndMethod) {
|
|
31
36
|
var bFollowUp;
|
|
32
37
|
|
|
33
38
|
/**
|
|
34
39
|
* Returns the resource path including the query string with "$apply" which includes the
|
|
35
|
-
* aggregation functions for
|
|
36
|
-
* transformations. Follow-up requests do not aggregate
|
|
37
|
-
* total again.
|
|
40
|
+
* aggregation functions for additional rows and thus uses "skip()/top()" as
|
|
41
|
+
* transformations. Follow-up requests do not aggregate these additional rows again.
|
|
38
42
|
*
|
|
39
43
|
* This function is used to replace <code>getResourcePathWithQuery</code> of the first
|
|
40
44
|
* level cache and needs to be called on the first level cache.
|
|
@@ -43,16 +47,17 @@ sap.ui.define([
|
|
|
43
47
|
* The start index of the range
|
|
44
48
|
* @param {number} iEnd
|
|
45
49
|
* The index after the last element
|
|
46
|
-
* @returns {string}
|
|
50
|
+
* @returns {string}
|
|
51
|
+
* The resource path including the query string
|
|
47
52
|
*/
|
|
48
53
|
// @override sap.ui.model.odata.v4.lib._CollectionCache#getResourcePathWithQuery
|
|
49
|
-
// Note: same as in _MinMaxHelper
|
|
50
54
|
oCache.getResourcePathWithQuery = function (iStart, iEnd) {
|
|
55
|
+
// Note: ignore existing mQueryOptions.$apply, e.g. from ODLB#updateAnalyticalInfo
|
|
51
56
|
var mQueryOptionsWithApply = _AggregationHelper.buildApply(oAggregation,
|
|
52
57
|
Object.assign({}, this.mQueryOptions, {
|
|
53
58
|
$skip : iStart,
|
|
54
59
|
$top : iEnd - iStart
|
|
55
|
-
}), 1, bFollowUp);
|
|
60
|
+
}), 1, bFollowUp, mAlias2MeasureAndMethod);
|
|
56
61
|
|
|
57
62
|
bFollowUp = true; // next request is a follow-up
|
|
58
63
|
|
|
@@ -61,28 +66,30 @@ sap.ui.define([
|
|
|
61
66
|
};
|
|
62
67
|
|
|
63
68
|
/**
|
|
64
|
-
* Handles a GET response wich
|
|
65
|
-
* its own.
|
|
69
|
+
* Handles a GET response wich contains additional rows.
|
|
66
70
|
*
|
|
67
71
|
* @param {number} iStart
|
|
68
72
|
* The index of the first element to request ($skip)
|
|
69
73
|
* @param {number} iEnd
|
|
70
74
|
* The index after the last element to request ($skip + $top)
|
|
71
|
-
* @param {object} oResult
|
|
72
|
-
*
|
|
73
|
-
*
|
|
75
|
+
* @param {object} oResult
|
|
76
|
+
* The result of the GET request
|
|
77
|
+
* @param {object} mTypeForMetaPath
|
|
78
|
+
* A map from meta path to the entity type (as delivered by {@link #fetchTypes})
|
|
74
79
|
*/
|
|
75
80
|
// @override sap.ui.model.odata.v4.lib._CollectionCache#handleResponse
|
|
76
81
|
oCache.handleResponse = function (iStart, iEnd, oResult, mTypeForMetaPath) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
if (fnGrandTotal) {
|
|
81
|
-
fnGrandTotal(oResult.value.shift());
|
|
82
|
-
}
|
|
82
|
+
aAdditionalRowHandlers.forEach(function (fnHandler) {
|
|
83
|
+
var oAdditionalRow;
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
if (fnHandler) {
|
|
86
|
+
oAdditionalRow = oResult.value.shift();
|
|
87
|
+
if ("UI5__count" in oAdditionalRow) {
|
|
88
|
+
oResult["@odata.count"] = oAdditionalRow.UI5__count;
|
|
89
|
+
}
|
|
90
|
+
fnHandler(oAdditionalRow);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
86
93
|
|
|
87
94
|
// revert to prototype and call it
|
|
88
95
|
delete this.handleResponse;
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* The group ID
|
|
20
20
|
* @param {object} oOwner
|
|
21
21
|
* The lock's owner for debugging
|
|
22
|
-
* @param {boolean} [bLocked
|
|
22
|
+
* @param {boolean} [bLocked]
|
|
23
23
|
* Whether the lock is locked
|
|
24
24
|
* @param {boolean} [bModifying]
|
|
25
25
|
* Whether the reason for the group lock is a modifying request
|
|
@@ -158,7 +158,7 @@ sap.ui.define([
|
|
|
158
158
|
/**
|
|
159
159
|
* Unlocks the lock. Resolves all promises returned by {@link #waitFor}.
|
|
160
160
|
*
|
|
161
|
-
* @param {boolean} [bForce
|
|
161
|
+
* @param {boolean} [bForce]
|
|
162
162
|
* Whether unlock may be called multiple times.
|
|
163
163
|
* @throws {Error}
|
|
164
164
|
* If unlock is called a second time without <code>bForce</code>
|