@openui5/sap.ui.core 1.119.0 → 1.120.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/THIRDPARTY.txt +6 -6
- package/package.json +1 -1
- package/src/jquery.sap.global.js +40 -111
- package/src/jquery.sap.properties.js +7 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +5 -3
- package/src/jquery.sap.storage.js +6 -3
- package/src/sap/base/Event.js +32 -78
- package/src/sap/base/Eventing.js +114 -271
- package/src/sap/base/Log.js +21 -1
- package/src/sap/base/config.js +14 -9
- package/src/sap/base/i18n/Formatting.js +378 -250
- package/src/sap/base/i18n/LanguageTag.js +64 -66
- package/src/sap/base/i18n/Localization.js +124 -85
- package/src/sap/base/i18n/ResourceBundle.js +1 -1
- package/src/sap/base/i18n/date/CalendarType.js +2 -2
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +2 -2
- package/src/sap/base/i18n/date/TimezoneUtils.js +43 -6
- package/src/sap/base/util/LoaderExtensions.js +8 -2
- package/src/sap/base/util/mixedFetch.js +1 -0
- package/src/sap/base/util/resolveReference.js +31 -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/base/util/syncFetch.js +1 -0
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +6 -7
- package/src/sap/ui/base/BindingInfo.js +3 -3
- package/src/sap/ui/base/BindingParser.js +5 -2
- package/src/sap/ui/base/DataType.js +57 -1
- package/src/sap/ui/base/DesignTime.js +69 -0
- package/src/sap/ui/base/Event.js +2 -2
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +25 -4
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +102 -29
- package/src/sap/ui/base/ManagedObjectMetadata.js +29 -31
- package/src/sap/ui/base/ManagedObjectObserver.js +1 -0
- package/src/sap/ui/base/Metadata.js +3 -3
- package/src/sap/ui/base/Object.js +19 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +3 -3
- package/src/sap/ui/core/AnimationMode.js +2 -2
- package/src/sap/ui/core/AppCacheBuster.js +30 -18
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/CalendarType.js +6 -0
- package/src/sap/ui/core/Component.js +150 -80
- package/src/sap/ui/core/ComponentContainer.js +4 -3
- package/src/sap/ui/core/ComponentMetadata.js +3 -4
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +390 -706
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/ControlBehavior.js +37 -28
- package/src/sap/ui/core/Core.js +327 -151
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +3 -1
- package/src/sap/ui/core/Element.js +18 -8
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +3 -2
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -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 +13 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +2 -3
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +17 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +8 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +195 -29
- 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 +1 -1
- package/src/sap/ui/core/LocaleData.js +118 -32
- package/src/sap/ui/core/Manifest.js +4 -2
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Placeholder.js +18 -0
- package/src/sap/ui/core/Popup.js +5 -0
- package/src/sap/ui/core/RenderManager.js +21 -17
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/Rendering.js +51 -47
- package/src/sap/ui/core/ResizeHandler.js +2 -2
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Shortcut.js +5 -3
- package/src/sap/ui/core/Supportability.js +146 -0
- package/src/sap/ui/core/Theming.js +130 -88
- 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 +1 -4
- package/src/sap/ui/core/UIComponent.js +38 -12
- 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 +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +3 -3
- package/src/sap/ui/core/_IconRegistry.js +13 -6
- package/src/sap/ui/core/cldr/ar.json +143 -137
- package/src/sap/ui/core/cldr/ar_EG.json +143 -137
- package/src/sap/ui/core/cldr/ar_SA.json +143 -137
- package/src/sap/ui/core/cldr/bg.json +423 -423
- package/src/sap/ui/core/cldr/ca.json +541 -494
- package/src/sap/ui/core/cldr/cs.json +475 -364
- package/src/sap/ui/core/cldr/cy.json +656 -477
- package/src/sap/ui/core/cldr/da.json +334 -275
- package/src/sap/ui/core/cldr/de.json +388 -291
- package/src/sap/ui/core/cldr/de_AT.json +388 -291
- package/src/sap/ui/core/cldr/de_CH.json +394 -297
- package/src/sap/ui/core/cldr/el.json +169 -166
- package/src/sap/ui/core/cldr/el_CY.json +169 -166
- package/src/sap/ui/core/cldr/en.json +558 -521
- package/src/sap/ui/core/cldr/en_AU.json +558 -520
- package/src/sap/ui/core/cldr/en_GB.json +476 -439
- package/src/sap/ui/core/cldr/en_HK.json +520 -482
- package/src/sap/ui/core/cldr/en_IE.json +486 -448
- package/src/sap/ui/core/cldr/en_IN.json +466 -428
- package/src/sap/ui/core/cldr/en_NZ.json +506 -468
- package/src/sap/ui/core/cldr/en_PG.json +506 -468
- package/src/sap/ui/core/cldr/en_SG.json +506 -468
- package/src/sap/ui/core/cldr/en_ZA.json +486 -448
- package/src/sap/ui/core/cldr/es.json +473 -468
- package/src/sap/ui/core/cldr/es_AR.json +445 -440
- package/src/sap/ui/core/cldr/es_BO.json +479 -474
- package/src/sap/ui/core/cldr/es_CL.json +469 -464
- package/src/sap/ui/core/cldr/es_CO.json +387 -381
- package/src/sap/ui/core/cldr/es_MX.json +502 -497
- package/src/sap/ui/core/cldr/es_PE.json +455 -450
- package/src/sap/ui/core/cldr/es_UY.json +479 -474
- package/src/sap/ui/core/cldr/es_VE.json +499 -494
- package/src/sap/ui/core/cldr/et.json +378 -320
- package/src/sap/ui/core/cldr/fa.json +104 -104
- package/src/sap/ui/core/cldr/fi.json +401 -315
- package/src/sap/ui/core/cldr/fr.json +391 -385
- package/src/sap/ui/core/cldr/fr_BE.json +391 -385
- package/src/sap/ui/core/cldr/fr_CA.json +499 -493
- package/src/sap/ui/core/cldr/fr_CH.json +334 -328
- package/src/sap/ui/core/cldr/fr_LU.json +391 -385
- package/src/sap/ui/core/cldr/he.json +291 -159
- package/src/sap/ui/core/cldr/hi.json +157 -128
- package/src/sap/ui/core/cldr/hr.json +514 -461
- package/src/sap/ui/core/cldr/hu.json +287 -257
- package/src/sap/ui/core/cldr/id.json +463 -416
- package/src/sap/ui/core/cldr/it.json +468 -413
- package/src/sap/ui/core/cldr/it_CH.json +468 -413
- package/src/sap/ui/core/cldr/ja.json +98 -61
- package/src/sap/ui/core/cldr/kk.json +631 -571
- package/src/sap/ui/core/cldr/ko.json +79 -71
- package/src/sap/ui/core/cldr/lt.json +361 -270
- package/src/sap/ui/core/cldr/lv.json +234 -242
- package/src/sap/ui/core/cldr/ms.json +463 -408
- package/src/sap/ui/core/cldr/nb.json +176 -143
- package/src/sap/ui/core/cldr/nl.json +463 -393
- package/src/sap/ui/core/cldr/nl_BE.json +463 -393
- package/src/sap/ui/core/cldr/pl.json +633 -344
- package/src/sap/ui/core/cldr/pt.json +447 -336
- package/src/sap/ui/core/cldr/pt_PT.json +488 -449
- package/src/sap/ui/core/cldr/ro.json +477 -383
- package/src/sap/ui/core/cldr/ru.json +367 -332
- package/src/sap/ui/core/cldr/ru_UA.json +361 -326
- package/src/sap/ui/core/cldr/sk.json +502 -537
- package/src/sap/ui/core/cldr/sl.json +168 -161
- package/src/sap/ui/core/cldr/sr.json +276 -225
- package/src/sap/ui/core/cldr/sr_Latn.json +972 -907
- package/src/sap/ui/core/cldr/sv.json +420 -346
- package/src/sap/ui/core/cldr/th.json +117 -94
- package/src/sap/ui/core/cldr/tr.json +413 -359
- package/src/sap/ui/core/cldr/uk.json +395 -368
- package/src/sap/ui/core/cldr/vi.json +392 -379
- package/src/sap/ui/core/cldr/zh_CN.json +91 -33
- package/src/sap/ui/core/cldr/zh_HK.json +90 -32
- package/src/sap/ui/core/cldr/zh_SG.json +90 -32
- package/src/sap/ui/core/cldr/zh_TW.json +75 -51
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +6 -0
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/date/_Calendars.js +5 -2
- 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 +3 -2
- 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 +33 -21
- package/src/sap/ui/core/format/NumberFormat.js +3 -2
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.js +2 -2
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +128 -8
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +2 -2
- package/src/sap/ui/core/message/MessageManager.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/message/MessageType.js +2 -1
- package/src/sap/ui/core/messagebundle.properties +24 -0
- package/src/sap/ui/core/messagebundle_ar.properties +15 -3
- package/src/sap/ui/core/messagebundle_bg.properties +14 -2
- package/src/sap/ui/core/messagebundle_ca.properties +13 -1
- package/src/sap/ui/core/messagebundle_cs.properties +15 -3
- package/src/sap/ui/core/messagebundle_cy.properties +16 -4
- package/src/sap/ui/core/messagebundle_da.properties +15 -3
- package/src/sap/ui/core/messagebundle_de.properties +15 -3
- package/src/sap/ui/core/messagebundle_el.properties +16 -4
- package/src/sap/ui/core/messagebundle_en.properties +12 -0
- package/src/sap/ui/core/messagebundle_en_GB.properties +16 -4
- package/src/sap/ui/core/messagebundle_es.properties +15 -3
- package/src/sap/ui/core/messagebundle_es_MX.properties +15 -3
- package/src/sap/ui/core/messagebundle_et.properties +15 -3
- package/src/sap/ui/core/messagebundle_fi.properties +15 -3
- package/src/sap/ui/core/messagebundle_fr.properties +15 -3
- package/src/sap/ui/core/messagebundle_fr_CA.properties +14 -2
- package/src/sap/ui/core/messagebundle_hi.properties +16 -4
- package/src/sap/ui/core/messagebundle_hr.properties +14 -2
- package/src/sap/ui/core/messagebundle_hu.properties +16 -4
- package/src/sap/ui/core/messagebundle_id.properties +15 -3
- package/src/sap/ui/core/messagebundle_it.properties +17 -5
- package/src/sap/ui/core/messagebundle_iw.properties +15 -3
- package/src/sap/ui/core/messagebundle_ja.properties +25 -13
- package/src/sap/ui/core/messagebundle_kk.properties +15 -3
- package/src/sap/ui/core/messagebundle_ko.properties +14 -2
- package/src/sap/ui/core/messagebundle_lt.properties +15 -3
- package/src/sap/ui/core/messagebundle_lv.properties +15 -3
- package/src/sap/ui/core/messagebundle_mk.properties +352 -0
- package/src/sap/ui/core/messagebundle_ms.properties +15 -3
- package/src/sap/ui/core/messagebundle_nl.properties +15 -3
- package/src/sap/ui/core/messagebundle_no.properties +14 -2
- package/src/sap/ui/core/messagebundle_pl.properties +15 -3
- package/src/sap/ui/core/messagebundle_pt.properties +15 -3
- package/src/sap/ui/core/messagebundle_pt_PT.properties +14 -2
- package/src/sap/ui/core/messagebundle_ro.properties +15 -3
- package/src/sap/ui/core/messagebundle_ru.properties +15 -3
- package/src/sap/ui/core/messagebundle_sh.properties +43 -31
- package/src/sap/ui/core/messagebundle_sk.properties +16 -4
- package/src/sap/ui/core/messagebundle_sl.properties +15 -3
- package/src/sap/ui/core/messagebundle_sv.properties +22 -10
- package/src/sap/ui/core/messagebundle_th.properties +15 -3
- package/src/sap/ui/core/messagebundle_tr.properties +15 -3
- package/src/sap/ui/core/messagebundle_uk.properties +18 -6
- package/src/sap/ui/core/messagebundle_vi.properties +18 -6
- package/src/sap/ui/core/messagebundle_zh_CN.properties +15 -3
- package/src/sap/ui/core/messagebundle_zh_TW.properties +15 -3
- package/src/sap/ui/core/mvc/Controller.js +22 -16
- package/src/sap/ui/core/mvc/EventHandlerResolver.js +5 -15
- package/src/sap/ui/core/mvc/HTMLView.js +2 -2
- package/src/sap/ui/core/mvc/JSONView.js +4 -1
- package/src/sap/ui/core/mvc/JSONViewRenderer.js +1 -0
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/OverrideExecution.js +4 -4
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +24 -14
- package/src/sap/ui/core/mvc/ViewType.js +2 -0
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +2 -1
- package/src/sap/ui/core/plugin/LessSupport.js +3 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Router.js +2 -4
- package/src/sap/ui/core/routing/Target.js +1 -3
- package/src/sap/ui/core/routing/Targets.js +2 -3
- package/src/sap/ui/core/routing/Views.js +2 -3
- package/src/sap/ui/core/routing/async/Target.js +1 -1
- package/src/sap/ui/core/rules/Config.support.js +11 -17
- 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/Hotkeys.js +5 -3
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +1 -3
- package/src/sap/ui/core/support/Support.js +3 -5
- package/src/sap/ui/core/support/ToolsAPI.js +15 -11
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +4 -4
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +7 -5
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +3 -1
- package/src/sap/ui/core/syncStyleClass.js +2 -2
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.ttf +0 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/global.less +9 -9
- package/src/sap/ui/core/theming/Parameters.js +18 -19
- package/src/sap/ui/core/theming/ThemeManager.js +23 -4
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +3 -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 +4 -4
- 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 +1 -1
- package/src/sap/ui/debug/DebugEnv.js +29 -7
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +3 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +3 -1
- 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 +2 -2
- package/src/sap/ui/model/Filter.js +39 -1
- package/src/sap/ui/model/FilterProcessor.js +12 -2
- package/src/sap/ui/model/ListBinding.js +5 -0
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +4 -4
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +5 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBinding.js +3 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +3 -1
- package/src/sap/ui/model/json/JSONListBinding.js +3 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/json/JSONTreeBinding.js +3 -2
- package/src/sap/ui/model/message/MessageListBinding.js +3 -0
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/AnnotationHelper.js +9 -3
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +3 -0
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +9 -5
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -2
- package/src/sap/ui/model/odata/ODataTreeBinding.js +2 -0
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +9 -14
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- 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 +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +35 -13
- package/src/sap/ui/model/odata/v2/ODataModel.js +21 -8
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +33 -2
- package/src/sap/ui/model/odata/v4/Context.js +81 -7
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +217 -75
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +6 -6
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +406 -199
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +12 -7
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +53 -30
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +6 -4
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +6 -6
- package/src/sap/ui/model/resource/ResourceModel.js +5 -6
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- 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 +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- 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 +1 -1
- package/src/sap/ui/model/xml/XMLListBinding.js +3 -0
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/model/xml/XMLTreeBinding.js +3 -0
- package/src/sap/ui/performance/BeaconRequest.js +2 -2
- package/src/sap/ui/qunit/QUnitUtils.js +64 -45
- package/src/sap/ui/qunit/qunit-coverage.js +6 -0
- package/src/sap/ui/qunit/utils/ControlIterator.js +31 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/security/Security.js +128 -0
- package/src/sap/ui/test/BlanketReporter.js +2 -3
- package/src/sap/ui/test/BlanketReporterUI.view.xml +1 -1
- package/src/sap/ui/test/BranchTracking.js +2 -3
- package/src/sap/ui/test/ModuleTracking.js +48 -20
- package/src/sap/ui/test/OpaExtension.js +3 -3
- package/src/sap/ui/test/OpaPlugin.js +16 -6
- package/src/sap/ui/test/TestUtils.js +7 -4
- package/src/sap/ui/test/_BrowserLogCollector.js +1 -0
- package/src/sap/ui/test/_ControlFinder.js +3 -2
- package/src/sap/ui/test/_LogCollector.js +1 -0
- package/src/sap/ui/test/_UsageReport.js +115 -114
- package/src/sap/ui/test/actions/EnterText.js +20 -2
- package/src/sap/ui/test/autowaiter/WaiterBase.js +1 -0
- package/src/sap/ui/test/autowaiter/_moduleWaiter.js +1 -2
- package/src/sap/ui/test/autowaiter/_timeoutWaiter.js +1 -1
- package/src/sap/ui/test/generic/GenericTestCollection.js +5 -0
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/Utils.js +1 -1
- package/src/sap/ui/test/matchers/LabelFor.js +2 -12
- package/src/sap/ui/test/matchers/Matcher.js +1 -1
- package/src/sap/ui/test/pipelines/PipelineFactory.js +1 -0
- package/src/sap/ui/test/selectors/_Selector.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +84 -11
- package/test/sap/ui/core/demokit/sample/RoutingNestedComponent/localService/mockserver.js +3 -4
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/ChartAnnotation.fragment.xml +7 -7
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/Component.js +2 -3
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/Detail.view.xml +12 -13
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/Facets.fragment.xml +4 -4
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/Field.fragment.xml +8 -8
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/FormFacet.fragment.xml +3 -5
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/LabeledField.fragment.xml +3 -3
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/Table.fragment.xml +10 -10
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/TableFacet.fragment.xml +3 -3
- package/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/extension/HeaderInfo.fragment.xml +1 -1
- package/test/sap/ui/core/demokit/sample/ViewTemplate/tiny/Field.fragment.xml +2 -2
- package/test/sap/ui/core/demokit/sample/ViewTemplate/tiny/Template.view.xml +19 -21
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/TemplateV4.view.xml +2 -2
- package/test/sap/ui/core/demokit/sample/ViewTemplate/valuelist/Component.js +2 -3
- package/test/sap/ui/core/demokit/sample/common/SandboxModelHelper.js +2 -3
- package/test/sap/ui/core/demokit/sample/common/ValueHelp.js +2 -3
- package/test/sap/ui/core/demokit/sample/common/pages/Any.js +7 -8
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.controller.js +15 -6
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/DataAggregation.controller.js +2 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.controller.js +3 -4
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.controller.js +39 -16
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/Main.view.xml +18 -21
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/data/all.json +509 -395
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/data/metadata.xml +586 -422
- package/test/sap/ui/core/demokit/sample/odata/v4/HierarchyBindAction/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Main.controller.js +2 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/Facets.fragment.xml +22 -23
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/FormattedText.fragment.xml +2 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/Main.view.xml +7 -7
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Main.controller.js +0 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.controller.js +54 -9
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +34 -9
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/SandboxModel.js +156 -23
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.view.xml +3 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/Facets.fragment.xml +22 -23
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/FormattedText.fragment.xml +2 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/Main.view.xml +5 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.controller.js +2 -3
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +2 -2
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +2 -2
- package/test/sap/ui/core/internal/samples/odata/v2/SalesOrders/Component.js +2 -3
- package/test/sap/ui/core/internal/samples/odata/v2/SalesOrders/Main.view.xml +1 -1
- package/test/sap/ui/core/internal/samples/odata/v2/SalesOrders/SandboxModel.js +2 -3
- package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +18 -0
- package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +4 -3
- package/test/sap/ui/core/qunit/Core.qunit.js +5 -14
- package/test/sap/ui/core/qunit/Core_libraryPreloadFiles.qunit.js +4 -4
- package/test/sap/ui/core/qunit/Core_libraryPreloadFiles_unavoidablyUsingEval.qunit.js +6 -6
- package/test/sap/ui/core/qunit/Core_unavoidablyUsingEval.qunit.js +31 -30
- package/test/sap/ui/core/qunit/DataState.qunit.js +7 -4
- package/test/sap/ui/core/qunit/DuplicateIds.qunit.js +3 -0
- package/test/sap/ui/core/qunit/DuplicateIds_noError.qunit.js +4 -0
- package/test/sap/ui/core/qunit/Element_metadata_renderer.qunit.js +6 -0
- package/test/sap/ui/core/qunit/ExpressionParser.qunit.js +144 -85
- package/test/sap/ui/core/qunit/HTML.qunit.js +87 -84
- package/test/sap/ui/core/qunit/InvisibleText.qunit.js +22 -1
- package/test/sap/ui/core/qunit/LRUPersistentCache.qunit.js +4 -4
- package/test/sap/ui/core/qunit/Lib.qunit.js +22 -1
- package/test/sap/ui/core/qunit/ListBinding.qunit.js +14 -1
- package/test/sap/ui/core/qunit/ManagedObject.qunit.js +5 -2
- package/test/sap/ui/core/qunit/ManagedObjectMetadata.qunit.js +41 -40
- package/test/sap/ui/core/qunit/ManagedObjectModel.qunit.js +2 -1
- package/test/sap/ui/core/qunit/{ManagedObject_noBoot.qunit.js → ManagedObject_BindingParser.qunit.js} +10 -9
- package/test/sap/ui/core/qunit/Object.qunit.js +36 -0
- package/test/sap/ui/core/qunit/RenderManager.qunit.js +86 -94
- package/test/sap/ui/core/qunit/ShortcutHints.qunit.js +11 -97
- package/test/sap/ui/core/qunit/StaticBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/UIArea.qunit.js +34 -35
- package/test/sap/ui/core/qunit/analytics/AnalyticalTreeBindingAdapter.qunit.js +3 -0
- package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +3 -0
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +3 -0
- package/test/sap/ui/core/qunit/app/DesignMode_controllerDeactivated.qunit.js +5 -6
- package/test/sap/ui/core/qunit/app/DesignMode_suppressedDeactivation.qunit.js +5 -6
- package/test/sap/ui/core/qunit/app/MessageListBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/app/_createDesignModeTests_legacyAPIs.qunit.js +8 -10
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +2 -2
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +30 -30
- package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +123 -10
- package/test/sap/ui/core/qunit/base/util/resolveReference.qunit.js +9 -0
- package/test/sap/ui/core/qunit/base/util/testdata/MyModule.js +5 -0
- package/test/sap/ui/core/qunit/bootstrap/BootstrapCustomBootTaskPreloadCss.beforeBootstrap.qunit.js +4 -2
- package/test/sap/ui/core/qunit/bootstrap/BootstrapMinimal.qunit.html +1 -0
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +9 -10
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload_legacyAPIs.qunit.js +0 -2
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithinBody.qunit.html +2 -1
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithinHead.qunit.html +2 -1
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +122 -266
- package/test/sap/ui/core/qunit/bootstrap/ConfigurationFlexibility_LibConfigured.qunit.html +22 -0
- package/test/sap/ui/core/qunit/bootstrap/ConfigurationFlexibility_LibConfigured.qunit.js +22 -0
- package/test/sap/ui/core/qunit/bootstrap/ConfigurationFlexibility_LibLoaded.qunit.html +22 -0
- package/test/sap/ui/core/qunit/bootstrap/ConfigurationFlexibility_LibLoaded.qunit.js +16 -0
- package/test/sap/ui/core/qunit/bootstrap/ConfigurationFlexibility_LibNotLoaded.qunit.html +22 -0
- package/test/sap/ui/core/qunit/bootstrap/ConfigurationFlexibility_LibNotLoaded.qunit.js +14 -0
- package/test/sap/ui/core/qunit/bootstrap/ControlBehavior.qunit.js +110 -0
- package/test/sap/ui/core/qunit/bootstrap/PreloadCfg.qunit.js +4 -3
- package/test/sap/ui/core/qunit/bootstrap/ResourceRoot_ResourcesURL_Standard.qunit.html +1 -1
- package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.beforeBootstrap.qunit.js +2 -3
- package/test/sap/ui/core/qunit/bootstrap/_checkCoreAndLibraryBooted.qunit.js +39 -34
- package/test/sap/ui/core/qunit/bootstrap/_checkCoreAndLibraryBooted_legacyAPIs.qunit.js +5 -1
- package/test/sap/ui/core/qunit/bootstrap/testsuite.bootstrap.qunit.js +51 -15
- package/test/sap/ui/core/qunit/compat_legacyAPIs/jquery-compat.qunit.html +23 -0
- package/test/sap/ui/core/qunit/compat_legacyAPIs/jquery-compat.qunit.js +1 -1
- package/test/sap/ui/core/qunit/compat_legacyAPIs/jquery.sap.stubs.qunit.js +16 -20
- package/test/sap/ui/core/qunit/compat_legacyAPIs/testsuite.compat.qunit.js +1 -4
- package/test/sap/ui/core/qunit/component/Component.qunit.js +74 -4
- package/test/sap/ui/core/qunit/component/Models.qunit.js +3 -1
- package/test/sap/ui/core/qunit/component/Preloading.qunit.js +8 -12
- package/test/sap/ui/core/qunit/component/UIComponent.qunit.js +8 -2
- package/test/sap/ui/core/qunit/component/testdata/routerPreloading/Component.js +23 -0
- package/test/sap/ui/core/qunit/component/testdata/routerPreloading/Main.view.xml +8 -0
- package/test/sap/ui/core/qunit/component/testdata/routerPreloading/manifest.json +34 -0
- package/test/sap/ui/core/qunit/component/testdata/targetsPreloading/Component.js +23 -0
- package/test/sap/ui/core/qunit/component/testdata/targetsPreloading/Main.view.xml +8 -0
- package/test/sap/ui/core/qunit/component/testdata/targetsPreloading/manifest.json +28 -0
- package/test/sap/ui/core/qunit/date/_Calendars.qunit.js +52 -0
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +18 -0
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaksUsingIterator.qunit.js +3 -4
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +18 -0
- package/test/sap/ui/core/qunit/generic/legacy/SettersContextReturn.qunit.js +15 -0
- package/test/sap/ui/core/qunit/generic/testsuite.generic.qunit.js +21 -0
- package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessAmbiguous.js +2 -3
- package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessDuplicate.js +2 -3
- package/test/sap/ui/core/qunit/gherkin/fixture/testHarnessFailing.js +2 -3
- package/test/sap/ui/core/qunit/gherkin/opa5TestHarness.qunit.html +16 -0
- package/test/sap/ui/core/qunit/gherkin/opa5TestHarness.qunit.js +1 -1
- package/test/sap/ui/core/qunit/gherkin/qUnitTestHarness.qunit.html +16 -0
- package/test/sap/ui/core/qunit/gherkin/qUnitTestHarness.qunit.js +1 -1
- package/test/sap/ui/core/qunit/gherkin/testsuite.gherkin.qunit.js +3 -2
- package/test/sap/ui/core/qunit/i18n/Buddhist.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/GenericLocaleData.qunit.js +217 -114
- package/test/sap/ui/core/qunit/i18n/Islamic.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/Japanese.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +341 -7
- package/test/sap/ui/core/qunit/i18n/Persian.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +3 -0
- package/test/sap/ui/core/qunit/i18n/UniversalDateUtils.qunit.js +10 -1
- package/test/sap/ui/core/qunit/i18n/helper/_timezones.js +17 -11
- package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +7 -1
- package/test/sap/ui/core/qunit/internal/1Ring.qunit.html +5 -1
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.html +2 -2
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
- package/test/sap/ui/core/qunit/internal/AnnotationParser.qunit.html +1 -2
- package/test/sap/ui/core/qunit/internal/ODataV4.qunit.html +6 -1
- package/test/sap/ui/core/qunit/internal/testsuite.feature-odata-v4.qunit.js +2 -1
- package/test/sap/ui/core/qunit/jquery.sap.global-config.qunit.html +24 -0
- package/test/sap/ui/core/qunit/jquery.sap.global-config.qunit.js +12 -6
- package/test/sap/ui/core/qunit/jquery.sap.global-config_beforeBootstrap.qunit.js +1 -1
- package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +30 -0
- package/test/sap/ui/core/qunit/loader/exposeAsAMDLoader.qunit.html +1 -0
- package/test/sap/ui/core/qunit/model/Binding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/ClientListBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/ClientPropertyBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/ClientTreeBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/ClientTreeBindingAdapter.qunit.js +6 -0
- package/test/sap/ui/core/qunit/model/CompositeDataState.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/Context.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/ContextBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/Filter.qunit.js +49 -0
- package/test/sap/ui/core/qunit/model/FilterProcessor.qunit.js +40 -1
- package/test/sap/ui/core/qunit/model/ListBinding.qunit.js +23 -5
- package/test/sap/ui/core/qunit/model/Model.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/Sorter.qunit.js +3 -0
- package/test/sap/ui/core/qunit/model/TreeBinding.qunit.js +43 -3
- package/test/sap/ui/core/qunit/model/TreeBindingAdapter.qunit.js +3 -0
- package/test/sap/ui/core/qunit/mvc/Controller.qunit.js +107 -93
- package/test/sap/ui/core/qunit/mvc/View.qunit.js +3 -0
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessor.qunit.js +17 -14
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorAsync.qunit.js +23 -12
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +29 -82
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML_unavoidablySync.qunit.js +123 -0
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +4 -0
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +4 -0
- package/test/sap/ui/core/qunit/mvc/testsuite.mvc.qunit.js +16 -0
- package/test/sap/ui/core/qunit/mvc/viewprocessing/ViewProcessing.qunit.js +408 -419
- package/test/sap/ui/core/qunit/odata/AnnotationHelper.qunit.js +6 -4
- package/test/sap/ui/core/qunit/odata/ODataAnnotations.qunit.js +16 -0
- package/test/sap/ui/core/qunit/odata/ODataMetaModel.qunit.js +8 -1
- package/test/sap/ui/core/qunit/odata/ODataUtils.qunit.js +5 -1
- package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +4 -4
- package/test/sap/ui/core/qunit/odata/type/DateTimeWithTimezone.qunit.js +6 -6
- package/test/sap/ui/core/qunit/odata/type/Time.qunit.js +3 -4
- package/test/sap/ui/core/qunit/odata/type/TimeOfDay.qunit.js +4 -4
- package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +36 -13
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +952 -292
- package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +6 -4
- package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBindingNoFakeService.qunit.js +6 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +215 -1
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +194 -3
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModelDataState.qunit.js +3 -2
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +69 -2
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +601 -99
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1859 -407
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +7 -5
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.realOData.qunit.js +4 -4
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +909 -422
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +21 -6
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +104 -33
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +8 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_MetadataRequestor.qunit.js +4 -4
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +9 -9
- package/test/sap/ui/core/qunit/odata/v4/lib/_V2MetadataConverter.qunit.js +3 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_V4MetadataConverter.qunit.js +3 -3
- package/test/sap/ui/core/qunit/opa/OpaPlugin.qunit.js +16 -0
- package/test/sap/ui/core/qunit/opa/_LogCollector.qunit.js +17 -9
- package/test/sap/ui/core/qunit/opa/actions/EnterText.qunit.js +51 -3
- package/test/sap/ui/core/qunit/opa/autowaiter/_cssAnimationWaiter.js +3 -3
- package/test/sap/ui/core/qunit/opa/autowaiter/_cssTransitionWaiter.js +3 -3
- package/test/sap/ui/core/qunit/opa/autowaiter/_jsAnimationWaiter.js +3 -3
- package/test/sap/ui/core/qunit/opa/autowaiter/_timeoutWaiter.js +11 -0
- package/test/sap/ui/core/qunit/opa/fixture/miniUI5Site.js +14 -8
- package/test/sap/ui/core/qunit/opa/fixture/uncaughtError.js +18 -12
- package/test/sap/ui/core/qunit/performance/BeaconRequest.qunit.js +18 -2
- package/test/sap/ui/core/qunit/resource/ResourceBinding.qunit.js +1 -0
- package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +5 -4
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +20 -18
- package/test/sap/ui/core/qunit/routing/async/Targets.qunit.js +1 -4
- package/test/sap/ui/core/qunit/routing/fixture/routingConfig/Component.js +2 -25
- package/test/sap/ui/core/qunit/routing/fixture/routingConfig/manifest.json +28 -0
- package/test/sap/ui/core/qunit/rule/misc/silentEventBus.qunit.js +1 -2
- package/test/sap/ui/core/qunit/testdata/libraries/scenario11/lib1/library.js +11 -0
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib1/library-preload.js +3 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib1/library.js +3 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib2/library-preload.js +3 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib2/library.js +3 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib3/library-preload.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib3/library.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib5/library-preload.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib5/library.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib6/library-preload.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib6/library.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib8/library-preload.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/scenario14/lib8/library.js +2 -1
- package/test/sap/ui/core/qunit/testdata/libraries/terminologies/integration/lib/library-preload.js +1 -1
- package/test/sap/ui/core/qunit/testdata/shortcutHints/Component.js +9 -0
- package/test/sap/ui/core/qunit/testdata/shortcutHints/RootView.controller.js +8 -0
- package/test/sap/ui/core/qunit/testdata/shortcutHints/RootView.view.xml +16 -0
- package/test/sap/ui/core/qunit/testdata/shortcutHints/lib/MyControl.js +27 -0
- package/test/sap/ui/core/qunit/testdata/shortcutHints/manifest.json +26 -0
- package/test/sap/ui/core/qunit/testdata/uilib-custom-theme-fallback/library.js +4 -5
- package/test/sap/ui/core/qunit/testdata/uilib-failing-css-import/library.js +5 -6
- package/test/sap/ui/core/qunit/testdata/xml-require/view/XMLTemplateProcessorAsync_require_expression.controller.js +2 -1
- package/test/sap/ui/core/qunit/testdata/xml-require/view/XMLTemplateProcessorAsync_require_expression.view.xml +18 -1
- package/test/sap/ui/core/qunit/testsuite.core.framework.qunit.js +3 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.control.framework.qunit.js +0 -4
- package/test/sap/ui/core/qunit/testsuites/testsuite.foundation.enablement.qunit.js +6 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.managed.object.qunit.js +4 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.modular.core.qunit.js +1 -1
- package/test/sap/ui/core/qunit/testsuites/testsuite.security.qunit.js +3 -9
- package/test/sap/ui/core/qunit/types/DataType.qunit.js +14 -3
- package/test/sap/ui/core/qunit/types/Date.qunit.js +3 -0
- package/test/sap/ui/core/qunit/types/DateFormat.qunit.js +391 -147
- package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +32 -29
- package/test/sap/ui/core/qunit/types/DateInterval.qunit.js +7 -4
- package/test/sap/ui/core/qunit/types/FileSizeFormat.qunit.js +5 -1
- package/test/sap/ui/core/qunit/types/ListFormat.qunit.js +3 -0
- package/test/sap/ui/core/qunit/types/NumberFormat.qunit.js +4 -3
- package/test/sap/ui/core/qunit/types/NumberFormatCurrencies.qunit.js +5 -4
- package/test/sap/ui/core/qunit/types/NumberFormatCurrenciesTrailing.qunit.js +4 -3
- package/test/sap/ui/core/qunit/types/SimpleType.qunit.js +3 -0
- package/test/sap/ui/core/qunit/types/TimezoneUtil.qunit.js +23 -0
- package/test/sap/ui/core/qunit/types/Types.qunit.js +44 -10
- package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +3 -0
- package/test/sap/ui/core/qunit/util/InvisibleMessage.qunit.js +4 -4
- package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +592 -83
- package/test/sap/ui/core/qunit/util/beforeBootstrap/jQuery.sap.FrameOptions-allowlist.js +7 -0
- package/test/sap/ui/core/qunit/util/beforeBootstrap/jQuery.sap.FrameOptions-frameOptions.js +7 -0
- package/test/sap/ui/core/qunit/{bootstrap/CfgFromGlobalObject.qunit.html → util/jQuery.sap.FrameOptions-meta-tag-override-mode.qunit.html} +7 -11
- package/test/sap/ui/core/qunit/util/jQuery.sap.FrameOptions-meta-tag-override-mode.qunit.js +3 -4
- package/test/sap/ui/core/qunit/util/jQuery.sap.FrameOptions-meta-tag-override-service.qunit.html +26 -0
- package/test/sap/ui/core/qunit/util/jQuery.sap.FrameOptions-meta-tag-override-service.qunit.js +3 -4
- package/test/sap/ui/core/qunit/{bootstrap/CfgDefaults.qunit.html → util/jQuery.sap.FrameOptions-meta-tag.qunit.html} +5 -8
- package/test/sap/ui/core/qunit/util/jQuery.sap.FrameOptions-meta-tag.qunit.js +3 -4
- package/test/sap/ui/core/qunit/util/jQuery.sap.Version.qunit.js +10 -10
- package/test/sap/ui/core/qunit/util/jquery.sap.logger.qunit.html +18 -0
- package/test/sap/ui/core/qunit/util/jquery.sap.resources.qunit.js +1 -1
- package/test/sap/ui/core/qunit/util/testsuite.util.qunit.js +1 -3
- package/test/sap/ui/core/qunit/xml/XMLListBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +3 -0
- package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +3 -0
- package/test/sap/ui/core/relnotes/changes-1.119.json +1 -12
- package/test/sap/ui/core/relnotes/changes-1.120.json +360 -0
- package/test/sap/ui/core/terminologies/App.controller.js +2 -3
- package/test/sap/ui/core/terminologies/main.js +2 -3
- package/test/sap/ui/test/qunit/TestUtils.qunit.js +3 -3
- package/src/sap/ui/core/ConfigTest.js +0 -17
- package/src/sap/ui/core/_ConfigurationProvider.js +0 -187
- package/test/sap/ui/core/ComponentExtensibility_CustomizingDisabled.html +0 -57
- package/test/sap/ui/core/qunit/bootstrap/CfgDefaults.qunit.js +0 -71
- package/test/sap/ui/core/qunit/bootstrap/CfgFromConfigAttribute.qunit.html +0 -29
- package/test/sap/ui/core/qunit/bootstrap/CfgFromConfigAttribute.qunit.js +0 -40
- package/test/sap/ui/core/qunit/bootstrap/CfgFromGlobalObject.beforeBootstrap.qunit.js +0 -20
- package/test/sap/ui/core/qunit/bootstrap/CfgFromGlobalObject.qunit.js +0 -40
- package/test/sap/ui/core/qunit/bootstrap/CfgFromTagAttributes.qunit.html +0 -42
- package/test/sap/ui/core/qunit/bootstrap/CfgFromTagAttributes.qunit.js +0 -49
- package/test/sap/ui/core/qunit/util/BusyIndicatorNoCore.qunit.js +0 -96
- package/test/sap/ui/core/qunit/util/beforeBootstrap/jQuery.sap.FrameOptions-meta-tag.js +0 -10
- package/test/sap/ui/core/samples/mvc/JSONView.html +0 -65
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/assert",
|
|
8
8
|
"sap/base/config",
|
|
9
|
-
"sap/base/Log",
|
|
10
9
|
"sap/base/Eventing",
|
|
10
|
+
"sap/base/Log",
|
|
11
11
|
"sap/base/i18n/Localization",
|
|
12
12
|
"sap/base/i18n/LanguageTag",
|
|
13
13
|
"sap/base/i18n/date/CalendarType",
|
|
@@ -15,11 +15,11 @@ sap.ui.define([
|
|
|
15
15
|
"sap/base/util/deepEqual",
|
|
16
16
|
"sap/base/util/extend",
|
|
17
17
|
"sap/base/util/isEmptyObject"
|
|
18
|
-
],
|
|
18
|
+
], (
|
|
19
19
|
assert,
|
|
20
20
|
BaseConfig,
|
|
21
|
-
Log,
|
|
22
21
|
Eventing,
|
|
22
|
+
Log,
|
|
23
23
|
Localization,
|
|
24
24
|
LanguageTag,
|
|
25
25
|
CalendarType,
|
|
@@ -27,13 +27,16 @@ sap.ui.define([
|
|
|
27
27
|
deepEqual,
|
|
28
28
|
extend,
|
|
29
29
|
isEmptyObject
|
|
30
|
-
) {
|
|
30
|
+
) => {
|
|
31
31
|
"use strict";
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const oEventing = new Eventing();
|
|
34
|
+
const oWritableConfig = BaseConfig.getWritableInstance();
|
|
35
|
+
const mSettings = {};
|
|
36
|
+
let mChanges;
|
|
37
|
+
let aLegacyDateCalendarCustomizing;
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
const M_ABAP_DATE_FORMAT_PATTERN = {
|
|
37
40
|
"" : {pattern: null},
|
|
38
41
|
"1": {pattern: "dd.MM.yyyy"},
|
|
39
42
|
"2": {pattern: "MM/dd/yyyy"},
|
|
@@ -49,7 +52,7 @@ sap.ui.define([
|
|
|
49
52
|
"C": {pattern: "yyyy/MM/dd"}
|
|
50
53
|
};
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
const M_ABAP_TIME_FORMAT_PATTERN = {
|
|
53
56
|
"" : {"short": null, medium: null, dayPeriods: null},
|
|
54
57
|
"0": {"short": "HH:mm", medium: "HH:mm:ss", dayPeriods: null},
|
|
55
58
|
"1": {"short": "hh:mm a", medium: "hh:mm:ss a", dayPeriods: ["AM", "PM"]},
|
|
@@ -58,7 +61,7 @@ sap.ui.define([
|
|
|
58
61
|
"4": {"short": "KK:mm a", medium: "KK:mm:ss a", dayPeriods: ["am", "pm"]}
|
|
59
62
|
};
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
const M_ABAP_NUMBER_FORMAT_SYMBOLS = {
|
|
62
65
|
"" : {groupingSeparator: null, decimalSeparator: null},
|
|
63
66
|
" ": {groupingSeparator: ".", decimalSeparator: ","},
|
|
64
67
|
"X": {groupingSeparator: ",", decimalSeparator: "."},
|
|
@@ -67,7 +70,31 @@ sap.ui.define([
|
|
|
67
70
|
|
|
68
71
|
function check(bCondition, sMessage) {
|
|
69
72
|
if ( !bCondition ) {
|
|
70
|
-
throw new
|
|
73
|
+
throw new TypeError(sMessage);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function _set(sKey, oValue) {
|
|
78
|
+
// Invalidating the BaseConfig is necessary, because Formatting.getLanguageTag
|
|
79
|
+
// does defaulting depending on the mSettings. In case no specifc LaguageTag was
|
|
80
|
+
// set the default would become applied and cached. If the mSettings are changed
|
|
81
|
+
// inbetween the cache would not become invalidated because there is no direct
|
|
82
|
+
// change to the Configuration and therefore the cached value would be wrong.
|
|
83
|
+
BaseConfig._.invalidate();
|
|
84
|
+
const oOldValue = mSettings[sKey];
|
|
85
|
+
if (oValue != null) {
|
|
86
|
+
mSettings[sKey] = oValue;
|
|
87
|
+
} else {
|
|
88
|
+
delete mSettings[sKey];
|
|
89
|
+
}
|
|
90
|
+
// report a change only if old and new value differ (null/undefined are treated as the same value)
|
|
91
|
+
if ((oOldValue != null || oValue != null) && !deepEqual(oOldValue, oValue)) {
|
|
92
|
+
const bFireEvent = !mChanges;
|
|
93
|
+
mChanges ??= {};
|
|
94
|
+
mChanges[sKey] = oValue;
|
|
95
|
+
if (bFireEvent) {
|
|
96
|
+
fireChange();
|
|
97
|
+
}
|
|
71
98
|
}
|
|
72
99
|
}
|
|
73
100
|
|
|
@@ -75,72 +102,172 @@ sap.ui.define([
|
|
|
75
102
|
* Helper that creates a LanguageTag object from the given language
|
|
76
103
|
* or, throws an error for non BCP-47 compliant languages.
|
|
77
104
|
*
|
|
78
|
-
* @param {string}
|
|
105
|
+
* @param {string|module:sap/base/i18n/LanguageTag} vLanguageTag A BCP-47 compliant language tag
|
|
79
106
|
* @returns {module:sap/base/i18n/LanguageTag} The resulting LanguageTag
|
|
80
107
|
* @private
|
|
108
|
+
* @since 1.116.0
|
|
81
109
|
*/
|
|
82
|
-
function createLanguageTag(
|
|
83
|
-
|
|
84
|
-
if (
|
|
110
|
+
function createLanguageTag(vLanguageTag) {
|
|
111
|
+
let oLanguageTag;
|
|
112
|
+
if (vLanguageTag && typeof vLanguageTag === 'string') {
|
|
85
113
|
try {
|
|
86
|
-
oLanguageTag = new LanguageTag(
|
|
114
|
+
oLanguageTag = new LanguageTag(vLanguageTag);
|
|
87
115
|
} catch (e) {
|
|
88
116
|
// ignore
|
|
89
117
|
}
|
|
118
|
+
} else if (vLanguageTag instanceof LanguageTag) {
|
|
119
|
+
oLanguageTag = vLanguageTag;
|
|
90
120
|
}
|
|
91
121
|
return oLanguageTag;
|
|
92
122
|
}
|
|
93
123
|
|
|
94
|
-
var oWritableConfig = BaseConfig.getWritableInstance();
|
|
95
|
-
|
|
96
124
|
/**
|
|
97
125
|
* Configuration for formatting specific parameters
|
|
98
|
-
* @
|
|
99
|
-
* @ui5-restricted sap.ui.core
|
|
126
|
+
* @public
|
|
100
127
|
* @alias module:sap/base/i18n/Formatting
|
|
101
128
|
* @namespace
|
|
102
|
-
* @
|
|
103
|
-
* @borrows module:sap/base/Eventing#attachEvent as attachEvent
|
|
104
|
-
* @borrows module:sap/base/Eventing#attachEventOnce as attachEventOnce
|
|
105
|
-
* @borrows module:sap/base/Eventing#detachEvent as detachEvent
|
|
106
|
-
* @borrows module:sap/base/Eventing#fireEvent as fireEvent
|
|
107
|
-
* @borrows module:sap/base/Eventing#hasListeners as hasListeners
|
|
108
|
-
* @borrows module:sap/base/Eventing#getEventingParent as getEventingParent
|
|
109
|
-
* @borrows module:sap/base/Eventing#toString as toString
|
|
129
|
+
* @since 1.120
|
|
110
130
|
*/
|
|
111
|
-
|
|
131
|
+
const Formatting = {
|
|
112
132
|
/**
|
|
113
133
|
* The <code>change</code> event is fired, when the configuration options are changed.
|
|
134
|
+
* For the event parameters please refer to {@link module:sap/base/i18n/Formatting$ChangeEvent}.
|
|
114
135
|
*
|
|
115
136
|
* @name module:sap/base/i18n/Formatting.change
|
|
116
137
|
* @event
|
|
117
|
-
* @
|
|
118
|
-
* @
|
|
138
|
+
* @param {module:sap/base/i18n/Formatting$ChangeEvent} oEvent
|
|
139
|
+
* @public
|
|
140
|
+
* @since 1.120
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The formatting change event. Contains only the parameters which were changed.
|
|
145
|
+
*
|
|
146
|
+
* The list below shows the possible combinations of parameters available as part of the change event.
|
|
147
|
+
*
|
|
148
|
+
* <ul>
|
|
149
|
+
* <li>{@link module:sap/base/i18n/Formatting.setLanguageTag Formatting.setLanguageTag}:
|
|
150
|
+
* <ul>
|
|
151
|
+
* <li><code>languageTag</code></li>
|
|
152
|
+
* </ul>
|
|
153
|
+
* </li>
|
|
154
|
+
* <li>{@link module:sap/base/i18n/Formatting.setLegacyDateCalendarCustomizing Formatting.setLegacyDateCalendarCustomizing}:
|
|
155
|
+
* <ul>
|
|
156
|
+
* <li><code>legacyDateCalendarCustomizing</code></li>
|
|
157
|
+
* </ul>
|
|
158
|
+
* </li>
|
|
159
|
+
* <li>{@link module:sap/base/i18n/Formatting.setCalendarWeekNumbering Formatting.setCalendarWeekNumbering}:
|
|
160
|
+
* <ul>
|
|
161
|
+
* <li><code>calendarWeekNumbering</code></li>
|
|
162
|
+
* </ul>
|
|
163
|
+
* </li>
|
|
164
|
+
* <li>{@link module:sap/base/i18n/Formatting.setCalendarType Formatting.setCalendarType}:
|
|
165
|
+
* <ul>
|
|
166
|
+
* <li><code>calendarType</code></li>
|
|
167
|
+
* </ul>
|
|
168
|
+
* </li>
|
|
169
|
+
* <li>{@link module:sap/base/i18n/Formatting.addCustomCurrencies Formatting.addCustomCurrencies} / {@link module:sap/base/i18n/Formatting.setCustomCurrencies Formatting.setCustomCurrencies}:
|
|
170
|
+
* <ul>
|
|
171
|
+
* <li><code>currency</code></li>
|
|
172
|
+
* </ul>
|
|
173
|
+
* </li>
|
|
174
|
+
* <li>{@link module:sap/base/i18n/Formatting.setABAPDateFormat Formatting.setABAPDateFormat} (all parameters listed below):
|
|
175
|
+
* <ul>
|
|
176
|
+
* <li><code>ABAPDateFormat</code></li>
|
|
177
|
+
* <li><code>"dateFormats-short"</code></li>
|
|
178
|
+
* <li><code>"dateFormats-medium"</code></li>
|
|
179
|
+
* </ul>
|
|
180
|
+
* </li>
|
|
181
|
+
* <li>{@link module:sap/base/i18n/Formatting.setABAPTimeFormat Formatting.setABAPTimeFormat} (all parameters listed below):
|
|
182
|
+
* <ul>
|
|
183
|
+
* <li><code>ABAPTimeFormat</code></li>
|
|
184
|
+
* <li><code>"timeFormats-short"</code></li>
|
|
185
|
+
* <li><code>"timeFormats-medium"</code></li>
|
|
186
|
+
* <li><code>"dayPeriods-format-abbreviated"</code></li>
|
|
187
|
+
* </ul>
|
|
188
|
+
* </li>
|
|
189
|
+
* <li>{@link module:sap/base/i18n/Formatting.setABAPNumberFormat Formatting.setABAPNumberFormat} (all parameters listed below):
|
|
190
|
+
* <ul>
|
|
191
|
+
* <li><code>ABAPNumberFormat</code></li>
|
|
192
|
+
* <li><code>"symbols-latn-group"</code></li>
|
|
193
|
+
* <li><code>"symbols-latn-decimal"</code></li>
|
|
194
|
+
* </ul>
|
|
195
|
+
* </li>
|
|
196
|
+
* <li>{@link module:sap/base/i18n/Formatting.setDatePattern Formatting.setDatePattern} (one of the parameters listed below):
|
|
197
|
+
* <ul>
|
|
198
|
+
* <li><code>"dateFormats-short"</code></li>
|
|
199
|
+
* <li><code>"dateFormats-medium"</code></li>
|
|
200
|
+
* <li><code>"dateFormats-long"</code></li>
|
|
201
|
+
* <li><code>"dateFormats-full"</code></li>
|
|
202
|
+
* </ul>
|
|
203
|
+
* </li>
|
|
204
|
+
* <li>{@link module:sap/base/i18n/Formatting.setTimePattern Formatting.setTimePattern} (one of the parameters listed below):
|
|
205
|
+
* <ul>
|
|
206
|
+
* <li><code>"timeFormats-short"</code></li>
|
|
207
|
+
* <li><code>"timeFormats-medium"</code></li>
|
|
208
|
+
* <li><code>"timeFormats-long"</code></li>
|
|
209
|
+
* <li><code>"timeFormats-full"</code></li>
|
|
210
|
+
* </ul>
|
|
211
|
+
* </li>
|
|
212
|
+
* <li>{@link module:sap/base/i18n/Formatting.setNumberSymbol Formatting.setNumberSymbol} (one of the parameters listed below):
|
|
213
|
+
* <ul>
|
|
214
|
+
* <li><code>"symbols-latn-group"</code></li>
|
|
215
|
+
* <li><code>"symbols-latn-decimal"</code></li>
|
|
216
|
+
* <li><code>"symbols-latn-plusSign"</code></li>
|
|
217
|
+
* <li><code>"symbols-latn-minusSign"</code></li>
|
|
218
|
+
* </ul>
|
|
219
|
+
* </li>
|
|
220
|
+
* </ul>
|
|
221
|
+
*
|
|
222
|
+
* @typedef {object} module:sap/base/i18n/Formatting$ChangeEvent
|
|
223
|
+
* @property {string} [languageTag] The formatting language tag.
|
|
224
|
+
* @property {string} [ABAPDateFormat] The ABAP date format.
|
|
225
|
+
* @property {string} [ABAPTimeFormat] The ABAP time format.
|
|
226
|
+
* @property {string} [ABAPNumberFormat] The ABAP number format.
|
|
227
|
+
* @property {object[]} [legacyDateCalendarCustomizing] The legacy date calendar customizing.
|
|
228
|
+
* @property {object} [calendarWeekNumbering] The calendar week numbering.
|
|
229
|
+
* @property {object} [calendarType] The calendar type.
|
|
230
|
+
* @property {string} ["dateFormats-short"] The short date format.
|
|
231
|
+
* @property {string} ["dateFormats-medium"] The medium date format.
|
|
232
|
+
* @property {string} ["dateFormats-long"] The long date format.
|
|
233
|
+
* @property {string} ["dateFormats-full"] The full date format.
|
|
234
|
+
* @property {string} ["timeFormats-short"] The short time format.
|
|
235
|
+
* @property {string} ["timeFormats-medium"] The medium time format.
|
|
236
|
+
* @property {string} ["timeFormats-long"] The long time format.
|
|
237
|
+
* @property {string} ["timeFormats-full"] The full time format.
|
|
238
|
+
* @property {string} ["symbols-latn-group"] The latin symbols group.
|
|
239
|
+
* @property {string} ["symbols-latn-decimal"] The latin symbols decimal.
|
|
240
|
+
* @property {string} ["symbols-latn-plusSign"] The latin symbols plusSign.
|
|
241
|
+
* @property {string} ["symbols-latn-minusSign"] The latin symbols minusSign.
|
|
242
|
+
* @property {Object<string,string>} [currency] The currency.
|
|
243
|
+
* @property {string[]} ["dayPeriods-format-abbreviated"] The abbreviated day periods format.
|
|
244
|
+
* @public
|
|
245
|
+
* @since 1.120
|
|
119
246
|
*/
|
|
120
247
|
|
|
121
248
|
/**
|
|
122
249
|
* Attaches the <code>fnFunction</code> event handler to the {@link #event:change change} event
|
|
123
250
|
* of <code>module:sap/base/i18n/Formatting</code>.
|
|
124
251
|
*
|
|
125
|
-
* @param {function} fnFunction
|
|
252
|
+
* @param {function(module:sap/base/i18n/Formatting$ChangeEvent)} fnFunction
|
|
126
253
|
* The function to be called when the event occurs
|
|
127
|
-
* @
|
|
128
|
-
* @
|
|
254
|
+
* @public
|
|
255
|
+
* @since 1.120
|
|
129
256
|
*/
|
|
130
|
-
attachChange
|
|
131
|
-
|
|
257
|
+
attachChange(fnFunction) {
|
|
258
|
+
oEventing.attachEvent("change", fnFunction);
|
|
132
259
|
},
|
|
133
260
|
|
|
134
261
|
/**
|
|
135
262
|
* Detaches event handler <code>fnFunction</code> from the {@link #event:change change} event of
|
|
136
263
|
* this <code>module:sap/base/i18n/Formatting</code>.
|
|
137
264
|
*
|
|
138
|
-
* @param {function} fnFunction Function to be called when the event occurs
|
|
139
|
-
* @
|
|
140
|
-
* @
|
|
265
|
+
* @param {function(module:sap/base/i18n/Formatting$ChangeEvent)} fnFunction Function to be called when the event occurs
|
|
266
|
+
* @public
|
|
267
|
+
* @since 1.120
|
|
141
268
|
*/
|
|
142
|
-
detachChange
|
|
143
|
-
|
|
269
|
+
detachChange(fnFunction) {
|
|
270
|
+
oEventing.detachEvent("change", fnFunction);
|
|
144
271
|
},
|
|
145
272
|
|
|
146
273
|
/**
|
|
@@ -156,18 +283,19 @@ sap.ui.define([
|
|
|
156
283
|
*
|
|
157
284
|
* @returns {module:sap/base/i18n/LanguageTag} the format LanguageTag
|
|
158
285
|
* @public
|
|
286
|
+
* @since 1.120
|
|
159
287
|
*/
|
|
160
|
-
getLanguageTag
|
|
161
|
-
function fallback(
|
|
162
|
-
|
|
288
|
+
getLanguageTag() {
|
|
289
|
+
function fallback() {
|
|
290
|
+
let oLanguageTag = new LanguageTag(Localization.getLanguage());
|
|
163
291
|
// if any user settings have been defined, add the private use subtag "sapufmt"
|
|
164
292
|
if (!isEmptyObject(mSettings)
|
|
165
|
-
||
|
|
166
|
-
|
|
293
|
+
|| Formatting.getCalendarWeekNumbering() !== CalendarWeekNumbering.Default) {
|
|
294
|
+
let l = oLanguageTag.toString();
|
|
167
295
|
if ( l.indexOf("-x-") < 0 ) {
|
|
168
|
-
l
|
|
296
|
+
l += "-x-sapufmt";
|
|
169
297
|
} else if ( l.indexOf("-sapufmt") <= l.indexOf("-x-") ) {
|
|
170
|
-
l
|
|
298
|
+
l += "-sapufmt";
|
|
171
299
|
}
|
|
172
300
|
oLanguageTag = new LanguageTag(l);
|
|
173
301
|
}
|
|
@@ -176,7 +304,7 @@ sap.ui.define([
|
|
|
176
304
|
return oWritableConfig.get({
|
|
177
305
|
name: "sapUiFormatLocale",
|
|
178
306
|
type: function(sFormatLocale) {return new LanguageTag(sFormatLocale);},
|
|
179
|
-
defaultValue: fallback
|
|
307
|
+
defaultValue: fallback,
|
|
180
308
|
external: true
|
|
181
309
|
});
|
|
182
310
|
},
|
|
@@ -192,71 +320,57 @@ sap.ui.define([
|
|
|
192
320
|
*
|
|
193
321
|
* After changing the format locale, the framework tries to update localization
|
|
194
322
|
* specific parts of the UI. See the documentation of
|
|
195
|
-
* {@link module:sap/base/i18n/Localization.
|
|
323
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
196
324
|
* for details and restrictions.
|
|
197
325
|
*
|
|
198
326
|
* <b>Note</b>: When a language tag is set, it has higher priority than a number,
|
|
199
|
-
* date or time format defined with a call to <code>
|
|
200
|
-
* <code>
|
|
327
|
+
* date or time format defined with a call to <code>setABAPNumberFormat</code>,
|
|
328
|
+
* <code>setABAPDateFormat</code> or <code>setABAPTimeFormat</code>.
|
|
201
329
|
*
|
|
202
330
|
* <b>Note</b>: See documentation of
|
|
203
|
-
* {@link module:sap/base/i18n/Localization.
|
|
331
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
204
332
|
* for restrictions.
|
|
205
333
|
*
|
|
206
|
-
* @param {string|null}
|
|
334
|
+
* @param {string|module:sap/base/i18n/LanguageTag|null} vLanguageTag the new BCP47 compliant language tag;
|
|
207
335
|
* case doesn't matter and underscores can be used instead of dashes to separate
|
|
208
336
|
* components (compatibility with Java Locale IDs)
|
|
209
|
-
* @
|
|
210
|
-
* @public
|
|
211
|
-
* @throws {Error} When <code>sLanguageTag</code> is given, but is not a valid BCP47 language
|
|
337
|
+
* @throws {TypeError} When <code>sLanguageTag</code> is given, but is not a valid BCP47 language
|
|
212
338
|
* tag or Java locale identifier
|
|
339
|
+
* @public
|
|
340
|
+
* @since 1.120
|
|
213
341
|
*/
|
|
214
|
-
setLanguageTag
|
|
215
|
-
|
|
216
|
-
check(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
var oCurrentLanguageTag = Formatting.getLanguageTag();
|
|
342
|
+
setLanguageTag(vLanguageTag) {
|
|
343
|
+
const oLanguageTag = createLanguageTag(vLanguageTag);
|
|
344
|
+
check(vLanguageTag == null || oLanguageTag, "vLanguageTag must be a BCP47 language tag or Java Locale id or null");
|
|
345
|
+
const oOldLanguageTag = Formatting.getLanguageTag();
|
|
346
|
+
oWritableConfig.set("sapUiFormatLocale", oLanguageTag?.toString());
|
|
347
|
+
const oCurrentLanguageTag = Formatting.getLanguageTag();
|
|
221
348
|
if (oOldLanguageTag.toString() !== oCurrentLanguageTag.toString()) {
|
|
222
|
-
|
|
223
|
-
mChanges
|
|
349
|
+
const bFireEvent = !mChanges;
|
|
350
|
+
mChanges ??= {};
|
|
224
351
|
mChanges.languageTag = oCurrentLanguageTag.toString();
|
|
225
352
|
if (bFireEvent) {
|
|
226
353
|
fireChange();
|
|
227
354
|
}
|
|
228
355
|
}
|
|
229
|
-
return this;
|
|
230
356
|
},
|
|
231
357
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
mSettings[sKey] = oValue;
|
|
237
|
-
} else {
|
|
238
|
-
delete mSettings[sKey];
|
|
239
|
-
}
|
|
240
|
-
// report a change only if old and new value differ (null/undefined are treated as the same value)
|
|
241
|
-
if ( (oOldValue != null || oValue != null) && !deepEqual(oOldValue, oValue) ) {
|
|
242
|
-
var bFireEvent = !mChanges;
|
|
243
|
-
mChanges = mChanges || {};
|
|
244
|
-
mChanges[sKey] = oValue;
|
|
245
|
-
if (bFireEvent) {
|
|
246
|
-
fireChange();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
},
|
|
358
|
+
/**
|
|
359
|
+
* @deprecated As of Version 1.120
|
|
360
|
+
*/
|
|
361
|
+
_set: _set,
|
|
250
362
|
|
|
251
363
|
/**
|
|
252
364
|
* Retrieves the custom units.
|
|
253
365
|
* These custom units are set by {@link #setCustomUnits} and {@link #addCustomUnits}
|
|
254
366
|
* @returns {object} custom units object
|
|
255
|
-
* @see
|
|
256
|
-
* @see
|
|
367
|
+
* @see {@link module:sap/base/i18n/Formatting.setCustomUnits}
|
|
368
|
+
* @see {@link module:sap/base/i18n/Formatting.addCustomUnits}
|
|
369
|
+
* @private
|
|
370
|
+
* @since 1.116.0
|
|
257
371
|
*/
|
|
258
|
-
getCustomUnits
|
|
259
|
-
return mSettings["units"]
|
|
372
|
+
getCustomUnits() {
|
|
373
|
+
return mSettings["units"]?.["short"];
|
|
260
374
|
},
|
|
261
375
|
|
|
262
376
|
/**
|
|
@@ -291,37 +405,35 @@ sap.ui.define([
|
|
|
291
405
|
*
|
|
292
406
|
* E.g. In locale 'en' value <code>1</code> would result in <code>1 Bag</code>, while <code>2</code> would result in <code>2 Bags</code>
|
|
293
407
|
* @param {object} mUnits custom unit object which replaces the current custom unit definition. Call with <code>null</code> to delete custom units.
|
|
294
|
-
* @returns {this} The config for chaining
|
|
295
408
|
* @private
|
|
409
|
+
* @since 1.116.0
|
|
296
410
|
*/
|
|
297
|
-
setCustomUnits
|
|
411
|
+
setCustomUnits(mUnits) {
|
|
298
412
|
// add custom units, or remove the existing ones if none are given
|
|
299
|
-
|
|
413
|
+
let mUnitsshort = null;
|
|
300
414
|
if (mUnits) {
|
|
301
415
|
mUnitsshort = {
|
|
302
416
|
"short": mUnits
|
|
303
417
|
};
|
|
304
418
|
}
|
|
305
|
-
|
|
306
|
-
return this;
|
|
419
|
+
_set("units", mUnitsshort);
|
|
307
420
|
},
|
|
308
421
|
|
|
309
422
|
/**
|
|
310
423
|
* Adds custom units.
|
|
311
424
|
* Similar to {@link #setCustomUnits} but instead of setting the custom units, it will add additional ones.
|
|
312
425
|
* @param {object} mUnits custom unit object which replaces the current custom unit definition. Call with <code>null</code> to delete custom units.
|
|
313
|
-
* @
|
|
314
|
-
* @see #setCustomUnits
|
|
426
|
+
* @see {@link module:sap/base/i18n/Formatting.setCustomUnits}
|
|
315
427
|
* @private
|
|
428
|
+
* @since 1.116.0
|
|
316
429
|
*/
|
|
317
|
-
addCustomUnits
|
|
430
|
+
addCustomUnits(mUnits) {
|
|
318
431
|
// add custom units, or remove the existing ones if none are given
|
|
319
|
-
|
|
432
|
+
const mExistingUnits = Formatting.getCustomUnits();
|
|
320
433
|
if (mExistingUnits){
|
|
321
434
|
mUnits = extend({}, mExistingUnits, mUnits);
|
|
322
435
|
}
|
|
323
436
|
Formatting.setCustomUnits(mUnits);
|
|
324
|
-
return this;
|
|
325
437
|
},
|
|
326
438
|
|
|
327
439
|
/**
|
|
@@ -340,39 +452,40 @@ sap.ui.define([
|
|
|
340
452
|
* Note: It is possible to create multiple entries per unit key.
|
|
341
453
|
* Call with <code>null</code> to delete unit mappings.
|
|
342
454
|
* @param {object} mUnitMappings unit mappings
|
|
343
|
-
* @
|
|
455
|
+
* @private
|
|
456
|
+
* @since 1.116.0
|
|
344
457
|
*/
|
|
345
|
-
setUnitMappings
|
|
346
|
-
|
|
347
|
-
return this;
|
|
458
|
+
setUnitMappings(mUnitMappings) {
|
|
459
|
+
_set("unitMappings", mUnitMappings);
|
|
348
460
|
},
|
|
349
461
|
|
|
350
462
|
/**
|
|
351
463
|
* Adds unit mappings.
|
|
352
464
|
* Similar to {@link #setUnitMappings} but instead of setting the unit mappings, it will add additional ones.
|
|
353
465
|
* @param {object} mUnitMappings unit mappings
|
|
354
|
-
* @
|
|
355
|
-
* @see #setUnitMappings
|
|
466
|
+
* @see {@link module:sap/base/i18n/Formatting.setUnitMappings}
|
|
356
467
|
* @private
|
|
468
|
+
* @since 1.116.0
|
|
357
469
|
*/
|
|
358
|
-
addUnitMappings
|
|
470
|
+
addUnitMappings(mUnitMappings) {
|
|
359
471
|
// add custom units, or remove the existing ones if none are given
|
|
360
|
-
|
|
472
|
+
const mExistingUnits = Formatting.getUnitMappings();
|
|
361
473
|
if (mExistingUnits){
|
|
362
474
|
mUnitMappings = extend({}, mExistingUnits, mUnitMappings);
|
|
363
475
|
}
|
|
364
476
|
Formatting.setUnitMappings(mUnitMappings);
|
|
365
|
-
return this;
|
|
366
477
|
},
|
|
367
478
|
|
|
368
479
|
/**
|
|
369
480
|
* Retrieves the unit mappings.
|
|
370
481
|
* These unit mappings are set by {@link #setUnitMappings} and {@link #addUnitMappings}
|
|
482
|
+
* @private
|
|
371
483
|
* @returns {object} unit mapping object
|
|
372
|
-
* @see
|
|
373
|
-
* @see
|
|
484
|
+
* @see {@link module:sap/base/i18n/Formatting.setUnitMappings}
|
|
485
|
+
* @see {@link module:sap/base/i18n/Formatting.addUnitMappings}
|
|
486
|
+
* @since 1.116.0
|
|
374
487
|
*/
|
|
375
|
-
getUnitMappings
|
|
488
|
+
getUnitMappings() {
|
|
376
489
|
return mSettings["unitMappings"];
|
|
377
490
|
},
|
|
378
491
|
|
|
@@ -381,8 +494,9 @@ sap.ui.define([
|
|
|
381
494
|
* @param {"short"|"medium"|"long"|"full"} sStyle The date style (short, medium, long or full)
|
|
382
495
|
* @returns {string} The resulting date pattern
|
|
383
496
|
* @public
|
|
497
|
+
* @since 1.120
|
|
384
498
|
*/
|
|
385
|
-
getDatePattern
|
|
499
|
+
getDatePattern(sStyle) {
|
|
386
500
|
assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
387
501
|
return mSettings["dateFormats-" + sStyle];
|
|
388
502
|
},
|
|
@@ -397,18 +511,17 @@ sap.ui.define([
|
|
|
397
511
|
* See class {@link sap.ui.core.format.DateFormat} for details about the pattern syntax.
|
|
398
512
|
*
|
|
399
513
|
* After changing the date pattern, the framework tries to update localization
|
|
400
|
-
* specific parts of the UI. See the documentation of {@link module:sap/base/i18n/Localization.
|
|
514
|
+
* specific parts of the UI. See the documentation of {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
401
515
|
* for details and restrictions.
|
|
402
516
|
*
|
|
403
517
|
* @param {"short"|"medium"|"long"|"full"} sStyle must be one of short, medium, long or full.
|
|
404
518
|
* @param {string} sPattern the format pattern to be used in LDML syntax.
|
|
405
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
406
519
|
* @public
|
|
520
|
+
* @since 1.120
|
|
407
521
|
*/
|
|
408
|
-
setDatePattern
|
|
522
|
+
setDatePattern(sStyle, sPattern) {
|
|
409
523
|
check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
410
|
-
|
|
411
|
-
return this;
|
|
524
|
+
_set("dateFormats-" + sStyle, sPattern);
|
|
412
525
|
},
|
|
413
526
|
|
|
414
527
|
/**
|
|
@@ -416,8 +529,9 @@ sap.ui.define([
|
|
|
416
529
|
* @param {"short"|"medium"|"long"|"full"} sStyle The time style (short, medium, long or full)
|
|
417
530
|
* @returns {string} The resulting time pattern
|
|
418
531
|
* @public
|
|
532
|
+
* @since 1.120
|
|
419
533
|
*/
|
|
420
|
-
getTimePattern
|
|
534
|
+
getTimePattern(sStyle) {
|
|
421
535
|
assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
422
536
|
return mSettings["timeFormats-" + sStyle];
|
|
423
537
|
},
|
|
@@ -433,18 +547,17 @@ sap.ui.define([
|
|
|
433
547
|
*
|
|
434
548
|
* After changing the time pattern, the framework tries to update localization
|
|
435
549
|
* specific parts of the UI. See the documentation of
|
|
436
|
-
* {@link module:sap/base/i18n/Localization.
|
|
550
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
437
551
|
* for details and restrictions.
|
|
438
552
|
*
|
|
439
553
|
* @param {"short"|"medium"|"long"|"full"} sStyle must be one of short, medium, long or full.
|
|
440
554
|
* @param {string} sPattern the format pattern to be used in LDML syntax.
|
|
441
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
442
555
|
* @public
|
|
556
|
+
* @since 1.120
|
|
443
557
|
*/
|
|
444
|
-
setTimePattern
|
|
558
|
+
setTimePattern(sStyle, sPattern) {
|
|
445
559
|
check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
446
|
-
|
|
447
|
-
return this;
|
|
560
|
+
_set("timeFormats-" + sStyle, sPattern);
|
|
448
561
|
},
|
|
449
562
|
|
|
450
563
|
/**
|
|
@@ -460,8 +573,9 @@ sap.ui.define([
|
|
|
460
573
|
* <li>"minusSign": "-" (minus sign)</li>
|
|
461
574
|
* </ul>
|
|
462
575
|
* @public
|
|
576
|
+
* @since 1.120
|
|
463
577
|
*/
|
|
464
|
-
getNumberSymbol
|
|
578
|
+
getNumberSymbol(sType) {
|
|
465
579
|
assert(["group", "decimal", "plusSign", "minusSign"].includes(sType), "sType must be decimal, group, plusSign or minusSign");
|
|
466
580
|
return mSettings["symbols-latn-" + sType];
|
|
467
581
|
},
|
|
@@ -478,18 +592,17 @@ sap.ui.define([
|
|
|
478
592
|
*
|
|
479
593
|
* After changing the number symbol, the framework tries to update localization
|
|
480
594
|
* specific parts of the UI. See the documentation of
|
|
481
|
-
* {@link module:sap/base/i18n/Localization.
|
|
595
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
482
596
|
* for details and restrictions.
|
|
483
597
|
*
|
|
484
598
|
* @param {"group"|"decimal"|"plusSign"|"minusSign"} sType the type of symbol
|
|
485
599
|
* @param {string} sSymbol will be used to represent the given symbol type
|
|
486
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
487
600
|
* @public
|
|
601
|
+
* @since 1.120
|
|
488
602
|
*/
|
|
489
|
-
setNumberSymbol
|
|
603
|
+
setNumberSymbol(sType, sSymbol) {
|
|
490
604
|
check(["group", "decimal", "plusSign", "minusSign"].includes(sType), "sType must be decimal, group, plusSign or minusSign");
|
|
491
|
-
|
|
492
|
-
return this;
|
|
605
|
+
_set("symbols-latn-" + sType, sSymbol);
|
|
493
606
|
},
|
|
494
607
|
|
|
495
608
|
/**
|
|
@@ -501,10 +614,13 @@ sap.ui.define([
|
|
|
501
614
|
* "TND" : {"digits": 3}
|
|
502
615
|
* }
|
|
503
616
|
* </code>
|
|
504
|
-
* @public
|
|
505
617
|
* @returns {object} the mapping between custom currencies and its digits
|
|
618
|
+
* @public
|
|
619
|
+
* @since 1.120
|
|
620
|
+
* @see {@link module:sap/base/i18n/Formatting.setCustomCurrencies}
|
|
621
|
+
* @see {@link module:sap/base/i18n/Formatting.addCustomCurrencies}
|
|
506
622
|
*/
|
|
507
|
-
getCustomCurrencies
|
|
623
|
+
getCustomCurrencies() {
|
|
508
624
|
return mSettings["currency"];
|
|
509
625
|
},
|
|
510
626
|
|
|
@@ -539,17 +655,17 @@ sap.ui.define([
|
|
|
539
655
|
* Custom currencies must not only consist of digits but contain at least one non-digit character, e.g. "a",
|
|
540
656
|
* so that the measure part can be distinguished from the number part.
|
|
541
657
|
* @public
|
|
658
|
+
* @since 1.120
|
|
542
659
|
* @param {object} mCurrencies currency map which is set
|
|
543
|
-
* @
|
|
660
|
+
* @see {@link module:sap/base/i18n/Formatting.addCustomCurrencies}
|
|
544
661
|
*/
|
|
545
|
-
setCustomCurrencies
|
|
662
|
+
setCustomCurrencies(mCurrencies) {
|
|
546
663
|
check(typeof mCurrencies === "object" || mCurrencies == null, "mCurrencyDigits must be an object");
|
|
547
664
|
Object.keys(mCurrencies || {}).forEach(function(sCurrencyDigit) {
|
|
548
665
|
check(typeof sCurrencyDigit === "string");
|
|
549
666
|
check(typeof mCurrencies[sCurrencyDigit] === "object");
|
|
550
667
|
});
|
|
551
|
-
|
|
552
|
-
return this;
|
|
668
|
+
_set("currency", mCurrencies);
|
|
553
669
|
},
|
|
554
670
|
|
|
555
671
|
/**
|
|
@@ -563,120 +679,135 @@ sap.ui.define([
|
|
|
563
679
|
* </code>
|
|
564
680
|
*
|
|
565
681
|
* @public
|
|
682
|
+
* @since 1.120
|
|
566
683
|
* @param {object} mCurrencies adds to the currency map
|
|
567
|
-
* @
|
|
568
|
-
* @see #setCustomCurrencies
|
|
684
|
+
* @see {@link module:sap/base/i18n/Formatting.setCustomCurrencies}
|
|
569
685
|
*/
|
|
570
|
-
addCustomCurrencies
|
|
686
|
+
addCustomCurrencies(mCurrencies) {
|
|
571
687
|
// add custom units, or remove the existing ones if none are given
|
|
572
|
-
|
|
688
|
+
const mExistingCurrencies = Formatting.getCustomCurrencies();
|
|
573
689
|
if (mExistingCurrencies){
|
|
574
690
|
mCurrencies = extend({}, mExistingCurrencies, mCurrencies);
|
|
575
691
|
}
|
|
576
692
|
Formatting.setCustomCurrencies(mCurrencies);
|
|
577
|
-
return this;
|
|
578
693
|
},
|
|
579
694
|
|
|
580
|
-
_setDayPeriods
|
|
695
|
+
_setDayPeriods(sWidth, aTexts) {
|
|
581
696
|
assert(sWidth == "narrow" || sWidth == "abbreviated" || sWidth == "wide", "sWidth must be narrow, abbreviated or wide");
|
|
582
|
-
|
|
583
|
-
return this;
|
|
697
|
+
_set("dayPeriods-format-" + sWidth, aTexts);
|
|
584
698
|
},
|
|
585
699
|
|
|
586
700
|
/**
|
|
587
|
-
* Returns the currently set
|
|
701
|
+
* Returns the currently set ABAP date format (its id) or undefined if none has been set.
|
|
588
702
|
*
|
|
589
703
|
* @returns {"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"A"|"B"|"C"|undefined} ID of the ABAP date format,
|
|
590
704
|
* if not set or set to <code>""</code>, <code>undefined</code> will be returned
|
|
591
705
|
* @public
|
|
706
|
+
* @since 1.120
|
|
592
707
|
*/
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
name: "
|
|
708
|
+
getABAPDateFormat() {
|
|
709
|
+
const sABAPDateFormat = oWritableConfig.get({
|
|
710
|
+
name: "sapUiABAPDateFormat",
|
|
596
711
|
type: BaseConfig.Type.String,
|
|
712
|
+
/**
|
|
713
|
+
* @deprecated As of Version 1.120
|
|
714
|
+
*/
|
|
715
|
+
defaultValue: oWritableConfig.get({
|
|
716
|
+
name: "sapUiLegacyDateFormat",
|
|
717
|
+
type: BaseConfig.Type.String,
|
|
718
|
+
external: true
|
|
719
|
+
}),
|
|
597
720
|
external: true
|
|
598
721
|
});
|
|
599
|
-
return
|
|
722
|
+
return sABAPDateFormat ? sABAPDateFormat.toUpperCase() : undefined;
|
|
600
723
|
},
|
|
601
724
|
|
|
602
725
|
/**
|
|
603
|
-
* Allows to specify one of the
|
|
726
|
+
* Allows to specify one of the ABAP date formats.
|
|
604
727
|
*
|
|
605
728
|
* This method modifies the date patterns for 'short' and 'medium' style with the corresponding ABAP
|
|
606
729
|
* format. When called with a null or undefined format id, any previously applied format will be removed.
|
|
607
730
|
*
|
|
608
|
-
* After changing the
|
|
731
|
+
* After changing the date format, the framework tries to update localization
|
|
609
732
|
* specific parts of the UI. See the documentation of
|
|
610
|
-
* {@link module:sap/base/i18n/Localization.
|
|
733
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
611
734
|
* for details and restrictions.
|
|
612
735
|
*
|
|
613
736
|
* @param {""|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"A"|"B"|"C"} [sFormatId=""] ID of the ABAP date format,
|
|
614
737
|
* <code>""</code> will reset the date patterns for 'short' and 'medium' style to the
|
|
615
738
|
* locale-specific ones.
|
|
616
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
617
739
|
* @public
|
|
740
|
+
* @since 1.120
|
|
618
741
|
*/
|
|
619
|
-
|
|
742
|
+
setABAPDateFormat(sFormatId) {
|
|
620
743
|
sFormatId = sFormatId ? String(sFormatId).toUpperCase() : "";
|
|
621
744
|
check(M_ABAP_DATE_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['1','2','3','4','5','6','7','8','9','A','B','C'] or empty");
|
|
622
|
-
|
|
623
|
-
|
|
745
|
+
const bFireEvent = !mChanges;
|
|
746
|
+
const sOldFormat = Formatting.getABAPDateFormat();
|
|
624
747
|
if (sOldFormat !== sFormatId) {
|
|
625
|
-
mChanges
|
|
626
|
-
oWritableConfig.set("
|
|
627
|
-
mChanges.
|
|
748
|
+
mChanges ??= {};
|
|
749
|
+
oWritableConfig.set("sapUiABAPDateFormat", sFormatId);
|
|
750
|
+
mChanges.ABAPDateFormat = sFormatId;
|
|
628
751
|
Formatting.setDatePattern("short", M_ABAP_DATE_FORMAT_PATTERN[sFormatId].pattern);
|
|
629
752
|
Formatting.setDatePattern("medium", M_ABAP_DATE_FORMAT_PATTERN[sFormatId].pattern);
|
|
630
753
|
if (bFireEvent) {
|
|
631
754
|
fireChange();
|
|
632
755
|
}
|
|
633
756
|
}
|
|
634
|
-
return this;
|
|
635
757
|
},
|
|
636
758
|
|
|
637
759
|
/**
|
|
638
|
-
* Returns the currently set
|
|
760
|
+
* Returns the currently set ABAP time format (its id) or undefined if none has been set.
|
|
639
761
|
*
|
|
640
762
|
* @returns {"0"|"1"|"2"|"3"|"4"|undefined} ID of the ABAP date format,
|
|
641
763
|
* if not set or set to <code>""</code>, <code>undefined</code> will be returned
|
|
642
764
|
* @public
|
|
765
|
+
* @since 1.120
|
|
643
766
|
*/
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
name: "
|
|
767
|
+
getABAPTimeFormat() {
|
|
768
|
+
const sABAPTimeFormat = oWritableConfig.get({
|
|
769
|
+
name: "sapUiABAPTimeFormat",
|
|
647
770
|
type: BaseConfig.Type.String,
|
|
771
|
+
/**
|
|
772
|
+
* @deprecated As of Version 1.120
|
|
773
|
+
*/
|
|
774
|
+
defaultValue: oWritableConfig.get({
|
|
775
|
+
name: "sapUiLegacyTimeFormat",
|
|
776
|
+
type: BaseConfig.Type.String,
|
|
777
|
+
external: true
|
|
778
|
+
}),
|
|
648
779
|
external: true
|
|
649
780
|
});
|
|
650
|
-
return
|
|
781
|
+
return sABAPTimeFormat ? sABAPTimeFormat.toUpperCase() : undefined;
|
|
651
782
|
},
|
|
652
783
|
|
|
653
784
|
/**
|
|
654
|
-
* Allows to specify one of the
|
|
785
|
+
* Allows to specify one of the ABAP time formats.
|
|
655
786
|
*
|
|
656
787
|
* This method sets the time patterns for 'short' and 'medium' style to the corresponding ABAP
|
|
657
788
|
* formats and sets the day period texts to "AM"/"PM" or "am"/"pm" respectively. When called
|
|
658
789
|
* with a null or undefined format id, any previously applied format will be removed.
|
|
659
790
|
*
|
|
660
|
-
* After changing the
|
|
791
|
+
* After changing the time format, the framework tries to update localization
|
|
661
792
|
* specific parts of the UI. See the documentation of
|
|
662
|
-
* {@link module:sap/base/i18n/Localization.
|
|
793
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
663
794
|
* for details and restrictions.
|
|
664
795
|
*
|
|
665
796
|
* @param {""|"0"|"1"|"2"|"3"|"4"} [sFormatId=""] ID of the ABAP time format,
|
|
666
797
|
* <code>""</code> will reset the time patterns for 'short' and 'medium' style and the day
|
|
667
798
|
* period texts to the locale-specific ones.
|
|
668
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
669
799
|
* @public
|
|
800
|
+
* @since 1.120
|
|
670
801
|
*/
|
|
671
|
-
|
|
802
|
+
setABAPTimeFormat(sFormatId) {
|
|
672
803
|
sFormatId = sFormatId || "";
|
|
673
804
|
check(M_ABAP_TIME_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['0','1','2','3','4'] or empty");
|
|
674
|
-
|
|
675
|
-
|
|
805
|
+
const bFireEvent = !mChanges;
|
|
806
|
+
const sOldFormat = Formatting.getABAPTimeFormat();
|
|
676
807
|
if (sOldFormat !== sFormatId) {
|
|
677
|
-
mChanges
|
|
678
|
-
oWritableConfig.set("
|
|
679
|
-
mChanges.
|
|
808
|
+
mChanges ??= {};
|
|
809
|
+
oWritableConfig.set("sapUiABAPTimeFormat", sFormatId);
|
|
810
|
+
mChanges.ABAPTimeFormat = sFormatId;
|
|
680
811
|
Formatting.setTimePattern("short", M_ABAP_TIME_FORMAT_PATTERN[sFormatId]["short"]);
|
|
681
812
|
Formatting.setTimePattern("medium", M_ABAP_TIME_FORMAT_PATTERN[sFormatId]["medium"]);
|
|
682
813
|
Formatting._setDayPeriods("abbreviated", M_ABAP_TIME_FORMAT_PATTERN[sFormatId].dayPeriods);
|
|
@@ -684,58 +815,65 @@ sap.ui.define([
|
|
|
684
815
|
fireChange();
|
|
685
816
|
}
|
|
686
817
|
}
|
|
687
|
-
return this;
|
|
688
818
|
},
|
|
689
819
|
|
|
690
820
|
/**
|
|
691
|
-
* Returns the currently set
|
|
821
|
+
* Returns the currently set ABAP number format (its id) or undefined if none has been set.
|
|
692
822
|
*
|
|
693
823
|
* @returns {" "|"X"|"Y"|undefined} ID of the ABAP number format,
|
|
694
824
|
* if not set or set to <code>""</code>, <code>undefined</code> will be returned
|
|
695
825
|
* @public
|
|
826
|
+
* @since 1.120
|
|
696
827
|
*/
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
name: "
|
|
828
|
+
getABAPNumberFormat() {
|
|
829
|
+
const sABAPNumberFormat = oWritableConfig.get({
|
|
830
|
+
name: "sapUiABAPNumberFormat",
|
|
700
831
|
type: BaseConfig.Type.String,
|
|
832
|
+
/**
|
|
833
|
+
* @deprecated As of Version 1.120
|
|
834
|
+
*/
|
|
835
|
+
defaultValue: oWritableConfig.get({
|
|
836
|
+
name: "sapUiLegacyNumberFormat",
|
|
837
|
+
type: BaseConfig.Type.String,
|
|
838
|
+
external: true
|
|
839
|
+
}),
|
|
701
840
|
external: true
|
|
702
841
|
});
|
|
703
|
-
return
|
|
842
|
+
return sABAPNumberFormat ? sABAPNumberFormat.toUpperCase() : undefined;
|
|
704
843
|
},
|
|
705
844
|
|
|
706
845
|
/**
|
|
707
|
-
* Allows to specify one of the
|
|
846
|
+
* Allows to specify one of the ABAP number format.
|
|
708
847
|
*
|
|
709
848
|
* This method will modify the 'group' and 'decimal' symbols. When called with a null
|
|
710
849
|
* or undefined format id, any previously applied format will be removed.
|
|
711
850
|
*
|
|
712
|
-
* After changing the
|
|
851
|
+
* After changing the number format, the framework tries to update localization
|
|
713
852
|
* specific parts of the UI. See the documentation of
|
|
714
|
-
* {@link module:sap/base/i18n/Localization.
|
|
853
|
+
* {@link module:sap/base/i18n/Localization.setLanguage Localization.setLanguage()}
|
|
715
854
|
* for details and restrictions.
|
|
716
855
|
*
|
|
717
856
|
* @param {""|" "|"X"|"Y"} [sFormatId=""] ID of the ABAP number format set,
|
|
718
857
|
* <code>""</code> will reset the 'group' and 'decimal' symbols to the locale-specific
|
|
719
858
|
* ones.
|
|
720
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
721
859
|
* @public
|
|
860
|
+
* @since 1.120
|
|
722
861
|
*/
|
|
723
|
-
|
|
862
|
+
setABAPNumberFormat(sFormatId) {
|
|
724
863
|
sFormatId = sFormatId ? sFormatId.toUpperCase() : "";
|
|
725
864
|
check(M_ABAP_NUMBER_FORMAT_SYMBOLS.hasOwnProperty(sFormatId), "sFormatId must be one of [' ','X','Y'] or empty");
|
|
726
|
-
|
|
727
|
-
|
|
865
|
+
const bFireEvent = !mChanges;
|
|
866
|
+
const sOldFormat = Formatting.getABAPNumberFormat();
|
|
728
867
|
if (sOldFormat !== sFormatId) {
|
|
729
|
-
mChanges
|
|
730
|
-
oWritableConfig.set("
|
|
731
|
-
mChanges.
|
|
868
|
+
mChanges ??= {};
|
|
869
|
+
oWritableConfig.set("sapUiABAPNumberFormat", sFormatId);
|
|
870
|
+
mChanges.ABAPNumberFormat = sFormatId;
|
|
732
871
|
Formatting.setNumberSymbol("group", M_ABAP_NUMBER_FORMAT_SYMBOLS[sFormatId].groupingSeparator);
|
|
733
872
|
Formatting.setNumberSymbol("decimal", M_ABAP_NUMBER_FORMAT_SYMBOLS[sFormatId].decimalSeparator);
|
|
734
873
|
if (bFireEvent) {
|
|
735
874
|
fireChange();
|
|
736
875
|
}
|
|
737
876
|
}
|
|
738
|
-
return this;
|
|
739
877
|
},
|
|
740
878
|
|
|
741
879
|
/**
|
|
@@ -745,32 +883,28 @@ sap.ui.define([
|
|
|
745
883
|
* @param {string} aMappings[].dateFormat The date format
|
|
746
884
|
* @param {string} aMappings[].islamicMonthStart The Islamic date
|
|
747
885
|
* @param {string} aMappings[].gregDate The corresponding Gregorian date
|
|
748
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
749
886
|
* @public
|
|
887
|
+
* @since 1.120
|
|
750
888
|
*/
|
|
751
|
-
setLegacyDateCalendarCustomizing
|
|
889
|
+
setLegacyDateCalendarCustomizing(aMappings) {
|
|
752
890
|
check(Array.isArray(aMappings), "aMappings must be an Array");
|
|
753
|
-
|
|
754
|
-
mChanges
|
|
755
|
-
|
|
891
|
+
const bFireEvent = !mChanges;
|
|
892
|
+
mChanges ??= {};
|
|
893
|
+
aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings.slice();
|
|
756
894
|
if (bFireEvent) {
|
|
757
895
|
fireChange();
|
|
758
896
|
}
|
|
759
|
-
return this;
|
|
760
897
|
},
|
|
761
898
|
|
|
762
899
|
/**
|
|
763
900
|
* Returns the currently set customizing data for Islamic calendar support
|
|
764
901
|
*
|
|
765
|
-
* @returns {object[]} Returns an array contains the customizing data. Each element in the array has properties: dateFormat, islamicMonthStart, gregDate. For details, please see {@link #setLegacyDateCalendarCustomizing}
|
|
902
|
+
* @returns {object[]|undefined} Returns an array contains the customizing data. Each element in the array has properties: dateFormat, islamicMonthStart, gregDate. For details, please see {@link #setLegacyDateCalendarCustomizing}
|
|
766
903
|
* @public
|
|
904
|
+
* @since 1.120
|
|
767
905
|
*/
|
|
768
|
-
getLegacyDateCalendarCustomizing
|
|
769
|
-
|
|
770
|
-
if (aLegacyDateCalendarCustomizing) {
|
|
771
|
-
aLegacyDateCalendarCustomizing = aLegacyDateCalendarCustomizing.slice();
|
|
772
|
-
}
|
|
773
|
-
return aLegacyDateCalendarCustomizing;
|
|
906
|
+
getLegacyDateCalendarCustomizing() {
|
|
907
|
+
return aLegacyDateCalendarCustomizing?.slice() ?? undefined;
|
|
774
908
|
},
|
|
775
909
|
|
|
776
910
|
/**
|
|
@@ -785,24 +919,22 @@ sap.ui.define([
|
|
|
785
919
|
* with this setting unless overwritten on instance level.
|
|
786
920
|
*
|
|
787
921
|
* @param {boolean} bTrailingCurrencyCode Whether currency codes shall always be placed after the numeric value
|
|
788
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
789
|
-
* @since 1.75.0
|
|
790
922
|
* @public
|
|
923
|
+
* @since 1.120
|
|
791
924
|
*/
|
|
792
|
-
setTrailingCurrencyCode
|
|
925
|
+
setTrailingCurrencyCode(bTrailingCurrencyCode) {
|
|
793
926
|
check(typeof bTrailingCurrencyCode === "boolean", "bTrailingCurrencyCode must be a boolean");
|
|
794
927
|
oWritableConfig.set("sapUiTrailingCurrencyCode", bTrailingCurrencyCode);
|
|
795
|
-
return this;
|
|
796
928
|
},
|
|
797
929
|
|
|
798
930
|
/**
|
|
799
931
|
* Returns current trailingCurrencyCode configuration for new NumberFormatter instances
|
|
800
932
|
*
|
|
801
933
|
* @return {boolean} Whether currency codes shall always be placed after the numeric value
|
|
802
|
-
* @since 1.75.0
|
|
803
934
|
* @public
|
|
935
|
+
* @since 1.120
|
|
804
936
|
*/
|
|
805
|
-
getTrailingCurrencyCode
|
|
937
|
+
getTrailingCurrencyCode() {
|
|
806
938
|
return oWritableConfig.get({
|
|
807
939
|
name: "sapUiTrailingCurrencyCode",
|
|
808
940
|
type: BaseConfig.Type.Boolean,
|
|
@@ -817,8 +949,10 @@ sap.ui.define([
|
|
|
817
949
|
*
|
|
818
950
|
* @returns {mSettings} The custom LocaleData settings object
|
|
819
951
|
* @private
|
|
952
|
+
* @ui5-restricted sap.ui.core
|
|
953
|
+
* @since 1.116.0
|
|
820
954
|
*/
|
|
821
|
-
getCustomLocaleData
|
|
955
|
+
getCustomLocaleData() {
|
|
822
956
|
return mSettings;
|
|
823
957
|
},
|
|
824
958
|
|
|
@@ -829,10 +963,10 @@ sap.ui.define([
|
|
|
829
963
|
* @returns {module:sap/base/i18n/date/CalendarWeekNumbering} The calendar week numbering algorithm
|
|
830
964
|
*
|
|
831
965
|
* @public
|
|
832
|
-
* @since 1.
|
|
966
|
+
* @since 1.120
|
|
833
967
|
*/
|
|
834
|
-
getCalendarWeekNumbering
|
|
835
|
-
|
|
968
|
+
getCalendarWeekNumbering() {
|
|
969
|
+
let oCalendarWeekNumbering = CalendarWeekNumbering.Default;
|
|
836
970
|
|
|
837
971
|
try {
|
|
838
972
|
oCalendarWeekNumbering = oWritableConfig.get({
|
|
@@ -853,53 +987,51 @@ sap.ui.define([
|
|
|
853
987
|
*
|
|
854
988
|
* @param {module:sap/base/i18n/date/CalendarWeekNumbering} sCalendarWeekNumbering
|
|
855
989
|
* The calendar week numbering algorithm
|
|
856
|
-
* @
|
|
857
|
-
* <code>this</code> to allow method chaining
|
|
858
|
-
* @throws {Error}
|
|
990
|
+
* @throws {TypeError}
|
|
859
991
|
* If <code>sCalendarWeekNumbering</code> is not a valid calendar week numbering algorithm,
|
|
860
992
|
* defined in {@link module:sap/base/i18n/date/CalendarWeekNumbering}
|
|
861
993
|
*
|
|
862
994
|
* @public
|
|
863
|
-
* @since 1.
|
|
995
|
+
* @since 1.120
|
|
864
996
|
*/
|
|
865
|
-
setCalendarWeekNumbering
|
|
997
|
+
setCalendarWeekNumbering(sCalendarWeekNumbering) {
|
|
866
998
|
BaseConfig._.checkEnum(CalendarWeekNumbering, sCalendarWeekNumbering, "calendarWeekNumbering");
|
|
867
|
-
|
|
999
|
+
const sCurrentWeekNumbering = oWritableConfig.get({
|
|
868
1000
|
name: "sapUiCalendarWeekNumbering",
|
|
869
1001
|
type: CalendarWeekNumbering,
|
|
870
1002
|
defaultValue: CalendarWeekNumbering.Default,
|
|
871
1003
|
external: true
|
|
872
1004
|
});
|
|
873
1005
|
if (sCurrentWeekNumbering !== sCalendarWeekNumbering) {
|
|
874
|
-
|
|
875
|
-
mChanges
|
|
1006
|
+
const bFireEvent = !mChanges;
|
|
1007
|
+
mChanges ??= {};
|
|
876
1008
|
oWritableConfig.set("sapUiCalendarWeekNumbering", sCalendarWeekNumbering);
|
|
877
1009
|
mChanges.calendarWeekNumbering = sCalendarWeekNumbering;
|
|
878
1010
|
if (bFireEvent) {
|
|
879
1011
|
fireChange();
|
|
880
1012
|
}
|
|
881
1013
|
}
|
|
882
|
-
return this;
|
|
883
1014
|
},
|
|
884
1015
|
|
|
885
1016
|
/**
|
|
886
1017
|
* Returns the calendar type which is being used in locale dependent functionality.
|
|
887
1018
|
*
|
|
888
|
-
* When it's explicitly set by calling <code>
|
|
1019
|
+
* When it's explicitly set by calling <code>setCalendarType</code>, the set calendar type is returned.
|
|
889
1020
|
* Otherwise, the calendar type is determined by checking the format settings and current locale.
|
|
890
1021
|
*
|
|
891
1022
|
* @returns {module:sap/base/i18n/date/CalendarType} the current calendar type, e.g. <code>Gregorian</code>
|
|
892
|
-
* @
|
|
1023
|
+
* @public
|
|
1024
|
+
* @since 1.120
|
|
893
1025
|
*/
|
|
894
|
-
getCalendarType
|
|
895
|
-
|
|
1026
|
+
getCalendarType() {
|
|
1027
|
+
let sName,
|
|
896
1028
|
sCalendarType = oWritableConfig.get({
|
|
897
1029
|
name: "sapUiCalendarType",
|
|
898
1030
|
type: BaseConfig.Type.String,
|
|
899
1031
|
external: true
|
|
900
1032
|
});
|
|
901
1033
|
|
|
902
|
-
sCalendarType
|
|
1034
|
+
sCalendarType ??= null;
|
|
903
1035
|
|
|
904
1036
|
if (sCalendarType) {
|
|
905
1037
|
for (sName in CalendarType) {
|
|
@@ -910,9 +1042,9 @@ sap.ui.define([
|
|
|
910
1042
|
Log.warning("Parameter 'calendarType' is set to " + sCalendarType + " which isn't a valid value and therefore ignored. The calendar type is determined from format setting and current locale");
|
|
911
1043
|
}
|
|
912
1044
|
|
|
913
|
-
|
|
1045
|
+
const sABAPDateFormat = Formatting.getABAPDateFormat();
|
|
914
1046
|
|
|
915
|
-
switch (
|
|
1047
|
+
switch (sABAPDateFormat) {
|
|
916
1048
|
case "1":
|
|
917
1049
|
case "2":
|
|
918
1050
|
case "3":
|
|
@@ -940,49 +1072,45 @@ sap.ui.define([
|
|
|
940
1072
|
*
|
|
941
1073
|
* @param {module:sap/base/i18n/date/CalendarType|null} sCalendarType the new calendar type. Set it with null to clear the calendar type
|
|
942
1074
|
* and the calendar type is calculated based on the format settings and current locale.
|
|
943
|
-
* @returns {this} <code>this</code> to allow method chaining
|
|
944
1075
|
* @public
|
|
945
|
-
* @since 1.
|
|
1076
|
+
* @since 1.120
|
|
946
1077
|
*/
|
|
947
|
-
setCalendarType
|
|
948
|
-
|
|
1078
|
+
setCalendarType(sCalendarType) {
|
|
1079
|
+
const sOldCalendarType = Formatting.getCalendarType();
|
|
949
1080
|
oWritableConfig.set("sapUiCalendarType", sCalendarType);
|
|
950
|
-
|
|
1081
|
+
const sCurrentCalendarType = Formatting.getCalendarType();
|
|
951
1082
|
if (sOldCalendarType !== sCurrentCalendarType) {
|
|
952
|
-
|
|
953
|
-
mChanges
|
|
1083
|
+
const bFireEvent = !mChanges;
|
|
1084
|
+
mChanges ??= {};
|
|
954
1085
|
mChanges.calendarType = sCurrentCalendarType;
|
|
955
1086
|
if (bFireEvent) {
|
|
956
1087
|
fireChange();
|
|
957
1088
|
}
|
|
958
1089
|
}
|
|
959
|
-
return this;
|
|
960
1090
|
}
|
|
961
1091
|
};
|
|
962
1092
|
|
|
963
1093
|
function fireChange() {
|
|
964
|
-
|
|
1094
|
+
oEventing.fireEvent("change", mChanges);
|
|
965
1095
|
mChanges = undefined;
|
|
966
1096
|
}
|
|
967
1097
|
|
|
968
1098
|
function init() {
|
|
969
|
-
// init
|
|
970
|
-
|
|
971
|
-
if (
|
|
972
|
-
Formatting.
|
|
1099
|
+
// init ABAP formats
|
|
1100
|
+
const sABAPDateFormat = Formatting.getABAPDateFormat();
|
|
1101
|
+
if (sABAPDateFormat !== undefined) {
|
|
1102
|
+
Formatting.setABAPDateFormat(sABAPDateFormat);
|
|
973
1103
|
}
|
|
974
|
-
|
|
975
|
-
if (
|
|
976
|
-
Formatting.
|
|
1104
|
+
const sABAPNumberFormat = Formatting.getABAPNumberFormat();
|
|
1105
|
+
if (sABAPNumberFormat !== undefined) {
|
|
1106
|
+
Formatting.setABAPNumberFormat(sABAPNumberFormat);
|
|
977
1107
|
}
|
|
978
|
-
|
|
979
|
-
if (
|
|
980
|
-
Formatting.
|
|
1108
|
+
const sABAPTimeFormat = Formatting.getABAPTimeFormat();
|
|
1109
|
+
if (sABAPTimeFormat !== undefined) {
|
|
1110
|
+
Formatting.setABAPTimeFormat(sABAPTimeFormat);
|
|
981
1111
|
}
|
|
982
1112
|
}
|
|
983
1113
|
|
|
984
|
-
Eventing.apply(Formatting);
|
|
985
|
-
|
|
986
1114
|
init();
|
|
987
1115
|
|
|
988
1116
|
return Formatting;
|