@openui5/sap.ui.core 1.100.0 → 1.102.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/.eslintrc.json +27 -5
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +1 -1
  4. package/src/jquery.sap.global.js +1 -1
  5. package/src/jquery.sap.properties.js +1 -1
  6. package/src/jquery.sap.resources.js +1 -1
  7. package/src/jquery.sap.script.js +1 -1
  8. package/src/jquery.sap.storage.js +3 -3
  9. package/src/sap/base/assert.js +1 -1
  10. package/src/sap/base/strings/whitespaceReplacer.js +1 -1
  11. package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
  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 +3 -3
  53. package/src/sap/ui/Global.js +4 -4
  54. package/src/sap/ui/base/Event.js +1 -1
  55. package/src/sap/ui/base/EventProvider.js +2 -2
  56. package/src/sap/ui/base/Interface.js +1 -1
  57. package/src/sap/ui/base/ManagedObject.js +1 -1
  58. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  59. package/src/sap/ui/base/ManagedObjectRegistry.js +10 -5
  60. package/src/sap/ui/base/Metadata.js +1 -1
  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 +2 -1
  64. package/src/sap/ui/core/BusyIndicator.js +1 -1
  65. package/src/sap/ui/core/CommandExecution.js +15 -12
  66. package/src/sap/ui/core/Component.js +50 -27
  67. package/src/sap/ui/core/ComponentContainer.js +1 -1
  68. package/src/sap/ui/core/ComponentMetadata.js +27 -12
  69. package/src/sap/ui/core/ComponentSupport.js +1 -1
  70. package/src/sap/ui/core/Configuration.js +22 -8
  71. package/src/sap/ui/core/Control.js +2 -3
  72. package/src/sap/ui/core/Core.js +119 -36
  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 +1 -1
  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 -1
  80. package/src/sap/ui/core/FocusHandler.js +2 -3
  81. package/src/sap/ui/core/Fragment.js +1 -1
  82. package/src/sap/ui/core/HTML.js +1 -1
  83. package/src/sap/ui/core/History.js +1 -1
  84. package/src/sap/ui/core/Icon.js +2 -2
  85. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  86. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  87. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  88. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  89. package/src/sap/ui/core/InvisibleText.js +1 -1
  90. package/src/sap/ui/core/Item.js +1 -1
  91. package/src/sap/ui/core/LabelEnablement.js +1 -1
  92. package/src/sap/ui/core/LayoutData.js +1 -1
  93. package/src/sap/ui/core/ListItem.js +1 -1
  94. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  95. package/src/sap/ui/core/Locale.js +1 -1
  96. package/src/sap/ui/core/LocaleData.js +136 -5
  97. package/src/sap/ui/core/Manifest.js +5 -3
  98. package/src/sap/ui/core/Message.js +1 -1
  99. package/src/sap/ui/core/Patcher.js +3 -1
  100. package/src/sap/ui/core/Popup.js +12 -14
  101. package/src/sap/ui/core/RenderManager.js +1 -1
  102. package/src/sap/ui/core/Renderer.js +1 -1
  103. package/src/sap/ui/core/ResizeHandler.js +1 -1
  104. package/src/sap/ui/core/ScrollBar.js +21 -15
  105. package/src/sap/ui/core/SeparatorItem.js +1 -1
  106. package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
  107. package/src/sap/ui/core/Title.js +1 -1
  108. package/src/sap/ui/core/TooltipBase.js +1 -1
  109. package/src/sap/ui/core/UIArea.js +3 -5
  110. package/src/sap/ui/core/UIComponent.js +1 -1
  111. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  112. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  113. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  114. package/src/sap/ui/core/XMLComposite.js +1 -1
  115. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  116. package/src/sap/ui/core/XMLTemplateProcessor.js +514 -389
  117. package/src/sap/ui/core/cache/CacheManager.js +27 -0
  118. package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
  119. package/src/sap/ui/core/cache/LRUPersistentCache.js +74 -3
  120. package/src/sap/ui/core/cldr/ar.json +469 -1
  121. package/src/sap/ui/core/cldr/ar_EG.json +469 -1
  122. package/src/sap/ui/core/cldr/ar_SA.json +469 -1
  123. package/src/sap/ui/core/cldr/bg.json +469 -1
  124. package/src/sap/ui/core/cldr/ca.json +469 -1
  125. package/src/sap/ui/core/cldr/cs.json +469 -1
  126. package/src/sap/ui/core/cldr/cy.json +469 -1
  127. package/src/sap/ui/core/cldr/da.json +469 -1
  128. package/src/sap/ui/core/cldr/de.json +469 -1
  129. package/src/sap/ui/core/cldr/de_AT.json +469 -1
  130. package/src/sap/ui/core/cldr/de_CH.json +469 -1
  131. package/src/sap/ui/core/cldr/el.json +469 -1
  132. package/src/sap/ui/core/cldr/el_CY.json +469 -1
  133. package/src/sap/ui/core/cldr/en.json +469 -1
  134. package/src/sap/ui/core/cldr/en_AU.json +469 -1
  135. package/src/sap/ui/core/cldr/en_GB.json +469 -1
  136. package/src/sap/ui/core/cldr/en_HK.json +469 -1
  137. package/src/sap/ui/core/cldr/en_IE.json +469 -1
  138. package/src/sap/ui/core/cldr/en_IN.json +469 -1
  139. package/src/sap/ui/core/cldr/en_NZ.json +469 -1
  140. package/src/sap/ui/core/cldr/en_PG.json +469 -1
  141. package/src/sap/ui/core/cldr/en_SG.json +469 -1
  142. package/src/sap/ui/core/cldr/en_ZA.json +469 -1
  143. package/src/sap/ui/core/cldr/es.json +469 -1
  144. package/src/sap/ui/core/cldr/es_AR.json +469 -1
  145. package/src/sap/ui/core/cldr/es_BO.json +469 -1
  146. package/src/sap/ui/core/cldr/es_CL.json +469 -1
  147. package/src/sap/ui/core/cldr/es_CO.json +469 -1
  148. package/src/sap/ui/core/cldr/es_MX.json +469 -1
  149. package/src/sap/ui/core/cldr/es_PE.json +469 -1
  150. package/src/sap/ui/core/cldr/es_UY.json +469 -1
  151. package/src/sap/ui/core/cldr/es_VE.json +469 -1
  152. package/src/sap/ui/core/cldr/et.json +469 -1
  153. package/src/sap/ui/core/cldr/fa.json +469 -1
  154. package/src/sap/ui/core/cldr/fi.json +469 -1
  155. package/src/sap/ui/core/cldr/fr.json +469 -1
  156. package/src/sap/ui/core/cldr/fr_BE.json +469 -1
  157. package/src/sap/ui/core/cldr/fr_CA.json +469 -1
  158. package/src/sap/ui/core/cldr/fr_CH.json +469 -1
  159. package/src/sap/ui/core/cldr/fr_LU.json +469 -1
  160. package/src/sap/ui/core/cldr/he.json +469 -1
  161. package/src/sap/ui/core/cldr/hi.json +469 -1
  162. package/src/sap/ui/core/cldr/hr.json +469 -1
  163. package/src/sap/ui/core/cldr/hu.json +469 -1
  164. package/src/sap/ui/core/cldr/id.json +469 -1
  165. package/src/sap/ui/core/cldr/it.json +469 -1
  166. package/src/sap/ui/core/cldr/it_CH.json +469 -1
  167. package/src/sap/ui/core/cldr/ja.json +469 -1
  168. package/src/sap/ui/core/cldr/kk.json +469 -1
  169. package/src/sap/ui/core/cldr/ko.json +469 -1
  170. package/src/sap/ui/core/cldr/lt.json +469 -1
  171. package/src/sap/ui/core/cldr/lv.json +469 -1
  172. package/src/sap/ui/core/cldr/ms.json +469 -1
  173. package/src/sap/ui/core/cldr/nb.json +469 -1
  174. package/src/sap/ui/core/cldr/nl.json +469 -1
  175. package/src/sap/ui/core/cldr/nl_BE.json +469 -1
  176. package/src/sap/ui/core/cldr/pl.json +469 -1
  177. package/src/sap/ui/core/cldr/pt.json +469 -1
  178. package/src/sap/ui/core/cldr/pt_PT.json +469 -1
  179. package/src/sap/ui/core/cldr/ro.json +469 -1
  180. package/src/sap/ui/core/cldr/ru.json +469 -1
  181. package/src/sap/ui/core/cldr/ru_UA.json +469 -1
  182. package/src/sap/ui/core/cldr/sk.json +469 -1
  183. package/src/sap/ui/core/cldr/sl.json +469 -1
  184. package/src/sap/ui/core/cldr/sr.json +469 -1
  185. package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
  186. package/src/sap/ui/core/cldr/sv.json +469 -1
  187. package/src/sap/ui/core/cldr/th.json +469 -1
  188. package/src/sap/ui/core/cldr/tr.json +469 -1
  189. package/src/sap/ui/core/cldr/uk.json +469 -1
  190. package/src/sap/ui/core/cldr/vi.json +469 -1
  191. package/src/sap/ui/core/cldr/zh_CN.json +470 -2
  192. package/src/sap/ui/core/cldr/zh_HK.json +470 -2
  193. package/src/sap/ui/core/cldr/zh_SG.json +470 -2
  194. package/src/sap/ui/core/cldr/zh_TW.json +469 -1
  195. package/src/sap/ui/core/date/UniversalDateUtils.js +48 -48
  196. package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
  197. package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
  198. package/src/sap/ui/core/dnd/DragAndDrop.js +8 -6
  199. package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
  200. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  201. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  202. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  203. package/src/sap/ui/core/format/DateFormat.js +162 -92
  204. package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +3 -0
  205. package/src/sap/ui/core/format/NumberFormat.js +28 -28
  206. package/src/sap/ui/core/format/TimezoneUtil.js +50 -18
  207. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  208. package/src/sap/ui/core/library.js +135 -140
  209. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  210. package/src/sap/ui/core/message/Message.js +1 -1
  211. package/src/sap/ui/core/message/MessageManager.js +1 -1
  212. package/src/sap/ui/core/message/MessageParser.js +1 -1
  213. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  214. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  215. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  216. package/src/sap/ui/core/mvc/JSView.js +2 -2
  217. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  218. package/src/sap/ui/core/mvc/View.js +2 -1
  219. package/src/sap/ui/core/mvc/XMLView.js +19 -23
  220. package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -59
  221. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  222. package/src/sap/ui/core/plugin/LessSupport.js +3 -3
  223. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  224. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  225. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  226. package/src/sap/ui/core/routing/Router.js +1 -1
  227. package/src/sap/ui/core/rules/App.support.js +14 -9
  228. package/src/sap/ui/core/rules/Config.support.js +12 -12
  229. package/src/sap/ui/core/rules/Model.support.js +8 -8
  230. package/src/sap/ui/core/rules/Rendering.support.js +1 -1
  231. package/src/sap/ui/core/rules/Theming.support.js +4 -4
  232. package/src/sap/ui/core/rules/View.support.js +9 -9
  233. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  234. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  235. package/src/sap/ui/core/service/Service.js +1 -1
  236. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  237. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  238. package/src/sap/ui/core/support/Plugin.js +29 -1
  239. package/src/sap/ui/core/support/Support.js +2 -2
  240. package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
  241. package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
  242. package/src/sap/ui/core/support/plugins/ControlTree.js +440 -349
  243. package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
  244. package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
  245. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  246. package/src/sap/ui/core/support/plugins/Performance.js +10 -13
  247. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  248. package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
  249. package/src/sap/ui/core/support/plugins/Trace.js +7 -7
  250. package/src/sap/ui/core/support/plugins/ViewInfo.js +91 -43
  251. package/src/sap/ui/core/support/support.css +23 -23
  252. package/src/sap/ui/core/support/support.html +5 -7
  253. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
  254. package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
  255. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
  256. package/src/sap/ui/core/themes/base/base.less +419 -22
  257. package/src/sap/ui/core/themes/base/global.less +13 -9
  258. package/src/sap/ui/core/themes/base/shared.less +1 -0
  259. package/src/sap/ui/core/themes/sap_hcb/global.less +9 -5
  260. package/src/sap/ui/core/theming/Parameters.js +1 -1
  261. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  262. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  263. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  264. package/src/sap/ui/core/tmpl/Template.js +1 -1
  265. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  266. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  267. package/src/sap/ui/core/util/Export.js +1 -1
  268. package/src/sap/ui/core/util/ExportCell.js +1 -1
  269. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  270. package/src/sap/ui/core/util/ExportRow.js +1 -1
  271. package/src/sap/ui/core/util/ExportType.js +1 -1
  272. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  273. package/src/sap/ui/core/util/File.js +1 -1
  274. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  275. package/src/sap/ui/core/util/MockServer.js +2 -2
  276. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  277. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  278. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  279. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  280. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  281. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  282. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  283. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  284. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  285. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  286. package/src/sap/ui/core/ws/WebSocket.js +7 -8
  287. package/src/sap/ui/debug/ControlTree.js +1 -1
  288. package/src/sap/ui/debug/DebugEnv.js +1 -1
  289. package/src/sap/ui/debug/PropertyList.js +1 -1
  290. package/src/sap/ui/model/ClientListBinding.js +127 -21
  291. package/src/sap/ui/model/ClientModel.js +1 -1
  292. package/src/sap/ui/model/CompositeDataState.js +1 -1
  293. package/src/sap/ui/model/CompositeType.js +1 -1
  294. package/src/sap/ui/model/DataState.js +1 -1
  295. package/src/sap/ui/model/ListBinding.js +32 -13
  296. package/src/sap/ui/model/MetaModel.js +1 -1
  297. package/src/sap/ui/model/Model.js +10 -7
  298. package/src/sap/ui/model/SelectionModel.js +1 -1
  299. package/src/sap/ui/model/SimpleType.js +1 -1
  300. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  301. package/src/sap/ui/model/Type.js +1 -1
  302. package/src/sap/ui/model/_Helper.js +9 -5
  303. package/src/sap/ui/model/analytics/AnalyticalBinding.js +1 -1
  304. package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
  305. package/src/sap/ui/model/json/JSONListBinding.js +0 -58
  306. package/src/sap/ui/model/json/JSONModel.js +1 -1
  307. package/src/sap/ui/model/message/MessageListBinding.js +0 -42
  308. package/src/sap/ui/model/message/MessageModel.js +1 -1
  309. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  310. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  311. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  312. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  313. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  314. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +4 -3
  315. package/src/sap/ui/model/odata/ODataUtils.js +7 -9
  316. package/src/sap/ui/model/odata/OperationMode.js +6 -0
  317. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  318. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  319. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  320. package/src/sap/ui/model/odata/type/Date.js +1 -1
  321. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  322. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  323. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  324. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +39 -37
  325. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  326. package/src/sap/ui/model/odata/type/Double.js +1 -1
  327. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  328. package/src/sap/ui/model/odata/type/Int.js +1 -1
  329. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  330. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  331. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  332. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  333. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  334. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  335. package/src/sap/ui/model/odata/type/Single.js +1 -1
  336. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  337. package/src/sap/ui/model/odata/type/String.js +1 -1
  338. package/src/sap/ui/model/odata/type/Time.js +1 -1
  339. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  340. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  341. package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
  342. package/src/sap/ui/model/odata/v2/Context.js +72 -3
  343. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  344. package/src/sap/ui/model/odata/v2/ODataListBinding.js +191 -70
  345. package/src/sap/ui/model/odata/v2/ODataModel.js +107 -52
  346. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +11 -4
  347. package/src/sap/ui/model/odata/v4/Context.js +33 -4
  348. package/src/sap/ui/model/odata/v4/ODataBinding.js +12 -12
  349. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -2
  350. package/src/sap/ui/model/odata/v4/ODataListBinding.js +161 -106
  351. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
  352. package/src/sap/ui/model/odata/v4/ODataModel.js +118 -12
  353. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
  354. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
  355. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
  356. package/src/sap/ui/model/odata/v4/lib/_Cache.js +202 -138
  357. package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
  358. package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +12 -0
  359. package/src/sap/ui/model/odata/v4/lib/_Helper.js +110 -40
  360. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +148 -68
  361. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  362. package/src/sap/ui/model/type/Boolean.js +1 -1
  363. package/src/sap/ui/model/type/Currency.js +1 -1
  364. package/src/sap/ui/model/type/Date.js +1 -1
  365. package/src/sap/ui/model/type/DateInterval.js +1 -1
  366. package/src/sap/ui/model/type/DateTime.js +1 -1
  367. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  368. package/src/sap/ui/model/type/FileSize.js +1 -1
  369. package/src/sap/ui/model/type/Float.js +1 -1
  370. package/src/sap/ui/model/type/Integer.js +1 -1
  371. package/src/sap/ui/model/type/String.js +1 -1
  372. package/src/sap/ui/model/type/Time.js +1 -1
  373. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  374. package/src/sap/ui/model/type/Unit.js +1 -1
  375. package/src/sap/ui/model/xml/XMLListBinding.js +0 -53
  376. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  377. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  378. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  379. package/src/sap/ui/test/Opa5.js +9 -5
  380. package/src/sap/ui/test/TestUtils.js +2 -1
  381. package/src/sap/ui/test/actions/Action.js +3 -3
  382. package/src/sap/ui/test/actions/Press.js +1 -1
  383. package/src/sap/ui/test/generic/TestBase.js +1 -1
  384. package/src/sap/ui/test/gherkin/opa5TestHarness.js +14 -5
  385. package/src/sap/ui/test/opaQunit.js +11 -10
  386. package/src/sap/ui/util/Storage.js +1 -1
  387. package/src/ui5loader.js +8 -4
  388. package/ui5.yaml +1 -1
