@openui5/sap.ui.core 1.112.2 → 1.113.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 (327) hide show
  1. package/.dtsgenrc +16 -1
  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 +7 -7
  9. package/src/sap/base/security/URLWhitelist.js +1 -1
  10. package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
  11. package/src/sap/base/util/restricted/_castArray.js +1 -1
  12. package/src/sap/base/util/restricted/_compact.js +1 -1
  13. package/src/sap/base/util/restricted/_curry.js +1 -1
  14. package/src/sap/base/util/restricted/_debounce.js +1 -1
  15. package/src/sap/base/util/restricted/_difference.js +1 -1
  16. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  17. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  18. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  19. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  21. package/src/sap/base/util/restricted/_flatten.js +1 -1
  22. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  23. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  24. package/src/sap/base/util/restricted/_intersection.js +1 -1
  25. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  26. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  27. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  28. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  29. package/src/sap/base/util/restricted/_isNil.js +1 -1
  30. package/src/sap/base/util/restricted/_max.js +1 -1
  31. package/src/sap/base/util/restricted/_merge.js +1 -1
  32. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  33. package/src/sap/base/util/restricted/_min.js +1 -1
  34. package/src/sap/base/util/restricted/_omit.js +1 -1
  35. package/src/sap/base/util/restricted/_pick.js +1 -1
  36. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  37. package/src/sap/base/util/restricted/_throttle.js +1 -1
  38. package/src/sap/base/util/restricted/_toArray.js +1 -1
  39. package/src/sap/base/util/restricted/_union.js +1 -1
  40. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  41. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  42. package/src/sap/base/util/restricted/_uniq.js +1 -1
  43. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  44. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  45. package/src/sap/base/util/restricted/_without.js +1 -1
  46. package/src/sap/base/util/restricted/_xor.js +1 -1
  47. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  48. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  49. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  50. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  51. package/src/sap/ui/Device.js +3 -3
  52. package/src/sap/ui/Global.js +4 -4
  53. package/src/sap/ui/base/Event.js +1 -1
  54. package/src/sap/ui/base/EventProvider.js +1 -1
  55. package/src/sap/ui/base/ExpressionParser.js +15 -5
  56. package/src/sap/ui/base/Interface.js +1 -1
  57. package/src/sap/ui/base/ManagedObject.js +4 -2
  58. package/src/sap/ui/base/ManagedObjectMetadata.js +10 -12
  59. package/src/sap/ui/base/Metadata.js +23 -12
  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 +1 -1
  63. package/src/sap/ui/core/BusyIndicator.js +1 -1
  64. package/src/sap/ui/core/Component.js +8 -5
  65. package/src/sap/ui/core/ComponentContainer.js +1 -1
  66. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  67. package/src/sap/ui/core/ComponentSupport.js +1 -1
  68. package/src/sap/ui/core/Configuration.js +58 -9
  69. package/src/sap/ui/core/Control.js +22 -5
  70. package/src/sap/ui/core/Core.js +1 -1
  71. package/src/sap/ui/core/CustomData.js +1 -1
  72. package/src/sap/ui/core/CustomStyleClassSupport.js +5 -2
  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 +3 -2
  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/Fragment.js +1 -1
  79. package/src/sap/ui/core/HTML.js +1 -1
  80. package/src/sap/ui/core/History.js +1 -1
  81. package/src/sap/ui/core/Icon.js +1 -1
  82. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  83. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  84. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  85. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  86. package/src/sap/ui/core/InvisibleText.js +1 -1
  87. package/src/sap/ui/core/Item.js +1 -1
  88. package/src/sap/ui/core/LabelEnablement.js +10 -2
  89. package/src/sap/ui/core/LayoutData.js +1 -1
  90. package/src/sap/ui/core/Lib.js +1 -1
  91. package/src/sap/ui/core/ListItem.js +1 -1
  92. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  93. package/src/sap/ui/core/Locale.js +2 -2
  94. package/src/sap/ui/core/LocaleData.js +87 -19
  95. package/src/sap/ui/core/Manifest.js +4 -4
  96. package/src/sap/ui/core/Message.js +1 -1
  97. package/src/sap/ui/core/Popup.js +19 -27
  98. package/src/sap/ui/core/RenderManager.js +7 -1
  99. package/src/sap/ui/core/Renderer.js +1 -1
  100. package/src/sap/ui/core/ResizeHandler.js +1 -1
  101. package/src/sap/ui/core/ScrollBar.js +1 -1
  102. package/src/sap/ui/core/SeparatorItem.js +1 -1
  103. package/src/sap/ui/core/Title.js +1 -1
  104. package/src/sap/ui/core/TooltipBase.js +1 -1
  105. package/src/sap/ui/core/UIArea.js +1 -1
  106. package/src/sap/ui/core/UIComponent.js +3 -2
  107. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  108. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  109. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  110. package/src/sap/ui/core/XMLComposite.js +1 -1
  111. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  112. package/src/sap/ui/core/cache/CacheManager.js +1 -1
  113. package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
  114. package/src/sap/ui/core/date/CalendarUtils.js +14 -26
  115. package/src/sap/ui/core/date/CalendarWeekNumbering.js +32 -0
  116. package/src/sap/ui/core/date/UI5Date.js +1 -1
  117. package/src/sap/ui/core/date/UniversalDateUtils.js +4 -4
  118. package/src/sap/ui/core/date/_Calendars.js +1 -1
  119. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  120. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  121. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  122. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  123. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  124. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  125. package/src/sap/ui/core/format/DateFormat.js +103 -30
  126. package/src/sap/ui/core/format/NumberFormat.js +40 -5
  127. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  128. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  129. package/src/sap/ui/core/library.js +3 -3
  130. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  131. package/src/sap/ui/core/message/Message.js +1 -1
  132. package/src/sap/ui/core/message/MessageManager.js +1 -1
  133. package/src/sap/ui/core/message/MessageParser.js +1 -1
  134. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  135. package/src/sap/ui/core/messagebundle_ar.properties +1 -1
  136. package/src/sap/ui/core/messagebundle_cs.properties +1 -1
  137. package/src/sap/ui/core/messagebundle_cy.properties +1 -1
  138. package/src/sap/ui/core/messagebundle_da.properties +1 -1
  139. package/src/sap/ui/core/messagebundle_de.properties +1 -1
  140. package/src/sap/ui/core/messagebundle_el.properties +1 -1
  141. package/src/sap/ui/core/messagebundle_en.properties +1 -1
  142. package/src/sap/ui/core/messagebundle_en_GB.properties +1 -1
  143. package/src/sap/ui/core/messagebundle_es.properties +4 -4
  144. package/src/sap/ui/core/messagebundle_es_MX.properties +1 -1
  145. package/src/sap/ui/core/messagebundle_et.properties +1 -1
  146. package/src/sap/ui/core/messagebundle_fi.properties +1 -1
  147. package/src/sap/ui/core/messagebundle_fr.properties +1 -1
  148. package/src/sap/ui/core/messagebundle_fr_CA.properties +1 -1
  149. package/src/sap/ui/core/messagebundle_hi.properties +1 -1
  150. package/src/sap/ui/core/messagebundle_hr.properties +1 -1
  151. package/src/sap/ui/core/messagebundle_hu.properties +1 -1
  152. package/src/sap/ui/core/messagebundle_id.properties +1 -1
  153. package/src/sap/ui/core/messagebundle_it.properties +1 -1
  154. package/src/sap/ui/core/messagebundle_iw.properties +1 -1
  155. package/src/sap/ui/core/messagebundle_kk.properties +1 -1
  156. package/src/sap/ui/core/messagebundle_lt.properties +1 -1
  157. package/src/sap/ui/core/messagebundle_lv.properties +1 -1
  158. package/src/sap/ui/core/messagebundle_nl.properties +1 -1
  159. package/src/sap/ui/core/messagebundle_no.properties +1 -1
  160. package/src/sap/ui/core/messagebundle_pl.properties +1 -1
  161. package/src/sap/ui/core/messagebundle_pt.properties +1 -1
  162. package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -1
  163. package/src/sap/ui/core/messagebundle_ro.properties +1 -1
  164. package/src/sap/ui/core/messagebundle_ru.properties +1 -1
  165. package/src/sap/ui/core/messagebundle_sh.properties +1 -1
  166. package/src/sap/ui/core/messagebundle_sk.properties +1 -1
  167. package/src/sap/ui/core/messagebundle_sl.properties +1 -1
  168. package/src/sap/ui/core/messagebundle_sv.properties +1 -1
  169. package/src/sap/ui/core/messagebundle_th.properties +1 -1
  170. package/src/sap/ui/core/messagebundle_tr.properties +1 -1
  171. package/src/sap/ui/core/messagebundle_uk.properties +1 -1
  172. package/src/sap/ui/core/messagebundle_vi.properties +1 -1
  173. package/src/sap/ui/core/messagebundle_zh_CN.properties +1 -1
  174. package/src/sap/ui/core/messagebundle_zh_TW.properties +1 -1
  175. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  176. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  177. package/src/sap/ui/core/mvc/JSView.js +1 -1
  178. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  179. package/src/sap/ui/core/mvc/View.js +3 -3
  180. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  181. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  182. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  183. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  184. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  185. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  186. package/src/sap/ui/core/routing/Target.js +1 -1
  187. package/src/sap/ui/core/routing/Targets.js +1 -1
  188. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  189. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  190. package/src/sap/ui/core/service/Service.js +1 -1
  191. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  192. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  193. package/src/sap/ui/core/support/Plugin.js +1 -1
  194. package/src/sap/ui/core/support/Support.js +1 -1
  195. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  196. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  197. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  198. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  199. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  200. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  201. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  202. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  203. package/src/sap/ui/core/themes/base/base.less +3256 -19
  204. package/src/sap/ui/core/theming/ThemeManager.js +6 -3
  205. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  206. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  207. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  208. package/src/sap/ui/core/tmpl/Template.js +1 -1
  209. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  210. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  211. package/src/sap/ui/core/util/Export.js +1 -1
  212. package/src/sap/ui/core/util/ExportCell.js +1 -1
  213. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  214. package/src/sap/ui/core/util/ExportRow.js +1 -1
  215. package/src/sap/ui/core/util/ExportType.js +1 -1
  216. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  217. package/src/sap/ui/core/util/File.js +1 -1
  218. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  219. package/src/sap/ui/core/util/MockServer.js +1 -1
  220. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  221. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  222. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  223. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  224. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  225. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  226. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  227. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  228. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  229. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  230. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  231. package/src/sap/ui/debug/ControlTree.js +1 -1
  232. package/src/sap/ui/debug/DebugEnv.js +1 -1
  233. package/src/sap/ui/debug/PropertyList.js +1 -1
  234. package/src/sap/ui/model/ClientModel.js +1 -1
  235. package/src/sap/ui/model/CompositeBinding.js +1 -1
  236. package/src/sap/ui/model/CompositeDataState.js +1 -1
  237. package/src/sap/ui/model/CompositeType.js +1 -1
  238. package/src/sap/ui/model/DataState.js +1 -1
  239. package/src/sap/ui/model/MetaModel.js +1 -1
  240. package/src/sap/ui/model/Model.js +1 -1
  241. package/src/sap/ui/model/SelectionModel.js +1 -1
  242. package/src/sap/ui/model/SimpleType.js +7 -3
  243. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  244. package/src/sap/ui/model/Type.js +1 -1
  245. package/src/sap/ui/model/json/JSONModel.js +1 -1
  246. package/src/sap/ui/model/message/MessageModel.js +1 -1
  247. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  248. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  249. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  250. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  251. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  252. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +1 -1
  253. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  254. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  255. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  256. package/src/sap/ui/model/odata/type/Date.js +19 -1
  257. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  258. package/src/sap/ui/model/odata/type/DateTimeBase.js +36 -1
  259. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  260. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +4 -1
  261. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  262. package/src/sap/ui/model/odata/type/Double.js +1 -1
  263. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  264. package/src/sap/ui/model/odata/type/Int.js +1 -1
  265. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  266. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  267. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  268. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  269. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  270. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  271. package/src/sap/ui/model/odata/type/Single.js +1 -1
  272. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  273. package/src/sap/ui/model/odata/type/String.js +1 -1
  274. package/src/sap/ui/model/odata/type/Time.js +32 -1
  275. package/src/sap/ui/model/odata/type/TimeOfDay.js +19 -1
  276. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  277. package/src/sap/ui/model/odata/v2/Context.js +72 -28
  278. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +5 -4
  279. package/src/sap/ui/model/odata/v2/ODataListBinding.js +29 -10
  280. package/src/sap/ui/model/odata/v2/ODataModel.js +29 -17
  281. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -1
  282. package/src/sap/ui/model/odata/v4/Context.js +33 -20
  283. package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -21
  284. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
  285. package/src/sap/ui/model/odata/v4/ODataListBinding.js +167 -65
  286. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -1
  287. package/src/sap/ui/model/odata/v4/ODataModel.js +4 -3
  288. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +35 -25
  289. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
  290. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +87 -18
  291. package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +1 -1
  292. package/src/sap/ui/model/odata/v4/lib/_Cache.js +99 -64
  293. package/src/sap/ui/model/odata/v4/lib/_Helper.js +57 -2
  294. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +3 -0
  295. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  296. package/src/sap/ui/model/type/Boolean.js +1 -1
  297. package/src/sap/ui/model/type/Currency.js +1 -1
  298. package/src/sap/ui/model/type/Date.js +1 -1
  299. package/src/sap/ui/model/type/DateInterval.js +1 -1
  300. package/src/sap/ui/model/type/DateTime.js +1 -1
  301. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  302. package/src/sap/ui/model/type/FileSize.js +1 -1
  303. package/src/sap/ui/model/type/Float.js +1 -1
  304. package/src/sap/ui/model/type/Integer.js +1 -1
  305. package/src/sap/ui/model/type/String.js +1 -1
  306. package/src/sap/ui/model/type/Time.js +1 -1
  307. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  308. package/src/sap/ui/model/type/Unit.js +1 -1
  309. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  310. package/src/sap/ui/qunit/qunit-coverage-istanbul.js +180 -0
  311. package/src/sap/ui/qunit/qunit-coverage.js +9 -4
  312. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  313. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  314. package/src/sap/ui/test/Opa.js +54 -21
  315. package/src/sap/ui/test/Opa5.js +181 -131
  316. package/src/sap/ui/test/OpaBuilder.js +106 -73
  317. package/src/sap/ui/test/OpaPlugin.js +8 -3
  318. package/src/sap/ui/test/RecordReplay.js +7 -3
  319. package/src/sap/ui/test/actions/EnterText.js +3 -2
  320. package/src/sap/ui/test/generic/TestBase.js +1 -1
  321. package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +3 -1
  322. package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -2
  323. package/src/sap/ui/test/starter/_configureLoader.js +7 -5
  324. package/src/sap/ui/test/starter/_setupAndStart.js +113 -27
  325. package/src/sap/ui/test/starter/_utils.js +4 -1
  326. package/src/sap/ui/util/Storage.js +1 -1
  327. package/src/ui5loader-autoconfig.js +3 -1
