@openui5/sap.ui.core 1.103.1 → 1.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/.reuse/dep5 +35 -15
  2. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  3. package/THIRDPARTY.txt +64 -21
  4. package/package.json +1 -1
  5. package/src/jquery.sap.dom.js +10 -10
  6. package/src/jquery.sap.global.js +24 -216
  7. package/src/jquery.sap.history.js +1 -1
  8. package/src/jquery.sap.properties.js +2 -2
  9. package/src/jquery.sap.resources.js +1 -1
  10. package/src/jquery.sap.script.js +1 -1
  11. package/src/jquery.sap.storage.js +4 -4
  12. package/src/sap/base/i18n/ResourceBundle.js +7 -11
  13. package/src/sap/base/util/LoaderExtensions.js +69 -61
  14. package/src/sap/base/util/ObjectPath.js +1 -1
  15. package/src/sap/base/util/Properties.js +1 -1
  16. package/src/sap/base/util/fetch.js +228 -0
  17. package/src/sap/base/util/mixedFetch.js +69 -0
  18. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  19. package/src/sap/base/util/restricted/_castArray.js +1 -1
  20. package/src/sap/base/util/restricted/_compact.js +1 -1
  21. package/src/sap/base/util/restricted/_curry.js +1 -1
  22. package/src/sap/base/util/restricted/_debounce.js +1 -1
  23. package/src/sap/base/util/restricted/_difference.js +1 -1
  24. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  25. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  26. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  27. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  28. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  29. package/src/sap/base/util/restricted/_flatten.js +1 -1
  30. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  31. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  32. package/src/sap/base/util/restricted/_intersection.js +1 -1
  33. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  34. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  35. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  36. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  37. package/src/sap/base/util/restricted/_isNil.js +1 -1
  38. package/src/sap/base/util/restricted/_max.js +1 -1
  39. package/src/sap/base/util/restricted/_merge.js +1 -1
  40. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  41. package/src/sap/base/util/restricted/_min.js +1 -1
  42. package/src/sap/base/util/restricted/_omit.js +1 -1
  43. package/src/sap/base/util/restricted/_pick.js +1 -1
  44. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  45. package/src/sap/base/util/restricted/_throttle.js +1 -1
  46. package/src/sap/base/util/restricted/_toArray.js +1 -1
  47. package/src/sap/base/util/restricted/_union.js +1 -1
  48. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  49. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  50. package/src/sap/base/util/restricted/_uniq.js +1 -1
  51. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  52. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  53. package/src/sap/base/util/restricted/_without.js +1 -1
  54. package/src/sap/base/util/restricted/_xor.js +1 -1
  55. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  56. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  57. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  58. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  59. package/src/sap/base/util/syncFetch.js +66 -0
  60. package/src/sap/ui/Device.js +5 -5
  61. package/src/sap/ui/Global.js +7 -14
  62. package/src/sap/ui/VersionInfo.js +57 -54
  63. package/src/sap/ui/base/BindingInfo.js +198 -0
  64. package/src/sap/ui/base/DataType.js +1 -1
  65. package/src/sap/ui/base/Event.js +2 -2
  66. package/src/sap/ui/base/EventProvider.js +2 -2
  67. package/src/sap/ui/base/Interface.js +1 -1
  68. package/src/sap/ui/base/ManagedObject.js +209 -979
  69. package/src/sap/ui/base/ManagedObjectMetadata.js +6 -6
  70. package/src/sap/ui/base/ManagedObjectObserver.js +2 -2
  71. package/src/sap/ui/base/Metadata.js +1 -1
  72. package/src/sap/ui/base/Object.js +1 -1
  73. package/src/sap/ui/base/ObjectPool.js +1 -1
  74. package/src/sap/ui/core/.library +72 -50
  75. package/src/sap/ui/core/AccessKeysEnablement.js +173 -0
  76. package/src/sap/ui/core/AppCacheBuster.js +65 -51
  77. package/src/sap/ui/core/BusyIndicator.js +1 -1
  78. package/src/sap/ui/core/Component.js +52 -25
  79. package/src/sap/ui/core/ComponentContainer.js +1 -1
  80. package/src/sap/ui/core/ComponentMetadata.js +16 -23
  81. package/src/sap/ui/core/ComponentSupport.js +1 -1
  82. package/src/sap/ui/core/Configuration.js +598 -358
  83. package/src/sap/ui/core/Control.js +1 -1
  84. package/src/sap/ui/core/Core.js +126 -185
  85. package/src/sap/ui/core/CustomData.js +1 -1
  86. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  87. package/src/sap/ui/core/Element.js +68 -4
  88. package/src/sap/ui/core/ElementMetadata.js +6 -4
  89. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  90. package/src/sap/ui/core/EventBus.js +1 -1
  91. package/src/sap/ui/core/ExtensionPoint.js +2 -2
  92. package/src/sap/ui/core/FocusHandler.js +84 -39
  93. package/src/sap/ui/core/Fragment.js +1 -1
  94. package/src/sap/ui/core/HTML.js +1 -1
  95. package/src/sap/ui/core/History.js +1 -1
  96. package/src/sap/ui/core/Icon.js +1 -1
  97. package/src/sap/ui/core/IconPool.js +8 -8
  98. package/src/sap/ui/core/IndicationColorSupport.js +2 -2
  99. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  100. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  101. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  102. package/src/sap/ui/core/InvisibleText.js +4 -1
  103. package/src/sap/ui/core/Item.js +1 -1
  104. package/src/sap/ui/core/LabelEnablement.js +1 -1
  105. package/src/sap/ui/core/LayoutData.js +1 -1
  106. package/src/sap/ui/core/ListItem.js +1 -1
  107. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  108. package/src/sap/ui/core/Locale.js +1 -1
  109. package/src/sap/ui/core/LocaleData.js +8 -51
  110. package/src/sap/ui/core/Manifest.js +3 -5
  111. package/src/sap/ui/core/Message.js +1 -1
  112. package/src/sap/ui/core/Popup.js +13 -8
  113. package/src/sap/ui/core/RenderManager.js +17 -21
  114. package/src/sap/ui/core/Renderer.js +1 -1
  115. package/src/sap/ui/core/ResizeHandler.js +28 -49
  116. package/src/sap/ui/core/ScrollBar.js +1 -1
  117. package/src/sap/ui/core/SeparatorItem.js +1 -1
  118. package/src/sap/ui/core/Title.js +1 -1
  119. package/src/sap/ui/core/TooltipBase.js +12 -13
  120. package/src/sap/ui/core/UIArea.js +13 -12
  121. package/src/sap/ui/core/UIComponent.js +3 -3
  122. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  123. package/src/sap/ui/core/ValueStateSupport.js +2 -2
  124. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  125. package/src/sap/ui/core/XMLComposite.js +5 -2
  126. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  127. package/src/sap/ui/core/XMLTemplateProcessor.js +7 -7
  128. package/src/sap/ui/core/_ConfigurationProvider.js +187 -0
  129. package/src/sap/ui/core/_IconRegistry.js +66 -55
  130. package/src/sap/ui/core/cache/CacheManager.js +20 -16
  131. package/src/sap/ui/core/cache/CacheManagerNOP.js +5 -2
  132. package/src/sap/ui/core/cache/LRUPersistentCache.js +15 -8
  133. package/src/sap/ui/core/cldr/en.json +0 -1
  134. package/src/sap/ui/core/cldr/es_BO.json +3 -3
  135. package/src/sap/ui/core/cldr/es_CL.json +3 -3
  136. package/src/sap/ui/core/cldr/es_MX.json +3 -3
  137. package/src/sap/ui/core/cldr/es_PE.json +3 -3
  138. package/src/sap/ui/core/cldr/es_UY.json +3 -3
  139. package/src/sap/ui/core/cldr/es_VE.json +2 -2
  140. package/src/sap/ui/core/date/Buddhist.js +15 -13
  141. package/src/sap/ui/core/date/Japanese.js +0 -6
  142. package/src/sap/ui/core/date/UniversalDate.js +144 -34
  143. package/src/sap/ui/core/delegate/ItemNavigation.js +2 -2
  144. package/src/sap/ui/core/delegate/ScrollEnablement.js +7 -6
  145. package/src/sap/ui/core/dnd/DragAndDrop.js +13 -9
  146. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  147. package/src/sap/ui/core/dnd/DragDropInfo.js +3 -3
  148. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  149. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  150. package/src/sap/ui/core/format/DateFormat.js +36 -9
  151. package/src/sap/ui/core/format/NumberFormat.js +92 -26
  152. package/src/sap/ui/core/format/TimezoneUtil.js +2 -2
  153. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  154. package/src/sap/ui/core/library.js +44 -3
  155. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  156. package/src/sap/ui/core/message/Message.js +1 -1
  157. package/src/sap/ui/core/message/MessageManager.js +1 -1
  158. package/src/sap/ui/core/message/MessageParser.js +1 -1
  159. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  160. package/src/sap/ui/core/messagebundle.properties +2 -0
  161. package/src/sap/ui/core/messagebundle_ar.properties +54 -53
  162. package/src/sap/ui/core/messagebundle_bg.properties +54 -53
  163. package/src/sap/ui/core/messagebundle_ca.properties +28 -27
  164. package/src/sap/ui/core/messagebundle_cs.properties +37 -36
  165. package/src/sap/ui/core/messagebundle_cy.properties +57 -56
  166. package/src/sap/ui/core/messagebundle_da.properties +53 -52
  167. package/src/sap/ui/core/messagebundle_de.properties +54 -53
  168. package/src/sap/ui/core/messagebundle_el.properties +46 -45
  169. package/src/sap/ui/core/messagebundle_en.properties +57 -56
  170. package/src/sap/ui/core/messagebundle_en_GB.properties +57 -56
  171. package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +1 -0
  172. package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
  173. package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +1 -0
  174. package/src/sap/ui/core/messagebundle_es.properties +42 -41
  175. package/src/sap/ui/core/messagebundle_es_MX.properties +54 -53
  176. package/src/sap/ui/core/messagebundle_et.properties +51 -50
  177. package/src/sap/ui/core/messagebundle_fi.properties +48 -47
  178. package/src/sap/ui/core/messagebundle_fr.properties +37 -36
  179. package/src/sap/ui/core/messagebundle_fr_CA.properties +22 -21
  180. package/src/sap/ui/core/messagebundle_hi.properties +42 -41
  181. package/src/sap/ui/core/messagebundle_hr.properties +55 -54
  182. package/src/sap/ui/core/messagebundle_hu.properties +56 -55
  183. package/src/sap/ui/core/messagebundle_id.properties +55 -54
  184. package/src/sap/ui/core/messagebundle_it.properties +55 -54
  185. package/src/sap/ui/core/messagebundle_iw.properties +55 -54
  186. package/src/sap/ui/core/messagebundle_ja.properties +48 -47
  187. package/src/sap/ui/core/messagebundle_kk.properties +41 -40
  188. package/src/sap/ui/core/messagebundle_ko.properties +21 -20
  189. package/src/sap/ui/core/messagebundle_lt.properties +55 -54
  190. package/src/sap/ui/core/messagebundle_lv.properties +55 -54
  191. package/src/sap/ui/core/messagebundle_ms.properties +52 -51
  192. package/src/sap/ui/core/messagebundle_nl.properties +53 -52
  193. package/src/sap/ui/core/messagebundle_no.properties +53 -52
  194. package/src/sap/ui/core/messagebundle_pl.properties +52 -51
  195. package/src/sap/ui/core/messagebundle_pt.properties +54 -53
  196. package/src/sap/ui/core/messagebundle_pt_PT.properties +55 -54
  197. package/src/sap/ui/core/messagebundle_ro.properties +56 -55
  198. package/src/sap/ui/core/messagebundle_ru.properties +52 -51
  199. package/src/sap/ui/core/messagebundle_sh.properties +57 -56
  200. package/src/sap/ui/core/messagebundle_sk.properties +54 -53
  201. package/src/sap/ui/core/messagebundle_sl.properties +56 -55
  202. package/src/sap/ui/core/messagebundle_sv.properties +52 -51
  203. package/src/sap/ui/core/messagebundle_th.properties +25 -24
  204. package/src/sap/ui/core/messagebundle_tr.properties +56 -55
  205. package/src/sap/ui/core/messagebundle_uk.properties +55 -54
  206. package/src/sap/ui/core/messagebundle_vi.properties +56 -55
  207. package/src/sap/ui/core/messagebundle_zh_CN.properties +55 -54
  208. package/src/sap/ui/core/messagebundle_zh_TW.properties +55 -54
  209. package/src/sap/ui/core/mvc/Controller.js +17 -12
  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 +7 -7
  215. package/src/sap/ui/core/mvc/XMLView.js +1 -2
  216. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  217. package/src/sap/ui/core/plugin/LessSupport.js +16 -14
  218. package/src/sap/ui/core/plugin/TemplatingSupport.js +2 -1
  219. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  220. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  221. package/src/sap/ui/core/routing/Router.js +4 -4
  222. package/src/sap/ui/core/routing/async/TargetCache.js +4 -0
  223. package/src/sap/ui/core/rules/App.support.js +11 -13
  224. package/src/sap/ui/core/rules/Config.support.js +14 -14
  225. package/src/sap/ui/core/rules/CoreHelper.support.js +3 -3
  226. package/src/sap/ui/core/rules/Model.support.js +8 -8
  227. package/src/sap/ui/core/rules/Rendering.support.js +1 -1
  228. package/src/sap/ui/core/rules/Theming.support.js +8 -8
  229. package/src/sap/ui/core/rules/View.support.js +20 -13
  230. package/src/sap/ui/core/search/OpenSearchProvider.js +25 -12
  231. package/src/sap/ui/core/search/SearchProvider.js +2 -2
  232. package/src/sap/ui/core/service/Service.js +1 -1
  233. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  234. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  235. package/src/sap/ui/core/support/Hotkeys.js +2 -3
  236. package/src/sap/ui/core/support/Plugin.js +1 -1
  237. package/src/sap/ui/core/support/Support.js +3 -4
  238. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  239. package/src/sap/ui/core/support/plugins/Debugging.js +4 -4
  240. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  241. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  242. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  243. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  244. package/src/sap/ui/core/support/plugins/TechInfo.js +46 -33
  245. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  246. package/src/sap/ui/core/support/plugins/ViewInfo.js +3 -4
  247. package/src/sap/ui/core/support/support.html +1 -1
  248. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +3 -3
  249. package/src/sap/ui/core/themes/base/Icon.less +4 -0
  250. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +1 -1
  251. package/src/sap/ui/core/themes/base/base.less +26 -26
  252. package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
  253. package/src/sap/ui/core/themes/base/global.less +5 -1
  254. package/src/sap/ui/core/themes/base/shared.less +6 -0
  255. package/src/sap/ui/core/theming/Parameters.js +52 -53
  256. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  257. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  258. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  259. package/src/sap/ui/core/tmpl/Template.js +7 -5
  260. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  261. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  262. package/src/sap/ui/core/util/Export.js +1 -1
  263. package/src/sap/ui/core/util/ExportCell.js +1 -1
  264. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  265. package/src/sap/ui/core/util/ExportRow.js +1 -1
  266. package/src/sap/ui/core/util/ExportType.js +1 -1
  267. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  268. package/src/sap/ui/core/util/File.js +1 -1
  269. package/src/sap/ui/core/util/LibraryInfo.js +61 -42
  270. package/src/sap/ui/core/util/MockServer.js +45 -71
  271. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  272. package/src/sap/ui/core/util/ResponsivePaddingsEnablement.js +4 -3
  273. package/src/sap/ui/core/util/XMLPreprocessor.js +3 -3
  274. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +1 -4
  275. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  276. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  277. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  278. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  279. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  280. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  281. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  282. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  283. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  284. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  285. package/src/sap/ui/debug/ControlTree.js +1 -1
  286. package/src/sap/ui/debug/DebugEnv.js +1 -1
  287. package/src/sap/ui/debug/PropertyList.css +1 -31
  288. package/src/sap/ui/debug/PropertyList.js +6 -240
  289. package/src/sap/ui/dom/getScrollbarSize.js +1 -1
  290. package/src/sap/ui/dom/jquery/control.js +1 -0
  291. package/src/sap/ui/events/jquery/EventSimulation.js +4 -4
  292. package/src/sap/ui/model/ClientModel.js +1 -1
  293. package/src/sap/ui/model/CompositeDataState.js +1 -1
  294. package/src/sap/ui/model/CompositeType.js +1 -1
  295. package/src/sap/ui/model/Context.js +3 -0
  296. package/src/sap/ui/model/ContextBinding.js +1 -1
  297. package/src/sap/ui/model/DataState.js +3 -3
  298. package/src/sap/ui/model/ListBinding.js +2 -2
  299. package/src/sap/ui/model/ManagedObjectBindingSupport.js +871 -0
  300. package/src/sap/ui/model/MetaModel.js +1 -1
  301. package/src/sap/ui/model/Model.js +16 -5
  302. package/src/sap/ui/model/SelectionModel.js +1 -1
  303. package/src/sap/ui/model/SimpleType.js +2 -2
  304. package/src/sap/ui/model/Sorter.js +2 -2
  305. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  306. package/src/sap/ui/model/Type.js +1 -1
  307. package/src/sap/ui/model/_Helper.js +3 -1
  308. package/src/sap/ui/model/analytics/odata4analytics.js +2 -2
  309. package/src/sap/ui/model/base/ManagedObjectModel.js +2 -2
  310. package/src/sap/ui/model/json/JSONModel.js +2 -2
  311. package/src/sap/ui/model/message/MessageModel.js +1 -1
  312. package/src/sap/ui/model/odata/AnnotationHelper.js +4 -4
  313. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  314. package/src/sap/ui/model/odata/ODataMessageParser.js +4 -4
  315. package/src/sap/ui/model/odata/ODataMetaModel.js +10 -10
  316. package/src/sap/ui/model/odata/ODataMetadata.js +6 -3
  317. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  318. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +459 -268
  319. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  320. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  321. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  322. package/src/sap/ui/model/odata/type/Date.js +1 -1
  323. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  324. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  325. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  326. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  327. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  328. package/src/sap/ui/model/odata/type/Double.js +1 -1
  329. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  330. package/src/sap/ui/model/odata/type/Int.js +1 -1
  331. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  332. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  333. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  334. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  335. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  336. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  337. package/src/sap/ui/model/odata/type/Single.js +1 -1
  338. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  339. package/src/sap/ui/model/odata/type/String.js +1 -1
  340. package/src/sap/ui/model/odata/type/Time.js +1 -1
  341. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  342. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  343. package/src/sap/ui/model/odata/v2/Context.js +5 -5
  344. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  345. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +5 -2
  346. package/src/sap/ui/model/odata/v2/ODataListBinding.js +26 -1
  347. package/src/sap/ui/model/odata/v2/ODataModel.js +164 -125
  348. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +18 -2
  349. package/src/sap/ui/model/odata/v4/AnnotationHelper.js +3 -3
  350. package/src/sap/ui/model/odata/v4/Context.js +169 -79
  351. package/src/sap/ui/model/odata/v4/ODataBinding.js +51 -12
  352. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +111 -92
  353. package/src/sap/ui/model/odata/v4/ODataListBinding.js +206 -150
  354. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -10
  355. package/src/sap/ui/model/odata/v4/ODataModel.js +249 -28
  356. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +33 -18
  357. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +17 -11
  358. package/src/sap/ui/model/odata/v4/ODataUtils.js +7 -4
  359. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +142 -35
  360. package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +167 -16
  361. package/src/sap/ui/model/odata/v4/lib/_Cache.js +388 -188
  362. package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +2 -3
  363. package/src/sap/ui/model/odata/v4/lib/_Helper.js +119 -43
  364. package/src/sap/ui/model/odata/v4/lib/_MinMaxHelper.js +2 -3
  365. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +13 -6
  366. package/src/sap/ui/model/resource/ResourceModel.js +2 -2
  367. package/src/sap/ui/model/type/Boolean.js +1 -1
  368. package/src/sap/ui/model/type/Currency.js +2 -2
  369. package/src/sap/ui/model/type/Date.js +1 -1
  370. package/src/sap/ui/model/type/DateInterval.js +1 -1
  371. package/src/sap/ui/model/type/DateTime.js +1 -1
  372. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  373. package/src/sap/ui/model/type/FileSize.js +1 -1
  374. package/src/sap/ui/model/type/Float.js +1 -1
  375. package/src/sap/ui/model/type/Integer.js +1 -1
  376. package/src/sap/ui/model/type/String.js +2 -2
  377. package/src/sap/ui/model/type/Time.js +1 -1
  378. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  379. package/src/sap/ui/model/type/Unit.js +1 -1
  380. package/src/sap/ui/model/xml/XMLModel.js +4 -2
  381. package/src/sap/ui/performance/trace/FESR.js +27 -24
  382. package/src/sap/ui/performance/trace/Interaction.js +66 -16
  383. package/src/sap/ui/qunit/QUnitUtils.js +1 -2
  384. package/src/sap/ui/qunit/sinon-qunit-bridge.js +1 -1
  385. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  386. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  387. package/src/sap/ui/test/Opa5.js +1 -1
  388. package/src/sap/ui/test/OpaBuilder.js +1 -1
  389. package/src/sap/ui/test/TestUtils.js +35 -2
  390. package/src/sap/ui/test/actions/Press.js +7 -0
  391. package/src/sap/ui/test/generic/TestBase.js +1 -1
  392. package/src/sap/ui/test/matchers/AggregationContainsPropertyEqual.js +2 -3
  393. package/src/sap/ui/test/matchers/AggregationFilled.js +2 -3
  394. package/src/sap/ui/test/matchers/AggregationLengthEquals.js +2 -3
  395. package/src/sap/ui/test/matchers/Matcher.js +9 -11
  396. package/src/sap/ui/test/opaQunit.js +15 -9
  397. package/src/sap/ui/test/pipelines/ActionPipeline.js +2 -3
  398. package/src/sap/ui/test/pipelines/MatcherPipeline.js +2 -3
  399. package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -3
  400. package/src/sap/ui/thirdparty/IPv6.js +1 -1
  401. package/src/sap/ui/thirdparty/SecondLevelDomains.js +1 -1
  402. package/src/sap/ui/thirdparty/URI.js +8 -2
  403. package/src/sap/ui/thirdparty/URITemplate.js +1 -1
  404. package/src/sap/ui/util/Storage.js +1 -1
  405. package/src/sap/ui/util/XMLHelper.js +1 -1
