@openui5/sap.ui.core 1.94.0 → 1.97.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 (417) hide show
  1. package/.eslintrc.json +15 -4
  2. package/.reuse/dep5 +12 -12
  3. package/THIRDPARTY.txt +21 -17
  4. package/package.json +1 -1
  5. package/src/jquery.sap.global.js +1 -1
  6. package/src/jquery.sap.properties.js +1 -1
  7. package/src/jquery.sap.resources.js +2 -2
  8. package/src/jquery.sap.script.js +1 -1
  9. package/src/jquery.sap.storage.js +3 -3
  10. package/src/sap/base/i18n/ResourceBundle.js +6 -2
  11. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  12. package/src/sap/base/util/restricted/_castArray.js +1 -1
  13. package/src/sap/base/util/restricted/_compact.js +1 -1
  14. package/src/sap/base/util/restricted/_curry.js +1 -1
  15. package/src/sap/base/util/restricted/_debounce.js +1 -1
  16. package/src/sap/base/util/restricted/_difference.js +1 -1
  17. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  18. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  19. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  20. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  21. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  22. package/src/sap/base/util/restricted/_flatten.js +1 -1
  23. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  24. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  25. package/src/sap/base/util/restricted/_intersection.js +1 -1
  26. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  27. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  28. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  29. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  30. package/src/sap/base/util/restricted/_isNil.js +1 -1
  31. package/src/sap/base/util/restricted/_max.js +1 -1
  32. package/src/sap/base/util/restricted/_merge.js +1 -1
  33. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  34. package/src/sap/base/util/restricted/_min.js +1 -1
  35. package/src/sap/base/util/restricted/_omit.js +1 -1
  36. package/src/sap/base/util/restricted/_pick.js +1 -1
  37. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  38. package/src/sap/base/util/restricted/_throttle.js +1 -1
  39. package/src/sap/base/util/restricted/_toArray.js +1 -1
  40. package/src/sap/base/util/restricted/_union.js +1 -1
  41. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  42. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  43. package/src/sap/base/util/restricted/_uniq.js +1 -1
  44. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  45. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  46. package/src/sap/base/util/restricted/_without.js +1 -1
  47. package/src/sap/base/util/restricted/_xor.js +1 -1
  48. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  49. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  50. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  51. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  52. package/src/sap/ui/Device.js +15 -11
  53. package/src/sap/ui/Global.js +13 -17
  54. package/src/sap/ui/base/DataType.js +14 -8
  55. package/src/sap/ui/base/Event.js +1 -1
  56. package/src/sap/ui/base/EventProvider.js +1 -1
  57. package/src/sap/ui/base/Interface.js +1 -1
  58. package/src/sap/ui/base/ManagedObject.js +13 -8
  59. package/src/sap/ui/base/ManagedObjectMetadata.js +2 -2
  60. package/src/sap/ui/base/Metadata.js +1 -3
  61. package/src/sap/ui/base/Object.js +1 -1
  62. package/src/sap/ui/base/ObjectPool.js +1 -1
  63. package/src/sap/ui/core/.library +6 -32
  64. package/src/sap/ui/core/AppCacheBuster.js +8 -8
  65. package/src/sap/ui/core/BusyIndicator.js +1 -1
  66. package/src/sap/ui/core/Component.js +303 -135
  67. package/src/sap/ui/core/ComponentContainer.js +11 -7
  68. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  69. package/src/sap/ui/core/ComponentSupport.js +1 -1
  70. package/src/sap/ui/core/Configuration.js +67 -31
  71. package/src/sap/ui/core/Control.js +2 -2
  72. package/src/sap/ui/core/Core.js +79 -15
  73. package/src/sap/ui/core/CustomData.js +1 -1
  74. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  75. package/src/sap/ui/core/Element.js +2 -6
  76. package/src/sap/ui/core/ElementMetadata.js +1 -1
  77. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  78. package/src/sap/ui/core/EventBus.js +1 -1
  79. package/src/sap/ui/core/ExtensionPoint.js +6 -13
  80. package/src/sap/ui/core/Fragment.js +30 -32
  81. package/src/sap/ui/core/HTML.js +3 -3
  82. package/src/sap/ui/core/History.js +1 -1
  83. package/src/sap/ui/core/Icon.js +7 -8
  84. package/src/sap/ui/core/IconPool.js +26 -1097
  85. package/src/sap/ui/core/IconRenderer.js +6 -6
  86. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  87. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  88. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  89. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  90. package/src/sap/ui/core/InvisibleText.js +1 -1
  91. package/src/sap/ui/core/Item.js +1 -1
  92. package/src/sap/ui/core/LabelEnablement.js +1 -1
  93. package/src/sap/ui/core/LayoutData.js +1 -1
  94. package/src/sap/ui/core/ListItem.js +1 -1
  95. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  96. package/src/sap/ui/core/Locale.js +26 -4
  97. package/src/sap/ui/core/LocaleData.js +3 -3
  98. package/src/sap/ui/core/Manifest.js +2 -60
  99. package/src/sap/ui/core/Message.js +1 -1
  100. package/src/sap/ui/core/Patcher.js +27 -3
  101. package/src/sap/ui/core/Placeholder.js +4 -4
  102. package/src/sap/ui/core/RenderManager.js +38 -8
  103. package/src/sap/ui/core/Renderer.js +13 -3
  104. package/src/sap/ui/core/ResizeHandler.js +1 -1
  105. package/src/sap/ui/core/ScrollBar.js +4 -3
  106. package/src/sap/ui/core/SeparatorItem.js +1 -1
  107. package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
  108. package/src/sap/ui/core/ThemeCheck.js +2 -2
  109. package/src/sap/ui/core/Title.js +1 -1
  110. package/src/sap/ui/core/TooltipBase.js +1 -1
  111. package/src/sap/ui/core/UIArea.js +3 -3
  112. package/src/sap/ui/core/UIComponent.js +19 -11
  113. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  114. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  115. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  116. package/src/sap/ui/core/XMLComposite.js +2 -2
  117. package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
  118. package/src/sap/ui/core/XMLTemplateProcessor.js +132 -43
  119. package/src/sap/ui/core/_IconRegistry.js +1148 -0
  120. package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
  121. package/src/sap/ui/core/date/UniversalDateUtils.js +33 -0
  122. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  123. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  124. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  125. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  126. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  127. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  128. package/src/sap/ui/core/format/NumberFormat.js +16 -1
  129. package/src/sap/ui/core/hyphenation/Hyphenation.js +61 -80
  130. package/src/sap/ui/core/library.js +5 -5
  131. package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
  132. package/src/sap/ui/core/message/Message.js +1 -1
  133. package/src/sap/ui/core/message/MessageManager.js +13 -15
  134. package/src/sap/ui/core/message/MessageParser.js +1 -1
  135. package/src/sap/ui/core/message/MessageProcessor.js +22 -12
  136. package/src/sap/ui/core/messagebundle_de.properties +1 -1
  137. package/src/sap/ui/core/messagebundle_fr.properties +8 -8
  138. package/src/sap/ui/core/messagebundle_it.properties +1 -1
  139. package/src/sap/ui/core/messagebundle_pl.properties +1 -1
  140. package/src/sap/ui/core/messagebundle_ru.properties +21 -21
  141. package/src/sap/ui/core/messagebundle_th.properties +2 -2
  142. package/src/sap/ui/core/mvc/Controller.js +5 -5
  143. package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
  144. package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
  145. package/src/sap/ui/core/mvc/HTMLView.js +2 -2
  146. package/src/sap/ui/core/mvc/JSONView.js +2 -2
  147. package/src/sap/ui/core/mvc/JSView.js +2 -2
  148. package/src/sap/ui/core/mvc/TemplateView.js +2 -2
  149. package/src/sap/ui/core/mvc/View.js +58 -85
  150. package/src/sap/ui/core/mvc/XMLView.js +2 -2
  151. package/src/sap/ui/core/mvc/XMLViewRenderer.js +17 -20
  152. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  153. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  154. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  155. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  156. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  157. package/src/sap/ui/core/routing/Route.js +10 -1
  158. package/src/sap/ui/core/routing/Router.js +16 -6
  159. package/src/sap/ui/core/routing/Targets.js +26 -0
  160. package/src/sap/ui/core/routing/async/Route.js +6 -3
  161. package/src/sap/ui/core/routing/async/Target.js +28 -4
  162. package/src/sap/ui/core/routing/sync/Target.js +15 -0
  163. package/src/sap/ui/core/rules/Misc.support.js +51 -1
  164. package/src/sap/ui/core/rules/Rendering.support.js +1 -4
  165. package/src/sap/ui/core/rules/View.support.js +14 -46
  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/Plugin.js +2 -2
  172. package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
  173. package/src/sap/ui/core/support/Support.js +1 -1
  174. package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
  175. package/src/sap/ui/core/support/plugins/ControlTree.js +37 -43
  176. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  177. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  178. package/src/sap/ui/core/support/plugins/Performance.js +1 -2
  179. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  180. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  181. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  182. package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
  183. package/src/sap/ui/core/support/support.css +2 -8
  184. package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
  185. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +150 -73
  186. package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
  187. package/src/sap/ui/core/themes/base/Icon.less +9 -0
  188. package/src/sap/ui/core/themes/base/SAP-icons.css +2 -0
  189. package/src/sap/ui/core/themes/base/SAP-icons.less +10 -0
  190. package/src/sap/ui/core/themes/base/base.less +543 -390
  191. package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
  192. package/src/sap/ui/core/themes/base/global.less +38 -0
  193. package/src/sap/ui/core/themes/base/library.source.less +1 -2
  194. package/src/sap/ui/core/themes/sap_hcb/global.less +34 -0
  195. package/src/sap/ui/core/theming/Parameters.js +21 -0
  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 +1 -1
  200. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  201. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  202. package/src/sap/ui/core/util/Export.js +1 -1
  203. package/src/sap/ui/core/util/ExportCell.js +1 -1
  204. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  205. package/src/sap/ui/core/util/ExportRow.js +1 -1
  206. package/src/sap/ui/core/util/ExportType.js +1 -1
  207. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  208. package/src/sap/ui/core/util/File.js +1 -1
  209. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  210. package/src/sap/ui/core/util/MockServer.js +2 -2
  211. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  212. package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
  213. package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +10 -12
  214. package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +6 -3
  215. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  216. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  217. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  218. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  219. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  220. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  221. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  222. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  223. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  224. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  225. package/src/sap/ui/debug/ControlTree.js +1 -1
  226. package/src/sap/ui/debug/DebugEnv.js +1 -1
  227. package/src/sap/ui/debug/Highlighter.js +8 -2
  228. package/src/sap/ui/debug/PropertyList.js +1 -1
  229. package/src/sap/ui/model/Binding.js +174 -118
  230. package/src/sap/ui/model/ChangeReason.js +1 -1
  231. package/src/sap/ui/model/ClientContextBinding.js +1 -1
  232. package/src/sap/ui/model/ClientListBinding.js +8 -3
  233. package/src/sap/ui/model/ClientModel.js +9 -8
  234. package/src/sap/ui/model/ClientPropertyBinding.js +4 -2
  235. package/src/sap/ui/model/ClientTreeBinding.js +15 -9
  236. package/src/sap/ui/model/ClientTreeBindingAdapter.js +28 -23
  237. package/src/sap/ui/model/CompositeBinding.js +98 -77
  238. package/src/sap/ui/model/CompositeDataState.js +2 -2
  239. package/src/sap/ui/model/CompositeType.js +2 -2
  240. package/src/sap/ui/model/Context.js +4 -2
  241. package/src/sap/ui/model/ContextBinding.js +6 -14
  242. package/src/sap/ui/model/DataState.js +2 -2
  243. package/src/sap/ui/model/Filter.js +255 -53
  244. package/src/sap/ui/model/FilterOperator.js +1 -1
  245. package/src/sap/ui/model/FilterProcessor.js +27 -17
  246. package/src/sap/ui/model/FilterType.js +1 -1
  247. package/src/sap/ui/model/ListBinding.js +200 -118
  248. package/src/sap/ui/model/MetaModel.js +4 -9
  249. package/src/sap/ui/model/Model.js +349 -303
  250. package/src/sap/ui/model/PropertyBinding.js +92 -58
  251. package/src/sap/ui/model/SelectionModel.js +2 -2
  252. package/src/sap/ui/model/SimpleType.js +2 -2
  253. package/src/sap/ui/model/Sorter.js +1 -1
  254. package/src/sap/ui/model/SorterProcessor.js +1 -1
  255. package/src/sap/ui/model/StaticBinding.js +1 -1
  256. package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
  257. package/src/sap/ui/model/TreeBinding.js +1 -1
  258. package/src/sap/ui/model/TreeBindingAdapter.js +249 -100
  259. package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
  260. package/src/sap/ui/model/TreeBindingUtils.js +3 -0
  261. package/src/sap/ui/model/Type.js +1 -1
  262. package/src/sap/ui/model/analytics/AnalyticalBinding.js +20 -10
  263. package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +17 -19
  264. package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
  265. package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
  266. package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
  267. package/src/sap/ui/model/analytics/odata4analytics.js +3 -2
  268. package/src/sap/ui/model/base/ManagedObjectModel.js +4 -0
  269. package/src/sap/ui/model/json/JSONListBinding.js +8 -5
  270. package/src/sap/ui/model/json/JSONModel.js +29 -20
  271. package/src/sap/ui/model/json/JSONPropertyBinding.js +5 -4
  272. package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
  273. package/src/sap/ui/model/message/MessageListBinding.js +6 -3
  274. package/src/sap/ui/model/message/MessageModel.js +25 -17
  275. package/src/sap/ui/model/message/MessagePropertyBinding.js +3 -3
  276. package/src/sap/ui/model/odata/AnnotationHelper.js +3 -3
  277. package/src/sap/ui/model/odata/AnnotationParser.js +5 -3
  278. package/src/sap/ui/model/odata/CountMode.js +1 -1
  279. package/src/sap/ui/model/odata/Filter.js +1 -1
  280. package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
  281. package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
  282. package/src/sap/ui/model/odata/ODataListBinding.js +62 -39
  283. package/src/sap/ui/model/odata/ODataMessageParser.js +3 -3
  284. package/src/sap/ui/model/odata/ODataMetaModel.js +6 -4
  285. package/src/sap/ui/model/odata/ODataMetadata.js +137 -86
  286. package/src/sap/ui/model/odata/ODataModel.js +443 -216
  287. package/src/sap/ui/model/odata/ODataPropertyBinding.js +8 -6
  288. package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
  289. package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +28 -18
  290. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +442 -262
  291. package/src/sap/ui/model/odata/ODataUtils.js +36 -19
  292. package/src/sap/ui/model/odata/OperationMode.js +1 -1
  293. package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +2 -1
  294. package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +11 -9
  295. package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +6 -4
  296. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  297. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  298. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  299. package/src/sap/ui/model/odata/type/Date.js +1 -1
  300. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  301. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  302. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  303. package/src/sap/ui/model/odata/type/Decimal.js +5 -1
  304. package/src/sap/ui/model/odata/type/Double.js +1 -1
  305. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  306. package/src/sap/ui/model/odata/type/Int.js +1 -1
  307. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  308. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  309. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  310. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  311. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  312. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  313. package/src/sap/ui/model/odata/type/Single.js +1 -1
  314. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  315. package/src/sap/ui/model/odata/type/String.js +1 -1
  316. package/src/sap/ui/model/odata/type/Time.js +1 -1
  317. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  318. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  319. package/src/sap/ui/model/odata/type/UnitMixin.js +0 -1
  320. package/src/sap/ui/model/odata/v2/Context.js +98 -17
  321. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +2 -2
  322. package/src/sap/ui/model/odata/v2/ODataContextBinding.js +1 -1
  323. package/src/sap/ui/model/odata/v2/ODataListBinding.js +416 -132
  324. package/src/sap/ui/model/odata/v2/ODataModel.js +465 -250
  325. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +191 -109
  326. package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +179 -0
  327. package/src/sap/ui/model/odata/v4/Context.js +48 -7
  328. package/src/sap/ui/model/odata/v4/ODataBinding.js +60 -30
  329. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +177 -53
  330. package/src/sap/ui/model/odata/v4/ODataListBinding.js +304 -91
  331. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +32 -20
  332. package/src/sap/ui/model/odata/v4/ODataModel.js +29 -15
  333. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +83 -51
  334. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +13 -9
  335. package/src/sap/ui/model/odata/v4/lib/_Cache.js +115 -19
  336. package/src/sap/ui/model/odata/v4/lib/_Helper.js +35 -5
  337. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +50 -5
  338. package/src/sap/ui/model/resource/ResourceModel.js +6 -2
  339. package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
  340. package/src/sap/ui/model/type/Boolean.js +2 -2
  341. package/src/sap/ui/model/type/Currency.js +2 -2
  342. package/src/sap/ui/model/type/Date.js +9 -3
  343. package/src/sap/ui/model/type/DateInterval.js +4 -2
  344. package/src/sap/ui/model/type/DateTime.js +2 -2
  345. package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
  346. package/src/sap/ui/model/type/FileSize.js +4 -2
  347. package/src/sap/ui/model/type/Float.js +4 -2
  348. package/src/sap/ui/model/type/Integer.js +4 -2
  349. package/src/sap/ui/model/type/String.js +2 -2
  350. package/src/sap/ui/model/type/Time.js +2 -2
  351. package/src/sap/ui/model/type/TimeInterval.js +2 -2
  352. package/src/sap/ui/model/type/Unit.js +14 -7
  353. package/src/sap/ui/model/xml/XMLListBinding.js +15 -9
  354. package/src/sap/ui/model/xml/XMLModel.js +74 -45
  355. package/src/sap/ui/model/xml/XMLPropertyBinding.js +5 -5
  356. package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
  357. package/src/sap/ui/performance/trace/Interaction.js +30 -15
  358. package/src/sap/ui/qunit/QUnitUtils.js +3 -2
  359. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  360. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +9 -11
  361. package/src/sap/ui/test/TestUtils.js +11 -4
  362. package/src/sap/ui/test/actions/Action.js +9 -2
  363. package/src/sap/ui/test/actions/Press.js +28 -1
  364. package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
  365. package/src/sap/ui/test/matchers/I18NText.js +29 -11
  366. package/src/sap/ui/test/opaQunit.js +5 -0
  367. package/src/sap/ui/thirdparty/IPv6.js +2 -2
  368. package/src/sap/ui/thirdparty/SecondLevelDomains.js +2 -2
  369. package/src/sap/ui/thirdparty/URI.js +14 -5
  370. package/src/sap/ui/thirdparty/URITemplate.js +2 -2
  371. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
  372. package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
  373. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
  374. package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
  375. package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
  376. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
  377. package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
  378. package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
  379. package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
  380. package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
  381. package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
  382. package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
  383. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
  384. package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
  385. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
  386. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
  387. package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
  388. package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
  389. package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
  390. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
  391. package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
  392. package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
  393. package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
  394. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
  395. package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
  396. package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
  397. package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
  398. package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
  399. package/src/sap/ui/thirdparty/jquery.js +9 -1
  400. package/src/sap/ui/thirdparty/qunit-2.js +1 -1
  401. package/src/sap/ui/thirdparty/qunit.js +1 -1
  402. package/src/sap/ui/util/Mobile.js +30 -59
  403. package/src/sap/ui/util/Storage.js +1 -1
  404. package/src/sap/ui/util/isCrossOriginURL.js +16 -6
  405. package/src/ui5loader.js +6 -6
  406. package/ui5.yaml +248 -2
  407. package/src/sap/ui/core/CustomizingConfiguration.js +0 -272
  408. package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
  409. package/src/sap/ui/thirdparty/baseuri.js +0 -1
  410. package/src/sap/ui/thirdparty/es6-object-assign.js +0 -1
  411. package/src/sap/ui/thirdparty/es6-promise.js +0 -1
  412. package/src/sap/ui/thirdparty/es6-shim-nopromise.js +0 -1
  413. package/src/sap/ui/thirdparty/es6-string-methods.js +0 -1
  414. package/src/sap/ui/thirdparty/flexie.js +0 -1
  415. package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
  416. package/src/sap/ui/thirdparty/unorm.js +0 -1
  417. package/src/sap/ui/thirdparty/unormdata.js +0 -1
