@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
@@ -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.93.3
60
+ * @version 1.96.2
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 : {
@@ -793,4 +797,4 @@ sap.ui.define([
793
797
  ODataPropertyBinding.prototype.visitSideEffects = function () {};
794
798
 
795
799
  return ODataPropertyBinding;
796
- });
800
+ });
@@ -105,7 +105,8 @@ sap.ui.define([
105
105
  * <li> when "constant": {any} the constant value (not escaped if string)
106
106
  * <li> when "expression": {string} the expression unwrapped (no "{=" and "}")
107
107
  * </ul>
108
- * <li> <code>type</code>: the EDM data type (like "Edm.String") if it could be determined
108
+ * <li> <code>type</code>: the EDM data type (like "Edm.String") if it could be
109
+ * determined
109
110
  * <li> <code>constraints</code>: {object} type constraints if result is "binding"
110
111
  * </ul>
111
112
  *
@@ -515,6 +516,12 @@ sap.ui.define([
515
516
  return undefined;
516
517
  }
517
518
  return oModel.fetchObject(sPath + "/$").then(function (oTarget) {
519
+ var sCompositeConstraints =
520
+ oModel.getObject(oPathValue.path
521
+ + "@com.sap.vocabularies.UI.v1.DoNotCheckScaleOfMeasureQuantity")
522
+ ? ",constraints:{'skipDecimalsValidation':true}"
523
+ : "";
524
+
518
525
  return {
519
526
  result : "composite",
520
527
  type : sCompositeType,
@@ -527,7 +534,7 @@ sap.ui.define([
527
534
  + getBinding(oModel.getConstraints(oTarget, sPath), oTarget.$Type,
528
535
  sTargetPath)
529
536
  + ",{mode:'OneTime',path:'/##" + sComputedAnnotation + "',targetType:'any'}"
530
- + "],type:'" + sCompositeType + "'}"
537
+ + "],type:'" + sCompositeType + "'" + sCompositeConstraints + "}"
531
538
  };
532
539
  });
533
540
  },
@@ -872,4 +879,4 @@ sap.ui.define([
872
879
 
873
880
  return Expression;
874
881
 
875
- }, /* bExport= */ false);
882
+ }, /* bExport= */ false);
@@ -209,6 +209,8 @@ sap.ui.define([
209
209
  }
210
210
  _Helper.setPrivateAnnotation(oGroupNode, "spliced", aElements.splice(iIndex + 1, iCount));
211
211
  aElements.$count -= iCount;
212
+ _Helper.updateAll(this.mChangeListeners, sGroupNodePath, oGroupNode,
213
+ {"@$ui5.node.groupLevelCount" : undefined});
212
214
 
213
215
  return iCount;
214
216
  };
@@ -315,7 +317,9 @@ sap.ui.define([
315
317
  }
316
318
  }
317
319
  });
318
-
320
+ _Helper.updateAll(that.mChangeListeners, vGroupNodeOrPath, oGroupNode,
321
+ {"@$ui5.node.groupLevelCount" :
322
+ _Helper.getPrivateAnnotation(oGroupNode, "groupLevelCount")});
319
323
  return SyncPromise.resolve(iCount);
320
324
  }
321
325
 
@@ -348,6 +352,9 @@ sap.ui.define([
348
352
  }
349
353
 
350
354
  iCount = oResult.value.$count;
355
+ _Helper.setPrivateAnnotation(oGroupNode, "groupLevelCount", iCount);
356
+ _Helper.updateAll(that.mChangeListeners, vGroupNodeOrPath, oGroupNode,
357
+ {"@$ui5.node.groupLevelCount" : iCount});
351
358
  if (bSubtotalsAtBottom) {
352
359
  iCount += 1;
353
360
  }
@@ -210,7 +210,7 @@ sap.ui.define([
210
210
  }
211
211
  fnCallback();
212
212
  }
213
- that.oRequestor.getModelInterface().reportBoundMessages(that.sResourcePath,
213
+ that.oRequestor.getModelInterface().reportStateMessages(that.sResourcePath,
214
214
  [], [sEntityPath]);
215
215
  }),
