@openui5/sap.ui.core 1.99.1 → 1.102.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 (469) hide show
  1. package/.eslintrc.json +27 -5
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +1 -1
  4. package/src/jquery.sap.global.js +6 -3
  5. package/src/jquery.sap.properties.js +1 -1
  6. package/src/jquery.sap.resources.js +1 -1
  7. package/src/jquery.sap.script.js +1 -1
  8. package/src/jquery.sap.storage.js +3 -3
  9. package/src/sap/base/Log.js +1 -1
  10. package/src/sap/base/assert.js +1 -1
  11. package/src/sap/base/strings/whitespaceReplacer.js +1 -1
  12. package/src/sap/base/util/LoaderExtensions.js +1 -10
  13. package/src/sap/base/util/UriParameters.js +2 -2
  14. package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
  15. package/src/sap/base/util/restricted/_castArray.js +1 -1
  16. package/src/sap/base/util/restricted/_compact.js +1 -1
  17. package/src/sap/base/util/restricted/_curry.js +1 -1
  18. package/src/sap/base/util/restricted/_debounce.js +1 -1
  19. package/src/sap/base/util/restricted/_difference.js +1 -1
  20. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  21. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  22. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  23. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  24. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  25. package/src/sap/base/util/restricted/_flatten.js +1 -1
  26. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  27. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  28. package/src/sap/base/util/restricted/_intersection.js +1 -1
  29. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  30. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  31. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  32. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  33. package/src/sap/base/util/restricted/_isNil.js +1 -1
  34. package/src/sap/base/util/restricted/_max.js +1 -1
  35. package/src/sap/base/util/restricted/_merge.js +1 -1
  36. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  37. package/src/sap/base/util/restricted/_min.js +1 -1
  38. package/src/sap/base/util/restricted/_omit.js +1 -1
  39. package/src/sap/base/util/restricted/_pick.js +1 -1
  40. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  41. package/src/sap/base/util/restricted/_throttle.js +1 -1
  42. package/src/sap/base/util/restricted/_toArray.js +1 -1
  43. package/src/sap/base/util/restricted/_union.js +1 -1
  44. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  45. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  46. package/src/sap/base/util/restricted/_uniq.js +1 -1
  47. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  48. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  49. package/src/sap/base/util/restricted/_without.js +1 -1
  50. package/src/sap/base/util/restricted/_xor.js +1 -1
  51. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  52. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  53. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  54. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  55. package/src/sap/ui/Device.js +3 -3
  56. package/src/sap/ui/Global.js +4 -4
  57. package/src/sap/ui/base/Event.js +1 -1
  58. package/src/sap/ui/base/EventProvider.js +2 -2
  59. package/src/sap/ui/base/ExpressionParser.js +1 -1
  60. package/src/sap/ui/base/Interface.js +1 -1
  61. package/src/sap/ui/base/ManagedObject.js +1 -1
  62. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  63. package/src/sap/ui/base/ManagedObjectObserver.js +2 -0
  64. package/src/sap/ui/base/ManagedObjectRegistry.js +10 -5
  65. package/src/sap/ui/base/Metadata.js +1 -1
  66. package/src/sap/ui/base/Object.js +1 -1
  67. package/src/sap/ui/base/ObjectPool.js +1 -1
  68. package/src/sap/ui/core/.library +2 -1
  69. package/src/sap/ui/core/BusyIndicator.js +1 -1
  70. package/src/sap/ui/core/CommandExecution.js +15 -12
  71. package/src/sap/ui/core/Component.js +50 -27
  72. package/src/sap/ui/core/ComponentContainer.js +1 -1
  73. package/src/sap/ui/core/ComponentMetadata.js +28 -13
  74. package/src/sap/ui/core/ComponentSupport.js +1 -1
  75. package/src/sap/ui/core/Configuration.js +25 -9
  76. package/src/sap/ui/core/Control.js +2 -3
  77. package/src/sap/ui/core/Core.js +121 -36
  78. package/src/sap/ui/core/CustomData.js +1 -1
  79. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  80. package/src/sap/ui/core/Element.js +1 -1
  81. package/src/sap/ui/core/ElementMetadata.js +1 -1
  82. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  83. package/src/sap/ui/core/EventBus.js +1 -1
  84. package/src/sap/ui/core/ExtensionPoint.js +6 -1
  85. package/src/sap/ui/core/FocusHandler.js +2 -3
  86. package/src/sap/ui/core/Fragment.js +1 -1
  87. package/src/sap/ui/core/HTML.js +1 -1
  88. package/src/sap/ui/core/History.js +1 -1
  89. package/src/sap/ui/core/Icon.js +17 -3
  90. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  91. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  92. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  93. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  94. package/src/sap/ui/core/InvisibleText.js +1 -1
  95. package/src/sap/ui/core/Item.js +1 -1
  96. package/src/sap/ui/core/LabelEnablement.js +1 -1
  97. package/src/sap/ui/core/LayoutData.js +1 -1
  98. package/src/sap/ui/core/ListItem.js +1 -1
  99. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  100. package/src/sap/ui/core/Locale.js +1 -1
  101. package/src/sap/ui/core/LocaleData.js +159 -9
  102. package/src/sap/ui/core/Manifest.js +5 -3
  103. package/src/sap/ui/core/Message.js +1 -1
  104. package/src/sap/ui/core/Patcher.js +6 -4
  105. package/src/sap/ui/core/Popup.js +21 -20
  106. package/src/sap/ui/core/RenderManager.js +1 -1
  107. package/src/sap/ui/core/Renderer.js +1 -1
  108. package/src/sap/ui/core/ResizeHandler.js +1 -1
  109. package/src/sap/ui/core/ScrollBar.js +21 -15
  110. package/src/sap/ui/core/SeparatorItem.js +1 -1
  111. package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
  112. package/src/sap/ui/core/Title.js +1 -1
  113. package/src/sap/ui/core/TooltipBase.js +1 -1
  114. package/src/sap/ui/core/UIArea.js +3 -5
  115. package/src/sap/ui/core/UIComponent.js +1 -1
  116. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  117. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  118. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  119. package/src/sap/ui/core/XMLComposite.js +1 -1
  120. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  121. package/src/sap/ui/core/XMLTemplateProcessor.js +521 -395
  122. package/src/sap/ui/core/_IconRegistry.js +3 -2
  123. package/src/sap/ui/core/cache/CacheManager.js +28 -1
  124. package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
  125. package/src/sap/ui/core/cache/LRUPersistentCache.js +76 -4
  126. package/src/sap/ui/core/cldr/ar.json +469 -1
  127. package/src/sap/ui/core/cldr/ar_EG.json +469 -1
  128. package/src/sap/ui/core/cldr/ar_SA.json +469 -1
  129. package/src/sap/ui/core/cldr/bg.json +469 -1
  130. package/src/sap/ui/core/cldr/ca.json +469 -1
  131. package/src/sap/ui/core/cldr/cs.json +469 -1
  132. package/src/sap/ui/core/cldr/cy.json +469 -1
  133. package/src/sap/ui/core/cldr/da.json +469 -1
  134. package/src/sap/ui/core/cldr/de.json +469 -1
  135. package/src/sap/ui/core/cldr/de_AT.json +469 -1
  136. package/src/sap/ui/core/cldr/de_CH.json +469 -1
  137. package/src/sap/ui/core/cldr/el.json +469 -1
  138. package/src/sap/ui/core/cldr/el_CY.json +469 -1
  139. package/src/sap/ui/core/cldr/en.json +469 -1
  140. package/src/sap/ui/core/cldr/en_AU.json +470 -2
  141. package/src/sap/ui/core/cldr/en_GB.json +469 -1
  142. package/src/sap/ui/core/cldr/en_HK.json +469 -1
  143. package/src/sap/ui/core/cldr/en_IE.json +469 -1
  144. package/src/sap/ui/core/cldr/en_IN.json +469 -1
  145. package/src/sap/ui/core/cldr/en_NZ.json +469 -1
  146. package/src/sap/ui/core/cldr/en_PG.json +469 -1
  147. package/src/sap/ui/core/cldr/en_SG.json +469 -1
  148. package/src/sap/ui/core/cldr/en_ZA.json +469 -1
  149. package/src/sap/ui/core/cldr/es.json +469 -1
  150. package/src/sap/ui/core/cldr/es_AR.json +469 -1
  151. package/src/sap/ui/core/cldr/es_BO.json +469 -1
  152. package/src/sap/ui/core/cldr/es_CL.json +469 -1
  153. package/src/sap/ui/core/cldr/es_CO.json +469 -1
  154. package/src/sap/ui/core/cldr/es_MX.json +469 -1
  155. package/src/sap/ui/core/cldr/es_PE.json +469 -1
  156. package/src/sap/ui/core/cldr/es_UY.json +469 -1
  157. package/src/sap/ui/core/cldr/es_VE.json +469 -1
  158. package/src/sap/ui/core/cldr/et.json +469 -1
  159. package/src/sap/ui/core/cldr/fa.json +469 -1
  160. package/src/sap/ui/core/cldr/fi.json +469 -1
  161. package/src/sap/ui/core/cldr/fr.json +469 -1
  162. package/src/sap/ui/core/cldr/fr_BE.json +469 -1
  163. package/src/sap/ui/core/cldr/fr_CA.json +469 -1
  164. package/src/sap/ui/core/cldr/fr_CH.json +469 -1
  165. package/src/sap/ui/core/cldr/fr_LU.json +469 -1
  166. package/src/sap/ui/core/cldr/he.json +469 -1
  167. package/src/sap/ui/core/cldr/hi.json +469 -1
  168. package/src/sap/ui/core/cldr/hr.json +469 -1
  169. package/src/sap/ui/core/cldr/hu.json +469 -1
  170. package/src/sap/ui/core/cldr/id.json +469 -1
  171. package/src/sap/ui/core/cldr/it.json +469 -1
  172. package/src/sap/ui/core/cldr/it_CH.json +469 -1
  173. package/src/sap/ui/core/cldr/ja.json +469 -1
  174. package/src/sap/ui/core/cldr/kk.json +469 -1
  175. package/src/sap/ui/core/cldr/ko.json +469 -1
  176. package/src/sap/ui/core/cldr/lt.json +469 -1
  177. package/src/sap/ui/core/cldr/lv.json +469 -1
  178. package/src/sap/ui/core/cldr/ms.json +469 -1
  179. package/src/sap/ui/core/cldr/nb.json +469 -1
  180. package/src/sap/ui/core/cldr/nl.json +469 -1
  181. package/src/sap/ui/core/cldr/nl_BE.json +469 -1
  182. package/src/sap/ui/core/cldr/pl.json +469 -1
  183. package/src/sap/ui/core/cldr/pt.json +469 -1
  184. package/src/sap/ui/core/cldr/pt_PT.json +469 -1
  185. package/src/sap/ui/core/cldr/ro.json +469 -1
  186. package/src/sap/ui/core/cldr/ru.json +469 -1
  187. package/src/sap/ui/core/cldr/ru_UA.json +469 -1
  188. package/src/sap/ui/core/cldr/sk.json +469 -1
  189. package/src/sap/ui/core/cldr/sl.json +469 -1
  190. package/src/sap/ui/core/cldr/sr.json +469 -1
  191. package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
  192. package/src/sap/ui/core/cldr/sv.json +469 -1
  193. package/src/sap/ui/core/cldr/th.json +469 -1
  194. package/src/sap/ui/core/cldr/tr.json +469 -1
  195. package/src/sap/ui/core/cldr/uk.json +469 -1
  196. package/src/sap/ui/core/cldr/vi.json +469 -1
  197. package/src/sap/ui/core/cldr/zh_CN.json +470 -2
  198. package/src/sap/ui/core/cldr/zh_HK.json +470 -2
  199. package/src/sap/ui/core/cldr/zh_SG.json +470 -2
  200. package/src/sap/ui/core/cldr/zh_TW.json +469 -1
  201. package/src/sap/ui/core/date/Buddhist.js +3 -3
  202. package/src/sap/ui/core/date/Japanese.js +3 -3
  203. package/src/sap/ui/core/date/UniversalDate.js +10 -0
  204. package/src/sap/ui/core/date/UniversalDateUtils.js +49 -49
  205. package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
  206. package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
  207. package/src/sap/ui/core/dnd/DragAndDrop.js +27 -22
  208. package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
  209. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  210. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  211. package/src/sap/ui/core/dnd/DropInfo.js +3 -3
  212. package/src/sap/ui/core/format/DateFormat.js +285 -151
  213. package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +4 -0
  214. package/src/sap/ui/core/format/NumberFormat.js +331 -179
  215. package/src/sap/ui/core/format/TimezoneUtil.js +50 -18
  216. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  217. package/src/sap/ui/core/library.js +219 -188
  218. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  219. package/src/sap/ui/core/message/Message.js +1 -1
  220. package/src/sap/ui/core/message/MessageManager.js +1 -1
  221. package/src/sap/ui/core/message/MessageParser.js +1 -1
  222. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  223. package/src/sap/ui/core/messagebundle.properties +0 -2
  224. package/src/sap/ui/core/messagebundle_ar.properties +0 -1
  225. package/src/sap/ui/core/messagebundle_bg.properties +0 -1
  226. package/src/sap/ui/core/messagebundle_ca.properties +0 -1
  227. package/src/sap/ui/core/messagebundle_cs.properties +0 -1
  228. package/src/sap/ui/core/messagebundle_cy.properties +0 -1
  229. package/src/sap/ui/core/messagebundle_da.properties +0 -1
  230. package/src/sap/ui/core/messagebundle_de.properties +0 -1
  231. package/src/sap/ui/core/messagebundle_el.properties +0 -1
  232. package/src/sap/ui/core/messagebundle_en.properties +0 -1
  233. package/src/sap/ui/core/messagebundle_en_GB.properties +0 -1
  234. package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +0 -1
  235. package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +0 -1
  236. package/src/sap/ui/core/messagebundle_es.properties +0 -1
  237. package/src/sap/ui/core/messagebundle_es_MX.properties +0 -1
  238. package/src/sap/ui/core/messagebundle_et.properties +0 -1
  239. package/src/sap/ui/core/messagebundle_fi.properties +0 -1
  240. package/src/sap/ui/core/messagebundle_fr.properties +0 -1
  241. package/src/sap/ui/core/messagebundle_fr_CA.properties +0 -1
  242. package/src/sap/ui/core/messagebundle_hi.properties +0 -1
  243. package/src/sap/ui/core/messagebundle_hr.properties +0 -1
  244. package/src/sap/ui/core/messagebundle_hu.properties +0 -1
  245. package/src/sap/ui/core/messagebundle_id.properties +0 -1
  246. package/src/sap/ui/core/messagebundle_it.properties +0 -1
  247. package/src/sap/ui/core/messagebundle_iw.properties +0 -1
  248. package/src/sap/ui/core/messagebundle_ja.properties +0 -1
  249. package/src/sap/ui/core/messagebundle_kk.properties +0 -1
  250. package/src/sap/ui/core/messagebundle_ko.properties +1 -2
  251. package/src/sap/ui/core/messagebundle_lt.properties +0 -1
  252. package/src/sap/ui/core/messagebundle_lv.properties +0 -1
  253. package/src/sap/ui/core/messagebundle_ms.properties +0 -1
  254. package/src/sap/ui/core/messagebundle_nl.properties +0 -1
  255. package/src/sap/ui/core/messagebundle_no.properties +0 -1
  256. package/src/sap/ui/core/messagebundle_pl.properties +0 -1
  257. package/src/sap/ui/core/messagebundle_pt.properties +0 -1
  258. package/src/sap/ui/core/messagebundle_pt_PT.properties +0 -1
  259. package/src/sap/ui/core/messagebundle_ro.properties +0 -1
  260. package/src/sap/ui/core/messagebundle_ru.properties +0 -1
  261. package/src/sap/ui/core/messagebundle_sh.properties +0 -1
  262. package/src/sap/ui/core/messagebundle_sk.properties +0 -1
  263. package/src/sap/ui/core/messagebundle_sl.properties +0 -1
  264. package/src/sap/ui/core/messagebundle_sv.properties +0 -1
  265. package/src/sap/ui/core/messagebundle_th.properties +0 -1
  266. package/src/sap/ui/core/messagebundle_tr.properties +0 -1
  267. package/src/sap/ui/core/messagebundle_uk.properties +0 -1
  268. package/src/sap/ui/core/messagebundle_vi.properties +0 -1
  269. package/src/sap/ui/core/messagebundle_zh_CN.properties +0 -1
  270. package/src/sap/ui/core/messagebundle_zh_TW.properties +0 -1
  271. package/src/sap/ui/core/mvc/Controller.js +1 -1
  272. package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +1 -1
  273. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  274. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  275. package/src/sap/ui/core/mvc/JSView.js +2 -2
  276. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  277. package/src/sap/ui/core/mvc/View.js +2 -1
  278. package/src/sap/ui/core/mvc/XMLView.js +25 -21
  279. package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -59
  280. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  281. package/src/sap/ui/core/plugin/LessSupport.js +3 -3
  282. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  283. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  284. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  285. package/src/sap/ui/core/routing/Router.js +1 -1
  286. package/src/sap/ui/core/rules/App.support.js +14 -9
  287. package/src/sap/ui/core/rules/Config.support.js +12 -12
  288. package/src/sap/ui/core/rules/Misc.support.js +8 -3
  289. package/src/sap/ui/core/rules/Model.support.js +8 -8
  290. package/src/sap/ui/core/rules/Rendering.support.js +1 -1
  291. package/src/sap/ui/core/rules/Theming.support.js +4 -4
  292. package/src/sap/ui/core/rules/View.support.js +9 -9
  293. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  294. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  295. package/src/sap/ui/core/service/Service.js +1 -1
  296. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  297. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  298. package/src/sap/ui/core/support/Plugin.js +29 -1
  299. package/src/sap/ui/core/support/Support.js +4 -4
  300. package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
  301. package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
  302. package/src/sap/ui/core/support/plugins/ControlTree.js +440 -349
  303. package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
  304. package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
  305. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  306. package/src/sap/ui/core/support/plugins/Performance.js +10 -13
  307. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  308. package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
  309. package/src/sap/ui/core/support/plugins/Trace.js +7 -7
  310. package/src/sap/ui/core/support/plugins/ViewInfo.js +91 -43
  311. package/src/sap/ui/core/support/support.css +23 -23
  312. package/src/sap/ui/core/support/support.html +5 -7
  313. package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
  314. package/src/sap/ui/core/themes/base/CommandShortcutHints.less +1 -1
  315. package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
  316. package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
  317. package/src/sap/ui/core/themes/base/base.less +1524 -54
  318. package/src/sap/ui/core/themes/base/global.less +171 -13
  319. package/src/sap/ui/core/themes/base/shared.less +1 -0
  320. package/src/sap/ui/core/themes/sap_hcb/global.less +166 -7
  321. package/src/sap/ui/core/theming/Parameters.js +1 -1
  322. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  323. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  324. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  325. package/src/sap/ui/core/tmpl/Template.js +1 -1
  326. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  327. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  328. package/src/sap/ui/core/util/Export.js +1 -1
  329. package/src/sap/ui/core/util/ExportCell.js +1 -1
  330. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  331. package/src/sap/ui/core/util/ExportRow.js +1 -1
  332. package/src/sap/ui/core/util/ExportType.js +1 -1
  333. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  334. package/src/sap/ui/core/util/File.js +1 -1
  335. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  336. package/src/sap/ui/core/util/MockServer.js +4 -3
  337. package/src/sap/ui/core/util/PasteHelper.js +2 -2
  338. package/src/sap/ui/core/util/XMLPreprocessor.js +1 -0
  339. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  340. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  341. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  342. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  343. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  344. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  345. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  346. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  347. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  348. package/src/sap/ui/core/ws/WebSocket.js +7 -8
  349. package/src/sap/ui/debug/ControlTree.js +1 -1
  350. package/src/sap/ui/debug/DebugEnv.js +1 -1
  351. package/src/sap/ui/debug/LogViewer.js +2 -2
  352. package/src/sap/ui/debug/PropertyList.js +1 -1
  353. package/src/sap/ui/model/ClientListBinding.js +127 -21
  354. package/src/sap/ui/model/ClientModel.js +1 -1
  355. package/src/sap/ui/model/CompositeBinding.js +3 -0
  356. package/src/sap/ui/model/CompositeDataState.js +1 -1
  357. package/src/sap/ui/model/CompositeType.js +13 -1
  358. package/src/sap/ui/model/DataState.js +1 -1
  359. package/src/sap/ui/model/ListBinding.js +32 -13
  360. package/src/sap/ui/model/MetaModel.js +1 -1
  361. package/src/sap/ui/model/Model.js +10 -7
  362. package/src/sap/ui/model/SelectionModel.js +1 -1
  363. package/src/sap/ui/model/SimpleType.js +1 -1
  364. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  365. package/src/sap/ui/model/Type.js +1 -1
  366. package/src/sap/ui/model/_Helper.js +26 -0
  367. package/src/sap/ui/model/analytics/AnalyticalBinding.js +29 -13
  368. package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
  369. package/src/sap/ui/model/base/ManagedObjectModel.js +8 -6
  370. package/src/sap/ui/model/json/JSONListBinding.js +0 -58
  371. package/src/sap/ui/model/json/JSONModel.js +15 -8
  372. package/src/sap/ui/model/message/MessageListBinding.js +0 -42
  373. package/src/sap/ui/model/message/MessageModel.js +1 -1
  374. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  375. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  376. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  377. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  378. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  379. package/src/sap/ui/model/odata/ODataPropertyBinding.js +3 -1
  380. package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +5 -4
  381. package/src/sap/ui/model/odata/ODataUtils.js +7 -9
  382. package/src/sap/ui/model/odata/OperationMode.js +6 -0
  383. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  384. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  385. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  386. package/src/sap/ui/model/odata/type/Date.js +1 -1
  387. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  388. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  389. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  390. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +78 -68
  391. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  392. package/src/sap/ui/model/odata/type/Double.js +1 -1
  393. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  394. package/src/sap/ui/model/odata/type/Int.js +1 -1
  395. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  396. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  397. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  398. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  399. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  400. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  401. package/src/sap/ui/model/odata/type/Single.js +1 -1
  402. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  403. package/src/sap/ui/model/odata/type/String.js +1 -1
  404. package/src/sap/ui/model/odata/type/Time.js +1 -1
  405. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  406. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  407. package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
  408. package/src/sap/ui/model/odata/v2/Context.js +78 -5
  409. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  410. package/src/sap/ui/model/odata/v2/ODataListBinding.js +280 -76
  411. package/src/sap/ui/model/odata/v2/ODataModel.js +342 -96
  412. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -4
  413. package/src/sap/ui/model/odata/v4/Context.js +52 -25
  414. package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -32
  415. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +35 -6
  416. package/src/sap/ui/model/odata/v4/ODataListBinding.js +302 -110
  417. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
  418. package/src/sap/ui/model/odata/v4/ODataModel.js +297 -30
  419. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +25 -57
  420. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -2
  421. package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
  422. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
  423. package/src/sap/ui/model/odata/v4/lib/_Cache.js +309 -130
  424. package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
  425. package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +16 -0
  426. package/src/sap/ui/model/odata/v4/lib/_Helper.js +114 -41
  427. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +270 -36
  428. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  429. package/src/sap/ui/model/type/Boolean.js +1 -1
  430. package/src/sap/ui/model/type/Currency.js +1 -1
  431. package/src/sap/ui/model/type/Date.js +1 -1
  432. package/src/sap/ui/model/type/DateInterval.js +1 -1
  433. package/src/sap/ui/model/type/DateTime.js +1 -1
  434. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  435. package/src/sap/ui/model/type/FileSize.js +1 -1
  436. package/src/sap/ui/model/type/Float.js +1 -1
  437. package/src/sap/ui/model/type/Integer.js +1 -1
  438. package/src/sap/ui/model/type/String.js +1 -1
  439. package/src/sap/ui/model/type/Time.js +1 -1
  440. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  441. package/src/sap/ui/model/type/Unit.js +1 -1
  442. package/src/sap/ui/model/xml/XMLListBinding.js +0 -53
  443. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  444. package/src/sap/ui/performance/trace/FESR.js +1 -1
  445. package/src/sap/ui/performance/trace/FESRHelper.js +72 -0
  446. package/src/sap/ui/performance/trace/Interaction.js +6 -2
  447. package/src/sap/ui/qunit/qunit-2-css.js +4 -4
  448. package/src/sap/ui/qunit/qunit-css.js +4 -4
  449. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  450. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  451. package/src/sap/ui/test/BranchTracking.js +1 -0
  452. package/src/sap/ui/test/Opa5.js +9 -5
  453. package/src/sap/ui/test/OpaBuilder.js +7 -7
  454. package/src/sap/ui/test/TestUtils.js +11 -0
  455. package/src/sap/ui/test/_UsageReport.js +1 -1
  456. package/src/sap/ui/test/actions/Action.js +3 -3
  457. package/src/sap/ui/test/actions/Press.js +1 -1
  458. package/src/sap/ui/test/generic/GenericTestCollection.js +176 -0
  459. package/src/sap/ui/test/generic/TestBase.js +151 -0
  460. package/src/sap/ui/test/generic/Utils.js +284 -0
  461. package/src/sap/ui/test/gherkin/opa5TestHarness.js +14 -5
  462. package/src/sap/ui/test/opaQunit.js +11 -10
  463. package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +9 -8
  464. package/src/sap/ui/test/selectors/_ControlSelectorValidator.js +1 -1
  465. package/src/sap/ui/test/starter/_setupAndStart.js +4 -0
  466. package/src/sap/ui/thirdparty/jszip.js +0 -1
  467. package/src/sap/ui/util/Storage.js +1 -1
  468. package/src/ui5loader.js +8 -4
  469. package/ui5.yaml +1 -1