@@ -41,6 +41,7 @@ sap.ui.define([
41
41
  * Whether a grand total is needed
42
42
  *
43
43
  * @alias sap.ui.model.odata.v4.lib._AggregationCache
44
+ * @borrows sap.ui.model.odata.v4.lib._CollectionCache#addKeptElement as #addKeptElement
44
45
  * @borrows sap.ui.model.odata.v4.lib._CollectionCache#requestSideEffects as #requestSideEffects
45
46
  * @constructor
46
47
  * @extends sap.ui.model.odata.v4.lib._Cache
@@ -80,6 +81,7 @@ sap.ui.define([
80
81
  }
81
82
  }
82
83
  this.oFirstLevel = this.createGroupLevelCache(null, bHasGrandTotal || !!fnLeaves);
84
+ this.addKeptElement = this.oFirstLevel.addKeptElement; // @borrows ...
83
85
  this.requestSideEffects = this.oFirstLevel.requestSideEffects; // @borrows ...
84
86
  this.oGrandTotalPromise = undefined;
85
87
  if (bHasGrandTotal) {
@@ -131,17 +133,20 @@ sap.ui.define([
131
133
  * level cache is given
132
134
  * @throws {Error}
133
135
  * In case an unexpected element or placeholder would be overwritten, if the given offset is
134
- * negative, if a resulting array index is out of bounds, or in case of a duplicate predicate
136
+ * negative, if a resulting array index is out of bounds, in case of a duplicate predicate, or
137
+ * if a kept-alive element has been modified on both client and server
135
138
  *
136
139
  * @private
137
140
  */
138
141
  _AggregationCache.prototype.addElements = function (vReadElements, iOffset, oCache, iStart) {
139
142
  var aElements = this.aElements,
140
- sNodeProperty = this.oAggregation.$NodeProperty;
143
+ sHierarchyQualifier = this.oAggregation.hierarchyQualifier,
144
+ sNodeProperty = this.oAggregation.$NodeProperty,
145
+ that = this;
141
146
 
142
147
  function addElement(oElement, i) {
143
148
  var oOldElement = aElements[iOffset + i],
144
- oOtherElement,
149
+ oKeptElement,
145
150
  sPredicate = _Helper.getPrivateAnnotation(oElement, "predicate");
146
151
 
147
152
  if (oOldElement) { // check before overwriting
@@ -153,10 +158,20 @@ sap.ui.define([
153
158
  } else if (iOffset + i >= aElements.length) {
154
159
  throw new Error("Array index out of bounds: " + (iOffset + i));
155
160
  }
156
- oOtherElement = aElements.$byPredicate[sPredicate];
157
- if (oOtherElement && oOtherElement !== oElement
158
- && !(oOtherElement instanceof SyncPromise)) {
159
- throw new Error("Duplicate predicate: " + sPredicate);
161
+ oKeptElement = aElements.$byPredicate[sPredicate];
162
+ if (oKeptElement && oKeptElement !== oElement
163
+ && !(oKeptElement instanceof SyncPromise)) {
164
+ if (!sHierarchyQualifier) {
165
+ throw new Error("Duplicate predicate: " + sPredicate);
166
+ }
167
+ if (!oKeptElement["@odata.etag"]
168
+ || oElement["@odata.etag"] === oKeptElement["@odata.etag"]) {
169
+ // no ETag used or known yet, or ETag unchanged
170
+ _Helper.updateNonExisting(oElement, oKeptElement);
171
+ } else if (that.hasPendingChangesForPath(sPredicate)) {
172
+ throw new Error("Modified on client and on server: "
173
+ + that.sResourcePath + sPredicate);
174
+ } // else: ETag changed, ignore kept element!
160
175
  }
161
176
 
162
177
  aElements.$byPredicate[sPredicate] = aElements[iOffset + i] = oElement;
@@ -959,12 +974,66 @@ sap.ui.define([
959
974
  };
960
975
 
961
976
  /**
962
- * Refreshes the kept-alive elements. Nothing to do here, we have no kept-alive elements.
963
- *
964
- * @public
965
- * @see sap.ui.model.odata.v4.lib._CollectionCache#refreshKeptElements
977
+ * @override sap.ui.model.odata.v4.lib._CollectionCache#refreshKeptElements
966
978
  */
967
- _AggregationCache.prototype.refreshKeptElements = function () {};
979
+ _AggregationCache.prototype.refreshKeptElements = function (oGroupLock, fnOnRemove) {
980
+ // "super" call (like @borrows ...)
981
+ return this.oFirstLevel.refreshKeptElements.call(this, oGroupLock, fnOnRemove, true);
982
+ };
983
+
984
+ /**
985
+ * @override sap.ui.model.odata.v4.lib._CollectionCache#reset
986
+ */
987
+ _AggregationCache.prototype.reset = function (aKeptElementPredicates, sGroupId, mQueryOptions,
988
+ oAggregation, bIsGrouped) {
989
+ var fnResolve,
990
+ that = this;
991
+
992
+ if (bIsGrouped) {
993
+ throw new Error("Unsupported grouping via sorter");
994
+ }
995
+
996
+ aKeptElementPredicates.forEach(function (sPredicate) {
997
+ var oKeptElement = that.aElements.$byPredicate[sPredicate];
998
+
999
+ if (_Helper.hasPrivateAnnotation(oKeptElement, "placeholder")) {
1000
+ throw new Error("Unexpected placeholder");
1001
+ }
1002
+ delete oKeptElement["@$ui5.node.isExpanded"];
1003
+ delete oKeptElement["@$ui5.node.level"];
1004
+ delete oKeptElement["@$ui5._"];
1005
+ _Helper.setPrivateAnnotation(oKeptElement, "predicate", sPredicate);
1006
+ });
1007
+
1008
+ this.oAggregation = oAggregation;
1009
+ this.sDownloadUrl = _Cache.prototype.getDownloadUrl.call(this, "");
1010
+ // "super" call (like @borrows ...)
1011
+ this.oFirstLevel.reset.call(this, aKeptElementPredicates, sGroupId, mQueryOptions);
1012
+ if (sGroupId) {
1013
+ this.oBackup.oCountPromise = this.oCountPromise;
1014
+ this.oBackup.oFirstLevel = this.oFirstLevel;
1015
+ }
1016
+ this.oCountPromise = undefined;
1017
+ if (mQueryOptions.$count) {
1018
+ this.oCountPromise = new SyncPromise(function (resolve) {
1019
+ fnResolve = resolve;
1020
+ });
1021
+ this.oCountPromise.$resolve = fnResolve;
1022
+ }
1023
+ this.oFirstLevel = this.createGroupLevelCache();
1024
+ };
1025
+
1026
+ /**
1027
+ * @override sap.ui.model.odata.v4.lib._CollectionCache#restore
1028
+ */
1029
+ _AggregationCache.prototype.restore = function (bReally) {
1030
+ if (bReally) {
1031
+ this.oCountPromise = this.oBackup.oCountPromise;
1032
+ this.oFirstLevel = this.oBackup.oFirstLevel;
1033
+ }
1034
+ // "super" call (like @borrows ...)
1035
+ this.oFirstLevel.restore.call(this, bReally);
1036
+ };
968
1037
 
969
1038
  /**
970
1039
  * Returns the cache's URL.
@@ -1162,10 +1231,6 @@ sap.ui.define([
1162
1231
  * Example: Products
1163
1232
  * @param {string} sDeepResourcePath
1164
1233
  * The deep resource path to be used to build the target path for bound messages
1165
- * @param {object} [oAggregation]
1166
- * An object holding the information needed for data aggregation; see also "OData Extension
1167
- * for Data Aggregation Version 4.0"; must already be normalized by
1168
- * {@link _AggregationHelper.buildApply}
1169
1234
  * @param {object} mQueryOptions
1170
1235
  * A map of key-value pairs representing the query string, the value in this pair has to
1171
1236
  * be a string or an array of strings; if it is an array, the resulting query string
@@ -1174,6 +1239,10 @@ sap.ui.define([
1174
1239
  * Examples:
1175
1240
  * {foo : "bar", "bar" : "baz"} results in the query string "foo=bar&bar=baz"
1176
1241
  * {foo : ["bar", "baz"]} results in the query string "foo=bar&foo=baz"
1242
+ * @param {object} [oAggregation]
1243
+ * An object holding the information needed for data aggregation; see also "OData Extension
1244
+ * for Data Aggregation Version 4.0"; must already be normalized by
1245
+ * {@link _AggregationHelper.buildApply}
1177
1246
  * @param {boolean} [bSortExpandSelect]
1178
1247
  * Whether the paths in $expand and $select shall be sorted in the cache's query string. When
1179
1248
  * using min, max, grand total, or data aggregation they will always be sorted.
@@ -1196,8 +1265,8 @@ sap.ui.define([
1196
1265
  *
1197
1266
  * @public
1198
1267
  */
1199
- _AggregationCache.create = function (oRequestor, sResourcePath, sDeepResourcePath, oAggregation,
1200
- mQueryOptions, bSortExpandSelect, bSharedRequest, bIsGrouped) {
1268
+ _AggregationCache.create = function (oRequestor, sResourcePath, sDeepResourcePath,
1269
+ mQueryOptions, oAggregation, bSortExpandSelect, bSharedRequest, bIsGrouped) {
1201
1270
  var bHasGrandTotal, bHasGroupLevels;
1202
1271
 
1203
1272
  function checkExpandSelect() {
@@ -518,7 +518,7 @@ sap.ui.define([
518
518
  + (sPath || "")
519
519
  + ",HierarchyQualifier='" + sHierarchyQualifier
520
520
  + "',NodeProperty='" + sNodeProperty
521
- + "',Levels=" + (bAllLevels ? 9 : oAggregation.expandTo || 1)
521
+ + "',Levels=" + (bAllLevels ? 999 : oAggregation.expandTo || 1)
522
522
  + ")";
523
523
  if (bAllLevels) {
524
524
  select("DistanceFromRootProperty");
@@ -168,6 +168,7 @@ sap.ui.define([
168
168
  oEntity = vDeleteProperty
169
169
  ? vCacheData[vCachePath] || vCacheData.$byPredicate[vCachePath]
170
170
  : vCacheData, // deleting at root level
171
+ oError,
171
172
  sGroupId,
172
173
  aMessages,
173
174
  mHeaders,
@@ -223,8 +224,16 @@ sap.ui.define([
223
224
  if (typeof sTransientGroup !== "string") {
224
225
  throw new Error("No 'delete' allowed while waiting for server response");
225
226
  }
226
- that.oRequestor.removePost(sTransientGroup, oEntity);
227
-
227
+ if (vCacheData.$postBodyCollection) { // within a deep create
228
+ vCacheData.$postBodyCollection.splice(iIndex, 1);
229
+ that.removeElement(vCacheData, iIndex, sTransientPredicate, sParentPath);
230
+ fnCallback(iIndex, -1);
231
+ oError = new Error("Deleted from deep create");
232
+ oError.canceled = true;
233
+ _Helper.getPrivateAnnotation(oEntity, "reject")(oError);
234
+ } else {
235
+ that.oRequestor.removePost(sTransientGroup, oEntity);
236
+ }
228
237
  return undefined;
229
238
  }
230
239
 
@@ -361,20 +370,37 @@ sap.ui.define([
361
370
  sName = aSegments.pop(),
362
371
  oParent = this.fetchValue(_GroupLock.$cached, aSegments.join("/")).getResult(),
363
372
  oPostBody = _Helper.getPrivateAnnotation(oParent, "postBody"),
373
+ aPostBodyCollection,
364
374
  that = this;
365
375
 
366
- this.checkSharedRequest();
367
- if (sName in oParent) {
368
- throw new Error("Deep create with initial data is not supported yet");
376
+ function setPostBodyCollection() {
377
+ aElements.$postBodyCollection = oPostBody[sName] = aPostBodyCollection;
369
378
  }
370
- aElements = oParent[sName] = [];
371
- aElements.$count = aElements.$created = 0;
379
+
380
+ this.checkSharedRequest();
381
+ aElements = oParent[sName] = oParent[sName] || [];
382
+ aElements.$count = aElements.$created = aElements.length;
372
383
  aElements.$byPredicate = {};
373
- // allow creating on demand when there is a create in the child list
374
- aElements.$postBodyCollection = function () {
375
- aElements.$postBodyCollection = oPostBody[sName] = [];
376
- };
384
+ aPostBodyCollection = oPostBody[sName] || [];
385
+ if (aElements.length) {
386
+ setPostBodyCollection();
387
+ } else {
388
+ // allow creating on demand when there is a create in the child list
389
+ aElements.$postBodyCollection = setPostBodyCollection;
390
+ }
377
391
  aElements.$select = aSelect;
392
+ aElements.forEach(function (oElement, i) {
393
+ var sTransientPredicate = "($uid=" + _Helper.uid() + ")";
394
+
395
+ oElement["@$ui5.context.isTransient"] = true;
396
+ _Helper.setPrivateAnnotation(oElement, "postBody", aPostBodyCollection[i]);
397
+ _Helper.setPrivateAnnotation(oElement, "transient",
398
+ _Helper.getPrivateAnnotation(oParent, "transient"));
399
+ _Helper.setPrivateAnnotation(oElement, "transientPredicate", sTransientPredicate);
400
+ _Helper.setPrivateAnnotation(oElement, "promise",
401
+ _Helper.addDeepCreatePromise(oElement));
402
+ aElements.$byPredicate[sTransientPredicate] = oElement;
403
+ });
378
404
  // add the collection type to mTypeForMetaPath
379
405
  this.fetchTypes().then(function (mTypeForMetaPath) {
380
406
  that.oRequestor.fetchType(mTypeForMetaPath,
@@ -593,7 +619,8 @@ sap.ui.define([
593
619
 
594
620
  _Helper.deletePrivateAnnotation(oEntityData, "postBody");
595
621
  _Helper.deletePrivateAnnotation(oEntityData, "transient");
596
- oEntityData["@$ui5.context.isTransient"] = false;
622
+ // ensure that change listeners are informed via updateSelected
623
+ aResult[0]["@$ui5.context.isTransient"] = false;
597
624
  _Helper.removeByPath(that.mPostRequests, sPath, oEntityData);
598
625
  that.visitResponse(oCreatedEntity, aResult[1],
599
626
  _Helper.getMetaPath(_Helper.buildPath(that.sMetaPath, sPath)),
@@ -621,8 +648,10 @@ sap.ui.define([
621
648
  _Helper.updateSelected(that.mChangeListeners, sResultingPath, oEntityData,
622
649
  oCreatedEntity, aSelect, /*fnCheckKeyPredicate*/ undefined,
623
650
  /*bOkIfMissing*/ true);
624
- // update properties from collections in a deep create
625
- that.updateNestedCreates(sResultingPath, oEntityData, oCreatedEntity);
651
+ _Helper.setPrivateAnnotation(oEntityData, "deepCreate",
652
+ // update properties from collections in a deep create
653
+ that.updateNestedCreates(sResultingPath, oEntityData, oCreatedEntity)
654
+ );
626
655
 
627
656
  that.removePendingRequest();
628
657
  fnResolve(true);
@@ -1067,7 +1096,7 @@ sap.ui.define([
1067
1096
  + sOldPredicate + " to " + sNewPredicate);
1068
1097
  }
1069
1098
  // only check for ETag change if the cache contains one; otherwise either the cache
1070
- // element is empty (via #createEmptyElement) or the server did not send one last time
1099
+ // element is empty (via #addKeptElement) or the server did not send one last time
1071
1100
  if (oResource["@odata.etag"] && oData["@odata.etag"] !== oResource["@odata.etag"]) {
1072
1101
  throw new Error("GET " + sRequestPath + ": ETag changed");
1073
1102
  }
@@ -2319,17 +2348,20 @@ sap.ui.define([
2319
2348
  };
2320
2349
 
2321
2350
  /**
2322
- * Creates key predicates and updates listeners for nested entity collections after a deep
2323
- * create.
2351
+ * Creates key predicates and rebuilds the nested entity collections after a deep create (in the
2352
+ * assumption that the response may differ significantly from the request regarding order and
2353
+ * count).
2324
2354
  *
2325
2355
  * @param {string} sPath - The path of the created entity within the cache
2326
2356
  * @param {object} oEntity - The entity in the cache
2327
2357
  * @param {object} oCreatedEntity - The created entity from the response
2358
+ * @returns {boolean} Whether there actually was a deep create
2328
2359
  *
2329
2360
  * @private
2330
2361
  */
2331
2362
  _Cache.prototype.updateNestedCreates = function (sPath, oEntity, oCreatedEntity) {
2332
- var that = this;
2363
+ var bDeepCreate = false,
2364
+ that = this;
2333
2365
 
2334
2366
  Object.keys(oEntity).forEach(function (sSegment) {
2335
2367
  var vCollection = oEntity[sSegment],
@@ -2339,37 +2371,38 @@ sap.ui.define([
2339
2371
 
2340
2372
  if (vCollection && vCollection.$postBodyCollection) {
2341
2373
  aCreatedCollection = oCreatedEntity[sSegment];
2342
- if (aCreatedCollection) { // otherwise no create was called in nested list binding
2374
+ if (aCreatedCollection) { // it really is a deep create
2343
2375
  sCollectionPath = sPath + "/" + sSegment;
2344
2376
  aSelect = vCollection.$select
2345
2377
  || _Helper.getQueryOptionsForPath(that.mQueryOptions, sCollectionPath)
2346
2378
  .$select;
2379
+ // call all resolve functions
2380
+ vCollection.forEach(function (oElement) {
2381
+ _Helper.getPrivateAnnotation(oElement, "resolve")();
2382
+ });
2383
+ // rebuild the collection from the response only taking the selected properties
2384
+ vCollection.$created = 0;
2385
+ vCollection.$byPredicate = {};
2386
+ vCollection.length = aCreatedCollection.length;
2387
+ setCount(that.mChangeListeners, sCollectionPath, vCollection,
2388
+ vCollection.length);
2347
2389
  aCreatedCollection.forEach(function (oCreatedChildEntity, i) {
2348
- var oChildEntity = vCollection[i],
2349
- sPredicate
2350
- = _Helper.getPrivateAnnotation(oCreatedChildEntity, "predicate"),
2351
- fnResolve = _Helper.getPrivateAnnotation(oChildEntity, "resolve"),
2352
- sTransientPredicate = _Helper.getPrivateAnnotation(oChildEntity,
2353
- "transientPredicate");
2390
+ var sPredicate
2391
+ = _Helper.getPrivateAnnotation(oCreatedChildEntity, "predicate");
2354
2392
 
2355
- _Helper.updateTransientPaths(that.mChangeListeners, sTransientPredicate,
2356
- sPredicate);
2357
- vCollection.$byPredicate[sPredicate] = oChildEntity;
2358
- _Helper.updateSelected(that.mChangeListeners, sCollectionPath + sPredicate,
2359
- oChildEntity, oCreatedChildEntity, aSelect,
2360
- /*fnCheckKeyPredicate*/undefined, true);
2361
- _Helper.deletePrivateAnnotation(oChildEntity, "postBody");
2362
- _Helper.deletePrivateAnnotation(oChildEntity, "reject");
2363
- _Helper.deletePrivateAnnotation(oChildEntity, "resolve");
2364
- _Helper.deletePrivateAnnotation(oChildEntity, "transient");
2365
- delete oChildEntity["@$ui5.context.isTransient"];
2366
- fnResolve(oChildEntity); // resolve the create promise
2393
+ vCollection.$byPredicate[sPredicate] = vCollection[i] = {};
2394
+ // no change events, the listeners are recreated anyway
2395
+ _Helper.updateSelected({}, sCollectionPath + sPredicate, vCollection[i],
2396
+ oCreatedChildEntity, aSelect, /*fnCheckKeyPredicate*/undefined, true);
2367
2397
  });
2368
2398
  }
2369
2399
  delete vCollection.$postBodyCollection;
2370
2400
  delete vCollection.$select;
2401
+ bDeepCreate = true;
2371
2402
  }
2372
2403
  });
2404
+
2405
+ return bDeepCreate;
2373
2406
  };
2374
2407
 
2375
2408
  /**
@@ -2658,27 +2691,6 @@ sap.ui.define([
2658
2691
  }
2659
2692
  };
2660
2693
 
2661
- /**
2662
- * Creates an empty element for the given predicate to the cache, adds it to the cache and
2663
- * returns it.
2664
- *
2665
- * @param {string} sPredicate - The predicate
2666
- * @returns {object} The empty element
2667
- * @throws {Error}
2668
- * If the cache is shared
2669
- *
2670
- * @public
2671
- */
2672
- _CollectionCache.prototype.createEmptyElement = function (sPredicate) {
2673
- var oElement = {};
2674
-
2675
- this.checkSharedRequest();
2676
- _Helper.setPrivateAnnotation(oElement, "predicate", sPredicate);
2677
- this.aElements.$byPredicate[sPredicate] = oElement;
2678
-
2679
- return oElement;
2680
- };
2681
-
2682
2694
  /**
2683
2695
  * Replaces the old element at the given index with the given new element.
2684
2696
  *
@@ -3016,6 +3028,8 @@ sap.ui.define([
3016
3028
  * A map from meta path to the entity type (as delivered by {@link #fetchTypes})
3017
3029
  * @returns {number}
3018
3030
  * The number of newly created elements filtered out from the given result
3031
+ * @throws {Error}
3032
+ * If a kept-alive element has been modified on both client and server
3019
3033
  *
3020
3034
  * @private
3021
3035
  */
@@ -3038,7 +3052,7 @@ sap.ui.define([
3038
3052
  oKeptElement = aElements.$byPredicate[sPredicate];
3039
3053
  if (oKeptElement) {
3040
3054
  // only check for ETag change if the cache contains one; otherwise either the
3041
- // cache element is empty (via #createEmptyElement) or the server did not send
3055
+ // cache element is empty (via #addKeptElement) or the server did not send
3042
3056
  // one last time
3043
3057
  if (!oKeptElement["@odata.etag"]
3044
3058
  || oElement["@odata.etag"] === oKeptElement["@odata.etag"]) {
@@ -3053,7 +3067,7 @@ sap.ui.define([
3053
3067
  } else if (this.hasPendingChangesForPath(sPredicate)) {
3054
3068
  throw new Error("Modified on client and on server: "
3055
3069
  + this.sResourcePath + sPredicate);
3056
- } // else: if POST and GET are in the same $batch, ETag cannot differ!
3070
+ } // else: ETag changed, ignore kept element!
3057
3071
  }
3058
3072
  aElements.$byPredicate[sPredicate] = oElement;
3059
3073
  }
@@ -3250,6 +3264,8 @@ sap.ui.define([
3250
3264
  * @param {function(string,number)} fnOnRemove
3251
3265
  * A function which is called with predicate and index if a kept-alive or created element does
3252
3266
  * no longer exist after refresh; the index is undefined for a non-created element
3267
+ * @param {boolean} [bDropApply]
3268
+ * Whether to drop the "$apply" system query option from the resulting GET
3253
3269
  * @returns {Promise|undefined}
3254
3270
  * A promise resolving without a defined result, or rejecting with an error if the refresh
3255
3271
  * fails, or <code>undefined</code> if there are no kept-alive elements.
@@ -3258,7 +3274,7 @@ sap.ui.define([
3258
3274
  *
3259
3275
  * @public
3260
3276
  */
3261
- _CollectionCache.prototype.refreshKeptElements = function (oGroupLock, fnOnRemove) {
3277
+ _CollectionCache.prototype.refreshKeptElements = function (oGroupLock, fnOnRemove, bDropApply) {
3262
3278
  var that = this,
3263
3279
  // Note: at this time only kept-alive and created elements are in the cache, but we
3264
3280
  // don't care if $byPredicate still contains two entries for the same element
@@ -3278,6 +3294,9 @@ sap.ui.define([
3278
3294
  if (that.mLateQueryOptions) {
3279
3295
  _Helper.aggregateExpandSelect(mQueryOptions, that.mLateQueryOptions);
3280
3296
  }
3297
+ if (bDropApply) {
3298
+ delete mQueryOptions.$apply;
3299
+ }
3281
3300
  delete mQueryOptions.$count;
3282
3301
  delete mQueryOptions.$orderby;
3283
3302
  delete mQueryOptions.$search;
@@ -3297,8 +3316,10 @@ sap.ui.define([
3297
3316
  }
3298
3317
 
3299
3318
  /*
3300
- * Tells whether a refresh is needed for the given predicate. Transient predicates and
3301
- * elements with pending changes need no refresh.
3319
+ * Tells whether a refresh is needed for the given predicate. Transient predicates,
3320
+ * elements with pending changes, and empty elements just created via
3321
+ * {@link sap.ui.model.odata.v4.ODataModel#getKeepAliveContext} but not yet read, need no
3322
+ * refresh.
3302
3323
  *
3303
3324
  * @param {string} sPredicate - A key predicate
3304
3325
  * @returns {boolean} - Whether a refresh is needed
@@ -3307,6 +3328,7 @@ sap.ui.define([
3307
3328
  var oElement = that.aElements.$byPredicate[sPredicate];
3308
3329
 
3309
3330
  return _Helper.getPrivateAnnotation(oElement, "predicate") === sPredicate
3331
+ && Object.keys(oElement).length > 1 // entity has key properties
3310
3332
  && !that.hasPendingChangesForPath(sPredicate);
3311
3333
  }
3312
3334
 
@@ -3535,13 +3557,22 @@ sap.ui.define([
3535
3557
  * The group ID used for a side-effects refresh; if given, only inline creation
3536
3558
  * rows and transient elements with a different batch group shall be kept in place and a
3537
3559
  * backup shall be remembered for a later {@link #restore}
3560
+ * @param {object} [mQueryOptions]
3561
+ * The new query options
3562
+ * @param {object} [_oAggregation]
3563
+ * An object holding the information needed for data aggregation; see also "OData Extension
3564
+ * for Data Aggregation Version 4.0"; must already be normalized by
3565
+ * {@link _AggregationHelper.buildApply}
3566
+ * @param {boolean} [_bIsGrouped]
3567
+ * Whether the list binding is grouped via its first sorter
3538
3568
  * @throws {Error}
3539
3569
  * If a cache is shared and a group ID is given
3540
3570
  *
3541
3571
  * @public
3542
3572
  * @see _Cache#hasPendingChangesForPath
3543
3573
  */
3544
- _CollectionCache.prototype.reset = function (aKeptElementPredicates, sGroupId) {
3574
+ _CollectionCache.prototype.reset = function (aKeptElementPredicates, sGroupId, mQueryOptions,
3575
+ _oAggregation, _bIsGrouped) {
3545
3576
  var mByPredicate = this.aElements.$byPredicate,
3546
3577
  mChangeListeners = this.mChangeListeners,
3547
3578
  iCreated = 0, // index (and finally number) of created elements that we keep
@@ -3564,6 +3595,10 @@ sap.ui.define([
3564
3595
  };
3565
3596
  }
3566
3597
 
3598
+ if (mQueryOptions) {
3599
+ this.setQueryOptions(mQueryOptions, true);
3600
+ }
3601
+
3567
3602
  for (i = 0; i < this.aElements.$created; i += 1) {
3568
3603
  oElement = this.aElements[i];
3569
3604
  sTransientGroup = _Helper.getPrivateAnnotation(oElement, "transient");
@@ -297,7 +297,7 @@ sap.ui.define([
297
297
  * Converts the select paths into an object where each of the selected properties has the
298
298
  * value <code>true</code>, unless a (complex) parent property is also selected.
299
299
  *
300
- * @param {string[]} aSelect - The list of selected paths
300
+ * @param {string[]} [aSelect] - The list of selected paths
301
301
  * @returns {object|boolean} - An object marking the selected properties or
302
302
  * <code>true</code> if all properties are selected ("*")
303
303
  */
@@ -507,6 +507,7 @@ sap.ui.define([
507
507
  }
508
508
  if (sRetryAfter) {
509
509
  iRetryAfter = parseInt(sRetryAfter);
510
+ // no need to use UI5Date.getInstance as only the timestamp is relevant
510
511
  oResult.retryAfter = new Date(Number.isNaN(iRetryAfter)
511
512
  ? sRetryAfter
512
513
  : Date.now() + iRetryAfter * 1000);
@@ -1401,6 +1402,25 @@ sap.ui.define([
1401
1402
  return sPath.replace(rNotMetaContext, "").slice(1);
1402
1403
  },
1403
1404
 
1405
+ /**
1406
+ * Returns a list of properties that would be expected due to $select/$expand, but are
1407
+ * missing in vEntityOrCollection. Does not analyze $expand any further, only checks whether
1408
+ * there is data for the navigation property itself (relying on requestSideEffects to take
1409
+ * care of the details).
1410
+ *
1411
+ * @param {object|object[]} vEntityOrCollection - The entity (collection)
1412
+ * @param {object} mQueryOptions - The query options (only $select and $expand required)
1413
+ * @returns {string[]}
1414
+ * A list of paths relative to vEntityOrCollection for which the property value is missing
1415
+ * @throws {Error} If there is a path containing "*"
1416
+ */
1417
+ getMissingPropertyPaths : function (vEntityOrCollection, mQueryOptions) {
1418
+ return (mQueryOptions.$select || []).concat(Object.keys(mQueryOptions.$expand || {}))
1419
+ .filter(function (sPath) {
1420
+ return _Helper.isMissingProperty(vEntityOrCollection, sPath);
1421
+ });
1422
+ },
1423
+
1404
1424
  /**
1405
1425
  * Returns the list of predicates corresponding to the given list of contexts, or
1406
1426
  * <code>null</code if at least one predicate is missing.
@@ -1802,6 +1822,41 @@ sap.ui.define([
1802
1822
  && !mParameters.$$aggregation.hierarchyQualifier;
1803
1823
  },
1804
1824
 
1825
+ /**
1826
+ * Returns whether the given property is missing in vEntityOrCollection. This is the case if
1827
+ * there is no value for it. It is not missing if a parent has a <code>null</code> value. In
1828
+ * a collection it is missing if any member misses it.
1829
+ *
1830
+ * @param {object|object[]} vEntityOrCollection - The entity (collection)
1831
+ * @param {string} sPath - The property path
1832
+ * @returns {boolean} Whether the property is missing
1833
+ * @throws {Error} If there is a path containing "*"
1834
+ */
1835
+ isMissingProperty : function (vEntityOrCollection, sPath) {
1836
+ var aSegments = sPath.split("/");
1837
+
1838
+ // Checks whether the sub-path in aSegments starting at index i is missing in vValue
1839
+ function isMissing(vValue, i) {
1840
+ var vProperty;
1841
+
1842
+ if (Array.isArray(vValue)) {
1843
+ return vValue.some(function (vItem) {
1844
+ return isMissing(vItem, i);
1845
+ });
1846
+ }
1847
+ vProperty = vValue[aSegments[i]];
1848
+ if (vProperty && typeof vProperty === "object" && i + 1 < aSegments.length) {
1849
+ return isMissing(vProperty, i + 1);
1850
+ }
1851
+ return vProperty === undefined;
1852
+ }
1853
+
1854
+ if (sPath.includes("*")) {
1855
+ throw new Error("Unsupported property path " + sPath);
1856
+ }
1857
+ return isMissing(vEntityOrCollection, 0);
1858
+ },
1859
+
1805
1860
  /**
1806
1861
  * Tells whether the value is a safe integer.
1807
1862
  *
@@ -2526,7 +2581,7 @@ sap.ui.define([
2526
2581
  // copy complete collection; no change events as long as collection-valued
2527
2582
  // properties are not supported; transient entity collections from a deep
2528
2583
  // insert are handled elsewhere
2529
- if (!(vTargetProperty && vTargetProperty.$transient)) {
2584
+ if (!(vTargetProperty && vTargetProperty.$postBodyCollection)) {
2530
2585
  oTarget[sProperty] = vSourceProperty;
2531
2586
  }
2532
2587
  } else if (vSourceProperty && typeof vSourceProperty === "object"
@@ -115,6 +115,7 @@ sap.ui.define([
115
115
  if (!aMatches) {
116
116
  throw new Error("Not a valid Edm.DateTime value '" + sV2Value + "'");
117
117
  }
118
+ // no need to use UI5Date.getInstance as only UTC is relevant
118
119
  oDate = new Date(parseInt(aMatches[1]));
119
120
  if (Number(aMatches[1] % (24 * 60 * 60 * 1000)) !== 0) {
120
121
  throw new Error("Cannot convert Edm.DateTime value '" + sV2Value
@@ -171,6 +172,7 @@ sap.ui.define([
171
172
  UTC : true
172
173
  });
173
174
  }
175
+ // no need to use UI5Date.getInstance as only UTC is relevant
174
176
  return mPattern2Formatter[sPattern].format(new Date(iTicks)) + sOffset;
175
177
  };
176
178
 
@@ -401,6 +403,7 @@ sap.ui.define([
401
403
  }
402
404
 
403
405
  iTicks = Date.UTC(1970, 0, 1, aMatches[1] || 0, aMatches[2] || 0, aMatches[3] || 0);
406
+ // no need to use UI5Date.getInstance as only UTC is relevant
404
407
  oDate = new Date(iTicks);
405
408
  return oTimeFormatter.format(oDate) + (aMatches[4] || "");
406
409
  };
@@ -229,7 +229,7 @@ sap.ui.define([
229
229
  *
230
230
  * @extends sap.ui.model.Model
231
231
  * @public
232
- * @version 1.112.2
232
+ * @version 1.113.0
233
233
  */
234
234
  var ResourceModel = Model.extend("sap.ui.model.resource.ResourceModel", /** @lends sap.ui.model.resource.ResourceModel.prototype */ {
235
235
 
@@ -19,7 +19,7 @@ sap.ui.define(['sap/ui/model/SimpleType', 'sap/ui/model/FormatException', 'sap/u
19
19
  * @extends sap.ui.model.SimpleType
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.112.2
22
+ * @version 1.113.0
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions]
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.model.CompositeType
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.112.2
35
+ * @version 1.113.0
36
36
  *
37
37
  * @public
38
38
  * @param {object} [oFormatOptions]
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.model.SimpleType
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.112.2
30
+ * @version 1.113.0
31
31
  *
32
32
  * @public
33
33
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.model.CompositeType
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.112.2
27
+ * @version 1.113.0
28
28
  *
29
29
  * @alias sap.ui.model.type.DateInterval
30
30
  * @param {object} [oFormatOptions]
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
19
19
  * @extends sap.ui.model.type.Date
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.112.2
22
+ * @version 1.113.0
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.