216
216
  iIndex === undefined // single element or kept-alive not in list
@@ -485,7 +485,7 @@ sap.ui.define([
485
485
 
486
486
  /*
487
487
  * Determines the implicit value if the value is missing in the cache. Reports an invalid
488
- * segment if there is no implicit value.
488
+ * segment if there is no @Core.Permissions: 'None' annotation and no implicit value.
489
489
  *
490
490
  * @param {object} oValue The object that is expected to have the value
491
491
  * @param {string} sSegment The path segment that is missing
@@ -503,6 +503,8 @@ sap.ui.define([
503
503
  return that.oRequestor.getModelInterface()
504
504
  .fetchMetadata(that.sMetaPath + "/" + _Helper.getMetaPath(sPropertyPath))
505
505
  .then(function (oProperty) {
506
+ var vPermissions;
507
+
506
508
  if (!oProperty) {
507
509
  return invalidSegment(sSegment);
508
510
  }
@@ -514,6 +516,11 @@ sap.ui.define([
514
516
  || _Helper.buildPath(sServiceUrl + that.sResourcePath, sPropertyPath);
515
517
  }
516
518
  if (!bTransient) {
519
+ vPermissions = oValue[
520
+ _Helper.getAnnotationKey(oValue, ".Permissions", sSegment)];
521
+ if (vPermissions === 0 || vPermissions === "None") {
522
+ return undefined;
523
+ }
517
524
  // If there is no entity with a key predicate, try it with the cache root
518
525
  // object (in case of SimpleCache, the root object of CollectionCache is an
519
526
  // array)
@@ -592,7 +599,7 @@ sap.ui.define([
592
599
  vValue = vValue[vIndex];
593
600
  }
594
601
  // missing advertisement or annotation is not an error
595
- return vValue === undefined && sSegment[0] !== "#" && sSegment[0] !== "@"
602
+ return vValue === undefined && sSegment[0] !== "#" && !sSegment.includes("@")
596
603
  ? missingValue(oParentValue, sSegment, i + 1)
597
604
  : vValue;
598
605
  });
@@ -1213,7 +1220,7 @@ sap.ui.define([
1213
1220
  } else if (aReadResult.length === 0) {
1214
1221
  that.removeElement(aElements, iIndex, sPredicate, sPath);
1215
1222
  that.oRequestor.getModelInterface()
1216
- .reportBoundMessages(that.sResourcePath, [], [sPath + sPredicate]);
1223
+ .reportStateMessages(that.sResourcePath, [], [sPath + sPredicate]);
1217
1224
  fnOnRemove(false);
1218
1225
  } else if (bRemoveFromCollection) {
1219
1226
  that.removeElement(aElements, iIndex, sPredicate, sPath);
@@ -1298,7 +1305,7 @@ sap.ui.define([
1298
1305
  */
1299
1306
  _Cache.prototype.removeMessages = function () {
1300
1307
  if (this.sReportedMessagesPath) {
1301
- this.oRequestor.getModelInterface().reportBoundMessages(this.sReportedMessagesPath, {});
1308
+ this.oRequestor.getModelInterface().reportStateMessages(this.sReportedMessagesPath, {});
1302
1309
  this.sReportedMessagesPath = undefined;
1303
1310
  }
1304
1311
  };
@@ -1610,7 +1617,7 @@ sap.ui.define([
1610
1617
  * Path of the unit or currency for the property, relative to the entity
1611
1618
  * @param {boolean} [bPatchWithoutSideEffects]
1612
1619
  * Whether the PATCH response is ignored, except for a new ETag
1613
- * @param {function} [fnPatchSent]
1620
+ * @param {function} fnPatchSent
1614
1621
  * The function is called just before a back-end request is sent for the first time.
1615
1622
  * If no back-end request is needed, the function is not called.
1616
1623
  * @returns {Promise}
@@ -1632,11 +1639,13 @@ sap.ui.define([
1632
1639
  try {
1633
1640
  oPromise = this.fetchValue(_GroupLock.$cached, sEntityPath);
1634
1641
  } catch (oError) {
1635
- if (!oError.$cached) {
1642
+ if (!oError.$cached || this.oPromise !== null) {
1636
1643
  throw oError;
1637
1644
  }
1638
- // Note: we need a unique "entity" instance to avoid merging of PATCH requests!
1639
- oPromise = SyncPromise.resolve({"@odata.etag" : "*"});
1645
+ // data has not been read, fake it
1646
+ // Note: we need a unique "entity" instance to avoid merging of unrelated PATCH requests
1647
+ // and sharing of data across bindings - the instance is modified below!
1648
+ oPromise = this.oPromise = SyncPromise.resolve({"@odata.etag" : "*"});
1640
1649
  }
1641
1650
 
1642
1651
  return oPromise.then(function (oEntity) {
@@ -1672,9 +1681,7 @@ sap.ui.define([
1672
1681
  */
1673
1682
  function onSubmit() {
1674
1683
  oRequestLock = that.oRequestor.lockGroup(sGroupId, that, true);
1675
- if (fnPatchSent) {
1676
- fnPatchSent();
1677
- }
1684
+ fnPatchSent();
1678
1685
  }
1679
1686
 
1680
1687
  if (bPatchWithoutSideEffects) {
@@ -1807,7 +1814,7 @@ sap.ui.define([
1807
1814
  * Processes the response from the server. All arrays are annotated by their length, influenced
1808
1815
  * by the annotations "@odata.count" and "@odata.nextLink". Recursively calculates the key
1809
1816
  * predicates for all entities in the result. Collects and reports OData messages via
1810
- * {@link sap.ui.model.odata.v4.lib._Requestor#reportBoundMessages}.
1817
+ * {@link sap.ui.model.odata.v4.lib._Requestor#reportStateMessages}.
1811
1818
  *
1812
1819
  * @param {*} oRoot An OData response, arrays or simple values are wrapped into an object as
1813
1820
  * property "value"
@@ -1982,7 +1989,7 @@ sap.ui.define([
1982
1989
  }
1983
1990
  if (bHasMessages) {
1984
1991
  this.sReportedMessagesPath = this.getOriginalResourcePath(oRoot);
1985
- this.oRequestor.getModelInterface().reportBoundMessages(this.sReportedMessagesPath,
1992
+ this.oRequestor.getModelInterface().reportStateMessages(this.sReportedMessagesPath,
1986
1993
  mPathToODataMessages, aCachePaths);
1987
1994
  }
1988
1995
  };
@@ -2296,7 +2303,7 @@ sap.ui.define([
2296
2303
  oKeptElement = this.aElements.$byPredicate[sPredicate];
2297
2304
  if (oKeptElement) {
2298
2305
  if (oElement["@odata.etag"] === oKeptElement["@odata.etag"]) {
2299
- oElement = oKeptElement;
2306
+ _Helper.merge(oElement, oKeptElement);
2300
2307
  } else if (this.hasPendingChangesForPath(sPredicate)) {
2301
2308
  throw new Error("Modified on client and on server: "
2302
2309
  + this.sResourcePath + sPredicate);
@@ -2877,8 +2884,8 @@ sap.ui.define([
2877
2884
  if (this.bPost) {
2878
2885
  throw new Error("Cannot fetch a value before the POST request");
2879
2886
  }
2880
- this.bSentRequest = true;
2881
2887
  this.oPromise = SyncPromise.all([
2888
+ // Note: for _GroupLock.$cached, this may fail synchronously
2882
2889
  this.oRequestor.request("GET", sResourcePath, oGroupLock, undefined, undefined,
2883
2890
  fnDataRequested, undefined, this.sMetaPath),
2884
2891
  this.fetchTypes()
@@ -2886,6 +2893,7 @@ sap.ui.define([
2886
2893
  that.visitResponse(aResult[0], aResult[1]);
2887
2894
  return aResult[0];
2888
2895
  });
2896
+ this.bSentRequest = true;
2889
2897
  }
2890
2898
  return this.oPromise.then(function (oResult) {
2891
2899
  if (oResult && oResult["$ui5.deleted"]) {
@@ -654,8 +654,7 @@ sap.ui.define([
654
654
  },
655
655
 
656
656
  /**
657
- * Extracts all (top and detail) messages from the given error instance into lists of
658
- * unbound and bound messages.
657
+ * Extracts all (top and detail) messages from the given error instance.
659
658
  *
660
659
  * @param {Error} oError
661
660
  * An error instance as created by {@link .createError} or {@link .decomposeError}
@@ -669,15 +668,14 @@ sap.ui.define([
669
668
  * @param {string} [oError.requestUrl]
670
669
  * The absolute request URL of the failed OData request; required to resolve a long text
671
670
  * URL
672
- * @returns {object}
673
- * An object containing "unbound" and "bound" properties each containing an array of raw
674
- * message objects suitable for {@link sap.ui.model.odata.v4.ODataModel#createUI5Message}
671
+ * @returns {object[]}
672
+ * An array of raw message objects suitable for
673
+ * {@link sap.ui.model.odata.v4.ODataModel#createUI5Message}
675
674
  *
676
675
  * @private
677
676
  */
678
677
  extractMessages : function (oError) {
679
- var aBound = [],
680
- aUnbound = [];
678
+ var aMessages = [];
681
679
 
682
680
  /*
683
681
  * Creates a raw message object taking all relevant properties, converts the annotations
@@ -713,18 +711,17 @@ sap.ui.define([
713
711
  }
714
712
  });
715
713
 
716
- if (typeof oMessage.target !== "string") {
717
- aUnbound.push(oRawMessage);
718
- } else if (oMessage.target[0] === "$" || !oError.resourcePath) {
719
- // target for the bound message is a system query option or cannot be resolved
720
- // -> report as unbound message
721
- oRawMessage.message = oMessage.target + ": " + oMessage.message;
722
- aUnbound.push(oRawMessage);
723
- } else {
724
- oRawMessage.target = oMessage.target;
725
- oRawMessage.transition = true;
726
- aBound.push(oRawMessage);
714
+ if (typeof oMessage.target === "string") {
715
+ if (oMessage.target[0] === "$" || !oError.resourcePath) {
716
+ // target for the bound message is a system query option or cannot be
717
+ // resolved -> report as unbound message
718
+ oRawMessage.message = oMessage.target + ": " + oMessage.message;
719
+ } else {
720
+ oRawMessage.target = oMessage.target;
721
+ }
727
722
  }
723
+ oRawMessage.transition = true;
724
+ aMessages.push(oRawMessage);
728
725
  }
729
726
 
730
727
  if (oError.error) {
@@ -739,7 +736,7 @@ sap.ui.define([
739
736
  } else {
740
737
  addMessage(oError, 4 /*Error*/, true);
741
738
  }
742
- return {bound : aBound, unbound : aUnbound};
739
+ return aMessages;
743
740
  },
744
741
 
745
742
  /**
@@ -999,23 +996,28 @@ sap.ui.define([
999
996
  },
1000
997
 
1001
998
  /**
1002
- * Returns the instance annotation key with a given name for the given message, ignoring the
999
+ * Returns the instance annotation key with a given name for the given object, ignoring the
1003
1000
  * alias. Logs a warning if duplicates are found.
1004
1001
  *
1005
- * @param {object} oMessage
1006
- * A single message from an OData error response
1007
- * @param {object} sName
1008
- * The name of the annotation without prefix "@" and namespace, e.g. ".ContentID" for a
1002
+ * @param {object} oObject
1003
+ * Any object
1004
+ * @param {string} sName
1005
+ * The name of the annotation w/o prefix "@" and namespace, e.g. ".ContentID" for a
1009
1006
  * annotation "@Org.OData.Core.V1.ContentID"
1007
+ * @param {string} [sProperty]
1008
+ * The name of the annotated property, e.g. "Budget" in "Budget@Core.Permissions" for a
1009
+ * property "Budget" annotated with "@Core.Permissions"
1010
1010
  * @returns {string|undefined}
1011
1011
  * The key of the annotation, or <code>undefined</code> in case there is not exactly one
1012
1012
  * such annotation (ignoring the alias)
1013
1013
  */
1014
- getAnnotationKey : function (oMessage, sName) {
1015
- var sAnnotationKey, bDuplicate;
1014
+ getAnnotationKey : function (oObject, sName, sProperty) {
1015
+ var sAnnotationKey,
1016
+ bDuplicate,
1017
+ sPrefix = (sProperty || "") + "@";
1016
1018
 
1017
- Object.keys(oMessage).forEach(function (sKey) {
1018
- if (sKey[0] === "@" && sKey.endsWith(sName)) {
1019
+ Object.keys(oObject).forEach(function (sKey) {
1020
+ if (sKey.startsWith(sPrefix) && sKey.endsWith(sName)) {
1019
1021
  if (sAnnotationKey) {
1020
1022
  Log.warning("Cannot distinguish " + sAnnotationKey + " from " + sKey,
1021
1023
  undefined, sClassName);
@@ -1843,7 +1845,7 @@ sap.ui.define([
1843
1845
  /**
1844
1846
  * Converts given value to an array.
1845
1847
  * <code>null</code> and <code>undefined</code> are converted to the empty array, a
1846
- * non-array value is wrapped with an array and an array is returned as it is.
1848
+ * non-array value is wrapped with an array and an array is returned as a shallow copy.
1847
1849
  *
1848
1850
  * @param {any} [vElement]
1849
1851
  * The element to be converted into an array.
@@ -1855,7 +1857,7 @@ sap.ui.define([
1855
1857
  return [];
1856
1858
  }
1857
1859
  if (Array.isArray(vElement)) {
1858
- return vElement;
1860
+ return vElement.slice();
1859
1861
  }
1860
1862
  return [vElement];
1861
1863
  },
@@ -67,12 +67,12 @@ sap.ui.define([
67
67
  * A function called with parameters <code>sGroupId</code> and <code>sPropertyName</code>
68
68
  * returning the property value in question. Only 'submit' is supported for <code>
69
69
  * sPropertyName</code>. Supported property values are: 'API', 'Auto' and 'Direct'.
70
- * @param {function} oModelInterface.reportBoundMessages
71
- * A function for reporting bound messages; see {@link #reportBoundMessages} for the signature
70
+ * @param {function} oModelInterface.reportStateMessages
71
+ * A function for reporting state messages; see {@link #reportStateMessages} for the signature
72
72
  * of this function
73
- * @param {function} oModelInterface.reportUnboundMessages
73
+ * @param {function} oModelInterface.reportTransitionMessages
74
74
  * A function called with parameters <code>sResourcePath</code> and <code>sMessages</code>
75
- * reporting unbound OData messages to the {@link sap.ui.core.message.MessageManager}.
75
+ * reporting OData transition messages to the {@link sap.ui.core.message.MessageManager}.
76
76
  * @param {function (string)} [oModelInterface.onCreateGroup]
77
77
  * A callback function that is called with the group name as parameter when the first
78
78
  * request is added to a group
@@ -88,10 +88,11 @@ sap.ui.define([
88
88
  this.oModelInterface = oModelInterface;
89
89
  this.sQueryParams = _Helper.buildQuery(mQueryParams); // Used for $batch and CSRF token only
90
90
  this.mRunningChangeRequests = {}; // map from group ID to a SyncPromise[]
91
- this.oSecurityTokenPromise = null; // be nice to Chrome v8
92
91
  this.iSessionTimer = 0;
93
92
  this.iSerialNumber = 0;
94
93
  this.sServiceUrl = sServiceUrl;
94
+ this.vStatistics = mQueryParams && mQueryParams["sap-statistics"];
95
+ this.processSecurityTokenHandlers(); // sets this.oSecurityTokenPromise
95
96
  }
96
97
 
97
98
  /**
@@ -1200,7 +1201,7 @@ sap.ui.define([
1200
1201
  // methods it must be possible to insert the ETag from the header
1201
1202
  oResponse = vRequest.method === "GET" ? null : {};
1202
1203
  }
1203
- that.reportUnboundMessagesAsJSON(vRequest.url,
1204
+ that.reportHeaderMessages(vRequest.url,
1204
1205
  getResponseHeader.call(vResponse, "sap-messages"));
1205
1206
  sETag = getResponseHeader.call(vResponse, "ETag");
1206
1207
  if (sETag) {
@@ -1287,6 +1288,38 @@ sap.ui.define([
1287
1288
  return oGroupLock;
1288
1289
  };
1289
1290
 
1291
+ /**
1292
+ * Calls the security token handlers returned by
1293
+ * {@link sap.ui.core.Configuration#getSecurityTokenHandlers} one by one with the requestor's
1294
+ * service URL. The first handler not returning <code>undefined</code> but a
1295
+ * <code>Promise</code> is used to determine the required security tokens.
1296
+ *
1297
+ * @private
1298
+ */
1299
+ _Requestor.prototype.processSecurityTokenHandlers = function () {
1300
+ var that = this;
1301
+
1302
+ this.oSecurityTokenPromise = null;
1303
+
1304
+ sap.ui.getCore().getConfiguration().getSecurityTokenHandlers().some(function (fnHandler) {
1305
+ var oSecurityTokenPromise = fnHandler(that.sServiceUrl);
1306
+
1307
+ if (oSecurityTokenPromise !== undefined) {
1308
+ that.oSecurityTokenPromise = oSecurityTokenPromise.then(function (mHeaders) {
1309
+ that.checkHeaderNames(mHeaders);
1310
+ // also overwrite this.mPredefinedRequestHeaders["X-CSRF-Token"] : "Fetch"
1311
+ Object.assign(that.mHeaders, {"X-CSRF-Token" : undefined}, mHeaders);
1312
+ that.oSecurityTokenPromise = null;
1313
+ }).catch(function (oError) {
1314
+ Log.error("An error occurred within security token handler: " + fnHandler,
1315
+ oError, sClassName);
1316
+ throw oError;
1317
+ });
1318
+ return true;
1319
+ }
1320
+ });
1321
+ };
1322
+
1290
1323
  /**
1291
1324
  * Returns a promise that will be resolved once the CSRF token has been refreshed, or rejected
1292
1325
  * if that fails. Makes sure that only one HEAD request is underway at any given time and
@@ -1450,7 +1483,7 @@ sap.ui.define([
1450
1483
  };
1451
1484
 
1452
1485
  /**
1453
- * Reports unbound OData messages.
1486
+ * Reports OData messages from the "sap-messages" response header.
1454
1487
  *
1455
1488
  * @param {string} sResourcePath
1456
1489
  * The resource path of the request whose response contained the messages
@@ -1459,9 +1492,9 @@ sap.ui.define([
1459
1492
  *
1460
1493
  * @private
1461
1494
  */
1462
- _Requestor.prototype.reportUnboundMessagesAsJSON = function (sResourcePath, sMessages) {
1495
+ _Requestor.prototype.reportHeaderMessages = function (sResourcePath, sMessages) {
1463
1496
  if (sMessages) {
1464
- this.oModelInterface.reportUnboundMessages(JSON.parse(sMessages), sResourcePath);
1497
+ this.oModelInterface.reportTransitionMessages(JSON.parse(sMessages), sResourcePath);
1465
1498
  }
1466
1499
  };
1467
1500
 
@@ -1591,6 +1624,9 @@ sap.ui.define([
1591
1624
  return oPromise;
1592
1625
  }
1593
1626
 
1627
+ if (this.vStatistics !== undefined) {
1628
+ mQueryOptions = Object.assign({"sap-statistics" : this.vStatistics}, mQueryOptions);
1629
+ }
1594
1630
  if (mQueryOptions) {
1595
1631
  sResourcePath = that.addQueryString(sResourcePath, sMetaPath, mQueryOptions);
1596
1632
  }
@@ -1601,7 +1637,7 @@ sap.ui.define([
1601
1637
  Object.assign({}, mHeaders, this.mFinalHeaders),
1602
1638
  JSON.stringify(oPayload), sOriginalResourcePath
1603
1639
  ).then(function (oResponse) {
1604
- that.reportUnboundMessagesAsJSON(oResponse.resourcePath, oResponse.messages);
1640
+ that.reportHeaderMessages(oResponse.resourcePath, oResponse.messages);
1605
1641
  return that.doConvertResponse(oResponse.body, sMetaPath);
1606
1642
  });
1607
1643
  };
@@ -1697,7 +1733,7 @@ sap.ui.define([
1697
1733
  // methods it must be possible to insert the ETag from the header
1698
1734
  vResponse = sMethod === "GET" ? null : {};
1699
1735
  }
1700
- if (sETag) {
1736
+ if (sETag && typeof vResponse === "object") {
1701
1737
  vResponse["@odata.etag"] = sETag;
1702
1738
  }
1703
1739
 
@@ -1875,11 +1911,10 @@ sap.ui.define([
1875
1911
  * @param {function (string)} [oModelInterface.onCreateGroup]
1876
1912
  * A callback function that is called with the group name as parameter when the first
1877
1913
  * request is added to a group
1878
- * @param {function} oModelInterface.reportBoundMessages
1879
- * A function to report bound OData messages
1880
- * @param {function (object[])} oModelInterface.reportUnboundMessages
1881
- * A function to report unbound OData messages contained in the <code>sap-messages</code>
1882
- * response header
1914
+ * @param {function} oModelInterface.reportStateMessages
1915
+ * A function to report OData state messages
1916
+ * @param {function (object[])} oModelInterface.reportTransitionMessages
1917
+ * A function to report OData transition messages
1883
1918
  * @param {object} [mHeaders={}]
1884
1919
  * Map of default headers; may be overridden with request-specific headers; certain
1885
1920
  * OData V4 headers are predefined, but may be overridden by the default or
@@ -1915,4 +1950,4 @@ sap.ui.define([
1915
1950
  };
1916
1951
 
1917
1952
  return _Requestor;
1918
- }, /* bExport= */false);
1953
+ }, /* bExport= */false);
@@ -970,8 +970,8 @@ sap.ui.define([
970
970
  //*********************************************************************************************
971
971
  function asV2Requestor(oRequestor) {
972
972
  Object.assign(oRequestor, _V2Requestor.prototype);
973
- oRequestor.oModelInterface.reportBoundMessages = function () {};
974
- oRequestor.oModelInterface.reportUnboundMessages = function () {};
973
+ oRequestor.oModelInterface.reportStateMessages = function () {};
974
+ oRequestor.oModelInterface.reportTransitionMessages = function () {};
975
975
  }
976
976
 
977
977
  /**
@@ -3,6 +3,7 @@
3
3
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
+ /*eslint-disable max-len */
6
7
  /**
7
8
  * ResourceBundle-based DataBinding
8
9
  *
@@ -204,7 +205,10 @@ sap.ui.define([
204
205
  *
205
206
  * @alias sap.ui.model.resource.ResourceModel
206
207
  * @author SAP SE
207
- * @class Model implementation for resource bundles.
208
+ * @class
209
+ * Model implementation for resource bundles.
210
+ *
211
+ * This model is not prepared to be inherited from.
208
212
  *
209
213
  * This model allows to bind control properties against translatable texts. Its data is taken
210
214
  * from a {@link module:sap/base/i18n/ResourceBundle} and it only supports property bindings.
@@ -224,7 +228,7 @@ sap.ui.define([
224
228
  *
225
229
  * @extends sap.ui.model.Model
226
230
  * @public
227
- * @version 1.93.3
231
+ * @version 1.96.2
228
232
  */
229
233
  var ResourceModel = Model.extend("sap.ui.model.resource.ResourceModel", /** @lends sap.ui.model.resource.ResourceModel.prototype */ {
230
234
 
@@ -3,7 +3,7 @@
3
3
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
-
6
+ /*eslint-disable max-len */
7
7
  // Provides the resource model implementation of a property binding
8
8
  sap.ui.define(['sap/ui/model/PropertyBinding', 'sap/ui/model/ChangeReason'],
9
9
  function(PropertyBinding, ChangeReason) {
@@ -3,7 +3,7 @@
3
3
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
-
6
+ /*eslint-disable max-len */
7
7
  // Provides the base implementation for all model implementations
8
8
  sap.ui.define(['sap/ui/model/SimpleType', 'sap/ui/model/FormatException', 'sap/ui/model/ParseException'],
9
9
  function(SimpleType, FormatException, ParseException) {
@@ -19,7 +19,7 @@ sap.ui.define(['sap/ui/model/SimpleType', 'sap/ui/model/FormatException', 'sap/u
19
19
  * @extends sap.ui.model.SimpleType
20
20
  *
21
21
  * @author SAP SE
22
- * @version 1.93.3
22
+ * @version 1.96.2
23
23
  *
24
24
  * @public
25
25
  * @param {object} [oFormatOptions]
@@ -3,7 +3,7 @@
3
3
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
-
6
+ /*eslint-disable max-len */
7
7
  // Provides the base implementation for all model implementations
8
8
  sap.ui.define([
9
9
  "sap/base/Log",
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.model.CompositeType
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.93.3
35
+ * @version 1.96.2
36
36
  *
37
37
  * @public
38
38
  * @param {object} [oFormatOptions]
@@ -3,7 +3,7 @@
3
3
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
-
6
+ /*eslint-disable max-len */
7
7
  // Provides the base implementation for all model implementations
8
8
  sap.ui.define([
9
9
  "sap/base/util/each",
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.model.SimpleType
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.93.3
29
+ * @version 1.96.2
30
30
  *
31
31
  * @public
32
32
  * @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
@@ -80,7 +80,7 @@ sap.ui.define([
80
80
  if (oValue === "") {
81
81
  return null;
82
82
  }
83
- var oResult = this.oOutputFormat.parse(oValue);
83
+ oResult = this.oOutputFormat.parse(oValue);
84
84
  if (!oResult) {
85
85
  oBundle = sap.ui.getCore().getLibraryResourceBundle();
86
86
  throw new ParseException(oBundle.getText(this.sName + ".Invalid"));
@@ -131,6 +131,7 @@ sap.ui.define([
131
131
  aMessages.push(oBundle.getText(that.sName + ".Maximum", [sContent]));
132
132
  }
133
133
  break;
134
+ default: break;
134
135
  }
135
136
  });
136
137
  if (aViolatedConstraints.length > 0) {
@@ -176,6 +177,11 @@ sap.ui.define([
176
177
  };
177
178
 
178
179
  /**
180
+ * Returns the output pattern.
181
+ *
182
+ * @returns {string} The output pattern
183
+ *
184
+ * @see sap.ui.core.format.DateFormat.getDateInstance
179
185
  * @protected
180
186
  */
181
187
  Date1.prototype.getOutputPattern = function() {