@openui5/sap.ui.core 1.93.3 → 1.96.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/.eslintrc.json +13 -2
  2. package/.reuse/dep5 +6 -11
  3. package/THIRDPARTY.txt +10 -16
  4. package/package.json +1 -1
  5. package/src/jquery.sap.global.js +5 -2
  6. package/src/jquery.sap.properties.js +1 -1
  7. package/src/jquery.sap.resources.js +1 -1
  8. package/src/jquery.sap.script.js +1 -1
  9. package/src/jquery.sap.storage.js +3 -3
  10. package/src/jquery.sap.stubs.js +2 -1
  11. package/src/jquery.sap.trace.js +2 -1
  12. package/src/sap/base/i18n/ResourceBundle.js +6 -2
  13. package/src/sap/base/strings/whitespaceReplacer.js +52 -0
  14. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  15. package/src/sap/base/util/restricted/_castArray.js +1 -1
  16. package/src/sap/base/util/restricted/_compact.js +1 -1
  17. package/src/sap/base/util/restricted/_curry.js +1 -1
  18. package/src/sap/base/util/restricted/_debounce.js +1 -1
  19. package/src/sap/base/util/restricted/_difference.js +1 -1
  20. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  21. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  22. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  23. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  24. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  25. package/src/sap/base/util/restricted/_flatten.js +1 -1
  26. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  27. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  28. package/src/sap/base/util/restricted/_intersection.js +1 -1
  29. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  30. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  31. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  32. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  33. package/src/sap/base/util/restricted/_isNil.js +1 -1
  34. package/src/sap/base/util/restricted/_max.js +1 -1
  35. package/src/sap/base/util/restricted/_merge.js +1 -1
  36. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  37. package/src/sap/base/util/restricted/_min.js +1 -1
  38. package/src/sap/base/util/restricted/_omit.js +1 -1
  39. package/src/sap/base/util/restricted/_pick.js +1 -1
  40. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  41. package/src/sap/base/util/restricted/_throttle.js +1 -1
  42. package/src/sap/base/util/restricted/_toArray.js +1 -1
  43. package/src/sap/base/util/restricted/_union.js +1 -1
  44. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  45. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  46. package/src/sap/base/util/restricted/_uniq.js +1 -1
  47. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  48. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  49. package/src/sap/base/util/restricted/_without.js +1 -1
  50. package/src/sap/base/util/restricted/_xor.js +1 -1
  51. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  52. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  53. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  54. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  55. package/src/sap/ui/Device.js +37 -42
  56. package/src/sap/ui/Global.js +8 -7
  57. package/src/sap/ui/base/DataType.js +14 -8
  58. package/src/sap/ui/base/Event.js +1 -1
  59. package/src/sap/ui/base/EventProvider.js +1 -1
  60. package/src/sap/ui/base/ExpressionParser.js +9 -6
  61. package/src/sap/ui/base/Interface.js +3 -49
  62. package/src/sap/ui/base/ManagedObject.js +12 -7
  63. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  64. package/src/sap/ui/base/Metadata.js +1 -1
  65. package/src/sap/ui/base/Object.js +49 -4
  66. package/src/sap/ui/base/ObjectPool.js +1 -1
  67. package/src/sap/ui/base/syncXHRFix.js +2 -1
  68. package/src/sap/ui/core/.library +5 -5
  69. package/src/sap/ui/core/AppCacheBuster.js +4 -4
  70. package/src/sap/ui/core/BusyIndicator.js +1 -11
  71. package/src/sap/ui/core/Component.js +300 -140
  72. package/src/sap/ui/core/ComponentContainer.js +24 -8
  73. package/src/sap/ui/core/ComponentMetadata.js +14 -3
  74. package/src/sap/ui/core/ComponentSupport.js +1 -1
  75. package/src/sap/ui/core/Configuration.js +67 -31
  76. package/src/sap/ui/core/Control.js +1 -1
  77. package/src/sap/ui/core/Core.js +103 -25
  78. package/src/sap/ui/core/CustomData.js +1 -1
  79. package/src/sap/ui/core/CustomizingConfiguration.js +35 -260
  80. package/src/sap/ui/core/DeclarativeSupport.js +3 -2
  81. package/src/sap/ui/core/Element.js +1 -1
  82. package/src/sap/ui/core/ElementMetadata.js +4 -2
  83. package/src/sap/ui/core/EnabledPropagator.js +91 -73
  84. package/src/sap/ui/core/EventBus.js +1 -1
  85. package/src/sap/ui/core/ExtensionPoint.js +7 -14
  86. package/src/sap/ui/core/Fragment.js +30 -32
  87. package/src/sap/ui/core/HTML.js +1 -1
  88. package/src/sap/ui/core/History.js +1 -1
  89. package/src/sap/ui/core/Icon.js +7 -8
  90. package/src/sap/ui/core/IconPool.js +26 -1097
  91. package/src/sap/ui/core/IconRenderer.js +6 -6
  92. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  93. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  94. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  95. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  96. package/src/sap/ui/core/InvisibleText.js +1 -1
  97. package/src/sap/ui/core/Item.js +1 -1
  98. package/src/sap/ui/core/LabelEnablement.js +1 -1
  99. package/src/sap/ui/core/LayoutData.js +1 -1
  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 +26 -4
  103. package/src/sap/ui/core/LocaleData.js +1 -1
  104. package/src/sap/ui/core/Manifest.js +4 -61
  105. package/src/sap/ui/core/Message.js +1 -1
  106. package/src/sap/ui/core/Patcher.js +27 -3
  107. package/src/sap/ui/core/Placeholder.js +28 -15
  108. package/src/sap/ui/core/RenderManager.js +36 -6
  109. package/src/sap/ui/core/Renderer.js +13 -3
  110. package/src/sap/ui/core/ResizeHandler.js +1 -1
  111. package/src/sap/ui/core/ScrollBar.js +2 -2
  112. package/src/sap/ui/core/SeparatorItem.js +1 -1
  113. package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
  114. package/src/sap/ui/core/Title.js +1 -1
  115. package/src/sap/ui/core/TooltipBase.js +1 -1
  116. package/src/sap/ui/core/UIArea.js +1 -1
  117. package/src/sap/ui/core/UIComponent.js +42 -16
  118. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  119. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  120. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  121. package/src/sap/ui/core/XMLComposite.js +2 -2
  122. package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
  123. package/src/sap/ui/core/XMLTemplateProcessor.js +116 -41
  124. package/src/sap/ui/core/_IconRegistry.js +1148 -0
  125. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  126. package/src/sap/ui/core/delegate/ScrollEnablement.js +6 -3
  127. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  128. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  129. package/src/sap/ui/core/dnd/DragInfo.js +2 -2
  130. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  131. package/src/sap/ui/core/format/NumberFormat.js +16 -1
  132. package/src/sap/ui/core/hyphenation/Hyphenation.js +73 -221
  133. package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +11 -10
  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 +13 -15
  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_de.properties +1 -1
  141. package/src/sap/ui/core/messagebundle_fr.properties +1 -1
  142. package/src/sap/ui/core/messagebundle_it.properties +1 -1
  143. package/src/sap/ui/core/messagebundle_pl.properties +1 -1
  144. package/src/sap/ui/core/messagebundle_th.properties +2 -2
  145. package/src/sap/ui/core/mvc/Controller.js +38 -19
  146. package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
  147. package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
  148. package/src/sap/ui/core/mvc/HTMLView.js +2 -2
  149. package/src/sap/ui/core/mvc/JSONView.js +2 -2
  150. package/src/sap/ui/core/mvc/JSView.js +2 -2
  151. package/src/sap/ui/core/mvc/TemplateView.js +2 -2
  152. package/src/sap/ui/core/mvc/View.js +58 -85
  153. package/src/sap/ui/core/mvc/XMLView.js +2 -2
  154. package/src/sap/ui/core/mvc/XMLViewRenderer.js +17 -20
  155. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  156. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  157. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  158. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  159. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  160. package/src/sap/ui/core/routing/History.js +10 -2
  161. package/src/sap/ui/core/routing/Router.js +8 -1
  162. package/src/sap/ui/core/routing/Target.js +13 -0
  163. package/src/sap/ui/core/routing/Targets.js +13 -2
  164. package/src/sap/ui/core/routing/async/Route.js +1 -1
  165. package/src/sap/ui/core/routing/async/Target.js +353 -259
  166. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  167. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  168. package/src/sap/ui/core/service/Service.js +1 -1
  169. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  170. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  171. package/src/sap/ui/core/support/BootSupportTool.js +11 -0
  172. package/src/sap/ui/core/support/InteractionTree.css +4 -0
  173. package/src/sap/ui/core/support/Plugin.js +1 -1
  174. package/src/sap/ui/core/support/Support.js +1 -1
  175. package/src/sap/ui/core/support/ViewInfo.css +599 -0
  176. package/src/sap/ui/core/support/controls/InteractionTree.js +352 -222
  177. package/src/sap/ui/core/support/controls/ObjectViewer.js +3 -41
  178. package/src/sap/ui/core/support/controls/TimelineOverview.js +49 -24
  179. package/src/sap/ui/core/support/controls/TreeViewer.js +12 -58
  180. package/src/sap/ui/core/support/plugins/ControlTree.js +59 -68
  181. package/src/sap/ui/core/support/plugins/Debugging.js +9 -11
  182. package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
  183. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  184. package/src/sap/ui/core/support/plugins/Performance.js +147 -75
  185. package/src/sap/ui/core/support/plugins/Selector.js +19 -24
  186. package/src/sap/ui/core/support/plugins/TechInfo.js +5 -5
  187. package/src/sap/ui/core/support/plugins/Trace.js +95 -32
  188. package/src/sap/ui/core/support/plugins/ViewInfo.js +9 -73
  189. package/src/sap/ui/core/support/support.css +109 -14
  190. package/src/sap/ui/core/support/support.html +6 -2
  191. package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
  192. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +149 -72
  193. package/src/sap/ui/core/themes/base/Icon.less +9 -0
  194. package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
  195. package/src/sap/ui/core/theming/Parameters.js +6 -4
  196. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  197. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  198. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  199. package/src/sap/ui/core/tmpl/Template.js +10 -28
  200. package/src/sap/ui/core/tmpl/TemplateControl.js +4 -4
  201. package/src/sap/ui/core/tmpl/_parsePath.js +35 -0
  202. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  203. package/src/sap/ui/core/util/DraftEnabledMockServer.js +9 -4
  204. package/src/sap/ui/core/util/Export.js +1 -1
  205. package/src/sap/ui/core/util/ExportCell.js +1 -1
  206. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  207. package/src/sap/ui/core/util/ExportRow.js +1 -1
  208. package/src/sap/ui/core/util/ExportType.js +1 -1
  209. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  210. package/src/sap/ui/core/util/File.js +1 -1
  211. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  212. package/src/sap/ui/core/util/MockServer.js +5 -5
  213. package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +3 -2
  214. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  215. package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
  216. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +136 -63
  217. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +170 -153
  218. package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +424 -293
  219. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  220. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  221. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  222. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  223. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  224. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  225. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  226. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  227. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  228. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  229. package/src/sap/ui/debug/ControlTree.js +10 -4
  230. package/src/sap/ui/debug/DebugEnv.js +3 -4
  231. package/src/sap/ui/debug/Highlighter.js +8 -2
  232. package/src/sap/ui/debug/PropertyList.css +55 -0
  233. package/src/sap/ui/debug/PropertyList.js +111 -182
  234. package/src/sap/ui/model/Binding.js +174 -118
  235. package/src/sap/ui/model/ClientContextBinding.js +1 -1
  236. package/src/sap/ui/model/ClientListBinding.js +1 -3
  237. package/src/sap/ui/model/ClientModel.js +4 -4
  238. package/src/sap/ui/model/ClientPropertyBinding.js +4 -2
  239. package/src/sap/ui/model/ClientTreeBinding.js +15 -9
  240. package/src/sap/ui/model/ClientTreeBindingAdapter.js +28 -23
  241. package/src/sap/ui/model/CompositeBinding.js +98 -77
  242. package/src/sap/ui/model/CompositeDataState.js +2 -2
  243. package/src/sap/ui/model/CompositeType.js +2 -2
  244. package/src/sap/ui/model/Context.js +4 -2
  245. package/src/sap/ui/model/ContextBinding.js +6 -14
  246. package/src/sap/ui/model/DataState.js +2 -2
  247. package/src/sap/ui/model/Filter.js +255 -53
  248. package/src/sap/ui/model/FilterOperator.js +1 -1
  249. package/src/sap/ui/model/FilterProcessor.js +27 -17
  250. package/src/sap/ui/model/FilterType.js +1 -1
  251. package/src/sap/ui/model/ListBinding.js +180 -117
  252. package/src/sap/ui/model/MetaModel.js +4 -9
  253. package/src/sap/ui/model/Model.js +345 -294
  254. package/src/sap/ui/model/PropertyBinding.js +92 -58
  255. package/src/sap/ui/model/SelectionModel.js +2 -2
  256. package/src/sap/ui/model/SimpleType.js +2 -2
  257. package/src/sap/ui/model/Sorter.js +1 -1
  258. package/src/sap/ui/model/SorterProcessor.js +1 -1
  259. package/src/sap/ui/model/StaticBinding.js +1 -1
  260. package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
  261. package/src/sap/ui/model/TreeBinding.js +1 -1
  262. package/src/sap/ui/model/TreeBindingAdapter.js +251 -100
  263. package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
  264. package/src/sap/ui/model/TreeBindingUtils.js +1 -0
  265. package/src/sap/ui/model/Type.js +1 -1
  266. package/src/sap/ui/model/analytics/AnalyticalBinding.js +8 -4
  267. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
  268. package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
  269. package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
  270. package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
  271. package/src/sap/ui/model/analytics/odata4analytics.js +34 -25
  272. package/src/sap/ui/model/base/ManagedObjectModel.js +4 -0
  273. package/src/sap/ui/model/json/JSONListBinding.js +8 -5
  274. package/src/sap/ui/model/json/JSONModel.js +24 -15
  275. package/src/sap/ui/model/json/JSONPropertyBinding.js +4 -3
  276. package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
  277. package/src/sap/ui/model/message/MessageListBinding.js +6 -3
  278. package/src/sap/ui/model/message/MessageModel.js +23 -15
  279. package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
  280. package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
  281. package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
  282. package/src/sap/ui/model/odata/CountMode.js +1 -1
  283. package/src/sap/ui/model/odata/Filter.js +1 -1
  284. package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
  285. package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
  286. package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
  287. package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
  288. package/src/sap/ui/model/odata/ODataMetaModel.js +5 -3
  289. package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
  290. package/src/sap/ui/model/odata/ODataModel.js +8 -7
  291. package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
  292. package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
  293. package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
  294. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +2 -2
  295. package/src/sap/ui/model/odata/ODataUtils.js +13 -11
  296. package/src/sap/ui/model/odata/OperationMode.js +1 -1
  297. package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +1 -1
  298. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  299. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  300. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  301. package/src/sap/ui/model/odata/type/Date.js +1 -1
  302. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  303. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  304. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  305. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  306. package/src/sap/ui/model/odata/type/Double.js +1 -1
  307. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  308. package/src/sap/ui/model/odata/type/Int.js +1 -1
  309. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  310. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  311. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  312. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  313. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  314. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  315. package/src/sap/ui/model/odata/type/Single.js +1 -1
  316. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  317. package/src/sap/ui/model/odata/type/String.js +1 -1
  318. package/src/sap/ui/model/odata/type/Time.js +1 -1
  319. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  320. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  321. package/src/sap/ui/model/odata/v2/Context.js +81 -9
  322. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +3 -3
  323. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +39 -49
  324. package/src/sap/ui/model/odata/v2/ODataListBinding.js +236 -73
  325. package/src/sap/ui/model/odata/v2/ODataModel.js +314 -164
  326. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +110 -97
  327. package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +129 -0
  328. package/src/sap/ui/model/odata/v4/Context.js +6 -3
  329. package/src/sap/ui/model/odata/v4/ODataBinding.js +5 -6
  330. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +117 -40
  331. package/src/sap/ui/model/odata/v4/ODataListBinding.js +95 -15
  332. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +44 -31
  333. package/src/sap/ui/model/odata/v4/ODataModel.js +86 -78
  334. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +47 -28
  335. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -7
  336. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
  337. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +8 -1
  338. package/src/sap/ui/model/odata/v4/lib/_Cache.js +24 -16
  339. package/src/sap/ui/model/odata/v4/lib/_Helper.js +32 -30
  340. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +52 -17
  341. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
  342. package/src/sap/ui/model/resource/ResourceModel.js +6 -2
  343. package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
  344. package/src/sap/ui/model/type/Boolean.js +2 -2
  345. package/src/sap/ui/model/type/Currency.js +2 -2
  346. package/src/sap/ui/model/type/Date.js +9 -3
  347. package/src/sap/ui/model/type/DateInterval.js +4 -2
  348. package/src/sap/ui/model/type/DateTime.js +2 -2
  349. package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
  350. package/src/sap/ui/model/type/FileSize.js +4 -2
  351. package/src/sap/ui/model/type/Float.js +4 -2
  352. package/src/sap/ui/model/type/Integer.js +4 -2
  353. package/src/sap/ui/model/type/String.js +2 -2
  354. package/src/sap/ui/model/type/Time.js +2 -2
  355. package/src/sap/ui/model/type/TimeInterval.js +2 -2
  356. package/src/sap/ui/model/type/Unit.js +14 -7
  357. package/src/sap/ui/model/xml/XMLListBinding.js +15 -9
  358. package/src/sap/ui/model/xml/XMLModel.js +70 -41
  359. package/src/sap/ui/model/xml/XMLPropertyBinding.js +4 -4
  360. package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
  361. package/src/sap/ui/performance/trace/Interaction.js +30 -15
  362. package/src/sap/ui/performance/trace/initTraces.js +1 -1
  363. package/src/sap/ui/qunit/QUnitUtils.js +3 -2
  364. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  365. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +9 -11
  366. package/src/sap/ui/test/TestUtils.js +11 -4
  367. package/src/sap/ui/test/actions/Drag.js +6 -2
  368. package/src/sap/ui/test/actions/Drop.js +6 -2
  369. package/src/sap/ui/test/actions/EnterText.js +6 -0
  370. package/src/sap/ui/test/actions/Press.js +6 -0
  371. package/src/sap/ui/test/actions/Scroll.js +6 -0
  372. package/src/sap/ui/test/autowaiter/_resourceWaiter.js +4 -4
  373. package/src/sap/ui/test/launchers/componentLauncher.js +0 -4
  374. package/src/sap/ui/test/matchers/I18NText.js +29 -11
  375. package/src/sap/ui/test/opaQunit.js +5 -0
  376. package/src/sap/ui/thirdparty/crossroads.js +6 -4
  377. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
  378. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
  379. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
  380. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
  381. package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
  382. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
  383. package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
  384. package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
  385. package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
  386. package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
  387. package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
  388. package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
  389. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
  390. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
  391. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
  392. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
  393. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
  394. package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
  395. package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
  396. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
  397. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
  398. package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
  399. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
  400. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
  401. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
  402. package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
  403. package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
  404. package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
  405. package/src/sap/ui/thirdparty/jquery.js +9 -1
  406. package/src/sap/ui/thirdparty/qunit-2.js +1 -1
  407. package/src/sap/ui/thirdparty/qunit.js +1 -1
  408. package/src/sap/ui/util/Mobile.js +2 -20
  409. package/src/sap/ui/util/Storage.js +1 -1
  410. package/src/sap/ui/util/isCrossOriginURL.js +16 -6
  411. package/src/sap-ui-core-nojQuery.js +1 -1
  412. package/src/sap-ui-core.js +1 -1
  413. package/src/sap-ui-debug.js +3 -17
  414. package/ui5.yaml +5 -2
  415. package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
  416. package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
