@openui5/sap.ui.core 1.115.1 → 1.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +18 -0
- package/.eslintrc.json +1 -11
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.sjax.js +2 -2
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/Event.js +106 -0
- package/src/sap/base/Eventing.js +319 -0
- package/src/sap/base/config/MemoryConfigurationProvider.js +10 -1
- package/src/sap/base/config.js +3 -2
- package/src/sap/base/i18n/Formatting.js +989 -0
- package/src/sap/base/i18n/LanguageTag.js +189 -0
- package/src/sap/base/i18n/Localization.js +710 -0
- package/src/sap/base/i18n/ResourceBundle.js +5 -20
- package/src/sap/base/i18n/date/CalendarType.js +54 -0
- package/src/sap/base/i18n/date/CalendarWeekNumbering.js +105 -0
- package/src/sap/base/i18n/date/TimezoneUtils.js +287 -0
- package/src/sap/base/util/JSTokenizer.js +1 -1
- package/src/sap/base/util/fetch.js +4 -4
- package/src/sap/base/util/mixedFetch.js +2 -2
- 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 +2 -2
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +6 -4
- package/src/sap/ui/base/EventProvider.js +4 -12
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +9 -15
- package/src/sap/ui/base/ManagedObjectMetadata.js +33 -12
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/base/SyncPromise.js +10 -5
- package/src/sap/ui/core/.library +3 -3
- package/src/sap/ui/core/AccessKeysEnablement.js +10 -5
- package/src/sap/ui/core/AnimationMode.js +49 -0
- package/src/sap/ui/core/BusyIndicator.js +33 -42
- package/src/sap/ui/core/CalendarType.js +11 -37
- package/src/sap/ui/core/Component.js +4 -5
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +2 -2
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/ConfigTest.js +17 -0
- package/src/sap/ui/core/Configuration.js +409 -1282
- package/src/sap/ui/core/Control.js +7 -12
- package/src/sap/ui/core/ControlBehavior.js +157 -0
- package/src/sap/ui/core/Core.js +126 -132
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +14 -3
- package/src/sap/ui/core/ElementMetadata.js +2 -4
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- 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/IconPool.js +1 -2
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +5 -7
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +12 -12
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +126 -38
- 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 +154 -430
- package/src/sap/ui/core/LocaleData.js +50 -14
- package/src/sap/ui/core/Manifest.js +5 -5
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +37 -50
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/Rendering.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- 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 +11 -9
- package/src/sap/ui/core/StaticArea.js +31 -17
- package/src/sap/ui/core/Theming.js +458 -0
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +1 -1
- 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 +28 -5
- package/src/sap/ui/core/_IconRegistry.js +89 -12
- package/src/sap/ui/core/boot/_bootConfig.js +137 -0
- package/src/sap/ui/core/boot/_runBoot.js +16 -0
- package/src/sap/ui/core/boot/initDOM.js +96 -0
- package/src/sap/ui/core/boot/loadCalendar.js +50 -0
- package/src/sap/ui/core/boot/loadManifest.js +55 -0
- package/src/sap/ui/core/boot/loadModules.js +80 -0
- package/src/sap/ui/core/boot/manifest.json +11 -0
- package/src/sap/ui/core/boot/onInit.js +44 -0
- package/src/sap/ui/core/boot.js +107 -0
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +12 -83
- package/src/sap/ui/core/date/UI5Date.js +10 -4
- package/src/sap/ui/core/delegate/ItemNavigation.js +8 -10
- package/src/sap/ui/core/delegate/ScrollEnablement.js +5 -5
- 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 -27
- package/src/sap/ui/core/format/TimezoneUtil.js +15 -273
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +32 -6
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageMixin.js +6 -5
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_ar.properties +57 -55
- package/src/sap/ui/core/messagebundle_bg.properties +57 -55
- package/src/sap/ui/core/messagebundle_ca.properties +30 -28
- package/src/sap/ui/core/messagebundle_cs.properties +44 -42
- package/src/sap/ui/core/messagebundle_cy.properties +59 -57
- package/src/sap/ui/core/messagebundle_da.properties +57 -55
- package/src/sap/ui/core/messagebundle_de.properties +59 -57
- package/src/sap/ui/core/messagebundle_el.properties +48 -46
- package/src/sap/ui/core/messagebundle_en.properties +59 -57
- package/src/sap/ui/core/messagebundle_en_GB.properties +59 -57
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +3 -0
- package/src/sap/ui/core/messagebundle_es.properties +48 -46
- package/src/sap/ui/core/messagebundle_es_MX.properties +58 -56
- package/src/sap/ui/core/messagebundle_et.properties +55 -53
- package/src/sap/ui/core/messagebundle_fi.properties +51 -49
- package/src/sap/ui/core/messagebundle_fr.properties +36 -34
- package/src/sap/ui/core/messagebundle_fr_CA.properties +21 -19
- package/src/sap/ui/core/messagebundle_hi.properties +42 -40
- package/src/sap/ui/core/messagebundle_hr.properties +57 -55
- package/src/sap/ui/core/messagebundle_hu.properties +58 -56
- package/src/sap/ui/core/messagebundle_id.properties +59 -57
- package/src/sap/ui/core/messagebundle_it.properties +75 -73
- package/src/sap/ui/core/messagebundle_iw.properties +59 -57
- package/src/sap/ui/core/messagebundle_ja.properties +50 -48
- package/src/sap/ui/core/messagebundle_kk.properties +44 -42
- package/src/sap/ui/core/messagebundle_ko.properties +20 -18
- package/src/sap/ui/core/messagebundle_lt.properties +59 -57
- package/src/sap/ui/core/messagebundle_lv.properties +59 -57
- package/src/sap/ui/core/messagebundle_ms.properties +60 -58
- package/src/sap/ui/core/messagebundle_nl.properties +58 -56
- package/src/sap/ui/core/messagebundle_no.properties +56 -54
- package/src/sap/ui/core/messagebundle_pl.properties +56 -54
- package/src/sap/ui/core/messagebundle_pt.properties +58 -56
- package/src/sap/ui/core/messagebundle_pt_PT.properties +58 -56
- package/src/sap/ui/core/messagebundle_ro.properties +59 -57
- package/src/sap/ui/core/messagebundle_ru.properties +57 -55
- package/src/sap/ui/core/messagebundle_sh.properties +59 -57
- package/src/sap/ui/core/messagebundle_sk.properties +57 -55
- package/src/sap/ui/core/messagebundle_sl.properties +58 -56
- package/src/sap/ui/core/messagebundle_sv.properties +54 -52
- package/src/sap/ui/core/messagebundle_th.properties +18 -16
- package/src/sap/ui/core/messagebundle_tr.properties +58 -56
- package/src/sap/ui/core/messagebundle_uk.properties +59 -57
- package/src/sap/ui/core/messagebundle_vi.properties +59 -57
- package/src/sap/ui/core/messagebundle_zh_CN.properties +58 -56
- package/src/sap/ui/core/messagebundle_zh_TW.properties +58 -56
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +14 -2
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +14 -16
- 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/HashChanger.js +1 -0
- package/src/sap/ui/core/routing/Route.js +1 -0
- package/src/sap/ui/core/routing/Router.js +3 -1
- package/src/sap/ui/core/rules/Config.support.js +2 -2
- package/src/sap/ui/core/rules/Misc.support.js +1 -1
- package/src/sap/ui/core/rules/Model.support.js +3 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +7 -4
- package/src/sap/ui/core/support/controls/TimelineOverview.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +2 -2
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- 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 +1 -1
- 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/themes/base/Icon.less +2 -2
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +4 -4
- package/src/sap/ui/core/themes/base/base.less +41 -20
- 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/theming/Parameters.js +6 -10
- package/src/sap/ui/core/theming/ThemeManager.js +312 -450
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +5 -10
- 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 +4 -5
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +3 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/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 +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/events/PseudoEvents.js +17 -9
- package/src/sap/ui/model/Binding.js +19 -15
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +57 -19
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +42 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +5 -4
- package/src/sap/ui/model/PropertyBinding.js +10 -0
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +4 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +166 -79
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +4 -3
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +2 -2
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +14 -27
- package/src/sap/ui/model/analytics/odata4analytics.js +6 -12
- package/src/sap/ui/model/base/ManagedObjectModel.js +3 -2
- package/src/sap/ui/model/json/JSONModel.js +6 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +191 -5
- package/src/sap/ui/model/odata/ODataMetadata.js +38 -4
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- 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 +8 -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 +3 -3
- 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 +3 -2
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +14 -3
- package/src/sap/ui/model/odata/v2/ODataModel.js +46 -32
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +4 -4
- package/src/sap/ui/model/odata/v4/Context.js +39 -32
- package/src/sap/ui/model/odata/v4/ODataBinding.js +85 -52
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +23 -19
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +139 -50
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +30 -36
- package/src/sap/ui/model/odata/v4/ODataModel.js +49 -44
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +72 -37
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +34 -29
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +95 -9
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +25 -27
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +95 -209
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +168 -1
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +14 -5
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +34 -19
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +4 -4
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- 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/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/TestUtils.js +1 -1
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +1 -3
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +10 -5
- package/src/sap/ui/test/matchers/LabelFor.js +1 -0
- package/src/sap/ui/test/matchers/_Visitor.js +6 -1
- package/src/sap/ui/test/starter/_setupAndStart.js +2 -5
- package/src/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
- package/src/sap/ui/thirdparty/qunit-2.js +9 -3
- package/src/sap/ui/util/ActivityDetection.js +7 -1
- package/src/sap/ui/util/Mobile.js +21 -14
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap-ui-boot.js +23 -6
- package/src/ui5-boot.js +50 -0
- package/src/ui5loader-autoconfig.js +150 -75
- package/src/ui5loader.js +458 -514
- package/test/sap/ui/core/Device.js +1 -1
- package/test/sap/ui/core/FormatHelper.js +3 -2
- package/test/sap/ui/core/demokit/docuindex.json +6 -0
- package/test/sap/ui/core/demokit/sample/OpaAction/applicationUnderTest/view/Main.view.xml +1 -0
- package/test/sap/ui/core/demokit/sample/OpaBusyIndicator/OpaBusyIndicator.js +1 -1
- package/test/sap/ui/core/demokit/sample/OpaMatchers/OpaMatchers.js +2 -2
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/MIT.ODataTypes.html +9 -14
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js +7 -0
- package/test/sap/ui/core/demokit/sample/ViewTemplate/types/Template.controller.js +2 -2
- package/test/sap/ui/core/demokit/sample/common/pages/Any.js +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v2/AutoExpand/AutoExpand.view.xml +24 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/Ancestry/Main.view.xml +24 -6
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/DataAggregation.view.xml +20 -5
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/DataAggregation/tests/filter.js +2 -2
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Component.js +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.controller.js +43 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ListReport.view.xml +47 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.controller.js +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Main.view.xml +7 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/NotFound.view.xml +8 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.controller.js +123 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/ObjectPage.view.xml +92 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.html +27 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/Opa.qunit.js +70 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/README.html +55 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/SandboxModel.js +56 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/POST-SalesOrderList.json +66 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000')-SO_2_SOITEM.json +57 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000000').json +20 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000001').json +9 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList('0500000007')-SO_2_BP.json +12 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/SalesOrderList.json +62 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.json +85 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_CurrencyCode.xml +185 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.json +93 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/VH_ProductID.xml +262 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/data/metadata.xml +1779 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/manifest.json +134 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/DeepCreate/pages/Main.js +119 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/Draft/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FieldGroups/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FlatDataAggregation/FlatDataAggregation.view.xml +4 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/FlexibleColumnLayout/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/GridTable/GridTable.view.xml +12 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Main.controller.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.OptimisticBatch.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/LateProperties/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBinding/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ListBindingTemplate/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/MultipleInlineCreationRowsGrid/pages/Main.js +0 -41
- package/test/sap/ui/core/demokit/sample/odata/v4/Products/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/RecursiveHierarchy.view.xml +26 -8
- package/test/sap/ui/core/demokit/sample/odata/v4/RecursiveHierarchy/data/metadata.xml +4 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V2/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrderTP100_V4/manifest.json +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Main.controller.js +5 -17
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/pages/Main.js +18 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrders/tests/Create.js +10 -6
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersRTATest/manifest.json +18 -0
- package/test/sap/ui/core/demokit/sample/odata/v4/SalesOrdersTemplate/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Main.view.xml +3 -3
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/ServerDrivenPaging/pages/Main.js +4 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Sticky/Opa.qunit.js +2 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/webapp/test/integration/arrangements/Startup.js +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/controller/App.controller.js +1 -6
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/controller/App.controller.js +3 -8
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/controller/App.controller.js +3 -8
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/localService/mockserver.js +1 -0
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/webapp/test/integration/arrangements/Startup.js +1 -1
- package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +25 -7
- package/test/sap/ui/core/qunit/ControlRenderer.qunit.js +86 -2
- package/test/sap/ui/core/qunit/DataState.qunit.js +2 -7
- package/test/sap/ui/core/qunit/HTML.qunit.js +31 -31
- package/test/sap/ui/core/qunit/IconPool.qunit.js +53 -4
- package/test/sap/ui/core/qunit/Lib.qunit.js +55 -2
- package/test/sap/ui/core/qunit/LocalBusyIndicator.qunit.js +22 -15
- package/test/sap/ui/core/qunit/ManagedObject.qunit.js +5 -3
- package/test/sap/ui/core/qunit/ManagedObjectModel.qunit.js +43 -5
- package/test/sap/ui/core/qunit/Object.qunit.js +4 -1
- package/test/sap/ui/core/qunit/ThemeManager.qunit.js +2 -2
- package/test/sap/ui/core/qunit/ThemeParameters.qunit.js +9 -3
- package/test/sap/ui/core/qunit/Theming.beforeBootstrap.qunit.js +13 -0
- package/test/sap/ui/core/qunit/Theming.qunit.js +247 -0
- package/test/sap/ui/core/qunit/analytics/AnalyticalBinding.qunit.js +510 -185
- package/test/sap/ui/core/qunit/analytics/AnalyticalTreeBindingAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/analytics/ODataModelAdapter.qunit.js +81 -16
- package/test/sap/ui/core/qunit/analytics/odata4analytics.qunit.js +20 -29
- package/test/sap/ui/core/qunit/app/MessageListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/base/Config_cascade.qunit.js +18 -1
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.html +24 -0
- package/test/sap/ui/core/qunit/base/i18n/Formatting.qunit.js +277 -0
- package/test/sap/ui/core/qunit/base/i18n/Localization.qunit.js +282 -0
- package/test/sap/ui/core/qunit/base/i18n/ResourceBundle.qunit.js +5 -6
- package/test/sap/ui/core/qunit/base/security/sanitizeHTML.qunit.js +17 -0
- package/test/sap/ui/core/qunit/bootstrap/BootstrapPreload.qunit.js +1 -2
- package/test/sap/ui/core/qunit/bootstrap/BootstrapWithCustomBootTask.beforeBootstrap.qunit.js +13 -12
- package/test/sap/ui/core/qunit/bootstrap/Configuration.main.qunit.js +11 -0
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.html +4 -3
- package/test/sap/ui/core/qunit/bootstrap/Configuration.qunit.js +451 -281
- package/test/sap/ui/core/qunit/bootstrap/ThemeVersion.qunit.js +19 -30
- package/test/sap/ui/core/qunit/component/Models.qunit.js +12 -30
- package/test/sap/ui/core/qunit/component/Models_unavoidablySync.qunit.js +8 -26
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib2/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib3/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library-preload.json +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/lib4/library.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/manifestcomp/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/mycomp/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component-preload.js +1 -1
- package/test/sap/ui/core/qunit/component/testdata/async/mysubcomp/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/Component.js +0 -4
- package/test/sap/ui/core/qunit/component/testdata/customizing/customer/ext/sync/Component.js +2 -6
- package/test/sap/ui/core/qunit/component/testdata/customizing/customersub/Component.js +0 -4
- package/test/sap/ui/core/qunit/component/testdata/inherit/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/inherit/parent/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentA/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsync/parentB/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentA/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/inheritAsyncError/parentB/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/other/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/terminologies/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component1/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component2/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component3/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/component5/Component.js +2 -2
- package/test/sap/ui/core/qunit/component/testdata/terminologies/reuse/Component.js +2 -3
- package/test/sap/ui/core/qunit/component/testdata/v1/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v1empty/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v1inline/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v1missing/Component.js +2 -7
- package/test/sap/ui/core/qunit/component/testdata/v2/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2asyncRootView/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2empty/Component.js +2 -9
- package/test/sap/ui/core/qunit/component/testdata/v2inline/Component.js +2 -5
- package/test/sap/ui/core/qunit/component/testdata/v2missing/Component.js +2 -9
- package/test/sap/ui/core/qunit/component/testdata/v2version/Component.js +2 -2
- package/test/sap/ui/core/qunit/dnd/DragDropInfo.qunit.js +1 -2
- package/test/sap/ui/core/qunit/generic/EnforceSemanticRendering.qunit.js +2 -2
- package/test/sap/ui/core/qunit/generic/SettersContextReturn.qunit.js +2 -2
- package/test/sap/ui/core/qunit/generic/legacy/ControlMemoryLeaks.qunit.js +2 -0
- package/test/sap/ui/core/qunit/generic/legacy/DuplicateIdCheck.qunit.js +2 -0
- package/test/sap/ui/core/qunit/generic/legacy/SettersContextReturn.qunit.js +2 -2
- package/test/sap/ui/core/qunit/gherkin/dataTableUtils.qunit.js +2 -2
- package/test/sap/ui/core/qunit/i18n/Locale.qunit.js +0 -52
- package/test/sap/ui/core/qunit/i18n/LocaleData.qunit.js +49 -14
- package/test/sap/ui/core/qunit/i18n/UI5Date.qunit.js +16 -4
- package/test/sap/ui/core/qunit/i18n/UniversalDate.qunit.js +74 -114
- package/test/sap/ui/core/qunit/i18n/UniversalDateUtils.qunit.js +34 -39
- package/test/sap/ui/core/qunit/i18n/testsuite.i18n.qunit.js +18 -0
- package/test/sap/ui/core/qunit/internal/1RingModels.qunit.js +1 -0
- package/test/sap/ui/core/qunit/internal/BeforePush.ODataV4.js +28 -0
- package/test/sap/ui/core/qunit/internal/BeforePush.html +1 -0
- package/test/sap/ui/core/qunit/internal/BeforePush.js +15 -0
- package/test/sap/ui/core/qunit/internal/performance/ExpressionParser.performance.qunit.js +1 -0
- package/test/sap/ui/core/qunit/json/JSONListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/json/JSONPropertyBinding.qunit.js +7 -12
- package/test/sap/ui/core/qunit/json/JSONTwoWay.qunit.js +3 -8
- package/test/sap/ui/core/qunit/loader/asyncMode.qunit.js +2 -2
- package/test/sap/ui/core/qunit/loader/asyncMode_unavoidablySync.qunit.js +1 -1
- package/test/sap/ui/core/qunit/loader/fixture/amd-with-export-true/module1.js +2 -2
- package/test/sap/ui/core/qunit/loader/testsuite.loader.qunit.js +0 -3
- package/test/sap/ui/core/qunit/messages/MessageMixin.qunit.js +2 -7
- package/test/sap/ui/core/qunit/messages/messagesUsage.qunit.js +1 -1
- package/test/sap/ui/core/qunit/model/Binding.qunit.js +36 -11
- package/test/sap/ui/core/qunit/model/ClientListBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ClientTreeBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/CompositeDataState.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/Context.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/ContextBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/FAR_CUSTOMER_LINE_ITEMS.metadata.xml +2 -0
- package/test/sap/ui/core/qunit/model/ListBinding.qunit.js +63 -6
- package/test/sap/ui/core/qunit/model/Model.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +40 -0
- package/test/sap/ui/core/qunit/model/TreeBinding.qunit.js +2 -7
- package/test/sap/ui/core/qunit/model/TreeBindingAdapter.qunit.js +2 -7
- package/test/sap/ui/core/qunit/mvc/XMLTemplateProcessorRequireXML.qunit.js +51 -0
- package/test/sap/ui/core/qunit/mvc/XMLView.qunit.js +9 -8
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions.qunit.js +4 -4
- package/test/sap/ui/core/qunit/mvc/extensions/Controllerextensions_legacy.qunit.js +4 -4
- package/test/sap/ui/core/qunit/mvc/testdata/Async.view.xml +1 -1
- package/test/sap/ui/core/qunit/mvc/testdata/AsyncTypedView.js +5 -1
- package/test/sap/ui/core/qunit/odata/AnnotationParserNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/ODataMessageParser.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/ODataMessageParserNoFakeService.qunit.js +2 -8
- package/test/sap/ui/core/qunit/odata/ODataMetadataNoFakeService.qunit.js +68 -9
- package/test/sap/ui/core/qunit/odata/type/DateTimeBase.qunit.js +24 -0
- package/test/sap/ui/core/qunit/odata/v2/Context.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataContextBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataListBindingNoFakeService.qunit.js +31 -17
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +260 -56
- package/test/sap/ui/core/qunit/odata/v2/ODataModelNoFakeService.qunit.js +70 -15
- package/test/sap/ui/core/qunit/odata/v2/ODataPropertyBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingFlatNoFakeService.qunit.js +4 -9
- package/test/sap/ui/core/qunit/odata/v2/ODataTreeBindingNoFakeService.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v2/V2ODataModel.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v2/_CreatedContextsCache.qunit.js +2 -7
- package/test/sap/ui/core/qunit/odata/v4/AnnotationHelper.qunit.js +1 -1
- package/test/sap/ui/core/qunit/odata/v4/Context.qunit.js +55 -22
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +184 -151
- package/test/sap/ui/core/qunit/odata/v4/ODataContextBinding.qunit.js +60 -30
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +305 -69
- package/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js +20 -69
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +1282 -255
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.qunit.js +90 -61
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.realOData.qunit.js +0 -3
- package/test/sap/ui/core/qunit/odata/v4/ODataParentBinding.qunit.js +283 -170
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +103 -78
- package/test/sap/ui/core/qunit/odata/v4/data/metadata.json +2 -1
- package/test/sap/ui/core/qunit/odata/v4/data/metadata.xml +4 -0
- package/test/sap/ui/core/qunit/odata/v4/data/metadata_special_cases.xml +2 -0
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationCache.qunit.js +151 -1
- package/test/sap/ui/core/qunit/odata/v4/lib/_AggregationHelper.qunit.js +24 -11
- package/test/sap/ui/core/qunit/odata/v4/lib/_Cache.qunit.js +279 -458
- package/test/sap/ui/core/qunit/odata/v4/lib/_Helper.qunit.js +204 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_MetadataRequestor.qunit.js +7 -3
- package/test/sap/ui/core/qunit/odata/v4/lib/_Requestor.qunit.js +145 -26
- package/test/sap/ui/core/qunit/odata/v4/testsuite.odatav4.qunit.js +4 -0
- package/test/sap/ui/core/qunit/opa/_LogCollector.qunit.js +1 -1
- package/test/sap/ui/core/qunit/opa/matchers/LabelFor.qunit.js +4 -2
- package/test/sap/ui/core/qunit/opa/matchers/_Busy.qunit.js +129 -2
- package/test/sap/ui/core/qunit/opa/matchers/_Editable.qunit.js +5 -1
- package/test/sap/ui/core/qunit/performance/trace/FESR.qunit.js +5 -0
- package/test/sap/ui/core/qunit/resource/ResourceModel.qunit.js +17 -37
- package/test/sap/ui/core/qunit/routing/HashChanger.qunit.js +1 -6
- package/test/sap/ui/core/qunit/routing/RouterHashChanger.qunit.js +1 -10
- package/test/sap/ui/core/qunit/routing/async/Router.qunit.js +1 -22
- package/test/sap/ui/core/qunit/routing/async/Target.qunit.js +1 -4
- package/test/sap/ui/core/qunit/routing/fixture/Async1.view.xml +1 -1
- package/test/sap/ui/core/qunit/rule/model/modelSupport.qunit.js +34 -1
- package/test/sap/ui/core/qunit/testdata/fastnavigation/view/FastNavigation.view.xml +2 -2
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/i18n.properties +1 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/library.js +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib1/manifest.json +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/library.js +10 -0
- package/test/sap/ui/core/qunit/testdata/libraries/resourcebundle/lib2/messagebundle.properties +1 -0
- package/test/sap/ui/core/qunit/testdata/xml-require/helper/Formatter.js +7 -4
- package/test/sap/ui/core/qunit/testdata/xml-require/view/XMLTemplateProcessorAsync_require_in_html.view.xml +36 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.databinding.qunit.js +3 -0
- package/test/sap/ui/core/qunit/testsuites/testsuite.theming.qunit.js +29 -0
- package/test/sap/ui/core/qunit/types/DateFormatTimezones.qunit.js +1381 -1570
- package/test/sap/ui/core/qunit/types/SimpleType.qunit.js +16 -2
- package/test/sap/ui/core/qunit/types/Types.qunit.js +2 -37
- package/test/sap/ui/core/qunit/types/testsuite.types.qunit.js +1 -1
- package/test/sap/ui/core/qunit/util/Popup.qunit.js +7 -11
- package/test/sap/ui/core/qunit/util/SyncPromise.qunit.js +4 -1
- package/test/sap/ui/core/qunit/util/XMLPreprocessor.qunit.js +3 -1
- package/test/sap/ui/core/qunit/util/jQuery.sap.Version.qunit.js +3 -0
- package/test/sap/ui/core/qunit/util/jQuery.sap.measure.qunit.js +16 -11
- package/test/sap/ui/core/qunit/util/reflection/BaseTreeModifier.qunit.js +1 -1
- package/test/sap/ui/core/qunit/xml/XMLListBinding.qunit.js +1 -3
- package/test/sap/ui/core/qunit/xml/XMLModel.qunit.js +4 -14
- package/test/sap/ui/core/qunit/xml/XMLPropertyBinding.qunit.js +7 -11
- package/test/sap/ui/core/qunit/xml/XMLTreeBinding.qunit.js +1 -1
- package/test/sap/ui/core/qunit/xml/XMLTwoWay.qunit.js +3 -7
- package/test/sap/ui/core/relnotes/changes-1.115.json +1 -37
- package/test/sap/ui/core/relnotes/changes-1.116.json +71 -0
- package/test/sap/ui/core/relnotes/changes-1.117.json +127 -0
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/firstItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/initial.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/lastItem-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/leftDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/myButtonSample-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/ContextMenuSupport/windows/1600x1200/chrome/horizon/ltr/cozy/rightDownBtn-contextMenu.ref.lnk +1 -1
- package/test/sap/ui/core/visual/images/HyphenationPlayground/windows/1600x1200/chrome/horizon/ltr/cozy/19_thirdParty_language_sl.ref.lnk +1 -1
- package/test/testsuite/js/samples.js +2 -0
- package/ui5.yaml +166 -1
- package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +0 -45
- /package/test/sap/ui/core/qunit/bootstrap/{GlobalConfigurationSettings.js → Configuration.beforeBootstrap.qunit.js} +0 -0
|
@@ -8,54 +8,50 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'../Device',
|
|
10
10
|
'../base/Object',
|
|
11
|
-
'./
|
|
11
|
+
'./AnimationMode',
|
|
12
|
+
'./ControlBehavior',
|
|
12
13
|
'./Locale',
|
|
13
14
|
"./format/TimezoneUtil",
|
|
14
|
-
'sap/ui/thirdparty/URI',
|
|
15
15
|
"sap/ui/core/_ConfigurationProvider",
|
|
16
16
|
"sap/ui/core/date/CalendarWeekNumbering",
|
|
17
|
-
"sap/
|
|
18
|
-
"sap/base/util/deepEqual",
|
|
17
|
+
"sap/ui/core/Theming",
|
|
19
18
|
"sap/base/util/Version",
|
|
20
19
|
"sap/base/Log",
|
|
21
20
|
"sap/base/assert",
|
|
22
21
|
"sap/base/config",
|
|
22
|
+
"sap/base/Event",
|
|
23
23
|
"sap/base/strings/camelize",
|
|
24
24
|
"sap/base/util/deepClone",
|
|
25
|
-
"sap/base/
|
|
26
|
-
"sap/base/
|
|
25
|
+
"sap/base/i18n/Localization",
|
|
26
|
+
"sap/base/i18n/Formatting"
|
|
27
27
|
],
|
|
28
28
|
function(
|
|
29
29
|
Device,
|
|
30
30
|
BaseObject,
|
|
31
|
-
|
|
31
|
+
AnimationMode,
|
|
32
|
+
ControlBehavior,
|
|
32
33
|
Locale,
|
|
33
34
|
TimezoneUtil,
|
|
34
|
-
URI,
|
|
35
35
|
_ConfigurationProvider,
|
|
36
36
|
CalendarWeekNumbering,
|
|
37
|
-
|
|
38
|
-
deepEqual,
|
|
37
|
+
Theming,
|
|
39
38
|
Version,
|
|
40
39
|
Log,
|
|
41
40
|
assert,
|
|
42
41
|
BaseConfig,
|
|
42
|
+
BaseEvent,
|
|
43
43
|
camelize,
|
|
44
44
|
deepClone,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
Localization,
|
|
46
|
+
Formatting
|
|
47
47
|
) {
|
|
48
48
|
"use strict";
|
|
49
49
|
|
|
50
|
-
// Singleton instance for configuration
|
|
51
|
-
var oConfiguration;
|
|
52
50
|
var M_SETTINGS;
|
|
53
|
-
var VERSION = "1.
|
|
51
|
+
var VERSION = "1.117.0";
|
|
54
52
|
var mCompatVersion;
|
|
55
53
|
|
|
56
54
|
// Helper Functions
|
|
57
|
-
var Object_hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
|
|
58
|
-
|
|
59
55
|
function _calcCompatVersions() {
|
|
60
56
|
var PARAM_CVERS = "sapUiCompatversion";
|
|
61
57
|
|
|
@@ -102,7 +98,7 @@ sap.ui.define([
|
|
|
102
98
|
return convertToLocaleOrNull( (navigator.languages && navigator.languages[0]) || navigatorLanguage() || navigator.userLanguage || navigator.browserLanguage ) || new Locale("en");
|
|
103
99
|
}
|
|
104
100
|
|
|
105
|
-
function setValue(sName, vValue
|
|
101
|
+
function setValue(sName, vValue) {
|
|
106
102
|
if ( vValue == null ) {
|
|
107
103
|
return;
|
|
108
104
|
}
|
|
@@ -167,7 +163,7 @@ sap.ui.define([
|
|
|
167
163
|
// When the type is none of the above types, check if an object as enum is provided to validate the value.
|
|
168
164
|
var vType = M_SETTINGS[sName].type;
|
|
169
165
|
if (typeof vType === "object") {
|
|
170
|
-
checkEnum(vType, vValue, sName);
|
|
166
|
+
BaseConfig._.checkEnum(vType, vValue, sName);
|
|
171
167
|
return vValue;
|
|
172
168
|
} else {
|
|
173
169
|
throw new Error("illegal state");
|
|
@@ -183,62 +179,6 @@ sap.ui.define([
|
|
|
183
179
|
}
|
|
184
180
|
}
|
|
185
181
|
|
|
186
|
-
function validateThemeOrigin(sOrigin) {
|
|
187
|
-
var sAllowedOrigins = getMetaTagValue("sap-allowedThemeOrigins");
|
|
188
|
-
return !!sAllowedOrigins && sAllowedOrigins.split(",").some(function(sAllowedOrigin) {
|
|
189
|
-
return sAllowedOrigin === "*" || sOrigin === sAllowedOrigin.trim();
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function validateThemeRoot(sThemeRoot) {
|
|
194
|
-
var oThemeRoot,
|
|
195
|
-
sPath;
|
|
196
|
-
|
|
197
|
-
try {
|
|
198
|
-
// Remove search query as they are not supported for themeRoots/resourceRoots
|
|
199
|
-
oThemeRoot = new URI(sThemeRoot).search("");
|
|
200
|
-
|
|
201
|
-
// If the URL is absolute, validate the origin
|
|
202
|
-
var sOrigin = oThemeRoot.origin();
|
|
203
|
-
if (sOrigin && validateThemeOrigin(sOrigin)) {
|
|
204
|
-
sPath = oThemeRoot.toString();
|
|
205
|
-
} else {
|
|
206
|
-
// For relative URLs or not allowed origins
|
|
207
|
-
// ensure same origin and resolve relative paths based on href
|
|
208
|
-
sPath = oThemeRoot.absoluteTo(window.location.href).origin(window.location.origin).normalize().toString();
|
|
209
|
-
}
|
|
210
|
-
return sPath + (sPath.endsWith('/') ? '' : '/') + "UI5/";
|
|
211
|
-
} catch (e) {
|
|
212
|
-
// malformed URL are also not accepted
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
var M_ANIMATION_MODE = /** @lends sap.ui.core.Configuration.AnimationMode */{
|
|
217
|
-
/**
|
|
218
|
-
* <code>full</code> represents a mode with unrestricted animation capabilities.
|
|
219
|
-
* @public
|
|
220
|
-
*/
|
|
221
|
-
full : "full",
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* <code>basic</code> can be used for a reduced, more light-weight set of animations.
|
|
225
|
-
* @public
|
|
226
|
-
*/
|
|
227
|
-
basic : "basic",
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* <code>minimal</code> includes animations of fundamental functionality.
|
|
231
|
-
* @public
|
|
232
|
-
*/
|
|
233
|
-
minimal : "minimal",
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* <code>none</code> deactivates the animation completely.
|
|
237
|
-
* @public
|
|
238
|
-
*/
|
|
239
|
-
none : "none"
|
|
240
|
-
};
|
|
241
|
-
|
|
242
182
|
// Definition of supported settings
|
|
243
183
|
// Valid property types are: string, boolean, string[], code, object, function, function[].
|
|
244
184
|
// Objects as an enumeration list of valid values can also be provided (e.g. Configuration.AnimationMode).
|
|
@@ -253,7 +193,7 @@ sap.ui.define([
|
|
|
253
193
|
"accessibility" : { type : "boolean", defaultValue : true },
|
|
254
194
|
"autoAriaBodyRole" : { type : "boolean", defaultValue : false, noUrl:true }, //whether the framework automatically adds the ARIA role 'application' to the html body
|
|
255
195
|
"animation" : { type : "boolean", defaultValue : true }, // deprecated, please use animationMode
|
|
256
|
-
"animationMode" : { type :
|
|
196
|
+
"animationMode" : { type : AnimationMode, defaultValue : undefined }, // If no value is provided, animationMode will be set on instantiation depending on the animation setting.
|
|
257
197
|
"rtl" : { type : "boolean", defaultValue : null },
|
|
258
198
|
"debug" : { type : "boolean", defaultValue : false },
|
|
259
199
|
"inspect" : { type : "boolean", defaultValue : false },
|
|
@@ -318,16 +258,40 @@ sap.ui.define([
|
|
|
318
258
|
};
|
|
319
259
|
|
|
320
260
|
var M_COMPAT_FEATURES = {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
261
|
+
"xx-test" : "1.15", //for testing purposes only
|
|
262
|
+
"flexBoxPolyfill" : "1.14",
|
|
263
|
+
"sapMeTabContainer" : "1.14",
|
|
264
|
+
"sapMeProgessIndicator" : "1.14",
|
|
265
|
+
"sapMGrowingList" : "1.14",
|
|
266
|
+
"sapMListAsTable" : "1.14",
|
|
267
|
+
"sapMDialogWithPadding" : "1.14",
|
|
268
|
+
"sapCoreBindingSyntax" : "1.24"
|
|
329
269
|
};
|
|
330
270
|
|
|
271
|
+
// Lazy dependency to core
|
|
272
|
+
var oCore;
|
|
273
|
+
|
|
274
|
+
// ---- change handling ----
|
|
275
|
+
|
|
276
|
+
var mChanges;
|
|
277
|
+
|
|
278
|
+
function _collect() {
|
|
279
|
+
mChanges = mChanges || { __count : 0};
|
|
280
|
+
mChanges.__count++;
|
|
281
|
+
return mChanges;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function _endCollect() {
|
|
285
|
+
if ( mChanges && (--mChanges.__count) === 0 ) {
|
|
286
|
+
var mChangesToReport = mChanges;
|
|
287
|
+
delete mChanges.__count;
|
|
288
|
+
mChanges = undefined;
|
|
289
|
+
oCore && oCore.fireLocalizationChanged(mChangesToReport);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// ---- Configuration state and init ----
|
|
294
|
+
|
|
331
295
|
/**
|
|
332
296
|
* Creates a new Configuration object.
|
|
333
297
|
*
|
|
@@ -361,285 +325,168 @@ sap.ui.define([
|
|
|
361
325
|
*
|
|
362
326
|
* @hideconstructor
|
|
363
327
|
* @extends sap.ui.base.Object
|
|
364
|
-
* @author Frank Weigel (Martin Schaus)
|
|
365
328
|
* @public
|
|
366
329
|
* @alias sap.ui.core.Configuration
|
|
330
|
+
*
|
|
331
|
+
* @borrows module:sap/base/i18n/Localization.getSAPLogonLanguage as getSAPLogonLanguage
|
|
332
|
+
* @borrows module:sap/base/i18n/Localization.getTimezone as getTimezone
|
|
333
|
+
* @borrows module:sap/base/i18n/Localization.setLanguage as setLanguage
|
|
334
|
+
* @borrows module:sap/base/i18n/Localization.getRTL as getRTL
|
|
335
|
+
* @borrows module:sap/base/i18n/Localization.setRTL as setRTL
|
|
336
|
+
* @borrows module:sap/base/i18n/Localization.getLanguagesDeliveredWithCore as getLanguagesDeliveredWithCore
|
|
337
|
+
* @borrows module:sap/base/i18n/Localization.getSupportedLanguages as getSupportedLanguages
|
|
338
|
+
* @borrows module:sap/ui/core/Theming.getTheme as getTheme
|
|
339
|
+
* @borrows module:sap/ui/core/Theming.setTheme as setTheme
|
|
340
|
+
* @borrows module:sap/ui/core/ControlBehavior.isAccessibilityEnabled as getAccessibility
|
|
367
341
|
*/
|
|
368
342
|
var Configuration = BaseObject.extend("sap.ui.core.Configuration", /** @lends sap.ui.core.Configuration.prototype */ {
|
|
369
343
|
|
|
370
344
|
constructor : function() {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
);
|
|
345
|
+
Log.error(
|
|
346
|
+
"Configuration is designed as a singleton and should not be created manually! " +
|
|
347
|
+
"Please require 'sap/ui/core/Configuration' instead and use the module export directly without using 'new'."
|
|
348
|
+
);
|
|
376
349
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
},
|
|
350
|
+
return Configuration;
|
|
351
|
+
}
|
|
380
352
|
|
|
381
|
-
|
|
382
|
-
this.bInitialized = true;
|
|
353
|
+
});
|
|
383
354
|
|
|
384
|
-
|
|
355
|
+
/* Object that carries the real configuration data */
|
|
356
|
+
var config = {};
|
|
385
357
|
|
|
386
|
-
|
|
387
|
-
var config = this; // eslint-disable-line consistent-this
|
|
358
|
+
var bInitialized = false;
|
|
388
359
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
oCfg.oninit = oCfg.oninit || oCfg["evt-oninit"];
|
|
392
|
-
for (var n in M_SETTINGS) {
|
|
393
|
-
// collect the defaults
|
|
394
|
-
config[n] = Array.isArray(M_SETTINGS[n].defaultValue) ? [] : M_SETTINGS[n].defaultValue;
|
|
395
|
-
if ( oCfg.hasOwnProperty(n.toLowerCase()) ) {
|
|
396
|
-
setValue(n, oCfg[n.toLowerCase()], this);
|
|
397
|
-
} else if ( !/^xx-/.test(n) && oCfg.hasOwnProperty("xx-" + n.toLowerCase()) ) {
|
|
398
|
-
setValue(n, oCfg["xx-" + n.toLowerCase()], this);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
360
|
+
function init() {
|
|
361
|
+
bInitialized = true;
|
|
401
362
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
363
|
+
// apply settings from global config object (already merged with script tag attributes)
|
|
364
|
+
var oCfg = window["sap-ui-config"] || {};
|
|
365
|
+
oCfg.oninit = oCfg.oninit || oCfg["evt-oninit"];
|
|
366
|
+
for (var n in M_SETTINGS) {
|
|
367
|
+
// collect the defaults
|
|
368
|
+
config[n] = Array.isArray(M_SETTINGS[n].defaultValue) ? [] : M_SETTINGS[n].defaultValue;
|
|
369
|
+
if ( oCfg.hasOwnProperty(n.toLowerCase()) ) {
|
|
370
|
+
setValue(n, oCfg[n.toLowerCase()]);
|
|
371
|
+
} else if ( !/^xx-/.test(n) && oCfg.hasOwnProperty("xx-" + n.toLowerCase()) ) {
|
|
372
|
+
setValue(n, oCfg["xx-" + n.toLowerCase()]);
|
|
407
373
|
}
|
|
374
|
+
}
|
|
408
375
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
// first map SAP parameters, can be overwritten by "sap-ui-*" parameters
|
|
417
|
-
if ( oUriParams.has('sap-language') ) {
|
|
418
|
-
// always remember as SAP Logon language
|
|
419
|
-
var sValue = config.sapLogonLanguage = oUriParams.get('sap-language');
|
|
420
|
-
// try to interpret it as a BCP47 language tag, taking some well known SAP language codes into account
|
|
421
|
-
var oLocale = Locale.fromSAPLogonLanguage(sValue);
|
|
422
|
-
if ( oLocale ) {
|
|
423
|
-
config.language = oLocale;
|
|
424
|
-
} else if ( sValue && !oUriParams.get('sap-locale') && !oUriParams.get('sap-ui-language')) {
|
|
425
|
-
// only complain about an invalid sap-language if neither sap-locale nor sap-ui-language are given
|
|
426
|
-
Log.warning("sap-language '" + sValue + "' is not a valid BCP47 language tag and will only be used as SAP logon language");
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
// Check sap-locale after sap-language to ensure compatibility if both parameters are provided (e.g. portal iView).
|
|
431
|
-
if ( oUriParams.has('sap-locale') ) {
|
|
432
|
-
setValue("language", oUriParams.get('sap-locale'), this);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
if (oUriParams.has('sap-rtl')) {
|
|
436
|
-
// "" = false, "X", "x" = true
|
|
437
|
-
var sValue = oUriParams.get('sap-rtl');
|
|
438
|
-
if (sValue === "X" || sValue === "x") {
|
|
439
|
-
setValue('rtl', true, this);
|
|
440
|
-
} else {
|
|
441
|
-
setValue('rtl', false, this);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
376
|
+
// if libs are configured, convert them to modules and prepend them to the existing modules list
|
|
377
|
+
if ( oCfg.libs ) {
|
|
378
|
+
config.modules = oCfg.libs.split(",").map(function(lib) {
|
|
379
|
+
return lib.trim() + ".library";
|
|
380
|
+
}).concat(config.modules);
|
|
381
|
+
}
|
|
444
382
|
|
|
445
|
-
|
|
446
|
-
// validate the IANA timezone ID, but do not trigger a localizationChanged event
|
|
447
|
-
// because the initialization should not trigger a "*Changed" event
|
|
448
|
-
var sTimezone = oUriParams.get('sap-timezone');
|
|
449
|
-
if (checkTimezone(sTimezone)) {
|
|
450
|
-
this.timezone = sTimezone;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
383
|
+
var oUriParams;
|
|
453
384
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
config['theme'] = M_SETTINGS['theme'].defaultValue;
|
|
459
|
-
} else {
|
|
460
|
-
setValue('theme', sValue, this);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
385
|
+
// apply the settings from the url (only if not blocked by app configuration)
|
|
386
|
+
if ( !config.ignoreUrlParams ) {
|
|
387
|
+
var sUrlPrefix = "sap-ui-";
|
|
388
|
+
oUriParams = new URLSearchParams(window.location.search);
|
|
463
389
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
390
|
+
if (oUriParams.has('sap-statistics')) {
|
|
391
|
+
var sValue = oUriParams.get('sap-statistics');
|
|
392
|
+
setValue('statistics', sValue);
|
|
393
|
+
}
|
|
468
394
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
var sValue = oUriParams.get(sUrlPrefix + n);
|
|
475
|
-
if ( sValue == null && !/^xx-/.test(n) ) {
|
|
476
|
-
sValue = oUriParams.get(sUrlPrefix + "xx-" + n);
|
|
477
|
-
}
|
|
478
|
-
if (sValue === "") {
|
|
479
|
-
//empty URL parameters set the parameter back to its system default
|
|
480
|
-
config[n] = M_SETTINGS[n].defaultValue;
|
|
481
|
-
} else {
|
|
482
|
-
//sets the value (null or empty value ignored)
|
|
483
|
-
setValue(n, sValue, this);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
// handle legacy URL params through format settings
|
|
487
|
-
if (oUriParams.has('sap-ui-legacy-date-format')) {
|
|
488
|
-
this.oFormatSettings.setLegacyDateFormat(oUriParams.get('sap-ui-legacy-date-format'));
|
|
489
|
-
}
|
|
490
|
-
if (oUriParams.has('sap-ui-legacy-time-format')) {
|
|
491
|
-
this.oFormatSettings.setLegacyTimeFormat(oUriParams.get('sap-ui-legacy-time-format'));
|
|
395
|
+
// now analyze sap-ui parameters
|
|
396
|
+
for (var n in M_SETTINGS) {
|
|
397
|
+
if ( M_SETTINGS[n].noUrl ) {
|
|
398
|
+
continue;
|
|
492
399
|
}
|
|
493
|
-
|
|
494
|
-
|
|
400
|
+
var sValue = oUriParams.get(sUrlPrefix + n);
|
|
401
|
+
if ( sValue == null && !/^xx-/.test(n) ) {
|
|
402
|
+
sValue = oUriParams.get(sUrlPrefix + "xx-" + n);
|
|
495
403
|
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
this.derivedRTL = Locale._impliesRTL(config.language);
|
|
500
|
-
|
|
501
|
-
// analyze theme parameter
|
|
502
|
-
var sTheme = config.theme;
|
|
503
|
-
var sThemeRoot;
|
|
504
|
-
var iIndex = sTheme.indexOf("@");
|
|
505
|
-
if (iIndex >= 0) {
|
|
506
|
-
sThemeRoot = validateThemeRoot(sTheme.slice(iIndex + 1));
|
|
507
|
-
if ( sThemeRoot ) {
|
|
508
|
-
config.theme = sTheme.slice(0, iIndex);
|
|
509
|
-
config.themeRoot = sThemeRoot;
|
|
510
|
-
config.themeRoots[config.theme] = sThemeRoot;
|
|
404
|
+
if (sValue === "") {
|
|
405
|
+
//empty URL parameters set the parameter back to its system default
|
|
406
|
+
config[n] = M_SETTINGS[n].defaultValue;
|
|
511
407
|
} else {
|
|
512
|
-
//
|
|
513
|
-
|
|
514
|
-
iIndex = -1; // enable theme mapping below
|
|
408
|
+
//sets the value (null or empty value ignored)
|
|
409
|
+
setValue(n, sValue);
|
|
515
410
|
}
|
|
516
411
|
}
|
|
412
|
+
}
|
|
517
413
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
aLangs = aCoreLangs || [];
|
|
526
|
-
}
|
|
527
|
-
config['xx-supportedLanguages'] = aLangs;
|
|
528
|
-
|
|
529
|
-
//parse fiori 2 adaptation parameters
|
|
530
|
-
var vAdaptations = config['xx-fiori2Adaptation'];
|
|
531
|
-
if ( vAdaptations.length === 0 || (vAdaptations.length === 1 && vAdaptations[0] === 'false') ) {
|
|
532
|
-
vAdaptations = false;
|
|
533
|
-
} else if ( vAdaptations.length === 1 && vAdaptations[0] === 'true' ) {
|
|
534
|
-
vAdaptations = true;
|
|
535
|
-
}
|
|
414
|
+
//parse fiori 2 adaptation parameters
|
|
415
|
+
var vAdaptations = config['xx-fiori2Adaptation'];
|
|
416
|
+
if ( vAdaptations.length === 0 || (vAdaptations.length === 1 && vAdaptations[0] === 'false') ) {
|
|
417
|
+
vAdaptations = false;
|
|
418
|
+
} else if ( vAdaptations.length === 1 && vAdaptations[0] === 'true' ) {
|
|
419
|
+
vAdaptations = true;
|
|
420
|
+
}
|
|
536
421
|
|
|
537
|
-
|
|
422
|
+
config['xx-fiori2Adaptation'] = vAdaptations;
|
|
538
423
|
|
|
539
|
-
|
|
424
|
+
config["allowlistService"] = config["allowlistService"] || /* fallback to legacy config */ config["whitelistService"];
|
|
540
425
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
}
|
|
426
|
+
// Configure allowlistService / frameOptions via <meta> tag if not already defined via UI5 configuration
|
|
427
|
+
if (!config["allowlistService"]) {
|
|
428
|
+
var sAllowlistMetaTagValue = getMetaTagValue('sap.allowlistService') || /* fallback to legacy config */ getMetaTagValue('sap.whitelistService');
|
|
429
|
+
if (sAllowlistMetaTagValue) {
|
|
430
|
+
config["allowlistService"] = sAllowlistMetaTagValue;
|
|
431
|
+
// Set default "frameOptions" to "trusted" instead of "allow"
|
|
432
|
+
if (config["frameOptions"] === "default") {
|
|
433
|
+
config["frameOptions"] = "trusted";
|
|
550
434
|
}
|
|
551
435
|
}
|
|
436
|
+
}
|
|
552
437
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
438
|
+
// Verify and set default for "frameOptions" configuration
|
|
439
|
+
if (config["frameOptions"] === "default" ||
|
|
440
|
+
(config["frameOptions"] !== "allow"
|
|
441
|
+
&& config["frameOptions"] !== "deny"
|
|
442
|
+
&& config["frameOptions"] !== "trusted")) {
|
|
558
443
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
// frameOptionsConfig: Handle compatibility of renamed config option
|
|
564
|
-
var oFrameOptionsConfig = config["frameOptionsConfig"];
|
|
565
|
-
if (oFrameOptionsConfig) {
|
|
566
|
-
oFrameOptionsConfig.allowlist = oFrameOptionsConfig.allowlist || oFrameOptionsConfig.whitelist;
|
|
567
|
-
}
|
|
444
|
+
// default => allow
|
|
445
|
+
config["frameOptions"] = "allow";
|
|
446
|
+
}
|
|
568
447
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
&& config.modules.indexOf("sap.ui.fl.library") == -1) {
|
|
575
|
-
config.modules.push("sap.ui.fl.library");
|
|
576
|
-
}
|
|
448
|
+
// frameOptionsConfig: Handle compatibility of renamed config option
|
|
449
|
+
var oFrameOptionsConfig = config["frameOptionsConfig"];
|
|
450
|
+
if (oFrameOptionsConfig) {
|
|
451
|
+
oFrameOptionsConfig.allowlist = oFrameOptionsConfig.allowlist || oFrameOptionsConfig.whitelist;
|
|
452
|
+
}
|
|
577
453
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
aCSSLibs.shift(); // remove * (inplace)
|
|
587
|
-
config.modules.forEach(function(mod) {
|
|
588
|
-
var m = mod.match(/^(.*)\.library$/);
|
|
589
|
-
if ( m ) {
|
|
590
|
-
aCSSLibs.unshift(m[1]);
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
}
|
|
454
|
+
// in case the flexibilityServices configuration was set to a non-empty, non-default value, sap.ui.fl becomes mandatory
|
|
455
|
+
// if not overruled by xx-skipAutomaticFlLibLoading
|
|
456
|
+
if (config.flexibilityServices
|
|
457
|
+
&& config.flexibilityServices !== M_SETTINGS.flexibilityServices.defaultValue
|
|
458
|
+
&& !config['xx-skipAutomaticFlLibLoading']
|
|
459
|
+
&& config.modules.indexOf("sap.ui.fl.library") == -1) {
|
|
460
|
+
config.modules.push("sap.ui.fl.library");
|
|
461
|
+
}
|
|
595
462
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
if ( config[
|
|
599
|
-
|
|
600
|
-
}
|
|
601
|
-
if ( config["xx-waitForTheme"] !== "rendering" && config["xx-waitForTheme"] !== "init" ) {
|
|
602
|
-
// invalid value or false from legacy boolean setting
|
|
603
|
-
config["xx-waitForTheme"] = undefined;
|
|
463
|
+
// log all non default value
|
|
464
|
+
for (var n in M_SETTINGS) {
|
|
465
|
+
if ( config[n] !== M_SETTINGS[n].defaultValue ) {
|
|
466
|
+
Log.info(" " + n + " = " + config[n]);
|
|
604
467
|
}
|
|
468
|
+
}
|
|
605
469
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
470
|
+
// The following code can't be done in the _ConfigurationProvider
|
|
471
|
+
// because of cyclic dependency
|
|
472
|
+
var syncCallBehavior = Configuration.getSyncCallBehavior();
|
|
473
|
+
sap.ui.loader.config({
|
|
474
|
+
reportSyncCalls: syncCallBehavior
|
|
475
|
+
});
|
|
612
476
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
if (
|
|
616
|
-
|
|
617
|
-
this.setAnimationMode(Configuration.AnimationMode.full);
|
|
618
|
-
} else {
|
|
619
|
-
this.setAnimationMode(Configuration.AnimationMode.minimal);
|
|
620
|
-
}
|
|
477
|
+
if ( syncCallBehavior && oCfg.__loaded ) {
|
|
478
|
+
var sMessage = "[nosync]: configuration loaded via sync XHR";
|
|
479
|
+
if (syncCallBehavior === 1) {
|
|
480
|
+
Log.warning(sMessage);
|
|
621
481
|
} else {
|
|
622
|
-
|
|
623
|
-
this.setAnimationMode(this.getAnimationMode());
|
|
482
|
+
Log.error(sMessage);
|
|
624
483
|
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
625
486
|
|
|
626
|
-
|
|
627
|
-
// because of cyclic dependency
|
|
628
|
-
var syncCallBehavior = this.getSyncCallBehavior();
|
|
629
|
-
sap.ui.loader.config({
|
|
630
|
-
reportSyncCalls: syncCallBehavior
|
|
631
|
-
});
|
|
632
|
-
|
|
633
|
-
if ( syncCallBehavior && oCfg.__loaded ) {
|
|
634
|
-
var sMessage = "[nosync]: configuration loaded via sync XHR";
|
|
635
|
-
if (syncCallBehavior === 1) {
|
|
636
|
-
Log.warning(sMessage);
|
|
637
|
-
} else {
|
|
638
|
-
Log.error(sMessage);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
},
|
|
487
|
+
var oFormatSettings;
|
|
642
488
|
|
|
489
|
+
Object.assign(Configuration, /** @lends sap.ui.core.Configuration */ {
|
|
643
490
|
/**
|
|
644
491
|
* Returns the version of the framework.
|
|
645
492
|
*
|
|
@@ -648,13 +495,13 @@ sap.ui.define([
|
|
|
648
495
|
* @return {module:sap/base/util/Version} the version
|
|
649
496
|
* @public
|
|
650
497
|
*/
|
|
651
|
-
getVersion
|
|
652
|
-
if (
|
|
653
|
-
return
|
|
498
|
+
getVersion: function () {
|
|
499
|
+
if (config._version) {
|
|
500
|
+
return config._version;
|
|
654
501
|
}
|
|
655
502
|
|
|
656
|
-
|
|
657
|
-
return
|
|
503
|
+
config._version = new Version(VERSION);
|
|
504
|
+
return config._version;
|
|
658
505
|
},
|
|
659
506
|
|
|
660
507
|
/**
|
|
@@ -672,23 +519,7 @@ sap.ui.define([
|
|
|
672
519
|
return mCompatVersion._default;
|
|
673
520
|
},
|
|
674
521
|
|
|
675
|
-
|
|
676
|
-
* Returns the theme name
|
|
677
|
-
* @return {string} the theme name
|
|
678
|
-
* @public
|
|
679
|
-
*/
|
|
680
|
-
getTheme : function () {
|
|
681
|
-
return this.getValue("theme");
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Get themeRoot for configured theme
|
|
686
|
-
* @returns {string|object} Returns themeRoot for configured theme
|
|
687
|
-
* @private
|
|
688
|
-
*/
|
|
689
|
-
getThemeRoot : function () {
|
|
690
|
-
return this.themeRoot;
|
|
691
|
-
},
|
|
522
|
+
getTheme : Theming.getTheme,
|
|
692
523
|
|
|
693
524
|
/**
|
|
694
525
|
* Returns whether placeholders are active or not
|
|
@@ -703,35 +534,15 @@ sap.ui.define([
|
|
|
703
534
|
});
|
|
704
535
|
},
|
|
705
536
|
|
|
706
|
-
/**
|
|
707
|
-
* Allows setting the theme name
|
|
708
|
-
* @param {string} sTheme the theme name
|
|
709
|
-
* @return {this} <code>this</code> to allow method chaining
|
|
710
|
-
* @private
|
|
711
|
-
*/
|
|
712
537
|
setTheme : function (sTheme) {
|
|
713
|
-
|
|
538
|
+
Theming.setTheme(sTheme);
|
|
714
539
|
return this;
|
|
715
540
|
},
|
|
716
541
|
|
|
717
|
-
/**
|
|
718
|
-
* Normalize the given theme, resolve known aliases
|
|
719
|
-
* @param {string} sTheme The theme name
|
|
720
|
-
* @param {string} sThemeBaseUrl The theme's base url
|
|
721
|
-
* @returns {string} The normalized theme name
|
|
722
|
-
* @private
|
|
723
|
-
*/
|
|
724
|
-
normalizeTheme : function (sTheme, sThemeBaseUrl) {
|
|
725
|
-
if ( sTheme && sThemeBaseUrl == null && sTheme.match(/^sap_corbu$/i) ) {
|
|
726
|
-
return "sap_fiori_3";
|
|
727
|
-
}
|
|
728
|
-
return sTheme;
|
|
729
|
-
},
|
|
730
|
-
|
|
731
542
|
/**
|
|
732
543
|
* Returns a string that identifies the current language.
|
|
733
544
|
*
|
|
734
|
-
* The value returned by
|
|
545
|
+
* The value returned by config method in most cases corresponds to the exact value that has been
|
|
735
546
|
* configured by the user or application or that has been determined from the user agent settings.
|
|
736
547
|
* It has not been normalized, but has been validated against a relaxed version of
|
|
737
548
|
* {@link http://www.ietf.org/rfc/bcp/bcp47.txt BCP47}, allowing underscores ('_') instead of the
|
|
@@ -757,16 +568,17 @@ sap.ui.define([
|
|
|
757
568
|
* {@link sap.ui.core.Locale Locale} object matching the language.
|
|
758
569
|
*
|
|
759
570
|
* @return {string} Language string as configured
|
|
571
|
+
* @function
|
|
760
572
|
* @public
|
|
761
573
|
*/
|
|
762
|
-
getLanguage :
|
|
763
|
-
|
|
764
|
-
|
|
574
|
+
getLanguage : Localization.getLanguage,
|
|
575
|
+
|
|
576
|
+
setLanguage : Localization.setLanguage,
|
|
765
577
|
|
|
766
578
|
/**
|
|
767
579
|
* Returns a BCP47-compliant language tag for the current language.
|
|
768
580
|
*
|
|
769
|
-
* The return value of
|
|
581
|
+
* The return value of config method is especially useful for an HTTP <code>Accept-Language</code> header.
|
|
770
582
|
*
|
|
771
583
|
* Retrieves the modern locale,
|
|
772
584
|
* e.g. sr-Latn (Serbian (Cyrillic)), he (Hebrew), yi (Yiddish)
|
|
@@ -775,122 +587,17 @@ sap.ui.define([
|
|
|
775
587
|
* @public
|
|
776
588
|
*/
|
|
777
589
|
getLanguageTag : function () {
|
|
778
|
-
return
|
|
590
|
+
return Localization.getLanguageTag().toString();
|
|
779
591
|
},
|
|
780
592
|
|
|
781
|
-
|
|
782
|
-
* Returns an SAP logon language for the current language.
|
|
783
|
-
*
|
|
784
|
-
* It will be returned in uppercase.
|
|
785
|
-
* e.g. "EN", "DE"
|
|
786
|
-
*
|
|
787
|
-
* @return {string} The SAP logon language code for the current language
|
|
788
|
-
* @public
|
|
789
|
-
*/
|
|
790
|
-
getSAPLogonLanguage : function () {
|
|
791
|
-
return (this.sapLogonLanguage && this.sapLogonLanguage.toUpperCase()) || this.getValue("language")._getSAPLogonLanguage();
|
|
792
|
-
},
|
|
593
|
+
getSAPLogonLanguage : Localization.getSAPLogonLanguage,
|
|
793
594
|
|
|
794
|
-
|
|
795
|
-
* Retrieves the configured IANA timezone ID.
|
|
796
|
-
*
|
|
797
|
-
* @returns {string} The configured IANA timezone ID, e.g. "America/New_York"
|
|
798
|
-
* @public
|
|
799
|
-
* @since 1.99.0
|
|
800
|
-
*/
|
|
801
|
-
getTimezone : function () {
|
|
802
|
-
return this.getValue("timezone");
|
|
803
|
-
},
|
|
595
|
+
getTimezone : Localization.getTimezone,
|
|
804
596
|
|
|
805
597
|
/**
|
|
806
|
-
* Sets
|
|
807
|
-
* functionality (e.g. formatting, data types, translated texts, ...).
|
|
808
|
-
*
|
|
809
|
-
* When the language can't be interpreted as a BCP47 language (using the relaxed syntax
|
|
810
|
-
* described in {@link #getLanguage}, an error will be thrown.
|
|
598
|
+
* Sets the timezone such that all date and time based calculations use config timezone.
|
|
811
599
|
*
|
|
812
|
-
*
|
|
813
|
-
* {@link sap.ui.core.Core#event:localizationChanged localizationChanged} event.
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
* <h3>Restrictions</h3>
|
|
817
|
-
*
|
|
818
|
-
* The framework <strong>does not</strong> guarantee that already created, language
|
|
819
|
-
* dependent objects will be updated by this call. It therefore remains best practice
|
|
820
|
-
* for applications to switch the language early, e.g. before any language dependent
|
|
821
|
-
* objects are created. Applications that need to support more dynamic changes of
|
|
822
|
-
* the language should listen to the <code>localizationChanged</code> event and adapt
|
|
823
|
-
* all language dependent objects that they use (e.g. by rebuilding their UI).
|
|
824
|
-
*
|
|
825
|
-
* Currently, the framework notifies the following objects about a change of the
|
|
826
|
-
* localization settings before it fires the <code>localizationChanged</code> event:
|
|
827
|
-
*
|
|
828
|
-
* <ul>
|
|
829
|
-
* <li>date and number data types that are used in property bindings or composite
|
|
830
|
-
* bindings in existing Elements, Controls, UIAreas or Components</li>
|
|
831
|
-
* <li>ResourceModels currently assigned to the Core, a UIArea, Component,
|
|
832
|
-
* Element or Control</li>
|
|
833
|
-
* <li>Elements or Controls that implement the <code>onlocalizationChanged</code> hook
|
|
834
|
-
* (note the lowercase 'l' in onlocalizationChanged)</li>
|
|
835
|
-
* </ul>
|
|
836
|
-
*
|
|
837
|
-
* It furthermore derives the RTL mode from the new language, if no explicit RTL
|
|
838
|
-
* mode has been set. If the RTL mode changes, the following additional actions will be taken:
|
|
839
|
-
*
|
|
840
|
-
* <ul>
|
|
841
|
-
* <li>the URLs of already loaded library theme files will be changed</li>
|
|
842
|
-
* <li>the <code>dir</code> attribute of the page will be changed to reflect the new mode.</li>
|
|
843
|
-
* <li>all UIAreas will be invalidated (which results in a rendering of the whole UI5 UI)</li>
|
|
844
|
-
* </ul>
|
|
845
|
-
*
|
|
846
|
-
* This method does not accept SAP language codes for <code>sLanguage</code>. Instead, a second
|
|
847
|
-
* parameter <code>sSAPLogonLanguage</code> can be provided with an SAP language code corresponding
|
|
848
|
-
* to the given language. A given value will be returned by the {@link #getSAPLogonLanguage} method.
|
|
849
|
-
* It is up to the caller to provide a consistent pair of BCP47 language and SAP language code.
|
|
850
|
-
* The SAP language code is only checked to be of length 2 and must consist of letters or digits only.
|
|
851
|
-
*
|
|
852
|
-
* <b>Note</b>: When using this method please take note of and respect the above mentioned restrictions.
|
|
853
|
-
*
|
|
854
|
-
* @param {string} sLanguage the new language as a BCP47 compliant language tag; case doesn't matter
|
|
855
|
-
* and underscores can be used instead of dashes to separate components (compatibility with Java Locale IDs)
|
|
856
|
-
* @param {string} [sSAPLogonLanguage] SAP language code that corresponds to the <code>sLanguage</code>;
|
|
857
|
-
* if a value is specified, future calls to <code>getSAPLogonLanguage</code> will return that value;
|
|
858
|
-
* if no value is specified, the framework will use the ISO639 language part of <code>sLanguage</code>
|
|
859
|
-
* as SAP Logon language.
|
|
860
|
-
* @throws {Error} When <code>sLanguage</code> can't be interpreted as a BCP47 language or when
|
|
861
|
-
* <code>sSAPLanguage</code> is given and can't be interpreted as SAP language code.
|
|
862
|
-
* @return {this} <code>this</code> to allow method chaining
|
|
863
|
-
*
|
|
864
|
-
* @see http://scn.sap.com/docs/DOC-14377
|
|
865
|
-
* @public
|
|
866
|
-
*/
|
|
867
|
-
setLanguage : function (sLanguage, sSAPLogonLanguage) {
|
|
868
|
-
var oLocale = convertToLocaleOrNull(sLanguage),
|
|
869
|
-
bOldRTL = this.getRTL(),
|
|
870
|
-
mChanges;
|
|
871
|
-
|
|
872
|
-
check(oLocale, "Configuration.setLanguage: sLanguage must be a valid BCP47 language tag");
|
|
873
|
-
check(sSAPLogonLanguage == null || (typeof sSAPLogonLanguage === 'string' && /[A-Z0-9]{2,2}/i.test(sSAPLogonLanguage)),
|
|
874
|
-
"Configuration.setLanguage: sSAPLogonLanguage must be null or be a string of length 2, consisting of digits and latin characters only", /* warn= */ true);
|
|
875
|
-
|
|
876
|
-
if ( oLocale.toString() != this.getLanguageTag() || sSAPLogonLanguage !== this.sapLogonLanguage ) {
|
|
877
|
-
this.language = oLocale;
|
|
878
|
-
this.sapLogonLanguage = sSAPLogonLanguage || undefined;
|
|
879
|
-
mChanges = this._collect();
|
|
880
|
-
mChanges.language = this.getLanguageTag();
|
|
881
|
-
this.derivedRTL = Locale._impliesRTL(oLocale);
|
|
882
|
-
if ( bOldRTL != this.getRTL() ) {
|
|
883
|
-
mChanges.rtl = this.getRTL();
|
|
884
|
-
}
|
|
885
|
-
this._endCollect();
|
|
886
|
-
}
|
|
887
|
-
return this;
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* Sets the timezone such that all date and time based calculations use this timezone.
|
|
892
|
-
*
|
|
893
|
-
* <b>Important:</b> It is strongly recommended to only use this API at the earliest point
|
|
600
|
+
* <b>Important:</b> It is strongly recommended to only use config API at the earliest point
|
|
894
601
|
* of time while initializing a UI5 app. A later adjustment of the time zone should be
|
|
895
602
|
* avoided. It can lead to unexpected data inconsistencies in a running application,
|
|
896
603
|
* because date objects could still be related to a previously configured time zone.
|
|
@@ -903,26 +610,38 @@ sap.ui.define([
|
|
|
903
610
|
*
|
|
904
611
|
* @param {string|null} [sTimezone] IANA timezone ID, e.g. "America/New_York". Use <code>null</code> to reset the timezone to the browser's local timezone.
|
|
905
612
|
* An invalid IANA timezone ID will fall back to the browser's timezone.
|
|
613
|
+
* @function
|
|
906
614
|
* @public
|
|
907
615
|
* @return {this} <code>this</code> to allow method chaining
|
|
908
616
|
* @since 1.99.0
|
|
909
617
|
*/
|
|
910
|
-
setTimezone :
|
|
911
|
-
check(sTimezone == null || typeof sTimezone === 'string',
|
|
912
|
-
"Configuration.setTimezone: sTimezone must be null or be a string", /* warn= */ true);
|
|
618
|
+
setTimezone : Localization.setTimezone,
|
|
913
619
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
620
|
+
/**
|
|
621
|
+
* Returns the calendar type which is being used in locale dependent functionality.
|
|
622
|
+
*
|
|
623
|
+
* When it's explicitly set by calling <code>setCalendar</code>, the set calendar type is returned.
|
|
624
|
+
* Otherwise, the calendar type is determined by checking the format settings and current locale.
|
|
625
|
+
*
|
|
626
|
+
* @return {sap.ui.core.CalendarType} the current calendar type, e.g. <code>Gregorian</code>
|
|
627
|
+
* @since 1.28.6
|
|
628
|
+
*/
|
|
629
|
+
getCalendarType: Formatting.getCalendarType,
|
|
919
630
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
631
|
+
/**
|
|
632
|
+
* Returns the calendar week numbering algorithm used to determine the first day of the week
|
|
633
|
+
* and the first calendar week of the year, see {@link sap.ui.core.date.CalendarWeekNumbering}.
|
|
634
|
+
*
|
|
635
|
+
* @returns {sap.ui.core.date.CalendarWeekNumbering} The calendar week numbering algorithm
|
|
636
|
+
* @function
|
|
637
|
+
* @public
|
|
638
|
+
* @since 1.113.0
|
|
639
|
+
*/
|
|
640
|
+
getCalendarWeekNumbering: Formatting.getCalendarWeekNumbering,
|
|
641
|
+
|
|
642
|
+
getRTL :Localization.getRTL,
|
|
643
|
+
|
|
644
|
+
setRTL : Localization.setRTL,
|
|
926
645
|
|
|
927
646
|
/**
|
|
928
647
|
* Returns a Locale object for the current language.
|
|
@@ -932,110 +651,69 @@ sap.ui.define([
|
|
|
932
651
|
* @return {sap.ui.core.Locale} The locale
|
|
933
652
|
* @public
|
|
934
653
|
*/
|
|
935
|
-
getLocale : function
|
|
936
|
-
|
|
654
|
+
getLocale : function() {
|
|
655
|
+
var oLanguageTag = Localization.getLanguageTag();
|
|
656
|
+
return Locale._getCoreLocale(oLanguageTag);
|
|
937
657
|
},
|
|
938
658
|
|
|
939
659
|
/**
|
|
940
660
|
* Checks whether the Cache Manager is switched on.
|
|
941
661
|
* @ui5-restricted sap.ui.core
|
|
942
662
|
* @since 1.37.0
|
|
943
|
-
* @returns {boolean}
|
|
663
|
+
* @returns {boolean} If cache is enabled
|
|
664
|
+
* @private
|
|
944
665
|
*/
|
|
945
666
|
isUI5CacheOn: function () {
|
|
946
|
-
return
|
|
667
|
+
return Configuration.getValue("xx-cache-use");
|
|
947
668
|
},
|
|
948
669
|
|
|
949
670
|
/**
|
|
950
671
|
* Enables/Disables the Cache configuration.
|
|
951
|
-
* @ui5-restricted sap.ui.core
|
|
952
672
|
* @since 1.37.0
|
|
953
673
|
* @param {boolean} on true to switch it on, false if to switch it off
|
|
954
|
-
* @returns {this}
|
|
674
|
+
* @returns {this} The Configuration for chaining
|
|
675
|
+
* @private
|
|
676
|
+
* @ui5-restricted sap.ui.core
|
|
955
677
|
*/
|
|
956
678
|
setUI5CacheOn: function (on) {
|
|
957
|
-
|
|
679
|
+
config["xx-cache-use"] = on;
|
|
958
680
|
return this;
|
|
959
681
|
},
|
|
960
682
|
|
|
961
683
|
/**
|
|
962
684
|
* Checks whether the Cache Manager serialization support is switched on.
|
|
963
|
-
* @ui5-restricted sap.ui.core
|
|
964
685
|
* @since 1.37.0
|
|
965
|
-
* @returns {boolean}
|
|
686
|
+
* @returns {boolean} Wether cache serialization is supported or not
|
|
687
|
+
* @private
|
|
688
|
+
* @ui5-restricted sap.ui.core
|
|
966
689
|
*/
|
|
967
690
|
isUI5CacheSerializationSupportOn: function () {
|
|
968
|
-
return
|
|
691
|
+
return Configuration.getValue("xx-cache-serialization");
|
|
969
692
|
},
|
|
970
693
|
|
|
971
694
|
/**
|
|
972
695
|
* Enables/Disables the Cache serialization support
|
|
973
|
-
* @ui5-restricted sap.ui.core
|
|
974
696
|
* @since 1.37.0
|
|
975
697
|
* @param {boolean} on true to switch it on, false if to switch it off
|
|
976
|
-
* @returns {this}
|
|
698
|
+
* @returns {this} The Configuration for chaining
|
|
699
|
+
* @private
|
|
700
|
+
* @ui5-restricted sap.ui.core
|
|
977
701
|
*/
|
|
978
702
|
setUI5CacheSerializationSupport: function (on) {
|
|
979
|
-
|
|
703
|
+
config["xx-cache-serialization"] = on;
|
|
980
704
|
return this;
|
|
981
705
|
},
|
|
982
706
|
|
|
983
707
|
/**
|
|
984
708
|
* Returns all keys, that the CacheManager will ignore when set/get values.
|
|
709
|
+
* @private
|
|
985
710
|
* @ui5-restricted sap.ui.core
|
|
986
711
|
* @since 1.37.0
|
|
987
712
|
* @returns {string[]} array of keys that CacheManager should ignore
|
|
988
713
|
* @see sap.ui.core.cache.LRUPersistentCache#keyMatchesExclusionStrings
|
|
989
714
|
*/
|
|
990
715
|
getUI5CacheExcludedKeys: function () {
|
|
991
|
-
return
|
|
992
|
-
},
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Returns the calendar type which is being used in locale dependent functionality.
|
|
996
|
-
*
|
|
997
|
-
* When it's explicitly set by calling <code>setCalendar</code>, the set calendar type is returned.
|
|
998
|
-
* Otherwise, the calendar type is determined by checking the format settings and current locale.
|
|
999
|
-
*
|
|
1000
|
-
* @return {sap.ui.core.CalendarType} the current calendar type, e.g. <code>Gregorian</code>
|
|
1001
|
-
* @since 1.28.6
|
|
1002
|
-
*/
|
|
1003
|
-
getCalendarType: function() {
|
|
1004
|
-
var sName,
|
|
1005
|
-
sCalendarType = this.getValue("calendarType");
|
|
1006
|
-
|
|
1007
|
-
if (sCalendarType) {
|
|
1008
|
-
for (sName in CalendarType) {
|
|
1009
|
-
if (sName.toLowerCase() === sCalendarType.toLowerCase()) {
|
|
1010
|
-
this.calendarType = sName;
|
|
1011
|
-
return this.calendarType;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
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");
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
var sLegacyDateFormat = this.oFormatSettings.getLegacyDateFormat();
|
|
1018
|
-
|
|
1019
|
-
switch (sLegacyDateFormat) {
|
|
1020
|
-
case "1":
|
|
1021
|
-
case "2":
|
|
1022
|
-
case "3":
|
|
1023
|
-
case "4":
|
|
1024
|
-
case "5":
|
|
1025
|
-
case "6":
|
|
1026
|
-
return CalendarType.Gregorian;
|
|
1027
|
-
case "7":
|
|
1028
|
-
case "8":
|
|
1029
|
-
case "9":
|
|
1030
|
-
return CalendarType.Japanese;
|
|
1031
|
-
case "A":
|
|
1032
|
-
case "B":
|
|
1033
|
-
return CalendarType.Islamic;
|
|
1034
|
-
case "C":
|
|
1035
|
-
return CalendarType.Persian;
|
|
1036
|
-
default:
|
|
1037
|
-
return this.getLocale().getPreferredCalendarType();
|
|
1038
|
-
}
|
|
716
|
+
return Configuration.getValue("xx-cache-excludedKeys");
|
|
1039
717
|
},
|
|
1040
718
|
|
|
1041
719
|
/**
|
|
@@ -1049,29 +727,10 @@ sap.ui.define([
|
|
|
1049
727
|
* @since 1.28.6
|
|
1050
728
|
*/
|
|
1051
729
|
setCalendarType : function(sCalendarType) {
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
if (this.calendarType !== sCalendarType) {
|
|
1055
|
-
mChanges = this._collect();
|
|
1056
|
-
this.calendarType = mChanges.calendarType = sCalendarType;
|
|
1057
|
-
this._endCollect();
|
|
1058
|
-
}
|
|
730
|
+
Formatting.setCalendarType.apply(Formatting, arguments);
|
|
1059
731
|
return this;
|
|
1060
732
|
},
|
|
1061
733
|
|
|
1062
|
-
/**
|
|
1063
|
-
* Returns the calendar week numbering algorithm used to determine the first day of the week
|
|
1064
|
-
* and the first calendar week of the year, see {@link sap.ui.core.date.CalendarWeekNumbering}.
|
|
1065
|
-
*
|
|
1066
|
-
* @returns {sap.ui.core.date.CalendarWeekNumbering} The calendar week numbering algorithm
|
|
1067
|
-
*
|
|
1068
|
-
* @public
|
|
1069
|
-
* @since 1.113.0
|
|
1070
|
-
*/
|
|
1071
|
-
getCalendarWeekNumbering: function() {
|
|
1072
|
-
return this.getValue("calendarWeekNumbering");
|
|
1073
|
-
},
|
|
1074
|
-
|
|
1075
734
|
/**
|
|
1076
735
|
* Sets the calendar week numbering algorithm which is used to determine the first day of the week
|
|
1077
736
|
* and the first calendar week of the year, see {@link sap.ui.core.date.CalendarWeekNumbering}.
|
|
@@ -1088,14 +747,7 @@ sap.ui.define([
|
|
|
1088
747
|
* @since 1.113.0
|
|
1089
748
|
*/
|
|
1090
749
|
setCalendarWeekNumbering: function(sCalendarWeekNumbering) {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
if (this.calendarWeekNumbering !== sCalendarWeekNumbering) {
|
|
1094
|
-
var mChanges = this._collect();
|
|
1095
|
-
this.calendarWeekNumbering = mChanges.calendarWeekNumbering = sCalendarWeekNumbering;
|
|
1096
|
-
this._endCollect();
|
|
1097
|
-
}
|
|
1098
|
-
|
|
750
|
+
Formatting.setCalendarWeekNumbering.apply(Formatting, arguments);
|
|
1099
751
|
return this;
|
|
1100
752
|
},
|
|
1101
753
|
|
|
@@ -1106,8 +758,8 @@ sap.ui.define([
|
|
|
1106
758
|
* @return {string} the format locale string with language and country code
|
|
1107
759
|
* @public
|
|
1108
760
|
*/
|
|
1109
|
-
getFormatLocale : function
|
|
1110
|
-
return
|
|
761
|
+
getFormatLocale : function() {
|
|
762
|
+
return Formatting.getLanguageTag().toString();
|
|
1111
763
|
},
|
|
1112
764
|
|
|
1113
765
|
/**
|
|
@@ -1138,56 +790,25 @@ sap.ui.define([
|
|
|
1138
790
|
* tag or Java locale identifier
|
|
1139
791
|
*/
|
|
1140
792
|
setFormatLocale : function(sFormatLocale) {
|
|
1141
|
-
|
|
1142
|
-
mChanges;
|
|
1143
|
-
|
|
1144
|
-
check(sFormatLocale == null || typeof sFormatLocale === "string" && oFormatLocale, "sFormatLocale must be a BCP47 language tag or Java Locale id or null");
|
|
1145
|
-
|
|
1146
|
-
if ( toLanguageTag(oFormatLocale) !== toLanguageTag(this.getValue("formatLocale")) ) {
|
|
1147
|
-
this.formatLocale = oFormatLocale;
|
|
1148
|
-
mChanges = this._collect();
|
|
1149
|
-
mChanges.formatLocale = toLanguageTag(oFormatLocale);
|
|
1150
|
-
this._endCollect();
|
|
1151
|
-
}
|
|
793
|
+
Formatting.setLanguageTag.apply(Formatting, arguments);
|
|
1152
794
|
return this;
|
|
1153
795
|
},
|
|
1154
796
|
|
|
1155
|
-
|
|
1156
|
-
* List of languages that the SAPUI5 core delivers.
|
|
1157
|
-
*
|
|
1158
|
-
* Might return undefined if the information is not available.
|
|
1159
|
-
*
|
|
1160
|
-
* @experimental
|
|
1161
|
-
*/
|
|
1162
|
-
getLanguagesDeliveredWithCore : function() {
|
|
1163
|
-
return this["languagesDeliveredWithCore"];
|
|
1164
|
-
},
|
|
797
|
+
getLanguagesDeliveredWithCore : Localization.getLanguagesDeliveredWithCore,
|
|
1165
798
|
|
|
1166
|
-
|
|
1167
|
-
* @experimental
|
|
1168
|
-
*/
|
|
1169
|
-
getSupportedLanguages : function() {
|
|
1170
|
-
return this.getValue("xx-supportedLanguages");
|
|
1171
|
-
},
|
|
799
|
+
getSupportedLanguages : Localization.getSupportedLanguages,
|
|
1172
800
|
|
|
1173
|
-
|
|
1174
|
-
* Returns whether the accessibility mode is used or not.
|
|
1175
|
-
* @return {boolean} whether the accessibility mode is used or not
|
|
1176
|
-
* @public
|
|
1177
|
-
*/
|
|
1178
|
-
getAccessibility : function () {
|
|
1179
|
-
return this.getValue("accessibility");
|
|
1180
|
-
},
|
|
801
|
+
getAccessibility : ControlBehavior.isAccessibilityEnabled,
|
|
1181
802
|
|
|
1182
803
|
/**
|
|
1183
804
|
* Returns whether the framework automatically adds
|
|
1184
805
|
* the ARIA role 'application' to the HTML body or not.
|
|
1185
|
-
* @return {boolean}
|
|
806
|
+
* @return {boolean} Wether the ARIA role 'application' should be added to the HTML body or not
|
|
1186
807
|
* @since 1.27.0
|
|
1187
808
|
* @public
|
|
1188
809
|
*/
|
|
1189
810
|
getAutoAriaBodyRole : function () {
|
|
1190
|
-
return
|
|
811
|
+
return Configuration.getValue("autoAriaBodyRole");
|
|
1191
812
|
},
|
|
1192
813
|
|
|
1193
814
|
/**
|
|
@@ -1197,19 +818,20 @@ sap.ui.define([
|
|
|
1197
818
|
* @deprecated As of version 1.50.0, replaced by {@link sap.ui.core.Configuration#getAnimationMode}
|
|
1198
819
|
*/
|
|
1199
820
|
getAnimation : function () {
|
|
1200
|
-
|
|
821
|
+
var sAnimationMode = Configuration.getAnimationMode();
|
|
822
|
+
// Set the animation to on or off depending on the animation mode to ensure backward compatibility.
|
|
823
|
+
return (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.AnimationMode.none);
|
|
1201
824
|
},
|
|
1202
825
|
|
|
1203
826
|
/**
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
* @
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
},
|
|
827
|
+
* Returns the current animation mode.
|
|
828
|
+
*
|
|
829
|
+
* @return {sap.ui.core.Configuration.AnimationMode} The current animationMode
|
|
830
|
+
* @since 1.50.0
|
|
831
|
+
* @function
|
|
832
|
+
* @public
|
|
833
|
+
*/
|
|
834
|
+
getAnimationMode : ControlBehavior.getAnimationMode,
|
|
1213
835
|
|
|
1214
836
|
/**
|
|
1215
837
|
* Sets the current animation mode.
|
|
@@ -1223,34 +845,10 @@ sap.ui.define([
|
|
|
1223
845
|
* @param {sap.ui.core.Configuration.AnimationMode} sAnimationMode A valid animation mode
|
|
1224
846
|
* @throws {Error} If the provided <code>sAnimationMode</code> does not exist, an error is thrown
|
|
1225
847
|
* @since 1.50.0
|
|
848
|
+
* @function
|
|
1226
849
|
* @public
|
|
1227
850
|
*/
|
|
1228
|
-
setAnimationMode :
|
|
1229
|
-
checkEnum(Configuration.AnimationMode, sAnimationMode, "animationMode");
|
|
1230
|
-
|
|
1231
|
-
// Set the animation to on or off depending on the animation mode to ensure backward compatibility.
|
|
1232
|
-
this.animation = (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.AnimationMode.none);
|
|
1233
|
-
|
|
1234
|
-
// Set the animation mode and update html attributes.
|
|
1235
|
-
this.animationMode = sAnimationMode;
|
|
1236
|
-
if (this._oCore && this._oCore._setupAnimation) {
|
|
1237
|
-
this._oCore._setupAnimation();
|
|
1238
|
-
}
|
|
1239
|
-
},
|
|
1240
|
-
|
|
1241
|
-
/**
|
|
1242
|
-
* Returns whether the page uses the RTL text direction.
|
|
1243
|
-
*
|
|
1244
|
-
* If no mode has been explicitly set (neither <code>true</code> nor <code>false</code>),
|
|
1245
|
-
* the mode is derived from the current language setting.
|
|
1246
|
-
*
|
|
1247
|
-
* @return {boolean} whether the page uses the RTL text direction
|
|
1248
|
-
* @public
|
|
1249
|
-
*/
|
|
1250
|
-
getRTL : function () {
|
|
1251
|
-
// if rtl has not been set (still null), return the rtl mode derived from the language
|
|
1252
|
-
return this.getValue("rtl") === null ? this.derivedRTL : this.getValue("rtl");
|
|
1253
|
-
},
|
|
851
|
+
setAnimationMode : ControlBehavior.setAnimationMode,
|
|
1254
852
|
|
|
1255
853
|
/**
|
|
1256
854
|
* Returns whether the Fiori2Adaptation is on.
|
|
@@ -1259,39 +857,7 @@ sap.ui.define([
|
|
|
1259
857
|
* @public
|
|
1260
858
|
*/
|
|
1261
859
|
getFiori2Adaptation : function () {
|
|
1262
|
-
return
|
|
1263
|
-
},
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* Sets the character orientation mode to be used from now on.
|
|
1267
|
-
*
|
|
1268
|
-
* Can either be set to a concrete value (true meaning right-to-left,
|
|
1269
|
-
* false meaning left-to-right) or to <code>null</code> which means that
|
|
1270
|
-
* the character orientation mode should be derived from the current
|
|
1271
|
-
* language (incl. region) setting.
|
|
1272
|
-
*
|
|
1273
|
-
* After changing the character orientation mode, the framework tries
|
|
1274
|
-
* to update localization specific parts of the UI. See the documentation of
|
|
1275
|
-
* {@link #setLanguage} for details and restrictions.
|
|
1276
|
-
*
|
|
1277
|
-
* <b>Note</b>: See documentation of {@link #setLanguage} for restrictions.
|
|
1278
|
-
*
|
|
1279
|
-
* @param {boolean|null} bRTL new character orientation mode or <code>null</code>
|
|
1280
|
-
* @return {this} <code>this</code> to allow method chaining
|
|
1281
|
-
* @public
|
|
1282
|
-
*/
|
|
1283
|
-
setRTL : function(bRTL) {
|
|
1284
|
-
check(bRTL === null || typeof bRTL === "boolean", "bRTL must be null or a boolean");
|
|
1285
|
-
|
|
1286
|
-
var oldRTL = this.getRTL(),
|
|
1287
|
-
mChanges;
|
|
1288
|
-
this.rtl = bRTL;
|
|
1289
|
-
if ( oldRTL != this.getRTL() ) { // also take the derived RTL flag into account for the before/after comparison!
|
|
1290
|
-
mChanges = this._collect();
|
|
1291
|
-
mChanges.rtl = this.getRTL();
|
|
1292
|
-
this._endCollect();
|
|
1293
|
-
}
|
|
1294
|
-
return this;
|
|
860
|
+
return Configuration.getValue("xx-fiori2Adaptation");
|
|
1295
861
|
},
|
|
1296
862
|
|
|
1297
863
|
/**
|
|
@@ -1314,7 +880,7 @@ sap.ui.define([
|
|
|
1314
880
|
* @public
|
|
1315
881
|
*/
|
|
1316
882
|
getInspect : function () {
|
|
1317
|
-
return
|
|
883
|
+
return Configuration.getValue("inspect");
|
|
1318
884
|
},
|
|
1319
885
|
|
|
1320
886
|
/**
|
|
@@ -1323,7 +889,7 @@ sap.ui.define([
|
|
|
1323
889
|
* @public
|
|
1324
890
|
*/
|
|
1325
891
|
getOriginInfo : function () {
|
|
1326
|
-
return
|
|
892
|
+
return Configuration.getValue("originInfo");
|
|
1327
893
|
},
|
|
1328
894
|
|
|
1329
895
|
/**
|
|
@@ -1343,7 +909,7 @@ sap.ui.define([
|
|
|
1343
909
|
* @return {boolean} whether a trace view should be shown
|
|
1344
910
|
*/
|
|
1345
911
|
getTrace : function () {
|
|
1346
|
-
return
|
|
912
|
+
return Configuration.getValue("trace");
|
|
1347
913
|
},
|
|
1348
914
|
|
|
1349
915
|
/**
|
|
@@ -1354,7 +920,7 @@ sap.ui.define([
|
|
|
1354
920
|
* @public
|
|
1355
921
|
*/
|
|
1356
922
|
getUIDPrefix : function() {
|
|
1357
|
-
return
|
|
923
|
+
return Configuration.getValue("uidPrefix");
|
|
1358
924
|
},
|
|
1359
925
|
|
|
1360
926
|
|
|
@@ -1401,7 +967,7 @@ sap.ui.define([
|
|
|
1401
967
|
* @ui5-restricted sap.watt, com.sap.webide
|
|
1402
968
|
*/
|
|
1403
969
|
getControllerCodeDeactivated : function() {
|
|
1404
|
-
return
|
|
970
|
+
return Configuration.getDesignMode() && !Configuration.getSuppressDeactivationOfControllerCode();
|
|
1405
971
|
},
|
|
1406
972
|
|
|
1407
973
|
/**
|
|
@@ -1412,7 +978,7 @@ sap.ui.define([
|
|
|
1412
978
|
* @deprecated Since 1.15.1. Please use {@link module:sap/ui/core/ComponentSupport} instead. See also {@link topic:82a0fcecc3cb427c91469bc537ebdddf Declarative API for Initial Components}.
|
|
1413
979
|
*/
|
|
1414
980
|
getApplication : function() {
|
|
1415
|
-
return
|
|
981
|
+
return Configuration.getValue("application");
|
|
1416
982
|
},
|
|
1417
983
|
|
|
1418
984
|
/**
|
|
@@ -1423,7 +989,7 @@ sap.ui.define([
|
|
|
1423
989
|
* @deprecated Since 1.95. Please use {@link module:sap/ui/core/ComponentSupport} instead. See also {@link topic:82a0fcecc3cb427c91469bc537ebdddf Declarative API for Initial Components}.
|
|
1424
990
|
*/
|
|
1425
991
|
getRootComponent : function() {
|
|
1426
|
-
return
|
|
992
|
+
return Configuration.getValue("rootComponent");
|
|
1427
993
|
},
|
|
1428
994
|
|
|
1429
995
|
/**
|
|
@@ -1478,7 +1044,7 @@ sap.ui.define([
|
|
|
1478
1044
|
* @experimental Since 1.44
|
|
1479
1045
|
*/
|
|
1480
1046
|
getViewCache : function() {
|
|
1481
|
-
return
|
|
1047
|
+
return Configuration.getValue("xx-viewCache");
|
|
1482
1048
|
},
|
|
1483
1049
|
|
|
1484
1050
|
/**
|
|
@@ -1491,7 +1057,7 @@ sap.ui.define([
|
|
|
1491
1057
|
*/
|
|
1492
1058
|
getPreload : function() {
|
|
1493
1059
|
// if debug sources are requested, then the preload feature must be deactivated
|
|
1494
|
-
if (
|
|
1060
|
+
if (Configuration.getDebug() === true) {
|
|
1495
1061
|
return "";
|
|
1496
1062
|
}
|
|
1497
1063
|
// determine preload mode (e.g. resolve default or auto)
|
|
@@ -1566,7 +1132,7 @@ sap.ui.define([
|
|
|
1566
1132
|
* @since 1.60.0
|
|
1567
1133
|
*/
|
|
1568
1134
|
getFlexibilityServices : function() {
|
|
1569
|
-
var vFlexibilityServices =
|
|
1135
|
+
var vFlexibilityServices = Configuration.getValue("flexibilityServices") || [];
|
|
1570
1136
|
|
|
1571
1137
|
if (typeof vFlexibilityServices === 'string') {
|
|
1572
1138
|
if (vFlexibilityServices[0] === "/") {
|
|
@@ -1579,9 +1145,9 @@ sap.ui.define([
|
|
|
1579
1145
|
vFlexibilityServices = JSON.parse(vFlexibilityServices);
|
|
1580
1146
|
}
|
|
1581
1147
|
}
|
|
1582
|
-
|
|
1148
|
+
config.flexibilityServices = vFlexibilityServices;
|
|
1583
1149
|
|
|
1584
|
-
return
|
|
1150
|
+
return config.flexibilityServices;
|
|
1585
1151
|
},
|
|
1586
1152
|
|
|
1587
1153
|
/**
|
|
@@ -1600,7 +1166,7 @@ sap.ui.define([
|
|
|
1600
1166
|
* @since 1.73.0
|
|
1601
1167
|
*/
|
|
1602
1168
|
setFlexibilityServices: function (aFlexibilityServices) {
|
|
1603
|
-
|
|
1169
|
+
config.flexibilityServices = aFlexibilityServices.slice();
|
|
1604
1170
|
},
|
|
1605
1171
|
|
|
1606
1172
|
/**
|
|
@@ -1611,7 +1177,7 @@ sap.ui.define([
|
|
|
1611
1177
|
* @experimental Since 1.16.3, might change completely.
|
|
1612
1178
|
*/
|
|
1613
1179
|
getComponentPreload : function() {
|
|
1614
|
-
return BaseConfig.get({name: "sapUiXxComponentPreload", type: BaseConfig.Type.String, external: true}) ||
|
|
1180
|
+
return BaseConfig.get({name: "sapUiXxComponentPreload", type: BaseConfig.Type.String, external: true}) || Configuration.getPreload();
|
|
1615
1181
|
},
|
|
1616
1182
|
|
|
1617
1183
|
/**
|
|
@@ -1621,7 +1187,7 @@ sap.ui.define([
|
|
|
1621
1187
|
* @public
|
|
1622
1188
|
*/
|
|
1623
1189
|
getFormatSettings : function() {
|
|
1624
|
-
return
|
|
1190
|
+
return oFormatSettings;
|
|
1625
1191
|
},
|
|
1626
1192
|
|
|
1627
1193
|
/**
|
|
@@ -1631,7 +1197,7 @@ sap.ui.define([
|
|
|
1631
1197
|
* @public
|
|
1632
1198
|
*/
|
|
1633
1199
|
getFrameOptions : function() {
|
|
1634
|
-
return
|
|
1200
|
+
return Configuration.getValue("frameOptions");
|
|
1635
1201
|
},
|
|
1636
1202
|
|
|
1637
1203
|
/**
|
|
@@ -1644,7 +1210,7 @@ sap.ui.define([
|
|
|
1644
1210
|
* Since APIs cannot be renamed or immediately removed for compatibility reasons, this API has been deprecated.
|
|
1645
1211
|
*/
|
|
1646
1212
|
getWhitelistService : function() {
|
|
1647
|
-
return
|
|
1213
|
+
return Configuration.getAllowlistService();
|
|
1648
1214
|
},
|
|
1649
1215
|
|
|
1650
1216
|
/**
|
|
@@ -1654,7 +1220,7 @@ sap.ui.define([
|
|
|
1654
1220
|
* @public
|
|
1655
1221
|
*/
|
|
1656
1222
|
getAllowlistService : function() {
|
|
1657
|
-
return
|
|
1223
|
+
return Configuration.getValue("allowlistService");
|
|
1658
1224
|
},
|
|
1659
1225
|
|
|
1660
1226
|
/**
|
|
@@ -1669,7 +1235,7 @@ sap.ui.define([
|
|
|
1669
1235
|
* @since 1.102
|
|
1670
1236
|
*/
|
|
1671
1237
|
getFileShareSupport : function() {
|
|
1672
|
-
return
|
|
1238
|
+
return Configuration.getValue("fileShareSupport") || undefined;
|
|
1673
1239
|
},
|
|
1674
1240
|
|
|
1675
1241
|
/**
|
|
@@ -1679,7 +1245,7 @@ sap.ui.define([
|
|
|
1679
1245
|
* @experimental
|
|
1680
1246
|
*/
|
|
1681
1247
|
getSupportMode : function() {
|
|
1682
|
-
return
|
|
1248
|
+
return Configuration.getValue("support");
|
|
1683
1249
|
},
|
|
1684
1250
|
|
|
1685
1251
|
/**
|
|
@@ -1689,22 +1255,7 @@ sap.ui.define([
|
|
|
1689
1255
|
* @experimental
|
|
1690
1256
|
*/
|
|
1691
1257
|
getTestRecorderMode : function() {
|
|
1692
|
-
return
|
|
1693
|
-
},
|
|
1694
|
-
|
|
1695
|
-
_collect : function() {
|
|
1696
|
-
var mChanges = this.mChanges || (this.mChanges = { __count : 0});
|
|
1697
|
-
mChanges.__count++;
|
|
1698
|
-
return mChanges;
|
|
1699
|
-
},
|
|
1700
|
-
|
|
1701
|
-
_endCollect : function() {
|
|
1702
|
-
var mChanges = this.mChanges;
|
|
1703
|
-
if ( mChanges && (--mChanges.__count) === 0 ) {
|
|
1704
|
-
delete mChanges.__count;
|
|
1705
|
-
delete this.mChanges;
|
|
1706
|
-
this._oCore && this._oCore.fireLocalizationChanged(mChanges);
|
|
1707
|
-
}
|
|
1258
|
+
return Configuration.getValue("testRecorder");
|
|
1708
1259
|
},
|
|
1709
1260
|
|
|
1710
1261
|
/**
|
|
@@ -1719,7 +1270,7 @@ sap.ui.define([
|
|
|
1719
1270
|
* @since 1.20.0
|
|
1720
1271
|
*/
|
|
1721
1272
|
getStatistics : function() {
|
|
1722
|
-
return
|
|
1273
|
+
return Configuration.getStatisticsEnabled();
|
|
1723
1274
|
},
|
|
1724
1275
|
|
|
1725
1276
|
/**
|
|
@@ -1733,7 +1284,7 @@ sap.ui.define([
|
|
|
1733
1284
|
* @since 1.106.0
|
|
1734
1285
|
*/
|
|
1735
1286
|
getStatisticsEnabled : function() {
|
|
1736
|
-
var result =
|
|
1287
|
+
var result = Configuration.getValue("statistics");
|
|
1737
1288
|
try {
|
|
1738
1289
|
result = result || window.localStorage.getItem("sap-ui-statistics") == "X";
|
|
1739
1290
|
} catch (e) {
|
|
@@ -1762,28 +1313,7 @@ sap.ui.define([
|
|
|
1762
1313
|
* @private
|
|
1763
1314
|
*/
|
|
1764
1315
|
getHandleValidation : function() {
|
|
1765
|
-
return
|
|
1766
|
-
},
|
|
1767
|
-
|
|
1768
|
-
/**
|
|
1769
|
-
* Gets if the hyphenation has to be forced to use only browser-native or only third-party.
|
|
1770
|
-
*
|
|
1771
|
-
* @returns {string} empty string, "native" or "thirdparty"
|
|
1772
|
-
* @private
|
|
1773
|
-
*/
|
|
1774
|
-
getHyphenation : function() {
|
|
1775
|
-
return this.getValue("xx-hyphenation");
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1778
|
-
/**
|
|
1779
|
-
* Gets if pressing alt key will highlight access keys enabled elements on the screen.
|
|
1780
|
-
*
|
|
1781
|
-
* @returns {boolean} whether access keys is enabled
|
|
1782
|
-
* @since 1.104.0
|
|
1783
|
-
* @experimental
|
|
1784
|
-
*/
|
|
1785
|
-
getAccKeys: function () {
|
|
1786
|
-
return this.getValue("xx-acc-keys");
|
|
1316
|
+
return Configuration.getValue("xx-handleValidation");
|
|
1787
1317
|
},
|
|
1788
1318
|
|
|
1789
1319
|
/**
|
|
@@ -1806,7 +1336,7 @@ sap.ui.define([
|
|
|
1806
1336
|
* @see #setSecurityTokenHandlers
|
|
1807
1337
|
*/
|
|
1808
1338
|
getSecurityTokenHandlers : function () {
|
|
1809
|
-
return
|
|
1339
|
+
return Configuration.getValue("securityTokenHandlers").slice();
|
|
1810
1340
|
},
|
|
1811
1341
|
|
|
1812
1342
|
/**
|
|
@@ -1817,7 +1347,7 @@ sap.ui.define([
|
|
|
1817
1347
|
* @experimental
|
|
1818
1348
|
*/
|
|
1819
1349
|
getMeasureCards: function () {
|
|
1820
|
-
return
|
|
1350
|
+
return Configuration.getValue("xx-measure-cards");
|
|
1821
1351
|
},
|
|
1822
1352
|
|
|
1823
1353
|
/**
|
|
@@ -1834,7 +1364,7 @@ sap.ui.define([
|
|
|
1834
1364
|
check(typeof fnSecurityTokenHandler === "function",
|
|
1835
1365
|
"Not a function: " + fnSecurityTokenHandler);
|
|
1836
1366
|
});
|
|
1837
|
-
|
|
1367
|
+
config.securityTokenHandlers = aSecurityTokenHandlers.slice();
|
|
1838
1368
|
},
|
|
1839
1369
|
|
|
1840
1370
|
getBindingSyntax: function() {
|
|
@@ -1845,7 +1375,7 @@ sap.ui.define([
|
|
|
1845
1375
|
freeze: true
|
|
1846
1376
|
});
|
|
1847
1377
|
if ( sBindingSyntax === "default" ) {
|
|
1848
|
-
sBindingSyntax = (
|
|
1378
|
+
sBindingSyntax = (Configuration.getCompatibilityVersion("sapCoreBindingSyntax").compareTo("1.26") < 0) ? "simple" : "complex";
|
|
1849
1379
|
}
|
|
1850
1380
|
return sBindingSyntax;
|
|
1851
1381
|
},
|
|
@@ -1889,8 +1419,8 @@ sap.ui.define([
|
|
|
1889
1419
|
var sName, sMethod;
|
|
1890
1420
|
for ( sName in m ) {
|
|
1891
1421
|
sMethod = "set" + sName.slice(0,1).toUpperCase() + sName.slice(1);
|
|
1892
|
-
if ( sName === 'formatSettings' &&
|
|
1893
|
-
applyAll(
|
|
1422
|
+
if ( sName === 'formatSettings' && oFormatSettings ) {
|
|
1423
|
+
applyAll(oFormatSettings, m[sName]);
|
|
1894
1424
|
} else if ( typeof ctx[sMethod] === 'function' ) {
|
|
1895
1425
|
ctx[sMethod](m[sName]);
|
|
1896
1426
|
} else {
|
|
@@ -1901,9 +1431,9 @@ sap.ui.define([
|
|
|
1901
1431
|
|
|
1902
1432
|
assert(typeof mSettings === 'object', "mSettings must be an object");
|
|
1903
1433
|
|
|
1904
|
-
|
|
1905
|
-
applyAll(
|
|
1906
|
-
|
|
1434
|
+
_collect(); // block events
|
|
1435
|
+
applyAll(Configuration, mSettings);
|
|
1436
|
+
_endCollect(); // might fire localizationChanged
|
|
1907
1437
|
|
|
1908
1438
|
return this;
|
|
1909
1439
|
},
|
|
@@ -1916,11 +1446,11 @@ sap.ui.define([
|
|
|
1916
1446
|
* @private
|
|
1917
1447
|
* @ui5-restricted sap.ui.core.Core
|
|
1918
1448
|
*/
|
|
1919
|
-
setCore: function (
|
|
1449
|
+
setCore: function (oNewCore) {
|
|
1920
1450
|
// Setting the core needs to happen before init
|
|
1921
|
-
// because getValue relies on
|
|
1922
|
-
|
|
1923
|
-
|
|
1451
|
+
// because getValue relies on oCore and is used in init
|
|
1452
|
+
oCore = oNewCore;
|
|
1453
|
+
init();
|
|
1924
1454
|
},
|
|
1925
1455
|
|
|
1926
1456
|
/**
|
|
@@ -1938,7 +1468,7 @@ sap.ui.define([
|
|
|
1938
1468
|
*/
|
|
1939
1469
|
getValue: function(sName) {
|
|
1940
1470
|
var vValue;
|
|
1941
|
-
if (typeof sName !== "string" || !
|
|
1471
|
+
if (typeof sName !== "string" || !Object.hasOwn(M_SETTINGS, sName)) {
|
|
1942
1472
|
throw new TypeError(
|
|
1943
1473
|
"Parameter 'sName' must be the name of a valid configuration option (one of "
|
|
1944
1474
|
+ Object.keys(M_SETTINGS).map(function(key) {
|
|
@@ -1952,11 +1482,11 @@ sap.ui.define([
|
|
|
1952
1482
|
// (if a setter was called), from URL or window["sap-ui-config"].
|
|
1953
1483
|
// In case there is no value or the type conversion fails we return the defaultValue.
|
|
1954
1484
|
// After the Configuration is initialized we only return the value of the configuration.
|
|
1955
|
-
if (
|
|
1956
|
-
vValue =
|
|
1485
|
+
if (bInitialized || config.hasOwnProperty(sName)) {
|
|
1486
|
+
vValue = config[sName];
|
|
1957
1487
|
} else {
|
|
1958
|
-
if (!
|
|
1959
|
-
var oUriParams =
|
|
1488
|
+
if (!config.ignoreUrlParams && !M_SETTINGS[sName].noUrl) {
|
|
1489
|
+
var oUriParams = new URLSearchParams(window.location.search);
|
|
1960
1490
|
vValue = oUriParams.get("sap-ui-" + sName) || oUriParams.get("sap-" + sName);
|
|
1961
1491
|
}
|
|
1962
1492
|
vValue = vValue ? vValue : window["sap-ui-config"][sName] || window["sap-ui-config"][sName.toLowerCase()];
|
|
@@ -1979,14 +1509,44 @@ sap.ui.define([
|
|
|
1979
1509
|
/**
|
|
1980
1510
|
* Enumerable list with available animation modes.
|
|
1981
1511
|
*
|
|
1982
|
-
* This enumerable is used to validate the animation mode. Animation modes allow to specify
|
|
1983
|
-
* The implementation of the Control (JavaScript or CSS)
|
|
1512
|
+
* This enumerable is used to validate the animation mode. Animation modes allow to specify
|
|
1513
|
+
* different animation scenarios or levels. The implementation of the Control (JavaScript or CSS)
|
|
1514
|
+
* has to be done differently for each animation mode.
|
|
1984
1515
|
*
|
|
1985
1516
|
* @enum {string}
|
|
1517
|
+
* @name sap.ui.core.Configuration.AnimationMode
|
|
1986
1518
|
* @since 1.50.0
|
|
1987
1519
|
* @public
|
|
1988
1520
|
*/
|
|
1989
|
-
|
|
1521
|
+
|
|
1522
|
+
/**
|
|
1523
|
+
* <code>full</code> represents a mode with unrestricted animation capabilities.
|
|
1524
|
+
* @public
|
|
1525
|
+
* @name sap.ui.core.Configuration.AnimationMode.full
|
|
1526
|
+
* @member
|
|
1527
|
+
*/
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* <code>basic</code> can be used for a reduced, more light-weight set of animations.
|
|
1531
|
+
* @public
|
|
1532
|
+
* @name sap.ui.core.Configuration.AnimationMode.basic
|
|
1533
|
+
* @member
|
|
1534
|
+
*/
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* <code>minimal</code> includes animations of fundamental functionality.
|
|
1538
|
+
* @public
|
|
1539
|
+
* @name sap.ui.core.Configuration.AnimationMode.minimal
|
|
1540
|
+
* @member
|
|
1541
|
+
*/
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* <code>none</code> deactivates the animation completely.
|
|
1545
|
+
* @public
|
|
1546
|
+
* @name sap.ui.core.Configuration.AnimationMode.none
|
|
1547
|
+
* @member
|
|
1548
|
+
*/
|
|
1549
|
+
Configuration.AnimationMode = AnimationMode;
|
|
1990
1550
|
|
|
1991
1551
|
/*
|
|
1992
1552
|
* Helper that creates a Locale object from the given language
|
|
@@ -2003,87 +1563,12 @@ sap.ui.define([
|
|
|
2003
1563
|
}
|
|
2004
1564
|
}
|
|
2005
1565
|
|
|
2006
|
-
/*
|
|
2007
|
-
* Helper that return a language tag or null from a locale object
|
|
2008
|
-
*/
|
|
2009
|
-
function toLanguageTag(oLocale) {
|
|
2010
|
-
return oLocale ? oLocale.toString() : null;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
var M_ABAP_DATE_FORMAT_PATTERN = {
|
|
2014
|
-
"" : {pattern: null},
|
|
2015
|
-
"1": {pattern: "dd.MM.yyyy"},
|
|
2016
|
-
"2": {pattern: "MM/dd/yyyy"},
|
|
2017
|
-
"3": {pattern: "MM-dd-yyyy"},
|
|
2018
|
-
"4": {pattern: "yyyy.MM.dd"},
|
|
2019
|
-
"5": {pattern: "yyyy/MM/dd"},
|
|
2020
|
-
"6": {pattern: "yyyy-MM-dd"},
|
|
2021
|
-
"7": {pattern: "Gyy.MM.dd"},
|
|
2022
|
-
"8": {pattern: "Gyy/MM/dd"},
|
|
2023
|
-
"9": {pattern: "Gyy-MM-dd"},
|
|
2024
|
-
"A": {pattern: "yyyy/MM/dd"},
|
|
2025
|
-
"B": {pattern: "yyyy/MM/dd"},
|
|
2026
|
-
"C": {pattern: "yyyy/MM/dd"}
|
|
2027
|
-
};
|
|
2028
|
-
|
|
2029
|
-
var M_ABAP_TIME_FORMAT_PATTERN = {
|
|
2030
|
-
"" : {"short": null, medium: null, dayPeriods: null},
|
|
2031
|
-
"0": {"short": "HH:mm", medium: "HH:mm:ss", dayPeriods: null},
|
|
2032
|
-
"1": {"short": "hh:mm a", medium: "hh:mm:ss a", dayPeriods: ["AM", "PM"]},
|
|
2033
|
-
"2": {"short": "hh:mm a", medium: "hh:mm:ss a", dayPeriods: ["am", "pm"]},
|
|
2034
|
-
"3": {"short": "KK:mm a", medium: "KK:mm:ss a", dayPeriods: ["AM", "PM"]},
|
|
2035
|
-
"4": {"short": "KK:mm a", medium: "KK:mm:ss a", dayPeriods: ["am", "pm"]}
|
|
2036
|
-
};
|
|
2037
|
-
|
|
2038
|
-
var M_ABAP_NUMBER_FORMAT_SYMBOLS = {
|
|
2039
|
-
"" : {groupingSeparator: null, decimalSeparator: null},
|
|
2040
|
-
" ": {groupingSeparator: ".", decimalSeparator: ","},
|
|
2041
|
-
"X": {groupingSeparator: ",", decimalSeparator: "."},
|
|
2042
|
-
"Y": {groupingSeparator: " ", decimalSeparator: ","}
|
|
2043
|
-
};
|
|
2044
|
-
|
|
2045
1566
|
function check(bCondition, sMessage) {
|
|
2046
1567
|
if ( !bCondition ) {
|
|
2047
1568
|
throw new Error(sMessage);
|
|
2048
1569
|
}
|
|
2049
1570
|
}
|
|
2050
1571
|
|
|
2051
|
-
/**
|
|
2052
|
-
* Checks if a value exists within an enumerable list.
|
|
2053
|
-
*
|
|
2054
|
-
* @param {object} oEnum Enumeration object with values for validation
|
|
2055
|
-
* @param {string} sValue Value to check against enumerable list
|
|
2056
|
-
* @param {string} sPropertyName Name of the property which is checked
|
|
2057
|
-
* @throws {Error} If the value could not be found, an error is thrown
|
|
2058
|
-
*/
|
|
2059
|
-
function checkEnum(oEnum, sValue, sPropertyName) {
|
|
2060
|
-
var aValidValues = [];
|
|
2061
|
-
for (var sKey in oEnum) {
|
|
2062
|
-
if (oEnum.hasOwnProperty(sKey)) {
|
|
2063
|
-
if (oEnum[sKey] === sValue) {
|
|
2064
|
-
return;
|
|
2065
|
-
}
|
|
2066
|
-
aValidValues.push(oEnum[sKey]);
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
throw new Error("Unsupported Enumeration value for " + sPropertyName + ", valid values are: " + aValidValues.join(", "));
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* Checks if the provided timezone is valid and logs an error if not.
|
|
2074
|
-
*
|
|
2075
|
-
* @param {string} sTimezone The IANA timezone ID
|
|
2076
|
-
* @returns {boolean} Returns true if the timezone is valid
|
|
2077
|
-
*/
|
|
2078
|
-
function checkTimezone(sTimezone) {
|
|
2079
|
-
var bIsValidTimezone = TimezoneUtil.isValidTimezone(sTimezone);
|
|
2080
|
-
if (!bIsValidTimezone) {
|
|
2081
|
-
Log.error("The provided timezone '" + sTimezone + "' is not a valid IANA timezone ID." +
|
|
2082
|
-
" Falling back to browser's local timezone '" + TimezoneUtil.getLocalTimezone() + "'.");
|
|
2083
|
-
}
|
|
2084
|
-
return bIsValidTimezone;
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
1572
|
/**
|
|
2088
1573
|
* @class Encapsulates configuration settings that are related to data formatting/parsing.
|
|
2089
1574
|
*
|
|
@@ -2095,14 +1580,31 @@ sap.ui.define([
|
|
|
2095
1580
|
* @alias sap.ui.core.Configuration.FormatSettings
|
|
2096
1581
|
* @extends sap.ui.base.Object
|
|
2097
1582
|
* @public
|
|
1583
|
+
* @borrows module:sap/base/i18n/Formatting.getCustomUnits as #getCustomUnits
|
|
1584
|
+
* @borrows module:sap/base/i18n/Formatting.setCustomUnits as #setCustomUnits
|
|
1585
|
+
* @borrows module:sap/base/i18n/Formatting.addCustomUnits as #addCustomUnits
|
|
1586
|
+
* @borrows module:sap/base/i18n/Formatting.getUnitMappings as #getUnitMappings
|
|
1587
|
+
* @borrows module:sap/base/i18n/Formatting.setUnitMappings as #setUnitMappings
|
|
1588
|
+
* @borrows module:sap/base/i18n/Formatting.addUnitMappings as #addUnitMappings
|
|
1589
|
+
* @borrows module:sap/base/i18n/Formatting.getDatePattern as #getDatePattern
|
|
1590
|
+
* @borrows module:sap/base/i18n/Formatting.getTimePattern as #getTimePattern
|
|
1591
|
+
* @borrows module:sap/base/i18n/Formatting.getNumberSymbol as #getNumberSymbol
|
|
1592
|
+
* @borrows module:sap/base/i18n/Formatting.getCustomCurrencies as #getCustomCurrencies
|
|
1593
|
+
* @borrows module:sap/base/i18n/Formatting.setCustomCurrencies as #setCustomCurrencies
|
|
1594
|
+
* @borrows module:sap/base/i18n/Formatting.addCustomCurrencies as #addCustomCurrencies
|
|
1595
|
+
* @borrows module:sap/base/i18n/Formatting.getLegacyDateFormat as #getLegacyDateFormat
|
|
1596
|
+
* @borrows module:sap/base/i18n/Formatting.getLegacyTimeFormat as #getLegacyTimeFormat
|
|
1597
|
+
* @borrows module:sap/base/i18n/Formatting.getLegacyNumberFormat as #getLegacyNumberFormat
|
|
1598
|
+
* @borrows module:sap/base/i18n/Formatting.getLegacyDateCalendarCustomizing as #getLegacyDateCalendarCustomizing
|
|
1599
|
+
* @borrows module:sap/base/i18n/Formatting.setLegacyDateCalendarCustomizing as #setLegacyDateCalendarCustomizing
|
|
1600
|
+
* @borrows module:sap/base/i18n/Formatting.getTrailingCurrencyCode as #getTrailingCurrencyCode
|
|
1601
|
+
* @borrows module:sap/base/i18n/Formatting.setTrailingCurrencyCode as #setTrailingCurrencyCode
|
|
1602
|
+
* @borrows module:sap/base/i18n/Formatting.getCustomLocaleData as #getCustomLocaleData
|
|
1603
|
+
*
|
|
2098
1604
|
*/
|
|
2099
1605
|
var FormatSettings = BaseObject.extend("sap.ui.core.Configuration.FormatSettings", /** @lends sap.ui.core.Configuration.FormatSettings.prototype */ {
|
|
2100
|
-
constructor : function(
|
|
2101
|
-
this.oConfiguration = oConfiguration;
|
|
1606
|
+
constructor : function() {
|
|
2102
1607
|
this.mSettings = {};
|
|
2103
|
-
this.sLegacyDateFormat = undefined;
|
|
2104
|
-
this.sLegacyTimeFormat = undefined;
|
|
2105
|
-
this.sLegacyNumberFormatSymbolSet = undefined;
|
|
2106
1608
|
},
|
|
2107
1609
|
|
|
2108
1610
|
/**
|
|
@@ -2120,173 +1622,25 @@ sap.ui.define([
|
|
|
2120
1622
|
* @public
|
|
2121
1623
|
*/
|
|
2122
1624
|
getFormatLocale : function() {
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
// if any user settings have been defined, add the private use subtag "sapufmt"
|
|
2126
|
-
if (!isEmptyObject(oFormatSettings.mSettings)
|
|
2127
|
-
|| oFormatSettings.oConfiguration.getCalendarWeekNumbering() !== CalendarWeekNumbering.Default) {
|
|
2128
|
-
// TODO move to Locale/LocaleData
|
|
2129
|
-
var l = oLocale.toString();
|
|
2130
|
-
if ( l.indexOf("-x-") < 0 ) {
|
|
2131
|
-
l = l + "-x-sapufmt";
|
|
2132
|
-
} else if ( l.indexOf("-sapufmt") <= l.indexOf("-x-") ) {
|
|
2133
|
-
l = l + "-sapufmt";
|
|
2134
|
-
}
|
|
2135
|
-
oLocale = new Locale(l);
|
|
2136
|
-
}
|
|
2137
|
-
return oLocale;
|
|
2138
|
-
}
|
|
2139
|
-
return this.oConfiguration.getValue("formatLocale") || fallback(this);
|
|
1625
|
+
var oLocale = Formatting.getLanguageTag();
|
|
1626
|
+
return Locale._getCoreLocale(oLocale);
|
|
2140
1627
|
},
|
|
2141
1628
|
|
|
2142
|
-
_set
|
|
2143
|
-
var oOldValue = this.mSettings[sKey];
|
|
2144
|
-
if ( oValue != null ) {
|
|
2145
|
-
this.mSettings[sKey] = oValue;
|
|
2146
|
-
} else {
|
|
2147
|
-
delete this.mSettings[sKey];
|
|
2148
|
-
}
|
|
2149
|
-
// report a change only if old and new value differ (null/undefined are treated as the same value)
|
|
2150
|
-
if ( (oOldValue != null || oValue != null) && !deepEqual(oOldValue, oValue) ) {
|
|
2151
|
-
var mChanges = this.oConfiguration._collect();
|
|
2152
|
-
mChanges[sKey] = oValue;
|
|
2153
|
-
this.oConfiguration._endCollect();
|
|
2154
|
-
}
|
|
2155
|
-
},
|
|
1629
|
+
_set: Formatting._set,
|
|
2156
1630
|
|
|
2157
|
-
|
|
2158
|
-
* Retrieves the custom units.
|
|
2159
|
-
* These custom units are set by {@link sap.ui.core.Configuration#setCustomUnits} and {@link sap.ui.core.Configuration#addCustomUnits}
|
|
2160
|
-
* @return {object} custom units object
|
|
2161
|
-
* @see sap.ui.core.Configuration#setCustomUnits
|
|
2162
|
-
* @see sap.ui.core.Configuration#addCustomUnits
|
|
2163
|
-
*/
|
|
2164
|
-
getCustomUnits: function () {
|
|
2165
|
-
return this.mSettings["units"] ? this.mSettings["units"]["short"] : undefined;
|
|
2166
|
-
},
|
|
1631
|
+
getCustomUnits: Formatting.getCustomUnits,
|
|
2167
1632
|
|
|
2168
|
-
|
|
2169
|
-
* Sets custom units which can be used to do Unit Formatting.
|
|
2170
|
-
*
|
|
2171
|
-
* The custom unit object consists of:
|
|
2172
|
-
* * a custom unit key which can then be referenced to use this unit.
|
|
2173
|
-
* * <code>displayName</code> which represents the name of the unit.
|
|
2174
|
-
* * <code>unitPattern-count-<pluralName></code> which represents the plural category of the locale for the given value.
|
|
2175
|
-
* The plural category is defined within the locale, e.g. in the 'en' locale:
|
|
2176
|
-
* <code>unitPattern-count-one</code> for <code>1</code>,
|
|
2177
|
-
* <code>unitPattern-count-zero</code> for <code>0</code>,
|
|
2178
|
-
* <code>unitPattern-count-other</code> for all the res
|
|
2179
|
-
* To retrieve all plural categories defined for a locale use <code>sap.ui.core.LocaleData.prototype.getPluralCategories</code>.
|
|
2180
|
-
*
|
|
2181
|
-
* A Sample custom unit definition could look like this:
|
|
2182
|
-
* <code>
|
|
2183
|
-
* {
|
|
2184
|
-
* "BAG": {
|
|
2185
|
-
* "displayName": "Bag",
|
|
2186
|
-
* "unitPattern-count-one": "{0} bag",
|
|
2187
|
-
* "unitPattern-count-other": "{0} bags"
|
|
2188
|
-
* }
|
|
2189
|
-
* }
|
|
2190
|
-
* </code>
|
|
2191
|
-
* In the above snippet:
|
|
2192
|
-
* * <code>"BAG"</code> represent the unit key which is used to reference it.
|
|
2193
|
-
* * <code>"unitPattern-count-one"</code> represent the unit pattern for the form "one", e.g. the number <code>1</code> in the 'en' locale.
|
|
2194
|
-
* * <code>"unitPattern-count-other"</code> represent the unit pattern for all other numbers which do not
|
|
2195
|
-
* match the plural forms of the previous patterns.
|
|
2196
|
-
* * In the patterns <code>{0}</code> is replaced by the number
|
|
2197
|
-
*
|
|
2198
|
-
* 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>
|
|
2199
|
-
* @param {object} mUnits custom unit object which replaces the current custom unit definition. Call with <code>null</code> to delete custom units.
|
|
2200
|
-
* @returns {this}
|
|
2201
|
-
*/
|
|
2202
|
-
setCustomUnits: function (mUnits) {
|
|
2203
|
-
// add custom units, or remove the existing ones if none are given
|
|
2204
|
-
var mUnitsshort = null;
|
|
2205
|
-
if (mUnits) {
|
|
2206
|
-
mUnitsshort = {
|
|
2207
|
-
"short": mUnits
|
|
2208
|
-
};
|
|
2209
|
-
}
|
|
2210
|
-
this._set("units", mUnitsshort);
|
|
2211
|
-
return this;
|
|
2212
|
-
},
|
|
1633
|
+
setCustomUnits: Formatting.setCustomUnits,
|
|
2213
1634
|
|
|
2214
|
-
|
|
2215
|
-
* Adds custom units.
|
|
2216
|
-
* Similar to {@link sap.ui.core.Configuration#setCustomUnits} but instead of setting the custom units, it will add additional ones.
|
|
2217
|
-
* @param {object} mUnits custom unit object which replaces the current custom unit definition. Call with <code>null</code> to delete custom units.
|
|
2218
|
-
* @returns {this}
|
|
2219
|
-
* @see sap.ui.core.Configuration#setCustomUnits
|
|
2220
|
-
*/
|
|
2221
|
-
addCustomUnits: function (mUnits) {
|
|
2222
|
-
// add custom units, or remove the existing ones if none are given
|
|
2223
|
-
var mExistingUnits = this.getCustomUnits();
|
|
2224
|
-
if (mExistingUnits){
|
|
2225
|
-
mUnits = extend({}, mExistingUnits, mUnits);
|
|
2226
|
-
}
|
|
2227
|
-
this.setCustomUnits(mUnits);
|
|
2228
|
-
return this;
|
|
2229
|
-
},
|
|
1635
|
+
addCustomUnits: Formatting.addCustomUnits,
|
|
2230
1636
|
|
|
2231
|
-
|
|
2232
|
-
* Sets custom unit mappings.
|
|
2233
|
-
* Unit mappings contain key value pairs (both strings)
|
|
2234
|
-
* * {string} key: a new entry which maps to an existing unit key
|
|
2235
|
-
* * {string} value: an existing unit key
|
|
2236
|
-
*
|
|
2237
|
-
* Example:
|
|
2238
|
-
* <code>
|
|
2239
|
-
* {
|
|
2240
|
-
* "my": "my-custom-unit",
|
|
2241
|
-
* "cm": "length-centimeter"
|
|
2242
|
-
* }
|
|
2243
|
-
* </code>
|
|
2244
|
-
* Note: It is possible to create multiple entries per unit key.
|
|
2245
|
-
* Call with <code>null</code> to delete unit mappings.
|
|
2246
|
-
* @param {object} mUnitMappings unit mappings
|
|
2247
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2248
|
-
*/
|
|
2249
|
-
setUnitMappings: function (mUnitMappings) {
|
|
2250
|
-
this._set("unitMappings", mUnitMappings);
|
|
2251
|
-
return this;
|
|
2252
|
-
},
|
|
1637
|
+
setUnitMappings: Formatting.setUnitMappings,
|
|
2253
1638
|
|
|
2254
|
-
|
|
2255
|
-
* Adds unit mappings.
|
|
2256
|
-
* Similar to {@link sap.ui.core.Configuration#setUnitMappings} but instead of setting the unit mappings, it will add additional ones.
|
|
2257
|
-
* @param {object} mUnitMappings unit mappings
|
|
2258
|
-
* @returns {this}
|
|
2259
|
-
* @see sap.ui.core.Configuration#setUnitMappings
|
|
2260
|
-
*/
|
|
2261
|
-
addUnitMappings: function (mUnitMappings) {
|
|
2262
|
-
// add custom units, or remove the existing ones if none are given
|
|
2263
|
-
var mExistingUnits = this.getUnitMappings();
|
|
2264
|
-
if (mExistingUnits){
|
|
2265
|
-
mUnitMappings = extend({}, mExistingUnits, mUnitMappings);
|
|
2266
|
-
}
|
|
2267
|
-
this.setUnitMappings(mUnitMappings);
|
|
2268
|
-
return this;
|
|
2269
|
-
},
|
|
1639
|
+
addUnitMappings: Formatting.addUnitMappings,
|
|
2270
1640
|
|
|
2271
|
-
|
|
2272
|
-
* Retrieves the unit mappings.
|
|
2273
|
-
* These unit mappings are set by {@link sap.ui.core.Configuration#setUnitMappings} and {@link sap.ui.core.Configuration#addUnitMappings}
|
|
2274
|
-
* @returns {object} unit mapping object
|
|
2275
|
-
* @see sap.ui.core.Configuration#setUnitMappings
|
|
2276
|
-
* @see sap.ui.core.Configuration#addUnitMappings
|
|
2277
|
-
*/
|
|
2278
|
-
getUnitMappings: function () {
|
|
2279
|
-
return this.mSettings["unitMappings"];
|
|
2280
|
-
},
|
|
1641
|
+
getUnitMappings: Formatting.getUnitMappings,
|
|
2281
1642
|
|
|
2282
|
-
|
|
2283
|
-
* Returns the currently set date pattern or undefined if no pattern has been defined.
|
|
2284
|
-
* @public
|
|
2285
|
-
*/
|
|
2286
|
-
getDatePattern : function(sStyle) {
|
|
2287
|
-
assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
2288
|
-
return this.mSettings["dateFormats-" + sStyle];
|
|
2289
|
-
},
|
|
1643
|
+
getDatePattern : Formatting.getDatePattern,
|
|
2290
1644
|
|
|
2291
1645
|
/**
|
|
2292
1646
|
* Defines the preferred format pattern for the given date format style.
|
|
@@ -2305,21 +1659,11 @@ sap.ui.define([
|
|
|
2305
1659
|
* @param {string} sPattern the format pattern to be used in LDML syntax.
|
|
2306
1660
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2307
1661
|
* @public
|
|
1662
|
+
* @function
|
|
2308
1663
|
*/
|
|
2309
|
-
setDatePattern :
|
|
2310
|
-
check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
2311
|
-
this._set("dateFormats-" + sStyle, sPattern);
|
|
2312
|
-
return this;
|
|
2313
|
-
},
|
|
1664
|
+
setDatePattern : Formatting.setDatePattern,
|
|
2314
1665
|
|
|
2315
|
-
|
|
2316
|
-
* Returns the currently set time pattern or undefined if no pattern has been defined.
|
|
2317
|
-
* @public
|
|
2318
|
-
*/
|
|
2319
|
-
getTimePattern : function(sStyle) {
|
|
2320
|
-
assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
2321
|
-
return this.mSettings["timeFormats-" + sStyle];
|
|
2322
|
-
},
|
|
1666
|
+
getTimePattern : Formatting.getTimePattern,
|
|
2323
1667
|
|
|
2324
1668
|
/**
|
|
2325
1669
|
* Defines the preferred format pattern for the given time format style.
|
|
@@ -2338,31 +1682,11 @@ sap.ui.define([
|
|
|
2338
1682
|
* @param {string} sPattern the format pattern to be used in LDML syntax.
|
|
2339
1683
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2340
1684
|
* @public
|
|
1685
|
+
* @function
|
|
2341
1686
|
*/
|
|
2342
|
-
setTimePattern :
|
|
2343
|
-
check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
|
|
2344
|
-
this._set("timeFormats-" + sStyle, sPattern);
|
|
2345
|
-
return this;
|
|
2346
|
-
},
|
|
1687
|
+
setTimePattern : Formatting.setTimePattern,
|
|
2347
1688
|
|
|
2348
|
-
|
|
2349
|
-
* Returns the currently set number symbol of the given type or undefined if no symbol has been defined.
|
|
2350
|
-
*
|
|
2351
|
-
* @param {"group"|"decimal"|"plusSign"|"minusSign"} sType the type of symbol
|
|
2352
|
-
* @return {string} A non-numerical symbol used as part of a number for the given type,
|
|
2353
|
-
* e.g. for locale de_DE:
|
|
2354
|
-
* <ul>
|
|
2355
|
-
* <li>"group": "." (grouping separator)</li>
|
|
2356
|
-
* <li>"decimal": "," (decimal separator)</li>
|
|
2357
|
-
* <li>"plusSign": "+" (plus sign)</li>
|
|
2358
|
-
* <li>"minusSign": "-" (minus sign)</li>
|
|
2359
|
-
* </ul>
|
|
2360
|
-
* @public
|
|
2361
|
-
*/
|
|
2362
|
-
getNumberSymbol : function(sType) {
|
|
2363
|
-
assert(["group", "decimal", "plusSign", "minusSign"].includes(sType), "sType must be decimal, group, plusSign or minusSign");
|
|
2364
|
-
return this.mSettings["symbols-latn-" + sType];
|
|
2365
|
-
},
|
|
1689
|
+
getNumberSymbol : Formatting.getNumberSymbol,
|
|
2366
1690
|
|
|
2367
1691
|
/**
|
|
2368
1692
|
* Defines the string to be used for the given number symbol.
|
|
@@ -2382,97 +1706,15 @@ sap.ui.define([
|
|
|
2382
1706
|
* @param {string} sSymbol will be used to represent the given symbol type
|
|
2383
1707
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2384
1708
|
* @public
|
|
1709
|
+
* @function
|
|
2385
1710
|
*/
|
|
2386
|
-
setNumberSymbol :
|
|
2387
|
-
check(["group", "decimal", "plusSign", "minusSign"].includes(sType), "sType must be decimal, group, plusSign or minusSign");
|
|
2388
|
-
this._set("symbols-latn-" + sType, sSymbol);
|
|
2389
|
-
return this;
|
|
2390
|
-
},
|
|
1711
|
+
setNumberSymbol : Formatting.setNumberSymbol,
|
|
2391
1712
|
|
|
2392
|
-
|
|
2393
|
-
* Retrieves the custom currencies.
|
|
2394
|
-
* E.g.
|
|
2395
|
-
* <code>
|
|
2396
|
-
* {
|
|
2397
|
-
* "KWD": {"digits": 3},
|
|
2398
|
-
* "TND" : {"digits": 3}
|
|
2399
|
-
* }
|
|
2400
|
-
* </code>
|
|
2401
|
-
* @public
|
|
2402
|
-
* @returns {Object<string,object>} the mapping between custom currencies and its digits
|
|
2403
|
-
*/
|
|
2404
|
-
getCustomCurrencies : function() {
|
|
2405
|
-
return this.mSettings["currency"];
|
|
2406
|
-
},
|
|
1713
|
+
getCustomCurrencies : Formatting.getCustomCurrencies,
|
|
2407
1714
|
|
|
2408
|
-
|
|
2409
|
-
* Sets custom currencies and replaces existing entries.
|
|
2410
|
-
*
|
|
2411
|
-
* There is a special currency code named "DEFAULT" that is optional.
|
|
2412
|
-
* In case it is set it will be used for all currencies not contained
|
|
2413
|
-
* in the list, otherwise currency digits as defined by the CLDR will
|
|
2414
|
-
* be used as a fallback.
|
|
2415
|
-
*
|
|
2416
|
-
* Example:
|
|
2417
|
-
* To use CLDR, but override single currencies
|
|
2418
|
-
* <code>
|
|
2419
|
-
* {
|
|
2420
|
-
* "KWD": {"digits": 3},
|
|
2421
|
-
* "TND" : {"digits": 3}
|
|
2422
|
-
* }
|
|
2423
|
-
* </code>
|
|
2424
|
-
*
|
|
2425
|
-
* To replace the CLDR currency digits completely
|
|
2426
|
-
* <code>
|
|
2427
|
-
* {
|
|
2428
|
-
* "DEFAULT": {"digits": 2},
|
|
2429
|
-
* "ADP": {"digits": 0},
|
|
2430
|
-
* ...
|
|
2431
|
-
* "XPF": {"digits": 0}
|
|
2432
|
-
* }
|
|
2433
|
-
* </code>
|
|
2434
|
-
*
|
|
2435
|
-
* Note: To unset the custom currencies: call with <code>undefined</code>
|
|
2436
|
-
* Custom currencies must not only consist of digits but contain at least one non-digit character, e.g. "a",
|
|
2437
|
-
* so that the measure part can be distinguished from the number part.
|
|
2438
|
-
* @public
|
|
2439
|
-
* @param {Object<string,object>} mCurrencies currency map which is set
|
|
2440
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2441
|
-
*/
|
|
2442
|
-
setCustomCurrencies : function(mCurrencies) {
|
|
2443
|
-
check(typeof mCurrencies === "object" || mCurrencies == null, "mCurrencyDigits must be an object");
|
|
2444
|
-
Object.keys(mCurrencies || {}).forEach(function(sCurrencyDigit) {
|
|
2445
|
-
check(typeof sCurrencyDigit === "string");
|
|
2446
|
-
check(typeof mCurrencies[sCurrencyDigit] === "object");
|
|
2447
|
-
});
|
|
2448
|
-
this._set("currency", mCurrencies);
|
|
2449
|
-
return this;
|
|
2450
|
-
},
|
|
1715
|
+
setCustomCurrencies : Formatting.setCustomCurrencies,
|
|
2451
1716
|
|
|
2452
|
-
|
|
2453
|
-
* Adds custom currencies to the existing entries.
|
|
2454
|
-
* E.g.
|
|
2455
|
-
* <code>
|
|
2456
|
-
* {
|
|
2457
|
-
* "KWD": {"digits": 3},
|
|
2458
|
-
* "TND" : {"digits": 3}
|
|
2459
|
-
* }
|
|
2460
|
-
* </code>
|
|
2461
|
-
*
|
|
2462
|
-
* @public
|
|
2463
|
-
* @param {Object<string,object>} mCurrencies adds to the currency map
|
|
2464
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2465
|
-
* @see sap.ui.core.Configuration.FormatSettings#setCustomCurrencies
|
|
2466
|
-
*/
|
|
2467
|
-
addCustomCurrencies: function (mCurrencies) {
|
|
2468
|
-
// add custom units, or remove the existing ones if none are given
|
|
2469
|
-
var mExistingCurrencies = this.getCustomCurrencies();
|
|
2470
|
-
if (mExistingCurrencies){
|
|
2471
|
-
mCurrencies = extend({}, mExistingCurrencies, mCurrencies);
|
|
2472
|
-
}
|
|
2473
|
-
this.setCustomCurrencies(mCurrencies);
|
|
2474
|
-
return this;
|
|
2475
|
-
},
|
|
1717
|
+
addCustomCurrencies: Formatting.addCustomCurrencies,
|
|
2476
1718
|
|
|
2477
1719
|
/**
|
|
2478
1720
|
* Defines the day used as the first day of the week.
|
|
@@ -2493,30 +1735,17 @@ sap.ui.define([
|
|
|
2493
1735
|
* @param {int} iValue must be an integer value between 0 and 6
|
|
2494
1736
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2495
1737
|
* @public
|
|
2496
|
-
* @deprecated Since 1.113.0. Use {@link sap.ui.core.Configuration#setCalendarWeekNumbering} instead.
|
|
1738
|
+
* @deprecated Since 1.113.0. Use {@link sap.ui.core.Configuration.FormatSettings#setCalendarWeekNumbering} instead.
|
|
2497
1739
|
*/
|
|
2498
1740
|
setFirstDayOfWeek : function(iValue) {
|
|
2499
1741
|
check(typeof iValue == "number" && iValue >= 0 && iValue <= 6, "iValue must be an integer value between 0 and 6");
|
|
2500
|
-
|
|
1742
|
+
Formatting._set("weekData-firstDay", iValue);
|
|
2501
1743
|
return this;
|
|
2502
1744
|
},
|
|
2503
1745
|
|
|
2504
|
-
_setDayPeriods
|
|
2505
|
-
assert(sWidth == "narrow" || sWidth == "abbreviated" || sWidth == "wide", "sWidth must be narrow, abbreviated or wide");
|
|
2506
|
-
this._set("dayPeriods-format-" + sWidth, aTexts);
|
|
2507
|
-
return this;
|
|
2508
|
-
},
|
|
1746
|
+
_setDayPeriods: Formatting._setDayPeriods,
|
|
2509
1747
|
|
|
2510
|
-
|
|
2511
|
-
* Returns the currently set legacy ABAP date format (its id) or undefined if none has been set.
|
|
2512
|
-
*
|
|
2513
|
-
* @return {"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"A"|"B"|"C"|undefined} ID of the ABAP date format,
|
|
2514
|
-
* if not set or set to <code>""</code>, <code>undefined</code> will be returned
|
|
2515
|
-
* @public
|
|
2516
|
-
*/
|
|
2517
|
-
getLegacyDateFormat : function() {
|
|
2518
|
-
return this.sLegacyDateFormat || undefined;
|
|
2519
|
-
},
|
|
1748
|
+
getLegacyDateFormat : Formatting.getLegacyDateFormat,
|
|
2520
1749
|
|
|
2521
1750
|
/**
|
|
2522
1751
|
* Allows to specify one of the legacy ABAP date formats.
|
|
@@ -2533,28 +1762,11 @@ sap.ui.define([
|
|
|
2533
1762
|
* locale-specific ones.
|
|
2534
1763
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2535
1764
|
* @public
|
|
1765
|
+
* @function
|
|
2536
1766
|
*/
|
|
2537
|
-
setLegacyDateFormat :
|
|
2538
|
-
sFormatId = sFormatId ? String(sFormatId).toUpperCase() : "";
|
|
2539
|
-
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");
|
|
2540
|
-
var mChanges = this.oConfiguration._collect();
|
|
2541
|
-
this.sLegacyDateFormat = mChanges.legacyDateFormat = sFormatId;
|
|
2542
|
-
this.setDatePattern("short", M_ABAP_DATE_FORMAT_PATTERN[sFormatId].pattern);
|
|
2543
|
-
this.setDatePattern("medium", M_ABAP_DATE_FORMAT_PATTERN[sFormatId].pattern);
|
|
2544
|
-
this.oConfiguration._endCollect();
|
|
2545
|
-
return this;
|
|
2546
|
-
},
|
|
1767
|
+
setLegacyDateFormat : Formatting.setLegacyDateFormat,
|
|
2547
1768
|
|
|
2548
|
-
|
|
2549
|
-
* Returns the currently set legacy ABAP time format (its id) or undefined if none has been set.
|
|
2550
|
-
*
|
|
2551
|
-
* @return {"0"|"1"|"2"|"3"|"4"|undefined} ID of the ABAP date format,
|
|
2552
|
-
* if not set or set to <code>""</code>, <code>undefined</code> will be returned
|
|
2553
|
-
* @public
|
|
2554
|
-
*/
|
|
2555
|
-
getLegacyTimeFormat : function() {
|
|
2556
|
-
return this.sLegacyTimeFormat || undefined;
|
|
2557
|
-
},
|
|
1769
|
+
getLegacyTimeFormat : Formatting.getLegacyTimeFormat,
|
|
2558
1770
|
|
|
2559
1771
|
/**
|
|
2560
1772
|
* Allows to specify one of the legacy ABAP time formats.
|
|
@@ -2572,29 +1784,11 @@ sap.ui.define([
|
|
|
2572
1784
|
* period texts to the locale-specific ones.
|
|
2573
1785
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2574
1786
|
* @public
|
|
1787
|
+
* @function
|
|
2575
1788
|
*/
|
|
2576
|
-
setLegacyTimeFormat :
|
|
2577
|
-
sFormatId = sFormatId || "";
|
|
2578
|
-
check(M_ABAP_TIME_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['0','1','2','3','4'] or empty");
|
|
2579
|
-
var mChanges = this.oConfiguration._collect();
|
|
2580
|
-
this.sLegacyTimeFormat = mChanges.legacyTimeFormat = sFormatId;
|
|
2581
|
-
this.setTimePattern("short", M_ABAP_TIME_FORMAT_PATTERN[sFormatId]["short"]);
|
|
2582
|
-
this.setTimePattern("medium", M_ABAP_TIME_FORMAT_PATTERN[sFormatId]["medium"]);
|
|
2583
|
-
this._setDayPeriods("abbreviated", M_ABAP_TIME_FORMAT_PATTERN[sFormatId].dayPeriods);
|
|
2584
|
-
this.oConfiguration._endCollect();
|
|
2585
|
-
return this;
|
|
2586
|
-
},
|
|
1789
|
+
setLegacyTimeFormat : Formatting.setLegacyTimeFormat,
|
|
2587
1790
|
|
|
2588
|
-
|
|
2589
|
-
* Returns the currently set legacy ABAP number format (its id) or undefined if none has been set.
|
|
2590
|
-
*
|
|
2591
|
-
* @return {" "|"X"|"Y"|undefined} ID of the ABAP number format,
|
|
2592
|
-
* if not set or set to <code>""</code>, <code>undefined</code> will be returned
|
|
2593
|
-
* @public
|
|
2594
|
-
*/
|
|
2595
|
-
getLegacyNumberFormat : function() {
|
|
2596
|
-
return this.sLegacyNumberFormat || undefined;
|
|
2597
|
-
},
|
|
1791
|
+
getLegacyNumberFormat : Formatting.getLegacyNumberFormat,
|
|
2598
1792
|
|
|
2599
1793
|
/**
|
|
2600
1794
|
* Allows to specify one of the legacy ABAP number format.
|
|
@@ -2611,106 +1805,39 @@ sap.ui.define([
|
|
|
2611
1805
|
* ones.
|
|
2612
1806
|
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2613
1807
|
* @public
|
|
1808
|
+
* @function
|
|
2614
1809
|
*/
|
|
2615
|
-
setLegacyNumberFormat :
|
|
2616
|
-
sFormatId = sFormatId ? sFormatId.toUpperCase() : "";
|
|
2617
|
-
check(M_ABAP_NUMBER_FORMAT_SYMBOLS.hasOwnProperty(sFormatId), "sFormatId must be one of [' ','X','Y'] or empty");
|
|
2618
|
-
var mChanges = this.oConfiguration._collect();
|
|
2619
|
-
this.sLegacyNumberFormat = mChanges.legacyNumberFormat = sFormatId;
|
|
2620
|
-
this.setNumberSymbol("group", M_ABAP_NUMBER_FORMAT_SYMBOLS[sFormatId].groupingSeparator);
|
|
2621
|
-
this.setNumberSymbol("decimal", M_ABAP_NUMBER_FORMAT_SYMBOLS[sFormatId].decimalSeparator);
|
|
2622
|
-
this.oConfiguration._endCollect();
|
|
2623
|
-
return this;
|
|
2624
|
-
},
|
|
1810
|
+
setLegacyNumberFormat : Formatting.setLegacyNumberFormat,
|
|
2625
1811
|
|
|
2626
|
-
|
|
2627
|
-
* The object that contains the information for date calendar customizing
|
|
2628
|
-
*
|
|
2629
|
-
* @typedef {object} sap.ui.core.Configuration.LegacyDateCalendarCustomizing
|
|
2630
|
-
* @public
|
|
2631
|
-
*
|
|
2632
|
-
* @property {"A"|"B"} dateFormat The IO of the date format. It has value "A" or "B".
|
|
2633
|
-
* @property {string} islamicMonthStart The Islamic date in format "yyyyMMdd".
|
|
2634
|
-
* @property {string} gregDate The corresponding Gregorian date in format "yyyyMMdd".
|
|
2635
|
-
*/
|
|
1812
|
+
setLegacyDateCalendarCustomizing : Formatting.setLegacyDateCalendarCustomizing,
|
|
2636
1813
|
|
|
2637
|
-
|
|
2638
|
-
* Allows to specify the customizing data for Islamic calendar support
|
|
2639
|
-
*
|
|
2640
|
-
* @param {Array<sap.ui.core.Configuration.LegacyDateCalendarCustomizing>} aMappings contains the customizing
|
|
2641
|
-
* data for the support of Islamic calendar.
|
|
2642
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2643
|
-
* @public
|
|
2644
|
-
*/
|
|
2645
|
-
setLegacyDateCalendarCustomizing : function(aMappings) {
|
|
2646
|
-
check(Array.isArray(aMappings), "aMappings must be an Array");
|
|
1814
|
+
getLegacyDateCalendarCustomizing : Formatting.getLegacyDateCalendarCustomizing,
|
|
2647
1815
|
|
|
2648
|
-
|
|
2649
|
-
this.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings.slice();
|
|
2650
|
-
this.oConfiguration._endCollect();
|
|
2651
|
-
return this;
|
|
2652
|
-
},
|
|
1816
|
+
setTrailingCurrencyCode : Formatting.setTrailingCurrencyCode,
|
|
2653
1817
|
|
|
2654
|
-
|
|
2655
|
-
* Returns the currently set customizing data for Islamic calendar support
|
|
2656
|
-
*
|
|
2657
|
-
* @return {Array<sap.ui.core.Configuration.LegacyDateCalendarCustomizing>} Returns an array contains the
|
|
2658
|
-
* customizing data. For details, please see {@link #setLegacyDateCalendarCustomizing}
|
|
2659
|
-
* @public
|
|
2660
|
-
*/
|
|
2661
|
-
getLegacyDateCalendarCustomizing : function() {
|
|
2662
|
-
var aLegacyDateCalendarCustomizing = this.aLegacyDateCalendarCustomizing;
|
|
2663
|
-
if (aLegacyDateCalendarCustomizing) {
|
|
2664
|
-
aLegacyDateCalendarCustomizing = aLegacyDateCalendarCustomizing.slice();
|
|
2665
|
-
}
|
|
2666
|
-
return aLegacyDateCalendarCustomizing;
|
|
2667
|
-
},
|
|
1818
|
+
getTrailingCurrencyCode : Formatting.getTrailingCurrencyCode,
|
|
2668
1819
|
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
* the only exception of right-to-left locales, where the currency code shall be placed before the numeric value.
|
|
2672
|
-
* Default configuration setting is <code>true</code>.
|
|
2673
|
-
*
|
|
2674
|
-
* When set to <code>false</code> the placement of the currency code is done dynamically, depending on the
|
|
2675
|
-
* configured locale using data provided by the Unicode Common Locale Data Repository (CLDR).
|
|
2676
|
-
*
|
|
2677
|
-
* Each currency instance ({@link sap.ui.core.format.NumberFormat.getCurrencyInstance}) will be created
|
|
2678
|
-
* with this setting unless overwritten on instance level.
|
|
2679
|
-
*
|
|
2680
|
-
* @param {boolean} bTrailingCurrencyCode Whether currency codes shall always be placed after the numeric value
|
|
2681
|
-
* @returns {this} Returns <code>this</code> to allow method chaining
|
|
2682
|
-
* @since 1.75.0
|
|
2683
|
-
* @public
|
|
2684
|
-
*/
|
|
2685
|
-
setTrailingCurrencyCode : function(bTrailingCurrencyCode) {
|
|
2686
|
-
check(typeof bTrailingCurrencyCode === "boolean", "bTrailingCurrencyCode must be a boolean");
|
|
2687
|
-
this.oConfiguration.trailingCurrencyCode = bTrailingCurrencyCode;
|
|
2688
|
-
return this;
|
|
2689
|
-
},
|
|
1820
|
+
getCustomLocaleData : Formatting.getCustomLocaleData
|
|
1821
|
+
});
|
|
2690
1822
|
|
|
2691
|
-
|
|
2692
|
-
* Returns current trailingCurrencyCode configuration for new NumberFormatter instances
|
|
2693
|
-
*
|
|
2694
|
-
* @return {boolean} Whether currency codes shall always be placed after the numeric value
|
|
2695
|
-
* @since 1.75.0
|
|
2696
|
-
* @public
|
|
2697
|
-
*/
|
|
2698
|
-
getTrailingCurrencyCode : function() {
|
|
2699
|
-
return this.oConfiguration.getValue("trailingCurrencyCode");
|
|
2700
|
-
},
|
|
1823
|
+
oFormatSettings = new FormatSettings(this);
|
|
2701
1824
|
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
return this.mSettings;
|
|
1825
|
+
//enable Eventing
|
|
1826
|
+
Localization.attachChange(function(oEvent) {
|
|
1827
|
+
if (!mChanges && oCore) {
|
|
1828
|
+
oCore.fireLocalizationChanged(BaseEvent.getParameters(oEvent));
|
|
1829
|
+
} else if (mChanges) {
|
|
1830
|
+
Object.assign(mChanges, BaseEvent.getParameters(oEvent));
|
|
2709
1831
|
}
|
|
2710
1832
|
});
|
|
2711
1833
|
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
1834
|
+
Formatting.attachChange(function(oEvent) {
|
|
1835
|
+
if (!mChanges && oCore) {
|
|
1836
|
+
oCore.fireLocalizationChanged(BaseEvent.getParameters(oEvent));
|
|
1837
|
+
} else if (mChanges) {
|
|
1838
|
+
Object.assign(mChanges, BaseEvent.getParameters(oEvent));
|
|
1839
|
+
}
|
|
1840
|
+
});
|
|
2715
1841
|
|
|
2716
|
-
|
|
1842
|
+
return Configuration;
|
|
1843
|
+
});
|