@openui5/sap.ui.core 1.115.1 → 1.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (685) hide show
  1. package/.dtsgenrc +18 -0
  2. package/.eslintrc.json +1 -11
  3. package/.reuse/dep5 +0 -5
  4. package/THIRDPARTY.txt +1 -7
  5. package/package.json +1 -1
  6. package/src/jquery.sap.global.js +1 -1
  7. package/src/jquery.sap.properties.js +1 -1
  8. package/src/jquery.sap.resources.js +1 -1
  9. package/src/jquery.sap.script.js +1 -1
  10. package/src/jquery.sap.sjax.js +2 -2
  11. package/src/jquery.sap.storage.js +3 -3
  12. package/src/sap/base/Event.js +106 -0
  13. package/src/sap/base/Eventing.js +319 -0
  14. package/src/sap/base/config/MemoryConfigurationProvider.js +10 -1
  15. package/src/sap/base/config.js +3 -2
  16. package/src/sap/base/i18n/Formatting.js +989 -0
  17. package/src/sap/base/i18n/LanguageTag.js +189 -0
  18. package/src/sap/base/i18n/Localization.js +710 -0
  19. package/src/sap/base/i18n/ResourceBundle.js +5 -20
  20. package/src/sap/base/i18n/date/CalendarType.js +54 -0
  21. package/src/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
  22. package/src/sap/base/i18n/date/TimezoneUtils.js +287 -0
  23. package/src/sap/base/util/JSTokenizer.js +1 -1
  24. package/src/sap/base/util/fetch.js +4 -4
  25. package/src/sap/base/util/mixedFetch.js +2 -2
  26. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  27. package/src/sap/base/util/restricted/_castArray.js +1 -1
  28. package/src/sap/base/util/restricted/_compact.js +1 -1
  29. package/src/sap/base/util/restricted/_curry.js +1 -1
  30. package/src/sap/base/util/restricted/_debounce.js +1 -1
  31. package/src/sap/base/util/restricted/_difference.js +1 -1
  32. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  33. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  34. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  35. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  36. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  37. package/src/sap/base/util/restricted/_flatten.js +1 -1
  38. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  39. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  40. package/src/sap/base/util/restricted/_intersection.js +1 -1
  41. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  42. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  43. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  44. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  45. package/src/sap/base/util/restricted/_isNil.js +1 -1
  46. package/src/sap/base/util/restricted/_max.js +1 -1
  47. package/src/sap/base/util/restricted/_merge.js +1 -1
  48. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  49. package/src/sap/base/util/restricted/_min.js +1 -1
  50. package/src/sap/base/util/restricted/_omit.js +1 -1
  51. package/src/sap/base/util/restricted/_pick.js +1 -1
  52. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  53. package/src/sap/base/util/restricted/_throttle.js +1 -1
  54. package/src/sap/base/util/restricted/_toArray.js +1 -1
  55. package/src/sap/base/util/restricted/_union.js +1 -1
  56. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  57. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  58. package/src/sap/base/util/restricted/_uniq.js +1 -1
  59. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  60. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  61. package/src/sap/base/util/restricted/_without.js +1 -1
  62. package/src/sap/base/util/restricted/_xor.js +1 -1
  63. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  64. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  65. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  66. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  67. package/src/sap/base/util/syncFetch.js +2 -2
  68. package/src/sap/ui/Device.js +3 -3
  69. package/src/sap/ui/Global.js +4 -4
  70. package/src/sap/ui/base/Event.js +6 -4
  71. package/src/sap/ui/base/EventProvider.js +4 -12
  72. package/src/sap/ui/base/Interface.js +1 -1
  73. package/src/sap/ui/base/ManagedObject.js +9 -15
  74. package/src/sap/ui/base/ManagedObjectMetadata.js +33 -12
  75. package/src/sap/ui/base/Metadata.js +1 -1
  76. package/src/sap/ui/base/Object.js +1 -1
  77. package/src/sap/ui/base/ObjectPool.js +1 -1
  78. package/src/sap/ui/base/SyncPromise.js +10 -5
  79. package/src/sap/ui/core/.library +3 -3
  80. package/src/sap/ui/core/AccessKeysEnablement.js +10 -5
  81. package/src/sap/ui/core/AnimationMode.js +49 -0
  82. package/src/sap/ui/core/BusyIndicator.js +33 -42
  83. package/src/sap/ui/core/CalendarType.js +11 -37
  84. package/src/sap/ui/core/Component.js +4 -5
  85. package/src/sap/ui/core/ComponentContainer.js +1 -1
  86. package/src/sap/ui/core/ComponentMetadata.js +2 -2
  87. package/src/sap/ui/core/ComponentSupport.js +1 -1
  88. package/src/sap/ui/core/ConfigTest.js +17 -0
  89. package/src/sap/ui/core/Configuration.js +409 -1282
  90. package/src/sap/ui/core/Control.js +7 -12
  91. package/src/sap/ui/core/ControlBehavior.js +157 -0
  92. package/src/sap/ui/core/Core.js +126 -132
  93. package/src/sap/ui/core/CustomData.js +1 -1
  94. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  95. package/src/sap/ui/core/Element.js +14 -3
  96. package/src/sap/ui/core/ElementMetadata.js +2 -4
  97. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  98. package/src/sap/ui/core/EventBus.js +1 -1
  99. package/src/sap/ui/core/Fragment.js +1 -1
  100. package/src/sap/ui/core/HTML.js +1 -1
  101. package/src/sap/ui/core/History.js +1 -1
  102. package/src/sap/ui/core/Icon.js +1 -1
  103. package/src/sap/ui/core/IconPool.js +1 -2
  104. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  105. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  106. package/src/sap/ui/core/InvisibleMessage.js +5 -7
  107. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  108. package/src/sap/ui/core/InvisibleText.js +12 -12
  109. package/src/sap/ui/core/Item.js +1 -1
  110. package/src/sap/ui/core/LabelEnablement.js +1 -1
  111. package/src/sap/ui/core/LayoutData.js +1 -1
  112. package/src/sap/ui/core/Lib.js +126 -38
  113. package/src/sap/ui/core/ListItem.js +1 -1
  114. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  115. package/src/sap/ui/core/Locale.js +154 -430
  116. package/src/sap/ui/core/LocaleData.js +50 -14
  117. package/src/sap/ui/core/Manifest.js +5 -5
  118. package/src/sap/ui/core/Message.js +1 -1
  119. package/src/sap/ui/core/Popup.js +37 -50
  120. package/src/sap/ui/core/RenderManager.js +1 -1
  121. package/src/sap/ui/core/Renderer.js +1 -1
  122. package/src/sap/ui/core/Rendering.js +1 -1
  123. package/src/sap/ui/core/ResizeHandler.js +1 -1
  124. package/src/sap/ui/core/ScrollBar.js +1 -1
  125. package/src/sap/ui/core/SeparatorItem.js +1 -1
  126. package/src/sap/ui/core/Shortcut.js +11 -9
  127. package/src/sap/ui/core/StaticArea.js +31 -17
  128. package/src/sap/ui/core/Theming.js +458 -0
  129. package/src/sap/ui/core/Title.js +1 -1
  130. package/src/sap/ui/core/TooltipBase.js +1 -1
  131. package/src/sap/ui/core/UIArea.js +1 -1
  132. package/src/sap/ui/core/UIComponent.js +1 -1
  133. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  134. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  135. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  136. package/src/sap/ui/core/XMLComposite.js +1 -1
  137. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  138. package/src/sap/ui/core/XMLTemplateProcessor.js +28 -5
  139. package/src/sap/ui/core/_IconRegistry.js +89 -12
  140. package/src/sap/ui/core/boot/_bootConfig.js +137 -0
  141. package/src/sap/ui/core/boot/_runBoot.js +16 -0
  142. package/src/sap/ui/core/boot/initDOM.js +96 -0
  143. package/src/sap/ui/core/boot/loadCalendar.js +50 -0
  144. package/src/sap/ui/core/boot/loadManifest.js +55 -0
  145. package/src/sap/ui/core/boot/loadModules.js +80 -0
  146. package/src/sap/ui/core/boot/manifest.json +11 -0
  147. package/src/sap/ui/core/boot/onInit.js +44 -0
  148. package/src/sap/ui/core/boot.js +107 -0
  149. package/src/sap/ui/core/date/CalendarWeekNumbering.js +12 -83
  150. package/src/sap/ui/core/date/UI5Date.js +10 -4
  151. package/src/sap/ui/core/delegate/ItemNavigation.js +8 -10
  152. package/src/sap/ui/core/delegate/ScrollEnablement.js +5 -5
  153. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  154. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  155. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  156. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  157. package/src/sap/ui/core/format/DateFormat.js +33 -27
  158. package/src/sap/ui/core/format/TimezoneUtil.js +15 -273
  159. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  160. package/src/sap/ui/core/library.js +32 -6
  161. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  162. package/src/sap/ui/core/message/Message.js +1 -1
  163. package/src/sap/ui/core/message/MessageManager.js +1 -1
  164. package/src/sap/ui/core/message/MessageMixin.js +6 -5
  165. package/src/sap/ui/core/message/MessageParser.js +1 -1
  166. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  167. package/src/sap/ui/core/messagebundle_ar.properties +57 -55
  168. package/src/sap/ui/core/messagebundle_bg.properties +57 -55
  169. package/src/sap/ui/core/messagebundle_ca.properties +30 -28
  170. package/src/sap/ui/core/messagebundle_cs.properties +44 -42
  171. package/src/sap/ui/core/messagebundle_cy.properties +59 -57
  172. package/src/sap/ui/core/messagebundle_da.properties +57 -55
  173. package/src/sap/ui/core/messagebundle_de.properties +59 -57
  174. package/src/sap/ui/core/messagebundle_el.properties +48 -46
  175. package/src/sap/ui/core/messagebundle_en.properties +59 -57
  176. package/src/sap/ui/core/messagebundle_en_GB.properties +59 -57
  177. package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +2 -0
  178. package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +2 -0
  179. package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +3 -0
  180. package/src/sap/ui/core/messagebundle_es.properties +48 -46
  181. package/src/sap/ui/core/messagebundle_es_MX.properties +58 -56
  182. package/src/sap/ui/core/messagebundle_et.properties +55 -53
  183. package/src/sap/ui/core/messagebundle_fi.properties +51 -49
  184. package/src/sap/ui/core/messagebundle_fr.properties +36 -34
  185. package/src/sap/ui/core/messagebundle_fr_CA.properties +21 -19
  186. package/src/sap/ui/core/messagebundle_hi.properties +42 -40
  187. package/src/sap/ui/core/messagebundle_hr.properties +57 -55
  188. package/src/sap/ui/core/messagebundle_hu.properties +58 -56
  189. package/src/sap/ui/core/messagebundle_id.properties +59 -57
  190. package/src/sap/ui/core/messagebundle_it.properties +75 -73
  191. package/src/sap/ui/core/messagebundle_iw.properties +59 -57
  192. package/src/sap/ui/core/messagebundle_ja.properties +50 -48
  193. package/src/sap/ui/core/messagebundle_kk.properties +44 -42
  194. package/src/sap/ui/core/messagebundle_ko.properties +20 -18
  195. package/src/sap/ui/core/messagebundle_lt.properties +59 -57
  196. package/src/sap/ui/core/messagebundle_lv.properties +59 -57
  197. package/src/sap/ui/core/messagebundle_ms.properties +60 -58
  198. package/src/sap/ui/core/messagebundle_nl.properties +58 -56
  199. package/src/sap/ui/core/messagebundle_no.properties +56 -54
  200. package/src/sap/ui/core/messagebundle_pl.properties +56 -54
  201. package/src/sap/ui/core/messagebundle_pt.properties +58 -56
  202. package/src/sap/ui/core/messagebundle_pt_PT.properties +58 -56
  203. package/src/sap/ui/core/messagebundle_ro.properties +59 -57
  204. package/src/sap/ui/core/messagebundle_ru.properties +57 -55
  205. package/src/sap/ui/core/messagebundle_sh.properties +59 -57
  206. package/src/sap/ui/core/messagebundle_sk.properties +57 -55
  207. package/src/sap/ui/core/messagebundle_sl.properties +58 -56
  208. package/src/sap/ui/core/messagebundle_sv.properties +54 -52
  209. package/src/sap/ui/core/messagebundle_th.properties +18 -16
  210. package/src/sap/ui/core/messagebundle_tr.properties +58 -56
  211. package/src/sap/ui/core/messagebundle_uk.properties +59 -57
  212. package/src/sap/ui/core/messagebundle_vi.properties +59 -57
  213. package/src/sap/ui/core/messagebundle_zh_CN.properties +58 -56
  214. package/src/sap/ui/core/messagebundle_zh_TW.properties +58 -56
  215. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  216. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  217. package/src/sap/ui/core/mvc/JSView.js +1 -1
  218. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  219. package/src/sap/ui/core/mvc/View.js +1 -1
  220. package/src/sap/ui/core/mvc/XMLView.js +14 -2
  221. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  222. package/src/sap/ui/core/plugin/LessSupport.js +14 -16
  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/HashChanger.js +1 -0
  227. package/src/sap/ui/core/routing/Route.js +1 -0
  228. package/src/sap/ui/core/routing/Router.js +3 -1
  229. package/src/sap/ui/core/rules/Config.support.js +2 -2
  230. package/src/sap/ui/core/rules/Misc.support.js +1 -1
  231. package/src/sap/ui/core/rules/Model.support.js +3 -1
  232. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  233. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  234. package/src/sap/ui/core/service/Service.js +1 -1
  235. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  236. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  237. package/src/sap/ui/core/support/Plugin.js +1 -1
  238. package/src/sap/ui/core/support/Support.js +7 -4
  239. package/src/sap/ui/core/support/controls/TimelineOverview.js +1 -1
  240. package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
  241. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  242. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  243. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  244. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  245. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  246. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  247. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  248. package/src/sap/ui/core/themes/base/Icon.less +2 -2
  249. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +4 -4
  250. package/src/sap/ui/core/themes/base/base.less +41 -20
  251. package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
  252. package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
  253. package/src/sap/ui/core/theming/Parameters.js +6 -10
  254. package/src/sap/ui/core/theming/ThemeManager.js +312 -450
  255. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  256. package/src/sap/ui/core/tmpl/DOMElement.js +5 -10
  257. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  258. package/src/sap/ui/core/tmpl/Template.js +1 -1
  259. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  260. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  261. package/src/sap/ui/core/util/Export.js +1 -1
  262. package/src/sap/ui/core/util/ExportCell.js +1 -1
  263. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  264. package/src/sap/ui/core/util/ExportRow.js +1 -1
  265. package/src/sap/ui/core/util/ExportType.js +1 -1
  266. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  267. package/src/sap/ui/core/util/File.js +1 -1
  268. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  269. package/src/sap/ui/core/util/MockServer.js +4 -5
  270. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  271. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +3 -1
  272. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  273. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  274. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  275. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  276. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  277. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  278. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  279. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  280. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  281. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  282. package/src/sap/ui/debug/ControlTree.js +1 -1
  283. package/src/sap/ui/debug/DebugEnv.js +1 -1
  284. package/src/sap/ui/debug/PropertyList.js +1 -1
  285. package/src/sap/ui/events/PseudoEvents.js +17 -9
  286. package/src/sap/ui/model/Binding.js +19 -15
  287. package/src/sap/ui/model/ClientModel.js +1 -1
  288. package/src/sap/ui/model/CompositeBinding.js +57 -19
  289. package/src/sap/ui/model/CompositeDataState.js +1 -1
  290. package/src/sap/ui/model/CompositeType.js +1 -1
  291. package/src/sap/ui/model/DataState.js +1 -1
  292. package/src/sap/ui/model/ListBinding.js +42 -1
  293. package/src/sap/ui/model/MetaModel.js +1 -1
  294. package/src/sap/ui/model/Model.js +5 -4
  295. package/src/sap/ui/model/PropertyBinding.js +10 -0
  296. package/src/sap/ui/model/SelectionModel.js +1 -1
  297. package/src/sap/ui/model/SimpleType.js +4 -1
  298. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  299. package/src/sap/ui/model/Type.js +1 -1
  300. package/src/sap/ui/model/analytics/AnalyticalBinding.js +166 -79
  301. package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +4 -3
  302. package/src/sap/ui/model/analytics/BatchResponseCollector.js +2 -2
  303. package/src/sap/ui/model/analytics/ODataModelAdapter.js +14 -27
  304. package/src/sap/ui/model/analytics/odata4analytics.js +6 -12
  305. package/src/sap/ui/model/base/ManagedObjectModel.js +3 -2
  306. package/src/sap/ui/model/json/JSONModel.js +6 -1
  307. package/src/sap/ui/model/message/MessageModel.js +1 -1
  308. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  309. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  310. package/src/sap/ui/model/odata/ODataMetaModel.js +191 -5
  311. package/src/sap/ui/model/odata/ODataMetadata.js +38 -4
  312. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  313. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  314. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  315. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  316. package/src/sap/ui/model/odata/type/Date.js +1 -1
  317. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  318. package/src/sap/ui/model/odata/type/DateTimeBase.js +8 -1
  319. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  320. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  321. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  322. package/src/sap/ui/model/odata/type/Double.js +1 -1
  323. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  324. package/src/sap/ui/model/odata/type/Int.js +1 -1
  325. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  326. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  327. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  328. package/src/sap/ui/model/odata/type/ODataType.js +3 -3
  329. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  330. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  331. package/src/sap/ui/model/odata/type/Single.js +1 -1
  332. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  333. package/src/sap/ui/model/odata/type/String.js +1 -1
  334. package/src/sap/ui/model/odata/type/Time.js +1 -1
  335. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  336. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  337. package/src/sap/ui/model/odata/v2/Context.js +3 -2
  338. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  339. package/src/sap/ui/model/odata/v2/ODataListBinding.js +14 -3
  340. package/src/sap/ui/model/odata/v2/ODataModel.js +46 -32
  341. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
  342. package/src/sap/ui/model/odata/v4/AnnotationHelper.js +4 -4
  343. package/src/sap/ui/model/odata/v4/Context.js +39 -32
  344. package/src/sap/ui/model/odata/v4/ODataBinding.js +85 -52
  345. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +23 -19
  346. package/src/sap/ui/model/odata/v4/ODataListBinding.js +139 -50
  347. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +30 -36
  348. package/src/sap/ui/model/odata/v4/ODataModel.js +49 -44
  349. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +72 -37
  350. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +34 -29
  351. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +95 -9
  352. package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +25 -27
  353. package/src/sap/ui/model/odata/v4/lib/_Cache.js +95 -209
  354. package/src/sap/ui/model/odata/v4/lib/_Helper.js +168 -1
  355. package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +14 -5
  356. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +34 -19
  357. package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +4 -4
  358. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
  359. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  360. package/src/sap/ui/model/type/Boolean.js +1 -1
  361. package/src/sap/ui/model/type/Currency.js +1 -1
  362. package/src/sap/ui/model/type/Date.js +1 -1
  363. package/src/sap/ui/model/type/DateInterval.js +1 -1
  364. package/src/sap/ui/model/type/DateTime.js +1 -1
  365. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  366. package/src/sap/ui/model/type/FileSize.js +1 -1
  367. package/src/sap/ui/model/type/Float.js +1 -1
  368. package/src/sap/ui/model/type/Integer.js +1 -1
  369. package/src/sap/ui/model/type/String.js +1 -1
  370. package/src/sap/ui/model/type/Time.js +1 -1
  371. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  372. package/src/sap/ui/model/type/Unit.js +1 -1
  373. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  374. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  375. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  376. package/src/sap/ui/test/Opa5.js +1 -1
  377. package/src/sap/ui/test/TestUtils.js +1 -1
  378. package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
  379. package/src/sap/ui/test/generic/TestBase.js +1 -1
  380. package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +1 -3
  381. package/src/sap/ui/test/gherkin/simpleGherkinParser.js +10 -5
  382. package/src/sap/ui/test/matchers/LabelFor.js +1 -0
  383. package/src/sap/ui/test/matchers/_Visitor.js +6 -1
  384. package/src/sap/ui/test/starter/_setupAndStart.js +2 -5
  385. package/src/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
  386. package/src/sap/ui/thirdparty/qunit-2.js +9 -3
  387. package/src/sap/ui/util/ActivityDetection.js +7 -1
  388. package/src/sap/ui/util/Mobile.js +21 -14
  389. package/src/sap/ui/util/Storage.js +1 -1
  390. package/src/sap-ui-boot.js +23 -6
  391. package/src/ui5-boot.js +50 -0
  392. package/src/ui5loader-autoconfig.js +150 -75
  393. package/src/ui5loader.js +458 -514
  394. package/test/sap/ui/core/Device.js +1 -1
  395. package/test/sap/ui/core/FormatHelper.js +3 -2
  396. package/test/sap/ui/core/demokit/docuindex.json +6 -0
  397. package/test/sap/ui/core/demokit/sample/OpaAction/applicationUnderTest/view/Main.view.xml +1 -0
  398. package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/OpaBusyIndicator.js +1 -1
  399. package/test/sap/ui/core/demokit/sample/OpaMatchers/OpaMatchers.js +2 -2
  400. package/test/sap/ui/core/demokit/sample/ViewTemplate/types/MIT.ODataTypes.html +9 -14
  401. package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js +7 -0
  402. package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +2 -2
  403. package/test/sap/ui/core/demokit/sample/common/pages/Any.js +1 -1
  404. package/test/sap/ui/core/demokit/sample/odata/v2/AutoExpand/AutoExpand.view.xml +24 -5
  405. package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.view.xml +24 -6
  406. package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/DataAggregation.view.xml +20 -5
  407. package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/Opa.qunit.js +2 -1
  408. package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/filter.js +2 -2
  409. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Component.js +27 -0
  410. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.controller.js +43 -0
  411. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.view.xml +47 -0
  412. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.controller.js +27 -0
  413. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.view.xml +7 -0
  414. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/NotFound.view.xml +8 -0
  415. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.controller.js +123 -0
  416. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.view.xml +92 -0
  417. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.html +27 -0
  418. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.js +70 -0
  419. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/README.html +55 -0
  420. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/SandboxModel.js +56 -0
  421. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/POST-SalesOrderList.json +66 -0
  422. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000')-SO_2_SOITEM.json +57 -0
  423. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000').json +20 -0
  424. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000001').json +9 -0
  425. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000007')-SO_2_BP.json +12 -0
  426. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList.json +62 -0
  427. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.json +85 -0
  428. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.xml +185 -0
  429. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.json +93 -0
  430. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.xml +262 -0
  431. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/metadata.xml +1779 -0
  432. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/manifest.json +134 -0
  433. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/pages/Main.js +119 -0
  434. package/test/sap/ui/core/demokit/sample/odata/v4/Draft/Opa.qunit.js +2 -1
  435. package/test/sap/ui/core/demokit/sample/odata/v4/FieldGroups/Opa.qunit.js +2 -1
  436. package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.view.xml +4 -1
  437. package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Opa.qunit.js +2 -1
  438. package/test/sap/ui/core/demokit/sample/odata/v4/GridTable/GridTable.view.xml +12 -3
  439. package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Main.controller.js +2 -1
  440. package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.OptimisticBatch.qunit.js +2 -1
  441. package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.qunit.js +2 -1
  442. package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Opa.qunit.js +2 -1
  443. package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/Opa.qunit.js +2 -1
  444. package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +2 -1
  445. package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +0 -41
  446. package/test/sap/ui/core/demokit/sample/odata/v4/Products/Opa.qunit.js +2 -1
  447. package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +26 -8
  448. package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/data/metadata.xml +4 -0
  449. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/Opa.qunit.js +2 -1
  450. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/manifest.json +1 -1
  451. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/Opa.qunit.js +2 -1
  452. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/manifest.json +1 -1
  453. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.controller.js +5 -17
  454. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Opa.qunit.js +2 -1
  455. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/pages/Main.js +18 -0
  456. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/Create.js +10 -6
  457. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/Opa.qunit.js +2 -1
  458. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/manifest.json +18 -0
  459. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/Opa.qunit.js +2 -1
  460. package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.view.xml +3 -3
  461. package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Opa.qunit.js +2 -1
  462. package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/pages/Main.js +4 -1
  463. package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/Opa.qunit.js +2 -1
  464. package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/controller/App.controller.js +1 -6
  465. package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/localService/mockserver.js +1 -0
  466. package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/controller/App.controller.js +1 -6
  467. package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/localService/mockserver.js +1 -0
  468. package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/controller/App.controller.js +1 -6
  469. package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/localService/mockserver.js +1 -0
  470. package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/test/integration/arrangements/Startup.js +1 -1
  471. package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/controller/App.controller.js +1 -6
  472. package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/localService/mockserver.js +1 -0
  473. package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/controller/App.controller.js +3 -8
  474. package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/localService/mockserver.js +1 -0
  475. package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/controller/App.controller.js +3 -8
  476. package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/localService/mockserver.js +1 -0
  477. package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/test/integration/arrangements/Startup.js +1 -1
  478. package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +25 -7
  479. package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +86 -2
  480. package/test/sap/ui/core/qunit/DataState.qunit.js +2 -7
  481. package/test/sap/ui/core/qunit/HTML.qunit.js +31 -31
  482. package/test/sap/ui/core/qunit/IconPool.qunit.js +53 -4
  483. package/test/sap/ui/core/qunit/Lib.qunit.js +55 -2
  484. package/test/sap/ui/core/qunit/LocalBusyIndicator.qunit.js +22 -15
  485. package/test/sap/ui/core/qunit/ManagedObject.qunit.js +5 -3
  486. package/test/sap/ui/core/qunit/ManagedObjectModel.qunit.js +43 -5
  487. package/test/sap/ui/core/qunit/Object.qunit.js +4 -1
  488. package/test/sap/ui/core/qunit/ThemeManager.qunit.js +2 -2
  489. package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +9 -3
  490. package/test/sap/ui/core/qunit/Theming.beforeBootstrap.qunit.js +13 -0
  491. package/test/sap/ui/core/qunit/Theming.qunit.js +247 -0
  492. package/test/sap/ui/core/qunit/analytics/AnalyticalBinding.qunit.js +510 -185
  493. package/test/sap/ui/core/qunit/analytics/AnalyticalTreeBindingAdapter.qunit.js +2 -7
  494. package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +81 -16
  495. package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +20 -29
  496. package/test/sap/ui/core/qunit/app/MessageListBinding.qunit.js +2 -7
  497. package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +18 -1
  498. package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +24 -0
  499. package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +277 -0
  500. package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +282 -0
  501. package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +5 -6
  502. package/test/sap/ui/core/qunit/base/security/sanitizeHTML.qunit.js +17 -0
  503. package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +1 -2
  504. package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +13 -12
  505. package/test/sap/ui/core/qunit/bootstrap/Configuration.main.qunit.js +11 -0
  506. package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.html +4 -3
  507. package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +451 -281
  508. package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +19 -30
  509. package/test/sap/ui/core/qunit/component/Models.qunit.js +12 -30
  510. package/test/sap/ui/core/qunit/component/Models_unavoidablySync.qunit.js +8 -26
  511. package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.js +2 -2
  512. package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.json +1 -1
  513. package/test/sap/ui/core/qunit/component/testdata/async/lib2/library.js +2 -2
  514. package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.js +2 -2
  515. package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.json +1 -1
  516. package/test/sap/ui/core/qunit/component/testdata/async/lib3/library.js +2 -2
  517. package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.js +2 -2
  518. package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.json +1 -1
  519. package/test/sap/ui/core/qunit/component/testdata/async/lib4/library.js +2 -2
  520. package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component-preload.js +1 -1
  521. package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component.js +2 -2
  522. package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component-preload.js +1 -1
  523. package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component.js +2 -2
  524. package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component-preload.js +1 -1
  525. package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component.js +2 -3
  526. package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/Component.js +0 -4
  527. package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/sync/Component.js +2 -6
  528. package/test/sap/ui/core/qunit/component/testdata/customizing/customersub/Component.js +0 -4
  529. package/test/sap/ui/core/qunit/component/testdata/inherit/Component.js +2 -7
  530. package/test/sap/ui/core/qunit/component/testdata/inherit/parent/Component.js +2 -7
  531. package/test/sap/ui/core/qunit/component/testdata/inheritAsync/Component.js +2 -2
  532. package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentA/Component.js +2 -2
  533. package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentB/Component.js +2 -2
  534. package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/Component.js +2 -2
  535. package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentA/Component.js +2 -2
  536. package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentB/Component.js +2 -2
  537. package/test/sap/ui/core/qunit/component/testdata/other/Component.js +2 -7
  538. package/test/sap/ui/core/qunit/component/testdata/terminologies/Component.js +2 -2
  539. package/test/sap/ui/core/qunit/component/testdata/terminologies/component1/Component.js +2 -2
  540. package/test/sap/ui/core/qunit/component/testdata/terminologies/component2/Component.js +2 -2
  541. package/test/sap/ui/core/qunit/component/testdata/terminologies/component3/Component.js +2 -2
  542. package/test/sap/ui/core/qunit/component/testdata/terminologies/component5/Component.js +2 -2
  543. package/test/sap/ui/core/qunit/component/testdata/terminologies/reuse/Component.js +2 -3
  544. package/test/sap/ui/core/qunit/component/testdata/v1/Component.js +2 -7
  545. package/test/sap/ui/core/qunit/component/testdata/v1empty/Component.js +2 -7
  546. package/test/sap/ui/core/qunit/component/testdata/v1inline/Component.js +2 -5
  547. package/test/sap/ui/core/qunit/component/testdata/v1missing/Component.js +2 -7
  548. package/test/sap/ui/core/qunit/component/testdata/v2/Component.js +2 -5
  549. package/test/sap/ui/core/qunit/component/testdata/v2asyncRootView/Component.js +2 -5
  550. package/test/sap/ui/core/qunit/component/testdata/v2empty/Component.js +2 -9
  551. package/test/sap/ui/core/qunit/component/testdata/v2inline/Component.js +2 -5
  552. package/test/sap/ui/core/qunit/component/testdata/v2missing/Component.js +2 -9
  553. package/test/sap/ui/core/qunit/component/testdata/v2version/Component.js +2 -2
  554. package/test/sap/ui/core/qunit/dnd/DragDropInfo.qunit.js +1 -2
  555. package/test/sap/ui/core/qunit/generic/EnforceSemanticRendering.qunit.js +2 -2
  556. package/test/sap/ui/core/qunit/generic/SettersContextReturn.qunit.js +2 -2
  557. package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +2 -0
  558. package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +2 -0
  559. package/test/sap/ui/core/qunit/generic/legacy/SettersContextReturn.qunit.js +2 -2
  560. package/test/sap/ui/core/qunit/gherkin/dataTableUtils.qunit.js +2 -2
  561. package/test/sap/ui/core/qunit/i18n/Locale.qunit.js +0 -52
  562. package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +49 -14
  563. package/test/sap/ui/core/qunit/i18n/UI5Date.qunit.js +16 -4
  564. package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +74 -114
  565. package/test/sap/ui/core/qunit/i18n/UniversalDateUtils.qunit.js +34 -39
  566. package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +18 -0
  567. package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
  568. package/test/sap/ui/core/qunit/internal/BeforePush.ODataV4.js +28 -0
  569. package/test/sap/ui/core/qunit/internal/BeforePush.html +1 -0
  570. package/test/sap/ui/core/qunit/internal/BeforePush.js +15 -0
  571. package/test/sap/ui/core/qunit/internal/performance/ExpressionParser.performance.qunit.js +1 -0
  572. package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +2 -7
  573. package/test/sap/ui/core/qunit/json/JSONPropertyBinding.qunit.js +7 -12
  574. package/test/sap/ui/core/qunit/json/JSONTwoWay.qunit.js +3 -8
  575. package/test/sap/ui/core/qunit/loader/asyncMode.qunit.js +2 -2
  576. package/test/sap/ui/core/qunit/loader/asyncMode_unavoidablySync.qunit.js +1 -1
  577. package/test/sap/ui/core/qunit/loader/fixture/amd-with-export-true/module1.js +2 -2
  578. package/test/sap/ui/core/qunit/loader/testsuite.loader.qunit.js +0 -3
  579. package/test/sap/ui/core/qunit/messages/MessageMixin.qunit.js +2 -7
  580. package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +1 -1
  581. package/test/sap/ui/core/qunit/model/Binding.qunit.js +36 -11
  582. package/test/sap/ui/core/qunit/model/ClientListBinding.qunit.js +2 -7
  583. package/test/sap/ui/core/qunit/model/ClientTreeBinding.qunit.js +2 -7
  584. package/test/sap/ui/core/qunit/model/CompositeDataState.qunit.js +2 -7
  585. package/test/sap/ui/core/qunit/model/Context.qunit.js +2 -7
  586. package/test/sap/ui/core/qunit/model/ContextBinding.qunit.js +2 -7
  587. package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata.xml +2 -0
  588. package/test/sap/ui/core/qunit/model/ListBinding.qunit.js +63 -6
  589. package/test/sap/ui/core/qunit/model/Model.qunit.js +2 -7
  590. package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +40 -0
  591. package/test/sap/ui/core/qunit/model/TreeBinding.qunit.js +2 -7
  592. package/test/sap/ui/core/qunit/model/TreeBindingAdapter.qunit.js +2 -7
  593. package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +51 -0
  594. package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +9 -8
  595. package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +4 -4
  596. package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +4 -4
  597. package/test/sap/ui/core/qunit/mvc/testdata/Async.view.xml +1 -1
  598. package/test/sap/ui/core/qunit/mvc/testdata/AsyncTypedView.js +5 -1
  599. package/test/sap/ui/core/qunit/odata/AnnotationParserNoFakeService.qunit.js +2 -7
  600. package/test/sap/ui/core/qunit/odata/ODataMessageParser.qunit.js +1 -1
  601. package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +2 -8
  602. package/test/sap/ui/core/qunit/odata/ODataMetadataNoFakeService.qunit.js +68 -9
  603. package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +24 -0
  604. package/test/sap/ui/core/qunit/odata/v2/Context.qunit.js +2 -7
  605. package/test/sap/ui/core/qunit/odata/v2/ODataContextBindingNoFakeService.qunit.js +2 -7
  606. package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +31 -17
  607. package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +260 -56
  608. package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +70 -15
  609. package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBindingNoFakeService.qunit.js +2 -7
  610. package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +4 -9
  611. package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +2 -7
  612. package/test/sap/ui/core/qunit/odata/v2/V2ODataModel.qunit.js +1 -1
  613. package/test/sap/ui/core/qunit/odata/v2/_CreatedContextsCache.qunit.js +2 -7
  614. package/test/sap/ui/core/qunit/odata/v4/AnnotationHelper.qunit.js +1 -1
  615. package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +55 -22
  616. package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +184 -151
  617. package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +60 -30
  618. package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +305 -69
  619. package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +20 -69
  620. package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1282 -255
  621. package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +90 -61
  622. package/test/sap/ui/core/qunit/odata/v4/ODataModel.realOData.qunit.js +0 -3
  623. package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +283 -170
  624. package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +103 -78
  625. package/test/sap/ui/core/qunit/odata/v4/data/metadata.json +2 -1
  626. package/test/sap/ui/core/qunit/odata/v4/data/metadata.xml +4 -0
  627. package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +2 -0
  628. package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +151 -1
  629. package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +24 -11
  630. package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +279 -458
  631. package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +204 -3
  632. package/test/sap/ui/core/qunit/odata/v4/lib/_MetadataRequestor.qunit.js +7 -3
  633. package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +145 -26
  634. package/test/sap/ui/core/qunit/odata/v4/testsuite.odatav4.qunit.js +4 -0
  635. package/test/sap/ui/core/qunit/opa/_LogCollector.qunit.js +1 -1
  636. package/test/sap/ui/core/qunit/opa/matchers/LabelFor.qunit.js +4 -2
  637. package/test/sap/ui/core/qunit/opa/matchers/_Busy.qunit.js +129 -2
  638. package/test/sap/ui/core/qunit/opa/matchers/_Editable.qunit.js +5 -1
  639. package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +5 -0
  640. package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +17 -37
  641. package/test/sap/ui/core/qunit/routing/HashChanger.qunit.js +1 -6
  642. package/test/sap/ui/core/qunit/routing/RouterHashChanger.qunit.js +1 -10
  643. package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +1 -22
  644. package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -4
  645. package/test/sap/ui/core/qunit/routing/fixture/Async1.view.xml +1 -1
  646. package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +34 -1
  647. package/test/sap/ui/core/qunit/testdata/fastnavigation/view/FastNavigation.view.xml +2 -2
  648. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/i18n.properties +1 -0
  649. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/library.js +10 -0
  650. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/manifest.json +10 -0
  651. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/library.js +10 -0
  652. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/messagebundle.properties +1 -0
  653. package/test/sap/ui/core/qunit/testdata/xml-require/helper/Formatter.js +7 -4
  654. package/test/sap/ui/core/qunit/testdata/xml-require/view/XMLTemplateProcessorAsync_require_in_html.view.xml +36 -0
  655. package/test/sap/ui/core/qunit/testsuites/testsuite.databinding.qunit.js +3 -0
  656. package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +29 -0
  657. package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +1381 -1570
  658. package/test/sap/ui/core/qunit/types/SimpleType.qunit.js +16 -2
  659. package/test/sap/ui/core/qunit/types/Types.qunit.js +2 -37
  660. package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +1 -1
  661. package/test/sap/ui/core/qunit/util/Popup.qunit.js +7 -11
  662. package/test/sap/ui/core/qunit/util/SyncPromise.qunit.js +4 -1
  663. package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +3 -1
  664. package/test/sap/ui/core/qunit/util/jQuery.sap.Version.qunit.js +3 -0
  665. package/test/sap/ui/core/qunit/util/jQuery.sap.measure.qunit.js +16 -11
  666. package/test/sap/ui/core/qunit/util/reflection/BaseTreeModifier.qunit.js +1 -1
  667. package/test/sap/ui/core/qunit/xml/XMLListBinding.qunit.js +1 -3
  668. package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +4 -14
  669. package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +7 -11
  670. package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +1 -1
  671. package/test/sap/ui/core/qunit/xml/XMLTwoWay.qunit.js +3 -7
  672. package/test/sap/ui/core/relnotes/changes-1.115.json +1 -37
  673. package/test/sap/ui/core/relnotes/changes-1.116.json +71 -0
  674. package/test/sap/ui/core/relnotes/changes-1.117.json +127 -0
  675. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
  676. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
  677. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
  678. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
  679. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
  680. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
  681. package/test/sap/ui/core/visual/images/HyphenationPlayground/windows/1600x1200/chrome/horizon/ltr/cozy/19_thirdParty_language_sl.ref.lnk +1 -1
  682. package/test/testsuite/js/samples.js +2 -0
  683. package/ui5.yaml +166 -1
  684. package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +0 -45
  685. /package/test/sap/ui/core/qunit/bootstrap/{GlobalConfigurationSettings.js → Configuration.beforeBootstrap.qunit.js} +0 -0
