@openui5/sap.ui.core 1.103.1 → 1.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +35 -15
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +64 -21
- package/package.json +1 -1
- package/src/jquery.sap.dom.js +10 -10
- package/src/jquery.sap.global.js +24 -216
- package/src/jquery.sap.history.js +1 -1
- package/src/jquery.sap.properties.js +2 -2
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +4 -4
- package/src/sap/base/i18n/ResourceBundle.js +7 -11
- package/src/sap/base/util/LoaderExtensions.js +69 -61
- package/src/sap/base/util/ObjectPath.js +1 -1
- package/src/sap/base/util/Properties.js +1 -1
- package/src/sap/base/util/fetch.js +228 -0
- package/src/sap/base/util/mixedFetch.js +69 -0
- 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 +66 -0
- package/src/sap/ui/Device.js +5 -5
- package/src/sap/ui/Global.js +7 -14
- package/src/sap/ui/VersionInfo.js +57 -54
- package/src/sap/ui/base/BindingInfo.js +198 -0
- package/src/sap/ui/base/DataType.js +1 -1
- package/src/sap/ui/base/Event.js +2 -2
- package/src/sap/ui/base/EventProvider.js +2 -2
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +209 -979
- package/src/sap/ui/base/ManagedObjectMetadata.js +6 -6
- package/src/sap/ui/base/ManagedObjectObserver.js +2 -2
- 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 +72 -50
- package/src/sap/ui/core/AccessKeysEnablement.js +173 -0
- package/src/sap/ui/core/AppCacheBuster.js +65 -51
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +52 -25
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +16 -23
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +598 -358
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +126 -185
- 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 +68 -4
- package/src/sap/ui/core/ElementMetadata.js +6 -4
- 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 +2 -2
- package/src/sap/ui/core/FocusHandler.js +84 -39
- 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/IconPool.js +8 -8
- package/src/sap/ui/core/IndicationColorSupport.js +2 -2
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +4 -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 +8 -51
- package/src/sap/ui/core/Manifest.js +3 -5
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +13 -8
- package/src/sap/ui/core/RenderManager.js +17 -21
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +28 -49
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +12 -13
- package/src/sap/ui/core/UIArea.js +13 -12
- package/src/sap/ui/core/UIComponent.js +3 -3
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +2 -2
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +5 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +7 -7
- package/src/sap/ui/core/_ConfigurationProvider.js +187 -0
- package/src/sap/ui/core/_IconRegistry.js +66 -55
- package/src/sap/ui/core/cache/CacheManager.js +20 -16
- package/src/sap/ui/core/cache/CacheManagerNOP.js +5 -2
- package/src/sap/ui/core/cache/LRUPersistentCache.js +15 -8
- package/src/sap/ui/core/cldr/en.json +0 -1
- package/src/sap/ui/core/cldr/es_BO.json +3 -3
- package/src/sap/ui/core/cldr/es_CL.json +3 -3
- package/src/sap/ui/core/cldr/es_MX.json +3 -3
- package/src/sap/ui/core/cldr/es_PE.json +3 -3
- package/src/sap/ui/core/cldr/es_UY.json +3 -3
- package/src/sap/ui/core/cldr/es_VE.json +2 -2
- package/src/sap/ui/core/date/Buddhist.js +15 -13
- package/src/sap/ui/core/date/Japanese.js +0 -6
- package/src/sap/ui/core/date/UniversalDate.js +144 -34
- package/src/sap/ui/core/delegate/ItemNavigation.js +2 -2
- package/src/sap/ui/core/delegate/ScrollEnablement.js +7 -6
- package/src/sap/ui/core/dnd/DragAndDrop.js +13 -9
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +3 -3
- 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/DateFormat.js +36 -9
- package/src/sap/ui/core/format/NumberFormat.js +92 -26
- package/src/sap/ui/core/format/TimezoneUtil.js +2 -2
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +44 -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 +2 -0
- package/src/sap/ui/core/messagebundle_ar.properties +54 -53
- package/src/sap/ui/core/messagebundle_bg.properties +54 -53
- package/src/sap/ui/core/messagebundle_ca.properties +28 -27
- package/src/sap/ui/core/messagebundle_cs.properties +37 -36
- package/src/sap/ui/core/messagebundle_cy.properties +57 -56
- package/src/sap/ui/core/messagebundle_da.properties +53 -52
- package/src/sap/ui/core/messagebundle_de.properties +54 -53
- package/src/sap/ui/core/messagebundle_el.properties +46 -45
- package/src/sap/ui/core/messagebundle_en.properties +57 -56
- package/src/sap/ui/core/messagebundle_en_GB.properties +57 -56
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +1 -0
- package/src/sap/ui/core/messagebundle_es.properties +42 -41
- package/src/sap/ui/core/messagebundle_es_MX.properties +54 -53
- package/src/sap/ui/core/messagebundle_et.properties +51 -50
- package/src/sap/ui/core/messagebundle_fi.properties +48 -47
- package/src/sap/ui/core/messagebundle_fr.properties +37 -36
- package/src/sap/ui/core/messagebundle_fr_CA.properties +22 -21
- package/src/sap/ui/core/messagebundle_hi.properties +42 -41
- package/src/sap/ui/core/messagebundle_hr.properties +55 -54
- package/src/sap/ui/core/messagebundle_hu.properties +56 -55
- package/src/sap/ui/core/messagebundle_id.properties +55 -54
- package/src/sap/ui/core/messagebundle_it.properties +55 -54
- package/src/sap/ui/core/messagebundle_iw.properties +55 -54
- package/src/sap/ui/core/messagebundle_ja.properties +48 -47
- package/src/sap/ui/core/messagebundle_kk.properties +41 -40
- package/src/sap/ui/core/messagebundle_ko.properties +21 -20
- package/src/sap/ui/core/messagebundle_lt.properties +55 -54
- package/src/sap/ui/core/messagebundle_lv.properties +55 -54
- package/src/sap/ui/core/messagebundle_ms.properties +52 -51
- package/src/sap/ui/core/messagebundle_nl.properties +53 -52
- package/src/sap/ui/core/messagebundle_no.properties +53 -52
- package/src/sap/ui/core/messagebundle_pl.properties +52 -51
- package/src/sap/ui/core/messagebundle_pt.properties +54 -53
- package/src/sap/ui/core/messagebundle_pt_PT.properties +55 -54
- package/src/sap/ui/core/messagebundle_ro.properties +56 -55
- package/src/sap/ui/core/messagebundle_ru.properties +52 -51
- package/src/sap/ui/core/messagebundle_sh.properties +57 -56
- package/src/sap/ui/core/messagebundle_sk.properties +54 -53
- package/src/sap/ui/core/messagebundle_sl.properties +56 -55
- package/src/sap/ui/core/messagebundle_sv.properties +52 -51
- package/src/sap/ui/core/messagebundle_th.properties +25 -24
- package/src/sap/ui/core/messagebundle_tr.properties +56 -55
- package/src/sap/ui/core/messagebundle_uk.properties +55 -54
- package/src/sap/ui/core/messagebundle_vi.properties +56 -55
- package/src/sap/ui/core/messagebundle_zh_CN.properties +55 -54
- package/src/sap/ui/core/messagebundle_zh_TW.properties +55 -54
- package/src/sap/ui/core/mvc/Controller.js +17 -12
- 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 +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +7 -7
- package/src/sap/ui/core/mvc/XMLView.js +1 -2
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +16 -14
- package/src/sap/ui/core/plugin/TemplatingSupport.js +2 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Router.js +4 -4
- package/src/sap/ui/core/routing/async/TargetCache.js +4 -0
- package/src/sap/ui/core/rules/App.support.js +11 -13
- package/src/sap/ui/core/rules/Config.support.js +14 -14
- package/src/sap/ui/core/rules/CoreHelper.support.js +3 -3
- package/src/sap/ui/core/rules/Model.support.js +8 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +8 -8
- package/src/sap/ui/core/rules/View.support.js +20 -13
- package/src/sap/ui/core/search/OpenSearchProvider.js +25 -12
- package/src/sap/ui/core/search/SearchProvider.js +2 -2
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Hotkeys.js +2 -3
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +3 -4
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Debugging.js +4 -4
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +46 -33
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +3 -4
- package/src/sap/ui/core/support/support.html +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +3 -3
- package/src/sap/ui/core/themes/base/Icon.less +4 -0
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +1 -1
- package/src/sap/ui/core/themes/base/base.less +26 -26
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/global.less +5 -1
- package/src/sap/ui/core/themes/base/shared.less +6 -0
- package/src/sap/ui/core/theming/Parameters.js +52 -53
- 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 +7 -5
- 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 +61 -42
- package/src/sap/ui/core/util/MockServer.js +45 -71
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +4 -3
- package/src/sap/ui/core/util/XMLPreprocessor.js +3 -3
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +1 -4
- 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/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.css +1 -31
- package/src/sap/ui/debug/PropertyList.js +6 -240
- package/src/sap/ui/dom/getScrollbarSize.js +1 -1
- package/src/sap/ui/dom/jquery/control.js +1 -0
- package/src/sap/ui/events/jquery/EventSimulation.js +4 -4
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/Context.js +3 -0
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +3 -3
- package/src/sap/ui/model/ListBinding.js +2 -2
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +871 -0
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +16 -5
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +2 -2
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +3 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +2 -2
- package/src/sap/ui/model/base/ManagedObjectModel.js +2 -2
- package/src/sap/ui/model/json/JSONModel.js +2 -2
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +4 -4
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +4 -4
- package/src/sap/ui/model/odata/ODataMetaModel.js +10 -10
- package/src/sap/ui/model/odata/ODataMetadata.js +6 -3
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +459 -268
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +5 -5
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +5 -2
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +26 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +164 -125
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +18 -2
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +3 -3
- package/src/sap/ui/model/odata/v4/Context.js +169 -79
- package/src/sap/ui/model/odata/v4/ODataBinding.js +51 -12
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +111 -92
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +206 -150
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -10
- package/src/sap/ui/model/odata/v4/ODataModel.js +249 -28
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +33 -18
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +17 -11
- package/src/sap/ui/model/odata/v4/ODataUtils.js +7 -4
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +142 -35
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +167 -16
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +388 -188
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +2 -3
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +119 -43
- package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +2 -3
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +13 -6
- package/src/sap/ui/model/resource/ResourceModel.js +2 -2
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +4 -2
- package/src/sap/ui/performance/trace/FESR.js +27 -24
- package/src/sap/ui/performance/trace/Interaction.js +66 -16
- package/src/sap/ui/qunit/QUnitUtils.js +1 -2
- package/src/sap/ui/qunit/sinon-qunit-bridge.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/Opa5.js +1 -1
- package/src/sap/ui/test/OpaBuilder.js +1 -1
- package/src/sap/ui/test/TestUtils.js +35 -2
- package/src/sap/ui/test/actions/Press.js +7 -0
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/matchers/AggregationContainsPropertyEqual.js +2 -3
- package/src/sap/ui/test/matchers/AggregationFilled.js +2 -3
- package/src/sap/ui/test/matchers/AggregationLengthEquals.js +2 -3
- package/src/sap/ui/test/matchers/Matcher.js +9 -11
- package/src/sap/ui/test/opaQunit.js +15 -9
- package/src/sap/ui/test/pipelines/ActionPipeline.js +2 -3
- package/src/sap/ui/test/pipelines/MatcherPipeline.js +2 -3
- package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -3
- package/src/sap/ui/thirdparty/IPv6.js +1 -1
- package/src/sap/ui/thirdparty/SecondLevelDomains.js +1 -1
- package/src/sap/ui/thirdparty/URI.js +8 -2
- package/src/sap/ui/thirdparty/URITemplate.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/XMLHelper.js +1 -1
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
* @hideconstructor
|
|
158
158
|
* @public
|
|
159
159
|
* @since 1.37.0
|
|
160
|
-
* @version 1.
|
|
160
|
+
* @version 1.106.0
|
|
161
161
|
*/
|
|
162
162
|
ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
|
|
163
163
|
constructor : constructor
|
|
@@ -2221,7 +2221,7 @@ sap.ui.define([
|
|
|
2221
2221
|
/**
|
|
2222
2222
|
* Returns a map of entity tags for each $metadata or annotation file loaded so far.
|
|
2223
2223
|
*
|
|
2224
|
-
* @returns {
|
|
2224
|
+
* @returns {Object<string,string|null>}
|
|
2225
2225
|
* A map which contains one entry for each $metadata or annotation file loaded so far: the key
|
|
2226
2226
|
* is the file's URL as a <code>string</code> and the value is the <code>string</code> value
|
|
2227
2227
|
* of the "ETag" response header for that file. Initially, the map is empty. If no "ETag"
|
|
@@ -2305,7 +2305,7 @@ sap.ui.define([
|
|
|
2305
2305
|
* Optional (binding) parameters; if they are given, <code>oContext</code> cannot be omitted
|
|
2306
2306
|
* @param {object} [mParameters.scope]
|
|
2307
2307
|
* Optional scope for lookup of aliases for computed annotations (since 1.43.0)
|
|
2308
|
-
* @returns {any}
|
|
2308
|
+
* @returns {any|undefined}
|
|
2309
2309
|
* The requested metadata object if it is already available, or <code>undefined</code>
|
|
2310
2310
|
*
|
|
2311
2311
|
* @function
|
|
@@ -2697,7 +2697,7 @@ sap.ui.define([
|
|
|
2697
2697
|
* If present, it must point to this meta model's root entity container, that is,
|
|
2698
2698
|
* <code>oDetails.context.getModel() === this</code> and
|
|
2699
2699
|
* <code>oDetails.context.getPath() === "/"</code>
|
|
2700
|
-
* @returns {Promise}
|
|
2700
|
+
* @returns {Promise<Object<string,{StandardCode: string, Text: string, UnitSpecificScale: string}>|null>}
|
|
2701
2701
|
* A promise resolving with the currency customizing which is a map from currency key to an
|
|
2702
2702
|
* object with the following properties:
|
|
2703
2703
|
* <ul>
|
|
@@ -2773,9 +2773,11 @@ sap.ui.define([
|
|
|
2773
2773
|
* </template:with>
|
|
2774
2774
|
* </pre>
|
|
2775
2775
|
*
|
|
2776
|
-
* The basic idea is that every path described in
|
|
2777
|
-
* "
|
|
2778
|
-
*
|
|
2776
|
+
* The basic idea is that every path described in <a href=
|
|
2777
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.html#_Attribute_Target"
|
|
2778
|
+
* >"14.2.1 Attribute Target"</a> in specification "OData Version 4.0 Part 3: Common Schema
|
|
2779
|
+
* Definition Language" is a valid absolute path within the metadata model if a leading slash is
|
|
2780
|
+
* added; for example
|
|
2779
2781
|
* "/" + "MySchema.MyEntityContainer/MyEntitySet/MyComplexProperty/MyNavigationProperty". Also,
|
|
2780
2782
|
* every path described in "14.5.2 Expression edm:AnnotationPath",
|
|
2781
2783
|
* "14.5.11 Expression edm:NavigationPropertyPath", "14.5.12 Expression edm:Path", and
|
|
@@ -2850,8 +2852,9 @@ sap.ui.define([
|
|
|
2850
2852
|
* "14.5.14.2 Element edm:PropertyValue" are addressed by segments like
|
|
2851
2853
|
* "<7.2.1 Attribute Property>@...", "$OnDelete@...", "<10.2.1 Attribute Name>@..." and
|
|
2852
2854
|
* "<14.5.14.2.1 Attribute Property>@..." (where angle brackets denote a variable part and
|
|
2853
|
-
* sections refer to specification
|
|
2854
|
-
*
|
|
2855
|
+
* sections refer to specification <a href=
|
|
2856
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.htm"
|
|
2857
|
+
* >"OData Version 4.0 Part 3: Common Schema Definition Language"</a>).
|
|
2855
2858
|
*
|
|
2856
2859
|
* Annotations starting with "@@", for example
|
|
2857
2860
|
* "@@sap.ui.model.odata.v4.AnnotationHelper.isMultiple" or "@@.AH.isMultiple" or
|
|
@@ -3030,7 +3033,7 @@ sap.ui.define([
|
|
|
3030
3033
|
* If present, it must point to this meta model's root entity container, that is,
|
|
3031
3034
|
* <code>oDetails.context.getModel() === this</code> and
|
|
3032
3035
|
* <code>oDetails.context.getPath() === "/"</code>
|
|
3033
|
-
* @returns {Promise}
|
|
3036
|
+
* @returns {Promise<Object<string,{StandardCode: string, Text: string, UnitSpecificScale: string}>|null>}
|
|
3034
3037
|
* A promise resolving with the unit customizing which is a map from unit key to an object
|
|
3035
3038
|
* with the following properties:
|
|
3036
3039
|
* <ul>
|
|
@@ -66,6 +66,8 @@ sap.ui.define([
|
|
|
66
66
|
MessageType.Error
|
|
67
67
|
],
|
|
68
68
|
mSupportedEvents = {
|
|
69
|
+
dataReceived : true,
|
|
70
|
+
dataRequested : true,
|
|
69
71
|
messageChange : true,
|
|
70
72
|
sessionTimeout : true
|
|
71
73
|
},
|
|
@@ -146,9 +148,10 @@ sap.ui.define([
|
|
|
146
148
|
* Root URL of the service to request data from. The path part of the URL must end with a
|
|
147
149
|
* forward slash according to OData V4 specification ABNF, rule "serviceRoot". You may
|
|
148
150
|
* append OData custom query options to the service root URL separated with a "?", for
|
|
149
|
-
* example "/MyService/?custom=foo". See specification
|
|
150
|
-
*
|
|
151
|
-
*
|
|
151
|
+
* example "/MyService/?custom=foo". See specification <a href=
|
|
152
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html#_Custom_Query_Options"
|
|
153
|
+
* >"OData Version 4.0 Part 2: URL Conventions", "5.2 Custom Query Options"</a>. OData
|
|
154
|
+
* system query options and OData parameter aliases lead to an error.
|
|
152
155
|
* @param {boolean} [mParameters.sharedRequests]
|
|
153
156
|
* Whether all list bindings for the same resource path share their data, so that it is
|
|
154
157
|
* requested only once; only the value <code>true</code> is allowed; see parameter
|
|
@@ -182,7 +185,9 @@ sap.ui.define([
|
|
|
182
185
|
* This model is not prepared to be inherited from.
|
|
183
186
|
*
|
|
184
187
|
* Every resource path (relative to the service root URL, no query options) according to
|
|
185
|
-
*
|
|
188
|
+
* <a href=
|
|
189
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html#resource-pathurl4"
|
|
190
|
+
* >"4 Resource Path"</a> in specification "OData Version 4.0 Part 2: URL Conventions" is
|
|
186
191
|
* a valid data binding path within this model if a leading slash is added; for example
|
|
187
192
|
* "/" + "SalesOrderList('A%2FB%26C')" to access an entity instance with key "A/B&C". Note
|
|
188
193
|
* that appropriate URI encoding is necessary, see the example of
|
|
@@ -214,7 +219,7 @@ sap.ui.define([
|
|
|
214
219
|
* @extends sap.ui.model.Model
|
|
215
220
|
* @public
|
|
216
221
|
* @since 1.37.0
|
|
217
|
-
* @version 1.
|
|
222
|
+
* @version 1.106.0
|
|
218
223
|
*/
|
|
219
224
|
ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
220
225
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
|
|
@@ -331,6 +336,8 @@ sap.ui.define([
|
|
|
331
336
|
this.oInterface = {
|
|
332
337
|
fetchEntityContainer : this.oMetaModel.fetchEntityContainer.bind(this.oMetaModel),
|
|
333
338
|
fetchMetadata : this.oMetaModel.fetchObject.bind(this.oMetaModel),
|
|
339
|
+
fireDataReceived : this.fireDataReceived.bind(this),
|
|
340
|
+
fireDataRequested : this.fireDataRequested.bind(this),
|
|
334
341
|
fireSessionTimeout : function () {
|
|
335
342
|
that.fireEvent("sessionTimeout");
|
|
336
343
|
},
|
|
@@ -370,6 +377,9 @@ sap.ui.define([
|
|
|
370
377
|
}
|
|
371
378
|
this.aPrerenderingTasks = null; // @see #addPrerenderingTask
|
|
372
379
|
this.fnOptimisticBatchEnabler = null;
|
|
380
|
+
this.oDataReceivedError = undefined; // the error for the next dataReceived event
|
|
381
|
+
// counts the fireDataRequested calls for which one event was fired
|
|
382
|
+
this.iDataRequestedCount = 0;
|
|
373
383
|
}
|
|
374
384
|
|
|
375
385
|
/**
|
|
@@ -397,6 +407,58 @@ sap.ui.define([
|
|
|
397
407
|
});
|
|
398
408
|
};
|
|
399
409
|
|
|
410
|
+
/**
|
|
411
|
+
* The 'dataReceived' event is fired when the back-end data has been received on the client. It
|
|
412
|
+
* is only fired for GET requests and is to be used by applications to process an error.
|
|
413
|
+
*
|
|
414
|
+
* If back-end requests are successful, the event has almost no parameters. For compatibility
|
|
415
|
+
* with {@link sap.ui.model.Binding#event:dataReceived}, an event parameter
|
|
416
|
+
* <code>data : {}</code> is provided: "In error cases it will be undefined", but otherwise it
|
|
417
|
+
* is not.
|
|
418
|
+
*
|
|
419
|
+
* If a back-end request fails, the 'dataReceived' event provides an <code>Error</code> in the
|
|
420
|
+
* 'error' event parameter.
|
|
421
|
+
*
|
|
422
|
+
* @param {sap.ui.base.Event} oEvent
|
|
423
|
+
* @param {object} oEvent.getParameters()
|
|
424
|
+
* @param {object} [oEvent.getParameters().data]
|
|
425
|
+
* An empty data object if a back-end request succeeds
|
|
426
|
+
* @param {Error} [oEvent.getParameters().error]
|
|
427
|
+
* The error object if a back-end request failed. If there are multiple failed back-end
|
|
428
|
+
* requests, the error of the first one is provided.
|
|
429
|
+
*
|
|
430
|
+
* @event sap.ui.model.odata.v4.ODataModel#dataReceived
|
|
431
|
+
* @public
|
|
432
|
+
* @see sap.ui.model.odata.v4.ODataContextBinding#event:dataReceived
|
|
433
|
+
* @see sap.ui.model.odata.v4.ODataListBinding#event:dataReceived
|
|
434
|
+
* @see sap.ui.model.odata.v4.ODataModel#event:dataRequested
|
|
435
|
+
* @since 1.106.0
|
|
436
|
+
*/
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* The 'dataRequested' event is fired directly after data has been requested from a back end.
|
|
440
|
+
* It is only fired for GET requests. Registered event handlers are called without parameters.
|
|
441
|
+
*
|
|
442
|
+
* There are two kinds of requests leading to such an event:
|
|
443
|
+
* <ul>
|
|
444
|
+
* <li> When a binding requests initial data, or a list binding requests data for additional
|
|
445
|
+
* rows, the event is fired at the binding and may be bubbled up to the model. This includes
|
|
446
|
+
* refreshes except those triggered by
|
|
447
|
+
* {@link sap.ui.model.odata.v4.Context#requestSideEffects}.
|
|
448
|
+
* <li> For additional property requests for an entity that already has been requested, the
|
|
449
|
+
* event is only fired at the model.
|
|
450
|
+
* </ul>
|
|
451
|
+
*
|
|
452
|
+
* @param {sap.ui.base.Event} oEvent
|
|
453
|
+
*
|
|
454
|
+
* @event sap.ui.model.odata.v4.ODataModel#dataRequested
|
|
455
|
+
* @public
|
|
456
|
+
* @see sap.ui.model.odata.v4.ODataContextBinding#event:dataRequested
|
|
457
|
+
* @see sap.ui.model.odata.v4.ODataListBinding#event:dataRequested
|
|
458
|
+
* @see sap.ui.model.odata.v4.ODataModel#event:dataReceived
|
|
459
|
+
* @since 1.106.0
|
|
460
|
+
*/
|
|
461
|
+
|
|
400
462
|
/**
|
|
401
463
|
* The 'parseError' event is not supported by this model.
|
|
402
464
|
*
|
|
@@ -490,6 +552,34 @@ sap.ui.define([
|
|
|
490
552
|
}
|
|
491
553
|
};
|
|
492
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Attach event handler <code>fnFunction</code> to the 'dataReceived' event of this binding.
|
|
557
|
+
*
|
|
558
|
+
* @param {function} fnFunction The function to call when the event occurs
|
|
559
|
+
* @param {object} [oListener] Object on which to call the given function
|
|
560
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
561
|
+
*
|
|
562
|
+
* @public
|
|
563
|
+
* @since 1.105.0
|
|
564
|
+
*/
|
|
565
|
+
ODataModel.prototype.attachDataReceived = function (fnFunction, oListener) {
|
|
566
|
+
return this.attachEvent("dataReceived", fnFunction, oListener);
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Attach event handler <code>fnFunction</code> to the 'dataRequested' event of this binding.
|
|
571
|
+
*
|
|
572
|
+
* @param {function} fnFunction The function to call when the event occurs
|
|
573
|
+
* @param {object} [oListener] Object on which to call the given function
|
|
574
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
575
|
+
*
|
|
576
|
+
* @public
|
|
577
|
+
* @since 1.106.0
|
|
578
|
+
*/
|
|
579
|
+
ODataModel.prototype.attachDataRequested = function (fnFunction, oListener) {
|
|
580
|
+
return this.attachEvent("dataRequested", fnFunction, oListener);
|
|
581
|
+
};
|
|
582
|
+
|
|
493
583
|
/**
|
|
494
584
|
* See {@link sap.ui.base.EventProvider#attachEvent}
|
|
495
585
|
*
|
|
@@ -506,8 +596,7 @@ sap.ui.define([
|
|
|
506
596
|
// @override sap.ui.base.EventProvider#attachEvent
|
|
507
597
|
ODataModel.prototype.attachEvent = function (sEventId, _oData, _fnFunction, _oListener) {
|
|
508
598
|
if (!(sEventId in mSupportedEvents)) {
|
|
509
|
-
throw new Error("Unsupported event '" + sEventId
|
|
510
|
-
+ "': v4.ODataModel#attachEvent");
|
|
599
|
+
throw new Error("Unsupported event '" + sEventId + "': v4.ODataModel#attachEvent");
|
|
511
600
|
}
|
|
512
601
|
return Model.prototype.attachEvent.apply(this, arguments);
|
|
513
602
|
};
|
|
@@ -534,9 +623,10 @@ sap.ui.define([
|
|
|
534
623
|
* @param {sap.ui.model.odata.v4.Context} [oContext]
|
|
535
624
|
* The context which is required as base for a relative path
|
|
536
625
|
* @param {object} [mParameters]
|
|
537
|
-
* Map of binding parameters which can be OData query options as specified in
|
|
538
|
-
* "
|
|
539
|
-
*
|
|
626
|
+
* Map of binding parameters which can be OData query options as specified in <a href=
|
|
627
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html"
|
|
628
|
+
* >"OData Version 4.0 Part 2: URL Conventions"</a> or the binding-specific parameters as
|
|
629
|
+
* specified below.
|
|
540
630
|
* Note: The binding creates its own data service request if it is absolute or if it has any
|
|
541
631
|
* parameters or if it is relative and has a context created via
|
|
542
632
|
* {@link #createBindingContext}.
|
|
@@ -551,6 +641,19 @@ sap.ui.define([
|
|
|
551
641
|
* </ul>
|
|
552
642
|
* All other query options lead to an error.
|
|
553
643
|
* Query options specified for the binding overwrite model query options.
|
|
644
|
+
* @param {string|object} [mParameters.$expand]
|
|
645
|
+
* The value for the "5.1.2 System Query Option $expand" or an object which determines that
|
|
646
|
+
* value. The object is a map from expand path to expand options, where the options are again
|
|
647
|
+
* maps of system query options, typically with string values. $count can also be given as a
|
|
648
|
+
* <code>boolean</code> value, $expand can recursively be given as a map, $levels can also be
|
|
649
|
+
* given as a <code>number</code> value, and $select can also be given as an array (but
|
|
650
|
+
* without navigation paths). An empty map can also be given as <code>null</code> or
|
|
651
|
+
* <code>true</code>. See also {@link topic:1ab4f62de6ab467096a2a98b363a1373 Parameters}.
|
|
652
|
+
* @param {string|string[]} [mParameters.$select]
|
|
653
|
+
* A comma separated list or an array of items which determine the value for the
|
|
654
|
+
* "5.1.3 System Query Option $select". Since 1.75.0, when using the "autoExpandSelect" model
|
|
655
|
+
* parameter (see {@link sap.ui.model.odata.v4.ODataModel#constructor}), paths with navigation
|
|
656
|
+
* properties can be included and will contribute to the "5.1.2 System Query Option $expand".
|
|
554
657
|
* @param {boolean} [mParameters.$$canonicalPath]
|
|
555
658
|
* Whether a binding relative to a {@link sap.ui.model.odata.v4.Context} uses the canonical
|
|
556
659
|
* path computed from its context's path for data service requests; only the value
|
|
@@ -647,9 +750,10 @@ sap.ui.define([
|
|
|
647
750
|
* using a logical <code>AND</code>.
|
|
648
751
|
* Supported since 1.39.0.
|
|
649
752
|
* @param {object} [mParameters]
|
|
650
|
-
* Map of binding parameters which can be OData query options as specified in
|
|
651
|
-
* "
|
|
652
|
-
*
|
|
753
|
+
* Map of binding parameters which can be OData query options as specified in <a href=
|
|
754
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html"
|
|
755
|
+
* >"OData Version 4.0 Part 2: URL Conventions"</a> or binding-specific parameters as
|
|
756
|
+
* specified below.
|
|
653
757
|
* Note: The binding creates its own data service request if it is absolute or if it has any
|
|
654
758
|
* parameters or if it is relative and has a context created via {@link #createBindingContext}
|
|
655
759
|
* or if it has sorters or filters.
|
|
@@ -658,10 +762,41 @@ sap.ui.define([
|
|
|
658
762
|
* <li> All "5.2 Custom Query Options" except for those with a name starting with "sap-"
|
|
659
763
|
* (unless starting with "sap-valid-")
|
|
660
764
|
* <li> The $apply, $count, $expand, $filter, $levels, $orderby, $search, and $select
|
|
661
|
-
* "5.1 System Query Options"
|
|
765
|
+
* "5.1 System Query Options"; OData V4 only allows $levels inside $expand.
|
|
662
766
|
* </ul>
|
|
663
767
|
* All other query options lead to an error.
|
|
664
768
|
* Query options specified for the binding overwrite model query options.
|
|
769
|
+
* @param {string} [mParameters.$apply]
|
|
770
|
+
* The value for the "3 System Query Option $apply" (see also
|
|
771
|
+
* <a href="https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/">OData
|
|
772
|
+
* Extension for Data Aggregation Version 4.0</a>) as an alternative to
|
|
773
|
+
* <code>$$aggregation</code>
|
|
774
|
+
* @param {string|boolean} [mParameters.$count]
|
|
775
|
+
* The value for the "5.1.6 System Query Option $count", useful for creation at the end and
|
|
776
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#getCount}
|
|
777
|
+
* @param {string|object} [mParameters.$expand]
|
|
778
|
+
* The value for the "5.1.2 System Query Option $expand" or an object which determines that
|
|
779
|
+
* value. The object is a map from expand path to expand options, where the options are again
|
|
780
|
+
* maps of system query options, typically with string values. $count can also be given as a
|
|
781
|
+
* <code>boolean</code> value, $expand can recursively be given as a map, $levels can also be
|
|
782
|
+
* given as a <code>number</code> value, and $select can also be given as an array (but
|
|
783
|
+
* without navigation paths). An empty map can also be given as <code>null</code> or
|
|
784
|
+
* <code>true</code>. See also {@link topic:1ab4f62de6ab467096a2a98b363a1373 Parameters}.
|
|
785
|
+
* @param {string} [mParameters.$filter]
|
|
786
|
+
* The value for the "5.1.1 System Query Option $filter" used in addition to
|
|
787
|
+
* <code>vFilters</code>
|
|
788
|
+
* @param {string|number} [mParameters.$orderby]
|
|
789
|
+
* The value for the "5.1.4 System Query Option $orderby" used in addition to
|
|
790
|
+
* <code>vSorters</code>
|
|
791
|
+
* @param {string} [mParameters.$search]
|
|
792
|
+
* The value for the "5.1.7 System Query Option $search"; see also
|
|
793
|
+
* <code>oAggregation.search</code> at
|
|
794
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation} and the note there!
|
|
795
|
+
* @param {string|string[]} [mParameters.$select]
|
|
796
|
+
* A comma separated list or an array of items which determine the value for the
|
|
797
|
+
* "5.1.3 System Query Option $select". Since 1.75.0, when using the "autoExpandSelect" model
|
|
798
|
+
* parameter (see {@link sap.ui.model.odata.v4.ODataModel#constructor}), paths with navigation
|
|
799
|
+
* properties can be included and will contribute to the "5.1.2 System Query Option $expand".
|
|
665
800
|
* @param {object} [mParameters.$$aggregation]
|
|
666
801
|
* An object holding the information needed for data aggregation, see
|
|
667
802
|
* {@link sap.ui.model.odata.v4.ODataListBinding#setAggregation} for details.
|
|
@@ -768,9 +903,10 @@ sap.ui.define([
|
|
|
768
903
|
* @param {sap.ui.model.Context} [oContext]
|
|
769
904
|
* The context which is required as base for a relative path
|
|
770
905
|
* @param {object} [mParameters]
|
|
771
|
-
* Map of binding parameters which can be OData query options as specified in
|
|
772
|
-
* "
|
|
773
|
-
*
|
|
906
|
+
* Map of binding parameters which can be OData query options as specified in <a href=
|
|
907
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html"
|
|
908
|
+
* >"OData Version 4.0 Part 2: URL Conventions"</a> or the binding-specific parameters as
|
|
909
|
+
* specified below. The following OData query options are allowed:
|
|
774
910
|
* <ul>
|
|
775
911
|
* <li> All "5.2 Custom Query Options" except for those with a name starting with "sap-"
|
|
776
912
|
* (unless starting with "sap-valid-")
|
|
@@ -783,6 +919,16 @@ sap.ui.define([
|
|
|
783
919
|
* relative to a context created via {@link #createBindingContext}. The binding parameters are
|
|
784
920
|
* ignored in case the binding creates no own data service request or in case the binding
|
|
785
921
|
* points to metadata.
|
|
922
|
+
* @param {string} [mParameters.$apply]
|
|
923
|
+
* The value for the "3 System Query Option $apply" (see also
|
|
924
|
+
* <a href="https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/">OData
|
|
925
|
+
* Extension for Data Aggregation Version 4.0</a>), if the path ends with a "$count" segment
|
|
926
|
+
* @param {string} [mParameters.$filter]
|
|
927
|
+
* The value for the "5.1.1 System Query Option $filter", if the path ends with a "$count"
|
|
928
|
+
* segment
|
|
929
|
+
* @param {string} [mParameters.$search]
|
|
930
|
+
* The value for the "5.1.7 System Query Option $search", if the path ends with a "$count"
|
|
931
|
+
* segment
|
|
786
932
|
* @param {string} [mParameters.$$groupId]
|
|
787
933
|
* The group ID to be used for <b>read</b> requests triggered by this binding; if not
|
|
788
934
|
* specified, either the parent binding's group ID (if the binding is relative) or the
|
|
@@ -870,7 +1016,7 @@ sap.ui.define([
|
|
|
870
1016
|
ODataModel.prototype.buildQueryOptions = function (mParameters, bSystemQueryOptionsAllowed,
|
|
871
1017
|
bSapAllowed) {
|
|
872
1018
|
var sParameterName,
|
|
873
|
-
mTransformedOptions =
|
|
1019
|
+
mTransformedOptions = Object.assign({}, mParameters); // shallow clone
|
|
874
1020
|
|
|
875
1021
|
/*
|
|
876
1022
|
* Parses the query options for the given option name "sOptionName" in the given map of
|
|
@@ -897,6 +1043,7 @@ sap.ui.define([
|
|
|
897
1043
|
mOptions[sOptionName] = vValue;
|
|
898
1044
|
}
|
|
899
1045
|
if (sOptionName === "$expand") {
|
|
1046
|
+
vValue = mOptions[sOptionName] = _Helper.clone(vValue); // deep clone needed!
|
|
900
1047
|
for (sExpandPath in vValue) {
|
|
901
1048
|
mExpandOptions = vValue[sExpandPath];
|
|
902
1049
|
if (mExpandOptions === null || typeof mExpandOptions !== "object") {
|
|
@@ -955,8 +1102,10 @@ sap.ui.define([
|
|
|
955
1102
|
* headers: Headers with an <code>undefined</code> value are removed, the other headers are set,
|
|
956
1103
|
* and missing headers remain unchanged. The following headers must not be used:
|
|
957
1104
|
* <ul>
|
|
958
|
-
* <li> OData V4 requests headers as specified in
|
|
959
|
-
* "
|
|
1105
|
+
* <li> OData V4 requests headers as specified in <a href=
|
|
1106
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/os/part1-protocol/odata-v4.0-os-part1-protocol.html#_Common_Headers"
|
|
1107
|
+
* >"8.1 Common Headers"</a> and "8.2 Request Headers" of the specification "OData Version
|
|
1108
|
+
* 4.0 Part 1: Protocol"
|
|
960
1109
|
* <li> OData V2 request headers as specified in "2.2.5 HTTP Header Fields" of the
|
|
961
1110
|
* specification "OData Version 2 v10.1"
|
|
962
1111
|
* <li> The headers "Content-Id" and "Content-Transfer-Encoding"
|
|
@@ -1347,6 +1496,34 @@ sap.ui.define([
|
|
|
1347
1496
|
throw new Error("Unsupported operation: v4.ODataModel#destroyBindingContext");
|
|
1348
1497
|
};
|
|
1349
1498
|
|
|
1499
|
+
/**
|
|
1500
|
+
* Detach event handler <code>fnFunction</code> from the 'dataReceived' event of this model.
|
|
1501
|
+
*
|
|
1502
|
+
* @param {function} fnFunction The function to call when the event occurs
|
|
1503
|
+
* @param {object} [oListener] Object on which to call the given function
|
|
1504
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
1505
|
+
*
|
|
1506
|
+
* @public
|
|
1507
|
+
* @since 1.105.0
|
|
1508
|
+
*/
|
|
1509
|
+
ODataModel.prototype.detachDataReceived = function (fnFunction, oListener) {
|
|
1510
|
+
return this.detachEvent("dataReceived", fnFunction, oListener);
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Detach event handler <code>fnFunction</code> from the 'dataRequested' event of this model.
|
|
1515
|
+
*
|
|
1516
|
+
* @param {function} fnFunction The function to call when the event occurs
|
|
1517
|
+
* @param {object} [oListener] Object on which to call the given function
|
|
1518
|
+
* @returns {this} <code>this</code> to allow method chaining
|
|
1519
|
+
*
|
|
1520
|
+
* @public
|
|
1521
|
+
* @since 1.106.0
|
|
1522
|
+
*/
|
|
1523
|
+
ODataModel.prototype.detachDataRequested = function (fnFunction, oListener) {
|
|
1524
|
+
return this.detachEvent("dataRequested", fnFunction, oListener);
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1350
1527
|
/**
|
|
1351
1528
|
* Detach event handler <code>fnFunction</code> from the 'sessionTimeout' event of this model.
|
|
1352
1529
|
*
|
|
@@ -1371,6 +1548,47 @@ sap.ui.define([
|
|
|
1371
1548
|
: [];
|
|
1372
1549
|
};
|
|
1373
1550
|
|
|
1551
|
+
/**
|
|
1552
|
+
* Fires the 'dataReceived' event. This function is only called from the property bindings for
|
|
1553
|
+
* late property requests. Bubbling up from the binding goes directly to fireEvent.
|
|
1554
|
+
*
|
|
1555
|
+
* Fire only one event, even when many late properties are requested (and each request calls
|
|
1556
|
+
* this function). Use the first response error.
|
|
1557
|
+
*
|
|
1558
|
+
* @param {Error} [oError]
|
|
1559
|
+
* The error if the request failed
|
|
1560
|
+
*
|
|
1561
|
+
* @private
|
|
1562
|
+
*/
|
|
1563
|
+
ODataModel.prototype.fireDataReceived = function (oError) {
|
|
1564
|
+
if (this.iDataRequestedCount === 0) {
|
|
1565
|
+
throw new Error("Received more data than requested");
|
|
1566
|
+
}
|
|
1567
|
+
this.iDataRequestedCount -= 1;
|
|
1568
|
+
this.oDataReceivedError = this.oDataReceivedError || oError; // first error wins
|
|
1569
|
+
if (this.iDataRequestedCount === 0) {
|
|
1570
|
+
this.fireEvent("dataReceived",
|
|
1571
|
+
this.oDataReceivedError ? {error : this.oDataReceivedError} : {data : {}});
|
|
1572
|
+
this.oDataReceivedError = undefined;
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Fires the 'dataRequested' event. This function is only called from the property bindings for
|
|
1578
|
+
* late property requests. Bubbling up from the binding goes directly to fireEvent.
|
|
1579
|
+
*
|
|
1580
|
+
* Fire only one event, even when many late properties are requested (and each request calls
|
|
1581
|
+
* this function).
|
|
1582
|
+
*
|
|
1583
|
+
* @private
|
|
1584
|
+
*/
|
|
1585
|
+
ODataModel.prototype.fireDataRequested = function () {
|
|
1586
|
+
this.iDataRequestedCount += 1;
|
|
1587
|
+
if (this.iDataRequestedCount === 1) {
|
|
1588
|
+
this.fireEvent("dataRequested");
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1374
1592
|
/**
|
|
1375
1593
|
* Returns the model's bindings.
|
|
1376
1594
|
*
|
|
@@ -1669,12 +1887,14 @@ sap.ui.define([
|
|
|
1669
1887
|
*
|
|
1670
1888
|
* @param {string} sPath - The path
|
|
1671
1889
|
* @returns {number} The index of the key predicate
|
|
1672
|
-
* @throws {Error} If the last segment contains no key predicate
|
|
1890
|
+
* @throws {Error} If no path is given or the last segment contains no key predicate
|
|
1673
1891
|
*
|
|
1674
1892
|
* @private
|
|
1675
1893
|
*/
|
|
1676
1894
|
ODataModel.prototype.getPredicateIndex = function (sPath) {
|
|
1677
|
-
var iPredicateIndex = sPath
|
|
1895
|
+
var iPredicateIndex = sPath
|
|
1896
|
+
? sPath.indexOf("(", sPath.lastIndexOf("/"))
|
|
1897
|
+
: -1;
|
|
1678
1898
|
|
|
1679
1899
|
if (iPredicateIndex < 0 || !sPath.endsWith(")")) {
|
|
1680
1900
|
throw new Error("Not a list context path to an entity: " + sPath);
|
|
@@ -2119,11 +2339,12 @@ sap.ui.define([
|
|
|
2119
2339
|
|
|
2120
2340
|
/**
|
|
2121
2341
|
* Returns a promise for the "canonical path" of the entity for the given context.
|
|
2122
|
-
* According to
|
|
2123
|
-
*
|
|
2124
|
-
*
|
|
2125
|
-
*
|
|
2126
|
-
*
|
|
2342
|
+
* According to <a href=
|
|
2343
|
+
* "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html#canonical-urlurl4.1.1"
|
|
2344
|
+
* >"4.3.1 Canonical URL"</a> of the specification "OData Version 4.0 Part 2: URL Conventions",
|
|
2345
|
+
* this is the "name of the entity set associated with the entity followed by the key predicate
|
|
2346
|
+
* identifying the entity within the collection". Use the canonical path in
|
|
2347
|
+
* {@link sap.ui.core.Element#bindElement} to create an element binding.
|
|
2127
2348
|
*
|
|
2128
2349
|
* @param {sap.ui.model.odata.v4.Context} oEntityContext
|
|
2129
2350
|
* A context in this model which must point to a non-contained OData entity
|
|
@@ -2348,7 +2569,7 @@ sap.ui.define([
|
|
|
2348
2569
|
*
|
|
2349
2570
|
* @param {string} sGroupId
|
|
2350
2571
|
* A valid group ID as specified in {@link sap.ui.model.odata.v4.ODataModel}.
|
|
2351
|
-
* @returns {Promise}
|
|
2572
|
+
* @returns {Promise<undefined>}
|
|
2352
2573
|
* A promise on the outcome of the HTTP request resolving with <code>undefined</code>; it is
|
|
2353
2574
|
* rejected with an error if the batch request itself fails
|
|
2354
2575
|
* @throws {Error}
|
|
@@ -332,7 +332,7 @@ sap.ui.define([
|
|
|
332
332
|
* 1.93.0, string values for "$expand" and "$select" are ignored if they are unchanged;
|
|
333
333
|
* pending changes are ignored if all parameters are unchanged. Since 1.97.0, pending changes
|
|
334
334
|
* are ignored if they relate to a
|
|
335
|
-
* {@link sap.ui.model.odata.v4.Context#
|
|
335
|
+
* {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive} context of this binding.
|
|
336
336
|
* Since 1.98.0, {@link sap.ui.model.odata.v4.Context#isTransient transient} contexts
|
|
337
337
|
* of a {@link #getRootBinding root binding} do not count as pending changes.
|
|
338
338
|
*
|
|
@@ -416,7 +416,7 @@ sap.ui.define([
|
|
|
416
416
|
*
|
|
417
417
|
* @abstract
|
|
418
418
|
* @function
|
|
419
|
-
* @name sap.ui.model.odata.v4.
|
|
419
|
+
* @name sap.ui.model.odata.v4.ODataParentBinding#checkKeepAlive
|
|
420
420
|
* @private
|
|
421
421
|
* @see sap.ui.model.odata.v4.Context#setKeepAlive
|
|
422
422
|
*/
|
|
@@ -564,17 +564,22 @@ sap.ui.define([
|
|
|
564
564
|
/**
|
|
565
565
|
* Creates a promise for the refresh to be resolved by the binding's GET request.
|
|
566
566
|
*
|
|
567
|
-
* @
|
|
567
|
+
* @param {boolean} bPreventBubbling
|
|
568
|
+
* Whether the dataRequested and dataReceived events related to the refresh must not be
|
|
569
|
+
* bubbled up to the model
|
|
570
|
+
* @returns {Promise} The created promise
|
|
568
571
|
*
|
|
572
|
+
* @see #isRefreshWithoutBubbling
|
|
569
573
|
* @see #resolveRefreshPromise
|
|
570
574
|
* @private
|
|
571
575
|
*/
|
|
572
|
-
ODataParentBinding.prototype.createRefreshPromise = function () {
|
|
576
|
+
ODataParentBinding.prototype.createRefreshPromise = function (bPreventBubbling) {
|
|
573
577
|
var oPromise, fnResolve;
|
|
574
578
|
|
|
575
579
|
oPromise = new Promise(function (resolve) {
|
|
576
580
|
fnResolve = resolve;
|
|
577
581
|
});
|
|
582
|
+
oPromise.$preventBubbling = bPreventBubbling;
|
|
578
583
|
oPromise.$resolve = fnResolve;
|
|
579
584
|
this.oRefreshPromise = oPromise;
|
|
580
585
|
return oPromise;
|
|
@@ -599,11 +604,11 @@ sap.ui.define([
|
|
|
599
604
|
* @param {boolean} [bDoNotRequestCount]
|
|
600
605
|
* Whether not to request the new count from the server; useful in case of
|
|
601
606
|
* {@link sap.ui.model.odata.v4.Context#replaceWith} where it is known that the count remains
|
|
602
|
-
* unchanged;
|
|
603
|
-
* @param {function} fnCallback
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
* entity and
|
|
607
|
+
* unchanged; only relevant for the list binding
|
|
608
|
+
* @param {function} [fnCallback]
|
|
609
|
+
* A function which is called immediately when an entity has been deleted from the cache, or
|
|
610
|
+
* when it was re-inserted due to an error; only used in the list binding; the index of the
|
|
611
|
+
* entity and an offset (-1 for deletion, 1 for re-insertion) are passed as parameter
|
|
607
612
|
* @returns {sap.ui.base.SyncPromise}
|
|
608
613
|
* A promise which is resolved without a result in case of success, or rejected with an
|
|
609
614
|
* instance of <code>Error</code> in case of failure; returns <code>undefined</code> if the
|
|
@@ -720,8 +725,8 @@ sap.ui.define([
|
|
|
720
725
|
|
|
721
726
|
if (bDependsOnOperation && !sResolvedChildPath.includes("/$Parameter/")
|
|
722
727
|
|| this.getRootBinding().isSuspended()
|
|
723
|
-
||
|
|
724
|
-
// With
|
|
728
|
+
|| _Helper.isDataAggregation(this.mParameters)) {
|
|
729
|
+
// With data aggregation, no auto-$expand/$select is needed, but the child may still use
|
|
725
730
|
// the parent's cache
|
|
726
731
|
// Note: Operation bindings do not support auto-$expand/$select yet
|
|
727
732
|
return SyncPromise.resolve(sResolvedChildPath);
|
|
@@ -1080,6 +1085,19 @@ sap.ui.define([
|
|
|
1080
1085
|
return false;
|
|
1081
1086
|
};
|
|
1082
1087
|
|
|
1088
|
+
/**
|
|
1089
|
+
* Whether the dataRequested and dataReceived events related to the refresh must not be bubbled
|
|
1090
|
+
* up to the model.
|
|
1091
|
+
*
|
|
1092
|
+
* @returns {boolean} Whether to prevent bubbling
|
|
1093
|
+
*
|
|
1094
|
+
* @private
|
|
1095
|
+
* @see #createRefreshPromise
|
|
1096
|
+
*/
|
|
1097
|
+
ODataParentBinding.prototype.isRefreshWithoutBubbling = function () {
|
|
1098
|
+
return this.oRefreshPromise && this.oRefreshPromise.$preventBubbling;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1083
1101
|
/**
|
|
1084
1102
|
* @override
|
|
1085
1103
|
* @see sap.ui.model.odata.v4.ODataBinding#onDelete
|
|
@@ -1332,7 +1350,7 @@ sap.ui.define([
|
|
|
1332
1350
|
* Suspends this binding. A suspended binding does not fire change events nor does it trigger
|
|
1333
1351
|
* data service requests. Call {@link #resume} to resume the binding. Before 1.53.0, this method
|
|
1334
1352
|
* was not supported and threw an error. Since 1.97.0, pending changes are ignored if they
|
|
1335
|
-
* relate to a {@link sap.ui.model.odata.v4.Context#
|
|
1353
|
+
* relate to a {@link sap.ui.model.odata.v4.Context#isKeepAlive kept-alive} context of this
|
|
1336
1354
|
* binding. Since 1.98.0, {@link sap.ui.model.odata.v4.Context#isTransient transient} contexts
|
|
1337
1355
|
* of a {@link #getRootBinding root binding} do not count as pending changes.
|
|
1338
1356
|
*
|
|
@@ -1417,8 +1435,8 @@ sap.ui.define([
|
|
|
1417
1435
|
* @override
|
|
1418
1436
|
* @see sap.ui.model.odata.v4.ODataBinding#visitSideEffects
|
|
1419
1437
|
*/
|
|
1420
|
-
ODataParentBinding.prototype.visitSideEffects = function (sGroupId, aPaths, oContext,
|
|
1421
|
-
|
|
1438
|
+
ODataParentBinding.prototype.visitSideEffects = function (sGroupId, aPaths, oContext, aPromises,
|
|
1439
|
+
sPrefix) {
|
|
1422
1440
|
var aDependentBindings = oContext
|
|
1423
1441
|
? this.oModel.getDependentBindings(oContext)
|
|
1424
1442
|
: this.getDependentBindings();
|
|
@@ -1435,11 +1453,8 @@ sap.ui.define([
|
|
|
1435
1453
|
aPromises.push(
|
|
1436
1454
|
oDependentBinding.requestSideEffects(sGroupId, aStrippedPaths));
|
|
1437
1455
|
}
|
|
1438
|
-
} else if (mNavigationPropertyPaths[sPath]) {
|
|
1439
|
-
aPromises.push(oDependentBinding.refreshInternal("", sGroupId));
|
|
1440
1456
|
} else {
|
|
1441
|
-
oDependentBinding.visitSideEffects(sGroupId, aPaths, null,
|
|
1442
|
-
mNavigationPropertyPaths, aPromises, sPath);
|
|
1457
|
+
oDependentBinding.visitSideEffects(sGroupId, aPaths, null, aPromises, sPath);
|
|
1443
1458
|
}
|
|
1444
1459
|
});
|
|
1445
1460
|
};
|