@openui5/sap.ui.core 1.100.0 → 1.102.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 +27 -5
- package/THIRDPARTY.txt +5 -5
- 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 +2 -2
- 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/ManagedObjectRegistry.js +10 -5
- 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 +50 -27
- 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 +119 -36
- 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 +6 -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 +136 -5
- package/src/sap/ui/core/Manifest.js +5 -3
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +3 -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 +514 -389
- 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/date/UniversalDateUtils.js +48 -48
- 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 +8 -6
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
- 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 +162 -92
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +3 -0
- package/src/sap/ui/core/format/NumberFormat.js +28 -28
- package/src/sap/ui/core/format/TimezoneUtil.js +50 -18
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +135 -140
- 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 +19 -23
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -59
- 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 +14 -9
- 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 +29 -1
- package/src/sap/ui/core/support/Support.js +2 -2
- package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
- package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
- package/src/sap/ui/core/support/plugins/ControlTree.js +440 -349
- package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
- package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +10 -13
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
- package/src/sap/ui/core/support/plugins/Trace.js +7 -7
- package/src/sap/ui/core/support/plugins/ViewInfo.js +91 -43
- package/src/sap/ui/core/support/support.css +23 -23
- package/src/sap/ui/core/support/support.html +5 -7
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
- package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
- package/src/sap/ui/core/themes/base/base.less +419 -22
- package/src/sap/ui/core/themes/base/global.less +13 -9
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +9 -5
- package/src/sap/ui/core/theming/Parameters.js +1 -1
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +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 +10 -7
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +9 -5
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -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/ODataTreeBindingFlat.js +4 -3
- package/src/sap/ui/model/odata/ODataUtils.js +7 -9
- 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 +39 -37
- 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 +72 -3
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +191 -70
- package/src/sap/ui/model/odata/v2/ODataModel.js +107 -52
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +11 -4
- package/src/sap/ui/model/odata/v4/Context.js +33 -4
- package/src/sap/ui/model/odata/v4/ODataBinding.js +12 -12
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -2
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +161 -106
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
- package/src/sap/ui/model/odata/v4/ODataModel.js +118 -12
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +202 -138
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +12 -0
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +110 -40
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +148 -68
- 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/Opa5.js +9 -5
- package/src/sap/ui/test/TestUtils.js +2 -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/test/gherkin/opa5TestHarness.js +14 -5
- package/src/sap/ui/test/opaQunit.js +11 -10
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +8 -4
- package/ui5.yaml +1 -1
|
@@ -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.1
|
|
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
|
|
@@ -845,7 +845,7 @@ sap.ui.define([
|
|
|
845
845
|
throw new Error(
|
|
846
846
|
"Must know the final length to create at the end. Consider setting $count");
|
|
847
847
|
}
|
|
848
|
-
if (this.
|
|
848
|
+
if (this.bFirstCreateAtEnd && !bAtEnd) {
|
|
849
849
|
throw new Error("Cannot create at the start after creation at end");
|
|
850
850
|
}
|
|
851
851
|
if (bInactive) {
|
|
@@ -857,12 +857,17 @@ sap.ui.define([
|
|
|
857
857
|
this.iActiveContexts += 1;
|
|
858
858
|
}
|
|
859
859
|
|
|
860
|
-
if (this.
|
|
861
|
-
this.
|
|
860
|
+
if (this.bFirstCreateAtEnd === undefined) {
|
|
861
|
+
this.bFirstCreateAtEnd = bAtEnd;
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
// only for createInCache
|
|
865
865
|
oGroupLock = this.lockGroup(sGroupId, true, true, function () {
|
|
866
|
+
if (!that.aContexts.includes(oContext)) { // #setContext changed the parent context
|
|
867
|
+
oContext.destroy();
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
|
|
866
871
|
that.destroyCreated(oContext);
|
|
867
872
|
return Promise.resolve().then(function () {
|
|
868
873
|
// Fire the change asynchronously so that Cache#delete is finished and #getContexts
|
|
@@ -871,7 +876,7 @@ sap.ui.define([
|
|
|
871
876
|
});
|
|
872
877
|
});
|
|
873
878
|
oCreatePromise = this.createInCache(oGroupLock, oCreatePathPromise, sResolvedPath,
|
|
874
|
-
sTransientPredicate, oInitialData, this.
|
|
879
|
+
sTransientPredicate, oInitialData, this.bFirstCreateAtEnd !== bAtEnd,
|
|
875
880
|
function (oError) { // error callback
|
|
876
881
|
that.oModel.reportError("POST on '" + oCreatePathPromise
|
|
877
882
|
+ "' failed; will be repeated automatically", sClassName, oError);
|
|
@@ -881,7 +886,7 @@ sap.ui.define([
|
|
|
881
886
|
function () { // submit callback
|
|
882
887
|
that.fireEvent("createSent", {context : oContext});
|
|
883
888
|
}
|
|
884
|
-
).then(function (oCreatedEntity) {
|
|
889
|
+
).then(function (oCreatedEntity) { // the entity was created on the server
|
|
885
890
|
var sGroupId, sPredicate;
|
|
886
891
|
|
|
887
892
|
if (!(oInitialData && oInitialData["@$ui5.keepTransientPath"])) {
|
|
@@ -898,7 +903,7 @@ sap.ui.define([
|
|
|
898
903
|
return oContext.refreshDependentBindings(oContext.getPath().slice(1), sGroupId,
|
|
899
904
|
/*bCheckUpdate*/true);
|
|
900
905
|
}
|
|
901
|
-
if (
|
|
906
|
+
if (that.oModel.isApiGroup(sGroupId)) {
|
|
902
907
|
sGroupId = "$auto";
|
|
903
908
|
}
|
|
904
909
|
|
|
@@ -911,8 +916,15 @@ sap.ui.define([
|
|
|
911
916
|
this.iCreatedContexts += 1;
|
|
912
917
|
oContext = Context.create(this.oModel, this, sTransientPath, -this.iCreatedContexts,
|
|
913
918
|
oCreatePromise, bInactive);
|
|
919
|
+
// to make sure that #fetchValue does not overtake #createInCache, avoid bCached flag!
|
|
920
|
+
oContext.fetchValue().then(function (oElement) {
|
|
921
|
+
if (oElement) {
|
|
922
|
+
_Helper.setPrivateAnnotation(oElement, "context", oContext);
|
|
923
|
+
_Helper.setPrivateAnnotation(oElement, "firstCreateAtEnd", that.bFirstCreateAtEnd);
|
|
924
|
+
} // else: context already destroyed
|
|
925
|
+
});
|
|
914
926
|
|
|
915
|
-
if (this.
|
|
927
|
+
if (this.bFirstCreateAtEnd !== bAtEnd) {
|
|
916
928
|
this.aContexts.splice(this.iCreatedContexts - 1, 0, oContext);
|
|
917
929
|
for (i = this.iCreatedContexts - 1; i >= 0; i -= 1) {
|
|
918
930
|
this.aContexts[i].iIndex = i - this.iCreatedContexts;
|
|
@@ -985,8 +997,9 @@ sap.ui.define([
|
|
|
985
997
|
sPredicate = _Helper.getPrivateAnnotation(aResults[i], "predicate");
|
|
986
998
|
sContextPath = sPath + (sPredicate || "/" + i$skipIndex);
|
|
987
999
|
oContext = this.mPreviousContextsByPath[sContextPath];
|
|
988
|
-
if (oContext && !oContext.created()) {
|
|
989
|
-
// 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
|
|
990
1003
|
delete this.mPreviousContextsByPath[sContextPath];
|
|
991
1004
|
oContext.iIndex = i$skipIndex;
|
|
992
1005
|
oContext.checkUpdate();
|
|
@@ -1083,7 +1096,7 @@ sap.ui.define([
|
|
|
1083
1096
|
this.aContexts[i].iIndex += 1;
|
|
1084
1097
|
}
|
|
1085
1098
|
if (!this.iCreatedContexts) {
|
|
1086
|
-
this.
|
|
1099
|
+
this.bFirstCreateAtEnd = undefined;
|
|
1087
1100
|
}
|
|
1088
1101
|
this.aContexts.splice(iIndex, 1);
|
|
1089
1102
|
this.destroyLater(oContext);
|
|
@@ -1116,7 +1129,8 @@ sap.ui.define([
|
|
|
1116
1129
|
*
|
|
1117
1130
|
* @param {string[]} [aPathsToDelete]
|
|
1118
1131
|
* If given, only contexts with paths in this list except kept-alive ones are removed and
|
|
1119
|
-
* destroyed; otherwise all contexts in the list are
|
|
1132
|
+
* destroyed (transient contexts are removed only); otherwise all contexts in the list are
|
|
1133
|
+
* removed and destroyed
|
|
1120
1134
|
*
|
|
1121
1135
|
* @private
|
|
1122
1136
|
*/
|
|
@@ -1131,7 +1145,9 @@ sap.ui.define([
|
|
|
1131
1145
|
if (aPathsToDelete && oContext.isKeepAlive()) {
|
|
1132
1146
|
oContext.iIndex = undefined;
|
|
1133
1147
|
} else {
|
|
1134
|
-
oContext.
|
|
1148
|
+
if (!oContext.isTransient()) {
|
|
1149
|
+
oContext.destroy();
|
|
1150
|
+
}
|
|
1135
1151
|
delete mPreviousContextsByPath[sPath];
|
|
1136
1152
|
}
|
|
1137
1153
|
}
|
|
@@ -1144,10 +1160,9 @@ sap.ui.define([
|
|
|
1144
1160
|
* @see sap.ui.model.odata.v4.ODataBinding#doCreateCache
|
|
1145
1161
|
*/
|
|
1146
1162
|
ODataListBinding.prototype.doCreateCache = function (sResourcePath, mQueryOptions, oContext,
|
|
1147
|
-
sDeepResourcePath,
|
|
1163
|
+
sDeepResourcePath, sGroupId, oOldCache) {
|
|
1148
1164
|
var sBindingPath,
|
|
1149
1165
|
aKeptElementPaths,
|
|
1150
|
-
oCache,
|
|
1151
1166
|
that = this;
|
|
1152
1167
|
|
|
1153
1168
|
if (oOldCache && oOldCache.getResourcePath() === sResourcePath
|
|
@@ -1157,10 +1172,10 @@ sap.ui.define([
|
|
|
1157
1172
|
return that.mPreviousContextsByPath[sPath].isKeepAlive();
|
|
1158
1173
|
});
|
|
1159
1174
|
|
|
1160
|
-
if (this.iCreatedContexts ||
|
|
1175
|
+
if (this.iCreatedContexts || aKeptElementPaths.length) {
|
|
1161
1176
|
oOldCache.reset(aKeptElementPaths.map(function (sPath) {
|
|
1162
1177
|
return _Helper.getRelativePath(sPath, sBindingPath);
|
|
1163
|
-
}),
|
|
1178
|
+
}), sGroupId);
|
|
1164
1179
|
// Note: #inheritQueryOptions as called below should not matter in case of own
|
|
1165
1180
|
// requests, which are a precondition for kept-alive elements
|
|
1166
1181
|
oOldCache.setQueryOptions(mQueryOptions, true);
|
|
@@ -1170,21 +1185,11 @@ sap.ui.define([
|
|
|
1170
1185
|
}
|
|
1171
1186
|
|
|
1172
1187
|
mQueryOptions = this.inheritQueryOptions(mQueryOptions, oContext);
|
|
1173
|
-
|
|
1188
|
+
|
|
1189
|
+
return this.getCacheAndMoveKeepAliveContexts(sResourcePath, mQueryOptions)
|
|
1174
1190
|
|| _AggregationCache.create(this.oModel.oRequestor, sResourcePath, sDeepResourcePath,
|
|
1175
1191
|
this.mParameters.$$aggregation, mQueryOptions, this.oModel.bAutoExpandSelect,
|
|
1176
1192
|
this.bSharedRequest);
|
|
1177
|
-
|
|
1178
|
-
if (aKeptElementPaths && aKeptElementPaths.length) {
|
|
1179
|
-
oCache.setLateQueryOptions(oOldCache.getLateQueryOptions());
|
|
1180
|
-
aKeptElementPaths.forEach(function (sPath) {
|
|
1181
|
-
oCache.addKeptElement(
|
|
1182
|
-
oOldCache.getValue(_Helper.getRelativePath(sPath, sBindingPath)));
|
|
1183
|
-
that.mPreviousContextsByPath[sPath].checkUpdate(); // add change listeners
|
|
1184
|
-
});
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
return oCache;
|
|
1188
1193
|
};
|
|
1189
1194
|
|
|
1190
1195
|
/**
|
|
@@ -1359,7 +1364,7 @@ sap.ui.define([
|
|
|
1359
1364
|
var oPromise,
|
|
1360
1365
|
that = this;
|
|
1361
1366
|
|
|
1362
|
-
if (this.
|
|
1367
|
+
if (this.bFirstCreateAtEnd) {
|
|
1363
1368
|
// Note: We still have to read iLength rows in this case to get all entities from
|
|
1364
1369
|
// the server. The created entities then are placed behind using the calculated or
|
|
1365
1370
|
// estimated length.
|
|
@@ -1815,7 +1820,7 @@ sap.ui.define([
|
|
|
1815
1820
|
|
|
1816
1821
|
this.withCache(function (oCache, sPath) {
|
|
1817
1822
|
aElements = oCache.getAllElements(sPath);
|
|
1818
|
-
}, "", /*bSync
|
|
1823
|
+
}, "", /*bSync*/true);
|
|
1819
1824
|
|
|
1820
1825
|
if (this.createContexts(0, aElements)) {
|
|
1821
1826
|
// In the case that a control has requested new data and the data request is already
|
|
@@ -1826,7 +1831,9 @@ sap.ui.define([
|
|
|
1826
1831
|
|
|
1827
1832
|
return this.aContexts.filter(function (oContext) {
|
|
1828
1833
|
return oContext;
|
|
1829
|
-
}).concat(Object.values(this.mPreviousContextsByPath))
|
|
1834
|
+
}).concat(Object.values(this.mPreviousContextsByPath).filter(function (oContext) {
|
|
1835
|
+
return oContext.isKeepAlive();
|
|
1836
|
+
}));
|
|
1830
1837
|
};
|
|
1831
1838
|
|
|
1832
1839
|
/**
|
|
@@ -2018,7 +2025,7 @@ sap.ui.define([
|
|
|
2018
2025
|
if (!this.oDiff) { // w/o E.C.D there won't be a diff
|
|
2019
2026
|
// make sure "refresh" is followed by async "change"
|
|
2020
2027
|
oPromise = this.fetchContexts(iStart, iLength, iMaximumPrefetchSize, oGroupLock,
|
|
2021
|
-
/*bAsync
|
|
2028
|
+
/*bAsync*/bRefreshEvent, function () {
|
|
2022
2029
|
bDataRequested = true;
|
|
2023
2030
|
that.fireDataRequested();
|
|
2024
2031
|
});
|
|
@@ -2089,7 +2096,7 @@ sap.ui.define([
|
|
|
2089
2096
|
ODataListBinding.prototype.getContextsInViewOrder = function (iStart, iLength) {
|
|
2090
2097
|
var aContexts, iCount, i;
|
|
2091
2098
|
|
|
2092
|
-
if (this.
|
|
2099
|
+
if (this.bFirstCreateAtEnd) {
|
|
2093
2100
|
aContexts = [];
|
|
2094
2101
|
iCount = Math.min(iLength, this.getLength() - iStart);
|
|
2095
2102
|
for (i = 0; i < iCount; i += 1) {
|
|
@@ -2155,6 +2162,7 @@ sap.ui.define([
|
|
|
2155
2162
|
*
|
|
2156
2163
|
* @public
|
|
2157
2164
|
* @see sap.ui.model.ListBinding#getCurrentContexts
|
|
2165
|
+
* @see #getAllCurrentContexts
|
|
2158
2166
|
* @since 1.39.0
|
|
2159
2167
|
*/
|
|
2160
2168
|
// @override sap.ui.model.ListBinding#getCurrentContexts
|
|
@@ -2360,7 +2368,7 @@ sap.ui.define([
|
|
|
2360
2368
|
* @private
|
|
2361
2369
|
*/
|
|
2362
2370
|
ODataListBinding.prototype.getModelIndex = function (iViewIndex) {
|
|
2363
|
-
if (!this.
|
|
2371
|
+
if (!this.bFirstCreateAtEnd) {
|
|
2364
2372
|
return iViewIndex;
|
|
2365
2373
|
}
|
|
2366
2374
|
if (!this.bLengthFinal) { // created at end, but the read is pending and $count unknown yet
|
|
@@ -2384,14 +2392,14 @@ sap.ui.define([
|
|
|
2384
2392
|
* @param {string} [sGroupId]
|
|
2385
2393
|
* The group ID used for read requests for the context's entity or its properties. If not
|
|
2386
2394
|
* given, the binding's {@link #getGroupId group ID} is used. Supported since 1.100.0
|
|
2387
|
-
* @returns {sap.ui.model.odata.v4.Context
|
|
2388
|
-
* The kept-alive context
|
|
2389
|
-
* suspended and no context with the given path exists
|
|
2395
|
+
* @returns {sap.ui.model.odata.v4.Context}
|
|
2396
|
+
* The kept-alive context
|
|
2390
2397
|
* @throws {Error} If
|
|
2391
2398
|
* <ul>
|
|
2392
2399
|
* <li> the group ID is invalid,
|
|
2393
2400
|
* <li> the binding is unresolved,
|
|
2394
2401
|
* <li> the given context path does not match this binding,
|
|
2402
|
+
* <li> the binding's root binding is suspended,
|
|
2395
2403
|
* <li> or {@link sap.ui.model.odata.v4.Context#setKeepAlive} fails
|
|
2396
2404
|
* </ul>
|
|
2397
2405
|
*
|
|
@@ -2407,14 +2415,12 @@ sap.ui.define([
|
|
|
2407
2415
|
iPredicateIndex = this.oModel.getPredicateIndex(sPath),
|
|
2408
2416
|
sResolvedPath = this.getResolvedPath();
|
|
2409
2417
|
|
|
2418
|
+
this.checkSuspended();
|
|
2410
2419
|
this.oModel.checkGroupId(sGroupId);
|
|
2411
2420
|
if (!oContext) {
|
|
2412
2421
|
if (!sResolvedPath) {
|
|
2413
2422
|
throw new Error("Binding is unresolved: " + this);
|
|
2414
2423
|
}
|
|
2415
|
-
if (this.isRootBindingSuspended()) {
|
|
2416
|
-
return undefined;
|
|
2417
|
-
}
|
|
2418
2424
|
if (sPath.slice(0, iPredicateIndex) !== sResolvedPath) {
|
|
2419
2425
|
throw new Error(this + ": Not a valid context path: " + sPath);
|
|
2420
2426
|
}
|
|
@@ -2554,18 +2560,6 @@ sap.ui.define([
|
|
|
2554
2560
|
};
|
|
2555
2561
|
|
|
2556
2562
|
/**
|
|
2557
|
-
* Check whether this binding is an active $$getKeepAliveContext binding for the given path.
|
|
2558
|
-
*
|
|
2559
|
-
* @param {string} sPath - An absolute binding path
|
|
2560
|
-
* @returns {boolean} - Whether this binding matches
|
|
2561
|
-
*
|
|
2562
|
-
* @private
|
|
2563
|
-
*/
|
|
2564
|
-
ODataListBinding.prototype.isKeepAliveBindingFor = function (sPath) {
|
|
2565
|
-
return this.mParameters.$$getKeepAliveContext && this.getResolvedPath() === sPath;
|
|
2566
|
-
};
|
|
2567
|
-
|
|
2568
|
-
/**
|
|
2569
2563
|
* Enhance the inherited query options by the given query options if this binding does not have
|
|
2570
2564
|
* any binding parameters. If both have a '$orderby', the resulting '$orderby' is the
|
|
2571
2565
|
* concatenation of both '$orderby' with the given one first. If both have a '$filter', the
|
|
@@ -2643,7 +2637,22 @@ sap.ui.define([
|
|
|
2643
2637
|
* @since 1.99.0
|
|
2644
2638
|
*/
|
|
2645
2639
|
ODataListBinding.prototype.isFirstCreateAtEnd = function () {
|
|
2646
|
-
return this.
|
|
2640
|
+
return this.bFirstCreateAtEnd;
|
|
2641
|
+
};
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Check whether this binding is an active $$getKeepAliveContext binding for the given path.
|
|
2645
|
+
*
|
|
2646
|
+
* @param {string} sPath - An absolute binding path
|
|
2647
|
+
* @returns {boolean} - Whether this binding matches
|
|
2648
|
+
*
|
|
2649
|
+
* @private
|
|
2650
|
+
*/
|
|
2651
|
+
ODataListBinding.prototype.isKeepAliveBindingFor = function (sPath) {
|
|
2652
|
+
// When suspended it matches if it already has contexts. Then its getKeepAliveContext fails.
|
|
2653
|
+
return this.mParameters.$$getKeepAliveContext && this.getResolvedPath() === sPath
|
|
2654
|
+
&& (!this.isRootBindingSuspended() || this.aContexts.length
|
|
2655
|
+
|| Object.keys(this.mPreviousContextsByPath).length);
|
|
2647
2656
|
};
|
|
2648
2657
|
|
|
2649
2658
|
/**
|
|
@@ -2689,7 +2698,9 @@ sap.ui.define([
|
|
|
2689
2698
|
}
|
|
2690
2699
|
|
|
2691
2700
|
if (this.isRootBindingSuspended()) {
|
|
2701
|
+
// Note: side-effects (incl. refresh) are forbidden while suspended
|
|
2692
2702
|
this.refreshSuspended(sGroupId);
|
|
2703
|
+
this.bRefreshKeptElements = true;
|
|
2693
2704
|
return SyncPromise.all(refreshAll(that.getDependentBindings()));
|
|
2694
2705
|
}
|
|
2695
2706
|
|
|
@@ -2704,22 +2715,9 @@ sap.ui.define([
|
|
|
2704
2715
|
|
|
2705
2716
|
if (oCache && !oPromise) { // do not refresh twice
|
|
2706
2717
|
that.removeCachesAndMessages(sResourcePathPrefix);
|
|
2707
|
-
that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
function onRemove(sPredicate, iIndex) {
|
|
2711
|
-
if (iIndex === undefined) {
|
|
2712
|
-
that.mPreviousContextsByPath[that.getResolvedPath() + sPredicate]
|
|
2713
|
-
.resetKeepAlive();
|
|
2714
|
-
} else { // Note: implies oContext.created()
|
|
2715
|
-
that.destroyCreated(that.aContexts[iIndex]);
|
|
2716
|
-
}
|
|
2717
|
-
});
|
|
2718
|
-
}).catch(function (oError) {
|
|
2719
|
-
that.oModel.reportError("Failed to refresh kept-alive elements", sClassName,
|
|
2720
|
-
oError);
|
|
2721
|
-
throw oError;
|
|
2722
|
-
});
|
|
2718
|
+
that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true,
|
|
2719
|
+
bKeepCacheOnError ? sGroupId : undefined);
|
|
2720
|
+
oKeptElementsPromise = that.refreshKeptElements(sGroupId);
|
|
2723
2721
|
if (that.iCurrentEnd > 0) {
|
|
2724
2722
|
oPromise = that.createRefreshPromise().catch(function (oError) {
|
|
2725
2723
|
if (!bKeepCacheOnError || oError.canceled) {
|
|
@@ -2756,13 +2754,46 @@ sap.ui.define([
|
|
|
2756
2754
|
}
|
|
2757
2755
|
// Note: after reset the dependent bindings cannot be found any more
|
|
2758
2756
|
aDependentBindings = that.getDependentBindings();
|
|
2759
|
-
|
|
2760
|
-
that.reset(ChangeReason.Refresh, bKeepCacheOnError ? false : undefined);
|
|
2757
|
+
// this may reset that.oRefreshPromise
|
|
2758
|
+
that.reset(ChangeReason.Refresh, bKeepCacheOnError ? false : undefined, sGroupId);
|
|
2761
2759
|
return SyncPromise.all(
|
|
2762
|
-
refreshAll(aDependentBindings).concat(oPromise, oKeptElementsPromise
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2760
|
+
refreshAll(aDependentBindings).concat(oPromise, oKeptElementsPromise)
|
|
2761
|
+
).then(function () {
|
|
2762
|
+
// Update after refresh event, otherwise $count is fetched before the request.
|
|
2763
|
+
// Avoid update in case bKeepCacheOnError needs to roll back.
|
|
2764
|
+
return that.oHeaderContext.checkUpdateInternal(); // this is NOT done by refreshAll!
|
|
2765
|
+
});
|
|
2766
|
+
});
|
|
2767
|
+
};
|
|
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;
|
|
2766
2797
|
});
|
|
2767
2798
|
};
|
|
2768
2799
|
|
|
@@ -3150,15 +3181,19 @@ sap.ui.define([
|
|
|
3150
3181
|
* as long as the binding is still empty.
|
|
3151
3182
|
* @param {boolean} [bDrop]
|
|
3152
3183
|
* By default, all created persisted contexts are dropped while transient ones are not.
|
|
3153
|
-
* <code>true</code> also drops transient ones, and <code>false</code> keeps
|
|
3154
|
-
*
|
|
3184
|
+
* <code>true</code> also drops transient ones, and <code>false</code> keeps inline creation
|
|
3185
|
+
* rows only and transient ones where the POST is not within the same $batch as the GET for
|
|
3186
|
+
* the side-effects refresh.
|
|
3187
|
+
* @param {string} [sGroupId]
|
|
3188
|
+
* The group ID to be used for refresh; used only in case <code>bDrop === false</code>
|
|
3155
3189
|
*
|
|
3156
3190
|
* @private
|
|
3157
3191
|
*/
|
|
3158
|
-
ODataListBinding.prototype.reset = function (sChangeReason, bDrop) {
|
|
3192
|
+
ODataListBinding.prototype.reset = function (sChangeReason, bDrop, sGroupId) {
|
|
3159
3193
|
var oContext,
|
|
3194
|
+
iCreated = 0, // index (and finally number) of created elements that we keep
|
|
3160
3195
|
bEmpty = this.iCurrentEnd === 0,
|
|
3161
|
-
|
|
3196
|
+
bKeepTransient = sGroupId && sGroupId !== this.getUpdateGroupId(),
|
|
3162
3197
|
i,
|
|
3163
3198
|
that = this;
|
|
3164
3199
|
|
|
@@ -3172,27 +3207,29 @@ sap.ui.define([
|
|
|
3172
3207
|
});
|
|
3173
3208
|
for (i = 0; i < this.iCreatedContexts; i += 1) {
|
|
3174
3209
|
oContext = this.aContexts[i];
|
|
3175
|
-
if (
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3210
|
+
if (bDrop === false
|
|
3211
|
+
? bKeepTransient && oContext.isTransient()
|
|
3212
|
+
|| oContext.isInactive() !== undefined
|
|
3213
|
+
: oContext.isTransient()) {
|
|
3214
|
+
this.aContexts[iCreated] = oContext;
|
|
3215
|
+
iCreated += 1;
|
|
3216
|
+
} else { // Note: inactive elements are always kept
|
|
3180
3217
|
this.iActiveContexts -= 1;
|
|
3181
3218
|
this.mPreviousContextsByPath[oContext.getPath()] = oContext;
|
|
3182
3219
|
}
|
|
3183
3220
|
}
|
|
3184
|
-
for (i = 0; i <
|
|
3185
|
-
this.aContexts[i].iIndex = i -
|
|
3221
|
+
for (i = 0; i < iCreated; i += 1) {
|
|
3222
|
+
this.aContexts[i].iIndex = i - iCreated;
|
|
3186
3223
|
}
|
|
3187
3224
|
// Note: no strict need to keep the reference here
|
|
3188
|
-
this.aContexts.length = this.iCreatedContexts =
|
|
3225
|
+
this.aContexts.length = this.iCreatedContexts = iCreated;
|
|
3189
3226
|
} else {
|
|
3190
3227
|
this.aContexts = [];
|
|
3191
3228
|
}
|
|
3192
3229
|
if (!this.iCreatedContexts) {
|
|
3193
3230
|
// true if contexts have been created at the end, false if contexts have been created at
|
|
3194
3231
|
// the start, undefined if there are no created contexts
|
|
3195
|
-
this.
|
|
3232
|
+
this.bFirstCreateAtEnd = undefined;
|
|
3196
3233
|
}
|
|
3197
3234
|
// the range of array indices for getCurrentContexts
|
|
3198
3235
|
this.iCurrentBegin = this.iCurrentEnd = 0;
|
|
@@ -3230,6 +3267,28 @@ sap.ui.define([
|
|
|
3230
3267
|
this.aContexts.forEach(reset);
|
|
3231
3268
|
};
|
|
3232
3269
|
|
|
3270
|
+
/**
|
|
3271
|
+
* Restores all created elements, the bFirstCreateAtEnd flag and the iCreatedContexts,
|
|
3272
|
+
* iActiveContexts counters from cache to this list binding.
|
|
3273
|
+
*
|
|
3274
|
+
* @private
|
|
3275
|
+
*/
|
|
3276
|
+
ODataListBinding.prototype.restoreCreated = function () {
|
|
3277
|
+
var that = this;
|
|
3278
|
+
|
|
3279
|
+
this.withCache(function (oCache, sPath) {
|
|
3280
|
+
oCache.getCreatedElements(sPath).forEach(function (oElement, i) {
|
|
3281
|
+
that.aContexts[i] = _Helper.getPrivateAnnotation(oElement, "context");
|
|
3282
|
+
that.bFirstCreateAtEnd
|
|
3283
|
+
= _Helper.getPrivateAnnotation(oElement, "firstCreateAtEnd");
|
|
3284
|
+
that.iCreatedContexts += 1;
|
|
3285
|
+
if (!oElement["@$ui5.context.isInactive"]) {
|
|
3286
|
+
that.iActiveContexts += 1;
|
|
3287
|
+
}
|
|
3288
|
+
});
|
|
3289
|
+
}).catch(this.oModel.getReporter());
|
|
3290
|
+
};
|
|
3291
|
+
|
|
3233
3292
|
/**
|
|
3234
3293
|
* @override
|
|
3235
3294
|
* @see sap.ui.model.odata.v4.ODataParentBinding#resumeInternal
|
|
@@ -3237,7 +3296,8 @@ sap.ui.define([
|
|
|
3237
3296
|
ODataListBinding.prototype.resumeInternal = function (_bCheckUpdate, bParentHasChanges) {
|
|
3238
3297
|
var aBindings = this.getDependentBindings(),
|
|
3239
3298
|
sResumeChangeReason = this.sResumeChangeReason,
|
|
3240
|
-
bRefresh = bParentHasChanges || sResumeChangeReason
|
|
3299
|
+
bRefresh = bParentHasChanges || sResumeChangeReason,
|
|
3300
|
+
that = this;
|
|
3241
3301
|
|
|
3242
3302
|
this.sResumeChangeReason = undefined;
|
|
3243
3303
|
|
|
@@ -3247,6 +3307,11 @@ sap.ui.define([
|
|
|
3247
3307
|
// if the parent binding resumes but there are no changes in the parent binding
|
|
3248
3308
|
// ignore the parent cache and create an own cache
|
|
3249
3309
|
this.fetchCache(this.oContext, !bParentHasChanges);
|
|
3310
|
+
|
|
3311
|
+
if (this.bRefreshKeptElements) {
|
|
3312
|
+
this.bRefreshKeptElements = false;
|
|
3313
|
+
that.refreshKeptElements(that.getGroupId());
|
|
3314
|
+
}
|
|
3250
3315
|
}
|
|
3251
3316
|
aBindings.forEach(function (oDependentBinding) {
|
|
3252
3317
|
// do not call checkUpdate in dependent property bindings if the cache of this
|
|
@@ -3400,35 +3465,25 @@ sap.ui.define([
|
|
|
3400
3465
|
* @param {sap.ui.model.Context} oContext
|
|
3401
3466
|
* The context object
|
|
3402
3467
|
* @throws {Error}
|
|
3403
|
-
* If the binding's root binding is suspended
|
|
3404
|
-
* entities
|
|
3468
|
+
* If the binding's root binding is suspended
|
|
3405
3469
|
*
|
|
3406
3470
|
* @private
|
|
3407
3471
|
*/
|
|
3408
3472
|
// @override sap.ui.model.Binding#setContext
|
|
3409
3473
|
ODataListBinding.prototype.setContext = function (oContext) {
|
|
3410
|
-
var sResolvedPath
|
|
3411
|
-
i,
|
|
3412
|
-
that = this;
|
|
3474
|
+
var sResolvedPath;
|
|
3413
3475
|
|
|
3414
3476
|
if (this.oContext !== oContext) {
|
|
3415
3477
|
if (this.bRelative) {
|
|
3416
3478
|
this.checkSuspended(true);
|
|
3417
|
-
for (i = 0; i < that.iCreatedContexts; i += 1) {
|
|
3418
|
-
if (that.aContexts[i].isTransient()) {
|
|
3419
|
-
// to allow switching the context for new created entities (transient or
|
|
3420
|
-
// not), we first have to implement a store/restore mechanism for them
|
|
3421
|
-
throw new Error("setContext on relative binding is forbidden if a "
|
|
3422
|
-
+ "transient entity exists: " + that);
|
|
3423
|
-
}
|
|
3424
|
-
}
|
|
3425
3479
|
// Keep the header context even if we lose the parent context, so that the header
|
|
3426
3480
|
// context remains unchanged if the parent context is temporarily dropped during a
|
|
3427
3481
|
// refresh.
|
|
3428
|
-
this.reset();
|
|
3482
|
+
this.reset(/*sChangeReason*/undefined, /*bDrop*/true);
|
|
3429
3483
|
this.resetKeepAlive(); // before fetchCache to avoid that it copies data
|
|
3430
3484
|
this.fetchCache(oContext);
|
|
3431
3485
|
if (oContext) {
|
|
3486
|
+
this.restoreCreated();
|
|
3432
3487
|
sResolvedPath = this.oModel.resolve(this.sPath, oContext);
|
|
3433
3488
|
// Note: oHeaderContext is missing only if called from c'tor
|
|
3434
3489
|
if (this.oHeaderContext && this.oHeaderContext.getPath() !== sResolvedPath) {
|
|
@@ -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.1
|
|
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
|
}
|