@@ -203,7 +203,7 @@ sap.ui.define([
203
203
  * This model is not prepared to be inherited from.
204
204
  *
205
205
  * @author SAP SE
206
- * @version 1.103.1
206
+ * @version 1.106.0
207
207
  *
208
208
  * @public
209
209
  * @alias sap.ui.model.odata.v2.ODataModel
@@ -1464,6 +1464,7 @@ sap.ui.define([
1464
1464
  * @param {object} oData Data that should be imported
1465
1465
  * @param {map} mChangedEntities Map of changed entities
1466
1466
  * @param {object} oResponse Response where the data came from
1467
+ * @param {object} oRequest The request object
1467
1468
  * @param {string} [sPath] The path to the data
1468
1469
  * @param {string} [sDeepPath] The deep path to the data
1469
1470
  * @param {string} [sKey] The cache key to the data if known
@@ -1478,7 +1479,7 @@ sap.ui.define([
1478
1479
  * @return {string|string[]} Key of imported data or array of keys in case of nested entries
1479
1480
  * @private
1480
1481
  */
1481
- ODataModel.prototype._importData = function(oData, mChangedEntities, oResponse, sPath,
1482
+ ODataModel.prototype._importData = function(oData, mChangedEntities, oResponse, oRequest, sPath,
1482
1483
  sDeepPath, sKey, bFunctionImport, sPathFromCanonicalParent, bSideEffects) {
1483
1484
  var that = this,
1484
1485
  aList, oResult, oEntry, oCurrentEntry;
@@ -1489,7 +1490,7 @@ sap.ui.define([
1489
1490
  aList = [];
1490
1491
  each(oData.results, function(i, entry) {
1491
1492
  var sKey = that._getKey(entry);
1492
- sKey = that._importData(entry, mChangedEntities, oResponse,
1493
+ sKey = that._importData(entry, mChangedEntities, oResponse, /*oRequest*/undefined,
1493
1494
  sPath.substr(0, sPath.lastIndexOf("/")), sDeepPath, sKey,
1494
1495
  /*bFunctionImport*/undefined, /*sPathFromCanonicalParent*/undefined,
1495
1496
  bSideEffects);
@@ -1545,8 +1546,9 @@ sap.ui.define([
1545
1546
  var sNewPath = sPath + "/" + sName;
1546
1547
  var sNewDeepPath = sDeepPath + "/" + sName;
1547
1548
 
1548
- oResult = that._importData(oProperty, mChangedEntities, oResponse, sNewPath,
1549
- sNewDeepPath, undefined, false, "/" + sKey + "/" + sName, bSideEffects);
1549
+ oResult = that._importData(oProperty, mChangedEntities, oResponse,
1550
+ /*oRequest*/undefined, sNewPath, sNewDeepPath, undefined, false,
1551
+ "/" + sKey + "/" + sName, bSideEffects);
1550
1552
  if (Array.isArray(oResult)) {
1551
1553
  oEntry[sName] = {__list: oResult};
1552
1554
  if (bSideEffects) {
@@ -1559,7 +1561,6 @@ sap.ui.define([
1559
1561
  // ODataModel#requestSideEffects; see BLI CPOUI5MODELS-656
1560
1562
  delete oEntry[sName];
1561
1563
  });
1562
-
1563
1564
  }
1564
1565
  } else {
1565
1566
  if (oCurrentEntry[sName] && oCurrentEntry[sName].__ref) {
@@ -1577,18 +1578,19 @@ sap.ui.define([
1577
1578
  oEntry[sName] = oProperty;
1578
1579
  }
1579
1580
  });
1580
- // if we got new data we have to update changed entities
1581
- var oMap = {};
1582
- oMap[sKey] = oEntry;
1583
-
1584
1581
  //if we detect a preliminary context we need to set preliminary false and flag for update
1585
1582
  if (this.hasContext("/" + sKey) && this.getContext("/" + sKey).isPreliminary()) {
1586
1583
  var oExistingContext = this.getContext("/" + sKey);
1587
1584
  oExistingContext.setUpdated(true);
1585
+ this.callAfterUpdate(function() {
1586
+ oExistingContext.setUpdated(false);
1587
+ });
1588
1588
  oExistingContext.setPreliminary(false);
1589
1589
  }
1590
-
1591
- this._updateChangedEntities(oMap);
1590
+ if (oRequest && oRequest.created && oRequest.key) {
1591
+ this._cleanupAfterCreate(oRequest, sKey);
1592
+ }
1593
+ this._updateChangedEntity(sKey, oEntry);
1592
1594
  mChangedEntities[sKey] = true;
1593
1595
 
1594
1596
  // if no path information available use the key. This should be the case for create/callFunction
@@ -2769,7 +2771,7 @@ sap.ui.define([
2769
2771
  * <code>undefined</code> when the <code>vValue</code> can't be interpreted.
2770
2772
  *
2771
2773
  * @param {string|object|sap.ui.model.Context} vValue The canonical entry URI, the context or entry object
2772
- * @returns {string} Key of the entry or <code>undefined</code>
2774
+ * @returns {string|undefined} Key of the entry or <code>undefined</code>
2773
2775
  * @public
2774
2776
  */
2775
2777
  ODataModel.prototype.getKey = function(vValue) {
@@ -2914,7 +2916,7 @@ sap.ui.define([
2914
2916
  * Comma-separated list of properties or paths to properties to select
2915
2917
  * @param {string} [mParameters.expand]
2916
2918
  * Comma-separated list of navigation properties or paths to navigation properties to expand
2917
- * @returns {any}
2919
+ * @returns {any|undefined}
2918
2920
  * The value for the given path and context or <code>undefined</code> if data or entity type
2919
2921
  * cannot be found or if not all selected properties are available
2920
2922
  *
@@ -4268,10 +4270,10 @@ sap.ui.define([
4268
4270
  if (oRequest.key || oRequest.created) {
4269
4271
  // no need to pass sideEffects because side-effects requests don't have a key or
4270
4272
  // a created property attached to the request
4271
- that._importData(oImportData, mLocalGetEntities, oResponse, /*sPath*/undefined,
4272
- /*sDeepPath*/undefined, /*sKey*/undefined, bIsFunction);
4273
+ that._importData(oImportData, mLocalGetEntities, oResponse, oRequest,
4274
+ /*sPath*/undefined, /*sDeepPath*/undefined, /*sKey*/undefined, bIsFunction);
4273
4275
  } else {
4274
- that._importData(oImportData, mLocalGetEntities, oResponse, sPath,
4276
+ that._importData(oImportData, mLocalGetEntities, oResponse, oRequest, sPath,
4275
4277
  oRequest.deepPath, /*sKey*/undefined, bIsFunction,
4276
4278
  /*sPathFromCanonicalParent*/undefined, oRequest.sideEffects);
4277
4279
  }
@@ -4279,7 +4281,8 @@ sap.ui.define([
4279
4281
  }
4280
4282
 
4281
4283
  oEntity = this._getEntity(oRequest.key);
4282
- if (mLocalGetEntities && oEntity && oEntity.__metadata.created && oEntity.__metadata.created.functionImport) {
4284
+ if (oEntity && oEntity.__metadata.created
4285
+ && oEntity.__metadata.created.functionImport) {
4283
4286
  var aResults = [];
4284
4287
  var oResult = oEntity["$result"];
4285
4288
  if (oResult && oResult.__list) {
@@ -4301,9 +4304,7 @@ sap.ui.define([
4301
4304
  if (aParts[1]) {
4302
4305
  mLocalChangeEntities[aParts[1]] = oRequest;
4303
4306
  //cleanup of this.mChangedEntities; use only the actual response key
4304
- var oMap = {};
4305
- oMap[aParts[1]] = oRequest.data;
4306
- this._updateChangedEntities(oMap);
4307
+ this._updateChangedEntity(aParts[1], oRequest.data);
4307
4308
  }
4308
4309
  //for delete requests delete data in model (exclude $links)
4309
4310
  if (oRequest.method === "DELETE" && aParts[2] !== "$links") {
@@ -4316,29 +4317,7 @@ sap.ui.define([
4316
4317
  mEntityTypes[oEntityType.entityType] = true;
4317
4318
  }
4318
4319
  if (oRequest.key) {
4319
- // for createEntry entities change context path to new one
4320
4320
  if (oRequest.created) {
4321
- var sKey = this._getKey(oResultData);
4322
- // rewrite context for new path
4323
- var oContext = this.getContext("/" + oRequest.key);
4324
- sDeepPath = oRequest.deepPath;
4325
- if (oContext.isTransient() && sDeepPath.endsWith(")")) {
4326
- oRequest.deepPath = sDeepPath.slice(0, sDeepPath.lastIndexOf("("))
4327
- + sKey.slice(sKey.indexOf("("));
4328
- }
4329
- this._updateContext(oContext, '/' + sKey, oRequest.deepPath);
4330
- oContext.setUpdated(true);
4331
- // register function to reset updated flag call as callAfterUpdate
4332
- this.callAfterUpdate(function() {
4333
- oContext.setUpdated(false);
4334
- });
4335
- //delete created flag after successful creation
4336
- oEntity = this._getEntity(sKey);
4337
- if (oEntity) {
4338
- delete oEntity.__metadata.created;
4339
- // before deleting the old entity copy and update the changes
4340
- this._keepChangesAfterCreate(oRequest, oEntity, sKey);
4341
- }
4342
4321
  this._removeEntity(oRequest.key);
4343
4322
  } else {
4344
4323
  // do not call _removeEntity after successful function import call as
@@ -4350,8 +4329,11 @@ sap.ui.define([
4350
4329
  }
4351
4330
  }
4352
4331
 
4353
- // Parse messages from the back-end
4354
- this._parseResponse(oResponse, oRequest, mLocalGetEntities, mLocalChangeEntities);
4332
+ // Parse messages from the back-end only if not yet reported
4333
+ if (!oResponse.$reported) {
4334
+ this._parseResponse(oResponse, oRequest, mLocalGetEntities, mLocalChangeEntities);
4335
+ oResponse.$reported = true;
4336
+ }
4355
4337
 
4356
4338
  // Add the Get and Change entities from this request to the main ones (which differ in case of batch requests)
4357
4339
  extend(mGetEntities, mLocalGetEntities);
@@ -4381,17 +4363,29 @@ sap.ui.define([
4381
4363
  *
4382
4364
  * @param {object} oRequest
4383
4365
  * The request object for a created entity
4384
- * @param {object} oEntity
4385
- * The persisted and retrieved entity object
4386
4366
  * @param {string} sKey
4387
4367
  * The key of the created entity
4388
4368
  *
4389
4369
  * @private
4390
4370
  */
4391
- ODataModel.prototype._keepChangesAfterCreate = function (oRequest, oEntity, sKey) {
4392
- var oKey2Entity, aNavProps, sProperty,
4393
- oChangedEntity = this.mChangedEntities[oRequest.key];
4371
+ ODataModel.prototype._cleanupAfterCreate = function (oRequest, sKey) {
4372
+ var oChangedEntity, aNavProps, sProperty,
4373
+ oContext = this.getContext("/" + oRequest.key),
4374
+ sDeepPath = oRequest.deepPath,
4375
+ oEntity = this._getEntity(sKey);
4394
4376
 
4377
+ if (oContext.isTransient() && sDeepPath.endsWith(")")) {
4378
+ oRequest.deepPath = sDeepPath.slice(0, sDeepPath.lastIndexOf("("))
4379
+ + sKey.slice(sKey.indexOf("("));
4380
+ }
4381
+ this._updateContext(oContext, '/' + sKey, oRequest.deepPath);
4382
+ oContext.setUpdated(true);
4383
+ this.callAfterUpdate(function() {
4384
+ oContext.setUpdated(false);
4385
+ });
4386
+ delete oEntity.__metadata.created;
4387
+ // before deleting the old entity copy and update the changes
4388
+ oChangedEntity = this.mChangedEntities[oRequest.key];
4395
4389
  if (oChangedEntity) {
4396
4390
  aNavProps = this.oMetadata._getNavigationPropertyNames(
4397
4391
  this.oMetadata._getEntityTypeByPath(sKey));
@@ -4405,13 +4399,10 @@ sap.ui.define([
4405
4399
  }
4406
4400
  }
4407
4401
  this.mChangedEntities[sKey] = oChangedEntity;
4408
- oKey2Entity = {};
4409
- oKey2Entity[sKey] = oEntity;
4410
- this._updateChangedEntities(oKey2Entity);
4411
4402
  // cleanup also further POST request for the just created entity
4412
4403
  this.abortInternalRequest(this._resolveGroup(oRequest.key).groupId,
4413
4404
  {requestKey: oRequest.key});
4414
- }
4405
+ } // else case may happen if ODataModel#create is called which does not use the cache
4415
4406
  };
4416
4407
 
4417
4408
  /**
@@ -4641,25 +4632,29 @@ sap.ui.define([
4641
4632
  };
4642
4633
 
4643
4634
  /**
4644
- * Resolves batch group settings for an entity.
4635
+ * Resolves batch group settings based on a given entity key or a given resolved path to an
4636
+ * entity.
4637
+ *
4638
+ * @param {string} sKeyOrPath
4639
+ * The entity key or the resolved path to an entity
4640
+ * @returns {object}
4641
+ * Batch group info containing <code>groupId</code> and <code>changeSetId</code>
4645
4642
  *
4646
- * @param {string} sKey Key of the entity
4647
- * @returns {object} Batch group info
4648
4643
  * @private
4649
4644
  */
4650
- ODataModel.prototype._resolveGroup = function(sKey) {
4651
- var oChangeGroup, oEntityType, mParams, sGroupId, sChangeSetId, oData;
4645
+ ODataModel.prototype._resolveGroup = function(sKeyOrPath) {
4646
+ var oChangeGroup, sChangeSetId, mCreated, oData, oEntityType, sGroupId,
4647
+ sPath = sKeyOrPath.startsWith("/") ? sKeyOrPath : ("/" + sKeyOrPath);
4652
4648
 
4653
- oEntityType = this.oMetadata._getEntityTypeByPath(sKey);
4654
- oData = this._getObject('/' + sKey);
4655
- if (oData) {
4656
- mParams = oData.__metadata.created;
4657
- //for created entries the group information is retrieved from the params
4658
- if (mParams) {
4659
- return {groupId: mParams.groupId, changeSetId: mParams.changeSetId};
4660
- }
4649
+ oData = this._getObject(sPath);
4650
+ mCreated = oData && oData.__metadata && oData.__metadata.created;
4651
+ //for created entries the group information is retrieved from the params
4652
+ if (mCreated) {
4653
+ return {groupId: mCreated.groupId, changeSetId: mCreated.changeSetId};
4661
4654
  }
4655
+
4662
4656
  //resolve groupId/changeSetId
4657
+ oEntityType = this.oMetadata._getEntityTypeByPath(sPath);
4663
4658
  if (this.mChangeGroups[oEntityType.name]) {
4664
4659
  oChangeGroup = this.mChangeGroups[oEntityType.name];
4665
4660
  sGroupId = oChangeGroup.groupId;
@@ -4772,7 +4767,7 @@ sap.ui.define([
4772
4767
  * @param {sap.ui.model.Context} [oContext] The binding context
4773
4768
  * @param {object} [oEntity] The entity data
4774
4769
  *
4775
- * @returns {string} The found ETag (or <code>null</code> if none could be found)
4770
+ * @returns {string|null} The found ETag (or <code>null</code> if none could be found)
4776
4771
  * @public
4777
4772
  */
4778
4773
  ODataModel.prototype.getETag = function(sPath, oContext, oEntity) {
@@ -6065,16 +6060,30 @@ sap.ui.define([
6065
6060
  bRefreshAfterChange = this.bRefreshAfterChange,
6066
6061
  that = this;
6067
6062
 
6068
- if (mParameters) {
6069
- sGroupId = mParameters.groupId || mParameters.batchGroupId;
6070
- fnSuccess = mParameters.success;
6071
- fnError = mParameters.error;
6072
- // ensure merge parameter backwards compatibility
6073
- if (mParameters.merge !== undefined) {
6074
- sMethod = mParameters.merge ? "MERGE" : "PUT";
6075
- }
6063
+ mParameters = mParameters || {};
6064
+ sGroupId = mParameters.groupId || mParameters.batchGroupId;
6065
+ fnSuccess = mParameters.success;
6066
+ fnError = mParameters.error;
6067
+ // ensure merge parameter backwards compatibility
6068
+ if (mParameters.merge !== undefined) {
6069
+ sMethod = mParameters.merge ? "MERGE" : "PUT";
6076
6070
  }
6077
6071
 
6072
+ this.getBindings().forEach(function (oBinding) {
6073
+ if (oBinding._submitChanges) {
6074
+ var fnOldSuccess = fnSuccess || function () {},
6075
+ mParameters0 = {groupId : sGroupId};
6076
+
6077
+ oBinding._submitChanges(mParameters0);
6078
+ if (mParameters0.success) {
6079
+ fnSuccess = function () {
6080
+ fnOldSuccess.apply(null, arguments);
6081
+ mParameters0.success.apply(null, arguments);
6082
+ };
6083
+ }
6084
+ }
6085
+ });
6086
+
6078
6087
  if (sGroupId && !this.mDeferredGroups[sGroupId]) {
6079
6088
  Log.fatal(this + " submitChanges: \"" + sGroupId + "\" is not a deferred group!");
6080
6089
  }
@@ -6155,13 +6164,19 @@ sap.ui.define([
6155
6164
  return oRequestHandle;
6156
6165
  };
6157
6166
 
6158
- /*
6159
- * updateChangedEntities
6167
+ /**
6168
+ * Updates the object in the shadow cache containing the pending user input and the object in
6169
+ * the model cache with the given data for the entity with the given key. If all changes for
6170
+ * that entity are processed the object is removed from the shadow cache.
6171
+ *
6172
+ * @param {string} [sEntityKey] The key for the entity to be updated
6173
+ * @param {object} [oData] The new data for the entity
6174
+ *
6160
6175
  * @private
6161
- * @param {map} mChangedEntities Map of changedEntities
6162
6176
  */
6163
- ODataModel.prototype._updateChangedEntities = function(mChangedEntities) {
6164
- var that = this, sRootPath, oEntityType, oNavPropRefInfo;
6177
+ ODataModel.prototype._updateChangedEntity = function(sEntityKey, oData) {
6178
+ var oChangedEntry, sDeepPath, oEntityType, oEntry, oNavPropRefInfo, sRootPath,
6179
+ that = this;
6165
6180
 
6166
6181
  function updateChangedEntities(oOriginalObject, oChangedObject, sCurPath) {
6167
6182
  each(oChangedObject,function(sKey) {
@@ -6175,44 +6190,40 @@ sap.ui.define([
6175
6190
  || deepEqual(oChangedObject[sKey], oOriginalObject[sKey])
6176
6191
  && !that.isLaundering(sActPath)) {
6177
6192
  delete oChangedObject[sKey];
6178
- // When current object is the entity itself check for matching navigation property in changed
6179
- // entity data and take care of it as well
6193
+ // When current object is the entity itself check for matching navigation
6194
+ // property in changed entity data and take care of it as well
6180
6195
  if (sCurPath === sRootPath) {
6181
6196
  oEntityType = that.oMetadata._getEntityTypeByPath(sRootPath);
6182
- oNavPropRefInfo = oEntityType && that.oMetadata._getNavPropertyRefInfo(oEntityType, sKey);
6197
+ oNavPropRefInfo = oEntityType &&
6198
+ that.oMetadata._getNavPropertyRefInfo(oEntityType, sKey);
6183
6199
  if (oNavPropRefInfo && oChangedObject[oNavPropRefInfo.name]) {
6184
- // if the nav prop related to the matching property is also set, set it on original
6185
- // entry and remove from changed entity
6186
- oOriginalObject[oNavPropRefInfo.name] = oChangedObject[oNavPropRefInfo.name];
6200
+ // if the nav prop related to the matching property is also set, set it
6201
+ // on original entry and remove it from changed entity
6202
+ oOriginalObject[oNavPropRefInfo.name] =
6203
+ oChangedObject[oNavPropRefInfo.name];
6187
6204
  delete oChangedObject[oNavPropRefInfo.name];
6188
6205
  }
6189
6206
  }
6190
6207
  }
6191
6208
  });
6192
6209
  }
6193
-
6194
- each(mChangedEntities, function(sKey, oData) {
6195
- if (sKey in that.mChangedEntities) {
6196
- var oEntry = that._getObject('/' + sKey, null, true);
6197
- var oChangedEntry = that._getObject('/' + sKey);
6198
-
6199
- merge(oEntry, oData);
6200
-
6201
- sRootPath = '/' + sKey;
6202
-
6203
- var sDeepPath = that.removeInternalMetadata(oChangedEntry).deepPath;
6204
- updateChangedEntities(oEntry, oChangedEntry, sRootPath);
6205
-
6206
- if (isEmptyObject(oChangedEntry)) {
6207
- delete that.mChangedEntities[sKey];
6208
- that.abortInternalRequest(that._resolveGroup(sKey).groupId, {requestKey: sKey});
6209
- } else {
6210
- that.mChangedEntities[sKey] = oChangedEntry;
6211
- oChangedEntry.__metadata = {deepPath: sDeepPath};
6212
- extend(oChangedEntry.__metadata, oEntry.__metadata);
6213
- }
6210
+ if (sEntityKey in that.mChangedEntities) {
6211
+ oEntry = that._getObject('/' + sEntityKey, null, true);
6212
+ oChangedEntry = that._getObject('/' + sEntityKey);
6213
+ merge(oEntry, oData);
6214
+ sRootPath = '/' + sEntityKey;
6215
+ sDeepPath = that.removeInternalMetadata(oChangedEntry).deepPath;
6216
+ updateChangedEntities(oEntry, oChangedEntry, sRootPath);
6217
+ if (isEmptyObject(oChangedEntry)) {
6218
+ delete that.mChangedEntities[sEntityKey];
6219
+ that.abortInternalRequest(that._resolveGroup(sEntityKey).groupId,
6220
+ {requestKey: sEntityKey});
6221
+ } else {
6222
+ that.mChangedEntities[sEntityKey] = oChangedEntry;
6223
+ oChangedEntry.__metadata = {deepPath: sDeepPath};
6224
+ extend(oChangedEntry.__metadata, oEntry.__metadata);
6214
6225
  }
6215
- });
6226
+ }
6216
6227
  };
6217
6228
 
6218
6229
  /**
@@ -6269,6 +6280,10 @@ sap.ui.define([
6269
6280
  * taken into account. If <code>bAll</code> is set, also deferred requests triggered through
6270
6281
  * {@link #create}, {@link #update} or {@link #remove} are taken into account.
6271
6282
  *
6283
+ * With a given <code>aPath</code> only specified entities are reset. Note that tree hierarchy
6284
+ * changes are only affected if a given path is equal to the tree binding's resolved binding
6285
+ * path.
6286
+ *
6272
6287
  * If <code>bDeleteCreatedEntities</code> is set, the entity is completely removed, provided it
6273
6288
  * has been created
6274
6289
  * <ul>
@@ -6344,6 +6359,11 @@ sap.ui.define([
6344
6359
  oChangedEntity.__metadata.created && bDeleteCreatedEntities);
6345
6360
  });
6346
6361
  }
6362
+ this.getBindings().forEach(function (oBinding) {
6363
+ if (oBinding._resetChanges) {
6364
+ oBinding._resetChanges(aPath);
6365
+ }
6366
+ });
6347
6367
  this.checkUpdate(true);
6348
6368
 
6349
6369
  return pMetaDataLoaded;
@@ -6439,7 +6459,9 @@ sap.ui.define([
6439
6459
  bFunction = oOriginalEntry.__metadata.created && oOriginalEntry.__metadata.created.functionImport;
6440
6460
 
6441
6461
  // Update property value on change object
6442
- oChangeObject[sPropertyPath] = oValue;
6462
+ oChangeObject[sPropertyPath] = _Helper.isPlainObject(oValue)
6463
+ ? _Helper.merge({}, oValue)
6464
+ : oValue;
6443
6465
 
6444
6466
  // If property is key property of ReferentialConstraint, also update the corresponding
6445
6467
  // navigation property
@@ -6624,27 +6646,29 @@ sap.ui.define([
6624
6646
  /**
6625
6647
  * Checks if there exist pending changes in the model.
6626
6648
  *
6627
- * By default, only client data changes triggered through:
6628
- * {@link #createEntry}
6629
- * {@link #setProperty}
6630
- * are taken into account.
6649
+ * By default, only client data changes triggered through {@link #createEntry} or
6650
+ * {@link #setProperty}, and tree hierarchy changes are taken into account.
6631
6651
  *
6632
- * If <code>bAll</code> is set to <code>true</code>, also deferred requests triggered through:
6633
- * {@link #create}
6634
- * {@link #update}
6635
- * {@link #remove}
6636
- * are taken into account.
6652
+ * If <code>bAll</code> is set to <code>true</code>, also deferred requests triggered through
6653
+ * {@link #create}, {@link #update}, and {@link #remove} are taken into account.
6637
6654
  *
6638
6655
  * @param {boolean}[bAll=false] If set to true, deferred requests are also taken into account.
6639
6656
  * @return {boolean} <code>true</code> if there are pending changes, <code>false</code> otherwise.
6640
6657
  * @public
6641
6658
  */
6642
6659
  ODataModel.prototype.hasPendingChanges = function(bAll) {
6643
- var bChangedEntities = !isEmptyObject(this.mChangedEntities);
6660
+ var bChangedEntities,
6661
+ aChangedEntityKeys = Object.keys(this.mChangedEntities);
6644
6662
 
6645
- if (bAll){
6646
- bChangedEntities = bChangedEntities || this.iPendingDeferredRequests > 0;
6663
+ bChangedEntities = this.getBindings().some(function (oBinding) {
6664
+ return oBinding._hasPendingChanges && oBinding._hasPendingChanges(aChangedEntityKeys);
6665
+ });
6666
+ bChangedEntities = bChangedEntities || aChangedEntityKeys.length > 0;
6667
+
6668
+ if (!bChangedEntities && bAll) {
6669
+ bChangedEntities = this.iPendingDeferredRequests > 0;
6647
6670
  }
6671
+
6648
6672
  return bChangedEntities;
6649
6673
  };
6650
6674
 
@@ -6658,8 +6682,9 @@ sap.ui.define([
6658
6682
  };
6659
6683
 
6660
6684
  /**
6661
- * Returns the changed properties of all changed entities in a map which are still pending.
6662
- * The key is the string name of the entity and the value is an object which contains the changed properties.
6685
+ * Returns the changed properties of all changed entities in a map which are still pending. The
6686
+ * key is the string name of the entity, and the value is an object which contains the changed
6687
+ * properties. The tree hierarchy changes for removed nodes are represented via an empty object.
6663
6688
  *
6664
6689
  * In contrast to the two related functions {@link #hasPendingChanges} and {@link #resetChanges}, only
6665
6690
  * client data changes are supported.
@@ -6668,7 +6693,21 @@ sap.ui.define([
6668
6693
  * @public
6669
6694
  */
6670
6695
  ODataModel.prototype.getPendingChanges = function() {
6671
- return merge({}, this.mChangedEntities);
6696
+ var sChangedEntityKey,
6697
+ mChangedEntities = _Helper.merge({}, this.mChangedEntities);
6698
+
6699
+ this.getBindings().forEach(function (oBinding) {
6700
+ if (oBinding._getPendingChanges) {
6701
+ _Helper.merge(mChangedEntities, oBinding._getPendingChanges());
6702
+ }
6703
+ });
6704
+ for (sChangedEntityKey in mChangedEntities) {
6705
+ if (!mChangedEntities[sChangedEntityKey]) {
6706
+ delete mChangedEntities[sChangedEntityKey];
6707
+ }
6708
+ }
6709
+
6710
+ return mChangedEntities;
6672
6711
  };
6673
6712
 
6674
6713
  /**
@@ -94,7 +94,7 @@ sap.ui.define([
94
94
  * @extends sap.ui.model.TreeBinding
95
95
  * @hideconstructor
96
96
  * @public
97
- * @version 1.103.1
97
+ * @version 1.106.0
98
98
  */
99
99
  var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
100
100
 
@@ -181,6 +181,9 @@ sap.ui.define([
181
181
  this.oAllKeys = null;
182
182
  this.oAllLengths = null;
183
183
  this.oAllFinalLengths = null;
184
+
185
+ // Whether a refresh has been performed
186
+ this.bRefresh = false;
184
187
  }
185
188
 
186
189
  });
@@ -1511,7 +1514,8 @@ sap.ui.define([
1511
1514
  }
1512
1515
  }
1513
1516
  if (mChangedEntities && !bChangeDetected) {
1514
- bChangeDetected = this._hasChangedEntity(mChangedEntities);
1517
+ bChangeDetected = this._isRefreshAfterChangeAllowed()
1518
+ && this._hasChangedEntity(mChangedEntities);
1515
1519
  }
1516
1520
  if (!mChangedEntities && !mEntityTypes) { // default
1517
1521
  bChangeDetected = true;
@@ -1525,6 +1529,18 @@ sap.ui.define([
1525
1529
  }
1526
1530
  };
1527
1531
 
1532
+ /**
1533
+ * Checks whether this binding with its configuration is allowed to perform a refresh triggered
1534
+ * by refreshAfterChange.
1535
+ *
1536
+ * @returns {boolean} Whether a refresh caused by refreshAfterChange is allowed
1537
+ *
1538
+ * @private
1539
+ */
1540
+ ODataTreeBinding.prototype._isRefreshAfterChangeAllowed = function () {
1541
+ return true;
1542
+ };
1543
+
1528
1544
  /**
1529
1545
  * Checks whether an entry of <code>this.oKeys</code> matches an entry of
1530
1546
  * <code>mChangedEntities</code>.
@@ -17,9 +17,9 @@ sap.ui.define([
17
17
  rUnsupportedPathSegments = /\$(?:Navigation)?PropertyPath/,
18
18
  /**
19
19
  * @classdesc
20
- * A collection of methods which help to consume
21
- * <a href="http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.html">
22
- * OData V4 annotations</a> in XML template views. Every context argument must belong to a
20
+ * A collection of methods which help to consume <a href=
21
+ * "https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.html#_Vocabulary_and_Annotation"
22
+ * >OData V4 annotations</a> in XML template views. Every context argument must belong to a
23
23
  * {@link sap.ui.model.odata.v4.ODataMetaModel} instance.
24
24
  *
25
25
  * @alias sap.ui.model.odata.v4.AnnotationHelper