@openui5/sap.ui.core 1.96.5 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +93 -3
- package/.reuse/dep5 +26 -31
- package/THIRDPARTY.txt +15 -21
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.mobile.js +29 -19
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +2 -2
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +81 -169
- package/src/sap/ui/Global.js +11 -16
- package/src/sap/ui/VersionInfo.js +13 -10
- package/src/sap/ui/base/BindingParser.js +34 -7
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +50 -29
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -3
- 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 -27
- package/src/sap/ui/core/AppCacheBuster.js +4 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +1 -1
- package/src/sap/ui/core/Component.js +33 -11
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +79 -13
- package/src/sap/ui/core/Control.js +4 -3
- package/src/sap/ui/core/Core.js +4 -7
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +6 -12
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +1 -1
- package/src/sap/ui/core/FocusHandler.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +3 -3
- package/src/sap/ui/core/HTMLRenderer.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +2 -3
- package/src/sap/ui/core/IconRenderer.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +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 +9 -2
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicatorRenderer.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicatorSupport.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +39 -4
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Placeholder.js +28 -28
- package/src/sap/ui/core/Popup.js +3 -3
- package/src/sap/ui/core/RenderManager.js +3 -3
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +4 -3
- package/src/sap/ui/core/ScrollBarRenderer.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +2 -2
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +2 -2
- package/src/sap/ui/core/UIArea.js +3 -3
- 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 +26 -5
- package/src/sap/ui/core/_IconRegistry.js +10 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
- package/src/sap/ui/core/date/Japanese.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +205 -2
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +9 -6
- package/src/sap/ui/core/dnd/DragAndDrop.js +2 -2
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +562 -174
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +43 -0
- package/src/sap/ui/core/format/ListFormat.js +2 -2
- package/src/sap/ui/core/format/NumberFormat.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +248 -0
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +47 -10
- package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
- 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 +2 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +22 -12
- package/src/sap/ui/core/messagebundle.properties +4 -0
- package/src/sap/ui/core/messagebundle_ar.properties +2 -0
- package/src/sap/ui/core/messagebundle_bg.properties +7 -5
- package/src/sap/ui/core/messagebundle_ca.properties +2 -0
- package/src/sap/ui/core/messagebundle_cs.properties +2 -0
- package/src/sap/ui/core/messagebundle_cy.properties +2 -0
- package/src/sap/ui/core/messagebundle_da.properties +2 -0
- package/src/sap/ui/core/messagebundle_de.properties +3 -1
- package/src/sap/ui/core/messagebundle_el.properties +2 -0
- package/src/sap/ui/core/messagebundle_en.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/ui/core/messagebundle_es.properties +2 -0
- package/src/sap/ui/core/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/core/messagebundle_et.properties +2 -0
- package/src/sap/ui/core/messagebundle_fi.properties +2 -0
- package/src/sap/ui/core/messagebundle_fr.properties +9 -7
- package/src/sap/ui/core/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/core/messagebundle_hi.properties +2 -0
- package/src/sap/ui/core/messagebundle_hr.properties +2 -0
- package/src/sap/ui/core/messagebundle_hu.properties +2 -0
- package/src/sap/ui/core/messagebundle_id.properties +4 -2
- package/src/sap/ui/core/messagebundle_it.properties +3 -1
- package/src/sap/ui/core/messagebundle_iw.properties +2 -0
- package/src/sap/ui/core/messagebundle_ja.properties +2 -0
- package/src/sap/ui/core/messagebundle_kk.properties +2 -0
- package/src/sap/ui/core/messagebundle_ko.properties +2 -0
- package/src/sap/ui/core/messagebundle_lt.properties +2 -0
- package/src/sap/ui/core/messagebundle_lv.properties +3 -1
- package/src/sap/ui/core/messagebundle_ms.properties +2 -0
- package/src/sap/ui/core/messagebundle_nl.properties +2 -0
- package/src/sap/ui/core/messagebundle_no.properties +6 -4
- package/src/sap/ui/core/messagebundle_pl.properties +2 -0
- package/src/sap/ui/core/messagebundle_pt.properties +2 -0
- package/src/sap/ui/core/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/core/messagebundle_ro.properties +2 -0
- package/src/sap/ui/core/messagebundle_ru.properties +23 -21
- package/src/sap/ui/core/messagebundle_sh.properties +2 -0
- package/src/sap/ui/core/messagebundle_sk.properties +2 -0
- package/src/sap/ui/core/messagebundle_sl.properties +2 -0
- package/src/sap/ui/core/messagebundle_sv.properties +2 -0
- package/src/sap/ui/core/messagebundle_th.properties +2 -0
- package/src/sap/ui/core/messagebundle_tr.properties +2 -0
- package/src/sap/ui/core/messagebundle_uk.properties +2 -0
- package/src/sap/ui/core/messagebundle_vi.properties +2 -0
- package/src/sap/ui/core/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/core/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/core/mvc/Controller.js +4 -4
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/HTMLViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +2 -1
- package/src/sap/ui/core/mvc/JSONViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/JSViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -1
- package/src/sap/ui/core/mvc/ViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +16 -3
- 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 +6 -6
- package/src/sap/ui/core/routing/Router.js +4 -3
- package/src/sap/ui/core/routing/Targets.js +17 -13
- package/src/sap/ui/core/rules/Misc.support.js +51 -1
- package/src/sap/ui/core/rules/Model.support.js +95 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -4
- package/src/sap/ui/core/rules/View.support.js +14 -46
- 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 +2 -2
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- 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 -2
- 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/support/techinfo/TechnicalInfo.js +2 -6
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- 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/DraftEnabledMockServer.js +21 -16
- 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 +157 -58
- package/src/sap/ui/core/util/PasteHelper.js +4 -4
- package/src/sap/ui/core/util/XMLPreprocessor.js +16 -4
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.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/includeStylesheet.js +8 -3
- package/src/sap/ui/events/jquery/EventExtension.js +1 -1
- package/src/sap/ui/events/jquery/EventSimulation.js +3 -13
- package/src/sap/ui/model/Binding.js +4 -3
- package/src/sap/ui/model/ChangeReason.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +7 -0
- package/src/sap/ui/model/ClientModel.js +6 -5
- package/src/sap/ui/model/ClientTreeBinding.js +1 -1
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +26 -4
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +27 -6
- package/src/sap/ui/model/ListBinding.js +24 -5
- package/src/sap/ui/model/MetaModel.js +2 -3
- package/src/sap/ui/model/Model.js +6 -11
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +0 -2
- package/src/sap/ui/model/TreeBindingUtils.js +2 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +13 -8
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +16 -18
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -15
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/json/JSONListBinding.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +7 -7
- package/src/sap/ui/model/json/JSONPropertyBinding.js +2 -2
- package/src/sap/ui/model/message/MessageListBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +3 -3
- package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/AnnotationHelper.js +2 -2
- package/src/sap/ui/model/odata/AnnotationParser.js +4 -2
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +62 -39
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +3 -3
- package/src/sap/ui/model/odata/ODataMetadata.js +138 -87
- package/src/sap/ui/model/odata/ODataModel.js +443 -216
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +7 -5
- package/src/sap/ui/model/odata/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +27 -17
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +440 -260
- package/src/sap/ui/model/odata/ODataUtils.js +24 -9
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +3 -2
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +11 -9
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +7 -5
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +338 -0
- package/src/sap/ui/model/odata/type/Decimal.js +5 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +1 -2
- package/src/sap/ui/model/odata/v2/Context.js +98 -14
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +8 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +418 -172
- package/src/sap/ui/model/odata/v2/ODataModel.js +242 -138
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +164 -92
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +117 -7
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +21 -22
- package/src/sap/ui/model/odata/v4/Context.js +249 -83
- package/src/sap/ui/model/odata/v4/ODataBinding.js +100 -43
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +309 -228
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +573 -278
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +131 -100
- package/src/sap/ui/model/odata/v4/ODataModel.js +342 -259
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +113 -100
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +87 -81
- package/src/sap/ui/model/odata/v4/ODataUtils.js +5 -5
- package/src/sap/ui/model/odata/v4/SubmitMode.js +0 -1
- package/src/sap/ui/model/odata/v4/ValueListType.js +0 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +20 -20
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +3 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -4
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +21 -20
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +278 -103
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +55 -21
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +62 -61
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Parser.js +52 -43
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +61 -41
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +147 -147
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +14 -13
- package/src/sap/ui/model/odata/v4/lib/_V4MetadataConverter.js +66 -67
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/resource/ResourcePropertyBinding.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/XMLListBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +5 -5
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +2 -2
- package/src/sap/ui/performance/trace/Passport.js +3 -3
- 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/BlanketReporter.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/TestUtils.js +2 -2
- package/src/sap/ui/test/_LogCollector.js +1 -1
- package/src/sap/ui/test/actions/Action.js +11 -2
- package/src/sap/ui/test/actions/Press.js +79 -3
- package/src/sap/ui/test/autowaiter/_XHRWaiter.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
- package/src/sap/ui/test/starter/createSuite.js +1 -2
- package/src/sap/ui/thirdparty/jquery-mobile-custom.js +3 -6
- package/src/sap/ui/thirdparty/jqueryui/jquery-ui-datepicker.js +143 -3
- package/src/sap/ui/thirdparty/jqueryui/jquery-ui-position.js +8 -1
- package/src/sap/ui/util/Mobile.js +28 -39
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/XMLHelper.js +53 -30
- package/src/ui5loader.js +9 -9
- package/ui5.yaml +244 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +0 -47
- package/src/sap/ui/thirdparty/baseuri.js +0 -1
- package/src/sap/ui/thirdparty/es6-object-assign.js +0 -1
- package/src/sap/ui/thirdparty/es6-promise.js +0 -1
- package/src/sap/ui/thirdparty/es6-shim-nopromise.js +0 -1
- package/src/sap/ui/thirdparty/es6-string-methods.js +0 -1
- package/src/sap/ui/thirdparty/flexie.js +0 -1
- package/src/sap/ui/thirdparty/unorm.js +0 -1
- package/src/sap/ui/thirdparty/unormdata.js +0 -1
|
@@ -73,7 +73,7 @@ sap.ui.define([
|
|
|
73
73
|
ODataUtils.createSortParams = function(aSorters) {
|
|
74
74
|
var sSortParam;
|
|
75
75
|
if (!aSorters || aSorters.length == 0) {
|
|
76
|
-
return;
|
|
76
|
+
return undefined;
|
|
77
77
|
}
|
|
78
78
|
sSortParam = "$orderby=";
|
|
79
79
|
for (var i = 0; i < aSorters.length; i++) {
|
|
@@ -122,7 +122,7 @@ sap.ui.define([
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
if (!oFilter) {
|
|
125
|
-
return;
|
|
125
|
+
return undefined;
|
|
126
126
|
}
|
|
127
127
|
return "$filter=" + this._createFilterParams(oFilter, oMetadata, oEntityType);
|
|
128
128
|
};
|
|
@@ -180,18 +180,20 @@ sap.ui.define([
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
if (!oFilter) {
|
|
183
|
-
return;
|
|
183
|
+
return undefined;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
return create(oFilter, true);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* Converts a string or object-map with URL
|
|
191
|
-
* If vParams is an object map, it will be also encoded properly.
|
|
190
|
+
* Converts a string or object-map with URL parameters into an array.
|
|
191
|
+
* If <code>vParams</code> is an object map, it will be also encoded properly.
|
|
192
|
+
*
|
|
193
|
+
* @param {string|object|array} vParams URL parameters
|
|
194
|
+
* @returns {string[]} Encoded URL parameters
|
|
192
195
|
*
|
|
193
196
|
* @private
|
|
194
|
-
* @param {string|object|array} vParams parameters
|
|
195
197
|
*/
|
|
196
198
|
ODataUtils._createUrlParamsArray = function(vParams) {
|
|
197
199
|
var aUrlParams, sType = typeof vParams, sParams;
|
|
@@ -387,7 +389,12 @@ sap.ui.define([
|
|
|
387
389
|
|
|
388
390
|
|
|
389
391
|
/**
|
|
390
|
-
*
|
|
392
|
+
* Convert multi filter to filter string.
|
|
393
|
+
*
|
|
394
|
+
* @param {object} oMultiFilter A multi filter
|
|
395
|
+
* @param {sap.ui.model.odata.ODataMetadata} oMetadata The metadata
|
|
396
|
+
* @param {object} oEntityType The entity type to filter
|
|
397
|
+
* @returns {string} A filter string
|
|
391
398
|
*
|
|
392
399
|
* @private
|
|
393
400
|
*/
|
|
@@ -419,7 +426,16 @@ sap.ui.define([
|
|
|
419
426
|
};
|
|
420
427
|
|
|
421
428
|
/**
|
|
422
|
-
* Create a single filter segment of the OData filter parameters
|
|
429
|
+
* Create a single filter segment of the OData filter parameters.
|
|
430
|
+
*
|
|
431
|
+
* @param {string} sPath The path to the value
|
|
432
|
+
* @param {sap.ui.model.odata.ODataMetadata} oMetadata The metadata
|
|
433
|
+
* @param {object} oEntityType The value's entity type
|
|
434
|
+
* @param {string} sOperator The filter operator
|
|
435
|
+
* @param {object} oValue1 The first value
|
|
436
|
+
* @param {object} oValue2 The second value
|
|
437
|
+
* @param {boolean} [bCaseSensitive=true] Whether the case should be considered
|
|
438
|
+
* @returns {string} The encoded string representation of the given filter
|
|
423
439
|
*
|
|
424
440
|
* @private
|
|
425
441
|
*/
|
|
@@ -455,7 +471,6 @@ sap.ui.define([
|
|
|
455
471
|
sPath = "toupper(" + sPath + ")";
|
|
456
472
|
}
|
|
457
473
|
|
|
458
|
-
// TODO embed 2nd value
|
|
459
474
|
switch (sOperator) {
|
|
460
475
|
case "EQ":
|
|
461
476
|
case "NE":
|
|
@@ -419,7 +419,8 @@ sap.ui.define([
|
|
|
419
419
|
case "expression":
|
|
420
420
|
return bExpression ? vValue : "{=" + vValue + "}";
|
|
421
421
|
|
|
422
|
-
|
|
422
|
+
default:
|
|
423
|
+
return undefined;
|
|
423
424
|
}
|
|
424
425
|
},
|
|
425
426
|
|
|
@@ -499,4 +500,4 @@ sap.ui.define([
|
|
|
499
500
|
|
|
500
501
|
return Basics;
|
|
501
502
|
|
|
502
|
-
}
|
|
503
|
+
});
|
|
@@ -187,11 +187,11 @@ sap.ui.define([
|
|
|
187
187
|
* Handling of "14.5.3 Expression edm:Apply".
|
|
188
188
|
*
|
|
189
189
|
* @param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface
|
|
190
|
-
*
|
|
190
|
+
* The callback interface related to the current formatter call
|
|
191
191
|
* @param {object} oPathValue
|
|
192
|
-
*
|
|
193
|
-
* @returns {object}
|
|
194
|
-
*
|
|
192
|
+
* Path and value information pointing to the apply (see Expression object)
|
|
193
|
+
* @returns {object|undefined}
|
|
194
|
+
* The result object or <code>undefined</code> in error cases
|
|
195
195
|
*/
|
|
196
196
|
apply : function (oInterface, oPathValue) {
|
|
197
197
|
var oName = Basics.descend(oPathValue, "Name", "string"),
|
|
@@ -206,6 +206,7 @@ sap.ui.define([
|
|
|
206
206
|
return Expression.uriEncode(oInterface, oParameters);
|
|
207
207
|
default:
|
|
208
208
|
Basics.error(oName, "unknown function: " + oName.value);
|
|
209
|
+
return undefined;
|
|
209
210
|
}
|
|
210
211
|
},
|
|
211
212
|
|
|
@@ -360,11 +361,11 @@ sap.ui.define([
|
|
|
360
361
|
* Calculates an expression.
|
|
361
362
|
*
|
|
362
363
|
* @param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface
|
|
363
|
-
*
|
|
364
|
+
* The callback interface related to the current formatter call
|
|
364
365
|
* @param {object} oPathValue
|
|
365
|
-
*
|
|
366
|
-
* @returns {object}
|
|
367
|
-
*
|
|
366
|
+
* Path and value information pointing to the parameters array (see Expression object)
|
|
367
|
+
* @returns {object|undefined}
|
|
368
|
+
* The result object or <code>undefined</code> in error cases
|
|
368
369
|
*/
|
|
369
370
|
expression : function (oInterface, oPathValue) {
|
|
370
371
|
var oRawValue = oPathValue.value,
|
|
@@ -428,6 +429,7 @@ sap.ui.define([
|
|
|
428
429
|
};
|
|
429
430
|
default:
|
|
430
431
|
Basics.error(oPathValue, "Unsupported OData expression");
|
|
432
|
+
return undefined;
|
|
431
433
|
}
|
|
432
434
|
},
|
|
433
435
|
|
|
@@ -945,4 +947,4 @@ sap.ui.define([
|
|
|
945
947
|
Expression._setDateTimeFormatter();
|
|
946
948
|
|
|
947
949
|
return Expression;
|
|
948
|
-
}
|
|
950
|
+
});
|
|
@@ -702,11 +702,12 @@ sap.ui.define([
|
|
|
702
702
|
if (oSchema) {
|
|
703
703
|
aArray = oSchema[sArrayName];
|
|
704
704
|
if (aArray) {
|
|
705
|
-
aArray.
|
|
705
|
+
aArray.some(function (oThing) {
|
|
706
706
|
if (oThing.name === sName) {
|
|
707
707
|
vResult = bAsPath ? oThing.$path : oThing;
|
|
708
|
-
return
|
|
708
|
+
return true;
|
|
709
709
|
}
|
|
710
|
+
return false;
|
|
710
711
|
});
|
|
711
712
|
}
|
|
712
713
|
}
|
|
@@ -731,11 +732,12 @@ sap.ui.define([
|
|
|
731
732
|
: vModel.getObject("/dataServices/schema");
|
|
732
733
|
|
|
733
734
|
if (aSchemas) {
|
|
734
|
-
aSchemas.
|
|
735
|
+
aSchemas.some(function (o) {
|
|
735
736
|
if (o.namespace === sNamespace) {
|
|
736
737
|
oSchema = o;
|
|
737
|
-
return
|
|
738
|
+
return true;
|
|
738
739
|
}
|
|
740
|
+
return false;
|
|
739
741
|
});
|
|
740
742
|
}
|
|
741
743
|
|
|
@@ -1144,4 +1146,4 @@ sap.ui.define([
|
|
|
1144
1146
|
};
|
|
1145
1147
|
|
|
1146
1148
|
return Utils;
|
|
1147
|
-
}
|
|
1149
|
+
});
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
* @extends sap.ui.model.type.Currency
|
|
62
62
|
* @public
|
|
63
63
|
* @since 1.63.0
|
|
64
|
-
* @version 1.
|
|
64
|
+
* @version 1.99.0
|
|
65
65
|
*/
|
|
66
66
|
var Currency = BaseCurrency.extend("sap.ui.model.odata.type.Currency", {
|
|
67
67
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -132,7 +132,7 @@ sap.ui.define([
|
|
|
132
132
|
* @extends sap.ui.model.odata.type.ODataType
|
|
133
133
|
* @public
|
|
134
134
|
* @since 1.27.0
|
|
135
|
-
* @version 1.
|
|
135
|
+
* @version 1.99.0
|
|
136
136
|
*/
|
|
137
137
|
var DateTimeBase = ODataType.extend("sap.ui.model.odata.type.DateTimeBase", {
|
|
138
138
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/format/DateFormat",
|
|
9
|
+
"sap/ui/core/format/DateFormatTimezoneDisplay",
|
|
10
|
+
"sap/ui/model/CompositeType",
|
|
11
|
+
"sap/ui/model/FormatException",
|
|
12
|
+
"sap/ui/model/ParseException"
|
|
13
|
+
], function (DateFormat, DateFormatTimezoneDisplay, CompositeType, FormatException,
|
|
14
|
+
ParseException) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
var oDemoDateTime = new Date(Date.UTC(new Date().getFullYear(), 11, 31, 23, 59, 58)),
|
|
18
|
+
sObjectRequiresHide = "Type 'object' requires format option 'showTimezone' set to "
|
|
19
|
+
+ "sap.ui.core.format.DateFormatTimezoneDisplay.Hide";
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
* Returns the formatter. Creates it lazily.
|
|
23
|
+
*
|
|
24
|
+
* @param {sap.ui.model.odata.type.DateTimeWithTimezone} oType
|
|
25
|
+
* The type instance
|
|
26
|
+
* @returns {sap.ui.core.format.DateFormat}
|
|
27
|
+
* The formatter
|
|
28
|
+
*/
|
|
29
|
+
function getFormatter(oType) {
|
|
30
|
+
if (!oType.oFormat) {
|
|
31
|
+
oType.oFormat = DateFormat.getDateTimeWithTimezoneInstance(oType.oFormatOptions);
|
|
32
|
+
}
|
|
33
|
+
return oType.oFormat;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Constructor for a <code>DateTimeWithTimezone</code> composite type.
|
|
38
|
+
*
|
|
39
|
+
* @param {object} [oFormatOptions]
|
|
40
|
+
* Format options. For a list of all available options, see
|
|
41
|
+
* {@link sap.ui.core.format.DateFormat.getDateTimeWithTimezoneInstance DateFormat}.
|
|
42
|
+
* Format options are immutable, that is, they can only be set once on construction.
|
|
43
|
+
* @param {object} [oConstraints]
|
|
44
|
+
* Constraints are not supported
|
|
45
|
+
* @throws {Error}
|
|
46
|
+
* If constraints are given
|
|
47
|
+
*
|
|
48
|
+
* @alias sap.ui.model.odata.type.DateTimeWithTimezone
|
|
49
|
+
* @author SAP SE
|
|
50
|
+
* @class This class represents the <code>DateTimeWithTimezone</code> composite type which has
|
|
51
|
+
* the parts timestamp and time zone. The type formats the timestamp part using the time zone
|
|
52
|
+
* part. For this, the timestamp part has to be provided in the UTC time zone.
|
|
53
|
+
* @extends sap.ui.model.CompositeType
|
|
54
|
+
* @public
|
|
55
|
+
* @since 1.99.0
|
|
56
|
+
* @experimental The behavior of this type may change in the future.
|
|
57
|
+
* @version 1.99.0
|
|
58
|
+
*/
|
|
59
|
+
var DateTimeWithTimezone = CompositeType.extend("sap.ui.model.odata.type.DateTimeWithTimezone",
|
|
60
|
+
{
|
|
61
|
+
constructor : function (oFormatOptions, oConstraints) {
|
|
62
|
+
if (oConstraints && Object.keys(oConstraints).length) {
|
|
63
|
+
throw new Error("Type " + this.getName() + " does not support constraints");
|
|
64
|
+
}
|
|
65
|
+
oFormatOptions = Object.assign({}, oFormatOptions);
|
|
66
|
+
CompositeType.call(this, oFormatOptions);
|
|
67
|
+
this.oFormat = null;
|
|
68
|
+
this.bParseWithValues = true;
|
|
69
|
+
this.bUseInternalValues = true;
|
|
70
|
+
|
|
71
|
+
// must not overwrite setConstraints and setFormatOptions on prototype as they are
|
|
72
|
+
// called in SimpleType constructor
|
|
73
|
+
this.setConstraints = function () {
|
|
74
|
+
throw new Error("Constraints are immutable");
|
|
75
|
+
};
|
|
76
|
+
this.setFormatOptions = function () {
|
|
77
|
+
throw new Error("Format options are immutable");
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
/*
|
|
83
|
+
* Returns the locale-dependent error message corresponding to the type's format option
|
|
84
|
+
* <code>showTimezone</code>.
|
|
85
|
+
*
|
|
86
|
+
* @returns {string}
|
|
87
|
+
* The locale-dependent error message
|
|
88
|
+
*
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
DateTimeWithTimezone.prototype._getErrorMessage = function () {
|
|
92
|
+
var sMessageKey = this.oFormatOptions.showTimezone === DateFormatTimezoneDisplay.Only
|
|
93
|
+
? "EnterDateTimeTimezone"
|
|
94
|
+
: "EnterDateTime";
|
|
95
|
+
|
|
96
|
+
return sap.ui.getCore().getLibraryResourceBundle()
|
|
97
|
+
.getText(sMessageKey, [this.formatValue([oDemoDateTime, "America/New_York"],
|
|
98
|
+
"string")]);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Formats the given values of the parts of the <code>DateTimeWithTimezone</code> composite type
|
|
103
|
+
* to the given target type.
|
|
104
|
+
*
|
|
105
|
+
* @param {array} aValues
|
|
106
|
+
* The array of the part values to be formatted; the first entry has to be a <code>Date</code>
|
|
107
|
+
* object for the timestamp, and the second entry has to be a string representing a time zone
|
|
108
|
+
* ID
|
|
109
|
+
* @param {string} sTargetType
|
|
110
|
+
* The target type, must be "object", "string", or a type with one of these types as its
|
|
111
|
+
* {@link sap.ui.base.DataType#getPrimitiveType primitive type}; see
|
|
112
|
+
* {@link sap.ui.model.odata.type} for more information
|
|
113
|
+
* @returns {any}
|
|
114
|
+
* The formatted output value; <code>null</code>,
|
|
115
|
+
* <ul>
|
|
116
|
+
* <li>if <code>aValues</code> is not set, or</li>
|
|
117
|
+
* <li>if the time zone in <code>aValues</code> is not set, or</li>
|
|
118
|
+
* <li>if the timestamp in <code>aValues</code> is not set and the <code>showTimezone</code>
|
|
119
|
+
* format option is set to <code>sap.ui.core.format.DateFormatTimezoneDisplay.Hide</code>
|
|
120
|
+
* </li>
|
|
121
|
+
* </ul>
|
|
122
|
+
* @throws {sap.ui.model.FormatException}
|
|
123
|
+
* If
|
|
124
|
+
* <ul>
|
|
125
|
+
* <li><code>sTargetType</code> is unsupported,</li>
|
|
126
|
+
* <li>a timestamp is given in <code>aValues</code> that is not an instance of
|
|
127
|
+
* <code>Date</code>,</li>
|
|
128
|
+
* <li>the <code>sTargetType</code> is "object" or an equivalent primitive type, and the
|
|
129
|
+
* <code>showTimezone</code> format option is not
|
|
130
|
+
* <code>sap.ui.core.format.DateFormatTimezoneDisplay.Hide</code></li>
|
|
131
|
+
* </ul>
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
DateTimeWithTimezone.prototype.formatValue = function (aValues, sTargetType) {
|
|
135
|
+
var sShowTimezone = this.oFormatOptions.showTimezone,
|
|
136
|
+
oTimestamp = aValues && aValues[0],
|
|
137
|
+
sTimezone = aValues && aValues[1];
|
|
138
|
+
|
|
139
|
+
if (!aValues
|
|
140
|
+
|| !sTimezone // time zone is mandatory
|
|
141
|
+
|| oTimestamp === undefined // data is not yet available (OData V4)
|
|
142
|
+
// if time zone is not shown falsy timestamps cannot be formatted -> return null
|
|
143
|
+
|| (!oTimestamp && sShowTimezone === DateFormatTimezoneDisplay.Hide)) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (oTimestamp && !(oTimestamp instanceof Date)) {
|
|
148
|
+
throw new FormatException("Timestamp value for " + this.getName()
|
|
149
|
+
+ " is not an instance of Date: " + oTimestamp);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
switch (this.getPrimitiveType(sTargetType)) {
|
|
153
|
+
case "object":
|
|
154
|
+
if (sShowTimezone !== DateFormatTimezoneDisplay.Hide) {
|
|
155
|
+
throw new FormatException(sObjectRequiresHide);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return oTimestamp;
|
|
159
|
+
case "string":
|
|
160
|
+
return getFormatter(this).format(oTimestamp, sTimezone);
|
|
161
|
+
default:
|
|
162
|
+
throw new FormatException("Don't know how to format " + this.getName() + " to "
|
|
163
|
+
+ sTargetType);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Returns the type's name.
|
|
169
|
+
*
|
|
170
|
+
* @returns {string}
|
|
171
|
+
* The type's name
|
|
172
|
+
*
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
DateTimeWithTimezone.prototype.getName = function () {
|
|
176
|
+
return "sap.ui.model.odata.type.DateTimeWithTimezone";
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Gets an array of indices that determine which parts of this type shall not propagate their
|
|
182
|
+
* model messages to the attached control. Prerequisite is that the corresponding binding
|
|
183
|
+
* supports this feature, see {@link sap.ui.model.Binding#supportsIgnoreMessages}. If the
|
|
184
|
+
* <code>showTimezone</code> format option is set to
|
|
185
|
+
* <code>sap.ui.core.format.DateFormatTimezoneDisplay.Hide</code> and the time zone is not shown
|
|
186
|
+
* in the control, the part for the time zone shall not propagate model messages to the control.
|
|
187
|
+
* Analogously, if the format option <code>showTimezone</code> is set to
|
|
188
|
+
* <code>sap.ui.core.format.DateFormatTimezoneDisplay.Only</code>, the date and time are not
|
|
189
|
+
* shown in the control and the parts for the date and time shall not propagate model messages
|
|
190
|
+
* to the control.
|
|
191
|
+
*
|
|
192
|
+
* @return {number[]}
|
|
193
|
+
* An array of indices that determine which parts of this type shall not propagate their
|
|
194
|
+
* model messages to the attached control
|
|
195
|
+
*
|
|
196
|
+
* @public
|
|
197
|
+
* @see sap.ui.model.Binding#supportsIgnoreMessages
|
|
198
|
+
*/
|
|
199
|
+
// @override sap.ui.model.CompositeType#getPartsIgnoringMessages
|
|
200
|
+
DateTimeWithTimezone.prototype.getPartsIgnoringMessages = function () {
|
|
201
|
+
var sShowTimezone = this.oFormatOptions.showTimezone;
|
|
202
|
+
|
|
203
|
+
if (sShowTimezone === DateFormatTimezoneDisplay.Only) {
|
|
204
|
+
return [0];
|
|
205
|
+
} else if (sShowTimezone === DateFormatTimezoneDisplay.Hide) {
|
|
206
|
+
return [1];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return [];
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Parses the given value.
|
|
214
|
+
*
|
|
215
|
+
* @param {string|Date} vValue
|
|
216
|
+
* The value to be parsed
|
|
217
|
+
* @param {string} sSourceType
|
|
218
|
+
* The source type (the expected type of <code>vValue</code>); must be "object", "string", or
|
|
219
|
+
* a type with one of these types as its
|
|
220
|
+
* {@link sap.ui.base.DataType#getPrimitiveType primitive type}; see
|
|
221
|
+
* {@link sap.ui.model.odata.type} for more information
|
|
222
|
+
* @param {any[]} [aCurrentValues]
|
|
223
|
+
* The array of current part values; the first entry has to be a <code>Date</code> object for
|
|
224
|
+
* the timestamp, and the second entry has to be a string representing a time zone ID;
|
|
225
|
+
* <b>Note:</b> This parameter is required, see definition of this parameter in
|
|
226
|
+
* {@link sap.ui.model.CompositeType#parseValue}
|
|
227
|
+
* @returns {any[]}
|
|
228
|
+
* An array with two entries; the first one is a <code>Date</code> object for the timestamp
|
|
229
|
+
* and the second one is a string representing a time zone ID; if a part is hidden via the
|
|
230
|
+
* format option <code>showTimezone</code>, the corresponding entry in the array is set to
|
|
231
|
+
* <code>undefined</code>
|
|
232
|
+
* @throws {sap.ui.model.ParseException}
|
|
233
|
+
* If
|
|
234
|
+
* <ul>
|
|
235
|
+
* <li><code>sSourceType</code> is unsupported,</li>
|
|
236
|
+
* <li>the value is not parsable,</li>
|
|
237
|
+
* <li>the <code>showTimezone</code> format option is
|
|
238
|
+
* <code>sap.ui.core.format.DateFormatTimezoneDisplay.Only</code> but no value is given,
|
|
239
|
+
* </li>
|
|
240
|
+
* <li><code>aCurrentValues</code> is not given,</li>
|
|
241
|
+
* <li>the <code>sSourceType</code> is "object" or an equivalent primitive type, and the
|
|
242
|
+
* <code>showTimezone</code> format option is not
|
|
243
|
+
* <code>sap.ui.core.format.DateFormatTimezoneDisplay.Hide</code>,</li>
|
|
244
|
+
* <li>the <code>sSourceType</code> is "object" or an equivalent primitive type, and the
|
|
245
|
+
* value is not an instance of <code>Date</code></li>
|
|
246
|
+
* </ul>
|
|
247
|
+
*
|
|
248
|
+
* @public
|
|
249
|
+
*/
|
|
250
|
+
DateTimeWithTimezone.prototype.parseValue = function (vValue, sSourceType, aCurrentValues) {
|
|
251
|
+
var sCurrentTimezone, aDateWithTimezone,
|
|
252
|
+
sShowTimezone = this.oFormatOptions.showTimezone;
|
|
253
|
+
|
|
254
|
+
if (!aCurrentValues) {
|
|
255
|
+
throw new ParseException("'aCurrentValues' is mandatory");
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
switch (this.getPrimitiveType(sSourceType)) {
|
|
259
|
+
case "object":
|
|
260
|
+
if (sShowTimezone !== DateFormatTimezoneDisplay.Hide) {
|
|
261
|
+
throw new ParseException(sObjectRequiresHide);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (!vValue) {
|
|
265
|
+
return [null, /*unchanged*/undefined];
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (!aCurrentValues[1]) {
|
|
269
|
+
throw new ParseException(sap.ui.getCore().getLibraryResourceBundle()
|
|
270
|
+
.getText("EnterDateTimeTimezoneFirst"));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (!(vValue instanceof Date)) {
|
|
274
|
+
throw new ParseException("Given value must be an instance of Date");
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
return [vValue, undefined];
|
|
278
|
+
case "string":
|
|
279
|
+
if (!vValue) {
|
|
280
|
+
if (sShowTimezone === DateFormatTimezoneDisplay.Only) {
|
|
281
|
+
throw new ParseException(this._getErrorMessage());
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return [null, /*unchanged*/undefined];
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (!aCurrentValues[1] && sShowTimezone === DateFormatTimezoneDisplay.Hide) {
|
|
288
|
+
throw new ParseException(sap.ui.getCore().getLibraryResourceBundle()
|
|
289
|
+
.getText("EnterDateTimeTimezoneFirst"));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
sCurrentTimezone = aCurrentValues[1]
|
|
293
|
+
|| sap.ui.getCore().getConfiguration().getTimezone();
|
|
294
|
+
aDateWithTimezone = getFormatter(this).parse(vValue, sCurrentTimezone);
|
|
295
|
+
if (!aDateWithTimezone) {
|
|
296
|
+
throw new ParseException(this._getErrorMessage());
|
|
297
|
+
}
|
|
298
|
+
// if time zone has been defaulted because current value does not have a time zone
|
|
299
|
+
// then the default time zone has to be added to the result if the time zone part of
|
|
300
|
+
// the parsed value indicates that it has not been changed; this can happen only
|
|
301
|
+
// if showTimezone format option is 'Show' or not set; in case of 'Hide' a
|
|
302
|
+
// ParseException is thrown earlier; in case of 'Only' the time zone part is never
|
|
303
|
+
// undefined
|
|
304
|
+
if (!aCurrentValues[1] && aDateWithTimezone[1] === undefined) {
|
|
305
|
+
aDateWithTimezone[1] = sCurrentTimezone;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return aDateWithTimezone;
|
|
309
|
+
default:
|
|
310
|
+
throw new ParseException("Don't know how to parse " + this.getName() + " from "
|
|
311
|
+
+ sSourceType);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Validates whether the given raw values meet the defined constraints. This method does nothing
|
|
317
|
+
* as no constraints are supported.
|
|
318
|
+
*
|
|
319
|
+
* @param {any[]} aValues
|
|
320
|
+
* The set of values to be validated
|
|
321
|
+
*
|
|
322
|
+
* @public
|
|
323
|
+
* @see sap.ui.model.SimpleType#validateValue
|
|
324
|
+
*/
|
|
325
|
+
DateTimeWithTimezone.prototype.validateValue = function (aValues) {
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Called by the framework when any localization setting has changed.
|
|
330
|
+
*
|
|
331
|
+
* @private
|
|
332
|
+
*/
|
|
333
|
+
DateTimeWithTimezone.prototype._handleLocalizationChange = function () {
|
|
334
|
+
this.oFormat = null;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
return DateTimeWithTimezone;
|
|
338
|
+
});
|
|
@@ -135,6 +135,8 @@ sap.ui.define([
|
|
|
135
135
|
}
|
|
136
136
|
logWarning(sValue, sName);
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
return undefined;
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
function validateBoolean(vValue, sName) {
|
|
@@ -144,6 +146,8 @@ sap.ui.define([
|
|
|
144
146
|
if (vValue !== undefined && vValue !== false && vValue !== "false") {
|
|
145
147
|
logWarning(vValue, sName);
|
|
146
148
|
}
|
|
149
|
+
|
|
150
|
+
return undefined;
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
function setConstraint(sName, vValue, vDefault) {
|
|
@@ -197,7 +201,7 @@ sap.ui.define([
|
|
|
197
201
|
* @extends sap.ui.model.odata.type.ODataType
|
|
198
202
|
*
|
|
199
203
|
* @author SAP SE
|
|
200
|
-
* @version 1.
|
|
204
|
+
* @version 1.99.0
|
|
201
205
|
*
|
|
202
206
|
* @alias sap.ui.model.odata.type.Decimal
|
|
203
207
|
* @param {object} [oFormatOptions]
|