@@ -11,7 +11,6 @@ sap.ui.define([
11
11
  'sap/ui/core/LocaleData',
12
12
  'sap/ui/core/date/UniversalDate',
13
13
  'sap/ui/core/format/TimezoneUtil',
14
- 'sap/ui/core/format/DateFormatTimezoneDisplay',
15
14
  "sap/base/util/deepEqual",
16
15
  "sap/base/strings/formatMessage",
17
16
  "sap/base/Log",
@@ -23,7 +22,6 @@ sap.ui.define([
23
22
  LocaleData,
24
23
  UniversalDate,
25
24
  TimezoneUtil,
26
- DateFormatTimezoneDisplay,
27
25
  deepEqual,
28
26
  formatMessage,
29
27
  Log,
@@ -143,36 +141,49 @@ sap.ui.define([
143
141
  aIntervalCompareFields: ["Era", "FullYear", "Quarter", "Month", "Week", "Date", "DayPeriod", "Hours", "Minutes", "Seconds"]
144
142
  };
145
143
 
146
- DateFormat.oDateTimeWithTimezoneInfo = Object.assign({}, DateFormat.oDateTimeInfo, {
147
- type: mDateFormatTypes.DATETIME_WITH_TIMEZONE,
148
- // This function is used to transform the pattern of the fallbackFormatOptions to a timezone pattern
149
- // based on the showTimezone format option.
150
- getTimezonePattern: function(sPattern, sShowTimezone) {
151
- if (sShowTimezone === DateFormatTimezoneDisplay.Only) {
152
- return "VV";
153
- } else if (sShowTimezone === DateFormatTimezoneDisplay.Hide) {
154
- return sPattern;
155
- } else {
156
- return sPattern + " VV";
157
- }
158
- },
159
- getPattern: function(oLocaleData, sStyle, sCalendarType, sShowTimezone) {
160
- if (sShowTimezone === DateFormatTimezoneDisplay.Only) {
161
- return "VV";
162
- }
163
- if (sShowTimezone === DateFormatTimezoneDisplay.Hide) {
164
- return DateFormat.oDateTimeInfo.getPattern(oLocaleData, sStyle, sCalendarType);
165
- }
144
+ /**
145
+ * Retrieves info object for timezone instance
146
+ *
147
+ * @param {object} oFormatOptions the format options, relevant are: showDate, showTime and showTimezone
148
+ * @returns {object} info object
149
+ * @private
150
+ */
151
+ DateFormat._getDateTimeWithTimezoneInfo = function(oFormatOptions) {
152
+ var bShowDate = oFormatOptions.showDate === undefined || oFormatOptions.showDate;
153
+ var bShowTime = oFormatOptions.showTime === undefined || oFormatOptions.showTime;
154
+ var bShowTimezone = oFormatOptions.showTimezone === undefined || oFormatOptions.showTimezone;
155
+
156
+ var oBaselineType = DateFormat.oDateTimeInfo;
157
+ if (bShowDate && !bShowTime) {
158
+ oBaselineType = DateFormat.oDateInfo;
159
+ } else if (!bShowDate && bShowTime) {
160
+ oBaselineType = DateFormat.oTimeInfo;
161
+ }
162
+ return Object.assign({}, oBaselineType, {
163
+ type: mDateFormatTypes.DATETIME_WITH_TIMEZONE,
164
+ // This function is used to transform the pattern of the fallbackFormatOptions to a timezone pattern.
165
+ getTimezonePattern: function(sPattern) {
166
+ if (!bShowDate && !bShowTime && bShowTimezone) {
167
+ return "VV";
168
+ } else if (!bShowTimezone) {
169
+ return sPattern;
170
+ } else {
171
+ return sPattern + " VV";
172
+ }
173
+ },
174
+ getPattern: function(oLocaleData, sStyle, sCalendarType) {
175
+ if (!bShowDate && !bShowTime && bShowTimezone) {
176
+ return "VV";
177
+ }
178
+ if (!bShowTimezone) {
179
+ return oBaselineType.getPattern(oLocaleData, sStyle, sCalendarType);
180
+ }
166
181
 
167
- // If style is mixed ("medium/short") split it and pass both parts separately
168
- var iSlashIndex = sStyle.indexOf("/");
169
- if (iSlashIndex > 0) {
170
- return oLocaleData.getCombinedDateTimeWithTimezonePattern(sStyle.substr(0, iSlashIndex), sStyle.substr(iSlashIndex + 1), sCalendarType);
171
- } else {
172
- return oLocaleData.getCombinedDateTimeWithTimezonePattern(sStyle, sStyle, sCalendarType);
182
+ var sPattern = oBaselineType.getPattern(oLocaleData, sStyle, sCalendarType);
183
+ return oLocaleData.applyTimezonePattern(sPattern);
173
184
  }
174
- }
175
- });
185
+ });
186
+ };
176
187
 
177
188
  DateFormat.oTimeInfo = {
178
189
  type: mDateFormatTypes.TIME,
@@ -280,24 +291,24 @@ sap.ui.define([
280
291
  /**
281
292
  * Format a date object to a string according to the given timezone and format options.
282
293
  *
283
- * @example <caption>Format option showTimezone: Show (default)</caption>
294
+ * @example <caption>Format option showTimezone: true (default)</caption>
284
295
  * var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
285
296
  *
286
297
  * DateFormat.getDateTimeWithTimezoneInstance().format(oDate, "Europe/Berlin");
287
- * // output: "Dec 24, 2021, 2:37:00 PM Europe/Berlin"
298
+ * // output: "Dec 24, 2021, 2:37:00 PM Europe, Berlin"
288
299
  *
289
300
  * DateFormat.getDateTimeWithTimezoneInstance().format(oDate, "America/New_York");
290
- * // output: "Dec 24, 2021, 8:37:00 AM America/New_York"
301
+ * // output: "Dec 24, 2021, 8:37:00 AM Americas, New York"
291
302
  *
292
- * @example <caption>Format option showTimezone: Hide</caption>
303
+ * @example <caption>Format option showTimezone: false</caption>
293
304
  * var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
294
- * DateFormat.getDateTimeWithTimezoneInstance({showTimezone: "Hide"}).format(oDate, "America/New_York");
305
+ * DateFormat.getDateTimeWithTimezoneInstance({showTimezone: false}).format(oDate, "America/New_York");
295
306
  * // output: "Dec 24, 2021, 8:37:00 AM"
296
307
  *
297
- * @example <caption>Format option showTimezone: Only</caption>
308
+ * @example <caption>Format option showDate: false and showTime:false</caption>
298
309
  * var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
299
- * DateFormat.getDateTimeWithTimezoneInstance({showTimezone: "Only"}).format(oDate, "America/New_York");
300
- * // output: "America/New_York"
310
+ * DateFormat.getDateTimeWithTimezoneInstance({showDate: false, showTime: false}).format(oDate, "America/New_York");
311
+ * // output: "Americas, New York"
301
312
  *
302
313
  * @param {Date} oJSDate The date to format
303
314
  * @param {string} [sTimezone] The IANA timezone ID in which the date will be calculated and
@@ -309,30 +320,28 @@ sap.ui.define([
309
320
  * @function
310
321
  * @public
311
322
  * @since 1.99
312
- * @experimental As of 1.99.0 certain aspects of this API are not settled yet, i.e. the defaulting for the timezone parameter might change.
313
- * To be on the safe side, always call with a valid timezone.
314
323
  */
315
324
 
316
325
  /**
317
326
  * Parse a string which is formatted according to the given format options to an array
318
327
  * containing a date object and the timezone.
319
328
  *
320
- * @example <caption>Format option showTimezone: Show (default)</caption>
329
+ * @example <caption>Format option showTimezone: true (default)</caption>
321
330
  * var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
322
331
  *
323
- * DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 2:37:00 PM Europe/Berlin", "Europe/Berlin");
332
+ * DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 2:37:00 PM Europe, Berlin", "Europe/Berlin");
324
333
  * // output: [oDate, "Europe/Berlin"]
325
334
  *
326
- * DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 8:37:00 AM America/New_York", "America/New_York");
335
+ * DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 8:37:00 AM Americas, New York", "America/New_York");
327
336
  * // output: [oDate, "America/New_York"]
328
337
  *
329
- * @example <caption>Format option showTimezone: Hide</caption>
338
+ * @example <caption>Format option showTimezone: false</caption>
330
339
  * var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
331
- * DateFormat.getDateTimeWithTimezoneInstance({showTimezone: "Hide"}).parse("Dec 24, 2021, 8:37:00 AM", "America/New_York");
340
+ * DateFormat.getDateTimeWithTimezoneInstance({showTimezone: false}).parse("Dec 24, 2021, 8:37:00 AM", "America/New_York");
332
341
  * // output: [oDate, undefined]
333
342
  *
334
- * @example <caption>Format option showTimezone: Only</caption>
335
- * DateFormat.getDateTimeWithTimezoneInstance({showTimezone: "Only"}).parse("America/New_York", "America/New_York");
343
+ * @example <caption>Format option showDate: false and showTime: false</caption>
344
+ * DateFormat.getDateTimeWithTimezoneInstance({showDate: false, showTime: false}).parse("Americas, New York", "America/New_York");
336
345
  * // output: [undefined, "America/New_York"]
337
346
  *
338
347
  * @param {string} sValue the string containing a formatted date/time value
@@ -343,14 +352,19 @@ sap.ui.define([
343
352
  * e.g. for a month pattern of <code>MM</code> and a value range of [1-12]
344
353
  * <code>strict</code> ensures that the value is within the range;
345
354
  * if it is larger than <code>12</code> it cannot be parsed and <code>null</code> is returned
346
- * @throws {TypeError} Thrown if the parameter <code>sTimezone</code> is provided and has the wrong type.
355
+ * @throws {TypeError} Thrown if one of the following applies:
356
+ * <ul>
357
+ * <li>the <code>sTimezone</code> parameter is provided and has the wrong type</li>
358
+ * <li>only the time is shown (<code>showDate</code> is <code>false</code>), or only the
359
+ * date is shown (<code>showTime</code> is <code>false</code>)</li>
360
+ * </ul>
347
361
  * @return {Array} the parsed values
348
362
  * <ul>
349
- * <li>An array containing datetime and timezone depending on the showTimezone option
363
+ * <li>An array containing datetime and timezone depending on the showDate, showTime and showTimezone options
350
364
  * <ul>
351
- * <li>"Show": [Date, string], e.g. [new Date("2021-11-13T13:22:33Z"), "America/New_York"]</li>
352
- * <li>"Hide": [Date, undefined], e.g. [new Date("2021-11-13T13:22:33Z"), undefined]</li>
353
- * <li>"Only": [undefined, string], e.g. [undefined, "America/New_York"]</li>
365
+ * <li>(Default): [Date, string], e.g. [new Date("2021-11-13T13:22:33Z"), "America/New_York"]</li>
366
+ * <li><code>showTimezone: false</code>: [Date, undefined], e.g. [new Date("2021-11-13T13:22:33Z"), undefined]</li>
367
+ * <li><code>showDate: false, showTime: false</code>: [undefined, string], e.g. [undefined, "America/New_York"]</li>
354
368
  * </ul>
355
369
  * </li>
356
370
  * </ul>
@@ -359,8 +373,6 @@ sap.ui.define([
359
373
  * @name sap.ui.core.format.DateFormat.DateTimeWithTimezone.parse
360
374
  * @function
361
375
  * @since 1.99
362
- * @experimental As of 1.99.0 certain aspects of this API are not settled yet, i.e. the defaulting for the timezone parameter might change.
363
- * To be on the safe side, always call with a valid timezone.
364
376
  */
365
377
 
366
378
  /**
@@ -371,29 +383,52 @@ sap.ui.define([
371
383
  * The symbols must be in canonical order, that is: Era (G), Year (y/Y), Quarter (q/Q), Month (M/L), Week (w), Day-Of-Week (E/e/c), Day (d), Hour (h/H/k/K/j/J), Minute (m), Second (s), Timezone (z/Z/v/V/O/X/x)
372
384
  * See http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
373
385
  * @param {string} [oFormatOptions.pattern] a datetime pattern in LDML format. It is not verified whether the pattern represents a full datetime.
374
- * @param {sap.ui.core.format.DateFormatTimezoneDisplay} [oFormatOptions.showTimezone="Show"] Specifies the display of the timezone:
375
- * <ul>
376
- * <li>"Show": display both datetime and timezone</li>
377
- * <li>"Hide": display only datetime</li>
378
- * <li>"Only": display only timezone</li>
379
- * </ul>
386
+ * @param {boolean} [oFormatOptions.showDate=true] Specifies if the date should be displayed.
387
+ * It is ignored for formatting when an options pattern or a format are supplied.
388
+ * @param {boolean} [oFormatOptions.showTime=true] Specifies if the time should be displayed.
389
+ * It is ignored for formatting when an options pattern or a format are supplied.
390
+ * @param {boolean} [oFormatOptions.showTimezone=true] Specifies if the timezone should be displayed.
380
391
  * It is ignored for formatting when an options pattern or a format are supplied.
381
392
  * @param {string} [oFormatOptions.style] Can be either 'short, 'medium', 'long' or 'full'. For datetime you can also define mixed styles, separated with a slash, where the first part is the date style and the second part is the time style (e.g. "medium/short"). If no pattern is given, a locale-dependent default datetime pattern of that style from the LocaleData class is used.
382
393
  * @param {boolean} [oFormatOptions.strictParsing] Whether to check by parsing if the value is a valid datetime
383
394
  * @param {boolean} [oFormatOptions.relative] Whether the date is formatted relatively to today's date if it is within the given day range, e.g. "today", "yesterday", "in 5 days"
384
395
  * @param {int[]} [oFormatOptions.relativeRange] The day range used for relative formatting. If <code>oFormatOptions.relativeScale</code> is set to the default value 'day', the <code>relativeRange<code> is by default [-6, 6], which means that only the previous 6 and the following 6 days are formatted relatively. If <code>oFormatOptions.relativeScale</code> is set to 'auto', all dates are formatted relatively.
385
- * @param {string} [oFormatOptions.relativeScale="day"] If 'auto' is set, a new relative time format is switched on for all Date/Time instances.
396
+ * @param {string} [oFormatOptions.relativeScale] If 'auto' is set, a new relative time format is switched on for all Date/Time instances. The default value depends on <code>showDate</code> and <code>showTime</code> options.
386
397
  * @param {string} [oFormatOptions.relativeStyle="wide"] The style of the relative format. The valid values are "wide", "short", "narrow"
387
398
  * @param {sap.ui.core.CalendarType} [oFormatOptions.calendarType] The calendar type which is used to format and parse the date. This value is by default either set in the configuration or calculated based on the current locale.
388
399
  * @param {sap.ui.core.Locale} [oLocale] Locale to ask for locale-specific texts/settings
400
+ * @throws {TypeError} If an invalid configuration was supplied, i.e. when the
401
+ * <code>showDate</code>, <code>showTime</code>, and <code>showTimezone</code> format options
402
+ * are all <code>false</code>
389
403
  * @return {sap.ui.core.format.DateFormat.DateTimeWithTimezone} dateTimeWithTimezone instance of the DateFormat
390
404
  * @static
391
405
  * @public
392
406
  * @since 1.99.0
393
- * @experimental As of 1.99.0 certain aspects of this API are not settled yet, i.e. the defaulting for the timezone parameter might change.
394
407
  */
395
408
  DateFormat.getDateTimeWithTimezoneInstance = function(oFormatOptions, oLocale) {
396
- return this.createInstance(oFormatOptions, oLocale, this.oDateTimeWithTimezoneInfo);
409
+ // do not modify the input format options
410
+ if (oFormatOptions && !(oFormatOptions instanceof Locale)) {
411
+ oFormatOptions = Object.assign({}, oFormatOptions);
412
+ // translate old showTimezone values (backward compatibility)
413
+ if (typeof oFormatOptions.showTimezone === "string") {
414
+ var sShowTimezone = oFormatOptions.showTimezone;
415
+ if (oFormatOptions.showDate === undefined && oFormatOptions.showTime === undefined) {
416
+ if (sShowTimezone === "Hide") {
417
+ oFormatOptions.showTimezone = false;
418
+ } else if (sShowTimezone === "Only") {
419
+ oFormatOptions.showDate = false;
420
+ oFormatOptions.showTime = false;
421
+ }
422
+ }
423
+ oFormatOptions.showTimezone = sShowTimezone !== "Hide";
424
+ }
425
+ if (oFormatOptions.showDate === false
426
+ && oFormatOptions.showTime === false
427
+ && oFormatOptions.showTimezone === false) {
428
+ throw new TypeError("Invalid Configuration. One of the following format options must be true: showDate, showTime or showTimezone.");
429
+ }
430
+ }
431
+ return this.createInstance(oFormatOptions, oLocale, DateFormat._getDateTimeWithTimezoneInfo(oFormatOptions || {}));
397
432
  };
398
433
 
399
434
  /**
@@ -437,6 +472,8 @@ sap.ui.define([
437
472
  *
438
473
  * @param {object} [oFormatOptions] Object which defines the format options
439
474
  * @param {sap.ui.core.Locale} [oLocale] Locale to ask for locale specific texts/settings
475
+ * @param {object} [oInfo] Info information common to all instances of the created "type",
476
+ * e.g. default format options
440
477
  * @return {sap.ui.core.format.DateFormat} time instance of the DateFormat
441
478
  * @static
442
479
  * @private
@@ -469,6 +506,8 @@ sap.ui.define([
469
506
  oFormat.oFormatOptions.UTC = false;
470
507
  } else {
471
508
  oFormat.oFormatOptions.showTimezone = undefined;
509
+ oFormat.oFormatOptions.showDate = undefined;
510
+ oFormat.oFormatOptions.showTime = undefined;
472
511
  }
473
512
 
474
513
  // type cannot be changed and should be an instance property instead of a format option
@@ -482,7 +521,7 @@ sap.ui.define([
482
521
  if (oFormat.oFormatOptions.format) {
483
522
  oFormat.oFormatOptions.pattern = oFormat.oLocaleData.getCustomDateTimePattern(oFormat.oFormatOptions.format, oFormat.oFormatOptions.calendarType);
484
523
  } else {
485
- oFormat.oFormatOptions.pattern = oInfo.getPattern(oFormat.oLocaleData, oFormat.oFormatOptions.style, oFormat.oFormatOptions.calendarType, oFormat.oFormatOptions.showTimezone);
524
+ oFormat.oFormatOptions.pattern = oInfo.getPattern(oFormat.oLocaleData, oFormat.oFormatOptions.style, oFormat.oFormatOptions.calendarType);
486
525
  }
487
526
  }
488
527
 
@@ -539,7 +578,7 @@ sap.ui.define([
539
578
  aFallbackFormatOptions = oInfo.aFallbackFormatOptions;
540
579
  // Add two fallback patterns for locale-dependent short format without delimiters
541
580
  if (oInfo.bShortFallbackFormatOptions) {
542
- sPattern = oInfo.getPattern(oFormat.oLocaleData, "short", undefined, oFormat.oFormatOptions.showTimezone);
581
+ sPattern = oInfo.getPattern(oFormat.oLocaleData, "short");
543
582
  // add the options of fallback formats without delimiters to the fallback options array
544
583
  aFallbackFormatOptions = aFallbackFormatOptions.concat(DateFormat._createFallbackOptionsWithoutDelimiter(sPattern));
545
584
  }
@@ -551,7 +590,7 @@ sap.ui.define([
551
590
  }
552
591
 
553
592
  oFallbackFormats = DateFormat._createFallbackFormat(
554
- aFallbackFormatOptions, sCalendarType, oLocale, oInfo, oFormat.oFormatOptions.interval, oFormat.oFormatOptions.showTimezone
593
+ aFallbackFormatOptions, sCalendarType, oLocale, oInfo, oFormat.oFormatOptions
555
594
  );
556
595
  }
557
596
 
@@ -610,28 +649,31 @@ sap.ui.define([
610
649
  *
611
650
  * @param {Object[]} aFallbackFormatOptions the options for creating the fallback DateFormat
612
651
  * @param {sap.ui.core.CalendarType} sCalendarType the type of the current calendarType
613
- * @param {sap.ui.core.LocaleData} oLocale Locale to ask for locale specific texts/settings
652
+ * @param {sap.ui.core.Locale} oLocale Locale to ask for locale specific texts/settings
614
653
  * @param {Object} oInfo The default info object of the current date type
615
- * @param {boolean} bInterval Is an interval
616
- * @param {sap.ui.core.format.DateFormatTimezoneDisplay} sShowTimezone The showTimezone format option
654
+ * @param {object} oParentFormatOptions the format options, relevant are: interval, showDate, showTime and showTimezone
617
655
  * @return {sap.ui.core.DateFormat[]} an array of fallback DateFormat instances
656
+ * @private
618
657
  */
619
- DateFormat._createFallbackFormat = function(aFallbackFormatOptions, sCalendarType, oLocale, oInfo, bInterval, sShowTimezone) {
658
+ DateFormat._createFallbackFormat = function(aFallbackFormatOptions, sCalendarType, oLocale, oInfo, oParentFormatOptions) {
620
659
  return aFallbackFormatOptions.map(function(oOptions) {
621
660
  // The format options within the aFallbackFormatOptions array are static
622
661
  // and shouldn't be manipulated. Hence, cloning each format option is required.
623
662
  var oFormatOptions = Object.assign({}, oOptions);
624
663
 
625
- // Pass the showTimezone format option to the fallback instance.
626
- oFormatOptions.showTimezone = sShowTimezone;
664
+ // Pass the showDate, showTime and showTimezone format options to the fallback instance.
665
+ oFormatOptions.showDate = oParentFormatOptions.showDate;
666
+ oFormatOptions.showTime = oParentFormatOptions.showTime;
667
+ oFormatOptions.showTimezone = oParentFormatOptions.showTimezone;
627
668
 
628
- // the timezone instance's fallback patterns depend on the showTimezone format option which means they cannot be static,
669
+ // the timezone instance's fallback patterns depend on the showDate, showTime and
670
+ // showTimezone format option which means they cannot be static,
629
671
  // therefore they are generated using the getTimezonePattern function
630
672
  if (typeof oInfo.getTimezonePattern === "function" && oFormatOptions.pattern) {
631
- oFormatOptions.pattern = oInfo.getTimezonePattern(oFormatOptions.pattern, sShowTimezone);
673
+ oFormatOptions.pattern = oInfo.getTimezonePattern(oFormatOptions.pattern);
632
674
  }
633
675
 
634
- if (bInterval) {
676
+ if (oParentFormatOptions.interval) {
635
677
  oFormatOptions.interval = true;
636
678
  }
637
679
  oFormatOptions.calendarType = sCalendarType;
@@ -1787,7 +1829,9 @@ sap.ui.define([
1787
1829
  // e.g. America/New_York
1788
1830
  // @see http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
1789
1831
  if (!bUTC && oField.digits === 2) {
1790
- return sTimezone;
1832
+ // fallback for unknown but valid IANA timezone IDs (IANA is a living standard and the browser might support more, while the CLDR data is fixed)
1833
+ // such that the user can see, that there is no translation
1834
+ return oFormat.oLocaleData.getTimezoneTranslations()[sTimezone] || sTimezone;
1791
1835
  }
1792
1836
  return "";
1793
1837
  },
@@ -1799,20 +1843,35 @@ sap.ui.define([
1799
1843
 
1800
1844
  // VV - The long IANA timezone ID
1801
1845
  if (oPart.digits === 2) {
1802
- if (sValue === sTimezone) {
1803
- oTimezoneParsed.timezone = sTimezone;
1804
- oTimezoneParsed.length = sTimezone.length;
1805
- return oTimezoneParsed;
1846
+ var mTimezoneTranslations = oFormat.oLocaleData.getTimezoneTranslations();
1847
+
1848
+ // shortcut, first try the timezone parameter
1849
+ if (sValue === mTimezoneTranslations[sTimezone]) {
1850
+ return {
1851
+ timezone: sTimezone,
1852
+ length: sValue.length
1853
+ };
1806
1854
  }
1807
1855
 
1808
- // TODO: Support more pattern in regex like UTC or without the country part, checking for valid timezone
1809
- if (sValue) {
1810
- var rIanaTimezone = new RegExp("([A-Za-z_])+([\/][A-Za-z_]+)+");
1811
- var aResult = rIanaTimezone.exec(sValue);
1812
- if (aResult && aResult[0] && TimezoneUtil.isValidTimezone(aResult[0])) {
1813
- oTimezoneParsed.timezone = aResult[0];
1814
- oTimezoneParsed.length = aResult[0].length;
1815
- return oTimezoneParsed;
1856
+ var aTimezoneTranslations = Object.values(mTimezoneTranslations);
1857
+ var oTimezoneResult = oParseHelper.findEntry(sValue, aTimezoneTranslations, oFormat.oLocaleData.sCLDRLocaleId);
1858
+ if (oTimezoneResult.index !== -1) {
1859
+ return {
1860
+ timezone: Object.keys(mTimezoneTranslations)[oTimezoneResult.index],
1861
+ length: oTimezoneResult.length
1862
+ };
1863
+ }
1864
+
1865
+ // fallback for unknown but valid IANA timezone IDs (IANA is a living
1866
+ // standard and the browser might support more, while the CLDR data is fixed)
1867
+ // such that the user can see, that there is no translation
1868
+ var sCurrentValue = "";
1869
+ for (var i = 0; i < sValue.length; i++) {
1870
+ sCurrentValue += sValue[i];
1871
+
1872
+ if (TimezoneUtil.isValidTimezone(sCurrentValue)) {
1873
+ oTimezoneParsed.timezone = sCurrentValue;
1874
+ oTimezoneParsed.length = sCurrentValue.length;
1816
1875
  }
1817
1876
  }
1818
1877
  }
@@ -1940,7 +1999,7 @@ sap.ui.define([
1940
1999
  // Although an invalid date was given, the DATETIME_WITH_TIMEZONE instance might
1941
2000
  // have a pattern with the timezone (VV) inside then the IANA timezone ID is returned
1942
2001
  if (this.type === mDateFormatTypes.DATETIME_WITH_TIMEZONE && this.oFormatOptions.pattern.includes("VV")) {
1943
- return sTimezone;
2002
+ return this.oLocaleData.getTimezoneTranslations()[sTimezone] || sTimezone;
1944
2003
  }
1945
2004
  Log.error("The given date instance isn't valid.");
1946
2005
  return "";
@@ -2301,6 +2360,16 @@ sap.ui.define([
2301
2360
  * @public
2302
2361
  */
2303
2362
  DateFormat.prototype.parse = function(sValue, bUTC, bStrict) {
2363
+ // in order to convert a datetime to a timezone both the date and the time part are required.
2364
+ // If only one is present it cannot be guaranteed that the parsed result is correct, due to
2365
+ // daylight saving time which might shift hours and the timezone difference which might shift
2366
+ // days. For now only the date and time can be parsed using a timezone.
2367
+ var bShowDate = this.oFormatOptions.showDate === undefined || this.oFormatOptions.showDate;
2368
+ var bShowTime = this.oFormatOptions.showTime === undefined || this.oFormatOptions.showTime;
2369
+ if (this.type === mDateFormatTypes.DATETIME_WITH_TIMEZONE
2370
+ && (bShowDate && !bShowTime || !bShowDate && bShowTime)) {
2371
+ throw new TypeError("The input can only be parsed back to date if both date and time are supplied.");
2372
+ }
2304
2373
  var sTimezone;
2305
2374
  if (bUTC === undefined && this.type !== mDateFormatTypes.DATETIME_WITH_TIMEZONE) {
2306
2375
  bUTC = this.oFormatOptions.UTC;
@@ -2354,10 +2423,11 @@ sap.ui.define([
2354
2423
 
2355
2424
  if (oJSDate) {
2356
2425
  if (this.type === mDateFormatTypes.DATETIME_WITH_TIMEZONE) {
2357
- // fill fields according to showTimezone option and parsed values
2358
- if (this.oFormatOptions.showTimezone === DateFormatTimezoneDisplay.Hide) {
2426
+ var bShowTimezone = this.oFormatOptions.showTimezone === undefined || this.oFormatOptions.showTimezone;
2427
+ // fill fields according to showDate, showTime and showTimezone options and parsed values
2428
+ if (!bShowTimezone && bShowDate && bShowTime) {
2359
2429
  return [oJSDate, undefined];
2360
- } else if (this.oFormatOptions.showTimezone === DateFormatTimezoneDisplay.Only) {
2430
+ } else if (bShowTimezone && !bShowDate && !bShowTime) {
2361
2431
  return [undefined, oDateValue.timezone];
2362
2432
  }
2363
2433
  return [oJSDate, oDateValue.timezone || undefined];
@@ -17,6 +17,9 @@ sap.ui.define([], function() {
17
17
  * @since 1.99.0
18
18
  * @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel
19
19
  * @alias sap.ui.core.format.DateFormatTimezoneDisplay
20
+ * @deprecated As of version 1.101, replaced by
21
+ * <code>DateFormat#getDateTimeWithTimezoneInstance</code> with the <code>showDate</code>,
22
+ * <code>showTime</code> and <code>showTimezone</code> format options.
20
23
  */
21
24
  var DateFormatTimezoneDisplay = {
22
25