@@ -305,41 +305,74 @@ sap.ui.define([
305
305
  * default value.
306
306
  * </p>
307
307
  *
308
- * @param {object} [oFormatOptions] The option object which support the following parameters. If no options is given, default values according to the type and locale settings are used.
309
- * @param {int} [oFormatOptions.minIntegerDigits=1] defines minimal number of non-decimal digits
310
- * @param {int} [oFormatOptions.maxIntegerDigits=99] defines maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
311
- * @param {int} [oFormatOptions.minFractionDigits=0] defines minimal number of decimal digits
312
- * @param {int} [oFormatOptions.maxFractionDigits=99] defines maximum number of decimal digits
308
+ * The following example shows how grouping is done:
309
+ * <pre>
310
+ * var oFormat = NumberFormat.getFloatInstance({
311
+ * "groupingEnabled": true, // grouping is enabled
312
+ * "groupingSeparator": '.', // grouping separator is '.'
313
+ * "groupingSize": 3, // the amount of digits to be grouped (here: thousand)
314
+ * "decimalSeparator": "," // the decimal separator must be different from the grouping separator
315
+ * });
316
+ *
317
+ * oFormat.format(1234.56); // "1.234,56"
318
+ * </pre>
319
+ *
320
+ # * @param {object} [oFormatOptions] The option object, which supports the following parameters.
321
+ * If no options are given, default values according to the type and locale settings are used.
313
322
  * @param {int} [oFormatOptions.decimals] defines the number of decimal digits
323
+ * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
324
+ * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
325
+ * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what an empty string
326
+ * is parsed as, and what is formatted as an empty string. The allowed values are "" (empty string),
327
+ * NaN, <code>null</code>, or 0.
328
+ * The 'format' and 'parse' functions are done in a symmetric way. For example, when this
329
+ * parameter is set to NaN, an empty string is parsed as NaN, and NaN is formatted as an empty
330
+ * string.
331
+ * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits if
332
+ * it is different from the grouping size (e.g. Indian grouping)
333
+ * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled
334
+ * (grouping separators are shown)
335
+ * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
336
+ * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
337
+ * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits; the default
338
+ * is <code>3</code>. It must be a positive number.
339
+ * @param {int} [oFormatOptions.maxFractionDigits=99] defines the maximum number of decimal digits
340
+ * @param {int} [oFormatOptions.maxIntegerDigits=99] defines the maximum number of non-decimal digits.
341
+ * If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
342
+ * @param {int} [oFormatOptions.minFractionDigits=0] defines the minimal number of decimal digits
343
+ * @param {int} [oFormatOptions.minIntegerDigits=1] defines the minimal number of non-decimal digits
344
+ * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
345
+ * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output
346
+ * the string from the parse function in order to keep the precision for big numbers. Numbers
347
+ * in scientific notation are parsed back to standard notation. For example, "5e-3" is parsed
348
+ * to "0.005".
349
+ * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
350
+ * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
351
+ * @param {int} [oFormatOptions.precision] defines the numerical precision; the number of decimals
352
+ * is calculated dependent on the integer digits
353
+ * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves
354
+ * decimal digits except trailing zeros in case there are more decimals than the
355
+ * <code>maxFractionDigits</code> format option allows.
356
+ * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
357
+ * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
358
+ * specifies the rounding behavior for discarding the digits after the maximum fraction digits
359
+ * defined by maxFractionDigits. Rounding will only be applied if the passed value is of type <code>number</code>.
360
+ * This can be assigned
361
+ * <ul>
362
+ * <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
363
+ * <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the number of decimal digits that should be reserved.</li>
364
+ * </ul>
314
365
  * @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
315
366
  * @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
316
367
  * @param {int} [oFormatOptions.shortRefNumber] @since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. The generated scale factor is
317
368
  * used for all numbers which are formatted with this format instance. This option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default set
318
369
  * with <code>undefined</code> which means the scale factor is selected automatically for each number being formatted.
319
370
  * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect only when the 'style' options is set to either 'short' or 'long'.
320
- * @param {int} [oFormatOptions.precision] defines the number precision, number of decimals is calculated dependent on the integer digits
321
- * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
322
- * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled (show the grouping separators)
323
- * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
324
- * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
325
- * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits, the default is three
326
- * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits, in case it is different from the grouping size (e.g. indian grouping)
327
- * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
328
- * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
329
- * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
330
- * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
331
- * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output string from parse function in order to keep the precision for big numbers. Numbers in scientific notation are parsed
332
- * back to the standard notation. For example "5e-3" is parsed to "0.005".
333
- * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves decimal digits except trailing zeros
334
- * in case there are more decimals than the <code>maxFractionDigits</code> format option allows.
335
- * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
336
- * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are 'short, 'long' or 'standard' (based on CLDR decimalFormat). Numbers are formatted into compact forms when it's set to
337
- * 'short' or 'long'. When this option is set, the default value of option 'precision' is set to 2. This can be changed by setting either min/maxFractionDigits, decimals, shortDecimals or precision option.
338
- * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO] specifies a rounding behavior for discarding the digits after the maximum fraction digits
339
- * defined by maxFractionDigits. Rounding will only be applied, if the passed value if of type number. This can be assigned by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}
340
- * or a function which will be used for rounding the number. The function is called with two parameters: the number and how many decimal digits should be reserved.
341
- * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what empty string is parsed as and what is formatted as empty string. The allowed values are "" (empty string), NaN, null or 0.
342
- * The 'format' and 'parse' are done in a symmetric way. For example when this parameter is set to NaN, empty string is parsed as NaN and NaN is formatted as empty string.
371
+ * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are
372
+ * 'short, 'long' or 'standard' (based on the CLDR decimalFormat). When set to 'short' or 'long',
373
+ * numbers are formatted into compact forms. When this option is set, the default value of the
374
+ * 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
375
+ * decimals, shortDecimals, or the 'precision' option itself.
343
376
  * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
