@openui5/sap.ui.core 1.139.0 → 1.140.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/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.mobile.js +0 -8
- 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/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/security/URLListValidator.js +7 -3
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +3 -3
- package/src/sap/ui/base/BindingParser.js +1 -1
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/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 +2 -2
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- 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 +2 -11
- 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 +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +15 -108
- 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 +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Theming.js +145 -76
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_ar.properties +26 -11
- package/src/sap/ui/core/messagebundle_bg.properties +21 -6
- package/src/sap/ui/core/messagebundle_ca.properties +24 -9
- package/src/sap/ui/core/messagebundle_cnr.properties +23 -8
- package/src/sap/ui/core/messagebundle_cs.properties +24 -9
- package/src/sap/ui/core/messagebundle_cy.properties +24 -9
- package/src/sap/ui/core/messagebundle_da.properties +21 -6
- package/src/sap/ui/core/messagebundle_de.properties +16 -1
- package/src/sap/ui/core/messagebundle_el.properties +26 -11
- package/src/sap/ui/core/messagebundle_en.properties +24 -9
- package/src/sap/ui/core/messagebundle_en_GB.properties +24 -9
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +24 -9
- package/src/sap/ui/core/messagebundle_es.properties +21 -6
- package/src/sap/ui/core/messagebundle_es_MX.properties +24 -9
- package/src/sap/ui/core/messagebundle_et.properties +31 -16
- package/src/sap/ui/core/messagebundle_fi.properties +20 -5
- package/src/sap/ui/core/messagebundle_fr.properties +22 -7
- package/src/sap/ui/core/messagebundle_fr_CA.properties +20 -5
- package/src/sap/ui/core/messagebundle_hi.properties +24 -9
- package/src/sap/ui/core/messagebundle_hr.properties +20 -5
- package/src/sap/ui/core/messagebundle_hu.properties +23 -8
- package/src/sap/ui/core/messagebundle_id.properties +20 -5
- package/src/sap/ui/core/messagebundle_it.properties +23 -8
- package/src/sap/ui/core/messagebundle_iw.properties +21 -6
- package/src/sap/ui/core/messagebundle_ja.properties +19 -4
- package/src/sap/ui/core/messagebundle_kk.properties +22 -7
- package/src/sap/ui/core/messagebundle_ko.properties +20 -5
- package/src/sap/ui/core/messagebundle_lt.properties +20 -5
- package/src/sap/ui/core/messagebundle_lv.properties +20 -5
- package/src/sap/ui/core/messagebundle_mk.properties +25 -10
- package/src/sap/ui/core/messagebundle_ms.properties +24 -9
- package/src/sap/ui/core/messagebundle_nl.properties +22 -7
- package/src/sap/ui/core/messagebundle_no.properties +22 -7
- package/src/sap/ui/core/messagebundle_pl.properties +19 -4
- package/src/sap/ui/core/messagebundle_pt.properties +18 -3
- package/src/sap/ui/core/messagebundle_pt_PT.properties +18 -3
- package/src/sap/ui/core/messagebundle_ro.properties +22 -7
- package/src/sap/ui/core/messagebundle_ru.properties +19 -4
- package/src/sap/ui/core/messagebundle_sh.properties +23 -8
- package/src/sap/ui/core/messagebundle_sk.properties +23 -8
- package/src/sap/ui/core/messagebundle_sl.properties +20 -5
- package/src/sap/ui/core/messagebundle_sr.properties +23 -8
- package/src/sap/ui/core/messagebundle_sv.properties +23 -8
- package/src/sap/ui/core/messagebundle_th.properties +20 -5
- package/src/sap/ui/core/messagebundle_tr.properties +20 -5
- package/src/sap/ui/core/messagebundle_uk.properties +22 -7
- package/src/sap/ui/core/messagebundle_vi.properties +18 -3
- package/src/sap/ui/core/messagebundle_zh_CN.properties +24 -9
- package/src/sap/ui/core/messagebundle_zh_TW.properties +20 -5
- 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 +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Route.js +1 -1
- package/src/sap/ui/core/routing/Router.js +19 -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/themes/base/base.less +20 -20
- package/src/sap/ui/core/themes/base/shared.less +4 -1
- package/src/sap/ui/core/themes/base/skeleton.less +3 -3
- package/src/sap/ui/core/theming/Parameters.js +717 -755
- package/src/sap/ui/core/theming/ThemeHelper.js +0 -77
- package/src/sap/ui/core/theming/ThemeManager.js +535 -526
- 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 +93 -45
- package/src/sap/ui/core/webc/WebComponentMetadata.js +40 -6
- 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/dom/includeStylesheet.js +4 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +7 -7
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/json/TypedJSONContext.js +16 -0
- package/src/sap/ui/model/json/TypedJSONModel.js +16 -0
- 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 +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +4 -4
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +9 -8
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.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 +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataModel.js +41 -59
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +82 -60
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +35 -20
- package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +32 -5
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +11 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +7 -9
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +12 -12
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +16 -6
- 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 +19 -5
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -2
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/TestUtils.js +27 -15
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/Utils.js +6 -6
- package/src/sap/ui/test/opaQunit.js +3 -0
- package/src/sap/ui/thirdparty/qunit-2.js +4 -1
- package/src/sap/ui/util/Mobile.js +0 -9
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +1 -1
- package/ui5.yaml +0 -1
- package/src/sap/ui/core/plugin/LessSupport.js +0 -542
|
@@ -205,12 +205,15 @@ sap.ui.define([
|
|
|
205
205
|
return (bIsProperty || !bInsideExpand
|
|
206
206
|
|| Object.keys(mAggregatedQueryOptions).every(function (sName) {
|
|
207
207
|
return sName in mQueryOptions0 || sName === "$count" || sName === "$expand"
|
|
208
|
-
|| sName === "$select";
|
|
208
|
+
|| sName === "$select" || sName === "$top";
|
|
209
209
|
}))
|
|
210
210
|
// merge $count, $expand and $select; check that all others equal the aggregate
|
|
211
211
|
&& Object.keys(mQueryOptions0).every(function (sName) {
|
|
212
212
|
switch (sName) {
|
|
213
213
|
case "$count":
|
|
214
|
+
if (mQueryOptions0.$top === 0 && mAggregatedQueryOptions.$select) {
|
|
215
|
+
return true; // see below: @see mCountQueryOptions => ignore
|
|
216
|
+
}
|
|
214
217
|
if (mQueryOptions0.$count) {
|
|
215
218
|
mAggregatedQueryOptions.$count = true;
|
|
216
219
|
}
|
|
@@ -220,7 +223,22 @@ sap.ui.define([
|
|
|
220
223
|
return Object.keys(mQueryOptions0.$expand).every(mergeExpandPath);
|
|
221
224
|
case "$select":
|
|
222
225
|
mAggregatedQueryOptions.$select ??= [];
|
|
226
|
+
if (mAggregatedQueryOptions.$top === 0) {
|
|
227
|
+
// Note: @see mCountQueryOptions => drop
|
|
228
|
+
// (w/o $top, all data is ready anyway, no $count needed)
|
|
229
|
+
delete mAggregatedQueryOptions.$count;
|
|
230
|
+
// ($select needs data and thus contradicts $top : 0)
|
|
231
|
+
delete mAggregatedQueryOptions.$top;
|
|
232
|
+
}
|
|
223
233
|
return mQueryOptions0.$select.every(mergeSelectPath);
|
|
234
|
+
case "$top":
|
|
235
|
+
if (mQueryOptions0.$top !== 0 || !mQueryOptions0.$count) {
|
|
236
|
+
return false; // not mCountQueryOptions => unsupported
|
|
237
|
+
}
|
|
238
|
+
if (!mAggregatedQueryOptions.$select) {
|
|
239
|
+
mAggregatedQueryOptions.$top = 0;
|
|
240
|
+
} // else: see above: @see mCountQueryOptions => ignore
|
|
241
|
+
return true;
|
|
224
242
|
default:
|
|
225
243
|
if (bAdd) {
|
|
226
244
|
mAggregatedQueryOptions[sName] = mQueryOptions0[sName];
|
|
@@ -848,6 +866,7 @@ sap.ui.define([
|
|
|
848
866
|
];
|
|
849
867
|
oCanUseCachePromise = SyncPromise.all(aPromises).then(function (aResult) {
|
|
850
868
|
var mChildQueryOptions = aResult[2] || {},
|
|
869
|
+
mCountQueryOptions,
|
|
851
870
|
mWrappedChildQueryOptions,
|
|
852
871
|
mLocalQueryOptions = aResult[0],
|
|
853
872
|
oProperty = aResult[1],
|
|
@@ -871,7 +890,14 @@ sap.ui.define([
|
|
|
871
890
|
mChildQueryOptions, bIsProperty);
|
|
872
891
|
}
|
|
873
892
|
|
|
874
|
-
if (
|
|
893
|
+
if (oProperty?.["@$ui5.$count"]
|
|
894
|
+
&& oContext !== oContext.getBinding().getHeaderContext?.()) {
|
|
895
|
+
mCountQueryOptions = {
|
|
896
|
+
$expand : {
|
|
897
|
+
[sChildPath.slice(0, -7)] : {$count : true, $top : 0}
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
} else if (bDependsOnOperation || sReducedChildMetaPath === "$count"
|
|
875
901
|
|| sReducedChildMetaPath.endsWith("/$count")
|
|
876
902
|
|| sReducedChildMetaPath === "$selectionCount") {
|
|
877
903
|
return sReducedPath;
|
|
@@ -892,9 +918,10 @@ sap.ui.define([
|
|
|
892
918
|
if (sReducedChildMetaPath === ""
|
|
893
919
|
|| oProperty
|
|
894
920
|
&& (oProperty.$kind === "Property" || oProperty.$kind === "NavigationProperty")) {
|
|
895
|
-
mWrappedChildQueryOptions =
|
|
896
|
-
|
|
897
|
-
|
|
921
|
+
mWrappedChildQueryOptions = mCountQueryOptions
|
|
922
|
+
?? _Helper.wrapChildQueryOptions(sBaseMetaPath,
|
|
923
|
+
sReducedChildMetaPath, mChildQueryOptions,
|
|
924
|
+
that.oModel.oInterface.fetchMetadata);
|
|
898
925
|
if (mWrappedChildQueryOptions) {
|
|
899
926
|
return that.aggregateQueryOptions(mWrappedChildQueryOptions, sBaseMetaPath,
|
|
900
927
|
bCacheImmutable, bIsProperty)
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @mixes sap.ui.model.odata.v4.ODataBinding
|
|
43
43
|
* @public
|
|
44
44
|
* @since 1.37.0
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.140.0
|
|
46
46
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
47
47
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
48
48
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -1041,6 +1041,13 @@ sap.ui.define([
|
|
|
1041
1041
|
|
|
1042
1042
|
if (sPath === "$count") {
|
|
1043
1043
|
if (this.oCountPromise) {
|
|
1044
|
+
if (this.oAggregation.hierarchyQualifier) {
|
|
1045
|
+
// "$count" cannot be used as change listener path because e.g. #_delete calls
|
|
1046
|
+
// indirectly _Helper.addCount with this.mChangeListeners to update the count of
|
|
1047
|
+
// the root nodes. This count must not be propagated to the listeners. So use a
|
|
1048
|
+
// name similar to "$count" which never conflicts with any other valid path.
|
|
1049
|
+
this.registerChangeListener("./$count", oListener);
|
|
1050
|
+
}
|
|
1044
1051
|
return this.oCountPromise;
|
|
1045
1052
|
}
|
|
1046
1053
|
if (this.oAggregation.hierarchyQualifier || this.oAggregation.groupLevels.length) {
|
|
@@ -1940,7 +1947,10 @@ sap.ui.define([
|
|
|
1940
1947
|
+ this.oRequestor.buildQueryString(/*sMetaPath*/null, mQueryOptions);
|
|
1941
1948
|
|
|
1942
1949
|
return this.oRequestor.request("GET", sResourcePath, oGroupLock.getUnlockedCopy())
|
|
1943
|
-
.then(
|
|
1950
|
+
.then((iCount) => { // Note: iCount is already of type number here
|
|
1951
|
+
fnResolve(iCount);
|
|
1952
|
+
_Helper.fireChange(this.mChangeListeners, "./$count", iCount);
|
|
1953
|
+
})
|
|
1944
1954
|
.catch((oError) => {
|
|
1945
1955
|
this.oCountPromise.$restore();
|
|
1946
1956
|
throw oError;
|
|
@@ -1522,19 +1522,17 @@ sap.ui.define([
|
|
|
1522
1522
|
mQueryOptions.$select.push(sMessagesPath);
|
|
1523
1523
|
bKeepReportedMessagesPath = true;
|
|
1524
1524
|
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
delete mQueryOptions.$search;
|
|
1531
|
-
sReadUrl += that.oRequestor.buildQueryString(that.sMetaPath, mQueryOptions, false,
|
|
1532
|
-
that.bSortExpandSelect);
|
|
1525
|
+
const mMergeableQueryOptions = _Helper.extractMergeableQueryOptions(mQueryOptions);
|
|
1526
|
+
mMergeableQueryOptions.$$sortIfMerged = true;
|
|
1527
|
+
sReadUrl += that.oRequestor.buildQueryString(that.sMetaPath, mQueryOptions,
|
|
1528
|
+
// drop system query options to allow merging with late property requests
|
|
1529
|
+
/*bDropSystemQueryOptions*/true, that.bSortExpandSelect);
|
|
1533
1530
|
|
|
1534
1531
|
that.bSentRequest = true;
|
|
1535
1532
|
return SyncPromise.all([
|
|
1536
1533
|
that.oRequestor
|
|
1537
|
-
.request("GET", sReadUrl, oGroupLock, undefined, undefined, fnDataRequested
|
|
1534
|
+
.request("GET", sReadUrl, oGroupLock, undefined, undefined, fnDataRequested,
|
|
1535
|
+
undefined, undefined, undefined, undefined, mMergeableQueryOptions),
|
|
1538
1536
|
that.fetchTypes()
|
|
1539
1537
|
]).then(function (aResult) {
|
|
1540
1538
|
var oElement = aResult[0];
|
|
@@ -303,7 +303,8 @@ sap.ui.define([
|
|
|
303
303
|
/**
|
|
304
304
|
* Builds a query string from the given parameter map. Takes care of encoding, but ensures
|
|
305
305
|
* that the characters "$", "(", ")", ";" and "=" are not encoded, so that OData queries
|
|
306
|
-
* remain readable.
|
|
306
|
+
* remain readable. A parameter starting with "$$" is meant to be internal and does not
|
|
307
|
+
* become part of the query string.
|
|
307
308
|
*
|
|
308
309
|
* ';' is not encoded although RFC 1866 encourages its usage as separator between query
|
|
309
310
|
* parameters. However OData Version 4.0 Part 2 specifies that only '&' is a valid
|
|
@@ -331,7 +332,7 @@ sap.ui.define([
|
|
|
331
332
|
return "";
|
|
332
333
|
}
|
|
333
334
|
|
|
334
|
-
aKeys = Object.keys(mParameters);
|
|
335
|
+
aKeys = Object.keys(mParameters).filter((sKey) => !sKey.startsWith("$$"));
|
|
335
336
|
if (aKeys.length === 0) {
|
|
336
337
|
return "";
|
|
337
338
|
}
|
|
@@ -1018,21 +1019,20 @@ sap.ui.define([
|
|
|
1018
1019
|
* them as a new map while replacing their value with "~" in the old map.
|
|
1019
1020
|
*
|
|
1020
1021
|
* @param {object} mQueryOptions - The original query options to be MODIFIED
|
|
1021
|
-
* @returns {object} The extracted query options
|
|
1022
|
+
* @returns {object} The extracted query options in the same order
|
|
1022
1023
|
*
|
|
1023
1024
|
* @public
|
|
1024
1025
|
*/
|
|
1025
1026
|
extractMergeableQueryOptions : function (mQueryOptions) {
|
|
1026
1027
|
var mExtractedQueryOptions = {};
|
|
1027
1028
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1029
|
+
// ensure to keep the order of the query options
|
|
1030
|
+
Object.keys(mQueryOptions).forEach(function (sKey) {
|
|
1031
|
+
if (sKey === "$expand" || sKey === "$select") {
|
|
1032
|
+
mExtractedQueryOptions[sKey] = mQueryOptions[sKey];
|
|
1033
|
+
mQueryOptions[sKey] = "~";
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
1036
|
|
|
1037
1037
|
return mExtractedQueryOptions;
|
|
1038
1038
|
},
|
|
@@ -2222,7 +2222,7 @@ sap.ui.define([
|
|
|
2222
2222
|
// The safe integers consist of all integers from -(2^53 - 1) inclusive to 2^53 - 1
|
|
2223
2223
|
// inclusive.
|
|
2224
2224
|
// 2^53 - 1 = 9007199254740991
|
|
2225
|
-
return iNumber <=
|
|
2225
|
+
return iNumber <= Number.MAX_SAFE_INTEGER && Math.floor(iNumber) === iNumber;
|
|
2226
2226
|
},
|
|
2227
2227
|
|
|
2228
2228
|
/**
|
|
@@ -192,11 +192,14 @@ sap.ui.define([
|
|
|
192
192
|
* @param {string} sResourcePath The resource path with possible query options and placeholders
|
|
193
193
|
* @param {string} sMetaPath The absolute meta path matching the resource path
|
|
194
194
|
* @param {object} mQueryOptions Query options to add to the resource path
|
|
195
|
+
* @param {boolean} [bSortSystemQueryOptions]
|
|
196
|
+
* Whether system query options are sorted alphabetically and moved to the query string's end
|
|
195
197
|
* @returns {string} The resource path with the query options
|
|
196
198
|
*
|
|
197
199
|
* @private
|
|
198
200
|
*/
|
|
199
|
-
_Requestor.prototype.addQueryString = function (sResourcePath, sMetaPath, mQueryOptions
|
|
201
|
+
_Requestor.prototype.addQueryString = function (sResourcePath, sMetaPath, mQueryOptions,
|
|
202
|
+
bSortSystemQueryOptions) {
|
|
200
203
|
var sQueryString;
|
|
201
204
|
|
|
202
205
|
mQueryOptions = this.convertQueryOptions(sMetaPath, mQueryOptions, false, true);
|
|
@@ -209,7 +212,7 @@ sap.ui.define([
|
|
|
209
212
|
return _Helper.encodePair(sOption, sValue);
|
|
210
213
|
});
|
|
211
214
|
|
|
212
|
-
sQueryString = _Helper.buildQuery(mQueryOptions);
|
|
215
|
+
sQueryString = _Helper.buildQuery(mQueryOptions, bSortSystemQueryOptions);
|
|
213
216
|
if (!sQueryString) {
|
|
214
217
|
return sResourcePath;
|
|
215
218
|
}
|
|
@@ -1285,6 +1288,9 @@ sap.ui.define([
|
|
|
1285
1288
|
if (oCandidate.$mergeRequests && oRequest.$mergeRequests) {
|
|
1286
1289
|
oCandidate.$mergeRequests(oRequest.$mergeRequests());
|
|
1287
1290
|
}
|
|
1291
|
+
oCandidate.$sortSystemQueryOptions
|
|
1292
|
+
||= oCandidate.$queryOptions.$$sortIfMerged
|
|
1293
|
+
|| oRequest.$queryOptions.$$sortIfMerged;
|
|
1288
1294
|
|
|
1289
1295
|
return true;
|
|
1290
1296
|
}
|
|
@@ -1302,10 +1308,12 @@ sap.ui.define([
|
|
|
1302
1308
|
var mQueryOptions = oRequest.$queryOptions;
|
|
1303
1309
|
|
|
1304
1310
|
if (mQueryOptions) {
|
|
1305
|
-
if
|
|
1311
|
+
// if there was no $select, don't introduce one
|
|
1312
|
+
if (mQueryOptions.$expand && mQueryOptions.$select?.length === 0) {
|
|
1306
1313
|
mQueryOptions.$select = Object.keys(mQueryOptions.$expand).sort().slice(0, 1);
|
|
1307
1314
|
}
|
|
1308
|
-
oRequest.url = that.addQueryString(oRequest.url, oRequest.$metaPath, mQueryOptions
|
|
1315
|
+
oRequest.url = that.addQueryString(oRequest.url, oRequest.$metaPath, mQueryOptions,
|
|
1316
|
+
oRequest.$sortSystemQueryOptions);
|
|
1309
1317
|
}
|
|
1310
1318
|
});
|
|
1311
1319
|
aResultingRequests.iChangeSet = aRequests.iChangeSet;
|
|
@@ -1853,10 +1861,12 @@ sap.ui.define([
|
|
|
1853
1861
|
* contain $expand
|
|
1854
1862
|
* @param {any} [vOwner]
|
|
1855
1863
|
* An additional precondition for the merging of GET requests: the owner must be identical.
|
|
1864
|
+
* This is probably relevant when using parameter <code>fnMergeRequests</code> to ensure both
|
|
1865
|
+
* functions work well together.
|
|
1856
1866
|
* @param {function(string[]):string[]} [fnMergeRequests]
|
|
1857
1867
|
* Function which is called during merging of GET or PATCH requests. If a merged request has a
|
|
1858
|
-
* function given, this function will be called and its return value is
|
|
1859
|
-
*
|
|
1868
|
+
* function given, this function will be called and its return value is given to the one
|
|
1869
|
+
* remaining request's function as a parameter. See also <code>vOwner</code>.
|
|
1860
1870
|
* @returns {Promise}
|
|
1861
1871
|
* A promise on the outcome of the HTTP request; it will be rejected with an error having the
|
|
1862
1872
|
* property <code>canceled = true</code> instead of sending a request if
|
|
@@ -227,7 +227,7 @@ sap.ui.define([
|
|
|
227
227
|
*
|
|
228
228
|
* @extends sap.ui.model.Model
|
|
229
229
|
* @public
|
|
230
|
-
* @version 1.
|
|
230
|
+
* @version 1.140.0
|
|
231
231
|
*/
|
|
232
232
|
var ResourceModel = Model.extend("sap.ui.model.resource.ResourceModel", /** @lends sap.ui.model.resource.ResourceModel.prototype */ {
|
|
233
233
|
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @extends sap.ui.model.SimpleType
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.140.0
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.Date
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.140.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.DateInterval
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.140.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.Date
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.140.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.DateInterval
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.140.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
|
|
@@ -49,7 +49,7 @@ sap.ui.define([
|
|
|
49
49
|
*
|
|
50
50
|
*
|
|
51
51
|
* @author SAP SE
|
|
52
|
-
* @version 1.
|
|
52
|
+
* @version 1.140.0
|
|
53
53
|
*
|
|
54
54
|
* @public
|
|
55
55
|
* @param {object} [oFormatOptions]
|
|
@@ -61,9 +61,16 @@ sap.ui.define([
|
|
|
61
61
|
* {@link sap.ui.model.Binding#supportsIgnoreMessages}, and the corresponding binding
|
|
62
62
|
* parameter is not set manually.
|
|
63
63
|
* @param {object} [oFormatOptions.decimals]
|
|
64
|
-
* The number of decimals to be used for formatting the
|
|
65
|
-
*
|
|
66
|
-
*
|
|
64
|
+
* The number of decimals to be used for formatting the numerical value of the unit composite type; if none of the
|
|
65
|
+
* format options <code>maxFractionDigits</code>, <code>minFractionDigits</code> or <code>decimals</code> are
|
|
66
|
+
* given, the following defaults apply:
|
|
67
|
+
* <ul>
|
|
68
|
+
* <li> <b>0</b> if the numerical value is of an OData integer type, i.e. {@link sap.ui.model.odata.type.Int}
|
|
69
|
+
* or {@link sap.ui.model.odata.type.Int64} </li>
|
|
70
|
+
* <li> the <b>scale constraint of the numerical value's type</b> if this type is
|
|
71
|
+
* {@link sap.ui.model.odata.type.Decimal} and the scale is not "variable" </li>
|
|
72
|
+
* <li> <b>3</b> otherwise </li>
|
|
73
|
+
* </ul>
|
|
67
74
|
* @param {boolean} [oFormatOptions.preserveDecimals=true]
|
|
68
75
|
* By default decimals are preserved, unless <code>oFormatOptions.style</code> is given as
|
|
69
76
|
* "short" or "long"; since 1.89.0
|
|
@@ -324,9 +331,16 @@ sap.ui.define([
|
|
|
324
331
|
* @since 1.120.0
|
|
325
332
|
*/
|
|
326
333
|
Unit.prototype.processPartTypes = function (aPartTypes) {
|
|
334
|
+
this.iScale = undefined; // type of quantity binding part may be changed => reset scale
|
|
327
335
|
const oQuantityType = aPartTypes[0];
|
|
336
|
+
if (oQuantityType?.isA(["sap.ui.model.odata.type.Int", "sap.ui.model.odata.type.Int64"])) {
|
|
337
|
+
this.iScale = 0;
|
|
338
|
+
}
|
|
328
339
|
if (oQuantityType?.isA("sap.ui.model.odata.type.Decimal")) {
|
|
329
|
-
|
|
340
|
+
const iScale = oQuantityType.oConstraints?.scale;
|
|
341
|
+
if (iScale !== Infinity) { // like in Decimal type, do not propagate scale "variable" to formatter
|
|
342
|
+
this.iScale = iScale || 0;
|
|
343
|
+
}
|
|
330
344
|
}
|
|
331
345
|
};
|
|
332
346
|
|
|
@@ -53,7 +53,7 @@ sap.ui.define(['sap/ui/core/Core', "sap/ui/VersionInfo", "sap/ui/core/Lib"],
|
|
|
53
53
|
* @namespace
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.140.0
|
|
57
57
|
*
|
|
58
58
|
* @public
|
|
59
59
|
* @since 1.48.0
|
|
@@ -63,7 +63,6 @@ sap.ui.define(['sap/ui/core/Core', "sap/ui/VersionInfo", "sap/ui/core/Lib"],
|
|
|
63
63
|
|
|
64
64
|
var aControlsThatCannotBeRenderedGenerically = [
|
|
65
65
|
"sap.chart.Chart",
|
|
66
|
-
"sap.m.ColumnHeaderPopover",
|
|
67
66
|
"sap.m.FacetFilterItem",
|
|
68
67
|
"sap.m.internal.NumericInput",
|
|
69
68
|
"sap.m.IconTabBarSelectList",
|
|
@@ -19,6 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
|
|
20
20
|
var rBatch = /\/\$batch($|\?)/,
|
|
21
21
|
rContentId = /(?:^|\r\n)Content-Id\s*:\s*(\S+)/i,
|
|
22
|
+
rContentIdReference = / \$([^ ?\/]+)/,
|
|
22
23
|
rEndsWithJSON = /\.json$/i,
|
|
23
24
|
rEndsWithXML = /\.xml$/i,
|
|
24
25
|
rHeaderLine = /^(.*)?:\s*(.*)$/,
|
|
@@ -445,13 +446,14 @@ sap.ui.define([
|
|
|
445
446
|
* extension unless specified. This has precedence over <code>message</code>.
|
|
446
447
|
* </ul>
|
|
447
448
|
* @param {object[]} [aRegExps]
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
449
|
+
* An array containing regular expressions in the regExp property and the corresponding
|
|
450
|
+
* response(s) objects in the response property. If no match for a request was found in
|
|
451
|
+
* the normal fixture, the regular expressions are checked. The response object looks
|
|
452
|
+
* exactly the same as in the fixture and may additionally contain a method
|
|
453
|
+
* <code>buildResponse(aMatch, oResponse, oRequest, sReferencedMessage)</code> which gets
|
|
454
|
+
* passed the match object, the response, the request, and optionally the referenced
|
|
455
|
+
* response message in case of Content-ID referencing in order to allow modification of
|
|
456
|
+
* the response before sending.
|
|
455
457
|
* @param {string} [sServiceUrl]
|
|
456
458
|
* The service URL which determines a prefix for all requests the fake server responds to;
|
|
457
459
|
* it responds with an error for requests not given in the fixture, except DELETE, MERGE,
|
|
@@ -689,9 +691,11 @@ sap.ui.define([
|
|
|
689
691
|
* @param {boolean} [bTry]
|
|
690
692
|
* Whether to do nothing and return <code>undefined</code> if no fixture matches; also
|
|
691
693
|
* prevents defaulting for non-GET requests
|
|
694
|
+
* @param {object} [mContentId2Response]
|
|
695
|
+
* A map which refers a content ID to a response message while processing a batch
|
|
692
696
|
* @returns {object|undefined} The response object or <code>undefined</code>
|
|
693
697
|
*/
|
|
694
|
-
function getResponseFromFixture(oRequest, sContentId, bTry) {
|
|
698
|
+
function getResponseFromFixture(oRequest, sContentId, bTry, mContentId2Response) {
|
|
695
699
|
var iAlternative,
|
|
696
700
|
oMatch = getMatchingResponse(oRequest.method, oRequest.url),
|
|
697
701
|
oResponse,
|
|
@@ -708,7 +712,13 @@ sap.ui.define([
|
|
|
708
712
|
if (typeof oResponse.buildResponse === "function") {
|
|
709
713
|
oResponse = merge({}, oResponse);
|
|
710
714
|
try {
|
|
711
|
-
|
|
715
|
+
const aMatches = rContentIdReference.exec(oRequest.requestLine);
|
|
716
|
+
let sReferencedMessage;
|
|
717
|
+
if (aMatches) {
|
|
718
|
+
sReferencedMessage = mContentId2Response[aMatches[1]];
|
|
719
|
+
}
|
|
720
|
+
oResponse.buildResponse(oMatch.match, oResponse, oRequest,
|
|
721
|
+
sReferencedMessage);
|
|
712
722
|
} catch (oError) {
|
|
713
723
|
oResponse = error(500, oRequest, oError);
|
|
714
724
|
}
|
|
@@ -758,6 +768,9 @@ sap.ui.define([
|
|
|
758
768
|
oResponse.headers = jQuery.extend({}, getODataHeaders(oRequest), oResponse.headers);
|
|
759
769
|
if (sContentId && oResponse.code < 300) {
|
|
760
770
|
oResponse.contentId = sContentId;
|
|
771
|
+
if (mContentId2Response) {
|
|
772
|
+
mContentId2Response[sContentId] = oResponse.message;
|
|
773
|
+
}
|
|
761
774
|
}
|
|
762
775
|
return oResponse;
|
|
763
776
|
}
|
|
@@ -767,14 +780,13 @@ sap.ui.define([
|
|
|
767
780
|
*
|
|
768
781
|
* @param {string} sServiceBase The service base URL
|
|
769
782
|
* @param {string} sBody The body
|
|
783
|
+
* @param {object} [oBatch] allows to keep state while processing a batch
|
|
770
784
|
* @returns {object} An object with the properties boundary and parts
|
|
771
785
|
*/
|
|
772
|
-
function multipart(sServiceBase, sBody) {
|
|
773
|
-
var sBoundary;
|
|
774
|
-
|
|
786
|
+
function multipart(sServiceBase, sBody, oBatch = {}) {
|
|
775
787
|
// skip preamble consisting of whitespace (as sent by datajs)
|
|
776
788
|
sBody = sBody.replace(/^\s+/, "");
|
|
777
|
-
sBoundary = firstLine(sBody);
|
|
789
|
+
const sBoundary = firstLine(sBody);
|
|
778
790
|
return {
|
|
779
791
|
boundary : firstLine(sBody).slice(2),
|
|
780
792
|
parts : sBody.split(sBoundary).slice(1, -1).map(function (sRequestPart) {
|
|
@@ -784,7 +796,7 @@ sap.ui.define([
|
|
|
784
796
|
sFirstLine = firstLine(sRequestPart);
|
|
785
797
|
if (rMultipartHeader.test(sFirstLine)) {
|
|
786
798
|
oMultipart = multipart(sServiceBase,
|
|
787
|
-
sRequestPart.slice(sFirstLine.length + 4));
|
|
799
|
+
sRequestPart.slice(sFirstLine.length + 4), oBatch);
|
|
788
800
|
aFailures = oMultipart.parts.filter(function (oPart) {
|
|
789
801
|
return oPart.code >= 300;
|
|
790
802
|
});
|
|
@@ -793,7 +805,7 @@ sap.ui.define([
|
|
|
793
805
|
iRequestStart = sRequestPart.indexOf("\r\n\r\n") + 4;
|
|
794
806
|
oRequest = parseRequest(sServiceBase, sRequestPart.slice(iRequestStart));
|
|
795
807
|
aMatch = rContentId.exec(sRequestPart.slice(0, iRequestStart));
|
|
796
|
-
return getResponseFromFixture(oRequest, aMatch && aMatch[1]);
|
|
808
|
+
return getResponseFromFixture(oRequest, aMatch && aMatch[1], false, oBatch);
|
|
797
809
|
})
|
|
798
810
|
};
|
|
799
811
|
}
|
|
@@ -150,13 +150,13 @@ sap.ui.define([
|
|
|
150
150
|
* @param {sap.ui.test.generic.GenericTestCollection.ObjectCapabilities} oObjectCapabilities The capabilities of the corresponding control
|
|
151
151
|
*/
|
|
152
152
|
fillControlProperties: function(oControl, oObjectCapabilities) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
const mProperties = oControl.getMetadata().getAllProperties();
|
|
154
|
+
const mPropertyCapabilities = oObjectCapabilities && oObjectCapabilities.properties || {};
|
|
155
|
+
let vValueToSet = "test"; // just try a string as default, with some frequently happening exceptions
|
|
156
156
|
|
|
157
|
-
for (
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
for (const sPropertyName in mProperties) {
|
|
158
|
+
const oProperty = mProperties[sPropertyName];
|
|
159
|
+
let sPropertyCapability;
|
|
160
160
|
|
|
161
161
|
// Check if property should be skipped because of known issues or if a specific value should be used for setting the property
|
|
162
162
|
if (mPropertyCapabilities[sPropertyName]) {
|
|
@@ -193,6 +193,9 @@ sap.ui.define([
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
opaTest.skip = opaSkip;
|
|
197
|
+
opaTest.todo = QUnit.todo ? opaTodo : opaTest;
|
|
198
|
+
|
|
196
199
|
// configure QUnit, modify test callback to include OPA start, and enqueue the test with QUnit
|
|
197
200
|
function callQUnit(sQUnitFn, aArgs, fnDone, fnFail) {
|
|
198
201
|
configQUnit();
|