@openui5/sap.ui.core 1.101.0 → 1.102.2

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 (362) hide show
  1. package/.eslintrc.json +26 -5
  2. package/THIRDPARTY.txt +1 -1
  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 +1 -1
  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/Metadata.js +1 -1
  60. package/src/sap/ui/base/Object.js +1 -1
  61. package/src/sap/ui/base/ObjectPool.js +1 -1
  62. package/src/sap/ui/core/.library +2 -1
  63. package/src/sap/ui/core/BusyIndicator.js +1 -1
  64. package/src/sap/ui/core/CommandExecution.js +15 -12
  65. package/src/sap/ui/core/Component.js +31 -12
  66. package/src/sap/ui/core/ComponentContainer.js +1 -1
  67. package/src/sap/ui/core/ComponentMetadata.js +27 -12
  68. package/src/sap/ui/core/ComponentSupport.js +1 -1
  69. package/src/sap/ui/core/Configuration.js +22 -8
  70. package/src/sap/ui/core/Control.js +2 -3
  71. package/src/sap/ui/core/Core.js +95 -27
  72. package/src/sap/ui/core/CustomData.js +1 -1
  73. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  74. package/src/sap/ui/core/Element.js +1 -1
  75. package/src/sap/ui/core/ElementMetadata.js +1 -1
  76. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  77. package/src/sap/ui/core/EventBus.js +1 -1
  78. package/src/sap/ui/core/ExtensionPoint.js +1 -1
  79. package/src/sap/ui/core/FocusHandler.js +2 -3
  80. package/src/sap/ui/core/Fragment.js +1 -1
  81. package/src/sap/ui/core/HTML.js +1 -1
  82. package/src/sap/ui/core/History.js +1 -1
  83. package/src/sap/ui/core/Icon.js +2 -2
  84. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  85. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  86. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  87. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  88. package/src/sap/ui/core/InvisibleText.js +1 -1
  89. package/src/sap/ui/core/Item.js +1 -1
  90. package/src/sap/ui/core/LabelEnablement.js +1 -1
  91. package/src/sap/ui/core/LayoutData.js +1 -1
  92. package/src/sap/ui/core/ListItem.js +1 -1
  93. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  94. package/src/sap/ui/core/Locale.js +1 -1
  95. package/src/sap/ui/core/LocaleData.js +119 -1
  96. package/src/sap/ui/core/Manifest.js +1 -1
  97. package/src/sap/ui/core/Message.js +1 -1
  98. package/src/sap/ui/core/Popup.js +12 -14
  99. package/src/sap/ui/core/RenderManager.js +1 -1
  100. package/src/sap/ui/core/Renderer.js +1 -1
  101. package/src/sap/ui/core/ResizeHandler.js +1 -1
  102. package/src/sap/ui/core/ScrollBar.js +21 -15
  103. package/src/sap/ui/core/SeparatorItem.js +1 -1
  104. package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
  105. package/src/sap/ui/core/Title.js +1 -1
  106. package/src/sap/ui/core/TooltipBase.js +1 -1
  107. package/src/sap/ui/core/UIArea.js +3 -5
  108. package/src/sap/ui/core/UIComponent.js +1 -1
  109. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  110. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  111. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  112. package/src/sap/ui/core/XMLComposite.js +1 -1
  113. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  114. package/src/sap/ui/core/XMLTemplateProcessor.js +512 -387
  115. package/src/sap/ui/core/cache/CacheManager.js +27 -0
  116. package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
  117. package/src/sap/ui/core/cache/LRUPersistentCache.js +74 -3
  118. package/src/sap/ui/core/cldr/ar.json +469 -1
  119. package/src/sap/ui/core/cldr/ar_EG.json +469 -1
  120. package/src/sap/ui/core/cldr/ar_SA.json +469 -1
  121. package/src/sap/ui/core/cldr/bg.json +469 -1
  122. package/src/sap/ui/core/cldr/ca.json +469 -1
  123. package/src/sap/ui/core/cldr/cs.json +469 -1
  124. package/src/sap/ui/core/cldr/cy.json +469 -1
  125. package/src/sap/ui/core/cldr/da.json +469 -1
  126. package/src/sap/ui/core/cldr/de.json +469 -1
  127. package/src/sap/ui/core/cldr/de_AT.json +469 -1
  128. package/src/sap/ui/core/cldr/de_CH.json +469 -1
  129. package/src/sap/ui/core/cldr/el.json +469 -1
  130. package/src/sap/ui/core/cldr/el_CY.json +469 -1
  131. package/src/sap/ui/core/cldr/en.json +469 -1
  132. package/src/sap/ui/core/cldr/en_AU.json +469 -1
  133. package/src/sap/ui/core/cldr/en_GB.json +469 -1
  134. package/src/sap/ui/core/cldr/en_HK.json +469 -1
  135. package/src/sap/ui/core/cldr/en_IE.json +469 -1
  136. package/src/sap/ui/core/cldr/en_IN.json +469 -1
  137. package/src/sap/ui/core/cldr/en_NZ.json +469 -1
  138. package/src/sap/ui/core/cldr/en_PG.json +469 -1
  139. package/src/sap/ui/core/cldr/en_SG.json +469 -1
  140. package/src/sap/ui/core/cldr/en_ZA.json +469 -1
  141. package/src/sap/ui/core/cldr/es.json +469 -1
  142. package/src/sap/ui/core/cldr/es_AR.json +469 -1
  143. package/src/sap/ui/core/cldr/es_BO.json +469 -1
  144. package/src/sap/ui/core/cldr/es_CL.json +469 -1
  145. package/src/sap/ui/core/cldr/es_CO.json +469 -1
  146. package/src/sap/ui/core/cldr/es_MX.json +469 -1
  147. package/src/sap/ui/core/cldr/es_PE.json +469 -1
  148. package/src/sap/ui/core/cldr/es_UY.json +469 -1
  149. package/src/sap/ui/core/cldr/es_VE.json +469 -1
  150. package/src/sap/ui/core/cldr/et.json +469 -1
  151. package/src/sap/ui/core/cldr/fa.json +469 -1
  152. package/src/sap/ui/core/cldr/fi.json +469 -1
  153. package/src/sap/ui/core/cldr/fr.json +469 -1
  154. package/src/sap/ui/core/cldr/fr_BE.json +469 -1
  155. package/src/sap/ui/core/cldr/fr_CA.json +469 -1
  156. package/src/sap/ui/core/cldr/fr_CH.json +469 -1
  157. package/src/sap/ui/core/cldr/fr_LU.json +469 -1
  158. package/src/sap/ui/core/cldr/he.json +469 -1
  159. package/src/sap/ui/core/cldr/hi.json +469 -1
  160. package/src/sap/ui/core/cldr/hr.json +469 -1
  161. package/src/sap/ui/core/cldr/hu.json +469 -1
  162. package/src/sap/ui/core/cldr/id.json +469 -1
  163. package/src/sap/ui/core/cldr/it.json +469 -1
  164. package/src/sap/ui/core/cldr/it_CH.json +469 -1
  165. package/src/sap/ui/core/cldr/ja.json +469 -1
  166. package/src/sap/ui/core/cldr/kk.json +469 -1
  167. package/src/sap/ui/core/cldr/ko.json +469 -1
  168. package/src/sap/ui/core/cldr/lt.json +469 -1
  169. package/src/sap/ui/core/cldr/lv.json +469 -1
  170. package/src/sap/ui/core/cldr/ms.json +469 -1
  171. package/src/sap/ui/core/cldr/nb.json +469 -1
  172. package/src/sap/ui/core/cldr/nl.json +469 -1
  173. package/src/sap/ui/core/cldr/nl_BE.json +469 -1
  174. package/src/sap/ui/core/cldr/pl.json +469 -1
  175. package/src/sap/ui/core/cldr/pt.json +469 -1
  176. package/src/sap/ui/core/cldr/pt_PT.json +469 -1
  177. package/src/sap/ui/core/cldr/ro.json +469 -1
  178. package/src/sap/ui/core/cldr/ru.json +469 -1
  179. package/src/sap/ui/core/cldr/ru_UA.json +469 -1
  180. package/src/sap/ui/core/cldr/sk.json +469 -1
  181. package/src/sap/ui/core/cldr/sl.json +469 -1
  182. package/src/sap/ui/core/cldr/sr.json +469 -1
  183. package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
  184. package/src/sap/ui/core/cldr/sv.json +469 -1
  185. package/src/sap/ui/core/cldr/th.json +469 -1
  186. package/src/sap/ui/core/cldr/tr.json +469 -1
  187. package/src/sap/ui/core/cldr/uk.json +469 -1
  188. package/src/sap/ui/core/cldr/vi.json +469 -1
  189. package/src/sap/ui/core/cldr/zh_CN.json +470 -2
  190. package/src/sap/ui/core/cldr/zh_HK.json +470 -2
  191. package/src/sap/ui/core/cldr/zh_SG.json +470 -2
  192. package/src/sap/ui/core/cldr/zh_TW.json +469 -1
  193. package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
  194. package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
  195. package/src/sap/ui/core/dnd/DragAndDrop.js +2 -2
  196. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  197. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  198. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  199. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  200. package/src/sap/ui/core/format/DateFormat.js +41 -26
  201. package/src/sap/ui/core/format/NumberFormat.js +119 -53
  202. package/src/sap/ui/core/format/TimezoneUtil.js +48 -16
  203. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  204. package/src/sap/ui/core/library.js +3 -3
  205. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  206. package/src/sap/ui/core/message/Message.js +1 -1
  207. package/src/sap/ui/core/message/MessageManager.js +1 -1
  208. package/src/sap/ui/core/message/MessageParser.js +1 -1
  209. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  210. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  211. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  212. package/src/sap/ui/core/mvc/JSView.js +2 -2
  213. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  214. package/src/sap/ui/core/mvc/View.js +2 -1
  215. package/src/sap/ui/core/mvc/XMLView.js +12 -20
  216. package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -62
  217. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  218. package/src/sap/ui/core/plugin/LessSupport.js +3 -3
  219. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  220. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  221. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  222. package/src/sap/ui/core/routing/Router.js +1 -1
  223. package/src/sap/ui/core/rules/App.support.js +8 -8
  224. package/src/sap/ui/core/rules/Config.support.js +12 -12
  225. package/src/sap/ui/core/rules/Model.support.js +8 -8
  226. package/src/sap/ui/core/rules/Rendering.support.js +1 -1
  227. package/src/sap/ui/core/rules/Theming.support.js +4 -4
  228. package/src/sap/ui/core/rules/View.support.js +9 -9
  229. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  230. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  231. package/src/sap/ui/core/service/Service.js +1 -1
  232. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  233. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  234. package/src/sap/ui/core/support/Plugin.js +1 -1
  235. package/src/sap/ui/core/support/Support.js +2 -2
  236. package/src/sap/ui/core/support/plugins/ControlTree.js +7 -3
  237. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  238. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  239. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  240. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  241. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  242. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  243. package/src/sap/ui/core/support/plugins/ViewInfo.js +8 -22
  244. package/src/sap/ui/core/support/support.html +1 -1
  245. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
  246. package/src/sap/ui/core/themes/base/base.less +4 -4
  247. package/src/sap/ui/core/themes/base/global.less +2 -0
  248. package/src/sap/ui/core/themes/sap_hcb/global.less +2 -0
  249. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  250. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  251. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  252. package/src/sap/ui/core/tmpl/Template.js +1 -1
  253. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  254. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  255. package/src/sap/ui/core/util/Export.js +1 -1
  256. package/src/sap/ui/core/util/ExportCell.js +1 -1
  257. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  258. package/src/sap/ui/core/util/ExportRow.js +1 -1
  259. package/src/sap/ui/core/util/ExportType.js +1 -1
  260. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  261. package/src/sap/ui/core/util/File.js +1 -1
  262. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  263. package/src/sap/ui/core/util/MockServer.js +2 -2
  264. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  265. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  266. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  267. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  268. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  269. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  270. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  271. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  272. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  273. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  274. package/src/sap/ui/core/ws/WebSocket.js +7 -8
  275. package/src/sap/ui/debug/ControlTree.js +1 -1
  276. package/src/sap/ui/debug/DebugEnv.js +1 -1
  277. package/src/sap/ui/debug/PropertyList.js +1 -1
  278. package/src/sap/ui/model/ClientListBinding.js +127 -21
  279. package/src/sap/ui/model/ClientModel.js +1 -1
  280. package/src/sap/ui/model/CompositeDataState.js +1 -1
  281. package/src/sap/ui/model/CompositeType.js +1 -1
  282. package/src/sap/ui/model/DataState.js +1 -1
  283. package/src/sap/ui/model/ListBinding.js +32 -13
  284. package/src/sap/ui/model/MetaModel.js +1 -1
  285. package/src/sap/ui/model/Model.js +1 -1
  286. package/src/sap/ui/model/SelectionModel.js +1 -1
  287. package/src/sap/ui/model/SimpleType.js +1 -1
  288. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  289. package/src/sap/ui/model/Type.js +1 -1
  290. package/src/sap/ui/model/_Helper.js +3 -1
  291. package/src/sap/ui/model/json/JSONListBinding.js +0 -58
  292. package/src/sap/ui/model/json/JSONModel.js +1 -1
  293. package/src/sap/ui/model/message/MessageListBinding.js +0 -42
  294. package/src/sap/ui/model/message/MessageModel.js +1 -1
  295. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  296. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  297. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  298. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  299. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  300. package/src/sap/ui/model/odata/OperationMode.js +6 -0
  301. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  302. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  303. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  304. package/src/sap/ui/model/odata/type/Date.js +1 -1
  305. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  306. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  307. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  308. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -2
  309. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  310. package/src/sap/ui/model/odata/type/Double.js +1 -1
  311. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  312. package/src/sap/ui/model/odata/type/Int.js +1 -1
  313. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  314. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  315. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  316. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  317. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  318. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  319. package/src/sap/ui/model/odata/type/Single.js +1 -1
  320. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  321. package/src/sap/ui/model/odata/type/String.js +1 -1
  322. package/src/sap/ui/model/odata/type/Time.js +1 -1
  323. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  324. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  325. package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
  326. package/src/sap/ui/model/odata/v2/Context.js +13 -4
  327. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  328. package/src/sap/ui/model/odata/v2/ODataListBinding.js +107 -34
  329. package/src/sap/ui/model/odata/v2/ODataModel.js +70 -22
  330. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -4
  331. package/src/sap/ui/model/odata/v4/Context.js +25 -1
  332. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
  333. package/src/sap/ui/model/odata/v4/ODataListBinding.js +55 -26
  334. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
  335. package/src/sap/ui/model/odata/v4/ODataModel.js +111 -5
  336. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
  337. package/src/sap/ui/model/odata/v4/lib/_Cache.js +74 -74
  338. package/src/sap/ui/model/odata/v4/lib/_Helper.js +109 -39
  339. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +60 -29
  340. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  341. package/src/sap/ui/model/type/Boolean.js +1 -1
  342. package/src/sap/ui/model/type/Currency.js +1 -1
  343. package/src/sap/ui/model/type/Date.js +1 -1
  344. package/src/sap/ui/model/type/DateInterval.js +1 -1
  345. package/src/sap/ui/model/type/DateTime.js +1 -1
  346. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  347. package/src/sap/ui/model/type/FileSize.js +1 -1
  348. package/src/sap/ui/model/type/Float.js +1 -1
  349. package/src/sap/ui/model/type/Integer.js +1 -1
  350. package/src/sap/ui/model/type/String.js +1 -1
  351. package/src/sap/ui/model/type/Time.js +1 -1
  352. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  353. package/src/sap/ui/model/type/Unit.js +1 -1
  354. package/src/sap/ui/model/xml/XMLListBinding.js +0 -53
  355. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  356. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  357. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  358. package/src/sap/ui/test/actions/Action.js +3 -3
  359. package/src/sap/ui/test/actions/Press.js +1 -1
  360. package/src/sap/ui/test/generic/TestBase.js +1 -1
  361. package/src/sap/ui/util/Storage.js +1 -1
  362. package/ui5.yaml +1 -1
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  * @hideconstructor
61
61
  * @public
