@openui5/sap.ui.core 1.120.6 → 1.121.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.
- package/.eslintrc.json +5 -3
- package/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +1 -1
- package/src/jquery.sap.global.js +7 -7
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/jquery.sap.trace.js +1 -1
- package/src/sap/base/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/future.js +57 -0
- package/src/sap/base/i18n/Formatting.js +24 -19
- package/src/sap/base/i18n/LanguageTag.js +2 -2
- package/src/sap/base/i18n/Localization.js +2 -2
- package/src/sap/base/i18n/ResourceBundle.js +115 -9
- package/src/sap/base/i18n/date/TimezoneUtils.js +5 -6
- package/src/sap/base/util/now.js +8 -13
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +6 -3
- package/src/sap/ui/Global.js +16 -15
- package/src/sap/ui/VersionInfo.js +15 -3
- package/src/sap/ui/base/BindingParser.js +25 -15
- package/src/sap/ui/base/DataType.js +21 -13
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +5 -0
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +25 -14
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +28 -13
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +8 -7
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +133 -56
- package/src/sap/ui/core/ComponentContainer.js +14 -17
- package/src/sap/ui/core/ComponentMetadata.js +7 -3
- package/src/sap/ui/core/ComponentSupport.js +32 -13
- package/src/sap/ui/core/Configuration.js +69 -67
- package/src/sap/ui/core/Control.js +34 -19
- package/src/sap/ui/core/Core.js +49 -45
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +6 -8
- package/src/sap/ui/core/ElementMetadata.js +35 -20
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +18 -11
- package/src/sap/ui/core/Fragment.js +69 -28
- package/src/sap/ui/core/HTML.js +3 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +145 -125
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +6 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +9 -2
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +22 -13
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +2 -2
- package/src/sap/ui/core/LocaleData.js +16 -15
- package/src/sap/ui/core/Manifest.js +28 -28
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Messaging.js +4 -4
- package/src/sap/ui/core/Popup.js +1 -47
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +12 -7
- package/src/sap/ui/core/Rendering.js +49 -42
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +7 -7
- package/src/sap/ui/core/ScrollBarRenderer.js +3 -3
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Shortcut.js +1 -0
- package/src/sap/ui/core/ShortcutHintsMixin.js +1 -1
- package/src/sap/ui/core/StashedControlSupport.js +39 -40
- package/src/sap/ui/core/Theming.js +15 -25
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +4 -3
- package/src/sap/ui/core/UIArea.js +5 -3
- package/src/sap/ui/core/UIComponent.js +6 -4
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +2 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +44 -23
- package/src/sap/ui/core/cache/CacheManagerNOP.js +0 -1
- package/src/sap/ui/core/cldr/ar.json +47 -88
- package/src/sap/ui/core/cldr/ar_EG.json +47 -88
- package/src/sap/ui/core/cldr/ar_SA.json +48 -89
- package/src/sap/ui/core/cldr/bg.json +44 -156
- package/src/sap/ui/core/cldr/ca.json +265 -370
- package/src/sap/ui/core/cldr/cnr.json +545 -476
- package/src/sap/ui/core/cldr/cs.json +33 -467
- package/src/sap/ui/core/cldr/cy.json +36 -762
- package/src/sap/ui/core/cldr/da.json +43 -146
- package/src/sap/ui/core/cldr/de.json +47 -149
- package/src/sap/ui/core/cldr/de_AT.json +48 -150
- package/src/sap/ui/core/cldr/de_CH.json +86 -187
- package/src/sap/ui/core/cldr/el.json +28 -96
- package/src/sap/ui/core/cldr/el_CY.json +28 -96
- package/src/sap/ui/core/cldr/en.json +66 -27
- package/src/sap/ui/core/cldr/en_AU.json +314 -171
- package/src/sap/ui/core/cldr/en_GB.json +167 -33
- package/src/sap/ui/core/cldr/en_HK.json +57 -30
- package/src/sap/ui/core/cldr/en_IE.json +54 -27
- package/src/sap/ui/core/cldr/en_IN.json +139 -28
- package/src/sap/ui/core/cldr/en_NZ.json +55 -28
- package/src/sap/ui/core/cldr/en_PG.json +49 -22
- package/src/sap/ui/core/cldr/en_SG.json +51 -24
- package/src/sap/ui/core/cldr/en_ZA.json +61 -34
- package/src/sap/ui/core/cldr/es.json +25 -130
- package/src/sap/ui/core/cldr/es_AR.json +90 -191
- package/src/sap/ui/core/cldr/es_BO.json +63 -165
- package/src/sap/ui/core/cldr/es_CL.json +100 -202
- package/src/sap/ui/core/cldr/es_CO.json +54 -156
- package/src/sap/ui/core/cldr/es_MX.json +163 -258
- package/src/sap/ui/core/cldr/es_PE.json +65 -167
- package/src/sap/ui/core/cldr/es_UY.json +65 -167
- package/src/sap/ui/core/cldr/es_VE.json +43 -145
- package/src/sap/ui/core/cldr/et.json +44 -144
- package/src/sap/ui/core/cldr/fa.json +75 -80
- package/src/sap/ui/core/cldr/fi.json +38 -142
- package/src/sap/ui/core/cldr/fr.json +28 -22
- package/src/sap/ui/core/cldr/fr_BE.json +31 -25
- package/src/sap/ui/core/cldr/fr_CA.json +76 -69
- package/src/sap/ui/core/cldr/fr_CH.json +41 -35
- package/src/sap/ui/core/cldr/fr_LU.json +28 -22
- package/src/sap/ui/core/cldr/he.json +37 -426
- package/src/sap/ui/core/cldr/hi.json +40 -83
- package/src/sap/ui/core/cldr/hr.json +31 -286
- package/src/sap/ui/core/cldr/hu.json +46 -140
- package/src/sap/ui/core/cldr/id.json +31 -13
- package/src/sap/ui/core/cldr/it.json +59 -182
- package/src/sap/ui/core/cldr/it_CH.json +65 -188
- package/src/sap/ui/core/cldr/ja.json +103 -13
- package/src/sap/ui/core/cldr/kk.json +79 -67
- package/src/sap/ui/core/cldr/ko.json +29 -10
- package/src/sap/ui/core/cldr/lt.json +24 -366
- package/src/sap/ui/core/cldr/lv.json +30 -277
- package/src/sap/ui/core/cldr/mk.json +103 -198
- package/src/sap/ui/core/cldr/ms.json +30 -10
- package/src/sap/ui/core/cldr/nb.json +32 -133
- package/src/sap/ui/core/cldr/nl.json +37 -167
- package/src/sap/ui/core/cldr/nl_BE.json +108 -238
- package/src/sap/ui/core/cldr/pl.json +27 -384
- package/src/sap/ui/core/cldr/pt.json +37 -145
- package/src/sap/ui/core/cldr/pt_PT.json +32 -133
- package/src/sap/ui/core/cldr/ro.json +30 -289
- package/src/sap/ui/core/cldr/ru.json +27 -75
- package/src/sap/ui/core/cldr/ru_UA.json +27 -75
- package/src/sap/ui/core/cldr/sk.json +32 -438
- package/src/sap/ui/core/cldr/sl.json +131 -535
- package/src/sap/ui/core/cldr/sr.json +41 -332
- package/src/sap/ui/core/cldr/sr_Latn.json +192 -483
- package/src/sap/ui/core/cldr/sv.json +49 -137
- package/src/sap/ui/core/cldr/th.json +39 -20
- package/src/sap/ui/core/cldr/tr.json +33 -125
- package/src/sap/ui/core/cldr/uk.json +310 -252
- package/src/sap/ui/core/cldr/vi.json +458 -331
- package/src/sap/ui/core/cldr/zh_CN.json +39 -17
- package/src/sap/ui/core/cldr/zh_HK.json +49 -27
- package/src/sap/ui/core/cldr/zh_SG.json +53 -31
- package/src/sap/ui/core/cldr/zh_TW.json +31 -14
- package/src/sap/ui/core/date/CalendarUtils.js +11 -9
- package/src/sap/ui/core/date/Islamic.js +7 -2
- package/src/sap/ui/core/date/UI5Date.js +86 -34
- package/src/sap/ui/core/date/UniversalDate.js +16 -26
- package/src/sap/ui/core/date/UniversalDateUtils.js +14 -14
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragAndDrop.js +4 -4
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +37 -45
- package/src/sap/ui/core/format/FileSizeFormat.js +15 -16
- package/src/sap/ui/core/format/FormatUtils.js +36 -0
- package/src/sap/ui/core/format/ListFormat.js +4 -4
- package/src/sap/ui/core/format/NumberFormat.js +288 -125
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +16 -15
- package/src/sap/ui/core/library.js +26 -9
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +5 -5
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageMixin.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_mk.properties +1 -1
- package/src/sap/ui/core/mvc/Controller.js +49 -19
- package/src/sap/ui/core/mvc/ControllerExtension.js +5 -4
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +2 -2
- package/src/sap/ui/core/mvc/ControllerMetadata.js +3 -3
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +6 -8
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +8 -5
- package/src/sap/ui/core/mvc/XMLView.js +7 -5
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +5 -3
- package/src/sap/ui/core/postmessage/confirmationDialog.js +3 -3
- package/src/sap/ui/core/routing/HashChanger.js +21 -10
- package/src/sap/ui/core/routing/History.js +5 -5
- package/src/sap/ui/core/routing/Route.js +9 -7
- package/src/sap/ui/core/routing/Router.js +13 -7
- package/src/sap/ui/core/routing/Target.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +5 -4
- package/src/sap/ui/core/routing/async/Target.js +10 -7
- package/src/sap/ui/core/routing/async/Targets.js +3 -3
- package/src/sap/ui/core/routing/sync/Target.js +4 -1
- package/src/sap/ui/core/rules/Config.support.js +3 -3
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +9 -12
- package/src/sap/ui/core/support/Support.js +2 -2
- package/src/sap/ui/core/support/ToolsAPI.js +19 -6
- package/src/sap/ui/core/support/controls/InteractionTree.js +7 -7
- package/src/sap/ui/core/support/plugins/Breakpoint.js +8 -5
- package/src/sap/ui/core/support/plugins/ControlTree.js +26 -15
- package/src/sap/ui/core/support/plugins/Debugging.js +9 -6
- package/src/sap/ui/core/support/plugins/Interaction.js +9 -7
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +6 -6
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +4 -3
- package/src/sap/ui/core/support/plugins/ViewInfo.js +4 -2
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +4 -4
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +5 -5
- package/src/sap/ui/core/themes/base/Icon.less +2 -1
- package/src/sap/ui/core/themes/base/base.less +370 -371
- package/src/sap/ui/core/theming/Parameters.js +9 -8
- package/src/sap/ui/core/theming/ThemeHelper.js +4 -3
- package/src/sap/ui/core/theming/ThemeManager.js +8 -6
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +6 -3
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +23 -13
- package/src/sap/ui/core/util/PasteHelper.js +3 -3
- package/src/sap/ui/core/util/_LocalizationHelper.js +10 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +51 -5
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +2 -2
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +1 -0
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +6 -6
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/dom/isBehindOtherElement.js +0 -1
- package/src/sap/ui/events/isMouseEventDelayed.js +6 -12
- package/src/sap/ui/events/jquery/EventSimulation.js +4 -3
- package/src/sap/ui/events/jquery/EventTriggerHook.js +2 -3
- package/src/sap/ui/model/Binding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +2 -0
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +1 -0
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/Filter.js +34 -4
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +6 -3
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +6 -2
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/Sorter.js +4 -4
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +4 -2
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +9 -0
- package/src/sap/ui/model/json/JSONModel.js +6 -2
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +12 -7
- package/src/sap/ui/model/odata/ODataAnnotations.js +4 -4
- package/src/sap/ui/model/odata/ODataMessageParser.js +4 -3
- package/src/sap/ui/model/odata/ODataMetaModel.js +5 -2
- package/src/sap/ui/model/odata/ODataMetadata.js +34 -4
- package/src/sap/ui/model/odata/ODataModel.js +5 -5
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -2
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -0
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +4 -2
- package/src/sap/ui/model/odata/ODataUtils.js +166 -131
- package/src/sap/ui/model/odata/type/Boolean.js +9 -7
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +5 -4
- package/src/sap/ui/model/odata/type/DateTime.js +2 -2
- package/src/sap/ui/model/odata/type/DateTimeBase.js +4 -4
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +4 -3
- package/src/sap/ui/model/odata/type/Decimal.js +5 -5
- package/src/sap/ui/model/odata/type/Double.js +4 -3
- package/src/sap/ui/model/odata/type/Guid.js +4 -3
- package/src/sap/ui/model/odata/type/Int.js +4 -4
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +4 -4
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +4 -3
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +6 -5
- package/src/sap/ui/model/odata/type/Time.js +4 -4
- package/src/sap/ui/model/odata/type/TimeOfDay.js +5 -4
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +3 -2
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +4 -4
- package/src/sap/ui/model/odata/v2/ODataModel.js +55 -25
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +5 -4
- package/src/sap/ui/model/odata/v4/Context.js +20 -7
- package/src/sap/ui/model/odata/v4/ODataBinding.js +11 -5
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +8 -5
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +56 -33
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +7 -4
- package/src/sap/ui/model/odata/v4/ODataModel.js +25 -15
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +10 -8
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +9 -2
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +195 -59
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +16 -6
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +22 -15
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +19 -11
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +20 -11
- package/src/sap/ui/model/odata/v4/lib/_TreeState.js +122 -0
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +4 -4
- package/src/sap/ui/model/type/Currency.js +5 -5
- package/src/sap/ui/model/type/Date.js +5 -5
- package/src/sap/ui/model/type/DateInterval.js +6 -5
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +5 -4
- package/src/sap/ui/model/type/Float.js +5 -5
- package/src/sap/ui/model/type/Integer.js +6 -6
- package/src/sap/ui/model/type/String.js +4 -3
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +8 -7
- package/src/sap/ui/model/xml/XMLModel.js +11 -3
- package/src/sap/ui/performance/trace/Interaction.js +8 -16
- package/src/sap/ui/performance/trace/initTraces.js +1 -1
- package/src/sap/ui/qunit/qunit-junit.js +415 -49
- package/src/sap/ui/qunit/utils/ControlIterator.js +4 -4
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +3 -2
- package/src/sap/ui/qunit/utils/nextUIUpdate.js +15 -5
- package/src/sap/ui/test/OpaBuilder.js +3 -1
- package/src/sap/ui/test/OpaPlugin.js +103 -10
- package/src/sap/ui/test/autowaiter/_UIUpdatesWaiter.js +4 -4
- package/src/sap/ui/test/autowaiter/_navigationContainerWaiter.js +3 -3
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/launchers/iFrameLauncher.js +18 -6
- package/src/sap/ui/test/matchers/Descendant.js +2 -1
- package/src/sap/ui/test/matchers/I18NText.js +6 -2
- package/src/sap/ui/test/matchers/Interactable.js +2 -3
- package/src/sap/ui/test/matchers/LabelFor.js +5 -3
- package/src/sap/ui/test/matchers/Matcher.js +20 -0
- package/src/sap/ui/test/matchers/Sibling.js +2 -1
- package/src/sap/ui/test/matchers/_Visitor.js +2 -4
- package/src/sap/ui/test/qunitPause.js +6 -4
- package/src/sap/ui/test/selectors/_ControlSelectorGenerator.js +4 -3
- package/src/sap/ui/test/selectors/_Selector.js +3 -3
- package/src/sap/ui/test/starter/_setupAndStart.js +5 -18
- package/src/sap/ui/test/starter/_utils.js +15 -1
- package/src/sap/ui/test/starter/createSuite.js +2 -0
- package/src/sap/ui/thirdparty/RequestRecorder.js +1 -1
- package/src/sap/ui/thirdparty/crossroads.js +3 -0
- package/src/sap/ui/thirdparty/qunit-2.js +1 -2
- package/src/sap/ui/thirdparty/qunit-reporter-junit.js +30 -8
- package/src/sap/ui/thirdparty/qunit.js +1 -2
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +18 -4
- package/src/ui5loader.js +15 -4
- package/test/sap/ui/core/DateFormat.controller.js +3 -3
- package/test/sap/ui/core/ILabelableInterface.html +21 -0
- package/test/sap/ui/core/ILabelableInterface.js +81 -0
- package/test/sap/ui/core/NumberFormat.controller.js +4 -4
- package/test/sap/ui/core/Strings.controller.js +4 -4
- package/test/sap/ui/core/demokit/docuindex.json +8 -2
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/Component.js +2 -3
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/css/style.css +3 -3
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/reuse/categories/Component.js +2 -3
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/reuse/products/Component.js +2 -3
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/reuse/suppliers/Component.js +2 -3
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/Component.js +20 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/controller/Home.controller.js +14 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/controller/Next.controller.js +21 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/manifest.json +94 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/view/HomeContentDesktop.fragment.js +15 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/view/HomeContentMobile.fragment.js +15 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/view/HomeView.js +45 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/view/Next.view.xml +15 -0
- package/test/sap/ui/core/demokit/sample/View/navigationTypedView/view/RootView.js +22 -0
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/Opa.qunit.js +5 -4
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js +8 -5
- package/test/sap/ui/core/demokit/sample/ViewTemplate/valuelist/ValueHelp.js +38 -35
- package/test/sap/ui/core/demokit/sample/common/Helper.js +7 -7
- package/test/sap/ui/core/demokit/sample/common/SandboxModelHelper.js +1 -1
- package/test/sap/ui/core/demokit/sample/common/pages/Any.js +5 -3
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/odata/types/v2/DateTime/DateTime.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/types/v2/DateTimeOffset/DateTimeOffset.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/types/v2/Time/Time.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/types/v4/Date/Date.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/types/v4/DateTimeOffset/DateTimeOffset.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/types/v4/TimeOfDay/TimeOfDay.controller.js +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.controller.js +10 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.view.xml +3 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Main.controller.js +1 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Main.view.xml +6 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/formatRowHighlight.js +20 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.controller.js +30 -24
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.view.xml +10 -8
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Main.controller.js +1 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +6 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.controller.js +16 -17
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +8 -14
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +65 -31
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/pages/Main.js +1 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/Main.controller.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/localService/mockserver.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/internal/samples/odata/twoFields/Main.controller.js +3 -1
- package/test/sap/ui/core/internal/samples/odata/twoFields/tests/pages/Main.js +3 -2
- package/test/sap/ui/core/internal/samples/odata/v2/Products/Opa.qunit.js +5 -4
- package/test/sap/ui/core/internal/samples/odata/v2/SalesOrders/Main.controller.js +4 -6
- package/test/sap/ui/core/internal/samples/odata/v2/TreeTable/Main.controller.js +6 -5
- package/test/sap/ui/core/qunit/AppCacheBuster.qunit.js +5 -5
- package/test/sap/ui/core/qunit/BindingParser.qunit.js +158 -24
- package/test/sap/ui/core/qunit/BlockLayerUtils.qunit.js +3 -6
- package/test/sap/ui/core/qunit/CalculatedFields.qunit.js +70 -81
- package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +13 -13
- package/test/sap/ui/core/qunit/ControlDefinition.qunit.js +5 -4
- package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +1 -1
- package/test/sap/ui/core/qunit/Core.qunit.js +42 -57
- package/test/sap/ui/core/qunit/Core_libraryPreloadFiles.qunit.js +10 -2
- package/test/sap/ui/core/qunit/Core_libraryPreloadFiles_unavoidablyUsingEval.qunit.js +2 -2
- package/test/sap/ui/core/qunit/Core_libraryTerminologies.qunit.js +4 -3
- package/test/sap/ui/core/qunit/CustomThemeFallback.qunit.js +2 -3
- package/test/sap/ui/core/qunit/DataBinding.qunit.js +125 -65
- package/test/sap/ui/core/qunit/Element_base.qunit.js +4 -1
- package/test/sap/ui/core/qunit/Element_destroy.qunit.js +6 -10
- package/test/sap/ui/core/qunit/Element_metadata_renderer.qunit.js +54 -43
- package/test/sap/ui/core/qunit/Element_metadata_selector.qunit.js +1 -1
- package/test/sap/ui/core/qunit/EnabledPropagator.qunit.js +3 -2
- package/test/sap/ui/core/qunit/ExpressionParser.qunit.js +5 -2
- package/test/sap/ui/core/qunit/FieldGroup.qunit.js +3 -2
- package/test/sap/ui/core/qunit/Fragment.qunit.js +18 -2
- package/test/sap/ui/core/qunit/HTML.qunit.js +3 -2
- package/test/sap/ui/core/qunit/Hyphenation.qunit.js +30 -6
- package/test/sap/ui/core/qunit/Icon.qunit.js +4 -3
- package/test/sap/ui/core/qunit/InvisibleText.qunit.js +6 -5
- package/test/sap/ui/core/qunit/Lib.qunit.js +156 -15
- package/test/sap/ui/core/qunit/ListBinding.qunit.js +7 -42
- package/test/sap/ui/core/qunit/QUnit.qunit.js +6 -0
- package/test/sap/ui/core/qunit/RenderManager.qunit.js +13 -10
- package/test/sap/ui/core/qunit/{CoreEvents.qunit.js → Rendering.qunit.js} +68 -7
- package/test/sap/ui/core/qunit/ScrollBar.qunit.js +8 -7
- package/test/sap/ui/core/qunit/StashedControlSupport.qunit.js +65 -90
- package/test/sap/ui/core/qunit/StashedControlSupport_unavoidablySync.qunit.js +706 -0
- package/test/sap/ui/core/qunit/StaticBinding.qunit.js +49 -37
- package/test/sap/ui/core/qunit/ThemeManager.qunit.js +15 -11
- package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +5 -5
- package/test/sap/ui/core/qunit/ThemeParameters_legacyAPIs.qunit.js +7 -7
- package/test/sap/ui/core/qunit/Theming.qunit.js +174 -1
- package/test/sap/ui/core/qunit/VersionInfo.qunit.js +3 -0
- package/test/sap/ui/core/qunit/analytics/AnalyticalBinding.qunit.js +58 -0
- package/test/sap/ui/core/qunit/analytics/o4aMetadata.js +3 -0
- package/test/sap/ui/core/qunit/app/ThemeClassParameters.qunit.js +4 -4
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +1 -1
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +276 -44
- package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +173 -26
- package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +408 -3
- package/test/sap/ui/core/qunit/base/util/now.qunit.js +2 -30
- package/test/sap/ui/core/qunit/bootstrap/BootstrapCustomBootTaskPreloadCss.beforeBootstrap.qunit.js +6 -4
- package/test/sap/ui/core/qunit/bootstrap/BootstrapCustomBootTaskPreloadCss.qunit.js +4 -4
- package/test/sap/ui/core/qunit/bootstrap/BootstrapMinimal.qunit.js +1 -1
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +15 -6
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload_legacyAPIs.qunit.js +2 -3
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +4 -4
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.qunit.js +1 -1
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithNoJQuery.qunit.js +2 -1
- package/test/sap/ui/core/qunit/bootstrap/CalendarClassLoadingWithCustomBootTask.beforeBootstrap.qunit.js +8 -4
- package/test/sap/ui/core/qunit/bootstrap/{CalendarClassLoadingWithCustomBootTaskAndPreload.beforeBootstrap.qunit.js → CalendarClassLoadingWithCustomBootTask.beforeBootstrap_legacy.qunit.js} +5 -1
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +32 -28
- package/test/sap/ui/core/qunit/bootstrap/{ConfigurationFlexibility_LibNotLoaded.qunit.html → ConfigurationFlexibility_LibConfigured_legacyAPIs.qunit.html} +1 -1
- package/test/sap/ui/core/qunit/bootstrap/{ConfigurationFlexibility_LibConfigured.qunit.js → ConfigurationFlexibility_LibConfigured_legacyAPIs.qunit.js} +5 -1
- package/test/sap/ui/core/qunit/bootstrap/{ConfigurationFlexibility_LibConfigured.qunit.html → ConfigurationFlexibility_LibLoaded_legacyAPIs.qunit.html} +1 -1
- package/test/sap/ui/core/qunit/bootstrap/{ConfigurationFlexibility_LibLoaded.qunit.js → ConfigurationFlexibility_LibLoaded_legacyAPIs.qunit.js} +5 -1
- package/test/sap/ui/core/qunit/bootstrap/{ConfigurationFlexibility_LibLoaded.qunit.html → ConfigurationFlexibility_LibNotLoaded_legacyAPIs.qunit.html} +1 -1
- package/test/sap/ui/core/qunit/bootstrap/{ConfigurationFlexibility_LibNotLoaded.qunit.js → ConfigurationFlexibility_LibNotLoaded_legacyAPIs.qunit.js} +5 -1
- package/test/sap/ui/core/qunit/bootstrap/Configuration_language_via_URL.qunit.js +5 -0
- package/test/sap/ui/core/qunit/bootstrap/ControlBehavior.qunit.js +5 -0
- package/test/sap/ui/core/qunit/bootstrap/DebugMode.beforeBootstrap.qunit.js +2 -2
- package/test/sap/ui/core/qunit/bootstrap/DebugMode.qunit.js +8 -8
- package/test/sap/ui/core/qunit/bootstrap/PreloadCfg.qunit.js +4 -4
- package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +11 -10
- package/test/sap/ui/core/qunit/bootstrap/_checkCoreAndLibraryBooted.qunit.js +2 -2
- package/test/sap/ui/core/qunit/bootstrap/testsuite.bootstrap.qunit.js +68 -13
- package/test/sap/ui/core/qunit/compat_legacyAPIs/jquery.sap.stubs.qunit.html +0 -1
- package/test/sap/ui/core/qunit/component/Component.qunit.js +40 -21
- package/test/sap/ui/core/qunit/component/ComponentSupport.qunit.js +65 -39
- package/test/sap/ui/core/qunit/component/Component_containedInLibrary.qunit.js +25 -6
- package/test/sap/ui/core/qunit/component/Manifest.qunit.js +9 -9
- package/test/sap/ui/core/qunit/component/Metadata.qunit.js +5 -5
- package/test/sap/ui/core/qunit/component/Metadata_unavoidablySync.qunit.js +1 -2
- package/test/sap/ui/core/qunit/component/Models.qunit.js +295 -157
- package/test/sap/ui/core/qunit/component/Models_unavoidablySync.qunit.js +3 -3
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.js +3 -4
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library.js +3 -4
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.js +3 -4
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library.js +3 -3
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.js +3 -4
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library.js +3 -4
- package/test/sap/ui/core/qunit/component/testdata/inherit/parent/i18n/i18n.properties +3 -0
- package/test/sap/ui/core/qunit/component/testdata/inherit/parent/manifest.json +3 -1
- package/test/sap/ui/core/qunit/component/testdata/v2models/parent/Component.js +1 -4
- package/test/sap/ui/core/qunit/component/testdata/v4models/Component.js +1 -2
- package/test/sap/ui/core/qunit/component/testdata/v4models/cacheTokens/Component.js +1 -2
- package/test/sap/ui/core/qunit/component/testdata/v4models/unsupportedVersion/Component.js +1 -2
- package/test/sap/ui/core/qunit/component/testdata/verticalLayout/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/view/Main.controller.js +1 -1
- package/test/sap/ui/core/qunit/composite/XMLComposite.qunit.js +3 -2
- package/test/sap/ui/core/qunit/csp/ContentSecurityPolicy.qunit.js +0 -1
- package/test/sap/ui/core/qunit/dnd/DragAndDrop.qunit.js +3 -3
- package/test/sap/ui/core/qunit/dnd/DragInfo.qunit.js +2 -1
- package/test/sap/ui/core/qunit/format/FormatUtils.qunit.js +36 -0
- package/test/sap/ui/core/qunit/generic/ControlMemoryLeaks.qunit.js +1 -1
- package/test/sap/ui/core/qunit/generic/DuplicateIdCheck.qunit.js +2 -2
- package/test/sap/ui/core/qunit/i18n/Buddhist.qunit.js +6 -6
- package/test/sap/ui/core/qunit/i18n/CalendarUtils.qunit.js +3 -3
- package/test/sap/ui/core/qunit/i18n/GenericLocaleData.qunit.js +29 -29
- package/test/sap/ui/core/qunit/i18n/Japanese.qunit.js +6 -6
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +92 -78
- package/test/sap/ui/core/qunit/i18n/UI5Date.qunit.js +199 -33
- package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +111 -119
- package/test/sap/ui/core/qunit/i18n/UniversalDateUtils.qunit.js +12 -38
- package/test/sap/ui/core/qunit/i18n/helper/_timezones.js +1 -1
- package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +29 -28
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.html +2 -1
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +3 -9
- package/test/sap/ui/core/qunit/internal/testsuite.models.qunit.js +7 -0
- package/test/sap/ui/core/qunit/jquery.sap.events.qunit.js +4 -68
- package/test/sap/ui/core/qunit/json/JSONBinding.qunit.js +4 -6
- package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +0 -1
- package/test/sap/ui/core/qunit/json/JSONModel.qunit.js +5 -18
- package/test/sap/ui/core/qunit/json/JSONPropertyBinding.qunit.js +15 -23
- package/test/sap/ui/core/qunit/json/JSONTreeBinding.qunit.js +6 -8
- package/test/sap/ui/core/qunit/json/JSONTwoWay.qunit.js +11 -13
- package/test/sap/ui/core/qunit/loader/asyncMode.qunit.html +0 -2
- package/test/sap/ui/core/qunit/loader/asyncMode.qunit.js +40 -34
- package/test/sap/ui/core/qunit/loader/{asyncMode_unavoidablySync.qunit.html → asyncMode_legacyAPIs.qunit.html} +1 -1
- package/test/sap/ui/core/qunit/loader/{asyncMode_unavoidablySync.qunit.js → asyncMode_legacyAPIs.qunit.js} +33 -4
- package/test/sap/ui/core/qunit/loader/conflictWithRequire.qunit.js +16 -16
- package/test/sap/ui/core/qunit/loader/testsuite.loader.qunit.js +2 -2
- package/test/sap/ui/core/qunit/messages/MessageMixin.qunit.js +46 -2
- package/test/sap/ui/core/qunit/mockserver/MockServer.qunit.js +859 -245
- package/test/sap/ui/core/qunit/mockserver/testsuite.mockserver.qunit.js +8 -0
- package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata.xml +3 -0
- package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata_ItemCustomer.xml +5 -0
- package/test/sap/ui/core/qunit/model/Filter.qunit.js +135 -44
- package/test/sap/ui/core/qunit/model/Sorter.qunit.js +10 -10
- package/test/sap/ui/core/qunit/model/_Helper.qunit.js +3 -1
- package/test/sap/ui/core/qunit/mvc/AnyViewAsync.qunit.js +11 -3
- package/test/sap/ui/core/qunit/mvc/AsyncXMLView.qunit.js +5 -5
- package/test/sap/ui/core/qunit/mvc/EventHandlerResolver.qunit.js +73 -47
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +0 -4
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +78 -7
- package/test/sap/ui/core/qunit/mvc/testdata/inner.view.xml +3 -0
- package/test/sap/ui/core/qunit/mvc/testdata/middle.view.xml +8 -0
- package/test/sap/ui/core/qunit/mvc/testdata/outer.view.xml +5 -0
- package/test/sap/ui/core/qunit/mvc/testdata/test.controller.js +1 -1
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing.qunit.js +3 -3
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/AsyncHTMLView_legacyAPIs.qunit.js +6 -7
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/AsyncXMLView_legacyAPIs.qunit.js +5 -7
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/View_legacyAPIs.qunit.js +46 -1
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLTemplateProcessorRequireXML_legacyAPIs.qunit.js +0 -4
- package/test/sap/ui/core/qunit/mvc_legacyAPIs/XMLView_legacyAPIs.qunit.js +5 -5
- package/test/sap/ui/core/qunit/odata/AnnotationHelper.qunit.js +60 -62
- package/test/sap/ui/core/qunit/odata/ODataAnnotations.qunit.js +9 -9
- package/test/sap/ui/core/qunit/odata/ODataMessageParser.qunit.js +12 -46
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +4 -3
- package/test/sap/ui/core/qunit/odata/ODataMetaModel.qunit.js +42 -0
- package/test/sap/ui/core/qunit/odata/ODataMetadataNoFakeService.qunit.js +40 -0
- package/test/sap/ui/core/qunit/odata/ODataUtils.qunit.js +365 -13
- package/test/sap/ui/core/qunit/odata/_AnnotationHelperExpression.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/type/Boolean.qunit.js +5 -5
- package/test/sap/ui/core/qunit/odata/type/Currency.qunit.js +5 -5
- package/test/sap/ui/core/qunit/odata/type/Date.qunit.js +11 -11
- package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +54 -55
- package/test/sap/ui/core/qunit/odata/type/DateTimeWithTimezone.qunit.js +8 -8
- package/test/sap/ui/core/qunit/odata/type/Decimal.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/type/Double.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/type/Int.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/type/Int64.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/type/Single.qunit.js +6 -6
- package/test/sap/ui/core/qunit/odata/type/Time.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/type/TimeOfDay.qunit.js +12 -12
- package/test/sap/ui/core/qunit/odata/type/Unit.qunit.js +5 -5
- package/test/sap/ui/core/qunit/odata/v2/CanonicalRequests.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +580 -130
- package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +79 -20
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +23 -18
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +24 -0
- package/test/sap/ui/core/qunit/odata/v2/ODataV2Model.qunit.js +25 -203
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModel.qunit.js +55 -192
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModelB.qunit.js +47 -261
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModelDataState.qunit.js +9 -9
- package/test/sap/ui/core/qunit/odata/v4/AnnotationHelper.qunit.js +4 -1
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +43 -5
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +15 -6
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +7 -6
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +142 -30
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +8 -6
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +2317 -470
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +12 -4
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +75 -40
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +43 -9
- package/test/sap/ui/core/qunit/odata/v4/ODataUtils.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +4 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +381 -182
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +46 -29
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +38 -26
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +38 -10
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +45 -4
- package/test/sap/ui/core/qunit/odata/v4/lib/_TreeState.qunit.js +134 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_V2Requestor.qunit.js +7 -7
- package/test/sap/ui/core/qunit/odata/v4/testsuite.odatav4.qunit.js +1 -0
- package/test/sap/ui/core/qunit/opa/OpaBuilder.qunit.js +3 -1
- package/test/sap/ui/core/qunit/opa/RecordReplay.qunit.js +0 -1
- package/test/sap/ui/core/qunit/opa/_ControlFinder.qunit.js +5 -1
- package/test/sap/ui/core/qunit/opa/actions/EnterText.qunit.js +0 -1
- package/test/sap/ui/core/qunit/opa/actions/Press.qunit.js +4 -3
- package/test/sap/ui/core/qunit/opa/autowaiter/_XHRWaiter.js +1 -1
- package/test/sap/ui/core/qunit/opa/autowaiter/_navigationContainerWaiter.js +5 -5
- package/test/sap/ui/core/qunit/opa/fixture/bindingPath.js +20 -12
- package/test/sap/ui/core/qunit/opa/fixture/busyAfterStart.html +4 -4
- package/test/sap/ui/core/qunit/opa/fixture/emptySite.html +4 -2
- package/test/sap/ui/core/qunit/opa/fixture/emptySiteWithOpaExtensions.html +4 -2
- package/test/sap/ui/core/qunit/opa/fixture/failingOpaTest-qunit1.html +4 -1
- package/test/sap/ui/core/qunit/opa/fixture/failingOpaTest-qunit2.html +4 -1
- package/test/sap/ui/core/qunit/opa/fixture/failingOpaTest.js +6 -3
- package/test/sap/ui/core/qunit/opa/fixture/miniUI5Site.html +5 -5
- package/test/sap/ui/core/qunit/opa/fixture/opaQUnitTest-qunit1.html +4 -2
- package/test/sap/ui/core/qunit/opa/fixture/opaQUnitTest-qunit2.html +4 -2
- package/test/sap/ui/core/qunit/opa/fixture/opaQUnitTest.js +4 -1
- package/test/sap/ui/core/qunit/opa/fixture/opaReportTest-qunit1.html +4 -2
- package/test/sap/ui/core/qunit/opa/fixture/opaReportTest-qunit2.html +4 -2
- package/test/sap/ui/core/qunit/opa/fixture/opaReportTest.js +4 -1
- package/test/sap/ui/core/qunit/opa/fixture/qunitPause-qunit1.html +3 -1
- package/test/sap/ui/core/qunit/opa/fixture/qunitPause-qunit2.html +3 -1
- package/test/sap/ui/core/qunit/opa/fixture/qunitPause.qunit.js +4 -1
- package/test/sap/ui/core/qunit/opa/fixture/uncaughtError.html +4 -3
- package/test/sap/ui/core/qunit/opa/fixture/uncaughtError.js +4 -1
- package/test/sap/ui/core/qunit/opa/matchers/I18NText.qunit.js +1 -1
- package/test/sap/ui/core/qunit/opa/matchers/LabelFor.qunit.js +2 -1
- package/test/sap/ui/core/qunit/opa/matchers/_Busy.qunit.js +2 -1
- package/test/sap/ui/core/qunit/opa/opa5/iFrame.qunit.js +6 -5
- package/test/sap/ui/core/qunit/opa/opa5/iFrameLogging.qunit.js +26 -6
- package/test/sap/ui/core/qunit/opa/opa5/matchersInFrame.qunit.js +1 -1
- package/test/sap/ui/core/qunit/opa/selectors/_BindingPath.js +2 -2
- package/test/sap/ui/core/qunit/opa/selectors/_ControlSelectorGenerator.js +3 -3
- package/test/sap/ui/core/qunit/opa/selectors/_ControlSelectorValidator.js +5 -2
- package/test/sap/ui/core/qunit/opa/selectors/_DropdownItem.js +3 -2
- package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +28 -18
- package/test/sap/ui/core/qunit/performance/trace/Interaction.qunit.js +26 -12
- package/test/sap/ui/core/qunit/resource/ResourceBinding.qunit.js +5 -8
- package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +71 -64
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +55 -2
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/Component.js +0 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Child/manifest.json +5 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/Component.js +0 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/Parent/manifest.json +5 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/parentRoute/ParentExtended/Component.js +0 -1
- package/test/sap/ui/core/qunit/routing/fixture/router/component/titleChanged/homeRoute/Component.js +15 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/titleChanged/homeRoute/manifest.json +37 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/titleChanged/homeRoute/view/MyView1.view.xml +3 -0
- package/test/sap/ui/core/qunit/routing/fixture/router/component/titleChanged/homeRoute/view/RootView.view.xml +3 -0
- package/test/sap/ui/core/qunit/rule/app/syncXHR.qunit.js +9 -0
- package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +4 -7
- package/test/sap/ui/core/qunit/security/Security.qunit.js +133 -0
- package/test/sap/ui/core/qunit/service/Service.qunit.js +13 -10
- package/test/sap/ui/core/qunit/testdata/libraries/customBundle/custom-bundle.js +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/customBundle/lib2/library-preload.js +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/customBundle/lib3/library-preload.js +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/customCss/lib1/library.js +3 -4
- package/test/sap/ui/core/qunit/testdata/libraries/make.js +4 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib1/library-preload.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib1/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib2/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib3/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib3/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib4/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib5/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib6/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib6/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario1/lib7/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib1/library-preload.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib1/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib2/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib3/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib3/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib4/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib5/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib6/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib6/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario13/lib7/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib1/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib1/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib2/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib2/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib3/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib3/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib4/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib5/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib6/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib6/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib7/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib7/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib8/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib8/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib1/library-preload.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib1/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib10/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib10/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib2/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib3/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib3/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib4/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib5/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib6/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib6/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib7/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib7/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib8/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib8/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib9/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario15/lib9/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario16/embeddingLib/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario16/embeddingLib/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib1/library-preload.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib1/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib2/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib3/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib3/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib4/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib5/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib6/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib6/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario2/lib7/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario3/lib1/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario3/lib1/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario3/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario3/lib2/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario3/lib3/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario3/lib3/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario4/lib1/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario4/lib1/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario4/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario4/lib2/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib1/library-preload.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib1/library.js +7 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib2/library-preload.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib2/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib3/library-preload.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib3/library.js +5 -4
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib4/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib5/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib6/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario5/lib6/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario6/lib1/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario6/lib1/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario6/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario6/lib2/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib1/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib1/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib1/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib2/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib3/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib3/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib5/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario7/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib1/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib1/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib1/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib2/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib3/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib3/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib4/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib5/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario8/lib5/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario9/lib1/library-preload.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/scenario9/lib1/library.js +3 -3
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/absoluteBundleUrl/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/integration/lib/library-preload.js +1 -1
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/notLoadedYet/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/simple/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib1/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib10/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib11/library.js +5 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib12/library.js +5 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib13/library.js +5 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib14/library.js +5 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib15/library.js +5 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib16/library.js +5 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib17/library.js +6 -3
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib2/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib3/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib4/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib5/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib6/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib7/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib8/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/libraries/themeParameters/lib9/library.js +6 -4
- package/test/sap/ui/core/qunit/testdata/xml-require/view/XMLTemplateProcessorAsync_require.view.xml +0 -1
- package/test/sap/ui/core/qunit/testsuite.qunit.js +2 -2
- package/test/sap/ui/core/qunit/testsuites/testsuite.control.framework.qunit.js +35 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.eventing.qunit.js +0 -11
- package/test/sap/ui/core/qunit/testsuites/testsuite.security.qunit.js +7 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +4 -0
- package/test/sap/ui/core/qunit/types/Date.qunit.js +5 -5
- package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +92 -99
- package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +50 -50
- package/test/sap/ui/core/qunit/types/DateInterval.qunit.js +5 -5
- package/test/sap/ui/core/qunit/types/FileSizeFormat.qunit.js +74 -4
- package/test/sap/ui/core/qunit/types/NumberFormat.qunit.js +332 -166
- package/test/sap/ui/core/qunit/types/NumberFormatCurrencies.qunit.js +60 -24
- package/test/sap/ui/core/qunit/types/NumberFormatCurrenciesTrailing.qunit.js +21 -21
- package/test/sap/ui/core/qunit/types/Types.qunit.js +51 -48
- package/test/sap/ui/core/qunit/types/ValidationHooks.qunit.js +151 -78
- package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +7 -17
- package/test/sap/ui/core/qunit/{types → ui5classes}/DataType.qunit.js +174 -17
- package/test/sap/ui/core/qunit/{ManagedObjectMetadata.qunit.js → ui5classes/ManagedObjectMetadata.qunit.js} +0 -1
- package/test/sap/ui/core/qunit/ui5classes/ManagedObjectRegistry.qunit.js +1 -1
- package/test/sap/ui/core/qunit/{ManagedObject_BindingParser.qunit.js → ui5classes/ManagedObject_BindingParser.qunit.js} +1 -1
- package/test/sap/ui/core/qunit/ui5classes/testsuite.ui5classes.qunit.html +11 -0
- package/test/sap/ui/core/qunit/util/LabelEnablement.qunit.js +62 -0
- package/test/sap/ui/core/qunit/util/PasteHelper.qunit.js +5 -5
- package/test/sap/ui/core/qunit/util/Popup.qunit.js +3 -71
- package/test/sap/ui/core/qunit/util/ValueStateSupport.qunit.js +3 -3
- package/test/sap/ui/core/qunit/util/jQuery.sap.Version.qunit.js +6 -0
- package/test/sap/ui/core/qunit/util/jQuery.sap.measure.qunit.js +31 -16
- package/test/sap/ui/core/qunit/util/jquery.sap.trace.qunit.js +1 -1
- package/test/sap/ui/core/qunit/util/postmessage/ConfirmationDialog.qunit.js +4 -6
- package/test/sap/ui/core/qunit/util/reflection/BaseTreeModifier.qunit.js +11 -2
- package/test/sap/ui/core/qunit/util/reflection/JsControlTreeModifier.qunit.js +4 -4
- package/test/sap/ui/core/qunit/util/reflection/XmlTreeModifier.qunit.js +4 -4
- package/test/sap/ui/core/qunit/util/support/SupportTool.qunit.js +3 -2
- package/test/sap/ui/core/qunit/util/support/TechnicalInfo.opa.qunit.js +22 -83
- package/test/sap/ui/core/qunit/util/support/TechnicalInfo.qunit.js +3 -3
- package/test/sap/ui/core/qunit/util/support/TechnicalInfoDebugModules.opa.qunit.js +22 -83
- package/test/sap/ui/core/qunit/xml/XMLBinding.qunit.js +0 -2
- package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +3 -4
- package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +12 -14
- package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +4 -6
- package/test/sap/ui/core/qunit/xml/XMLTwoWay.qunit.js +8 -10
- package/test/sap/ui/core/relnotes/changes-1.120.json +0 -490
- package/test/sap/ui/core/relnotes/changes-1.121.json +604 -0
- package/test/sap/ui/core/samples/components/config/modelPreloadAndEarlyRequests/manifest.json +3 -5
- package/test/sap/ui/core/samples/databinding/UnitTable.controller.js +5 -5
- package/test/sap/ui/core/terminologies/App.controller.js +3 -4
- package/test/sap/ui/core/terminologies/main.js +4 -4
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/qunit/testrunner.html +5 -2
- package/test/testsuite/js/samples.js +5 -4
- package/test/testsuite/js/settings.js +1 -1
- package/test/testsuite/js/testframe.js +1 -1
- package/test/testsuite/welcome.html +1 -1
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Formatter.js +0 -22
- package/test/sap/ui/core/qunit/ManagedObjectRegistry.qunit.js +0 -150
- package/test/sap/ui/core/qunit/testdata/uilib-using-legacy-module-apis/.library +0 -17
- package/test/sap/ui/core/qunit/testdata/uilib-using-legacy-module-apis/TestButton.js +0 -85
- package/test/sap/ui/core/qunit/testdata/uilib-using-legacy-module-apis/TestButtonRenderer.js +0 -63
- package/test/sap/ui/core/qunit/testdata/uilib-using-legacy-module-apis/library.js +0 -24
- package/test/sap/ui/core/qunit/testdata/uilib-using-legacy-module-apis/themes/base/library.css +0 -26
- package/test/sap/ui/core/qunit/testsuites/testsuite.managed.object.qunit.html +0 -12
- package/test/sap/ui/core/qunit/testsuites/testsuite.managed.object.qunit.js +0 -76
- /package/test/sap/ui/core/qunit/bootstrap/{DebugMode.qunit.html → DebugModeSync.qunit.html} +0 -0
- /package/test/sap/ui/core/qunit/{types → ui5classes}/AlternativeTypes.qunit.js +0 -0
- /package/test/sap/ui/core/qunit/{ManagedObject.qunit.js → ui5classes/ManagedObject.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{ManagedObjectObserver.qunit.js → ui5classes/ManagedObjectObserver.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{ManagedObject_forwardAggregation.qunit.js → ui5classes/ManagedObject_forwardAggregation.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{ManagedObject_isPropertyInitial.qunit.js → ui5classes/ManagedObject_isPropertyInitial.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{Metadata.qunit.js → ui5classes/Metadata.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{Object.qunit.js → ui5classes/Object.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{Object_legacyAPIs.qunit.js → ui5classes/Object_legacyAPIs.qunit.js} +0 -0
- /package/test/sap/ui/core/qunit/{testdata → ui5classes/fixture}/customboot/common.configure.ui5.js +0 -0
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.core.format.NumberFormat
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"sap/base/i18n/Formatting",
|
|
10
|
+
"sap/base/i18n/Localization",
|
|
9
11
|
'sap/ui/base/Object',
|
|
10
12
|
'sap/ui/core/Locale',
|
|
11
13
|
'sap/ui/core/LocaleData',
|
|
12
14
|
'sap/ui/core/Supportability',
|
|
15
|
+
'sap/ui/core/format/FormatUtils',
|
|
13
16
|
'sap/base/Log',
|
|
14
17
|
'sap/base/assert',
|
|
15
|
-
'sap/base/util/extend'
|
|
16
|
-
'sap/ui/core/Configuration'
|
|
17
|
-
|
|
18
|
+
'sap/base/util/extend'
|
|
18
19
|
],
|
|
19
|
-
function(BaseObject, Locale, LocaleData, Supportability, Log, assert, extend
|
|
20
|
+
function(Formatting, Localization, BaseObject, Locale, LocaleData, Supportability, FormatUtils, Log, assert, extend) {
|
|
20
21
|
"use strict";
|
|
21
22
|
|
|
22
23
|
|
|
@@ -47,17 +48,22 @@ sap.ui.define([
|
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
const rAllWhiteSpaces = /\s/g;
|
|
52
|
+
const rDigit = /\d/;
|
|
53
|
+
// Regex for checking if a number has leading zeros
|
|
54
|
+
const rLeadingZeros = /^(-?)0+(\d)/;
|
|
55
|
+
// Not matching Sc (currency symbol) and Z (separator) characters
|
|
56
|
+
// https://www.unicode.org/reports/tr44/#General_Category_Values
|
|
57
|
+
const rNotSAndNotZ = /[^\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6\u0020\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
|
|
58
|
+
// Regex for matching the number placeholder in pattern
|
|
59
|
+
const rNumPlaceHolder = /0+(\.0+)?/;
|
|
60
|
+
// Regex for checking that the given string only consists of '0' characters
|
|
61
|
+
const rOnlyZeros = /^0+$/;
|
|
62
|
+
// A regular expresssion that can be used to remove a leading "-" from a number representing zero,
|
|
63
|
+
// e.g. "-0", or "-0.00"; $1 contains the number without the leading "-"
|
|
64
|
+
const rRemoveMinusFromZero = /^-(0(?:.0+)?)$/;
|
|
65
|
+
// A regular expression that can be used to remove trailing zeros from a number
|
|
66
|
+
const rTrailingZeros = /0+$/;
|
|
61
67
|
|
|
62
68
|
/*
|
|
63
69
|
* Is used to validate existing grouping separators.
|
|
@@ -140,25 +146,154 @@ sap.ui.define([
|
|
|
140
146
|
HALF_AWAY_FROM_ZERO: "HALF_AWAY_FROM_ZERO"
|
|
141
147
|
};
|
|
142
148
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Adds the summand given as a number to an decimal given as a string.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} sDecimal A positive or negative decimal number as string
|
|
153
|
+
* @param {int} iSummand An integer between -9 and 9 to be added to the given decimal number
|
|
154
|
+
* @returns {string} The sum of the two numbers as a string
|
|
155
|
+
*
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
NumberFormat.add = function (sDecimal, iSummand) {
|
|
159
|
+
const aParts = sDecimal.split(".");
|
|
160
|
+
let sInteger = aParts[0];
|
|
161
|
+
const sFractionPart = aParts[1];
|
|
162
|
+
const bNegative = sInteger[0] === "-";
|
|
163
|
+
if (bNegative) {
|
|
164
|
+
sInteger = sInteger.slice(1);
|
|
165
|
+
iSummand = -iSummand;
|
|
166
|
+
}
|
|
167
|
+
const aDigits = sInteger.split("").map(Number);
|
|
168
|
+
const iLastIndex = aDigits.length - 1;
|
|
169
|
+
aDigits[iLastIndex] += iSummand;
|
|
170
|
+
for (let i = iLastIndex; i >= 0; i -= 1) {
|
|
171
|
+
if (aDigits[i] >= 10) {
|
|
172
|
+
aDigits[i] = aDigits[i] % 10;
|
|
173
|
+
if (i === 0) {
|
|
174
|
+
aDigits.unshift(1);
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
aDigits[i - 1] += 1;
|
|
178
|
+
} else if (aDigits[i] < 0 && i > 0) {
|
|
179
|
+
aDigits[i] = 10 + aDigits[i];
|
|
180
|
+
aDigits[i - 1] -= 1;
|
|
181
|
+
if (i === 1 && aDigits[0] === 0) {
|
|
182
|
+
aDigits.shift();
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (bNegative) {
|
|
190
|
+
aDigits[0] = -aDigits[0];
|
|
191
|
+
}
|
|
192
|
+
let sResult = aDigits.join("");
|
|
193
|
+
if (!sFractionPart) {
|
|
194
|
+
return sResult;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// If sResult is 0, the sign may be lost and has to be restored, e.g. "-5.123" + 5 => -5 + 5 = 0 => "-0.123"
|
|
198
|
+
sResult = sResult === "0" && bNegative ? "-0" : sResult;
|
|
199
|
+
const sResultSign = sResult[0] === "-" ? "-" : "";
|
|
200
|
+
// If both signs are equal, the fraction part can simply be appended
|
|
201
|
+
if (bNegative === !!sResultSign) {
|
|
202
|
+
return sResult + "." + sFractionPart;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// If the signs are different, aDigits contains only one digit which is different from zero; to compute the
|
|
206
|
+
// result, the result sign has to be kept, the integer part is the absolute sResult reduced by one, and the
|
|
207
|
+
// fractional part is (1 - fractional part), e.g. "2.123" - 5 => 2 - 5 = -3 => sign = "-", integer part is
|
|
208
|
+
// |-3| - 1 = 2 and fractional part is 1 - 0.123 = 0.877 without the leading "0." => "-2.877"
|
|
209
|
+
const aFractionDigits = sFractionPart.split("").map(Number);
|
|
210
|
+
for (let i = aFractionDigits.length - 1; i >= 0; i -= 1) {
|
|
211
|
+
aFractionDigits[i] = 10 - aFractionDigits[i];
|
|
212
|
+
if (i > 0) {
|
|
213
|
+
aFractionDigits[i - 1] += 1;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return sResultSign + (Math.abs(aDigits[0]) - 1) + "." + aFractionDigits.join("");
|
|
157
217
|
};
|
|
158
|
-
|
|
159
|
-
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Rounds the given number up to the smallest integer greater than or equal to the given number.
|
|
221
|
+
*
|
|
222
|
+
* @param {number|string} vNumber
|
|
223
|
+
* The number to be rounded up; it has at least one digit in front of the decimal point in case of type "string"
|
|
224
|
+
* @returns {number|string}
|
|
225
|
+
* The smallest integer greater than or equal to the given number; the returned type is the same as the type of
|
|
226
|
+
* the given number
|
|
227
|
+
*/
|
|
228
|
+
function ceil(vNumber) {
|
|
229
|
+
if (typeof vNumber === "number") {
|
|
230
|
+
return Math.ceil(vNumber);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const [sIntegerPart, sFractionPart = "0"] = vNumber.split(".");
|
|
234
|
+
return rOnlyZeros.test(sFractionPart) || sIntegerPart[0] === "-"
|
|
235
|
+
? sIntegerPart
|
|
236
|
+
: NumberFormat.add(sIntegerPart, 1);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Rounds the given number down to the largest integer less than or equal to the given number.
|
|
241
|
+
*
|
|
242
|
+
* @param {number|string} vNumber
|
|
243
|
+
* The number to be rounded down; it has at least one digit in front of the decimal point in case of type "string"
|
|
244
|
+
* @returns {number|string}
|
|
245
|
+
* The largest integer less than or equal to the given number; the returned type is the same as the type of the
|
|
246
|
+
* given number
|
|
247
|
+
*/
|
|
248
|
+
function floor(vNumber) {
|
|
249
|
+
if (typeof vNumber === "number") {
|
|
250
|
+
return Math.floor(vNumber);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const [sIntegerPart, sFractionPart = "0"] = vNumber.split(".");
|
|
254
|
+
return rOnlyZeros.test(sFractionPart) || sIntegerPart[0] !== "-"
|
|
255
|
+
? sIntegerPart
|
|
256
|
+
: NumberFormat.add(sIntegerPart, -1);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Adds 0.5 to or subtracts 0.5 from the given number.
|
|
261
|
+
*
|
|
262
|
+
* @param {number|string} vNumber
|
|
263
|
+
* The number to be increased or decreased by 0.5
|
|
264
|
+
* @param {boolean} bIncrease
|
|
265
|
+
* Whether to increase the number by 0.5; otherwise the number is decreased by 0.5
|
|
266
|
+
* @returns {number|string}
|
|
267
|
+
* The number increased or decreased by 0.5; the returned type is the same as the type of the given number
|
|
268
|
+
*/
|
|
269
|
+
function increaseOrDecreaseByHalf(vNumber, bIncrease) {
|
|
270
|
+
if (typeof vNumber === "number") {
|
|
271
|
+
return bIncrease ? vNumber + 0.5 : vNumber - 0.5;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
vNumber = NumberFormat._shiftDecimalPoint(vNumber, 1);
|
|
275
|
+
vNumber = NumberFormat.add(vNumber, bIncrease ? 5 : -5);
|
|
276
|
+
return NumberFormat._shiftDecimalPoint(vNumber, -1);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const mRoundingFunction = {
|
|
280
|
+
[mRoundingMode.FLOOR]: floor,
|
|
281
|
+
[mRoundingMode.CEILING]: ceil,
|
|
282
|
+
[mRoundingMode.TOWARDS_ZERO]: (vNumber) => (vNumber > 0 ? floor(vNumber) : ceil(vNumber)),
|
|
283
|
+
[mRoundingMode.AWAY_FROM_ZERO]: (vNumber) => (vNumber > 0 ? ceil(vNumber) : floor(vNumber)),
|
|
284
|
+
[mRoundingMode.HALF_TOWARDS_ZERO]: (vNumber) => {
|
|
285
|
+
const bPositive = vNumber > 0;
|
|
286
|
+
vNumber = increaseOrDecreaseByHalf(vNumber, !bPositive);
|
|
287
|
+
return bPositive ? ceil(vNumber) : floor(vNumber);
|
|
288
|
+
},
|
|
289
|
+
[mRoundingMode.HALF_AWAY_FROM_ZERO]: (vNumber) => {
|
|
290
|
+
const bPositive = vNumber > 0;
|
|
291
|
+
vNumber = increaseOrDecreaseByHalf(vNumber, bPositive);
|
|
292
|
+
return bPositive ? floor(vNumber) : ceil(vNumber);
|
|
293
|
+
},
|
|
294
|
+
[mRoundingMode.HALF_FLOOR]: (vNumber) => ceil(increaseOrDecreaseByHalf(vNumber, false)),
|
|
295
|
+
[mRoundingMode.HALF_CEILING]: (vNumber) => floor(increaseOrDecreaseByHalf(vNumber, true))
|
|
160
296
|
};
|
|
161
|
-
mRoundingFunction[mRoundingMode.HALF_CEILING] = Math.round;
|
|
162
297
|
|
|
163
298
|
NumberFormat.RoundingMode = mRoundingMode;
|
|
164
299
|
|
|
@@ -322,9 +457,6 @@ sap.ui.define([
|
|
|
322
457
|
/**
|
|
323
458
|
* Get a float instance of the NumberFormat, which can be used for formatting.
|
|
324
459
|
*
|
|
325
|
-
* If no locale is given, the currently configured
|
|
326
|
-
* {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale formatLocale} will be used.
|
|
327
|
-
*
|
|
328
460
|
* <p>
|
|
329
461
|
* This instance has HALF_AWAY_FROM_ZERO set as default rounding mode.
|
|
330
462
|
* Please set the roundingMode property in oFormatOptions to change the
|
|
@@ -381,12 +513,14 @@ sap.ui.define([
|
|
|
381
513
|
* <code>maxFractionDigits</code> format option allows.
|
|
382
514
|
* If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
|
|
383
515
|
* @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
|
|
384
|
-
*
|
|
385
|
-
* defined by
|
|
516
|
+
* Specifies the rounding behavior for discarding the digits after the maximum fraction digits
|
|
517
|
+
* defined by <code>maxFractionDigits</code>.
|
|
386
518
|
* This can be assigned
|
|
387
519
|
* <ul>
|
|
388
520
|
* <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
|
|
389
|
-
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
521
|
+
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
522
|
+
* number of decimal digits that should be reserved. <b>Using a function is deprecated since 1.121.0</b>;
|
|
523
|
+
* string based numbers are not rounded via this custom function.</li>
|
|
390
524
|
* </ul>
|
|
391
525
|
* @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
|
|
392
526
|
* @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
|
|
@@ -400,7 +534,9 @@ sap.ui.define([
|
|
|
400
534
|
* numbers are formatted into compact forms. When this option is set, the default value of the
|
|
401
535
|
* 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
|
|
402
536
|
* decimals, shortDecimals, or the 'precision' option itself.
|
|
403
|
-
* @param {sap.ui.core.Locale} [oLocale]
|
|
537
|
+
* @param {sap.ui.core.Locale} [oLocale]
|
|
538
|
+
* The locale to get the formatter for; if no locale is given, a locale for the currently configured language is
|
|
539
|
+
* used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag}
|
|
404
540
|
* @return {sap.ui.core.format.NumberFormat} float instance of the NumberFormat
|
|
405
541
|
* @static
|
|
406
542
|
* @public
|
|
@@ -416,9 +552,6 @@ sap.ui.define([
|
|
|
416
552
|
/**
|
|
417
553
|
* Get an integer instance of the NumberFormat, which can be used for formatting.
|
|
418
554
|
*
|
|
419
|
-
* If no locale is given, the currently configured
|
|
420
|
-
* {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale formatLocale} will be used.
|
|
421
|
-
*
|
|
422
555
|
* <p>
|
|
423
556
|
* This instance has TOWARDS_ZERO set as default rounding mode.
|
|
424
557
|
* Please set the roundingMode property in oFormatOptions to change the
|
|
@@ -474,12 +607,14 @@ sap.ui.define([
|
|
|
474
607
|
* <code>maxFractionDigits</code> format option allows.
|
|
475
608
|
* If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
|
|
476
609
|
* @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=TOWARDS_ZERO]
|
|
477
|
-
*
|
|
478
|
-
* defined by
|
|
610
|
+
* Specifies the rounding behavior for discarding the digits after the maximum fraction digits
|
|
611
|
+
* defined by <code>maxFractionDigits</code>.
|
|
479
612
|
* This can be assigned
|
|
480
613
|
* <ul>
|
|
481
614
|
* <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
|
|
482
|
-
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
615
|
+
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
616
|
+
* number of decimal digits that should be reserved. <b>Using a function is deprecated since 1.121.0</b>;
|
|
617
|
+
* string based numbers are not rounded via this custom function.</li>
|
|
483
618
|
* </ul>
|
|
484
619
|
* @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
|
|
485
620
|
* @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
|
|
@@ -493,7 +628,9 @@ sap.ui.define([
|
|
|
493
628
|
* numbers are formatted into compact forms. When this option is set, the default value of the
|
|
494
629
|
* 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
|
|
495
630
|
* decimals, shortDecimals, or the 'precision' option itself.
|
|
496
|
-
* @param {sap.ui.core.Locale} [oLocale]
|
|
631
|
+
* @param {sap.ui.core.Locale} [oLocale]
|
|
632
|
+
* The locale to get the formatter for; if no locale is given, a locale for the currently configured language is
|
|
633
|
+
* used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag}
|
|
497
634
|
* @return {sap.ui.core.format.NumberFormat} integer instance of the NumberFormat
|
|
498
635
|
* @static
|
|
499
636
|
* @public
|
|
@@ -509,9 +646,6 @@ sap.ui.define([
|
|
|
509
646
|
/**
|
|
510
647
|
* Get a currency instance of the NumberFormat, which can be used for formatting.
|
|
511
648
|
*
|
|
512
|
-
* If no locale is given, the currently configured
|
|
513
|
-
* {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale formatLocale} will be used.
|
|
514
|
-
*
|
|
515
649
|
* <p>
|
|
516
650
|
* This instance has HALF_AWAY_FROM_ZERO set as default rounding mode.
|
|
517
651
|
* Please set the roundingMode property in oFormatOptions to change the
|
|
@@ -536,7 +670,9 @@ sap.ui.define([
|
|
|
536
670
|
*
|
|
537
671
|
* As an alternative to using a fixed <code>symbol</code> for your custom currencies, you can also provide an ISO-Code.
|
|
538
672
|
* The provided ISO-Code will be used to look up the currency symbol in the global configuration,
|
|
539
|
-
* either defined in the CLDR or custom defined on the Format Settings (see
|
|
673
|
+
* either defined in the CLDR or custom defined on the Format Settings (see
|
|
674
|
+
* {@link module:sap/base/i18n/Formatting.setCustomCurrencies Formatting.setCustomCurrencies},
|
|
675
|
+
* {@link module:sap/base/i18n/Formatting.addCustomCurrencies Formatting.addCustomCurrencies}).
|
|
540
676
|
*
|
|
541
677
|
* If no symbol is given at all, the custom currency key is used for formatting.
|
|
542
678
|
*
|
|
@@ -573,7 +709,8 @@ sap.ui.define([
|
|
|
573
709
|
* If custom currencies are defined on the instance, no other currencies can be formatted and parsed by this instance.
|
|
574
710
|
* Globally available custom currencies can be added via the global configuration.
|
|
575
711
|
* See the above examples.
|
|
576
|
-
* See also {@link sap.
|
|
712
|
+
* See also {@link module:sap/base/i18n/Formatting.setCustomCurrencies Formatting.setCustomCurrencies} and
|
|
713
|
+
* {@link module:sap/base/i18n/Formatting.addCustomCurrencies Formatting.addCustomCurrencies}.
|
|
577
714
|
* @param {int} [oFormatOptions.decimals] defines the number of decimal digits
|
|
578
715
|
* @param {string} [oFormatOptions.decimalSeparator] defines the character used as decimal separator.
|
|
579
716
|
* Note: <code>decimalSeparator</code> must always be different from <code>groupingSeparator</code>.
|
|
@@ -608,12 +745,14 @@ sap.ui.define([
|
|
|
608
745
|
* <code>maxFractionDigits</code> format option allows.
|
|
609
746
|
* If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
|
|
610
747
|
* @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
|
|
611
|
-
*
|
|
612
|
-
* defined by
|
|
748
|
+
* Specifies the rounding behavior for discarding the digits after the maximum fraction digits
|
|
749
|
+
* defined by <code>maxFractionDigits</code>.
|
|
613
750
|
* This can be assigned
|
|
614
751
|
* <ul>
|
|
615
752
|
* <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
|
|
616
|
-
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
753
|
+
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
754
|
+
* number of decimal digits that should be reserved. <b>Using a function is deprecated since 1.121.0</b>;
|
|
755
|
+
* string based numbers are not rounded via this custom function.</li>
|
|
617
756
|
* </ul>
|
|
618
757
|
* @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
|
|
619
758
|
* @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
|
|
@@ -637,11 +776,13 @@ sap.ui.define([
|
|
|
637
776
|
* 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
|
|
638
777
|
* decimals, shortDecimals, or the 'precision' option itself.
|
|
639
778
|
* @param {boolean} [oFormatOptions.trailingCurrencyCode] overrides the global configuration
|
|
640
|
-
* value {@link sap.
|
|
641
|
-
* default value of <code>true</>.
|
|
779
|
+
* value {@link module:sap/base/i18n/Formatting.getTrailingCurrencyCode Formatting.getTrailingCurrencyCode},
|
|
780
|
+
* which has a default value of <code>true</>.
|
|
642
781
|
* This is ignored if <code>oFormatOptions.currencyCode</code> is set to <code>false</code>,
|
|
643
782
|
* or if <code>oFormatOptions.pattern</code> is supplied.
|
|
644
|
-
* @param {sap.ui.core.Locale} [oLocale]
|
|
783
|
+
* @param {sap.ui.core.Locale} [oLocale]
|
|
784
|
+
* The locale to get the formatter for; if no locale is given, a locale for the currently configured language is
|
|
785
|
+
* used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag}
|
|
645
786
|
* @return {sap.ui.core.format.NumberFormat} currency instance of the NumberFormat
|
|
646
787
|
* @static
|
|
647
788
|
* @public
|
|
@@ -681,9 +822,6 @@ sap.ui.define([
|
|
|
681
822
|
/**
|
|
682
823
|
* Get a unit instance of the NumberFormat, which can be used for formatting units.
|
|
683
824
|
*
|
|
684
|
-
* If no locale is given, the currently configured
|
|
685
|
-
* {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale formatLocale} will be used.
|
|
686
|
-
*
|
|
687
825
|
* <p>
|
|
688
826
|
* This instance has HALF_AWAY_FROM_ZERO set as default rounding mode.
|
|
689
827
|
* Please set the roundingMode property in oFormatOptions to change the
|
|
@@ -738,12 +876,14 @@ sap.ui.define([
|
|
|
738
876
|
* <code>maxFractionDigits</code> format option allows.
|
|
739
877
|
* If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
|
|
740
878
|
* @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
|
|
741
|
-
*
|
|
742
|
-
* defined by
|
|
879
|
+
* Specifies the rounding behavior for discarding the digits after the maximum fraction digits
|
|
880
|
+
* defined by <code>maxFractionDigits</code>.
|
|
743
881
|
* This can be assigned
|
|
744
882
|
* <ul>
|
|
745
883
|
* <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
|
|
746
|
-
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
884
|
+
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
885
|
+
* number of decimal digits that should be reserved. <b>Using a function is deprecated since 1.121.0</b>;
|
|
886
|
+
* string based numbers are not rounded via this custom function.</li>
|
|
747
887
|
* </ul>
|
|
748
888
|
* @param {int} [oFormatOptions.shortDecimals] defines the number of decimals in the shortened
|
|
749
889
|
* format string. If this option isn't specified, the 'decimals' option is used instead.
|
|
@@ -772,7 +912,9 @@ sap.ui.define([
|
|
|
772
912
|
* numbers are formatted into compact forms. When this option is set, the default value of the
|
|
773
913
|
* 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
|
|
774
914
|
* decimals, shortDecimals, or the 'precision' option itself.
|
|
775
|
-
* @param {sap.ui.core.Locale} [oLocale]
|
|
915
|
+
* @param {sap.ui.core.Locale} [oLocale]
|
|
916
|
+
* The locale to get the formatter for; if no locale is given, a locale for the currently configured language is
|
|
917
|
+
* used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag}
|
|
776
918
|
* @return {sap.ui.core.format.NumberFormat} unit instance of the NumberFormat
|
|
777
919
|
* @static
|
|
778
920
|
* @public
|
|
@@ -788,9 +930,6 @@ sap.ui.define([
|
|
|
788
930
|
/**
|
|
789
931
|
* Get a percent instance of the NumberFormat, which can be used for formatting.
|
|
790
932
|
*
|
|
791
|
-
* If no locale is given, the currently configured
|
|
792
|
-
* {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale formatLocale} will be used.
|
|
793
|
-
*
|
|
794
933
|
* <p>
|
|
795
934
|
* This instance has HALF_AWAY_FROM_ZERO set as default rounding mode.
|
|
796
935
|
* Please set the roundingMode property in oFormatOptions to change the
|
|
@@ -836,12 +975,14 @@ sap.ui.define([
|
|
|
836
975
|
* <code>maxFractionDigits</code> format option allows.
|
|
837
976
|
* If decimals are not preserved, the formatted number is rounded to <code>maxFractionDigits</code>.
|
|
838
977
|
* @param {sap.ui.core.format.NumberFormat.RoundingMode} [oFormatOptions.roundingMode=HALF_AWAY_FROM_ZERO]
|
|
839
|
-
*
|
|
840
|
-
* defined by
|
|
978
|
+
* Specifies the rounding behavior for discarding the digits after the maximum fraction digits
|
|
979
|
+
* defined by <code>maxFractionDigits</code>.
|
|
841
980
|
* This can be assigned
|
|
842
981
|
* <ul>
|
|
843
982
|
* <li>by value in {@link sap.ui.core.format.NumberFormat.RoundingMode RoundingMode},</li>
|
|
844
|
-
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
983
|
+
* <li>via a function that is used for rounding the number and takes two parameters: the number itself, and the
|
|
984
|
+
* number of decimal digits that should be reserved. <b>Using a function is deprecated since 1.121.0</b>;
|
|
985
|
+
* string based numbers are not rounded via this custom function.</li>
|
|
845
986
|
* </ul>
|
|
846
987
|
* @param {int} [oFormatOptions.shortDecimals] defines the number of decimal in the shortened format string. If this isn't specified, the 'decimals' options is used
|
|
847
988
|
* @param {int} [oFormatOptions.shortLimit] only use short number formatting for values above this limit
|
|
@@ -855,7 +996,9 @@ sap.ui.define([
|
|
|
855
996
|
* numbers are formatted into compact forms. When this option is set, the default value of the
|
|
856
997
|
* 'precision' option is set to 2. This can be changed by setting either min/maxFractionDigits,
|
|
857
998
|
* decimals, shortDecimals, or the 'precision' option itself.
|
|
858
|
-
* @param {sap.ui.core.Locale} [oLocale]
|
|
999
|
+
* @param {sap.ui.core.Locale} [oLocale]
|
|
1000
|
+
* The locale to get the formatter for; if no locale is given, a locale for the currently configured language is
|
|
1001
|
+
* used; see {@link module:sap/base/i18n/Formatting.getLanguageTag Formatting.getLanguageTag}
|
|
859
1002
|
* @return {sap.ui.core.format.NumberFormat} percentage instance of the NumberFormat
|
|
860
1003
|
* @static
|
|
861
1004
|
* @public
|
|
@@ -884,7 +1027,7 @@ sap.ui.define([
|
|
|
884
1027
|
oFormatOptions = undefined;
|
|
885
1028
|
}
|
|
886
1029
|
if (!oLocale) {
|
|
887
|
-
oLocale =
|
|
1030
|
+
oLocale = new Locale(Formatting.getLanguageTag());
|
|
888
1031
|
}
|
|
889
1032
|
oFormat.oLocale = oLocale;
|
|
890
1033
|
oFormat.oLocaleData = LocaleData.getInstance(oLocale);
|
|
@@ -1421,7 +1564,8 @@ sap.ui.define([
|
|
|
1421
1564
|
// If the number of fraction digits are equal or less than oOptions.maxFractionDigits, the
|
|
1422
1565
|
// number isn't changed. After this operation, the number of fraction digits is
|
|
1423
1566
|
// equal or less than oOptions.maxFractionDigits.
|
|
1424
|
-
if (typeof vValue === "number" &&
|
|
1567
|
+
if ((typeof vValue === "number" || typeof vValue === "string" && typeof oOptions.roundingMode !== "function")
|
|
1568
|
+
&& !oOptions.preserveDecimals) {
|
|
1425
1569
|
vValue = rounding(vValue, oOptions.maxFractionDigits, oOptions.roundingMode);
|
|
1426
1570
|
}
|
|
1427
1571
|
|
|
@@ -1761,6 +1905,12 @@ sap.ui.define([
|
|
|
1761
1905
|
vResult = 0,
|
|
1762
1906
|
oShort, vEmptyParseValue;
|
|
1763
1907
|
|
|
1908
|
+
if (typeof sValue !== "string" && !(sValue instanceof String)) {
|
|
1909
|
+
return null;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
sValue = FormatUtils.normalize(sValue).trim();
|
|
1913
|
+
|
|
1764
1914
|
if (sValue === "") {
|
|
1765
1915
|
if (!oOptions.showNumber) {
|
|
1766
1916
|
return null;
|
|
@@ -1778,10 +1928,6 @@ sap.ui.define([
|
|
|
1778
1928
|
}
|
|
1779
1929
|
}
|
|
1780
1930
|
|
|
1781
|
-
if (typeof sValue !== "string" && !(sValue instanceof String)) {
|
|
1782
|
-
return null;
|
|
1783
|
-
}
|
|
1784
|
-
|
|
1785
1931
|
if (oOptions.groupingSeparator === oOptions.decimalSeparator) {
|
|
1786
1932
|
Log.error("The grouping and decimal separator both have the same value '" + oOptions.groupingSeparator + "'. " +
|
|
1787
1933
|
"They must be different from each other such that values can be parsed correctly.");
|
|
@@ -1901,9 +2047,6 @@ sap.ui.define([
|
|
|
1901
2047
|
}
|
|
1902
2048
|
}
|
|
1903
2049
|
|
|
1904
|
-
// remove the RTL special characters before the string is matched with the regex
|
|
1905
|
-
sValue = sValue.replace(/[\u202a\u200e\u202c\u202b\u200f]/g, "");
|
|
1906
|
-
|
|
1907
2050
|
// remove all white spaces because when grouping separator is a non-breaking space (russian and french for example)
|
|
1908
2051
|
// user will not input it this way. Also white spaces or grouping separator can be ignored by determining the value
|
|
1909
2052
|
sValue = sValue.replace(rAllWhiteSpaces, "");
|
|
@@ -2042,10 +2185,22 @@ sap.ui.define([
|
|
|
2042
2185
|
}
|
|
2043
2186
|
};
|
|
2044
2187
|
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2188
|
+
/**
|
|
2189
|
+
* Moves the decimal seperator of the given number by the given steps to the right or left.
|
|
2190
|
+
*
|
|
2191
|
+
* @param {number|string} vValue
|
|
2192
|
+
* The number
|
|
2193
|
+
* @param {int} iStep
|
|
2194
|
+
* The number of decimal places to shift the "."; positive values shift to the right, negative values shift to the
|
|
2195
|
+
* left
|
|
2196
|
+
* @param {boolean} bNormalize
|
|
2197
|
+
* Whether the result is normalized if <code>vValue</code> is of type "string"; that means whether trailing zeros
|
|
2198
|
+
* are removed and whether scientific notation is resolved to a decimal string without exponent
|
|
2199
|
+
* @returns {number|string|null}
|
|
2200
|
+
* The number with shifted decimal point; or <code>null</code> if the given value is neither of type "number", nor
|
|
2201
|
+
* of type "string"
|
|
2202
|
+
*/
|
|
2203
|
+
NumberFormat._shiftDecimalPoint = function(vValue, iStep, bNormalize) {
|
|
2049
2204
|
var sMinus = "";
|
|
2050
2205
|
var aExpParts = vValue.toString().toLowerCase().split("e");
|
|
2051
2206
|
|
|
@@ -2058,7 +2213,7 @@ sap.ui.define([
|
|
|
2058
2213
|
|
|
2059
2214
|
return +(aExpParts[0] + "e" + iStep);
|
|
2060
2215
|
} else if (typeof vValue === "string") {
|
|
2061
|
-
if (parseFloat(vValue) === 0 && iStep >= 0) {
|
|
2216
|
+
if (!bNormalize && parseFloat(vValue) === 0 && iStep >= 0) {
|
|
2062
2217
|
// input "00000" should become "0"
|
|
2063
2218
|
// input "000.000" should become "0.000" to keep precision of decimals
|
|
2064
2219
|
// input "1e-1337" should remain "1e-1337" in order to keep the precision
|
|
@@ -2070,7 +2225,7 @@ sap.ui.define([
|
|
|
2070
2225
|
var sFirstChar = aExpParts[0].charAt(0);
|
|
2071
2226
|
sMinus = sFirstChar === "-" ? sFirstChar : "";
|
|
2072
2227
|
|
|
2073
|
-
if (sMinus) {
|
|
2228
|
+
if (sMinus || sFirstChar === "+") {
|
|
2074
2229
|
aExpParts[0] = aExpParts[0].slice(1);
|
|
2075
2230
|
}
|
|
2076
2231
|
|
|
@@ -2109,9 +2264,11 @@ sap.ui.define([
|
|
|
2109
2264
|
|
|
2110
2265
|
sInt = vValue.substring(0, iAfterMovePos);
|
|
2111
2266
|
sDecimal = vValue.substring(iAfterMovePos);
|
|
2112
|
-
|
|
2113
2267
|
// remove unnecessary leading zeros
|
|
2114
2268
|
sInt = sInt.replace(rLeadingZeros, "$1$2");
|
|
2269
|
+
if (bNormalize) {
|
|
2270
|
+
sDecimal = sDecimal.replace(rTrailingZeros, "");
|
|
2271
|
+
}
|
|
2115
2272
|
|
|
2116
2273
|
return sMinus + sInt + (sDecimal ? ("." + sDecimal) : "");
|
|
2117
2274
|
} else {
|
|
@@ -2203,9 +2360,8 @@ sap.ui.define([
|
|
|
2203
2360
|
}
|
|
2204
2361
|
|
|
2205
2362
|
if (sCldrFormat) {
|
|
2206
|
-
// Note: CLDR uses a non-breaking space in the format string
|
|
2207
|
-
|
|
2208
|
-
sCldrFormat = sCldrFormat.replace(/[\s\u00a0\u200F]/g, "");
|
|
2363
|
+
// Note: CLDR uses a non-breaking space and right-to-left mark u+200f in the format string
|
|
2364
|
+
sCldrFormat = FormatUtils.normalize(sCldrFormat, true);
|
|
2209
2365
|
//formatString may contain '.' (quoted to differentiate them decimal separator)
|
|
2210
2366
|
//which must be replaced with .
|
|
2211
2367
|
sCldrFormat = sCldrFormat.replace(/'.'/g, ".");
|
|
@@ -2222,8 +2378,6 @@ sap.ui.define([
|
|
|
2222
2378
|
if (iIndex >= 0) {
|
|
2223
2379
|
// parse the number part like every other number and then use the factor to get the real number
|
|
2224
2380
|
sNumber = sValue.replace(sUnit, "");
|
|
2225
|
-
// remove right-to-left mark u+200f character
|
|
2226
|
-
sNumber = sNumber.replace(/\u200F/g, "");
|
|
2227
2381
|
iFactor = iKey;
|
|
2228
2382
|
// spanish numbers e.g. for MRD in format for "one" is "00 MRD" therefore factor needs to be adjusted
|
|
2229
2383
|
// german numbers e.g. for Mrd. in format for "one" is "0 Mrd." therefore number does not need to be adjusted
|
|
@@ -2282,7 +2436,7 @@ sap.ui.define([
|
|
|
2282
2436
|
* @returns {boolean}
|
|
2283
2437
|
*/
|
|
2284
2438
|
function showTrailingCurrencyCode(oFormatOptions) {
|
|
2285
|
-
var bShowTrailingCurrencyCodes =
|
|
2439
|
+
var bShowTrailingCurrencyCodes = Formatting.getTrailingCurrencyCode();
|
|
2286
2440
|
if (oFormatOptions) {
|
|
2287
2441
|
|
|
2288
2442
|
// overwritten by instance configuration
|
|
@@ -2581,54 +2735,63 @@ sap.ui.define([
|
|
|
2581
2735
|
return iInt;
|
|
2582
2736
|
}
|
|
2583
2737
|
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2738
|
+
/**
|
|
2739
|
+
* Rounds the given value by the given number of fraction digits based on the given rounding mode.
|
|
2740
|
+
*
|
|
2741
|
+
* @param {number|string} vValue
|
|
2742
|
+
* The number to be rounded, may be a string or a number; has to be of type number if a custom rounding function
|
|
2743
|
+
* is used
|
|
2744
|
+
* @param {int|string} iMaxFractionDigits
|
|
2745
|
+
* The maximum number of fraction digits
|
|
2746
|
+
* @param {sap.ui.core.format.NumberFormat.RoundingMode|function(number,int):number} vRoundingMode
|
|
2747
|
+
* The rounding mode or a custom function for rounding which is called with the number and the number of decimal
|
|
2748
|
+
* digits that should be reserved; <b>using a function is deprecated since 1.121.0</b>; string based numbers are
|
|
2749
|
+
* not rounded via this custom function.
|
|
2750
|
+
* @returns {number|string}
|
|
2751
|
+
* The rounded value; the returned type is the same as the type of the given <code>vValue</code>
|
|
2752
|
+
*/
|
|
2753
|
+
function rounding(vValue, iMaxFractionDigits, vRoundingMode) {
|
|
2754
|
+
vRoundingMode = vRoundingMode || NumberFormat.RoundingMode.HALF_AWAY_FROM_ZERO;
|
|
2590
2755
|
iMaxFractionDigits = parseInt(iMaxFractionDigits);
|
|
2591
2756
|
|
|
2592
2757
|
// only round if it is required (number of fraction digits is bigger than the maxFractionDigits option)
|
|
2593
|
-
var sValue = "" +
|
|
2758
|
+
var sValue = "" + vValue;
|
|
2594
2759
|
if (!isScientificNotation(sValue)) {
|
|
2595
2760
|
var iIndexOfPoint = sValue.indexOf(".");
|
|
2596
2761
|
if (iIndexOfPoint < 0) {
|
|
2597
|
-
return
|
|
2762
|
+
return vValue;
|
|
2598
2763
|
}
|
|
2599
2764
|
if (sValue.substring(iIndexOfPoint + 1).length <= iMaxFractionDigits) {
|
|
2600
|
-
|
|
2765
|
+
if (typeof vValue === "string") {
|
|
2766
|
+
vValue = NumberFormat._shiftDecimalPoint(vValue, 0, true);
|
|
2767
|
+
}
|
|
2768
|
+
return vValue;
|
|
2601
2769
|
}
|
|
2602
2770
|
}
|
|
2603
2771
|
|
|
2604
|
-
if (typeof
|
|
2772
|
+
if (typeof vRoundingMode === "function") {
|
|
2605
2773
|
// Support custom function for rounding the number
|
|
2606
|
-
|
|
2774
|
+
vValue = vRoundingMode(vValue, iMaxFractionDigits);
|
|
2607
2775
|
} else {
|
|
2608
2776
|
// The NumberFormat.RoundingMode had all values in lower case before and later changed all values to upper case
|
|
2609
2777
|
// to match the key according to the UI5 guideline for defining enum. Therefore it's needed to support both
|
|
2610
2778
|
// lower and upper cases. Here checks whether the value has only lower case letters and converts it all to upper
|
|
2611
2779
|
// case if so.
|
|
2612
|
-
if (
|
|
2613
|
-
|
|
2780
|
+
if (vRoundingMode.match(/^[a-z_]+$/)) {
|
|
2781
|
+
vRoundingMode = vRoundingMode.toUpperCase();
|
|
2614
2782
|
}
|
|
2615
2783
|
|
|
2616
|
-
|
|
2617
|
-
|
|
2784
|
+
// 1. Move the decimal point to right by maxFactionDigits; e.g. 1.005 with maxFractionDigits 2 => 100.5
|
|
2785
|
+
vValue = NumberFormat._shiftDecimalPoint(vValue, iMaxFractionDigits, true);
|
|
2786
|
+
// 2. Use the rounding function to round the first digit after decimal point; e.g. ceil(100.5) => 101
|
|
2787
|
+
vValue = mRoundingFunction[vRoundingMode](vValue);
|
|
2788
|
+
// 3. Finally move the decimal point back to the original position; e.g. by 2 digits => 1.01
|
|
2789
|
+
vValue = NumberFormat._shiftDecimalPoint(vValue, -iMaxFractionDigits, true);
|
|
2790
|
+
if (typeof vValue === "string") {
|
|
2791
|
+
vValue = vValue.replace(rRemoveMinusFromZero, "$1");
|
|
2618
2792
|
}
|
|
2619
|
-
|
|
2620
|
-
// First move the decimal point towards right by maxFactionDigits
|
|
2621
|
-
// Then using the rounding function to round the first digit after decimal point
|
|
2622
|
-
// In the end, move the decimal point back to the original position
|
|
2623
|
-
//
|
|
2624
|
-
// For example rounding 1.005 by maxFractionDigits 2
|
|
2625
|
-
// 1. Move the decimal point to right by 2 digits, result 100.5
|
|
2626
|
-
// 2. Using the round function, for example, Math.round(100.5) = 101
|
|
2627
|
-
// 3. Move the decimal point back by 2 digits, result 1.01
|
|
2628
|
-
fValue = NumberFormat._shiftDecimalPoint(mRoundingFunction[sRoundingMode](NumberFormat._shiftDecimalPoint(fValue, iMaxFractionDigits)), -iMaxFractionDigits);
|
|
2629
2793
|
}
|
|
2630
|
-
|
|
2631
|
-
return fValue;
|
|
2794
|
+
return vValue;
|
|
2632
2795
|
}
|
|
2633
2796
|
|
|
2634
2797
|
function quote(sRegex) {
|
|
@@ -2680,7 +2843,7 @@ sap.ui.define([
|
|
|
2680
2843
|
if (!sKey.startsWith("unitPattern")) {
|
|
2681
2844
|
continue;
|
|
2682
2845
|
}
|
|
2683
|
-
sUnitPattern = mUnitPatterns[sUnitCode][sKey];
|
|
2846
|
+
sUnitPattern = FormatUtils.normalize(mUnitPatterns[sUnitCode][sKey]);
|
|
2684
2847
|
|
|
2685
2848
|
// IMPORTANT:
|
|
2686
2849
|
// To increase performance we are using native string operations instead of regex,
|
|
@@ -2809,7 +2972,7 @@ sap.ui.define([
|
|
|
2809
2972
|
if (!sCurSymbol) {
|
|
2810
2973
|
continue;
|
|
2811
2974
|
}
|
|
2812
|
-
sCurSymbol =
|
|
2975
|
+
sCurSymbol = FormatUtils.normalize(sCurSymbol);
|
|
2813
2976
|
if (sValue.indexOf(sCurSymbol) >= 0 && sSymbol.length <= sCurSymbol.length) {
|
|
2814
2977
|
sCode = sCurCode;
|
|
2815
2978
|
bDuplicate = false;
|
|
@@ -2817,7 +2980,7 @@ sap.ui.define([
|
|
|
2817
2980
|
sSymbol = sCurSymbol;
|
|
2818
2981
|
sRecognizedCurrency = sCurSymbol;
|
|
2819
2982
|
} else if (bCaseInsensitive) {
|
|
2820
|
-
sLanguageTag =
|
|
2983
|
+
sLanguageTag = Localization.getLanguageTag().toString();
|
|
2821
2984
|
sCurSymbolToUpperCase = sCurSymbol.toLocaleUpperCase(sLanguageTag);
|
|
2822
2985
|
iIndex = sValue.toLocaleUpperCase(sLanguageTag).indexOf(sCurSymbolToUpperCase);
|
|
2823
2986
|
if (iIndex >= 0) {
|
|
@@ -2869,7 +3032,7 @@ sap.ui.define([
|
|
|
2869
3032
|
*/
|
|
2870
3033
|
function parseNumberAndCurrency(oConfig) {
|
|
2871
3034
|
var aIsoMatches,
|
|
2872
|
-
sValue = oConfig.value
|
|
3035
|
+
sValue = oConfig.value;
|
|
2873
3036
|
|
|
2874
3037
|
// Search for known symbols (longest match)
|
|
2875
3038
|
// no distinction between default and custom currencies
|
|
@@ -2885,7 +3048,7 @@ sap.ui.define([
|
|
|
2885
3048
|
// Match 3-letter iso code
|
|
2886
3049
|
aIsoMatches = sValue.match(/(^[A-Z]{3}|[A-Z]{3}$)/i);
|
|
2887
3050
|
oMatch.code = aIsoMatches
|
|
2888
|
-
&& aIsoMatches[0].toLocaleUpperCase(
|
|
3051
|
+
&& aIsoMatches[0].toLocaleUpperCase(Localization.getLanguageTag().toString());
|
|
2889
3052
|
oMatch.recognizedCurrency = aIsoMatches && aIsoMatches[0];
|
|
2890
3053
|
}
|
|
2891
3054
|
}
|