@openui5/sap.ui.core 1.133.1 → 1.135.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +32 -0
- package/.reuse/dep5 +0 -7
- package/THIRDPARTY.txt +2 -23
- 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/LanguageFallback.js +344 -0
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/Localization.js +9 -4
- package/src/sap/base/i18n/ResourceBundle.js +40 -313
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/LoaderExtensions.js +2 -8
- package/src/sap/base/util/mixedFetch.js +0 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/base/util/syncFetch.js +0 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +3 -3
- package/src/sap/ui/VersionInfo.js +24 -9
- 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 -101
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- 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 +17 -1
- package/src/sap/ui/core/.library +1 -6
- package/src/sap/ui/core/AppCacheBuster.js +4 -9
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +52 -6
- package/src/sap/ui/core/ComponentContainer.js +4 -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 +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +11 -3
- package/src/sap/ui/core/CustomData.js +2 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +14 -35
- package/src/sap/ui/core/ElementHooks.js +35 -0
- 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 +34 -11
- 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/IconPool.js +20 -4
- 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 +12 -32
- 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 +67 -93
- package/src/sap/ui/core/Manifest.js +5 -3
- 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/ShortcutHintsMixin.js +9 -0
- package/src/sap/ui/core/Theming.js +98 -1
- 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 +6 -3
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +5 -1
- package/src/sap/ui/core/_CommandPool.js +80 -0
- package/src/sap/ui/core/boot/KeyboardInteractionEndpoint.js +124 -0
- 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/DragAndDrop.js +14 -7
- 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/fieldhelp/FieldHelp.js +260 -116
- package/src/sap/ui/core/fieldhelp/FieldHelpCustomData.js +0 -4
- package/src/sap/ui/core/fieldhelp/FieldHelpUtil.js +2 -0
- package/src/sap/ui/core/format/FormatUtils.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/i18n/interaction.xml +31 -0
- package/src/sap/ui/core/interaction/KeyboardInteractionDisplay.js +332 -0
- package/src/sap/ui/core/library.js +35 -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.properties +14 -0
- package/src/sap/ui/core/messagebundle_ko.properties +1 -1
- package/src/sap/ui/core/messagebundle_ro.properties +2 -2
- package/src/sap/ui/core/messagebundle_th.properties +1 -1
- package/src/sap/ui/core/messagebundle_vi.properties +2 -2
- package/src/sap/ui/core/mvc/Controller.js +25 -11
- 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 +43 -18
- package/src/sap/ui/core/mvc/XMLView.js +20 -1
- 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/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/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/moduleTreeHelper.js +12 -0
- package/src/sap/ui/core/support/usage/EventBroadcaster.js +5 -5
- package/src/sap/ui/core/themes/base/base.less +398 -23
- package/src/sap/ui/core/themes/base/global.less +7 -0
- package/src/sap/ui/core/themes/base/icons/favicon.ico +0 -0
- package/src/sap/ui/core/themes/base/skeleton.less +11 -4
- package/src/sap/ui/core/themes/sap_hcb/.theming +2 -1
- package/src/sap/ui/core/theming/Parameters.js +1 -6
- package/src/sap/ui/core/theming/ThemeHelper.js +13 -0
- package/src/sap/ui/core/theming/ThemeManager.js +1 -1
- 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/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/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +5 -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/analytics/AnalyticalBinding.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +51 -13
- 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/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +46 -14
- package/src/sap/ui/model/odata/ODataMetadata.js +6 -3
- package/src/sap/ui/model/odata/ODataModel.js +2 -2
- 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/ODataListBinding.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataModel.js +59 -36
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +92 -40
- package/src/sap/ui/model/odata/v4/ODataBinding.js +22 -15
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +6 -7
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +197 -58
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +65 -6
- package/src/sap/ui/model/odata/v4/ODataModel.js +65 -32
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +9 -5
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +5 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +49 -7
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +9 -9
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +5 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +107 -15
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +33 -17
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +18 -1
- 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/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/BranchTracking.js +1 -1
- package/src/sap/ui/test/TestUtils.js +82 -14
- package/src/sap/ui/test/actions/EnterText.js +2 -20
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +11 -2
- package/src/sap/ui/test/starter/_utils.js +0 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +22 -3
- package/test/sap/ui/qunit/TestRunner.js +4 -1
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
75
75
|
* @public
|
|
76
76
|
* @since 1.37.0
|
|
77
|
-
* @version 1.
|
|
77
|
+
* @version 1.135.0
|
|
78
78
|
*
|
|
79
79
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
80
80
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
@@ -1133,7 +1133,7 @@ sap.ui.define([
|
|
|
1133
1133
|
return undefined;
|
|
1134
1134
|
}
|
|
1135
1135
|
return sBindingParameterPath.split("/").map((sSegment, i) => {
|
|
1136
|
-
return sSegment.slice(0, sSegment.
|
|
1136
|
+
return sSegment.slice(0, sSegment.indexOf("("))
|
|
1137
1137
|
+ (i ? sPredicate : sPartnerPredicate);
|
|
1138
1138
|
}).join("/");
|
|
1139
1139
|
};
|
|
@@ -1287,9 +1287,8 @@ sap.ui.define([
|
|
|
1287
1287
|
*
|
|
1288
1288
|
* @param {string} [sGroupId]
|
|
1289
1289
|
* The group ID to be used for the request; if not specified, the group ID for this binding is
|
|
1290
|
-
* used, see {@link
|
|
1291
|
-
* {@link #
|
|
1292
|
-
* be specified explicitly.
|
|
1290
|
+
* used, see {@link #constructor} and {@link #getGroupId}. To use the update group ID, see
|
|
1291
|
+
* {@link #getUpdateGroupId}, it needs to be specified explicitly.
|
|
1293
1292
|
* Valid values are <code>undefined</code>, '$auto', '$auto.*', '$direct', '$single', or
|
|
1294
1293
|
* application group IDs as specified in {@link sap.ui.model.odata.v4.ODataModel}. If
|
|
1295
1294
|
* '$single' is used, the request will be sent as fast as '$direct', but wrapped in a batch
|
|
@@ -1589,8 +1588,8 @@ sap.ui.define([
|
|
|
1589
1588
|
that.mAggregatedQueryOptions = that.mLateQueryOptions;
|
|
1590
1589
|
that.mLateQueryOptions = undefined;
|
|
1591
1590
|
}
|
|
1592
|
-
that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/false,
|
|
1593
|
-
bKeepCacheOnError
|
|
1591
|
+
that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/false, sGroupId,
|
|
1592
|
+
bKeepCacheOnError);
|
|
1594
1593
|
// Do not fire a change event, or else ManagedObject destroys and recreates the
|
|
1595
1594
|
// binding hierarchy causing a flood of events.
|
|
1596
1595
|
if (bHasChangeListeners) {
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
60
60
|
* @public
|
|
61
61
|
* @since 1.37.0
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.135.0
|
|
63
63
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
64
64
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
65
65
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -193,14 +193,20 @@ sap.ui.define([
|
|
|
193
193
|
/**
|
|
194
194
|
* Returns all currently existing contexts of this list binding in no special order.
|
|
195
195
|
*
|
|
196
|
+
* @param {boolean} [bNoCreated]
|
|
197
|
+
* Whether to exclude created contexts
|
|
196
198
|
* @returns {sap.ui.model.odata.v4.Context[]}
|
|
197
199
|
* All currently existing contexts of this list binding, in no special order
|
|
198
200
|
*
|
|
199
201
|
* @private
|
|
200
202
|
* @see #getAllCurrentContexts
|
|
201
203
|
*/
|
|
202
|
-
ODataListBinding.prototype._getAllExistingContexts = function () {
|
|
203
|
-
|
|
204
|
+
ODataListBinding.prototype._getAllExistingContexts = function (bNoCreated) {
|
|
205
|
+
let aContexts = this.aContexts ?? [];
|
|
206
|
+
if (bNoCreated) {
|
|
207
|
+
aContexts = aContexts.slice(this.iCreatedContexts);
|
|
208
|
+
}
|
|
209
|
+
return aContexts.filter(function (oContext) {
|
|
204
210
|
return oContext;
|
|
205
211
|
}).concat(Object.values(this.mPreviousContextsByPath).filter(function (oContext) {
|
|
206
212
|
return oContext.isEffectivelyKeptAlive();
|
|
@@ -882,9 +888,9 @@ sap.ui.define([
|
|
|
882
888
|
* <br>
|
|
883
889
|
* Since 1.98.0, when the first property updates happens, the context is no longer
|
|
884
890
|
* {@link sap.ui.model.odata.v4.Context#isInactive inactive} and the
|
|
885
|
-
* {@link
|
|
886
|
-
*
|
|
887
|
-
*
|
|
891
|
+
* {@link #event:createActivate 'createActivate'} event is fired. While inactive, it does not
|
|
892
|
+
* count as a {@link #hasPendingChanges pending change} and does not contribute to the
|
|
893
|
+
* {@link #getCount count}.
|
|
888
894
|
* @returns {sap.ui.model.odata.v4.Context}
|
|
889
895
|
* The context object for the created entity; its method
|
|
890
896
|
* {@link sap.ui.model.odata.v4.Context#created} returns a promise that is resolved when the
|
|
@@ -1500,7 +1506,7 @@ sap.ui.define([
|
|
|
1500
1506
|
* @see sap.ui.model.odata.v4.ODataBinding#doCreateCache
|
|
1501
1507
|
*/
|
|
1502
1508
|
ODataListBinding.prototype.doCreateCache = function (sResourcePath, mQueryOptions, oContext,
|
|
1503
|
-
sDeepResourcePath, sGroupId, oOldCache) {
|
|
1509
|
+
sDeepResourcePath, sGroupId, bSideEffectsRefresh, oOldCache) {
|
|
1504
1510
|
var oCache,
|
|
1505
1511
|
aKeepAlivePredicates,
|
|
1506
1512
|
mKeptElementsByPredicate,
|
|
@@ -1518,12 +1524,14 @@ sap.ui.define([
|
|
|
1518
1524
|
&& oOldCache instanceof _AggregationCache) {
|
|
1519
1525
|
if (bResetViaSideEffects && this.mParameters.$$aggregation?.hierarchyQualifier) {
|
|
1520
1526
|
sGroupId = this.getGroupId(); // reset via a side-effects refresh
|
|
1527
|
+
bSideEffectsRefresh = true;
|
|
1521
1528
|
oOldCache.resetOutOfPlace();
|
|
1522
1529
|
}
|
|
1530
|
+
this.validateSelection(oOldCache, sGroupId);
|
|
1523
1531
|
// Note: #inheritQueryOptions as called below should not matter in case of own
|
|
1524
1532
|
// requests, which are a precondition for kept-alive elements
|
|
1525
|
-
oOldCache.reset(aKeepAlivePredicates, sGroupId
|
|
1526
|
-
this.mParameters.$$aggregation, this.isGrouped());
|
|
1533
|
+
oOldCache.reset(aKeepAlivePredicates, bSideEffectsRefresh ? sGroupId : undefined,
|
|
1534
|
+
mQueryOptions, this.mParameters.$$aggregation, this.isGrouped());
|
|
1527
1535
|
|
|
1528
1536
|
return oOldCache;
|
|
1529
1537
|
}
|
|
@@ -1853,7 +1861,7 @@ sap.ui.define([
|
|
|
1853
1861
|
* A promise that is resolved with the download URL or <code>null</code>
|
|
1854
1862
|
* @throws {Error}
|
|
1855
1863
|
* If the binding is unresolved or is {@link #isTransient transient} (part of a
|
|
1856
|
-
* {@link
|
|
1864
|
+
* {@link #create deep create})
|
|
1857
1865
|
*
|
|
1858
1866
|
* @private
|
|
1859
1867
|
*/
|
|
@@ -1931,20 +1939,21 @@ sap.ui.define([
|
|
|
1931
1939
|
return bToLower ? "tolower(" + sText + ")" : sText;
|
|
1932
1940
|
}
|
|
1933
1941
|
|
|
1934
|
-
bToLower = sEdmType === "Edm.String" && oFilter.
|
|
1942
|
+
bToLower = sEdmType === "Edm.String" && oFilter.isCaseSensitive() === false;
|
|
1935
1943
|
sFilterPath = bThese && !aFiltersNoThese?.includes(oFilter)
|
|
1936
|
-
? setCase(`$these/aggregate(${oFilter.
|
|
1937
|
-
: setCase(decodeURIComponent(oFilter.
|
|
1938
|
-
sValue = setCase(_Helper.formatLiteral(oFilter.
|
|
1944
|
+
? setCase(`$these/aggregate(${oFilter.getPath()})`)
|
|
1945
|
+
: setCase(decodeURIComponent(oFilter.getPath()));
|
|
1946
|
+
sValue = setCase(_Helper.formatLiteral(oFilter.getValue1(), sEdmType));
|
|
1939
1947
|
|
|
1940
|
-
switch (oFilter.
|
|
1948
|
+
switch (oFilter.getOperator()) {
|
|
1941
1949
|
case FilterOperator.BT:
|
|
1942
1950
|
sFilter = sFilterPath + " ge " + sValue + " and " + sFilterPath + " le "
|
|
1943
|
-
+ setCase(_Helper.formatLiteral(oFilter.
|
|
1951
|
+
+ setCase(_Helper.formatLiteral(oFilter.getValue2(), sEdmType));
|
|
1944
1952
|
break;
|
|
1945
1953
|
case FilterOperator.NB:
|
|
1946
1954
|
sFilter = wrap(sFilterPath + " lt " + sValue + " or " + sFilterPath + " gt "
|
|
1947
|
-
+ setCase(_Helper.formatLiteral(oFilter.
|
|
1955
|
+
+ setCase(_Helper.formatLiteral(oFilter.getValue2(), sEdmType)),
|
|
1956
|
+
bWithinAnd);
|
|
1948
1957
|
break;
|
|
1949
1958
|
case FilterOperator.EQ:
|
|
1950
1959
|
case FilterOperator.GE:
|
|
@@ -1952,7 +1961,8 @@ sap.ui.define([
|
|
|
1952
1961
|
case FilterOperator.LE:
|
|
1953
1962
|
case FilterOperator.LT:
|
|
1954
1963
|
case FilterOperator.NE:
|
|
1955
|
-
sFilter = sFilterPath + " " + oFilter.
|
|
1964
|
+
sFilter = sFilterPath + " " + oFilter.getOperator().toLowerCase() + " "
|
|
1965
|
+
+ sValue;
|
|
1956
1966
|
break;
|
|
1957
1967
|
case FilterOperator.Contains:
|
|
1958
1968
|
case FilterOperator.EndsWith:
|
|
@@ -1960,11 +1970,11 @@ sap.ui.define([
|
|
|
1960
1970
|
case FilterOperator.NotEndsWith:
|
|
1961
1971
|
case FilterOperator.NotStartsWith:
|
|
1962
1972
|
case FilterOperator.StartsWith:
|
|
1963
|
-
sFilter = oFilter.
|
|
1973
|
+
sFilter = oFilter.getOperator().toLowerCase().replace("not", "not ")
|
|
1964
1974
|
+ "(" + sFilterPath + "," + sValue + ")";
|
|
1965
1975
|
break;
|
|
1966
1976
|
default:
|
|
1967
|
-
throw new Error("Unsupported operator: " + oFilter.
|
|
1977
|
+
throw new Error("Unsupported operator: " + oFilter.getOperator());
|
|
1968
1978
|
}
|
|
1969
1979
|
return sFilter;
|
|
1970
1980
|
}
|
|
@@ -1985,18 +1995,18 @@ sap.ui.define([
|
|
|
1985
1995
|
return SyncPromise.resolve();
|
|
1986
1996
|
}
|
|
1987
1997
|
|
|
1988
|
-
if (oFilter.
|
|
1989
|
-
return SyncPromise.all(oFilter.
|
|
1990
|
-
return fetchFilter(oSubFilter, mLambdaVariableToPath, oFilter.
|
|
1998
|
+
if (oFilter.getFilters()) {
|
|
1999
|
+
return SyncPromise.all(oFilter.getFilters().map(function (oSubFilter) {
|
|
2000
|
+
return fetchFilter(oSubFilter, mLambdaVariableToPath, oFilter.isAnd(), bThese);
|
|
1991
2001
|
})).then(function (aFilterStrings) {
|
|
1992
2002
|
// wrap it if it's an 'or' filter embedded in an 'and'
|
|
1993
|
-
return wrap(aFilterStrings.join(oFilter.
|
|
1994
|
-
bWithinAnd && !oFilter.
|
|
2003
|
+
return wrap(aFilterStrings.join(oFilter.isAnd() ? " and " : " or "),
|
|
2004
|
+
bWithinAnd && !oFilter.isAnd());
|
|
1995
2005
|
});
|
|
1996
2006
|
}
|
|
1997
2007
|
|
|
1998
2008
|
sResolvedPath = oMetaModel.resolve(
|
|
1999
|
-
replaceLambdaVariables(oFilter.
|
|
2009
|
+
replaceLambdaVariables(oFilter.getPath(), mLambdaVariableToPath), oMetaContext);
|
|
2000
2010
|
|
|
2001
2011
|
return oMetaModel.fetchObject(sResolvedPath).then(function (oPropertyMetadata) {
|
|
2002
2012
|
var oCondition, sLambdaVariable, sOperator;
|
|
@@ -2006,23 +2016,23 @@ sap.ui.define([
|
|
|
2006
2016
|
+ sResolvedPath);
|
|
2007
2017
|
}
|
|
2008
2018
|
|
|
2009
|
-
sOperator = oFilter.
|
|
2019
|
+
sOperator = oFilter.getOperator();
|
|
2010
2020
|
if (sOperator === FilterOperator.All || sOperator === FilterOperator.Any) {
|
|
2011
|
-
oCondition = oFilter.
|
|
2012
|
-
sLambdaVariable = oFilter.
|
|
2021
|
+
oCondition = oFilter.getCondition();
|
|
2022
|
+
sLambdaVariable = oFilter.getVariable();
|
|
2013
2023
|
if (sOperator === FilterOperator.Any && !oCondition) {
|
|
2014
|
-
return oFilter.
|
|
2024
|
+
return oFilter.getPath() + "/any()";
|
|
2015
2025
|
}
|
|
2016
2026
|
// multifilters are processed in parallel, so clone mLambdaVariableToPath
|
|
2017
2027
|
// to allow same lambda variables in different filters
|
|
2018
2028
|
mLambdaVariableToPath = Object.create(mLambdaVariableToPath);
|
|
2019
2029
|
mLambdaVariableToPath[sLambdaVariable]
|
|
2020
|
-
= replaceLambdaVariables(oFilter.
|
|
2030
|
+
= replaceLambdaVariables(oFilter.getPath(), mLambdaVariableToPath);
|
|
2021
2031
|
|
|
2022
2032
|
return fetchFilter(
|
|
2023
2033
|
oCondition, mLambdaVariableToPath
|
|
2024
2034
|
).then(function (sFilterValue) {
|
|
2025
|
-
return oFilter.
|
|
2035
|
+
return oFilter.getPath() + "/" + oFilter.getOperator().toLowerCase()
|
|
2026
2036
|
+ "(" + sLambdaVariable + ":" + sFilterValue + ")";
|
|
2027
2037
|
});
|
|
2028
2038
|
}
|
|
@@ -2317,8 +2327,8 @@ sap.ui.define([
|
|
|
2317
2327
|
* @throws {Error} If
|
|
2318
2328
|
* <ul>
|
|
2319
2329
|
* <li> there are pending changes that cannot be ignored,
|
|
2320
|
-
* <li> the binding is {@link #
|
|
2321
|
-
* {@link sap.ui.model.odata.v4.
|
|
2330
|
+
* <li> the binding is part of a {@link #create deep create} because it is relative to a
|
|
2331
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} context,
|
|
2322
2332
|
* <li> an unsupported operation mode is used (see
|
|
2323
2333
|
* {@link sap.ui.model.odata.v4.ODataModel#bindList}),
|
|
2324
2334
|
* <li> the {@link sap.ui.model.Filter.NONE} filter instance is contained in
|
|
@@ -2865,9 +2875,7 @@ sap.ui.define([
|
|
|
2865
2875
|
* @since 1.91.0
|
|
2866
2876
|
*/
|
|
2867
2877
|
ODataListBinding.prototype.getCount = function () {
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
return oHeaderContext ? oHeaderContext.getProperty("$count") : undefined;
|
|
2878
|
+
return this.getHeaderContext()?.getProperty("$count");
|
|
2871
2879
|
};
|
|
2872
2880
|
|
|
2873
2881
|
/**
|
|
@@ -3108,8 +3116,8 @@ sap.ui.define([
|
|
|
3108
3116
|
* <li> the binding is unresolved,
|
|
3109
3117
|
* <li> the given context path does not match this binding,
|
|
3110
3118
|
* <li> the binding's root binding is suspended,
|
|
3111
|
-
* <li> the binding is {@link #
|
|
3112
|
-
* {@link sap.ui.model.odata.v4.
|
|
3119
|
+
* <li> the binding is part of a {@link #create deep create} because it is relative to a
|
|
3120
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} context,
|
|
3113
3121
|
* <li> {@link sap.ui.model.odata.v4.Context#setKeepAlive} fails
|
|
3114
3122
|
* </ul>
|
|
3115
3123
|
*
|
|
@@ -3248,7 +3256,7 @@ sap.ui.define([
|
|
|
3248
3256
|
|
|
3249
3257
|
this.aSorters.forEach(function (oSorter) {
|
|
3250
3258
|
if (oSorter instanceof Sorter) {
|
|
3251
|
-
aOrderbyOptions.push(oSorter.
|
|
3259
|
+
aOrderbyOptions.push(oSorter.getPath() + (oSorter.isDescending() ? " desc" : ""));
|
|
3252
3260
|
} else {
|
|
3253
3261
|
throw new Error("Unsupported sorter: " + oSorter + " - " + that);
|
|
3254
3262
|
}
|
|
@@ -3268,8 +3276,7 @@ sap.ui.define([
|
|
|
3268
3276
|
* @returns {Object<any>} mQueryOptions
|
|
3269
3277
|
* The object with the query options. Query options can be provided with
|
|
3270
3278
|
* {@link sap.ui.model.odata.v4.ODataModel#bindList},
|
|
3271
|
-
* {@link sap.ui.model.odata.v4.ODataModel#bindContext},
|
|
3272
|
-
* {@link sap.ui.model.odata.v4.ODataListBinding#changeParameters}, and
|
|
3279
|
+
* {@link sap.ui.model.odata.v4.ODataModel#bindContext}, {@link #changeParameters}, and
|
|
3273
3280
|
* {@link sap.ui.model.odata.v4.ODataContextBinding#changeParameters}. System query options
|
|
3274
3281
|
* can also be calculated, e.g. <code>$filter</code> can be calculated based on provided
|
|
3275
3282
|
* filter objects.
|
|
@@ -3305,6 +3312,25 @@ sap.ui.define([
|
|
|
3305
3312
|
return this.mQueryOptions;
|
|
3306
3313
|
};
|
|
3307
3314
|
|
|
3315
|
+
/**
|
|
3316
|
+
* Returns the count of selected elements as a number of type <code>Edm.Int64</code>. The count
|
|
3317
|
+
* is bindable via the header context (see {@link #getHeaderContext}) and path
|
|
3318
|
+
* <code>$selectionCount</code>; it is either available synchronously or unknown. It is unknown
|
|
3319
|
+
* if the binding is relative but has no context and also if the list binding's
|
|
3320
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#getHeaderContext header context} is selected
|
|
3321
|
+
* ("select all").
|
|
3322
|
+
*
|
|
3323
|
+
* @returns {number|undefined}
|
|
3324
|
+
* The count of selected elements or <code>undefined</code> if the count or the header
|
|
3325
|
+
* context is not available.
|
|
3326
|
+
*
|
|
3327
|
+
* @public
|
|
3328
|
+
* @since 1.135.0
|
|
3329
|
+
*/
|
|
3330
|
+
ODataListBinding.prototype.getSelectionCount = function () {
|
|
3331
|
+
return this.getHeaderContext()?.getProperty("$selectionCount");
|
|
3332
|
+
};
|
|
3333
|
+
|
|
3308
3334
|
/**
|
|
3309
3335
|
* Returns true if the binding has {@link sap.ui.model.Filter.NONE} in its filters.
|
|
3310
3336
|
*
|
|
@@ -3627,13 +3653,14 @@ sap.ui.define([
|
|
|
3627
3653
|
* Moves the given (child) node to the given parent, just before the given next sibling. An
|
|
3628
3654
|
* expanded (child) node is silently collapsed before and expanded after the move. A collapsed
|
|
3629
3655
|
* parent is automatically expanded; so is a leaf. The (child) node is added to the parent at
|
|
3630
|
-
* its proper position ("in place") and simply "persisted".
|
|
3631
|
-
*
|
|
3632
|
-
*
|
|
3656
|
+
* its proper position ("in place") and simply "persisted". If needed, a subsequent side-effects
|
|
3657
|
+
* refresh within the same $batch is requested, but still the moved (child) node's index is
|
|
3658
|
+
* updated to the new position.
|
|
3633
3659
|
*
|
|
3634
3660
|
* @param {sap.ui.model.odata.v4.Context} oChildContext - The (child) node to be moved
|
|
3635
3661
|
* @param {sap.ui.model.odata.v4.Context|null} oParentContext - The new parent's context
|
|
3636
3662
|
* @param {sap.ui.model.odata.v4.Context|null} [oSiblingContext] - The next sibling's context
|
|
3663
|
+
* @param {boolean} [bCopy] - Whether the node should be copied instead of moved
|
|
3637
3664
|
* @returns {sap.ui.base.SyncPromise<void>}
|
|
3638
3665
|
* A promise which is resolved without a defined result when the move is finished, or
|
|
3639
3666
|
* rejected in case of an error
|
|
@@ -3642,7 +3669,8 @@ sap.ui.define([
|
|
|
3642
3669
|
*
|
|
3643
3670
|
* @private
|
|
3644
3671
|
*/
|
|
3645
|
-
ODataListBinding.prototype.move = function (oChildContext, oParentContext, oSiblingContext
|
|
3672
|
+
ODataListBinding.prototype.move = function (oChildContext, oParentContext, oSiblingContext,
|
|
3673
|
+
bCopy) {
|
|
3646
3674
|
/*
|
|
3647
3675
|
* Sets the <code>iIndex</code> of every context instance inside the given range. Allows for
|
|
3648
3676
|
* start greater than end and swaps both in that case.
|
|
@@ -3680,7 +3708,7 @@ sap.ui.define([
|
|
|
3680
3708
|
: oChildContext.getPath().slice(1);
|
|
3681
3709
|
const bUpdateSiblingIndex = oSiblingContext?.isEffectivelyKeptAlive();
|
|
3682
3710
|
const {promise : oPromise, refresh : bRefresh} = this.oCache.move(oGroupLock, sChildPath,
|
|
3683
|
-
sParentPath, sSiblingPath, sNonCanonicalChildPath, bUpdateSiblingIndex);
|
|
3711
|
+
sParentPath, sSiblingPath, sNonCanonicalChildPath, bUpdateSiblingIndex, bCopy);
|
|
3684
3712
|
|
|
3685
3713
|
if (bRefresh) {
|
|
3686
3714
|
return SyncPromise.all([
|
|
@@ -3886,7 +3914,7 @@ sap.ui.define([
|
|
|
3886
3914
|
oCache.reset([]);
|
|
3887
3915
|
} else {
|
|
3888
3916
|
that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true,
|
|
3889
|
-
|
|
3917
|
+
sGroupId, bKeepCacheOnError);
|
|
3890
3918
|
oKeptElementsPromise = that.refreshKeptElements(sGroupId,
|
|
3891
3919
|
/*bIgnorePendingChanges*/ bKeepCacheOnError);
|
|
3892
3920
|
if (that.iCurrentEnd > 0) {
|
|
@@ -3987,10 +4015,8 @@ sap.ui.define([
|
|
|
3987
4015
|
* A lock for the group ID to be used for refresh
|
|
3988
4016
|
* @param {boolean} [bAllowRemoval]
|
|
3989
4017
|
* Allows the list binding to remove the given context from its collection because the
|
|
3990
|
-
* entity does not match the binding's filter anymore,
|
|
3991
|
-
* see {@link sap.ui.model.
|
|
3992
|
-
* destroyed, see {@link sap.ui.model.Context#destroy}.
|
|
3993
|
-
* Supported since 1.55.0
|
|
4018
|
+
* entity does not match the binding's filter anymore, see {@link #filter}; a removed context
|
|
4019
|
+
* is destroyed, see {@link sap.ui.model.Context#destroy}. Supported since 1.55.0
|
|
3994
4020
|
*
|
|
3995
4021
|
* A removed context is destroyed unless it is
|
|
3996
4022
|
* {@link sap.ui.model.odata.v4.Context#isKeepAlive kept alive} and still exists on the
|
|
@@ -4083,6 +4109,7 @@ sap.ui.define([
|
|
|
4083
4109
|
|
|
4084
4110
|
if (!bStillAlive) {
|
|
4085
4111
|
bDestroyed = true;
|
|
4112
|
+
oContext.doSetSelected(false, true);
|
|
4086
4113
|
oContext.destroy();
|
|
4087
4114
|
}
|
|
4088
4115
|
}
|
|
@@ -4284,8 +4311,8 @@ sap.ui.define([
|
|
|
4284
4311
|
* messages; it resolves with <code>null</code> if the binding is not resolved or if there is
|
|
4285
4312
|
* no message for any entry
|
|
4286
4313
|
* @throws {Error}
|
|
4287
|
-
* If the binding is {@link #
|
|
4288
|
-
* {@link sap.ui.model.odata.v4.
|
|
4314
|
+
* If the binding is part of a {@link #create deep create} because it is relative to a
|
|
4315
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} context
|
|
4289
4316
|
*
|
|
4290
4317
|
* @protected
|
|
4291
4318
|
* @see sap.ui.model.ListBinding#requestFilterForMessages
|
|
@@ -4338,6 +4365,78 @@ sap.ui.define([
|
|
|
4338
4365
|
});
|
|
4339
4366
|
};
|
|
4340
4367
|
|
|
4368
|
+
/**
|
|
4369
|
+
* Requests selected contexts matching the binding's filters and ordered by its sorters. A
|
|
4370
|
+
* context which is selected but no longer part of this list binding's collection (that is,
|
|
4371
|
+
* which doesn't match the filters) is not returned but still shown as selected on the UI.
|
|
4372
|
+
*
|
|
4373
|
+
* Note: Data for all selected contexts is reread from the server, even if it is already
|
|
4374
|
+
* available on the client. Any data updates are reflected on the UI but no order is changed.
|
|
4375
|
+
*
|
|
4376
|
+
* @param {string} [sGroupId]
|
|
4377
|
+
* The group ID to be used for the request; if not specified, the group ID for this binding is
|
|
4378
|
+
* used, see {@link #getGroupId}. Valid values are <code>undefined</code>, '$auto', '$auto.*',
|
|
4379
|
+
* '$direct' or application group IDs as specified in
|
|
4380
|
+
* {@link sap.ui.model.odata.v4.ODataModel}.
|
|
4381
|
+
* @returns {Promise<sap.ui.model.odata.v4.Context[]>}
|
|
4382
|
+
* A promise which resolves with an array of selected contexts (which may well be empty), or
|
|
4383
|
+
* rejects with an instance of <code>Error</code> in case of failure
|
|
4384
|
+
* @throws {Error} If
|
|
4385
|
+
* <ul>
|
|
4386
|
+
* <li> the binding uses or inherits the <code>$$sharedRequest</code> parameter
|
|
4387
|
+
* (see {@link sap.ui.model.odata.v4.ODataModel#bindList}),
|
|
4388
|
+
* <li> the binding uses data aggregation or a recursive hierarchy (see
|
|
4389
|
+
* {@link #setAggregation}),
|
|
4390
|
+
* <li> the binding's root binding is suspended,
|
|
4391
|
+
* <li> the binding is part of a {@link #create deep create} because it is relative to a
|
|
4392
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} context,
|
|
4393
|
+
* <li> the binding's header context is selected ("Select All"),
|
|
4394
|
+
* <li> there are pending changes,
|
|
4395
|
+
* <li> the given group ID is invalid.
|
|
4396
|
+
* </ul>
|
|
4397
|
+
*
|
|
4398
|
+
* @private
|
|
4399
|
+
* @since 1.134.0
|
|
4400
|
+
* @ui5-restricted sap.m.Table
|
|
4401
|
+
*/
|
|
4402
|
+
ODataListBinding.prototype.requestSelectedContexts = function (sGroupId) {
|
|
4403
|
+
if (this.bSharedRequest) {
|
|
4404
|
+
throw new Error("Unsupported $$sharedRequest at " + this);
|
|
4405
|
+
}
|
|
4406
|
+
if ("$$aggregation" in this.mParameters) {
|
|
4407
|
+
throw new Error("Unsupported $$aggregation at " + this);
|
|
4408
|
+
}
|
|
4409
|
+
this.checkSuspended();
|
|
4410
|
+
this.checkTransient();
|
|
4411
|
+
if (this.oHeaderContext.isSelected()) {
|
|
4412
|
+
throw new Error('Unsupported "Select All": ' + this.oHeaderContext);
|
|
4413
|
+
}
|
|
4414
|
+
if (this.hasPendingChanges()) {
|
|
4415
|
+
throw new Error("Unsupported pending changes");
|
|
4416
|
+
}
|
|
4417
|
+
_Helper.checkGroupId(sGroupId);
|
|
4418
|
+
|
|
4419
|
+
const mPath2Context = {};
|
|
4420
|
+
const iStartOfPredicate = this.getResolvedPath().length;
|
|
4421
|
+
const aPredicatesIn = this._getAllExistingContexts()
|
|
4422
|
+
.filter((oContext) => oContext.isSelected())
|
|
4423
|
+
.map((oContext) => {
|
|
4424
|
+
mPath2Context[oContext.getPath()] = oContext;
|
|
4425
|
+
|
|
4426
|
+
return oContext.getPath().slice(iStartOfPredicate);
|
|
4427
|
+
});
|
|
4428
|
+
if (!aPredicatesIn.length) {
|
|
4429
|
+
return Promise.resolve([]);
|
|
4430
|
+
}
|
|
4431
|
+
|
|
4432
|
+
return this.oCache.requestFilteredOrderedPredicates(aPredicatesIn, this.lockGroup(sGroupId))
|
|
4433
|
+
.then((aPredicatesOut) => {
|
|
4434
|
+
// Note: make sure to respect back-end sort order
|
|
4435
|
+
return aPredicatesOut
|
|
4436
|
+
.map((sPredicate) => mPath2Context[this.oHeaderContext.getPath() + sPredicate]);
|
|
4437
|
+
});
|
|
4438
|
+
};
|
|
4439
|
+
|
|
4341
4440
|
/**
|
|
4342
4441
|
* @override
|
|
4343
4442
|
* @see sap.ui.model.odata.v4.ODataParentBinding#requestSideEffects
|
|
@@ -4719,8 +4818,8 @@ sap.ui.define([
|
|
|
4719
4818
|
* <li> there are pending changes,
|
|
4720
4819
|
* <li> a recursive hierarchy is requested, but the model does not use the
|
|
4721
4820
|
* <code>autoExpandSelect</code> parameter,
|
|
4722
|
-
* <li> the binding is {@link #
|
|
4723
|
-
* {@link sap.ui.model.odata.v4.
|
|
4821
|
+
* <li> the binding is part of a {@link #create deep create} because it is relative to a
|
|
4822
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} context,
|
|
4724
4823
|
* <li> the binding has {@link sap.ui.model.Filter.NONE}
|
|
4725
4824
|
* </ul>
|
|
4726
4825
|
*
|
|
@@ -4900,8 +4999,8 @@ sap.ui.define([
|
|
|
4900
4999
|
* @throws {Error} If
|
|
4901
5000
|
* <ul>
|
|
4902
5001
|
* <li> there are pending changes that cannot be ignored,
|
|
4903
|
-
* <li> the binding is {@link #
|
|
4904
|
-
* {@link sap.ui.model.odata.v4.
|
|
5002
|
+
* <li> the binding is part of a {@link #create deep create} because it is relative to a
|
|
5003
|
+
* {@link sap.ui.model.odata.v4.Context#isTransient transient} context,
|
|
4905
5004
|
* <li> an unsupported operation mode is used (see
|
|
4906
5005
|
* {@link sap.ui.model.odata.v4.ODataModel#bindList}).
|
|
4907
5006
|
* </ul>
|
|
@@ -5106,6 +5205,46 @@ sap.ui.define([
|
|
|
5106
5205
|
}
|
|
5107
5206
|
};
|
|
5108
5207
|
|
|
5208
|
+
/**
|
|
5209
|
+
* Validates the selected contexts against the list binding's filter criteria and removes the
|
|
5210
|
+
* selection from contexts that no longer match.
|
|
5211
|
+
*
|
|
5212
|
+
* @param {sap.ui.model.odata.v4.lib._Cache} oCache
|
|
5213
|
+
* The cache to be used
|
|
5214
|
+
* @param {string} [sGroupId]
|
|
5215
|
+
* The group ID to be used for the request
|
|
5216
|
+
*
|
|
5217
|
+
* @private
|
|
5218
|
+
*/
|
|
5219
|
+
ODataListBinding.prototype.validateSelection = function (oCache, sGroupId) {
|
|
5220
|
+
if (!this.mParameters.$$clearSelectionOnFilter || "$$aggregation" in this.mParameters
|
|
5221
|
+
|| this.oHeaderContext.isSelected()) {
|
|
5222
|
+
return;
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
const aSelectedContexts = this._getAllExistingContexts(true)
|
|
5226
|
+
.filter((oContext) => oContext.isSelected());
|
|
5227
|
+
|
|
5228
|
+
if (!aSelectedContexts.length) {
|
|
5229
|
+
return;
|
|
5230
|
+
}
|
|
5231
|
+
|
|
5232
|
+
const iStartOfPredicate = this.getResolvedPath().length;
|
|
5233
|
+
const aPredicatesIn = aSelectedContexts
|
|
5234
|
+
.map((oContext) => oContext.getPath().slice(iStartOfPredicate));
|
|
5235
|
+
oCache.requestFilteredOrderedPredicates(aPredicatesIn, this.lockGroup(sGroupId), true)
|
|
5236
|
+
.then((aPredicatesOut) => {
|
|
5237
|
+
const oPredicates = new Set(aPredicatesOut);
|
|
5238
|
+
aSelectedContexts.forEach((oContext) => {
|
|
5239
|
+
if (!oPredicates.has(oContext.getPath().slice(iStartOfPredicate))) {
|
|
5240
|
+
oContext.setSelected(false);
|
|
5241
|
+
}
|
|
5242
|
+
});
|
|
5243
|
+
}, (oError) => {
|
|
5244
|
+
this.oModel.reportError("Failed to validate selection", sClassName, oError);
|
|
5245
|
+
});
|
|
5246
|
+
};
|
|
5247
|
+
|
|
5109
5248
|
//*********************************************************************************************
|
|
5110
5249
|
// "static" functions
|
|
5111
5250
|
//*********************************************************************************************
|
|
@@ -60,7 +60,45 @@ sap.ui.define([
|
|
|
60
60
|
oBooleanType,
|
|
61
61
|
mCodeListUrl2Promise = {},
|
|
62
62
|
DEBUG = Log.Level.DEBUG,
|
|
63
|
-
|
|
63
|
+
oGeoJSON = {
|
|
64
|
+
$kind : "ComplexType",
|
|
65
|
+
$OpenType : true,
|
|
66
|
+
bbox : {
|
|
67
|
+
$kind : "Property",
|
|
68
|
+
$Type : "Edm.Double",
|
|
69
|
+
$isCollection : true
|
|
70
|
+
},
|
|
71
|
+
type : {
|
|
72
|
+
$kind : "Property",
|
|
73
|
+
$Nullable : false,
|
|
74
|
+
$Type : "Edm.String"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
oGeometry = {
|
|
78
|
+
...oGeoJSON, // "$BaseType" : "GeoJSON",
|
|
79
|
+
coordinates : {
|
|
80
|
+
$kind : "Property",
|
|
81
|
+
$Nullable : false,
|
|
82
|
+
$Type : "Edm.Double",
|
|
83
|
+
$isCollection : true
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
mEdmScope = {
|
|
87
|
+
"Edm.Geography" : {...oGeoJSON, $Abstract : true},
|
|
88
|
+
"Edm.GeographyLineString" : oGeometry,
|
|
89
|
+
"Edm.GeographyMultiLineString" : oGeometry,
|
|
90
|
+
"Edm.GeographyMultiPoint" : oGeometry,
|
|
91
|
+
"Edm.GeographyMultiPolygon" : oGeometry,
|
|
92
|
+
"Edm.GeographyPoint" : oGeometry,
|
|
93
|
+
"Edm.GeographyPolygon" : oGeometry
|
|
94
|
+
// Note: same for "Edm.Geometry*", see end of file
|
|
95
|
+
},
|
|
96
|
+
aInt64Names = [
|
|
97
|
+
"$count",
|
|
98
|
+
"$selectionCount",
|
|
99
|
+
"@$ui5.node.groupLevelCount",
|
|
100
|
+
"@$ui5.node.level"
|
|
101
|
+
],
|
|
64
102
|
oInt64Type,
|
|
65
103
|
rLeftBraces = /\$\(/g,
|
|
66
104
|
rNumber = /^-?\d+$/,
|
|
@@ -157,7 +195,7 @@ sap.ui.define([
|
|
|
157
195
|
* @hideconstructor
|
|
158
196
|
* @public
|
|
159
197
|
* @since 1.37.0
|
|
160
|
-
* @version 1.
|
|
198
|
+
* @version 1.135.0
|
|
161
199
|
*/
|
|
162
200
|
ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
|
|
163
201
|
constructor : constructor
|
|
@@ -1091,7 +1129,7 @@ sap.ui.define([
|
|
|
1091
1129
|
if (!bPrefetch) {
|
|
1092
1130
|
aPromises.push(this.oModel._requestAnnotationChanges());
|
|
1093
1131
|
this.oMetadataPromise = SyncPromise.all(aPromises).then(function (aMetadata) {
|
|
1094
|
-
var mScope = aMetadata[0];
|
|
1132
|
+
var mScope = Object.assign(aMetadata[0], mEdmScope);
|
|
1095
1133
|
|
|
1096
1134
|
that.aAnnotationChanges = aMetadata.pop();
|
|
1097
1135
|
that._mergeAnnotations(mScope, aMetadata.slice(1));
|
|
@@ -1785,7 +1823,7 @@ sap.ui.define([
|
|
|
1785
1823
|
return oProperty["$ui5.type"];
|
|
1786
1824
|
}
|
|
1787
1825
|
|
|
1788
|
-
if (oProperty.$isCollection) {
|
|
1826
|
+
if (oProperty.$isCollection && !rNumber.test(sLastSegment)) {
|
|
1789
1827
|
Log.warning("Unsupported collection type, using " + oType.getName(), sPath,
|
|
1790
1828
|
sODataMetaModel);
|
|
1791
1829
|
} else {
|
|
@@ -2435,8 +2473,8 @@ sap.ui.define([
|
|
|
2435
2473
|
* of "cross-service references" (see parameter <code>supportReferences</code> of
|
|
2436
2474
|
* {@link sap.ui.model.odata.v4.ODataModel#constructor}).
|
|
2437
2475
|
*
|
|
2438
|
-
* @deprecated As of 1.51.0, use {@link #getETags} instead because modifications to old
|
|
2439
|
-
* may be shadowed by a new file in certain scenarios.
|
|
2476
|
+
* @deprecated As of version 1.51.0, use {@link #getETags} instead because modifications to old
|
|
2477
|
+
* files may be shadowed by a new file in certain scenarios.
|
|
2440
2478
|
* @public
|
|
2441
2479
|
* @since 1.47.0
|
|
2442
2480
|
*/
|
|
@@ -2675,6 +2713,22 @@ sap.ui.define([
|
|
|
2675
2713
|
ODataMetaModel.prototype.getValueListType
|
|
2676
2714
|
= _Helper.createGetMethod("fetchValueListType", true);
|
|
2677
2715
|
|
|
2716
|
+
/**
|
|
2717
|
+
* Tells whether this metadata model's service prefers requests to use a resource path with
|
|
2718
|
+
* navigation properties instead of a canonical path, thus reflecting the object composition.
|
|
2719
|
+
* See "com.sap.vocabularies.Common.v1.AddressViaNavigationPath" for more details.
|
|
2720
|
+
*
|
|
2721
|
+
* @returns {boolean|undefined}
|
|
2722
|
+
* <code>true</code> if the "com.sap.vocabularies.Common.v1.AddressViaNavigationPath" tag is
|
|
2723
|
+
* present, <code>undefined</code> if it is missing or metadata is not (yet) available
|
|
2724
|
+
*
|
|
2725
|
+
* @public
|
|
2726
|
+
* @since 1.135.0
|
|
2727
|
+
*/
|
|
2728
|
+
ODataMetaModel.prototype.isAddressViaNavigationPath = function () {
|
|
2729
|
+
return this.getObject("/@com.sap.vocabularies.Common.v1.AddressViaNavigationPath");
|
|
2730
|
+
};
|
|
2731
|
+
|
|
2678
2732
|
/**
|
|
2679
2733
|
* Method not supported
|
|
2680
2734
|
*
|
|
@@ -3706,5 +3760,10 @@ sap.ui.define([
|
|
|
3706
3760
|
mCodeListUrl2Promise = {};
|
|
3707
3761
|
};
|
|
3708
3762
|
|
|
3763
|
+
Object.keys(mEdmScope).forEach((sGeographyName) => {
|
|
3764
|
+
const sGeometryName = sGeographyName.replace("Geography", "Geometry");
|
|
3765
|
+
mEdmScope[sGeometryName] = mEdmScope[sGeographyName];
|
|
3766
|
+
});
|
|
3767
|
+
|
|
3709
3768
|
return ODataMetaModel;
|
|
3710
3769
|
});
|