62
62
  * @since 1.93.0
63
- * @version 1.101.0
63
+ * @version 1.102.2
64
64
  */
65
65
  var Context = BaseContext.extend("sap.ui.model.odata.v2.Context", {
66
66
  constructor : function (oModel, sPath, sDeepPath, oCreatePromise, bInactive) {
@@ -161,12 +161,17 @@ sap.ui.define([
161
161
  *
162
162
  * @param {object} [mParameters]
163
163
  * For a persistent context, a map of parameters as specified for
164
- * {@link sap.ui.model.odata.v2.ODataModel#remove}
164
+ * {@link sap.ui.model.odata.v2.ODataModel#remove}, except that the <code>groupId</code> and
165
+ * <code>changeSetId</code> parameters default to the values set via
166
+ * {@link sap.ui.model.odata.v2.ODataModel#setChangeGroups} for the type of the entity to be
167
+ * deleted.
165
168
  * @param {string} [mParameters.groupId]
166
169
  * ID of a request group; requests belonging to the same group will be bundled in one batch
167
- * request
170
+ * request. If not provided, the <code>groupId</code> defined for the type of the entity to be
171
+ * deleted is used.
168
172
  * @param {string} [mParameters.changeSetId]
169
- * ID of the <code>ChangeSet</code> that this request should belong to
173
+ * ID of the <code>ChangeSet</code> that this request should belong to. If not provided, the
174
+ * <code>changeSetId</code> defined for the type of the entity to be deleted is used.
170
175
  * @param {boolean} [mParameters.refreshAfterChange]
171
176
  * Defines whether to update all bindings after submitting this change operation,
172
177
  * see {@link #setRefreshAfterChange}. If given, this overrules the model-wide
@@ -203,10 +208,14 @@ sap.ui.define([
203
208
  }
204
209
 
205
210
  return new Promise(function (resolve, reject) {
211
+ var oGroupInfo = oModel._resolveGroup(that.getPath());
212
+
206
213
  oModel.remove("",
207
214
  _Helper.merge({
215
+ changeSetId : oGroupInfo.changeSetId,
208
216
  context : that,
209
217
  error : reject,
218
+ groupId : oGroupInfo.groupId,
210
219
  success : function () {resolve();}
211
220
  }, mParameters));
212
221
  });
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @class Annotation loader for OData V2 services
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.101.0
38
+ * @version 1.102.2
39
39
  *
40
40
  * @public
41
41
  * @since 1.37.0
@@ -57,9 +57,10 @@ sap.ui.define([
57
57
  * @param {boolean} [mParameters.faultTolerant] Turns on the fault tolerance mode, data is not reset if a back-end request returns an error
58
58
  * @param {sap.ui.model.odata.OperationMode} [mParameters.operationMode] Defines the operation mode of this binding
59
59
  * @param {string} [mParameters.select] Value for the OData <code>$select</code> query parameter which is included in the request
60
- * @param {int} [mParameters.threshold] Threshold that defines how many entries should be fetched at least
61
- * by the binding if <code>operationMode</code> is set to <code>Auto</code>
62
- * (See documentation for {@link sap.ui.model.odata.OperationMode.Auto})
60
+ * @param {int} [mParameters.threshold]
61
+ * Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
62
+ * the threshold that defines how many entries should be fetched at least by the binding if
63
+ * <code>operationMode</code> is set to <code>Auto</code>
63
64
  * @param {boolean} [mParameters.transitionMessagesOnly]
64
65
  * Whether this list binding only requests transition messages from the back end. If messages
65
66
  * for entities of this collection need to be updated, use
@@ -102,7 +103,7 @@ sap.ui.define([
102
103
  this.sGroupId = undefined;
103
104
  this.sRefreshGroupId = undefined;
104
105
  this.bLengthRequested = false;
105
- this.bUseExtendedChangeDetection = true;
106
+ this.bUseExtendedChangeDetection = false;
106
107
  this.bFaultTolerant = mParameters && mParameters.faultTolerant;
107
108
  this.bLengthFinal = false;
108
109
  this.iLastEndIndex = 0;
@@ -188,6 +189,40 @@ sap.ui.define([
188
189
  this.detachEvent("createActivate", fnFunction, oListener);
189
190
  };
190
191
 
192
+ /**
193
+ * This helper function must be called only by {@link #getContexts}. It updates
194
+ * <code>iLastStartIndex</code>, <code>iLastLength</code> and
195
+ * <code>iLastMaximumPrefetchSize</code> with the given start index, length and maximum prefetch
196
+ * size. If <code>bKeepCurrent</code> is set, throw an error if keeping
197
+ * current contexts untouched is not supported, otherwise don't update
198
+ * <code>iLastStartIndex</code>, <code>iLastLength</code> and
199
+ * <code>iLastMaximumPrefetchSize</code>.
200
+ *
201
+ * @param {int} [iStartIndex]
202
+ * The start index
203
+ * @param {int} [iLength]
204
+ * The length
205
+ * @param {int} [iMaximumPrefetchSize]
206
+ * The maximum number of contexts to read before and after the given range
207
+ * @param {boolean} [bKeepCurrent]
208
+ * Whether the result of {@link #getCurrentContexts} keeps untouched
209
+ * @throws {Error}
210
+ * If extended change detection is enabled and <code>bKeepCurrent</code> is set, or if
211
+ * <code>iMaximumPrefetchSize</code> and <code>bKeepCurrent</code> are set
212
+ *
213
+ * @private
214
+ */
215
+ ODataListBinding.prototype._updateLastStartAndLength = function (iStartIndex, iLength,
216
+ iMaximumPrefetchSize, bKeepCurrent) {
217
+ if (bKeepCurrent) {
218
+ this._checkKeepCurrentSupported(iMaximumPrefetchSize);
219
+ } else {
220
+ this.iLastStartIndex = iStartIndex;
221
+ this.iLastLength = iLength;
222
+ this.iLastMaximumPrefetchSize = iMaximumPrefetchSize;
223
+ }
224
+ };
225
+
191
226
  /**
192
227
  * Returns all current contexts of this list binding in no special order. Just like
193
228
  * {@link #getCurrentContexts}, this method does not request any data from a back end and does
@@ -215,16 +250,29 @@ sap.ui.define([
215
250
  /**
216
251
  * Return contexts for the list.
217
252
  *
218
- * @param {int} [iStartIndex] The start index of the requested contexts
219
- * @param {int} [iLength] The requested amount of contexts
220
- * @param {int} [iThreshold] The threshold value
253
+ * @param {int} [iStartIndex=0]
254
+ * The index where to start the retrieval of contexts
255
+ * @param {int} [iLength]
256
+ * The number of contexts to retrieve beginning from the start index; defaults to the model's
257
+ * size limit, see {@link sap.ui.model.Model#setSizeLimit}, or to the binding's final length
258
+ * @param {int} [iMaximumPrefetchSize=0]
259
+ * The maximum number of contexts to read before and after the given range; with this,
260
+ * controls can prefetch data that is likely to be needed soon, e.g. when scrolling down in a
261
+ * table
262
+ * @param {boolean} [bKeepCurrent]
263
+ * Whether this call keeps the result of {@link #getCurrentContexts} untouched; since 1.102.0.
221
264
  * @return {sap.ui.model.odata.v2.Context[]}
222
- * The array of contexts for each row of the bound list
265
+ * The array of already available contexts with the first entry containing the context for
266
+ * <code>iStartIndex</code>
267
+ * @throws {Error}
268
+ * If extended change detection is enabled and <code>bKeepCurrent</code> is set, or if
269
+ * <code>iMaximumPrefetchSize</code> and <code>bKeepCurrent</code> are set
270
+ *
223
271
  * @protected
224
272
  */
225
- ODataListBinding.prototype.getContexts = function(iStartIndex, iLength, iThreshold) {
226
- var aContexts, oSkipAndTop,
227
- aContextData = [];
273
+ ODataListBinding.prototype.getContexts = function(iStartIndex, iLength, iMaximumPrefetchSize,
274
+ bKeepCurrent) {
275
+ var aContexts, aContextData, oSkipAndTop;
228
276
 
229
277
  if (this.bInitial || this._hasTransientParentContext()) {
230
278
  return [];
@@ -247,25 +295,21 @@ sap.ui.define([
247
295
  }
248
296
 
249
297
  //this.bInitialized = true;
250
- this.iLastLength = iLength;
251
- this.iLastStartIndex = iStartIndex;
252
- this.iLastThreshold = iThreshold;
253
-
254
- // Set default values if startindex, threshold or length are not defined
298
+ this._updateLastStartAndLength(iStartIndex, iLength, iMaximumPrefetchSize, bKeepCurrent);
255
299
  if (!iStartIndex) {
256
300
  iStartIndex = 0;
257
301
  }
258
302
  if (!iLength) {
259
303
  iLength = this._getMaximumLength();
260
304
  }
261
- if (!iThreshold) {
262
- iThreshold = 0;
305
+ if (!iMaximumPrefetchSize) {
306
+ iMaximumPrefetchSize = 0;
263
307
  }
264
308
 
265
309
  // re-set the threshold in OperationMode.Auto
266
310
  if (this.sOperationMode == OperationMode.Auto) {
267
311
  if (this.iThreshold >= 0) {
268
- iThreshold = Math.max(this.iThreshold, iThreshold);
312
+ iMaximumPrefetchSize = Math.max(this.iThreshold, iMaximumPrefetchSize);
269
313
  }
270
314
  }
271
315
  aContexts = this._getContexts(iStartIndex, iLength);
@@ -275,7 +319,7 @@ sap.ui.define([
275
319
  aContexts.dataRequested = true;
276
320
  }
277
321
  } else {
278
- oSkipAndTop = this._getSkipAndTop(iStartIndex, iLength, iThreshold);
322
+ oSkipAndTop = this._getSkipAndTop(iStartIndex, iLength, iMaximumPrefetchSize);
279
323
  // check if metadata are already available
280
324
  if (this.oModel.getServiceMetadata()) {
281
325
  // If rows are missing send a request
@@ -299,9 +343,10 @@ sap.ui.define([
299
343
  if (!aContexts.dataRequested && aContexts.length > 0) {
300
344
  this._fireChange({reason : ChangeReason.Change});
301
345
  }
302
- } else {
346
+ } else if (!bKeepCurrent) {
303
347
  // Do not create context data and diff in case of refresh, only if real data has been received
304
348
  // The current behaviour is wrong and makes diff detection useless for OData in case of refresh
349
+ aContextData = [];
305
350
  for (var i = 0; i < aContexts.length; i++) {
306
351
  aContextData.push(this.getContextData(aContexts[i]));
307
352
  }
@@ -311,9 +356,10 @@ sap.ui.define([
311
356
  aContexts.diff = this.diffData(this.aLastContextData, aContextData);
312
357
  }
313
358
  }
359
+
314
360
  this.iLastEndIndex = iStartIndex + iLength;
315
361
  this.aLastContexts = aContexts.slice(0);
316
- this.aLastContextData = aContextData.slice(0);
362
+ this.aLastContextData = aContextData;
317
363
  }
318
364
 
319
365
  return aContexts;
@@ -578,7 +624,6 @@ sap.ui.define([
578
624
  if (this.aExpandRefs.sideEffects && !bOldUseExpandedList) {
579
625
  // don't switch expanded list mode if data is read via a side effect
580
626
  this.aExpandRefs = undefined;
581
- this.aAllKeys = null;
582
627
  this.bUseExpandedList = false;
583
628
 
584
629
  return this.bUseExpandedList;
@@ -913,7 +958,7 @@ sap.ui.define([
913
958
 
914
959
  // If length is not final and larger than zero, add some additional length to enable
915
960
  // scrolling/paging for controls that only do this if more items are available
916
- return iResult + (this.iLastThreshold || this.iLastLength || 10);
961
+ return iResult + (this.iLastMaximumPrefetchSize || this.iLastLength || 10);
917
962
  };
918
963
 
919
964
  /**
@@ -1349,6 +1394,33 @@ sap.ui.define([
1349
1394
  return sPath && this.oModel._createRequestUrl(sPath, null, aParams);
1350
1395
  };
1351
1396
 
1397
+ /**
1398
+ * Appends the keys of a list binding's created persisted contexts to its <code>aAllKeys</code>.
1399
+ * Afterwards, the created persisted contexts are removed from the creation rows area.
1400
+ *
1401
+ * Note that this must only be used in <code>OperationMode.Client</code> as this mode expects
1402
+ * that <code>aAllKeys</code> knows the complete collection from server.
1403
+ *
1404
+ * @returns {boolean} Whether created persisted entries have been processed
1405
+ *
1406
+ * @private
1407
+ */
1408
+ ODataListBinding.prototype._moveCreatedPersistedToAllKeys = function () {
1409
+ var that = this,
1410
+ aCreatedPersistedKeys = this._getCreatedPersistedContexts().map(function (oContext) {
1411
+ return that.oModel.getKey(oContext);
1412
+ });
1413
+
1414
+ if (aCreatedPersistedKeys.length) {
1415
+ this.aAllKeys = this.aAllKeys.concat(aCreatedPersistedKeys);
1416
+ this._removePersistedCreatedContexts();
1417
+
1418
+ return true;
1419
+ }
1420
+
1421
+ return false;
1422
+ };
1423
+
1352
1424
  /**
1353
1425
  * Sorts the list.
1354
1426
  *
@@ -1389,12 +1461,10 @@ sap.ui.define([
1389
1461
  if (this.useClientMode()) {
1390
1462
  // apply clientside sorters only if data is available
1391
1463
  if (this.aAllKeys) {
1392
- // If no sorters are defined, restore initial sort order by calling applyFilter
1393
- if (aSorters.length == 0) {
1464
+ if (this._moveCreatedPersistedToAllKeys() || !aSorters.length) {
1394
1465
  this.applyFilter();
1395
- } else {
1396
- this.applySort();
1397
1466
  }
1467
+ this.applySort();
1398
1468
  this._fireChange({reason: ChangeReason.Sort});
1399
1469
  } else {
1400
1470
  this.sChangeReason = ChangeReason.Sort;
@@ -1617,6 +1687,7 @@ sap.ui.define([
1617
1687
  if (this.useClientMode()) {
1618
1688
  // apply clientside filters/sorters only if data is available
1619
1689
  if (this.aAllKeys) {
1690
+ this._moveCreatedPersistedToAllKeys();
1620
1691
  this.applyFilter();
1621
1692
  this.applySort();
1622
1693
  this._fireChange({reason: ChangeReason.Filter});
@@ -1974,13 +2045,14 @@ sap.ui.define([
1974
2045
 
1975
2046
  /**
1976
2047
  * Gets an object with the values for system query options $skip and $top based on the given
1977
- * start index (from control point of view), length and threshold. The number of entities
1978
- * created via {@link #create} is considered for the <code>$skip</code> value if created at the
1979
- * beginning, but it is not considered for the <code>$top</code> value.
2048
+ * start index (from control point of view), length and maximum prefetch size. The number of
2049
+ * entities created via {@link #create} is considered for the <code>$skip</code> value if
2050
+ * created at the beginning, but it is not considered for the <code>$top</code> value.
1980
2051
  *
1981
2052
  * @param {number} iStartIndex The start index from control point of view
1982
2053
  * @param {number} iLength The length
1983
- * @param {number} iThreshold The threshold
2054
+ * @param {number} iMaximumPrefetchSize
2055
+ * The maximum number of contexts to read before and after the given range
1984
2056
  * @returns {object}
1985
2057
  * An object containing the properties <code>skip</code> and <code>top</code>; the values
1986
2058
  * correspond to the system query options <code>$skip</code> and <code>$top</code>.
@@ -1988,7 +2060,8 @@ sap.ui.define([
1988
2060
  *
1989
2061
  * @private
1990
2062
  */
1991
- ODataListBinding.prototype._getSkipAndTop = function (iStartIndex, iLength, iThreshold) {
2063
+ ODataListBinding.prototype._getSkipAndTop = function (iStartIndex, iLength,
2064
+ iMaximumPrefetchSize) {
1992
2065
  var oInterval, aIntervals,
1993
2066
  aCreatedContexts = this._getCreatedContexts(),
1994
2067
  bFirstCreateAtStart = this.isFirstCreateAtEnd() === false,
@@ -1996,7 +2069,7 @@ sap.ui.define([
1996
2069
  ? aCreatedContexts.concat(this.aKeys)
1997
2070
  : this.aKeys;
1998
2071
 
1999
- aIntervals = ODataUtils._getReadIntervals(aKeys, iStartIndex, iLength, iThreshold,
2072
+ aIntervals = ODataUtils._getReadIntervals(aKeys, iStartIndex, iLength, iMaximumPrefetchSize,
2000
2073
  /*iLimit*/this.bLengthFinal ? this.iLength : undefined);
2001
2074
  oInterval = ODataUtils._mergeIntervals(aIntervals);
2002
2075
 
@@ -36,6 +36,7 @@ sap.ui.define([
36
36
  "sap/ui/core/library",
37
37
  "sap/ui/core/message/Message",
38
38
  "sap/ui/core/message/MessageParser",
39
+ "sap/ui/model/_Helper",
39
40
  "sap/ui/model/BindingMode",
40
41
  "sap/ui/model/Context",
41
42
  "sap/ui/model/FilterProcessor",
@@ -55,9 +56,9 @@ sap.ui.define([
55
56
  ], function(_CreatedContextsCache, Context, ODataAnnotations, ODataContextBinding, ODataListBinding,
56
57
  ODataTreeBinding, assert, Log, encodeURL, deepEqual, deepExtend, each, extend,
57
58
  isEmptyObject, isPlainObject, merge, uid, UriParameters, SyncPromise, coreLibrary, Message,
58
- MessageParser, BindingMode, BaseContext, FilterProcessor, Model, CountMode, MessageScope,
59
- ODataMetadata, ODataMetaModel, ODataMessageParser, ODataPropertyBinding, ODataUtils,
60
- OperationMode, UpdateMethod, OData, URI, isCrossOriginURL
59
+ MessageParser, _Helper, BindingMode, BaseContext, FilterProcessor, Model, CountMode,
60
+ MessageScope, ODataMetadata, ODataMetaModel, ODataMessageParser, ODataPropertyBinding,
61
+ ODataUtils, OperationMode, UpdateMethod, OData, URI, isCrossOriginURL
61
62
  ) {
62
63
 
63
64
  "use strict";
@@ -202,7 +203,7 @@ sap.ui.define([
202
203
  * This model is not prepared to be inherited from.
203
204
  *
204
205
  * @author SAP SE
205
- * @version 1.101.0
206
+ * @version 1.102.2
206
207
  *
207
208
  * @public
208
209
  * @alias sap.ui.model.odata.v2.ODataModel
@@ -356,9 +357,8 @@ sap.ui.define([
356
357
  this.oMessageParser = oMessageParser;
357
358
 
358
359
  //collect internal changes in a deferred group as default
359
- this.sDefaultChangeGroup = "changes";
360
- this.setDeferredGroups([this.sDefaultChangeGroup]);
361
- this.setChangeGroups({"*":{groupId: this.sDefaultChangeGroup}});
360
+ this.setDeferredGroups(["changes"]);
361
+ this.setChangeGroups({"*":{groupId: "changes"}});
362
362
 
363
363
  this.oData = {};
364
364
  this.oMetadata = null;
@@ -2015,9 +2015,10 @@ sap.ui.define([
2015
2015
  * if not specified, the default operation mode of this model is used
2016
2016
  * @param {boolean} [mParameters.faultTolerant] Turns on the fault tolerance mode, data is not reset if a backend request returns an error
2017
2017
  * @param {string} [mParameters.batchGroupId] Sets the batch group ID to be used for requests originating from this binding
2018
- * @param {int} [mParameters.threshold] Threshold that defines how many entries should be fetched at least
2019
- * by the binding if <code>operationMode</code> is set to <code>Auto</code>
2020
- * (See documentation for {@link sap.ui.model.odata.OperationMode.Auto})
2018
+ * @param {int} [mParameters.threshold]
2019
+ * Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
2020
+ * the threshold that defines how many entries should be fetched at least by the binding if
2021
+ * <code>operationMode</code> is set to <code>Auto</code>
2021
2022
  * @returns {sap.ui.model.ListBinding} The new list binding
2022
2023
  * @see sap.ui.model.Model.prototype.bindList
2023
2024
  * @public
@@ -2069,6 +2070,7 @@ sap.ui.define([
2069
2070
  * <code>hierarchy-node-descendant-count-for</code> annotation. Services with hierarchy
2070
2071
  * annotations including the <code>hierarchy-node-descendant-count-for</code> annotation, do
2071
2072
  * <b>not</b> support the operation modes <code>Client</code> and <code>Auto</code>.
2073
+ * <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
2072
2074
  *
2073
2075
  * @param {string} sPath
2074
2076
  * The binding path, either absolute or relative to a given <code>oContext</code>
@@ -2109,12 +2111,14 @@ sap.ui.define([
2109
2111
  * specified. {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto} is only
2110
2112
  * supported for services which expose the hierarchy annotations, yet do <b>NOT</b> expose the
2111
2113
  * <code>hierarchy-node-descendant-count-for</code> annotation.
2114
+ * <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
2112
2115
  * @param {number} [mParameters.threshold]
2113
- * The threshold used if the operation mode is set to
2114
- * {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto}. The binding tries to
2115
- * fetch (at least) as many entries as specified by the threshold value.
2116
+ * Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
2117
+ * the threshold that defines how many entries should be fetched at least by the binding if
2118
+ * <code>operationMode</code> is set to <code>Auto</code>
2116
2119
  * @param {boolean} [mParameters.useServersideApplicationFilters]
2117
- * Whether <code>$filter</code> statements should be used for the <code>$count</code> /
2120
+ * Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
2121
+ * whether <code>$filter</code> statements should be used for the <code>$count</code> /
2118
2122
  * <code>$inlinecount</code> requests and for the data request if the operation mode is
2119
2123
  * {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto}. Use this feature only
2120
2124
  * if your back end supports pre-filtering the tree and is capable of responding with
@@ -4311,10 +4315,10 @@ sap.ui.define([
4311
4315
  if (oEntityType) {
4312
4316
  mEntityTypes[oEntityType.entityType] = true;
4313
4317
  }
4314
- if (oRequest.key) { // e.g. /myEntity
4318
+ if (oRequest.key) {
4315
4319
  // for createEntry entities change context path to new one
4316
4320
  if (oRequest.created) {
4317
- var sKey = this._getKey(oResultData); // e.g. /myEntity-4711
4321
+ var sKey = this._getKey(oResultData);
4318
4322
  // rewrite context for new path
4319
4323
  var oContext = this.getContext("/" + oRequest.key);
4320
4324
  sDeepPath = oRequest.deepPath;
@@ -4332,6 +4336,8 @@ sap.ui.define([
4332
4336
  oEntity = this._getEntity(sKey);
4333
4337
  if (oEntity) {
4334
4338
  delete oEntity.__metadata.created;
4339
+ // before deleting the old entity copy and update the changes
4340
+ this._keepChangesAfterCreate(oRequest, oEntity, sKey);
4335
4341
  }
4336
4342
  this._removeEntity(oRequest.key);
4337
4343
  } else {
@@ -4368,6 +4374,46 @@ sap.ui.define([
4368
4374
  return true;
4369
4375
  };
4370
4376
 
4377
+ /**
4378
+ * Creates a new <code>mChangedEntities</code> entry for the <code>sKey</code> for the just
4379
+ * created entity and takes all changes which have been made after this create has been
4380
+ * submitted.
4381
+ *
4382
+ * @param {object} oRequest
4383
+ * The request object for a created entity
4384
+ * @param {object} oEntity
4385
+ * The persisted and retrieved entity object
4386
+ * @param {string} sKey
4387
+ * The key of the created entity
4388
+ *
4389
+ * @private
4390
+ */
4391
+ ODataModel.prototype._keepChangesAfterCreate = function (oRequest, oEntity, sKey) {
4392
+ var oKey2Entity, aNavProps, sProperty,
4393
+ oChangedEntity = this.mChangedEntities[oRequest.key];
4394
+
4395
+ if (oChangedEntity) {
4396
+ aNavProps = this.oMetadata._getNavigationPropertyNames(
4397
+ this.oMetadata._getEntityTypeByPath(sKey));
4398
+ oChangedEntity = _Helper.merge({}, oChangedEntity);
4399
+ oChangedEntity.__metadata = _Helper.merge({}, oEntity.__metadata);
4400
+ oChangedEntity.__metadata.deepPath = oRequest.deepPath;
4401
+ for (sProperty in oRequest.data) {
4402
+ if (_Helper.deepEqual(oRequest.data[sProperty], oChangedEntity[sProperty])
4403
+ || aNavProps.includes(sProperty)) {
4404
+ delete oChangedEntity[sProperty];
4405
+ }
4406
+ }
4407
+ this.mChangedEntities[sKey] = oChangedEntity;
4408
+ oKey2Entity = {};
4409
+ oKey2Entity[sKey] = oEntity;
4410
+ this._updateChangedEntities(oKey2Entity);
4411
+ // cleanup also further POST request for the just created entity
4412
+ this.abortInternalRequest(this._resolveGroup(oRequest.key).groupId,
4413
+ {requestKey: oRequest.key});
4414
+ }
4415
+ };
4416
+
4371
4417
  /**
4372
4418
  * Process request response for failed requests.
4373
4419
  *
@@ -6847,12 +6893,7 @@ sap.ui.define([
6847
6893
  throw new Error("The 'expand' parameter is only supported if batch mode is used");
6848
6894
  }
6849
6895
  bCanonical = this._isCanonicalRequestNeeded(bCanonical);
6850
-
6851
6896
  mHeaders = mHeaders || {};
6852
-
6853
- bRefreshAfterChange = this._getRefreshAfterChange(bRefreshAfterChange, sGroupId);
6854
-
6855
- sGroupId = sGroupId ? sGroupId : this.sDefaultChangeGroup;
6856
6897
  aUrlParams = ODataUtils._createUrlParamsArray(mUrlParams);
6857
6898
 
6858
6899
  var oRequestHandle = {
@@ -6875,11 +6916,18 @@ sap.ui.define([
6875
6916
 
6876
6917
  function create() {
6877
6918
  var oCreateData, oCreatedContext, oCreateResponse, oEntitySetMetadata, oExpandRequest,
6878
- sUID,
6919
+ oGroupInfo, sUID,
6879
6920
  bCreateFailed = false,
6880
6921
  fnErrorFromParameters = fnError,
6881
6922
  fnSuccessFromParameters = fnSuccess;
6882
6923
 
6924
+ // fallback to groups as defined in mChangeGroups; using path is OK as we don't have an
6925
+ // entity yet and the entity type can be derived from the path to determine the group ID
6926
+ oGroupInfo = that._resolveGroup(sNormalizedPath);
6927
+ sGroupId = sGroupId || oGroupInfo.groupId;
6928
+ sChangeSetId = sChangeSetId || oGroupInfo.changeSetId;
6929
+ bRefreshAfterChange = that._getRefreshAfterChange(bRefreshAfterChange, sGroupId);
6930
+
6883
6931
  var oEntityMetadata = that.oMetadata._getEntityTypeByPath(sNormalizedPath);
6884
6932
  if (!oEntityMetadata) {
6885
6933
 
@@ -65,10 +65,12 @@ sap.ui.define([
65
65
  * @param {sap.ui.model.odata.OperationMode} [mParameters.operationMode]
66
66
  * The operation mode for this binding
67
67
  * @param {number} [mParameters.threshold]
68
- * The threshold used if the operation mode is set to
69
- * {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto}
68
+ * Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
69
+ * the threshold that defines how many entries should be fetched at least by the binding if
70
+ * <code>operationMode</code> is set to <code>Auto</code>
70
71
  * @param {boolean} [mParameters.useServersideApplicationFilters]
71
- * Whether <code>$filter</code> statements should be used for the <code>$count</code> /
72
+ * Deprecated since 1.102.0, as {@link sap.ui.model.odata.OperationMode.Auto} is deprecated;
73
+ * whether <code>$filter</code> statements should be used for the <code>$count</code> /
72
74
  * <code>$inlinecount</code> requests and for the data request if the operation mode is
73
75
  * {@link sap.ui.model.odata.OperationMode.Auto OperationMode.Auto}
74
76
  * @param {any} [mParameters.treeState]
@@ -92,7 +94,7 @@ sap.ui.define([
92
94
  * @extends sap.ui.model.TreeBinding
93
95
  * @hideconstructor
94
96
  * @public
95
- * @version 1.101.0
97
+ * @version 1.102.2
96
98
  */
97
99
  var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
98
100
 
@@ -1558,6 +1560,7 @@ sap.ui.define([
1558
1560
  * instance. If it is set, the filters of type <code>Application</code> will always be applied
1559
1561
  * on the back end and trigger an OData request.
1560
1562
  * For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
1563
+ * <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
1561
1564
  *
1562
1565
  * @param {sap.ui.model.Filter[]|sap.ui.model.Filter} aFilters
1563
1566
  * Filter or array of filters to apply
@@ -1724,6 +1727,7 @@ sap.ui.define([
1724
1727
  * Sorts the Tree according to the given Sorter(s). In <code>OperationMode.Client</code> or
1725
1728
  * <code>OperationMode.Auto</code> (if the given threshold is satisfied), the sorters are
1726
1729
  * applied locally on the client.
1730
+ * <b>Note:</b> {@link sap.ui.model.odata.OperationMode.Auto} is deprecated since 1.102.0.
1727
1731
  *
1728
1732
  * @param {sap.ui.model.Sorter[]|sap.ui.model.Sorter} aSorters
1729
1733
  * The Sorter or an Array of sap.ui.model.Sorter instances
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @hideconstructor
43
43
  * @public
44
44
  * @since 1.39.0
45
- * @version 1.101.0
45
+ * @version 1.102.2
46
46
  */
47
47
  Context = BaseContext.extend("sap.ui.model.odata.v4.Context", {
48
48
  constructor : constructor
@@ -379,6 +379,10 @@ sap.ui.define([
379
379
  oDependentBinding.setContext(undefined);
380
380
  });
381
381
  this.oBinding = undefined;
382
+ this.oCreatedPromise = undefined;
383
+ this.oSyncCreatePromise = undefined;
384
+ this.bInactive = undefined;
385
+ this.bKeepAlive = undefined;
382
386
  // When removing oModel, ManagedObject#getBindingContext does not return the destroyed
383
387
  // context although the control still refers to it
384
388
  this.oModel = undefined;
@@ -406,8 +410,28 @@ sap.ui.define([
406
410
  */
407
411
  Context.prototype.doSetProperty = function (sPath, vValue, oGroupLock, bSkipRetry) {
408
412
  var oMetaModel = this.oModel.getMetaModel(),
413
+ oPromise,
414
+ oValue,
409
415
  that = this;
410
416
 
417
+ if (oGroupLock && this.isTransient() && !this.isInactive()) {
418
+ oValue = this.getValue();
419
+ oPromise = oValue && _Helper.getPrivateAnnotation(oValue, "transient");
420
+ if (oPromise instanceof Promise) {
421
+ oGroupLock.unlock();
422
+ oGroupLock = oGroupLock.getUnlockedCopy();
423
+ this.doSetProperty(sPath, vValue, null, true) // early UI update
424
+ .catch(this.oModel.getReporter());
425
+
426
+ return oPromise.then(function (bSuccess) {
427
+ // in case of success, wait until creation is completed because context path's
428
+ // key predicate is adjusted
429
+ return bSuccess && that.created();
430
+ }).then(function () {
431
+ return that.doSetProperty(sPath, vValue, oGroupLock, bSkipRetry);
432
+ });
433
+ }
434
+ }
411
435
  if (this.oModel.bAutoExpandSelect) {
412
436
  sPath = oMetaModel.getReducedPath(
413
437
  this.oModel.resolve(sPath, this),
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
75
75
  * @public
76
76
  * @since 1.37.0
77
- * @version 1.101.0
77
+ * @version 1.102.2
78
78
  *
79
79
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
80
80
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding