@openui5/sap.ui.core 1.140.0 → 1.141.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +1 -1
  3. package/src/jquery.sap.global.js +1 -1
  4. package/src/jquery.sap.properties.js +1 -1
  5. package/src/jquery.sap.resources.js +1 -1
  6. package/src/jquery.sap.script.js +1 -1
  7. package/src/jquery.sap.storage.js +3 -3
  8. package/src/sap/base/Event.js +1 -1
  9. package/src/sap/base/Eventing.js +1 -1
  10. package/src/sap/base/config.js +1 -1
  11. package/src/sap/base/i18n/Formatting.js +1 -1
  12. package/src/sap/base/i18n/LanguageTag.js +9 -9
  13. package/src/sap/base/i18n/Localization.js +2 -2
  14. package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
  15. package/src/sap/base/security/encodeURL.js +1 -1
  16. package/src/sap/base/util/resolveReference.js +3 -1
  17. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  18. package/src/sap/base/util/restricted/_castArray.js +1 -1
  19. package/src/sap/base/util/restricted/_compact.js +1 -1
  20. package/src/sap/base/util/restricted/_curry.js +1 -1
  21. package/src/sap/base/util/restricted/_debounce.js +1 -1
  22. package/src/sap/base/util/restricted/_difference.js +1 -1
  23. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  24. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  25. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  26. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  27. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  28. package/src/sap/base/util/restricted/_flatten.js +1 -1
  29. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  30. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  31. package/src/sap/base/util/restricted/_intersection.js +1 -1
  32. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  33. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  34. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  35. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  36. package/src/sap/base/util/restricted/_isNil.js +1 -1
  37. package/src/sap/base/util/restricted/_max.js +1 -1
  38. package/src/sap/base/util/restricted/_merge.js +1 -1
  39. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  40. package/src/sap/base/util/restricted/_min.js +1 -1
  41. package/src/sap/base/util/restricted/_omit.js +1 -1
  42. package/src/sap/base/util/restricted/_pick.js +1 -1
  43. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  44. package/src/sap/base/util/restricted/_throttle.js +1 -1
  45. package/src/sap/base/util/restricted/_toArray.js +1 -1
  46. package/src/sap/base/util/restricted/_union.js +1 -1
  47. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  48. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  49. package/src/sap/base/util/restricted/_uniq.js +1 -1
  50. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  51. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  52. package/src/sap/base/util/restricted/_without.js +1 -1
  53. package/src/sap/base/util/restricted/_xor.js +1 -1
  54. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  55. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  56. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  57. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  58. package/src/sap/ui/Device.js +3 -3
  59. package/src/sap/ui/Global.js +3 -3
  60. package/src/sap/ui/base/BindingParser.js +21 -4
  61. package/src/sap/ui/base/DataType.js +1 -1
  62. package/src/sap/ui/base/Event.js +1 -1
  63. package/src/sap/ui/base/EventProvider.js +1 -1
  64. package/src/sap/ui/base/ExpressionParser.js +5 -1
  65. package/src/sap/ui/base/Interface.js +1 -1
  66. package/src/sap/ui/base/ManagedObject.js +1 -1
  67. package/src/sap/ui/base/ManagedObjectMetadata.js +3 -3
  68. package/src/sap/ui/base/Metadata.js +1 -1
  69. package/src/sap/ui/base/Object.js +1 -1
  70. package/src/sap/ui/base/ObjectPool.js +1 -1
  71. package/src/sap/ui/base/SyncPromise.js +3 -2
  72. package/src/sap/ui/core/.library +2 -2
  73. package/src/sap/ui/core/BusyIndicator.js +1 -1
  74. package/src/sap/ui/core/Component.js +1 -1
  75. package/src/sap/ui/core/ComponentContainer.js +2 -2
  76. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  77. package/src/sap/ui/core/ComponentSupport.js +3 -3
  78. package/src/sap/ui/core/Configuration.js +4 -4
  79. package/src/sap/ui/core/Control.js +1 -1
  80. package/src/sap/ui/core/Core.js +2 -2
  81. package/src/sap/ui/core/CustomData.js +1 -1
  82. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  83. package/src/sap/ui/core/Element.js +3 -3
  84. package/src/sap/ui/core/ElementMetadata.js +1 -1
  85. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  86. package/src/sap/ui/core/EventBus.js +1 -1
  87. package/src/sap/ui/core/Fragment.js +1 -1
  88. package/src/sap/ui/core/HTML.js +1 -1
  89. package/src/sap/ui/core/History.js +1 -1
  90. package/src/sap/ui/core/Icon.js +1 -1
  91. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  92. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  93. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  94. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  95. package/src/sap/ui/core/InvisibleText.js +1 -1
  96. package/src/sap/ui/core/Item.js +1 -1
  97. package/src/sap/ui/core/LabelEnablement.js +1 -1
  98. package/src/sap/ui/core/LayoutData.js +1 -1
  99. package/src/sap/ui/core/Lib.js +41 -38
  100. package/src/sap/ui/core/ListItem.js +1 -1
  101. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  102. package/src/sap/ui/core/Locale.js +7 -7
  103. package/src/sap/ui/core/LocaleData.js +7 -4
  104. package/src/sap/ui/core/Manifest.js +1 -1
  105. package/src/sap/ui/core/Message.js +1 -1
  106. package/src/sap/ui/core/RenderManager.js +1 -1
  107. package/src/sap/ui/core/Renderer.js +1 -1
  108. package/src/sap/ui/core/ResizeHandler.js +1 -1
  109. package/src/sap/ui/core/ScrollBar.js +1 -1
  110. package/src/sap/ui/core/SeparatorItem.js +1 -1
  111. package/src/sap/ui/core/Theming.js +22 -18
  112. package/src/sap/ui/core/Title.js +1 -1
  113. package/src/sap/ui/core/TooltipBase.js +1 -1
  114. package/src/sap/ui/core/UIArea.js +1 -1
  115. package/src/sap/ui/core/UIComponent.js +16 -7
  116. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  117. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  118. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  119. package/src/sap/ui/core/XMLComposite.js +1 -1
  120. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  121. package/src/sap/ui/core/_IconRegistry.js +19 -39
  122. package/src/sap/ui/core/date/UI5Date.js +1 -1
  123. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  124. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  125. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  126. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  127. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  128. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  129. package/src/sap/ui/core/format/FormatUtils.js +1 -1
  130. package/src/sap/ui/core/format/NumberFormat.js +1 -1
  131. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  132. package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
  133. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  134. package/src/sap/ui/core/library.js +3 -3
  135. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  136. package/src/sap/ui/core/message/Message.js +1 -1
  137. package/src/sap/ui/core/message/MessageManager.js +1 -1
  138. package/src/sap/ui/core/message/MessageParser.js +1 -1
  139. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  140. package/src/sap/ui/core/messagebundle_pt.properties +2 -2
  141. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  142. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  143. package/src/sap/ui/core/mvc/JSView.js +1 -1
  144. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  145. package/src/sap/ui/core/mvc/View.js +2 -2
  146. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  147. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  148. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  149. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  150. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  151. package/src/sap/ui/core/routing/History.js +14 -5
  152. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  153. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  154. package/src/sap/ui/core/service/Service.js +1 -1
  155. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  156. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  157. package/src/sap/ui/core/support/Plugin.js +1 -1
  158. package/src/sap/ui/core/support/Support.js +1 -1
  159. package/src/sap/ui/core/support/ViewInfo.css +12 -12
  160. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  161. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  162. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  163. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  164. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  165. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  166. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  167. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  168. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -3
  169. package/src/sap/ui/core/support/trace/E2eTraceLib.js +13 -7
  170. package/src/sap/ui/core/themes/base/BrowserScrollbar.less +0 -28
  171. package/src/sap/ui/core/themes/base/ScrollBar.less +4 -0
  172. package/src/sap/ui/core/themes/base/base.less +66 -17
  173. package/src/sap/ui/core/themes/base/global.less +5 -0
  174. package/src/sap/ui/core/themes/base/skeleton.less +7 -3
  175. package/src/sap/ui/core/themes/sap_hcb/LocalBusyIndicator.less +4 -0
  176. package/src/sap/ui/core/themes/sap_hcb/base_LocalBusyIndicator.less +4 -0
  177. package/src/sap/ui/core/themes/sap_hcb/base_ScrollBar.less +4 -0
  178. package/src/sap/ui/core/theming/Parameters.js +24 -11
  179. package/src/sap/ui/core/theming/ThemeManager.js +4 -3
  180. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  181. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  182. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  183. package/src/sap/ui/core/tmpl/Template.js +1 -1
  184. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  185. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  186. package/src/sap/ui/core/util/DraftEnabledMockServer.js +47 -43
  187. package/src/sap/ui/core/util/Export.js +1 -1
  188. package/src/sap/ui/core/util/ExportCell.js +1 -1
  189. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  190. package/src/sap/ui/core/util/ExportRow.js +1 -1
  191. package/src/sap/ui/core/util/ExportType.js +1 -1
  192. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  193. package/src/sap/ui/core/util/File.js +1 -1
  194. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  195. package/src/sap/ui/core/util/MockServer.js +1 -1
  196. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  197. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  198. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  199. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  200. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  201. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  202. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  203. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  204. package/src/sap/ui/core/webc/WebComponent.js +1 -1
  205. package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
  206. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  207. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  208. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  209. package/src/sap/ui/debug/ControlTree.js +1 -1
  210. package/src/sap/ui/debug/DebugEnv.js +1 -1
  211. package/src/sap/ui/debug/PropertyList.js +1 -1
  212. package/src/sap/ui/events/F6Navigation.js +11 -3
  213. package/src/sap/ui/model/ClientModel.js +1 -1
  214. package/src/sap/ui/model/CompositeDataState.js +1 -1
  215. package/src/sap/ui/model/CompositeType.js +1 -1
  216. package/src/sap/ui/model/DataState.js +1 -1
  217. package/src/sap/ui/model/MetaModel.js +1 -1
  218. package/src/sap/ui/model/Model.js +1 -1
  219. package/src/sap/ui/model/SelectionModel.js +1 -1
  220. package/src/sap/ui/model/SimpleType.js +1 -1
  221. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  222. package/src/sap/ui/model/Type.js +1 -1
  223. package/src/sap/ui/model/json/JSONModel.js +1 -1
  224. package/src/sap/ui/model/message/MessageModel.js +1 -1
  225. package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
  226. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  227. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  228. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  229. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  230. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  231. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +25 -73
  232. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  233. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  234. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  235. package/src/sap/ui/model/odata/type/Date.js +1 -1
  236. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  237. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  238. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  239. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  240. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  241. package/src/sap/ui/model/odata/type/Double.js +1 -1
  242. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  243. package/src/sap/ui/model/odata/type/Int.js +1 -1
  244. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  245. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  246. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  247. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  248. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  249. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  250. package/src/sap/ui/model/odata/type/Single.js +1 -1
  251. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  252. package/src/sap/ui/model/odata/type/String.js +1 -1
  253. package/src/sap/ui/model/odata/type/Time.js +1 -1
  254. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  255. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  256. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  257. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  258. package/src/sap/ui/model/odata/v2/ODataModel.js +23 -9
  259. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +3 -11
  260. package/src/sap/ui/model/odata/v4/AnnotationHelper.js +11 -7
  261. package/src/sap/ui/model/odata/v4/Context.js +27 -27
  262. package/src/sap/ui/model/odata/v4/ODataBinding.js +44 -28
  263. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +16 -15
  264. package/src/sap/ui/model/odata/v4/ODataListBinding.js +35 -23
  265. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +47 -34
  266. package/src/sap/ui/model/odata/v4/ODataModel.js +40 -24
  267. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +19 -15
  268. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
  269. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +14 -14
  270. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +57 -17
  271. package/src/sap/ui/model/odata/v4/lib/_Batch.js +10 -7
  272. package/src/sap/ui/model/odata/v4/lib/_Cache.js +57 -65
  273. package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
  274. package/src/sap/ui/model/odata/v4/lib/_Helper.js +3 -3
  275. package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +35 -4
  276. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +13 -10
  277. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
  278. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  279. package/src/sap/ui/model/type/Boolean.js +1 -1
  280. package/src/sap/ui/model/type/Currency.js +1 -1
  281. package/src/sap/ui/model/type/Date.js +1 -1
  282. package/src/sap/ui/model/type/DateInterval.js +1 -1
  283. package/src/sap/ui/model/type/DateTime.js +1 -1
  284. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  285. package/src/sap/ui/model/type/FileSize.js +1 -1
  286. package/src/sap/ui/model/type/Float.js +1 -1
  287. package/src/sap/ui/model/type/Integer.js +1 -1
  288. package/src/sap/ui/model/type/String.js +1 -1
  289. package/src/sap/ui/model/type/Time.js +1 -1
  290. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  291. package/src/sap/ui/model/type/Unit.js +1 -1
  292. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  293. package/src/sap/ui/performance/XHRInterceptor.js +14 -9
  294. package/src/sap/ui/performance/trace/FESR.js +4 -11
  295. package/src/sap/ui/performance/trace/Passport.js +3 -10
  296. package/src/sap/ui/performance/trace/_InteractionImpl.js +4 -10
  297. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  298. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  299. package/src/sap/ui/test/generic/TestBase.js +1 -1
  300. package/src/sap/ui/test/gherkin/dataTableUtils.js +2 -2
  301. package/src/sap/ui/thirdparty/caja-html-sanitizer.js +8 -2
  302. package/src/sap/ui/util/Storage.js +1 -1
  303. package/src/sap/ui/util/isCrossOriginURL.js +1 -1
  304. package/src/ui5loader.js +1 -1
