@openui5/sap.ui.core 1.115.0 → 1.116.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 (541) hide show
  1. package/.dtsgenrc +18 -0
  2. package/.eslintrc.json +11 -0
  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 +320 -0
  14. package/src/sap/base/config.js +1 -1
  15. package/src/sap/base/i18n/Formatting.js +991 -0
  16. package/src/sap/base/i18n/LanguageTag.js +189 -0
  17. package/src/sap/base/i18n/Localization.js +711 -0
  18. package/src/sap/base/i18n/ResourceBundle.js +5 -20
  19. package/src/sap/base/i18n/date/CalendarType.js +54 -0
  20. package/src/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
  21. package/src/sap/base/i18n/date/TimezoneUtils.js +287 -0
  22. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  23. package/src/sap/base/util/restricted/_castArray.js +1 -1
  24. package/src/sap/base/util/restricted/_compact.js +1 -1
  25. package/src/sap/base/util/restricted/_curry.js +1 -1
  26. package/src/sap/base/util/restricted/_debounce.js +1 -1
  27. package/src/sap/base/util/restricted/_difference.js +1 -1
  28. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  29. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  30. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  31. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  32. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  33. package/src/sap/base/util/restricted/_flatten.js +1 -1
  34. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  35. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  36. package/src/sap/base/util/restricted/_intersection.js +1 -1
  37. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  38. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  39. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  40. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  41. package/src/sap/base/util/restricted/_isNil.js +1 -1
  42. package/src/sap/base/util/restricted/_max.js +1 -1
  43. package/src/sap/base/util/restricted/_merge.js +1 -1
  44. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  45. package/src/sap/base/util/restricted/_min.js +1 -1
  46. package/src/sap/base/util/restricted/_omit.js +1 -1
  47. package/src/sap/base/util/restricted/_pick.js +1 -1
  48. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  49. package/src/sap/base/util/restricted/_throttle.js +1 -1
  50. package/src/sap/base/util/restricted/_toArray.js +1 -1
  51. package/src/sap/base/util/restricted/_union.js +1 -1
  52. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  53. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  54. package/src/sap/base/util/restricted/_uniq.js +1 -1
  55. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  56. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  57. package/src/sap/base/util/restricted/_without.js +1 -1
  58. package/src/sap/base/util/restricted/_xor.js +1 -1
  59. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  60. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  61. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  62. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  63. package/src/sap/ui/Device.js +3 -3
  64. package/src/sap/ui/Global.js +4 -4
  65. package/src/sap/ui/base/Event.js +1 -1
  66. package/src/sap/ui/base/EventProvider.js +4 -12
  67. package/src/sap/ui/base/Interface.js +1 -1
  68. package/src/sap/ui/base/ManagedObject.js +8 -12
  69. package/src/sap/ui/base/ManagedObjectMetadata.js +30 -7
  70. package/src/sap/ui/base/Metadata.js +1 -1
  71. package/src/sap/ui/base/Object.js +1 -1
  72. package/src/sap/ui/base/ObjectPool.js +1 -1
  73. package/src/sap/ui/base/SyncPromise.js +10 -5
  74. package/src/sap/ui/core/.library +2 -2
  75. package/src/sap/ui/core/AccessKeysEnablement.js +10 -5
  76. package/src/sap/ui/core/AnimationMode.js +49 -0
  77. package/src/sap/ui/core/BusyIndicator.js +33 -42
  78. package/src/sap/ui/core/CalendarType.js +11 -37
  79. package/src/sap/ui/core/Component.js +4 -5
  80. package/src/sap/ui/core/ComponentContainer.js +1 -1
  81. package/src/sap/ui/core/ComponentMetadata.js +2 -2
  82. package/src/sap/ui/core/ComponentSupport.js +1 -1
  83. package/src/sap/ui/core/Configuration.js +409 -1270
  84. package/src/sap/ui/core/Control.js +4 -12
  85. package/src/sap/ui/core/ControlBehavior.js +157 -0
  86. package/src/sap/ui/core/Core.js +124 -132
  87. package/src/sap/ui/core/CustomData.js +1 -1
  88. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  89. package/src/sap/ui/core/Element.js +14 -3
  90. package/src/sap/ui/core/ElementMetadata.js +1 -1
  91. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  92. package/src/sap/ui/core/EventBus.js +1 -1
  93. package/src/sap/ui/core/Fragment.js +1 -1
  94. package/src/sap/ui/core/HTML.js +1 -1
  95. package/src/sap/ui/core/History.js +1 -1
  96. package/src/sap/ui/core/Icon.js +1 -1
  97. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  98. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  99. package/src/sap/ui/core/InvisibleMessage.js +5 -7
  100. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  101. package/src/sap/ui/core/InvisibleText.js +12 -12
  102. package/src/sap/ui/core/Item.js +1 -1
  103. package/src/sap/ui/core/LabelEnablement.js +1 -1
  104. package/src/sap/ui/core/LayoutData.js +1 -1
  105. package/src/sap/ui/core/Lib.js +109 -22
  106. package/src/sap/ui/core/ListItem.js +1 -1
  107. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  108. package/src/sap/ui/core/Locale.js +151 -430
  109. package/src/sap/ui/core/LocaleData.js +39 -11
  110. package/src/sap/ui/core/Manifest.js +1 -1
  111. package/src/sap/ui/core/Message.js +1 -1
  112. package/src/sap/ui/core/RenderManager.js +1 -1
  113. package/src/sap/ui/core/Renderer.js +1 -1
  114. package/src/sap/ui/core/ResizeHandler.js +1 -1
  115. package/src/sap/ui/core/ScrollBar.js +1 -1
  116. package/src/sap/ui/core/SeparatorItem.js +1 -1
  117. package/src/sap/ui/core/StaticArea.js +31 -17
  118. package/src/sap/ui/core/Theming.js +451 -0
  119. package/src/sap/ui/core/Title.js +1 -1
  120. package/src/sap/ui/core/TooltipBase.js +1 -1
  121. package/src/sap/ui/core/UIArea.js +1 -1
  122. package/src/sap/ui/core/UIComponent.js +1 -1
  123. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  124. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  125. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  126. package/src/sap/ui/core/XMLComposite.js +1 -1
  127. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  128. package/src/sap/ui/core/XMLTemplateProcessor.js +1 -0
  129. package/src/sap/ui/core/_IconRegistry.js +7 -1
  130. package/src/sap/ui/core/date/CalendarWeekNumbering.js +12 -83
  131. package/src/sap/ui/core/date/UI5Date.js +2 -2
  132. package/src/sap/ui/core/delegate/ItemNavigation.js +8 -10
  133. package/src/sap/ui/core/delegate/ScrollEnablement.js +5 -5
  134. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  135. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  136. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  137. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  138. package/src/sap/ui/core/format/DateFormat.js +20 -15
  139. package/src/sap/ui/core/format/TimezoneUtil.js +15 -273
  140. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  141. package/src/sap/ui/core/library.js +3 -3
  142. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  143. package/src/sap/ui/core/message/Message.js +1 -1
  144. package/src/sap/ui/core/message/MessageManager.js +1 -1
  145. package/src/sap/ui/core/message/MessageParser.js +1 -1
  146. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  147. package/src/sap/ui/core/messagebundle_cs.properties +1 -1
  148. package/src/sap/ui/core/messagebundle_cy.properties +1 -1
  149. package/src/sap/ui/core/messagebundle_da.properties +1 -1
  150. package/src/sap/ui/core/messagebundle_de.properties +1 -1
  151. package/src/sap/ui/core/messagebundle_el.properties +1 -1
  152. package/src/sap/ui/core/messagebundle_en.properties +1 -1
  153. package/src/sap/ui/core/messagebundle_en_GB.properties +1 -1
  154. package/src/sap/ui/core/messagebundle_es.properties +1 -1
  155. package/src/sap/ui/core/messagebundle_es_MX.properties +1 -1
  156. package/src/sap/ui/core/messagebundle_et.properties +1 -1
  157. package/src/sap/ui/core/messagebundle_id.properties +1 -1
  158. package/src/sap/ui/core/messagebundle_it.properties +49 -49
  159. package/src/sap/ui/core/messagebundle_iw.properties +1 -1
  160. package/src/sap/ui/core/messagebundle_kk.properties +1 -1
  161. package/src/sap/ui/core/messagebundle_ko.properties +1 -1
  162. package/src/sap/ui/core/messagebundle_lt.properties +1 -1
  163. package/src/sap/ui/core/messagebundle_lv.properties +1 -1
  164. package/src/sap/ui/core/messagebundle_ms.properties +8 -8
  165. package/src/sap/ui/core/messagebundle_nl.properties +1 -1
  166. package/src/sap/ui/core/messagebundle_no.properties +1 -1
  167. package/src/sap/ui/core/messagebundle_pl.properties +1 -1
  168. package/src/sap/ui/core/messagebundle_pt.properties +1 -1
  169. package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -1
  170. package/src/sap/ui/core/messagebundle_ro.properties +1 -1
  171. package/src/sap/ui/core/messagebundle_sh.properties +1 -1
  172. package/src/sap/ui/core/messagebundle_sv.properties +1 -1
  173. package/src/sap/ui/core/messagebundle_th.properties +1 -1
  174. package/src/sap/ui/core/messagebundle_uk.properties +21 -21
  175. package/src/sap/ui/core/messagebundle_vi.properties +1 -1
  176. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  177. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  178. package/src/sap/ui/core/mvc/JSView.js +1 -1
  179. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  180. package/src/sap/ui/core/mvc/View.js +1 -1
  181. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  182. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  183. package/src/sap/ui/core/plugin/LessSupport.js +14 -16
  184. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  185. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  186. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  187. package/src/sap/ui/core/routing/HashChanger.js +1 -0
  188. package/src/sap/ui/core/routing/Route.js +1 -0
  189. package/src/sap/ui/core/routing/Router.js +3 -1
  190. package/src/sap/ui/core/rules/Config.support.js +2 -2
  191. package/src/sap/ui/core/rules/Model.support.js +3 -1
  192. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  193. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  194. package/src/sap/ui/core/service/Service.js +1 -1
  195. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  196. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  197. package/src/sap/ui/core/support/Plugin.js +1 -1
  198. package/src/sap/ui/core/support/Support.js +1 -1
  199. package/src/sap/ui/core/support/controls/TimelineOverview.js +1 -1
  200. package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
  201. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  202. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  203. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  204. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  205. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  206. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  207. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  208. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +4 -4
  209. package/src/sap/ui/core/themes/base/base.less +41 -20
  210. package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
  211. package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
  212. package/src/sap/ui/core/theming/Parameters.js +6 -5
  213. package/src/sap/ui/core/theming/ThemeManager.js +310 -447
  214. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  215. package/src/sap/ui/core/tmpl/DOMElement.js +5 -10
  216. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  217. package/src/sap/ui/core/tmpl/Template.js +1 -1
  218. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  219. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  220. package/src/sap/ui/core/util/Export.js +1 -1
  221. package/src/sap/ui/core/util/ExportCell.js +1 -1
  222. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  223. package/src/sap/ui/core/util/ExportRow.js +1 -1
  224. package/src/sap/ui/core/util/ExportType.js +1 -1
  225. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  226. package/src/sap/ui/core/util/File.js +1 -1
  227. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  228. package/src/sap/ui/core/util/MockServer.js +1 -1
  229. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  230. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +3 -1
  231. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  232. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  233. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  234. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  235. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  236. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  237. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  238. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  239. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  240. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  241. package/src/sap/ui/debug/ControlTree.js +1 -1
  242. package/src/sap/ui/debug/DebugEnv.js +1 -1
  243. package/src/sap/ui/debug/PropertyList.js +1 -1
  244. package/src/sap/ui/events/PseudoEvents.js +17 -9
  245. package/src/sap/ui/model/Binding.js +19 -15
  246. package/src/sap/ui/model/ClientModel.js +1 -1
  247. package/src/sap/ui/model/CompositeBinding.js +57 -19
  248. package/src/sap/ui/model/CompositeDataState.js +1 -1
  249. package/src/sap/ui/model/CompositeType.js +1 -1
  250. package/src/sap/ui/model/DataState.js +1 -1
  251. package/src/sap/ui/model/ListBinding.js +42 -1
  252. package/src/sap/ui/model/MetaModel.js +1 -1
  253. package/src/sap/ui/model/Model.js +5 -4
  254. package/src/sap/ui/model/PropertyBinding.js +10 -0
  255. package/src/sap/ui/model/SelectionModel.js +1 -1
  256. package/src/sap/ui/model/SimpleType.js +4 -1
  257. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  258. package/src/sap/ui/model/Type.js +1 -1
  259. package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
  260. package/src/sap/ui/model/json/JSONModel.js +1 -1
  261. package/src/sap/ui/model/message/MessageModel.js +1 -1
  262. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  263. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  264. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  265. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  266. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  267. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  268. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  269. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  270. package/src/sap/ui/model/odata/type/Date.js +1 -1
  271. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  272. package/src/sap/ui/model/odata/type/DateTimeBase.js +8 -1
  273. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  274. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  275. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  276. package/src/sap/ui/model/odata/type/Double.js +1 -1
  277. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  278. package/src/sap/ui/model/odata/type/Int.js +1 -1
  279. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  280. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  281. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  282. package/src/sap/ui/model/odata/type/ODataType.js +3 -3
  283. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  284. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  285. package/src/sap/ui/model/odata/type/Single.js +1 -1
  286. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  287. package/src/sap/ui/model/odata/type/String.js +1 -1
  288. package/src/sap/ui/model/odata/type/Time.js +1 -1
  289. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  290. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  291. package/src/sap/ui/model/odata/v2/Context.js +3 -2
  292. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  293. package/src/sap/ui/model/odata/v2/ODataListBinding.js +14 -3
  294. package/src/sap/ui/model/odata/v2/ODataModel.js +45 -31
  295. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
  296. package/src/sap/ui/model/odata/v4/Context.js +7 -3
  297. package/src/sap/ui/model/odata/v4/ODataBinding.js +68 -39
  298. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +12 -8
  299. package/src/sap/ui/model/odata/v4/ODataListBinding.js +30 -8
  300. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +11 -9
  301. package/src/sap/ui/model/odata/v4/ODataModel.js +10 -14
  302. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +64 -31
  303. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +21 -16
  304. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +2 -0
  305. package/src/sap/ui/model/odata/v4/lib/_Cache.js +37 -14
  306. package/src/sap/ui/model/odata/v4/lib/_Helper.js +11 -1
  307. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +7 -4
  308. package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +4 -4
  309. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
  310. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  311. package/src/sap/ui/model/type/Boolean.js +1 -1
  312. package/src/sap/ui/model/type/Currency.js +1 -1
  313. package/src/sap/ui/model/type/Date.js +1 -1
  314. package/src/sap/ui/model/type/DateInterval.js +1 -1
  315. package/src/sap/ui/model/type/DateTime.js +1 -1
  316. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  317. package/src/sap/ui/model/type/FileSize.js +1 -1
  318. package/src/sap/ui/model/type/Float.js +1 -1
  319. package/src/sap/ui/model/type/Integer.js +1 -1
  320. package/src/sap/ui/model/type/String.js +1 -1
  321. package/src/sap/ui/model/type/Time.js +1 -1
  322. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  323. package/src/sap/ui/model/type/Unit.js +1 -1
  324. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  325. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  326. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  327. package/src/sap/ui/test/Opa5.js +1 -1
  328. package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
  329. package/src/sap/ui/test/generic/TestBase.js +1 -1
  330. package/src/sap/ui/test/gherkin/simpleGherkinParser.js +10 -5
  331. package/src/sap/ui/test/matchers/LabelFor.js +1 -0
  332. package/src/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
  333. package/src/sap/ui/util/ActivityDetection.js +7 -1
  334. package/src/sap/ui/util/Mobile.js +11 -8
  335. package/src/sap/ui/util/Storage.js +1 -1
  336. package/src/ui5loader-autoconfig.js +5 -2
  337. package/src/ui5loader.js +169 -185
  338. package/test/sap/ui/core/FormatHelper.js +3 -2
  339. package/test/sap/ui/core/demokit/docuindex.json +6 -0
  340. package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/OpaBusyIndicator.js +1 -1
  341. package/test/sap/ui/core/demokit/sample/OpaMatchers/OpaMatchers.js +2 -2
  342. package/test/sap/ui/core/demokit/sample/ViewTemplate/types/MIT.ODataTypes.html +9 -14
  343. package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js +7 -0
  344. package/test/sap/ui/core/demokit/sample/common/pages/Any.js +1 -1
  345. package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/filter.js +2 -2
  346. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Component.js +27 -0
  347. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.controller.js +43 -0
  348. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.view.xml +47 -0
  349. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.controller.js +27 -0
  350. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.view.xml +7 -0
  351. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/NotFound.view.xml +8 -0
  352. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.controller.js +123 -0
  353. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.view.xml +92 -0
  354. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.html +27 -0
  355. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.js +69 -0
  356. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/README.html +55 -0
  357. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/SandboxModel.js +56 -0
  358. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/POST-SalesOrderList.json +66 -0
  359. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000')-SO_2_SOITEM.json +57 -0
  360. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000').json +20 -0
  361. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000001').json +9 -0
  362. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000007')-SO_2_BP.json +12 -0
  363. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList.json +62 -0
  364. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.json +85 -0
  365. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.xml +185 -0
  366. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.json +93 -0
  367. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.xml +262 -0
  368. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/metadata.xml +1779 -0
  369. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/manifest.json +134 -0
  370. package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/pages/Main.js +119 -0
  371. package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +0 -41
  372. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/manifest.json +1 -1
  373. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/manifest.json +1 -1
  374. package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.controller.js +5 -17
  375. package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.view.xml +3 -3
  376. package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/test/integration/arrangements/Startup.js +1 -1
  377. package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/test/integration/arrangements/Startup.js +1 -1
  378. package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +25 -7
  379. package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +86 -2
  380. package/test/sap/ui/core/qunit/DataState.qunit.js +2 -7
  381. package/test/sap/ui/core/qunit/HTML.qunit.js +31 -31
  382. package/test/sap/ui/core/qunit/Lib.qunit.js +55 -2
  383. package/test/sap/ui/core/qunit/LocalBusyIndicator.qunit.js +22 -15
  384. package/test/sap/ui/core/qunit/ManagedObject.qunit.js +5 -3
  385. package/test/sap/ui/core/qunit/Object.qunit.js +4 -1
  386. package/test/sap/ui/core/qunit/ThemeManager.qunit.js +2 -2
  387. package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +9 -3
  388. package/test/sap/ui/core/qunit/Theming.beforeBootstrap.qunit.js +13 -0
  389. package/test/sap/ui/core/qunit/Theming.qunit.js +229 -0
  390. package/test/sap/ui/core/qunit/analytics/AnalyticalTreeBindingAdapter.qunit.js +2 -7
  391. package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +2 -7
  392. package/test/sap/ui/core/qunit/app/MessageListBinding.qunit.js +2 -7
  393. package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +24 -0
  394. package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +275 -0
  395. package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +259 -0
  396. package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +5 -6
  397. package/test/sap/ui/core/qunit/base/security/sanitizeHTML.qunit.js +17 -0
  398. package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +1 -2
  399. package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +13 -12
  400. package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +388 -254
  401. package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +19 -30
  402. package/test/sap/ui/core/qunit/component/Models.qunit.js +7 -28
  403. package/test/sap/ui/core/qunit/component/Models_unavoidablySync.qunit.js +8 -26
  404. package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.js +2 -2
  405. package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.json +1 -1
  406. package/test/sap/ui/core/qunit/component/testdata/async/lib2/library.js +2 -2
  407. package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.js +2 -2
  408. package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.json +1 -1
  409. package/test/sap/ui/core/qunit/component/testdata/async/lib3/library.js +2 -2
  410. package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.js +2 -2
  411. package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.json +1 -1
  412. package/test/sap/ui/core/qunit/component/testdata/async/lib4/library.js +2 -2
  413. package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component-preload.js +1 -1
  414. package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component.js +2 -2
  415. package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component-preload.js +1 -1
  416. package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component.js +2 -2
  417. package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component-preload.js +1 -1
  418. package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component.js +2 -3
  419. package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/Component.js +0 -4
  420. package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/sync/Component.js +2 -6
  421. package/test/sap/ui/core/qunit/component/testdata/customizing/customersub/Component.js +0 -4
  422. package/test/sap/ui/core/qunit/component/testdata/inherit/Component.js +2 -7
  423. package/test/sap/ui/core/qunit/component/testdata/inherit/parent/Component.js +2 -7
  424. package/test/sap/ui/core/qunit/component/testdata/inheritAsync/Component.js +2 -2
  425. package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentA/Component.js +2 -2
  426. package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentB/Component.js +2 -2
  427. package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/Component.js +2 -2
  428. package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentA/Component.js +2 -2
  429. package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentB/Component.js +2 -2
  430. package/test/sap/ui/core/qunit/component/testdata/other/Component.js +2 -7
  431. package/test/sap/ui/core/qunit/component/testdata/terminologies/Component.js +2 -2
  432. package/test/sap/ui/core/qunit/component/testdata/terminologies/component1/Component.js +2 -2
  433. package/test/sap/ui/core/qunit/component/testdata/terminologies/component2/Component.js +2 -2
  434. package/test/sap/ui/core/qunit/component/testdata/terminologies/component3/Component.js +2 -2
  435. package/test/sap/ui/core/qunit/component/testdata/terminologies/component5/Component.js +2 -2
  436. package/test/sap/ui/core/qunit/component/testdata/terminologies/reuse/Component.js +2 -3
  437. package/test/sap/ui/core/qunit/component/testdata/v1/Component.js +2 -7
  438. package/test/sap/ui/core/qunit/component/testdata/v1empty/Component.js +2 -7
  439. package/test/sap/ui/core/qunit/component/testdata/v1inline/Component.js +2 -5
  440. package/test/sap/ui/core/qunit/component/testdata/v1missing/Component.js +2 -7
  441. package/test/sap/ui/core/qunit/component/testdata/v2/Component.js +2 -5
  442. package/test/sap/ui/core/qunit/component/testdata/v2asyncRootView/Component.js +2 -5
  443. package/test/sap/ui/core/qunit/component/testdata/v2empty/Component.js +2 -9
  444. package/test/sap/ui/core/qunit/component/testdata/v2inline/Component.js +2 -5
  445. package/test/sap/ui/core/qunit/component/testdata/v2missing/Component.js +2 -9
  446. package/test/sap/ui/core/qunit/component/testdata/v2version/Component.js +2 -2
  447. package/test/sap/ui/core/qunit/dnd/DragDropInfo.qunit.js +1 -2
  448. package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +2 -0
  449. package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +2 -0
  450. package/test/sap/ui/core/qunit/gherkin/dataTableUtils.qunit.js +2 -2
  451. package/test/sap/ui/core/qunit/i18n/Locale.qunit.js +0 -52
  452. package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +1 -1
  453. package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +14 -24
  454. package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +18 -0
  455. package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
  456. package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +2 -7
  457. package/test/sap/ui/core/qunit/json/JSONPropertyBinding.qunit.js +7 -12
  458. package/test/sap/ui/core/qunit/json/JSONTwoWay.qunit.js +3 -8
  459. package/test/sap/ui/core/qunit/loader/fixture/amd-with-export-true/module1.js +2 -2
  460. package/test/sap/ui/core/qunit/messages/MessageMixin.qunit.js +2 -7
  461. package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +1 -1
  462. package/test/sap/ui/core/qunit/model/Binding.qunit.js +36 -11
  463. package/test/sap/ui/core/qunit/model/ClientListBinding.qunit.js +2 -7
  464. package/test/sap/ui/core/qunit/model/ClientTreeBinding.qunit.js +2 -7
  465. package/test/sap/ui/core/qunit/model/CompositeDataState.qunit.js +2 -7
  466. package/test/sap/ui/core/qunit/model/Context.qunit.js +2 -7
  467. package/test/sap/ui/core/qunit/model/ContextBinding.qunit.js +2 -7
  468. package/test/sap/ui/core/qunit/model/ListBinding.qunit.js +63 -6
  469. package/test/sap/ui/core/qunit/model/Model.qunit.js +2 -7
  470. package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +40 -0
  471. package/test/sap/ui/core/qunit/model/TreeBinding.qunit.js +2 -7
  472. package/test/sap/ui/core/qunit/model/TreeBindingAdapter.qunit.js +2 -7
  473. package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +9 -8
  474. package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +4 -4
  475. package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +4 -4
  476. package/test/sap/ui/core/qunit/odata/AnnotationParserNoFakeService.qunit.js +2 -7
  477. package/test/sap/ui/core/qunit/odata/ODataMessageParser.qunit.js +1 -1
  478. package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +2 -8
  479. package/test/sap/ui/core/qunit/odata/ODataMetadataNoFakeService.qunit.js +1 -6
  480. package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +24 -0
  481. package/test/sap/ui/core/qunit/odata/v2/Context.qunit.js +2 -7
  482. package/test/sap/ui/core/qunit/odata/v2/ODataContextBindingNoFakeService.qunit.js +2 -7
  483. package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +31 -17
  484. package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +28 -19
  485. package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +70 -15
  486. package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBindingNoFakeService.qunit.js +2 -7
  487. package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +4 -9
  488. package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +2 -7
  489. package/test/sap/ui/core/qunit/odata/v2/_CreatedContextsCache.qunit.js +2 -7
  490. package/test/sap/ui/core/qunit/odata/v4/AnnotationHelper.qunit.js +1 -1
  491. package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +45 -17
  492. package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +152 -151
  493. package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +55 -27
  494. package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +119 -4
  495. package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +3 -3
  496. package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +754 -195
  497. package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +42 -53
  498. package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +283 -170
  499. package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +103 -78
  500. package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +3 -0
  501. package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +87 -58
  502. package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +3 -1
  503. package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +124 -22
  504. package/test/sap/ui/core/qunit/odata/v4/testsuite.odatav4.qunit.js +4 -0
  505. package/test/sap/ui/core/qunit/opa/_LogCollector.qunit.js +1 -1
  506. package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +5 -0
  507. package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +17 -37
  508. package/test/sap/ui/core/qunit/routing/HashChanger.qunit.js +1 -6
  509. package/test/sap/ui/core/qunit/routing/RouterHashChanger.qunit.js +1 -10
  510. package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +1 -22
  511. package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -4
  512. package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +34 -1
  513. package/test/sap/ui/core/qunit/testdata/fastnavigation/view/FastNavigation.view.xml +2 -2
  514. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/i18n.properties +1 -0
  515. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/library.js +10 -0
  516. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/manifest.json +10 -0
  517. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/library.js +10 -0
  518. package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/messagebundle.properties +1 -0
  519. package/test/sap/ui/core/qunit/testsuites/testsuite.databinding.qunit.js +3 -0
  520. package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +29 -0
  521. package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +397 -607
  522. package/test/sap/ui/core/qunit/types/SimpleType.qunit.js +16 -2
  523. package/test/sap/ui/core/qunit/types/Types.qunit.js +2 -37
  524. package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +1 -1
  525. package/test/sap/ui/core/qunit/util/SyncPromise.qunit.js +4 -1
  526. package/test/sap/ui/core/qunit/util/jQuery.sap.measure.qunit.js +16 -11
  527. package/test/sap/ui/core/qunit/xml/XMLListBinding.qunit.js +1 -3
  528. package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +4 -14
  529. package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +7 -11
  530. package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +1 -1
  531. package/test/sap/ui/core/qunit/xml/XMLTwoWay.qunit.js +3 -7
  532. package/test/sap/ui/core/relnotes/changes-1.115.json +1 -37
  533. package/test/sap/ui/core/relnotes/changes-1.116.json +82 -0
  534. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
  535. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
  536. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
  537. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
  538. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
  539. package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
  540. package/test/testsuite/js/samples.js +2 -0
  541. package/ui5.yaml +1 -1
