@openui5/sap.ui.core 1.97.1 → 1.99.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +92 -2
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +14 -21
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.mobile.js +29 -19
- 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/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 +80 -168
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/VersionInfo.js +13 -10
- package/src/sap/ui/base/BindingParser.js +34 -7
- 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 +48 -27
- 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/BusyIndicatorUtils.js +1 -1
- package/src/sap/ui/core/Component.js +3 -3
- 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 +79 -14
- package/src/sap/ui/core/Control.js +3 -2
- package/src/sap/ui/core/Core.js +3 -6
- 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 +5 -7
- 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/ExtensionPoint.js +1 -1
- package/src/sap/ui/core/FocusHandler.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/HTMLRenderer.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +2 -3
- package/src/sap/ui/core/IconRenderer.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 +9 -2
- 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/LocalBusyIndicatorRenderer.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicatorSupport.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +37 -2
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Placeholder.js +28 -28
- package/src/sap/ui/core/Popup.js +3 -3
- 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/ScrollBarRenderer.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 +2 -2
- 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/_IconRegistry.js +10 -1
- package/src/sap/ui/core/date/Japanese.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +175 -5
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +9 -6
- package/src/sap/ui/core/dnd/DragAndDrop.js +2 -2
- 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/DateFormat.js +562 -174
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +43 -0
- package/src/sap/ui/core/format/ListFormat.js +2 -2
- package/src/sap/ui/core/format/NumberFormat.js +190 -56
- package/src/sap/ui/core/format/TimezoneUtil.js +248 -0
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +45 -8
- 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/MessageMixin.js +2 -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 +4 -0
- package/src/sap/ui/core/messagebundle_ar.properties +2 -0
- package/src/sap/ui/core/messagebundle_bg.properties +7 -5
- package/src/sap/ui/core/messagebundle_ca.properties +2 -0
- package/src/sap/ui/core/messagebundle_cs.properties +2 -0
- package/src/sap/ui/core/messagebundle_cy.properties +2 -0
- package/src/sap/ui/core/messagebundle_da.properties +2 -0
- package/src/sap/ui/core/messagebundle_de.properties +3 -1
- package/src/sap/ui/core/messagebundle_el.properties +2 -0
- package/src/sap/ui/core/messagebundle_en.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/ui/core/messagebundle_es.properties +2 -0
- package/src/sap/ui/core/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/core/messagebundle_et.properties +2 -0
- package/src/sap/ui/core/messagebundle_fi.properties +2 -0
- package/src/sap/ui/core/messagebundle_fr.properties +2 -0
- package/src/sap/ui/core/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/core/messagebundle_hi.properties +2 -0
- package/src/sap/ui/core/messagebundle_hr.properties +2 -0
- package/src/sap/ui/core/messagebundle_hu.properties +2 -0
- package/src/sap/ui/core/messagebundle_id.properties +4 -2
- package/src/sap/ui/core/messagebundle_it.properties +3 -1
- package/src/sap/ui/core/messagebundle_iw.properties +2 -0
- package/src/sap/ui/core/messagebundle_ja.properties +2 -0
- package/src/sap/ui/core/messagebundle_kk.properties +2 -0
- package/src/sap/ui/core/messagebundle_ko.properties +2 -0
- package/src/sap/ui/core/messagebundle_lt.properties +2 -0
- package/src/sap/ui/core/messagebundle_lv.properties +3 -1
- package/src/sap/ui/core/messagebundle_ms.properties +2 -0
- package/src/sap/ui/core/messagebundle_nl.properties +2 -0
- package/src/sap/ui/core/messagebundle_no.properties +6 -4
- package/src/sap/ui/core/messagebundle_pl.properties +2 -0
- package/src/sap/ui/core/messagebundle_pt.properties +2 -0
- package/src/sap/ui/core/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/core/messagebundle_ro.properties +2 -0
- package/src/sap/ui/core/messagebundle_ru.properties +2 -0
- package/src/sap/ui/core/messagebundle_sh.properties +2 -0
- package/src/sap/ui/core/messagebundle_sk.properties +2 -0
- package/src/sap/ui/core/messagebundle_sl.properties +2 -0
- package/src/sap/ui/core/messagebundle_sv.properties +2 -0
- package/src/sap/ui/core/messagebundle_th.properties +2 -0
- package/src/sap/ui/core/messagebundle_tr.properties +2 -0
- package/src/sap/ui/core/messagebundle_uk.properties +2 -0
- package/src/sap/ui/core/messagebundle_vi.properties +2 -0
- package/src/sap/ui/core/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/core/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/HTMLViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +2 -1
- package/src/sap/ui/core/mvc/JSONViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/JSViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -1
- package/src/sap/ui/core/mvc/ViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +16 -3
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Route.js +6 -6
- package/src/sap/ui/core/routing/Router.js +4 -3
- package/src/sap/ui/core/routing/Targets.js +17 -13
- package/src/sap/ui/core/rules/Model.support.js +95 -8
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -5
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/parameterClasses.less +21 -21
- package/src/sap/ui/core/theming/Parameters.js +22 -142
- package/src/sap/ui/core/theming/ThemeHelper.js +26 -37
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/DraftEnabledMockServer.js +21 -16
- 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 +156 -57
- package/src/sap/ui/core/util/PasteHelper.js +4 -4
- package/src/sap/ui/core/util/XMLPreprocessor.js +16 -4
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +4 -0
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +26 -16
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.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/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 +8 -3
- package/src/sap/ui/events/jquery/EventExtension.js +1 -1
- package/src/sap/ui/events/jquery/EventSimulation.js +3 -13
- package/src/sap/ui/model/Binding.js +4 -3
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +26 -4
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +27 -6
- package/src/sap/ui/model/ListBinding.js +2 -2
- package/src/sap/ui/model/MetaModel.js +2 -3
- package/src/sap/ui/model/Model.js +2 -2
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +40 -30
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -15
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/json/JSONListBinding.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.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 +3 -3
- package/src/sap/ui/model/odata/ODataModel.js +2 -2
- package/src/sap/ui/model/odata/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +1 -1
- 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 +338 -0
- 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/type/UnitMixin.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +57 -4
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +8 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +216 -87
- package/src/sap/ui/model/odata/v2/ODataModel.js +89 -50
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +6 -4
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +65 -5
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +21 -22
- package/src/sap/ui/model/odata/v4/Context.js +208 -83
- package/src/sap/ui/model/odata/v4/ODataBinding.js +53 -27
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +252 -218
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +395 -233
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +131 -100
- package/src/sap/ui/model/odata/v4/ODataModel.js +341 -259
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +85 -85
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +85 -79
- package/src/sap/ui/model/odata/v4/ODataUtils.js +5 -5
- package/src/sap/ui/model/odata/v4/SubmitMode.js +0 -1
- package/src/sap/ui/model/odata/v4/ValueListType.js +0 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +20 -20
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +3 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -4
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +21 -20
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +183 -103
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +22 -18
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +62 -61
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Parser.js +52 -43
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +54 -43
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +147 -147
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +14 -13
- package/src/sap/ui/model/odata/v4/lib/_V4MetadataConverter.js +66 -67
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLListBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
- package/src/sap/ui/performance/trace/Passport.js +3 -3
- 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/BlanketReporter.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/TestUtils.js +2 -2
- package/src/sap/ui/test/_LogCollector.js +1 -1
- package/src/sap/ui/test/actions/Action.js +4 -2
- package/src/sap/ui/test/actions/Press.js +51 -2
- package/src/sap/ui/test/autowaiter/_XHRWaiter.js +1 -1
- package/src/sap/ui/test/starter/createSuite.js +3 -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 +7 -3
- package/src/sap/ui/thirdparty/URITemplate.js +1 -1
- package/src/sap/ui/thirdparty/jquery-mobile-custom.js +3 -6
- package/src/sap/ui/thirdparty/jqueryui/jquery-ui-datepicker.js +143 -3
- package/src/sap/ui/thirdparty/jqueryui/jquery-ui-position.js +8 -1
- package/src/sap/ui/thirdparty/jszip.js +18 -7
- package/src/sap/ui/thirdparty/mobify-carousel.js +1 -1
- package/src/sap/ui/util/Mobile.js +17 -0
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/XMLHelper.js +53 -30
- package/src/ui5loader.js +4 -4
|
@@ -18,7 +18,35 @@ sap.ui.define([
|
|
|
18
18
|
iGenerationCounter = 0,
|
|
19
19
|
oModule,
|
|
20
20
|
// index of virtual context used for auto-$expand/$select
|
|
21
|
-
iVIRTUAL = -9007199254740991/*Number.MIN_SAFE_INTEGER
|
|
21
|
+
iVIRTUAL = -9007199254740991/*Number.MIN_SAFE_INTEGER*/,
|
|
22
|
+
/**
|
|
23
|
+
* @alias sap.ui.model.odata.v4.Context
|
|
24
|
+
* @author SAP SE
|
|
25
|
+
* @class Implementation of an OData V4 model's context.
|
|
26
|
+
*
|
|
27
|
+
* The context is a pointer to model data as returned by a query from a
|
|
28
|
+
* {@link sap.ui.model.odata.v4.ODataContextBinding} or a
|
|
29
|
+
* {@link sap.ui.model.odata.v4.ODataListBinding}. Contexts are always and only
|
|
30
|
+
* created by such bindings. A context for a context binding points to the complete query
|
|
31
|
+
* result. A context for a list binding points to one specific entry in the binding's
|
|
32
|
+
* collection. A property binding does not have a context, you can access its value via
|
|
33
|
+
* {@link sap.ui.model.odata.v4.ODataPropertyBinding#getValue}.
|
|
34
|
+
*
|
|
35
|
+
* Applications can access model data only via a context, either synchronously with the
|
|
36
|
+
* risk that the values are not available yet ({@link #getProperty} and
|
|
37
|
+
* {@link #getObject}) or asynchronously ({@link #requestProperty} and
|
|
38
|
+
* {@link #requestObject}).
|
|
39
|
+
*
|
|
40
|
+
* Context instances are immutable except for their indexes.
|
|
41
|
+
* @extends sap.ui.model.Context
|
|
42
|
+
* @hideconstructor
|
|
43
|
+
* @public
|
|
44
|
+
* @since 1.39.0
|
|
45
|
+
* @version 1.99.1
|
|
46
|
+
*/
|
|
47
|
+
Context = BaseContext.extend("sap.ui.model.odata.v4.Context", {
|
|
48
|
+
constructor : constructor
|
|
49
|
+
});
|
|
22
50
|
|
|
23
51
|
/*
|
|
24
52
|
* Fetches and formats the primitive value at the given path.
|
|
@@ -54,6 +82,10 @@ sap.ui.define([
|
|
|
54
82
|
});
|
|
55
83
|
}
|
|
56
84
|
|
|
85
|
+
//*********************************************************************************************
|
|
86
|
+
// Context
|
|
87
|
+
//*********************************************************************************************
|
|
88
|
+
|
|
57
89
|
/**
|
|
58
90
|
* Do <strong>NOT</strong> call this private constructor. In the OData V4 model you cannot
|
|
59
91
|
* create contexts at will: retrieve them from a binding or a view element instead.
|
|
@@ -73,70 +105,53 @@ sap.ui.define([
|
|
|
73
105
|
* {@link #created}
|
|
74
106
|
* @param {number} [iGeneration=0]
|
|
75
107
|
* The unique number for this context's generation, which can be retrieved via
|
|
76
|
-
* {@link #getGeneration}
|
|
108
|
+
* {@link #getGeneration}
|
|
109
|
+
* @param {boolean} [bInactive]
|
|
110
|
+
* Whether this context is inactive and will only be sent to the server after the first
|
|
111
|
+
* property update
|
|
77
112
|
* @throws {Error}
|
|
78
113
|
* If an invalid path is given
|
|
79
|
-
*
|
|
80
|
-
* @alias sap.ui.model.odata.v4.Context
|
|
81
|
-
* @author SAP SE
|
|
82
|
-
* @class Implementation of an OData V4 model's context.
|
|
83
|
-
*
|
|
84
|
-
* The context is a pointer to model data as returned by a query from a
|
|
85
|
-
* {@link sap.ui.model.odata.v4.ODataContextBinding} or a
|
|
86
|
-
* {@link sap.ui.model.odata.v4.ODataListBinding}. Contexts are always and only
|
|
87
|
-
* created by such bindings. A context for a context binding points to the complete query
|
|
88
|
-
* result. A context for a list binding points to one specific entry in the binding's
|
|
89
|
-
* collection. A property binding does not have a context, you can access its value via
|
|
90
|
-
* {@link sap.ui.model.odata.v4.ODataPropertyBinding#getValue}.
|
|
91
|
-
*
|
|
92
|
-
* Applications can access model data only via a context, either synchronously with the risk
|
|
93
|
-
* that the values are not available yet ({@link #getProperty} and {@link #getObject}) or
|
|
94
|
-
* asynchronously ({@link #requestProperty} and {@link #requestObject}).
|
|
95
|
-
*
|
|
96
|
-
* Context instances are immutable except for their indexes.
|
|
97
|
-
* @extends sap.ui.model.Context
|
|
98
|
-
* @hideconstructor
|
|
99
|
-
* @public
|
|
100
|
-
* @since 1.39.0
|
|
101
|
-
* @version 1.97.1
|
|
102
114
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
function constructor(oModel, oBinding, sPath, iIndex, oCreatePromise, iGeneration,
|
|
116
|
+
bInactive) {
|
|
117
|
+
if (sPath[0] !== "/") {
|
|
118
|
+
throw new Error("Not an absolute path: " + sPath);
|
|
119
|
+
}
|
|
120
|
+
if (sPath.endsWith("/")) {
|
|
121
|
+
throw new Error("Unsupported trailing slash: " + sPath);
|
|
122
|
+
}
|
|
123
|
+
BaseContext.call(this, oModel, sPath);
|
|
124
|
+
this.oBinding = oBinding;
|
|
125
|
+
this.oCreatedPromise = oCreatePromise
|
|
126
|
+
// ensure to return a promise that is resolved w/o data
|
|
127
|
+
&& Promise.resolve(oCreatePromise).then(function () {});
|
|
128
|
+
this.oSyncCreatePromise = oCreatePromise;
|
|
129
|
+
this.iGeneration = iGeneration || 0;
|
|
130
|
+
this.bInactive = bInactive || undefined; // be in sync with the annotation
|
|
131
|
+
this.iIndex = iIndex;
|
|
132
|
+
this.bKeepAlive = false;
|
|
133
|
+
this.fnOnBeforeDestroy = undefined;
|
|
134
|
+
}
|
|
123
135
|
|
|
124
136
|
/**
|
|
125
137
|
* Deletes the OData entity this context points to.
|
|
126
138
|
*
|
|
127
|
-
* @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
|
|
128
|
-
* A lock for the group ID to be used for the DELETE request;
|
|
129
|
-
*
|
|
139
|
+
* @param {sap.ui.model.odata.v4.lib._GroupLock} [oGroupLock]
|
|
140
|
+
* A lock for the group ID to be used for the DELETE request; w/o a lock, no DELETE is sent.
|
|
141
|
+
* For a transient entity, the lock is ignored (use NULL)!
|
|
130
142
|
* @param {object} [oETagEntity]
|
|
131
143
|
* An entity with the ETag of the binding for which the deletion was requested. This is
|
|
132
144
|
* provided if the deletion is delegated from a context binding with empty path to a list
|
|
133
|
-
* binding.
|
|
145
|
+
* binding. W/o a lock, this is ignored.
|
|
134
146
|
* @param {boolean} [bDoNotRequestCount]
|
|
135
147
|
* Whether not to request the new count from the server; useful in case of
|
|
136
|
-
* {@link #replaceWith} where it is known that the count remains unchanged
|
|
148
|
+
* {@link #replaceWith} where it is known that the count remains unchanged; w/o a lock this
|
|
149
|
+
* should be true
|
|
137
150
|
* @returns {Promise}
|
|
138
151
|
* A promise which is resolved without a result in case of success, or rejected with an
|
|
139
152
|
* instance of <code>Error</code> in case of failure
|
|
153
|
+
* @throws {Error}
|
|
154
|
+
* If the cache promise for this binding is not yet fulfilled, or if the cache is shared
|
|
140
155
|
*
|
|
141
156
|
* @private
|
|
142
157
|
* @see sap.ui.model.odata.v4.Context#delete
|
|
@@ -144,8 +159,8 @@ sap.ui.define([
|
|
|
144
159
|
Context.prototype._delete = function (oGroupLock, oETagEntity, bDoNotRequestCount) {
|
|
145
160
|
var that = this;
|
|
146
161
|
|
|
147
|
-
if (
|
|
148
|
-
return this.oBinding._delete(
|
|
162
|
+
if (!oGroupLock) {
|
|
163
|
+
return this.oBinding._delete(null, "n/a", this, null, true);
|
|
149
164
|
}
|
|
150
165
|
return this.fetchCanonicalPath().then(function (sCanonicalPath) {
|
|
151
166
|
return that.oBinding._delete(oGroupLock, sCanonicalPath.slice(1), that, oETagEntity,
|
|
@@ -178,6 +193,17 @@ sap.ui.define([
|
|
|
178
193
|
});
|
|
179
194
|
};
|
|
180
195
|
|
|
196
|
+
/**
|
|
197
|
+
* Updates all dependent bindings of this context.
|
|
198
|
+
*
|
|
199
|
+
* @private
|
|
200
|
+
*/
|
|
201
|
+
Context.prototype.checkUpdate = function () {
|
|
202
|
+
this.oModel.getDependentBindings(this).forEach(function (oDependentBinding) {
|
|
203
|
+
oDependentBinding.checkUpdate();
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
|
|
181
207
|
/**
|
|
182
208
|
* Updates all dependent bindings of this context.
|
|
183
209
|
*
|
|
@@ -185,10 +211,10 @@ sap.ui.define([
|
|
|
185
211
|
* A promise resolving without a defined result when the update is finished
|
|
186
212
|
* @private
|
|
187
213
|
*/
|
|
188
|
-
Context.prototype.
|
|
214
|
+
Context.prototype.checkUpdateInternal = function () {
|
|
189
215
|
return SyncPromise.all(
|
|
190
216
|
this.oModel.getDependentBindings(this).map(function (oDependentBinding) {
|
|
191
|
-
return oDependentBinding.
|
|
217
|
+
return oDependentBinding.checkUpdateInternal();
|
|
192
218
|
})
|
|
193
219
|
);
|
|
194
220
|
};
|
|
@@ -256,10 +282,14 @@ sap.ui.define([
|
|
|
256
282
|
* The group ID to be used for the DELETE request; if not specified, the update group ID for
|
|
257
283
|
* the context's binding is used, see {@link #getUpdateGroupId}; the resulting group ID must
|
|
258
284
|
* not have {@link sap.ui.model.odata.v4.SubmitMode.API}. Since 1.81, if this context is
|
|
259
|
-
* transient (see {@link #isTransient}), no group ID needs to be specified.
|
|
285
|
+
* transient (see {@link #isTransient}), no group ID needs to be specified. Since 1.98.0, you
|
|
286
|
+
* can use <code>null</code> to prevent the DELETE request in case of a kept-alive context
|
|
287
|
+
* that is not in the collection and of which you know that it does not exist on the server
|
|
288
|
+
* anymore (for example, a draft after activation).
|
|
260
289
|
* @param {boolean} [bDoNotRequestCount]
|
|
261
290
|
* Whether not to request the new count from the server; useful in case of
|
|
262
|
-
* {@link #replaceWith} where it is known that the count remains unchanged (since 1.97.0)
|
|
291
|
+
* {@link #replaceWith} where it is known that the count remains unchanged (since 1.97.0).
|
|
292
|
+
* Since 1.98.0, this is implied if a <code>null</code> group ID is used.
|
|
263
293
|
* @returns {Promise}
|
|
264
294
|
* A promise which is resolved without a result in case of success, or rejected with an
|
|
265
295
|
* instance of <code>Error</code> in case of failure, e.g. if the given context does not point
|
|
@@ -274,25 +304,39 @@ sap.ui.define([
|
|
|
274
304
|
* someone else and report success.
|
|
275
305
|
* @throws {Error} If the given group ID is invalid, if this context's root binding is
|
|
276
306
|
* suspended, or if this context is not transient (see {@link #isTransient}) and has pending
|
|
277
|
-
* changes (see {@link #hasPendingChanges})
|
|
307
|
+
* changes (see {@link #hasPendingChanges}), or if a <code>null</code> group ID is used with
|
|
308
|
+
* a context which is not kept-alive (see {@link #isKeepAlive}) or is still in the collection
|
|
309
|
+
* (has an index, see {@link #getIndex})
|
|
278
310
|
*
|
|
279
311
|
* @function
|
|
280
312
|
* @public
|
|
281
313
|
* @since 1.41.0
|
|
282
314
|
*/
|
|
283
315
|
Context.prototype.delete = function (sGroupId, bDoNotRequestCount) {
|
|
284
|
-
var oGroupLock,
|
|
316
|
+
var oGroupLock = null,
|
|
285
317
|
oModel = this.oModel,
|
|
286
318
|
that = this;
|
|
287
319
|
|
|
288
|
-
oModel.checkGroupId(sGroupId);
|
|
289
320
|
this.oBinding.checkSuspended();
|
|
290
321
|
if (this.isTransient()) {
|
|
291
|
-
sGroupId =
|
|
322
|
+
sGroupId = null;
|
|
292
323
|
} else if (this.hasPendingChanges()) {
|
|
293
324
|
throw new Error("Cannot delete due to pending changes");
|
|
325
|
+
} else if (sGroupId === null) {
|
|
326
|
+
if (!(this.bKeepAlive && this.iIndex === undefined)) {
|
|
327
|
+
throw new Error("Cannot delete " + this);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (sGroupId === null) {
|
|
331
|
+
bDoNotRequestCount = true;
|
|
332
|
+
} else {
|
|
333
|
+
oModel.checkGroupId(sGroupId);
|
|
334
|
+
oGroupLock = this.oBinding.lockGroup(sGroupId, true, true);
|
|
335
|
+
sGroupId = oGroupLock.getGroupId();
|
|
336
|
+
if (this.oModel.isApiGroup(sGroupId)) {
|
|
337
|
+
throw new Error("Illegal update group ID: " + sGroupId);
|
|
338
|
+
}
|
|
294
339
|
}
|
|
295
|
-
oGroupLock = this.oBinding.lockGroup(sGroupId, true, true);
|
|
296
340
|
|
|
297
341
|
return this._delete(oGroupLock, /*oETagEntity*/null, bDoNotRequestCount).then(function () {
|
|
298
342
|
var sResourcePathPrefix = that.sPath.slice(1);
|
|
@@ -303,7 +347,9 @@ sap.ui.define([
|
|
|
303
347
|
oBinding.removeCachesAndMessages(sResourcePathPrefix, true);
|
|
304
348
|
});
|
|
305
349
|
}).catch(function (oError) {
|
|
306
|
-
oGroupLock
|
|
350
|
+
if (oGroupLock) {
|
|
351
|
+
oGroupLock.unlock(true);
|
|
352
|
+
}
|
|
307
353
|
oModel.reportError("Failed to delete " + that, sClassName, oError);
|
|
308
354
|
throw oError;
|
|
309
355
|
});
|
|
@@ -362,7 +408,7 @@ sap.ui.define([
|
|
|
362
408
|
|
|
363
409
|
if (this.oModel.bAutoExpandSelect) {
|
|
364
410
|
sPath = oMetaModel.getReducedPath(
|
|
365
|
-
|
|
411
|
+
this.oModel.resolve(sPath, this),
|
|
366
412
|
this.oBinding.getBaseForPathReduction());
|
|
367
413
|
}
|
|
368
414
|
return this.withCache(function (oCache, sCachePath, oBinding) {
|
|
@@ -413,6 +459,11 @@ sap.ui.define([
|
|
|
413
459
|
return oCache.setProperty(oResult.propertyPath, vValue, sEntityPath);
|
|
414
460
|
}
|
|
415
461
|
|
|
462
|
+
if (that.isInactive()) {
|
|
463
|
+
oBinding.fireCreateActivate(that);
|
|
464
|
+
that.bInactive = false;
|
|
465
|
+
}
|
|
466
|
+
|
|
416
467
|
// if request is canceled fnPatchSent and fnErrorCallback are not called and
|
|
417
468
|
// returned Promise is rejected -> no patch events
|
|
418
469
|
return oCache.update(oGroupLock, oResult.propertyPath, vValue,
|
|
@@ -488,13 +539,28 @@ sap.ui.define([
|
|
|
488
539
|
* @private
|
|
489
540
|
*/
|
|
490
541
|
Context.prototype.fetchValue = function (sPath, oListener, bCached) {
|
|
542
|
+
var oBinding = this.oBinding;
|
|
543
|
+
|
|
491
544
|
if (this.iIndex === iVIRTUAL) {
|
|
492
545
|
return SyncPromise.resolve(); // no cache access for virtual contexts
|
|
493
546
|
}
|
|
547
|
+
if (oBinding.getHeaderContext && oBinding.getHeaderContext() === this) {
|
|
548
|
+
if (sPath && sPath.startsWith(this.sPath)) {
|
|
549
|
+
sPath = sPath.slice(this.sPath.length + 1);
|
|
550
|
+
}
|
|
551
|
+
if (!sPath) {
|
|
552
|
+
return oBinding.fetchValue(this.sPath, oListener, bCached)
|
|
553
|
+
.then(function (aElements) {
|
|
554
|
+
return {$count : aElements.$count};
|
|
555
|
+
});
|
|
556
|
+
} else if (sPath !== "$count") {
|
|
557
|
+
throw new Error("Invalid header path: " + sPath);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
494
560
|
if (!sPath || sPath[0] !== "/") {
|
|
495
561
|
// Create an absolute path based on the context's path and reduce it. This is only
|
|
496
562
|
// necessary for data access via Context APIs, bindings already use absolute paths.
|
|
497
|
-
sPath =
|
|
563
|
+
sPath = this.oModel.resolve(sPath, this);
|
|
498
564
|
if (this.oModel.bAutoExpandSelect) {
|
|
499
565
|
sPath = this.oModel.getMetaModel()
|
|
500
566
|
.getReducedPath(sPath, this.oBinding.getBaseForPathReduction());
|
|
@@ -548,6 +614,8 @@ sap.ui.define([
|
|
|
548
614
|
* The unique number of this context's generation, or <code>0</code>
|
|
549
615
|
*
|
|
550
616
|
* @private
|
|
617
|
+
* @see sap.ui.model.odata.v4.Context.createNewContext
|
|
618
|
+
* @see #setNewGeneration
|
|
551
619
|
*/
|
|
552
620
|
Context.prototype.getGeneration = function (bOnlyLocal) {
|
|
553
621
|
if (this.iGeneration || bOnlyLocal) {
|
|
@@ -556,7 +624,6 @@ sap.ui.define([
|
|
|
556
624
|
return this.oBinding.getGeneration();
|
|
557
625
|
};
|
|
558
626
|
|
|
559
|
-
|
|
560
627
|
/**
|
|
561
628
|
* Returns the group ID of the context's binding that is used for read requests. See
|
|
562
629
|
* {@link sap.ui.model.odata.v4.ODataListBinding#getGroupId} and
|
|
@@ -635,12 +702,16 @@ sap.ui.define([
|
|
|
635
702
|
* Returns <code>undefined</code> if the data is not (yet) available; no request is triggered.
|
|
636
703
|
* Use {@link #requestObject} for asynchronous access.
|
|
637
704
|
*
|
|
705
|
+
* The header context of a list binding only delivers <code>$count</code> (wrapped in an object
|
|
706
|
+
* if <code>sPath</code> is "").
|
|
707
|
+
*
|
|
638
708
|
* @param {string} [sPath=""]
|
|
639
709
|
* A path relative to this context
|
|
640
710
|
* @returns {any}
|
|
641
711
|
* The requested value
|
|
642
712
|
* @throws {Error}
|
|
643
|
-
* If the context's root binding is suspended
|
|
713
|
+
* If the context's root binding is suspended or if the context is a header context and the
|
|
714
|
+
* path is neither empty nor "$count".
|
|
644
715
|
*
|
|
645
716
|
* @public
|
|
646
717
|
* @see sap.ui.model.Context#getObject
|
|
@@ -665,8 +736,12 @@ sap.ui.define([
|
|
|
665
736
|
* If the type is not yet available, <code>undefined</code> is returned.
|
|
666
737
|
* @returns {any}
|
|
667
738
|
* The requested property value
|
|
668
|
-
* @throws {Error}
|
|
669
|
-
*
|
|
739
|
+
* @throws {Error} If
|
|
740
|
+
* <ul>
|
|
741
|
+
* <li> the context's root binding is suspended,
|
|
742
|
+
* <li> the value is not primitive,
|
|
743
|
+
* <li> or the context is a header context and the path is not "$count"
|
|
744
|
+
* </ul>
|
|
670
745
|
*
|
|
671
746
|
* @public
|
|
672
747
|
* @see sap.ui.model.Context#getProperty
|
|
@@ -744,7 +819,8 @@ sap.ui.define([
|
|
|
744
819
|
* @private
|
|
745
820
|
*/
|
|
746
821
|
Context.prototype.getValue = function (sPath) {
|
|
747
|
-
var oSyncPromise,
|
|
822
|
+
var oSyncPromise,
|
|
823
|
+
that = this;
|
|
748
824
|
|
|
749
825
|
this.oBinding.checkSuspended();
|
|
750
826
|
oSyncPromise = this.fetchValue(sPath, null, true)
|
|
@@ -763,7 +839,8 @@ sap.ui.define([
|
|
|
763
839
|
* Returns whether there are pending changes for bindings dependent on this context, or for
|
|
764
840
|
* unresolved bindings (see {@link sap.ui.model.Binding#isResolved}) which were dependent on
|
|
765
841
|
* this context at the time the pending change was created. This includes the context itself
|
|
766
|
-
* being transient
|
|
842
|
+
* being {@link #isTransient transient}. Since 1.98.0, {@link #isInactive inactive} contexts are
|
|
843
|
+
* ignored.
|
|
767
844
|
*
|
|
768
845
|
* @returns {boolean}
|
|
769
846
|
* Whether there are pending changes
|
|
@@ -795,6 +872,24 @@ sap.ui.define([
|
|
|
795
872
|
return this.getProperty("@$ui5.node.isExpanded");
|
|
796
873
|
};
|
|
797
874
|
|
|
875
|
+
/**
|
|
876
|
+
* Returns whether this context is inactive. The result of this function can also be accessed
|
|
877
|
+
* via instance annotation "@$ui5.context.isInactive" at the entity.
|
|
878
|
+
*
|
|
879
|
+
* @returns {boolean} <code>true</code> if this context is inactive, <code>false</code> if it
|
|
880
|
+
* was created in an inactive state and has been activated, and <code>undefined</code>
|
|
881
|
+
* otherwise.
|
|
882
|
+
*
|
|
883
|
+
* @public
|
|
884
|
+
* @see #isTransient
|
|
885
|
+
* @see sap.ui.model.odata.v4.ODataListBinding#create
|
|
886
|
+
* @see sap.ui.model.odata.v4.ODataListBinding#event:createActivate
|
|
887
|
+
* @since 1.98.0
|
|
888
|
+
*/
|
|
889
|
+
Context.prototype.isInactive = function () {
|
|
890
|
+
return this.bInactive;
|
|
891
|
+
};
|
|
892
|
+
|
|
798
893
|
/**
|
|
799
894
|
* Returns whether this context is kept alive.
|
|
800
895
|
*
|
|
@@ -821,6 +916,7 @@ sap.ui.define([
|
|
|
821
916
|
* created using {@link sap.ui.model.odata.v4.ODataListBinding#create}
|
|
822
917
|
*
|
|
823
918
|
* @public
|
|
919
|
+
* @see #isInactive
|
|
824
920
|
* @since 1.43.0
|
|
825
921
|
*/
|
|
826
922
|
Context.prototype.isTransient = function () {
|
|
@@ -889,9 +985,11 @@ sap.ui.define([
|
|
|
889
985
|
* @param {boolean} [bKeepCacheOnError]
|
|
890
986
|
* If <code>true</code>, the binding data remains unchanged if the refresh fails
|
|
891
987
|
* @returns {sap.ui.base.SyncPromise}
|
|
892
|
-
* A promise resolving when all dependent bindings are refreshed; it is rejected
|
|
893
|
-
*
|
|
894
|
-
*
|
|
988
|
+
* A promise resolving when all dependent bindings are refreshed; it is rejected
|
|
989
|
+
* when the refresh fails; the promise is resolved immediately on a suspended binding
|
|
990
|
+
* @throws {Error}
|
|
991
|
+
* If the binding's root binding is suspended and a group ID different from the binding's
|
|
992
|
+
* group ID is given
|
|
895
993
|
*
|
|
896
994
|
* @private
|
|
897
995
|
*/
|
|
@@ -906,7 +1004,8 @@ sap.ui.define([
|
|
|
906
1004
|
};
|
|
907
1005
|
|
|
908
1006
|
/**
|
|
909
|
-
* Replaces this context with the given other context
|
|
1007
|
+
* Replaces this context with the given other context "in situ", that is, at the index it
|
|
1008
|
+
* currently has in its list binding's collection. You probably want to delete this context
|
|
910
1009
|
* afterwards without requesting the new count from the server, see the
|
|
911
1010
|
* <code>bDoNotRequestCount</code> parameter of {@link #delete}.
|
|
912
1011
|
*
|
|
@@ -915,6 +1014,7 @@ sap.ui.define([
|
|
|
915
1014
|
* <ul>
|
|
916
1015
|
* <li> this context's root binding is suspended,
|
|
917
1016
|
* <li> this context is transient (see {@link #isTransient}),
|
|
1017
|
+
* <li> this context is not in the collection (has no index, see {@link #getIndex}),
|
|
918
1018
|
* <li> the given other context does not belong to the same list binding as this context, or
|
|
919
1019
|
* is already in the collection (has an index, see {@link #getIndex}).
|
|
920
1020
|
* </ul>
|
|
@@ -926,8 +1026,8 @@ sap.ui.define([
|
|
|
926
1026
|
var oElement;
|
|
927
1027
|
|
|
928
1028
|
this.oBinding.checkSuspended();
|
|
929
|
-
if (this.isTransient()) {
|
|
930
|
-
throw new Error("Cannot replace
|
|
1029
|
+
if (this.iIndex === undefined || this.isTransient()) {
|
|
1030
|
+
throw new Error("Cannot replace " + this);
|
|
931
1031
|
}
|
|
932
1032
|
if (oOtherContext.oBinding !== this.oBinding || oOtherContext.iIndex !== undefined) {
|
|
933
1033
|
throw new Error("Cannot replace with " + oOtherContext);
|
|
@@ -968,12 +1068,16 @@ sap.ui.define([
|
|
|
968
1068
|
* Note that the function clones the result. Modify values via
|
|
969
1069
|
* {@link sap.ui.model.odata.v4.Context#setProperty}.
|
|
970
1070
|
*
|
|
1071
|
+
* The header context of a list binding only delivers <code>$count</code> (wrapped in an object
|
|
1072
|
+
* if <code>sPath</code> is "").
|
|
1073
|
+
*
|
|
971
1074
|
* If you want {@link #requestObject} to read fresh data, call {@link #refresh} first.
|
|
972
1075
|
*
|
|
973
1076
|
* @param {string} [sPath=""]
|
|
974
1077
|
* A path relative to this context
|
|
975
1078
|
* @returns {Promise}
|
|
976
|
-
* A promise on the requested value
|
|
1079
|
+
* A promise on the requested value; it is rejected if the context is a header context and the
|
|
1080
|
+
* path is neither empty nor "$count".
|
|
977
1081
|
* @throws {Error}
|
|
978
1082
|
* If the context's root binding is suspended
|
|
979
1083
|
*
|
|
@@ -1001,7 +1105,8 @@ sap.ui.define([
|
|
|
1001
1105
|
* If <code>true</code>, the values are returned in external format using UI5 types for the
|
|
1002
1106
|
* given property paths that format corresponding to the properties' EDM types and constraints
|
|
1003
1107
|
* @returns {Promise}
|
|
1004
|
-
* A promise on the requested value or values; it is rejected if a value is not primitive
|
|
1108
|
+
* A promise on the requested value or values; it is rejected if a value is not primitive or
|
|
1109
|
+
* if the context is a header context and a path is not "$count"
|
|
1005
1110
|
* @throws {Error}
|
|
1006
1111
|
* If the context's root binding is suspended
|
|
1007
1112
|
*
|
|
@@ -1360,11 +1465,29 @@ sap.ui.define([
|
|
|
1360
1465
|
this.bKeepAlive = false;
|
|
1361
1466
|
};
|
|
1362
1467
|
|
|
1468
|
+
/**
|
|
1469
|
+
* Sets a new unique number for this context's generation, just like
|
|
1470
|
+
* {@link sap.ui.model.odata.v4.Context.createNewContext} does for a new context.
|
|
1471
|
+
*
|
|
1472
|
+
* @private
|
|
1473
|
+
* @see #getGeneration
|
|
1474
|
+
*/
|
|
1475
|
+
Context.prototype.setNewGeneration = function () {
|
|
1476
|
+
iGenerationCounter += 1;
|
|
1477
|
+
this.iGeneration = iGenerationCounter;
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1363
1480
|
/**
|
|
1364
1481
|
* Sets this context's <code>keepAlive</code> attribute. If <code>true</code> the context is
|
|
1365
1482
|
* kept alive even when it is removed from its binding's collection, for example if a filter is
|
|
1366
1483
|
* applied and the entity represented by this context does not match the filter criteria.
|
|
1367
1484
|
*
|
|
1485
|
+
* Normally, a context's lifecycle is managed implicitly. It is created once it is needed and
|
|
1486
|
+
* destroyed if it is not needed anymore, for example, because it is no longer part of its list
|
|
1487
|
+
* binding's collection. It is thus unsafe to keep a reference to a context instance which is
|
|
1488
|
+
* not explicitly kept alive. Once a context is not kept alive anymore, the implicit lifecycle
|
|
1489
|
+
* management again takes control and destroys the context if it is no longer needed.
|
|
1490
|
+
*
|
|
1368
1491
|
* @param {boolean} bKeepAlive
|
|
1369
1492
|
* Whether to keep the context alive
|
|
1370
1493
|
* @param {function} [fnOnBeforeDestroy]
|
|
@@ -1540,9 +1663,8 @@ sap.ui.define([
|
|
|
1540
1663
|
if (this.iIndex === iVIRTUAL) {
|
|
1541
1664
|
return SyncPromise.resolve(); // no cache access for virtual contexts
|
|
1542
1665
|
}
|
|
1543
|
-
return this.oBinding.withCache(fnProcessor,
|
|
1544
|
-
|
|
1545
|
-
bSync, bWithOrWithoutCache);
|
|
1666
|
+
return this.oBinding.withCache(fnProcessor, this.oModel.resolve(sPath, this), bSync,
|
|
1667
|
+
bWithOrWithoutCache);
|
|
1546
1668
|
};
|
|
1547
1669
|
|
|
1548
1670
|
oModule = {
|
|
@@ -1562,6 +1684,9 @@ sap.ui.define([
|
|
|
1562
1684
|
* A promise which is resolved with the created entity when the POST request has been
|
|
1563
1685
|
* successfully sent and the entity has been marked as non-transient; used as base for
|
|
1564
1686
|
* {@link #created}
|
|
1687
|
+
* @param {boolean} [bInactive]
|
|
1688
|
+
* Whether this context is inactive and will only be sent to the server after the first
|
|
1689
|
+
* property update
|
|
1565
1690
|
* @returns {sap.ui.model.odata.v4.Context}
|
|
1566
1691
|
* A context for an OData V4 model
|
|
1567
1692
|
* @throws {Error}
|
|
@@ -1569,8 +1694,8 @@ sap.ui.define([
|
|
|
1569
1694
|
*
|
|
1570
1695
|
* @private
|
|
1571
1696
|
*/
|
|
1572
|
-
create : function (oModel, oBinding, sPath, iIndex, oCreatePromise) {
|
|
1573
|
-
return new Context(oModel, oBinding, sPath, iIndex, oCreatePromise);
|
|
1697
|
+
create : function (oModel, oBinding, sPath, iIndex, oCreatePromise, bInactive) {
|
|
1698
|
+
return new Context(oModel, oBinding, sPath, iIndex, oCreatePromise, 0, bInactive);
|
|
1574
1699
|
},
|
|
1575
1700
|
|
|
1576
1701
|
/**
|