@openui5/sap.ui.core 1.101.0 → 1.102.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/.eslintrc.json +26 -5
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/strings/whitespaceReplacer.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
- 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 +4 -4
- 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 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/CommandExecution.js +15 -12
- package/src/sap/ui/core/Component.js +31 -12
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +27 -12
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +22 -8
- package/src/sap/ui/core/Control.js +2 -3
- package/src/sap/ui/core/Core.js +95 -27
- 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/ExtensionPoint.js +1 -1
- package/src/sap/ui/core/FocusHandler.js +2 -3
- 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 +2 -2
- 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/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 +119 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +12 -14
- 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 +21 -15
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
- 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 +3 -5
- 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 +512 -387
- package/src/sap/ui/core/cache/CacheManager.js +27 -0
- package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
- package/src/sap/ui/core/cache/LRUPersistentCache.js +74 -3
- package/src/sap/ui/core/cldr/ar.json +469 -1
- package/src/sap/ui/core/cldr/ar_EG.json +469 -1
- package/src/sap/ui/core/cldr/ar_SA.json +469 -1
- package/src/sap/ui/core/cldr/bg.json +469 -1
- package/src/sap/ui/core/cldr/ca.json +469 -1
- package/src/sap/ui/core/cldr/cs.json +469 -1
- package/src/sap/ui/core/cldr/cy.json +469 -1
- package/src/sap/ui/core/cldr/da.json +469 -1
- package/src/sap/ui/core/cldr/de.json +469 -1
- package/src/sap/ui/core/cldr/de_AT.json +469 -1
- package/src/sap/ui/core/cldr/de_CH.json +469 -1
- package/src/sap/ui/core/cldr/el.json +469 -1
- package/src/sap/ui/core/cldr/el_CY.json +469 -1
- package/src/sap/ui/core/cldr/en.json +469 -1
- package/src/sap/ui/core/cldr/en_AU.json +469 -1
- package/src/sap/ui/core/cldr/en_GB.json +469 -1
- package/src/sap/ui/core/cldr/en_HK.json +469 -1
- package/src/sap/ui/core/cldr/en_IE.json +469 -1
- package/src/sap/ui/core/cldr/en_IN.json +469 -1
- package/src/sap/ui/core/cldr/en_NZ.json +469 -1
- package/src/sap/ui/core/cldr/en_PG.json +469 -1
- package/src/sap/ui/core/cldr/en_SG.json +469 -1
- package/src/sap/ui/core/cldr/en_ZA.json +469 -1
- package/src/sap/ui/core/cldr/es.json +469 -1
- package/src/sap/ui/core/cldr/es_AR.json +469 -1
- package/src/sap/ui/core/cldr/es_BO.json +469 -1
- package/src/sap/ui/core/cldr/es_CL.json +469 -1
- package/src/sap/ui/core/cldr/es_CO.json +469 -1
- package/src/sap/ui/core/cldr/es_MX.json +469 -1
- package/src/sap/ui/core/cldr/es_PE.json +469 -1
- package/src/sap/ui/core/cldr/es_UY.json +469 -1
- package/src/sap/ui/core/cldr/es_VE.json +469 -1
- package/src/sap/ui/core/cldr/et.json +469 -1
- package/src/sap/ui/core/cldr/fa.json +469 -1
- package/src/sap/ui/core/cldr/fi.json +469 -1
- package/src/sap/ui/core/cldr/fr.json +469 -1
- package/src/sap/ui/core/cldr/fr_BE.json +469 -1
- package/src/sap/ui/core/cldr/fr_CA.json +469 -1
- package/src/sap/ui/core/cldr/fr_CH.json +469 -1
- package/src/sap/ui/core/cldr/fr_LU.json +469 -1
- package/src/sap/ui/core/cldr/he.json +469 -1
- package/src/sap/ui/core/cldr/hi.json +469 -1
- package/src/sap/ui/core/cldr/hr.json +469 -1
- package/src/sap/ui/core/cldr/hu.json +469 -1
- package/src/sap/ui/core/cldr/id.json +469 -1
- package/src/sap/ui/core/cldr/it.json +469 -1
- package/src/sap/ui/core/cldr/it_CH.json +469 -1
- package/src/sap/ui/core/cldr/ja.json +469 -1
- package/src/sap/ui/core/cldr/kk.json +469 -1
- package/src/sap/ui/core/cldr/ko.json +469 -1
- package/src/sap/ui/core/cldr/lt.json +469 -1
- package/src/sap/ui/core/cldr/lv.json +469 -1
- package/src/sap/ui/core/cldr/ms.json +469 -1
- package/src/sap/ui/core/cldr/nb.json +469 -1
- package/src/sap/ui/core/cldr/nl.json +469 -1
- package/src/sap/ui/core/cldr/nl_BE.json +469 -1
- package/src/sap/ui/core/cldr/pl.json +469 -1
- package/src/sap/ui/core/cldr/pt.json +469 -1
- package/src/sap/ui/core/cldr/pt_PT.json +469 -1
- package/src/sap/ui/core/cldr/ro.json +469 -1
- package/src/sap/ui/core/cldr/ru.json +469 -1
- package/src/sap/ui/core/cldr/ru_UA.json +469 -1
- package/src/sap/ui/core/cldr/sk.json +469 -1
- package/src/sap/ui/core/cldr/sl.json +469 -1
- package/src/sap/ui/core/cldr/sr.json +469 -1
- package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
- package/src/sap/ui/core/cldr/sv.json +469 -1
- package/src/sap/ui/core/cldr/th.json +469 -1
- package/src/sap/ui/core/cldr/tr.json +469 -1
- package/src/sap/ui/core/cldr/uk.json +469 -1
- package/src/sap/ui/core/cldr/vi.json +469 -1
- package/src/sap/ui/core/cldr/zh_CN.json +470 -2
- package/src/sap/ui/core/cldr/zh_HK.json +470 -2
- package/src/sap/ui/core/cldr/zh_SG.json +470 -2
- package/src/sap/ui/core/cldr/zh_TW.json +469 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
- package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
- 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 +41 -26
- package/src/sap/ui/core/format/NumberFormat.js +28 -28
- package/src/sap/ui/core/format/TimezoneUtil.js +48 -16
- 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/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -1
- package/src/sap/ui/core/mvc/XMLView.js +12 -20
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -62
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +3 -3
- 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/Router.js +1 -1
- package/src/sap/ui/core/rules/App.support.js +8 -8
- package/src/sap/ui/core/rules/Config.support.js +12 -12
- package/src/sap/ui/core/rules/Model.support.js +8 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +4 -4
- package/src/sap/ui/core/rules/View.support.js +9 -9
- 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 +2 -2
- package/src/sap/ui/core/support/plugins/ControlTree.js +7 -3
- 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 +8 -22
- package/src/sap/ui/core/support/support.html +1 -1
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
- package/src/sap/ui/core/themes/base/base.less +4 -4
- package/src/sap/ui/core/themes/base/global.less +2 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +2 -0
- 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 +2 -2
- 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/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +7 -8
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +127 -21
- 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/ListBinding.js +32 -13
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +3 -1
- package/src/sap/ui/model/json/JSONListBinding.js +0 -58
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +0 -42
- 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 +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/OperationMode.js +6 -0
- 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 -2
- 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 +13 -4
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +107 -34
- package/src/sap/ui/model/odata/v2/ODataModel.js +70 -22
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -4
- package/src/sap/ui/model/odata/v4/Context.js +25 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +55 -26
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
- package/src/sap/ui/model/odata/v4/ODataModel.js +111 -5
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +25 -65
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +109 -39
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +57 -28
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLListBinding.js +0 -53
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/actions/Action.js +3 -3
- package/src/sap/ui/test/actions/Press.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/ui5.yaml +1 -1
|
@@ -36,6 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
"sap/ui/core/library",
|
|
37
37
|
"sap/ui/core/message/Message",
|
|
38
38
|
"sap/ui/core/message/MessageParser",
|
|
39
|
+
"sap/ui/model/_Helper",
|
|
39
40
|
"sap/ui/model/BindingMode",
|
|
40
41
|
"sap/ui/model/Context",
|
|
41
42
|
"sap/ui/model/FilterProcessor",
|
|
@@ -55,9 +56,9 @@ sap.ui.define([
|
|
|
55
56
|
], function(_CreatedContextsCache, Context, ODataAnnotations, ODataContextBinding, ODataListBinding,
|
|
56
57
|
ODataTreeBinding, assert, Log, encodeURL, deepEqual, deepExtend, each, extend,
|
|
57
58
|
isEmptyObject, isPlainObject, merge, uid, UriParameters, SyncPromise, coreLibrary, Message,
|
|
58
|
-
MessageParser, BindingMode, BaseContext, FilterProcessor, Model, CountMode,
|
|
59
|
-
ODataMetadata, ODataMetaModel, ODataMessageParser, ODataPropertyBinding,
|
|
60
|
-
OperationMode, UpdateMethod, OData, URI, isCrossOriginURL
|
|
59
|
+
MessageParser, _Helper, BindingMode, BaseContext, FilterProcessor, Model, CountMode,
|
|
60
|
+
MessageScope, ODataMetadata, ODataMetaModel, ODataMessageParser, ODataPropertyBinding,
|
|
61
|
+
ODataUtils, OperationMode, UpdateMethod, OData, URI, isCrossOriginURL
|
|
61
62
|
) {
|
|
62
63
|
|
|
63
64
|
"use strict";
|
|
@@ -202,7 +203,7 @@ sap.ui.define([
|
|
|
202
203
|
* This model is not prepared to be inherited from.
|
|
203
204
|
*
|
|
204
205
|
* @author SAP SE
|
|
205
|
-
* @version 1.
|
|
206
|
+
* @version 1.102.0
|
|
206
207
|
*
|
|
207
208
|
* @public
|
|
208
209
|
* @alias sap.ui.model.odata.v2.ODataModel
|
|
@@ -356,9 +357,8 @@ sap.ui.define([
|
|
|
356
357
|
this.oMessageParser = oMessageParser;
|
|
357
358
|
|
|
358
359
|
//collect internal changes in a deferred group as default
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.setChangeGroups({"*":{groupId: this.sDefaultChangeGroup}});
|
|
360
|
+
this.setDeferredGroups(["changes"]);
|
|
361
|
+
this.setChangeGroups({"*":{groupId: "changes"}});
|
|
362
362
|
|
|
363
363
|
this.oData = {};
|
|
364
364
|
this.oMetadata = null;
|
|
@@ -2015,9 +2015,10 @@ sap.ui.define([
|
|
|
2015
2015
|
* if not specified, the default operation mode of this model is used
|
|
2016
2016
|
* @param {boolean} [mParameters.faultTolerant] Turns on the fault tolerance mode, data is not reset if a backend request returns an error
|
|
2017
2017
|
* @param {string} [mParameters.batchGroupId] Sets the batch group ID to be used for requests originating from this binding
|
|
2018
|
-
* @param {int} [mParameters.threshold]
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2018
|
+
* @param {int} [mParameters.threshold]
|
|
2019
|
+
* Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
|
|
2020
|
+
* the threshold that defines how many entries should be fetched at least by the binding if
|
|
2021
|
+
* <code>operationMode</code> is set to <code>Auto</code>
|
|
2021
2022
|
* @returns {sap.ui.model.ListBinding} The new list binding
|
|
2022
2023
|
* @see sap.ui.model.Model.prototype.bindList
|
|
2023
2024
|
* @public
|
|
@@ -2069,6 +2070,7 @@ sap.ui.define([
|
|
|
2069
2070
|
* <code>hierarchy-node-descendant-count-for</code> annotation. Services with hierarchy
|
|
2070
2071
|
* annotations including the <code>hierarchy-node-descendant-count-for</code> annotation, do
|
|
2071
2072
|
* <b>not</b> support the operation modes <code>Client</code> and <code>Auto</code>.
|
|
2073
|
+
* <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
|
|
2072
2074
|
*
|
|
2073
2075
|
* @param {string} sPath
|
|
2074
2076
|
* The binding path, either absolute or relative to a given <code>oContext</code>
|
|
@@ -2109,12 +2111,14 @@ sap.ui.define([
|
|
|
2109
2111
|
* specified. {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto} is only
|
|
2110
2112
|
* supported for services which expose the hierarchy annotations, yet do <b>NOT</b> expose the
|
|
2111
2113
|
* <code>hierarchy-node-descendant-count-for</code> annotation.
|
|
2114
|
+
* <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
|
|
2112
2115
|
* @param {number} [mParameters.threshold]
|
|
2113
|
-
*
|
|
2114
|
-
*
|
|
2115
|
-
*
|
|
2116
|
+
* Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
|
|
2117
|
+
* the threshold that defines how many entries should be fetched at least by the binding if
|
|
2118
|
+
* <code>operationMode</code> is set to <code>Auto</code>
|
|
2116
2119
|
* @param {boolean} [mParameters.useServersideApplicationFilters]
|
|
2117
|
-
*
|
|
2120
|
+
* Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
|
|
2121
|
+
* whether <code>$filter</code> statements should be used for the <code>$count</code> /
|
|
2118
2122
|
* <code>$inlinecount</code> requests and for the data request if the operation mode is
|
|
2119
2123
|
* {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto}. Use this feature only
|
|
2120
2124
|
* if your back end supports pre-filtering the tree and is capable of responding with
|
|
@@ -4311,10 +4315,10 @@ sap.ui.define([
|
|
|
4311
4315
|
if (oEntityType) {
|
|
4312
4316
|
mEntityTypes[oEntityType.entityType] = true;
|
|
4313
4317
|
}
|
|
4314
|
-
if (oRequest.key) {
|
|
4318
|
+
if (oRequest.key) {
|
|
4315
4319
|
// for createEntry entities change context path to new one
|
|
4316
4320
|
if (oRequest.created) {
|
|
4317
|
-
var sKey = this._getKey(oResultData);
|
|
4321
|
+
var sKey = this._getKey(oResultData);
|
|
4318
4322
|
// rewrite context for new path
|
|
4319
4323
|
var oContext = this.getContext("/" + oRequest.key);
|
|
4320
4324
|
sDeepPath = oRequest.deepPath;
|
|
@@ -4332,6 +4336,8 @@ sap.ui.define([
|
|
|
4332
4336
|
oEntity = this._getEntity(sKey);
|
|
4333
4337
|
if (oEntity) {
|
|
4334
4338
|
delete oEntity.__metadata.created;
|
|
4339
|
+
// before deleting the old entity copy and update the changes
|
|
4340
|
+
this._keepChangesAfterCreate(oRequest, oEntity, sKey);
|
|
4335
4341
|
}
|
|
4336
4342
|
this._removeEntity(oRequest.key);
|
|
4337
4343
|
} else {
|
|
@@ -4368,6 +4374,46 @@ sap.ui.define([
|
|
|
4368
4374
|
return true;
|
|
4369
4375
|
};
|
|
4370
4376
|
|
|
4377
|
+
/**
|
|
4378
|
+
* Creates a new <code>mChangedEntities</code> entry for the <code>sKey</code> for the just
|
|
4379
|
+
* created entity and takes all changes which have been made after this create has been
|
|
4380
|
+
* submitted.
|
|
4381
|
+
*
|
|
4382
|
+
* @param {object} oRequest
|
|
4383
|
+
* The request object for a created entity
|
|
4384
|
+
* @param {object} oEntity
|
|
4385
|
+
* The persisted and retrieved entity object
|
|
4386
|
+
* @param {string} sKey
|
|
4387
|
+
* The key of the created entity
|
|
4388
|
+
*
|
|
4389
|
+
* @private
|
|
4390
|
+
*/
|
|
4391
|
+
ODataModel.prototype._keepChangesAfterCreate = function (oRequest, oEntity, sKey) {
|
|
4392
|
+
var oKey2Entity, aNavProps, sProperty,
|
|
4393
|
+
oChangedEntity = this.mChangedEntities[oRequest.key];
|
|
4394
|
+
|
|
4395
|
+
if (oChangedEntity) {
|
|
4396
|
+
aNavProps = this.oMetadata._getNavigationPropertyNames(
|
|
4397
|
+
this.oMetadata._getEntityTypeByPath(sKey));
|
|
4398
|
+
oChangedEntity = _Helper.merge({}, oChangedEntity);
|
|
4399
|
+
oChangedEntity.__metadata = _Helper.merge({}, oEntity.__metadata);
|
|
4400
|
+
oChangedEntity.__metadata.deepPath = oRequest.deepPath;
|
|
4401
|
+
for (sProperty in oRequest.data) {
|
|
4402
|
+
if (_Helper.deepEqual(oRequest.data[sProperty], oChangedEntity[sProperty])
|
|
4403
|
+
|| aNavProps.includes(sProperty)) {
|
|
4404
|
+
delete oChangedEntity[sProperty];
|
|
4405
|
+
}
|
|
4406
|
+
}
|
|
4407
|
+
this.mChangedEntities[sKey] = oChangedEntity;
|
|
4408
|
+
oKey2Entity = {};
|
|
4409
|
+
oKey2Entity[sKey] = oEntity;
|
|
4410
|
+
this._updateChangedEntities(oKey2Entity);
|
|
4411
|
+
// cleanup also further POST request for the just created entity
|
|
4412
|
+
this.abortInternalRequest(this._resolveGroup(oRequest.key).groupId,
|
|
4413
|
+
{requestKey: oRequest.key});
|
|
4414
|
+
}
|
|
4415
|
+
};
|
|
4416
|
+
|
|
4371
4417
|
/**
|
|
4372
4418
|
* Process request response for failed requests.
|
|
4373
4419
|
*
|
|
@@ -6847,12 +6893,7 @@ sap.ui.define([
|
|
|
6847
6893
|
throw new Error("The 'expand' parameter is only supported if batch mode is used");
|
|
6848
6894
|
}
|
|
6849
6895
|
bCanonical = this._isCanonicalRequestNeeded(bCanonical);
|
|
6850
|
-
|
|
6851
6896
|
mHeaders = mHeaders || {};
|
|
6852
|
-
|
|
6853
|
-
bRefreshAfterChange = this._getRefreshAfterChange(bRefreshAfterChange, sGroupId);
|
|
6854
|
-
|
|
6855
|
-
sGroupId = sGroupId ? sGroupId : this.sDefaultChangeGroup;
|
|
6856
6897
|
aUrlParams = ODataUtils._createUrlParamsArray(mUrlParams);
|
|
6857
6898
|
|
|
6858
6899
|
var oRequestHandle = {
|
|
@@ -6875,11 +6916,18 @@ sap.ui.define([
|
|
|
6875
6916
|
|
|
6876
6917
|
function create() {
|
|
6877
6918
|
var oCreateData, oCreatedContext, oCreateResponse, oEntitySetMetadata, oExpandRequest,
|
|
6878
|
-
sUID,
|
|
6919
|
+
oGroupInfo, sUID,
|
|
6879
6920
|
bCreateFailed = false,
|
|
6880
6921
|
fnErrorFromParameters = fnError,
|
|
6881
6922
|
fnSuccessFromParameters = fnSuccess;
|
|
6882
6923
|
|
|
6924
|
+
// fallback to groups as defined in mChangeGroups; using path is OK as we don't have an
|
|
6925
|
+
// entity yet and the entity type can be derived from the path to determine the group ID
|
|
6926
|
+
oGroupInfo = that._resolveGroup(sNormalizedPath);
|
|
6927
|
+
sGroupId = sGroupId || oGroupInfo.groupId;
|
|
6928
|
+
sChangeSetId = sChangeSetId || oGroupInfo.changeSetId;
|
|
6929
|
+
bRefreshAfterChange = that._getRefreshAfterChange(bRefreshAfterChange, sGroupId);
|
|
6930
|
+
|
|
6883
6931
|
var oEntityMetadata = that.oMetadata._getEntityTypeByPath(sNormalizedPath);
|
|
6884
6932
|
if (!oEntityMetadata) {
|
|
6885
6933
|
|
|
@@ -65,10 +65,12 @@ sap.ui.define([
|
|
|
65
65
|
* @param {sap.ui.model.odata.OperationMode} [mParameters.operationMode]
|
|
66
66
|
* The operation mode for this binding
|
|
67
67
|
* @param {number} [mParameters.threshold]
|
|
68
|
-
*
|
|
69
|
-
*
|
|
68
|
+
* Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
|
|
69
|
+
* the threshold that defines how many entries should be fetched at least by the binding if
|
|
70
|
+
* <code>operationMode</code> is set to <code>Auto</code>
|
|
70
71
|
* @param {boolean} [mParameters.useServersideApplicationFilters]
|
|
71
|
-
*
|
|
72
|
+
* Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
|
|
73
|
+
* whether <code>$filter</code> statements should be used for the <code>$count</code> /
|
|
72
74
|
* <code>$inlinecount</code> requests and for the data request if the operation mode is
|
|
73
75
|
* {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto}
|
|
74
76
|
* @param {any} [mParameters.treeState]
|
|
@@ -92,7 +94,7 @@ sap.ui.define([
|
|
|
92
94
|
* @extends sap.ui.model.TreeBinding
|
|
93
95
|
* @hideconstructor
|
|
94
96
|
* @public
|
|
95
|
-
* @version 1.
|
|
97
|
+
* @version 1.102.0
|
|
96
98
|
*/
|
|
97
99
|
var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
|
|
98
100
|
|
|
@@ -1558,6 +1560,7 @@ sap.ui.define([
|
|
|
1558
1560
|
* instance. If it is set, the filters of type <code>Application</code> will always be applied
|
|
1559
1561
|
* on the back end and trigger an OData request.
|
|
1560
1562
|
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
1563
|
+
* <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
|
|
1561
1564
|
*
|
|
1562
1565
|
* @param {sap.ui.model.Filter[]|sap.ui.model.Filter} aFilters
|
|
1563
1566
|
* Filter or array of filters to apply
|
|
@@ -1724,6 +1727,7 @@ sap.ui.define([
|
|
|
1724
1727
|
* Sorts the Tree according to the given Sorter(s). In <code>OperationMode.Client</code> or
|
|
1725
1728
|
* <code>OperationMode.Auto</code> (if the given threshold is satisfied), the sorters are
|
|
1726
1729
|
* applied locally on the client.
|
|
1730
|
+
* <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
|
|
1727
1731
|
*
|
|
1728
1732
|
* @param {sap.ui.model.Sorter[]|sap.ui.model.Sorter} aSorters
|
|
1729
1733
|
* The Sorter or an Array of sap.ui.model.Sorter instances
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @hideconstructor
|
|
43
43
|
* @public
|
|
44
44
|
* @since 1.39.0
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.102.0
|
|
46
46
|
*/
|
|
47
47
|
Context = BaseContext.extend("sap.ui.model.odata.v4.Context", {
|
|
48
48
|
constructor : constructor
|
|
@@ -379,6 +379,10 @@ sap.ui.define([
|
|
|
379
379
|
oDependentBinding.setContext(undefined);
|
|
380
380
|
});
|
|
381
381
|
this.oBinding = undefined;
|
|
382
|
+
this.oCreatedPromise = undefined;
|
|
383
|
+
this.oSyncCreatePromise = undefined;
|
|
384
|
+
this.bInactive = undefined;
|
|
385
|
+
this.bKeepAlive = undefined;
|
|
382
386
|
// When removing oModel, ManagedObject#getBindingContext does not return the destroyed
|
|
383
387
|
// context although the control still refers to it
|
|
384
388
|
this.oModel = undefined;
|
|
@@ -406,8 +410,28 @@ sap.ui.define([
|
|
|
406
410
|
*/
|
|
407
411
|
Context.prototype.doSetProperty = function (sPath, vValue, oGroupLock, bSkipRetry) {
|
|
408
412
|
var oMetaModel = this.oModel.getMetaModel(),
|
|
413
|
+
oPromise,
|
|
414
|
+
oValue,
|
|
409
415
|
that = this;
|
|
410
416
|
|
|
417
|
+
if (oGroupLock && this.isTransient() && !this.isInactive()) {
|
|
418
|
+
oValue = this.getValue();
|
|
419
|
+
oPromise = oValue && _Helper.getPrivateAnnotation(oValue, "transient");
|
|
420
|
+
if (oPromise instanceof Promise) {
|
|
421
|
+
oGroupLock.unlock();
|
|
422
|
+
oGroupLock = oGroupLock.getUnlockedCopy();
|
|
423
|
+
this.doSetProperty(sPath, vValue, null, true) // early UI update
|
|
424
|
+
.catch(this.oModel.getReporter());
|
|
425
|
+
|
|
426
|
+
return oPromise.then(function (bSuccess) {
|
|
427
|
+
// in case of success, wait until creation is completed because context path's
|
|
428
|
+
// key predicate is adjusted
|
|
429
|
+
return bSuccess && that.created();
|
|
430
|
+
}).then(function () {
|
|
431
|
+
return that.doSetProperty(sPath, vValue, oGroupLock, bSkipRetry);
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
411
435
|
if (this.oModel.bAutoExpandSelect) {
|
|
412
436
|
sPath = oMetaModel.getReducedPath(
|
|
413
437
|
this.oModel.resolve(sPath, this),
|
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
75
75
|
* @public
|
|
76
76
|
* @since 1.37.0
|
|
77
|
-
* @version 1.
|
|
77
|
+
* @version 1.102.0
|
|
78
78
|
*
|
|
79
79
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
80
80
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
59
59
|
* @public
|
|
60
60
|
* @since 1.37.0
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.102.0
|
|
62
62
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
63
63
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
64
64
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -143,6 +143,7 @@ sap.ui.define([
|
|
|
143
143
|
// A kept-alive context may be parked here for a longer time, with undefined index.
|
|
144
144
|
this.mPreviousContextsByPath = {};
|
|
145
145
|
this.aPreviousData = [];
|
|
146
|
+
this.bRefreshKeptElements = false; // refresh kept elements when resuming?
|
|
146
147
|
this.bSharedRequest = mParameters.$$sharedRequest || oModel.bSharedRequests;
|
|
147
148
|
this.aSorters = _Helper.toArray(vSorters);
|
|
148
149
|
this.sUpdateGroupId = mParameters.$$updateGroupId;
|
|
@@ -795,8 +796,7 @@ sap.ui.define([
|
|
|
795
796
|
* contexts within this list.
|
|
796
797
|
* @param {boolean} [bInactive]
|
|
797
798
|
* Create an inactive context. Such a context will only be sent to the server after the first
|
|
798
|
-
* property update. From then on it behaves like any other created context.
|
|
799
|
-
* experimental and its implementation may still change. Do not use it in productive code yet.
|
|
799
|
+
* property update. From then on it behaves like any other created context.
|
|
800
800
|
* Supported since 1.97.0
|
|
801
801
|
* <p>
|
|
802
802
|
* Since 1.98.0, when the first property updates happens, the context is no longer
|
|
@@ -916,11 +916,11 @@ sap.ui.define([
|
|
|
916
916
|
this.iCreatedContexts += 1;
|
|
917
917
|
oContext = Context.create(this.oModel, this, sTransientPath, -this.iCreatedContexts,
|
|
918
918
|
oCreatePromise, bInactive);
|
|
919
|
-
|
|
919
|
+
// to make sure that #fetchValue does not overtake #createInCache, avoid bCached flag!
|
|
920
|
+
oContext.fetchValue().then(function (oElement) {
|
|
920
921
|
if (oElement) {
|
|
921
922
|
_Helper.setPrivateAnnotation(oElement, "context", oContext);
|
|
922
|
-
_Helper.setPrivateAnnotation(oElement, "firstCreateAtEnd",
|
|
923
|
-
that.bFirstCreateAtEnd);
|
|
923
|
+
_Helper.setPrivateAnnotation(oElement, "firstCreateAtEnd", that.bFirstCreateAtEnd);
|
|
924
924
|
} // else: context already destroyed
|
|
925
925
|
});
|
|
926
926
|
|
|
@@ -997,8 +997,9 @@ sap.ui.define([
|
|
|
997
997
|
sPredicate = _Helper.getPrivateAnnotation(aResults[i], "predicate");
|
|
998
998
|
sContextPath = sPath + (sPredicate || "/" + i$skipIndex);
|
|
999
999
|
oContext = this.mPreviousContextsByPath[sContextPath];
|
|
1000
|
-
if (oContext && !oContext.created()) {
|
|
1001
|
-
// reuse the previous context, unless it is created (and persisted)
|
|
1000
|
+
if (oContext && (!oContext.created() || oContext.isKeepAlive())) {
|
|
1001
|
+
// reuse the previous context, unless it is created (and persisted), but not
|
|
1002
|
+
// kept alive
|
|
1002
1003
|
delete this.mPreviousContextsByPath[sContextPath];
|
|
1003
1004
|
oContext.iIndex = i$skipIndex;
|
|
1004
1005
|
oContext.checkUpdate();
|
|
@@ -1830,7 +1831,9 @@ sap.ui.define([
|
|
|
1830
1831
|
|
|
1831
1832
|
return this.aContexts.filter(function (oContext) {
|
|
1832
1833
|
return oContext;
|
|
1833
|
-
}).concat(Object.values(this.mPreviousContextsByPath))
|
|
1834
|
+
}).concat(Object.values(this.mPreviousContextsByPath).filter(function (oContext) {
|
|
1835
|
+
return oContext.isKeepAlive();
|
|
1836
|
+
}));
|
|
1834
1837
|
};
|
|
1835
1838
|
|
|
1836
1839
|
/**
|
|
@@ -2159,6 +2162,7 @@ sap.ui.define([
|
|
|
2159
2162
|
*
|
|
2160
2163
|
* @public
|
|
2161
2164
|
* @see sap.ui.model.ListBinding#getCurrentContexts
|
|
2165
|
+
* @see #getAllCurrentContexts
|
|
2162
2166
|
* @since 1.39.0
|
|
2163
2167
|
*/
|
|
2164
2168
|
// @override sap.ui.model.ListBinding#getCurrentContexts
|
|
@@ -2694,7 +2698,9 @@ sap.ui.define([
|
|
|
2694
2698
|
}
|
|
2695
2699
|
|
|
2696
2700
|
if (this.isRootBindingSuspended()) {
|
|
2701
|
+
// Note: side-effects (incl. refresh) are forbidden while suspended
|
|
2697
2702
|
this.refreshSuspended(sGroupId);
|
|
2703
|
+
this.bRefreshKeptElements = true;
|
|
2698
2704
|
return SyncPromise.all(refreshAll(that.getDependentBindings()));
|
|
2699
2705
|
}
|
|
2700
2706
|
|
|
@@ -2711,21 +2717,7 @@ sap.ui.define([
|
|
|
2711
2717
|
that.removeCachesAndMessages(sResourcePathPrefix);
|
|
2712
2718
|
that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true,
|
|
2713
2719
|
bKeepCacheOnError ? sGroupId : undefined);
|
|
2714
|
-
oKeptElementsPromise = that.
|
|
2715
|
-
return oNewCache.refreshKeptElements(that.lockGroup(sGroupId),
|
|
2716
|
-
function onRemove(sPredicate, iIndex) {
|
|
2717
|
-
if (iIndex === undefined) {
|
|
2718
|
-
that.mPreviousContextsByPath[that.getResolvedPath() + sPredicate]
|
|
2719
|
-
.resetKeepAlive();
|
|
2720
|
-
} else { // Note: implies oContext.created()
|
|
2721
|
-
that.destroyCreated(that.aContexts[iIndex]);
|
|
2722
|
-
}
|
|
2723
|
-
});
|
|
2724
|
-
}).catch(function (oError) {
|
|
2725
|
-
that.oModel.reportError("Failed to refresh kept-alive elements", sClassName,
|
|
2726
|
-
oError);
|
|
2727
|
-
throw oError;
|
|
2728
|
-
});
|
|
2720
|
+
oKeptElementsPromise = that.refreshKeptElements(sGroupId);
|
|
2729
2721
|
if (that.iCurrentEnd > 0) {
|
|
2730
2722
|
oPromise = that.createRefreshPromise().catch(function (oError) {
|
|
2731
2723
|
if (!bKeepCacheOnError || oError.canceled) {
|
|
@@ -2762,7 +2754,7 @@ sap.ui.define([
|
|
|
2762
2754
|
}
|
|
2763
2755
|
// Note: after reset the dependent bindings cannot be found any more
|
|
2764
2756
|
aDependentBindings = that.getDependentBindings();
|
|
2765
|
-
|
|
2757
|
+
// this may reset that.oRefreshPromise
|
|
2766
2758
|
that.reset(ChangeReason.Refresh, bKeepCacheOnError ? false : undefined, sGroupId);
|
|
2767
2759
|
return SyncPromise.all(
|
|
2768
2760
|
refreshAll(aDependentBindings).concat(oPromise, oKeptElementsPromise)
|
|
@@ -2774,6 +2766,37 @@ sap.ui.define([
|
|
|
2774
2766
|
});
|
|
2775
2767
|
};
|
|
2776
2768
|
|
|
2769
|
+
/**
|
|
2770
|
+
* Refreshes the kept-alive elements. This needs to be called before the cache has filled the
|
|
2771
|
+
* collection.
|
|
2772
|
+
*
|
|
2773
|
+
* @param {string} sGroupId
|
|
2774
|
+
* The effective group ID
|
|
2775
|
+
* @returns {sap.ui.base.SyncPromise}
|
|
2776
|
+
* A promise resolving without a defined result, or rejecting with an error if the refresh
|
|
2777
|
+
* fails.
|
|
2778
|
+
*
|
|
2779
|
+
* @private
|
|
2780
|
+
*/
|
|
2781
|
+
ODataListBinding.prototype.refreshKeptElements = function (sGroupId) {
|
|
2782
|
+
var that = this;
|
|
2783
|
+
|
|
2784
|
+
return this.oCachePromise.then(function (oCache) {
|
|
2785
|
+
return oCache.refreshKeptElements(that.lockGroup(sGroupId),
|
|
2786
|
+
function onRemove(sPredicate, iIndex) {
|
|
2787
|
+
if (iIndex === undefined) {
|
|
2788
|
+
that.mPreviousContextsByPath[that.getResolvedPath() + sPredicate]
|
|
2789
|
+
.resetKeepAlive();
|
|
2790
|
+
} else { // Note: implies oContext.created()
|
|
2791
|
+
that.destroyCreated(that.aContexts[iIndex]);
|
|
2792
|
+
}
|
|
2793
|
+
});
|
|
2794
|
+
}).catch(function (oError) {
|
|
2795
|
+
that.oModel.reportError("Failed to refresh kept-alive elements", sClassName, oError);
|
|
2796
|
+
throw oError;
|
|
2797
|
+
});
|
|
2798
|
+
};
|
|
2799
|
+
|
|
2777
2800
|
/**
|
|
2778
2801
|
* Refreshes the single entity the given <code>oContext</code> is pointing to, refreshes also
|
|
2779
2802
|
* dependent bindings and checks for updates once the data is received.
|
|
@@ -3273,7 +3296,8 @@ sap.ui.define([
|
|
|
3273
3296
|
ODataListBinding.prototype.resumeInternal = function (_bCheckUpdate, bParentHasChanges) {
|
|
3274
3297
|
var aBindings = this.getDependentBindings(),
|
|
3275
3298
|
sResumeChangeReason = this.sResumeChangeReason,
|
|
3276
|
-
bRefresh = bParentHasChanges || sResumeChangeReason
|
|
3299
|
+
bRefresh = bParentHasChanges || sResumeChangeReason,
|
|
3300
|
+
that = this;
|
|
3277
3301
|
|
|
3278
3302
|
this.sResumeChangeReason = undefined;
|
|
3279
3303
|
|
|
@@ -3283,6 +3307,11 @@ sap.ui.define([
|
|
|
3283
3307
|
// if the parent binding resumes but there are no changes in the parent binding
|
|
3284
3308
|
// ignore the parent cache and create an own cache
|
|
3285
3309
|
this.fetchCache(this.oContext, !bParentHasChanges);
|
|
3310
|
+
|
|
3311
|
+
if (this.bRefreshKeptElements) {
|
|
3312
|
+
this.bRefreshKeptElements = false;
|
|
3313
|
+
that.refreshKeptElements(that.getGroupId());
|
|
3314
|
+
}
|
|
3286
3315
|
}
|
|
3287
3316
|
aBindings.forEach(function (oDependentBinding) {
|
|
3288
3317
|
// do not call checkUpdate in dependent property bindings if the cache of this
|
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
* @hideconstructor
|
|
158
158
|
* @public
|
|
159
159
|
* @since 1.37.0
|
|
160
|
-
* @version 1.
|
|
160
|
+
* @version 1.102.0
|
|
161
161
|
*/
|
|
162
162
|
ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
|
|
163
163
|
constructor : constructor
|
|
@@ -1405,10 +1405,17 @@ sap.ui.define([
|
|
|
1405
1405
|
sTarget = sName = sSchemaChildName
|
|
1406
1406
|
= sSchemaChildName || mScope.$EntityContainer;
|
|
1407
1407
|
vResult = oSchemaChild = oSchemaChild || mScope[sSchemaChildName];
|
|
1408
|
-
if (Array.isArray(vResult)
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1408
|
+
if (Array.isArray(vResult)) {
|
|
1409
|
+
if (vBindingParameterType) {
|
|
1410
|
+
vResult = vResult.filter(isRightOverload);
|
|
1411
|
+
}
|
|
1412
|
+
if (isParameter(sSegment, vResult[0])) {
|
|
1413
|
+
// path evaluation relative to an operation overload
|
|
1414
|
+
// @see [OData-CSDL-JSON-v4.01] "14.4.1.2 Path Evaluation"
|
|
1415
|
+
// or ".../@$ui5.overload/0/$Parameter/<i>/$Name/$" to refer
|
|
1416
|
+
// back to (overloaded) operation's parameter
|
|
1417
|
+
return true;
|
|
1418
|
+
}
|
|
1412
1419
|
}
|
|
1413
1420
|
if (sSegment && sSegment[0] !== "@"
|
|
1414
1421
|
&& !(sSegment in oSchemaChild)) {
|
|
@@ -1828,7 +1835,7 @@ sap.ui.define([
|
|
|
1828
1835
|
if (!oEntity) {
|
|
1829
1836
|
error("No instance to calculate key predicate at " + vSegment.path);
|
|
1830
1837
|
}
|
|
1831
|
-
if (
|
|
1838
|
+
if (oEntity["@$ui5.context.isTransient"]) {
|
|
1832
1839
|
bNoEditUrl = true;
|
|
1833
1840
|
return undefined;
|
|
1834
1841
|
}
|
|
@@ -35,6 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
"sap/base/assert",
|
|
36
36
|
"sap/base/Log",
|
|
37
37
|
"sap/ui/base/SyncPromise",
|
|
38
|
+
"sap/ui/core/cache/CacheManager",
|
|
38
39
|
"sap/ui/core/library",
|
|
39
40
|
"sap/ui/core/message/Message",
|
|
40
41
|
"sap/ui/model/BindingMode",
|
|
@@ -44,7 +45,8 @@ sap.ui.define([
|
|
|
44
45
|
"sap/ui/thirdparty/URI"
|
|
45
46
|
], function (ODataContextBinding, ODataListBinding, ODataMetaModel, ODataPropertyBinding,
|
|
46
47
|
SubmitMode, _GroupLock, _Helper, _MetadataRequestor, _Parser, _Requestor, assert, Log,
|
|
47
|
-
SyncPromise, coreLibrary, Message, BindingMode, BaseContext, Model,
|
|
48
|
+
SyncPromise, CacheManager, coreLibrary, Message, BindingMode, BaseContext, Model,
|
|
49
|
+
OperationMode, URI) {
|
|
48
50
|
"use strict";
|
|
49
51
|
|
|
50
52
|
var rApplicationGroupID = /^\w+$/,
|
|
@@ -212,7 +214,7 @@ sap.ui.define([
|
|
|
212
214
|
* @extends sap.ui.model.Model
|
|
213
215
|
* @public
|
|
214
216
|
* @since 1.37.0
|
|
215
|
-
* @version 1.
|
|
217
|
+
* @version 1.102.0
|
|
216
218
|
*/
|
|
217
219
|
ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
218
220
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
|
|
@@ -1216,12 +1218,13 @@ sap.ui.define([
|
|
|
1216
1218
|
ODataModel.prototype.createUI5Message = function (oRawMessage, sResourcePath, sCachePath) {
|
|
1217
1219
|
var bIsBound = typeof oRawMessage.target === "string",
|
|
1218
1220
|
sMessageLongtextUrl = oRawMessage.longtextUrl,
|
|
1219
|
-
aTargets
|
|
1221
|
+
aTargets,
|
|
1222
|
+
that = this;
|
|
1220
1223
|
|
|
1221
1224
|
function resolveTarget(sTarget) {
|
|
1222
|
-
return sTarget[0] === "/"
|
|
1225
|
+
return that.normalizeMessageTarget(sTarget[0] === "/"
|
|
1223
1226
|
? sTarget
|
|
1224
|
-
: _Helper.buildPath("/" + sResourcePath, sCachePath, sTarget);
|
|
1227
|
+
: _Helper.buildPath("/" + sResourcePath, sCachePath, sTarget));
|
|
1225
1228
|
}
|
|
1226
1229
|
|
|
1227
1230
|
if (bIsBound) {
|
|
@@ -1973,6 +1976,84 @@ sap.ui.define([
|
|
|
1973
1976
|
}
|
|
1974
1977
|
};
|
|
1975
1978
|
|
|
1979
|
+
/**
|
|
1980
|
+
* Normalizes the key predicates of a message's target using the sort order from the metadata,
|
|
1981
|
+
* including proper URI encoding, e.g. "(Sector='A%2FB%26C',ID='42')" or "('42')".
|
|
1982
|
+
*
|
|
1983
|
+
* @param {string} sTarget
|
|
1984
|
+
* The message target
|
|
1985
|
+
* @returns {string}
|
|
1986
|
+
* The normalized message target
|
|
1987
|
+
*
|
|
1988
|
+
* @private
|
|
1989
|
+
*/
|
|
1990
|
+
ODataModel.prototype.normalizeMessageTarget = function (sTarget) {
|
|
1991
|
+
var sCandidate,
|
|
1992
|
+
bFailed,
|
|
1993
|
+
sMetaPath = "",
|
|
1994
|
+
that = this;
|
|
1995
|
+
|
|
1996
|
+
if (sTarget.includes("$uid=")) {
|
|
1997
|
+
// target containing a transient path is ignored
|
|
1998
|
+
return sTarget;
|
|
1999
|
+
}
|
|
2000
|
+
sCandidate = sTarget.split("/").map(function (sSegment) {
|
|
2001
|
+
var sCollectionName,
|
|
2002
|
+
iBracketIndex = sSegment.indexOf("("),
|
|
2003
|
+
aParts,
|
|
2004
|
+
mProperties,
|
|
2005
|
+
oType;
|
|
2006
|
+
|
|
2007
|
+
/*
|
|
2008
|
+
* Normalizes the value for the given alias.
|
|
2009
|
+
* @param {string} sAlias
|
|
2010
|
+
* The property name/alias
|
|
2011
|
+
* @returns {string|undefined}
|
|
2012
|
+
* The normalized value
|
|
2013
|
+
*/
|
|
2014
|
+
function getNormalizedValue(sAlias) {
|
|
2015
|
+
if (sAlias in mProperties) {
|
|
2016
|
+
return encodeURIComponent(decodeURIComponent(mProperties[sAlias]));
|
|
2017
|
+
}
|
|
2018
|
+
bFailed = true;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
if (iBracketIndex < 0) {
|
|
2022
|
+
sMetaPath = _Helper.buildPath(sMetaPath, sSegment);
|
|
2023
|
+
return sSegment;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
sCollectionName = sSegment.slice(0, iBracketIndex);
|
|
2027
|
+
sMetaPath = _Helper.buildPath(sMetaPath, sCollectionName);
|
|
2028
|
+
mProperties = _Parser.parseKeyPredicate(sSegment.slice(iBracketIndex));
|
|
2029
|
+
|
|
2030
|
+
if ("" in mProperties) {
|
|
2031
|
+
return sCollectionName + "(" + getNormalizedValue("") + ")";
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
// could be async, but normally in this state we should already have
|
|
2035
|
+
// loaded the needed metadata
|
|
2036
|
+
oType = that.oRequestor.fetchTypeForPath("/" + sMetaPath).getResult();
|
|
2037
|
+
|
|
2038
|
+
if (!(oType && oType.$Key)) {
|
|
2039
|
+
bFailed = true;
|
|
2040
|
+
return sSegment;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
aParts = oType.$Key.map(function (sAlias) {
|
|
2044
|
+
var sValue = getNormalizedValue(sAlias);
|
|
2045
|
+
|
|
2046
|
+
return oType.$Key.length > 1
|
|
2047
|
+
? sAlias + "=" + sValue
|
|
2048
|
+
: sValue;
|
|
2049
|
+
});
|
|
2050
|
+
|
|
2051
|
+
return sCollectionName + "(" + aParts.join(",") + ")";
|
|
2052
|
+
}).join("/");
|
|
2053
|
+
|
|
2054
|
+
return bFailed ? sTarget : sCandidate;
|
|
2055
|
+
};
|
|
2056
|
+
|
|
1976
2057
|
/**
|
|
1977
2058
|
* Returns a promise for the "canonical path" of the entity for the given context.
|
|
1978
2059
|
* According to "4.3.1 Canonical URL" of the specification "OData Version 4.0 Part 2: URL
|
|
@@ -2174,6 +2255,7 @@ sap.ui.define([
|
|
|
2174
2255
|
*
|
|
2175
2256
|
* @experimental As of version 1.100.0
|
|
2176
2257
|
* @private
|
|
2258
|
+
* @see cleanUpOptimisticBatch
|
|
2177
2259
|
* @ui5-restricted sap.fe
|
|
2178
2260
|
*/
|
|
2179
2261
|
ODataModel.prototype.setOptimisticBatchEnabler = function (fnOptimisticBatchEnabler) {
|
|
@@ -2265,5 +2347,29 @@ sap.ui.define([
|
|
|
2265
2347
|
});
|
|
2266
2348
|
};
|
|
2267
2349
|
|
|
2350
|
+
//*********************************************************************************************
|
|
2351
|
+
// "static" functions
|
|
2352
|
+
//*********************************************************************************************
|
|
2353
|
+
|
|
2354
|
+
/**
|
|
2355
|
+
* Cleans up the optimistic batch cache to a given point in time.
|
|
2356
|
+
*
|
|
2357
|
+
* @param {Date} [dOlderThan] The point in time from which on older cache entries are deleted.
|
|
2358
|
+
* If not supplied, all optimistic batch entries are deleted.
|
|
2359
|
+
* @returns {Promise} A promise resolving without a defined result, or rejecting with an error
|
|
2360
|
+
* if deletion fails.
|
|
2361
|
+
*
|
|
2362
|
+
* @experimental As of version 1.102.0
|
|
2363
|
+
* @private
|
|
2364
|
+
* @see #setOptimisticBatchEnabler
|
|
2365
|
+
* @ui5-restricted sap.fe
|
|
2366
|
+
*/
|
|
2367
|
+
ODataModel.cleanUpOptimisticBatch = function (dOlderThan) {
|
|
2368
|
+
return CacheManager.delWithFilters({
|
|
2369
|
+
olderThan : dOlderThan,
|
|
2370
|
+
prefix : "sap.ui.model.odata.v4.optimisticBatch:"
|
|
2371
|
+
});
|
|
2372
|
+
};
|
|
2373
|
+
|
|
2268
2374
|
return ODataModel;
|
|
2269
2375
|
});
|
|
@@ -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.102.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
|