@openui5/sap.ui.core 1.100.0 → 1.102.1
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 +27 -5
- package/THIRDPARTY.txt +5 -5
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/assert.js +1 -1
- package/src/sap/base/strings/whitespaceReplacer.js +1 -1
- 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 +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +2 -2
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/ManagedObjectRegistry.js +10 -5
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +2 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/CommandExecution.js +15 -12
- package/src/sap/ui/core/Component.js +50 -27
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +27 -12
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +22 -8
- package/src/sap/ui/core/Control.js +2 -3
- package/src/sap/ui/core/Core.js +119 -36
- 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 +1 -1
- 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 +6 -1
- package/src/sap/ui/core/FocusHandler.js +2 -3
- 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 +2 -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 +1 -1
- 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/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +136 -5
- package/src/sap/ui/core/Manifest.js +5 -3
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +3 -1
- package/src/sap/ui/core/Popup.js +12 -14
- package/src/sap/ui/core/RenderManager.js +1 -1
- 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 +21 -15
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +2 -4
- 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 +3 -5
- 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 +514 -389
- package/src/sap/ui/core/cache/CacheManager.js +27 -0
- package/src/sap/ui/core/cache/CacheManagerNOP.js +3 -0
- package/src/sap/ui/core/cache/LRUPersistentCache.js +74 -3
- package/src/sap/ui/core/cldr/ar.json +469 -1
- package/src/sap/ui/core/cldr/ar_EG.json +469 -1
- package/src/sap/ui/core/cldr/ar_SA.json +469 -1
- package/src/sap/ui/core/cldr/bg.json +469 -1
- package/src/sap/ui/core/cldr/ca.json +469 -1
- package/src/sap/ui/core/cldr/cs.json +469 -1
- package/src/sap/ui/core/cldr/cy.json +469 -1
- package/src/sap/ui/core/cldr/da.json +469 -1
- package/src/sap/ui/core/cldr/de.json +469 -1
- package/src/sap/ui/core/cldr/de_AT.json +469 -1
- package/src/sap/ui/core/cldr/de_CH.json +469 -1
- package/src/sap/ui/core/cldr/el.json +469 -1
- package/src/sap/ui/core/cldr/el_CY.json +469 -1
- package/src/sap/ui/core/cldr/en.json +469 -1
- package/src/sap/ui/core/cldr/en_AU.json +469 -1
- package/src/sap/ui/core/cldr/en_GB.json +469 -1
- package/src/sap/ui/core/cldr/en_HK.json +469 -1
- package/src/sap/ui/core/cldr/en_IE.json +469 -1
- package/src/sap/ui/core/cldr/en_IN.json +469 -1
- package/src/sap/ui/core/cldr/en_NZ.json +469 -1
- package/src/sap/ui/core/cldr/en_PG.json +469 -1
- package/src/sap/ui/core/cldr/en_SG.json +469 -1
- package/src/sap/ui/core/cldr/en_ZA.json +469 -1
- package/src/sap/ui/core/cldr/es.json +469 -1
- package/src/sap/ui/core/cldr/es_AR.json +469 -1
- package/src/sap/ui/core/cldr/es_BO.json +469 -1
- package/src/sap/ui/core/cldr/es_CL.json +469 -1
- package/src/sap/ui/core/cldr/es_CO.json +469 -1
- package/src/sap/ui/core/cldr/es_MX.json +469 -1
- package/src/sap/ui/core/cldr/es_PE.json +469 -1
- package/src/sap/ui/core/cldr/es_UY.json +469 -1
- package/src/sap/ui/core/cldr/es_VE.json +469 -1
- package/src/sap/ui/core/cldr/et.json +469 -1
- package/src/sap/ui/core/cldr/fa.json +469 -1
- package/src/sap/ui/core/cldr/fi.json +469 -1
- package/src/sap/ui/core/cldr/fr.json +469 -1
- package/src/sap/ui/core/cldr/fr_BE.json +469 -1
- package/src/sap/ui/core/cldr/fr_CA.json +469 -1
- package/src/sap/ui/core/cldr/fr_CH.json +469 -1
- package/src/sap/ui/core/cldr/fr_LU.json +469 -1
- package/src/sap/ui/core/cldr/he.json +469 -1
- package/src/sap/ui/core/cldr/hi.json +469 -1
- package/src/sap/ui/core/cldr/hr.json +469 -1
- package/src/sap/ui/core/cldr/hu.json +469 -1
- package/src/sap/ui/core/cldr/id.json +469 -1
- package/src/sap/ui/core/cldr/it.json +469 -1
- package/src/sap/ui/core/cldr/it_CH.json +469 -1
- package/src/sap/ui/core/cldr/ja.json +469 -1
- package/src/sap/ui/core/cldr/kk.json +469 -1
- package/src/sap/ui/core/cldr/ko.json +469 -1
- package/src/sap/ui/core/cldr/lt.json +469 -1
- package/src/sap/ui/core/cldr/lv.json +469 -1
- package/src/sap/ui/core/cldr/ms.json +469 -1
- package/src/sap/ui/core/cldr/nb.json +469 -1
- package/src/sap/ui/core/cldr/nl.json +469 -1
- package/src/sap/ui/core/cldr/nl_BE.json +469 -1
- package/src/sap/ui/core/cldr/pl.json +469 -1
- package/src/sap/ui/core/cldr/pt.json +469 -1
- package/src/sap/ui/core/cldr/pt_PT.json +469 -1
- package/src/sap/ui/core/cldr/ro.json +469 -1
- package/src/sap/ui/core/cldr/ru.json +469 -1
- package/src/sap/ui/core/cldr/ru_UA.json +469 -1
- package/src/sap/ui/core/cldr/sk.json +469 -1
- package/src/sap/ui/core/cldr/sl.json +469 -1
- package/src/sap/ui/core/cldr/sr.json +469 -1
- package/src/sap/ui/core/cldr/sr_Latn.json +469 -1
- package/src/sap/ui/core/cldr/sv.json +469 -1
- package/src/sap/ui/core/cldr/th.json +469 -1
- package/src/sap/ui/core/cldr/tr.json +469 -1
- package/src/sap/ui/core/cldr/uk.json +469 -1
- package/src/sap/ui/core/cldr/vi.json +469 -1
- package/src/sap/ui/core/cldr/zh_CN.json +470 -2
- package/src/sap/ui/core/cldr/zh_HK.json +470 -2
- package/src/sap/ui/core/cldr/zh_SG.json +470 -2
- package/src/sap/ui/core/cldr/zh_TW.json +469 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +48 -48
- package/src/sap/ui/core/delegate/ItemNavigation.js +13 -14
- package/src/sap/ui/core/delegate/ScrollEnablement.js +11 -7
- package/src/sap/ui/core/dnd/DragAndDrop.js +8 -6
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
- 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 +162 -92
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +3 -0
- package/src/sap/ui/core/format/NumberFormat.js +28 -28
- package/src/sap/ui/core/format/TimezoneUtil.js +50 -18
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +135 -140
- 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/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -1
- package/src/sap/ui/core/mvc/XMLView.js +19 -23
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +81 -59
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +3 -3
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/routing/Router.js +1 -1
- package/src/sap/ui/core/rules/App.support.js +14 -9
- package/src/sap/ui/core/rules/Config.support.js +12 -12
- package/src/sap/ui/core/rules/Model.support.js +8 -8
- package/src/sap/ui/core/rules/Rendering.support.js +1 -1
- package/src/sap/ui/core/rules/Theming.support.js +4 -4
- package/src/sap/ui/core/rules/View.support.js +9 -9
- 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 +29 -1
- package/src/sap/ui/core/support/Support.js +2 -2
- package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
- package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
- package/src/sap/ui/core/support/plugins/ControlTree.js +440 -349
- package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
- package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +10 -13
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
- package/src/sap/ui/core/support/plugins/Trace.js +7 -7
- package/src/sap/ui/core/support/plugins/ViewInfo.js +91 -43
- package/src/sap/ui/core/support/support.css +23 -23
- package/src/sap/ui/core/support/support.html +5 -7
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
- package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
- package/src/sap/ui/core/themes/base/LocalBusyIndicator.less +15 -1
- package/src/sap/ui/core/themes/base/base.less +419 -22
- package/src/sap/ui/core/themes/base/global.less +13 -9
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +9 -5
- package/src/sap/ui/core/theming/Parameters.js +1 -1
- 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 +2 -2
- 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 +7 -8
- 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/model/ClientListBinding.js +127 -21
- package/src/sap/ui/model/ClientModel.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/ListBinding.js +32 -13
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +10 -7
- 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/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +9 -5
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
- package/src/sap/ui/model/json/JSONListBinding.js +0 -58
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +0 -42
- 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 +4 -3
- package/src/sap/ui/model/odata/ODataUtils.js +7 -9
- package/src/sap/ui/model/odata/OperationMode.js +6 -0
- 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 +39 -37
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +72 -3
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +191 -70
- package/src/sap/ui/model/odata/v2/ODataModel.js +107 -52
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +11 -4
- package/src/sap/ui/model/odata/v4/Context.js +33 -4
- package/src/sap/ui/model/odata/v4/ODataBinding.js +12 -12
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -2
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +161 -106
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +13 -6
- package/src/sap/ui/model/odata/v4/ODataModel.js +118 -12
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +202 -138
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +12 -0
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +110 -40
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +148 -68
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLListBinding.js +0 -53
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa5.js +9 -5
- package/src/sap/ui/test/TestUtils.js +2 -1
- package/src/sap/ui/test/actions/Action.js +3 -3
- package/src/sap/ui/test/actions/Press.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +14 -5
- package/src/sap/ui/test/opaQunit.js +11 -10
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +8 -4
- package/ui5.yaml +1 -1
|
@@ -11,7 +11,6 @@ sap.ui.define([
|
|
|
11
11
|
'sap/ui/core/LocaleData',
|
|
12
12
|
'sap/ui/core/date/UniversalDate',
|
|
13
13
|
'sap/ui/core/format/TimezoneUtil',
|
|
14
|
-
'sap/ui/core/format/DateFormatTimezoneDisplay',
|
|
15
14
|
"sap/base/util/deepEqual",
|
|
16
15
|
"sap/base/strings/formatMessage",
|
|
17
16
|
"sap/base/Log",
|
|
@@ -23,7 +22,6 @@ sap.ui.define([
|
|
|
23
22
|
LocaleData,
|
|
24
23
|
UniversalDate,
|
|
25
24
|
TimezoneUtil,
|
|
26
|
-
DateFormatTimezoneDisplay,
|
|
27
25
|
deepEqual,
|
|
28
26
|
formatMessage,
|
|
29
27
|
Log,
|
|
@@ -143,36 +141,49 @@ sap.ui.define([
|
|
|
143
141
|
aIntervalCompareFields: ["Era", "FullYear", "Quarter", "Month", "Week", "Date", "DayPeriod", "Hours", "Minutes", "Seconds"]
|
|
144
142
|
};
|
|
145
143
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Retrieves info object for timezone instance
|
|
146
|
+
*
|
|
147
|
+
* @param {object} oFormatOptions the format options, relevant are: showDate, showTime and showTimezone
|
|
148
|
+
* @returns {object} info object
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
DateFormat._getDateTimeWithTimezoneInfo = function(oFormatOptions) {
|
|
152
|
+
var bShowDate = oFormatOptions.showDate === undefined || oFormatOptions.showDate;
|
|
153
|
+
var bShowTime = oFormatOptions.showTime === undefined || oFormatOptions.showTime;
|
|
154
|
+
var bShowTimezone = oFormatOptions.showTimezone === undefined || oFormatOptions.showTimezone;
|
|
155
|
+
|
|
156
|
+
var oBaselineType = DateFormat.oDateTimeInfo;
|
|
157
|
+
if (bShowDate && !bShowTime) {
|
|
158
|
+
oBaselineType = DateFormat.oDateInfo;
|
|
159
|
+
} else if (!bShowDate && bShowTime) {
|
|
160
|
+
oBaselineType = DateFormat.oTimeInfo;
|
|
161
|
+
}
|
|
162
|
+
return Object.assign({}, oBaselineType, {
|
|
163
|
+
type: mDateFormatTypes.DATETIME_WITH_TIMEZONE,
|
|
164
|
+
// This function is used to transform the pattern of the fallbackFormatOptions to a timezone pattern.
|
|
165
|
+
getTimezonePattern: function(sPattern) {
|
|
166
|
+
if (!bShowDate && !bShowTime && bShowTimezone) {
|
|
167
|
+
return "VV";
|
|
168
|
+
} else if (!bShowTimezone) {
|
|
169
|
+
return sPattern;
|
|
170
|
+
} else {
|
|
171
|
+
return sPattern + " VV";
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
getPattern: function(oLocaleData, sStyle, sCalendarType) {
|
|
175
|
+
if (!bShowDate && !bShowTime && bShowTimezone) {
|
|
176
|
+
return "VV";
|
|
177
|
+
}
|
|
178
|
+
if (!bShowTimezone) {
|
|
179
|
+
return oBaselineType.getPattern(oLocaleData, sStyle, sCalendarType);
|
|
180
|
+
}
|
|
166
181
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (iSlashIndex > 0) {
|
|
170
|
-
return oLocaleData.getCombinedDateTimeWithTimezonePattern(sStyle.substr(0, iSlashIndex), sStyle.substr(iSlashIndex + 1), sCalendarType);
|
|
171
|
-
} else {
|
|
172
|
-
return oLocaleData.getCombinedDateTimeWithTimezonePattern(sStyle, sStyle, sCalendarType);
|
|
182
|
+
var sPattern = oBaselineType.getPattern(oLocaleData, sStyle, sCalendarType);
|
|
183
|
+
return oLocaleData.applyTimezonePattern(sPattern);
|
|
173
184
|
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
185
|
+
});
|
|
186
|
+
};
|
|
176
187
|
|
|
177
188
|
DateFormat.oTimeInfo = {
|
|
178
189
|
type: mDateFormatTypes.TIME,
|
|
@@ -280,24 +291,24 @@ sap.ui.define([
|
|
|
280
291
|
/**
|
|
281
292
|
* Format a date object to a string according to the given timezone and format options.
|
|
282
293
|
*
|
|
283
|
-
* @example <caption>Format option showTimezone:
|
|
294
|
+
* @example <caption>Format option showTimezone: true (default)</caption>
|
|
284
295
|
* var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
|
|
285
296
|
*
|
|
286
297
|
* DateFormat.getDateTimeWithTimezoneInstance().format(oDate, "Europe/Berlin");
|
|
287
|
-
* // output: "Dec 24, 2021, 2:37:00 PM Europe
|
|
298
|
+
* // output: "Dec 24, 2021, 2:37:00 PM Europe, Berlin"
|
|
288
299
|
*
|
|
289
300
|
* DateFormat.getDateTimeWithTimezoneInstance().format(oDate, "America/New_York");
|
|
290
|
-
* // output: "Dec 24, 2021, 8:37:00 AM
|
|
301
|
+
* // output: "Dec 24, 2021, 8:37:00 AM Americas, New York"
|
|
291
302
|
*
|
|
292
|
-
* @example <caption>Format option showTimezone:
|
|
303
|
+
* @example <caption>Format option showTimezone: false</caption>
|
|
293
304
|
* var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
|
|
294
|
-
* DateFormat.getDateTimeWithTimezoneInstance({showTimezone:
|
|
305
|
+
* DateFormat.getDateTimeWithTimezoneInstance({showTimezone: false}).format(oDate, "America/New_York");
|
|
295
306
|
* // output: "Dec 24, 2021, 8:37:00 AM"
|
|
296
307
|
*
|
|
297
|
-
* @example <caption>Format option
|
|
308
|
+
* @example <caption>Format option showDate: false and showTime:false</caption>
|
|
298
309
|
* var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
|
|
299
|
-
* DateFormat.getDateTimeWithTimezoneInstance({
|
|
300
|
-
* // output: "
|
|
310
|
+
* DateFormat.getDateTimeWithTimezoneInstance({showDate: false, showTime: false}).format(oDate, "America/New_York");
|
|
311
|
+
* // output: "Americas, New York"
|
|
301
312
|
*
|
|
302
313
|
* @param {Date} oJSDate The date to format
|
|
303
314
|
* @param {string} [sTimezone] The IANA timezone ID in which the date will be calculated and
|
|
@@ -309,30 +320,28 @@ sap.ui.define([
|
|
|
309
320
|
* @function
|
|
310
321
|
* @public
|
|
311
322
|
* @since 1.99
|
|
312
|
-
* @experimental As of 1.99.0 certain aspects of this API are not settled yet, i.e. the defaulting for the timezone parameter might change.
|
|
313
|
-
* To be on the safe side, always call with a valid timezone.
|
|
314
323
|
*/
|
|
315
324
|
|
|
316
325
|
/**
|
|
317
326
|
* Parse a string which is formatted according to the given format options to an array
|
|
318
327
|
* containing a date object and the timezone.
|
|
319
328
|
*
|
|
320
|
-
* @example <caption>Format option showTimezone:
|
|
329
|
+
* @example <caption>Format option showTimezone: true (default)</caption>
|
|
321
330
|
* var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
|
|
322
331
|
*
|
|
323
|
-
* DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 2:37:00 PM Europe
|
|
332
|
+
* DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 2:37:00 PM Europe, Berlin", "Europe/Berlin");
|
|
324
333
|
* // output: [oDate, "Europe/Berlin"]
|
|
325
334
|
*
|
|
326
|
-
* DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 8:37:00 AM
|
|
335
|
+
* DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 8:37:00 AM Americas, New York", "America/New_York");
|
|
327
336
|
* // output: [oDate, "America/New_York"]
|
|
328
337
|
*
|
|
329
|
-
* @example <caption>Format option showTimezone:
|
|
338
|
+
* @example <caption>Format option showTimezone: false</caption>
|
|
330
339
|
* var oDate = new Date(Date.UTC(2021, 11, 24, 13, 37));
|
|
331
|
-
* DateFormat.getDateTimeWithTimezoneInstance({showTimezone:
|
|
340
|
+
* DateFormat.getDateTimeWithTimezoneInstance({showTimezone: false}).parse("Dec 24, 2021, 8:37:00 AM", "America/New_York");
|
|
332
341
|
* // output: [oDate, undefined]
|
|
333
342
|
*
|
|
334
|
-
* @example <caption>Format option
|
|
335
|
-
* DateFormat.getDateTimeWithTimezoneInstance({
|
|
343
|
+
* @example <caption>Format option showDate: false and showTime: false</caption>
|
|
344
|
+
* DateFormat.getDateTimeWithTimezoneInstance({showDate: false, showTime: false}).parse("Americas, New York", "America/New_York");
|
|
336
345
|
* // output: [undefined, "America/New_York"]
|
|
337
346
|
*
|
|
338
347
|
* @param {string} sValue the string containing a formatted date/time value
|
|
@@ -343,14 +352,19 @@ sap.ui.define([
|
|
|
343
352
|
* e.g. for a month pattern of <code>MM</code> and a value range of [1-12]
|
|
344
353
|
* <code>strict</code> ensures that the value is within the range;
|
|
345
354
|
* if it is larger than <code>12</code> it cannot be parsed and <code>null</code> is returned
|
|
346
|
-
* @throws {TypeError} Thrown if
|
|
355
|
+
* @throws {TypeError} Thrown if one of the following applies:
|
|
356
|
+
* <ul>
|
|
357
|
+
* <li>the <code>sTimezone</code> parameter is provided and has the wrong type</li>
|
|
358
|
+
* <li>only the time is shown (<code>showDate</code> is <code>false</code>), or only the
|
|
359
|
+
* date is shown (<code>showTime</code> is <code>false</code>)</li>
|
|
360
|
+
* </ul>
|
|
347
361
|
* @return {Array} the parsed values
|
|
348
362
|
* <ul>
|
|
349
|
-
* <li>An array containing datetime and timezone depending on the showTimezone
|
|
363
|
+
* <li>An array containing datetime and timezone depending on the showDate, showTime and showTimezone options
|
|
350
364
|
* <ul>
|
|
351
|
-
* <li>
|
|
352
|
-
* <li>
|
|
353
|
-
* <li>
|
|
365
|
+
* <li>(Default): [Date, string], e.g. [new Date("2021-11-13T13:22:33Z"), "America/New_York"]</li>
|
|
366
|
+
* <li><code>showTimezone: false</code>: [Date, undefined], e.g. [new Date("2021-11-13T13:22:33Z"), undefined]</li>
|
|
367
|
+
* <li><code>showDate: false, showTime: false</code>: [undefined, string], e.g. [undefined, "America/New_York"]</li>
|
|
354
368
|
* </ul>
|
|
355
369
|
* </li>
|
|
356
370
|
* </ul>
|
|
@@ -359,8 +373,6 @@ sap.ui.define([
|
|
|
359
373
|
* @name sap.ui.core.format.DateFormat.DateTimeWithTimezone.parse
|
|
360
374
|
* @function
|
|
361
375
|
* @since 1.99
|
|
362
|
-
* @experimental As of 1.99.0 certain aspects of this API are not settled yet, i.e. the defaulting for the timezone parameter might change.
|
|
363
|
-
* To be on the safe side, always call with a valid timezone.
|
|
364
376
|
*/
|
|
365
377
|
|
|
366
378
|
/**
|
|
@@ -371,29 +383,52 @@ sap.ui.define([
|
|
|
371
383
|
* The symbols must be in canonical order, that is: Era (G), Year (y/Y), Quarter (q/Q), Month (M/L), Week (w), Day-Of-Week (E/e/c), Day (d), Hour (h/H/k/K/j/J), Minute (m), Second (s), Timezone (z/Z/v/V/O/X/x)
|
|
372
384
|
* See http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
|
|
373
385
|
* @param {string} [oFormatOptions.pattern] a datetime pattern in LDML format. It is not verified whether the pattern represents a full datetime.
|
|
374
|
-
* @param {
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* </ul>
|
|
386
|
+
* @param {boolean} [oFormatOptions.showDate=true] Specifies if the date should be displayed.
|
|
387
|
+
* It is ignored for formatting when an options pattern or a format are supplied.
|
|
388
|
+
* @param {boolean} [oFormatOptions.showTime=true] Specifies if the time should be displayed.
|
|
389
|
+
* It is ignored for formatting when an options pattern or a format are supplied.
|
|
390
|
+
* @param {boolean} [oFormatOptions.showTimezone=true] Specifies if the timezone should be displayed.
|
|
380
391
|
* It is ignored for formatting when an options pattern or a format are supplied.
|
|
381
392
|
* @param {string} [oFormatOptions.style] Can be either 'short, 'medium', 'long' or 'full'. For datetime you can also define mixed styles, separated with a slash, where the first part is the date style and the second part is the time style (e.g. "medium/short"). If no pattern is given, a locale-dependent default datetime pattern of that style from the LocaleData class is used.
|
|
382
393
|
* @param {boolean} [oFormatOptions.strictParsing] Whether to check by parsing if the value is a valid datetime
|
|
383
394
|
* @param {boolean} [oFormatOptions.relative] Whether the date is formatted relatively to today's date if it is within the given day range, e.g. "today", "yesterday", "in 5 days"
|
|
384
395
|
* @param {int[]} [oFormatOptions.relativeRange] The day range used for relative formatting. If <code>oFormatOptions.relativeScale</code> is set to the default value 'day', the <code>relativeRange<code> is by default [-6, 6], which means that only the previous 6 and the following 6 days are formatted relatively. If <code>oFormatOptions.relativeScale</code> is set to 'auto', all dates are formatted relatively.
|
|
385
|
-
* @param {string} [oFormatOptions.relativeScale
|
|
396
|
+
* @param {string} [oFormatOptions.relativeScale] If 'auto' is set, a new relative time format is switched on for all Date/Time instances. The default value depends on <code>showDate</code> and <code>showTime</code> options.
|
|
386
397
|
* @param {string} [oFormatOptions.relativeStyle="wide"] The style of the relative format. The valid values are "wide", "short", "narrow"
|
|
387
398
|
* @param {sap.ui.core.CalendarType} [oFormatOptions.calendarType] The calendar type which is used to format and parse the date. This value is by default either set in the configuration or calculated based on the current locale.
|
|
388
399
|
* @param {sap.ui.core.Locale} [oLocale] Locale to ask for locale-specific texts/settings
|
|
400
|
+
* @throws {TypeError} If an invalid configuration was supplied, i.e. when the
|
|
401
|
+
* <code>showDate</code>, <code>showTime</code>, and <code>showTimezone</code> format options
|
|
402
|
+
* are all <code>false</code>
|
|
389
403
|
* @return {sap.ui.core.format.DateFormat.DateTimeWithTimezone} dateTimeWithTimezone instance of the DateFormat
|
|
390
404
|
* @static
|
|
391
405
|
* @public
|
|
392
406
|
* @since 1.99.0
|
|
393
|
-
* @experimental As of 1.99.0 certain aspects of this API are not settled yet, i.e. the defaulting for the timezone parameter might change.
|
|
394
407
|
*/
|
|
395
408
|
DateFormat.getDateTimeWithTimezoneInstance = function(oFormatOptions, oLocale) {
|
|
396
|
-
|
|
409
|
+
// do not modify the input format options
|
|
410
|
+
if (oFormatOptions && !(oFormatOptions instanceof Locale)) {
|
|
411
|
+
oFormatOptions = Object.assign({}, oFormatOptions);
|
|
412
|
+
// translate old showTimezone values (backward compatibility)
|
|
413
|
+
if (typeof oFormatOptions.showTimezone === "string") {
|
|
414
|
+
var sShowTimezone = oFormatOptions.showTimezone;
|
|
415
|
+
if (oFormatOptions.showDate === undefined && oFormatOptions.showTime === undefined) {
|
|
416
|
+
if (sShowTimezone === "Hide") {
|
|
417
|
+
oFormatOptions.showTimezone = false;
|
|
418
|
+
} else if (sShowTimezone === "Only") {
|
|
419
|
+
oFormatOptions.showDate = false;
|
|
420
|
+
oFormatOptions.showTime = false;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
oFormatOptions.showTimezone = sShowTimezone !== "Hide";
|
|
424
|
+
}
|
|
425
|
+
if (oFormatOptions.showDate === false
|
|
426
|
+
&& oFormatOptions.showTime === false
|
|
427
|
+
&& oFormatOptions.showTimezone === false) {
|
|
428
|
+
throw new TypeError("Invalid Configuration. One of the following format options must be true: showDate, showTime or showTimezone.");
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return this.createInstance(oFormatOptions, oLocale, DateFormat._getDateTimeWithTimezoneInfo(oFormatOptions || {}));
|
|
397
432
|
};
|
|
398
433
|
|
|
399
434
|
/**
|
|
@@ -437,6 +472,8 @@ sap.ui.define([
|
|
|
437
472
|
*
|
|
438
473
|
* @param {object} [oFormatOptions] Object which defines the format options
|
|
439
474
|
* @param {sap.ui.core.Locale} [oLocale] Locale to ask for locale specific texts/settings
|
|
475
|
+
* @param {object} [oInfo] Info information common to all instances of the created "type",
|
|
476
|
+
* e.g. default format options
|
|
440
477
|
* @return {sap.ui.core.format.DateFormat} time instance of the DateFormat
|
|
441
478
|
* @static
|
|
442
479
|
* @private
|
|
@@ -469,6 +506,8 @@ sap.ui.define([
|
|
|
469
506
|
oFormat.oFormatOptions.UTC = false;
|
|
470
507
|
} else {
|
|
471
508
|
oFormat.oFormatOptions.showTimezone = undefined;
|
|
509
|
+
oFormat.oFormatOptions.showDate = undefined;
|
|
510
|
+
oFormat.oFormatOptions.showTime = undefined;
|
|
472
511
|
}
|
|
473
512
|
|
|
474
513
|
// type cannot be changed and should be an instance property instead of a format option
|
|
@@ -482,7 +521,7 @@ sap.ui.define([
|
|
|
482
521
|
if (oFormat.oFormatOptions.format) {
|
|
483
522
|
oFormat.oFormatOptions.pattern = oFormat.oLocaleData.getCustomDateTimePattern(oFormat.oFormatOptions.format, oFormat.oFormatOptions.calendarType);
|
|
484
523
|
} else {
|
|
485
|
-
oFormat.oFormatOptions.pattern = oInfo.getPattern(oFormat.oLocaleData, oFormat.oFormatOptions.style, oFormat.oFormatOptions.calendarType
|
|
524
|
+
oFormat.oFormatOptions.pattern = oInfo.getPattern(oFormat.oLocaleData, oFormat.oFormatOptions.style, oFormat.oFormatOptions.calendarType);
|
|
486
525
|
}
|
|
487
526
|
}
|
|
488
527
|
|
|
@@ -539,7 +578,7 @@ sap.ui.define([
|
|
|
539
578
|
aFallbackFormatOptions = oInfo.aFallbackFormatOptions;
|
|
540
579
|
// Add two fallback patterns for locale-dependent short format without delimiters
|
|
541
580
|
if (oInfo.bShortFallbackFormatOptions) {
|
|
542
|
-
sPattern = oInfo.getPattern(oFormat.oLocaleData, "short"
|
|
581
|
+
sPattern = oInfo.getPattern(oFormat.oLocaleData, "short");
|
|
543
582
|
// add the options of fallback formats without delimiters to the fallback options array
|
|
544
583
|
aFallbackFormatOptions = aFallbackFormatOptions.concat(DateFormat._createFallbackOptionsWithoutDelimiter(sPattern));
|
|
545
584
|
}
|
|
@@ -551,7 +590,7 @@ sap.ui.define([
|
|
|
551
590
|
}
|
|
552
591
|
|
|
553
592
|
oFallbackFormats = DateFormat._createFallbackFormat(
|
|
554
|
-
aFallbackFormatOptions, sCalendarType, oLocale, oInfo, oFormat.oFormatOptions
|
|
593
|
+
aFallbackFormatOptions, sCalendarType, oLocale, oInfo, oFormat.oFormatOptions
|
|
555
594
|
);
|
|
556
595
|
}
|
|
557
596
|
|
|
@@ -610,28 +649,31 @@ sap.ui.define([
|
|
|
610
649
|
*
|
|
611
650
|
* @param {Object[]} aFallbackFormatOptions the options for creating the fallback DateFormat
|
|
612
651
|
* @param {sap.ui.core.CalendarType} sCalendarType the type of the current calendarType
|
|
613
|
-
* @param {sap.ui.core.
|
|
652
|
+
* @param {sap.ui.core.Locale} oLocale Locale to ask for locale specific texts/settings
|
|
614
653
|
* @param {Object} oInfo The default info object of the current date type
|
|
615
|
-
* @param {
|
|
616
|
-
* @param {sap.ui.core.format.DateFormatTimezoneDisplay} sShowTimezone The showTimezone format option
|
|
654
|
+
* @param {object} oParentFormatOptions the format options, relevant are: interval, showDate, showTime and showTimezone
|
|
617
655
|
* @return {sap.ui.core.DateFormat[]} an array of fallback DateFormat instances
|
|
656
|
+
* @private
|
|
618
657
|
*/
|
|
619
|
-
DateFormat._createFallbackFormat = function(aFallbackFormatOptions, sCalendarType, oLocale, oInfo,
|
|
658
|
+
DateFormat._createFallbackFormat = function(aFallbackFormatOptions, sCalendarType, oLocale, oInfo, oParentFormatOptions) {
|
|
620
659
|
return aFallbackFormatOptions.map(function(oOptions) {
|
|
621
660
|
// The format options within the aFallbackFormatOptions array are static
|
|
622
661
|
// and shouldn't be manipulated. Hence, cloning each format option is required.
|
|
623
662
|
var oFormatOptions = Object.assign({}, oOptions);
|
|
624
663
|
|
|
625
|
-
// Pass the showTimezone format
|
|
626
|
-
oFormatOptions.
|
|
664
|
+
// Pass the showDate, showTime and showTimezone format options to the fallback instance.
|
|
665
|
+
oFormatOptions.showDate = oParentFormatOptions.showDate;
|
|
666
|
+
oFormatOptions.showTime = oParentFormatOptions.showTime;
|
|
667
|
+
oFormatOptions.showTimezone = oParentFormatOptions.showTimezone;
|
|
627
668
|
|
|
628
|
-
// the timezone instance's fallback patterns depend on the
|
|
669
|
+
// the timezone instance's fallback patterns depend on the showDate, showTime and
|
|
670
|
+
// showTimezone format option which means they cannot be static,
|
|
629
671
|
// therefore they are generated using the getTimezonePattern function
|
|
630
672
|
if (typeof oInfo.getTimezonePattern === "function" && oFormatOptions.pattern) {
|
|
631
|
-
oFormatOptions.pattern = oInfo.getTimezonePattern(oFormatOptions.pattern
|
|
673
|
+
oFormatOptions.pattern = oInfo.getTimezonePattern(oFormatOptions.pattern);
|
|
632
674
|
}
|
|
633
675
|
|
|
634
|
-
if (
|
|
676
|
+
if (oParentFormatOptions.interval) {
|
|
635
677
|
oFormatOptions.interval = true;
|
|
636
678
|
}
|
|
637
679
|
oFormatOptions.calendarType = sCalendarType;
|
|
@@ -1787,7 +1829,9 @@ sap.ui.define([
|
|
|
1787
1829
|
// e.g. America/New_York
|
|
1788
1830
|
// @see http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
|
|
1789
1831
|
if (!bUTC && oField.digits === 2) {
|
|
1790
|
-
|
|
1832
|
+
// fallback for unknown but valid IANA timezone IDs (IANA is a living standard and the browser might support more, while the CLDR data is fixed)
|
|
1833
|
+
// such that the user can see, that there is no translation
|
|
1834
|
+
return oFormat.oLocaleData.getTimezoneTranslations()[sTimezone] || sTimezone;
|
|
1791
1835
|
}
|
|
1792
1836
|
return "";
|
|
1793
1837
|
},
|
|
@@ -1799,20 +1843,35 @@ sap.ui.define([
|
|
|
1799
1843
|
|
|
1800
1844
|
// VV - The long IANA timezone ID
|
|
1801
1845
|
if (oPart.digits === 2) {
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1846
|
+
var mTimezoneTranslations = oFormat.oLocaleData.getTimezoneTranslations();
|
|
1847
|
+
|
|
1848
|
+
// shortcut, first try the timezone parameter
|
|
1849
|
+
if (sValue === mTimezoneTranslations[sTimezone]) {
|
|
1850
|
+
return {
|
|
1851
|
+
timezone: sTimezone,
|
|
1852
|
+
length: sValue.length
|
|
1853
|
+
};
|
|
1806
1854
|
}
|
|
1807
1855
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1856
|
+
var aTimezoneTranslations = Object.values(mTimezoneTranslations);
|
|
1857
|
+
var oTimezoneResult = oParseHelper.findEntry(sValue, aTimezoneTranslations, oFormat.oLocaleData.sCLDRLocaleId);
|
|
1858
|
+
if (oTimezoneResult.index !== -1) {
|
|
1859
|
+
return {
|
|
1860
|
+
timezone: Object.keys(mTimezoneTranslations)[oTimezoneResult.index],
|
|
1861
|
+
length: oTimezoneResult.length
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
// fallback for unknown but valid IANA timezone IDs (IANA is a living
|
|
1866
|
+
// standard and the browser might support more, while the CLDR data is fixed)
|
|
1867
|
+
// such that the user can see, that there is no translation
|
|
1868
|
+
var sCurrentValue = "";
|
|
1869
|
+
for (var i = 0; i < sValue.length; i++) {
|
|
1870
|
+
sCurrentValue += sValue[i];
|
|
1871
|
+
|
|
1872
|
+
if (TimezoneUtil.isValidTimezone(sCurrentValue)) {
|
|
1873
|
+
oTimezoneParsed.timezone = sCurrentValue;
|
|
1874
|
+
oTimezoneParsed.length = sCurrentValue.length;
|
|
1816
1875
|
}
|
|
1817
1876
|
}
|
|
1818
1877
|
}
|
|
@@ -1940,7 +1999,7 @@ sap.ui.define([
|
|
|
1940
1999
|
// Although an invalid date was given, the DATETIME_WITH_TIMEZONE instance might
|
|
1941
2000
|
// have a pattern with the timezone (VV) inside then the IANA timezone ID is returned
|
|
1942
2001
|
if (this.type === mDateFormatTypes.DATETIME_WITH_TIMEZONE && this.oFormatOptions.pattern.includes("VV")) {
|
|
1943
|
-
return sTimezone;
|
|
2002
|
+
return this.oLocaleData.getTimezoneTranslations()[sTimezone] || sTimezone;
|
|
1944
2003
|
}
|
|
1945
2004
|
Log.error("The given date instance isn't valid.");
|
|
1946
2005
|
return "";
|
|
@@ -2301,6 +2360,16 @@ sap.ui.define([
|
|
|
2301
2360
|
* @public
|
|
2302
2361
|
*/
|
|
2303
2362
|
DateFormat.prototype.parse = function(sValue, bUTC, bStrict) {
|
|
2363
|
+
// in order to convert a datetime to a timezone both the date and the time part are required.
|
|
2364
|
+
// If only one is present it cannot be guaranteed that the parsed result is correct, due to
|
|
2365
|
+
// daylight saving time which might shift hours and the timezone difference which might shift
|
|
2366
|
+
// days. For now only the date and time can be parsed using a timezone.
|
|
2367
|
+
var bShowDate = this.oFormatOptions.showDate === undefined || this.oFormatOptions.showDate;
|
|
2368
|
+
var bShowTime = this.oFormatOptions.showTime === undefined || this.oFormatOptions.showTime;
|
|
2369
|
+
if (this.type === mDateFormatTypes.DATETIME_WITH_TIMEZONE
|
|
2370
|
+
&& (bShowDate && !bShowTime || !bShowDate && bShowTime)) {
|
|
2371
|
+
throw new TypeError("The input can only be parsed back to date if both date and time are supplied.");
|
|
2372
|
+
}
|
|
2304
2373
|
var sTimezone;
|
|
2305
2374
|
if (bUTC === undefined && this.type !== mDateFormatTypes.DATETIME_WITH_TIMEZONE) {
|
|
2306
2375
|
bUTC = this.oFormatOptions.UTC;
|
|
@@ -2354,10 +2423,11 @@ sap.ui.define([
|
|
|
2354
2423
|
|
|
2355
2424
|
if (oJSDate) {
|
|
2356
2425
|
if (this.type === mDateFormatTypes.DATETIME_WITH_TIMEZONE) {
|
|
2357
|
-
|
|
2358
|
-
|
|
2426
|
+
var bShowTimezone = this.oFormatOptions.showTimezone === undefined || this.oFormatOptions.showTimezone;
|
|
2427
|
+
// fill fields according to showDate, showTime and showTimezone options and parsed values
|
|
2428
|
+
if (!bShowTimezone && bShowDate && bShowTime) {
|
|
2359
2429
|
return [oJSDate, undefined];
|
|
2360
|
-
} else if (
|
|
2430
|
+
} else if (bShowTimezone && !bShowDate && !bShowTime) {
|
|
2361
2431
|
return [undefined, oDateValue.timezone];
|
|
2362
2432
|
}
|
|
2363
2433
|
return [oJSDate, oDateValue.timezone || undefined];
|
|
@@ -17,6 +17,9 @@ sap.ui.define([], function() {
|
|
|
17
17
|
* @since 1.99.0
|
|
18
18
|
* @ui5-metamodel This enumeration also will be described in the UI5 (legacy) designtime metamodel
|
|
19
19
|
* @alias sap.ui.core.format.DateFormatTimezoneDisplay
|
|
20
|
+
* @deprecated As of version 1.101, replaced by
|
|
21
|
+
* <code>DateFormat#getDateTimeWithTimezoneInstance</code> with the <code>showDate</code>,
|
|
22
|
+
* <code>showTime</code> and <code>showTimezone</code> format options.
|
|
20
23
|
*/
|
|
21
24
|
var DateFormatTimezoneDisplay = {
|
|
22
25
|
|