@@ -5,483 +5,204 @@
5
5
  */
6
6
 
7
7
  //Provides the locale object sap.ui.core.Locale
8
- sap.ui.define(['sap/ui/base/Object', 'sap/base/assert', './CalendarType'],
9
- function(BaseObject, assert, CalendarType) {
8
+ sap.ui.define(['sap/base/assert', 'sap/ui/base/Object', "sap/base/i18n/Localization", "sap/base/i18n/LanguageTag"],
9
+ function(assert, BaseObject, Localization, LanguageTag) {
10
10
  "use strict";
11
11
 
12
-
13
-
12
+ /**
13
+ * Creates an instance of the Locale.
14
+ *
15
+ * @class Locale represents a locale setting, consisting of a language, script, region, variants, extensions and private use section.
16
+ *
17
+ * @param {string} sLocale the locale identifier, in format en-US or en_US.
18
+ *
19
+ * @extends sap.ui.base.Object
20
+ * @author SAP SE
21
+ * @version 1.116.0
22
+ * @public
23
+ * @alias sap.ui.core.Locale
24
+ */
25
+ var Locale = BaseObject.extend("sap.ui.core.Locale", /** @lends sap.ui.core.Locale.prototype */ {
26
+
27
+ constructor : function(vLocale) {
28
+ BaseObject.apply(this);
29
+ if (vLocale instanceof LanguageTag) {
30
+ this.oLanguageTag = vLocale;
31
+ this.sLocaleId = this.oLanguageTag.toString();
32
+ } else {
33
+ this.oLanguageTag = new LanguageTag(vLocale);
34
+ this.sLocaleId = vLocale;
35
+ }
36
+ Object.assign(this, this.oLanguageTag);
37
+ this.sLanguage = this.language;
38
+ },
14
39
 
15
40
  /**
16
- * A regular expression that describes language tags according to BCP-47.
17
- * @see BCP47 "Tags for Identifying Languages" (http://www.ietf.org/rfc/bcp/bcp47.txt)
41
+ * Get the locale language.
18
42
  *
19
- * The matching groups are
20
- * 0=all
21
- * 1=language (shortest ISO639 code + ext. language sub tags | 4digits (reserved) | registered language sub tags)
22
- * 2=script (4 letters)
23
- * 3=region (2 letter language or 3 digits)
24
- * 4=variants (separated by '-', Note: capturing group contains leading '-' to shorten the regex!)
25
- * 5=extensions (including leading singleton, multiple extensions separated by '-'.Note: capturing group contains leading '-' to shorten the regex!)
26
- * 6=private use section (including leading 'x', multiple sections separated by '-')
43
+ * Note that the case might differ from the original script tag
44
+ * (Lower case is enforced as recommended by BCP47/ISO639).
27
45
  *
28
- * [-------------------- language ----------------------][--- script ---][------- region --------][------------- variants --------------][----------- extensions ------------][------ private use -------]
46
+ * @returns {string} the language code
47
+ * @public
29
48
  */
30
- var rLocale = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
49
+ getLanguage : function() {
50
+ return this.language;
51
+ },
31
52
 
32
53
  /**
33
- * Creates an instance of the Locale.
34
- *
35
- * @class Locale represents a locale setting, consisting of a language, script, region, variants, extensions and private use section.
54
+ * Get the locale script or <code>null</code> if none was specified.
36
55
  *
37
- * @param {string} sLocaleId the locale identifier, in format en-US or en_US.
56
+ * Note that the case might differ from the original language tag
57
+ * (Upper case first letter and lower case reminder enforced as
58
+ * recommended by BCP47/ISO15924)
38
59
  *
39
- * @extends sap.ui.base.Object
40
- * @author SAP SE
41
- * @version 1.115.0
60
+ * @returns {string|null} the script code or <code>null</code>
42
61
  * @public
43
- * @alias sap.ui.core.Locale
44
- */
45
- var Locale = BaseObject.extend("sap.ui.core.Locale", /** @lends sap.ui.core.Locale.prototype */ {
46
-
47
- constructor : function(sLocaleId) {
48
- BaseObject.apply(this);
49
- var aResult = rLocale.exec(sLocaleId.replace(/_/g, "-"));
50
- // If the given Locale string cannot be parsed by the regular expression above,
51
- // we should at least tell the developer why the Core fails to load.
52
- if (aResult === null ) {
53
- throw new TypeError("The given language '" + sLocaleId + "' does not adhere to BCP-47.");
54
- }
55
-
56
- this.sLocaleId = sLocaleId;
57
- this.sLanguage = aResult[1] || null;
58
- this.sScript = aResult[2] || null;
59
- this.sRegion = aResult[3] || null;
60
- this.sVariant = (aResult[4] && aResult[4].slice(1)) || null; // remove leading dash from capturing group
61
- this.sExtension = (aResult[5] && aResult[5].slice(1)) || null; // remove leading dash from capturing group
62
- this.sPrivateUse = aResult[6] || null;
63
-
64
- // convert subtags according to the BCP47 recommendations
65
- // - language: all lower case
66
- // - script: lower case with the first letter capitalized
67
- // - region: all upper case
68
- if ( this.sLanguage ) {
69
- this.sLanguage = this.sLanguage.toLowerCase();
70
- }
71
- if ( this.sScript ) {
72
- this.sScript = this.sScript.toLowerCase().replace(/^[a-z]/, function($) {
73
- return $.toUpperCase();
74
- });
75
- }
76
- if ( this.sRegion ) {
77
- this.sRegion = this.sRegion.toUpperCase();
78
- }
79
- },
80
-
81
- /**
82
- * Get the locale language.
83
- *
84
- * Note that the case might differ from the original script tag
85
- * (Lower case is enforced as recommended by BCP47/ISO639).
86
- *
87
- * @returns {string} the language code
88
- * @public
89
- */
90
- getLanguage : function() {
91
- return this.sLanguage;
92
- },
93
-
94
- /**
95
- * Get the locale script or <code>null</code> if none was specified.
96
- *
97
- * Note that the case might differ from the original language tag
98
- * (Upper case first letter and lower case reminder enforced as
99
- * recommended by BCP47/ISO15924)
100
- *
101
- * @returns {string|null} the script code or <code>null</code>
102
- * @public
103
- */
104
- getScript : function() {
105
- return this.sScript;
106
- },
107
-
108
- /**
109
- * Get the locale region or <code>null</code> if none was specified.
110
- *
111
- * Note that the case might differ from the original script tag
112
- * (Upper case is enforced as recommended by BCP47/ISO3166-1).
113
- *
114
- * @returns {string} the ISO3166-1 region code (2-letter or 3-digits)
115
- * @public
116
- */
117
- getRegion : function() {
118
- return this.sRegion;
119
- },
120
-
121
- /**
122
- * Get the locale variants as a single string or <code>null</code>.
123
- *
124
- * Multiple variants are separated by a dash '-'.
125
- *
126
- * @returns {string|null} the variant or <code>null</code>
127
- * @public
128
- */
129
- getVariant : function() {
130
- return this.sVariant;
131
- },
132
-
133
- /**
134
- * Get the locale variants as an array of individual variants.
135
- *
136
- * The separating dashes are not part of the result.
137
- * If there is no variant section in the locale tag, an empty array is returned.
138
- *
139
- * @returns {string[]} the individual variant sections
140
- * @public
141
- */
142
- getVariantSubtags : function() {
143
- return this.sVariant ? this.sVariant.split('-') : [];
144
- },
145
-
146
- /**
147
- * Get the locale extension as a single string or <code>null</code>.
148
- *
149
- * The extension always consists of a singleton character (not 'x'),
150
- * a dash '-' and one or more extension token, each separated
151
- * again with a dash.
152
- *
153
- * Use {@link #getExtensionSubtags} to get the individual extension tokens as an array.
154
- *
155
- * @returns {string|null} the extension or <code>null</code>
156
- * @public
157
- */
158
- getExtension : function() {
159
- return this.sExtension;
160
- },
161
-
162
- /**
163
- * Get the locale extensions as an array of tokens.
164
- *
165
- * The leading singleton and the separating dashes are not part of the result.
166
- * If there is no extensions section in the locale tag, an empty array is returned.
167
- *
168
- * @returns {string[]} the individual extension sections
169
- * @public
170
- */
171
- getExtensionSubtags : function() {
172
- return this.sExtension ? this.sExtension.slice(2).split('-') : [];
173
- },
174
-
175
- /**
176
- * Get the locale private use section or <code>null</code>.
177
- *
178
- * @returns {string} the private use section
179
- * @public
180
- */
181
- getPrivateUse : function() {
182
- return this.sPrivateUse;
183
- },
184
-
185
- /**
186
- * Get the locale private use section as an array of tokens.
187
- *
188
- * The leading singleton and the separating dashes are not part of the result.
189
- * If there is no private use section in the locale tag, an empty array is returned.
190
- *
191
- * @returns {string[]} the tokens of the private use section
192
- * @public
193
- */
194
- getPrivateUseSubtags : function() {
195
- return this.sPrivateUse ? this.sPrivateUse.slice(2).split('-') : [];
196
- },
197
-
198
- hasPrivateUseSubtag : function(sSubtag) {
199
- assert(sSubtag && sSubtag.match(/^[0-9A-Z]{1,8}$/i), "subtag must be a valid BCP47 private use tag");
200
- return this.getPrivateUseSubtags().indexOf(sSubtag) >= 0;
201
- },
202
-
203
- toString : function() {
204
- return join(
205
- this.sLanguage,
206
- this.sScript,
207
- this.sRegion,
208
- this.sVariant,
209
- this.sExtension,
210
- this.sPrivateUse);
211
- },
212
-
213
- /**
214
- * @returns {string} the modern language tag
215
- * @private
216
- * @ui5-restricted sap.ui.core.Configuration
217
- */
218
- toLanguageTag : function() {
219
- var sLanguage = this.getModernLanguage();
220
- var sScript = this.sScript;
221
- // special case for "sr_Latn" language: "sh" should then be used
222
- // This method is used to set the Accept-Language HTTP Header for ODataModel
223
- // requests and .hdbtextbundle resource bundles.
224
- // It has to remain backward compatible
225
- if (sLanguage === "sr" && sScript === "Latn") {
226
- sLanguage = "sh";
227
- sScript = null;
228
- }
229
-
230
- return join(
231
- sLanguage,
232
- sScript,
233
- this.sRegion,
234
- this.sVariant,
235
- this.sExtension,
236
- this.sPrivateUse);
237
- },
238
-
239
- /**
240
- * @returns {string} the modern language
241
- * @private
242
- * @ui5-restricted sap.ui.core.LocaleData
243
- */
244
- getModernLanguage: function() {
245
- return M_ISO639_OLD_TO_NEW[this.sLanguage] || this.sLanguage;
246
- },
247
-
248
- /**
249
- * Best guess to get a proper SAP Logon Language for this locale.
250
- *
251
- * Conversions taken into account:
252
- * <ul>
253
- * <li>use the language part only</li>
254
- * <li>convert old ISO639 codes to newer ones (e.g. 'iw' to 'he')</li>
255
- * <li>for Chinese, map 'Traditional Chinese' or region 'TW' to SAP proprietary code 'zf'</li>
256
- * <li>map private extensions x-saptrc, x-sappsd and saprigi to SAP pseudo languages '1Q', '2Q' and '3Q'</li>
257
- * <li>remove ext. language sub tags</li>
258
- * <li>convert to uppercase</li>
259
- * </ul>
260
- *
261
- * Note that the conversion also returns a result for languages that are not
262
- * supported by the default set of SAP languages. This method has no knowledge
263
- * about the concrete languages of any given backend system.
264
- *
265
- * @returns {string} a language code that should
266
- * @public
267
- * @since 1.17.0
268
- * @deprecated As of 1.44, use {@link sap.ui.core.Configuration#getSAPLogonLanguage} instead
269
- * as that class allows to configure an SAP Logon language.
270
- */
271
- getSAPLogonLanguage : function() {
272
- return this._getSAPLogonLanguage();
273
- },
274
-
275
- /**
276
- * Best guess to get a proper SAP Logon Language for this locale.
277
- *
278
- * Conversions taken into account:
279
- * <ul>
280
- * <li>use the language part only</li>
281
- * <li>convert old ISO639 codes to newer ones (e.g. 'iw' to 'he')</li>
282
- * <li>for Chinese, map 'Traditional Chinese' or region 'TW' to SAP proprietary code 'zf'</li>
283
- * <li>map private extensions x-saptrc, x-sappsd and saprigi to SAP pseudo languages '1Q', '2Q' and '3Q'</li>
284
- * <li>remove ext. language sub tags</li>
285
- * <li>convert to uppercase</li>
286
- * </ul>
287
- *
288
- * Note that the conversion also returns a result for languages that are not
289
- * supported by the default set of SAP languages. This method has no knowledge
290
- * about the concrete languages of any given backend system.
291
- *
292
- * @returns {string} a language code that should
293
- * @private
294
- * @ui5-restricted sap.ui.core.Configuration
295
- **/
296
- _getSAPLogonLanguage : function() {
297
-
298
- var sLanguage = this.sLanguage || "";
299
-
300
- // cut off any ext. language sub tags
301
- if ( sLanguage.indexOf("-") >= 0 ) {
302
- sLanguage = sLanguage.slice(0, sLanguage.indexOf("-"));
303
- }
304
-
305
- // convert to new ISO codes
306
- sLanguage = M_ISO639_OLD_TO_NEW[sLanguage] || sLanguage;
307
-
308
- // handle special case for Chinese: region TW implies Traditional Chinese (ZF)
309
- if ( sLanguage === "zh" && !this.sScript && this.sRegion === "TW" ) {
310
- return "ZF";
311
- }
312
-
313
- return (
314
- M_LOCALE_TO_ABAP_LANGUAGE[join(sLanguage, this.sScript)]
315
- || M_LOCALE_TO_ABAP_LANGUAGE[join(sLanguage, this.sRegion)]
316
- || M_LOCALE_TO_ABAP_LANGUAGE[getPseudoLanguageTag(this.sPrivateUse)]
317
- || sLanguage.toUpperCase()
318
- );
319
- },
320
-
321
- /**
322
- *
323
- * @returns {sap.ui.core.CalendarType} The preferred Calendar type.
324
- * @private
325
- * @ui5-restricted sap.ui.core
326
- */
327
- getPreferredCalendarType: function() {
328
- return Locale._mPreferredCalendar[this.getLanguage() + "-" + this.getRegion()] ||
329
- Locale._mPreferredCalendar[this.getLanguage()] ||
330
- Locale._mPreferredCalendar["default"];
331
- }
332
- });
333
-
334
- /*
335
- * Maps wellknown private use extensions to pseudo language tags.
336
62
  */
337
- function getPseudoLanguageTag(sPrivateUse) {
338
- if ( sPrivateUse ) {
339
- var m = /-(saptrc|sappsd|saprigi)(?:-|$)/i.exec(sPrivateUse);
340
- return m && "en-US-x-" + m[1].toLowerCase();
341
- }
342
- }
343
-
344
- var M_ISO639_OLD_TO_NEW = {
345
- "iw" : "he",
346
- "ji" : "yi"
347
- };
348
-
349
-
350
- // Note: keys must be uppercase
351
- var M_ABAP_LANGUAGE_TO_LOCALE = {
352
- "ZH" : "zh-Hans",
353
- "ZF" : "zh-Hant",
354
- "SH" : "sr-Latn",
355
- "6N" : "en-GB",
356
- "1P" : "pt-PT",
357
- "1X" : "es-MX",
358
- "3F" : "fr-CA",
359
- "1Q" : "en-US-x-saptrc",
360
- "2Q" : "en-US-x-sappsd",
361
- "3Q" : "en-US-x-saprigi"
362
- };
363
-
364
- var M_LOCALE_TO_ABAP_LANGUAGE = inverse(M_ABAP_LANGUAGE_TO_LOCALE);
63
+ getScript : function() {
64
+ return this.script;
65
+ },
365
66
 
366
67
  /**
367
- * Helper to analyze and parse designtime (aka buildtime) variables
68
+ * Get the locale region or <code>null</code> if none was specified.
368
69
  *
369
- * At buildtime, the build can detect a pattern like $some-variable-name:some-value$
370
- * and replace 'some-value' with a value determined at buildtime (here: the actual list of locales).
70
+ * Note that the case might differ from the original script tag
71
+ * (Upper case is enforced as recommended by BCP47/ISO3166-1).
371
72
  *
372
- * At runtime, this method removes the surrounding pattern ('$some-variable-name:' and '$') and leaves only the 'some-value'.
373
- * Additionally, this value is parsed as a comma-separated list (because this is the only use case here).
374
- *
375
- * The mimic of the comments is borrowed from the CVS (Concurrent Versions System),
376
- * see http://web.mit.edu/gnu/doc/html/cvs_17.html.
73
+ * @returns {string} the ISO3166-1 region code (2-letter or 3-digits)
74
+ * @public
75
+ */
76
+ getRegion : function() {
77
+ return this.region;
78
+ },
79
+
80
+ /**
81
+ * Get the locale variants as a single string or <code>null</code>.
377
82
  *
378
- * If no valid <code>sValue</code> is given, <code>null</code> is returned
83
+ * Multiple variants are separated by a dash '-'.
379
84
  *
380
- * @param {string} sValue The raw designtime property e.g. $cldr-rtl-locales:ar,fa,he$
381
- * @returns {string[]|null} The designtime property e.g. ['ar', 'fa', 'he']
382
- * @private
85
+ * @returns {string|null} the variant or <code>null</code>
86
+ * @public
383
87
  */
384
- function getDesigntimePropertyAsArray(sValue) {
385
- var m = /\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(sValue);
386
- return (m && m[2]) ? m[2].split(/,/) : null;
387
- }
88
+ getVariant : function() {
89
+ return this.variant;
90
+ },
388
91
 
389
92
  /**
390
- * A list of locales for which the CLDR specifies "right-to-left"
391
- * as the character orientation.
93
+ * Get the locale variants as an array of individual variants.
94
+ *
95
+ * The separating dashes are not part of the result.
96
+ * If there is no variant section in the locale tag, an empty array is returned.
392
97
  *
393
- * The string literal below is substituted during the build.
394
- * The value is determined from the CLDR JSON files which are
395
- * bundled with the UI5 runtime.
98
+ * @returns {string[]} the individual variant sections
99
+ * @public
396
100
  */
397
- var A_RTL_LOCALES = getDesigntimePropertyAsArray("$cldr-rtl-locales:ar,fa,he$") || [];
101
+ getVariantSubtags : function() {
102
+ return this.variantSubtags;
103
+ },
398
104
 
399
105
  /**
400
- * A list of locales for which CLDR data is bundled with the UI5 runtime.
401
- * @private
106
+ * Get the locale extension as a single string or <code>null</code>.
107
+ *
108
+ * The extension always consists of a singleton character (not 'x'),
109
+ * a dash '-' and one or more extension token, each separated
110
+ * again with a dash.
111
+ *
112
+ * Use {@link #getExtensions} to get the individual extension tokens as an array.
113
+ *
114
+ * @returns {string|null} the extension or <code>null</code>
115
+ * @public
402
116
  */
403
- Locale._cldrLocales = getDesigntimePropertyAsArray("$cldr-locales:ar,ar_EG,ar_SA,bg,ca,cy,cs,da,de,de_AT,de_CH,el,el_CY,en,en_AU,en_GB,en_HK,en_IE,en_IN,en_NZ,en_PG,en_SG,en_ZA,es,es_AR,es_BO,es_CL,es_CO,es_MX,es_PE,es_UY,es_VE,et,fa,fi,fr,fr_BE,fr_CA,fr_CH,fr_LU,he,hi,hr,hu,id,it,it_CH,ja,kk,ko,lt,lv,ms,nb,nl,nl_BE,pl,pt,pt_PT,ro,ru,ru_UA,sk,sl,sr,sr_Latn,sv,th,tr,uk,vi,zh_CN,zh_HK,zh_SG,zh_TW$");
117
+ getExtension : function() {
118
+ return this.extension;
119
+ },
404
120
 
405
121
  /**
406
- * A map of preferred Calendar types according to the language.
407
- * @private
122
+ * Get the locale extensions as an array of tokens.
123
+ *
124
+ * The leading singleton and the separating dashes are not part of the result.
125
+ * If there is no extensions section in the locale tag, an empty array is returned.
126
+ *
127
+ * @returns {string[]} the individual extension sections
128
+ * @public
408
129
  */
409
- Locale._mPreferredCalendar = {
410
- "ar-SA": CalendarType.Islamic,
411
- "fa": CalendarType.Persian,
412
- "th": CalendarType.Buddhist,
413
- "default": CalendarType.Gregorian
414
- };
130
+ getExtensionSubtags : function() {
131
+ return this.extensionSubtags;
132
+ },
415
133
 
416
134
  /**
417
- * List of locales for which translated texts have been bundled with the UI5 runtime.
418
- * @private
135
+ * Get the locale private use section or <code>null</code>.
136
+ *
137
+ * @returns {string} the private use section
138
+ * @public
419
139
  */
420
- Locale._coreI18nLocales = getDesigntimePropertyAsArray("$core-i18n-locales:,ar,bg,ca,cs,da,de,el,en,en_GB,es,es_MX,et,fi,fr,hi,hr,hu,it,iw,ja,kk,ko,lt,lv,ms,nl,no,pl,pt,ro,ru,sh,sk,sl,sv,th,tr,uk,vi,zh_CN,zh_TW$");
140
+ getPrivateUse : function() {
141
+ return this.privateUse;
142
+ },
421
143
 
422
144
  /**
423
- * Checks whether the given language tag implies a character orientation
424
- * of 'right-to-left' ('RTL').
145
+ * Get the locale private use section as an array of tokens.
425
146
  *
426
- * The implementation of this method and the configuration above assume
427
- * that when a language (e.g. 'ar') is marked as 'RTL', then all language/region
428
- * combinations for that language (e.g. 'ar_SA') will be 'RTL' as well,
429
- * even if the combination is not mentioned in the above configuration.
430
- * There is no means to define RTL=false for a language/region, when RTL=true for
431
- * the language alone.
147
+ * The leading singleton and the separating dashes are not part of the result.
148
+ * If there is no private use section in the locale tag, an empty array is returned.
432
149
  *
433
- * As of 3/2013 this is true for all locales/regions supported by UI5.
150
+ * @returns {string[]} the tokens of the private use section
151
+ * @public
152
+ */
153
+ getPrivateUseSubtags : function() {
154
+ return this.privateUseSubtags;
155
+ },
156
+
157
+ /**
158
+ * Check if a subtag is provided
434
159
  *
435
- * @param {string|sap.ui.core.Locale} vLanguage Locale or language to check
436
- * @returns {boolean} <code>true</code> if <code>vLanguage</code> implies RTL,
437
- * otherwise <code>false</code>
438
- * @private
160
+ * @param {string} sSubtag The subtag to check
161
+ * @returns {boolean} Wether the subtag is provided or not
439
162
  */
440
- Locale._impliesRTL = function(vLanguage) {
441
- var oLocale = vLanguage instanceof Locale ? vLanguage : new Locale(vLanguage);
442
- var sLanguage = oLocale.getLanguage() || "";
443
- sLanguage = (sLanguage && M_ISO639_OLD_TO_NEW[sLanguage]) || sLanguage;
444
- var sRegion = oLocale.getRegion() || "";
163
+ hasPrivateUseSubtag : function(sSubtag) {
164
+ assert(sSubtag && sSubtag.match(/^[0-9A-Z]{1,8}$/i), "subtag must be a valid BCP47 private use tag");
165
+ return this.privateUseSubtags.indexOf(sSubtag) >= 0;
166
+ },
445
167
 
446
- if ( sRegion && A_RTL_LOCALES.indexOf(sLanguage + "_" + sRegion) >= 0 ) {
447
- return true;
448
- }
449
- return A_RTL_LOCALES.indexOf(sLanguage) >= 0;
450
- };
168
+ toString : function() {
169
+ return this.oLanguageTag.toString();
170
+ },
451
171
 
452
172
  /**
453
- * Retrieves a Locale for the given SAP logon language or BCP47 tag.
173
+ * Best guess to get a proper SAP Logon Language for this locale.
174
+ *
175
+ * Conversions taken into account:
176
+ * <ul>
177
+ * <li>use the language part only</li>
178
+ * <li>convert old ISO639 codes to newer ones (e.g. 'iw' to 'he')</li>
179
+ * <li>for Chinese, map 'Traditional Chinese' or region 'TW' to SAP proprietary code 'zf'</li>
180
+ * <li>map private extensions x-saptrc, x-sappsd and saprigi to SAP pseudo languages '1Q', '2Q' and '3Q'</li>
181
+ * <li>remove ext. language sub tags</li>
182
+ * <li>convert to uppercase</li>
183
+ * </ul>
184
+ *
185
+ * Note that the conversion also returns a result for languages that are not
186
+ * supported by the default set of SAP languages. This method has no knowledge
187
+ * about the concrete languages of any given backend system.
454
188
  *
455
- * @param {string} sSAPLogonLanguage
456
- * A SAP logon language, e.g. "ZF" or a BCP47 language tag
457
- * @returns {sap.ui.core.Locale | undefined}
458
- * The Locale or <code>undefined</code>, if the given string is neither a known
459
- * SAP logon language nor a valid BCP47 tag
460
- * @private
461
- * @ui5-restricted sap.ui.core.Configuration
189
+ * @returns {string} a language code that should
190
+ * @public
191
+ * @since 1.17.0
192
+ * @deprecated As of 1.44, use {@link sap.ui.core.Configuration#getSAPLogonLanguage} instead
193
+ * as that class allows to configure an SAP Logon language.
462
194
  */
463
- Locale.fromSAPLogonLanguage = function (sSAPLogonLanguage) {
464
- if (sSAPLogonLanguage && typeof sSAPLogonLanguage === 'string') {
465
- sSAPLogonLanguage = M_ABAP_LANGUAGE_TO_LOCALE[sSAPLogonLanguage.toUpperCase()] || sSAPLogonLanguage;
466
- try {
467
- return new Locale(sSAPLogonLanguage);
468
- } catch (e) {
469
- // ignore
470
- }
471
- }
472
- };
473
-
474
- function join() {
475
- return Array.prototype.filter.call(arguments, Boolean).join("-");
195
+ getSAPLogonLanguage : function() {
196
+ return Localization._getSAPLogonLanguage(this);
476
197
  }
198
+ });
477
199
 
478
- function inverse(obj) {
479
- return Object.keys(obj).reduce(function(inv, key) {
480
- inv[obj[key]] = key;
481
- return inv;
482
- }, {});
200
+ Locale._getCoreLocale = function(oLocale) {
201
+ if (oLocale instanceof LanguageTag) {
202
+ oLocale = new Locale(oLocale);
483
203
  }
204
+ return oLocale;
205
+ };
484
206
 
485
207
  return Locale;
486
-
487
208
  });