@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.
Files changed (388) hide show
  1. package/.eslintrc.json +27 -5
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +1 -1
  4. package/src/jquery.sap.global.js +1 -1
  5. package/src/jquery.sap.properties.js +1 -1
  6. package/src/jquery.sap.resources.js +1 -1
  7. package/src/jquery.sap.script.js +1 -1
  8. package/src/jquery.sap.storage.js +3 -3
  9. package/src/sap/base/assert.js +1 -1
  10. package/src/sap/base/strings/whitespaceReplacer.js +1 -1
  11. package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
  12. package/src/sap/base/util/restricted/_castArray.js +1 -1
  13. package/src/sap/base/util/restricted/_compact.js +1 -1
  14. package/src/sap/base/util/restricted/_curry.js +1 -1
  15. package/src/sap/base/util/restricted/_debounce.js +1 -1
  16. package/src/sap/base/util/restricted/_difference.js +1 -1
  17. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  18. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  19. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  21. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  22. package/src/sap/base/util/restricted/_flatten.js +1 -1
  23. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  24. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  25. package/src/sap/base/util/restricted/_intersection.js +1 -1
  26. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  27. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  28. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  29. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  30. package/src/sap/base/util/restricted/_isNil.js +1 -1
  31. package/src/sap/base/util/restricted/_max.js +1 -1
  32. package/src/sap/base/util/restricted/_merge.js +1 -1
  33. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  34. package/src/sap/base/util/restricted/_min.js +1 -1
  35. package/src/sap/base/util/restricted/_omit.js +1 -1
  36. package/src/sap/base/util/restricted/_pick.js +1 -1
  37. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  38. package/src/sap/base/util/restricted/_throttle.js +1 -1
  39. package/src/sap/base/util/restricted/_toArray.js +1 -1
  40. package/src/sap/base/util/restricted/_union.js +1 -1
  41. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  42. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  43. package/src/sap/base/util/restricted/_uniq.js +1 -1
  44. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  45. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  46. package/src/sap/base/util/restricted/_without.js +1 -1
  47. package/src/sap/base/util/restricted/_xor.js +1 -1
  48. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  49. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  50. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  51. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  52. package/src/sap/ui/Device.js +3 -3
  53. package/src/sap/ui/Global.js +4 -4
  54. package/src/sap/ui/base/Event.js +1 -1
  55. package/src/sap/ui/base/EventProvider.js +2 -2
  56. package/src/sap/ui/base/Interface.js +1 -1
  57. package/src/sap/ui/base/ManagedObject.js +1 -1
  58. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  59. package/src/sap/ui/base/ManagedObjectRegistry.js +10 -5
  60. package/src/sap/ui/base/Metadata.js +1 -1
  61. package/src/sap/ui/base/Object.js +1 -1
  62. package/src/sap/ui/base/ObjectPool.js +1 -1
  63. package/src/sap/ui/core/.library +2 -1
  64. package/src/sap/ui/core/BusyIndicator.js +1 -1
  65. package/src/sap/ui/core/CommandExecution.js +15 -12
  66. package/src/sap/ui/core/Component.js +50 -27
  67. package/src/sap/ui/core/ComponentContainer.js +1 -1
  68. package/src/sap/ui/core/ComponentMetadata.js +27 -12
  69. package/src/sap/ui/core/ComponentSupport.js +1 -1
  70. package/src/sap/ui/core/Configuration.js +22 -8
  71. package/src/sap/ui/core/Control.js +2 -3
  72. package/src/sap/ui/core/Core.js +119 -36
  73. package/src/sap/ui/core/CustomData.js +1 -1
  74. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  75. package/src/sap/ui/core/Element.js +1 -1
  76. package/src/sap/ui/core/ElementMetadata.js +1 -1
  77. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  78. package/src/sap/ui/core/EventBus.js +1 -1
  79. package/src/sap/ui/core/ExtensionPoint.js +6 -1
  80. package/src/sap/ui/core/FocusHandler.js +2 -3
  81. package/src/sap/ui/core/Fragment.js +1 -1
  82. package/src/sap/ui/core/HTML.js +1 -1
  83. package/src/sap/ui/core/History.js +1 -1
  84. package/src/sap/ui/core/Icon.js +2 -2
  85. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  86. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  87. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  88. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  89. package/src/sap/ui/core/InvisibleText.js +1 -1
  90. package/src/sap/ui/core/Item.js +1 -1
  91. package/src/sap/ui/core/LabelEnablement.js +1 -1
  92. package/src/sap/ui/core/LayoutData.js +1 -1
  93. package/src/sap/ui/core/ListItem.js +1 -1
  94. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  95. package/src/sap/ui/core/Locale.js +1 -1
  96. package/src/sap/ui/core/LocaleData.js +136 -5
  97. package/src/sap/ui/core/Manifest.js +5 -3
  98. package/src/sap/ui/core/Message.js +1 -1
  99. package/src/sap/ui/core/Patcher.js +3 -1
  100. package/src/sap/ui/core/Popup.js +12 -14
  101. package/src/sap/ui/core/RenderManager.js +1 -1
  102. package/src/sap/ui/core/Renderer.js +1 -1
  103. package/src/sap/ui/core/ResizeHandler.js +1 -1
  104. package/src/sap/ui/core/ScrollBar.js +21 -15
  105. package/src/sap/ui/core/SeparatorItem.js +1 -1
  106. package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
  107. package/src/sap/ui/core/Title.js +1 -1
  108. package/src/sap/ui/core/TooltipBase.js +1 -1
  109. package/src/sap/ui/core/UIArea.js +3 -5
  110. package/src/sap/ui/core/UIComponent.js +1 -1
  111. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  112. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  113. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  114. package/src/sap/ui/core/XMLComposite.js +1 -1
  115. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  116. package/src/sap/ui/core/XMLTemplateProcessor.js +514 -389
  117. package/src/sap/ui/core/cache/CacheManager.js +27 -0
  118. package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
  119. package/src/sap/ui/core/cache/LRUPersistentCache.js +74 -3
  120. package/src/sap/ui/core/cldr/ar.json +469 -1
  121. package/src/sap/ui/core/cldr/ar_EG.json +469 -1
  122. package/src/sap/ui/core/cldr/ar_SA.json +469 -1
  123. package/src/sap/ui/core/cldr/bg.json +469 -1
  124. package/src/sap/ui/core/cldr/ca.json +469 -1
  125. package/src/sap/ui/core/cldr/cs.json +469 -1
  126. package/src/sap/ui/core/cldr/cy.json +469 -1
  127. package/src/sap/ui/core/cldr/da.json +469 -1
  128. package/src/sap/ui/core/cldr/de.json +469 -1
  129. package/src/sap/ui/core/cldr/de_AT.json +469 -1
  130. package/src/sap/ui/core/cldr/de_CH.json +469 -1
  131. package/src/sap/ui/core/cldr/el.json +469 -1
  132. package/src/sap/ui/core/cldr/el_CY.json +469 -1
  133. package/src/sap/ui/core/cldr/en.json +469 -1
  134. package/src/sap/ui/core/cldr/en_AU.json +469 -1
  135. package/src/sap/ui/core/cldr/en_GB.json +469 -1
  136. package/src/sap/ui/core/cldr/en_HK.json +469 -1
  137. package/src/sap/ui/core/cldr/en_IE.json +469 -1
  138. package/src/sap/ui/core/cldr/en_IN.json +469 -1
  139. package/src/sap/ui/core/cldr/en_NZ.json +469 -1
  140. package/src/sap/ui/core/cldr/en_PG.json +469 -1
  141. package/src/sap/ui/core/cldr/en_SG.json +469 -1
  142. package/src/sap/ui/core/cldr/en_ZA.json +469 -1
  143. package/src/sap/ui/core/cldr/es.json +469 -1
  144. package/src/sap/ui/core/cldr/es_AR.json +469 -1
  145. package/src/sap/ui/core/cldr/es_BO.json +469 -1
  146. package/src/sap/ui/core/cldr/es_CL.json +469 -1
  147. package/src/sap/ui/core/cldr/es_CO.json +469 -1
  148. package/src/sap/ui/core/cldr/es_MX.json +469 -1
  149. package/src/sap/ui/core/cldr/es_PE.json +469 -1
  150. package/src/sap/ui/core/cldr/es_UY.json +469 -1
  151. package/src/sap/ui/core/cldr/es_VE.json +469 -1
  152. package/src/sap/ui/core/cldr/et.json +469 -1
  153. package/src/sap/ui/core/cldr/fa.json +469 -1
  154. package/src/sap/ui/core/cldr/fi.json +469 -1
  155. package/src/sap/ui/core/cldr/fr.json +469 -1
  156. package/src/sap/ui/core/cldr/fr_BE.json +469 -1
  157. package/src/sap/ui/core/cldr/fr_CA.json +469 -1
  158. package/src/sap/ui/core/cldr/fr_CH.json +469 -1
  159. package/src/sap/ui/core/cldr/fr_LU.json +469 -1
  160. package/src/sap/ui/core/cldr/he.json +469 -1
  161. package/src/sap/ui/core/cldr/hi.json +469 -1
  162. package/src/sap/ui/core/cldr/hr.json +469 -1
  163. package/src/sap/ui/core/cldr/hu.json +469 -1
  164. package/src/sap/ui/core/cldr/id.json +469 -1
  165. package/src/sap/ui/core/cldr/it.json +469 -1
  166. package/src/sap/ui/core/cldr/it_CH.json +469 -1
  167. package/src/sap/ui/core/cldr/ja.json +469 -1
  168. package/src/sap/ui/core/cldr/kk.json +469 -1
  169. package/src/sap/ui/core/cldr/ko.json +469 -1
  170. package/src/sap/ui/core/cldr/lt.json +469 -1
  171. package/src/sap/ui/core/cldr/lv.json +469 -1
  172. package/src/sap/ui/core/cldr/ms.json +469 -1
  173. package/src/sap/ui/core/cldr/nb.json +469 -1
  174. package/src/sap/ui/core/cldr/nl.json +469 -1
  175. package/src/sap/ui/core/cldr/nl_BE.json +469 -1
  176. package/src/sap/ui/core/cldr/pl.json +469 -1
  177. package/src/sap/ui/core/cldr/pt.json +469 -1
  178. package/src/sap/ui/core/cldr/pt_PT.json +469 -1
  179. package/src/sap/ui/core/cldr/ro.json +469 -1
  180. package/src/sap/ui/core/cldr/ru.json +469 -1
  181. package/src/sap/ui/core/cldr/ru_UA.json +469 -1
  182. package/src/sap/ui/core/cldr/sk.json +469 -1
  183. package/src/sap/ui/core/cldr/sl.json +469 -1
  184. package/src/sap/ui/core/cldr/sr.json +469 -1
  185. package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
  186. package/src/sap/ui/core/cldr/sv.json +469 -1
  187. package/src/sap/ui/core/cldr/th.json +469 -1
  188. package/src/sap/ui/core/cldr/tr.json +469 -1
  189. package/src/sap/ui/core/cldr/uk.json +469 -1
  190. package/src/sap/ui/core/cldr/vi.json +469 -1
  191. package/src/sap/ui/core/cldr/zh_CN.json +470 -2
  192. package/src/sap/ui/core/cldr/zh_HK.json +470 -2
  193. package/src/sap/ui/core/cldr/zh_SG.json +470 -2
  194. package/src/sap/ui/core/cldr/zh_TW.json +469 -1
  195. package/src/sap/ui/core/date/UniversalDateUtils.js +48 -48
  196. package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
  197. package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
  198. package/src/sap/ui/core/dnd/DragAndDrop.js +8 -6
  199. package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
  200. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  201. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  202. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  203. package/src/sap/ui/core/format/DateFormat.js +162 -92
  204. package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +3 -0
  205. package/src/sap/ui/core/format/NumberFormat.js +28 -28
  206. package/src/sap/ui/core/format/TimezoneUtil.js +50 -18
  207. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  208. package/src/sap/ui/core/library.js +135 -140
  209. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  210. package/src/sap/ui/core/message/Message.js +1 -1
  211. package/src/sap/ui/core/message/MessageManager.js +1 -1
  212. package/src/sap/ui/core/message/MessageParser.js +1 -1
  213. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  214. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  215. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  216. package/src/sap/ui/core/mvc/JSView.js +2 -2
  217. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  218. package/src/sap/ui/core/mvc/View.js +2 -1
  219. package/src/sap/ui/core/mvc/XMLView.js +19 -23
  220. package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -59
  221. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  222. package/src/sap/ui/core/plugin/LessSupport.js +3 -3
  223. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  224. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  225. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  226. package/src/sap/ui/core/routing/Router.js +1 -1
  227. package/src/sap/ui/core/rules/App.support.js +14 -9
  228. package/src/sap/ui/core/rules/Config.support.js +12 -12
  229. package/src/sap/ui/core/rules/Model.support.js +8 -8
  230. package/src/sap/ui/core/rules/Rendering.support.js +1 -1
  231. package/src/sap/ui/core/rules/Theming.support.js +4 -4
  232. package/src/sap/ui/core/rules/View.support.js +9 -9
  233. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  234. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  235. package/src/sap/ui/core/service/Service.js +1 -1
  236. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  237. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  238. package/src/sap/ui/core/support/Plugin.js +29 -1
  239. package/src/sap/ui/core/support/Support.js +2 -2
  240. package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
  241. package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
  242. package/src/sap/ui/core/support/plugins/ControlTree.js +440 -349
  243. package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
  244. package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
  245. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  246. package/src/sap/ui/core/support/plugins/Performance.js +10 -13
  247. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  248. package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
  249. package/src/sap/ui/core/support/plugins/Trace.js +7 -7
  250. package/src/sap/ui/core/support/plugins/ViewInfo.js +91 -43
  251. package/src/sap/ui/core/support/support.css +23 -23
  252. package/src/sap/ui/core/support/support.html +5 -7
  253. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
  254. package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
  255. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
  256. package/src/sap/ui/core/themes/base/base.less +419 -22
  257. package/src/sap/ui/core/themes/base/global.less +13 -9
  258. package/src/sap/ui/core/themes/base/shared.less +1 -0
  259. package/src/sap/ui/core/themes/sap_hcb/global.less +9 -5
  260. package/src/sap/ui/core/theming/Parameters.js +1 -1
  261. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  262. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  263. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  264. package/src/sap/ui/core/tmpl/Template.js +1 -1
  265. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  266. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  267. package/src/sap/ui/core/util/Export.js +1 -1
  268. package/src/sap/ui/core/util/ExportCell.js +1 -1
  269. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  270. package/src/sap/ui/core/util/ExportRow.js +1 -1
  271. package/src/sap/ui/core/util/ExportType.js +1 -1
  272. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  273. package/src/sap/ui/core/util/File.js +1 -1
  274. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  275. package/src/sap/ui/core/util/MockServer.js +2 -2
  276. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  277. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  278. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  279. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  280. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  281. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  282. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  283. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  284. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  285. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  286. package/src/sap/ui/core/ws/WebSocket.js +7 -8
  287. package/src/sap/ui/debug/ControlTree.js +1 -1
  288. package/src/sap/ui/debug/DebugEnv.js +1 -1
  289. package/src/sap/ui/debug/PropertyList.js +1 -1
  290. package/src/sap/ui/model/ClientListBinding.js +127 -21
  291. package/src/sap/ui/model/ClientModel.js +1 -1
  292. package/src/sap/ui/model/CompositeDataState.js +1 -1
  293. package/src/sap/ui/model/CompositeType.js +1 -1
  294. package/src/sap/ui/model/DataState.js +1 -1
  295. package/src/sap/ui/model/ListBinding.js +32 -13
  296. package/src/sap/ui/model/MetaModel.js +1 -1
  297. package/src/sap/ui/model/Model.js +10 -7
  298. package/src/sap/ui/model/SelectionModel.js +1 -1
  299. package/src/sap/ui/model/SimpleType.js +1 -1
  300. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  301. package/src/sap/ui/model/Type.js +1 -1
  302. package/src/sap/ui/model/_Helper.js +9 -5
  303. package/src/sap/ui/model/analytics/AnalyticalBinding.js +1 -1
  304. package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
  305. package/src/sap/ui/model/json/JSONListBinding.js +0 -58
  306. package/src/sap/ui/model/json/JSONModel.js +1 -1
  307. package/src/sap/ui/model/message/MessageListBinding.js +0 -42
  308. package/src/sap/ui/model/message/MessageModel.js +1 -1
  309. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  310. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  311. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  312. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  313. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  314. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +4 -3
  315. package/src/sap/ui/model/odata/ODataUtils.js +7 -9
  316. package/src/sap/ui/model/odata/OperationMode.js +6 -0
  317. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  318. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  319. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  320. package/src/sap/ui/model/odata/type/Date.js +1 -1
  321. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  322. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  323. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  324. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +39 -37
  325. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  326. package/src/sap/ui/model/odata/type/Double.js +1 -1
  327. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  328. package/src/sap/ui/model/odata/type/Int.js +1 -1
  329. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  330. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  331. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  332. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  333. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  334. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  335. package/src/sap/ui/model/odata/type/Single.js +1 -1
  336. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  337. package/src/sap/ui/model/odata/type/String.js +1 -1
  338. package/src/sap/ui/model/odata/type/Time.js +1 -1
  339. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  340. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  341. package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
  342. package/src/sap/ui/model/odata/v2/Context.js +72 -3
  343. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  344. package/src/sap/ui/model/odata/v2/ODataListBinding.js +191 -70
  345. package/src/sap/ui/model/odata/v2/ODataModel.js +107 -52
  346. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +11 -4
  347. package/src/sap/ui/model/odata/v4/Context.js +33 -4
  348. package/src/sap/ui/model/odata/v4/ODataBinding.js +12 -12
  349. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -2
  350. package/src/sap/ui/model/odata/v4/ODataListBinding.js +161 -106
  351. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
  352. package/src/sap/ui/model/odata/v4/ODataModel.js +118 -12
  353. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
  354. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
  355. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
  356. package/src/sap/ui/model/odata/v4/lib/_Cache.js +202 -138
  357. package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
  358. package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +12 -0
  359. package/src/sap/ui/model/odata/v4/lib/_Helper.js +110 -40
  360. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +148 -68
  361. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  362. package/src/sap/ui/model/type/Boolean.js +1 -1
  363. package/src/sap/ui/model/type/Currency.js +1 -1
  364. package/src/sap/ui/model/type/Date.js +1 -1
  365. package/src/sap/ui/model/type/DateInterval.js +1 -1
  366. package/src/sap/ui/model/type/DateTime.js +1 -1
  367. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  368. package/src/sap/ui/model/type/FileSize.js +1 -1
  369. package/src/sap/ui/model/type/Float.js +1 -1
  370. package/src/sap/ui/model/type/Integer.js +1 -1
  371. package/src/sap/ui/model/type/String.js +1 -1
  372. package/src/sap/ui/model/type/Time.js +1 -1
  373. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  374. package/src/sap/ui/model/type/Unit.js +1 -1
  375. package/src/sap/ui/model/xml/XMLListBinding.js +0 -53
  376. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  377. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  378. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  379. package/src/sap/ui/test/Opa5.js +9 -5
  380. package/src/sap/ui/test/TestUtils.js +2 -1
  381. package/src/sap/ui/test/actions/Action.js +3 -3
  382. package/src/sap/ui/test/actions/Press.js +1 -1
  383. package/src/sap/ui/test/generic/TestBase.js +1 -1
  384. package/src/sap/ui/test/gherkin/opa5TestHarness.js +14 -5
  385. package/src/sap/ui/test/opaQunit.js +11 -10
  386. package/src/sap/ui/util/Storage.js +1 -1
  387. package/src/ui5loader.js +8 -4
  388. 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.100.0
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. This parameter is
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.bCreatedAtEnd && !bAtEnd) {
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.bCreatedAtEnd === undefined) {
861
- this.bCreatedAtEnd = bAtEnd;
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.bCreatedAtEnd !== bAtEnd,
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 (!that.oModel.isDirectGroup(sGroupId) && !that.oModel.isAutoGroup(sGroupId)) {
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.bCreatedAtEnd !== bAtEnd) {
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.bCreatedAtEnd = undefined;
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 removed and destroyed
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.destroy();
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, bKeepCreated, oOldCache) {
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 || !bKeepCreated && aKeptElementPaths.length) {
1175
+ if (this.iCreatedContexts || aKeptElementPaths.length) {
1161
1176
  oOldCache.reset(aKeptElementPaths.map(function (sPath) {
1162
1177
  return _Helper.getRelativePath(sPath, sBindingPath);
1163
- }), bKeepCreated);
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
- oCache = this.getCacheAndMoveKeepAliveContexts(sResourcePath, mQueryOptions)
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.bCreatedAtEnd) {
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=*/true);
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=*/bRefreshEvent, function () {
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.bCreatedAtEnd) {
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.bCreatedAtEnd) {
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|undefined}
2388
- * The kept-alive context, or <code>undefined</code> if the binding's root binding is
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.bCreatedAtEnd;
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, bKeepCacheOnError);
2708
- oKeptElementsPromise = that.oCachePromise.then(function (oNewCache) {
2709
- return oNewCache.refreshKeptElements(that.lockGroup(sGroupId),
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
- // this may reset that.oRefreshPromise
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
- // Update after refresh event, otherwise $count is fetched before the request
2764
- that.oHeaderContext.checkUpdate()) // this is NOT done by refreshAll!
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 created persisted
3154
- * that started as inactive.
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
- iTransient = 0,
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 (oContext.isTransient()
3176
- || bDrop === false && oContext.isInactive() !== undefined) {
3177
- this.aContexts[iTransient] = oContext;
3178
- iTransient += 1;
3179
- } else { // Note: "created persisted" elements must be active - drop 'em
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 < iTransient; i += 1) {
3185
- this.aContexts[i].iIndex = i - iTransient;
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 = iTransient;
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.bCreatedAtEnd = undefined;
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, or for relative bindings containing transient
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.100.0
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) && isParameter(sSegment, vResult[0])) {
1409
- // path evaluation relative to an operation overload
1410
- // @see [OData-CSDL-JSON-v4.01] "14.4.1.2 Path Evaluation"
1411
- return true;
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 (_Helper.hasPrivateAnnotation(oEntity, "transient")) {
1838
+ if (oEntity["@$ui5.context.isTransient"]) {
1832
1839
  bNoEditUrl = true;
1833
1840
  return undefined;
1834
1841
  }