@@ -652,11 +652,13 @@ sap.ui.define([
652
652
  *
653
653
  * This model is read-only.
654
654
  *
655
+ * This model is not prepared to be inherited from.
656
+ *
655
657
  * @extends sap.ui.model.MetaModel
656
658
  * @hideconstructor
657
659
  * @public
658
660
  * @since 1.37.0
659
- * @version 1.94.0
661
+ * @version 1.97.0
660
662
  */
661
663
  var ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
662
664
  /*
@@ -1661,7 +1663,7 @@ sap.ui.define([
1661
1663
 
1662
1664
  // First fetch the complete metapath to ensure that everything is in mScope
1663
1665
  // This also ensures that the metadata is valid
1664
- return this.fetchObject(this.getMetaPath(sResolvedPath)).then(function () {
1666
+ return this.fetchObject(_Helper.getMetaPath(sResolvedPath)).then(function () {
1665
1667
  // Then fetch mScope
1666
1668
  return that.fetchEntityContainer();
1667
1669
  }).then(function (mScope) {
@@ -2079,7 +2081,8 @@ sap.ui.define([
2079
2081
  && aSegments0[i + 1] === "$Parameter") {
2080
2082
  // Filter via the binding parameter
2081
2083
  aOverloadMetadata = that.getObject(
2082
- that.getMetaPath(aSegments0.slice(0, i + 1).join("/") + "/@$ui5.overload")
2084
+ _Helper.getMetaPath(aSegments0.slice(0, i + 1).join("/")
2085
+ + "/@$ui5.overload")
2083
2086
  );
2084
2087
  // Note: This must be a bound operation with a binding parameter; otherwise it
2085
2088
  // would be in the first segment and the loop would not touch it due to
@@ -2098,7 +2101,7 @@ sap.ui.define([
2098
2101
  return j < iBasePathLength || sSegment[0] === "#" || sSegment[0] === "@"
2099
2102
  || rNumber.test(sSegment) || sSegment === "$Parameter"
2100
2103
  ? {} // simply an object w/o $Partner and $isCollection
2101
- : that.getObject(that.getMetaPath(aSegments.slice(0, j + 1).join("/"))) || {};
2104
+ : that.getObject(_Helper.getMetaPath(aSegments.slice(0, j + 1).join("/"))) || {};
2102
2105
  });
2103
2106
  mPaths[sPath] = true;
2104
2107
  if (!(bNoReduceBeforeCollection
@@ -2227,7 +2230,7 @@ sap.ui.define([
2227
2230
  * @since 1.37.0
2228
2231
  */
2229
2232
  ODataMetaModel.prototype.getMetaContext = function (sPath) {
2230
- return new BaseContext(this, this.getMetaPath(sPath));
2233
+ return new BaseContext(this, _Helper.getMetaPath(sPath));
2231
2234
  };
2232
2235
 
2233
2236
  /**
@@ -3083,7 +3086,8 @@ sap.ui.define([
3083
3086
  * instead, see {@link sap.ui.model.odata.v4.ODataModel#bindList}.
3084
3087
  *
3085
3088
  * For fixed values, only one mapping is expected and the qualifier is ignored. The mapping
3086
- * is available with key "".
3089
+ * is available with key "" and has an additional property "$qualifier" which is the original
3090
+ * qualifier (useful in case of "ValueListRelevantQualifiers" annotation).
3087
3091
  *
3088
3092
  * The promise is rejected with an error if there is no value list information available
3089
3093
  * for the given property path. Use {@link #getValueListType} to determine if value list
@@ -3111,7 +3115,7 @@ sap.ui.define([
3111
3115
  */
3112
3116
  ODataMetaModel.prototype.requestValueListInfo = function (sPropertyPath, bAutoExpandSelect,
3113
3117
  oContext) {
3114
- var sPropertyMetaPath = this.getMetaPath(sPropertyPath),
3118
+ var sPropertyMetaPath = _Helper.getMetaPath(sPropertyPath),
3115
3119
  sParentMetaPath = sPropertyMetaPath.slice(0, sPropertyMetaPath.lastIndexOf("/"))
3116
3120
  .replace("/$Parameter", ""),
3117
3121
  sQualifiedName = sParentMetaPath.slice(sParentMetaPath.lastIndexOf("/") + 1),
@@ -3211,7 +3215,7 @@ sap.ui.define([
3211
3215
  });
3212
3216
  });
3213
3217
  })).then(function () {
3214
- var aQualifiers;
3218
+ var aRelevantQualifiers = mAnnotationByTerm[sValueListRelevantQualifiers];
3215
3219
 
3216
3220
  // add all mappings in the data service (or local annotation files)
3217
3221
  Object.keys(mAnnotationByTerm).filter(function (sTerm) {
@@ -3220,28 +3224,36 @@ sap.ui.define([
3220
3224
  addMapping(mAnnotationByTerm[sTerm], getValueListQualifier(sTerm), that.sUrl,
3221
3225
  that.oModel);
3222
3226
  });
3223
- aQualifiers = Object.keys(oValueListInfo);
3224
3227
 
3225
3228
  // Each reference must have contributed at least one qualifier. So if oValueListInfo
3226
3229
  // is empty, there cannot have been a reference.
3227
- if (!aQualifiers.length) {
3230
+ if (isEmptyObject(oValueListInfo)) {
3228
3231
  throw new Error("No annotation '" + sValueListReferences.slice(1) + "' for " +
3229
3232
  sPropertyPath);
3230
3233
  }
3234
+
3235
+ return aRelevantQualifiers && oContext && oContext.getBinding
3236
+ ? that.filterValueListRelevantQualifiers(oValueListInfo, aRelevantQualifiers,
3237
+ sPropertyMetaPath + sValueListRelevantQualifiers, oContext)
3238
+ : oValueListInfo;
3239
+ }).then(function (mValueListByRelevantQualifier) {
3240
+ var aQualifiers, mValueListMapping;
3241
+
3231
3242
  if (bFixedValues) {
3232
- // With fixed values, only one mapping may exist. Return it for qualifier "".
3233
- if (aQualifiers.length > 1) {
3243
+ aQualifiers = Object.keys(mValueListByRelevantQualifier);
3244
+ // With fixed values, only one mapping should exist. Return it for qualifier "".
3245
+ if (aQualifiers.length !== 1) {
3234
3246
  throw new Error("Annotation '" + sValueListWithFixedValues.slice(1)
3235
- + "' but multiple '" + sValueList.slice(1)
3247
+ + "' but not exactly one '" + sValueList.slice(1)
3236
3248
  + "' for property " + sPropertyPath);
3237
3249
  }
3238
- return {"" : oValueListInfo[aQualifiers[0]]};
3250
+ mValueListMapping = mValueListByRelevantQualifier[aQualifiers[0]];
3251
+ mValueListMapping.$qualifier = aQualifiers[0];
3252
+
3253
+ return {"" : mValueListMapping};
3239
3254
  }
3240
- aQualifiers = mAnnotationByTerm[sValueListRelevantQualifiers];
3241
- return aQualifiers && oContext && oContext.getBinding
3242
- ? that.filterValueListRelevantQualifiers(oValueListInfo, aQualifiers,
3243
- sPropertyMetaPath + sValueListRelevantQualifiers, oContext)
3244
- : oValueListInfo;
3255
+
3256
+ return mValueListByRelevantQualifier;
3245
3257
  });
3246
3258
  });
3247
3259
  };
@@ -3441,4 +3453,4 @@ sap.ui.define([
3441
3453
  };
3442
3454
 
3443
3455
  return ODataMetaModel;
3444
- });
3456
+ });
@@ -175,6 +175,8 @@ sap.ui.define([
175
175
  * @author SAP SE
176
176
  * @class Model implementation for OData V4.
177
177
  *
178
+ * This model is not prepared to be inherited from.
179
+ *
178
180
  * Every resource path (relative to the service root URL, no query options) according to
179
181
  * "4 Resource Path" in specification "OData Version 4.0 Part 2: URL Conventions" is
180
182
  * a valid data binding path within this model if a leading slash is added; for example
@@ -208,7 +210,7 @@ sap.ui.define([
208
210
  * @extends sap.ui.model.Model
209
211
  * @public
210
212
  * @since 1.37.0
211
- * @version 1.94.0
213
+ * @version 1.97.0
212
214
  */
213
215
  var ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
214
216
  /** @lends sap.ui.model.odata.v4.ODataModel.prototype */
@@ -221,6 +223,7 @@ sap.ui.define([
221
223
  sParameter,
222
224
  sServiceUrl,
223
225
  oUri,
226
+ mUriParameters,
224
227
  that = this;
225
228
 
226
229
  // do not pass any parameters to Model
@@ -255,7 +258,13 @@ sap.ui.define([
255
258
  }
256
259
  this.sOperationMode = mParameters.operationMode;
257
260
  // Note: strict checking for model's URI parameters, but "sap-*" is allowed
258
- this.mUriParameters = this.buildQueryOptions(oUri.query(true), false, true);
261
+ mUriParameters = this.buildQueryOptions(oUri.query(true), false, true);
262
+ // BEWARE: these are shared across all bindings!
263
+ this.mUriParameters = mUriParameters;
264
+ if (sap.ui.getCore().getConfiguration().getStatistics()) {
265
+ // Note: this way, "sap-statistics" is not sent within $batch
266
+ mUriParameters = Object.assign({"sap-statistics" : true}, mUriParameters);
267
+ }
259
268
  this.sServiceUrl = oUri.query("").toString();
260
269
  this.sGroupId = mParameters.groupId;
261
270
  if (this.sGroupId === undefined) {
@@ -297,7 +306,7 @@ sap.ui.define([
297
306
  // BEWARE: do not share mHeaders between _MetadataRequestor and _Requestor!
298
307
  this.oMetaModel = new ODataMetaModel(
299
308
  _MetadataRequestor.create(this.mMetadataHeaders, sODataVersion,
300
- Object.assign({}, this.mUriParameters, mParameters.metadataUrlParams)),
309
+ Object.assign({}, mUriParameters, mParameters.metadataUrlParams)),
301
310
  this.sServiceUrl + "$metadata", mParameters.annotationURI, this,
302
311
  mParameters.supportReferences);
303
312
  this.oInterface = {
@@ -318,7 +327,7 @@ sap.ui.define([
318
327
  reportTransitionMessages : this.reportTransitionMessages.bind(this)
319
328
  };
320
329
  this.oRequestor = _Requestor.create(this.sServiceUrl, this.oInterface,
321
- this.mHeaders, this.mUriParameters, sODataVersion);
330
+ this.mHeaders, mUriParameters, sODataVersion);
322
331
  this.changeHttpHeaders(mParameters.httpHeaders);
323
332
  if (mParameters.earlyRequests) {
324
333
  this.oMetaModel.fetchEntityContainer(true);
@@ -531,8 +540,8 @@ sap.ui.define([
531
540
  * @param {boolean} [mParameters.$$inheritExpandSelect]
532
541
  * For operation bindings only: Whether $expand and $select from the parent binding are used
533
542
  * in the request sent on {@link #execute}. If set to <code>true</code>, the binding must not
534
- * set the $expand or $select parameter itself, the operation must be bound, and the return
535
- * value and the binding parameter must belong to the same entity set.
543
+ * set the $expand itself, the operation must be bound, and the return value and the binding
544
+ * parameter must belong to the same entity set.
536
545
  * @param {boolean} [mParameters.$$ownRequest]
537
546
  * Whether the binding always uses an own service request to read its data; only the value
538
547
  * <code>true</code> is allowed.
@@ -552,7 +561,7 @@ sap.ui.define([
552
561
  * @throws {Error}
553
562
  * If disallowed binding parameters are provided, for example if the binding parameter
554
563
  * $$inheritExpandSelect is set to <code>true</code> and the binding is no operation binding
555
- * or the binding has one of the parameters $expand or $select.
564
+ * or the binding has the parameter $expand.
556
565
  *
557
566
  * @public
558
567
  * @see sap.ui.model.Model#bindContext
@@ -599,7 +608,7 @@ sap.ui.define([
599
608
  * resolve to an absolute OData path for an entity set.
600
609
  *
601
610
  * @param {string} sPath
602
- * The binding path in the model; must not be empty or end with a slash
611
+ * The binding path in the model; must not end with a slash
603
612
  * @param {sap.ui.model.Context} [oContext]
604
613
  * The context which is required as base for a relative path
605
614
  * @param {sap.ui.model.Sorter|sap.ui.model.Sorter[]} [vSorters]
@@ -717,8 +726,7 @@ sap.ui.define([
717
726
  * transformed into a metadata context (see
718
727
  * {@link sap.ui.model.odata.v4.ODataMetaModel#getMetaContext}). The part following the
719
728
  * separator is then interpreted relative to this metadata context, even if it starts with
720
- * a '/'; a trailing '/' is allowed here, see
721
- * {@link sap.ui.model.odata.v4.ODataMetaModel#requestObject} for the effect it has.
729
+ * a '/'; see {@link sap.ui.model.odata.v4.ODataMetaModel#requestObject} for more details.
722
730
  *
723
731
  * If the target type specified in the corresponding control property's binding info is "any"
724
732
  * and the binding is relative or points to metadata, the binding may have an object value;
@@ -726,15 +734,20 @@ sap.ui.define([
726
734
  * be {@link sap.ui.model.BindingMode.OneTime}.
727
735
  *
728
736
  * @param {string} sPath
729
- * The binding path in the model; must not be empty. Must not end with a '/' unless the
730
- * binding points to metadata.
737
+ * The binding path in the model; must not end with a slash
731
738
  * @param {sap.ui.model.Context} [oContext]
732
739
  * The context which is required as base for a relative path
733
740
  * @param {object} [mParameters]
734
741
  * Map of binding parameters which can be OData query options as specified in
735
- * "OData Version 4.0 Part 2: URL Conventions" or the binding-specific parameter "$$groupId".
736
- * All "5.2 Custom Query Options" are allowed except for those with a name starting with
737
- * "sap-" (unless starting with "sap-valid-"). All other query options lead to an error.
742
+ * "OData Version 4.0 Part 2: URL Conventions" or the binding-specific parameters as specified
743
+ * below. The following OData query options are allowed:
744
+ * <ul>
745
+ * <li> All "5.2 Custom Query Options" except for those with a name starting with "sap-"
746
+ * (unless starting with "sap-valid-")
747
+ * <li> The $apply, $filter, and $search "5.1 System Query Options" if the path ends with a
748
+ * "$count" segment.
749
+ * </ul>
750
+ * All other query options lead to an error.
738
751
  * Query options specified for the binding overwrite model query options.
739
752
  * Note: The binding only creates its own data service request if it is absolute or if it is
740
753
  * relative to a context created via {@link #createBindingContext}. The binding parameters are
@@ -1171,6 +1184,7 @@ sap.ui.define([
1171
1184
  *
1172
1185
  * @private
1173
1186
  */
1187
+ // eslint-disable-next-line valid-jsdoc -- .@$ui5. is not understood properly
1174
1188
  ODataModel.prototype.createUI5Message = function (oRawMessage, sResourcePath, sCachePath) {
1175
1189
  var bIsBound = typeof oRawMessage.target === "string",
1176
1190
  sMessageLongtextUrl = oRawMessage.longtextUrl,
@@ -93,6 +93,15 @@ sap.ui.define([
93
93
  * @private
94
94
  */
95
95
 
96
+ /**
97
+ * Binding specific code for suspend.
98
+ *
99
+ * @private
100
+ */
101
+ ODataParentBinding.prototype.doSuspend = function () {
102
+ // nothing to do here
103
+ };
104
+
96
105
  /**
97
106
  * Fire event 'patchCompleted' to attached listeners, if the last PATCH request is completed.
98
107
  *
@@ -290,8 +299,8 @@ sap.ui.define([
290
299
  /**
291
300
  * Changes this binding's parameters and refreshes the binding.
292
301
  *
293
- * If there are pending changes an error is thrown. Use {@link #hasPendingChanges} to check if
294
- * there are pending changes. If there are changes, call
302
+ * If there are pending changes that cannot be ignored, an error is thrown. Use
303
+ * {@link #hasPendingChanges} to check if there are such pending changes. If there are, call
295
304
  * {@link sap.ui.model.odata.v4.ODataModel#submitBatch} to submit the changes or
296
305
  * {@link sap.ui.model.odata.v4.ODataModel#resetChanges} to reset the changes before calling
297
306
  * {@link #changeParameters}.
@@ -304,12 +313,14 @@ sap.ui.define([
304
313
  * Map of binding parameters, see {@link sap.ui.model.odata.v4.ODataModel#bindList} and
305
314
  * {@link sap.ui.model.odata.v4.ODataModel#bindContext}
306
315
  * @throws {Error}
307
- * If there are pending changes or if <code>mParameters</code> is missing, contains
308
- * binding-specific or unsupported parameters, contains unsupported values, or contains the
309
- * property "$expand" or "$select" when the model is in auto-$expand/$select mode.
310
- * Since 1.90.0, binding-specific parameters are ignored if they are unchanged. Since 1.93.0,
311
- * string values for "$expand" and "$select" are ignored if they are unchanged; pending
312
- * changes are ignored if all parameters are unchanged.
316
+ * If there are pending changes that cannot be ignored or if <code>mParameters</code> is
317
+ * missing, contains binding-specific or unsupported parameters, contains unsupported values,
318
+ * or contains the property "$expand" or "$select" when the model is in auto-$expand/$select
319
+ * mode. Since 1.90.0, binding-specific parameters are ignored if they are unchanged. Since
320
+ * 1.93.0, string values for "$expand" and "$select" are ignored if they are unchanged;
321
+ * pending changes are ignored if all parameters are unchanged. Since 1.97.0, pending changes
322
+ * are ignored if they relate to a
323
+ * {@link sap.ui.model.odata.v4.Context#setKeepAlive kept-alive} context of this binding.
313
324
  *
314
325
  * @public
315
326
  * @since 1.45.0
@@ -375,7 +386,7 @@ sap.ui.define([
375
386
  }
376
387
 
377
388
  if (sChangeReason) {
378
- if (this.hasPendingChanges()) {
389
+ if (this.hasPendingChanges(true)) {
379
390
  throw new Error("Cannot change parameters due to pending changes");
380
391
  }
381
392
  this.applyParameters(mBindingParameters, sChangeReason);
@@ -425,7 +436,7 @@ sap.ui.define([
425
436
  return this.oCachePromise.then(function (oCache) {
426
437
  if (oCache && that.bRelative) {
427
438
  return that.fetchResourcePath(that.oContext).then(function (sResourcePath) {
428
- if (oCache.$resourcePath === sResourcePath) {
439
+ if (oCache.getResourcePath() === sResourcePath) {
429
440
  return updateDependents();
430
441
  }
431
442
  return that.refreshInternal(""); // entity of context changed
@@ -447,7 +458,7 @@ sap.ui.define([
447
458
  * The absolute path to the collection in the cache where to create the entity
448
459
  * @param {string} sTransientPredicate
449
460
  * A (temporary) key predicate for the transient entity: "($uid=...)"
450
- * @param {object} oInitialData
461
+ * @param {object} [oInitialData={}]
451
462
  * The initial data for the created entity
452
463
  * @param {function} fnErrorCallback
453
464
  * A function which is called with an error object each time a POST request for the create
@@ -472,10 +483,10 @@ sap.ui.define([
472
483
  return oCache.create(oUpdateGroupLock, vCreatePath, sPathInCache,
473
484
  sTransientPredicate, oInitialData, fnErrorCallback, fnSubmitCallback
474
485
  ).then(function (oCreatedEntity) {
475
- if (oCache.$resourcePath) {
486
+ if (that.mCacheByResourcePath) {
476
487
  // Ensure that cache containing non-transient created entity is recreated
477
488
  // when the parent binding changes to another row and back again.
478
- delete that.mCacheByResourcePath[oCache.$resourcePath];
489
+ delete that.mCacheByResourcePath[oCache.getResourcePath()];
479
490
  }
480
491
  return oCreatedEntity;
481
492
  });
@@ -565,6 +576,10 @@ sap.ui.define([
565
576
  * An entity with the ETag of the binding for which the deletion was requested. This is
566
577
  * provided if the deletion is delegated from a context binding with empty path to a list
567
578
  * binding.
579
+ * @param {boolean} [bDoNotRequestCount]
580
+ * Whether not to request the new count from the server; useful in case of
581
+ * {@link sap.ui.model.odata.v4.Context#replaceWith} where it is known that the count remains
582
+ * unchanged
568
583
  * @param {function} fnCallback
569
584
  * A function which is called after the entity has been deleted from the server and from the
570
585
  * cache; the index of the entity is passed as parameter
@@ -578,7 +593,7 @@ sap.ui.define([
578
593
  * @private
579
594
  */
580
595
  ODataParentBinding.prototype.deleteFromCache = function (oGroupLock, sEditUrl, sPath,
581
- oETagEntity, fnCallback) {
596
+ oETagEntity, bDoNotRequestCount, fnCallback) {
582
597
  var sGroupId;
583
598
 
584
599
  if (this.oCache === undefined) {
@@ -590,10 +605,12 @@ sap.ui.define([
590
605
  if (!this.oModel.isAutoGroup(sGroupId) && !this.oModel.isDirectGroup(sGroupId)) {
591
606
  throw new Error("Illegal update group ID: " + sGroupId);
592
607
  }
593
- return this.oCache._delete(oGroupLock, sEditUrl, sPath, oETagEntity, fnCallback);
608
+ return this.oCache._delete(oGroupLock, sEditUrl, sPath, oETagEntity, bDoNotRequestCount,
609
+ fnCallback);
594
610
  }
595
611
  return this.oContext.getBinding().deleteFromCache(oGroupLock, sEditUrl,
596
- _Helper.buildPath(this.oContext.iIndex, this.sPath, sPath), oETagEntity, fnCallback);
612
+ _Helper.buildPath(this.oContext.iIndex, this.sPath, sPath), oETagEntity,
613
+ bDoNotRequestCount, fnCallback);
597
614
  };
598
615
 
599
616
  /**
@@ -644,17 +661,16 @@ sap.ui.define([
644
661
  // getBaseForPathReduction must be called early, because the (virtual) parent context may be
645
662
  // lost again when the path is needed
646
663
  var sBaseForPathReduction = this.getBaseForPathReduction(),
647
- sBaseMetaPath,
664
+ sBaseMetaPath = _Helper.getMetaPath(oContext.getPath()),
648
665
  bCacheImmutable,
649
666
  oCanUseCachePromise,
650
- sFullMetaPath,
667
+ // whether this binding is an operation or depends on one
668
+ bDependsOnOperation = oContext.getPath().includes("(...)"),
651
669
  iIndex = oContext.getIndex(),
652
670
  bIsAdvertisement = sChildPath[0] === "#",
653
671
  oMetaModel = this.oModel.getMetaModel(),
654
672
  aPromises,
655
673
  sResolvedChildPath = this.oModel.resolve(sChildPath, oContext),
656
- // whether this binding is an operation or depends on one
657
- bDependsOnOperation = oContext.getPath().includes("(...)"),
658
674
  that = this;
659
675
 
660
676
  /*
@@ -668,12 +684,27 @@ sap.ui.define([
668
684
  if (bIsAdvertisement) {
669
685
  // Ensure entity type metadata is loaded even for advertisement so that sync access
670
686
  // to key properties is possible
671
- return oMetaModel.fetchObject(sFullMetaPath.slice(0,
672
- sFullMetaPath.lastIndexOf("/") + 1));
687
+ return oMetaModel.fetchObject(sBaseMetaPath + "/");
673
688
  }
674
689
 
675
690
  return _Helper.fetchPropertyAndType(that.oModel.oInterface.fetchMetadata,
676
- sFullMetaPath);
691
+ getStrippedMetaPath(sResolvedChildPath));
692
+ }
693
+
694
+ /*
695
+ * Returns the meta path corresponding to the given path, with its annotation part stripped
696
+ * off.
697
+ *
698
+ * @param {string} sPath - A path
699
+ * @returns {string} The meta path with its annotation part stripped off
700
+ */
701
+ function getStrippedMetaPath(sPath) {
702
+ var iIndex;
703
+
704
+ sPath = _Helper.getMetaPath(sPath);
705
+ iIndex = sPath.indexOf("@"); // Note: sPath[0] !== "@"
706
+
707
+ return iIndex > 0 ? sPath.slice(0, iIndex) : sPath;
677
708
  }
678
709
 
679
710
  if (bDependsOnOperation && !sResolvedChildPath.includes("/$Parameter/")
@@ -692,8 +723,6 @@ sap.ui.define([
692
723
  || oContext.isKeepAlive() // kept-alive contexts have no index when not in aContexts
693
724
  || this.oCache === null
694
725
  || this.oCache && this.oCache.hasSentRequest();
695
- sBaseMetaPath = oMetaModel.getMetaPath(oContext.getPath());
696
- sFullMetaPath = oMetaModel.getMetaPath(sResolvedChildPath);
697
726
  aPromises = [
698
727
  this.doFetchQueryOptions(this.oContext),
699
728
  // After access to complete meta path of property, the metadata of all prefix paths
@@ -703,11 +732,11 @@ sap.ui.define([
703
732
  vChildQueryOptions
704
733
  ];
705
734
  oCanUseCachePromise = SyncPromise.all(aPromises).then(function (aResult) {
706
- var sChildMetaPath,
707
- mChildQueryOptions = aResult[2],
735
+ var mChildQueryOptions = aResult[2],
708
736
  mWrappedChildQueryOptions,
709
737
  mLocalQueryOptions = aResult[0],
710
738
  oProperty = aResult[1],
739
+ sReducedChildMetaPath,
711
740
  sReducedPath;
712
741
 
713
742
  if (Array.isArray(oProperty)) { // Arrays are only used for functions and actions
@@ -716,15 +745,10 @@ sap.ui.define([
716
745
  }
717
746
 
718
747
  sReducedPath = oMetaModel.getReducedPath(sResolvedChildPath, sBaseForPathReduction);
719
-
720
- if (sChildPath === "$count" || sChildPath.endsWith("/$count")
721
- || sChildPath[0] === "@") {
722
- return sReducedPath;
723
- }
724
-
725
- sChildMetaPath = _Helper.getRelativePath(_Helper.getMetaPath(sReducedPath),
748
+ sReducedChildMetaPath = _Helper.getRelativePath(getStrippedMetaPath(sReducedPath),
726
749
  sBaseMetaPath);
727
- if (sChildMetaPath === undefined) {
750
+
751
+ if (sReducedChildMetaPath === undefined) {
728
752
  // the child's data does not fit into this bindings's cache, try the parent
729
753
  that.bHasPathReductionToParent = true;
730
754
  return that.oContext.getBinding().fetchIfChildCanUseCache(that.oContext,
@@ -732,7 +756,8 @@ sap.ui.define([
732
756
  vChildQueryOptions);
733
757
  }
734
758
 
735
- if (bDependsOnOperation) {
759
+ if (bDependsOnOperation || sReducedChildMetaPath === "$count"
760
+ || sReducedChildMetaPath.endsWith("/$count")) {
736
761
  return sReducedPath;
737
762
  }
738
763
 
@@ -742,17 +767,18 @@ sap.ui.define([
742
767
  that.bAggregatedQueryOptionsInitial = false;
743
768
  }
744
769
  if (bIsAdvertisement) {
745
- mWrappedChildQueryOptions = {"$select" : [sChildMetaPath.slice(1)]};
770
+ mWrappedChildQueryOptions = {"$select" : [sReducedChildMetaPath.slice(1)]};
746
771
  return that.aggregateQueryOptions(mWrappedChildQueryOptions, sBaseMetaPath,
747
772
  bCacheImmutable)
748
773
  ? sReducedPath
749
774
  : undefined;
750
775
  }
751
- if (sChildMetaPath === ""
776
+ if (sReducedChildMetaPath === ""
752
777
  || oProperty
753
778
  && (oProperty.$kind === "Property" || oProperty.$kind === "NavigationProperty")) {
754
779
  mWrappedChildQueryOptions = _Helper.wrapChildQueryOptions(sBaseMetaPath,
755
- sChildMetaPath, mChildQueryOptions, that.oModel.oInterface.fetchMetadata);
780
+ sReducedChildMetaPath, mChildQueryOptions,
781
+ that.oModel.oInterface.fetchMetadata);
756
782
  if (mWrappedChildQueryOptions) {
757
783
  return that.aggregateQueryOptions(mWrappedChildQueryOptions, sBaseMetaPath,
758
784
  bCacheImmutable)
@@ -761,14 +787,14 @@ sap.ui.define([
761
787
  }
762
788
  return undefined;
763
789
  }
764
- if (sChildMetaPath === "value") { // symbolic name for operation result
790
+ if (sReducedChildMetaPath === "value") { // symbolic name for operation result
765
791
  return that.aggregateQueryOptions(mChildQueryOptions, sBaseMetaPath,
766
792
  bCacheImmutable)
767
793
  ? sReducedPath
768
794
  : undefined;
769
795
  }
770
796
  Log.error("Failed to enhance query options for auto-$expand/$select as the path '"
771
- + sFullMetaPath + "' does not point to a property",
797
+ + sResolvedChildPath + "' does not point to a property",
772
798
  JSON.stringify(oProperty), sClassName);
773
799
  return undefined;
774
800
  }).then(function (sReducedPath) {
@@ -974,13 +1000,14 @@ sap.ui.define([
974
1000
  * @override
975
1001
  * @see sap.ui.model.odata.v4.ODataBinding#hasPendingChangesInDependents
976
1002
  */
977
- ODataParentBinding.prototype.hasPendingChangesInDependents = function () {
978
- var aDependents = this.getDependentBindings();
979
-
980
- return aDependents.some(function (oDependent) {
1003
+ ODataParentBinding.prototype.hasPendingChangesInDependents = function (bIgnoreKeptAlive) {
1004
+ return this.getDependentBindings().some(function (oDependent) {
981
1005
  var oCache = oDependent.oCache,
982
1006
  bHasPendingChanges;
983
1007
 
1008
+ if (bIgnoreKeptAlive && oDependent.oContext.isKeepAlive()) {
1009
+ return false;
1010
+ }
984
1011
  if (oCache !== undefined) {
985
1012
  // Pending changes for this cache are only possible when there is a cache already
986
1013
  if (oCache && oCache.hasPendingChangesForPath("")) {
@@ -992,7 +1019,10 @@ sap.ui.define([
992
1019
  if (oDependent.mCacheByResourcePath) {
993
1020
  bHasPendingChanges = Object.keys(oDependent.mCacheByResourcePath)
994
1021
  .some(function (sPath) {
995
- return oDependent.mCacheByResourcePath[sPath].hasPendingChangesForPath("");
1022
+ var oCacheForPath = oDependent.mCacheByResourcePath[sPath];
1023
+
1024
+ return oCacheForPath !== oCache // don't ask again
1025
+ && oCacheForPath.hasPendingChangesForPath("");
996
1026
  });
997
1027
  if (bHasPendingChanges) {
998
1028
  return true;
@@ -1304,8 +1334,10 @@ sap.ui.define([
1304
1334
 
1305
1335
  /**
1306
1336
  * Suspends this binding. A suspended binding does not fire change events nor does it trigger
1307
- * data service requests. Call {@link #resume} to resume the binding.
1308
- * Before 1.53.0, this method was not supported and threw an error.
1337
+ * data service requests. Call {@link #resume} to resume the binding. Before 1.53.0, this method
1338
+ * was not supported and threw an error. Since 1.97.0, pending changes are ignored if they
1339
+ * relate to a {@link sap.ui.model.odata.v4.Context#setKeepAlive kept-alive} context of this
1340
+ * binding.
1309
1341
  *
1310
1342
  * @throws {Error}
1311
1343
  * If this binding
@@ -1313,7 +1345,7 @@ sap.ui.define([
1313
1345
  * <li>is relative to a {@link sap.ui.model.odata.v4.Context},</li>
1314
1346
  * <li>is an operation binding,</li>
1315
1347
  * <li>has {@link sap.ui.model.Binding#isSuspended} set to <code>true</code>,</li>
1316
- * <li>has pending changes,</li>
1348
+ * <li>has pending changes that cannot be ignored,</li>
1317
1349
  * <li>is not a root binding. Use {@link #getRootBinding} to determine the root binding.</li>
1318
1350
  * </ul>
1319
1351
  *
@@ -1338,7 +1370,7 @@ sap.ui.define([
1338
1370
  if (this.bSuspended) {
1339
1371
  throw new Error("Cannot suspend a suspended binding: " + this);
1340
1372
  }
1341
- if (this.hasPendingChanges()) {
1373
+ if (this.hasPendingChanges(true)) {
1342
1374
  throw new Error("Cannot suspend a binding with pending changes: " + this);
1343
1375
  }
1344
1376
 
@@ -1348,6 +1380,7 @@ sap.ui.define([
1348
1380
  });
1349
1381
  this.oResumePromise.$resolve = fnResolve;
1350
1382
  this.removeReadGroupLock();
1383
+ this.doSuspend();
1351
1384
  };
1352
1385
 
1353
1386
  /**
@@ -1426,7 +1459,6 @@ sap.ui.define([
1426
1459
  "adjustPredicate",
1427
1460
  "destroy",
1428
1461
  "doDeregisterChangeListener",
1429
- "fetchCache",
1430
1462
  "getGeneration",
1431
1463
  "hasPendingChangesForPath"
1432
1464
  ].forEach(function (sMethod) { // method (still) not final, allow for "super" calls
@@ -57,14 +57,16 @@ sap.ui.define([
57
57
  * @mixes sap.ui.model.odata.v4.ODataBinding
58
58
  * @public
59
59
  * @since 1.37.0
60
- * @version 1.94.0
60
+ * @version 1.97.0
61
61
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
62
62
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
63
- * @borrows sap.ui.model.odata.v4.ODataBinding#hasPendingChanges as #hasPendingChanges
64
63
  * @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
64
+ * @borrows sap.ui.model.odata.v4.ODataBinding#hasPendingChanges as #hasPendingChanges
65
65
  * @borrows sap.ui.model.odata.v4.ODataBinding#isInitial as #isInitial
66
66
  * @borrows sap.ui.model.odata.v4.ODataBinding#refresh as #refresh
67
+ * @borrows sap.ui.model.odata.v4.ODataBinding#requestRefresh as #requestRefresh
67
68
  * @borrows sap.ui.model.odata.v4.ODataBinding#resetChanges as #resetChanges
69
+ * @borrows sap.ui.model.odata.v4.ODataBinding#toString as #toString
68
70
  */
69
71
  var ODataPropertyBinding
70
72
  = PropertyBinding.extend("sap.ui.model.odata.v4.ODataPropertyBinding", {
@@ -85,16 +87,18 @@ sap.ui.define([
85
87
  this.setIgnoreMessages(mParameters.$$ignoreMessages);
86
88
  } else {
87
89
  this.sGroupId = undefined;
90
+ this.bNoPatch = false;
88
91
  }
89
92
  this.oCheckUpdateCallToken = undefined;
90
- // Note: no system query options supported at property binding
91
- this.mQueryOptions = this.oModel.buildQueryOptions(_Helper.clone(mParameters),
92
- /*bSystemQueryOptionsAllowed*/false);
93
- this.fetchCache(oContext);
94
93
  this.oContext = oContext;
95
94
  this.bHasDeclaredType = undefined; // whether the binding info declares a type
96
95
  this.bInitial = true;
96
+ // Note: system query options supported at property binding only for ".../$count"
97
+ this.mQueryOptions = this.oModel.buildQueryOptions(_Helper.clone(mParameters),
98
+ /*bSystemQueryOptionsAllowed*/sPath.endsWith("$count"));
97
99
  this.vValue = undefined;
100
+ // BEWARE: #doFetchQueryOptions uses #isRoot which relies on this.oContext!
101
+ this.fetchCache(oContext);
98
102
  oModel.bindingCreated(this);
99
103
  },
100
104
  metadata : {
@@ -497,7 +501,7 @@ sap.ui.define([
497
501
  * @see sap.ui.model.odata.v4.ODataBinding#refreshInternal
498
502
  */
499
503
  ODataPropertyBinding.prototype.refreshInternal = function (_sResourcePathPrefix, sGroupId,
500
- bCheckUpdate, _bKeepCacheOnError) {
504
+ bCheckUpdate, bKeepCacheOnError) {
501
505
  var that = this;
502
506
 
503
507
  if (this.isRootBindingSuspended()) {
@@ -505,7 +509,7 @@ sap.ui.define([
505
509
  return SyncPromise.resolve();
506
510
  }
507
511
  return this.oCachePromise.then(function () {
508
- that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true);
512
+ that.fetchCache(that.oContext, false, /*bKeepQueryOptions*/true, bKeepCacheOnError);
509
513
 
510
514
  if (bCheckUpdate) {
511
515
  return that.checkUpdateInternal(undefined, ChangeReason.Refresh, sGroupId);
@@ -793,4 +797,4 @@ sap.ui.define([
793
797
  ODataPropertyBinding.prototype.visitSideEffects = function () {};
794
798
 
795
799
  return ODataPropertyBinding;
796
- });
800
+ });