@openui5/sap.ui.core 1.112.2 → 1.114.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 +102 -1
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +10 -4
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +7 -7
- package/src/jquery.sap.trace.js +14 -14
- package/src/sap/base/Log.js +92 -8
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/config/MemoryConfigurationProvider.js +22 -0
- package/src/sap/base/config.js +54 -0
- package/src/sap/base/security/URLWhitelist.js +1 -1
- package/src/sap/base/util/Deferred.js +3 -2
- package/src/sap/base/util/restricted/_CancelablePromise.js +2 -2
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +8 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/BindingParser.js +79 -18
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/ExpressionParser.js +15 -5
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +16 -13
- package/src/sap/ui/base/ManagedObjectMetadata.js +35 -35
- package/src/sap/ui/base/Metadata.js +23 -12
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -1
- package/src/sap/ui/core/BusyIndicator.js +4 -4
- package/src/sap/ui/core/Component.js +10 -7
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +3 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +104 -45
- package/src/sap/ui/core/Control.js +23 -6
- package/src/sap/ui/core/Core.js +36 -15
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomStyleClassSupport.js +5 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +19 -4
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +4 -4
- 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 +17 -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 +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +10 -2
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +28 -2
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +2 -2
- package/src/sap/ui/core/LocaleData.js +87 -19
- 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 +34 -36
- package/src/sap/ui/core/RenderManager.js +8 -2
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/Rendering.js +2 -3
- package/src/sap/ui/core/ResizeHandler.js +2 -2
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +9 -2
- package/src/sap/ui/core/UIComponent.js +16 -13
- 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 +30 -6
- package/src/sap/ui/core/cache/CacheManager.js +1 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
- package/src/sap/ui/core/date/CalendarUtils.js +14 -26
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +32 -0
- package/src/sap/ui/core/date/UI5Date.js +14 -8
- package/src/sap/ui/core/date/UniversalDate.js +15 -53
- package/src/sap/ui/core/date/UniversalDateUtils.js +4 -4
- package/src/sap/ui/core/date/_Calendars.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/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 +166 -59
- package/src/sap/ui/core/format/NumberFormat.js +40 -5
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- 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/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle.properties +2 -0
- package/src/sap/ui/core/messagebundle_ar.properties +2 -1
- package/src/sap/ui/core/messagebundle_bg.properties +1 -0
- package/src/sap/ui/core/messagebundle_ca.properties +1 -0
- package/src/sap/ui/core/messagebundle_cs.properties +2 -1
- package/src/sap/ui/core/messagebundle_cy.properties +2 -1
- package/src/sap/ui/core/messagebundle_da.properties +2 -1
- package/src/sap/ui/core/messagebundle_de.properties +2 -1
- package/src/sap/ui/core/messagebundle_el.properties +2 -1
- package/src/sap/ui/core/messagebundle_en.properties +2 -1
- package/src/sap/ui/core/messagebundle_en_GB.properties +2 -1
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/core/messagebundle_es.properties +5 -4
- package/src/sap/ui/core/messagebundle_es_MX.properties +2 -1
- package/src/sap/ui/core/messagebundle_et.properties +2 -1
- package/src/sap/ui/core/messagebundle_fi.properties +2 -1
- package/src/sap/ui/core/messagebundle_fr.properties +2 -1
- package/src/sap/ui/core/messagebundle_fr_CA.properties +2 -1
- package/src/sap/ui/core/messagebundle_hi.properties +2 -1
- package/src/sap/ui/core/messagebundle_hr.properties +2 -1
- package/src/sap/ui/core/messagebundle_hu.properties +2 -1
- package/src/sap/ui/core/messagebundle_id.properties +2 -1
- package/src/sap/ui/core/messagebundle_it.properties +2 -1
- package/src/sap/ui/core/messagebundle_iw.properties +2 -1
- package/src/sap/ui/core/messagebundle_ja.properties +1 -0
- package/src/sap/ui/core/messagebundle_kk.properties +2 -1
- package/src/sap/ui/core/messagebundle_ko.properties +2 -1
- package/src/sap/ui/core/messagebundle_lt.properties +2 -1
- package/src/sap/ui/core/messagebundle_lv.properties +2 -1
- package/src/sap/ui/core/messagebundle_ms.properties +2 -1
- package/src/sap/ui/core/messagebundle_nl.properties +2 -1
- package/src/sap/ui/core/messagebundle_no.properties +2 -1
- package/src/sap/ui/core/messagebundle_pl.properties +2 -1
- package/src/sap/ui/core/messagebundle_pt.properties +2 -1
- package/src/sap/ui/core/messagebundle_pt_PT.properties +2 -1
- package/src/sap/ui/core/messagebundle_ro.properties +2 -1
- package/src/sap/ui/core/messagebundle_ru.properties +3 -2
- package/src/sap/ui/core/messagebundle_sh.properties +2 -1
- package/src/sap/ui/core/messagebundle_sk.properties +2 -1
- package/src/sap/ui/core/messagebundle_sl.properties +2 -1
- package/src/sap/ui/core/messagebundle_sv.properties +2 -1
- package/src/sap/ui/core/messagebundle_th.properties +2 -1
- package/src/sap/ui/core/messagebundle_tr.properties +2 -1
- package/src/sap/ui/core/messagebundle_uk.properties +2 -1
- package/src/sap/ui/core/messagebundle_vi.properties +2 -1
- package/src/sap/ui/core/messagebundle_zh_CN.properties +2 -1
- package/src/sap/ui/core/messagebundle_zh_TW.properties +2 -1
- package/src/sap/ui/core/mvc/Controller.js +2 -3
- package/src/sap/ui/core/mvc/ControllerExtension.js +1 -1
- 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 +24 -17
- package/src/sap/ui/core/mvc/XMLView.js +2 -2
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Route.js +30 -22
- package/src/sap/ui/core/routing/Router.js +5 -3
- package/src/sap/ui/core/routing/Target.js +170 -3
- package/src/sap/ui/core/routing/Targets.js +5 -214
- package/src/sap/ui/core/routing/Views.js +1 -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 +1 -1
- package/src/sap/ui/core/support/controls/InteractionTree.js +5 -3
- package/src/sap/ui/core/support/plugins/Breakpoint.js +2 -2
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +6 -4
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +4 -3
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +4358 -78
- package/src/sap/ui/core/themes/base/global.less +114 -8
- package/src/sap/ui/core/themes/sap_hcb/global.less +114 -8
- package/src/sap/ui/core/theming/Parameters.js +10 -2
- package/src/sap/ui/core/theming/ThemeManager.js +16 -12
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/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/dom/includeScript.js +3 -3
- package/src/sap/ui/dom/includeStylesheet.js +3 -3
- package/src/sap/ui/events/ControlEvents.js +2 -2
- package/src/sap/ui/events/PseudoEvents.js +4 -2
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ManagedObjectBindingSupport.js +19 -2
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +7 -3
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/base/ManagedObjectModel.js +12 -4
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +2 -0
- package/src/sap/ui/model/json/JSONModel.js +1 -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 +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.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 +67 -21
- package/src/sap/ui/model/odata/type/DateTime.js +51 -8
- package/src/sap/ui/model/odata/type/DateTimeBase.js +55 -26
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +42 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +37 -21
- package/src/sap/ui/model/odata/type/Decimal.js +28 -33
- package/src/sap/ui/model/odata/type/Double.js +21 -26
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +15 -20
- 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 +16 -21
- package/src/sap/ui/model/odata/type/ODataType.js +33 -6
- 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 +20 -25
- 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 +91 -21
- package/src/sap/ui/model/odata/type/TimeOfDay.js +70 -24
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +72 -28
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +5 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +29 -10
- package/src/sap/ui/model/odata/v2/ODataModel.js +92 -36
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -1
- package/src/sap/ui/model/odata/v4/Context.js +36 -21
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -21
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +7 -25
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +208 -74
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +4 -3
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +42 -28
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +100 -21
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +99 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +75 -2
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +6 -0
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +3 -0
- 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 +15 -1
- package/src/sap/ui/model/type/DateInterval.js +15 -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/performance/Measurement.js +9 -9
- package/src/sap/ui/performance/trace/Interaction.js +50 -4
- package/src/sap/ui/performance/trace/initTraces.js +20 -14
- package/src/sap/ui/qunit/qunit-coverage-istanbul.js +180 -0
- package/src/sap/ui/qunit/qunit-coverage.js +9 -4
- 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/Opa.js +54 -21
- package/src/sap/ui/test/Opa5.js +181 -131
- package/src/sap/ui/test/OpaBuilder.js +106 -73
- package/src/sap/ui/test/OpaPlugin.js +27 -28
- package/src/sap/ui/test/PageObjectFactory.js +17 -7
- package/src/sap/ui/test/RecordReplay.js +7 -3
- package/src/sap/ui/test/_ParameterValidator.js +3 -3
- package/src/sap/ui/test/_UsageReport.js +3 -3
- package/src/sap/ui/test/_ValidationParameters.js +8 -10
- package/src/sap/ui/test/actions/Action.js +3 -3
- package/src/sap/ui/test/actions/EnterText.js +3 -2
- package/src/sap/ui/test/actions/Press.js +4 -4
- package/src/sap/ui/test/autowaiter/WaiterBase.js +5 -3
- package/src/sap/ui/test/autowaiter/_autoWaiter.js +6 -3
- package/src/sap/ui/test/autowaiter/_cssAnimationWaiter.js +3 -3
- package/src/sap/ui/test/autowaiter/_cssTransitionWaiter.js +3 -3
- package/src/sap/ui/test/autowaiter/_fetchWaiter.js +73 -0
- package/src/sap/ui/test/autowaiter/_moduleWaiter.js +2 -2
- package/src/sap/ui/test/autowaiter/_promiseWaiter.js +4 -4
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +2 -2
- package/src/sap/ui/test/autowaiter/_timeoutWaiter.js +4 -4
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +3 -1
- package/src/sap/ui/test/gherkin/GherkinTestGenerator.js +424 -423
- package/src/sap/ui/test/gherkin/StepDefinitions.js +160 -158
- package/src/sap/ui/test/gherkin/dataTableUtils.js +387 -385
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +188 -189
- package/src/sap/ui/test/gherkin/qUnitTestHarness.js +74 -71
- package/src/sap/ui/test/gherkin/simpleGherkinParser.js +195 -193
- package/src/sap/ui/test/launchers/componentLauncher.js +11 -9
- package/src/sap/ui/test/launchers/iFrameLauncher.js +34 -20
- package/src/sap/ui/test/matchers/Descendant.js +1 -1
- package/src/sap/ui/test/matchers/Interactable.js +2 -2
- package/src/sap/ui/test/matchers/LabelFor.js +2 -2
- package/src/sap/ui/test/matchers/MatcherFactory.js +10 -9
- package/src/sap/ui/test/matchers/Properties.js +5 -4
- package/src/sap/ui/test/matchers/Sibling.js +1 -1
- package/src/sap/ui/test/matchers/matchers.js +35 -3
- package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -2
- package/src/sap/ui/test/qunitPause.js +3 -2
- package/src/sap/ui/test/starter/_configureLoader.js +7 -5
- package/src/sap/ui/test/starter/_setupAndStart.js +113 -27
- package/src/sap/ui/test/starter/_utils.js +4 -1
- package/src/sap/ui/util/Mobile.js +8 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +661 -49
- package/src/ui5loader.js +18 -5
|
@@ -21,24 +21,6 @@ sap.ui.define([
|
|
|
21
21
|
var rDate = /\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])/,
|
|
22
22
|
oModelFormatter;
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Returns the formatter. Creates it lazily.
|
|
26
|
-
* @param {sap.ui.model.odata.type.Date} oType
|
|
27
|
-
* the type instance
|
|
28
|
-
* @returns {sap.ui.core.format.DateFormat}
|
|
29
|
-
* the formatter
|
|
30
|
-
*/
|
|
31
|
-
function getFormatter(oType) {
|
|
32
|
-
var oFormatOptions;
|
|
33
|
-
|
|
34
|
-
if (!oType.oFormat) {
|
|
35
|
-
oFormatOptions = extend({strictParsing : true}, oType.oFormatOptions);
|
|
36
|
-
oFormatOptions.UTC = true;
|
|
37
|
-
oType.oFormat = DateFormat.getDateInstance(oFormatOptions);
|
|
38
|
-
}
|
|
39
|
-
return oType.oFormat;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
24
|
/**
|
|
43
25
|
* Returns a formatter that formats the date into yyyy-MM-dd. Creates it lazily.
|
|
44
26
|
*
|
|
@@ -93,7 +75,7 @@ sap.ui.define([
|
|
|
93
75
|
* @extends sap.ui.model.odata.type.ODataType
|
|
94
76
|
*
|
|
95
77
|
* @author SAP SE
|
|
96
|
-
* @version 1.
|
|
78
|
+
* @version 1.114.0
|
|
97
79
|
*
|
|
98
80
|
* @alias sap.ui.model.odata.type.Date
|
|
99
81
|
* @param {object} [oFormatOptions]
|
|
@@ -160,7 +142,7 @@ sap.ui.define([
|
|
|
160
142
|
: getModelFormatter().parse(vValue, false);
|
|
161
143
|
case "string":
|
|
162
144
|
oDate = vValue instanceof Date ? vValue : getModelFormatter().parse(vValue);
|
|
163
|
-
return oDate ?
|
|
145
|
+
return oDate ? this.getFormat().format(oDate) : vValue;
|
|
164
146
|
default:
|
|
165
147
|
throw new FormatException("Don't know how to format " + this.getName() + " to "
|
|
166
148
|
+ sTargetType);
|
|
@@ -182,6 +164,53 @@ sap.ui.define([
|
|
|
182
164
|
[this.formatValue(sDemoDate, "string")]);
|
|
183
165
|
};
|
|
184
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Returns a date object for a given model value.
|
|
169
|
+
*
|
|
170
|
+
* @param {string|null} sModelValue
|
|
171
|
+
* The model value of this type. Can be retrieved via {@link sap.ui.model.odata.type.Date#getModelValue}.
|
|
172
|
+
* @returns {Date|module:sap/ui/core/date/UI5Date|null}
|
|
173
|
+
* An instance of <code>Date</code> for which the local getters <code>getDate()</code>, <code>getMonth()</code>,
|
|
174
|
+
* and <code>getFullYear()</code> can be used to get the corresponding day, month, and year of the given model
|
|
175
|
+
* value
|
|
176
|
+
*
|
|
177
|
+
* @since 1.113.0
|
|
178
|
+
* @private
|
|
179
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
180
|
+
*/
|
|
181
|
+
EdmDate.prototype.getDateValue = function (sModelValue) {
|
|
182
|
+
return sModelValue ? UI5Date.getInstance(sModelValue + "T00:00") : null;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @override
|
|
187
|
+
*/
|
|
188
|
+
EdmDate.prototype.getFormat = function () {
|
|
189
|
+
if (!this.oFormat) {
|
|
190
|
+
var oFormatOptions = extend({strictParsing : true}, this.oFormatOptions);
|
|
191
|
+
oFormatOptions.UTC = true;
|
|
192
|
+
this.oFormat = DateFormat.getDateInstance(oFormatOptions);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return this.oFormat;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Returns the ISO string for the given model value.
|
|
200
|
+
*
|
|
201
|
+
* @param {string|null} sModelValue
|
|
202
|
+
* The model value, as returned by {@link #getModelValue}
|
|
203
|
+
* @returns {string|null}
|
|
204
|
+
* A date string according to ISO 8601, or <code>null</code> if the given model value is falsy
|
|
205
|
+
*
|
|
206
|
+
* @since 1.114.0
|
|
207
|
+
* @private
|
|
208
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
209
|
+
*/
|
|
210
|
+
EdmDate.prototype.getISOStringFromModelValue = function (sModelValue) {
|
|
211
|
+
return sModelValue ? sModelValue : null;
|
|
212
|
+
};
|
|
213
|
+
|
|
185
214
|
/**
|
|
186
215
|
* Returns a formatter that converts between the model format and a Javascript Date. It has two
|
|
187
216
|
* methods: <code>format</code> takes a Date and returns a date as a String in the format
|
|
@@ -231,6 +260,23 @@ sap.ui.define([
|
|
|
231
260
|
return vResult;
|
|
232
261
|
};
|
|
233
262
|
|
|
263
|
+
/**
|
|
264
|
+
* Returns the model value for the given ISO string.
|
|
265
|
+
*
|
|
266
|
+
* @param {string|null} sISOString
|
|
267
|
+
* A string according to ISO 8601, as returned by {@link #getISOStringFromModelValue}
|
|
268
|
+
* @returns {string|null}
|
|
269
|
+
* The model representation for the given ISO string for this type,
|
|
270
|
+
* or <code>null</code> if the given ISO string is falsy
|
|
271
|
+
*
|
|
272
|
+
* @since 1.114.0
|
|
273
|
+
* @private
|
|
274
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
275
|
+
*/
|
|
276
|
+
EdmDate.prototype.getModelValueFromISOString = function (sISOString) {
|
|
277
|
+
return sISOString ? sISOString : null;
|
|
278
|
+
};
|
|
279
|
+
|
|
234
280
|
/**
|
|
235
281
|
* Returns the type's name.
|
|
236
282
|
*
|
|
@@ -269,7 +315,7 @@ sap.ui.define([
|
|
|
269
315
|
case "object":
|
|
270
316
|
return getModelFormatter().format(vValue, false);
|
|
271
317
|
case "string":
|
|
272
|
-
oResult =
|
|
318
|
+
oResult = this.getFormat().parse(vValue);
|
|
273
319
|
if (!oResult) {
|
|
274
320
|
throw new ParseException(this._getErrorMessage());
|
|
275
321
|
}
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
* @extends sap.ui.model.odata.type.DateTimeBase
|
|
62
62
|
*
|
|
63
63
|
* @author SAP SE
|
|
64
|
-
* @version 1.
|
|
64
|
+
* @version 1.114.0
|
|
65
65
|
*
|
|
66
66
|
* @alias sap.ui.model.odata.type.DateTime
|
|
67
67
|
* @param {object} [oFormatOptions]
|
|
@@ -98,14 +98,25 @@ sap.ui.define([
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Returns the
|
|
101
|
+
* Returns the ISO string for the given model value.
|
|
102
102
|
*
|
|
103
|
-
* @
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
103
|
+
* @param {Date|module:sap/ui/core/date/UI5Date|null} oModelValue
|
|
104
|
+
* The model value, as returned by {@link #getModelValue}
|
|
105
|
+
* @returns {string|null}
|
|
106
|
+
* A timestamp or date string according to ISO 8601 if the <code>displayFormat: "Date"</code>
|
|
107
|
+
* constraint is set, or <code>null</code> if the given model value is falsy
|
|
108
|
+
*
|
|
109
|
+
* @since 1.114.0
|
|
110
|
+
* @private
|
|
111
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
106
112
|
*/
|
|
107
|
-
DateTime.prototype.
|
|
108
|
-
|
|
113
|
+
DateTime.prototype.getISOStringFromModelValue = function (oModelValue) {
|
|
114
|
+
if (!oModelValue) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
var sISOString = oModelValue.toISOString();
|
|
119
|
+
return this.oConstraints && this.oConstraints.isDateOnly ? sISOString.split("T")[0] : sISOString;
|
|
109
120
|
};
|
|
110
121
|
|
|
111
122
|
/**
|
|
@@ -124,7 +135,7 @@ sap.ui.define([
|
|
|
124
135
|
* If the constraints of this type instance are violated
|
|
125
136
|
*
|
|
126
137
|
* @public
|
|
127
|
-
* @see {@link sap.ui.core.Configuration
|
|
138
|
+
* @see {@link sap.ui.core.Configuration#getTimezone}
|
|
128
139
|
* @since 1.111.0
|
|
129
140
|
*/
|
|
130
141
|
DateTime.prototype.getModelValue = function (oDate) {
|
|
@@ -135,5 +146,37 @@ sap.ui.define([
|
|
|
135
146
|
return oResult;
|
|
136
147
|
};
|
|
137
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Returns the model value for the given ISO string.
|
|
151
|
+
*
|
|
152
|
+
* @param {string|null} sISOString
|
|
153
|
+
* A string according to ISO 8601, as returned by {@link #getISOStringFromModelValue}
|
|
154
|
+
* @returns {Date|module:sap/ui/core/date/UI5Date|null}
|
|
155
|
+
* The model representation for the given ISO string for this type,
|
|
156
|
+
* or <code>null</code> if the given ISO string is falsy
|
|
157
|
+
*
|
|
158
|
+
* @since 1.114.0
|
|
159
|
+
* @private
|
|
160
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
161
|
+
*/
|
|
162
|
+
DateTime.prototype.getModelValueFromISOString = function (sISOString) {
|
|
163
|
+
if (!sISOString) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return UI5Date.getInstance(sISOString);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Returns the type's name.
|
|
172
|
+
*
|
|
173
|
+
* @returns {string}
|
|
174
|
+
* the type's name
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
DateTime.prototype.getName = function () {
|
|
178
|
+
return "sap.ui.model.odata.type.DateTime";
|
|
179
|
+
};
|
|
180
|
+
|
|
138
181
|
return DateTime;
|
|
139
182
|
});
|
|
@@ -27,29 +27,6 @@ sap.ui.define([
|
|
|
27
27
|
return oType.oConstraints && oType.oConstraints.isDateOnly;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/*
|
|
31
|
-
* Returns the formatter. Creates it lazily.
|
|
32
|
-
*
|
|
33
|
-
* @param {sap.ui.model.odata.type.DateTimeBase} oType
|
|
34
|
-
* The type instance
|
|
35
|
-
* @returns {sap.ui.core.format.DateFormat}
|
|
36
|
-
* The formatter
|
|
37
|
-
*/
|
|
38
|
-
function getFormatter(oType) {
|
|
39
|
-
var oFormatOptions;
|
|
40
|
-
|
|
41
|
-
if (!oType.oFormat) {
|
|
42
|
-
oFormatOptions = extend({strictParsing : true}, oType.oFormatOptions);
|
|
43
|
-
if (isDateOnly(oType)) {
|
|
44
|
-
oFormatOptions.UTC = true;
|
|
45
|
-
oType.oFormat = DateFormat.getDateInstance(oFormatOptions);
|
|
46
|
-
} else {
|
|
47
|
-
oType.oFormat = DateFormat.getDateTimeInstance(oFormatOptions);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return oType.oFormat;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
30
|
/*
|
|
54
31
|
* Sets the constraints.
|
|
55
32
|
*
|
|
@@ -115,7 +92,7 @@ sap.ui.define([
|
|
|
115
92
|
* @extends sap.ui.model.odata.type.ODataType
|
|
116
93
|
* @public
|
|
117
94
|
* @since 1.27.0
|
|
118
|
-
* @version 1.
|
|
95
|
+
* @version 1.114.0
|
|
119
96
|
*/
|
|
120
97
|
var DateTimeBase = ODataType.extend("sap.ui.model.odata.type.DateTimeBase", {
|
|
121
98
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -129,6 +106,41 @@ sap.ui.define([
|
|
|
129
106
|
}
|
|
130
107
|
});
|
|
131
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Returns a date object for a given model value.
|
|
111
|
+
*
|
|
112
|
+
* @param {Date|module:sap/ui/core/date/UI5Date|string|null} vModelValue
|
|
113
|
+
* The model value of this type. Can be retrieved via this type's <code>getModelValue</code> function.
|
|
114
|
+
* @returns {Date|module:sap/ui/core/date/UI5Date|null}
|
|
115
|
+
* An instance of <code>Date</code> for which the local getters <code>getDate()</code>, <code>getMonth()</code>,
|
|
116
|
+
* <code>getFullYear()</code>, <code>getHours()</code>, <code>getMinutes()</code>, <code>getSeconds()</code>, and
|
|
117
|
+
* <code>getMilliseconds()</code> can be used to get the corresponding day, month, year, hours, minutes, seconds,
|
|
118
|
+
* and milliseconds of the given model value
|
|
119
|
+
*
|
|
120
|
+
* @since 1.113.0
|
|
121
|
+
* @private
|
|
122
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
123
|
+
*/
|
|
124
|
+
DateTimeBase.prototype.getDateValue = function (vModelValue) {
|
|
125
|
+
var oResult;
|
|
126
|
+
|
|
127
|
+
if (!vModelValue) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
oResult = UI5Date.getInstance(vModelValue);
|
|
132
|
+
if (isDateOnly(this)) {
|
|
133
|
+
oResult.setFullYear(oResult.getUTCFullYear(), oResult.getUTCMonth(), oResult.getUTCDate());
|
|
134
|
+
oResult.setHours(0, 0, 0, 0);
|
|
135
|
+
} else if (this.oFormatOptions && this.oFormatOptions.UTC) {
|
|
136
|
+
oResult.setFullYear(oResult.getUTCFullYear(), oResult.getUTCMonth(), oResult.getUTCDate());
|
|
137
|
+
oResult.setHours(oResult.getUTCHours(), oResult.getUTCMinutes(),
|
|
138
|
+
oResult.getUTCSeconds(), oResult.getUTCMilliseconds());
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return oResult;
|
|
142
|
+
};
|
|
143
|
+
|
|
132
144
|
/**
|
|
133
145
|
* Formats the given value to the given target type.
|
|
134
146
|
*
|
|
@@ -161,13 +173,30 @@ sap.ui.define([
|
|
|
161
173
|
if (!(oValue instanceof Date)) {
|
|
162
174
|
throw new FormatException("Illegal " + this.getName() + " value: " + oValue);
|
|
163
175
|
}
|
|
164
|
-
return
|
|
176
|
+
return this.getFormat().format(oValue);
|
|
165
177
|
default:
|
|
166
178
|
throw new FormatException("Don't know how to format " + this.getName() + " to "
|
|
167
179
|
+ sTargetType);
|
|
168
180
|
}
|
|
169
181
|
};
|
|
170
182
|
|
|
183
|
+
/**
|
|
184
|
+
* @override
|
|
185
|
+
*/
|
|
186
|
+
DateTimeBase.prototype.getFormat = function () {
|
|
187
|
+
if (!this.oFormat) {
|
|
188
|
+
var oFormatOptions = extend({strictParsing : true}, this.oFormatOptions);
|
|
189
|
+
if (isDateOnly(this)) {
|
|
190
|
+
oFormatOptions.UTC = true;
|
|
191
|
+
this.oFormat = DateFormat.getDateInstance(oFormatOptions);
|
|
192
|
+
} else {
|
|
193
|
+
this.oFormat = DateFormat.getDateTimeInstance(oFormatOptions);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return this.oFormat;
|
|
198
|
+
};
|
|
199
|
+
|
|
171
200
|
/**
|
|
172
201
|
* Returns the matching locale-dependent error message for the type based on the constraints.
|
|
173
202
|
*
|
|
@@ -218,7 +247,7 @@ sap.ui.define([
|
|
|
218
247
|
case "object":
|
|
219
248
|
return vValue;
|
|
220
249
|
case "string":
|
|
221
|
-
oResult =
|
|
250
|
+
oResult = this.getFormat().parse(vValue);
|
|
222
251
|
if (!oResult) {
|
|
223
252
|
throw new ParseException(this._getErrorMessage());
|
|
224
253
|
}
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @extends sap.ui.model.odata.type.DateTimeBase
|
|
30
30
|
*
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.114.0
|
|
33
33
|
*
|
|
34
34
|
* @alias sap.ui.model.odata.type.DateTimeOffset
|
|
35
35
|
* @param {object} [oFormatOptions]
|
|
@@ -165,6 +165,26 @@ sap.ui.define([
|
|
|
165
165
|
return oConstraints;
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Returns the ISO string for the given model value.
|
|
170
|
+
*
|
|
171
|
+
* @param {string|Date|module:sap/ui/core/date/UI5Date|null} vModelValue
|
|
172
|
+
* The model value, as returned by {@link #getModelValue}
|
|
173
|
+
* @returns {string|null}
|
|
174
|
+
* A timestamp according to ISO 8601, or <code>null</code> if the given model value is falsy
|
|
175
|
+
*
|
|
176
|
+
* @since 1.114.0
|
|
177
|
+
* @private
|
|
178
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
179
|
+
*/
|
|
180
|
+
DateTimeOffset.prototype.getISOStringFromModelValue = function (vModelValue) {
|
|
181
|
+
if (!vModelValue) {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return this.bV4 ? vModelValue : vModelValue.toISOString();
|
|
186
|
+
};
|
|
187
|
+
|
|
168
188
|
/**
|
|
169
189
|
* Returns a formatter that converts between the model format and a Javascript Date. It has two
|
|
170
190
|
* methods: <code>format</code> and <code>parse</code>.
|
|
@@ -216,6 +236,27 @@ sap.ui.define([
|
|
|
216
236
|
return oResult;
|
|
217
237
|
};
|
|
218
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Returns the model value for the given ISO string.
|
|
241
|
+
*
|
|
242
|
+
* @param {string|null} sISOString
|
|
243
|
+
* A string according to ISO 8601, as returned by {@link #getISOStringFromModelValue}
|
|
244
|
+
* @returns {string|Date|module:sap/ui/core/date/UI5Date|null}
|
|
245
|
+
* The model representation for the given ISO string for this type,
|
|
246
|
+
* or <code>null</code> if the given ISO string is falsy
|
|
247
|
+
*
|
|
248
|
+
* @since 1.114.0
|
|
249
|
+
* @private
|
|
250
|
+
* @ui5-restricted sap.fe, sap.suite.ui.generic.template, sap.ui.comp, sap.ui.generic
|
|
251
|
+
*/
|
|
252
|
+
DateTimeOffset.prototype.getModelValueFromISOString = function (sISOString) {
|
|
253
|
+
if (!sISOString) {
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return this.bV4 ? sISOString : UI5Date.getInstance(sISOString);
|
|
258
|
+
};
|
|
259
|
+
|
|
219
260
|
/**
|
|
220
261
|
* Returns the type's name.
|
|
221
262
|
*
|
|
@@ -17,24 +17,6 @@ sap.ui.define([
|
|
|
17
17
|
var sDateOrTimeRequired = "For type 'object', at least one of the format options 'showDate' or"
|
|
18
18
|
+ " 'showTime' must be enabled";
|
|
19
19
|
|
|
20
|
-
/*
|
|
21
|
-
* Returns the formatter. Creates it lazily.
|
|
22
|
-
*
|
|
23
|
-
* @param {sap.ui.model.odata.type.DateTimeWithTimezone} oType
|
|
24
|
-
* The type instance
|
|
25
|
-
* @returns {sap.ui.core.format.DateFormat}
|
|
26
|
-
* The formatter
|
|
27
|
-
*/
|
|
28
|
-
function getFormatter(oType) {
|
|
29
|
-
var oFormatOptions;
|
|
30
|
-
|
|
31
|
-
if (!oType.oFormat) {
|
|
32
|
-
oFormatOptions = _Helper.extend({strictParsing : true}, oType.oFormatOptions);
|
|
33
|
-
oType.oFormat = DateFormat.getDateTimeWithTimezoneInstance(oFormatOptions);
|
|
34
|
-
}
|
|
35
|
-
return oType.oFormat;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
20
|
/**
|
|
39
21
|
* Constructor for a <code>DateTimeWithTimezone</code> composite type.
|
|
40
22
|
*
|
|
@@ -56,11 +38,14 @@ sap.ui.define([
|
|
|
56
38
|
* part. For this, the timestamp part has to be provided in the UTC time zone. When using this
|
|
57
39
|
* type with the {@link sap.ui.model.odata.v2.ODataModel}, you need to set the parameter
|
|
58
40
|
* <code>useUndefinedIfUnresolved</code> for both parts.
|
|
41
|
+
*
|
|
42
|
+
* For more information and some examples how to use this class, see
|
|
43
|
+
* {@link topic:6c9e61dc157a40c19460660ece8368bc Dates, Times, Timestamps, and Time Zones}.
|
|
59
44
|
* @extends sap.ui.model.CompositeType
|
|
60
45
|
* @public
|
|
61
46
|
* @see {sap.ui.model.odata.v2.ODataModel#bindProperty}
|
|
62
47
|
* @since 1.99.0
|
|
63
|
-
* @version 1.
|
|
48
|
+
* @version 1.114.0
|
|
64
49
|
*/
|
|
65
50
|
var DateTimeWithTimezone = CompositeType.extend("sap.ui.model.odata.type.DateTimeWithTimezone",
|
|
66
51
|
{
|
|
@@ -170,13 +155,30 @@ sap.ui.define([
|
|
|
170
155
|
|
|
171
156
|
return oTimestamp;
|
|
172
157
|
case "string":
|
|
173
|
-
return
|
|
158
|
+
return this.getFormat().format(oTimestamp, sTimezone);
|
|
174
159
|
default:
|
|
175
160
|
throw new FormatException("Don't know how to format " + this.getName() + " to "
|
|
176
161
|
+ sTargetType);
|
|
177
162
|
}
|
|
178
163
|
};
|
|
179
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Returns a format converting between the internal and external representation of a value for this type.
|
|
167
|
+
*
|
|
168
|
+
* @returns {sap.ui.core.format.DateFormat.DateTimeWithTimezone}
|
|
169
|
+
* A format converting between the internal and external representation
|
|
170
|
+
*
|
|
171
|
+
* @private
|
|
172
|
+
*/
|
|
173
|
+
DateTimeWithTimezone.prototype.getFormat = function () {
|
|
174
|
+
if (!this.oFormat) {
|
|
175
|
+
var oFormatOptions = _Helper.extend({strictParsing : true}, this.oFormatOptions);
|
|
176
|
+
this.oFormat = DateFormat.getDateTimeWithTimezoneInstance(oFormatOptions);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return this.oFormat;
|
|
180
|
+
};
|
|
181
|
+
|
|
180
182
|
/**
|
|
181
183
|
* Returns the type's name.
|
|
182
184
|
*
|
|
@@ -219,6 +221,20 @@ sap.ui.define([
|
|
|
219
221
|
return [];
|
|
220
222
|
};
|
|
221
223
|
|
|
224
|
+
/**
|
|
225
|
+
* Returns a language-dependent placeholder text such as "e.g. <sample value>" where <sample value> is formatted
|
|
226
|
+
* using this type.
|
|
227
|
+
*
|
|
228
|
+
* @returns {string|undefined}
|
|
229
|
+
* The language-dependent placeholder text or <code>undefined</code> if the type does not offer a placeholder
|
|
230
|
+
*
|
|
231
|
+
* @experimental As of version 1.114.0
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
DateTimeWithTimezone.prototype.getPlaceholderText = function () {
|
|
235
|
+
return this.getFormat().getPlaceholderText();
|
|
236
|
+
};
|
|
237
|
+
|
|
222
238
|
/**
|
|
223
239
|
* Parses the given value.
|
|
224
240
|
*
|
|
@@ -288,7 +304,7 @@ sap.ui.define([
|
|
|
288
304
|
}
|
|
289
305
|
|
|
290
306
|
try {
|
|
291
|
-
aDateWithTimezone =
|
|
307
|
+
aDateWithTimezone = this.getFormat().parse(vValue, aCurrentValues[1]);
|
|
292
308
|
} catch (oError) { // wrap technical error to show the error at the control
|
|
293
309
|
throw new ParseException(oError.message);
|
|
294
310
|
}
|
|
@@ -19,36 +19,6 @@ sap.ui.define([
|
|
|
19
19
|
var rDecimal = /^[-+]?(\d+)(?:\.(\d+))?$/,
|
|
20
20
|
rTrailingZeroes = /(?:(\.[0-9]*[1-9]+)0+|\.0*)$/;
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* Returns the formatter. Creates it lazily.
|
|
24
|
-
* @param {sap.ui.model.odata.type.Decimal} oType
|
|
25
|
-
* the type instance
|
|
26
|
-
* @returns {sap.ui.core.format.NumberFormat}
|
|
27
|
-
* the formatter
|
|
28
|
-
*/
|
|
29
|
-
function getFormatter(oType) {
|
|
30
|
-
var oFormatOptions, iScale, oTypeFormatOptions;
|
|
31
|
-
|
|
32
|
-
if (!oType.oFormat) {
|
|
33
|
-
oFormatOptions = {
|
|
34
|
-
groupingEnabled : true,
|
|
35
|
-
maxIntegerDigits : Infinity
|
|
36
|
-
};
|
|
37
|
-
iScale = getScale(oType);
|
|
38
|
-
if (iScale !== Infinity) {
|
|
39
|
-
oFormatOptions.minFractionDigits = oFormatOptions.maxFractionDigits = iScale;
|
|
40
|
-
}
|
|
41
|
-
oTypeFormatOptions = oType.oFormatOptions || {};
|
|
42
|
-
if (oTypeFormatOptions.style !== "short" && oTypeFormatOptions.style !== "long") {
|
|
43
|
-
oFormatOptions.preserveDecimals = true;
|
|
44
|
-
}
|
|
45
|
-
Object.assign(oFormatOptions, oType.oFormatOptions);
|
|
46
|
-
oFormatOptions.parseAsString = true;
|
|
47
|
-
oType.oFormat = NumberFormat.getFloatInstance(oFormatOptions);
|
|
48
|
-
}
|
|
49
|
-
return oType.oFormat;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
22
|
/**
|
|
53
23
|
* Returns the type's scale constraint.
|
|
54
24
|
*
|
|
@@ -201,7 +171,7 @@ sap.ui.define([
|
|
|
201
171
|
* @extends sap.ui.model.odata.type.ODataType
|
|
202
172
|
*
|
|
203
173
|
* @author SAP SE
|
|
204
|
-
* @version 1.
|
|
174
|
+
* @version 1.114.0
|
|
205
175
|
*
|
|
206
176
|
* @alias sap.ui.model.odata.type.Decimal
|
|
207
177
|
* @param {object} [oFormatOptions]
|
|
@@ -281,13 +251,38 @@ sap.ui.define([
|
|
|
281
251
|
case "int":
|
|
282
252
|
return Math.floor(parseFloat(sValue));
|
|
283
253
|
case "string":
|
|
284
|
-
return
|
|
254
|
+
return this.getFormat().format(removeTrailingZeroes(String(sValue)));
|
|
285
255
|
default:
|
|
286
256
|
throw new FormatException("Don't know how to format " + this.getName() + " to "
|
|
287
257
|
+ sTargetType);
|
|
288
258
|
}
|
|
289
259
|
};
|
|
290
260
|
|
|
261
|
+
/**
|
|
262
|
+
* @override
|
|
263
|
+
*/
|
|
264
|
+
Decimal.prototype.getFormat = function () {
|
|
265
|
+
if (!this.oFormat) {
|
|
266
|
+
var oFormatOptions = {
|
|
267
|
+
groupingEnabled : true,
|
|
268
|
+
maxIntegerDigits : Infinity
|
|
269
|
+
},
|
|
270
|
+
iScale = getScale(this);
|
|
271
|
+
if (iScale !== Infinity) {
|
|
272
|
+
oFormatOptions.minFractionDigits = oFormatOptions.maxFractionDigits = iScale;
|
|
273
|
+
}
|
|
274
|
+
var oTypeFormatOptions = this.oFormatOptions || {};
|
|
275
|
+
if (oTypeFormatOptions.style !== "short" && oTypeFormatOptions.style !== "long") {
|
|
276
|
+
oFormatOptions.preserveDecimals = true;
|
|
277
|
+
}
|
|
278
|
+
Object.assign(oFormatOptions, this.oFormatOptions);
|
|
279
|
+
oFormatOptions.parseAsString = true;
|
|
280
|
+
this.oFormat = NumberFormat.getFloatInstance(oFormatOptions);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return this.oFormat;
|
|
284
|
+
};
|
|
285
|
+
|
|
291
286
|
/**
|
|
292
287
|
* Parses the given value, which is expected to be of the given type, to a decimal in
|
|
293
288
|
* <code>string</code> representation.
|
|
@@ -315,7 +310,7 @@ sap.ui.define([
|
|
|
315
310
|
}
|
|
316
311
|
switch (this.getPrimitiveType(sSourceType)) {
|
|
317
312
|
case "string":
|
|
318
|
-
sResult =
|
|
313
|
+
sResult = this.getFormat().parse(vValue);
|
|
319
314
|
if (!sResult) {
|
|
320
315
|
throw new ParseException(sap.ui.getCore().getLibraryResourceBundle()
|
|
321
316
|
.getText("EnterNumber"));
|
|
@@ -24,28 +24,6 @@ sap.ui.define([
|
|
|
24
24
|
return sap.ui.getCore().getLibraryResourceBundle().getText("EnterNumber");
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Returns the formatter. Creates it lazily.
|
|
29
|
-
* @param {sap.ui.model.odata.type.Double} oType
|
|
30
|
-
* the type instance
|
|
31
|
-
* @returns {sap.ui.core.format.NumberFormat}
|
|
32
|
-
* the formatter
|
|
33
|
-
*/
|
|
34
|
-
function getFormatter(oType) {
|
|
35
|
-
var oFormatOptions, oTypeFormatOptions;
|
|
36
|
-
|
|
37
|
-
if (!oType.oFormat) {
|
|
38
|
-
oFormatOptions = {groupingEnabled : true};
|
|
39
|
-
oTypeFormatOptions = oType.oFormatOptions || {};
|
|
40
|
-
if (oTypeFormatOptions.style !== "short" && oTypeFormatOptions.style !== "long") {
|
|
41
|
-
oFormatOptions.preserveDecimals = true;
|
|
42
|
-
}
|
|
43
|
-
Object.assign(oFormatOptions, oType.oFormatOptions);
|
|
44
|
-
oType.oFormat = NumberFormat.getFloatInstance(oFormatOptions);
|
|
45
|
-
}
|
|
46
|
-
return oType.oFormat;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
27
|
/**
|
|
50
28
|
* Returns the type's nullable constraint.
|
|
51
29
|
*
|
|
@@ -95,7 +73,7 @@ sap.ui.define([
|
|
|
95
73
|
* @extends sap.ui.model.odata.type.ODataType
|
|
96
74
|
*
|
|
97
75
|
* @author SAP SE
|
|
98
|
-
* @version 1.
|
|
76
|
+
* @version 1.114.0
|
|
99
77
|
*
|
|
100
78
|
* @alias sap.ui.model.odata.type.Double
|
|
101
79
|
* @param {object} [oFormatOptions]
|
|
@@ -163,20 +141,37 @@ sap.ui.define([
|
|
|
163
141
|
return Math.floor(fValue);
|
|
164
142
|
case "string":
|
|
165
143
|
if (fValue && (Math.abs(fValue) >= 1e15 || Math.abs(fValue) < 1e-4)) {
|
|
166
|
-
oFormatOptions =
|
|
144
|
+
oFormatOptions = this.getFormat().oFormatOptions;
|
|
167
145
|
return fValue.toExponential()
|
|
168
146
|
.replace("e", "\u00a0E") // non-breaking space
|
|
169
147
|
.replace(".", oFormatOptions.decimalSeparator)
|
|
170
148
|
.replace("+", oFormatOptions.plusSign)
|
|
171
149
|
.replace("-", oFormatOptions.minusSign);
|
|
172
150
|
}
|
|
173
|
-
return
|
|
151
|
+
return this.getFormat().format(fValue);
|
|
174
152
|
default:
|
|
175
153
|
throw new FormatException("Don't know how to format " + this.getName() + " to "
|
|
176
154
|
+ sTargetType);
|
|
177
155
|
}
|
|
178
156
|
};
|
|
179
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @override
|
|
160
|
+
*/
|
|
161
|
+
Double.prototype.getFormat = function () {
|
|
162
|
+
if (!this.oFormat) {
|
|
163
|
+
var oFormatOptions = {groupingEnabled : true},
|
|
164
|
+
oTypeFormatOptions = this.oFormatOptions || {};
|
|
165
|
+
if (oTypeFormatOptions.style !== "short" && oTypeFormatOptions.style !== "long") {
|
|
166
|
+
oFormatOptions.preserveDecimals = true;
|
|
167
|
+
}
|
|
168
|
+
Object.assign(oFormatOptions, this.oFormatOptions);
|
|
169
|
+
this.oFormat = NumberFormat.getFloatInstance(oFormatOptions);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return this.oFormat;
|
|
173
|
+
};
|
|
174
|
+
|
|
180
175
|
/**
|
|
181
176
|
* Parses the given value, which is expected to be of the given type, to an Edm.Double in
|
|
182
177
|
* <code>number</code> representation.
|
|
@@ -206,7 +201,7 @@ sap.ui.define([
|
|
|
206
201
|
}
|
|
207
202
|
switch (this.getPrimitiveType(sSourceType)) {
|
|
208
203
|
case "string":
|
|
209
|
-
fResult =
|
|
204
|
+
fResult = this.getFormat().parse(vValue);
|
|
210
205
|
if (isNaN(fResult)) {
|
|
211
206
|
throw new ParseException(getErrorMessage());
|
|
212
207
|
}
|