@openui5/sap.ui.core 1.112.2 → 1.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dtsgenrc +16 -1
- package/THIRDPARTY.txt +1 -1
- 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 +7 -7
- package/src/sap/base/security/URLWhitelist.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 +1 -1
- package/src/sap/ui/base/ExpressionParser.js +15 -5
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +4 -2
- package/src/sap/ui/base/ManagedObjectMetadata.js +10 -12
- package/src/sap/ui/base/Metadata.js +23 -12
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +8 -5
- 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 +58 -9
- package/src/sap/ui/core/Control.js +22 -5
- package/src/sap/ui/core/Core.js +1 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomStyleClassSupport.js +5 -2
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +3 -2
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +10 -2
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/Lib.js +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 +2 -2
- package/src/sap/ui/core/LocaleData.js +87 -19
- package/src/sap/ui/core/Manifest.js +4 -4
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +19 -27
- package/src/sap/ui/core/RenderManager.js +7 -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 +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +3 -2
- 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/cache/CacheManager.js +1 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +1 -1
- package/src/sap/ui/core/date/CalendarUtils.js +14 -26
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +32 -0
- package/src/sap/ui/core/date/UI5Date.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +4 -4
- package/src/sap/ui/core/date/_Calendars.js +1 -1
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +103 -30
- package/src/sap/ui/core/format/NumberFormat.js +40 -5
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/messagebundle_ar.properties +1 -1
- package/src/sap/ui/core/messagebundle_cs.properties +1 -1
- package/src/sap/ui/core/messagebundle_cy.properties +1 -1
- package/src/sap/ui/core/messagebundle_da.properties +1 -1
- package/src/sap/ui/core/messagebundle_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_el.properties +1 -1
- package/src/sap/ui/core/messagebundle_en.properties +1 -1
- package/src/sap/ui/core/messagebundle_en_GB.properties +1 -1
- package/src/sap/ui/core/messagebundle_es.properties +4 -4
- package/src/sap/ui/core/messagebundle_es_MX.properties +1 -1
- package/src/sap/ui/core/messagebundle_et.properties +1 -1
- package/src/sap/ui/core/messagebundle_fi.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr_CA.properties +1 -1
- package/src/sap/ui/core/messagebundle_hi.properties +1 -1
- package/src/sap/ui/core/messagebundle_hr.properties +1 -1
- package/src/sap/ui/core/messagebundle_hu.properties +1 -1
- package/src/sap/ui/core/messagebundle_id.properties +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +1 -1
- package/src/sap/ui/core/messagebundle_iw.properties +1 -1
- package/src/sap/ui/core/messagebundle_kk.properties +1 -1
- package/src/sap/ui/core/messagebundle_lt.properties +1 -1
- package/src/sap/ui/core/messagebundle_lv.properties +1 -1
- package/src/sap/ui/core/messagebundle_nl.properties +1 -1
- package/src/sap/ui/core/messagebundle_no.properties +1 -1
- package/src/sap/ui/core/messagebundle_pl.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt.properties +1 -1
- package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -1
- package/src/sap/ui/core/messagebundle_ro.properties +1 -1
- package/src/sap/ui/core/messagebundle_ru.properties +1 -1
- package/src/sap/ui/core/messagebundle_sh.properties +1 -1
- package/src/sap/ui/core/messagebundle_sk.properties +1 -1
- package/src/sap/ui/core/messagebundle_sl.properties +1 -1
- package/src/sap/ui/core/messagebundle_sv.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +1 -1
- package/src/sap/ui/core/messagebundle_tr.properties +1 -1
- package/src/sap/ui/core/messagebundle_uk.properties +1 -1
- package/src/sap/ui/core/messagebundle_vi.properties +1 -1
- package/src/sap/ui/core/messagebundle_zh_CN.properties +1 -1
- package/src/sap/ui/core/messagebundle_zh_TW.properties +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +3 -3
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- 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/Target.js +1 -1
- package/src/sap/ui/core/routing/Targets.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/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 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +3256 -19
- package/src/sap/ui/core/theming/ThemeManager.js +6 -3
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +7 -3
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +19 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +36 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +4 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +32 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +19 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +72 -28
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +5 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +29 -10
- package/src/sap/ui/model/odata/v2/ODataModel.js +29 -17
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +8 -1
- package/src/sap/ui/model/odata/v4/Context.js +33 -20
- package/src/sap/ui/model/odata/v4/ODataBinding.js +50 -21
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +167 -65
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +4 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +4 -3
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +35 -25
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +87 -18
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +99 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +57 -2
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +3 -0
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/qunit-coverage-istanbul.js +180 -0
- package/src/sap/ui/qunit/qunit-coverage.js +9 -4
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/Opa.js +54 -21
- package/src/sap/ui/test/Opa5.js +181 -131
- package/src/sap/ui/test/OpaBuilder.js +106 -73
- package/src/sap/ui/test/OpaPlugin.js +8 -3
- package/src/sap/ui/test/RecordReplay.js +7 -3
- package/src/sap/ui/test/actions/EnterText.js +3 -2
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +3 -1
- package/src/sap/ui/test/pipelines/PipelineFactory.js +2 -2
- package/src/sap/ui/test/starter/_configureLoader.js +7 -5
- package/src/sap/ui/test/starter/_setupAndStart.js +113 -27
- package/src/sap/ui/test/starter/_utils.js +4 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader-autoconfig.js +3 -1
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* @extends sap.ui.core.Component
|
|
56
56
|
* @abstract
|
|
57
57
|
* @author SAP SE
|
|
58
|
-
* @version 1.
|
|
58
|
+
* @version 1.113.0
|
|
59
59
|
* @alias sap.ui.core.UIComponent
|
|
60
60
|
* @since 1.9.2
|
|
61
61
|
*/
|
|
@@ -426,7 +426,8 @@ sap.ui.define([
|
|
|
426
426
|
function getConstructorFunctionFor (vRoutingObjectConstructor) {
|
|
427
427
|
var fnConstructor;
|
|
428
428
|
if (typeof vRoutingObjectConstructor === "string") {
|
|
429
|
-
fnConstructor =
|
|
429
|
+
fnConstructor = sap.ui.require(vRoutingObjectConstructor.replace(/\./g, "/"))
|
|
430
|
+
|| ObjectPath.get(vRoutingObjectConstructor);
|
|
430
431
|
if (!fnConstructor) {
|
|
431
432
|
Log.error("The specified class for router or targets '" + vRoutingObjectConstructor + "' is undefined.", this);
|
|
432
433
|
}
|
|
@@ -18,7 +18,7 @@ sap.ui.define(['./ComponentMetadata', 'sap/ui/core/mvc/ViewType'],
|
|
|
18
18
|
* @experimental Since 1.15.1. The Component concept is still under construction, so some implementation details can be changed in future.
|
|
19
19
|
* @class
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.113.0
|
|
22
22
|
* @since 1.15.1
|
|
23
23
|
* @alias sap.ui.core.UIComponentMetadata
|
|
24
24
|
* @extends sap.ui.core.ComponentMetadata
|
|
@@ -20,7 +20,7 @@ sap.ui.define(['./LayoutData', './library'],
|
|
|
20
20
|
* @class
|
|
21
21
|
* Allows to add multiple LayoutData to one control in case that an easy switch of layouts (e.g. in a Form) is needed.
|
|
22
22
|
* @extends sap.ui.core.LayoutData
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.113.0
|
|
24
24
|
*
|
|
25
25
|
* @public
|
|
26
26
|
* @since 1.9.2
|
|
@@ -146,7 +146,7 @@ sap.ui.define([
|
|
|
146
146
|
* @extends sap.ui.core.Control
|
|
147
147
|
*
|
|
148
148
|
* @author SAP SE
|
|
149
|
-
* @version 1.
|
|
149
|
+
* @version 1.113.0
|
|
150
150
|
* @since 1.56.0
|
|
151
151
|
* @alias sap.ui.core.XMLComposite
|
|
152
152
|
* @see {@link topic:b83a4dcb7d0e46969027345b8d32fd44 XML Composite Controls}
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @param {object} oClassInfo static info to construct the metadata from
|
|
31
31
|
*
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.113.0
|
|
34
34
|
* @since 1.50.0
|
|
35
35
|
* @alias sap.ui.core.XMLCompositeMetadata
|
|
36
36
|
* @extends sap.ui.core.ElementMetadata
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* <li>Google Chrome(version >=49) for desktop</li>
|
|
25
25
|
* <li>Internet Explorer(version >=11) for desktop.</li>
|
|
26
26
|
* </ul>
|
|
27
|
-
* For all other environments a dummy (NOP) implementation will be loaded
|
|
27
|
+
* For all other environments, a dummy (NOP) implementation will be loaded, see {@link sap.ui.core.cache.CacheManagerNOP}.
|
|
28
28
|
*
|
|
29
29
|
* This object is not meant for application developer's use, but for core UI5 framework purposes.
|
|
30
30
|
*
|
|
@@ -16,7 +16,7 @@ sap.ui.define(["sap/base/Log", "sap/ui/performance/Measurement", "sap/ui/Global"
|
|
|
16
16
|
* This implementation works with entries corresponding to a single ui5 version.
|
|
17
17
|
* If the cache is loaded with different ui5 version, all previous entries will be deleted. The latter behavior is about of a further changes (feature requests)
|
|
18
18
|
*
|
|
19
|
-
* This implementation relies on existing configuration @
|
|
19
|
+
* This implementation relies on existing configuration {@link sap.ui.core.Configuration}.
|
|
20
20
|
*
|
|
21
21
|
* Do not use it directly, use {@link sap.ui.core.cache.CacheManager} instead
|
|
22
22
|
* @private
|
|
@@ -9,28 +9,9 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/core/date/CalendarWeekNumbering",
|
|
10
10
|
"sap/ui/core/Configuration",
|
|
11
11
|
"sap/ui/core/LocaleData"
|
|
12
|
-
], function(
|
|
13
|
-
CalendarWeekNumbering,
|
|
14
|
-
Configuration,
|
|
15
|
-
LocaleData
|
|
16
|
-
) {
|
|
12
|
+
], function(CalendarWeekNumbering, Configuration, LocaleData) {
|
|
17
13
|
"use strict";
|
|
18
14
|
|
|
19
|
-
var mWeekNumberingConfiguration = {
|
|
20
|
-
ISO_8601 : {
|
|
21
|
-
firstDayOfWeek : 1,
|
|
22
|
-
minimalDaysInFirstWeek : 4
|
|
23
|
-
},
|
|
24
|
-
MiddleEastern : {
|
|
25
|
-
firstDayOfWeek : 6,
|
|
26
|
-
minimalDaysInFirstWeek : 1
|
|
27
|
-
},
|
|
28
|
-
WesternTraditional : {
|
|
29
|
-
firstDayOfWeek : 0,
|
|
30
|
-
minimalDaysInFirstWeek : 1
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
15
|
/**
|
|
35
16
|
* Provides calendar-related utilities.
|
|
36
17
|
*
|
|
@@ -52,8 +33,11 @@ sap.ui.define([
|
|
|
52
33
|
* which define the first calendar week</li>
|
|
53
34
|
* </ul>
|
|
54
35
|
*
|
|
55
|
-
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering
|
|
56
|
-
* The calendar week numbering; if omitted,
|
|
36
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
37
|
+
* The calendar week numbering; if omitted, the calendar week numbering of the Configuration
|
|
38
|
+
* is used; see {@link sap.ui.core.Configuration#getCalendarWeekNumbering}. If this value is
|
|
39
|
+
* <code>Default</code> the returned calendar week configuration is derived from the given
|
|
40
|
+
* <code>oLocale</code>.
|
|
57
41
|
* @param {sap.ui.core.Locale} [oLocale]
|
|
58
42
|
* The locale to use; if not provided, this falls back to the format locale from the
|
|
59
43
|
* Configuration; see {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale}.
|
|
@@ -65,12 +49,16 @@ sap.ui.define([
|
|
|
65
49
|
* @since 1.108.0
|
|
66
50
|
*/
|
|
67
51
|
getWeekConfigurationValues : function (sCalendarWeekNumbering, oLocale) {
|
|
68
|
-
var oLocaleData;
|
|
52
|
+
var oLocaleData, oWeekConfigurationValues;
|
|
53
|
+
|
|
54
|
+
if (!sCalendarWeekNumbering) {
|
|
55
|
+
return CalendarUtils.getWeekConfigurationValues(Configuration.getCalendarWeekNumbering(), oLocale);
|
|
56
|
+
}
|
|
69
57
|
|
|
70
|
-
|
|
71
|
-
|
|
58
|
+
oWeekConfigurationValues = CalendarWeekNumbering.getWeekConfigurationValues(sCalendarWeekNumbering);
|
|
59
|
+
if (oWeekConfigurationValues) {
|
|
60
|
+
return oWeekConfigurationValues;
|
|
72
61
|
}
|
|
73
|
-
sCalendarWeekNumbering = sCalendarWeekNumbering || CalendarWeekNumbering.Default;
|
|
74
62
|
if (sCalendarWeekNumbering === CalendarWeekNumbering.Default) {
|
|
75
63
|
oLocale = oLocale || Configuration.getFormatSettings().getFormatLocale();
|
|
76
64
|
oLocaleData = LocaleData.getInstance(oLocale);
|
|
@@ -69,5 +69,37 @@ sap.ui.define([], function() {
|
|
|
69
69
|
WesternTraditional : "WesternTraditional"
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Returns an object containing the week configuration values for the given calendar week
|
|
74
|
+
* numbering algorithm.
|
|
75
|
+
*
|
|
76
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering=Default]
|
|
77
|
+
* The calendar week numbering algorithm
|
|
78
|
+
* @returns {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}|undefined}
|
|
79
|
+
* The week configuration values or <code>undefined</code> if the given calendar week
|
|
80
|
+
* numbering algorithm is "Default"
|
|
81
|
+
*
|
|
82
|
+
* @function
|
|
83
|
+
* @name sap.ui.core.date.CalendarWeekNumbering.getWeekConfigurationValues
|
|
84
|
+
* @private
|
|
85
|
+
*/
|
|
86
|
+
Object.defineProperty(CalendarWeekNumbering, "getWeekConfigurationValues", {
|
|
87
|
+
// configurable : false,
|
|
88
|
+
// enumerable : false,
|
|
89
|
+
value : function (sCalendarWeekNumbering) {
|
|
90
|
+
switch (sCalendarWeekNumbering) {
|
|
91
|
+
case CalendarWeekNumbering.ISO_8601 :
|
|
92
|
+
return {firstDayOfWeek : 1, minimalDaysInFirstWeek : 4};
|
|
93
|
+
case CalendarWeekNumbering.MiddleEastern :
|
|
94
|
+
return {firstDayOfWeek : 6, minimalDaysInFirstWeek : 1};
|
|
95
|
+
case CalendarWeekNumbering.WesternTraditional :
|
|
96
|
+
return {firstDayOfWeek : 0, minimalDaysInFirstWeek : 1};
|
|
97
|
+
default:
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// writable : false
|
|
102
|
+
});
|
|
103
|
+
|
|
72
104
|
return CalendarWeekNumbering;
|
|
73
105
|
}, /* bExport= */ true);
|
|
@@ -391,11 +391,11 @@ sap.ui.define([
|
|
|
391
391
|
*/
|
|
392
392
|
UniversalDateUtils._getDateFromWeekStartByDayOffset = function (sCalendarWeekNumbering, iDaysToAdd) {
|
|
393
393
|
var sCalendarType = Configuration.getCalendarType(),
|
|
394
|
-
oLocale =
|
|
394
|
+
oLocale = Configuration.getFormatSettings().getFormatLocale(),
|
|
395
395
|
oUniversalDate = UniversalDateUtils.createNewUniversalDate(),
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
oWeekAndYear = oUniversalDate.getWeek(oLocale, sCalendarWeekNumbering),
|
|
397
|
+
oFirstDateOfWeek = UniversalDate.getFirstDateOfWeek(sCalendarType, oWeekAndYear.year, oWeekAndYear.week,
|
|
398
|
+
oLocale, sCalendarWeekNumbering);
|
|
399
399
|
|
|
400
400
|
if (iDaysToAdd === undefined) {
|
|
401
401
|
iDaysToAdd = 0;
|
|
@@ -17,7 +17,7 @@ sap.ui.define([], function () {
|
|
|
17
17
|
var _Calendars = {
|
|
18
18
|
get: function (sCalendarType) {
|
|
19
19
|
if (!mRegistry.has(sCalendarType)) {
|
|
20
|
-
sap.ui.requireSync("sap/ui/core/date/" + sCalendarType);
|
|
20
|
+
sap.ui.requireSync("sap/ui/core/date/" + sCalendarType); // TODO: establish full async alternative
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
return mRegistry.get(sCalendarType);
|
|
@@ -81,7 +81,7 @@ sap.ui.define([
|
|
|
81
81
|
* @param {Element[]} aItemDomRefs Array of DOM references representing the items for the navigation
|
|
82
82
|
* @param {boolean} [bNotInTabChain=false] Whether the selected element should be in the tab chain or not
|
|
83
83
|
*
|
|
84
|
-
* @version 1.
|
|
84
|
+
* @version 1.113.0
|
|
85
85
|
* @alias sap.ui.core.delegate.ItemNavigation
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
*
|
|
59
59
|
* @protected
|
|
60
60
|
* @alias sap.ui.core.delegate.ScrollEnablement
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.113.0
|
|
62
62
|
* @author SAP SE
|
|
63
63
|
*/
|
|
64
64
|
var ScrollEnablement = BaseObject.extend("sap.ui.core.delegate.ScrollEnablement", /** @lends sap.ui.core.delegate.ScrollEnablement.prototype */ {
|
|
@@ -250,6 +250,12 @@ sap.ui.define([
|
|
|
250
250
|
* @param {string} [oFormatOptions.relativeStyle="wide"] since 1.32.10, 1.34.4 the style of the relative format. The valid values are "wide", "short", "narrow"
|
|
251
251
|
* @param {boolean} [oFormatOptions.interval=false] since 1.48.0 if true, the {@link sap.ui.core.format.DateFormat#format format} method expects an array with two dates as the first argument and formats them as interval. Further interval "Jan 10, 2008 - Jan 12, 2008" will be formatted as "Jan 10-12, 2008" if the 'format' option is set with necessary symbols.
|
|
252
252
|
* Otherwise the two given dates are formatted separately and concatenated with local dependent pattern.
|
|
253
|
+
* @param {string} [oFormatOptions.intervalDelimiter]
|
|
254
|
+
* Since 1.113.0, a delimiter for intervals. With a given interval delimiter a specific interval format is
|
|
255
|
+
* created. <b>Example:</b> If <code>oFormatOptions.intervalDelimiter</code> is set to "...", an interval would be
|
|
256
|
+
* given as "Jan 10, 2008...Feb 12, 2008".
|
|
257
|
+
* <b>Note:</b> If this format option is set, the locale-specific interval notation is overruled, for example
|
|
258
|
+
* "Jan 10 – Feb 12, 2008" becomes "Jan 10, 2008...Feb 12, 2008".
|
|
253
259
|
* @param {boolean} [oFormatOptions.singleIntervalValue=false] Only relevant if oFormatOptions.interval is set to 'true'. This allows to pass an array with only one date object to the {@link sap.ui.core.format.DateFormat#format format} method.
|
|
254
260
|
* @param {boolean} [oFormatOptions.UTC] if true, the date is formatted and parsed as UTC instead of the local timezone
|
|
255
261
|
* @param {sap.ui.core.CalendarType} [oFormatOptions.calendarType] The calender type which is used to format and parse the date. This value is by default either set in configuration or calculated based on current locale.
|
|
@@ -288,6 +294,12 @@ sap.ui.define([
|
|
|
288
294
|
* @param {string} [oFormatOptions.relativeStyle="wide"] since 1.32.10, 1.34.4 the style of the relative format. The valid values are "wide", "short", "narrow"
|
|
289
295
|
* @param {boolean} [oFormatOptions.interval=false] since 1.48.0 if true, the {@link sap.ui.core.format.DateFormat#format format} method expects an array with two dates as the first argument and formats them as interval. Further interval "Jan 10, 2008 - Jan 12, 2008" will be formatted as "Jan 10-12, 2008" if the 'format' option is set with necessary symbols.
|
|
290
296
|
* Otherwise the two given dates are formatted separately and concatenated with local dependent pattern.
|
|
297
|
+
* @param {string} [oFormatOptions.intervalDelimiter]
|
|
298
|
+
* Since 1.113.0, a delimiter for intervals. With a given interval delimiter a specific interval format is
|
|
299
|
+
* created. <b>Example:</b> If <code>oFormatOptions.intervalDelimiter</code> is set to "...", an interval would be
|
|
300
|
+
* given as "Jan 10, 2008, 9:15:00 AM...Jan 10, 2008, 11:45:00 AM".
|
|
301
|
+
* <b>Note:</b> If this format option is set, the locale-specific interval notation is overruled, for example
|
|
302
|
+
* "Jan 10, 2008, 9:15 – 11:45 AM" becomes "Jan 10, 2008, 9:15 AM...Jan 10, 2008, 11:45 AM".
|
|
291
303
|
* @param {boolean} [oFormatOptions.singleIntervalValue=false] Only relevant if oFormatOptions.interval is set to 'true'. This allows to pass an array with only one date object to the {@link sap.ui.core.format.DateFormat#format format} method.
|
|
292
304
|
* @param {boolean} [oFormatOptions.UTC] if true, the date is formatted and parsed as UTC instead of the local timezone
|
|
293
305
|
* @param {sap.ui.core.CalendarType} [oFormatOptions.calendarType] The calender type which is used to format and parse the date. This value is by default either set in configuration or calculated based on current locale.
|
|
@@ -324,7 +336,7 @@ sap.ui.define([
|
|
|
324
336
|
* Format a date object to a string according to the given timezone and format options.
|
|
325
337
|
*
|
|
326
338
|
* @example <caption>Format option showTimezone: true (default)</caption>
|
|
327
|
-
* var oDate =
|
|
339
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
328
340
|
*
|
|
329
341
|
* DateFormat.getDateTimeWithTimezoneInstance().format(oDate, "Europe/Berlin");
|
|
330
342
|
* // output: "Dec 24, 2021, 2:37:00 PM Europe, Berlin"
|
|
@@ -333,12 +345,12 @@ sap.ui.define([
|
|
|
333
345
|
* // output: "Dec 24, 2021, 8:37:00 AM Americas, New York"
|
|
334
346
|
*
|
|
335
347
|
* @example <caption>Format option showTimezone: false</caption>
|
|
336
|
-
* var oDate =
|
|
348
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
337
349
|
* DateFormat.getDateTimeWithTimezoneInstance({showTimezone: false}).format(oDate, "America/New_York");
|
|
338
350
|
* // output: "Dec 24, 2021, 8:37:00 AM"
|
|
339
351
|
*
|
|
340
352
|
* @example <caption>Format option showDate: false and showTime:false</caption>
|
|
341
|
-
* var oDate =
|
|
353
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
342
354
|
* DateFormat.getDateTimeWithTimezoneInstance({showDate: false, showTime: false}).format(oDate, "America/New_York");
|
|
343
355
|
* // output: "Americas, New York"
|
|
344
356
|
*
|
|
@@ -359,7 +371,7 @@ sap.ui.define([
|
|
|
359
371
|
* containing a date object and the timezone.
|
|
360
372
|
*
|
|
361
373
|
* @example <caption>Format option showTimezone: true (default)</caption>
|
|
362
|
-
* var oDate =
|
|
374
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
363
375
|
*
|
|
364
376
|
* DateFormat.getDateTimeWithTimezoneInstance().parse("Dec 24, 2021, 2:37:00 PM Europe, Berlin", "Europe/Berlin");
|
|
365
377
|
* // output: [oDate, "Europe/Berlin"]
|
|
@@ -368,7 +380,7 @@ sap.ui.define([
|
|
|
368
380
|
* // output: [oDate, "America/New_York"]
|
|
369
381
|
*
|
|
370
382
|
* @example <caption>Format option showTimezone: false</caption>
|
|
371
|
-
* var oDate =
|
|
383
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
372
384
|
* DateFormat.getDateTimeWithTimezoneInstance({showTimezone: false}).parse("Dec 24, 2021, 8:37:00 AM", "America/New_York");
|
|
373
385
|
* // output: [oDate, undefined]
|
|
374
386
|
*
|
|
@@ -394,9 +406,12 @@ sap.ui.define([
|
|
|
394
406
|
* <ul>
|
|
395
407
|
* <li>An array containing datetime and timezone depending on the showDate, showTime and showTimezone options
|
|
396
408
|
* <ul>
|
|
397
|
-
* <li>(Default): [Date, string], e.g.
|
|
398
|
-
*
|
|
399
|
-
* <li><code>
|
|
409
|
+
* <li>(Default): [Date, string], e.g.
|
|
410
|
+
* [UI5Date.getInstance("2021-11-13T13:22:33Z"), "America/New_York"]</li>
|
|
411
|
+
* <li><code>showTimezone: false</code>: [Date, undefined], e.g.
|
|
412
|
+
* [UI5Date.getInstance("2021-11-13T13:22:33Z"), undefined]</li>
|
|
413
|
+
* <li><code>showDate: false, showTime: false</code>: [undefined, string], e.g.
|
|
414
|
+
* [undefined, "America/New_York"]</li>
|
|
400
415
|
* </ul>
|
|
401
416
|
* </li>
|
|
402
417
|
* </ul>
|
|
@@ -406,6 +421,8 @@ sap.ui.define([
|
|
|
406
421
|
* @function
|
|
407
422
|
* @since 1.99
|
|
408
423
|
*/
|
|
424
|
+
// This method has a TypeScript specific overlay for a better return value documentation,
|
|
425
|
+
// see 'src/sap.ui.core/.dtsgenrc'
|
|
409
426
|
|
|
410
427
|
/**
|
|
411
428
|
* Get a datetimeWithTimezone instance of the DateFormat, which can be used for formatting.
|
|
@@ -493,6 +510,12 @@ sap.ui.define([
|
|
|
493
510
|
* @param {string} [oFormatOptions.relativeStyle="wide"] since 1.32.10, 1.34.4 the style of the relative format. The valid values are "wide", "short", "narrow"
|
|
494
511
|
* @param {boolean} [oFormatOptions.interval=false] since 1.48.0 if true, the {@link sap.ui.core.format.DateFormat#format format} method expects an array with two dates as the first argument and formats them as interval. Further interval "Jan 10, 2008 - Jan 12, 2008" will be formatted as "Jan 10-12, 2008" if the 'format' option is set with necessary symbols.
|
|
495
512
|
* Otherwise the two given dates are formatted separately and concatenated with local dependent pattern.
|
|
513
|
+
* @param {string} [oFormatOptions.intervalDelimiter]
|
|
514
|
+
* Since 1.113.0, a delimiter for intervals. With a given interval delimiter a specific interval format is
|
|
515
|
+
* created. <b>Example:</b> If <code>oFormatOptions.intervalDelimiter</code> is set to "...", an interval would be
|
|
516
|
+
* given as "09:15 AM...11:45 AM".
|
|
517
|
+
* <b>Note:</b> If this format option is set, the locale-specific interval notation is overruled, for example
|
|
518
|
+
* "09:15 – 11:45 AM" becomes "9:15 AM...11:45 AM".
|
|
496
519
|
* @param {boolean} [oFormatOptions.singleIntervalValue=false] Only relevant if oFormatOptions.interval is set to 'true'. This allows to pass an array with only one date object to the {@link sap.ui.core.format.DateFormat#format format} method.
|
|
497
520
|
* @param {boolean} [oFormatOptions.UTC] if true, the time is formatted and parsed as UTC instead of the local timezone
|
|
498
521
|
* @param {sap.ui.core.CalendarType} [oFormatOptions.calendarType] The calender type which is used to format and parse the date. This value is by default either set in configuration or calculated based on current locale.
|
|
@@ -595,6 +618,8 @@ sap.ui.define([
|
|
|
595
618
|
}
|
|
596
619
|
|
|
597
620
|
if (oFormat.oFormatOptions.interval) {
|
|
621
|
+
var sSinglePattern,
|
|
622
|
+
sDelimiter = oFormat.oFormatOptions.intervalDelimiter;
|
|
598
623
|
|
|
599
624
|
if (oFormat.oFormatOptions.format) {
|
|
600
625
|
// when 'format' option is set, generate the pattern based on the greatest difference
|
|
@@ -605,10 +630,14 @@ sap.ui.define([
|
|
|
605
630
|
oFormat.intervalPatterns = [oFormat.intervalPatterns];
|
|
606
631
|
}
|
|
607
632
|
|
|
608
|
-
|
|
609
|
-
|
|
633
|
+
sSinglePattern = oFormat.oLocaleData.getCustomDateTimePattern(oFormat.oFormatOptions.format,
|
|
634
|
+
oFormat.oFormatOptions.calendarType);
|
|
635
|
+
// Put the single date pattern, which is generated based on the oFormatOptions.format, into the array in
|
|
636
|
+
// case the date interval is formatted as a single date
|
|
637
|
+
oFormat.intervalPatterns.push(sSinglePattern);
|
|
610
638
|
|
|
611
639
|
} else {
|
|
640
|
+
sSinglePattern = oFormat.oFormatOptions.pattern;
|
|
612
641
|
oFormat.intervalPatterns = [
|
|
613
642
|
// when 'format' option is not set, generate the combined interval pattern
|
|
614
643
|
oFormat.oLocaleData.getCombinedIntervalPattern(oFormat.oFormatOptions.pattern, oFormat.oFormatOptions.calendarType),
|
|
@@ -618,6 +647,12 @@ sap.ui.define([
|
|
|
618
647
|
}
|
|
619
648
|
var sCommonConnectorPattern = createIntervalPatternWithNormalConnector(oFormat);
|
|
620
649
|
oFormat.intervalPatterns.push(sCommonConnectorPattern);
|
|
650
|
+
if (sDelimiter) { // use delimiter pattern as first choice
|
|
651
|
+
sDelimiter = sDelimiter.replace(/'/g, "''");
|
|
652
|
+
sDelimiter = "'" + sDelimiter + "'";
|
|
653
|
+
oFormat.intervalPatterns.unshift(sSinglePattern + sDelimiter + sSinglePattern);
|
|
654
|
+
}
|
|
655
|
+
oFormat.intervalPatterns = Array.from(new Set(oFormat.intervalPatterns));
|
|
621
656
|
}
|
|
622
657
|
|
|
623
658
|
// if the current format isn't a fallback format, create its fallback formats
|
|
@@ -2305,7 +2340,7 @@ sap.ui.define([
|
|
|
2305
2340
|
* {@link sap.ui.core.format.DateFormat.getDateTimeWithTimezoneInstance#format}.
|
|
2306
2341
|
*
|
|
2307
2342
|
* @example <caption>DateTime (assuming timezone "Europe/Berlin")</caption>
|
|
2308
|
-
* var oDate =
|
|
2343
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
2309
2344
|
* DateFormat.getDateTimeInstance().format(oDate);
|
|
2310
2345
|
* // output: "Dec 24, 2021, 2:37:00 PM"
|
|
2311
2346
|
*
|
|
@@ -2399,27 +2434,55 @@ sap.ui.define([
|
|
|
2399
2434
|
return sResult;
|
|
2400
2435
|
};
|
|
2401
2436
|
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2437
|
+
/**
|
|
2438
|
+
* Checks whether the interval to be formatted has to use the pattern of a custom interval delimiter.
|
|
2439
|
+
*
|
|
2440
|
+
* @param {object} oDiffFields
|
|
2441
|
+
* An object describing which date information is required for this instance's interval format,
|
|
2442
|
+
* for example <code>{"Day": true, "Minutes": true}</code>
|
|
2443
|
+
* @returns {boolean}
|
|
2444
|
+
* Whether to use the custom interval delimiter pattern
|
|
2445
|
+
*
|
|
2446
|
+
* @private
|
|
2447
|
+
*/
|
|
2448
|
+
DateFormat.prototype._useCustomIntervalDelimiter = function (oDiffFields) {
|
|
2449
|
+
var aTokens;
|
|
2450
|
+
|
|
2451
|
+
if (!this.oFormatOptions.intervalDelimiter) {
|
|
2452
|
+
return false;
|
|
2453
|
+
}
|
|
2454
|
+
// If there are no differences in the date/time parts specified by "oFormatOptions.format", a single value is
|
|
2455
|
+
// formatted and there is no need to use the custom delimiter pattern.
|
|
2456
|
+
if (this.oFormatOptions.format) {
|
|
2457
|
+
aTokens = this.oLocaleData._parseSkeletonFormat(this.oFormatOptions.format);
|
|
2412
2458
|
|
|
2413
|
-
|
|
2459
|
+
return aTokens.some(function (oToken) {
|
|
2460
|
+
return oDiffFields[oToken.group];
|
|
2461
|
+
});
|
|
2462
|
+
}
|
|
2414
2463
|
|
|
2415
|
-
|
|
2464
|
+
return true;
|
|
2465
|
+
};
|
|
2466
|
+
|
|
2467
|
+
DateFormat.prototype._formatInterval = function(aJSDates, bUTC) {
|
|
2468
|
+
var oDate, oPart, sPattern, sSymbol,
|
|
2469
|
+
aBuffer = [],
|
|
2470
|
+
sCalendarType = this.oFormatOptions.calendarType,
|
|
2471
|
+
aFormatArray = [],
|
|
2472
|
+
oFromDate = UniversalDate.getInstance(aJSDates[0], sCalendarType),
|
|
2473
|
+
oToDate = UniversalDate.getInstance(aJSDates[1], sCalendarType),
|
|
2474
|
+
oDiffFields = this._getDiffFields([oFromDate, oToDate]);
|
|
2475
|
+
|
|
2476
|
+
if (!oDiffFields) {
|
|
2416
2477
|
return this._format(aJSDates[0], bUTC);
|
|
2417
2478
|
}
|
|
2418
2479
|
|
|
2419
|
-
if (this.
|
|
2480
|
+
if (this._useCustomIntervalDelimiter(oDiffFields)) {
|
|
2481
|
+
sPattern = this.intervalPatterns[0];
|
|
2482
|
+
} else if (this.oFormatOptions.format) {
|
|
2420
2483
|
// when 'format' option is set, generate the pattern based on the greatest difference
|
|
2421
|
-
sPattern = this.oLocaleData.getCustomIntervalPattern(this.oFormatOptions.format,
|
|
2422
|
-
|
|
2484
|
+
sPattern = this.oLocaleData.getCustomIntervalPattern(this.oFormatOptions.format, oDiffFields,
|
|
2485
|
+
sCalendarType);
|
|
2423
2486
|
} else {
|
|
2424
2487
|
sPattern = this.oLocaleData.getCombinedIntervalPattern(this.oFormatOptions.pattern, sCalendarType);
|
|
2425
2488
|
}
|
|
@@ -2454,8 +2517,18 @@ sap.ui.define([
|
|
|
2454
2517
|
Seconds: "Second"
|
|
2455
2518
|
};
|
|
2456
2519
|
|
|
2457
|
-
|
|
2458
|
-
|
|
2520
|
+
/**
|
|
2521
|
+
* Returns an object containing the relevant date/time parts that differ in the two given dates.
|
|
2522
|
+
*
|
|
2523
|
+
* @param {sap.ui.core.date.UniversalDate[]} aDates
|
|
2524
|
+
* An array with two UniversalDate instances representing the start and the end date of the interval;
|
|
2525
|
+
* the dates are expected to be in UTC time zone
|
|
2526
|
+
* @returns {Object<string, boolean>|null}
|
|
2527
|
+
* An object containing the different date/time parts, or <code>null</code> if the dates are the same
|
|
2528
|
+
*
|
|
2529
|
+
* @private
|
|
2530
|
+
*/
|
|
2531
|
+
DateFormat.prototype._getDiffFields = function(aDates) {
|
|
2459
2532
|
var bDiffFound = false,
|
|
2460
2533
|
mDiff = {};
|
|
2461
2534
|
|
|
@@ -2709,7 +2782,7 @@ sap.ui.define([
|
|
|
2709
2782
|
}
|
|
2710
2783
|
if (oDateValue.tzDiff) {
|
|
2711
2784
|
// tzDiff is in seconds for a higher precision (historical timezone might have differences in seconds)
|
|
2712
|
-
// e.g.
|
|
2785
|
+
// e.g. UI5Date.getInstance("1730-01-01T00:00:00Z")
|
|
2713
2786
|
// is in Berlin: Sun Jan 01 1730 00:53:28 GMT+0053 (Central European Standard Time)
|
|
2714
2787
|
oDate.setUTCSeconds(oDate.getUTCSeconds() + oDateValue.tzDiff);
|
|
2715
2788
|
}
|
|
@@ -2764,7 +2837,7 @@ sap.ui.define([
|
|
|
2764
2837
|
* {@link sap.ui.core.format.DateFormat.getDateTimeWithTimezoneInstance#parse}.
|
|
2765
2838
|
*
|
|
2766
2839
|
* @example <caption>DateTime (assuming timezone "Europe/Berlin")</caption>
|
|
2767
|
-
* var oDate =
|
|
2840
|
+
* var oDate = UI5Date.getInstance("2021-12-24T13:37:00Z");
|
|
2768
2841
|
* DateFormat.getDateTimeInstance().parse("Dec 24, 2021, 2:37:00 PM");
|
|
2769
2842
|
* // output: oDate
|
|
2770
2843
|
*
|
|
@@ -1479,7 +1479,9 @@ sap.ui.define([
|
|
|
1479
1479
|
|
|
1480
1480
|
if (oOptions.type === mNumberType.UNIT && !oOptions.showNumber) {
|
|
1481
1481
|
if (mUnitPatterns) {
|
|
1482
|
-
|
|
1482
|
+
// the plural category of a unit pattern is determined for the complete number, maybe as compact
|
|
1483
|
+
// notation, e.g. "1.2M" must check "1.2c6"
|
|
1484
|
+
sPluralCategory = this._getPluralCategory(sIntegerPart, sFractionPart, oShortFormat);
|
|
1483
1485
|
|
|
1484
1486
|
sPattern = mUnitPatterns["unitPattern-count-" + sPluralCategory];
|
|
1485
1487
|
if (!sPattern) {
|
|
@@ -1525,7 +1527,9 @@ sap.ui.define([
|
|
|
1525
1527
|
|
|
1526
1528
|
if (oShortFormat && oShortFormat.formatString && oOptions.showScale && oOptions.type !== mNumberType.CURRENCY) {
|
|
1527
1529
|
// Get correct format string based on actual decimal/fraction digits
|
|
1528
|
-
|
|
1530
|
+
// the plural category of a compact number is determined for the reduced short number without compact
|
|
1531
|
+
// notation, e.g. "1.2M" must check "1.2" (see CLDR "decimalFormat-short" and "decimalFormat-long")
|
|
1532
|
+
sPluralCategory = this._getPluralCategory(sIntegerPart, sFractionPart);
|
|
1529
1533
|
oShortFormat.formatString = this.oLocaleData.getDecimalFormat(oOptions.style, oShortFormat.key, sPluralCategory);
|
|
1530
1534
|
//inject formatted shortValue in the formatString
|
|
1531
1535
|
sResult = oShortFormat.formatString.replace(oShortFormat.valueSubString, sResult);
|
|
@@ -1548,7 +1552,9 @@ sap.ui.define([
|
|
|
1548
1552
|
}
|
|
1549
1553
|
|
|
1550
1554
|
// Get correct format string based on actual decimal/fraction digits
|
|
1551
|
-
|
|
1555
|
+
// the plural category of a compact currency is determined for the reduced short number without compact
|
|
1556
|
+
// notation, e.g. "1.2M" must check "1.2" (see CLDR "currencyFormat-short")
|
|
1557
|
+
sPluralCategory = this._getPluralCategory(sIntegerPart, sFractionPart);
|
|
1552
1558
|
if (bIndianCurrency) {
|
|
1553
1559
|
sPattern = getIndianCurrencyFormat(sStyle, oShortFormat.key, sPluralCategory);
|
|
1554
1560
|
} else {
|
|
@@ -1602,8 +1608,9 @@ sap.ui.define([
|
|
|
1602
1608
|
}
|
|
1603
1609
|
|
|
1604
1610
|
if (oOptions.showMeasure && sMeasure && oOptions.type === mNumberType.UNIT) {
|
|
1605
|
-
|
|
1606
|
-
|
|
1611
|
+
// the plural category of a unit pattern is determined for the complete number, maybe as compact
|
|
1612
|
+
// notation, e.g. "1.2M" must check "1.2c6"
|
|
1613
|
+
sPluralCategory = this._getPluralCategory(sIntegerPart, sFractionPart, oShortFormat);
|
|
1607
1614
|
|
|
1608
1615
|
if (mUnitPatterns) {
|
|
1609
1616
|
sPattern = mUnitPatterns["unitPattern-count-" + sPluralCategory];
|
|
@@ -1622,6 +1629,34 @@ sap.ui.define([
|
|
|
1622
1629
|
return this._addOriginInfo(sResult);
|
|
1623
1630
|
};
|
|
1624
1631
|
|
|
1632
|
+
/**
|
|
1633
|
+
* Gets the plural category for the given number information. With a given <code>oShortFormat</code>
|
|
1634
|
+
* the category is determined based on the compact notation.
|
|
1635
|
+
*
|
|
1636
|
+
* @param {int} sIntegerPart
|
|
1637
|
+
* The integer part
|
|
1638
|
+
* @param {int} [sFractionPart]
|
|
1639
|
+
* The fraction part
|
|
1640
|
+
* @param {{magnitude: int}} [oShortFormat]
|
|
1641
|
+
* An object containing the <code>magnitude</code> information describing the factor of a compact number
|
|
1642
|
+
* @returns {string}
|
|
1643
|
+
* The plural category
|
|
1644
|
+
*
|
|
1645
|
+
* @private
|
|
1646
|
+
*/
|
|
1647
|
+
NumberFormat.prototype._getPluralCategory = function (sIntegerPart, sFractionPart, oShortFormat) {
|
|
1648
|
+
var sNumber = sIntegerPart;
|
|
1649
|
+
|
|
1650
|
+
if (sFractionPart) {
|
|
1651
|
+
sNumber += "." + sFractionPart;
|
|
1652
|
+
}
|
|
1653
|
+
if (oShortFormat) {
|
|
1654
|
+
sNumber += "c" + oShortFormat.magnitude.toExponential().slice(2);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
return this.oLocaleData.getPluralCategory(sNumber);
|
|
1658
|
+
};
|
|
1659
|
+
|
|
1625
1660
|
NumberFormat.prototype._addOriginInfo = function(sResult) {
|
|
1626
1661
|
if (Configuration.getOriginInfo()) {
|
|
1627
1662
|
// String object is created on purpose and must not be a string literal
|