344
377
  * @return {sap.ui.core.format.NumberFormat} float instance of the NumberFormat
345
378
  * @static
@@ -349,7 +382,7 @@ sap.ui.define([
349
382
  var oFormat = this.createInstance(oFormatOptions, oLocale),
350
383
  oLocaleFormatOptions = this.getLocaleFormatOptions(oFormat.oLocaleData, mNumberType.FLOAT);
351
384
 
352
- oFormat.oFormatOptions = extend({}, this.oDefaultFloatFormat, oLocaleFormatOptions, oFormatOptions);
385
+ oFormat.oFormatOptions = extend({}, this.oDefaultFloatFormat, oLocaleFormatOptions, oFormat.oOriginalFormatOptions);
353
386
  return oFormat;
354
387
  };
355
388
 
@@ -365,41 +398,73 @@ sap.ui.define([
365
398
  * default value.
366
399
  * </p>
367
400
  *
368
- * @param {object} [oFormatOptions] The option object which support the following parameters. If no options is given, default values according to the type and locale settings are used.
369
- * @param {int} [oFormatOptions.minIntegerDigits=1] defines minimal number of non-decimal digits
370
- * @param {int} [oFormatOptions.maxIntegerDigits=99] defines maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
371
- * @param {int} [oFormatOptions.minFractionDigits=0] defines minimal number of decimal digits
372
- * @param {int} [oFormatOptions.maxFractionDigits=0] defines maximum number of decimal digits
401
+ * The following example shows how grouping is done:
402
+ * <pre>
403
+ * var oFormat = NumberFormat.getIntegerInstance({
404
+ * "groupingEnabled": true, // grouping is enabled
405
+ * "groupingSeparator": '.', // grouping separator is '.'
406
+ * "groupingSize": 3 // the amount of digits to be grouped (here: thousand)
407
+ * });
408
+ *
409
+ * oFormat.format(1234); // "1.234"
410
+ * </pre>
411
+ *
412
+ * @param {object} [oFormatOptions] The option object, which supports the following parameters.
413
+ * If no options are given, default values according to the type and locale settings are used.
373
414
  * @param {int} [oFormatOptions.decimals] defines the number of decimal digits
415
+ * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
416
+ * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
417
+ * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what an empty string
418
+ * is parsed as, and what is formatted as an empty string. The allowed values are only NaN,
419
+ * null or 0.
420
+ * The 'format' and 'parse' functions are done in a symmetric way. For example, when this
421
+ * parameter is set to NaN, an empty string is parsed as NaN, and NaN is formatted as an empty
422
+ * string.
423
+ * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits if
424
+ * it is different from the grouping size (e.g. Indian grouping)
425
+ * @param {boolean} [oFormatOptions.groupingEnabled=false] defines whether grouping is enabled
426
+ * (grouping separators are shown)
427
+ * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
428
+ * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
429
+ * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits; the default
430
+ * is <code>3</code>. It must be a positive number.
431
+ * @param {int} [oFormatOptions.maxFractionDigits=0] defines the maximum number of decimal digits
432
+ * @param {int} [oFormatOptions.maxIntegerDigits=99] defines the maximum number of non-decimal digits.
433
+ * If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
434
+ * @param {int} [oFormatOptions.minFractionDigits=0] defines the minimal number of decimal digits
435
+ * @param {int} [oFormatOptions.minIntegerDigits=1] defines the minimal number of non-decimal digits
436
+ * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
437
+ * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output
438
+ * the string from the parse function in order to keep the precision for big numbers. Numbers
439
+ * in scientific notation are parsed back to standard notation. For example, "5e+3" is parsed
440
+ * to "5000".
441
+ * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
442
+ * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
443
+ * @param {int} [oFormatOptions.precision] defines the numerical precision; the number of decimals
444
+ * is calculated dependent on the integer digits
445
+ * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves
446
+ * decimal digits except trailing zeros in case there are more decimals than the
447
+ * <code>maxFractionDigits</code> format option allows.
448
+ * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
449
+ * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=TOWARDS_ZERO]
450
+ * specifies the rounding behavior for discarding the digits after the maximum fraction digits
451
+ * defined by maxFractionDigits. Rounding will only be applied if the passed value is of type <code>number</code>.
452
+ * This can be assigned
453
+ * <ul>
454
+ * <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
455
+ * <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the number of decimal digits that should be reserved.</li>
456
+ * </ul>
374
457
  * @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
375
458
  * @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
376
459
  * @param {int} [oFormatOptions.shortRefNumber] @since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. The generated scale factor is
377
460
  * used for all numbers which are formatted with this format instance. This option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default set
378
461
  * with <code>undefined</code> which means the scale factor is selected automatically for each number being formatted.
379
462
  * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect only when the 'style' options is set to either 'short' or 'long'.
380
- * @param {int} [oFormatOptions.precision] defines the number precision, number of decimals is calculated dependent on the integer digits
381
- * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
382
- * @param {boolean} [oFormatOptions.groupingEnabled=false] defines whether grouping is enabled (show the grouping separators)
383
- * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
384
- * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
385
- * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits, the default is three
386
- * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits, in case it is different from the grouping size (e.g. indian grouping)
387
- * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
388
- * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
389
- * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
390
- * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
391
- * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output string from parse function in order to keep the precision for big numbers. Numbers in scientific notation are parsed
392
- * back to the standard notation. For example "5e+3" is parsed to "5000".
393
- * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves decimal digits except trailing zeros
394
- * in case there are more decimals than the <code>maxFractionDigits</code> format option allows.
395
- * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
396
- * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are 'short, 'long' or 'standard' (based on CLDR decimalFormat). Numbers are formatted into compact forms when it's set to
397
- * 'short' or 'long'. When this option is set, the default value of option 'precision' is set to 2. This can be changed by setting either min/maxFractionDigits, decimals, shortDecimals or precision option.
398
- * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=TOWARDS_ZERO] specifies a rounding behavior for discarding the digits after the maximum fraction digits
399
- * defined by maxFractionDigits. Rounding will only be applied, if the passed value if of type number. This can be assigned by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}
400
- * or a function which will be used for rounding the number. The function is called with two parameters: the number and how many decimal digits should be reserved.
401
- * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what empty string is parsed as and what is formatted as empty string. The allowed values are only NaN, null or 0.
402
- * The 'format' and 'parse' are done in a symmetric way. For example when this parameter is set to NaN, empty string is parsed as NaN and NaN is formatted as empty string.
463
+ * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are
464
+ * 'short, 'long' or 'standard' (based on the CLDR decimalFormat). When set to 'short' or 'long',
465
+ * numbers are formatted into compact forms. When this option is set, the default value of the
466
+ * 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
467
+ * decimals, shortDecimals, or the 'precision' option itself.
403
468
  * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
