@openui5/sap.ui.core 1.140.0 → 1.141.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/THIRDPARTY.txt +2 -2
- 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/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/Formatting.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +9 -9
- package/src/sap/base/i18n/Localization.js +2 -2
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/security/encodeURL.js +1 -1
- package/src/sap/base/util/resolveReference.js +3 -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 +3 -3
- package/src/sap/ui/base/BindingParser.js +21 -4
- package/src/sap/ui/base/DataType.js +1 -1
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +5 -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 +3 -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/base/SyncPromise.js +3 -2
- package/src/sap/ui/core/.library +2 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- package/src/sap/ui/core/ComponentContainer.js +2 -2
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +3 -3
- package/src/sap/ui/core/Configuration.js +4 -4
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +2 -2
- 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 +3 -3
- 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/Fragment.js +1 -1
- 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 +1 -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/Lib.js +41 -38
- 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 +7 -7
- package/src/sap/ui/core/LocaleData.js +7 -4
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- 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/Theming.js +22 -18
- 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 +1 -1
- package/src/sap/ui/core/UIComponent.js +16 -7
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/_IconRegistry.js +19 -39
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- 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_pt.properties +2 -2
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -2
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/History.js +14 -5
- 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/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/ViewInfo.css +12 -12
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- 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 +1 -3
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +13 -7
- package/src/sap/ui/core/themes/base/BrowserScrollbar.less +0 -28
- package/src/sap/ui/core/themes/base/ScrollBar.less +4 -0
- package/src/sap/ui/core/themes/base/base.less +66 -17
- package/src/sap/ui/core/themes/base/global.less +5 -0
- package/src/sap/ui/core/themes/base/skeleton.less +7 -3
- package/src/sap/ui/core/themes/sap_hcb/LocalBusyIndicator.less +4 -0
- package/src/sap/ui/core/themes/sap_hcb/base_LocalBusyIndicator.less +4 -0
- package/src/sap/ui/core/themes/sap_hcb/base_ScrollBar.less +4 -0
- package/src/sap/ui/core/theming/Parameters.js +24 -11
- package/src/sap/ui/core/theming/ThemeManager.js +4 -3
- 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 +1 -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/DraftEnabledMockServer.js +47 -43
- 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 +1 -1
- 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 +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 +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.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 +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/events/F6Navigation.js +11 -3
- package/src/sap/ui/model/ClientModel.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/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/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -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/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +25 -73
- 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 +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +23 -9
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +3 -11
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +11 -7
- package/src/sap/ui/model/odata/v4/Context.js +27 -27
- package/src/sap/ui/model/odata/v4/ODataBinding.js +44 -28
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +16 -15
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +35 -23
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +47 -34
- package/src/sap/ui/model/odata/v4/ODataModel.js +40 -24
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +19 -15
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +14 -14
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +57 -17
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +10 -7
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +57 -65
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +3 -3
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +35 -4
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +13 -10
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
- 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 +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/performance/XHRInterceptor.js +14 -9
- package/src/sap/ui/performance/trace/FESR.js +4 -11
- package/src/sap/ui/performance/trace/Passport.js +3 -10
- package/src/sap/ui/performance/trace/_InteractionImpl.js +4 -10
- 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/generic/TestBase.js +1 -1
- package/src/sap/ui/test/gherkin/dataTableUtils.js +2 -2
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +8 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +1 -1
- package/src/ui5loader.js +1 -1
|
@@ -58,6 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
this.aElements.$byPredicate = {};
|
|
59
59
|
this.aElements.$count = undefined;
|
|
60
60
|
this.aElements.$created = 0; // required for _Cache#drillDown (see _Cache.from$skip)
|
|
61
|
+
this.iResetCount = 0;
|
|
61
62
|
// Whether this cache is a unified cache, using oFirstLevel with ExpandLevels instead of
|
|
62
63
|
// separate group level caches
|
|
63
64
|
this.bUnifiedCache = oAggregation.expandTo >= Number.MAX_SAFE_INTEGER
|
|
@@ -461,7 +462,7 @@ sap.ui.define([
|
|
|
461
462
|
*
|
|
462
463
|
* @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
|
|
463
464
|
* A lock for the group ID
|
|
464
|
-
* @param {sap.ui.base.SyncPromise} oPostPathPromise
|
|
465
|
+
* @param {sap.ui.base.SyncPromise<string>} oPostPathPromise
|
|
465
466
|
* A SyncPromise resolving with the resource path for the POST request
|
|
466
467
|
* @param {string} sPath
|
|
467
468
|
* The collection's path within the cache (as used by change listeners)
|
|
@@ -479,7 +480,7 @@ sap.ui.define([
|
|
|
479
480
|
* fails
|
|
480
481
|
* @param {function} fnSubmitCallback
|
|
481
482
|
* A function which is called just before a POST request for the create is sent
|
|
482
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
483
|
+
* @returns {sap.ui.base.SyncPromise<object>}
|
|
483
484
|
* A promise which is resolved with the created entity when the POST request has been
|
|
484
485
|
* successfully sent and the entity has been marked as non-transient
|
|
485
486
|
* @throws {Error}
|
|
@@ -517,9 +518,22 @@ sap.ui.define([
|
|
|
517
518
|
|
|
518
519
|
_Helper.addByPath(this.mPostRequests, sTransientPredicate, oEntityData);
|
|
519
520
|
const iIndex = aElements.indexOf(oParentNode) + 1; // 0 w/o oParentNode :-)
|
|
521
|
+
if (this.oCountPromise) {
|
|
522
|
+
const fnOldSubmitCallback = fnSubmitCallback;
|
|
523
|
+
// create a new count promise early, that a synchronous call to
|
|
524
|
+
// oHeaderContext.requestProperty("$count") waits until the creation was successful or
|
|
525
|
+
// has been cancelled; cancellation of the creation will restore the old count promise
|
|
526
|
+
this.createCountPromise(true);
|
|
527
|
+
fnSubmitCallback = () => {
|
|
528
|
+
this.readCount(oGroupLock)?.catch(
|
|
529
|
+
this.oRequestor.getModelInterface().getReporter());
|
|
530
|
+
fnOldSubmitCallback();
|
|
531
|
+
};
|
|
532
|
+
}
|
|
520
533
|
const oPromise = oCache.create(oGroupLock, oPostPathPromise, sPath, sTransientPredicate,
|
|
521
534
|
oEntityData, bAtEndOfCreated, fnErrorCallback, fnSubmitCallback, /*onCancel*/() => {
|
|
522
535
|
_Helper.removeByPath(this.mPostRequests, sTransientPredicate, oEntityData);
|
|
536
|
+
this.oCountPromise?.$restore();
|
|
523
537
|
if (this.oAggregation.createInPlace) {
|
|
524
538
|
return;
|
|
525
539
|
}
|
|
@@ -618,22 +632,30 @@ sap.ui.define([
|
|
|
618
632
|
* to be resolved by a following {@link #readCount} call. If the old count promise is still
|
|
619
633
|
* pending, no new promise is created in order to avoid duplicate $count requests.
|
|
620
634
|
*
|
|
635
|
+
* @param {boolean} [bRetryIfFailed]
|
|
636
|
+
* Whether a count request which fails due to a previous request will be retried
|
|
637
|
+
*
|
|
621
638
|
* @private
|
|
622
639
|
*/
|
|
623
|
-
_AggregationCache.prototype.createCountPromise = function () {
|
|
640
|
+
_AggregationCache.prototype.createCountPromise = function (bRetryIfFailed) {
|
|
624
641
|
const oOldCountPromise = this.oCountPromise;
|
|
625
642
|
if (oOldCountPromise?.isPending()) {
|
|
626
643
|
return;
|
|
627
644
|
}
|
|
628
645
|
|
|
629
646
|
let fnResolve;
|
|
630
|
-
this.oCountPromise = new SyncPromise(
|
|
631
|
-
fnResolve =
|
|
647
|
+
this.oCountPromise = new SyncPromise((resolve) => {
|
|
648
|
+
fnResolve = (iCount) => {
|
|
649
|
+
delete this.oCountPromise?.$old; // count promise might already be deleted
|
|
650
|
+
resolve(iCount);
|
|
651
|
+
};
|
|
632
652
|
});
|
|
633
653
|
this.oCountPromise.$resolve = fnResolve;
|
|
634
654
|
this.oCountPromise.$restore = () => {
|
|
635
655
|
fnResolve(oOldCountPromise);
|
|
636
656
|
};
|
|
657
|
+
this.oCountPromise.$old = oOldCountPromise;
|
|
658
|
+
this.oCountPromise.$retryIfFailed = bRetryIfFailed;
|
|
637
659
|
};
|
|
638
660
|
|
|
639
661
|
/**
|
|
@@ -938,7 +960,7 @@ sap.ui.define([
|
|
|
938
960
|
* The index of the child node
|
|
939
961
|
* @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
|
|
940
962
|
* An unlocked lock for the group to associate the requests with
|
|
941
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
963
|
+
* @returns {sap.ui.base.SyncPromise<number>}
|
|
942
964
|
* A promise to be resolved with the requested index of the parent.
|
|
943
965
|
*
|
|
944
966
|
* @public
|
|
@@ -1027,7 +1049,7 @@ sap.ui.define([
|
|
|
1027
1049
|
* An optional change listener that is added for the given path. Its method
|
|
1028
1050
|
* <code>onChange</code> is called with the new value if the property at that path is modified
|
|
1029
1051
|
* via {@link #update} later.
|
|
1030
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
1052
|
+
* @returns {sap.ui.base.SyncPromise<any>}
|
|
1031
1053
|
* A promise to be resolved with the requested data. The promise is rejected if the cache is
|
|
1032
1054
|
* inactive (see {@link #setActive}) when the response arrives. Fails to drill-down into
|
|
1033
1055
|
* "$count" in cases where it does not reflect the leaf count.
|
|
@@ -1048,6 +1070,12 @@ sap.ui.define([
|
|
|
1048
1070
|
// name similar to "$count" which never conflicts with any other valid path.
|
|
1049
1071
|
this.registerChangeListener("./$count", oListener);
|
|
1050
1072
|
}
|
|
1073
|
+
if (oGroupLock === _GroupLock.$cached && this.oCountPromise.$old) {
|
|
1074
|
+
// return the old count promise if the $count is now being requested
|
|
1075
|
+
// synchronously and a new count has already been requested (e.g. when creating
|
|
1076
|
+
// a new entity) but is not yet available
|
|
1077
|
+
return this.oCountPromise.$old;
|
|
1078
|
+
}
|
|
1051
1079
|
return this.oCountPromise;
|
|
1052
1080
|
}
|
|
1053
1081
|
if (this.oAggregation.hierarchyQualifier || this.oAggregation.groupLevels.length) {
|
|
@@ -1315,7 +1343,7 @@ sap.ui.define([
|
|
|
1315
1343
|
throw new Error("Unsupported path: " + sPath);
|
|
1316
1344
|
}
|
|
1317
1345
|
|
|
1318
|
-
const mQueryOptions = _Helper.clone(this.
|
|
1346
|
+
const mQueryOptions = _Helper.clone({...this.mQueryOptions, ...this.mLateExpandSelect});
|
|
1319
1347
|
const iIndex = mQueryOptions.$select.indexOf(this.oAggregation.$NodeProperty);
|
|
1320
1348
|
if (iIndex >= 0) {
|
|
1321
1349
|
mQueryOptions.$select.splice(iIndex, 1);
|
|
@@ -1620,8 +1648,6 @@ sap.ui.define([
|
|
|
1620
1648
|
const invokeNextSibling = () => {
|
|
1621
1649
|
if (sSiblingPath !== undefined) {
|
|
1622
1650
|
bRefreshNeeded = true;
|
|
1623
|
-
const sActionPath = sNonCanonicalChildPath + "/"
|
|
1624
|
-
+ this.oAggregation.$Actions.ChangeNextSiblingAction;
|
|
1625
1651
|
const sSiblingPredicate = sSiblingPath?.slice(sSiblingPath.indexOf("("));
|
|
1626
1652
|
oSiblingNode = this.aElements.$byPredicate[sSiblingPredicate];
|
|
1627
1653
|
let oNextSibling = null;
|
|
@@ -1629,7 +1655,8 @@ sap.ui.define([
|
|
|
1629
1655
|
// remove OOP for all descendants (incl. itself) of a next sibling
|
|
1630
1656
|
this.oTreeState.deleteOutOfPlace(sSiblingPredicate);
|
|
1631
1657
|
const oNextSiblingType = this.oAggregation.$fetchMetadata(
|
|
1632
|
-
_Helper.getMetaPath("/" +
|
|
1658
|
+
_Helper.getMetaPath("/" + sNonCanonicalChildPath + "/"
|
|
1659
|
+
+ this.oAggregation.$Actions.ChangeNextSiblingAction + "/NextSibling/")
|
|
1633
1660
|
).getResult();
|
|
1634
1661
|
const aKeys = Object.keys(oNextSiblingType).filter((sKey) => sKey[0] !== "$");
|
|
1635
1662
|
oNextSibling = aKeys.reduce((oKeys, sKey) => {
|
|
@@ -1637,6 +1664,8 @@ sap.ui.define([
|
|
|
1637
1664
|
return oKeys;
|
|
1638
1665
|
}, {});
|
|
1639
1666
|
}
|
|
1667
|
+
const sActionPath = (bCopy ? "$-2" : sNonCanonicalChildPath) + "/"
|
|
1668
|
+
+ this.oAggregation.$Actions.ChangeNextSiblingAction;
|
|
1640
1669
|
|
|
1641
1670
|
return this.oRequestor.request("POST", sActionPath, oGroupLock.getUnlockedCopy(), {
|
|
1642
1671
|
"If-Match" : oChildNode,
|
|
@@ -1782,9 +1811,9 @@ sap.ui.define([
|
|
|
1782
1811
|
* @param {function} [fnDataRequested]
|
|
1783
1812
|
* The function is called just before a back-end request is sent.
|
|
1784
1813
|
* If no back-end request is needed, the function is not called.
|
|
1785
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
1814
|
+
* @returns {sap.ui.base.SyncPromise<object>}
|
|
1786
1815
|
* A promise to be resolved with the requested range given as an OData response object (with
|
|
1787
|
-
* "
|
|
1816
|
+
* "@$ui5.resetCount" and the rows as an array in the property <code>value</code>, enhanced
|
|
1788
1817
|
* with a number property <code>$count</code> representing the element count on server-side;
|
|
1789
1818
|
* <code>$count</code> may be <code>undefined</code>, but not <code>Infinity</code>). If an
|
|
1790
1819
|
* HTTP request fails, the error from the _Requestor is returned.
|
|
@@ -1903,7 +1932,10 @@ sap.ui.define([
|
|
|
1903
1932
|
|
|
1904
1933
|
aElements.$count = that.aElements.$count;
|
|
1905
1934
|
|
|
1906
|
-
return {
|
|
1935
|
+
return {
|
|
1936
|
+
"@$ui5.resetCount" : that.iResetCount,
|
|
1937
|
+
value : aElements
|
|
1938
|
+
};
|
|
1907
1939
|
});
|
|
1908
1940
|
};
|
|
1909
1941
|
|
|
@@ -1952,7 +1984,11 @@ sap.ui.define([
|
|
|
1952
1984
|
_Helper.fireChange(this.mChangeListeners, "./$count", iCount);
|
|
1953
1985
|
})
|
|
1954
1986
|
.catch((oError) => {
|
|
1955
|
-
this.oCountPromise.$
|
|
1987
|
+
if (oError.cause && this.oCountPromise.$retryIfFailed) {
|
|
1988
|
+
this.oCountPromise.$resolve = fnResolve; // allow another readCount call
|
|
1989
|
+
} else {
|
|
1990
|
+
this.oCountPromise.$restore();
|
|
1991
|
+
}
|
|
1956
1992
|
throw oError;
|
|
1957
1993
|
});
|
|
1958
1994
|
}
|
|
@@ -1973,7 +2009,7 @@ sap.ui.define([
|
|
|
1973
2009
|
* @param {function} [fnDataRequested]
|
|
1974
2010
|
* The function is called just before a back-end request is sent.
|
|
1975
2011
|
* If no back-end request is needed, the function is not called.
|
|
1976
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
2012
|
+
* @returns {sap.ui.base.SyncPromise<void>}
|
|
1977
2013
|
* A promise which is resolved without a defined result when the read is finished, or
|
|
1978
2014
|
* rejected in case of an error
|
|
1979
2015
|
* @throws {Error} If given index or length is less than 0
|
|
@@ -1999,6 +2035,7 @@ sap.ui.define([
|
|
|
1999
2035
|
iStart = 0;
|
|
2000
2036
|
}
|
|
2001
2037
|
|
|
2038
|
+
const iResetCount = this.iResetCount;
|
|
2002
2039
|
// Note: this.oFirstLevel.read changes this value
|
|
2003
2040
|
const bSentRequest = this.oFirstLevel.bSentRequest;
|
|
2004
2041
|
if (bSentRequest && iOutOfPlaceCount) { // cannot handle result below, avoid new request
|
|
@@ -2010,6 +2047,9 @@ sap.ui.define([
|
|
|
2010
2047
|
// request out-of-place nodes only once
|
|
2011
2048
|
...(bSentRequest ? [] : this.requestOutOfPlaceNodes(oGroupLock))
|
|
2012
2049
|
]).then(function ([oResult, ...aOutOfPlaceResults]) {
|
|
2050
|
+
if (iResetCount !== that.iResetCount) {
|
|
2051
|
+
return; // ignore result, a refresh happened in the meantime
|
|
2052
|
+
}
|
|
2013
2053
|
if (bSentRequest && iOutOfPlaceCount) {
|
|
2014
2054
|
return; // not idempotent due to previous #handleOutOfPlaceNodes
|
|
2015
2055
|
}
|
|
@@ -2076,7 +2116,7 @@ sap.ui.define([
|
|
|
2076
2116
|
* @param {function} [fnDataRequested]
|
|
2077
2117
|
* The function is called just before a back-end request is sent.
|
|
2078
2118
|
* If no back-end request is needed, the function is not called.
|
|
2079
|
-
* @returns {sap.ui.base.SyncPromise}
|
|
2119
|
+
* @returns {sap.ui.base.SyncPromise<void>}
|
|
2080
2120
|
* A promise which is resolved without a defined result when the read is finished, or
|
|
2081
2121
|
* rejected in case of an error
|
|
2082
2122
|
* @throws {Error} If index of placeholder at start of gap is less than 0, if end of gap is
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
14
|
var mAllowedChangeSetMethods = {POST : true, PUT : true, PATCH : true, DELETE : true},
|
|
15
|
-
rContentIdReference =
|
|
15
|
+
rContentIdReference = /^\$-?(\d+)/,
|
|
16
16
|
rHeaderParameter = /(\S*?)=(?:"(.+)"|(\S+))/;
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -292,12 +292,15 @@ sap.ui.define([
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
if (iChangeSetIndex !== undefined && sUrl[0] === "$") {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
const aMatches = rContentIdReference.exec(sUrl);
|
|
296
|
+
if (aMatches) {
|
|
297
|
+
// adjust URL if it starts with a Content-ID reference by adding the
|
|
298
|
+
// change set index
|
|
299
|
+
const vReferencedRequestIndex = sUrl.startsWith("$-")
|
|
300
|
+
? (iRequestIndex - parseInt(aMatches[1])) // reference previous request
|
|
301
|
+
: aMatches[1];
|
|
302
|
+
sUrl = sUrl.replace(aMatches[0],
|
|
303
|
+
"$" + vReferencedRequestIndex + "." + iChangeSetIndex);
|
|
301
304
|
}
|
|
302
305
|
}
|
|
303
306
|
|