@@ -68,8 +68,8 @@ sap.ui.define([
68
68
  * @author SAP SE
69
69
  * @class Context binding for an OData V4 model.
70
70
  * An event handler can only be attached to this binding for the following events:
71
- * 'AggregatedDataStateChange', 'change', 'dataReceived', 'dataRequested', and
72
- * 'DataStateChange'. For other events, an error is thrown.
71
+ * 'AggregatedDataStateChange', 'change', 'dataReceived', 'dataRequested', 'DataStateChange',
72
+ * 'patchCompleted', and 'patchSent'. For other events, an error is thrown.
73
73
  *
74
74
  * A context binding can also be used as an <i>operation binding</i> to support bound actions,
75
75
  * action imports, bound functions and function imports. If you want to control the execution
@@ -106,7 +106,7 @@ sap.ui.define([
106
106
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
107
107
  * @public
108
108
  * @since 1.37.0
109
- * @version 1.93.3
109
+ * @version 1.96.2
110
110
  *
111
111
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
112
112
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
@@ -114,7 +114,9 @@ sap.ui.define([
114
114
  * @borrows sap.ui.model.odata.v4.ODataBinding#hasPendingChanges as #hasPendingChanges
115
115
  * @borrows sap.ui.model.odata.v4.ODataBinding#isInitial as #isInitial
116
116
  * @borrows sap.ui.model.odata.v4.ODataBinding#refresh as #refresh
117
+ * @borrows sap.ui.model.odata.v4.ODataBinding#requestRefresh as #requestRefresh
117
118
  * @borrows sap.ui.model.odata.v4.ODataBinding#resetChanges as #resetChanges
119
+ * @borrows sap.ui.model.odata.v4.ODataBinding#toString as #toString
118
120
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#attachPatchCompleted as
119
121
  * #attachPatchCompleted
120
122
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#attachPatchSent as #attachPatchSent
@@ -122,13 +124,13 @@ sap.ui.define([
122
124
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#detachPatchCompleted as
123
125
  * #detachPatchCompleted
124
126
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#detachPatchSent as #detachPatchSent
125
- * @borrows sap.ui.model.odata.v4.ODataParentBinding#initialize as #initialize
126
127
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#resume as #resume
127
128
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#suspend as #suspend
128
129
  */
129
130
  var ODataContextBinding = ContextBinding.extend("sap.ui.model.odata.v4.ODataContextBinding", {
130
131
  constructor : function (oModel, sPath, oContext, mParameters) {
131
- var iPos = sPath.indexOf("(...)");
132
+ var iPos = sPath.indexOf("(...)"),
133
+ that = this;
132
134
 
133
135
  ContextBinding.call(this, oModel, sPath);
134
136
  // initialize mixin members
@@ -178,6 +180,13 @@ sap.ui.define([
178
180
  }
179
181
  this.setContext(oContext);
180
182
  oModel.bindingCreated(this);
183
+
184
+ Promise.resolve().then(function () {
185
+ // bInitial must be true initially, but false later. Then suspend on a just
186
+ // created binding causes a change event on resume; otherwise further changes
187
+ // on the suspended binding are required (see doSuspend)
188
+ that.bInitial = false;
189
+ });
181
190
  },
182
191
  metadata : {
183
192
  publicMethods : []
@@ -287,7 +296,7 @@ sap.ui.define([
287
296
  return that.refreshDependentBindings("", oGroupLock.getGroupId(), true);
288
297
  }
289
298
 
290
- oPromise = oMetaModel.fetchObject(oMetaModel.getMetaPath(sResolvedPath) + "/@$ui5.overload")
299
+ oPromise = oMetaModel.fetchObject(_Helper.getMetaPath(sResolvedPath) + "/@$ui5.overload")
291
300
  .then(function (aOperationMetadata) {
292
301
  var fnGetEntity, iIndex, sPath;
293
302
 
@@ -394,7 +403,9 @@ sap.ui.define([
394
403
  this.mParameters = mParameters; // store mParameters at binding after validation
395
404
 
396
405
  if (this.isRootBindingSuspended()) {
397
- this.sResumeChangeReason = ChangeReason.Change;
406
+ if (!this.oOperation) {
407
+ this.sResumeChangeReason = ChangeReason.Change;
408
+ }
398
409
  } else if (!this.oOperation) {
399
410
  this.fetchCache(this.oContext);
400
411
  if (sChangeReason) {
@@ -592,7 +603,7 @@ sap.ui.define([
592
603
  oCache,
593
604
  vEntity = fnGetEntity,
594
605
  oModel = this.oModel,
595
- sMetaPath = oModel.getMetaModel().getMetaPath(sPath) + "/@$ui5.overload/0/$ReturnType",
606
+ sMetaPath = _Helper.getMetaPath(sPath) + "/@$ui5.overload/0/$ReturnType",
596
607
  sOriginalResourcePath = sPath.slice(1),
597
608
  oRequestor = oModel.oRequestor,
598
609
  that = this;
@@ -625,18 +636,18 @@ sap.ui.define([
625
636
  * @throws {Error} If <code>fnOnStrictHandlingFailed</code> does not return a promise
626
637
  */
627
638
  function onStrictHandling(oError) {
628
- var oRawMessages, oResult;
639
+ var oResult;
629
640
 
630
641
  _Helper.adjustTargetsInError(oError, oOperationMetadata,
631
642
  that.oParameterContext.getPath(),
632
643
  that.bRelative ? that.oContext.getPath() : undefined);
633
644
  oError.error.$ignoreTopLevel = true;
634
- oRawMessages = _Helper.extractMessages(oError);
635
645
 
636
646
  oResult = fnOnStrictHandlingFailed(
637
- oRawMessages.bound.concat(oRawMessages.unbound).map(function (oRawMessage) {
647
+ _Helper.extractMessages(oError).map(function (oRawMessage) {
638
648
  return that.oModel.createUI5Message(oRawMessage);
639
- }));
649
+ })
650
+ );
640
651
 
641
652
  if (!(oResult instanceof Promise)) {
642
653
  throw new Error("Not a promise: " + oResult);
@@ -705,7 +716,6 @@ sap.ui.define([
705
716
  this.oReturnValueContext = undefined;
706
717
  }
707
718
  this.oModel.bindingDestroyed(this);
708
- this.mCacheByResourcePath = undefined;
709
719
  this.oOperation = undefined;
710
720
  this.mParameters = undefined;
711
721
  this.mQueryOptions = undefined;
@@ -764,6 +774,17 @@ sap.ui.define([
764
774
  }
765
775
  };
766
776
 
777
+ /**
778
+ * @override
779
+ * @see sap.ui.model.odata.v4.ODataParentBinding#doSuspend
780
+ */
781
+ ODataContextBinding.prototype.doSuspend = function () {
782
+ if (this.bInitial && !this.oOperation) {
783
+ // if the binding is still initial, it must fire an event in resume
784
+ this.sResumeChangeReason = ChangeReason.Change;
785
+ }
786
+ };
787
+
767
788
  /**
768
789
  * Calls the OData operation that corresponds to this operation binding.
769
790
  *
@@ -894,6 +915,7 @@ sap.ui.define([
894
915
  return oCachePromise.then(function (oCache) {
895
916
  var bDataRequested = false,
896
917
  oGroupLock,
918
+ sResolvedPath = that.getResolvedPath(),
897
919
  sRelativePath = oCache || that.oOperation
898
920
  ? that.getRelativePath(sPath)
899
921
  : undefined,
@@ -944,7 +966,7 @@ sap.ui.define([
944
966
  }, function (oError) {
945
967
  oGroupLock.unlock(true);
946
968
  if (bDataRequested) {
947
- that.oModel.reportError("Failed to read path " + that.sPath, sClassName,
969
+ that.oModel.reportError("Failed to read path " + sResolvedPath, sClassName,
948
970
  oError);
949
971
  that.fireDataReceived(oError.canceled ? {data : {}} : {error : oError});
950
972
  }
@@ -1010,7 +1032,9 @@ sap.ui.define([
1010
1032
  mQueryOptions = Object.assign({}, mQueryOptions);
1011
1033
  // keep $select before $expand
1012
1034
  if ("$select" in mInheritableQueryOptions) {
1013
- mQueryOptions.$select = mInheritableQueryOptions.$select;
1035
+ // avoid that this.mQueryOptions.$select is modified
1036
+ mQueryOptions.$select = mQueryOptions.$select && mQueryOptions.$select.slice();
1037
+ _Helper.addToSelect(mQueryOptions, mInheritableQueryOptions.$select);
1014
1038
  }
1015
1039
  if ("$expand" in mInheritableQueryOptions) {
1016
1040
  mQueryOptions.$expand = mInheritableQueryOptions.$expand;
@@ -1078,17 +1102,17 @@ sap.ui.define([
1078
1102
  * @private
1079
1103
  */
1080
1104
  ODataContextBinding.prototype.hasReturnValueContext = function (oMetadata) {
1081
- var oMetaModel = this.oModel.getMetaModel(),
1082
- aMetaSegments;
1105
+ var aMetaSegments;
1083
1106
 
1084
1107
  if (!this.isReturnValueLikeBindingParameter(oMetadata)) {
1085
1108
  return false;
1086
1109
  }
1087
1110
 
1088
- aMetaSegments = oMetaModel.getMetaPath(this.getResolvedPath()).split("/");
1111
+ aMetaSegments = _Helper.getMetaPath(this.getResolvedPath()).split("/");
1089
1112
 
1113
+ // case 4b
1090
1114
  return aMetaSegments.length === 3
1091
- && oMetaModel.getObject("/" + aMetaSegments[1]).$kind === "EntitySet"; // case 4b
1115
+ && this.oModel.getMetaModel().getObject("/" + aMetaSegments[1]).$kind === "EntitySet";
1092
1116
  };
1093
1117
 
1094
1118
  /**
@@ -1101,12 +1125,11 @@ sap.ui.define([
1101
1125
  */
1102
1126
  // @override sap.ui.model.Binding#initialize
1103
1127
  ODataContextBinding.prototype.initialize = function () {
1104
- if (this.isResolved()) {
1105
- if (this.getRootBinding().isSuspended()) {
1106
- this.sResumeChangeReason = ChangeReason.Change;
1107
- } else {
1108
- this._fireChange({reason : ChangeReason.Change});
1109
- }
1128
+ this.bInitial = false;
1129
+ // Here no other code but the event for the ManagedObject is expected. The binding should be
1130
+ // useable for controller code without calling initialize.
1131
+ if (this.isResolved() && !this.getRootBinding().isSuspended()) {
1132
+ this._fireChange({reason : ChangeReason.Change});
1110
1133
  }
1111
1134
  };
1112
1135
 
@@ -1137,6 +1160,52 @@ sap.ui.define([
1137
1160
  && !oMetadata.$EntitySetPath.includes("/"); // case 3
1138
1161
  };
1139
1162
 
1163
+ /**
1164
+ * Moves the bound entity into the given list binding. This binding loses its data. The method
1165
+ * may only be called when this binding has finished loading. You can verify this by calling
1166
+ * <code>oBinding.getBoundContext().requestObject()</code>. If that promise resolves, the
1167
+ * binding has finished loading.
1168
+ *
1169
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oListBinding
1170
+ * The list binding to take the entity
1171
+ * @throws {Error}
1172
+ * If
1173
+ * <ul>
1174
+ * <li> this binding is not a root binding,
1175
+ * <li> this binding has not finished loading yet,
1176
+ * <li> not all key properties of the bound entity have been selected (so that it is
1177
+ * impossible to determine its key predicate),
1178
+ * <li> the bound entity is not an entity of the list binding's collection,
1179
+ * <li> this binding is an operation binding,
1180
+ * <li> this binding has pending changes (see {@link #hasPendingChanges}),
1181
+ * <li> this binding has a <code>$expand</code> to a collection or a dependent list binding
1182
+ * without <code>$$ownRequest</code>,
1183
+ * <li> the list binding is not suspended,
1184
+ * <li> the list binding is relative and does not use the <code>$$ownRequest</code>
1185
+ * parameter (see {@link sap.ui.model.odata.v4.ODataModel#bindList}).
1186
+ * <li> the list binding uses data aggregation
1187
+ * (@see sap.ui.model.odata.v4.ODataListBinding#setAggregation)
1188
+ * </ul>
1189
+ *
1190
+ * @experimental
1191
+ * @public
1192
+ * @since 1.95.0
1193
+ */
1194
+ ODataContextBinding.prototype.moveEntityTo = function (oListBinding) {
1195
+ if (!this.isRoot()) {
1196
+ throw new Error(this + ": must be a root binding");
1197
+ }
1198
+ if (this.oOperation) {
1199
+ throw new Error(this + ": must not be an operation binding");
1200
+ }
1201
+ if (this.hasPendingChanges()) {
1202
+ throw new Error(this + ": has pending changes");
1203
+ }
1204
+
1205
+ oListBinding.moveEntityHere(this.oElementContext);
1206
+ this.oElementContext = null;
1207
+ };
1208
+
1140
1209
  /**
1141
1210
  * @override
1142
1211
  * @see sap.ui.model.odata.v4.ODataBinding#refreshInternal
@@ -1183,7 +1252,7 @@ sap.ui.define([
1183
1252
  if (bKeepCacheOnError && oPromise) {
1184
1253
  oPromise = oPromise.catch(function (oError) {
1185
1254
  return that.fetchResourcePath(that.oContext).then(function (sResourcePath) {
1186
- if (!that.bRelative || oCache.$resourcePath === sResourcePath) {
1255
+ if (!that.bRelative || oCache.getResourcePath() === sResourcePath) {
1187
1256
  that.oCache = oCache;
1188
1257
  that.oCachePromise = SyncPromise.resolve(oCache);
1189
1258
  oCache.setActive(true);
@@ -1328,23 +1397,31 @@ sap.ui.define([
1328
1397
  * @see sap.ui.model.odata.v4.ODataParentBinding#resumeInternal
1329
1398
  */
1330
1399
  ODataContextBinding.prototype.resumeInternal = function (bCheckUpdate, bParentHasChanges) {
1331
- var sResumeChangeReason = this.sResumeChangeReason;
1332
-
1333
- this.sResumeChangeReason = undefined;
1400
+ var sResumeChangeReason = this.sResumeChangeReason,
1401
+ that = this;
1334
1402
 
1335
- if (!this.oOperation) {
1336
- if (bParentHasChanges || sResumeChangeReason) {
1337
- this.mAggregatedQueryOptions = {};
1338
- this.bAggregatedQueryOptionsInitial = true;
1339
- this.removeCachesAndMessages("");
1340
- this.fetchCache(this.oContext);
1341
- }
1342
- this.getDependentBindings().forEach(function (oDependentBinding) {
1403
+ function resumeDependents() {
1404
+ that.getDependentBindings().forEach(function (oDependentBinding) {
1343
1405
  oDependentBinding.resumeInternal(bCheckUpdate, !!sResumeChangeReason);
1344
1406
  });
1345
- if (sResumeChangeReason) {
1346
- this._fireChange({reason : sResumeChangeReason});
1347
- }
1407
+ }
1408
+
1409
+ this.sResumeChangeReason = undefined;
1410
+
1411
+ if (this.oOperation) {
1412
+ resumeDependents();
1413
+ return;
1414
+ }
1415
+
1416
+ if (bParentHasChanges || sResumeChangeReason) {
1417
+ this.mAggregatedQueryOptions = {};
1418
+ this.bAggregatedQueryOptionsInitial = true;
1419
+ this.removeCachesAndMessages("");
1420
+ this.fetchCache(this.oContext);
1421
+ }
1422
+ resumeDependents();
1423
+ if (sResumeChangeReason) {
1424
+ this._fireChange({reason : sResumeChangeReason});
1348
1425
  }
1349
1426
  };
1350
1427
 
@@ -68,21 +68,24 @@ sap.ui.define([
68
68
  * @author SAP SE
69
69
  * @class List binding for an OData V4 model.
70
70
  * An event handler can only be attached to this binding for the following events:
71
- * 'AggregatedDataStateChange', 'change', 'dataReceived', 'dataRequested', 'DataStateChange'
72
- * and 'refresh'. For other events, an error is thrown.
71
+ * 'AggregatedDataStateChange', 'change', 'createCompleted', 'createSent', 'dataReceived',
72
+ * 'dataRequested', 'DataStateChange', 'patchCompleted', 'patchSent', and 'refresh'. For
73
+ * other events, an error is thrown.
73
74
  * @extends sap.ui.model.ListBinding
74
75
  * @hideconstructor
75
76
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
76
77
  * @public
77
78
  * @since 1.37.0
78
- * @version 1.93.3
79
+ * @version 1.96.2
79
80
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
80
81
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
81
82
  * @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
82
83
  * @borrows sap.ui.model.odata.v4.ODataBinding#hasPendingChanges as #hasPendingChanges
83
84
  * @borrows sap.ui.model.odata.v4.ODataBinding#isInitial as #isInitial
84
85
  * @borrows sap.ui.model.odata.v4.ODataBinding#refresh as #refresh
86
+ * @borrows sap.ui.model.odata.v4.ODataBinding#requestRefresh as #requestRefresh
85
87
  * @borrows sap.ui.model.odata.v4.ODataBinding#resetChanges as #resetChanges
88
+ * @borrows sap.ui.model.odata.v4.ODataBinding#toString as #toString
86
89
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#attachPatchCompleted as
87
90
  * #attachPatchCompleted
88
91
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#attachPatchSent as #attachPatchSent
@@ -90,7 +93,6 @@ sap.ui.define([
90
93
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#detachPatchCompleted as
91
94
  * #detachPatchCompleted
92
95
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#detachPatchSent as #detachPatchSent
93
- * @borrows sap.ui.model.odata.v4.ODataParentBinding#initialize as #initialize
94
96
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#resume as #resume
95
97
  * @borrows sap.ui.model.odata.v4.ODataParentBinding#suspend as #suspend
96
98
  */
@@ -1509,6 +1511,22 @@ sap.ui.define([
1509
1511
  * <code>false</code>. This property has to be set on each filter, it is not inherited from a
1510
1512
  * multi-filter.
1511
1513
  *
1514
+ * <h4>Application and Control Filters</h4>
1515
+ * Each list binding maintains two separate lists of filters, one for filters defined by the
1516
+ * control that owns the binding, and another list for filters that an application can define in
1517
+ * addition. When executing the filter operation, both sets of filters are combined.
1518
+ *
1519
+ * By using the <code>sFilterType</code> parameter of the <code>filter</code> method, the
1520
+ * caller can control which set of filters is modified.
1521
+ *
1522
+ * <h4>Auto-Grouping of Filters</h4>
1523
+ * Filters are first grouped according to their binding path. All filters belonging to the same
1524
+ * path are ORed, and after that the results of all paths are ANDed. Usually this means that all
1525
+ * filters applied to the same property are ORed, while filters on different properties are
1526
+ * ANDed.
1527
+ * Please use either the automatic grouping of filters (where applicable) or explicit
1528
+ * AND/OR filters, as a mixture of both is not supported.
1529
+ *
1512
1530
  * @param {sap.ui.model.Filter|sap.ui.model.Filter[]} [vFilters]
1513
1531
  * The dynamic filters to be used; replaces the dynamic filters given in
1514
1532
  * {@link sap.ui.model.odata.v4.ODataModel#bindList}.
@@ -2239,6 +2257,63 @@ sap.ui.define([
2239
2257
  return this.bLengthFinal;
2240
2258
  };
2241
2259
 
2260
+ /**
2261
+ * Makes the given context a row context of this binding. Adds the entity data to the cache.
2262
+ * Makes the context kept-alive.
2263
+ *
2264
+ * @param {sap.ui.model.odata.v4.Context} oEntityContext
2265
+ * A context pointing to an entity
2266
+ * @throws {Error}
2267
+ * If the binding is not suspended, setKeepAlive is not possible, the resource paths do not
2268
+ * match, the entity's key predicate is unknown, the context binding's $expand contains
2269
+ * collections, or the context binding is still reading
2270
+ *
2271
+ * @private
2272
+ */
2273
+ ODataListBinding.prototype.moveEntityHere = function (oEntityContext) {
2274
+ var oEntity,
2275
+ oEntityFetchValuePromise,
2276
+ sEntityPath = oEntityContext.getPath(),
2277
+ mEntityQueryOptions = oEntityContext.getBinding().getInheritableQueryOptions(),
2278
+ sRelativePath = _Helper.getRelativePath(sEntityPath, this.oHeaderContext.getPath());
2279
+
2280
+ if (!sRelativePath || sRelativePath.includes("/")) {
2281
+ throw new Error(this + ": " + sEntityPath + " is not an entity of the collection");
2282
+ }
2283
+ if (!this.getRootBinding().isSuspended()) {
2284
+ throw new Error(this + ": must be suspended");
2285
+ }
2286
+ this.checkKeepAlive(oEntityContext);
2287
+
2288
+ // take the value from the context binding's cache
2289
+ oEntityFetchValuePromise = oEntityContext.fetchValue(null, null, /*bCached*/true);
2290
+ if (oEntityFetchValuePromise.isPending()) {
2291
+ throw new Error("Cannot move the entity; the context binding has not finished loading: "
2292
+ + oEntityContext.getBinding());
2293
+ }
2294
+ oEntity = oEntityFetchValuePromise.getResult();
2295
+
2296
+ if (!_Helper.getPrivateAnnotation(oEntity, "predicate")) {
2297
+ throw new Error("No key predicate known at " + sEntityPath);
2298
+ }
2299
+
2300
+ // add the context binding's query options as late query options
2301
+ if (!this.aggregateQueryOptions(mEntityQueryOptions, "", /*bImmutable*/true)) {
2302
+ throw new Error(oEntityContext + ": could not move the entity. Probably a list binding"
2303
+ + " w/o $$ownRequest depends on it");
2304
+ }
2305
+
2306
+ this.getRootBinding().resume();
2307
+ oEntityContext.oBinding = this;
2308
+ this.mPreviousContextsByPath[sEntityPath] = oEntityContext;
2309
+ this.oCachePromise.then(function (oCache) {
2310
+ oCache.addKeptElement(oEntity);
2311
+ // setKeepAlive looks into the cache, so this had to wait
2312
+ oEntityContext.setKeepAlive(true);
2313
+ oEntityContext.checkUpdate(); // create listeners in this binding's cache
2314
+ });
2315
+ };
2316
+
2242
2317
  /**
2243
2318
  * @override
2244
2319
  * @see sap.ui.model.odata.v4.ODataBinding#refreshInternal
@@ -2255,6 +2330,9 @@ sap.ui.define([
2255
2330
  // calls refreshInternal on all given bindings and returns an array of promises
2256
2331
  function refreshAll(aBindings) {
2257
2332
  return aBindings.map(function (oBinding) {
2333
+ if (oBinding.bIsBeingDestroyed) {
2334
+ return;
2335
+ }
2258
2336
  // Call refreshInternal with bCheckUpdate = false because property bindings
2259
2337
  // should not check for updates yet, otherwise they will cause a "Failed to
2260
2338
  // drill down..." when the row is no longer part of the collection. They get
@@ -2289,7 +2367,7 @@ sap.ui.define([
2289
2367
  throw oError;
2290
2368
  }
2291
2369
  return that.fetchResourcePath(that.oContext).then(function (sResourcePath) {
2292
- if (!that.bRelative || oCache.$resourcePath === sResourcePath) {
2370
+ if (!that.bRelative || oCache.getResourcePath() === sResourcePath) {
2293
2371
  that.oCache = oCache;
2294
2372
  that.oCachePromise = SyncPromise.resolve(oCache);
2295
2373
  that.iCreatedContexts = iCreatedContexts;
@@ -2564,7 +2642,7 @@ sap.ui.define([
2564
2642
  return Promise.resolve(null);
2565
2643
  }
2566
2644
 
2567
- sMetaPath = oMetaModel.getMetaPath(sResolvedPath);
2645
+ sMetaPath = _Helper.getMetaPath(sResolvedPath);
2568
2646
  return oMetaModel.requestObject(sMetaPath + "/").then(function (oEntityType) {
2569
2647
  var aFilters,
2570
2648
  mPredicates = {};
@@ -2599,8 +2677,7 @@ sap.ui.define([
2599
2677
  * @see sap.ui.model.odata.v4.ODataParentBinding#requestSideEffects
2600
2678
  */
2601
2679
  ODataListBinding.prototype.requestSideEffects = function (sGroupId, aPaths, oContext) {
2602
- var bAllContextsTransient,
2603
- aContexts,
2680
+ var aContexts,
2604
2681
  bMissingPredicate,
2605
2682
  oModel = this.oModel,
2606
2683
  // Hash set of collection-valued navigation property meta paths (relative to the cache's
@@ -2681,13 +2758,8 @@ sap.ui.define([
2681
2758
  if (bSingle) {
2682
2759
  return this.refreshSingle(oContext, this.lockGroup(sGroupId), false);
2683
2760
  }
2684
- if (this.aContexts.length) {
2685
- bAllContextsTransient = this.aContexts.every(function (oContext) {
2686
- return oContext.isTransient();
2687
- });
2688
- if (bAllContextsTransient) {
2689
- return SyncPromise.resolve();
2690
- }
2761
+ if (this.iCurrentEnd === 0) {
2762
+ return SyncPromise.resolve();
2691
2763
  }
2692
2764
  return this.refreshInternal("", sGroupId, false, true);
2693
2765
  };
@@ -2954,6 +3026,14 @@ sap.ui.define([
2954
3026
  && !this.mParameters.$$aggregation) {
2955
3027
  this.sChangeReason = "AddVirtualContext"; // JIRA: CPOUI5ODATAV4-848
2956
3028
  }
3029
+ if (oContext.getBinding
3030
+ && oContext.getBinding().getRootBinding().isSuspended()) {
3031
+ // when becoming suspended, remain silent until resume
3032
+ this.oContext = oContext;
3033
+ this.setResumeChangeReason(ChangeReason.Context);
3034
+
3035
+ return;
3036
+ }
2957
3037
  }
2958
3038
  // call Binding#setContext because of data state etc.; fires "change"
2959
3039
  Binding.prototype.setContext.call(this, oContext,