@@ -58,6 +58,7 @@ sap.ui.define([
58
58
  this.aElements.$byPredicate = {};
59
59
  this.aElements.$count = undefined;
60
60
  this.aElements.$created = 0; // required for _Cache#drillDown (see _Cache.from$skip)
61
+ this.iResetCount = 0;
61
62
  // Whether this cache is a unified cache, using oFirstLevel with ExpandLevels instead of
62
63
  // separate group level caches
63
64
  this.bUnifiedCache = oAggregation.expandTo >= Number.MAX_SAFE_INTEGER
@@ -461,7 +462,7 @@ sap.ui.define([
461
462
  *
462
463
  * @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
463
464
  * A lock for the group ID
464
- * @param {sap.ui.base.SyncPromise} oPostPathPromise
465
+ * @param {sap.ui.base.SyncPromise<string>} oPostPathPromise
465
466
  * A SyncPromise resolving with the resource path for the POST request
466
467
  * @param {string} sPath
467
468
  * The collection's path within the cache (as used by change listeners)
@@ -479,7 +480,7 @@ sap.ui.define([
479
480
  * fails
480
481
  * @param {function} fnSubmitCallback
481
482
  * A function which is called just before a POST request for the create is sent
482
- * @returns {sap.ui.base.SyncPromise}
483
+ * @returns {sap.ui.base.SyncPromise<object>}
483
484
  * A promise which is resolved with the created entity when the POST request has been
484
485
  * successfully sent and the entity has been marked as non-transient
485
486
  * @throws {Error}
@@ -517,9 +518,22 @@ sap.ui.define([
517
518
 
518
519
  _Helper.addByPath(this.mPostRequests, sTransientPredicate, oEntityData);
519
520
  const iIndex = aElements.indexOf(oParentNode) + 1; // 0 w/o oParentNode :-)
521
+ if (this.oCountPromise) {
522
+ const fnOldSubmitCallback = fnSubmitCallback;
523
+ // create a new count promise early, that a synchronous call to
524
+ // oHeaderContext.requestProperty("$count") waits until the creation was successful or
525
+ // has been cancelled; cancellation of the creation will restore the old count promise
526
+ this.createCountPromise(true);
527
+ fnSubmitCallback = () => {
528
+ this.readCount(oGroupLock)?.catch(
529
+ this.oRequestor.getModelInterface().getReporter());
530
+ fnOldSubmitCallback();
531
+ };
532
+ }
520
533
  const oPromise = oCache.create(oGroupLock, oPostPathPromise, sPath, sTransientPredicate,
521
534
  oEntityData, bAtEndOfCreated, fnErrorCallback, fnSubmitCallback, /*onCancel*/() => {
522
535
  _Helper.removeByPath(this.mPostRequests, sTransientPredicate, oEntityData);
536
+ this.oCountPromise?.$restore();
523
537
  if (this.oAggregation.createInPlace) {
524
538
  return;
525
539
  }
@@ -618,22 +632,30 @@ sap.ui.define([
618
632
  * to be resolved by a following {@link #readCount} call. If the old count promise is still
619
633
  * pending, no new promise is created in order to avoid duplicate $count requests.
620
634
  *
635
+ * @param {boolean} [bRetryIfFailed]
636
+ * Whether a count request which fails due to a previous request will be retried
637
+ *
621
638
  * @private
622
639
  */
623
- _AggregationCache.prototype.createCountPromise = function () {
640
+ _AggregationCache.prototype.createCountPromise = function (bRetryIfFailed) {
624
641
  const oOldCountPromise = this.oCountPromise;
625
642
  if (oOldCountPromise?.isPending()) {
626
643
  return;
627
644
  }
628
645
 
629
646
  let fnResolve;
630
- this.oCountPromise = new SyncPromise(function (resolve) {
631
- fnResolve = resolve;
647
+ this.oCountPromise = new SyncPromise((resolve) => {
648
+ fnResolve = (iCount) => {
649
+ delete this.oCountPromise?.$old; // count promise might already be deleted
650
+ resolve(iCount);
651
+ };
632
652
  });
633
653
  this.oCountPromise.$resolve = fnResolve;
634
654
  this.oCountPromise.$restore = () => {
635
655
  fnResolve(oOldCountPromise);
636
656
  };
657
+ this.oCountPromise.$old = oOldCountPromise;
658
+ this.oCountPromise.$retryIfFailed = bRetryIfFailed;
637
659
  };
638
660
 
639
661
  /**
@@ -938,7 +960,7 @@ sap.ui.define([
938
960
  * The index of the child node
939
961
  * @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock
940
962
  * An unlocked lock for the group to associate the requests with
941
- * @returns {sap.ui.base.SyncPromise}
963
+ * @returns {sap.ui.base.SyncPromise<number>}
942
964
  * A promise to be resolved with the requested index of the parent.
943
965
  *
944
966
  * @public
@@ -1027,7 +1049,7 @@ sap.ui.define([
1027
1049
  * An optional change listener that is added for the given path. Its method
1028
1050
  * <code>onChange</code> is called with the new value if the property at that path is modified
1029
1051
  * via {@link #update} later.
1030
- * @returns {sap.ui.base.SyncPromise}
1052
+ * @returns {sap.ui.base.SyncPromise<any>}
1031
1053
  * A promise to be resolved with the requested data. The promise is rejected if the cache is
1032
1054
  * inactive (see {@link #setActive}) when the response arrives. Fails to drill-down into
1033
1055
  * "$count" in cases where it does not reflect the leaf count.
@@ -1048,6 +1070,12 @@ sap.ui.define([
1048
1070
  // name similar to "$count" which never conflicts with any other valid path.
1049
1071
  this.registerChangeListener("./$count", oListener);
1050
1072
  }
1073
+ if (oGroupLock === _GroupLock.$cached && this.oCountPromise.$old) {
1074
+ // return the old count promise if the $count is now being requested
1075
+ // synchronously and a new count has already been requested (e.g. when creating
1076
+ // a new entity) but is not yet available
1077
+ return this.oCountPromise.$old;
1078
+ }
1051
1079
  return this.oCountPromise;
1052
1080
  }
1053
1081
  if (this.oAggregation.hierarchyQualifier || this.oAggregation.groupLevels.length) {
@@ -1315,7 +1343,7 @@ sap.ui.define([
1315
1343
  throw new Error("Unsupported path: " + sPath);
1316
1344
  }
1317
1345
 
1318
- const mQueryOptions = _Helper.clone(this.mLateQueryOptions ?? this.mQueryOptions);
1346
+ const mQueryOptions = _Helper.clone({...this.mQueryOptions, ...this.mLateExpandSelect});
1319
1347
  const iIndex = mQueryOptions.$select.indexOf(this.oAggregation.$NodeProperty);
1320
1348
  if (iIndex >= 0) {
1321
1349
  mQueryOptions.$select.splice(iIndex, 1);
@@ -1620,8 +1648,6 @@ sap.ui.define([
1620
1648
  const invokeNextSibling = () => {
1621
1649
  if (sSiblingPath !== undefined) {
1622
1650
  bRefreshNeeded = true;
1623
- const sActionPath = sNonCanonicalChildPath + "/"
1624
- + this.oAggregation.$Actions.ChangeNextSiblingAction;
1625
1651
  const sSiblingPredicate = sSiblingPath?.slice(sSiblingPath.indexOf("("));
1626
1652
  oSiblingNode = this.aElements.$byPredicate[sSiblingPredicate];
1627
1653
  let oNextSibling = null;
@@ -1629,7 +1655,8 @@ sap.ui.define([
1629
1655
  // remove OOP for all descendants (incl. itself) of a next sibling
1630
1656
  this.oTreeState.deleteOutOfPlace(sSiblingPredicate);
1631
1657
  const oNextSiblingType = this.oAggregation.$fetchMetadata(
1632
- _Helper.getMetaPath("/" + sActionPath + "/NextSibling/")
1658
+ _Helper.getMetaPath("/" + sNonCanonicalChildPath + "/"
1659
+ + this.oAggregation.$Actions.ChangeNextSiblingAction + "/NextSibling/")
1633
1660
  ).getResult();
1634
1661
  const aKeys = Object.keys(oNextSiblingType).filter((sKey) => sKey[0] !== "$");
1635
1662
  oNextSibling = aKeys.reduce((oKeys, sKey) => {
@@ -1637,6 +1664,8 @@ sap.ui.define([
1637
1664
  return oKeys;
1638
1665
  }, {});
1639
1666
  }
1667
+ const sActionPath = (bCopy ? "$-2" : sNonCanonicalChildPath) + "/"
1668
+ + this.oAggregation.$Actions.ChangeNextSiblingAction;
1640
1669
 
1641
1670
  return this.oRequestor.request("POST", sActionPath, oGroupLock.getUnlockedCopy(), {
1642
1671
  "If-Match" : oChildNode,
@@ -1782,9 +1811,9 @@ sap.ui.define([
1782
1811
  * @param {function} [fnDataRequested]
1783
1812
  * The function is called just before a back-end request is sent.
1784
1813
  * If no back-end request is needed, the function is not called.
1785
- * @returns {sap.ui.base.SyncPromise}
1814
+ * @returns {sap.ui.base.SyncPromise<object>}
1786
1815
  * A promise to be resolved with the requested range given as an OData response object (with
1787
- * "@odata.context" and the rows as an array in the property <code>value</code>, enhanced
1816
+ * "@$ui5.resetCount" and the rows as an array in the property <code>value</code>, enhanced
1788
1817
  * with a number property <code>$count</code> representing the element count on server-side;
1789
1818
  * <code>$count</code> may be <code>undefined</code>, but not <code>Infinity</code>). If an
1790
1819
  * HTTP request fails, the error from the _Requestor is returned.
@@ -1903,7 +1932,10 @@ sap.ui.define([
1903
1932
 
1904
1933
  aElements.$count = that.aElements.$count;
1905
1934
 
1906
- return {value : aElements};
1935
+ return {
1936
+ "@$ui5.resetCount" : that.iResetCount,
1937
+ value : aElements
1938
+ };
1907
1939
  });
1908
1940
  };
1909
1941
 
@@ -1952,7 +1984,11 @@ sap.ui.define([
1952
1984
  _Helper.fireChange(this.mChangeListeners, "./$count", iCount);
1953
1985
  })
1954
1986
  .catch((oError) => {
1955
- this.oCountPromise.$restore();
1987
+ if (oError.cause && this.oCountPromise.$retryIfFailed) {
1988
+ this.oCountPromise.$resolve = fnResolve; // allow another readCount call
1989
+ } else {
1990
+ this.oCountPromise.$restore();
1991
+ }
1956
1992
  throw oError;
1957
1993
  });
1958
1994
  }
@@ -1973,7 +2009,7 @@ sap.ui.define([
1973
2009
  * @param {function} [fnDataRequested]
1974
2010
  * The function is called just before a back-end request is sent.
1975
2011
  * If no back-end request is needed, the function is not called.
1976
- * @returns {sap.ui.base.SyncPromise}
2012
+ * @returns {sap.ui.base.SyncPromise<void>}
1977
2013
  * A promise which is resolved without a defined result when the read is finished, or
1978
2014
  * rejected in case of an error
1979
2015
  * @throws {Error} If given index or length is less than 0
@@ -1999,6 +2035,7 @@ sap.ui.define([
1999
2035
  iStart = 0;
2000
2036
  }
2001
2037
 
2038
+ const iResetCount = this.iResetCount;
2002
2039
  // Note: this.oFirstLevel.read changes this value
2003
2040
  const bSentRequest = this.oFirstLevel.bSentRequest;
2004
2041
  if (bSentRequest && iOutOfPlaceCount) { // cannot handle result below, avoid new request
@@ -2010,6 +2047,9 @@ sap.ui.define([
2010
2047
  // request out-of-place nodes only once
2011
2048
  ...(bSentRequest ? [] : this.requestOutOfPlaceNodes(oGroupLock))
2012
2049
  ]).then(function ([oResult, ...aOutOfPlaceResults]) {
2050
+ if (iResetCount !== that.iResetCount) {
2051
+ return; // ignore result, a refresh happened in the meantime
2052
+ }
2013
2053
  if (bSentRequest && iOutOfPlaceCount) {
2014
2054
  return; // not idempotent due to previous #handleOutOfPlaceNodes
2015
2055
  }
@@ -2076,7 +2116,7 @@ sap.ui.define([
2076
2116
  * @param {function} [fnDataRequested]
2077
2117
  * The function is called just before a back-end request is sent.
2078
2118
  * If no back-end request is needed, the function is not called.
2079
- * @returns {sap.ui.base.SyncPromise}
2119
+ * @returns {sap.ui.base.SyncPromise<void>}
2080
2120
  * A promise which is resolved without a defined result when the read is finished, or
2081
2121
  * rejected in case of an error
2082
2122
  * @throws {Error} If index of placeholder at start of gap is less than 0, if end of gap is
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  "use strict";
13
13
 
14
14
  var mAllowedChangeSetMethods = {POST : true, PUT : true, PATCH : true, DELETE : true},
15
- rContentIdReference = /^\$\d+/,
15
+ rContentIdReference = /^\$-?(\d+)/,
16
16
  rHeaderParameter = /(\S*?)=(?:"(.+)"|(\S+))/;
17
17
 
18
18
  /**
@@ -292,12 +292,15 @@ sap.ui.define([
292
292
  }
293
293
 
294
294
  if (iChangeSetIndex !== undefined && sUrl[0] === "$") {
295
- // adjust URL if it starts with a Content-ID reference by adding the change set
296
- // index
297
- if (sUrl === "$-1") { // reference the previous request
298
- sUrl = "$" + (iRequestIndex - 1) + "." + iChangeSetIndex;
299
- } else {
300
- sUrl = sUrl.replace(rContentIdReference, "$&." + iChangeSetIndex);
295
+ const aMatches = rContentIdReference.exec(sUrl);
296
+ if (aMatches) {
297
+ // adjust URL if it starts with a Content-ID reference by adding the
298
+ // change set index
299
+ const vReferencedRequestIndex = sUrl.startsWith("$-")
300
+ ? (iRequestIndex - parseInt(aMatches[1])) // reference previous request
301
+ : aMatches[1];
302
+ sUrl = sUrl.replace(aMatches[0],
303
+ "$" + vReferencedRequestIndex + "." + iChangeSetIndex);
301
304
  }
302
305
  }
303
306