404
469
  * @return {sap.ui.core.format.NumberFormat} integer instance of the NumberFormat
405
470
  * @static
@@ -409,7 +474,7 @@ sap.ui.define([
409
474
  var oFormat = this.createInstance(oFormatOptions, oLocale),
410
475
  oLocaleFormatOptions = this.getLocaleFormatOptions(oFormat.oLocaleData, mNumberType.INTEGER);
411
476
 
412
- oFormat.oFormatOptions = extend({}, this.oDefaultIntegerFormat, oLocaleFormatOptions, oFormatOptions);
477
+ oFormat.oFormatOptions = extend({}, this.oDefaultIntegerFormat, oLocaleFormatOptions, oFormat.oOriginalFormatOptions);
413
478
  return oFormat;
414
479
  };
415
480
 
@@ -468,40 +533,65 @@ sap.ui.define([
468
533
  * oFormat.format(777.888, "Bitcoin"); // "Bitcoin 777.89"
469
534
  * </pre>
470
535
  *
471
- * @param {object} [oFormatOptions] The option object which support the following parameters. If no options is given, default values according to the type and locale settings are used.
472
- * @param {int} [oFormatOptions.minIntegerDigits=1] defines minimal number of non-decimal digits
473
- * @param {int} [oFormatOptions.maxIntegerDigits=99] defines maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
474
- * @param {int} [oFormatOptions.minFractionDigits] defines minimal number of decimal digits
475
- * @param {int} [oFormatOptions.maxFractionDigits] defines maximum number of decimal digits
536
+ * @param {object} [oFormatOptions] The option object, which supports the following parameters.
537
+ * If no options are given, default values according to the type and locale settings are used.
538
+ * @param {boolean} [oFormatOptions.currencyCode=true] defines whether the currency is shown as
539
+ * a code in currency format. The currency symbol is displayed when this option is set to
540
+ * <code>false</code> and a symbol has been defined for the given currency code.
541
+ * @param {string} [oFormatOptions.currencyContext=standard] can be set either to 'standard'
542
+ * (the default value) or to 'accounting' for an accounting-specific currency display
543
+ * @param {Object<string,object>} [oFormatOptions.customCurrencies] defines a set of custom currencies exclusive to this NumberFormat instance.
544
+ * Custom currencies must not only consist of digits.
545
+ * If custom currencies are defined on the instance, no other currencies can be formatted and parsed by this instance.
546
+ * Globally available custom currencies can be added via the global configuration.
547
+ * See the above examples.
548
+ * See also {@link sap.ui.core.Configuration.FormatSettings#setCustomCurrencies} and {@link sap.ui.core.Configuration.FormatSettings#addCustomCurrencies}.
476
549
  * @param {int} [oFormatOptions.decimals] defines the number of decimal digits
550
+ * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
551
+ * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
552
+ * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what an empty string
553
+ * is parsed as, and what is formatted as an empty string. The allowed values are "" (empty string),
554
+ * NaN, <code>null</code>, or 0.
555
+ * The 'format' and 'parse' functions are done in a symmetric way. For example, when this
556
+ * parameter is set to NaN, an empty string is parsed as [NaN, undefined], and NaN is
557
+ * formatted as an empty string.
558
+ * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits if
559
+ * it is different from the grouping size (e.g. Indian grouping)
560
+ * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled
561
+ * (grouping separators are shown)
562
+ * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
563
+ * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
564
+ * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits; the default
565
+ * is <code>3</code>. It must be a positive number.
566
+ * @param {int} [oFormatOptions.maxFractionDigits=99] defines the maximum number of decimal digits
567
+ * @param {int} [oFormatOptions.maxIntegerDigits=99] defines the maximum number of non-decimal digits.
568
+ * If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
569
+ * @param {int} [oFormatOptions.minFractionDigits=0] defines the minimal number of decimal digits
570
+ * @param {int} [oFormatOptions.minIntegerDigits=1] defines the minimal number of non-decimal digits
571
+ * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
572
+ * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output
573
+ * the string from the parse function in order to keep the precision for big numbers. Numbers
574
+ * in scientific notation are parsed back to standard notation. For example, "5e-3" is parsed
575
+ * to "0.005".
576
+ * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
577
+ * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
578
+ * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves
579
+ * decimal digits except trailing zeros in case there are more decimals than the
580
+ * <code>maxFractionDigits</code> format option allows.
581
+ * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
582
+ * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
583
+ * specifies the rounding behavior for discarding the digits after the maximum fraction digits
584
+ * defined by maxFractionDigits. Rounding will only be applied if the passed value is of type <code>number</code>.
585
+ * This can be assigned
586
+ * <ul>
587
+ * <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
588
+ * <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the number of decimal digits that should be reserved.</li>
589
+ * </ul>
477
590
  * @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
478
591
  * @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
479
592
  * @param {int} [oFormatOptions.shortRefNumber] @since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. The generated scale factor is
480
593
  * used for all numbers which are formatted with this format instance. This option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default set
481
594
  * with <code>undefined</code> which means the scale factor is selected automatically for each number being formatted.
482
- * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect only when the 'style' options is set to either 'short' or 'long'.
483
- * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
484
- * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled (show the grouping separators)
485
- * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
486
- * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
487
- * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits, the default is three
488
- * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits, in case it is different from the grouping size (e.g. indian grouping)
489
- * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
490
- * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
491
- * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
492
- * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
493
- * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output string from parse function in order to keep the precision for big numbers. Numbers in scientific notation are parsed
494
- * back to the standard notation. For example "5e-3" is parsed to "0.005".
495
- * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves decimal digits except trailing zeros
496
- * in case there are more decimals than the <code>maxFractionDigits</code> format option allows.
497
- * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
498
- * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are 'short, 'long' or 'standard' (based on CLDR decimalFormat). Numbers are formatted into compact forms when it's set to
499
- * 'short' or 'long'. When this option is set, the default value of option 'precision' is set to 2. This can be changed by setting either min/maxFractionDigits, decimals, shortDecimals or precision option.
500
- * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO] specifies a rounding behavior for discarding the digits after the maximum fraction digits
501
- * defined by maxFractionDigits. Rounding will only be applied, if the passed value if of type number. This can be assigned by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}
502
- * or a function which will be used for rounding the number. The function is called with two parameters: the number and how many decimal digits should be reserved.
503
- * @param {boolean} [oFormatOptions.trailingCurrencyCode] Overrides the global configuration value {@link sap.ui.core.Configuration.FormatSettings#getTrailingCurrencyCode} whose default value is <code>true</>.
504
- * This is ignored if <code>oFormatOptions.currencyCode</code> is set to <code>false</code> or if <code>oFormatOptions.pattern</code> is supplied
505
595
  * @param {boolean} [oFormatOptions.showMeasure=true] defines whether the currency code/symbol is shown in the formatted string,
506
596
  * e.g. true: "1.00 EUR", false: "1.00" for locale "en"
507
597
  * If both <code>showMeasure</code> and <code>showNumber</code> are false, an empty string is returned
@@ -510,27 +600,29 @@ sap.ui.define([
510
600
  * <code>NumberFormat.getCurrencyInstance({showNumber:true}).format(1, "EUR"); // "1.00 EUR"</code>
511
601
  * <code>NumberFormat.getCurrencyInstance({showNumber:false}).format(1, "EUR"); // "EUR"</code>
512
602
  * If both <code>showMeasure</code> and <code>showNumber</code> are false, an empty string is returned
513
- * @param {boolean} [oFormatOptions.currencyCode=true] defines whether the currency is shown as code in currency format. The currency symbol is displayed when this is set to false and there is a symbol defined
514
- * for the given currency code.
515
- * @param {string} [oFormatOptions.currencyContext=standard] It can be set either with 'standard' (the default value) or with 'accounting' for an accounting specific currency display
516
- * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what empty string is parsed as and what is formatted as empty string. The allowed values are "" (empty string), NaN, null or 0.
517
- * The 'format' and 'parse' are done in a symmetric way. For example when this parameter is set to NaN, empty string is parsed as [NaN, undefined] and NaN is formatted as empty string.
518
- * @param {Object<string,object>} [oFormatOptions.customCurrencies] defines a set of custom currencies exclusive to this NumberFormat instance.
519
- * If custom currencies are defined on the instance, no other currencies can be formatted and parsed by this instance.
520
- * Globally available custom currencies can be added via the global configuration.
521
- * See the above examples.
522
- * See also {@link sap.ui.core.Configuration.FormatSettings#setCustomCurrencies} and {@link sap.ui.core.Configuration.FormatSettings#addCustomCurrencies}.
603
+ * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number.
604
+ * This option takes effect only when the 'style' options is set to either 'short' or 'long'.
605
+ * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are
606
+ * 'short, 'long' or 'standard' (based on the CLDR decimalFormat). When set to 'short' or 'long',
607
+ * numbers are formatted into compact forms. When this option is set, the default value of the
608
+ * 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
609
+ * decimals, shortDecimals, or the 'precision' option itself.
610
+ * @param {boolean} [oFormatOptions.trailingCurrencyCode] overrides the global configuration
611
+ * value {@link sap.ui.core.Configuration.FormatSettings#getTrailingCurrencyCode}, which has a
612
+ * default value of <code>true</>.
613
+ * This is ignored if <code>oFormatOptions.currencyCode</code> is set to <code>false</code>,
614
+ * or if <code>oFormatOptions.pattern</code> is supplied.
523
615
  * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
524
- * @return {sap.ui.core.format.NumberFormat} unit instance of the NumberFormat
616
+ * @return {sap.ui.core.format.NumberFormat} currency instance of the NumberFormat
525
617
  * @static
526
618
  * @public
527
619
  */
528
620
  NumberFormat.getCurrencyInstance = function(oFormatOptions, oLocale) {
529
621
  var oFormat = this.createInstance(oFormatOptions, oLocale);
530
- var sContext = oFormatOptions && oFormatOptions.currencyContext;
622
+ var sContext = oFormat.oOriginalFormatOptions && oFormat.oOriginalFormatOptions.currencyContext;
531
623
 
532
624
  // currency code trailing
533
- var bShowTrailingCurrencyCode = showTrailingCurrencyCode(oFormatOptions);
625
+ var bShowTrailingCurrencyCode = showTrailingCurrencyCode(oFormat.oOriginalFormatOptions);
534
626
 
535
627
 
536
628
  // prepend "sap-" to pattern params to load (context and short)
@@ -540,7 +632,7 @@ sap.ui.define([
540
632
  }
541
633
  var oLocaleFormatOptions = this.getLocaleFormatOptions(oFormat.oLocaleData, mNumberType.CURRENCY, sContext);
542
634
 
543
- oFormat.oFormatOptions = extend({}, this.oDefaultCurrencyFormat, oLocaleFormatOptions, oFormatOptions);
635
+ oFormat.oFormatOptions = extend({}, this.oDefaultCurrencyFormat, oLocaleFormatOptions, oFormat.oOriginalFormatOptions);
544
636
 
545
637
  // Trailing currency code option
546
638
  //
@@ -569,48 +661,70 @@ sap.ui.define([
569
661
  * default value.
570
662
  * </p>
571
663
  *
572
- * @param {object} [oFormatOptions] The option object which support the following parameters. If no options is given, default values according to the type and locale settings are used.
573
- * @param {int} [oFormatOptions.minIntegerDigits=1] defines minimal number of non-decimal digits
574
- * @param {int} [oFormatOptions.maxIntegerDigits=99] defines maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
575
- * @param {int} [oFormatOptions.minFractionDigits] defines minimal number of decimal digits
576
- * @param {int} [oFormatOptions.maxFractionDigits] defines maximum number of decimal digits
664
+ * @param {object} [oFormatOptions] The option object, which supports the following parameters.
665
+ * If no options are given, default values according to the type and locale settings are used.
666
+ * @param {array} [oFormatOptions.allowedUnits] defines the allowed units for formatting and parsing, e.g. ["size-meter", "volume-liter", ...]
667
+ * @param {Object<string,object>} [oFormatOptions.customUnits] defines a set of custom units, e.g.
668
+ * {"electric-inductance": {
669
+ * "displayName": "henry",
670
+ * "unitPattern-count-one": "{0} H",
671
+ * "unitPattern-count-other": "{0} H",
672
+ * "perUnitPattern": "{0}/H",
673
+ * "decimals": 2,
674
+ * "precision": 4
675
+ * }}
577
676
  * @param {int} [oFormatOptions.decimals] defines the number of decimal digits
578
- * @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
579
- * @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
580
- * @param {int} [oFormatOptions.shortRefNumber] @since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. The generated scale factor is
581
- * used for all numbers which are formatted with this format instance. This option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default set
582
- * with <code>undefined</code> which means the scale factor is selected automatically for each number being formatted.
583
- * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect only when the 'style' options is set to either 'short' or 'long'.
584
- * @param {int} [oFormatOptions.precision] defines the number precision, number of decimals is calculated dependent on the integer digits
585
- * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
586
- * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled (show the grouping separators)
587
- * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
588
- * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
589
- * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits, the default is three
590
- * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits, in case it is different from the grouping size (e.g. indian grouping)
591
677
  * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
592
678
  * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
593
- * @param {Object<string,object>} [oFormatOptions.customUnits] defines a set of custom units, e.g. {"electric-inductance": {
594
- "displayName": "henry",
595
- "unitPattern-count-one": "{0} H",
596
- "unitPattern-count-other": "{0} H",
597
- "perUnitPattern": "{0}/H",
598
- "decimals": 2,
599
- "precision": 4
600
- }}
601
- * @param {array} [oFormatOptions.allowedUnits] defines the allowed units for formatting and parsing, e.g. ["size-meter", "volume-liter", ...]
602
- * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
679
+ * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what an empty string
680
+ * is parsed as, and what is formatted as an empty string. The allowed values are "" (empty string),
681
+ * NaN, <code>null</code>, or 0.
682
+ * The 'format' and 'parse' functions are done in a symmetric way. For example, when this
683
+ * parameter is set to NaN, an empty string is parsed as [NaN, undefined], and NaN is
684
+ * formatted as an empty string.
685
+ * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits if
686
+ * it is different from the grouping size (e.g. Indian grouping)
687
+ * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled
688
+ * (grouping separators are shown)
689
+ * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
690
+ * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
691
+ * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits; the default
692
+ * is <code>3</code>. It must be a positive number.
693
+ * @param {int} [oFormatOptions.maxFractionDigits=99] defines the maximum number of decimal digits
694
+ * @param {int} [oFormatOptions.maxIntegerDigits=99] defines the maximum number of non-decimal digits.
695
+ * If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
696
+ * @param {int} [oFormatOptions.minFractionDigits=0] defines the minimal number of decimal digits
697
+ * @param {int} [oFormatOptions.minIntegerDigits=1] defines the minimal number of non-decimal digits
603
698
  * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
604
- * @param {boolean} [oFormatOptions.parseAsString] @since 1.28.2 defines whether to output string from parse function in order to keep the precision for big numbers. Numbers in scientific notation are parsed
605
- * back to the standard notation. For example "5e-3" is parsed to "0.005".
606
- * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves decimal digits except trailing zeros
607
- * in case there are more decimals than the <code>maxFractionDigits</code> format option allows.
608
- * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
609
- * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are 'short, 'long' or 'standard' (based on CLDR decimalFormat). Numbers are formatted into compact forms when it's set to
610
- * 'short' or 'long'. When this option is set, the default value of option 'precision' is set to 2. This can be changed by setting either min/maxFractionDigits, decimals, shortDecimals or precision option.
611
- * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO] specifies a rounding behavior for discarding the digits after the maximum fraction digits
612
- * defined by maxFractionDigits. Rounding will only be applied, if the passed value if of type number. This can be assigned by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}
613
- * or a function which will be used for rounding the number. The function is called with two parameters: the number and how many decimal digits should be reserved.
699
+ * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output
700
+ * the string from the parse function in order to keep the precision for big numbers. Numbers
701
+ * in scientific notation are parsed back to standard notation. For example, "5e-3" is parsed
702
+ * to "0.005".
703
+ * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
704
+ * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
705
+ * @param {int} [oFormatOptions.precision] defines the numerical precision; the number of decimals
706
+ * is calculated dependent on the integer digits
707
+ * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves
708
+ * decimal digits except trailing zeros in case there are more decimals than the
709
+ * <code>maxFractionDigits</code> format option allows.
710
+ * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
711
+ * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
712
+ * specifies the rounding behavior for discarding the digits after the maximum fraction digits
713
+ * defined by maxFractionDigits. Rounding will only be applied if the passed value is of type <code>number</code>.
714
+ * This can be assigned
715
+ * <ul>
716
+ * <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
717
+ * <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the number of decimal digits that should be reserved.</li>
718
+ * </ul>
719
+ * @param {int} [oFormatOptions.shortDecimals] defines the number of decimals in the shortened
720
+ * format string. If this option isn't specified, the 'decimals' option is used instead.
721
+ * @param {int} [oFormatOptions.shortLimit] defines a limit above which only short number formatting is used
722
+ * @param {int} [oFormatOptions.shortRefNumber] @since 1.40 specifies a number from which the
723
+ * scale factor for the 'short' or 'long' style format is generated. The generated scale
724
+ * factor is used for all numbers which are formatted with this format instance. This option
725
+ * only takes effect when the 'style' option is set to 'short' or 'long'. This option is
726
+ * set to <code>undefined</code> by default, which means that the scale factor is selected
727
+ * automatically for each number being formatted.
614
728
  * @param {boolean} [oFormatOptions.showMeasure=true] defines whether the unit of measure is shown in the formatted string,
615
729
  * e.g. for input 1 and "duration-day" true: "1 day", false: "1".
616
730
  * If both <code>showMeasure</code> and <code>showNumber</code> are false, an empty string is returned
@@ -622,8 +736,12 @@ sap.ui.define([
622
736
  * <code>NumberFormat.getUnitInstance({showNumber:true}).format(2, "duration-day"); // "2 days"</code>
623
737
  * <code>NumberFormat.getUnitInstance({showNumber:false}).format(2, "duration-day"); // "days"</code>
624
738
  * If both <code>showMeasure</code> and <code>showNumber</code> are false, an empty string is returned
625
- * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what empty string is parsed as and what is formatted as empty string. The allowed values are "" (empty string), NaN, null or 0.
626
- * The 'format' and 'parse' are done in a symmetric way. For example when this parameter is set to NaN, empty string is parsed as [NaN, undefined] and NaN is formatted as empty string.
739
+ * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect only when the 'style' options is set to either 'short' or 'long'.
740
+ * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are
741
+ * 'short, 'long' or 'standard' (based on the CLDR decimalFormat). When set to 'short' or 'long',
742
+ * numbers are formatted into compact forms. When this option is set, the default value of the
743
+ * 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
744
+ * decimals, shortDecimals, or the 'precision' option itself.
627
745
  * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
628
746
  * @return {sap.ui.core.format.NumberFormat} unit instance of the NumberFormat
629
747
  * @static
@@ -633,7 +751,7 @@ sap.ui.define([
633
751
  var oFormat = this.createInstance(oFormatOptions, oLocale),
634
752
  oLocaleFormatOptions = this.getLocaleFormatOptions(oFormat.oLocaleData, mNumberType.UNIT);
635
753
 
636
- oFormat.oFormatOptions = extend({}, this.oDefaultUnitFormat, oLocaleFormatOptions, oFormatOptions);
754
+ oFormat.oFormatOptions = extend({}, this.oDefaultUnitFormat, oLocaleFormatOptions, oFormat.oOriginalFormatOptions);
637
755
  return oFormat;
638
756
  };
639
757
 
@@ -649,52 +767,73 @@ sap.ui.define([
649
767
  * default value.
650
768
  * </p>
651
769
  *
652
- * @param {object} [oFormatOptions] The option object which support the following parameters. If no options is given, default values according to the type and locale settings are used.
653
- * @param {int} [oFormatOptions.minIntegerDigits=1] defines minimal number of non-decimal digits
654
- * @param {int} [oFormatOptions.maxIntegerDigits=99] defines maximum number of non-decimal digits. If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
655
- * @param {int} [oFormatOptions.minFractionDigits=0] defines minimal number of decimal digits
656
- * @param {int} [oFormatOptions.maxFractionDigits=99] defines maximum number of decimal digits
770
+ * @param {object} [oFormatOptions] The option object, which supports the following parameters.
771
+ * If no options are given, default values according to the type and locale settings are used.
657
772
  * @param {int} [oFormatOptions.decimals] defines the number of decimal digits
773
+ * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
774
+ * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
775
+ * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what an empty string
776
+ * is parsed as, and what is formatted as an empty string. The allowed values are "" (empty string),
777
+ * NaN, <code>null</code>, or 0.
778
+ * The 'format' and 'parse' functions are done in a symmetric way. For example, when this
779
+ * parameter is set to NaN, an empty string is parsed as NaN, and NaN is formatted as an empty
780
+ * string.
781
+ * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits if
782
+ * it is different from the grouping size (e.g. Indian grouping)
783
+ * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled
784
+ * (grouping separators are shown)
785
+ * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
786
+ * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
787
+ * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits; the default
788
+ * is <code>3</code>. It must be a positive number.
789
+ * @param {int} [oFormatOptions.maxFractionDigits=99] defines the maximum number of decimal digits
790
+ * @param {int} [oFormatOptions.maxIntegerDigits=99] defines the maximum number of non-decimal digits.
791
+ * If the number exceeds this maximum, e.g. 1e+120, "?" characters are shown instead of digits.
792
+ * @param {int} [oFormatOptions.minFractionDigits=0] defines the minimal number of decimal digits
793
+ * @param {int} [oFormatOptions.minIntegerDigits=1] defines the minimal number of non-decimal digits
794
+ * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
795
+ * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output
796
+ * the string from the parse function in order to keep the precision for big numbers. Numbers
797
+ * in scientific notation are parsed back to standard notation. For example, "5e-3" is parsed
798
+ * to "0.005".
799
+ * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
800
+ * @param {string} [oFormatOptions.percentSign] defines the used percent symbol
801
+ * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
802
+ * @param {int} [oFormatOptions.precision] defines the numerical precision; the number of decimals
803
+ * is calculated dependent on the integer digits
804
+ * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves
805
+ * decimal digits except trailing zeros in case there are more decimals than the
806
+ * <code>maxFractionDigits</code> format option allows.
807
+ * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
808
+ * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
809
+ * specifies the rounding behavior for discarding the digits after the maximum fraction digits
810
+ * defined by maxFractionDigits. Rounding will only be applied if the passed value is of type <code>number</code>.
811
+ * This can be assigned
812
+ * <ul>
813
+ * <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
814
+ * <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the number of decimal digits that should be reserved.</li>
815
+ * </ul>
658
816
  * @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
659
817
  * @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
660
818
  * @param {int} [oFormatOptions.shortRefNumber] @since 1.40 specifies a number from which the scale factor for 'short' or 'long' style format is generated. The generated scale factor is
661
819
  * used for all numbers which are formatted with this format instance. This option has effect only when the option 'style' is set to 'short' or 'long'. This option is by default set
662
820
  * with <code>undefined</code> which means the scale factor is selected automatically for each number being formatted.
663
821
  * @param {boolean} [oFormatOptions.showScale=true] @since 1.40 specifies whether the scale factor is shown in the formatted number. This option takes effect only when the 'style' options is set to either 'short' or 'long'.
664
- * @param {int} [oFormatOptions.precision] defines the number precision, number of decimals is calculated dependent on the integer digits
665
- * @param {string} [oFormatOptions.pattern] CLDR number pattern which is used to format the number
666
- * @param {boolean} [oFormatOptions.groupingEnabled=true] defines whether grouping is enabled (show the grouping separators)
667
- * @param {string} [oFormatOptions.groupingSeparator] defines the character used as grouping separator.
668
- * Note: <code>groupingSeparator</code> must always be different from <code>decimalSeparator</code>.
669
- * @param {int} [oFormatOptions.groupingSize=3] defines the grouping size in digits, the default is three
670
- * @param {int} [oFormatOptions.groupingBaseSize=3] defines the grouping base size in digits, in case it is different from the grouping size (e.g. indian grouping)
671
- * @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
672
- * Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
673
- * @param {string} [oFormatOptions.plusSign] defines the used plus symbol
674
- * @param {string} [oFormatOptions.minusSign] defines the used minus symbol
675
- * @param {string} [oFormatOptions.percentSign] defines the used percent symbol
676
- * @param {boolean} [oFormatOptions.parseAsString=false] @since 1.28.2 defines whether to output string from parse function in order to keep the precision for big numbers. Numbers in scientific notation are parsed
677
- * back to the standard notation. For example "5e-3" is parsed to "0.005".
678
- * @param {boolean} [oFormatOptions.preserveDecimals=false] Whether {@link #format} preserves decimal digits except trailing zeros
679
- * in case there are more decimals than the <code>maxFractionDigits</code> format option allows.
680
- * If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
681
- * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are 'short, 'long' or 'standard' (based on CLDR decimalFormat). Numbers are formatted into compact forms when it's set to
682
- * 'short' or 'long'. When this option is set, the default value of option 'precision' is set to 2. This can be changed by setting either min/maxFractionDigits, decimals, shortDecimals or precision option.
683
- * @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO] specifies a rounding behavior for discarding the digits after the maximum fraction digits
684
- * defined by maxFractionDigits. Rounding will only be applied, if the passed value if of type number. This can be assigned by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode}
685
- * or a function which will be used for rounding the number. The function is called with two parameters: the number and how many decimal digits should be reserved.
686
- * @param {number} [oFormatOptions.emptyString=NaN] @since 1.30.0 defines what empty string is parsed as and what is formatted as empty string. The allowed values are "" (empty string), NaN, null or 0.
687
- * The 'format' and 'parse' are done in a symmetric way. For example when this parameter is set to NaN, empty string is parsed as NaN and NaN is formatted as empty string.
822
+ * @param {string} [oFormatOptions.style=standard] defines the style of format. Valid values are
823
+ * 'short, 'long' or 'standard' (based on the CLDR decimalFormat). When set to 'short' or 'long',
824
+ * numbers are formatted into compact forms. When this option is set, the default value of the
825
+ * 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
826
+ * decimals, shortDecimals, or the 'precision' option itself.
688
827
  * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
689
828
  * @return {sap.ui.core.format.NumberFormat} percentage instance of the NumberFormat
690
829
  * @static
691
830
  * @public
692
- */
831
+ */
693
832
  NumberFormat.getPercentInstance = function(oFormatOptions, oLocale) {
694
833
  var oFormat = this.createInstance(oFormatOptions, oLocale),
695
834
  oLocaleFormatOptions = this.getLocaleFormatOptions(oFormat.oLocaleData, mNumberType.PERCENT);
696
835
 
697
- oFormat.oFormatOptions = extend({}, this.oDefaultPercentFormat, oLocaleFormatOptions, oFormatOptions);
836
+ oFormat.oFormatOptions = extend({}, this.oDefaultPercentFormat, oLocaleFormatOptions, oFormat.oOriginalFormatOptions);
698
837
  return oFormat;
699
838
  };
700
839
 
@@ -1073,6 +1212,12 @@ sap.ui.define([
1073
1212
  sLookupMeasure,
1074
1213
  bValueIsNullOrUndefined = vValue === undefined || vValue === null;
1075
1214
 
1215
+ if (oOptions.groupingEnabled && oOptions.groupingSize <= 0) {
1216
+ // invalid grouping size specified
1217
+ Log.error("Grouping requires the 'groupingSize' format option to be a positive number, but it is '" + oOptions.groupingSize + "' instead.");
1218
+ return "";
1219
+ }
1220
+
1076
1221
  // emptyString is only relevant for the number part (vValue)
1077
1222
  if (oOptions.showNumber && (vValue === oOptions.emptyString || (isNaN(vValue) && isNaN(oOptions.emptyString)))) {
1078
1223
  // if the value equals the 'emptyString' format option, return empty string.
@@ -1796,8 +1941,8 @@ sap.ui.define([
1796
1941
  return (oOptions.type === mNumberType.CURRENCY || oOptions.type === mNumberType.UNIT) ? null : NaN;
1797
1942
  }
1798
1943
 
1799
- // Get rid of leading zeros
1800
- if (oOptions.parseAsString) {
1944
+ // Get rid of leading zeros (percent was already shifted)
1945
+ if (oOptions.parseAsString && !bPercent) {
1801
1946
  vResult = NumberFormat._shiftDecimalPoint(sValue, 0);
1802
1947
  }
1803
1948
 
@@ -1863,13 +2008,20 @@ sap.ui.define([
1863
2008
  /**
1864
2009
  * Returns the scaling factor which is calculated based on the format options and the current locale being used.
1865
2010
  *
1866
- * This function returns meaningful scaling factor only when the formatting option 'style' is set to 'short' or 'long' and the option 'shortRefNumber' is set which
1867
- * is used for calculating the scale factor.
2011
+ * This function only returns a meaningful scaling factor when the 'style' formatting option is set
2012
+ * to 'short' or 'long', and the 'shortRefNumber' option for calculating the scale factor is set.
1868
2013
  *
1869
- * Consider using this function when the option 'showScale' is set to false which makes the scale factor not to appear in every formatted number but in a shared place.
2014
+ * Consider using this function when the 'showScale' option is set to <code>false</code>, which
2015
+ * causes the scale factor not to appear in every formatted number but in a shared place.
1870
2016
  *
1871
- * @since 1.40
1872
- * @returns {string|undefined} The scale string if it exists based on the given 'shortRefNumber' option. Otherwise it returns undefined.
2017
+ * @example thousand (locale "en")
2018
+ *
2019
+ * NumberFormat.getFloatInstance({style: "long", shortRefNumber: 1000}).getScale();
2020
+ * // "thousand"
2021
+ *
2022
+ * @returns {string|undefined} The scale string if it exists based on the given 'shortRefNumber' option. Otherwise it returns <code>undefined</code>.
2023
+ * @since 1.100
2024
+ * @public
1873
2025
  */
1874
2026
  NumberFormat.prototype.getScale = function() {
1875
2027
  if ((this.oFormatOptions.style !== "short" && this.oFormatOptions.style !== "long") || this.oFormatOptions.shortRefNumber === undefined) {