@@ -0,0 +1,989 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "sap/base/assert",
8
+ "sap/base/config",
9
+ "sap/base/Log",
10
+ "sap/base/Eventing",
11
+ "sap/base/i18n/Localization",
12
+ "sap/base/i18n/LanguageTag",
13
+ "sap/base/i18n/date/CalendarType",
14
+ "sap/base/i18n/date/CalendarWeekNumbering",
15
+ "sap/base/util/deepEqual",
16
+ "sap/base/util/extend",
17
+ "sap/base/util/isEmptyObject"
18
+ ], function(
19
+ assert,
20
+ BaseConfig,
21
+ Log,
22
+ Eventing,
23
+ Localization,
24
+ LanguageTag,
25
+ CalendarType,
26
+ CalendarWeekNumbering,
27
+ deepEqual,
28
+ extend,
29
+ isEmptyObject
30
+ ) {
31
+ "use strict";
32
+
33
+ var mChanges,
34
+ mSettings = {};
35
+
36
+ var M_ABAP_DATE_FORMAT_PATTERN = {
37
+ "" : {pattern: null},
38
+ "1": {pattern: "dd.MM.yyyy"},
39
+ "2": {pattern: "MM/dd/yyyy"},
40
+ "3": {pattern: "MM-dd-yyyy"},
41
+ "4": {pattern: "yyyy.MM.dd"},
42
+ "5": {pattern: "yyyy/MM/dd"},
43
+ "6": {pattern: "yyyy-MM-dd"},
44
+ "7": {pattern: "Gyy.MM.dd"},
45
+ "8": {pattern: "Gyy/MM/dd"},
46
+ "9": {pattern: "Gyy-MM-dd"},
47
+ "A": {pattern: "yyyy/MM/dd"},
48
+ "B": {pattern: "yyyy/MM/dd"},
49
+ "C": {pattern: "yyyy/MM/dd"}
50
+ };
51
+
52
+ var M_ABAP_TIME_FORMAT_PATTERN = {
53
+ "" : {"short": null, medium: null, dayPeriods: null},
54
+ "0": {"short": "HH:mm", medium: "HH:mm:ss", dayPeriods: null},
55
+ "1": {"short": "hh:mm a", medium: "hh:mm:ss a", dayPeriods: ["AM", "PM"]},
56
+ "2": {"short": "hh:mm a", medium: "hh:mm:ss a", dayPeriods: ["am", "pm"]},
57
+ "3": {"short": "KK:mm a", medium: "KK:mm:ss a", dayPeriods: ["AM", "PM"]},
58
+ "4": {"short": "KK:mm a", medium: "KK:mm:ss a", dayPeriods: ["am", "pm"]}
59
+ };
60
+
61
+ var M_ABAP_NUMBER_FORMAT_SYMBOLS = {
62
+ "" : {groupingSeparator: null, decimalSeparator: null},
63
+ " ": {groupingSeparator: ".", decimalSeparator: ","},
64
+ "X": {groupingSeparator: ",", decimalSeparator: "."},
65
+ "Y": {groupingSeparator: " ", decimalSeparator: ","}
66
+ };
67
+
68
+ function check(bCondition, sMessage) {
69
+ if ( !bCondition ) {
70
+ throw new Error(sMessage);
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Helper that creates a LanguageTag object from the given language
76
+ * or, throws an error for non BCP-47 compliant languages.
77
+ *
78
+ * @param {string} sLanguageTag A BCP-47 compliant language tag
79
+ * @returns {module:sap/base/i18n/LanguageTag} The resulting LanguageTag
80
+ * @private
81
+ */
82
+ function createLanguageTag(sLanguageTag) {
83
+ var oLanguageTag;
84
+ if (sLanguageTag && typeof sLanguageTag === 'string') {
85
+ try {
86
+ oLanguageTag = new LanguageTag( sLanguageTag );
87
+ } catch (e) {
88
+ // ignore
89
+ }
90
+ }
91
+ return oLanguageTag;
92
+ }
93
+
94
+ var oWritableConfig = BaseConfig.getWritableInstance();
95
+
96
+ /**
97
+ * Configuration for formatting specific parameters
98
+ * @private
99
+ * @ui5-restricted sap.ui.core
100
+ * @alias module:sap/base/i18n/Formatting
101
+ * @namespace
102
+ * @mixes module:sap/base/Eventing
103
+ * @borrows module:sap/base/Eventing#attachEvent as attachEvent
104
+ * @borrows module:sap/base/Eventing#attachEventOnce as attachEventOnce
105
+ * @borrows module:sap/base/Eventing#detachEvent as detachEvent
106
+ * @borrows module:sap/base/Eventing#fireEvent as fireEvent
107
+ * @borrows module:sap/base/Eventing#hasListeners as hasListeners
108
+ * @borrows module:sap/base/Eventing#getEventingParent as getEventingParent
109
+ * @borrows module:sap/base/Eventing#toString as toString
110
+ */
111
+ var Formatting = {
112
+ /**
113
+ * The <code>change</code> event is fired, when the configuration options are changed.
114
+ *
115
+ * @name module:sap/base/i18n/Formatting.change
116
+ * @event
117
+ * @private
118
+ * @ui5-restricted sap.ui.core
119
+ */
120
+
121
+ /**
122
+ * Attaches the <code>fnFunction</code> event handler to the {@link #event:change change} event
123
+ * of <code>module:sap/base/i18n/Formatting</code>.
124
+ *
125
+ * @param {function} fnFunction
126
+ * The function to be called when the event occurs
127
+ * @private
128
+ * @ui5-restricted sap.ui.core
129
+ */
130
+ attachChange: function(fnFunction) {
131
+ Formatting.attachEvent("change", fnFunction);
132
+ },
133
+
134
+ /**
135
+ * Detaches event handler <code>fnFunction</code> from the {@link #event:change change} event of
136
+ * this <code>module:sap/base/i18n/Formatting</code>.
137
+ *
138
+ * @param {function} fnFunction Function to be called when the event occurs
139
+ * @private
140
+ * @ui5-restricted sap.ui.core
141
+ */
142
+ detachChange: function(fnFunction) {
143
+ Formatting.detachEvent("change", fnFunction);
144
+ },
145
+
146
+ /**
147
+ * Returns the LanguageTag to be used for formatting.
148
+ *
149
+ * If no such LanguageTag has been defined, this method falls back to the language,
150
+ * see {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}.
151
+ *
152
+ * If any user preferences for date, time or number formatting have been set,
153
+ * and if no format LanguageTag has been specified, then a special private use subtag
154
+ * is added to the LanguageTag, indicating to the framework that these user preferences
155
+ * should be applied.
156
+ *
157
+ * @returns {module:sap/base/i18n/LanguageTag} the format LanguageTag
158
+ * @public
159
+ */
160
+ getLanguageTag : function() {
161
+ function fallback(oFormatSettings) {
162
+ var oLanguageTag = new LanguageTag(Localization.getLanguage());
163
+ // if any user settings have been defined, add the private use subtag "sapufmt"
164
+ if (!isEmptyObject(mSettings)
165
+ || oFormatSettings.getCalendarWeekNumbering() !== CalendarWeekNumbering.Default) {
166
+ var l = oLanguageTag.toString();
167
+ if ( l.indexOf("-x-") < 0 ) {
168
+ l = l + "-x-sapufmt";
169
+ } else if ( l.indexOf("-sapufmt") <= l.indexOf("-x-") ) {
170
+ l = l + "-sapufmt";
171
+ }
172
+ oLanguageTag = new LanguageTag(l);
173
+ }
174
+ return oLanguageTag;
175
+ }
176
+ return oWritableConfig.get({
177
+ name: "sapUiFormatLocale",
178
+ type: function(sFormatLocale) {return new LanguageTag(sFormatLocale);},
179
+ defaultValue: fallback.bind(Formatting, this),
180
+ external: true
181
+ });
182
+ },
183
+
184
+ /**
185
+ * Sets a new language tag to be used from now on for retrieving language
186
+ * specific formatters. Modifying this setting does not have an impact on
187
+ * the retrieval of translated texts!
188
+ *
189
+ * Can either be set to a concrete value (a BCP47 or Java locale compliant
190
+ * language tag) or to <code>null</code>. When set to <code>null</code> (default
191
+ * value) then locale specific formatters are retrieved for the current language.
192
+ *
193
+ * After changing the format locale, the framework tries to update localization
194
+ * specific parts of the UI. See the documentation of
195
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
196
+ * for details and restrictions.
197
+ *
198
+ * <b>Note</b>: When a language tag is set, it has higher priority than a number,
199
+ * date or time format defined with a call to <code>setLegacyNumberFormat</code>,
200
+ * <code>setLegacyDateFormat</code> or <code>setLegacyTimeFormat</code>.
201
+ *
202
+ * <b>Note</b>: See documentation of
203
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
204
+ * for restrictions.
205
+ *
206
+ * @param {string|null} sLanguageTag the new BCP47 compliant language tag;
207
+ * case doesn't matter and underscores can be used instead of dashes to separate
208
+ * components (compatibility with Java Locale IDs)
209
+ * @returns {this} <code>this</code> to allow method chaining
210
+ * @public
211
+ * @throws {Error} When <code>sLanguageTag</code> is given, but is not a valid BCP47 language
212
+ * tag or Java locale identifier
213
+ */
214
+ setLanguageTag : function(sLanguageTag) {
215
+ var oLanguageTag = createLanguageTag(sLanguageTag);
216
+ check(sLanguageTag == null || typeof sLanguageTag === "string" && oLanguageTag, "sLanguageTag must be a BCP47 language tag or Java Locale id or null");
217
+ sLanguageTag = sLanguageTag === null ? undefined : sLanguageTag;
218
+ var oOldLanguageTag = Formatting.getLanguageTag();
219
+ oWritableConfig.set("sapUiFormatLocale", sLanguageTag);
220
+ var oCurrentLanguageTag = Formatting.getLanguageTag();
221
+ if (oOldLanguageTag.toString() !== oCurrentLanguageTag.toString()) {
222
+ var bFireEvent = !mChanges;
223
+ mChanges = mChanges || {};
224
+ mChanges.languageTag = oCurrentLanguageTag.toString();
225
+ if (bFireEvent) {
226
+ fireChange();
227
+ }
228
+ }
229
+ return this;
230
+ },
231
+
232
+ _set : function(sKey, oValue) {
233
+ BaseConfig._.invalidate();
234
+ var oOldValue = mSettings[sKey];
235
+ if ( oValue != null ) {
236
+ mSettings[sKey] = oValue;
237
+ } else {
238
+ delete mSettings[sKey];
239
+ }
240
+ // report a change only if old and new value differ (null/undefined are treated as the same value)
241
+ if ( (oOldValue != null || oValue != null) && !deepEqual(oOldValue, oValue) ) {
242
+ var bFireEvent = !mChanges;
243
+ mChanges = mChanges || {};
244
+ mChanges[sKey] = oValue;
245
+ if (bFireEvent) {
246
+ fireChange();
247
+ }
248
+ }
249
+ },
250
+
251
+ /**
252
+ * Retrieves the custom units.
253
+ * These custom units are set by {@link #setCustomUnits} and {@link #addCustomUnits}
254
+ * @returns {object} custom units object
255
+ * @see #setCustomUnits
256
+ * @see #addCustomUnits
257
+ */
258
+ getCustomUnits: function () {
259
+ return mSettings["units"] ? mSettings["units"]["short"] : undefined;
260
+ },
261
+
262
+ /**
263
+ * Sets custom units which can be used to do Unit Formatting.
264
+ *
265
+ * The custom unit object consists of:
266
+ * * a custom unit key which can then be referenced to use this unit.
267
+ * * <code>displayName</code> which represents the name of the unit.
268
+ * * <code>unitPattern-count-&lt;pluralName&gt;</code> which represents the plural category of the locale for the given value.
269
+ * The plural category is defined within the locale, e.g. in the 'en' locale:
270
+ * <code>unitPattern-count-one</code> for <code>1</code>,
271
+ * <code>unitPattern-count-zero</code> for <code>0</code>,
272
+ * <code>unitPattern-count-other</code> for all the res
273
+ * To retrieve all plural categories defined for a locale use <code>sap.ui.core.LocaleData.prototype.getPluralCategories</code>.
274
+ *
275
+ * A Sample custom unit definition could look like this:
276
+ * <code>
277
+ * {
278
+ * "BAG": {
279
+ * "displayName": "Bag",
280
+ * "unitPattern-count-one": "{0} bag",
281
+ * "unitPattern-count-other": "{0} bags"
282
+ * }
283
+ * }
284
+ * </code>
285
+ * In the above snippet:
286
+ * * <code>"BAG"</code> represent the unit key which is used to reference it.
287
+ * * <code>"unitPattern-count-one"</code> represent the unit pattern for the form "one", e.g. the number <code>1</code> in the 'en' locale.
288
+ * * <code>"unitPattern-count-other"</code> represent the unit pattern for all other numbers which do not
289
+ * match the plural forms of the previous patterns.
290
+ * * In the patterns <code>{0}</code> is replaced by the number
291
+ *
292
+ * E.g. In locale 'en' value <code>1</code> would result in <code>1 Bag</code>, while <code>2</code> would result in <code>2 Bags</code>
293
+ * @param {object} mUnits custom unit object which replaces the current custom unit definition. Call with <code>null</code> to delete custom units.
294
+ * @returns {this} The config for chaining
295
+ * @private
296
+ */
297
+ setCustomUnits: function (mUnits) {
298
+ // add custom units, or remove the existing ones if none are given
299
+ var mUnitsshort = null;
300
+ if (mUnits) {
301
+ mUnitsshort = {
302
+ "short": mUnits
303
+ };
304
+ }
305
+ Formatting._set("units", mUnitsshort);
306
+ return this;
307
+ },
308
+
309
+ /**
310
+ * Adds custom units.
311
+ * Similar to {@link #setCustomUnits} but instead of setting the custom units, it will add additional ones.
312
+ * @param {object} mUnits custom unit object which replaces the current custom unit definition. Call with <code>null</code> to delete custom units.
313
+ * @returns {this} The config for chaining
314
+ * @see #setCustomUnits
315
+ * @private
316
+ */
317
+ addCustomUnits: function (mUnits) {
318
+ // add custom units, or remove the existing ones if none are given
319
+ var mExistingUnits = Formatting.getCustomUnits();
320
+ if (mExistingUnits){
321
+ mUnits = extend({}, mExistingUnits, mUnits);
322
+ }
323
+ Formatting.setCustomUnits(mUnits);
324
+ return this;
325
+ },
326
+
327
+ /**
328
+ * Sets custom unit mappings.
329
+ * Unit mappings contain key value pairs (both strings)
330
+ * * {string} key: a new entry which maps to an existing unit key
331
+ * * {string} value: an existing unit key
332
+ *
333
+ * Example:
334
+ * <code>
335
+ * {
336
+ * "my": "my-custom-unit",
337
+ * "cm": "length-centimeter"
338
+ * }
339
+ * </code>
340
+ * Note: It is possible to create multiple entries per unit key.
341
+ * Call with <code>null</code> to delete unit mappings.
342
+ * @param {object} mUnitMappings unit mappings
343
+ * @returns {this} Returns <code>this</code> to allow method chaining
344
+ */
345
+ setUnitMappings: function (mUnitMappings) {
346
+ Formatting._set("unitMappings", mUnitMappings);
347
+ return this;
348
+ },
349
+
350
+ /**
351
+ * Adds unit mappings.
352
+ * Similar to {@link #setUnitMappings} but instead of setting the unit mappings, it will add additional ones.
353
+ * @param {object} mUnitMappings unit mappings
354
+ * @returns {this} The config for chaining
355
+ * @see #setUnitMappings
356
+ * @private
357
+ */
358
+ addUnitMappings: function (mUnitMappings) {
359
+ // add custom units, or remove the existing ones if none are given
360
+ var mExistingUnits = Formatting.getUnitMappings();
361
+ if (mExistingUnits){
362
+ mUnitMappings = extend({}, mExistingUnits, mUnitMappings);
363
+ }
364
+ Formatting.setUnitMappings(mUnitMappings);
365
+ return this;
366
+ },
367
+
368
+ /**
369
+ * Retrieves the unit mappings.
370
+ * These unit mappings are set by {@link #setUnitMappings} and {@link #addUnitMappings}
371
+ * @returns {object} unit mapping object
372
+ * @see #setUnitMappings
373
+ * @see #addUnitMappings
374
+ */
375
+ getUnitMappings: function () {
376
+ return mSettings["unitMappings"];
377
+ },
378
+
379
+ /**
380
+ * Returns the currently set date pattern or undefined if no pattern has been defined.
381
+ * @param {"short"|"medium"|"long"|"full"} sStyle The date style (short, medium, long or full)
382
+ * @returns {string} The resulting date pattern
383
+ * @public
384
+ */
385
+ getDatePattern : function(sStyle) {
386
+ assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
387
+ return mSettings["dateFormats-" + sStyle];
388
+ },
389
+
390
+ /**
391
+ * Defines the preferred format pattern for the given date format style.
392
+ *
393
+ * Calling this method with a null or undefined pattern removes a previously set pattern.
394
+ *
395
+ * If a pattern is defined, it will be preferred over patterns derived from the current locale.
396
+ *
397
+ * See class {@link sap.ui.core.format.DateFormat} for details about the pattern syntax.
398
+ *
399
+ * After changing the date pattern, the framework tries to update localization
400
+ * specific parts of the UI. See the documentation of {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
401
+ * for details and restrictions.
402
+ *
403
+ * @param {"short"|"medium"|"long"|"full"} sStyle must be one of short, medium, long or full.
404
+ * @param {string} sPattern the format pattern to be used in LDML syntax.
405
+ * @returns {this} Returns <code>this</code> to allow method chaining
406
+ * @public
407
+ */
408
+ setDatePattern : function(sStyle, sPattern) {
409
+ check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
410
+ Formatting._set("dateFormats-" + sStyle, sPattern);
411
+ return this;
412
+ },
413
+
414
+ /**
415
+ * Returns the currently set time pattern or undefined if no pattern has been defined.
416
+ * @param {"short"|"medium"|"long"|"full"} sStyle The time style (short, medium, long or full)
417
+ * @returns {string} The resulting time pattern
418
+ * @public
419
+ */
420
+ getTimePattern : function(sStyle) {
421
+ assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
422
+ return mSettings["timeFormats-" + sStyle];
423
+ },
424
+
425
+ /**
426
+ * Defines the preferred format pattern for the given time format style.
427
+ *
428
+ * Calling this method with a null or undefined pattern removes a previously set pattern.
429
+ *
430
+ * If a pattern is defined, it will be preferred over patterns derived from the current locale.
431
+ *
432
+ * See class {@link sap.ui.core.format.DateFormat} for details about the pattern syntax.
433
+ *
434
+ * After changing the time pattern, the framework tries to update localization
435
+ * specific parts of the UI. See the documentation of
436
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
437
+ * for details and restrictions.
438
+ *
439
+ * @param {"short"|"medium"|"long"|"full"} sStyle must be one of short, medium, long or full.
440
+ * @param {string} sPattern the format pattern to be used in LDML syntax.
441
+ * @returns {this} Returns <code>this</code> to allow method chaining
442
+ * @public
443
+ */
444
+ setTimePattern : function(sStyle, sPattern) {
445
+ check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
446
+ Formatting._set("timeFormats-" + sStyle, sPattern);
447
+ return this;
448
+ },
449
+
450
+ /**
451
+ * Returns the currently set number symbol of the given type or undefined if no symbol has been defined.
452
+ *
453
+ * @param {"group"|"decimal"|"plusSign"|"minusSign"} sType the type of symbol
454
+ * @returns {string} A non-numerical symbol used as part of a number for the given type,
455
+ * e.g. for locale de_DE:
456
+ * <ul>
457
+ * <li>"group": "." (grouping separator)</li>
458
+ * <li>"decimal": "," (decimal separator)</li>
459
+ * <li>"plusSign": "+" (plus sign)</li>
460
+ * <li>"minusSign": "-" (minus sign)</li>
461
+ * </ul>
462
+ * @public
463
+ */
464
+ getNumberSymbol : function(sType) {
465
+ assert(["group", "decimal", "plusSign", "minusSign"].includes(sType), "sType must be decimal, group, plusSign or minusSign");
466
+ return mSettings["symbols-latn-" + sType];
467
+ },
468
+
469
+ /**
470
+ * Defines the string to be used for the given number symbol.
471
+ *
472
+ * Calling this method with a null or undefined symbol removes a previously set symbol string.
473
+ * Note that an empty string is explicitly allowed.
474
+ *
475
+ * If a symbol is defined, it will be preferred over symbols derived from the current locale.
476
+ *
477
+ * See class {@link sap.ui.core.format.NumberFormat} for details about the symbols.
478
+ *
479
+ * After changing the number symbol, the framework tries to update localization
480
+ * specific parts of the UI. See the documentation of
481
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
482
+ * for details and restrictions.
483
+ *
484
+ * @param {"group"|"decimal"|"plusSign"|"minusSign"} sType the type of symbol
485
+ * @param {string} sSymbol will be used to represent the given symbol type
486
+ * @returns {this} Returns <code>this</code> to allow method chaining
487
+ * @public
488
+ */
489
+ setNumberSymbol : function(sType, sSymbol) {
490
+ check(["group", "decimal", "plusSign", "minusSign"].includes(sType), "sType must be decimal, group, plusSign or minusSign");
491
+ Formatting._set("symbols-latn-" + sType, sSymbol);
492
+ return this;
493
+ },
494
+
495
+ /**
496
+ * Retrieves the custom currencies.
497
+ * E.g.
498
+ * <code>
499
+ * {
500
+ * "KWD": {"digits": 3},
501
+ * "TND" : {"digits": 3}
502
+ * }
503
+ * </code>
504
+ * @public
505
+ * @returns {object} the mapping between custom currencies and its digits
506
+ */
507
+ getCustomCurrencies : function() {
508
+ return mSettings["currency"];
509
+ },
510
+
511
+ /**
512
+ * Sets custom currencies and replaces existing entries.
513
+ *
514
+ * There is a special currency code named "DEFAULT" that is optional.
515
+ * In case it is set it will be used for all currencies not contained
516
+ * in the list, otherwise currency digits as defined by the CLDR will
517
+ * be used as a fallback.
518
+ *
519
+ * Example:
520
+ * To use CLDR, but override single currencies
521
+ * <code>
522
+ * {
523
+ * "KWD": {"digits": 3},
524
+ * "TND" : {"digits": 3}
525
+ * }
526
+ * </code>
527
+ *
528
+ * To replace the CLDR currency digits completely
529
+ * <code>
530
+ * {
531
+ * "DEFAULT": {"digits": 2},
532
+ * "ADP": {"digits": 0},
533
+ * ...
534
+ * "XPF": {"digits": 0}
535
+ * }
536
+ * </code>
537
+ *
538
+ * Note: To unset the custom currencies: call with <code>undefined</code>
539
+ * Custom currencies must not only consist of digits but contain at least one non-digit character, e.g. "a",
540
+ * so that the measure part can be distinguished from the number part.
541
+ * @public
542
+ * @param {object} mCurrencies currency map which is set
543
+ * @returns {this} Returns <code>this</code> to allow method chaining
544
+ */
545
+ setCustomCurrencies : function(mCurrencies) {
546
+ check(typeof mCurrencies === "object" || mCurrencies == null, "mCurrencyDigits must be an object");
547
+ Object.keys(mCurrencies || {}).forEach(function(sCurrencyDigit) {
548
+ check(typeof sCurrencyDigit === "string");
549
+ check(typeof mCurrencies[sCurrencyDigit] === "object");
550
+ });
551
+ Formatting._set("currency", mCurrencies);
552
+ return this;
553
+ },
554
+
555
+ /**
556
+ * Adds custom currencies to the existing entries.
557
+ * E.g.
558
+ * <code>
559
+ * {
560
+ * "KWD": {"digits": 3},
561
+ * "TND" : {"digits": 3}
562
+ * }
563
+ * </code>
564
+ *
565
+ * @public
566
+ * @param {object} mCurrencies adds to the currency map
567
+ * @returns {this} Returns <code>this</code> to allow method chaining
568
+ * @see #setCustomCurrencies
569
+ */
570
+ addCustomCurrencies: function (mCurrencies) {
571
+ // add custom units, or remove the existing ones if none are given
572
+ var mExistingCurrencies = Formatting.getCustomCurrencies();
573
+ if (mExistingCurrencies){
574
+ mCurrencies = extend({}, mExistingCurrencies, mCurrencies);
575
+ }
576
+ Formatting.setCustomCurrencies(mCurrencies);
577
+ return this;
578
+ },
579
+
580
+ _setDayPeriods : function(sWidth, aTexts) {
581
+ assert(sWidth == "narrow" || sWidth == "abbreviated" || sWidth == "wide", "sWidth must be narrow, abbreviated or wide");
582
+ Formatting._set("dayPeriods-format-" + sWidth, aTexts);
583
+ return this;
584
+ },
585
+
586
+ /**
587
+ * Returns the currently set legacy ABAP date format (its id) or undefined if none has been set.
588
+ *
589
+ * @returns {"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"A"|"B"|"C"|undefined} ID of the ABAP date format,
590
+ * if not set or set to <code>""</code>, <code>undefined</code> will be returned
591
+ * @public
592
+ */
593
+ getLegacyDateFormat : function() {
594
+ var sLegacyDateFormat = oWritableConfig.get({
595
+ name: "sapUiLegacyDateFormat",
596
+ type: BaseConfig.Type.String,
597
+ external: true
598
+ });
599
+ return sLegacyDateFormat ? sLegacyDateFormat.toUpperCase() : undefined;
600
+ },
601
+
602
+ /**
603
+ * Allows to specify one of the legacy ABAP date formats.
604
+ *
605
+ * This method modifies the date patterns for 'short' and 'medium' style with the corresponding ABAP
606
+ * format. When called with a null or undefined format id, any previously applied format will be removed.
607
+ *
608
+ * After changing the legacy date format, the framework tries to update localization
609
+ * specific parts of the UI. See the documentation of
610
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
611
+ * for details and restrictions.
612
+ *
613
+ * @param {""|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"A"|"B"|"C"} [sFormatId=""] ID of the ABAP date format,
614
+ * <code>""</code> will reset the date patterns for 'short' and 'medium' style to the
615
+ * locale-specific ones.
616
+ * @returns {this} Returns <code>this</code> to allow method chaining
617
+ * @public
618
+ */
619
+ setLegacyDateFormat : function(sFormatId) {
620
+ sFormatId = sFormatId ? String(sFormatId).toUpperCase() : "";
621
+ check(M_ABAP_DATE_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['1','2','3','4','5','6','7','8','9','A','B','C'] or empty");
622
+ var bFireEvent = !mChanges;
623
+ var sOldFormat = Formatting.getLegacyDateFormat();
624
+ if (sOldFormat !== sFormatId) {
625
+ mChanges = mChanges || {};
626
+ oWritableConfig.set("sapUiLegacyDateFormat", sFormatId);
627
+ mChanges.legacyDateFormat = sFormatId;
628
+ Formatting.setDatePattern("short", M_ABAP_DATE_FORMAT_PATTERN[sFormatId].pattern);
629
+ Formatting.setDatePattern("medium", M_ABAP_DATE_FORMAT_PATTERN[sFormatId].pattern);
630
+ if (bFireEvent) {
631
+ fireChange();
632
+ }
633
+ }
634
+ return this;
635
+ },
636
+
637
+ /**
638
+ * Returns the currently set legacy ABAP time format (its id) or undefined if none has been set.
639
+ *
640
+ * @returns {"0"|"1"|"2"|"3"|"4"|undefined} ID of the ABAP date format,
641
+ * if not set or set to <code>""</code>, <code>undefined</code> will be returned
642
+ * @public
643
+ */
644
+ getLegacyTimeFormat : function() {
645
+ var sLegacyTimeFormat = oWritableConfig.get({
646
+ name: "sapUiLegacyTimeFormat",
647
+ type: BaseConfig.Type.String,
648
+ external: true
649
+ });
650
+ return sLegacyTimeFormat ? sLegacyTimeFormat.toUpperCase() : undefined;
651
+ },
652
+
653
+ /**
654
+ * Allows to specify one of the legacy ABAP time formats.
655
+ *
656
+ * This method sets the time patterns for 'short' and 'medium' style to the corresponding ABAP
657
+ * formats and sets the day period texts to "AM"/"PM" or "am"/"pm" respectively. When called
658
+ * with a null or undefined format id, any previously applied format will be removed.
659
+ *
660
+ * After changing the legacy time format, the framework tries to update localization
661
+ * specific parts of the UI. See the documentation of
662
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
663
+ * for details and restrictions.
664
+ *
665
+ * @param {""|"0"|"1"|"2"|"3"|"4"} [sFormatId=""] ID of the ABAP time format,
666
+ * <code>""</code> will reset the time patterns for 'short' and 'medium' style and the day
667
+ * period texts to the locale-specific ones.
668
+ * @returns {this} Returns <code>this</code> to allow method chaining
669
+ * @public
670
+ */
671
+ setLegacyTimeFormat : function(sFormatId) {
672
+ sFormatId = sFormatId || "";
673
+ check(M_ABAP_TIME_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['0','1','2','3','4'] or empty");
674
+ var bFireEvent = !mChanges;
675
+ var sOldFormat = Formatting.getLegacyTimeFormat();
676
+ if (sOldFormat !== sFormatId) {
677
+ mChanges = mChanges || {};
678
+ oWritableConfig.set("sapUiLegacyTimeFormat", sFormatId);
679
+ mChanges.legacyTimeFormat = sFormatId;
680
+ Formatting.setTimePattern("short", M_ABAP_TIME_FORMAT_PATTERN[sFormatId]["short"]);
681
+ Formatting.setTimePattern("medium", M_ABAP_TIME_FORMAT_PATTERN[sFormatId]["medium"]);
682
+ Formatting._setDayPeriods("abbreviated", M_ABAP_TIME_FORMAT_PATTERN[sFormatId].dayPeriods);
683
+ if (bFireEvent) {
684
+ fireChange();
685
+ }
686
+ }
687
+ return this;
688
+ },
689
+
690
+ /**
691
+ * Returns the currently set legacy ABAP number format (its id) or undefined if none has been set.
692
+ *
693
+ * @returns {" "|"X"|"Y"|undefined} ID of the ABAP number format,
694
+ * if not set or set to <code>""</code>, <code>undefined</code> will be returned
695
+ * @public
696
+ */
697
+ getLegacyNumberFormat : function() {
698
+ var sLegacyNumberFormat = oWritableConfig.get({
699
+ name: "sapUiLegacyNumberFormat",
700
+ type: BaseConfig.Type.String,
701
+ external: true
702
+ });
703
+ return sLegacyNumberFormat ? sLegacyNumberFormat.toUpperCase() : undefined;
704
+ },
705
+
706
+ /**
707
+ * Allows to specify one of the legacy ABAP number format.
708
+ *
709
+ * This method will modify the 'group' and 'decimal' symbols. When called with a null
710
+ * or undefined format id, any previously applied format will be removed.
711
+ *
712
+ * After changing the legacy number format, the framework tries to update localization
713
+ * specific parts of the UI. See the documentation of
714
+ * {@link module:sap/base/i18n/Localization.getLanguage Localization.getLanguage()}
715
+ * for details and restrictions.
716
+ *
717
+ * @param {""|" "|"X"|"Y"} [sFormatId=""] ID of the ABAP number format set,
718
+ * <code>""</code> will reset the 'group' and 'decimal' symbols to the locale-specific
719
+ * ones.
720
+ * @returns {this} Returns <code>this</code> to allow method chaining
721
+ * @public
722
+ */
723
+ setLegacyNumberFormat : function(sFormatId) {
724
+ sFormatId = sFormatId ? sFormatId.toUpperCase() : "";
725
+ check(M_ABAP_NUMBER_FORMAT_SYMBOLS.hasOwnProperty(sFormatId), "sFormatId must be one of [' ','X','Y'] or empty");
726
+ var bFireEvent = !mChanges;
727
+ var sOldFormat = Formatting.getLegacyNumberFormat();
728
+ if (sOldFormat !== sFormatId) {
729
+ mChanges = mChanges || {};
730
+ oWritableConfig.set("sapUiLegacyNumberFormat", sFormatId);
731
+ mChanges.legacyNumberFormat = sFormatId;
732
+ Formatting.setNumberSymbol("group", M_ABAP_NUMBER_FORMAT_SYMBOLS[sFormatId].groupingSeparator);
733
+ Formatting.setNumberSymbol("decimal", M_ABAP_NUMBER_FORMAT_SYMBOLS[sFormatId].decimalSeparator);
734
+ if (bFireEvent) {
735
+ fireChange();
736
+ }
737
+ }
738
+ return this;
739
+ },
740
+
741
+ /**
742
+ * Allows to specify the customizing data for Islamic calendar support
743
+ *
744
+ * @param {object[]} aMappings contains the customizing data for the support of Islamic calendar.
745
+ * @param {string} aMappings[].dateFormat The date format
746
+ * @param {string} aMappings[].islamicMonthStart The Islamic date
747
+ * @param {string} aMappings[].gregDate The corresponding Gregorian date
748
+ * @returns {this} Returns <code>this</code> to allow method chaining
749
+ * @public
750
+ */
751
+ setLegacyDateCalendarCustomizing : function(aMappings) {
752
+ check(Array.isArray(aMappings), "aMappings must be an Array");
753
+ var bFireEvent = !mChanges;
754
+ mChanges = mChanges || {};
755
+ Formatting.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings.slice();
756
+ if (bFireEvent) {
757
+ fireChange();
758
+ }
759
+ return this;
760
+ },
761
+
762
+ /**
763
+ * Returns the currently set customizing data for Islamic calendar support
764
+ *
765
+ * @returns {object[]} Returns an array contains the customizing data. Each element in the array has properties: dateFormat, islamicMonthStart, gregDate. For details, please see {@link #setLegacyDateCalendarCustomizing}
766
+ * @public
767
+ */
768
+ getLegacyDateCalendarCustomizing : function() {
769
+ var aLegacyDateCalendarCustomizing = Formatting.aLegacyDateCalendarCustomizing;
770
+ if (aLegacyDateCalendarCustomizing) {
771
+ aLegacyDateCalendarCustomizing = aLegacyDateCalendarCustomizing.slice();
772
+ }
773
+ return aLegacyDateCalendarCustomizing;
774
+ },
775
+
776
+ /**
777
+ * Define whether the NumberFormatter shall always place the currency code after the numeric value, with
778
+ * the only exception of right-to-left locales, where the currency code shall be placed before the numeric value.
779
+ * Default configuration setting is <code>true</code>.
780
+ *
781
+ * When set to <code>false</code> the placement of the currency code is done dynamically, depending on the
782
+ * configured locale using data provided by the Unicode Common Locale Data Repository (CLDR).
783
+ *
784
+ * Each currency instance ({@link sap.ui.core.format.NumberFormat.getCurrencyInstance}) will be created
785
+ * with this setting unless overwritten on instance level.
786
+ *
787
+ * @param {boolean} bTrailingCurrencyCode Whether currency codes shall always be placed after the numeric value
788
+ * @returns {this} Returns <code>this</code> to allow method chaining
789
+ * @since 1.75.0
790
+ * @public
791
+ */
792
+ setTrailingCurrencyCode : function(bTrailingCurrencyCode) {
793
+ check(typeof bTrailingCurrencyCode === "boolean", "bTrailingCurrencyCode must be a boolean");
794
+ oWritableConfig.set("sapUiTrailingCurrencyCode", bTrailingCurrencyCode);
795
+ return this;
796
+ },
797
+
798
+ /**
799
+ * Returns current trailingCurrencyCode configuration for new NumberFormatter instances
800
+ *
801
+ * @return {boolean} Whether currency codes shall always be placed after the numeric value
802
+ * @since 1.75.0
803
+ * @public
804
+ */
805
+ getTrailingCurrencyCode : function() {
806
+ return oWritableConfig.get({
807
+ name: "sapUiTrailingCurrencyCode",
808
+ type: BaseConfig.Type.Boolean,
809
+ defaultValue: true,
810
+ external: true
811
+ });
812
+ },
813
+
814
+ /**
815
+ * Returns a live object with the current settings
816
+ * TODO this method is part of the facade to be accessible from LocaleData, but it shouldn't be
817
+ *
818
+ * @returns {mSettings} The custom LocaleData settings object
819
+ * @private
820
+ */
821
+ getCustomLocaleData : function() {
822
+ return mSettings;
823
+ },
824
+
825
+ /**
826
+ * Returns the calendar week numbering algorithm used to determine the first day of the week
827
+ * and the first calendar week of the year, see {@link module:sap/base/i18n/data/CalendarWeekNumbering}.
828
+ *
829
+ * @returns {module:sap/base/i18n/date/CalendarWeekNumbering} The calendar week numbering algorithm
830
+ *
831
+ * @public
832
+ * @since 1.113.0
833
+ */
834
+ getCalendarWeekNumbering: function() {
835
+ var oCalendarWeekNumbering = CalendarWeekNumbering.Default;
836
+
837
+ try {
838
+ oCalendarWeekNumbering = oWritableConfig.get({
839
+ name: "sapUiCalendarWeekNumbering",
840
+ type: CalendarWeekNumbering,
841
+ defaultValue: CalendarWeekNumbering.Default,
842
+ external: true
843
+ });
844
+ } catch (err) {
845
+ //nothing to do, return default;
846
+ }
847
+ return oCalendarWeekNumbering;
848
+ },
849
+
850
+ /**
851
+ * Sets the calendar week numbering algorithm which is used to determine the first day of the week
852
+ * and the first calendar week of the year, see {@link module:sap/base/i18n/date/CalendarWeekNumbering}.
853
+ *
854
+ * @param {module:sap/base/i18n/date/CalendarWeekNumbering} sCalendarWeekNumbering
855
+ * The calendar week numbering algorithm
856
+ * @returns {this}
857
+ * <code>this</code> to allow method chaining
858
+ * @throws {Error}
859
+ * If <code>sCalendarWeekNumbering</code> is not a valid calendar week numbering algorithm,
860
+ * defined in {@link module:sap/base/i18n/date/CalendarWeekNumbering}
861
+ *
862
+ * @public
863
+ * @since 1.113.0
864
+ */
865
+ setCalendarWeekNumbering: function(sCalendarWeekNumbering) {
866
+ BaseConfig._.checkEnum(CalendarWeekNumbering, sCalendarWeekNumbering, "calendarWeekNumbering");
867
+ var sCurrentWeekNumbering = oWritableConfig.get({
868
+ name: "sapUiCalendarWeekNumbering",
869
+ type: CalendarWeekNumbering,
870
+ defaultValue: CalendarWeekNumbering.Default,
871
+ external: true
872
+ });
873
+ if (sCurrentWeekNumbering !== sCalendarWeekNumbering) {
874
+ var bFireEvent = !mChanges;
875
+ mChanges = mChanges || {};
876
+ oWritableConfig.set("sapUiCalendarWeekNumbering", sCalendarWeekNumbering);
877
+ mChanges.calendarWeekNumbering = sCalendarWeekNumbering;
878
+ if (bFireEvent) {
879
+ fireChange();
880
+ }
881
+ }
882
+ return this;
883
+ },
884
+
885
+ /**
886
+ * Returns the calendar type which is being used in locale dependent functionality.
887
+ *
888
+ * When it's explicitly set by calling <code>setCalendar</code>, the set calendar type is returned.
889
+ * Otherwise, the calendar type is determined by checking the format settings and current locale.
890
+ *
891
+ * @returns {module:sap/base/i18n/date/CalendarType} the current calendar type, e.g. <code>Gregorian</code>
892
+ * @since 1.28.6
893
+ */
894
+ getCalendarType: function() {
895
+ var sName,
896
+ sCalendarType = oWritableConfig.get({
897
+ name: "sapUiCalendarType",
898
+ type: BaseConfig.Type.String,
899
+ external: true
900
+ });
901
+
902
+ sCalendarType = sCalendarType || null;
903
+
904
+ if (sCalendarType) {
905
+ for (sName in CalendarType) {
906
+ if (sName.toLowerCase() === sCalendarType.toLowerCase()) {
907
+ return sName;
908
+ }
909
+ }
910
+ Log.warning("Parameter 'calendarType' is set to " + sCalendarType + " which isn't a valid value and therefore ignored. The calendar type is determined from format setting and current locale");
911
+ }
912
+
913
+ var sLegacyDateFormat = Formatting.getLegacyDateFormat();
914
+
915
+ switch (sLegacyDateFormat) {
916
+ case "1":
917
+ case "2":
918
+ case "3":
919
+ case "4":
920
+ case "5":
921
+ case "6":
922
+ return CalendarType.Gregorian;
923
+ case "7":
924
+ case "8":
925
+ case "9":
926
+ return CalendarType.Japanese;
927
+ case "A":
928
+ case "B":
929
+ return CalendarType.Islamic;
930
+ case "C":
931
+ return CalendarType.Persian;
932
+ default:
933
+ return Localization.getPreferredCalendarType();
934
+ }
935
+ },
936
+
937
+ /**
938
+ * Sets the new calendar type to be used from now on in locale dependent functionality (for example,
939
+ * formatting, translation texts, etc.).
940
+ *
941
+ * @param {module:sap/base/i18n/date/CalendarType|null} sCalendarType the new calendar type. Set it with null to clear the calendar type
942
+ * and the calendar type is calculated based on the format settings and current locale.
943
+ * @returns {this} <code>this</code> to allow method chaining
944
+ * @public
945
+ * @since 1.28.6
946
+ */
947
+ setCalendarType : function(sCalendarType) {
948
+ var sOldCalendarType = Formatting.getCalendarType();
949
+ oWritableConfig.set("sapUiCalendarType", sCalendarType);
950
+ var sCurrentCalendarType = Formatting.getCalendarType();
951
+ if (sOldCalendarType !== sCurrentCalendarType) {
952
+ var bFireEvent = !mChanges;
953
+ mChanges = mChanges || {};
954
+ mChanges.calendarType = sCurrentCalendarType;
955
+ if (bFireEvent) {
956
+ fireChange();
957
+ }
958
+ }
959
+ return this;
960
+ }
961
+ };
962
+
963
+ function fireChange() {
964
+ Formatting.fireEvent("change", mChanges);
965
+ mChanges = undefined;
966
+ }
967
+
968
+ function init() {
969
+ // init legacy formats
970
+ var sLegacyDateFormat = Formatting.getLegacyDateFormat();
971
+ if (sLegacyDateFormat !== undefined) {
972
+ Formatting.setLegacyDateFormat(sLegacyDateFormat);
973
+ }
974
+ var sLegacyNumberFormat = Formatting.getLegacyNumberFormat();
975
+ if (sLegacyNumberFormat !== undefined) {
976
+ Formatting.setLegacyNumberFormat(sLegacyNumberFormat);
977
+ }
978
+ var sLegacyTimeFormat = Formatting.getLegacyTimeFormat();
979
+ if (sLegacyTimeFormat !== undefined) {
980
+ Formatting.setLegacyTimeFormat(sLegacyTimeFormat);
981
+ }
982
+ }
983
+
984
+ Eventing.apply(Formatting);
985
+
986
+ init();
987
+
988
+ return Formatting;
989
+ });